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
Test case for webinarCreate Create a Webinar.
public function testWebinarCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarRegistrantCreate()\n {\n }", "public function testWebinarPollCreate()\n {\n }", "public function testWebinar()\n {\n }", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarPolls()\n {\n }", "public function testWebinarUpdate()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function actionCreate()\n {\n $model = new WebinarCreateRequest();\n\n if ($model->load(Yii::$app->request->post()) ) {\n $model->status = Status::STATUS_NEW;\n $model->created_at = gmdate('Y-m-d H:i:s');\n $model->updated_at = gmdate('Y-m-d H:i:s');\n $model->created_by = $model->author_name;\n $model->updated_by = $model->author_name;\n $user = $model->author_name;\n $model->save();\n\n if($this->sendActivationLink($model->id, $model->email, $user)) {\n return $this->render('create', [\n 'model' => $model, \n 'status' => 'success', 'id' => $model->id]);\n }\n \n //return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function testWebinarAbsentees()\n {\n }", "public function testWebinarDelete()\n {\n }", "public function testCreateSurvey()\n {\n $data = [\n 'year' => 2020,\n 'type' => Survey::TRAINER,\n 'title' => 'My Awesome Survey',\n 'prologue' => 'Take the survey',\n 'epilogue' => 'Did you take it?'\n ];\n\n $response = $this->json('POST', 'survey', [\n 'survey' => $data\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', $data);\n }", "function createWebinar($payloadArray)\n {\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars'));\n\n $webinarObject = new WebinarEntity($payloadArray);\n\n return $this->sendRequest('POST', $path, $parameters = null, $payload = $webinarObject->toArray());\n }", "public function testEventCreate()\n {\n $response = $this->get('events/create');\n\n $response->assertStatus(200);\n }", "protected function setUp()\n {\n parent::setUp();\n $this->webinar = create(Webinar::class);\n }", "public function testIntegrationCreate()\n {\n $this->visit('user/create')\n ->see('Create New Account');\n $this->assertResponseOk();\n $this->assertViewHas('model');\n }", "public function testDeveloperCreate()\n {\n $response = $this->get('/developer/create');\n $response->assertStatus(200);\n }", "public function testStoreShouldCreateNewRiddle(){\n\t\t$riddle = [\n\t\t\t'solution' => 'solution',\n\t\t\t'riddle' => 'riddle',\n\t\t\t'name' => 'name',\n\t\t];\n\n\n\t\t$response = $this->call('POST', '/riddles', $riddle);\n\n\t\t$this->assertEquals(302, $response->status());\n\t\t$this->assertRedirectedTo(url('/riddles/1?successMessage=Record+Added+Successfully'));\n\n\t\t$this->assertEquals(1, count(Riddle::all()));\n\n\t\t$storedRiddle = Riddle::findById(1);\n\t\t$this->assertNotNull($storedRiddle);\n\n\t\t$this->assertEquals('solution', $storedRiddle->solution);\n\t\t$this->assertEquals('riddle', $storedRiddle->riddle);\n\t\t$this->assertEquals('name', $storedRiddle->name);\n\n\t\t$this->assertEquals(0, $storedRiddle->approved);\n\t\t$this->assertEquals(0, $storedRiddle->public);\n\t\t$this->assertEquals($this->user->id, $storedRiddle->owner_id);\n\t}", "public function user_can_visit_create_event_page()\n {\n $response = $this->get('/events/create');\n $response->assertStatus(200);\n $response->assertSeeText('Name');\n }", "public function testMeetingCreatePost()\n {\n $user = factory(App\\User::class)->create();\n }", "public function testListPastWebinarQA()\n {\n }", "public function testCreate()\n {\n $this->visit('/admin/school/create')\n ->submitForm($this->saveButtonText, $this->school)\n ->seePageIs('/admin/school')\n ;\n\n $this->seeInDatabase('schools', $this->school);\n }", "public function testPageCreate()\n {\n $faker = Faker::create();\n $response = $this\n ->actingAs(User::whereNotNull(\"verified\")->inRandomOrder()->first(), 'api')\n ->withHeaders([\n \"User-Agent\" => $faker->userAgent(),\n ])\n ->json('POST', \"/api/pages/\", [\n \"data\" => [\n \"name\" => $faker->sentence(4, true),\n ],\n \"relationships\" => [\n \"body\" => [\n \"data\" => [\n \"content\" => $faker->paragraphs(4, true),\n ],\n ],\n ],\n ]);\n $response\n ->assertStatus(201);\n }", "public function create()\n {\n // $crud = new Events();\n // $crud->photo ='anniv.png';\n // $crud->title = 'Sogod Founding Anniversary Concert';\n // $crud->descriptions = 'secret';\n // $crud->venue = 'Sogod Covered Court';\n // $crud->date = date('04/02/2018');\n // $crud->time = time('h:i:s');\n\n // $crud->save(); \n }", "public function testInstrumentCreate()\n {\n $this->browse(function (Browser $browser) {\n $user = User::find(1);\n $browser->loginAs($user)\n ->visit(new instrumentManagementPage())\n ->assertSee('Instruments')\n ->press('@actions-button')\n ->press('@actions-create-menu')\n ->assertSee('New Instrument')\n ->type('@code',uniqid('TestInstrument_'))\n ->type('@category', 'Dusk Testing')\n ->type('@module','Summer Capstone')\n ->type('@reference','Test - safe to delete')\n ->press('Save')\n //->press('@save-button') //TODO: use this once DUSK tag is fixed\n ->assertsee('View Instrument - TestInstrument_');\n });\n }", "public function testWebinarPollGet()\n {\n }", "public function testCreate()\n {\n $model = $this->makeFactory();\n \n $this->json('POST', static::ROUTE, $model->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_CREATED) \n ->seeJson($model->toArray());\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testAssessmentIsCreated()\n {\n $this->withoutExceptionHandling();\n $response = $this->post(route('assessments.store'), $this->getData());\n\n $response->assertStatus(200);\n\n $this->assertCount(1, Assessment::all());\n }", "public function testSellerCreateSuccess()\n {\n $this->demoUserLoginIn();\n $response = $this->call('GET', '/seller/create');\n $this->assertEquals(200, $response->status());\n }", "public function testInsert()\n {\n\n $data['url'] = 'unittest.com';\n $data['hosted_server'] = 'unittest';\n $data['state'] = 'unit';\n $data['created_date'] = '2017-01-01';\n $data['last_updated_date'] = '2017-01-01';\n $data['active_from'] = '2017-01-01';\n $data['active_to'] = '2017-01-01';\n\n $new_site = new Site();\n $new_site->createSite($data);\n\n $this->assertTrue(true);\n }", "public function testProfileCreate()\n {\n\n }", "public function testCreateSurvey0()\n {\n }", "public function testCreateSurvey0()\n {\n }", "public function an_authenticated_user_may_created_his_own_schedules()\n {\n $this->withOutExceptionHandling()->signIn();\n $schedule = make('App\\Schedule');\n $schedule->clinic_profile = false;\n // dd($schedule);\n // $this->expectException(\\Exception::class);\n $response = $this->json('post','/schedule', $schedule->toArray());\n $response->assertStatus(200);\n // dd($response->getContent());\n }", "public function create($websiteId, $prospect) {\n // @TODO - add support for api call\n throw new \\Exception('Not implemented');\n }", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function testActCreate()\n {\n $this->browse(function (Browser $browser) {\n $bill = Bill::factory()->create([\n 'contract_id' => $this->contract->id,\n 'requisite_id' => $this->requisite->id,\n 'tenant_id' => $this->tenant->id,\n ]);\n $service = $bill->services()->save(Service::factory()->make([\n 'name' => 'Rent',\n 'quantity' => '2',\n 'measure' => 'pc',\n 'price' => '1234'\n ]));\n\n $browser->loginAs($this->user)\n ->visit('/tenants/'.$this->tenant->id.'?tab=bills#tab')\n ->press('Создать')\n ->clickLink('Загрузить')\n ->assertPathIs($bill->act->document_url)\n ->assertSee('Акт');\n });\n }", "public function testStoreCreate()\n {\n $user = factory(User::class)->create(['id' => 1]);\n $postData = [\n 'slots' => ['10:00', '13:00', '16:00', '19:00']\n ];\n $this->actingAs($user)\n ->post(route('schedule.store'), $postData);\n $this->assertDatabaseHas('schedules', [\n 'user_id' => $user->id,\n 'date' => $tomorrow = Carbon::tomorrow()->format(config('app.date_format_db'))])\n ->assertDatabaseHas('slots', ['slot' => '10:00'])\n ->assertDatabaseHas('slots', ['slot' => '13:00'])\n ->assertDatabaseHas('slots', ['slot' => '16:00'])\n ->assertDatabaseHas('slots', ['slot' => '19:00']);\n }", "public function testBookCreatedSuccessfully()\n {\n $book = factory(Book::class)->make();\n \n $payload = [\n 'title' => $book->title,\n 'isbn' => $book->isbn,\n 'published_at' => $book->published_at,\n ];\n\n $this->json('post', '/api/books/create', $payload, $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure([\n 'message'\n ]);\n }", "public function store(AddWebinarRequest $request)\n {\n $data = $request->all();\n $webinar = new Webinar();\n $webinar->fill($data);\n $image = $request->file('image');\n if($image)\n {\n $path = Storage::disk('public')->put('images', $image);\n $webinar->image = $path;\n }\n\n $webinar->save();\n\n return response()->json([\n 'status' => 200,\n 'webinar' => $webinar,\n ]); \n }", "public function testWebinarPanelists()\n {\n }", "function testCreate() {\n # fails due to not verified...\n $this->aRequest['email'] = '[email protected]';\n $this->assertFalse($this->oObject->create());\n\n # but verified users works\n $this->aRequest['email'] = '[email protected]';\n $this->assertTrue($this->oObject->create());\n $this->oObject->destroy(session_id());\n }", "function testSapAdd()\n {\n $user = User::whereId(1)->first();\n\n $this->actingAs($user)\n ->post('/saps/add', [\n '_token' => csrf_token(),\n 'notes' => 'lead booked',\n 'lead_id' => 1,\n 'appointment_at' => date('Y-m-d H:i:s')\n ])->assertJson(['data' => ['lead_id' => 1]]);\n\n }", "function a_user_can_be_created(){\n\n $profession = factory(Profession::class)->create([\n 'title' => 'Web Developer'\n ]);\n $skillA = factory(Skill::class)->create([\n 'description' => 'CSS'\n ]);\n $skillB = factory(Skill::class)->create([\n 'description' => 'HTML'\n ]);\n\n $this->browse(function(Browser $browser) use ($profession,$skillA,$skillB){\n $browser->visit('users/create')\n ->assertSeeIn('h5','Create User')\n ->type('name','Yariel Gordillo')\n ->type('email','[email protected]')\n ->type('password','secret')\n ->type('bio','This a small bio')\n ->select('profession_id',$profession->id)\n ->type('twitter' ,'https://twitter.com/yariko')\n ->check(\"skills[{$skillA->id}]\")\n ->check(\"skills[{$skillB->id}]\")\n ->radio('role', 'user')\n ->press('Create User')\n ->assertPathIs('/users')\n ->assertSee('Yariel Gordillo')\n ->assertSee('[email protected]');\n });\n\n }", "public function createParticipant(ParticipateRequest $request) {\n \t$participant = new Participant;\n \t$participant -> id_event = $request -> input('id_event');\n \t$participant -> id_user = $request -> input('id_user');\n\n \t$participant -> save();\n\n \treturn redirect('publicevents/'.$participant->id_event);\n }", "public function user_can_create_event()\n {\n $user = User::factory()->create();\n $event = Event::factory()->make()->toArray();\n $response = $this->actingAs($user)->post('/events', $event);\n $response->assertStatus(302);\n $this->assertNotNull(Event::where('name', $event['name'])->first());\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 testHandleCreateSuccess()\n {\n // Populate data\n $this->_populate();\n \n $response = $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/create', $this->customDealerAccountData, [], [], ['HTTP_REFERER' => '/dealer-account/create']);\n \n $this->assertRedirectedTo('/dealer-account');\n $this->assertSessionHas('dealer-account-created', '');\n }", "public function testQuarantineCreate()\n {\n\n }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = '[email protected]';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "public function createAction() {\n\n $this->validateUser();\n\n $form = new Yourdelivery_Form_Testing_Create();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->getRequest()->getPost())) {\n if ($form->getValue('tag') && $this->getRequest()->getParam('proceed') == 'false') {\n $tags = Yourdelivery_Model_Testing_TestCase::searchForTags($form->getValue('tag'));\n\n if ($tags) {\n foreach ($tags as $tag) {\n $ids .= sprintf('<a href=\"/testing_cms/overview/id/%s\" target=\"blank\">%s</a> ', $tag['id'], $tag['id']);\n }\n $this->warn('Tag already in use for testcase ' . $ids);\n $this->_redirect(vsprintf('testing_cms/create/title/%s/author/%s/description/%s/priority/%s/tag/%s/proceed/true', $form->getValues()));\n }\n }\n\n $testCase = new Yourdelivery_Model_Testing_TestCase();\n $testCase->setData($form->getValues());\n $id = $testCase->save();\n $this->success('Testcase successfully created.');\n $this->_redirect('testing_cms/add/id/' . $id);\n } else {\n $this->error($form->getMessages());\n }\n }\n $this->view->post = $this->getRequest()->getParams();\n }", "private function buildVenueSurvey()\n {\n $this->year = current_year();\n\n $this->trainer = Person::factory()->create();\n\n $this->survey = Survey::factory()->create(['year' => $this->year, 'position_id' => Position::TRAINING]);\n $surveyId = $this->survey->id;\n\n $this->venueGroup = SurveyGroup::factory()->create(['survey_id' => $surveyId, 'sort_index' => 1]);\n $this->venueQuestion = SurveyQuestion::factory()->create(['survey_id' => $surveyId, 'survey_group_id' => $this->venueGroup->id]);\n\n $this->trainerGroup = SurveyGroup::factory()->create(['survey_id' => $surveyId, 'type' => 'trainer', 'sort_index' => 2]);\n $this->trainerQuestion = SurveyQuestion::factory()->create(['survey_id' => $surveyId, 'survey_group_id' => $this->trainerGroup->id]);\n\n $this->slot = Slot::factory()->create([\n 'description' => 'Venue 1',\n 'position_id' => Position::TRAINING,\n 'begins' => \"{$this->year}-01-01 00:00\",\n 'ends' => \"{$this->year}-01-01 00:01\"\n ]);\n PersonSlot::factory()->create(['person_id' => $this->user->id, 'slot_id' => $this->slot->id]);\n TraineeStatus::factory()->create(['person_id' => $this->user->id, 'slot_id' => $this->slot->id, 'passed' => true]);\n $this->trainerSlot = Slot::factory()->create([\n 'description' => 'Venue 1',\n 'position_id' => Position::TRAINER,\n 'begins' => \"{$this->year}-01-01 00:00\",\n 'ends' => \"{$this->year}-01-01 00:01\"\n ]);\n PersonSlot::factory()->create(['person_id' => $this->trainer->id, 'slot_id' => $this->trainerSlot->id]);\n TrainerStatus::factory()->create([\n 'person_id' => $this->trainer->id,\n 'slot_id' => $this->slot->id,\n 'trainer_slot_id' => $this->trainerSlot->id,\n 'status' => TrainerStatus::ATTENDED\n ]);\n }", "public function testNew()\n {\n $clientNoAuth = static::createClient();\n $clientNoAuth->request('GET', '/clientes/new');\n //redireccion a main\n $this->assertEquals(302, $clientNoAuth->getResponse()->getStatusCode());\n\n //caso con todo bien, redirección a /departamento/ y bien agregado el nuevo departamento.\n $client = $this->createAuthorizedClient();\n $crawler = $client->request('GET', '/persona/new');\n $form = $crawler->selectButton('Guardar')->form();\n $form['persona[Nombre]'] = 'Celia';\n $form['persona[Apellidos]'] = 'Cruz';\n $form['persona[Cargo]'] = 'Boss';\n $form['persona[Correo]'] = '[email protected]';\n $form['persona[Telefono]'] = '123456789';\n $form['persona[Local_id]'] = '1';\n $form['persona[Departamento]'] = '1';\n\n $crawler = $client->submit($form);\n $this->assertTrue($client->getResponse()->isRedirect());\n $crawler = $client->followRedirect();\n }", "public function testRentalInsertFormFrontEnd()\n {\n $this->authentication();\n $this->visit(route('rental.frontend.insert'));\n $this->seeStatusCode(200);\n $this->see('Verhuur aanvraag.');\n }", "public function testCreateChallengeActivity()\n {\n }", "public function createTournament(){\n\t}", "public function testVenueSubmitSurvey()\n {\n $this->buildVenueSurvey();\n\n $venueG = $this->venueGroup;\n $venueQ = $this->venueQuestion;\n\n $response = $this->json('POST', 'survey/submit', [\n 'slot_id' => $this->slot->id,\n 'type' => Survey::TRAINING,\n 'survey' => [\n [\n 'survey_group_id' => $venueG->id,\n 'answers' => [\n [\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]\n ]\n ],\n ]\n ]);\n\n $response->assertStatus(200);\n\n $this->assertDatabaseHas('survey_answer', [\n 'person_id' => $this->user->id,\n 'slot_id' => $this->slot->id,\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]);\n }", "public function __construct($webinar, $participant, $certificate)\n {\n //\n $this->webinar = $webinar;\n $this->participant = $participant;\n $this->certificate = $certificate;\n }", "public function testCreateChallengeActivityTemplate()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function testCreateScenario()\n {\n $client = static::createClient();\n }", "public function test_user_can_create_post()\n {\n $this->signIn();\n $attributes = [\n 'title' => 'my title',\n 'description' => 'my description',\n 'notes' => 'my notes'\n ];\n\n $response = $this->post('/api/projects', $attributes)->assertStatus(201);\n\n $response->assertJson([\n 'data' => [\n 'type' => 'projects',\n 'attributes' => [\n 'title' => $attributes['title'],\n 'notes' => $attributes['notes'],\n 'description' => $attributes['description'],\n 'user_id' => auth()->id()\n ]\n ]\n ]);\n }", "public function test_can_vendor_create(){\n $data = [\n 'Name' => $this->faker->name,\n 'category' => $this->faker->category,\n ];\n\n $this->json('POST','/api/vendor_create',$data);\n }", "public function test_user_can_create_vehicle() {\n // $user = factory(User::class)->create();\n $user = User::factory()->create();\n $this->actingAs($user, 'api');\n\n $storeVehicle = [\n 'name' => 'First Vehicle',\n 'plate_num' => 'kddjjdj',\n 'color' => 'brown',\n 'number_of_seats' => 2\n ];\n\n $this->json('POST', 'api/vehicle', $storeVehicle ,\n [ 'Accept' => 'application/json']\n )\n ->assertStatus(201);\n // ->assertJson([\n // \"status\" => true,\n // \"message\" => \"Vehicle created\",\n // \"data\" => [\n // 'name' => 'First Vehicle',\n // 'plate_num' => 'kddjjdj',\n // 'color' => 'brown',\n // 'number_of_seats' => 2\n // ],\n // \"message\" => \"Vehicle created\"\n // ]);\n }", "public function test_create_item() {}", "public function test_create_item() {}", "public function testCanCreateCourse()\n {\n \n $response = $this->call('POST', '/course', [\n 'name' => 'Kursur PHP Advance',\n 'level' => 'Beginner',\n 'benefit' => 'Bisa membuat website sendiri'\n ]);\n $this->assertEquals(201, $response->status());\n }", "public function testCreate()\n {\n\n $data = array(\n 'achRoutingNumber' => '987654321',\n 'achAccountNumber' => '123456789',\n 'achAccountType' => 'CHECKING',\n 'foo' => 'bar'\n );\n\n $transaction = $this->client->transaction()->create($data);\n $this->assertEquals($data, get_object_vars($transaction->post), 'Passed variables are not correct');\n $this->assertEquals('POST', $transaction->request_method, 'The PHP Verb Is Incorrect');\n $this->assertEquals('/transactions', $transaction->path, 'The path is incorrect');\n }", "public function test_student_can_be_created_with_new_guardian_info()\n {\n $user = User::factory()->create();\n $classroom = $this->generateTestClassroom();\n $studentInfo = $this->studentInfo($classroom);\n $guardianInfo = [\n 'guardian_title' => $this->faker->title,\n 'guardian_first_name' => $this->faker->firstName,\n 'guardian_last_name' => $this->faker->lastName,\n 'guardian_email' => $this->faker->email,\n 'guardian_phone' => $this->faker->e164PhoneNumber,\n 'guardian_occupation' => $this->faker->jobTitle,\n 'guardian_address' => $this->faker->address\n ];\n $studentInfo = array_merge($studentInfo, $guardianInfo);\n $response = $this->actingAs($user)->post('/store/student', $studentInfo);\n\n $response->assertStatus(302)->assertSessionHas('success')->assertSessionHasNoErrors();\n }", "public function testCreate()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/authors/create')\n ->type('name', 'John')\n ->type('lastname', 'Doe')\n ->press('Save')\n ->assertPathIs('/authors')\n ->assertSee('John')\n ->assertSee('Doe');\n });\n }", "public function testExample()\n { \n\n $data = [\n 'name'=>'Побег из Шоушенка',\n 'description'=>'Фильм',\n ];\n\n $this->put('/film',$data)->seeJsonEquals([\n 'created'=>true\n ]);\n }", "public function create($data)\n {\n \n \t\n \t$data = ['url' => 'Employers','method'=>'POST','data'=>$data];\n \treturn $this->payRunObject->call($data);\n }", "public function testParticipantsPost()\n {\n }", "public function testPostCreate()\n {\n $this->json('POST', '/api/post_create', ['title' => 'test1', 'description' => 'description1', 'login' => 'user1'])\n ->assertJson([\n 'post_id' => true\n ]);\n }", "public function create()\n {\n $this->validate();\n Contest::create($this->modelData());\n $this->modalFormVisible = false;\n $this->resetVars();\n }", "public function create()\n {\n $credentials = Request()->validate([\n 'name' => ['required','string'],\n 'price' => ['required','numeric'],\n 'stock' => ['required','numeric'],\n 'instrument_type_id' => ['required']\n ]);\n Instrument::create([\n 'name' => request('name'),\n 'price' => request('price'),\n 'stock' => request('stock'),\n 'instrument_type_id' => request('instrument_type_id')\n ]);\n Binnacle::create([\n 'entity' => \"El insumo : \". request('name'),\n 'action' => \"inserto\",\n 'table' => \"Insumos\",\n 'user_id'=> Auth::user()->id\n ]);\n return redirect()->route('instruments.eachOne');\n }", "public function executeCreate(sfWebRequest $request)\n {\n\t//to handle failure of a validation when the specimen is a new identification\n\t//and allow the callback to still redirect to \"newIdentificationSuccess.php\"\n\t//(see also \"newSuccess.php)\n\tif($request->hasParameter(\"split_created\"))\n\t{\n\t\t$this->newIdentification=TRUE;\n\t\t$this->original_id= $request->getParameter('split_created','0') ;\n\t}\n\t//\n if($this->getUser()->isA(Users::REGISTERED_USER)) $this->forwardToSecureAction();\n $this->forward404Unless($request->isMethod('post'),'You must submit your data with Post Method');\n $spec = new Specimens();\n $this->form = new SpecimensForm($spec);\n $this->processForm($request, $this->form,'create');\n $this->loadWidgets();\n\n $this->setTemplate('new');\n }", "public function testVolunteerHourCreateForProjectSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $testProjectID = 1;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/project/'.$testProjectID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function testVolunteerHourCreateForContactSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/volunteer/'.$volunteerID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function testCreateBook()\n {\n $this->browse(function (Browser $browser) {\n //Make a book to add \n $book = factory('App\\Book')->make();\n //Navigate to the create page and send the data\n $browser->visit('/api/books/create')\n ->type('title', $book->title)\n ->type('author', $book->author)\n ->press('Add');\n //Check we are redirected to home page with no errors.\n $browser->pause(500);\n $browser->assertPathIs('/api/books')->assertSee('Book was successfully saved');\n //Check the new book is displayed\n $browser \n ->assertSee($book->title)\n ->assertSee($book->author);\n\n });\n\n }", "public function testRegisterNewContract()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(factory(User::class)->create());\n $property = factory(Property::class)->create([\n 'rented' => null,\n 'status' => Property::STATUS_ACTIVE\n ]);\n $lessee = factory(Lessee::class)->create();\n\n $browser\n ->visit(route('contrato.create'))\n ->on(new CreateContractPage())\n ->assertSee('Nuevo Contrato');\n\n\n\n\n\n $browser->selectLessor($property->lessor->id);\n $browser->selectProperty($property->id);\n $browser->selectLessee($lessee->id);\n $browser->typeSlowly('@years',1);\n // Contract dates\n $this->fillInputDate($browser,'periods[0][fecha_inicio]', now());\n $this->fillInputDate($browser,'periods[0][fecha_fin]', now()->addMonth());\n $browser->typeSlowly('input[name=\\'periods[0][cantidad]\\']', random_int(1000,1210));\n\n $browser->pause(500);\n $browser->screenshot('after');\n $browser->screenshot('test');\n $browser->type('@bonus',10);\n $browser->type('@deposit',5000);\n $browser->click('@submit');\n\n $browser->assertRouteIs('contrato.index');\n $browser->assertSee('Catalogo de Contratos');\n });\n }", "public function testWebinarPollDelete()\n {\n }", "public function executeCreate(sfWebRequest $request)\n {\n $this->forward404Unless($request->isMethod(sfRequest::POST));\n $this->form = new WebsitePracticeAreaForm();\n $this->websitedetail = UsersWebsite::getUsersWebsiteId($this->getUser()->getAttribute('admin_user_id'));\n $this->displaySlugValue = $_POST['WebsitePracticeArea']['Newslug'];\n $redirectFlag = $request->getPostParameter('submit');\n $this->processForm($request, $this->form, $redirectFlag);\n $this->setTemplate('new');\n }", "public function createBooking(array $data);", "public function testCanCreateUserObject()\n {\n $s = json_decode('{\"url\":\"https://www.test.net:8443/webhook\",\"has_custom_certificate\":true,\"pending_update_count\":0,\"max_connections\":40}');\n $t = new WebhookInfo($s);\n $this->assertInstanceOf(WebhookInfo::class, $t);\n $this->assertEquals('https://www.test.net:8443/webhook', $t->url);\n $this->assertTrue($t->has_custom_certificate);\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 testCreatePayrun()\n {\n }", "public function testIndexSurvey()\n {\n $year = 2018;\n Survey::factory()->create(['year' => $year]);\n\n $response = $this->json('GET', 'survey', ['year' => $year]);\n $response->assertStatus(200);\n $this->assertCount(1, $response->json()['survey']);\n }", "public function testPolicyCanBeCreated()\n {\n $policy = factory(App\\Models\\Policy::class)->create([\n 'title' => 'Administrator',\n ]);\n\n $this->assertEquals($policy->title, 'Administrator');\n\n $this->seeInDatabase('policies', ['id' => '1', 'title' => 'Administrator']);\n }", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function testAddVendorComplianceSurvey()\n {\n }", "public function create()\n\t{\n\t\treturn $this->fail(lang('RESTful.notImplemented', ['create']), 501);\n\t}", "public function test_example()\n {\n $response = $this->post('conciertos/alta',[\n 'nombre' => 'The O2 Arena Muse',\n 'fecha' => '2019-09-15',\n 'recinto_id' => '1',\n 'numero_espectadores' => '100',\n 'promotor_id' => '1',\n 'grupos_ids' => [1,2],\n 'medios_publicitarios_ids' => [1,2],\n ]);\n\n $response->assertStatus(200);\n }", "public function actionCreateappointment(): bool\n {\n $request = Yii::$app->request;\n \n if ($request->isPost) { \n $appointment = new Appointments;\n $appointment->client_id = $request->post('user_id');\n $appointment->service_id = $request->post('service_id');\n $appointment->date = substr(str_replace('T', ' ', $request->post('date')), 0, 18);\n $appointment->status = Appointments::STATUS_ACTIVE;\n\n return ($appointment->save()) ? true : false;\n }\n \n return false;\n }", "public function testCreatePayrollCalendar()\n {\n }", "public function testStoreShouldCreateNewTavern(){\n\t\t$tavern = [\n\t\t\t'name' => 'The Golden Rat',\n\t\t\t'type' => 'Thieves Guild Hangout',\n\t\t\t'tavern_owner_id' => 1,\n\t\t];\n\n\n\t\t$response = $this->call('POST', '/taverns', $tavern);\n\n\t\t$this->assertEquals(302, $response->status());\n\t\t$this->assertRedirectedTo(url('/taverns/1?successMessage=Record+Added+Successfully'));\n\n\t\t$this->assertEquals(1, count(Tavern::all()));\n\n\t\t$storedTavern = Tavern::findById(1);\n\t\t$this->assertNotNull($storedTavern);\n\n\t\t$this->assertEquals('The Golden Rat', $storedTavern->name);\n\t\t$this->assertEquals('Thieves Guild Hangout', $storedTavern->type);\n\t\t$this->assertEquals(1, $storedTavern->tavern_owner_id);\n\n\t\t$this->assertEquals(0, $storedTavern->approved);\n\t\t$this->assertEquals(0, $storedTavern->public);\n\t\t$this->assertEquals($this->user->id, $storedTavern->owner_id);\n\t}" ]
[ "0.7855212", "0.7379238", "0.69512796", "0.6878894", "0.6584363", "0.6553019", "0.64912003", "0.6440262", "0.6421352", "0.64194024", "0.6349812", "0.63445705", "0.62597454", "0.62102824", "0.61887443", "0.6174561", "0.61369574", "0.6054688", "0.601544", "0.5883184", "0.5879682", "0.5864063", "0.58290356", "0.5801273", "0.57977116", "0.5793272", "0.57854867", "0.57656217", "0.5750161", "0.57478935", "0.5742112", "0.57256263", "0.5715932", "0.569887", "0.5670852", "0.5670852", "0.5650862", "0.5626532", "0.5588387", "0.5559275", "0.5529558", "0.5514925", "0.55030876", "0.5493811", "0.54933816", "0.5490643", "0.54881275", "0.54874456", "0.5484526", "0.54805404", "0.5469255", "0.546429", "0.5462932", "0.5449574", "0.5449172", "0.54447055", "0.5435301", "0.54192746", "0.541908", "0.5412494", "0.54119974", "0.5407994", "0.5403464", "0.54016244", "0.53959244", "0.53924465", "0.53921115", "0.53917646", "0.53768957", "0.53768957", "0.53664607", "0.5361709", "0.53519696", "0.53412354", "0.5340198", "0.5337327", "0.5335737", "0.53166944", "0.5315347", "0.5308292", "0.5300565", "0.53000396", "0.52989435", "0.5296069", "0.52954966", "0.5292964", "0.5284439", "0.5283256", "0.528252", "0.5280929", "0.5279378", "0.52703923", "0.5269166", "0.52676994", "0.5258898", "0.52525574", "0.52480745", "0.5245886", "0.5244334", "0.52418554" ]
0.8172204
0
Test case for webinarDelete Delete a Webinar.
public function testWebinarDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function deleteSportsVenue($venue);", "public function testDeleteSurvey()\n {\n $survey = Survey::factory()->create();\n $surveyId = $survey->id;\n\n $response = $this->json('DELETE', \"survey/{$surveyId}\");\n\n $response->assertStatus(204);\n $this->assertDatabaseMissing('survey', ['id' => $surveyId]);\n }", "public function test_delete() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n outagedb::delete(self::$outage->id);\n\n // Should not exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage) OR (id = :idevent)\",\n ['idoutage' => self::$outage->id, 'idevent' => self::$event->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertFalse($event);\n }", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/invoice/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Invoice', 'invoiceId', self::$objectId);\n }", "public function testDelete()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('DELETE', static::ROUTE . '/' . $model->id, [], [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_NO_CONTENT);\n }", "public function test_deleteSubscriber() {\n\n }", "public function testDeleteSurvey0()\n {\n }", "public function testDeleteSurvey0()\n {\n }", "public function testDelete()\n\t{\n\t\t// Add test bookings\n\t\t$bookings = [];\n\t\tforeach ($this->clients as $client) {\n\t\t\t$booking = factory(\\App\\Booking::class)->create([\n\t\t\t\t'fitter_id' => $this->admin->fitter->id,\n\t\t\t\t'client_id' => $client->id,\n\t\t\t\t'horse_id' => factory(\\App\\Horse::class)->create(['client_id' => $client->id])->id,\n\t\t\t\t'rider_id' => factory(\\App\\Rider::class)->create(['client_id' => $client->id])->id,\n\t\t\t\t'user_id' => factory(\\App\\User::class)->create([\n\t\t\t\t\t'fitter_id' => $this->admin->fitter->id,\n\t\t\t\t\t'type' => 'fitter-user',\n\t\t\t\t])->id,\n\t\t\t]);\n\n\t\t\t$bookings[] = $booking->toArray();\n\t\t}\n\n\t\t$booking = \\App\\Booking::find($bookings[0]['id']);\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/bookings/' . $booking->id)\n\t\t\t ->assertStatus(200)\n\t\t\t ->assertJsonStructure([\n\t\t\t\t 'success',\n\t\t\t ]);\n\n\t\t$this->assertDatabaseMissing('bookings', ['id' => $booking->id]);\n\t}", "public function testDelete()\n\t{\n\t\t$this->resetReservationTable();\n\t\t$this->resetDateTimes();\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$reservation->save(false);\n\t\t$this->assertTrue($reservation->delete());\n\t}", "public function testLeaseDelete()\n {\n $user = factory(User::class)->create();\n $lease = factory(Lease::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('lease.delete', ['id' => $lease->id]))\n ->assertStatus(200);\n }", "public function testDelete()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertGreaterThan(0, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--delete')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Supprimer\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Supprimer')->form();\n\t\t$crawler = $client->submit($form);\t\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Le client a bien été supprimé.\")')->count());\n\n\t}", "public function testDeleteEnrollmentRequest()\n {\n }", "public function delete($episode);", "function deleteWebinar($webinarKey, $sendCancellationEmails = true)\n {\n ($sendCancellationEmails) ? $parameters = ['sendCancellationEmails' => true] : $parameters = null;\n\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n return $this->sendRequest('DELETE', $path, $parameters, $payload = null);\n }", "public function testRemove()\n {\n $paymentMethodId = '36538b73-0ff9-4bf6-bc94-20f499b4f85d';\n $customerId = '20e68ad7-ff54-4cb6-8556-f87f58bcf995';\n\n $this->resource->remove($paymentMethodId,$customerId);\n\n $this->assertAttributeEquals(BASE_URL, 'base_url', $this->connector, 'Failed. Base url not correct');\n $this->assertAttributeEquals('DELETE', 'method', $this->connector, 'Failed. Method is not correct');\n $this->assertAttributeEquals('paymentmethods/' . $paymentMethodId . '?customerId=' .$customerId, 'url', $this->connector, 'Failed. Url is not correct');\n }", "public function delete($Enterprise) { ; }", "public function testDeletePromotionCampaignApplicationUsingDELETE()\n {\n }", "public function testDeleteVendorComplianceSurvey()\n {\n }", "public function testDelete()\n {\n\n // Create exhibits and items.\n $neatline1 = $this->_createNeatline('Test Exhibit 1', '', 'test-exhibit-1');\n $neatline2 = $this->_createNeatline('Test Exhibit 2', '', 'test-exhibit-2');\n $item1 = $this->_createItem();\n $item2 = $this->_createItem();\n\n // Create records.\n $record1 = new NeatlineDataRecord($item1, $neatline1);\n $record2 = new NeatlineDataRecord($item2, $neatline1);\n $record3 = new NeatlineDataRecord($item1, $neatline2);\n $record4 = new NeatlineDataRecord($item2, $neatline2);\n $record1->save();\n $record2->save();\n $record3->save();\n $record4->save();\n\n // 2 exhibits, 4 data records.\n $_exhibitsTable = $this->db->getTable('NeatlineExhibit');\n $_recordsTable = $this->db->getTable('NeatlineDataRecord');\n $this->assertEquals($_exhibitsTable->count(), 2);\n $this->assertEquals($_recordsTable->count(), 4);\n\n // Call delete.\n $neatline1->delete();\n\n // 1 exhibits, 2 data records.\n $this->assertEquals($_exhibitsTable->count(), 1);\n $this->assertEquals($_recordsTable->count(), 2);\n\n }", "public function testDelete()\n {\n }", "public function testDeleteCampaignFromPromotionUsingDELETE()\n {\n }", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/transaction/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Transaction', 'transactionId', self::$objectId);\n }", "public function testDeleteNotTrashedAndOwnCreated()\r\n {\r\n //create teacher user\r\n $teacher = $this->CreateTeacher();\r\n $lisUser = $this->CreateTeacherUser($teacher);\r\n\r\n //now we have created studentuser set to current controller\r\n $this->controller->setLisUser($lisUser);\r\n $this->controller->setLisPerson($teacher);\r\n\r\n $subjectRound = $this->CreateSubjectRound();\r\n $student = $this->CreateStudent();\r\n $anotherTeacher = $this->CreateTeacher();\r\n //$studentGrade = $this->CreateStudentGrade();\r\n\r\n $independentWork = $this->CreateIndependentWork([\r\n 'name' => uniqid() . 'Name',\r\n 'duedate' => new \\DateTime,\r\n 'description' => uniqid() . ' Description for independentwork',\r\n 'durationAK' => (int) uniqid(),\r\n 'subjectRound' => $subjectRound->getId(),\r\n 'teacher' => $anotherTeacher->getId(),\r\n 'student' => $student->getId(),\r\n 'createdBy' => $lisUser->getId()\r\n ]);\r\n\r\n\r\n $this->em->persist($independentWork);\r\n $this->em->flush($independentWork);\r\n\r\n $id = $independentWork->getId();\r\n\r\n //prepare request\r\n $this->routeMatch->setParam('id', $id);\r\n\r\n $this->request->setMethod('delete');\r\n $result = $this->controller->dispatch($this->request);\r\n $response = $this->controller->getResponse();\r\n\r\n $this->PrintOut($result, false);\r\n\r\n //assertions\r\n $this->assertEquals(200, $response->getStatusCode());\r\n $this->assertEquals(false, $result->success);\r\n $this->assertEquals('NOT_TRASHED', $result->message);\r\n }", "public function testDelete()\n\t{\n\t\t$saddle = $this->saddles[0];\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/saddles/' . $saddle->id)\n\t\t\t ->assertStatus(200);\n\n\t\t$this->assertDatabaseMissing('saddles', ['id' => $saddle->id]);\n\t}", "public function deleted(Instructor $instructor)\n {\n //\n }", "public function testDeleteChallenge()\n {\n }", "public function testDeleteRequest()\n {\n $requestInstance = null;\n\n $this->router->delete('/customers/{id}/relationships/{relationship}', [\n 'middleware' => ['request', 'response'],\n function(\\Luminary\\Http\\Requests\\Destroy $request, $id, $relationship) use(&$requestInstance) {\n $requestInstance = $request;\n }\n ]);\n\n $data = [\n 'data' => [\n 'type' => 'location',\n 'id' => '1234'\n ]\n ];\n\n $this->json('DELETE', 'customers/1234/relationships/location', $data, $this->headers());\n\n $this->assertResponseStatus(204);\n $this->assertInstanceOf(\\Luminary\\Http\\Requests\\Destroy::class, $requestInstance);\n $this->assertInstanceOf(CustomerAuthorize::class, $requestInstance->getAuthorize());\n }", "public function testDeleteEvent()\n {\n }", "public function deleted(Investor $investor)\n {\n //\n }", "public function testProjectProjectIDInviteeInviteIDDelete()\n {\n }", "public function testDeleteUrlUsingDELETE()\n {\n }", "public function testDeleteHospital(){\r\n\t\t$this->http = new Client(['base_uri' => 'http://localhost/casecheckapp/public/index.php/']);\r\n\r\n\t\t//Test HTTP status ok for id=1\r\n\t\t$response= $this->http->request('DELETE','api/v1/hospital/2');//Change ID here\r\n\t\t$this->assertEquals(200,$response->getStatusCode());\r\n\r\n\t\t//Stopping the connexion with Guzzle\r\n\t\t$this->http = null;\r\n\t}", "public function testDelete()\n {\n $dataLoader = $this->getDataLoader();\n $data = $dataLoader->getOne();\n $this->deleteTest($data['user']);\n }", "public function test_shopper_can_be_deleted()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $shopper2 = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $response = $this->delete(route('shoppers.destroy', $shopper2));\n\n $response->assertStatus(302);\n $response->assertRedirect(route('shoppers.index'));\n }", "public function testMakeDeleteRequest()\n {\n $client = new MockClient('https://api.xavierinstitute.edu', [\n new JsonResponse([\n 'success' => [\n 'code' => 200,\n 'message' => 'Deleted.',\n ],\n ], 200),\n ]);\n\n $this->assertEquals($client->delete('teachers/1'), true);\n }", "public function deleteTest()\n {\n $this->assertEquals(true, $this->object->delete(1));\n }", "public function testDeleteClient() {\n\n // Generate user and client\n $user = factory(App\\User::class)->create();\n $client = $user->clients()->save(factory(App\\Client::class)->make());\n\n $this->actingAs($user)\n ->get('/clients/' . $client->id . '/delete')\n ->seeJson(['success' => true]);\n\n }", "public function testDeleteChallengeActivity()\n {\n }", "public function testPageDelete()\n {\n $faker = Faker::create();\n $page = Page::inRandomOrder()->first();\n $response = $this\n ->actingAs(User::where(\"admin\", true)->whereNotNull(\"verified\")->inRandomOrder()->first(), 'api')\n ->withHeaders([\n \"User-Agent\" => $faker->userAgent(),\n ])\n ->json('DELETE', \"/api/pages/\" . $page->slug);\n $response\n ->assertStatus(200);\n }", "public function testDeleteSite()\n {\n }", "public function testDeleteChallengeEvent()\n {\n }", "public function testDeleteVendorComplianceSurveyTag()\n {\n }", "public function test_delete_item() {}", "public function test_delete_item() {}", "public function testDeleteAppartment() {\n $newAcc = My_Houseshare_Factory::accommodation(4);\n $newAcc->delete();\n\n $accRowAfter = $this->_model->find(4)->current();\n $this->assertTrue(null === $accRowAfter);\n\n My_Houseshare_Appartment::deleteAcc(5);\n\n $accRowAfter = $this->_model->find(5)->current();\n $this->assertTrue(null === $accRowAfter);\n\n }", "public function testDeleteUnauthorized()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('DELETE', static::ROUTE . '/' . $model->id, [], [])\n ->seeStatusCode(JsonResponse::HTTP_UNAUTHORIZED);\n }", "public function testDeleteUserrecording()\n {\n }", "public function test_can_delete_a_media()\n { \n $data =$this->mediaDataHelper(); \n $response = $this->postJson('v1/media', $data);\n $media = Media::first();\n \n $response = $this->json('DELETE', 'v1/media/'.$media->id); \n $response->assertStatus(200)\n ->assertJson([\n 'success' => true,\n ]); \n }", "public function testDeleteById(Partner $partner): void\n {\n $this->assertTrue(Partner::deleteById($partner->getId()));\n }", "public function testWebinarCreate()\n {\n }", "public function testDeleteDocument()\n {\n }", "public function testDelete()\n {\n\n $this->createDummyRole();\n\n $this->assertDatabaseHas('roles', [\n 'id' => 1,\n ]);\n\n $this->call('POST', '/api/role', array(\n 'action' => $this->deleteAction,\n 'id' => 1,\n ));\n\n $this->assertDatabaseMissing('roles', [\n 'id' => 1,\n ]);\n\n $this->assertDatabaseMissing('role_permission', [\n 'role_id' => 1,\n 'permission_id' => [1, 2]\n ]);\n }", "public function delete() {\n\n $id = $this->uri->segment(4);\n $this->events_model->delete_event($id);\n redirect('admin/events');\n\n }", "public function testDeleteOutroCardByGuest(): void\n {\n // Request\n $response = $this->delete('api/v1/outroCards/tenants/3');\n\n // Check response status\n $response->assertStatus(401);\n }", "public function delete($video_id);", "public function testQuarantineDeleteById()\n {\n\n }", "public function deleted(Apartment $apartment)\n {\n //\n }", "public function testDeleteSchedule() {\n\t\t$numRows = $this->getConnection()->getRowCount(\"schedule\");\n\n\t\t$schedule = new Schedule(null, $this->company->getCompanyId(), $this->VALID_SCHEDULEDAYOFWEEK1, $this->VALID_SCHEDULEENDTIME1, $this->VALID_SCHEDULELOCATIONADDRESS1, $this->VALID_SCHEDULELOCATIONNAME1, $this->VALID_SCHEDULESTARTTIME1);\n\n\t\t$schedule->insert($this->getPDO());\n\n\t\t//make sure it was inserted\n\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"schedule\"));\n\n\t\t//DELETE!!!!!!!!! a.k.a Tallcot it!!!!!!\n\n\t\t$schedule->delete($this->getPDO());\n\n\t\t//make sure there in no longer any data\n\n\t\t$pdoSchedule = Schedule::getScheduleByScheduleId($this->getPDO(), $schedule->getScheduleId());\n\t\t$this->assertNull($pdoSchedule);\n\t\t$this->assertEquals($numRows, $this->getConnection()->getRowCount(\"schedule\"));\n\n\t}", "public function testDelete()\n\t{\n\t\t$obj2 = $this->setUpObj();\n\t\t$response = $this->call('DELETE', '/'.self::$endpoint.'/'.$obj2->id);\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t$result = $response->getOriginalContent()->toArray();\n\n\t\t// tes apakah sudah terdelete\n\t\t$response = $this->call('GET', '/'.self::$endpoint.'/'.$obj2->id);\n\t\t$this->assertEquals(500, $response->getStatusCode());\n\n\t\t// tes apakah hasil return adalah yang sesuai\n\t\tforeach ($obj2->attributesToArray() as $key => $val) {\n\t\t\t$this->assertArrayHasKey($key, $result);\n\t\t\tif (isset($result[$key])&&($key!='created_at')&&($key!='updated_at'))\n\t\t\t\t$this->assertEquals($val, $result[$key]);\n\t\t}\n\t}", "public function testDeleteValidAdult() : void {\n// count the number of rows and save it for later\n$numRows = $this->getConnection()->getRowCount(\"adult\");\n\n$adultId = generateUuidV4();\n$adult = new Adult($adultId, $this->VALID_ACTIVATION, $this->VALID_AVATAR_URL, $this->VALID_CLOUDINARY_TOKEN, $this->VALID_EMAIL, $this->VALID_HASH, $this->VALID_NAME, $this->VALID_USERNAME);\n$adult->insert($this->getPDO());\n\n// delete the Adult from mySQL\n$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"adult\"));\n$adult->delete($this->getPDO());\n\n// grab the data from mySQL and enforce the Adult does not exist\n$pdoAdult = Adult::getAdultByAdultId($this->getPDO(), $adult->getAdultId());\n$this->assertNull($pdoAdult);\n$this->assertEquals($numRows, $this->getConnection()->getRowCount(\"adult\"));\n}", "public function executeDelete(sfWebRequest $request)\n {\n\t\tif(clsCommon::chkDataExist(\"WebsitePracticeArea\", $request->getParameter('id'), $this->getUser()->getAttribute('personalWebsiteId')))\n\t\t{\n\t\t\t$this->forward404Unless($website_practice_area = Doctrine::getTable('WebsitePracticeArea')->find(array($request->getParameter('id'))), sprintf('Object website_practice_area does not exist (%s).', $request->getParameter('id')));\n\n\t\t\t$oWebsitePracticeArea = new WebsitePracticeArea();\n\t\t\t$oWebsitePracticeArea->changeStatus($request->getParameter('id'),sfConfig::get(\"app_Status_Deleted\"));\n\t\t\t$this->getUser()->setFlash('succMsg', \"Deletion successful.\");\n\n\t\t\t$this->redirect('WebsitePracticeArea/index');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n\t\t\t$this->redirect('default/index');\n\t\t}\n }", "public function DELETE() {\n #\n }", "public function delete($calendario);", "public function testDeleteIdentity()\n {\n }", "public function testDeleteIdentity()\n {\n }", "public function testDeleteClub()\n {\n $response = $this->doRequest(\n array(\n 'delete_club',\n array(\n 'id' => 4\n )\n ),\n 'DELETE'\n );\n \n $this->assertEquals(204, $response['status']);\n \n $expectedError = $this->_getClub(4);\n $this->assertEquals(404, $expectedError['status']);\n }", "public function testDeleteTask()\n {\n $userId = User::first()->value('id');\n $taskId = Task::orderBy('id', 'desc')->first()->id;\n\n echo '/api/v1.0.0/users/'.$userId.'/tasks/'.$taskId;\n\n $response = $this->json('DELETE', '/api/v1.0.0/users/'.$userId.'/tasks/'.$taskId);\n $response->assertStatus(200);\n }", "public function testDeleteSuccessForHr() {\n\t\t$userInfo = [\n\t\t\t'role' => USER_ROLE_USER | USER_ROLE_HUMAN_RESOURCES,\n\t\t\t'prefix' => 'hr'\n\t\t];\n\t\t$opt = [\n\t\t\t'method' => 'POST',\n\t\t];\n\t\t$this->applyUserInfo($userInfo);\n\t\t$this->generateMockedController();\n\t\t$url = '/hr/deferred/delete/3';\n\t\t$this->testAction($url, $opt);\n\t\t$this->checkFlashMessage(__('The deferred save has been deleted.'));\n\t\t$result = $this->Controller->Deferred->find('list', ['recursive' => -1]);\n\t\t$expected = [\n\t\t\t1 => '1',\n\t\t\t2 => '2',\n\t\t\t4 => '4',\n\t\t\t5 => '5',\n\t\t];\n\t\t$this->assertData($expected, $result);\n\t}", "public function testDeleteSingleSuccess()\n {\n $entity = $this->findOneEntity();\n\n // Delete Entity\n $this->getClient(true)->request('DELETE', $this->getBaseUrl() . '/' . $entity->getId(),\n [], [], ['Authorization' => 'Bearer ' . $this->adminToken, 'HTTP_AUTHORIZATION' => 'Bearer ' . $this->adminToken]);\n $this->assertEquals(StatusCodesHelper::SUCCESSFUL_CODE, $this->getClient()->getResponse()->getStatusCode());\n }", "public function testDeleteInvoice() {\n\t\t$randomInvoice = rand();\n\n\t\t$tokenizer = new Token($_SESSION['accessToken']);\n\n\t\t$tokenizer->ip('173.49.87.94')\n\t\t\t\t->expirationMonth(12)\n\t\t\t\t->expirationYear(30)\n\t\t\t\t->cardNumber('4321000000001119')\n\t\t\t\t->cvv('333')\n\t\t\t\t->cardType('VS')\n\t\t\t\t->name('John Smith')\n\t\t\t\t->zip('65000')\n\t\t\t\t->address('65 Main Street')\n\t\t\t\t->post();\n\n\t\t$transaction = new Transaction($_SESSION['accessToken']);\n\n\t\t$transaction->total(100)\n\t\t\t\t->clerk('1')\n\t\t\t\t->invoiceNumber($randomInvoice)\n\t\t\t\t->tokenValue($tokenizer->getToken())\n\t\t\t\t->purchaseCard(array(\n\t\t\t\t\t'customerReference' => 412348,\n\t\t\t\t\t'destinationPostalCode' => 19134,\n\t\t\t\t\t'productDescriptors' => array('rent')\n\t\t\t\t))\n\t\t\t\t->sale();\n\n\t\t$output = $transaction->output();\n\n\t\t// Laravel Logging\n\t\tLog::debug('SHIFT 4 TEST 5: ' . __FUNCTION__ . ': CARD AND TRANSACTION CREATION');\n\t\tLog::debug(\n\t\t\tjson_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'Request' => $transaction->request(),\n\t\t\t\t\t'Output' => $output\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t// Deleting an invoice requires the transaction be sent in the header\n\t\t$transaction = new Transaction($_SESSION['accessToken']);\n\n\t\t$transaction->deleteInvoice($randomInvoice);\n\n\t\t$result = $transaction->output();\n\n\t\t// Laravel Logging\n\t\tLog::debug('SHIFT 4 TEST 5: ' . __FUNCTION__);\n\t\tLog::debug('SHIFT 4 TEST 5: ' . __FUNCTION__ . ' INVOICE: ' . $_SESSION['invoiceForTest5']);\n\t\tLog::debug(\n\t\t\tjson_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'Request' => $transaction->request(),\n\t\t\t\t\t'Output' => $result\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\n\t\t$this->assertNotNull($result);\n\n\t}", "public function testDelete()\n\t{\n\t\t// Remove the following lines when you implement this test.\n\t\t$this->markTestIncomplete(\n\t\t\t'This test has not been implemented yet.'\n\t\t);\n\t}", "public function testDeleteSurveyQuestion0()\n {\n }", "public function testDeleteSurveyQuestion0()\n {\n }", "public function testDeleteProductUsingDELETE()\n {\n }", "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $traineecert = Mage::getModel('bs_traineecert/traineecert');\n $traineecert->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_traineecert')->__('Trainee Certificate was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineecert')->__('There was an error deleting trainee certificate.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineecert')->__('Could not find trainee certificate to delete.')\n );\n $this->_redirect('*/*/');\n }", "public function test_delete_task()\n {\n Project::create([\n 'id' => 1,\n 'name' => 'Project nae', \n 'description' => 'Project description'\n ]);\n Task::create([\n 'id' => 200,\n 'name' => 'Task ndfame', \n 'priority' => 'high', \n 'schedule_date' => '2020-12-12 12:22:00',\n 'project_id' => 200\n ]);\n $response = $this->delete('/task/200');\n $response->assertStatus(302);\n }", "public function testDeleteRole()\n {\n }", "public function testDeleteAuthorizationRole()\n {\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "public function testWebinarAbsentees()\n {\n }", "public function testExample()\n {\n $car = \\App\\Car::find(32);\n $delete= $car->delete();\n $this->assertTrue($delete);\n\n }", "public function action_delete() {\n $elect_id = $this->request->query('elect_id');\n $res = Model::factory('Elect')->delete($elect_id);\n if(!$res) exit('error action_delete');\n $this->redirect('/'); \n }", "public function testProfileDeleteById()\n {\n\n }", "public function testDeleteOutroCardForTenantAdmin(): void\n {\n $token = $this->loginByEmail(self::TENANT_ADMIN_1[0], self::TENANT_ADMIN_1[1]);\n\n // Request\n $response = $this->delete('api/v1/outroCards/tenants/2?token=' . $token);\n\n // Check response status\n $response->assertStatus(200);\n\n // Check response structure\n $response->assertJsonStructure(\n [\n 'success',\n 'code',\n 'data',\n 'message'\n ]\n );\n $responseJSON = json_decode($response->getContent(), true);\n $success = $responseJSON['success']; // array\n $code = $responseJSON['code']; // array\n $message = $responseJSON['message']; // array\n $data = $responseJSON['data']; // array\n\n $this->assertEquals(true, $success);\n $this->assertEquals(200, $code);\n $this->assertEquals(null, $data);\n $this->assertEquals(\"Deleted The Outro Card.\", $message);\n\n $removedOutroCard = OutroCard::where('tenant_id', 2)->first();\n $this->assertEquals(null, $removedOutroCard->outro_card);\n }", "function teamdelete(){\n $this->auth(COMP_ADM_LEVEL);\n $team_id = $this->uri->segment(3);\n $contest_id = urldecode($this->uri->segment(4));\n $this->m_key->removeTeam($team_id);\n $this->m_team->delete($team_id, $contest_id);\n $this->teams($contest_id);\n }", "public function delete(): void\n {\n $this->record(new AgendaWasDeleted($this->identity));\n }", "protected function _deleteEvent($eventId)\n {\n }", "public function testUnitDelete()\n {\n $model = Mockery::mock('Suitcoda\\Model\\User');\n $user = new UserController($model);\n \n $model->shouldReceive('findOrFailByUrlKey')->andReturn($model);\n $model->shouldReceive('delete')->once()->andReturn(true);\n\n $this->assertInstanceOf('Illuminate\\Http\\RedirectResponse', $user->destroy(1));\n }", "public function testWebinarUpdate()\n {\n }", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/product/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Product', 'productId', self::$objectId);\n }", "public function testDeleteAuthorizationDivision()\n {\n }", "public function delete() {\r\n }", "public function testDeleteTask()\n {\n }", "public function deleted(TenderParticipant $tenderParticipant)\n {\n //\n }", "public function deleteById($inquiryId);" ]
[ "0.7386751", "0.7297796", "0.71680236", "0.66529924", "0.6622835", "0.6563354", "0.65136284", "0.6496925", "0.6489714", "0.64357275", "0.64357275", "0.637083", "0.63620377", "0.6346963", "0.6310489", "0.6308891", "0.6300885", "0.6295698", "0.6273204", "0.62324136", "0.6232029", "0.6224839", "0.62239164", "0.6212295", "0.6201468", "0.61771375", "0.61664516", "0.6161545", "0.6133159", "0.6113491", "0.6101979", "0.61002356", "0.6091627", "0.60826343", "0.6082588", "0.6081988", "0.60723424", "0.60702175", "0.60676163", "0.6065615", "0.6040982", "0.6040819", "0.6038009", "0.6026286", "0.60207945", "0.602068", "0.60108197", "0.60108197", "0.59982234", "0.59829956", "0.5982203", "0.5981663", "0.5979082", "0.5971246", "0.5968587", "0.5964712", "0.59579456", "0.59453934", "0.5936268", "0.5932626", "0.5912712", "0.5906585", "0.590151", "0.5892413", "0.5875832", "0.5874745", "0.5873347", "0.5870581", "0.5870581", "0.58643", "0.5862501", "0.58527917", "0.5846254", "0.5843416", "0.58431506", "0.58369446", "0.58369446", "0.5834271", "0.5829282", "0.5826711", "0.5820088", "0.5817475", "0.5816222", "0.5816222", "0.5812329", "0.5808661", "0.5796073", "0.57950026", "0.57919306", "0.5786371", "0.57792616", "0.5774805", "0.5772235", "0.57703316", "0.57696307", "0.5768587", "0.5767226", "0.5757727", "0.575327", "0.5752041" ]
0.8196134
0
Test case for webinarPanelistCreate Add Panelists.
public function testWebinarPanelistCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelists()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function set_panelist() {\n\t\tif (!isset($this->args[0]) || empty($this->args[0])) {\n\t\t\t$this->out('Provide MV user_id argument.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$url = $this->settings['hostname.mbd'].'/panelists/'.$this->args[0].'?X-ApiKey='.$this->settings['mbd.api_key'];\n\t\t$this->out('Reaching out to '.$url);\n\t\t$http = new HttpSocket(array(\n\t\t\t'timeout' => 60,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\t\t$request = array(\n\t\t\t'dwid' => '00000000-0000-0001-0379-ef1412100980',\n\t\t\t'panelistId' => $this->args[0],\n\t\t\t'partnerId' => $this->settings['mbd.partner_id'],\n\t\t\t'donotcontact' => true\n\t\t);\n\t\ttry {\n\t\t\t$results = $http->post($url, json_encode($request), $this->options);\n\t\t} \n\t\tcatch (Exception $e) {\n\t\t\t$this->out('Panelists Api endpoint failed.');\n\t\t}\n\t\t\n\t\tprint_r($results);\n\t}", "public function testAddPage() {\r\n $callback = function() {\r\n $this->timer->destroy();\r\n $this->application->stop();\r\n };\r\n\r\n $this->timer = new Timer($callback, $this->application->getWindow(), Timer::TEST_TIMEOUT);\r\n $this->timer->start();\r\n\r\n $this->tab = new Tab(Point::createInstance(10, 10), Dimension::createInstance(200, 100));\r\n $this->application->getWindow()->getRootPane()->add($this->tab);\r\n $this->tab->addTabPage('tab1');\r\n $this->tab->addTabPage('tab2');\r\n\r\n $tabPage1 = $this->tab->getTabPage('tab1');\r\n $tabPage2 = $this->tab->getTabPage('tab2');\r\n\r\n $tabPage1->add(new EditBox('box 1.1', Point::createInstance(5, 15), Dimension::createInstance(50, 20)));\r\n $tabPage1->add(new EditBox('box 1.2', Point::createInstance(65, 15), Dimension::createInstance(50, 20)));\r\n\r\n $tabPage2->add(new EditBox('box 2.1', Point::createInstance(5, 15), Dimension::createInstance(50, 20)));\r\n $tabPage2->add(new EditBox('box 2.2', Point::createInstance(5, 45), Dimension::createInstance(50, 20)));\r\n\r\n $this->application->start();\r\n }", "function admin_add()\n\t{\n\t $this->set('pagetitle',\"Add Page\");\t\n\t $this->loadModel('User');\n\t $userlists = array();\n\t $userlists = array_merge($userlists,array('0'=>'Admin'));\n\t $allClientLists = $this->User->find('list',array('conditions'=>array('User.user_type_id'=>1),'fields'=>array('id','fname')));\n $userlists = array_merge($userlists,$allClientLists);\n\t $this->set('userlists',$userlists);\n\t \n\t if(!empty($this->data))\n\t {\n\t\tif($this->Page->save($this->data))\n\t\t{\n\t\t $this->Session->setFlash('The Page has been created','message/green');\n\t\t $this->redirect(array('action' => 'index'));\n\t\t}\n\t\telse\n\t\t{\n\t\t $this->Session->setFlash('The Page could not be saved. Please, try again.','message/yellow');\n\t\t}\n\t }\n\t}", "public function addAction() {\n\n //ONLY LOGGED IN USER CAN CREATE\n if (!$this->_helper->requireUser()->isValid())\n $this->respondWithError('unauthorized');\n\n\n //GET PAGE ID AND CHECK PAGE ID VALIDATION\n $listing_id = $this->_getParam('listing_id');\n if (empty($listing_id)) {\n $this->respondWithError('no_record');\n }\n\n //GET VIEWER INFORMATION\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n //GET USER DIARIES\n $wishlistTable = Engine_Api::_()->getDbtable('wishlists', 'sitereview');\n $wishlistDatas = $wishlistTable->userWishlists($viewer);\n $wishlistDataCount = Count($wishlistDatas);\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $this->_getParam('listing_id'));\n if (empty($sitereview)) {\n $this->respondWithError('no_record');\n }\n\n //FORM GENERATION\n if ($this->getRequest()->isGet()) {\n $response= Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->getAddToWishlistForm();\n \n $this->respondWithSuccess($response, true);\n } else if ($this->getRequest()->isPost()) {\n $values = $this->_getAllParams();\n if (!Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereview.favourite', 0)) {\n //CHECK FOR NEW ADDED DIARY TITLE OR \n if (!empty($values['body']) && empty($values['title'])) {\n $this->respondWithError('parameter_missing');\n }\n //CHECK FOR TITLE IF NO DIARY\n if (empty($wishlistDatas) && empty($values['title']))\n $this->respondWithError('Title feild required');\n\n //GET DIARY PAGE TABLE\n $wishlistEventTable = Engine_Api::_()->getDbtable('wishlistmaps', 'sitereview');\n\n $wishlistOldIds = array();\n\n //GET NOTIFY API\n $notifyApi = Engine_Api::_()->getDbtable('notifications', 'activity');\n\n\n //WORK ON PREVIOUSLY CREATED DIARY\n if (!empty($wishlistDatas)) {\n foreach ($wishlistDatas as $wishlistData) {\n $key_name = 'wishlist_' . $wishlistData->wishlist_id;\n if (isset($values[$key_name]) && !empty($values[$key_name])) {\n $wishlistEventTable->insert(array(\n 'wishlist_id' => $wishlistData->wishlist_id,\n 'listing_id' => $listing_id,\n ));\n\n //DIARY COVER PHOTO\n $wishlistTable->update(\n array(\n 'listing_id' => $listing_id,\n ), array(\n 'wishlist_id = ?' => $wishlistData->wishlist_id,\n 'listing_id = ?' => 0\n )\n );\n\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n $action = $activityApi->addActivity($viewer, $wishlistData, \"sitereview_wishlist_add_listing_listtype_\" . $sitereview->listingtype_id, '', array('listing' => array($sitereview->getType(), $sitereview->getIdentity())));\n\n if ($action)\n $activityApi->attachActivity($action, $sitereview);\n }\n $in_key_name = 'inWishlist_' . $wishlistData->wishlist_id;\n if (isset($values[$in_key_name]) && empty($values[$in_key_name])) {\n $wishlistOldIds[$wishlistData->wishlist_id] = $wishlistData;\n $wishlistEventTable->delete(array('wishlist_id = ?' => $wishlistData->wishlist_id, 'listing_id = ?' => $listing_id));\n\n //DELETE ACTIVITY FEED\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n $actionTableName = $actionTable->info('name');\n\n $action_id = $actionTable->select()\n ->setIntegrityCheck(false)\n ->from($actionTableName, 'action_id')\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\n ->where('engine4_activity_attachments.id = ?', $listing_id)\n ->where($actionTableName . '.type = ?', \"sitereview_wishlist_add_listing\")\n ->where($actionTableName . '.subject_type = ?', 'user')\n ->where($actionTableName . '.object_type = ?', 'sitereview_wishlist')\n ->where($actionTableName . '.object_id = ?', $wishlistData->wishlist_id)\n ->query()\n ->fetchColumn();\n\n if (!empty($action_id)) {\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\n if (!empty($activity)) {\n $activity->delete();\n }\n }\n }\n }\n }\n\n if (!empty($values['title'])) {\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n //CREATE DIARY\n $wishlist = $wishlistTable->createRow();\n $wishlist->setFromArray($values);\n $wishlist->owner_id = $viewer_id;\n $wishlist->listing_id = $listing_id; //DIARY COVER PHOTO\n $wishlist->save();\n\n //PRIVACY WORK\n $auth = Engine_Api::_()->authorization()->context;\n $roles = array('owner', 'owner_member', 'owner_member_member', 'owner_network', 'registered', 'everyone');\n\n if (empty($values['auth_view'])) {\n $values['auth_view'] = 'owner';\n }\n\n $viewMax = array_search($values['auth_view'], $roles);\n foreach ($roles as $i => $role) {\n $auth->setAllowed($wishlist, $role, 'view', ($i <= $viewMax));\n }\n\n $db->commit();\n $wishlistEventTable->insert(array(\n 'wishlist_id' => $wishlist->wishlist_id,\n 'listing_id' => $listing_id,\n 'date' => new Zend_Db_Expr('NOW()')\n ));\n\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n $action = $activityApi->addActivity($viewer, $sitereview, \"sitereview_wishlist_add_listing\", null, array('child_id' => $wishlist->wishlist_id));\n\n if ($action) {\n $activityApi->attachActivity($action, $sitereview);\n }\n } catch (Exception $e) {\n $db->rollback();\n throw $e;\n }\n }\n $this->successResponseNoContent('no_content', true);\n } else {\n try {\n $wishlistTable = Engine_Api::_()->getDbtable('wishlists', 'sitereview');\n $wishlist_id = $wishlistTable->recentWishlistId($viewer_id, $listing_id);\n $action = $this->_getParam('perform', 'add');\n Engine_Api::_()->getDbtable('wishlistmaps', 'sitereview')->performWishlistMapAction($wishlist_id, $listing_id, $action);\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $ex) {\n $this->respondWithError('internal_server_error', $ex->getMessage());\n }\n }\n }\n }", "function thumbwhere_contentcollectionitem_add_page() {\n $controller = entity_ui_controller('thumbwhere_contentcollectionitem');\n return $controller->addPage();\n}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"detail_avaluo\"\n\t\t$item = &$this->ListOptions->Add(\"detail_avaluo\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'avaluo') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"avaluo_grid\"])) $GLOBALS[\"avaluo_grid\"] = new cavaluo_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"avaluo\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function thumbwhere_contentcollection_add_page() {\n $controller = entity_ui_controller('thumbwhere_contentcollection');\n return $controller->addPage();\n}", "function SetupListOptions() {\n\t\tglobal $Security, $tbl_slide;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$this->ListOptions->Add(\"copy\");\n\t\t$item =& $this->ListOptions->Items[\"copy\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$this->ListOptions->Add(\"delete\");\n\t\t$item =& $this->ListOptions->Items[\"delete\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($tbl_slide->Export <> \"\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridadd\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function add() {\n $this->_setModalLayout();\n //List Label\n $list_lb = $this->Label->find('all', array(\n 'conditions' => array('type' => 'TeamModel')\n ));\n $list_lb = $this->Label->removeArrayWrapper('Label', $list_lb, 'id');\n $list_lb = $this->Label->makeNestedLabels($this->Label->getLabelHierarchy($list_lb));\n\n // List Plan\n $listPlan = $this->Plan->find('list', array(\n 'fields' => array('id', 'type')\n ));\n\n $this->set(array(\n 'list_lb' => $list_lb,\n 'listPlan' => $listPlan\n ));\n\n if ($this->request->is('post') || $this->request->is('put')) {\n\n // Add project\n if (isset($this->request->data['Team'])) {\n $rq_data = $this->request->data['Team'];\n // Upload image\n if (is_uploaded_file($rq_data['splash']['tmp_name'])) {\n if (($rq_data['splash']['type'] == 'image/jpg') || ($rq_data['splash']['type'] == 'image/jpeg') || ($rq_data['splash']['type'] == 'image/png') || ($rq_data['splash']['type'] == 'image/gif')) {\n $imginfo = pathinfo($rq_data['splash']['name']);\n $filename = $imginfo['filename'] . '_' . md5(time()) . '.' . $imginfo['extension'];\n move_uploaded_file(\n $rq_data['splash']['tmp_name'], WWW_ROOT . 'upload' . DS . 'splash' . DS . $filename\n );\n // store the filename in the array to be saved to the db\n $rq_data['splash'] = $filename;\n } else {\n $this->Session->setFlash(__('有効なイメージを提供してください。'), 'alert-box', array('class' => 'alert-danger'));\n $this->redirect(array('action' => 'index'));\n }\n } else {\n $rq_data['splash'] = '';\n }\n $rq_data['management_id'] = $this->Auth->user('id');\n $dup = $this->Team->find('all', array('conditions' => array(\n 'name' => $rq_data['name']\n )));\n if (empty($dup)) {\n $rq_data['cdate'] = date('Y-m-d H:i:s');\n if ($this->Team->save($rq_data,false)) {\n $new_team_id = $this->Team->getLastInsertId();\n // Add Label \n if (isset($this->request->data['Label'])) {\n $rq_label = $this->request->data['Label'];\n $rq_label['type'] = 'TeamModel';\n $rq_label['label'] = $rq_label['add_new_text'];\n $rq_label['team_id'] = Configure::read('teamId');\n $rq_label['cdate'] = date('Y-m-d H:i:s');\n if (isset($rq_label['add_new_text'])) {\n $existing = $this->Label->find('all', array('conditions' => array(\n 'label' => $rq_label['add_new_text'],\n 'team_id' => $rq_label['team_id'],\n 'type' => $rq_label['type'],\n )));\n } else {\n $existing = '';\n }\n if ($rq_label['new_label'] != null) {\n if (isset($rq_label['add_new_text']) && $rq_label['add_new_text'] != null) {\n $rq_label['parent_id'] = $rq_label['new_label'];\n if (empty($existing)) {\n if ($this->Label->save($rq_label)) {\n // Get new ID record\n $new_id = $this->Label->getLastInsertId();\n } else {\n $this->Session->setFlash(__('Can not create new label'), 'alert-box', array('class' => 'alert-danger'));\n $this->redirect(array('action' => 'index'));\n }\n } else {\n $this->Session->setFlash(__('このラベルは既に存在します。'), 'alert-box', array('class' => 'alert-danger'));\n return $this->redirect($this->referer());\n }\n } else {\n $lb_id = $rq_label['new_label'];\n }\n } else {\n if (isset($rq_label['add_new_text']) && $rq_label['add_new_text'] != null) {\n $rq_label['parent_id'] = 0;\n if (empty($existing)) {\n if ($this->Label->save($rq_label)) {\n // Get new ID record\n $new_id = $this->Label->getLastInsertId();\n } else {\n $this->Session->setFlash(__('Can not create new label'), 'alert-box', array('class' => 'alert-danger'));\n $this->redirect(array('action' => 'index'));\n }\n } else {\n $this->Session->setFlash(__('このラベルは既に存在します。'), 'alert-box', array('class' => 'alert-danger'));\n return $this->redirect($this->referer());\n }\n }\n }\n }\n /* Save record to label_datas table */\n $this->request->data['LabelDatas']['target_id'] = $new_team_id;\n $this->request->data['LabelDatas']['cdate'] = date('Y-m-d H:i:s');\n if ($rq_label['new_label'] != null) {\n if ($rq_label['add_new_text'] != null) {\n $this->request->data['LabelDatas']['label_id'] = $new_id;\n } else {\n $this->request->data['LabelDatas']['label_id'] = $lb_id;\n }\n $this->Label->LabelData->save($this->request->data['LabelDatas']);\n } else {\n if ($rq_label['add_new_text'] != null) {\n $this->request->data['LabelDatas']['label_id'] = $new_id;\n $this->Label->LabelData->save($this->request->data['LabelDatas']);\n }\n }\n /* End save */\n $this->Session->setFlash(__('プロジェクトのアップデートに成功しました。'), 'alert-box', array('class' => 'alert-success'));\n return $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__('新規プロジェクトを登録することはできません。'), 'alert-box', array('class' => 'alert-danger'));\n return $this->redirect(array('action' => 'index'));\n }\n } else {\n $this->Session->setFlash(__('このプロジェクトは既に存在します。'), 'alert-box', array('class' => 'alert-danger'));\n return $this->redirect($this->referer());\n }\n }\n }\n $this->render('edit');\n }", "public function create()\n {\n $this->title .= ' create';\n $this->vars = array_add($this->vars, 'menuArray', $this->rep->makeArray());\n }", "public function create()\n {\n return view('AdminPanel.Collection.AddCollection');\n }", "public function testAddColPosListLayoutItems()\n {\n }", "protected function createTabs() {}", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanView();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"copy\"\r\n\t\t$item = &$this->ListOptions->Add(\"copy\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanAdd();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"delete\"\r\n\t\t$item = &$this->ListOptions->Add(\"delete\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanDelete();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function addAction() {\n\t\tlist(, $groups) = Resource_Service_Pgroup::getAllPgroup();\n\t\t$this->assign('groups', $groups);\n\t\t$this->assign('ntype', $this->ntype);\n\t\t$this->assign('btype', $this->btype);\n\t}", "public function testListPastWebinarQA()\n {\n }", "public function action_addListMenu() {\n $list_id = $this->request->post('list_id');\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if($res) echo $res[1];\n else echo 'not';\n exit();\n }", "function eclecticapp_checklist_settings_create() {\n $page_title = 'Checklist Admin';\n $menu_title = 'Checklist Admin';\n $capability = 'manage_options';\n $menu_slug = 'checklist_settings';\n $function = 'eclecticapp_checklist_settings_display';\n $icon_url = '';\n $position = 20;\n\n add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position );\n}", "function SetupListOptions() {\n\t\tglobal $Security, $t_tinbai_mainsite;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"checkbox\"\n\t\t$this->ListOptions->Add(\"checkbox\");\n\t\t$item =& $this->ListOptions->Items[\"checkbox\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = ($Security->CanDelete() || $Security->CanEdit());\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"phpmaker\\\" onclick=\\\"t_tinbai_mainsite_list.SelectAllKey(this);\\\">\";\n\t\t$this->ListOptions->MoveItem(\"checkbox\", 0); // Move to first column\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($t_tinbai_mainsite->Export <> \"\" ||\n\t\t\t$t_tinbai_mainsite->CurrentAction == \"gridadd\" ||\n\t\t\t$t_tinbai_mainsite->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"userpermission\"\n\t\t$item = &$this->ListOptions->Add(\"userpermission\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsAdmin();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t}", "private function testsSection() {\n global $DB, $CFG, $PAGE;\n //var_dump($PAGE->context->id); \n //echo '<pre>'.print_r($PAGE, true).'</pre>'; \n $this->_form->addElement('header', 'tests', 'Tests'); \n \n $this->_form->addElement('html', '<div id=\"ca-tests\">');\n \n // Get existing tests\n $tests = $DB->get_records('codeactivity_tests', array('activity_id' => $this->current->id)); \n //echo '<pre>'.print_r($this, true).'</pre>'; \n if (!empty($tests)) {\n foreach ($tests as $test) {\n //echo '<pre>'.print_r($test, true).'</pre>'; \n $this->_form->addElement('html', codeactivity::testHTML($test->id));\n } \n } \n \n \n $this->_form->addElement('html', '</div>'); // #ca-tests\n \n $this->_form->addElement('html', '<div id=\"ca-add-test\" style=\"display:none;\">');\n //get_string('codeactivityname', 'codeactivity'), array('size'=>'64'));\n $this->_form->addElement('text',\n 'testname',\n get_string('test_name', 'codeactivity'),\n array('size' => '64')\n );\n $this->_form->setType('testname', PARAM_RAW);\n $this->_form->addElement(\n 'select', \n 'testtype', \n get_string('test_type', 'codeactivity'), \n array(\n 'unittest' => get_string('unittest', 'codeactivity'), \n 'output' => get_string('outputmatch', 'codeactivity')\n )\n ); \n \n $this->_form->addElement('html', '<div id=\"ca-unittestcode\" style=\"display:none;\">'); \n $this->_form->addElement(\n 'textarea',\n 'unittestcode',\n get_string('unittest_code', 'codeactivity')\n ); \n $this->_form->addElement('html', '</div>'); \n \n $this->_form->addElement('html', '<div id=\"ca-outputmatching\" style=\"display:none;\">');\n $this->_form->addElement(\n 'select',\n 'runfile',\n get_string('runfile', 'codeactivity'),\n array()); \n \n $this->_form->addElement(\n 'textarea',\n 'expectedoutput',\n get_string('expected_output', 'codeactivity')); \n\n $this->_form->addElement(\n 'selectyesno',\n 'convertnulls',\n get_string('convert_nulls', 'codeactivity')); \n $this->_form->addElement(\n 'selectyesno',\n 'ignorewhitespace',\n get_string('ignore_whitespace', 'codeactivity')); \n $this->_form->addElement('html', '</div>'); \n \n $this->_form->addElement('html', '</div>'); // #ca-add-test\n \n $buttonarray=array();\n \n $buttonarray[] = $this->_form->createElement('button', 'add_test', 'Add Test');\n $buttonarray[] = $this->_form->createElement('button', 'add_save', 'Save');\n $buttonarray[] = $this->_form->createElement('button', 'add_cancel', 'Cancel');\n \n $this->_form->addGroup($buttonarray, 'add_buttons', '', array(''), false);\n \n $this->_form->addElement('hidden', 'ca_temp_code', uniqid()); \n $this->_form->setType('ca_temp_code', PARAM_RAW); \n //echo '<pre>'.print_r($PAGE->context, true).'</pre>'; \n $this->_form->addElement('hidden', 'ca_context', $PAGE->context->instanceid);\n $this->_form->setType('ca_context', PARAM_RAW); \n \n }", "protected function addElements() \n {\n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'title',\n 'options' => [\n 'label' => 'Title',\n ],\n ]);\n \n // Add \"parent_id\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'parent_id', \n 'options' => [\n 'label' => 'Full Name',\n ],\n ]);\n \n if ($this->scenario == 'create') {\n \n\n }\n \n // Add \"status\" field\n $this->add([ \n 'type' => 'select',\n 'name' => 'status',\n 'options' => [\n 'label' => 'Status',\n 'value_options' => [\n 1 => 'Active',\n 2 => 'Retired', \n ]\n ],\n ]);\n \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'Create'\n ],\n ]);\n }", "public function panierAdd() : void\n {\n if(!$this->userSession->isAuthenticatedUser()){\n redirect(\"index.php?action=user&action2=loginForm\");\n }\n \n $this->panierModel->addPanier((int) $_GET['id']);\n require_once 'www/templates/panier/PanierView.phtml';\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->IsLoggedIn();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function testCreateListSuccessfully(): void\n {\n $this->post('/mailchimp/lists', static::$listData);\n\n $content = \\json_decode($this->response->getContent(), true);\n\n $this->assertResponseOk();\n $this->seeJson(static::$listData);\n self::assertArrayHasKey('mail_chimp_id', $content);\n self::assertNotNull($content['mail_chimp_id']);\n\n $this->createdListIds[] = $content['mail_chimp_id']; // Store MailChimp list id for cleaning purposes\n }", "public function addAction() {\r\n\r\n $param = $this->_getParam('param');\r\n $request_url = $this->_getParam('request_url');\r\n $return_url = $this->_getParam('return_url');\r\n $front = Zend_Controller_Front::getInstance();\r\n $base_url = $front->getBaseUrl();\r\n\r\n // CHECK USER VALIDATION\r\n if (!$this->_helper->requireUser()->isValid()) {\r\n $host = (!empty($_ENV[\"HTTPS\"]) && 'on' == strtolower($_ENV[\"HTTPS\"])) ? \"https://\" : \"http://\";\r\n if ($base_url == '') {\r\n $URL_Home = $host . $_SERVER['HTTP_HOST'] . '/login';\r\n } else {\r\n $URL_Home = $host . $_SERVER['HTTP_HOST'] . '/' . $request_url . '/login';\r\n }\r\n if (empty($param)) {\r\n return $this->_helper->redirector->gotoUrl($URL_Home, array('prependBase' => false));\r\n } else {\r\n return $this->_helper->redirector->gotoUrl($URL_Home . '?return_url=' . urlencode($return_url), array('prependBase' => false));\r\n }\r\n }\r\n\r\n //SET LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //ONLY LOGGED IN USER CAN CREATE\r\n if (!$this->_helper->requireUser()->isValid())\r\n return;\r\n\r\n //CREATION PRIVACY\r\n if (!$this->_helper->requireAuth()->setAuthParams('sitestoreproduct_wishlist', null, \"create\")->isValid())\r\n return;\r\n\r\n //GET PAGE ID AND CHECK PAGE ID VALIDATION\r\n $product_id = $this->_getParam('product_id');\r\n if (empty($product_id)) {\r\n return $this->_forward('notfound', 'error', 'core');\r\n }\r\n\r\n //GET VIEWER INFORMATION\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $this->view->viewer_id = $viewer_id = $viewer->getIdentity();\r\n\r\n //GET USER WISHLISTS\r\n $wishlistTable = Engine_Api::_()->getDbtable('wishlists', 'sitestoreproduct');\r\n $wishlistDatas = $wishlistTable->getUserWishlists($viewer_id);\r\n $this->view->wishlistDatasCount = $wishlistDataCount = Count($wishlistDatas);\r\n\r\n //LISING WILL ADD IF YOU CAN VIEW THIS\r\n $this->view->sitestoreproduct = $sitestoreproduct = Engine_Api::_()->getItem('sitestoreproduct_product', $this->_getParam('product_id'));\r\n\r\n $this->view->can_add = 1;\r\n if (!$this->_helper->requireAuth()->setAuthParams($sitestoreproduct, null, \"view\")->isValid()) {\r\n $this->view->can_add = 0;\r\n }\r\n\r\n //AUTHORIZATION CHECK\r\n if (!empty($sitestoreproduct->draft) || empty($sitestoreproduct->search) || empty($sitestoreproduct->approved)) {\r\n $this->view->can_add = 0;\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitestoreproduct_Form_Wishlist_Add();\r\n\r\n $this->view->success = 0;\r\n\r\n //FORM VALIDATION\r\n if (!$this->getRequest()->isPost() || !$form->isValid($this->getRequest()->getPost())) {\r\n return;\r\n }\r\n\r\n //GET FORM VALUES\r\n $values = $form->getValues();\r\n\r\n //CHECK FOR NEW ADDED WISHLIST TITLE\r\n if (!empty($values['body']) && empty($values['title'])) {\r\n\r\n $error = $this->view->translate('Please enter the wishlist title otherwise remove the wishlist note.');\r\n $this->view->status = false;\r\n $error = Zend_Registry::get('Zend_Translate')->_($error);\r\n $form->getDecorator('errors')->setOption('escape', false);\r\n $form->addError($error);\r\n return;\r\n }\r\n\r\n //GET WISHLIST PAGE TABLE\r\n $wishlistProductTable = Engine_Api::_()->getDbtable('wishlistmaps', 'sitestoreproduct');\r\n\r\n $wishlistOldIds = array();\r\n\r\n //GET FOLLOW TABLE\r\n $followTable = Engine_Api::_()->getDbTable('follows', 'seaocore');\r\n\r\n //GET NOTIFY API\r\n $notifyApi = Engine_Api::_()->getDbtable('notifications', 'activity');\r\n\r\n //WORK ON PREVIOUSLY CREATED WISHLIST\r\n foreach ($wishlistDatas as $wishlistData) {\r\n $key_name = 'wishlist_' . $wishlistData->wishlist_id;\r\n if (isset($values[$key_name]) && !empty($values[$key_name])) {\r\n\r\n $wishlistProductTable->insert(array(\r\n 'wishlist_id' => $wishlistData->wishlist_id,\r\n 'product_id' => $product_id,\r\n ));\r\n\r\n //WISHLIST COVER PHOTO\r\n $wishlistTable->update(\r\n array(\r\n 'product_id' => $product_id,\r\n ), array(\r\n 'wishlist_id = ?' => $wishlistData->wishlist_id,\r\n 'product_id = ?' => 0\r\n )\r\n );\r\n\r\n //GET FOLLOWERS\r\n $followers = $followTable->getFollowers('sitestoreproduct_wishlist', $wishlistData->wishlist_id, $viewer_id);\r\n foreach ($followers as $follower) {\r\n $followerObject = Engine_Api::_()->getItem('user', $follower->poster_id);\r\n $wishlist = Engine_Api::_()->getItem('sitestoreproduct_wishlist', $wishlistData->wishlist_id);\r\n $http = _ENGINE_SSL ? 'https://' : 'http://';\r\n $wishlist_link = '<a href=\"' . $http . $_SERVER['HTTP_HOST'] . '/' . $wishlist->getHref() . '\">' . $wishlist->getTitle() . '</a>';\r\n $notifyApi->addNotification($followerObject, $viewer, $sitestoreproduct, 'sitestoreproduct_wishlist_followers', array(\"wishlist\" => $wishlist_link));\r\n }\r\n\r\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\r\n $action = $activityApi->addActivity($viewer, $wishlistData, \"sitestoreproduct_wishlist_add_product\", '', array('product' => array($sitestoreproduct->getType(), $sitestoreproduct->getIdentity()),\r\n ));\r\n if ($action)\r\n $activityApi->attachActivity($action, $sitestoreproduct);\r\n }\r\n\r\n $in_key_name = 'inWishlist_' . $wishlistData->wishlist_id;\r\n if (isset($values[$in_key_name]) && empty($values[$in_key_name])) {\r\n $wishlistOldIds[$wishlistData->wishlist_id] = $wishlistData;\r\n $wishlistProductTable->delete(array('wishlist_id = ?' => $wishlistData->wishlist_id, 'product_id= ?' => $product_id));\r\n\r\n //DELETE ACTIVITY FEED\r\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\r\n $actionTableName = $actionTable->info('name');\r\n\r\n $action_id = $actionTable->select()\r\n ->setIntegrityCheck(false)\r\n ->from($actionTableName, 'action_id')\r\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\r\n ->where('engine4_activity_attachments.id = ?', $product_id)\r\n ->where($actionTableName . '.type = ?', \"sitestoreproduct_wishlist_add_listing\")\r\n ->where($actionTableName . '.subject_type = ?', 'user')\r\n ->where($actionTableName . '.object_type = ?', 'sitestoreproduct_wishlist')\r\n ->where($actionTableName . '.object_id = ?', $wishlistData->wishlist_id)\r\n ->query()\r\n ->fetchColumn();\r\n\r\n if (!empty($action_id)) {\r\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\r\n if (!empty($activity)) {\r\n $activity->delete();\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n if (!empty($values['title'])) {\r\n\r\n $db = Engine_Db_Table::getDefaultAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n\r\n //CREATE WISHLIST\r\n $wishlist = $wishlistTable->createRow();\r\n $wishlist->setFromArray($values);\r\n $wishlist->owner_id = $viewer_id;\r\n $wishlist->product_id = $product_id; //WISHLIST COVER PHOTO\r\n $wishlist->save();\r\n\r\n //PRIVACY WORK\r\n $auth = Engine_Api::_()->authorization()->context;\r\n $roles = array('owner', 'owner_member', 'owner_member_member', 'owner_network', 'registered', 'everyone');\r\n\r\n if (empty($values['auth_view'])) {\r\n $values['auth_view'] = array('everyone');\r\n }\r\n\r\n $viewMax = array_search($values['auth_view'], $roles);\r\n foreach ($roles as $i => $role) {\r\n $auth->setAllowed($wishlist, $role, 'view', ($i <= $viewMax));\r\n }\r\n\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollback();\r\n throw $e;\r\n }\r\n\r\n $wishlistProductTable->insert(array(\r\n 'wishlist_id' => $wishlist->wishlist_id,\r\n 'product_id' => $product_id,\r\n 'date' => new Zend_Db_Expr('NOW()')\r\n ));\r\n\r\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\r\n $action = $activityApi->addActivity($viewer, $wishlist, \"sitestoreproduct_wishlist_add_product\", '', array('product' => array($sitestoreproduct->getType(), $sitestoreproduct->getIdentity()),\r\n ));\r\n if ($action)\r\n $activityApi->attachActivity($action, $sitestoreproduct);\r\n }\r\n\r\n $this->view->wishlistOldDatas = $wishlistOldIds;\r\n $this->view->wishlistNewDatas = $wishlistProductTable->pageWishlists($product_id, $viewer_id);\r\n $this->view->success = 1;\r\n \r\n if (!Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\r\n //$this->view->notSuccessMessage=true;\r\n return $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => true,\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Add successfully.'))\r\n ));\r\n }\r\n }", "function add() {\r\n\t\t$this->checkUserRoles(array('admin','manager'));\r\n\t\t\r\n\t\tif (!empty($this->data)) {\r\n\t\t\t$this->OffshoreProjectManager->create();\r\n\t\t\tif ($this->OffshoreProjectManager->save($this->data)) {\r\n\t\t\t\t$this->Session->setFlash(__('The offshore project manager has been saved', true));\r\n\t\t\t\t$this->redirect(array('action' => 'index'));\r\n\t\t\t} else {\r\n\t\t\t\t$this->Session->setFlash(__('The offshore project manager could not be saved. Please, try again.', true));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$all_projects = $this->OffshoreProjectManager->Project->find('all');\r\n\t\t$projects = array();\r\n\t\tforeach($all_projects as $project){\r\n\t\t\t$projects[$project['Project']['id']] = $project['Client']['name'].\" - \".$project['Project']['title'];\r\n\t\t}\r\n\t\t$this->set(compact('projects'));\r\n\t}", "public function listingCreate($form){\n \n ///do things only if submited by \"create button\"\n if (!$form['add_postage']->submittedBy){\n \n //things to do when form is submitted by create button\n //unset postage textbox counter on success\n unset($this->hlp->sess(\"postage\")->counter);\n \n $values = $form->getValues(True);\n $postage = $this->lHelp->returnPostageArray($values);\n $procValues = $this->lHelp->getProcValues($values); \n $listingID = $this->listings->create($procValues);\n \n if (!empty($postage['options'])){\n $this->listings->writeListingPostageOptions($listingID, $postage);\n }\n \n $this->redirect(\"Listings:in\");\n }\n }", "function thumbwhere_host_add_page() {\n $controller = entity_ui_controller('thumbwhere_host');\n return $controller->addPage();\n}", "public function testWebinarPollCreate()\n {\n }", "public function add(){\n\n\t $data = array(\n\t \t 'laptops' =>$this->Laptop_model->getLaptops() ,\n\n\t \t );\n\n\t $this->load->view('layouts/header');\n\t\t$this->load->view('layouts/aside');\n\t\t$this->load->view('admin/prestamos/add',$data); // se envia a la vista admin/laptops/add\n\t\t$this->load->view('layouts/footer');\n}", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language, $rekeningju;\r\n\r\n\t\t// \"griddelete\"\r\n\t\tif ($rekeningju->AllowAddDeleteRow) {\r\n\t\t\t$item =& $this->ListOptions->Add(\"griddelete\");\r\n\t\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t\t$item->OnLeft = TRUE;\r\n\t\t\t$item->Visible = FALSE; // Default hidden\r\n\t\t}\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function admin_add(){\n \n $this->set(\"title_for_layout\",\"Create a Satellite Group\");\n \n // Load all existing satellites\n $this->set('satellites', $this->Satellite->find('all'));\n }", "public function test_new_category_registration()\n {\n $this->visit('/olify_category')\n ->type('Vegetables', 'category_name')\n ->select('category_status')\n ->type('description')\n ->press('Add')\n ->seePageIs('dashboard');\n }", "public function action_addList() {\n $data = Arr::extract($_POST, array('listname', 'rating', 'description', 'typelist'));\n //Arr::_print($data);\n //$data['name'] = trim($this->request->post('listname'));\n// $rating = trim($this->request->post('rating'));\n// $description = trim($this->request->post('description'));\n// $type = $this->reques->post('type');\n if(!$this->user->id) exit('error - action_addList - not user');\n \n $list_id = Model::factory('ElectList')->add($this->user->id, $data);\n\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if(!$res) exit('error - action_addList');\n else $this->redirect('/');\n }", "public function add(){\n\n\t $this->load->view('layouts/header');\n\t\t$this->load->view('layouts/aside');\n\t\t$this->load->view('admin/usuarios/add'); // se envia a la vista admin/laptops/add\n\t\t$this->load->view('layouts/footer');\n}", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "function create()\n\t{\n\t\tif ($_GET[\"obj_id\"] != \"\")\n\t\t{\n\t\t\t$this->setTabs();\n\t\t}\n\t\tparent::create();\n\t}", "public function testListSiteContainers()\n {\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<div class=\\\"checkbox\\\"><label><input class=\\\"magic-checkbox\\\" type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\"><span></span></label></div>\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function add(): void\n {\n $exerciseforms = $this->exerciseformBLL->getAllExcerciseforms();\n\n $data = [\n 'exerciseforms' => $exerciseforms,\n 'name' => '',\n 'description' => '',\n 'repetitions' => '',\n 'sets' => ''\n ];\n\n $this->view('exercises/add', $data);\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"detail_v_bid_histories_admin\"\n\t\t$item = &$this->ListOptions->Add(\"detail_v_bid_histories_admin\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'v_bid_histories_admin') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"v_bid_histories_admin_grid\"])) $GLOBALS[\"v_bid_histories_admin_grid\"] = new cv_bid_histories_admin_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"v_bid_histories_admin\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// \"sequence\"\n\t\t$item = &$this->ListOptions->Add(\"sequence\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = TRUE;\n\t\t$item->OnLeft = TRUE; // Always on left\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function add() {\n parent::add();\n \n if(!$this->request->is('restful')) {\n $this->set('title_for_layout', _txt('op.add-a', array($this->viewVars['vv_authenticator']['Authenticator']['description'])));\n }\n }", "public function add( EchoContainmentList $list ) {\n\t\t$this->lists[] = $list;\n\t}", "protected function setUp()\r\n {\r\n $this->object = new Pane;\r\n }", "public function testAdminCanAddAPage()\n {\n $params = [\n 'title' => $this->faker->name(),\n ];\n\n $response = $this\n ->actingAs($this->admin)\n ->post('/admin/blog/pages', $params);\n\n $response->assertStatus(302);\n $response->assertSessionHasNoErrors();\n\n $page = Post::where('post_type', Post::PAGE)->first();\n $this->assertNotNull($page);\n $this->assertEquals($params['title'], $page->title);\n\n $response->assertRedirect('/admin/blog/pages/'. $page->id .'/edit');\n $response->assertSessionHas('success', __('blog::pages.success_create_message'));\n }", "function show_plan_add() {\n //must check that the user has the required capability \n if (!current_user_can('manage_options')) {\n csm_error('You do not have sufficient permissions to access this page', true);\n }\n \n $CsmWorkplace = new CsmWorkplace();\n $workplaces = $CsmWorkplace->all();\n \n //Add the member\n if (isset($_POST['action']) && $_POST['action'] === 'addplan') {\n $data = $_POST;\n $Csmplan = new CsmPlan();\n try {\n $Csmplan->create($_POST);\n csm_set_update('New membership plan was added');\n hacky_redirect('csm-plans');\n } catch (\\Exception $e) {\n csm_error($e->getMessage());\n }\n }\n \n include(CSM_PLUGIN_PATH . 'app/views/plan-add.view.php');\n}", "public function testAddViewMilestone()\n {\n \t$property_flip_id = $this->createPropertyFlip('Test address line 1000');\n \t$milestone_type_description = 'Test Milestone Type 1';\n \t$milestone_type = $this->createTestMilestoneType($milestone_type_description);\n \t$this->visit('/')\n\t \t->visit('/login')\n\t \t->type('[email protected]', 'email')\n\t \t->type('password', 'password')\n\t \t->press('Login')\n\t \t->see('Home')\n\t \t->visit('/search-property')\n\t \t \n\t \t->type($property_flip_id, 'property_flip_id')\n\t \t->press('Search')\n\t \t->click('View') //View Property\n\t \t \n\t \t->click('View') //View Property Flip\n\t \t->see('View Property Flip')\n\t \t->see('General')\n\t \t->see('Investors')\n\t \t\n\t \t->click('milestones-tab')\n \t\t->see('Milestones')\n \t\t->press('Add Milestone')\n \t\t->select($milestone_type->id, 'milestone_type_id')\n \t\t->type('2016-11-30', 'effective_date')\n \t\t->press('Add Milestone')\n \t\t\n \t\t->see('View Property Flip')\n \t\t->see('Milestone')\n \t\t->see($milestone_type_description)\n \t\n \t\t->click('view-milestone')\n \t\t->see('View Milestone')\n \t\t->see($milestone_type_description);\n }", "function SetupListOptions() {\n\t\tglobal $Security, $scholarship_package;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"detail_scholarship_payment\"\n\t\t$this->ListOptions->Add(\"detail_scholarship_payment\");\n\t\t$item =& $this->ListOptions->Items[\"detail_scholarship_payment\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->AllowList('scholarship_payment');\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($scholarship_package->Export <> \"\" ||\n\t\t\t$scholarship_package->CurrentAction == \"gridadd\" ||\n\t\t\t$scholarship_package->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<div class=\\\"checkbox\\\"><label><input class=\\\"magic-checkbox\\\" type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\"><span></span></label></div>\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function add_sections()\n {\n }", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_host_add_list', array('content' => $content));\n }", "public function create()\n {\n // get all sections\n $allSections = SectionModel::all();\n\n return view('admin.laptops.create', compact('allSections'));\n }", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_contentcollectionitem_add_list', array('content' => $content));\n }", "public function testVolunteerHourCreateForProjectSuccess_ProjectItemManager()\n {\n // Set test user as current authenticated user\n $this->be($this->projectManager);\n \n $this->session([\n 'username' => $this->projectManager->username, \n 'access_level' => $this->projectManager->access_level\n ]);\n \n $testProjectID = 1;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/project/'.$testProjectID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n \n }", "function add_dashboard() {\n}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function add (){\n $this->layout='dashboard';\n $this->addLeaves();\n }", "public function setupNewPage()\n {\n $entityManager = $this->_controller->getEntityManager();\n $types = $entityManager->getRepository('\\Jazzee\\Entity\\ElementType')->findAll();\n $elementTypes = array();\n foreach ($types as $type) {\n $elementTypes[$type->getClass()] = $type;\n };\n\n $element = new \\Jazzee\\Entity\\Element;\n $this->_applicationPage->getPage()->addElement($element);\n $element->setType($elementTypes['\\\\Jazzee\\Element\\RadioList']);\n $element->setTitle('Test Type');\n $element->required();\n $element->setWeight(1);\n $element->setFixedId(self::FID_TEST_TYPE);\n $entityManager->persist($element);\n\n $item = new \\Jazzee\\Entity\\ElementListItem;\n $element->addItem($item);\n $item->setValue('GRE/GRE Subject');\n $item->setWeight(1);\n $entityManager->persist($item);\n\n $item = new \\Jazzee\\Entity\\ElementListItem;\n $element->addItem($item);\n $item->setValue('TOEFL');\n $item->setWeight(2);\n $entityManager->persist($item);\n\n $element = new \\Jazzee\\Entity\\Element;\n $this->_applicationPage->getPage()->addElement($element);\n $element->setType($elementTypes['\\\\Jazzee\\Element\\TextInput']);\n $element->setTitle('ETS Registration Number');\n $element->setFormat('no leading zeros or hyphens');\n $element->required();\n $element->setWeight(2);\n $element->setFixedId(self::FID_REGISTRATION_NUMBER);\n $entityManager->persist($element);\n\n $element = new \\Jazzee\\Entity\\Element;\n $this->_applicationPage->getPage()->addElement($element);\n $element->setType($elementTypes['\\\\Jazzee\\Element\\ShortDate']);\n $element->setTitle('Test Date');\n $element->required();\n $element->setWeight(3);\n $element->setFixedId(self::FID_TEST_DATE);\n $entityManager->persist($element);\n }", "public function create()\n {\n return view('admin_panel.add');\n }", "function OnBeforeAdd(){\n }", "public function add()\n\t{\t\n\t\t//Carrega o Model Categorias\t\t\t\n\t\t$this->load->model('CategoriasModel', 'Categorias');\n\t\n\t\t$data['categorias'] = $this->Categorias->getCategorias();\t\n\n\t\t// Editando texto do titulo do header\n\t\t$data['pagecfg']['Title'] = \"Adicionar Pessoa\";\t\t\n\n\t\t// Alterando o Estado da View Para Adicionar Pessoa\n\t\t$data['pagecfg']['viewState'] = \"Adicionar Pessoa\";\n\t\t$data['pagecfg']['btnState'] = \"Adicionar\";\n\t\t$data['pagecfg']['inputState'] = \"enable\";\n\t\t$data['pagecfg']['actionState'] = \"/ListarPessoas/salvar\";\n\t\t\n\t\t//Carrega a View\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('PessoaView', $data);\n\t\t$this->load->view('templates/footer', $data);\n\t}", "public abstract function create_list($title);", "public function create()\n {\n //for the PAGE on which to create\n }", "public function addPage()\n {\n $placements = array(\n array('id' => 'ads.leftbar.banner', 'name' => $this->translate->translate('Left Side')),\n array('id' => 'ads.rightbar.banner', 'name' => $this->translate->translate('Right Side'))\n );\n $this->putitem(\"placements\", $placements);\n\n $view_types = array(\n array('id' => 'serial', 'name' => 'Serial'),\n array('id' => 'carrousel', 'name' => 'Carroussel')\n );\n $this->putitem(\"view_types\", $view_types);\n\n parent::addPage();\n }", "public function create()\n {\n // Check authorisation and throw 404 if not\n if (!Auth::user()->allowed2('add.site.inspection'))\n return view('errors/404');\n\n return view('site/inspection/plumbing/create');\n }", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_contentcollection_add_list', array('content' => $content));\n }", "public function addAction()\n {\n $request = $this->getRequest();\n\n $routeMatch = $this->getEvent()->getRouteMatch();\n $id = $routeMatch->getParam('workout_id', 0);\n\n if ($id <= 0) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n $workout = $this->_workout->getRow(array('workout_id' => $id));\n//\n if (!$workout) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n /**\n * Grid FORM\n */\n $form = new WorkoutExerciseGrid(\n array(\n 'view' => $this->_view,\n )\n );\n\n /**\n * BUILDING Row\n */\n $row = new WorkoutExerciseRow(\n array(\n 'model' => $this->_exercise,\n 'view' => $this->_view,\n )\n );\n\n $row->setFieldOptions('type_id', array(\n 'values' => $this->_exerciseType->getBehaviour('nestedSet')->getResultSetForSelect(),\n 'onchange' => 'exerciseType(this);',\n ));\n $row->setFieldOptions('workout_id', array(\n 'value' => $id,\n ));\n\n //\n\n\n\n //\n $row->build();\n\n //\n $form->addSubForm($row, $row->getName());\n\n //\n $this->_view->headScript()->appendScript(\n $this->_view->render(\n 'workout-exercise/add.js',\n array(\n 'currentFormType' => 0,\n 'back' => $this->url()->fromRoute(\n 'hi-training/workout-exercise/list/wildcard',\n array('workout_id' => $id)\n ),\n 'ajaxFormType' => $this->url()->fromRoute(\n 'hi-training/exercise-type/ajax-form-type/wildcard',\n array('type_id' => '')\n ),\n 'ajaxLastOfType' => $this->url()->fromRoute(\n 'hi-training/workout-exercise/ajax-last-of-type/wildcard',\n array('type_id' => '')\n ),\n )\n )\n );\n\n\n /**\n * POST\n */\n if ($this->getRequest()->isPost()) {\n\n $formData = $this->getRequest()->post()->toArray();\n\n if ($form->isValid($formData)) {\n\n// \\Zend\\Debug::dump($formData);\n\n if ( isset($formData['header']['formId'])\n && $formData['header']['formId'] == 'WorkoutExerciseGridForm') {\n\n if (isset($formData['WorkoutExerciseRow']['actions']['save'])) {\n\n if (is_array($formData['WorkoutExerciseRow']['row'])){\n $newRow = $this->_exercise->createRow()->populate($formData['WorkoutExerciseRow']['row']);\n $newRow->save();\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n }\n\n }\n\n if (isset($formData['WorkoutExerciseRow']['actions']['saveAdd'])) {\n\n if (is_array($formData['WorkoutExerciseRow']['row'])){\n $newRow = $this->_exercise->createRow()->populate($formData['WorkoutExerciseRow']['row']);\n $newRow->save();\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/add/wildcard', array('workout_id' => $id));\n }\n\n }\n }\n }\n }\n\n //\n return array(\n 'form' => $form,\n 'workout' => $workout,\n );\n\n }", "public function testAddActionAdds()\n {\n // another time perhaps\n }", "protected function SetupPanel() {\n\t\t\t$this->objGroup = Group::Load($this->strUrlHashArgument);\n\t\t\tif (!$this->objGroup) return $this->ReturnTo('#groups');\n\t\t\tif (!$this->objGroup->IsLoginCanView(QApplication::$Login)) return $this->ReturnTo('#groups');\n\n\t\t\t$this->objDelegate = new EditGroupParticipationDelegate($this, '#groups');\n\t\t}", "public function patients_add(){\n\t\t$data['meta_description']='';\n\t\t$data['menu']= $this->menu;\n\n\t\t$data['user'] = $this->user;\n\t\t$data['group'] = $this->group->name;\n\t\t$data['superviser']=$this->superviser_name;;\n\n\t\t$data['page']='patients/patients-add'; //page view to load\n\t\t$data['pls'] = array(); //page level scripts\n\t\t$data['plugins'] = array(); //plugins\n\t\t$data['javascript'] = array(); //javascript\n\t\t$views= array('design/html_topbar','sidebar','design/page','design/html_footer');\n\t\t$this->layout->view($views, $data);\n\t}", "public function testWebinarCreate()\n {\n }", "public function test_it_can_add_clinic_types()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->admin, 'web-admin')\n ->visit(new AddClinicType)\n ->type('name', 'Đa khoa')\n ->press('Add')\n ->assertSee('List clinic types')\n ->assertSee('A new clinic type is added');\n $this->assertDatabaseHas('clinic_types', ['name' => 'Đa khoa']);\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 testCollectionTicketsAdd()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function create()\n {\n return view('template_joblist/add_joblist');\n }", "public function create()\n {\n //\n return view('livewire.admin.addpartners');\n\n }", "function lb_show_add_record_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'add',\n\t\t)\n\t);\n}", "public function test_add_new_wall_route() {\n global $CFG;\n\n // request the page\n $client = new Client($this->_app);\n $crawler = $client->request('GET', '/' . $this->_walls[0]->id . '/add');\n $this->assertTrue($client->getResponse()->isOk());\n\n // post some data\n $form = $crawler->selectButton(get_string('savechanges'))->form();\n $client->submit($form, array(\n 'form[title]' => 'Title 001',\n ));\n\n // expect to get redirected to the wall that was added\n $url = $CFG->wwwroot . SLUG . $this->_app['url_generator']->generate('wall', array(\n 'id' => 6,\n ));\n $this->assertTrue($client->getResponse()->isRedirect($url));\n }", "public function testProfilePrototypeCreateGroups()\n {\n\n }", "public function addTab() {\n\t\tglobal $REQUEST_DATA;\n\n\t\treturn SystemDatabaseManager::getInstance()->runAutoInsert('employee_appraisal_tab', \n array('appraisalTabName','appraisalProofText'), array(trim($REQUEST_DATA['tabName']),trim($REQUEST_DATA['tabProofText'])) \n );\n\t}", "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 }", "function action_add() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['add_id'];\n\t\t\t$table = $data['add_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\t$choosen[$table][$id] = $id;\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function canCreateNewPages() {}", "public function create()\n {\n // Not needed cause this is coming from the item listing\n }", "function envision_wsclient_pane_checkout_form($form, &$form_state, $checkout_pane, $order) {\n dpm($order);\n\n $result_list = $order->data['result_list'];\n $error_list = $order->data['error_list'];\n \n foreach ($result_list as $ok_item){\n save_result_as_node($ok_item);\n }\n \n $pane_form = array(\n '#prefix' => '<div id=\"content-from-webservice\">',\n '#suffix' => '</div>',\n );\n\n //get successful items list\n $table_data='';\n $err_table_data='';\n foreach($result_list as $result){\n $table_data.='<tr>'\n .'<td>'.$result['data']['vappName'].'</td>'\n .'<tr>';\n }\n \n //show successful items list to $pane_form['OK']\n $pane_form['OK'] = array(\n '#type' => 'item',\n '#title' => t('Create Successfully List'),\n '#markup' => '\n <table class=\"views-table\">\n <thead>\n <tr>\n <th>Vapp Name</th>\n </tr>\n </thead>\n <tbody>'.$table_data.'</tbody>\n </table>\n ',\n );\n \n //get error items list \n foreach($error_list as $error){\n $err_table_data.='<tr>'\n .'<td>'.$error['code'].'</td>'\n .'<td>'.$error['message'].'</td>'\n .'<tr>';\n }\n //show error items list to $pane_form['FAULT']\n $pane_form['FAULT'] = array(\n '#type' => 'item',\n '#title' => ''.($err_table_data==''?$err_table_data:'Create Fault list').'',\n '#markup' => \n '<table class=\"views-table\">\n <thead>\n <tr>\n <th>'.($err_table_data==''?$err_table_data:'Error Code').'</th>\n <th>'.($err_table_data==''?$err_table_data:'Message').'</th>\n </tr>\n </thead>\n <tbody>'.$err_table_data.'</tbody>\n </table>\n ',\n );\n \n\n return $pane_form;\n \n}", "public function testAddItem()\n {\n $this->addItem();\n $this->addItem();\n\n $this->assertEquals(1, $this->laracart->count(false));\n $this->assertEquals(2, $this->laracart->count());\n }", "public function testAddMilestone()\n {\n \t$property_flip_id = $this->createPropertyFlip('Test address line 1000');\n \t$milestone_type_description = 'Test Milestone Type 1';\n \t$milestone_type = $this->createTestMilestoneType($milestone_type_description);\n \t$this->visit('/')\n\t \t->visit('/login')\n\t \t->type('[email protected]', 'email')\n\t \t->type('password', 'password')\n\t \t->press('Login')\n\t \t->see('Home')\n\t \t->visit('/search-property')\n\t \t \n\t \t->type($property_flip_id, 'property_flip_id')\n\t \t->press('Search')\n\t \t->click('View') //View Property\n\t \t \n\t \t->click('View') //View Property Flip\n\t \t->see('View Property Flip')\n\t \t->see('General')\n\t \t->see('Investors')\n\t \t\n\t \t->click('milestones-tab')\n \t\t->see('Milestones')\n \t\t->press('Add Milestone')\n \t\t->select($milestone_type->id, 'milestone_type_id')\n \t\t->type('2016-11-30', 'effective_date')\n \t\t->press('Add Milestone')\n \t\t\n \t\t->see('View Property Flip')\n \t\t->see('Milestone')\n \t\t->see($milestone_type_description);\n }", "private function addTunnel(){\n\t\t$this->validateTunnelForm();\n\t\t\n\t\t$newtunnel = $this->data->tunnels->addChild('tunnel');\n\t\t$newtunnel->addAttribute('id',time());\n\t\t$newtunnel->addAttribute('enable','true');\n\t\t$newtunnel->addChild('description',htmlentities($_POST['services_ipsec_tunnel_descr']));\n\t\t$local = $newtunnel->addChild('local');\n\t\t$local->addChild('public_ip',$_POST['services_ipsec_tunnel_local_gateway']);\n\t\t$local->addChild('type',$_POST['services_ipsec_tunnel_local_subnet_type']);\n\t\tif($_POST['services_ipsec_tunnel_local_subnet_type'] == 'ipaddr' \n\t\t\t|| $_POST['services_ipsec_tunnel_local_subnet_type'] == 'network'){\n\t\t\t$local->addChild('private_ip',$_POST['services_ipsec_tunnel_local_subnet_ipaddr']);\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_local_subnet_type'] == 'network'){\n\t\t\t$local->addChild('private_subnet',$_POST['services_ipsec_tunnel_local_subnet_subnet']);\n\t\t}\n\t\t\n\t\t$remote = $newtunnel->addChild('remote');\n\t\t$remote->addChild('public_ip',$_POST['services_ipsec_tunnel_remote_gateway']);\n\t\t$remote->addChild('type',$_POST['services_ipsec_tunnel_remote_subnet_type']);\n\t\tif($_POST['services_ipsec_tunnel_remote_subnet_type'] == 'ipaddr' \n\t\t\t|| $_POST['services_ipsec_tunnel_remote_subnet_type'] == 'network'){\n\t\t\t$remote->addChild('private_ip',$_POST['services_ipsec_tunnel_remote_subnet_ipaddr']);\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_remote_subnet_type'] == 'network'){\n\t\t\t$remote->addChild('private_subnet',$_POST['services_ipsec_tunnel_remote_subnet_subnet']);\n\t\t}\n\t\t\n\t\t$keepalive = $remote->addChild('keepalive');\n\t\t$keepalive->addAttribute('enable','false');\n\t\tif($_POST['services_ipsec_tunnel_send_keepalive'] == 'true'){\n\t\t\t$keepalive = $_POST['services_ipsec_tunnel_keepalive_ipaddr'];\n\t\t\t$keepalive['enable'] = 'true';\t\n\t\t}\n\t\t\n\t\t$phase1 = $newtunnel->addChild('phase1');\n\t\t$phase1->addChild('mode',$_POST['services_ipsec_tunnel_phase1_negotiation_mode']);\n\t\t$identifier = $phase1->addChild('identifier');\n\t\t$identifier->addAttribute('type',$_POST['services_ipsec_tunnel_p1_id_type']);\n\t\t$identifier = $_POST['services_ipsec_tunnel_p1_id'];\n\t\t\n\t\t//\tCreate array with all supported encryption algorithms\n\t\t$algs = array('des','3des','blowfish','cast128','aes','aes256');\n\t\tforeach($algs as $alg){\n\t\t\tif($_POST['services_ipsec_tunnel_p1_encryption_alg_'.$alg] == 'true'){\n\t\t\t\t$encryption_array[] = $alg;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t// \tCreate array with all supported hash algorithms\n\t\t$hash_algs = array('md5','sha1');\n\t\tforeach($hash_algs as $alg){\n\t\t\tif($_POST['services_ipsec_tunnel_p1_hashing_alg_'.$alg] == 'true'){\n\t\t\t\t$hash_array[] = $alg;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//\timplode the two arrays into a single string and dump into the XML\n\t\t$phase1->addChild('encryption-algorithm',implode('|',$encryption_array));\n\t\t$phase1->addChild('hash-algorithm',implode('|',$hash_array));\n\t\t\n\t\t$phase1->addChild('dhgroup',$_POST['services_ipsec_tunnel_p1_dh_keygroup']);\n\t\t$phase1->addChild('lifetime',$_POST['services_ipsec_tunnel_p1_lifetime']);\n\t\t\n\t\t$auth_method = $phase1->addChild('authentication-method');\n\t\t$auth_method->addAttribute('type',$_POST['services_ipsec_tunnel_p1_auth_method']);\n\t\tif($_POST['services_ipsec_tunnel_p1_auth_method'] == 'psk'){\n\t\t\t$auth_method = $_POST['services_ipsec_tunnel_p1_preshared_key'];\n\t\t}\n\t\telseif($_POST['services_ipsec_tunnel_p1_auth_method'] == 'rsasig'){\n\t\t\t$auth_method = $_POST['services_ipsec_tunnel_p1_rsa_sig'];\n\t\t}\n\t\t\n\t\t$phase2 = $newtunnel->addChild('phase2');\n\t\t$phase2->addChild('protocol',$_POST['services_ipsec_tunnel_p2_protocol']);\n\t\t\n\t\t//\tCreate array with all supported encryption algorithms\n\t\t$algs = array('des','3des','blowfish','cast128','aes','aes256');\n\t\tforeach($algs as $alg){\n\t\t\tif($_POST['services_ipsec_tunnel_p2_encryption_alg_'.$alg] == 'true'){\n\t\t\t\t$encryption_array[] = $alg;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t// \tCreate array with all supported authentication algorithms\n\t\t$auth_algs = array('des','3des','md5','sha1');\n\t\tforeach($auth_algs as $alg){\n\t\t\tif($_POST['services_ipsec_tunnel_p2_hashing_alg_'.$alg] == 'true'){\n\t\t\t\t$auth_array[] = $alg;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//\timplode the two arrays into a single string and dump into the XML\n\t\t$phase2->addChild('encryption-algorithm',implode('|',$encryption_array));\n\t\t$phase2->addChild('authentication-algorithm',implode('|',$auth_array));\n\t\t$phase2->addChild('lifetime',$_POST['services_ipsec_tunnel_p2_lifetime']);\n\t\t$phase2->addChild('pfsgroup',$_POST['services_ipsec_tunnel_p2_pfs_keygroup']);\n\t\t\n\t\t\n\t\t$this->config->saveConfig();\n\t\techo '<reply action=\"ok\"><ipsec><tunnels>';\n\t\techo $newtunnel->asXML();\n\t\techo '</tunnels></ipsec></reply>';\n\t}", "public function create()\n {\n return view('piatti_picklists.create');\n }", "function create($p_filelist)\n {\n }", "public function add(){\n\t\t\tif(isset($_POST['submit'])){\n\t\t\t\t//MAP DATA\n\t\t\t\t$admin = $this->_map_posted_data();\n\t\t\t\t$this->adminrepository->insert($admin);\n\t\t\t\theader(\"Location: \".BASE_URL.\"admin/admin\");\n\n\t\t\t}else{\n\t\t\t\t$view_page =\"adminsview/add\";\n\t\t\t\tinclude_once(ROOT_PATH.\"admin/views/admin/container.php\");\n\t\t\t\t}\n\t\t}", "function gotravel_mikado_add_admin_panel($attributes) {\n\t\t$title = '';\n\t\t$name = '';\n\t\t$hidden_property = '';\n\t\t$hidden_value = '';\n\t\t$hidden_values = array();\n\t\t$page = '';\n\n\t\textract($attributes);\n\n\t\tif(isset($page) && !empty($title) && !empty($name) && gotravel_mikado_framework()->mkdOptions->adminPageExists($page)) {\n\t\t\t$admin_page = gotravel_mikado_framework()->mkdOptions->getAdminPage($page);\n\n\t\t\tif(is_object($admin_page)) {\n\t\t\t\t$panel = new GoTravelMikadoPanel($title, $name, $hidden_property, $hidden_value, $hidden_values);\n\t\t\t\t$admin_page->addChild($name, $panel);\n\n\t\t\t\treturn $panel;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function create()\n {\n return view('admin.add-page');\n }", "private function createTabsProspects()\n {\n $tab = new Tab();\n $tab->active = 1;\n $names = array(1 => 'Prospects', 'Prospects');\n foreach (Language::getLanguages() as $language) {\n $tab->name[$language['id_lang']] = isset($names[$language['id_lang']])\n ? $names[$language['id_lang']] : $names[1];\n }\n $tab->class_name = 'AdminProspects';\n $tab->module = $this->name;\n $tab->id_parent = Tab::getIdFromClassName('AdminCustomers');\n\n return (bool)$tab->add();\n }", "function addParticipantList(& $participantList, & $parentElement) {\n\t\t$element =& $this->_document->createElement('participantList');\n\t\t$parentElement->appendChild($element);\n\t\t\n\t\t$this->addCommonProporties($participantList, $element);\n\t\t\n\t\tif ($participantList->getField('location') == 'right')\n\t\t\t$element->setAttribute('location', 'right');\n\t\telse\n\t\t\t$element->setAttribute('location', 'left');\n\t}" ]
[ "0.7211089", "0.65043837", "0.6392804", "0.5913536", "0.5587062", "0.5463761", "0.5356804", "0.5312291", "0.5305108", "0.5288998", "0.5263735", "0.5252212", "0.52127165", "0.5202787", "0.52021176", "0.52019876", "0.5184639", "0.51807183", "0.5171748", "0.5163554", "0.51232785", "0.51141214", "0.5099525", "0.5099047", "0.50935376", "0.50778276", "0.5074943", "0.50656843", "0.50598454", "0.5044847", "0.504235", "0.50383794", "0.503504", "0.50260025", "0.50257444", "0.5013624", "0.50068176", "0.50023437", "0.50021386", "0.5000871", "0.49983552", "0.4994707", "0.4994086", "0.49886712", "0.4985518", "0.4982553", "0.49735656", "0.49731523", "0.49663246", "0.49624032", "0.49590525", "0.49572355", "0.49564463", "0.49443567", "0.49410364", "0.49373114", "0.4928094", "0.49272487", "0.49202573", "0.4915535", "0.4909869", "0.49086732", "0.49079004", "0.49045095", "0.4901137", "0.48988202", "0.4893475", "0.48916218", "0.48894536", "0.48834386", "0.4882358", "0.48791993", "0.48782778", "0.48766506", "0.4876456", "0.487242", "0.48686907", "0.48575458", "0.48563385", "0.48301813", "0.48218456", "0.4819004", "0.4816065", "0.4814171", "0.48066667", "0.48057985", "0.48014697", "0.4800363", "0.47884902", "0.4787226", "0.47870904", "0.47814456", "0.4776306", "0.47699055", "0.47693944", "0.47678775", "0.47628", "0.47576568", "0.47538784", "0.47534597" ]
0.81021476
0
Test case for webinarPanelistDelete Remove a Panelist.
public function testWebinarPanelistDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testRemoveListSuccessfully(): void\n {\n $this->createMailchimpList($list);\n\n $this->delete(\\sprintf('/mailchimp/lists/%s', $list['list_id']));\n\n $this->assertResponseOk();\n self::assertEmpty(\\json_decode($this->response->content(), true));\n }", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "protected function removeFromList($data)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\ViewList');\n $repo->deleteInBatch($repo->findBy($data), false);\n }", "public function RemoveArtworkList(): void{\n\n if(!Session::isLogin())\n exit;\n\n if(!ArtworkVerifier::removeList($_POST))\n exit;\n\n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id))\n UserList::where('user_id', Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->delete();\n }", "public function deleteAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET VIEWER INFO\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $listingtype_id = $this->_listingType->listingtype_id;\n $this->view->listingType = $this->_listingType;\n\n //GET TAB ID\n $this->view->tab_selected_id = $tab_selected_id = $this->_getParam('content_id');\n $this->view->format_form = $this->_getParam('format', null);\n\n //GET VIDEO OBJECT\n $this->view->sitereview_video = $sitereview_video = Engine_Api::_()->getItem('sitereview_video', $this->getRequest()->getParam('video_id'));\n\n //GET VIDEO TITLE\n $this->view->title = $sitereview_video->title;\n\n //GET LISTING ID\n $listing_id = $sitereview_video->listing_id;\n\n //GET NAVIGATION \n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('sitereview_main');\n\n //GET SITEREVIEW SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, 'edit_listtype_' . $sitereview->listingtype_id);\n\n if (!$sitereview_video) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_(\"Video doesn't exists or not authorized to delete\");\n return;\n }\n\n //VIDEO OWNER AND LISTING OWNER CAN DELETE VIDEO\n if ($viewer_id != $sitereview_video->owner_id && $can_edit != 1) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n\n if (!$this->getRequest()->isPost()) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_('Invalid request method');\n return;\n }\n\n $db = $sitereview_video->getTable()->getAdapter();\n $db->beginTransaction();\n\n try {\n\n Engine_Api::_()->getDbtable('videoratings', 'sitereview')->delete(array('videorating_id =?' => $this->getRequest()->getParam('video_id')));\n\n $sitereview_video->delete();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n\n\n\n\n $this->view->status = true;\n if ($this->view->format_form == 'smoothbox') {\n $this->_forwardCustom('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRefresh' => '500',\n 'parentRefreshTime' => '500',\n 'format' => 'smoothbox',\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted this video.')\n ));\n } else {\n if (Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n if ($can_edit) {\n return $this->_gotoRouteCustom(array('action' => 'edit', 'listing_id' => $sitereview->listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\n } else {\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $tab_selected_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n } else {\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $tab_selected_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n }\n }", "public function removeAction() {\n $result = array('status' => 'failed');\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('remove') == 'true') {\n $dirName = Mage::getBaseDir('code').'/local/Balticode/Postoffice';\n if (is_dir($dirName) && file_exists($dirName.'/etc/config.xml')) {\n $directory = new Varien_Io_File();\n $deleteResult = $directory->rmdir($dirName, true);\n if ($deleteResult) {\n $result['status'] = 'success';\n }\n }\n \n }\n $this->getResponse()->setRawHeader('Content-type: application/json');\n $this->getResponse()->setBody(json_encode($result));\n return;\n }", "public function testWebinarPanelists()\n {\n }", "public function removeAction()\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_frpformanswers_domain_model_formentry');\n\n $queryBuilder->delete('tx_frpformanswers_domain_model_formentry')\n ->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($this->pid, \\PDO::PARAM_INT)))\n ->andWhere($queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(1, \\PDO::PARAM_INT)))\n ->execute();\n\n $this->addFlashMessage(\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.body', null, [$this->pid]),\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.title'),\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::OK,\n true);\n\n $this->redirect('list');\n }", "public function actionDelete()\n {\n extract(Yii::$app->request->post());\n $this->findModel($list, $item)->delete();\n }", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "public function removeAction() {\r\n //DELETE SLIDE DURING THE UPLOAD\r\n $is_ajax = (int) $this->_getParam('is_ajax');\r\n if (!empty($is_ajax)) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n }\r\n\r\n //GET SLIDESHOW ID AND IT'S OBJECT\r\n $advancedslideshow_id = (int) $this->_getParam('advancedslideshow_id');\r\n $this->view->advancedslideshow = $advancedslideshow = Engine_Api::_()->getItem('advancedslideshow', $advancedslideshow_id);\r\n\r\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('confirm') == true) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n if (empty($image)) {\r\n return;\r\n }\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n\r\n //GET TOTAL SLIDES COUNT\r\n $total_images = Engine_Api::_()->getDbTable('images', 'advancedslideshow')->getTotalSlides($advancedslideshow_id);\r\n\r\n $start_index = $advancedslideshow->start_index;\r\n\r\n if ($start_index > $total_images - 1) {\r\n if ($total_images != 0) {\r\n $advancedslideshow->start_index = $total_images - 1;\r\n $advancedslideshow->save();\r\n } else {\r\n $advancedslideshow->start_index = 0;\r\n $advancedslideshow->save();\r\n }\r\n }\r\n\r\n $parentRedirect = 'admin/advancedslideshow/slides/manage/advancedslideshow_id/' . $advancedslideshow_id;\r\n $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => 10,\r\n 'parentRedirect' => $parentRedirect,\r\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted the slide.')\r\n ));\r\n }\r\n }", "public function testRemove()\n {\n $context = $this->createPageContext();\n $storage = $this->createStorage();\n $tokenStorage = $this->createTokenStorage();\n\n $layout1 = $storage->create();\n $layout2 = $storage->create();\n $layout3 = $storage->create();\n\n $context->addLayoutList([$layout1->getId(), $layout2->getId(), $layout3->getId()]);\n $token = $context->createEditToken([$layout1->getId(), $layout3->getId()], ['user_id' => 17]);\n $tokenString = $token->getToken();\n $tokenStorage->saveToken($token);\n\n // Save our editable instances\n $tokenStorage->update($tokenString, $layout1);\n $tokenStorage->update($tokenString, $layout3);\n\n // And now remove one layout\n $tokenStorage->remove($tokenString, $layout2->getId());\n $this->assertTrue($token->contains($layout1->getId()));\n $this->assertFalse($token->contains($layout2->getId()));\n $this->assertTrue($token->contains($layout3->getId()));\n\n try {\n $tokenStorage->load($tokenString, $layout2->getId());\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n\n // And the other two still work\n $tokenStorage->load($tokenString, $layout1->getId());\n $tokenStorage->load($tokenString, $layout3->getId());\n }", "function delete_list($listid)\n\t{\n\t\t$this->http_set_content_type('text/html');\n\t\t$this->load_url(\"lists/$listid\", 'delete', array(), 204);\n\t\tif(intval($this->http_response_code) === 204):\n\t\t\treturn true;\n\t\tendif;\n\t\treturn false;\n\t}", "public function onRemove();", "public function destroy($list_id)\n {\n $list = Listt::find($list_id);\n $list->delete();\n return redirect(route('adminpanel.index'));\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function removePhotoAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LISTING ID\n $listing_id = $this->_getParam('listing_id');\n\n //GET LISTING ITEM\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET LISTING TYPE ID\n $listingtype_id = $sitereview->listingtype_id;\n\n //CAN EDIT OR NOT\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n //GET FILE ID\n $file_id = Engine_Api::_()->getDbtable('photos', 'sitereview')->getPhotoId($listing_id, $sitereview->photo_id);\n\n //DELETE PHOTO\n if (!empty($file_id)) {\n $photo = Engine_Api::_()->getItem('sitereview_photo', $file_id);\n $photo->delete();\n }\n\n //SET PHOTO ID TO ZERO\n $sitereview->photo_id = 0;\n $sitereview->save();\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'change-photo', 'listing_id' => $listing_id), \"sitereview_dashboard_listtype_$listingtype_id\", true);\n }", "public function testRemove()\n {\n $success = $this->collection->remove(3);\n\n $this->assertTrue($success);\n $this->assertCount(2, $this->collection);\n $this->assertFalse($this->collection->contains(3));\n }", "public function testRemoveMenuAction()\n {\n parent::login();\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->dragAndDropToObject(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1\", \"css=ul#sortable2\");\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->assertFalse($this->isElementPresent(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\"));\n $this->isElementPresent(\"css=ul#sortable2.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\");\n $this->assertElementContainsText(\"css=ul#sortable2.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\", \"Test Menu Selenium 1\");\n parent::logout();\n }", "public function deleteList($data)\n {\n var_export($data);\n //return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "function remove()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$user = JFactory::getUser();\n\t\tif (!$user->authorise('core.delete', 'com_gmapfp'))\n\t\t{\n\t\t\t$this->setMessage(JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'), 'error');\n\t\t} else {\n\t\t\t$model = $this->getModel('gmapfp');\n\t\t\tif(!$model->delete()) {\n\t\t\t\t$msg = JText::_( 'Error: One or more GMapFPs could not be Deleted' );\n\t\t\t} else {\n\t\t\t\t$msg = JText::_( 'GMapFP(s) Deleted' );\n\t\t\t}\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_gmapfp&controller=gmapfp&task=view', $msg );\n\t}", "public function testWebinarPollDelete()\n {\n }", "public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }", "function remove()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$cid = JRequest::getVar( 'cid', array(), 'post', 'array' );\n\t\tJArrayHelper::toInteger($cid);\n\n\t\tif (count( $cid ) < 1) {\n\t\t\tJError::raiseError(500, JText::_( 'Select an item to delete' ) );\n\t\t}\n\n\t\t$model = $this->getModel('weblink');\n\t\tif(!$model->delete($cid)) {\n\t\t\techo \"<script> alert('\".$model->getError(true).\"'); window.history.go(-1); </script>\\n\";\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}", "public function action_remove(){\n\t\t$monumentId = $this->request->param('id');\n\t\t$user = Auth::instance()->get_user();\n\t\t\n\t\t// Remove the monument from the user list\n\t\t$favoriteList = new Model_List_Favorite();\n\t\t$favoriteList->remove($monumentId, $user->UserID);\n\t\t\n\t\t// Redirect the user back to the monument page\n\t\t$this->request->redirect('monument/view/' . $monumentId);\n\t}", "public function testCollectionTicketsDelete()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function del(){\n\t\t$this->OnlyAdmin();\n\t\tif($this->input->post()){\n\t\t$this->TicketModel->delet($this->input->post());\n\t\tredirect('index.php/ticket/lists');}\n\t}", "public function removeFromListAction() { \n \n //get id of recipe which should be removed from list\n $recipeID = (int) $this->params()->fromRoute('recipeID');\n\n //get default list of user\n if ($_SESSION['user'] != \"\") {\n $userID = $_SESSION['user'];\n\n $list = $this->getListsTable()->getListsByUser($userID); //1 list \n\n $listID = 0;\n if ($list == null) {\n //should not happen\n throw new \\Exception(\"ERROR: Remove recipe $recipeID from list $listID - no list available\"); \n } else { \n $listID = (int) $list->listID; \n $this->getListDetailTable()->removeRecipeFromList($listID, $recipeID); \n }\n \n //refresh current favorite list\n return $this->redirect()->toRoute('list', array('action' => 'viewList'));\n }//check if user is logged-in\n }", "public function testWebinarDelete()\n {\n }", "public function testDeleteNodeSingle()\n {\n $list = new SimpleList();\n $list->add(\"fred\");\n $list->add(\"wilma\");\n $list->add(\"betty\");\n $list->add(\"barney\");\n\n $this->assertEquals(array(\"fred\", \"wilma\", \"betty\", \"barney\"), $list->getValues());\n\n $list->delete($list->find(\"wilma\"));\n\n $this->assertEquals(array(\"fred\", \"betty\", \"barney\"), $list->getValues());\n }", "public function deleteListAction(){\n $ebookers_obj = new Ep_Ebookers_Managelist();\n //to call a function to delete themes//\n $ebookers_obj->deleteList($this->_request->getParams());\n //unset($_REQUEST);\n exit;\n }", "function ui_sortable_destroy($selector){\n return add_method_support('sortable',$selector, 'destroy');\n}", "public function removeAction() {\r\n if (empty($_POST['photo_id']))\r\n die('error');\r\n //GET PHOTO ID AND ITEM\r\n $photo_id = (int) $this->_getParam('photo_id');\r\n $photo = Engine_Api::_()->getItem('sesvideo_chanelphoto', $photo_id);\r\n $db = Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->getAdapter();\r\n $db->beginTransaction();\r\n try {\r\n $photo->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n }", "function removeFromSlideshow()\r\n\t{\r\n\t\t$art_object_id = $this->input->post('art_object_id');\r\n\t\t\r\n\t\t$result = $this->artobject_model->deleteFromSlideshow($art_object_id);\r\n\t\tif($result)\r\n\t\t{\r\n\t\t\t$url = base_url('admin/manageArt/0/slideshowDeleted');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$url = base_url('admin/manageArt/0/slideshowDeletedFailed');\r\n\t\t}\r\n\t\tredirect($url);\r\n\t}", "public function destroy(AnesthesiaList $anesthesiaList)\n {\n //\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteAction() {\n\n\t\t//ONLY LOGGED IN USER CAN DELETE REVIEW\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n\t\t//SUBJECT SHOULD BE SET\n if (!$this->_helper->requireSubject('list_listing')->isValid())\n return;\n\n $viewer = Engine_Api::_()->user()->getViewer();\n $this->view->viewer_id = $viewer_id = $viewer->getIdentity();\n\n\t\t//GET REVIEW ID AND REVIEW OBJECT\n $review_id = $this->_getParam('id');\n $review = Engine_Api::_()->getItem('list_reviews', $review_id);\n\n\t\t//ONLY REVIEW OWNER AND SUPER ADMIN CAN DELETE REVIEW\n if (!($review->owner_id == $viewer_id || $viewer->level_id == 1)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if ($this->getRequest()->isPost()) {\n\n $this->view->list = $list = Engine_Api::_()->core()->getSubject();\n $content_id = $this->_getParam('content_id');\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //DELETE REVIEW FROM DATABASE\n $review->delete();\n\n\t\t\t\t//DECREASE REVIEW COUNT\n\t\t\t\t$list->review_count--;\n\t\t\t\t$list->save();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //REDIRECT\n $url = $this->_helper->url->url(array('listing_id' => $list->getIdentity(), 'user_id' => $list->owner_id, 'slug' => $list->getSlug(), 'tab' => $content_id), 'list_entry_view', true);\n\n $this->_forward('success', 'utility', 'core', array(\n 'parentRefresh' => 3,\n 'parentRedirect' => $url,\n 'parentRedirectTime' => 1,\n 'messages' => array('Your Review has been deleted successfully.')\n ));\n } else {\n $this->renderScript('review/delete.tpl');\n }\n }", "public function deleteSlots(Collection $collection): Collection;", "public function testRemovePageWhenDeleted()\n {\n\n // Add a public page.\n $page = $this->_simplePage(true);\n\n // Delete.\n $page->delete();\n\n // Should remove Solr document.\n $this->_assertNotRecordInSolr($page);\n\n }", "function projectpentagon_remove() {\n\ndelete_option('projectpentagon_title');\n\ndelete_option('projectpentagon_name1');\n\ndelete_option('projectpentagon_name2');\n\ndelete_option('projectpentagon_name3');\n\ndelete_option('projectpentagon_name4');\n\ndelete_option('projectpentagon_name5');\n\ndelete_option('projectpentagon_color1');\n\ndelete_option('projectpentagon_color2');\n\ndelete_option('projectpentagon_color3');\n\ndelete_option('projectpentagon_color4');\n\ndelete_option('projectpentagon_color5');\n\ndelete_option('projectpentagon_category');\ndelete_option('projectpentagon-titleonpages');\n\n}", "public function testDelete()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertGreaterThan(0, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--delete')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Supprimer\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Supprimer')->form();\n\t\t$crawler = $client->submit($form);\t\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Le client a bien été supprimé.\")')->count());\n\n\t}", "public function removeAction()\n {\n if ( $this->_hasParam('razaoSocialTomador') == false )\n {\n $this->_redirect('clientes/list');\n }\n \t\t$modelo = new Application_Model_Clientes();\n $razaoSocialTomador = $this->_getParam('razaoSocialTomador');\n $modelo->removeByRazaoSocial($razaoSocialTomador);\n\n// $cnte = $modelo->removeByRazaoSocial($razaoSocialTomador);\n\t\t$this->_redirect('clientes/list');\n // action body\n }", "public function doRemove() {\r\n\t\t$host = xn(\"host\");\r\n\t\t\r\n\t\t$ret = $this->_mongo->selectDB(\"admin\")->command(array(\r\n\t\t\t\"removeshard\" => $host\r\n\t\t));\r\n\t\t\r\n\t\t$this->ret = $this->_highlight($ret, \"json\");\r\n\t\t\r\n\t\t$this->display();\r\n\t}", "public function remove() {}", "public function remove() {}", "public function testRemoveUnsetElement()\n {\n $success = $this->collection->remove(7);\n\n $this->assertFalse($success);\n }", "public function do_delete_record()\n {\n $v_list_delete = get_post_var('hdn_item_id_list','');\n $this->model->do_delete_record($v_list_delete);\n }", "function delete()\n\t{\n\t\t$model = $this->getModel();\n\t\t$viewType\t= JFactory::getDocument()->getType();\n\t\t$view = $this->getView($this->view_item, $viewType);\n\t\t$view->setLayout('confirmdelete');\n\t\tif (!JError::isError($model)) {\n\t\t\t$view->setModel($model, true);\n\t\t}\n\t\t//used to load in the confirm form fields\n\t\t$view->setModel($this->getModel('list'));\n\t\t$view->display();\n\t}", "public function eliminar() {\n\t\t\n\t\t\n\t\t$juradodni = $_GET[\"dniJurado\"];\n\t\t\n\t\t$this -> JuradoMapper -> delete($juradodni);\n\n\t\t\n\t\t$this -> view -> redirect(\"jurado\", \"listar\");\n\t\t//falta cambiar\n\t}", "public function testDelete()\n\t{\n\t\t$saddle = $this->saddles[0];\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/saddles/' . $saddle->id)\n\t\t\t ->assertStatus(200);\n\n\t\t$this->assertDatabaseMissing('saddles', ['id' => $saddle->id]);\n\t}", "function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_person_detail\n\t\t\t\tWHERE psd_ps_id=?\";\n\t\t$this->hr->query($sql, array($this->psd_ps_id));\n\t}", "function delete() {\n $this->check_action_permission('delete');\n $tours_to_delete = $this->input->post('checkedID');\n if ($this->tour->delete_list($tours_to_delete)) {\n echo json_encode(array('success' => true, 'message' => lang('tours_successful_deleted')));\n } else {\n echo json_encode(array('success' => false, 'message' => lang('tours_cannot_be_deleted')));\n }\n }", "public function deletepoll(){\n \tSiteController::loggedInCheck();\n\n\t\t$pollid = $_POST['pollid'];\n\t\t$poll = Poll::loadById($pollid);\n\t\t$pollAuthorId = $poll->get('userId');\n\t\t$pollAuthor = User::loadById($pollAuthorId);\n\n\t\t//user is the author of the poll, allow delete\n\t\tif($pollAuthor->get('username') == $_SESSION['username']){\n\t\t\t$poll->delete();\n\t\t} else {\n\t\t\t$_SESSION['info'] = \"You can only delete polls you have created.\";\n\t\t}\n\n\t\t//refresh page\n\t\theader('Location: '.BASE_URL);\t\t\t\t\t\t\t\t\t\t\t//TODO update\n\t}", "public function del() {\n\t\t\tif (!empty($this->params['form']['items'])) {\n\t\t\t\t/* Convert string with ids to array */\n\t\t\t\t$allIds = explode(',', $this->params['form']['items']);\n\t\t\t\t$allIds = Sanitize::clean($allIds);\n\t\t\t\t\n\t\t\t\t/* Remove menu item(s) from tree */\n\t\t\t\t/* @todo Check if this could be done with a single method call/db request instead */\n\t\t\t\tforeach ($allIds AS $id) {\n\t\t\t\t\t$this->MyMenu->removefromtree($id, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* Get list of menu items */\n\t\t\t$this->menuList = $this->getThreadedList();\n\t\t\t$this->set('menuList', $this->menuList);\n\t\t\t\n\t\t\t$this->render('list');\n\t\t}", "public function deleteAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$model->deleteLayout($this->_request->getParam('layout'));\n\t\t$this->_redirect('/admin/layout/list');\n\t }", "function ag_del_coll() {\n\tif(!isset($_POST['coll_id'])) {die('missing data');}\n\t$id = addslashes($_POST['coll_id']);\n\t\n\t$resp = wp_delete_term( $id, 'ag_collections');\n\n\tif($resp == '1') {die('success');}\n\telse {die('error during the collection deletion');}\n}", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "function delete()\r\n\t{\r\n\t\tglobal $debug;\r\n\t\t$dbh = getOpenedConnection();\r\n\r\n\t\t// Delete current item\r\n\t\t$sql = \"delete from tbl_Pistol_CompetitionDay\r\n\t\t\twhere Id = $pid;\r\n\t\t\";\r\n\r\n\t\t\r\n\t\tif ($debug)\r\n\t\t\tprint_r(\"SQL: \" . $sql);\r\n\t\t\t\r\n\t\tmysqli_query($dbh,$sql);\r\n\t\tif (mysqli_errno($dbh)!=0) {\r\n\t\t\tprint_r(mysqli_error($dbh));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$this->clear(); // Clear current object\r\n\r\n\t}", "public function delete()\n {\n JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n // Get items to remove from the request.\n $cid = $this -> input -> get('cid', array(), 'array');\n\n if (!is_array($cid) || count($cid) < 1)\n {\n JFactory::getApplication() -> enqueueMessage(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), 'error');\n\t\t\t\n }\n else\n {\n // Get the model.\n $model = $this->getModel();\n\n // Make sure the item ids are integers\n jimport('joomla.utilities.arrayhelper');\n JArrayHelper::toInteger($cid);\n\n // Remove the items.\n if ($model->delete($cid))\n {\n $this->setMessage(JText::plural('COM_TZ_PORTFOLIO_PLUS_FIELDS_COUNT_DELETED', count($cid)));\n }\n else\n {\n $this->setMessage($model->getError());\n }\n }\n\n $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false));\n }", "public function removeAction()\r\n {\r\n $modelNavBlock = $this->getServiceLocator()->get('DotsNavBlock\\Db\\Model\\NavigationBlock');\r\n $QUERY = $this->getRequest()->getQuery()->toArray();\r\n $nav_id = $QUERY['id'];\r\n $nav = $modelNavBlock->getById($nav_id);\r\n $nav->delete();\r\n return $this->jsonResponse(array('success' => true, 'id' => $nav_id));\r\n }", "public function delete()\n\t{\n\t\t$selection = $this->input->post('selection');\n\t\t$ignore = implode('|', array_diff($this->ignore_list, $selection));\n\t\t$this->member->ignore_list = $ignore;\n\t\t$this->member->save();\n\n\t\tee()->functions->redirect(ee('CP/URL')->make($this->index_url, $this->query_string));\n\t}", "function test_restrict_deletion_of_Home_page(){}", "public function removeAction() {\n\n // Validate request methods\n $this->validateRequestMethod('POST');\n\n //GET DIARY ID AND SUBJECT\n if (Engine_Api::_()->core()->hasSubject())\n $wishlist = Engine_Api::_()->core()->getSubject('sitereview_wishlist');\n\n $wishlist_id = $this->_getParam('wishlist_id');\n if (isset($wishlist_id) && !empty($wishlist_id)) {\n $subject = $wishlist = Engine_Api::_()->getItem('sitereview_wishlist', $wishlist_id);\n Engine_Api::_()->core()->setSubject($wishlist);\n } else {\n $this->respondWithError('no_record');\n }\n\n\n if (empty($wishlist))\n $this->respondWithError('no_record');\n\n $wishlist_id = $this->_getParam('wishlist_id');\n\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET EVENT ID AND EVENT\n $listing_id = $this->_getParam('listing_id');\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n\n if (empty($sitereview) && !isset($sitereview))\n $this->respondWithError('no_record');\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n //DELETE FROM DATABASE\n Engine_Api::_()->getDbtable('wishlistmaps', 'sitereview')->delete(array('wishlist_id = ?' => $wishlist_id, 'listing_id = ?' => $listing_id));\n\n try {\n //DELETE ACTIVITY FEED\n //SQL ERROR TO BE CORRECTED\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n $actionTableName = $actionTable->info('name');\n\n $action_id = $actionTable->select()\n ->setIntegrityCheck(false)\n ->from($actionTableName, 'action_id')\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\n ->where('engine4_activity_attachments.id = ?', $listing_id)\n ->where($actionTableName . '.type = ?', \"sitereview_wishlist_add_listing\")\n ->where($actionTableName . '.subject_type = ?', 'user')\n ->where($actionTableName . '.object_type = ?', 'sitereview_listing')\n ->where($actionTableName . '.object_id = ?', $listing_id)\n //->where($actionTableName . '.params like(?)', '{\"child_id\":' . $wishlist_id . '}')\n ->query()\n ->fetchColumn();\n } catch (Exception $ex) {\n $this->respondWithValidationError('internal_server_error', $ex->getMessage());\n }\n if (!empty($action_id)) {\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\n if (!empty($activity)) {\n $activity->delete();\n }\n }\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }", "public function deleteAction() {\n\t\t$story_id \t\t= $this->getRequest()->getParam(\"id\");\n\t\t\n\t\t//Verify if the requested story exist\n\t\t$stories\t\t= new Stories();\n\t\tif (!($story\t= $stories->getStory($story_id))) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\n\t\t// Check if we are the owner\n\t\tif ($this->_application->user->id != $story->user_id) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\t\t\n\t\t// Ok, we can hide the item\n\t\t$stories->deleteStory($story_id);\n\t\treturn $this->_helper->json->sendJson(true);\n\t}", "public function testHandleRemoveSuccess()\n {\n // Populate data\n $dealerAccountIDs = $this->_populate();\n \n // Set data\n $ID = $this->_pickRandomItem($dealerAccountIDs);\n \n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/remove', ['ID' => $ID]);\n \n // Validate response\n $this->assertRedirectedTo('/dealer-account');\n $this->assertSessionHas('dealer-account-deleted', '');\n \n // Validate data\n $dealerAccount = $this->dealer_account->getOne($ID);\n $this->assertEquals(null, $dealerAccount);\n \n }", "public function ajaxDeleteAction() { \n $request = $this->getRequest();\n $response = $this->getResponse();\n if ($request->isPost()) {\n $list = $request->getPost('list');\n if (is_array($list) && count($list) > 0) {\n foreach($list as $id_shopping_list) {\n $this->getShoppingListTable()->deleteShoppingList($id_shopping_list);\n }\n $t_return[\"result\"] = \"OK\";\n } else {\n $t_return[\"result\"] = \"KO_LIST\";\n }\n $response->setContent(\\Zend\\Json\\Json::encode($t_return));\n }\n return $response;\n }", "public function testDelete()\n {\n $context = $this->createPageContext();\n $storage = $this->createStorage();\n $tokenStorage = $this->createTokenStorage();\n\n $layout1 = $storage->create();\n $layout2 = $storage->create();\n $layout3 = $storage->create();\n\n $context->addLayoutList([$layout1->getId(), $layout2->getId(), $layout3->getId()]);\n $token = $context->createEditToken([$layout1->getId(), $layout3->getId()], ['user_id' => 17]);\n $tokenString = $token->getToken();\n $tokenStorage->saveToken($token);\n\n // Save our editable instances\n $tokenStorage->update($tokenString, $layout1);\n $tokenStorage->update($tokenString, $layout3);\n\n // Validate that load still work\n $tokenStorage->loadToken($tokenString);\n $tokenStorage->loadMultiple($tokenString, [$layout1->getId(), $layout3->getId()]);\n\n // And now delete\n $tokenStorage->deleteAll($tokenString);\n\n try {\n $tokenStorage->loadToken($tokenString);\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n try {\n $tokenStorage->loadMultiple($tokenString, [$layout1->getId()]);\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n try {\n $tokenStorage->load($tokenString, $layout3->getId());\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n }", "function teamdelete(){\n $this->auth(COMP_ADM_LEVEL);\n $team_id = $this->uri->segment(3);\n $contest_id = urldecode($this->uri->segment(4));\n $this->m_key->removeTeam($team_id);\n $this->m_team->delete($team_id, $contest_id);\n $this->teams($contest_id);\n }", "public function remove() {\n\n //GETS TASK RECORD WITH REQUEST TASK ID (ID)\n $task = Tasks::findorfail(request('TaskID'));\n\n //DELETES TASK RECORD FROM DB\n $task->delete();\n\n //REDIRECTS TO TASK VIEW WITH NOTEPADID AS PARAMETER\n return redirect (\"/task/$task->NotepadID\");\n }", "function deleteItem()\r\n\t{\r\n\t\t$this->content_obj->deleteItem();\r\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\r\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\r\n\t}", "public function destroy(pregunta_test $pregunta_test)\n {\n //\n }", "public function postRemoveFromWatchlist()\n {\n \n $w_id = Input::get('id');\n $watchlist = new Watchlist();\n return Response::json( $watchlist->removeWatchlist( Auth::user()->id, $w_id, FALSE) ); \n \n }", "public function remove()\n {\n $id = $this->input->post('id_slider'); // menangkap post dari form.php ketika edit data, dengan properties namenya adalah id_size\n $this->slider->delete($id); /* mengakses model size, lalu ke fungsi delete dengan parameter sebuah id */\n\n /* membuat array, yang akan dikonversi menjadi json untuk kebutuhan ajax */\n $jsonmsg = array(\n \"msg\" => 'Delete Data Succces',\n \"hasil\" => true\n );\n\n /* konversi array json, yang akan terkirim ke form.php */\n echo json_encode($jsonmsg);\n }", "public function delete($oPanier) {\n $this->_apiClient->produitpanier(\"delete\",$this->toArray());\n $this->panier->synchronise();\n $oPanier->synchronise();\n }", "public function deleteAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\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->delete();\n\t\t}\n\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName));\n\t}", "public function multiDeleteAction() {\n\n if ($this->getRequest()->isPost()) {\n $values = $this->getRequest()->getPost();\n\n foreach ($values as $key => $value) {\n if ($key == 'delete_' . $value) {\n Engine_Api::_()->getItem('list_listing', (int) $value)->delete();\n }\n }\n }\n return $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }", "function thumbwhere_contentcollection_delete_form($form, &$form_state, $thumbwhere_contentcollection) {\n $form_state['thumbwhere_contentcollection'] = $thumbwhere_contentcollection;\n\n $form['#submit'][] = 'thumbwhere_contentcollection_delete_form_submit';\n\n $form = confirm_form($form,\n t('Are you sure you want to delete thumbwhere_contentcollection %name?', array('%name' => $thumbwhere_contentcollection->title)),\n 'admin/thumbwhere/thumbwhere_contentcollections/thumbwhere_contentcollection',\n '<p>' . t('This action cannot be undone.') . '</p>',\n t('Delete'),\n t('Cancel'),\n 'confirm'\n );\n\n return $form;\n}", "public function delete($address, $list, $type);", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken(['get', 'post']);\n\n\t\t// Incoming\n\t\t$ids = Request::getArray('id', array());\n\n\t\tif (count($ids) > 0)\n\t\t{\n\t\t\t// Loop through each ID\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$row = new Middleware\\Location(intval($id));\n\n\t\t\t\tif (!$row->delete())\n\t\t\t\t{\n\t\t\t\t\tthrow new \\Exception($row->getError(), 500);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller, false),\n\t\t\tLang::txt('COM_TOOLS_ITEM_DELETED'),\n\t\t\t'message'\n\t\t);\n\t}", "public function deletePlaylistAction()\n {\n\t\t$userSession\t= new Container('fo_user');\n\t\t$request\t\t= $this->getRequest();\n\t\tif(!isset($userSession->userSession['_id']) || trim($userSession->userSession['_id']) == '') {\n\t\t\techo \"-1\";\n\t\t\tdie();\n\t\t}\n\t\tif($request->isPost()) {\n\t\t\t$formData\t= $request->getPost();\n\t\t\tif(isset($formData['playlist_id']) && trim($formData['playlist_id']) != '') {\n\t\t\t\t$result\t= $this->deletePlaylist($formData);\n\t\t\t\t\n\t\t\t\t$tempArray\t= $userSession->mediaSession;\n\t\t\t\tif(isset($tempArray['playlist'][$formData['playlist_id']])) {\n\t\t\t\t\tunset($tempArray['playlist'][$formData['playlist_id']]);\n\t\t\t\t}\n\t\t\t\t$userSession->mediaSession\t= $tempArray;\n\t\t\t\techo \"1\";\t//\tSuccess\n\t\t\t} else {\n\t\t\t\techo \"0\";\t//\timproper request\n\t\t\t}\n\t\t} else {\n\t\t\techo \"0\";\t//\timproper request\n\t\t}\n\t\treturn $this->getResponse();\n }", "function ws_delete($window_name, $form='') {\n global $include, $conf, $self, $onadb;\n\n // Check permissions\n if (! (auth('rack_del') or auth('advanced'))){\n $response = new xajaxResponse();\n $response->addScript(\"alert('Permission denied!');\");\n return($response->getXML());\n }\n\n // If an array in a string was provided, build the array and store it in $form\n $form = parse_options_string($form);\n\n // Instantiate the xajaxResponse object\n $response = new xajaxResponse();\n $js = '';\n\n // Run the module\n list($status, $output) = run_module('rack_assignment_del', array('rack_assignment' => $form['rack_assignment'], 'commit' => 'Y'));\n\n // Set up a refresh\n $form['js'] = \"xajax_window_submit('work_space', 'xajax_window_submit(\\'rack_maint\\', \\'id=>{$form['rack']}\\', \\'display\\')');\";\n\n // If the module returned an error code display a popup warning\n if ($status)\n $js .= \"alert('Delete failed. \" . preg_replace('/[\\s\\']+/', ' ', $self['error']) . \"');\";\n else if ($form['js'])\n $js .= $form['js']; // usually js will refresh the window we got called from\n\n // Return an XML response\n $response->addScript($js);\n return($response->getXML());\n}" ]
[ "0.795948", "0.58884895", "0.5749253", "0.5748073", "0.573655", "0.5675471", "0.5661825", "0.5626825", "0.55920637", "0.5565379", "0.5538664", "0.5531006", "0.5487608", "0.5451873", "0.5446417", "0.54163927", "0.5416242", "0.54077244", "0.54077244", "0.54077244", "0.54077244", "0.5376392", "0.53748155", "0.53446203", "0.5317039", "0.53021455", "0.52959454", "0.5286647", "0.5285564", "0.52709144", "0.5270499", "0.52531713", "0.52358645", "0.52314675", "0.522578", "0.5217353", "0.52004015", "0.5194562", "0.51913023", "0.5188895", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.51793975", "0.5178377", "0.51773995", "0.51695186", "0.51665723", "0.5165358", "0.5164921", "0.5155614", "0.51542556", "0.51477665", "0.5147176", "0.5141294", "0.513714", "0.51317877", "0.51245785", "0.51236796", "0.51178604", "0.51146936", "0.51107275", "0.5103812", "0.5087149", "0.5087149", "0.5087149", "0.5085813", "0.5084772", "0.50847256", "0.50846887", "0.5082066", "0.50746137", "0.5073584", "0.505922", "0.50543606", "0.50499135", "0.5026317", "0.50253636", "0.50209695", "0.50168407", "0.50153106", "0.50119543", "0.5011111", "0.50070536", "0.5006589", "0.5004609", "0.5002437", "0.500019", "0.4996069", "0.49937493" ]
0.7986915
0
Test case for webinarPanelists List Panelists.
public function testWebinarPanelists() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function set_panelist() {\n\t\tif (!isset($this->args[0]) || empty($this->args[0])) {\n\t\t\t$this->out('Provide MV user_id argument.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$url = $this->settings['hostname.mbd'].'/panelists/'.$this->args[0].'?X-ApiKey='.$this->settings['mbd.api_key'];\n\t\t$this->out('Reaching out to '.$url);\n\t\t$http = new HttpSocket(array(\n\t\t\t'timeout' => 60,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\t\t$request = array(\n\t\t\t'dwid' => '00000000-0000-0001-0379-ef1412100980',\n\t\t\t'panelistId' => $this->args[0],\n\t\t\t'partnerId' => $this->settings['mbd.partner_id'],\n\t\t\t'donotcontact' => true\n\t\t);\n\t\ttry {\n\t\t\t$results = $http->post($url, json_encode($request), $this->options);\n\t\t} \n\t\tcatch (Exception $e) {\n\t\t\t$this->out('Panelists Api endpoint failed.');\n\t\t}\n\t\t\n\t\tprint_r($results);\n\t}", "public function testListSiteContainers()\n {\n }", "function SetupListOptions() {\n\t\tglobal $Security, $tbl_slide;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$this->ListOptions->Add(\"copy\");\n\t\t$item =& $this->ListOptions->Items[\"copy\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$this->ListOptions->Add(\"delete\");\n\t\t$item =& $this->ListOptions->Items[\"delete\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($tbl_slide->Export <> \"\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridadd\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function testShowListSuccessfully(): void\n {\n $list = $this->createList(static::$listData);\n\n $this->get(\\sprintf('/mailchimp/lists/%s', $list->getId()));\n $content = \\json_decode($this->response->content(), true);\n\n $this->assertResponseOk();\n\n self::assertArrayHasKey('list_id', $content);\n self::assertEquals($list->getId(), $content['list_id']);\n\n foreach (static::$listData as $key => $value) {\n self::assertArrayHasKey($key, $content);\n self::assertEquals($value, $content[$key]);\n }\n }", "public function testListPastWebinarFiles()\n {\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->IsLoggedIn();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function testListSites()\n {\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanView();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"copy\"\r\n\t\t$item = &$this->ListOptions->Add(\"copy\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanAdd();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"delete\"\r\n\t\t$item = &$this->ListOptions->Add(\"delete\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanDelete();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function testWebinarPolls()\n {\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"detail_avaluo\"\n\t\t$item = &$this->ListOptions->Add(\"detail_avaluo\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'avaluo') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"avaluo_grid\"])) $GLOBALS[\"avaluo_grid\"] = new cavaluo_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"avaluo\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"userpermission\"\n\t\t$item = &$this->ListOptions->Add(\"userpermission\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsAdmin();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $t_tinbai_mainsite;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"checkbox\"\n\t\t$this->ListOptions->Add(\"checkbox\");\n\t\t$item =& $this->ListOptions->Items[\"checkbox\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = ($Security->CanDelete() || $Security->CanEdit());\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"phpmaker\\\" onclick=\\\"t_tinbai_mainsite_list.SelectAllKey(this);\\\">\";\n\t\t$this->ListOptions->MoveItem(\"checkbox\", 0); // Move to first column\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($t_tinbai_mainsite->Export <> \"\" ||\n\t\t\t$t_tinbai_mainsite->CurrentAction == \"gridadd\" ||\n\t\t\t$t_tinbai_mainsite->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function get_panelist() {\n\t\tif (!isset($this->args[0]) || empty($this->args[0])) {\n\t\t\t$this->out('Provide MV user_id argument.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$url = $this->settings['hostname.mbd'].'/panelists/'.$this->args[0].'?X-ApiKey='.$this->settings['mbd.api_key'];\n\t\t$this->out('Reaching out to '.$url);\n\t\t$http = new HttpSocket(array(\n\t\t\t'timeout' => 60,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\t\ttry {\n\t\t\t$results = $http->get($url, \n\t\t\t\tarray(\n\t\t\t\t\t'myDataOnly' => 'true'\n\t\t\t\t), \n\t\t\t\t$this->options\n\t\t\t);\n\t\t} catch (Exception $e) {\n\t\t\t$this->out('Get Api endpoint failed.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//$results = json_decode($results['body'], true);\n\t\tCakeLog::write('mbd.get', print_r($results, true));\n\t\tprint_r($results);\n\t}", "public function testAddColPosListLayoutItems()\n {\n }", "public function test_listIndexAction ( )\n {\n $params = array(\n 'event_id' => 1,\n 'action' => 'list',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n\n }", "public function provideListAndListItemTests() {\n $result = [\n [[\n 'descr' => \"[list] and [*] should produce an unordered list.\",\n 'bbcode' => \"[list][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list] and [*] should produce an unordered list even without [/list].\",\n 'bbcode' => \"[list][*]One Box[*]Two Boxes[*]Three Boxes\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=circle] should produce an unordered list.\",\n 'bbcode' => \"[list=circle][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\" style=\\\"list-style-type:circle\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=disc] should produce an unordered list.\",\n 'bbcode' => \"[list=disc][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\" style=\\\"list-style-type:disc\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=square] should produce an unordered list.\",\n 'bbcode' => \"[list=square][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\" style=\\\"list-style-type:square\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=1] should produce an ordered list.\",\n 'bbcode' => \"[list=1][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=A] should produce an ordered list.\",\n 'bbcode' => \"[list=A][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:upper-alpha\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=a] should produce an ordered list.\",\n 'bbcode' => \"[list=a][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:lower-alpha\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=I] should produce an ordered list.\",\n 'bbcode' => \"[list=I][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:upper-roman\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=i] should produce an ordered list.\",\n 'bbcode' => \"[list=i][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:lower-roman\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=greek] should produce an ordered list.\",\n 'bbcode' => \"[list=greek][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:lower-greek\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=georgian] should produce an ordered list.\",\n 'bbcode' => \"[list=georgian][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:georgian\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=armenian] should produce an ordered list.\",\n 'bbcode' => \"[list=armenian][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:armenian\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n ];\n return $result;\n }", "public function indexAction() {\n\n //ONLY LOGGED IN USER CAN VIEW THIS PAGE\n if (!$this->_helper->requireUser->isValid())\n return;\n\n $this->view->listingtype_id = $listingtype_id = $this->_listingType->listingtype_id;\n $this->view->listing_singular_uc = ucfirst($this->_listingType->title_singular);\n\n //VIDEO CREATION SHOULD BE ALLOWED\n if (!$this->_helper->requireAuth()->setAuthParams('video', null, \"create\")->isValid())\n return;\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n //GET LISTING\n $this->view->listing_id = $listing_id = $this->_getParam('listing_id');\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n\n //GET CONTENT ID\n $this->view->content_id = $content_id = $this->_getParam('tab');\n\n //WHO CAN EDIT THE LISTING\n $this->view->canEdit = $canEdit = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"edit_listtype_$listingtype_id\");\n\n //ACTIVE TAB\n $this->view->TabActive = \"video\";\n\n //VIDEO UPLOAD IS ALLOWED OR NOT\n $this->view->allowed_upload_video = Engine_Api::_()->sitereview()->allowVideo($sitereview, $viewer);\n if (empty($this->view->allowed_upload_video)) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"auth_photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $this->view->allowed_upload_photo = $allowed_upload_photo;\n }\n else\n $this->view->allowed_upload_photo = 0;\n }\n else\n $this->view->allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n\n $video = null;\n $values['user_id'] = $viewer_id;\n\n //COUNT TOTAL VIDEO\n $this->view->videoCount = Engine_Api::_()->sitereview()->getTotalVideo($viewer_id);\n\n $this->view->video = $video = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview')->getListingVideos($listing_id, 0);\n\n $this->view->message = $message = null;\n $session = new Zend_Session_Namespace();\n if (isset($session->video_message)) {\n $message = $session->video_message;\n unset($session->video_message);\n }\n\n //UPLOAD VIDEO\n if (isset($_GET['ul']) || isset($_FILES['Filedata'])) {\n return $this->_forwardCustom('upload-video', null, null, array('format' => 'json'));\n }\n\n //GET VIDEO PAGINATOR\n $values['user_id'] = $viewer_id;\n $paginator = Engine_Api::_()->getApi('core', 'video')->getVideosPaginator($values);\n $this->view->current_count = $paginator->getTotalItemCount();\n\n //GET TOTAL ALLOWED VIDEO\n $this->view->quota = Engine_Api::_()->authorization()->getPermission($viewer->level_id, 'video', 'max');\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Video_Video();\n\n if ($this->_getParam('type', false)) {\n $form->getElement('type')->setValue($this->_getParam('type'));\n }\n\n $this->view->display = 0;\n\n //CHECK POST\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n $this->view->display = 1;\n\n if (!$form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues('url');\n return;\n }\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n\n //PROCESS\n $values = $form->getValues();\n $values['owner_id'] = $viewer->getIdentity();\n $insert_action = false;\n $db = Engine_Api::_()->getDbtable('videos', 'video')->getAdapter();\n $db->beginTransaction();\n try {\n\n //CREATE VIDEO\n $table = Engine_Api::_()->getDbtable('videos', 'video');\n if ($values['type'] == 3) {\n $video = Engine_Api::_()->getItem('video', $this->_getParam('id'));\n } else {\n $video = $table->createRow();\n }\n\n $video->setFromArray($values);\n $video->save();\n\n $params = $sitereview->main_video;\n\n //CREATE THUMBNAIL\n $thumbnail = $this->handleThumbnail($video->type, $video->code);\n $ext = ltrim(strrchr($thumbnail, '.'), '.');\n $thumbnail_parsed = @parse_url($thumbnail);\n\n if (@GetImageSize($thumbnail)) {\n $valid_thumb = true;\n } else {\n $valid_thumb = false;\n }\n\n if ($valid_thumb && $thumbnail && $ext && $thumbnail_parsed && in_array($ext, array('jpg', 'jpeg', 'gif', 'png'))) {\n\n $tmp_file = APPLICATION_PATH . '/temporary/link_' . md5($thumbnail) . '.' . $ext;\n $thumb_file = APPLICATION_PATH . '/temporary/link_thumb_' . md5($thumbnail) . '.' . $ext;\n $src_fh = fopen($thumbnail, 'r');\n $tmp_fh = fopen($tmp_file, 'w');\n stream_copy_to_stream($src_fh, $tmp_fh, 1024 * 1024 * 2);\n $image = Engine_Image::factory();\n $image->open($tmp_file)\n ->resize(120, 240)\n ->write($thumb_file)\n ->destroy();\n try {\n $thumbFileRow = Engine_Api::_()->storage()->create($thumb_file, array(\n 'parent_type' => $video->getType(),\n 'parent_id' => $video->getIdentity()\n ));\n\n //REMOVE TEMP FILES\n @unlink($thumb_file);\n @unlink($tmp_file);\n } catch (Exception $e) {\n \n }\n $information = $this->handleInformation($video->type, $video->code);\n\n $video->duration = $information['duration'];\n if (!$video->description)\n $video->description = $information['description'];\n $video->photo_id = $thumbFileRow->file_id;\n $video->status = 1;\n $video->save();\n\n //INSERT NEW ACTION ITEM\n $insert_action = true;\n }\n\n if ($values['ignore'] == true) {\n\n $video->status = 1;\n $video->save();\n\n //INSERT NEW ACTION ITEM\n $insert_action = true;\n $owner = $video->getOwner();\n\n //INSERT NEW ACTION ITEM\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($owner, $video, 'video_new');\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $video);\n }\n }\n\n //CREATE AUTH STUFF HERE\n $auth = Engine_Api::_()->authorization()->context;\n $roles = array('owner', 'owner_member', 'owner_member_member', 'owner_network', 'everyone');\n if (isset($values['auth_view']))\n $auth_view = $values['auth_view'];\n else\n $auth_view = \"everyone\";\n $viewMax = array_search($auth_view, $roles);\n\n foreach ($roles as $i => $role) {\n $auth->setAllowed($video, $role, 'view', ($i <= $viewMax));\n }\n\n if (isset($values['auth_comment']))\n $auth_comment = $values['auth_comment'];\n else\n $auth_comment = \"everyone\";\n $commentMax = array_search($auth_comment, $roles);\n foreach ($roles as $i => $role) {\n $auth->setAllowed($video, $role, 'comment', ($i <= $commentMax));\n }\n\n //ADD TAGS\n $tags = preg_split('/[,]+/', $values['tags']);\n $video->tags()->addTagMaps($viewer, $tags);\n $db->commit();\n $db->beginTransaction();\n try {\n if ($insert_action) {\n $owner = $video->getOwner();\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($owner, $video, 'video_new');\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $video);\n }\n }\n\n //REBUILD PRIVACY\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n foreach ($actionTable->getActionsByObject($video) as $action) {\n $actionTable->resetActivityBindings($action);\n }\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n $video_id = $video->getIdentity();\n $table = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview');\n $select = $table->select();\n $rName = $table->info('name');\n $select->where($rName . '.listing_id = ?', $listing_id);\n $row = $table->fetchAll($select);\n if ($video_id != NULL) {\n try {\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n $row = $table->createRow();\n $row->listing_id = $listing_id;\n $row->created = date('Y-m-d H:i:s');\n $row->video_id = $video_id;\n $row->save();\n\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $subject = $sitereview;\n $subjectOwner = $subject->getOwner('user');\n\n if (time() >= strtotime($sitereview->creation_date)) {\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($viewer, $subject, 'video_sitereview_listtype_' . $listingtype_id, '', array(\n 'owner' => $subjectOwner->getGuid(),\n 'title' => $subject->getTitle()\n ));\n\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $video);\n }\n }\n $db->commit();\n unset($_POST);\n if ($canEdit) {\n return $this->_gotoRouteCustom(array('action' => 'edit', 'listing_id' => $listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\n } else {\n $content_id = $this->_getParam('content_id');\n return $this->_gotoRouteCustom(array('listing_id' => $listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $content_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n }", "public function testListPagination()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visit('admin/users')\n ->assertSee('Users Gestion')\n ->clickLink('3')\n ->assertSee('GreatRedactor');\n });\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"detail_v_bid_histories_admin\"\n\t\t$item = &$this->ListOptions->Add(\"detail_v_bid_histories_admin\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'v_bid_histories_admin') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"v_bid_histories_admin_grid\"])) $GLOBALS[\"v_bid_histories_admin_grid\"] = new cv_bid_histories_admin_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"v_bid_histories_admin\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// \"sequence\"\n\t\t$item = &$this->ListOptions->Add(\"sequence\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = TRUE;\n\t\t$item->OnLeft = TRUE; // Always on left\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n return $this->setNoRender();\n }\n\n //GET SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject('sitereview_listing');\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($sitereview->listingtype_id);\n $sitereviewPhotoCarousel = Zend_Registry::isRegistered('sitereviewPhotoCarousel') ? Zend_Registry::get('sitereviewPhotoCarousel') : null;\n $this->view->listingType = $listingType = Zend_Registry::get('listingtypeArray' . $sitereview->listingtype_id);\n $this->view->listingtype_id = $sitereview->listingtype_id;\n $this->view->album = $album = $sitereview->getSingletonAlbum();\n $this->view->photo_paginator = $photo_paginator = $album->getCollectiblesPaginator();\n $this->view->total_images = $photo_paginator->getTotalItemCount();\n $minMum = $this->_getParam('minMum', 0);\n \n if (empty($this->view->total_images) || $this->view->total_images < $minMum || empty($sitereviewPhotoCarousel)) {\n return $this->setNoRender();\n }\n \n $this->view->itemCount = $itemCount = $this->_getParam('itemCount', 3);\n $this->view->includeInWidget = $this->_getParam('includeInWidget', null);\n $photo_paginator->setItemCountPerPage(100);\n \n if ($this->view->includeInWidget) {\n $this->getElement()->removeDecorator('Title');\n $this->getElement()->removeDecorator('Container');\n }\n }", "public function testFetchLists() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Create a couple of lists\n\t\t$listCount = 3;\n\t\tfor ($i = 0; $i < $listCount; $i++) {\n\t\t\t$listData = parent::_createTestListData(false, false);\n\t\t\t$jsonpad->createList($listData[\"name\"]);\n\t\t}\n\t\t\n\t\t// Fetch the lists\n\t\t$total = 0;\n\t\t$lists = $jsonpad->fetchLists(1, null, null, null, $total);\n\t\t$this->assertInternalType(\"array\", $lists);\n\t\t$this->assertGreaterThanOrEqual(1, $total);\n\t\t$this->assertInstanceOf(\"\\Jsonpad\\Resource\\ItemList\", $lists[0]);\n\t\t\n\t\t// Delete the lists\n\t\tforeach ($lists as $list) {\n\t\t\t$list->delete();\n\t\t}\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $scholarship_package;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"detail_scholarship_payment\"\n\t\t$this->ListOptions->Add(\"detail_scholarship_payment\");\n\t\t$item =& $this->ListOptions->Items[\"detail_scholarship_payment\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->AllowList('scholarship_payment');\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($scholarship_package->Export <> \"\" ||\n\t\t\t$scholarship_package->CurrentAction == \"gridadd\" ||\n\t\t\t$scholarship_package->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function testIsOnTasksListPage()\n {\n $this->addTestFixtures();\n $this->logInAsUser();\n $this->client->request('GET', '/tasks');\n\n $response = $this->client->getResponse();\n $responseContent = $response->getContent();\n\n $statusCode = $response->getStatusCode();\n $this->assertEquals(200, $statusCode);\n $this->assertContains($this->task->getTitle(), $responseContent);\n $this->assertContains($this->task->getContent(), $responseContent);\n }", "public function testLayoutListCategories()\n {\n $user = $this->makeAdminToLogin();\n $this->browse(function (Browser $browser) use ($user) {\n $browser->loginAs($user)\n ->visit('/admin/categories')\n ->assertSee('List Categories')\n ->assertSeeLink('Admin')\n ->assertSee('ID')\n ->assertSee('Name')\n ->assertSee('Number of Books');\n });\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function testAdminCanViewThePageIndex()\n {\n $this->initPosts();\n\n $response = $this\n ->actingAs($this->admin)\n ->get('/admin/blog/pages');\n \n $response->assertStatus(200);\n $response->assertSee('Title one');\n $response->assertSee('Title two');\n }", "public function testList()\n {\n $this->visit('/admin/school')\n ->see(SchoolCrudController::SINGLE_NAME);\n }", "public function testListExperts()\n {\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function test_list()\n {\n $response = $this->get('/proposal/all');\n\n $response->assertSee('data-js-proposal-cards');\n\n $response->assertSee('card-header');\n\n $response->assertStatus(200);\n }", "public function videoListDisplayed(AcceptanceTester $I)\n {\n $I->wantTo('Verify Video List is displayed on the Edit Episode page. - C15640');\n if(EpisodeEditCest::$environment == 'staging')\n {\n $guid = TestContentGuids::$episodeViewData_staging;\n }\n else //proto0\n {\n $guid = TestContentGuids::$episodeViewData_proto0;\n }\n $I->amOnPage(ContentPage::$contentUrl . $guid);\n\n $I->expect('Video List is displayed.');\n $I->waitForElementVisible(ContentPage::$clickableTable, 30);\n $I->see('VIDEOS');\n $I->see('series_view_filled_data_automation_1_episode_1_media_id', ContentPage::$videoTable);\n }", "public function test_admin_usecase_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'usecase_list']);\n $this->assertResponseCode(404);\n }", "private function fillWidgetList()\n {\n $this->list = array(\n 'humor' => array(\n 'class' => 'w-scuba-humor',\n 'name' => 'Scuba Humor',\n 'content' => '1'\n ),\n 'community' => array(\n 'class' => 'w-community',\n 'name' => 'Community',\n 'content' => '1'\n ),\n 'dive-news' => array(\n 'class' => 'w-dive-news',\n 'name' => 'Dive News',\n 'content' => array('frontend/news', Config::NUMPAGE_WIDGET_NEWS),\n 'file' => 'dive_news'\n ),\n 'travel-forums' => array(\n 'class' => 'w-travel-forums',\n 'name' => 'Travel Forums',\n 'content' => '1',\n 'file' => 'travel_forums'\n ),\n 'travel-blogs' => array(\n 'class' => 'w-travel-blogs',\n 'name' => 'Travel Blogs',\n 'content' => '1',\n 'file' => 'travel_blogs'\n ),\n 'advertisement' => array(\n 'class' => 'w-advertisement',\n 'name' => 'Advertisement',\n 'content' => '1'\n ),\n 'video' => array(\n 'class' => 'w-video',\n 'name' => 'Video',\n 'content' => '1'\n ),\n 'newsletter' => array(\n 'class' => 'w-sdtn-e-newsletter',\n 'name' => 'SDTN E-Newsletter',\n 'content' => '1'\n ),\n 'facebook' => array(\n 'class' => 'w-find-us-on-facebook',\n 'name' => '',\n 'content' => true\n ),\n 'blog' => array(\n 'class' => 'w-sdtn-blog',\n 'name' => 'SDTN Blog',\n 'content' => array('frontend/blog', Config::NUMPAGE_WIDGET_BLOG)\n ),\n 'google' => array(\n 'class' => 'w-google-ads',\n 'name' => 'Google Ads',\n 'content' => true\n )\n );\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<div class=\\\"checkbox\\\"><label><input class=\\\"magic-checkbox\\\" type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\"><span></span></label></div>\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }", "public function testListServers()\n {\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<div class=\\\"checkbox\\\"><label><input class=\\\"magic-checkbox\\\" type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\"><span></span></label></div>\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function testFetchList() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Create a list\n\t\t$listData = parent::_createTestListData(false, false);\n\t\t$list = $jsonpad->createList($listData[\"name\"]);\n\t\t\n\t\t// Fetch the list\n\t\t$listCopy = $jsonpad->fetchList($listData[\"name\"]);\n\t\t$this->assertSame($list->getName(), $listCopy->getName());\n\t\t\n\t\t// Delete the list\n\t\t$listCopy->delete();\n\t}", "public function testCollectionsApi()\n {\n $response = $this->withHeaders([\n 'X-Secure-Code' => '12345678',\n ])->getJson('api/collections/0');\n\n $response->assertStatus(200)\n ->assertJsonPath('title','親子步道')\n ->assertJsonStructure([\n 'id',\n 'title',\n 'subTitle',\n 'bgColor',\n 'iconImage',\n 'trails',\n ]);\n }", "public function test_list_page_shows_all_tasks()\n {\n\n // creiamo dei task e ci assicuriamo che nella vista ci siano un certo particolare set di dati\n // i assicuro che alla vista venga passata la ariabile dal controller ma non che sia stampata nella vista\n\n $task1 = factory(Task::class)->create();\n $task2 = factory(Task::class)->create();\n\n $this->get('tasks')\n ->assertViewHas('tasks')\n ->assertViewHas('tasks', Task::with('actions')->get())\n ->assertViewHasAll([\n 'tasks' => Task::with('actions')->get(),\n 'title' => 'Tasks page'\n ])->assertViewMissing('dogs');\n }", "public function testJobList()\n {\n\n }", "public function _testMultipleInventories()\n {\n\n }", "function components_list(){\n\n\t\t?><li data-type=\"test\" title=\"Sample Title\"></li><?php\n\t}", "public function testListSiteMemberships()\n {\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function test_admin_squad_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "function testMenuLink()\n\t{\n\t\t$this->open(JOOMLA_LOCATION.'index.php');\n\t\t$this->waitPageLoad();\n\t\t$this->click(\"//div[@id='leftcolumn']/div[2]/div/div/div/ul/li[10]/a/span\");\n\t\t$this->waitPageLoad();\n\t\t\n\t\t/*\n\t\t$option = JRequest::getCmd('option');\n\t\t$view\t= JRequest::getCmd('view');\n\t\t$this->assertTrue($option == 'com_xius');\n\t\t$this->assertTrue($view == 'users');\n\t\t*/\n\t\t\n\t\t$this->select(\"field2\", \"label=Female\");\n\t\t$this->click(\"xiussearch\");\n\t\t$this->waitPageLoad();\n\t\t$this->assertTrue($this->isElementPresent(\"//span[@id='total_29']\"));\n\t\t$this->assertTrue($this->isTextPresent(\"Refined By\"));\t\n\n\t\t// test for display all list\n\t\t$this->open(JOOMLA_LOCATION.'index.php');\n\t\t$this->waitPageLoad();\n\t\t$this->click(\"//div[@id='leftcolumn']/div[2]/div/div/div/ul/li[11]/a/span\");\n\t\t$this->waitPageLoad();\n\t\t$this->assertTrue($this->isTextPresent(\"All male from 09/05/2009 to 19/05/2009\"));\n\t\t$this->assertTrue($this->isTextPresent(\"All female\"));\n\t\t\n\t\t// test for display Particular list\n\t\t$this->open(JOOMLA_LOCATION.'index.php');\n\t\t$this->waitPageLoad();\n\t\t$this->click(\"//div[@id='leftcolumn']/div[2]/div/div/div/ul/li[12]/a/span\");\n\t\t$this->waitPageLoad();\n\t\t$this->assertTrue($this->isTextPresent(\"All male from 09/05/2009 to 19/05/2009\"));\n\t\t$this->assertTrue($this->isElementPresent(\"//img[@class='xius_test_remove_Male']\"));\n\t\t$this->assertTrue($this->isElementPresent(\"//img[@class='xius_test_remove_From 09-05-2009 To 19-05-2009']\"));\n\t\t$this->assertTrue($this->isElementPresent(\"//span[@id='total_0']\"));\n\t\t\n\t\t// test clear all\n\t\t$this->click(\"//img[@title='Clear All']\");\n\t\t$this->waitPageLoad();\n\t\t$this->assertFalse($this->isElementPresent(\"//img[@class='xius_test_remove_Male']\"));\n\t\t$this->assertFalse($this->isElementPresent(\"//img[@class='xius_test_remove_From 09-05-2009 To 19-05-2009']\"));\n\t\t$this->assertTrue($this->isElementPresent(\"//span[@id='total_59']\"));\n\t}", "public function testContentTypesLists()\n {\n $this->contentTypeItemTest('products');\n $this->contentTypeItemTest('blogs');\n $this->contentTypeItemTest('app_flows');\n $this->contentTypeItemTest('lists');\n $this->contentTypeItemTest('user_reviews');\n $this->contentTypeItemTest('boards');\n }", "public function testListPeople()\n {\n }", "public function testListIdentities()\n {\n }", "public function testListIdentities()\n {\n }", "public function testSortListCategoriesWhenPanigate()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('admin/categories')\n ->resize(1200, 1600)\n ->click(\"#category-sort-name a\")\n ->clickLink(\"2\");\n // Test list Asc\n $arrayAsc = Category::orderBy('name', 'asc')->pluck('name')->toArray();\n $arraySortAsc = array_chunk($arrayAsc, 15)[1];\n for ($i = 1; $i <= 2; $i++) {\n $selector = \".table tbody tr:nth-child($i) td:first-child\";\n $this->assertEquals($browser->text($selector), $arraySortAsc[$i - 1]);\n }\n // Test list Desc\n $browser->click(\"#category-sort-name a\")\n ->clickLink(\"2\");\n $arrayDesc = Category::orderBy('name', 'desc')->pluck('name')->toArray();\n $arraySortDesc = array_chunk($arrayDesc, 15)[1];\n for ($i = 1; $i <= 2; $i++) {\n $selector = \".table tbody tr:nth-child($i) td:first-child\";\n $this->assertEquals($browser->text($selector), $arraySortDesc[$i - 1]);\n }\n });\n }", "public function test_admin_training_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/MemberSkills', 'training_programs']);\n $this->assertResponseCode(404);\n }", "public function test_notes_list()\n {\n Note::create(['note'] => 'Mi primera nota');\n Note::create(['note'] => 'Segunda nota');\n $this->visit('notes')\n ->see('Mi primera nota')\n ->see('Segunda nota');\n }", "public function testPastWebinars()\n {\n }", "public function testListEmpty()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/comment')\n ->assertSee('List comment & rating');\n $elements = $browser->elements('#list-table tbody tr');\n $this->assertCount(0, $elements);\n $this->assertNull($browser->element('.paginate'));\n });\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 testmenuAction()\n {\n parent::login();\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->isElementPresent(\"id=sortable1\");\n $this->isElementPresent(\"id=sortable2\");\n parent::logout();\n }", "abstract protected function displayList($list);", "public function testWebinars()\n {\n }", "function obj_cx_events_list_section( $events, $bottom_banner, $pagination, $event_list_deets = null, $section_classes = null, $bg_shapes = null ) {\n\n\t$sec_meta = decide_section_meta( 'event-list-section', $section_classes, $event_list_deets, $bg_shapes );\n\n\tif ( ! empty( $event_list_deets ) ) {\n\t\tdo_section_top( $sec_meta );\n\t\tobj_cx_events_list_inner( $events, $bottom_banner, $pagination, $event_list_deets );\n\t\tdo_section_bottom( $sec_meta );\n\t}\n}", "public function testGetCollections()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language, $rekeningju;\r\n\r\n\t\t// \"griddelete\"\r\n\t\tif ($rekeningju->AllowAddDeleteRow) {\r\n\t\t\t$item =& $this->ListOptions->Add(\"griddelete\");\r\n\t\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t\t$item->OnLeft = TRUE;\r\n\t\t\t$item->Visible = FALSE; // Default hidden\r\n\t\t}\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function testIndexAdminMaps()\n {\n parent::setUpPage();\n parent::setSession('administrator');\n\n $link = $this->webDriver->findElement(WebDriverBy::linkText('All Maps'));\n $link->click();\n $map_list = $this->webDriver->findElements(WebDriverBy::cssSelector('#usermaps > table > tbody > tr'));\n $this->assertEquals(count($map_list), 2);\n }", "public function testAjaxGetVenueListCanBeAccessed()\n {\n $this->dispatch('/venue/ajax-get-venue-list');\n $this->assertResponseStatusCode(200);\n }", "function team_list()\n {\n }", "public function panelist_dwid_freshness() {\n\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\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\t$results = $http->get($this->settings['hostname.mbd'].'/ignite/getinvites?X-ApiKey='.$this->settings['mbd.api_key'], $this->options);\t\t\n\t\t$results = json_decode($results, true);\n\n\t\t$fp = fopen(WWW_ROOT.'/files/mbd-panelist-analysis.csv', 'w');\n \t \tfputcsv($fp, array(\n\t\t\t'Sample ID', \n\t\t\t'Sample Date',\n\t\t\t'Expire Date',\n\t\t\t'Panelist ID',\n\t\t\t'Active',\n\t\t\t'Panelist Last Active'\n\t\t));\n\t\t$total = count($results); \n\t\t$this->out('Total of '.$total.' results');\n\t\t$i = 0; \n\t\tif (!empty($results)) {\n\t\t\tforeach ($results as $result) {\n\t\t\t\t$active = $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$user = $this->User->find('first', array(\n\t\t\t\t\t'fields' => array('User.last_touched'),\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'User.id' => $result['panelistId']\n\t\t\t\t\t),\n\t\t\t\t\t'recursive' => -1\n\t\t\t\t));\n\t\t \t \tfputcsv($fp, array(\n\t\t\t\t\t$result['sampleId'],\n\t\t\t\t\t$result['sampleDate'],\n\t\t\t\t\t$result['expireDate'],\n\t\t\t\t\t$result['panelistId'],\n\t\t\t\t\t$active['body'],\n\t\t\t\t\t$user['User']['last_touched']\n\t\t\t\t));\n\t\t\t\t$i++;\n\t\t\t\t$this->out($i.'/'.$total);\n\t\t\t}\n\t\t}\n\t\tfclose($fp);\n\t}", "public function testGetFormList(): void\n {\n $forms = factory(Form::class, 5)->create()->map(function ($form) {\n return $form;\n });\n\n $this->get(route('form.index'))\n ->assertStatus(200)\n ->assertJson([\n 'success' => true,\n 'data' => $forms->toArray(),\n 'message' => __('messages.list_record', ['model' => Form::$name]),\n ]);\n }", "public function indexAction() {\n $panelsModel = new Datasource_Cms_Panels();\n $panels = $panelsModel->getAll();\n\n $this->view->panelsList = $this->view->partialLoop('/partials/panels-row.phtml', $panels);\n }", "function _cmd_list(SGL_Registry $input, SGL_Output $output)\n {\n SGL::logMessage(null, PEAR_LOG_DEBUG);\n $output->template = 'pageList.html';\n $output->mode = 'Browse';\n\n // get all sections\n $aSections = $this->da->getSectionTree();\n $output->results = $aSections;\n\n $output->pageArrayJS = $this->_createNodesArrayJS($aSections);\n $output->addOnLoadEvent(\"switchRowColorOnHover()\");\n }", "public function test_admin_group_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'group_list']);\n $this->assertResponseCode(404);\n }", "public function index()\r\n {\r\n $this->page_list_grid();\r\n }", "public function editAction() {\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n //GET SITEREVIEW SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject();\n\n $this->view->listingtype_id = $listingtype_id = $this->_listingType->listingtype_id;\n\n $this->view->slideShowEnanle = $this->slideShowEnable($listingtype_id);\n\n $this->view->listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $this->view->listing_singular_lc = strtolower($this->_listingType->title_singular);\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n $this->view->content_id = Engine_Api::_()->sitereview()->getTabId($listingtype_id, 'sitereview.video-sitereview');\n\n //SELECTED TAB\n $this->view->TabActive = \"video\";\n\n if (!Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n $this->_helper->content\n ->setContentName(\"sitereview_videoedit_edit_listtype_$listingtype_id\")\n //->setNoRender()\n ->setEnabled();\n }\n\n //GET VIDEOS\n $this->view->type_video = $type_video = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereview.show.video');\n\n if ($type_video && isset($sitereview->main_video['corevideo_id'])) {\n $this->view->main_video_id = $sitereview->main_video['corevideo_id'];\n } elseif (isset($sitereview->main_video['reviewvideo_id'])) {\n $this->view->main_video_id = $sitereview->main_video['reviewvideo_id'];\n }\n\n $this->view->videos = $videos = array();\n $this->view->integratedWithVideo = false;\n $sitevideoEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitevideo');\n if ($sitevideoEnabled && (Engine_Api::_()->getDbtable('modules', 'sitevideo')->getIntegratedModules(array('enabled' => 1, 'item_type' => \"sitereview_listing_$sitereview->listingtype_id\", 'item_module' => 'sitereview')))) {\n $params = array();\n $params['parent_type'] = $sitereview->getType() . '_' . $sitereview->listingtype_id;\n $params['parent_id'] = $sitereview->listing_id;\n $this->view->videos = $videos = Engine_Api::_()->getDbTable('videos', 'sitevideo')->getVideoPaginator($params);\n $this->view->integratedWithVideo = true;\n } else {\n if (Engine_Api::_()->sitereview()->enableVideoPlugin() && !empty($type_video)) {\n $this->view->videos = $videos = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview')->getListingVideos($sitereview->listing_id, 0, 1);\n } elseif (empty($type_video)) {\n $this->view->videos = $videos = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview')->getListingVideos($sitereview->listing_id, 0, 0);\n }\n }\n\n $allowed_upload_video = Engine_Api::_()->sitereview()->allowVideo($sitereview, $viewer, count($videos), $uploadVideo = 1);\n $this->view->upload_video = 1;\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $this->view->upload_video = $allowed_upload_video;\n } else {\n if (empty($allowed_upload_video)) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n }\n\n $this->view->count = count($videos);\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Video_Editvideo();\n\n foreach ($videos as $video) {\n\n $subform = new Sitereview_Form_Video_Edit(array('elementsBelongTo' => $video->getGuid()));\n\n if ($video->status != 1) {\n if ($video->status == 0 || $video->status == 2):\n $msg = $this->view->translate(\"Your video is currently being processed - you will be notified when it is ready to be viewed.\");\n elseif ($video->status == 3):\n $msg = $this->view->translate(\"Video conversion failed. Please try again.\");\n elseif ($video->status == 4):\n $msg = $this->view->translate(\"Video conversion failed. Video format is not supported by FFMPEG. Please try again.\");\n elseif ($video->status == 5):\n $msg = $this->view->translate(\"Video conversion failed. Audio files are not supported. Please try again.\");\n elseif ($video->status == 7):\n $msg = $this->view->translate(\"Video conversion failed. You may be over the site upload limit. Try a smaller file, or delete some files to free up space.\");\n endif;\n\n $subform->addElement('dummy', 'mssg' . $video->video_id, array(\n 'description' => $msg,\n 'decorators' => array(\n 'ViewHelper',\n array('HtmlTag', array('tag' => 'div', 'class' => 'tip')),\n array('Description', array('tag' => 'span', 'placement' => 'APPEND')),\n array('Description', array('placement' => 'APPEND')),\n ),\n ));\n $t = 'mssg' . $video->video_id;\n $subform->$t->getDecorator(\"Description\")->setOption(\"placement\", \"append\");\n }\n $subform->populate($video->toArray());\n $form->addSubForm($subform, $video->getGuid());\n }\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //GET FORM VALUES\n $values = $form->getValues();\n\n if (isset($_POST['corevideo_cover']) && !empty($_POST['corevideo_cover'])) {\n if (isset($sitereview->main_video) && !empty($sitereview->main_video)) {\n $sitereview->main_video = array_merge((array) $sitereview->main_video, array('corevideo_id' => $_POST['corevideo_cover']));\n } else {\n $sitereview->main_video = array('corevideo_id' => $_POST['corevideo_cover']);\n }\n } elseif (isset($_POST['reviewvideo_cover']) && $_POST['reviewvideo_cover']) {\n if (isset($sitereview->main_video) && !empty($sitereview->main_video)) {\n $sitereview->main_video = array_merge((array) $sitereview->main_video, array('reviewvideo_id' => $_POST['reviewvideo_cover']));\n } else {\n $sitereview->main_video = array('reviewvideo_id' => $_POST['reviewvideo_cover']);\n }\n }\n\n $sitereview->save();\n\n //VIDEO SUBFORM PROCESS IN EDITING\n foreach ($videos as $video) {\n $subform = $form->getSubForm($video->getGuid());\n\n $values = $subform->getValues();\n $values = $values[$video->getGuid()];\n if (isset($values['delete']) && $values['delete'] == '1') {\n Engine_Api::_()->getDbtable('videos', 'sitereview')->delete(array('video_id = ?' => $video->video_id, 'listing_id = ?' => $sitereview->listing_id));\n Engine_Api::_()->getDbtable('actions', 'activity')->delete(array('type = ?' => 'video_sitereview_listtype_' . $listingtype_id, 'object_id = ?' => $sitereview->listing_id));\n } else {\n $video->setFromArray($values);\n $video->save();\n }\n }\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'edit', 'listing_id' => $sitereview->listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\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 }", "public function testGetAll()\n {\n $ret =\\App\\Providers\\ListsServiceProvider::getLists();\n \n $this->assertNotEmpty($ret);\n }", "public function renderListContent() {}", "function _elggx_lists_test($hook, $type, $value, $params) {\n\t$value[] = __DIR__ . '/tests/ElggxListsTest.php';\n\treturn $value;\n}", "public function testTaskVisibleOnPage(): void\n {\n $this->client->request('GET', '/');\n self::assertResponseIsSuccessful();\n self::assertSelectorTextContains('.widget-heading', 'Test Task');\n self::assertSelectorTextContains('.widget-subheading', 'Mike');\n }", "function GetWebPanelList()\n\t{\n\t\t$result = $this->sendRequest(\"GetWebPanelList\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function testIndex()\n\t{\n\t\t$data = [];\n\n\t\tforeach ($this->saddles as $saddle) {\n\t\t\t$data[] = [\n\t\t\t\t'id' => $saddle->id,\n\t\t\t\t'name' => $saddle->name,\n\t\t\t\t'horse' => [\n\t\t\t\t\t'id' => $saddle->horse->id,\n\t\t\t\t\t'stable_name' => $saddle->horse->stable_name,\n\t\t\t\t],\n\t\t\t\t'brand' => [\n\t\t\t\t\t'id' => $saddle->brand->id,\n\t\t\t\t\t'name' => $saddle->brand->name,\n\t\t\t\t],\n\t\t\t\t'style' => [\n\t\t\t\t\t'id' => $saddle->style->id,\n\t\t\t\t\t'name' => $saddle->style->name,\n\t\t\t\t],\n\t\t\t\t'type' => $saddle->type,\n\t\t\t\t'serial_number' => $saddle->serial_number,\n\t\t\t\t'created_at' => $saddle->created_at->format('d/m/Y'),\n\t\t\t];\n\t\t}\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->get('/api/v1/admin/saddles?per_page=9999')\n\t\t\t ->assertStatus(200)\n\t\t\t ->assertJson(['data' => $data]);\n\t}", "public function test_listSettings() {\n\n }", "public function testDisplayedTest() {\n\n $this->open('?r=site/page&view=test');\n $this->assertEquals('My Web Application - Test', $this->title());\n\n $elements = $this->elements($this->using('css selector')->value('#yw0 > li'));\n error_log(__METHOD__ . ' . count($var): ' . count($elements));\n foreach ($elements as $element) {\n $text = $element->byCssSelector('#yw0 > li > a')->text();\n error_log(__METHOD__ . ' . $text: ' . $text);\n\n if ($text === 'Test') {\n $element->click();\n $breadcrumbsTest = $this->byCssSelector('#page > div.breadcrumbs > span');\n $bool = $breadcrumbsTest->displayed();\n $this->assertEquals(True, $bool);\n $this->assertEquals('Test', $this->byCssSelector('#page > div.breadcrumbs > span')->text());\n break;\n }\n }\n sleep(1);\n }", "public function testJobListFromJobSchedule()\n {\n\n }", "public function test_list_players()\n {\n $players = $this->postScriptumServer->listPlayers();\n\n $this->assertCount(77, $players);\n }", "public function testRecordingListPage(): void\n {\n $recordingListPage = self::$recordingListPage;\n\n $this->assertInstanceOf(RecordingListPage::class, $recordingListPage);\n $this->assertSame(25, count($recordingListPage));\n\n $recording = $recordingListPage[0];\n\n $this->assertInstanceOf(Recording::class, $recording);\n }", "public function iCanSeeEventsForTheGroup()\n {\n $main = $this->getMainContext();\n /** @var \\Behat\\MinkExtension\\Context\\MinkContext $mink */\n $mink = $main->getSubcontext('mink');\n\n // Verify the existance of some things on the page that\n $mink->assertElementOnPage('#upcomingTab');\n $mink->assertElementOnPage('#pastTab');\n }", "function _videoLists($list_type='1', $vid_list, $start=0, $limit=0) {\r\n\t\tif ($limit==0)\r\n\t\t\t$limit = ($list_type=='1' ? $this->options['manage_list_max'] : $this->options['post_list_max']);\r\n\t\tif (!is_array($vid_list))\r\n\t\t\t$vid_list = unserialize(file_get_contents($this->data_txt));\r\n\t\tif (count($vid_list) < 1) return false;\r\n\t\t$vid_list = array_reverse((array) $vid_list);\r\n\t\t$link_format = '<a href=\"'.$this->videopop_url.'?vid=%1$d\" title=\"%2$s\" onclick=\"javascript:VideoPop(%3$d,\\'%1$d\\');return false;\">%4$s</a>';\r\n\t\t$count = 0;\r\n\t\t$next = false;\r\n\r\n\t\t$retval = \"<!--- list start --->\\n\";\r\n\t\t$retval .= \"<div id=\\\"videopop_list\\\">\\n\";\r\n\t\tif ($list_type=='1') {\r\n\t\t\t$retval .= \"<form method=\\\"post\\\" action=\\\"\".$this->admin_manage.\"\\\">\\n\";\r\n\t\t\t$retval .= \"<table id=\\\"VideoLists\\\" class=\\\"stats\\\">\";\r\n\t\t\t$retval .= \"<thead><tr>\\n\";\r\n\t\t\t$retval .= \"<th style=\\\"text-align:center;\\\">\".__('Name', $this->textdomain_name).\"</th>\\n\";\r\n\t\t\t$retval .= \"<th>\".__('Video type', $this->textdomain_name).\"</th>\\n\";\r\n\t\t\t$retval .= \"<th></th>\\n\";\r\n\t\t\t$retval .= \"</tr></thead>\\n\";\r\n\t\t} else {\r\n\t\t\t$retval .= \"<table id=\\\"VideoLists\\\" style=\\\"border-collapse:collapse;margin:10px 0;\\\">\";\r\n\t\t\t$retval .= \"<thead><tr>\\n\";\r\n\t\t\t$retval .= \"<th>&nbsp;</th>\\n\";\r\n\t\t\t$retval .= \"<th>\".__('In line', $this->textdomain_name).\"</th>\\n\";\r\n\t\t\t$retval .= \"<th>\".__('Name', $this->textdomain_name).\"</th>\\n\";\r\n\t\t\t$retval .= \"<th>\".__('Video type', $this->textdomain_name).\"</th>\\n\";\r\n\t\t\t$retval .= \"</tr></thead>\\n\";\r\n\t\t}\r\n\r\n\t\t$retval .= \"<tbody>\\n\";\r\n\t\t$class = \"\";\r\n\t\t$root_uri = preg_replace(\"/^(https?:\\/\\/[^\\/]*\\/).*$/i\", \"$1\", trailingslashit(get_bloginfo('wpurl')));\r\n\t\tforeach((array) $vid_list as $key => $a_value) {\r\n\t\t\tif ($count >= $limit + $start) {\r\n\t\t\t\t$next = true;\r\n\t\t\t\tbreak;\r\n\t\t\t} elseif ($count >= $start) {\r\n\t\t\t\t$a_value = $this->stripArray($a_value); // strip slashes\r\n\t\t\t\t$src = '../wp-content/videopop/'.$a_value['lynkvp_filename'];\r\n\t\t\t\t$is_type = '';\r\n\t\t\t\tif(!empty($a_value['lynkvp_url'])) {\r\n\t\t\t\t\t$src = \"http://\".$a_value['lynkvp_url'];\r\n\t\t\t\t\t$is_type = \"<span style=\\\"font-size:10px;\\\">URL</span>\";\r\n\t\t\t\t}\r\n\t\t\t\t$retval .= \"<tr\".$class.\">\\n\";\r\n\t\t\t\tif ($list_type=='1') {\r\n\t\t\t\t\t$retval .= \"<td>\";\r\n\t\t\t\t\tif ( current_user_can( $this->options['user_lvl'] ) ) {\r\n\t\t\t\t\t\t$retval .= \"<input type=\\\"submit\\\" value=\\\"\".__('edit', $this->textdomain_name).\"\\\" name=\\\"lynkvp_edit[\".$a_value['lynkvp_id'].\"]\\\" class=\\\"button\\\" style=\\\"font-size:10px;\\\" />&nbsp;&nbsp;&nbsp;\";\r\n\t\t\t\t\t\t$retval .= \"<input type=\\\"submit\\\" value=\\\"\".__('delete', $this->textdomain_name).\"\\\" name=\\\"lynkvp_del[\".$a_value['lynkvp_id'].\"]\\\" onclick=\\\"javascript:check=confirm('\".__('The links you created will not work anymore. Delete?', $this->textdomain_name).\"');if(check==false) return false;\\\" class=\\\"button\\\" style=\\\"font-size:10px;\\\" />&nbsp;&nbsp;&nbsp;\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$retval .= sprintf($link_format, $a_value['lynkvp_id'], $a_value['lynkvp_title'], (isset($a_value['lynkvp_width']) ? $a_value['lynkvp_width'] : $a_value['lynkvp_size']), $a_value['lynkvp_name']).'&nbsp;&nbsp;';\r\n\t\t\t\t\t$retval .= \"</td>\\n\";\r\n\t\t\t\t\t$retval .= \"<td>\".$a_value['lynkvp_type'].\"&nbsp;&nbsp;</td>\\n\";\r\n\t\t\t\t\t$retval .= \"<td>\".$is_type.\"&nbsp;&nbsp;</td>\\n\";\r\n\t\t\t\t\t$retval .= \"</tr>\\n\";\r\n\t\t\t\t\t$class = ($class=='' ? ' class=\"alt\"' : '');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$retval .= \"<td><input type=\\\"submit\\\" value=\\\"\".__('Add to Editor', $this->textdomain_name).\"\\\" name=\\\"insert_\".$a_value['lynkvp_id'].\"\\\"\";\r\n\t\t\t\t\tif ($this->options['ins_shortcode'] == '1') {\r\n\t\t\t\t\t\t$retval .= \" onclick=\\\"javascript:vpInsertAtCursor(\";\r\n\t\t\t\t\t\t$retval .= \"vpEditCode('\".$a_value['lynkvp_id'].\"','\".$a_value['lynkvp_name'].\"','\".$a_value['lynkvp_caption'].\"',(inline_\".$a_value['lynkvp_id'].\".checked==true?true:false))\";\r\n\t\t\t\t\t\t$retval .= \");return false;\\\"\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$retval .= \" onclick='javascript:vpInsertAtCursor(\";\r\n\t\t\t\t\t\t$retval .= \"(inline_\".$a_value['lynkvp_id'].\".checked==false\";\r\n//\t\t\t\t\t\t$retval .= str_replace(\"<\", \"<\\\"+\\\"\", str_replace(\"=\", \"=\\\"+\\\"\", str_replace(\"&amp;\", \"&\\\"+\\\"amp;\", str_replace(\r\n//\t\t\t\t\t\t\t $root_uri\r\n//\t\t\t\t\t\t\t,\"/\"\r\n//\t\t\t\t\t\t ,\"?\\\"\".$this->_getLinkTag($a_value['lynkvp_id'], $a_value['lynkvp_name'], false, \"\\\\\".\"\\\"\").\"\\\"\".\":\\\"\".$this->_getLinkTag($a_value['lynkvp_id'], $a_value['lynkvp_name'], true , \"\\\\\".\"\\\"\").\"\\\"\"\r\n//\t\t\t\t\t\t\t))));\r\n\t\t\t\t\t\t$retval .= str_replace(\r\n\t\t\t\t\t\t\t array(\"<\", \"=\", \"&amp;\")\r\n\t\t\t\t\t\t\t,array(\"<\\\"+\\\"\", \"=\\\"+\\\"\", \"&\\\"+\\\"amp;\")\r\n\t\t\t\t\t\t ,\"?\\\"\".$this->_getLinkTag($a_value['lynkvp_id'], $a_value['lynkvp_name'], false, \"\\\\\".\"\\\"\").\"\\\"\".\":\\\"\".$this->_getLinkTag($a_value['lynkvp_id'], $a_value['lynkvp_name'], true , \"\\\\\".\"\\\"\").\"\\\"\"\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t$retval .= \"));return false;'\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$retval .= \" class=\\\"button\\\" style=\\\"font-size:10px;\\\" /></td>\\n\";\r\n\t\t\t\t\t$retval .= \"<td>&nbsp;&nbsp;<input type=\\\"checkbox\\\" name=\\\"inline_\".$a_value['lynkvp_id'].\"\\\" value=\\\"\\\" /></td>\\n\";\r\n\t\t\t\t\t$retval .= \"<td>\".sprintf($link_format, $a_value['lynkvp_id'], $a_value['lynkvp_title'], $a_value['lynkvp_size'], $a_value['lynkvp_name']).\"&nbsp;&nbsp;</td>\\n\";\r\n\t\t\t\t\t$retval .= \"<td>\".$a_value['lynkvp_type'].\"&nbsp;&nbsp;</td>\\n\";\r\n\t\t\t\t}\r\n\t\t\t\t$retval .= \"</tr>\\n\";\r\n\t\t\t}\r\n\t\t\t$count++;\r\n\t\t}\r\n\t\t$retval .= \"</tbody>\\n\";\r\n\t\t$retval .= \"</table>\\n\";\r\n\t\tif ($list_type=='1') $retval .= \"</form>\\n\";\r\n\r\n\t\t$retval .= \"<div id=\\\"videopop_navi\\\" style=\\\"width:95%;margin:0 auto;\\\">\";\r\n\t\t$retval .= \"<span style=\\\"float:left;\\\"><input type=\\\"submit\\\" value=\\\"&laquo; \".__('Prev', $this->textdomain_name).\"\\\" name=\\\"prev\\\" id=\\\"prev\\\" class=\\\"button\\\" style=\\\"visibility:\".($start > 0 ? 'visible' : 'hidden').\";\\\" />&nbsp;&nbsp;</span>\";\r\n\t\t$retval .= \"<span style=\\\"float:right;\\\">&nbsp;&nbsp;<input type=\\\"submit\\\" value=\\\"\".__('Next', $this->textdomain_name).\" &raquo;\\\" name=\\\"next\\\" id=\\\"next\\\" class=\\\"button\\\" style=\\\"visibility:\".($next==true ? 'visible' : 'hidden').\";\\\" /></span>\";\r\n\t\t$retval .= \"</div>\\n\";\r\n\r\n\t\t$retval .= \"</div>\\n\";\r\n\t\t$retval .= \"<!--- list end --->\\n\";\r\n\r\n\t\t$retval .= \"<script type=\\\"text/javascript\\\"> /*<![CDATA[ */\\n\";\r\n\t\t$retval .= \"jQuery(function(){\\n\";\r\n\t\t$retval .= \" jQuery('#prev').unbind('submit').unbind('click').click(function(){get_page(\".$list_type.\", 0, \".$limit.\");return false;});\\n\";\r\n\t\t$retval .= \" jQuery('#next').unbind('submit').unbind('click').click(function(){get_page(\".$list_type.\", \".$limit.\", \".$limit.\");return false;});\\n\";\r\n\t\t$retval .= \" jQuery('#videopop_list').css({height:(jQuery('#VideoLists').height()>180?jQuery('#VideoLists').height():180) + 20});\\n\";\r\n\t\t$retval .= \" function get_page(list_type, start_count, max_count){\\n\";\r\n\t\t$retval .= \" if (start_count < 0) {start_count = 0;}\\n\";\r\n\t\t$retval .= \" jQuery('#videopop_navi').fadeOut('normal');\\n\";\r\n\t\t$retval .= \" jQuery('#videopop_list').block({\\n\";\r\n\t\t$retval .= \" message: '<div style=\\\"margin:0 auto;padding:0 0 0 23px;width:100px;font:normal 12px Arial;background:url(\".$this->plugin_url.\"images/ajax-loader.gif) no-repeat 0 50%;\\\"><p style=\\\"margin:3em 0;\\\">\".__('Loading...', $this->textdomain_name).\"</p></div>'\\n\";\r\n\t\t$retval .= \" ,css: {border:\\\"1px solid #8C8C8C\\\"}\\n\";\r\n\t\t$retval .= \" ,overlayCSS: {backgroundColor:'#FFF',opacity:'0.6'}\\n\";\r\n\t\t$retval .= \" });\\n\";\r\n\t\t$retval .= \" jQuery.get(\\n\";\r\n\t\t$retval .= \" '\".$this->admin_manage.\"'\\n\";\r\n\t\t$retval .= \" ,{'get_list':list_type, 'start':start_count}\\n\";\r\n\t\t$retval .= \" ,function(responseText){\\n\";\r\n\t\t$retval .= \" var newList_html = responseText.replace(/[\\\\r\\\\n]/g,'').replace(/^.*<\\\\!\\\\-+ list start \\\\-+>(.*?)<\\\\!\\\\-+ list end \\\\-+>.*$/i, '$1');\\n\";\r\n\t\t$retval .= \" jQuery('tbody', jQuery('#VideoLists')).children().remove();\\n\";\r\n\t\t$retval .= \" jQuery('#videopop_navi').children().remove();\\n\";\r\n\t\t$retval .= \" jQuery('tbody', jQuery('#VideoLists')).append(jQuery.trim(newList_html.replace(/^.*<tbody.*?>(.*?)<\\\\/tbody>.*$/i, '$1')));\\n\";\r\n\t\t$retval .= \" if (list_type == 1) {\\n\";\r\n\t\t$retval .= \" jQuery('#VideoLists').children().fadeIn('fast');\\n\";\r\n\t\t$retval .= \" } else {\\n\";\r\n\t\t$retval .= \" jQuery('#VideoLists').children().css({visibility:'visible'});\\n\";\r\n\t\t$retval .= \" }\\n\";\r\n\t\t$retval .= \" jQuery('#videopop_navi').append(jQuery.trim(newList_html.replace(/^.*<div id=\\\"videopop_navi\\\".*?>(.*?)<\\\\/div>.*$/i, '$1'))).fadeIn('fast');\\n\";\r\n\t\t$retval .= \" jQuery('#prev').unbind('submit').unbind('click').click(function(){get_page(list_type, start_count - max_count, max_count);return false;});\\n\";\r\n\t\t$retval .= \" jQuery('#next').unbind('submit').unbind('click').click(function(){get_page(list_type, start_count + max_count, max_count);return false;});\\n\";\r\n\t\t$retval .= \" jQuery('#videopop_list').unblock();\\n\";\r\n\t\t$retval .= \" }\\n\";\r\n\t\t$retval .= \" );\\n\";\r\n\t\t$retval .= \" }\\n\";\r\n\t\t$retval .= \"});\\n\";\r\n\t\t$retval .= \"/*]]>*/ </script>\\n\";\r\n\r\n\t\tunset($vid_list);\r\n\t\treturn $retval;\r\n\t}", "public function listAction()\n {\n//\n $request = $this->getRequest();\n\n $routeMatch = $this->getEvent()->getRouteMatch();\n $id = $routeMatch->getParam('workout_id', 0);\n\n if ($id <= 0) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n /**\n * Grid FORM\n */\n $form = new WorkoutExerciseGrid(\n array(\n 'view' => $this->_view,\n )\n );\n\n /**\n * BUILDING LIST\n */\n $list = new WorkoutExerciseResultSet(\n array(\n 'model' => $this->_exercise,\n 'view' => $this->_view,\n )\n );\n\n $list->setFieldOptions('type_id', array(\n 'values' => $types = $this->_exerciseType->getBehaviour('nestedSet')->getResultSetForText(),\n ));\n\n $typesTemp = $this->_exerciseType->getResultSet()->toArray();\n $types = array();\n foreach ( $typesTemp as $key => $type) {\n $types[$type['type_id']] = $type;\n }\n\n\n $list->addField(\n 'results',\n 'custom',\n array(\n 'label' => 'results',\n 'sortable' => false,\n 'values' => $types,\n 'viewScript' => 'workout-exercise/_field_result.phtml',\n )\n );\n\n $list->setDbWhere('workout_id = ' . (int)$id);\n\n //\n $list->processRequest($this->getRequest());\n\n //\n $list->build();\n\n //\n $form->addSubForm($list, $list->getName());\n\n// //\n $this->_view->headScript()->appendScript(\n $this->_view->render(\n 'workout-exercise/list.js',\n array(\n 'back' => $this->url()->fromRoute('hi-training/workout/list'),\n 'delete' => $this->url()->fromRoute('hi-training/workout-exercise/delete/wildcard', array('exercise_id' => '')),\n 'edit' => $this->url()->fromRoute('hi-training/workout-exercise/edit/wildcard', array('exercise_id' => '')),\n 'add' => $this->url()->fromRoute('hi-training/workout-exercise/add/wildcard', array('workout_id' => $id)),\n )\n )\n );\n\n /**\n * POST\n */\n if ($this->getRequest()->isPost()) {\n\n $formData = $this->getRequest()->post()->toArray();\n\n\n if ($form->isValid($formData)) {\n \\Zend\\Debug::dump($formData);\n if ( isset($formData['header']['formId'])\n && $formData['header']['formId'] == 'WorkoutExerciseGridForm') {\n\n if (isset($formData['WorkoutExerciseResultSet']['actions']['saveSelected'])) {\n $allBox = $formData['WorkoutExerciseResultSet']['header']['all'];\n $rows = $formData['WorkoutExerciseResultSet']['rows'];\n\n foreach ($rows as $key => $row) {\n if ($row['id'] || $allBox) {\n $exercise = $this->_exercise->getRow(array('exercise_id' => $key));\n $exercise->populate($row['row']);\n $exercise->save();\n\n }\n }\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n }\n\n if (isset($formData['WorkoutExerciseResultSet']['actions']['deleteSelected'])) {\n\n $allBox = $formData['WorkoutExerciseResultSet']['header']['all'];\n $rows = $formData['WorkoutExerciseResultSet']['rows'];\n\n foreach ($rows as $key => $row) {\n if ($row['id'] || $allBox) {\n\n $exercise = $this->_exercise->getRow(array('exercise_id' => $key));\n $exercise->delete();\n\n }\n }\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n//\n }\n }\n }\n }\n\n return array(\n 'form' => $form,\n 'workout' => $this->_workout->getRow(array('workout_id'=>$id)),\n );\n\n }", "function _uc_order_pane_list($view = 'view') {\n static $panes = array();\n\n if (count($panes) > 0) {\n return $panes;\n }\n\n foreach (module_invoke_all('uc_order_pane') as $id => $pane) {\n // Preserve backward compatibility for panes with no key specified.\n if (is_numeric($id)) {\n $id = $pane['id'];\n }\n\n // Set defaults.\n $pane += array(\n 'id' => $id,\n 'enabled' => TRUE,\n 'weight' => 0,\n );\n\n $panes[$id] = $pane;\n }\n\n // Allow other modules to alter the defaults.\n drupal_alter('uc_order_pane', $panes);\n\n uasort($panes, 'uc_weight_sort');\n\n return $panes;\n}", "private function generateTestPlanetList( )\r\n {\r\n $this->testPlanetListIndex = 0;\r\n $this->testPlanetList = array();\r\n \r\n foreach ( $this->getPlanets() as $testPlanet ) {\r\n if ( ! $testPlanet->isCreated() ) {\r\n continue;\r\n }\r\n \r\n $this->testPlanetList[] = $testPlanet;\r\n } \r\n }", "public function testListServer()\n {\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $fs_multijoin_v;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t\tif ($fs_multijoin_v->Export <> \"\" ||\r\n\t\t\t$fs_multijoin_v->CurrentAction == \"gridadd\" ||\r\n\t\t\t$fs_multijoin_v->CurrentAction == \"gridedit\")\r\n\t\t\t$this->ListOptions->HideAllOptions();\r\n\t}", "public function testListMembers()\n {\n }", "public function testShowListMemberSuccessfully(): void\n {\n $listMember = $this->createListMember(MailChimpData::$listData, MailChimpData::$listMemberData);\n\n $this->get(\\sprintf('/mailchimp/lists/%s/members/%s', $listMember->getMailChimpList()->getId(), $listMember->getId()));\n $content = \\json_decode($this->response->content(), true);\n\n $this->assertResponseOk();\n\n foreach (MailChimpData::$listMemberData as $key => $value) {\n self::assertArrayHasKey($key, $content);\n self::assertEquals($value, $content[$key]);\n }\n }" ]
[ "0.8041716", "0.69889045", "0.68276155", "0.6213921", "0.61039495", "0.60195667", "0.5794682", "0.5651228", "0.563803", "0.5618443", "0.55301744", "0.5524846", "0.5513889", "0.54806244", "0.5478555", "0.5473747", "0.53977513", "0.5363002", "0.5349754", "0.5313243", "0.5302042", "0.5297186", "0.52841765", "0.5275732", "0.5253515", "0.5231574", "0.5199862", "0.5198448", "0.5161464", "0.5153291", "0.51293385", "0.5116534", "0.51148856", "0.5113899", "0.5105114", "0.51029706", "0.5078438", "0.50726837", "0.5065719", "0.50534993", "0.5037912", "0.50306386", "0.5014676", "0.49986437", "0.49901655", "0.49852356", "0.49810338", "0.49776042", "0.49774337", "0.4975861", "0.49743056", "0.49732253", "0.49724546", "0.49613312", "0.49604818", "0.49594304", "0.49594304", "0.49376056", "0.49371067", "0.4926974", "0.49238756", "0.4906986", "0.49017516", "0.488492", "0.48644242", "0.48640198", "0.48416355", "0.48382542", "0.48372087", "0.48366272", "0.4825154", "0.4814543", "0.48039654", "0.480256", "0.47994456", "0.47941947", "0.47892034", "0.4788476", "0.47776273", "0.47766796", "0.4775046", "0.47713858", "0.47646332", "0.4763957", "0.47622025", "0.475931", "0.4758386", "0.4751261", "0.4749792", "0.47497657", "0.4747691", "0.47471154", "0.4742133", "0.4738379", "0.47326276", "0.4731131", "0.47296128", "0.47286466", "0.47260317", "0.47237474" ]
0.8328777
0
Test case for webinarPanelistsDelete Remove Panelists.
public function testWebinarPanelistsDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelistDelete()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function testRemoveListSuccessfully(): void\n {\n $this->createMailchimpList($list);\n\n $this->delete(\\sprintf('/mailchimp/lists/%s', $list['list_id']));\n\n $this->assertResponseOk();\n self::assertEmpty(\\json_decode($this->response->content(), true));\n }", "public function removeAction() {\n $result = array('status' => 'failed');\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('remove') == 'true') {\n $dirName = Mage::getBaseDir('code').'/local/Balticode/Postoffice';\n if (is_dir($dirName) && file_exists($dirName.'/etc/config.xml')) {\n $directory = new Varien_Io_File();\n $deleteResult = $directory->rmdir($dirName, true);\n if ($deleteResult) {\n $result['status'] = 'success';\n }\n }\n \n }\n $this->getResponse()->setRawHeader('Content-type: application/json');\n $this->getResponse()->setBody(json_encode($result));\n return;\n }", "public function testRemove()\n {\n $context = $this->createPageContext();\n $storage = $this->createStorage();\n $tokenStorage = $this->createTokenStorage();\n\n $layout1 = $storage->create();\n $layout2 = $storage->create();\n $layout3 = $storage->create();\n\n $context->addLayoutList([$layout1->getId(), $layout2->getId(), $layout3->getId()]);\n $token = $context->createEditToken([$layout1->getId(), $layout3->getId()], ['user_id' => 17]);\n $tokenString = $token->getToken();\n $tokenStorage->saveToken($token);\n\n // Save our editable instances\n $tokenStorage->update($tokenString, $layout1);\n $tokenStorage->update($tokenString, $layout3);\n\n // And now remove one layout\n $tokenStorage->remove($tokenString, $layout2->getId());\n $this->assertTrue($token->contains($layout1->getId()));\n $this->assertFalse($token->contains($layout2->getId()));\n $this->assertTrue($token->contains($layout3->getId()));\n\n try {\n $tokenStorage->load($tokenString, $layout2->getId());\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n\n // And the other two still work\n $tokenStorage->load($tokenString, $layout1->getId());\n $tokenStorage->load($tokenString, $layout3->getId());\n }", "public function deleteAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET VIEWER INFO\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $listingtype_id = $this->_listingType->listingtype_id;\n $this->view->listingType = $this->_listingType;\n\n //GET TAB ID\n $this->view->tab_selected_id = $tab_selected_id = $this->_getParam('content_id');\n $this->view->format_form = $this->_getParam('format', null);\n\n //GET VIDEO OBJECT\n $this->view->sitereview_video = $sitereview_video = Engine_Api::_()->getItem('sitereview_video', $this->getRequest()->getParam('video_id'));\n\n //GET VIDEO TITLE\n $this->view->title = $sitereview_video->title;\n\n //GET LISTING ID\n $listing_id = $sitereview_video->listing_id;\n\n //GET NAVIGATION \n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('sitereview_main');\n\n //GET SITEREVIEW SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, 'edit_listtype_' . $sitereview->listingtype_id);\n\n if (!$sitereview_video) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_(\"Video doesn't exists or not authorized to delete\");\n return;\n }\n\n //VIDEO OWNER AND LISTING OWNER CAN DELETE VIDEO\n if ($viewer_id != $sitereview_video->owner_id && $can_edit != 1) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n\n if (!$this->getRequest()->isPost()) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_('Invalid request method');\n return;\n }\n\n $db = $sitereview_video->getTable()->getAdapter();\n $db->beginTransaction();\n\n try {\n\n Engine_Api::_()->getDbtable('videoratings', 'sitereview')->delete(array('videorating_id =?' => $this->getRequest()->getParam('video_id')));\n\n $sitereview_video->delete();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n\n\n\n\n $this->view->status = true;\n if ($this->view->format_form == 'smoothbox') {\n $this->_forwardCustom('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRefresh' => '500',\n 'parentRefreshTime' => '500',\n 'format' => 'smoothbox',\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted this video.')\n ));\n } else {\n if (Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n if ($can_edit) {\n return $this->_gotoRouteCustom(array('action' => 'edit', 'listing_id' => $sitereview->listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\n } else {\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $tab_selected_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n } else {\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $tab_selected_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n }\n }", "public function RemoveArtworkList(): void{\n\n if(!Session::isLogin())\n exit;\n\n if(!ArtworkVerifier::removeList($_POST))\n exit;\n\n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id))\n UserList::where('user_id', Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->delete();\n }", "public function testCollectionTicketsDelete()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testRemoveMenuAction()\n {\n parent::login();\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->dragAndDropToObject(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1\", \"css=ul#sortable2\");\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->assertFalse($this->isElementPresent(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\"));\n $this->isElementPresent(\"css=ul#sortable2.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\");\n $this->assertElementContainsText(\"css=ul#sortable2.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\", \"Test Menu Selenium 1\");\n parent::logout();\n }", "public function deleteList($data)\n {\n var_export($data);\n //return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteListAction(){\n $ebookers_obj = new Ep_Ebookers_Managelist();\n //to call a function to delete themes//\n $ebookers_obj->deleteList($this->_request->getParams());\n //unset($_REQUEST);\n exit;\n }", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "protected function removeFromList($data)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\ViewList');\n $repo->deleteInBatch($repo->findBy($data), false);\n }", "public function testWebinarPollDelete()\n {\n }", "public function testRemove()\n {\n $success = $this->collection->remove(3);\n\n $this->assertTrue($success);\n $this->assertCount(2, $this->collection);\n $this->assertFalse($this->collection->contains(3));\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function testProfilePrototypeDeleteGroups()\n {\n\n }", "public function testWebinarDelete()\n {\n }", "public function removeAction() {\r\n //DELETE SLIDE DURING THE UPLOAD\r\n $is_ajax = (int) $this->_getParam('is_ajax');\r\n if (!empty($is_ajax)) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n }\r\n\r\n //GET SLIDESHOW ID AND IT'S OBJECT\r\n $advancedslideshow_id = (int) $this->_getParam('advancedslideshow_id');\r\n $this->view->advancedslideshow = $advancedslideshow = Engine_Api::_()->getItem('advancedslideshow', $advancedslideshow_id);\r\n\r\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('confirm') == true) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n if (empty($image)) {\r\n return;\r\n }\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n\r\n //GET TOTAL SLIDES COUNT\r\n $total_images = Engine_Api::_()->getDbTable('images', 'advancedslideshow')->getTotalSlides($advancedslideshow_id);\r\n\r\n $start_index = $advancedslideshow->start_index;\r\n\r\n if ($start_index > $total_images - 1) {\r\n if ($total_images != 0) {\r\n $advancedslideshow->start_index = $total_images - 1;\r\n $advancedslideshow->save();\r\n } else {\r\n $advancedslideshow->start_index = 0;\r\n $advancedslideshow->save();\r\n }\r\n }\r\n\r\n $parentRedirect = 'admin/advancedslideshow/slides/manage/advancedslideshow_id/' . $advancedslideshow_id;\r\n $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => 10,\r\n 'parentRedirect' => $parentRedirect,\r\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted the slide.')\r\n ));\r\n }\r\n }", "function ui_sortable_destroy($selector){\n return add_method_support('sortable',$selector, 'destroy');\n}", "function ag_del_coll() {\n\tif(!isset($_POST['coll_id'])) {die('missing data');}\n\t$id = addslashes($_POST['coll_id']);\n\t\n\t$resp = wp_delete_term( $id, 'ag_collections');\n\n\tif($resp == '1') {die('success');}\n\telse {die('error during the collection deletion');}\n}", "function test_restrict_deletion_of_Home_page(){}", "public function deleteSlots(Collection $collection): Collection;", "public function multiDeleteAction() {\n\n if ($this->getRequest()->isPost()) {\n $values = $this->getRequest()->getPost();\n\n foreach ($values as $key => $value) {\n if ($key == 'delete_' . $value) {\n Engine_Api::_()->getItem('list_listing', (int) $value)->delete();\n }\n }\n }\n return $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }", "function projectpentagon_remove() {\n\ndelete_option('projectpentagon_title');\n\ndelete_option('projectpentagon_name1');\n\ndelete_option('projectpentagon_name2');\n\ndelete_option('projectpentagon_name3');\n\ndelete_option('projectpentagon_name4');\n\ndelete_option('projectpentagon_name5');\n\ndelete_option('projectpentagon_color1');\n\ndelete_option('projectpentagon_color2');\n\ndelete_option('projectpentagon_color3');\n\ndelete_option('projectpentagon_color4');\n\ndelete_option('projectpentagon_color5');\n\ndelete_option('projectpentagon_category');\ndelete_option('projectpentagon-titleonpages');\n\n}", "function delLists ($dbhost, $dbuser, $dbpass, $dbname, $dbport, $field) {\n // connect to the host:\n $connection = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname, $dbport);\n // exit the script with a useful message if there was an error:\n if (!$connection)\n {\n die(\"Connection failed: \" . $mysqli_connect_error);\n }\n\n // connect to our database:\n mysqli_select_db($connection, $dbname);\n\n // get rid of any contents linking before removing the LIST\n $query = \"DELETE FROM contents WHERE listID='$field'\";\n $result = mysqli_query($connection, $query);\n if ($result) {\n echo \"deleted - list contents<br>\";\n }\n else {\n echo \"List contents not deleted - error\";\n }\n\n // run query to remove the LIST\n $query = \"DELETE FROM lists WHERE id='$field'\";\n $result = mysqli_query($connection, $query);\n if ($result) {\n echo \"deleted\";\n }\n else {\n echo \"Not deleted - error\";\n }\n // we're finished with the database, close the connection:\n mysqli_close($connection);\n}", "function teamdelete(){\n $this->auth(COMP_ADM_LEVEL);\n $team_id = $this->uri->segment(3);\n $contest_id = urldecode($this->uri->segment(4));\n $this->m_key->removeTeam($team_id);\n $this->m_team->delete($team_id, $contest_id);\n $this->teams($contest_id);\n }", "public function removeAction()\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_frpformanswers_domain_model_formentry');\n\n $queryBuilder->delete('tx_frpformanswers_domain_model_formentry')\n ->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($this->pid, \\PDO::PARAM_INT)))\n ->andWhere($queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(1, \\PDO::PARAM_INT)))\n ->execute();\n\n $this->addFlashMessage(\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.body', null, [$this->pid]),\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.title'),\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::OK,\n true);\n\n $this->redirect('list');\n }", "public function testDeleteWrongObjectTypeSubmitAsAdmin()\n {\n $crawler = $this->requestAsAdmin('/tasks');\n\n // Can't use assertSelectorTextContains() because it only checks the first selector occurrence\n // and the task we are looking for is not the first one in the displayed list of tasks.\n // See: https://github.com/symfony/symfony-docs/issues/13036\n //$this->assertSelectorTextContains('h4 > a', 'Tâche Eric n°1');\n $this->assertEquals(1, $crawler->filter('h4 > a:contains(\"Tâche Eric n°1\")')->count());\n\n // Then we delete it\n $task_id = self::getTaskIdByTitle('Tâche Eric n°1');\n\n $this->requestAsAdmin('/tasks/'.$task_id.'/delete');\n\n $crawler = $this->client->followRedirect();\n\n $this->assertRegExp('/tasks$/', $crawler->getUri());\n $this->assertContains(\n 'La tâche a bien été supprimée.',\n $this->client->getResponse()->getContent()\n );\n $this->assertSelectorTextNotContains('h4 > a', 'Tâche Eric n°1');\n }", "public function testDelete()\n {\n $context = $this->createPageContext();\n $storage = $this->createStorage();\n $tokenStorage = $this->createTokenStorage();\n\n $layout1 = $storage->create();\n $layout2 = $storage->create();\n $layout3 = $storage->create();\n\n $context->addLayoutList([$layout1->getId(), $layout2->getId(), $layout3->getId()]);\n $token = $context->createEditToken([$layout1->getId(), $layout3->getId()], ['user_id' => 17]);\n $tokenString = $token->getToken();\n $tokenStorage->saveToken($token);\n\n // Save our editable instances\n $tokenStorage->update($tokenString, $layout1);\n $tokenStorage->update($tokenString, $layout3);\n\n // Validate that load still work\n $tokenStorage->loadToken($tokenString);\n $tokenStorage->loadMultiple($tokenString, [$layout1->getId(), $layout3->getId()]);\n\n // And now delete\n $tokenStorage->deleteAll($tokenString);\n\n try {\n $tokenStorage->loadToken($tokenString);\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n try {\n $tokenStorage->loadMultiple($tokenString, [$layout1->getId()]);\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n try {\n $tokenStorage->load($tokenString, $layout3->getId());\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n }", "public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }", "public function testRemovePageWhenDeleted()\n {\n\n // Add a public page.\n $page = $this->_simplePage(true);\n\n // Delete.\n $page->delete();\n\n // Should remove Solr document.\n $this->_assertNotRecordInSolr($page);\n\n }", "function remove()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$user = JFactory::getUser();\n\t\tif (!$user->authorise('core.delete', 'com_gmapfp'))\n\t\t{\n\t\t\t$this->setMessage(JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'), 'error');\n\t\t} else {\n\t\t\t$model = $this->getModel('gmapfp');\n\t\t\tif(!$model->delete()) {\n\t\t\t\t$msg = JText::_( 'Error: One or more GMapFPs could not be Deleted' );\n\t\t\t} else {\n\t\t\t\t$msg = JText::_( 'GMapFP(s) Deleted' );\n\t\t\t}\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_gmapfp&controller=gmapfp&task=view', $msg );\n\t}", "public function del(){\n\t\t$this->OnlyAdmin();\n\t\tif($this->input->post()){\n\t\t$this->TicketModel->delet($this->input->post());\n\t\tredirect('index.php/ticket/lists');}\n\t}", "public function testRemoveUnsetElement()\n {\n $success = $this->collection->remove(7);\n\n $this->assertFalse($success);\n }", "public function multiDeleteApplicationAction() {\n $listing_id = $this->_getParam('listing_id');\n $listingtype_id = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id)->listingtype_id;\n\n if ($this->getRequest()->isPost()) {\n $values = $this->getRequest()->getPost();\n\n foreach ($values as $key => $value) {\n if ($key == 'delete_' . $value) {\n Engine_Api::_()->getItem('sitereview_job', (int) $value)->delete();\n }\n }\n }\n //REDIRECTING\n return $this->_helper->redirector->gotoRoute(array('action' => 'show-application', 'listing_id' => $listing_id), \"sitereview_dashboard_listtype_$listingtype_id\", true);\n }", "public function testDeleteSuppliersUsingDELETE()\n {\n }", "public function testDelete()\n\t{\n\t\t$saddle = $this->saddles[0];\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/saddles/' . $saddle->id)\n\t\t\t ->assertStatus(200);\n\n\t\t$this->assertDatabaseMissing('saddles', ['id' => $saddle->id]);\n\t}", "function remove()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$cid = JRequest::getVar( 'cid', array(), 'post', 'array' );\n\t\tJArrayHelper::toInteger($cid);\n\n\t\tif (count( $cid ) < 1) {\n\t\t\tJError::raiseError(500, JText::_( 'Select an item to delete' ) );\n\t\t}\n\n\t\t$model = $this->getModel('weblink');\n\t\tif(!$model->delete($cid)) {\n\t\t\techo \"<script> alert('\".$model->getError(true).\"'); window.history.go(-1); </script>\\n\";\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}", "public function testDelete()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertGreaterThan(0, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--delete')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Supprimer\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Supprimer')->form();\n\t\t$crawler = $client->submit($form);\t\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Le client a bien été supprimé.\")')->count());\n\n\t}", "public function actionDelete()\n {\n extract(Yii::$app->request->post());\n $this->findModel($list, $item)->delete();\n }", "public function testDeleteAuthorizationDivision()\n {\n }", "public function testProfilePrototypeDeletePosts()\n {\n\n }", "function delete_list($listid)\n\t{\n\t\t$this->http_set_content_type('text/html');\n\t\t$this->load_url(\"lists/$listid\", 'delete', array(), 204);\n\t\tif(intval($this->http_response_code) === 204):\n\t\t\treturn true;\n\t\tendif;\n\t\treturn false;\n\t}", "public function action_remove(){\n\t\t$monumentId = $this->request->param('id');\n\t\t$user = Auth::instance()->get_user();\n\t\t\n\t\t// Remove the monument from the user list\n\t\t$favoriteList = new Model_List_Favorite();\n\t\t$favoriteList->remove($monumentId, $user->UserID);\n\t\t\n\t\t// Redirect the user back to the monument page\n\t\t$this->request->redirect('monument/view/' . $monumentId);\n\t}", "public function doRemove() {\r\n\t\t$host = xn(\"host\");\r\n\t\t\r\n\t\t$ret = $this->_mongo->selectDB(\"admin\")->command(array(\r\n\t\t\t\"removeshard\" => $host\r\n\t\t));\r\n\t\t\r\n\t\t$this->ret = $this->_highlight($ret, \"json\");\r\n\t\t\r\n\t\t$this->display();\r\n\t}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function deletePlaylistAction()\n {\n\t\t$userSession\t= new Container('fo_user');\n\t\t$request\t\t= $this->getRequest();\n\t\tif(!isset($userSession->userSession['_id']) || trim($userSession->userSession['_id']) == '') {\n\t\t\techo \"-1\";\n\t\t\tdie();\n\t\t}\n\t\tif($request->isPost()) {\n\t\t\t$formData\t= $request->getPost();\n\t\t\tif(isset($formData['playlist_id']) && trim($formData['playlist_id']) != '') {\n\t\t\t\t$result\t= $this->deletePlaylist($formData);\n\t\t\t\t\n\t\t\t\t$tempArray\t= $userSession->mediaSession;\n\t\t\t\tif(isset($tempArray['playlist'][$formData['playlist_id']])) {\n\t\t\t\t\tunset($tempArray['playlist'][$formData['playlist_id']]);\n\t\t\t\t}\n\t\t\t\t$userSession->mediaSession\t= $tempArray;\n\t\t\t\techo \"1\";\t//\tSuccess\n\t\t\t} else {\n\t\t\t\techo \"0\";\t//\timproper request\n\t\t\t}\n\t\t} else {\n\t\t\techo \"0\";\t//\timproper request\n\t\t}\n\t\treturn $this->getResponse();\n }", "private static function removeAllTestingWebinars(): void\n {\n foreach (self::$driverHandler->getWebinars() as $webinar) {\n if (str_starts_with($webinar->slug, 'test-')) {\n self::$driverHandler->removeWebinar($webinar->id);\n }\n }\n }", "public function testTeamAdminCanDeleteSlots()\n {\n // Create a user with 2 teams and 3 properties for each team\n $user = User::factory()->withPersonalTeam()->create();\n $user->assignRole(Role::findByName('user'));\n $user->assignRole(Role::findByName('team-admin'));\n $teams = $user->ownedTeams;\n\n $property = Property::factory()->create([\n 'team_id' => $teams->first()->getKey(),\n 'is_private' => true\n ]);\n $calendar = Calendar::factory()->create(['property_id' => $property->getKey()]);\n $slot = Slot::factory()->create(['calendar_id' => $calendar->getKey()]);\n\n $response = $this->actingAs($user)->delete('/calendars/' . $calendar->getKey(). '/slots/' . $slot->getKey());\n $response->assertStatus(302);\n $this->assertSoftDeleted('slots', ['id' => $slot->getKey()]);\n }", "private function deleteCollection()\n {\n $request = $_REQUEST;\n global $cbcollection;\n try\n {\n $cid=0;\n\n if(isset($request['cid']))\n $cid = trim($request['cid']);\n\n //check if collection id provided\n if( $cid==0 || !is_numeric($cid) )\n throw_error_msg(\"collection id not provided.\");\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\")); \n\n $collection = $cbcollection->get_collection($cid);\n\n if(empty($collection))\n throw_error_msg(lang(\"collection_not_exists\"));\n\n if( $collection['userid'] != userid() )\n throw_error_msg(lang(\"cant_perform_action_collect\"));\n\n $cid = mysql_clean($cid);\n $user_id = userid();\n $response = $cbcollection->delete_collection($cid);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"collection has been deleted\", \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage()); \n }\n }", "public static function uninstall() {\r\n // $pop_ups = get_pages( array('post_type'=>DGDSCROLLBOXTYPE));\r\n // foreach($pop_ups as $pop_up) {\r\n // wp_delete_post($pop_up->ID, true);\r\n // }\r\n }", "public function onRemove();", "public function testProfilePrototypeDeleteOwnedGroups()\n {\n\n }", "public function del() {\n\t\t\tif (!empty($this->params['form']['items'])) {\n\t\t\t\t/* Convert string with ids to array */\n\t\t\t\t$allIds = explode(',', $this->params['form']['items']);\n\t\t\t\t$allIds = Sanitize::clean($allIds);\n\t\t\t\t\n\t\t\t\t/* Remove menu item(s) from tree */\n\t\t\t\t/* @todo Check if this could be done with a single method call/db request instead */\n\t\t\t\tforeach ($allIds AS $id) {\n\t\t\t\t\t$this->MyMenu->removefromtree($id, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* Get list of menu items */\n\t\t\t$this->menuList = $this->getThreadedList();\n\t\t\t$this->set('menuList', $this->menuList);\n\t\t\t\n\t\t\t$this->render('list');\n\t\t}", "public function testRemove() {\n $index = Phish_Index::load();\n $index->store('TestA', 'testa.php');\n $index->store('TestB', 'testb.php');\n $index->remove('TestA');\n $this->assertNotEmpty($index->classes());\n }", "function remove()\n {\n $items = @implode(\", \", Misc::escapeInteger($_POST[\"items\"]));\n $stmt = \"DELETE FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"news\n WHERE\n nws_id IN ($items)\";\n $res = DB_Helper::getInstance()->query($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return false;\n } else {\n self::removeProjectAssociations($_POST['items']);\n return true;\n }\n }", "function delete_list($schedule_ids)\n\t{\t\n\t\treturn true;\t\n \t}", "public function removeAction() {\n\n // Validate request methods\n $this->validateRequestMethod('POST');\n\n //GET DIARY ID AND SUBJECT\n if (Engine_Api::_()->core()->hasSubject())\n $wishlist = Engine_Api::_()->core()->getSubject('sitereview_wishlist');\n\n $wishlist_id = $this->_getParam('wishlist_id');\n if (isset($wishlist_id) && !empty($wishlist_id)) {\n $subject = $wishlist = Engine_Api::_()->getItem('sitereview_wishlist', $wishlist_id);\n Engine_Api::_()->core()->setSubject($wishlist);\n } else {\n $this->respondWithError('no_record');\n }\n\n\n if (empty($wishlist))\n $this->respondWithError('no_record');\n\n $wishlist_id = $this->_getParam('wishlist_id');\n\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET EVENT ID AND EVENT\n $listing_id = $this->_getParam('listing_id');\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n\n if (empty($sitereview) && !isset($sitereview))\n $this->respondWithError('no_record');\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n //DELETE FROM DATABASE\n Engine_Api::_()->getDbtable('wishlistmaps', 'sitereview')->delete(array('wishlist_id = ?' => $wishlist_id, 'listing_id = ?' => $listing_id));\n\n try {\n //DELETE ACTIVITY FEED\n //SQL ERROR TO BE CORRECTED\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n $actionTableName = $actionTable->info('name');\n\n $action_id = $actionTable->select()\n ->setIntegrityCheck(false)\n ->from($actionTableName, 'action_id')\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\n ->where('engine4_activity_attachments.id = ?', $listing_id)\n ->where($actionTableName . '.type = ?', \"sitereview_wishlist_add_listing\")\n ->where($actionTableName . '.subject_type = ?', 'user')\n ->where($actionTableName . '.object_type = ?', 'sitereview_listing')\n ->where($actionTableName . '.object_id = ?', $listing_id)\n //->where($actionTableName . '.params like(?)', '{\"child_id\":' . $wishlist_id . '}')\n ->query()\n ->fetchColumn();\n } catch (Exception $ex) {\n $this->respondWithValidationError('internal_server_error', $ex->getMessage());\n }\n if (!empty($action_id)) {\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\n if (!empty($activity)) {\n $activity->delete();\n }\n }\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }", "function checkRemove($elements)\n\t{\n\t\tFabrikViewElement::setCheckRemoveToolBar();\n\t\t?>\n\t\t<h1><?php echo JText::_('DO YOU WANT TO DROP THE DATABASE COLUMN AS WELL?') ?></h1>\n\t\t<form action=\"index.php\" method=\"post\" name=\"adminForm\" id=\"adminForm\">\n\t\t<table class=\"adminlist\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th><?php echo JText::_('Drop') ?></th>\n\t\t\t\t\t<th><?php echo JText::_('Element') ?></th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t<?php\n\t\t\t\t$c = 0;\n\t\t\t\tforeach ($elements as $element) { ?>\n\t\t\t\t\t<tr class=\"row<?php echo $c % 2; ?>\">\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"drop[<?php echo $element->id ?>][]\" value=\"0\" checked=\"checked\" /><?php echo JText::_('No') ?></label>\n\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"drop[<?php echo $element->id ?>][]\" value=\"1\" /><?php echo JText::_('Yes') ?></label>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<?php echo $element->label; ?>\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"cid[]\" value=\"<?php echo $element->id ?>\" />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t<?php $c ++;\n\t\t\t\t} ?>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<input type=\"hidden\" name=\"option\" value=\"com_fabrik\" />\n\t\t\t<input type=\"hidden\" name=\"c\" value=\"element\" />\n\t\t\t<input type=\"hidden\" name=\"task\" value=\"remove\" />\n\t\t\t<?php echo JHTML::_('form.token'); ?>\n\t\t</form>\n\t\t<?php\n\t}", "public function testSuccessfulRemoveApplicants()\n {\n $this->createData(10000, '13800001111', 0);\n\n $this->ajaxPost('/' . self::ROUTE_PREFIX . '/remove', [\n '_token' => csrf_token(),\n 'attendant' => 10000,\n ])->seeJsonContains([\n 'code' => 0,\n ]);\n }", "public function destroy($list_id)\n {\n $list = Listt::find($list_id);\n $list->delete();\n return redirect(route('adminpanel.index'));\n }", "public function removePhotoAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LISTING ID\n $listing_id = $this->_getParam('listing_id');\n\n //GET LISTING ITEM\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET LISTING TYPE ID\n $listingtype_id = $sitereview->listingtype_id;\n\n //CAN EDIT OR NOT\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n //GET FILE ID\n $file_id = Engine_Api::_()->getDbtable('photos', 'sitereview')->getPhotoId($listing_id, $sitereview->photo_id);\n\n //DELETE PHOTO\n if (!empty($file_id)) {\n $photo = Engine_Api::_()->getItem('sitereview_photo', $file_id);\n $photo->delete();\n }\n\n //SET PHOTO ID TO ZERO\n $sitereview->photo_id = 0;\n $sitereview->save();\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'change-photo', 'listing_id' => $listing_id), \"sitereview_dashboard_listtype_$listingtype_id\", true);\n }", "public function test_delete_ScienceFiction_category_along_with_its_books(){\n $this->visit('/admin/categories')->press('delete')->press('Proceed')\n ->see('Data removed')->see('The Evolutionary Void')->see('The Dreaming Void')->see('Blood Music');\n\n\n }", "public function deleteList(){\n\n $posts=$this->articleDAO->getPosts();\n $this->view->adminRender ('delete_view', ['posts' =>$posts]);\n\n }", "public function deleteList(Request $request)\n {\n $this->boardList->deleteList($request); \n\n return [\n 'success' => 'success', \n ];\n }", "function top10_remove() {\r\n//delete_option('omekafeedpull_omekaroot');\r\n}", "protected function beforeRemoving()\n {\n }", "public function testDeleteLecturerAndAdministrationWorker()\n {\n $user = factory(User::class)->state('lecturer_administration_worker')->create();\n $response = $this->withHeaders([\n ])->deleteJson(\"/api/user/{$user->id}\", []);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n \"deleted\"=> true\n ]);\n\n $this->assertDeleted('users', ['id' => $user->id]);\n $this->assertDeleted('addresses', ['id' => $user->address_id]);\n $this->assertDeleted('addresses', ['id' => $user->correspondal_address_id]);\n }", "private function uninstall_OSF_TestsSuites()\n {\n // Get package info\n $installPath = \"{$this->osf_web_services_folder}/{$this->osf_tests_suites_folder}\";\n\n // Uninstall\n $this->span(\"Uninstalling...\", 'info');\n $this->rm(\"{$installPath}/\", TRUE);\n }", "public function admin_remove(){\n \n $this->set(\"title_for_layout\",\"Remove a Group\");\n \n // Load the group in question\n $group = $this->Group->find('first', array('conditions' => array('Group.id' => $this->params->id)));\n if($group){\n $this->set('group', $group);\n } else {\n $this->Session->setFlash('That group could not be found.', 'default', array('class' => 'alert alert-error'));\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n }", "function doDeleteTestCases(&$dbHandler,$tcaseSet,&$tcaseMgr)\r\n{\r\n if( count($tcaseSet) > 0 )\r\n {\r\n foreach($tcaseSet as $victim)\r\n {\r\n $tcaseMgr->delete($victim);\r\n }\r\n }\r\n}", "protected function afterRemoving()\n {\n }", "public function testHandleRemoveSuccess()\n {\n // Populate data\n $dealerAccountIDs = $this->_populate();\n \n // Set data\n $ID = $this->_pickRandomItem($dealerAccountIDs);\n \n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/remove', ['ID' => $ID]);\n \n // Validate response\n $this->assertRedirectedTo('/dealer-account');\n $this->assertSessionHas('dealer-account-deleted', '');\n \n // Validate data\n $dealerAccount = $this->dealer_account->getOne($ID);\n $this->assertEquals(null, $dealerAccount);\n \n }", "public function deleteList()\n {\n if (!request()->ajax()) {\n return response()->json(['error' => 1, 'msg' => 'Method not allow!']);\n } else {\n $ids = request('ids');\n $arrID = explode(',', $ids);\n $arrDontPermission = [];\n foreach ($arrID as $key => $id) {\n if(!$this->checkPermisisonItem($id)) {\n $arrDontPermission[] = $id;\n }\n }\n if (count($arrDontPermission)) {\n return response()->json(['error' => 1, 'msg' => sc_language_render('admin.remove_dont_permisison') . ': ' . json_encode($arrDontPermission)]);\n }\n AdminCmsContent::destroy($arrID);\n sc_clear_cache('cache_cms_content');\n return response()->json(['error' => 0, 'msg' => '']);\n }\n }", "public function testDeletePermissionSet()\n {\n }", "public function testRemoveMemberFromListSuccessfully(): void\n {\n // create list\n $this->createListMemberViaApi(MailChimpData::$listData);\n\n // create list member\n $this->post(\"/mailchimp/lists/{$this->listId}/members/\", MailChimpData::$listMemberData);\n $listMember = \\json_decode($this->response->content(), true);\n\n // remove member from list\n $this->delete(\\sprintf('/mailchimp/lists/%s/members/%s', $this->listId, $listMember['list_member_id']));\n\n $this->assertResponseOk();\n self::assertEmpty(\\json_decode($this->response->content(), true));\n }", "public function testPostAuthorizationSubjectBulkremove()\n {\n }", "public function delete_from_aweber_list($post_data = array(),$list_id = null ){\n\n \t\t$aweber = new AWeberAPI($this->aweber_consumerKey, $this->aweber_consumerSecret);\n // dd($aweber);\n\n\t\ttry {\n\n\t\t $account = $aweber->getAccount($this->aweber_accessKey , $this->aweber_accessSecret);\n\t\t $lists = $account->lists->find(array('name' => $list_id));\n\t\t $list = $lists[0];\n\n\t\t # lets create some custom fields on your list!\n\t\t $custom_fields = $list->custom_fields;\n\t\t $params = array(\n\t\t 'email' => $post_data['email']\n\n\t\t );\n\n\t\t $subscribers = $list->subscribers;\n\t\t $found_subscribers = $subscribers->find($params);\n\t\t foreach ($found_subscribers as $subscriber) {\n\t\t $subscriber->delete();\n\t\t }\n\n\t\t # success!\n\t\t //print \"A new subscriber was added to the $list->name list!\";\n\t\t return true;\n\n\t\t} catch(AWeberAPIException $exc) {\n\t\t return false;\n\t\t}\n\n}", "public function testDelete() {\n $this->initializePurgersService(['c']);\n $this->drupalLogin($this->adminUser);\n $this->drupalGet(Url::fromRoute($this->route, ['id' => 'id0']));\n $this->assertRaw('Yes, delete this purger!');\n $this->assertTrue(array_key_exists('id0', $this->purgePurgers->getPluginsEnabled()));\n $json = $this->drupalPostAjaxForm(Url::fromRoute($this->route, ['id' => 'id0'])->toString(), [], ['op' => 'Yes, delete this purger!']);\n $this->assertEqual('closeDialog', $json[1]['command']);\n $this->assertEqual('redirect', $json[2]['command']);\n $this->purgePurgers->reload();\n $this->assertTrue(is_array($this->purgePurgers->getPluginsEnabled()));\n $this->assertTrue(empty($this->purgePurgers->getPluginsEnabled()));\n $this->assertEqual(3, count($json));\n // Assert that deleting a purger that does not exist, passes silently.\n $json = $this->drupalPostAjaxForm(Url::fromRoute($this->route, ['id' => 'doesnotexist'])->toString(), [], ['op' => 'Yes, delete this purger!']);\n $this->assertEqual('closeDialog', $json[1]['command']);\n $this->assertEqual(2, count($json));\n }", "public function test_delete_item() {}", "public function test_delete_item() {}", "function removeFromSlideshow()\r\n\t{\r\n\t\t$art_object_id = $this->input->post('art_object_id');\r\n\t\t\r\n\t\t$result = $this->artobject_model->deleteFromSlideshow($art_object_id);\r\n\t\tif($result)\r\n\t\t{\r\n\t\t\t$url = base_url('admin/manageArt/0/slideshowDeleted');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$url = base_url('admin/manageArt/0/slideshowDeletedFailed');\r\n\t\t}\r\n\t\tredirect($url);\r\n\t}" ]
[ "0.80611134", "0.6175651", "0.6084192", "0.5854993", "0.5779039", "0.56939197", "0.5672255", "0.5665499", "0.5657381", "0.56455123", "0.5625484", "0.5580941", "0.5545405", "0.55362356", "0.55231667", "0.5510384", "0.54702806", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.54108536", "0.5387946", "0.5368878", "0.53483593", "0.5329022", "0.5326617", "0.5322544", "0.52952904", "0.5282376", "0.52662706", "0.5248388", "0.5248029", "0.52471995", "0.5243253", "0.5213637", "0.5195592", "0.5185584", "0.51674104", "0.51659966", "0.51627666", "0.5160782", "0.51545864", "0.5147323", "0.514606", "0.5145566", "0.51261955", "0.51249903", "0.51112497", "0.5110816", "0.5109", "0.51066697", "0.51066697", "0.51066697", "0.51066697", "0.5105636", "0.5105599", "0.5104418", "0.5101762", "0.5099114", "0.5098535", "0.5094011", "0.5084102", "0.507908", "0.50744617", "0.50734925", "0.5070007", "0.50650406", "0.50618935", "0.5061009", "0.5060796", "0.50563663", "0.5051345", "0.50493735", "0.5048876", "0.5045705", "0.50368565", "0.50297165", "0.5026636", "0.5026262", "0.50229555", "0.50219744", "0.50198764", "0.50064737", "0.5006049", "0.4998601", "0.4997687", "0.49960074", "0.49865448", "0.49865448", "0.49796006" ]
0.83671415
0
Test case for webinarPollCreate Create a Webinar's Poll.
public function testWebinarPollCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollGet()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function createpollAction(Request $request)\n {\n $poll = new PollImpl();\n $form = $this->createForm(new NewPoll(), $poll);\n\n $form->handleRequest($request);\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($poll);\n $em->flush();\n $id = $poll->getId();\n return $this->redirect($this->generateUrl('poll_add_question', array(\"poll_id\" => $id)));\n }\n return $this->render('PollPollBundle:Poll:create_poll.html.twig', array('form' => $form->createView()));\n }", "public function store(CreatePollRequest $request)\n {\n $this->poll->create($request->all());\n\n return redirect()->route('admin.iquiz.poll.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('iquiz::polls.title.polls')]));\n }", "public function testWebinarPolls()\n {\n }", "public function create()\n {\n return view('polls.pollCreate'); \n }", "public function testWebinarCreate()\n {\n }", "private function create()\n {\n $events = [\n Webhook::EVENT_CONVERSATION_CREATED,\n Webhook::EVENT_CONVERSATION_UPDATED,\n Webhook::EVENT_MESSAGE_CREATED,\n Webhook::EVENT_MESSAGE_UPDATED,\n ];\n\n $chosenEvents = $this->choice(\n 'What kind of event you want to create',\n $events,\n $defaultIndex = null,\n $maxAttempts = null,\n $allowMultipleSelections = true\n );\n\n $webhookUrl = $this->ask('Please enter the webhook URL'); \n\n $webhook = new Webhook();\n $webhook->events = $chosenEvents;\n $webhook->channelId = $this->whatsAppChannelId;\n $webhook->url = $webhookUrl;\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->create($webhook);\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "protected function createPollRecord(array $data)\n {\n return Poll::create($data);\n }", "public function testWebinarPollDelete()\n {\n }", "public function actionCreate()\n {\n $model = new Poll();\n\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $model->startdate = strtotime($model->startdate);\n $model->enddate = strtotime($model->enddate);\n $model->created_by = Yii::$app->user->identity->getEmployeeNo();\n\n //Yii::$app->recruitment->printrr($model); exit;\n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function testWebinarRegistrantCreate()\n {\n }", "function create_poll () {\n\t\treturn is_object($this->POLL_OBJ) ? $this->POLL_OBJ->_create(array(\"common\" => 1)) : \"\";\n\t}", "public function create()\n {\n return view('poll.create');\n }", "public function createPoll($client_project_id = null) {\r\n // Poll for this project already exists\r\n $poll = $this->find('first', array(\r\n 'conditions' => array(\r\n 'Poll.client_project_id' => $client_project_id\r\n )\r\n ));\r\n // Get project details\r\n $this->ClientProject->Behaviors->load('Containable');\r\n $project = $this->ClientProject->find('first', array(\r\n 'conditions' => array(\r\n 'ClientProject.id' => $client_project_id\r\n ),\r\n 'contain' => array(\r\n 'User',\r\n 'Client',\r\n 'ClientProjectBudget' =>array(\r\n 'ClientProjectBudgetPosition',\r\n ),\r\n 'ClientProjectShedule'\r\n )\r\n ));\r\n\r\n // Project does not exists\r\n // Poll already exists\r\n if (empty($project) || !empty($poll)) {\r\n return false;\r\n }\r\n\r\n // Create poll array\r\n $data['Poll'] = array(\r\n 'client_project_id' => $project['ClientProject']['id']\r\n );\r\n \r\n $data['PollQuestion'] = $this->buildQuestions($project['ClientProjectShedule'], $project['Client']['user_id']);\r\n// $data['PollQuestion'] = $this->buildQuestions($project['ClientProjectBudget']['ClientProjectBudgetPosition'], $project['Client']['user_id']);\r\n\r\n // Save poll along with associated data\r\n $result = $this->saveAssociated($data, array(\r\n 'validate' => false,\r\n 'deep' => true,\r\n ));\r\n\r\n return $result;\r\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function polls_post($pollId=NULL){\n //Temporary workaround as I can't access PUT data for some reason\n if ($pollId){\n $this->polls_put($pollId);\n return;\n }\n\n $this->load->model(\"poll\");\n $this->load->model(\"answer\");\n\n try {\n $data = json_decode(trim(file_get_contents('php://input')), true);\n //Validate the poll\n $errors = $this->validate($data);\n if (count($errors) > 0){\n $this->response(array(\"errors\"=>$errors), 404);\n return;\n }\n\n //Question and title don't need html escaping, angular is magic\n $pollId = $this->poll->create($data[\"title\"], $data[\"question\"]);\n $answers = $data[\"answers\"];\n $answers_count = count($answers);\n\n //Insert all the answers\n for ($i = 0; $i < $answers_count; ++$i) {\n $answers[$i][\"optionNo\"] = $i + 1;\n $answers[$i][\"questionId\"] = $pollId;\n\n //Answer doesn't need html escaping, angular is magic\n $this->answer->create($pollId, $i, $answers[$i][\"answer\"]);\n }\n\n header(\"Location: /services/polls/$pollId\");\n $this->response(NULL, 201);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Unable to create poll!\"), 404);\n }\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function newpoll_submit(){\n SiteController::loggedInCheck();\n\n\t\tif (isset($_POST['Cancel'])) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\texit();\n\t\t}\n\n\t\t//get forumId from the group\n\t\t$groupId = $_POST['groupId'];\n\t\t$group_entry = Group::loadById($groupId);\n\t\t$forumId = $group_entry->get('forumId');\n\n\t\t$title = $_POST['title'];\n\t\t$author = $_SESSION['username'];\n\t\t$timestamp = date(\"Y-m-d\", time());\n\t\t$options = $_POST['options']; //array\n\n\t\t//get author's id\n\t\t$user_row = User::loadByUsername($author);\n\t\t$userid = $user_row->get('id');\n\n\t\t//create poll\n\t\t$poll = new Poll();\n\t\t$poll->set('userId', $userid);\n\t\t$poll->set('title', $title);\n\t\t$poll->set('forumId', $forumId);\n\t\t$poll->set('timestamp', $timestamp);\n\t\t$poll->save();\n\n\t\t//add options\n\t\tforeach ($options as $option){\n\t\t\t$poll_option = new PollOption();\n\t\t\t$poll_option->set('pollId', $poll->get('id'));\n\t\t\t$poll_option->set('poll_option', $option);\n\t\t\t$poll_option->save();\n\t\t}\n\t\theader('Location: '.BASE_URL);\t\t\t\t\t\t\t\t\t\t\t\t//TODO update\n\t}", "public function newpoll(){\n SiteController::loggedInCheck();\n\n\t\tinclude_once SYSTEM_PATH.'/view/newpoll.tpl'; //TODO make sure the tpl is correct\n\t}", "public function testCreateSurvey()\n {\n $data = [\n 'year' => 2020,\n 'type' => Survey::TRAINER,\n 'title' => 'My Awesome Survey',\n 'prologue' => 'Take the survey',\n 'epilogue' => 'Did you take it?'\n ];\n\n $response = $this->json('POST', 'survey', [\n 'survey' => $data\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', $data);\n }", "public function add_poll()\n {\n\n $method = $_SERVER['REQUEST_METHOD'];\n\n\n if ($method != 'POST') {\n\n json_output(400, array('status' => 400, 'message' => 'Bad request.'));\n } else {\n\n $check_auth_client = $this->auth_model->check_auth_client();\n\n\n if ($check_auth_client == true) {\n\n $response = $this->auth_model->auth();\n\n if ($response['status'] == 200) {\n\n $this->load->model('Table_poll_model');\n\n $returned_string = $this->Table_poll_model->add_poll();\n\n $response = array();\n $response['success'] = '1';\n $response['message'] = 'Uploaded';\n $response['return'] = $returned_string;\n\n echo json_encode($response);\n\n }\n }\n }\n\n\n }", "public function actionCreate() {\n $model = new Surveys();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->validate() == TRUE) {\n // print_r($model);\n $model->save();\n Yii::$app->session->setFlash('success', \"Poll Created Succsesfully\");\n\n return $this->redirect('create');\n } else {\n $sessions = Yii::$app->session->set(\"Error\", \"Error when creating Survey\");\n }\n //print_r($model);\n //return $this->redirect(['view', 'id' => $model->survey_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n $poll=new Polls();\n return view('admin.polls.edit')->withPoll($poll);\n }", "public function store(CreatePollTypeAPIRequest $request)\n {\n $input = $request->all();\n\n $pollType = $this->pollTypeRepository->create($input);\n\n return $this->sendResponse(new PollTypeResource($pollType), 'Poll Type saved successfully');\n }", "public function testEventCreate()\n {\n $response = $this->get('events/create');\n\n $response->assertStatus(200);\n }", "public function store(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => ['required'],\n 'description' => ['required'],\n 'deadline1' => ['required'],\n 'deadline2' => ['required'],\n 'choices1' => ['required']\n ]);\n\n if ($validator->fails()) {\n return redirect()->back()->withInput()->with('status', 'Create Failed!');\n }\n\n \n $crud = Poll::create([\n 'title' => $request->title,\n 'description' => $request->description,\n 'deadline' => $request->deadline1.' '.$request->deadline2,\n 'created_by' => Auth::user()->id\n ]);\n \n if ($crud) {\n $poll_id = Poll::findOrFail($id);\n for ($a=1; $a <= 5; $a++) { \n if ($request->input('choices'.$a)) {\n $crud2 = Choice::create([\n 'choices' => $request->input('choices'.$a),\n 'poll_id' => $poll_id->id\n ]);\n } else {}\n }\n return redirect()->route('poll')->with('status', 'Poll Created!');\n if ($crud2) {\n return redirect()->route('poll')->with('status', 'Poll Created!');\n } else {\n return redirect()->back()->withInput()->with('status', 'Create Failed!');\n }\n } else {\n return redirect()->back()->withInput()->with('status', 'Create Failed!');\n }\n }", "function createWebinar($payloadArray)\n {\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars'));\n\n $webinarObject = new WebinarEntity($payloadArray);\n\n return $this->sendRequest('POST', $path, $parameters = null, $payload = $webinarObject->toArray());\n }", "public function run()\n {\n $poll = new Poll();\n $poll->title = \"This is a simple poll from admin panel\";\n $poll->slug = \"this-is-a-simple-poll-from-admin-panel\";\n $poll->status = 1;\n $poll->start_date = \"2020-06-14\";\n $poll->end_date = \"2020-06-15\";\n $poll->total_yes = 5;\n $poll->total_no = 2;\n $poll->total_no_comment = 1;\n $poll->save();\n\n $poll = new Poll();\n $poll->title = \"This is another poll from admin panel\";\n $poll->slug = \"this-is-another-poll-from-admin-panel\";\n $poll->status = 0;\n $poll->start_date = \"2020-06-15\";\n $poll->end_date = \"2020-06-16\";\n $poll->total_yes = 7;\n $poll->total_no = 11;\n $poll->total_no_comment = 3;\n $poll->save();\n }", "public function create()\n {\n $polls = Poll::all();\n $menuSections = Section::where('level', 1)\n ->where('topnav_back', 1)\n ->where('active', 1)->get();\n\n $menuLeftSections = Section::where('level', 1)\n ->where('active', 1)->get();\n\n $countries = Country::orderBy('name', 'ASC')->get();\n $provinces = Province::orderBy('name', 'ASC')->get();\n $helps = Help::all();\n\n $not_responded = Contact::where('contacted', 0)->get()->count();\n\n return view('backend.polls.create', compact('polls', 'not_responded', 'helps', 'countries', 'provinces', 'menuSections', 'menuLeftSections'));\n }", "public function testStoreShouldCreateNewRiddle(){\n\t\t$riddle = [\n\t\t\t'solution' => 'solution',\n\t\t\t'riddle' => 'riddle',\n\t\t\t'name' => 'name',\n\t\t];\n\n\n\t\t$response = $this->call('POST', '/riddles', $riddle);\n\n\t\t$this->assertEquals(302, $response->status());\n\t\t$this->assertRedirectedTo(url('/riddles/1?successMessage=Record+Added+Successfully'));\n\n\t\t$this->assertEquals(1, count(Riddle::all()));\n\n\t\t$storedRiddle = Riddle::findById(1);\n\t\t$this->assertNotNull($storedRiddle);\n\n\t\t$this->assertEquals('solution', $storedRiddle->solution);\n\t\t$this->assertEquals('riddle', $storedRiddle->riddle);\n\t\t$this->assertEquals('name', $storedRiddle->name);\n\n\t\t$this->assertEquals(0, $storedRiddle->approved);\n\t\t$this->assertEquals(0, $storedRiddle->public);\n\t\t$this->assertEquals($this->user->id, $storedRiddle->owner_id);\n\t}", "public function testPolicyCanBeCreated()\n {\n $policy = factory(App\\Models\\Policy::class)->create([\n 'title' => 'Administrator',\n ]);\n\n $this->assertEquals($policy->title, 'Administrator');\n\n $this->seeInDatabase('policies', ['id' => '1', 'title' => 'Administrator']);\n }", "public function testWebinar()\n {\n }", "function target_add_poll($poll)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $poll['name']);\n\n\tif ($poll['owner'] == 1 && isset($GLOBALS['hack_id'])) {\n\t\t$poll['owner'] = $GLOBALS['hack_id'];\n\t}\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'poll (id, name, owner, creation_date, expiry_date, forum_id)\n\tVALUES(\n\t\t'. (int)$poll['id'] .',\n\t\t'. _esc($poll['name']) .',\n\t\t'. (int)$poll['owner'] .',\n\t\t'. (int)$poll['creation_date'] .',\n\t\t'. (int)$poll['expiry_date'] .',\n\t\t'. $GLOBALS['forum_map'][ (int)$poll['forum_id'] ] .')'\n\t);\n\n\tq('UPDATE '. $GLOBALS['DBHOST_TBL_PREFIX'] .'msg SET poll_id='. (int)$poll['id'] .' WHERE id='. (int)$poll['post_id']);\n}", "public function store(Request $request)\n {\n $poll=Polls::create([\n 'title'=>$request->input('title'), \n 'description'=>$request->input('description'),\n 'videosrc'=>$request->input('videosrc'),\n 'videoposter'=>$request->input('videoposter'), \n 'starttime'=>$request->input('starttime'),\n 'endtime'=>$request->input('endtime'),\n 'rewardflag'=>$request->input('rewardflag')\n ]);\n return redirect('/admin/polls')\n ->withSuccess(\"'$poll->title' 新建成功.\");\n }", "public function testSellerCreateSuccess()\n {\n $this->demoUserLoginIn();\n $response = $this->call('GET', '/seller/create');\n $this->assertEquals(200, $response->status());\n }", "public function create($id)\n {\n $id = $id;\n return view('admin.poll.create', compact('id'));\n }", "public function create(Request $data) {\n \t$vote = new BookVote;\n \t$vote->poll_id = $data->poll_id;\n \t$vote->user_id = $data->user_id;\n \t$vote->vote = $data->vote;\n \t$vote->save();\n\n \treturn response()->json(true, 200);\n }", "public function testWebinarUpdate()\n {\n }", "protected function reportWebinarPollsRequest($webinar_id)\n {\n // verify the required parameter 'webinar_id' is set\n if ($webinar_id === null || (is_array($webinar_id) && count($webinar_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $webinar_id when calling reportWebinarPolls'\n );\n }\n\n $resourcePath = '/report/webinars/{webinarId}/polls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($webinar_id !== null) {\n $resourcePath = str_replace(\n '{' . 'webinarId' . '}',\n ObjectSerializer::toPathValue($webinar_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function testGetAllPolls()\n {\n Passport::actingAs(\n factory(\"App\\User\")->create(),\n ['*']\n );\n $polls= factory(\"App\\Poll\",5)->create();\n $response = $this->get('/polls');\n $response->assertStatus(200);\n $response->assertJson($polls->toArray());\n }", "public function create()\n {\n return view('iquiz::admin.polls.create');\n }", "public function testCreate()\n\t{\n\t\tRoute::enableFilters();\n\t\tEvaluationTest::adminLogin();\n\t\t$response = $this->call('GET', '/evaluation/create');\n\t\t\n\t\t$this->assertResponseOk();\n\n\t\tSentry::logout();\n\t\t\n\t\t//tesing that a normal user can't retrieve a form to create \n\t\t//an evaluation and that a page displays a message as to why they can't\n\t\tEvaluationTest::userLogin();\n\t\t$crawler = $this->client->request('GET', '/evaluation/create');\n\t\t$message = $crawler->filter('body')->text();\n\n\t\t$this->assertFalse($this->client->getResponse()->isOk());\n\t\t$this->assertEquals(\"Access Forbidden! You do not have permissions to access this page!\", $message);\n\n\t\tSentry::logout();\n\t}", "public function create(\\Marat555\\Eventbrite\\Factories\\Entity\\Webhook $webhook);", "public function executeCreate(sfWebRequest $request)\n {\n $this->forward404Unless($request->isMethod(sfRequest::POST));\n $this->form = new WebsitePracticeAreaForm();\n $this->websitedetail = UsersWebsite::getUsersWebsiteId($this->getUser()->getAttribute('admin_user_id'));\n $this->displaySlugValue = $_POST['WebsitePracticeArea']['Newslug'];\n $redirectFlag = $request->getPostParameter('submit');\n $this->processForm($request, $this->form, $redirectFlag);\n $this->setTemplate('new');\n }", "public function test_is_valid_resource() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://fake.tld',\n\t\t\t'topic' => 'course.created',\n\t\t) );\n\n\t\t$course = $this->factory->post->create_and_get( array( 'post_type' => 'course' ) );\n\n\t\tglobal $wp_current_filter;\n\t\t$wp_current_filter = array( 'save_post_course' );\n\t\t$this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_resource', array( array( $course->ID, $course ) ) ) );\n\n\t\t// Alter the post creation date so to simulate an update: A resource is considered created when the hook is executed within 10 seconds of the post creation date.\n\t\t$course->post_date = date( 'Y-m-d H:i:s', strtotime('-11 seconds') );\n\t\twp_update_post( $course );\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_resource', array( array( $course->ID, $course ) ) ) );\n\t\t$wp_current_filter = array();\n\n\t\t// it's a draft.\n\t\t$course->post_status = 'auto-draft';\n\t\twp_update_post( $course );\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_resource', array( array( $course->ID, $course ) ) ) );\n\n\t}", "public function addquestionAction(Request $request, $poll_id)\n {\n $em = $this->getDoctrine()->getManager();\n $poll = $em->getRepository('PollPollBundle:PollImpl')->find($poll_id);\n $title = $poll->getTitle();\n\n $form = $this->createForm(new NewQuestion());\n\n $form->handleRequest($request);\n if ($form->isValid()) {\n $data = $form->getViewData();\n // create question entity and fill the data\n $question = new QuestionImpl();\n $question->setPollId($poll);\n $question->setQuestionType($data[\"type\"]);\n $question->setQuestion($data[\"question_text\"]);\n $em->persist($question);\n $em->flush();\n\n if (in_array($data[\"type\"], array(\n ObjectFactory::SINGLE_CHOICE_QUESTION,\n ObjectFactory::MULTIPLE_CHOICE_QUESTION))) {\n $options = $data[\"options\"];\n $options = preg_split('/\\R/', $options);\n\n $question_entity = $em->getRepository('PollPollBundle:QuestionImpl')->find($question->getId());\n\n foreach ($options as $opt) {\n // create option entity and fill the data\n $option = new OptionImpl();\n $option->setPoll($poll);\n $option->setOption($opt);\n $option->setQuestion($question_entity);\n $em->persist($option);\n }\n $em->flush();\n }\n\n $next_action = $form->get('done')->isClicked() ? 'poll_show_one' : 'poll_add_question';\n return $this->redirect($this->generateUrl($next_action, array(\"poll_id\" => $poll_id)));\n }\n return $this->render('PollPollBundle:Poll:add_question.html.twig', array(\n 'form' => $form->createView(),\n 'title' => $title));\n }", "public function testCanCreateUserObject()\n {\n $s = json_decode('{\"url\":\"https://www.test.net:8443/webhook\",\"has_custom_certificate\":true,\"pending_update_count\":0,\"max_connections\":40}');\n $t = new WebhookInfo($s);\n $this->assertInstanceOf(WebhookInfo::class, $t);\n $this->assertEquals('https://www.test.net:8443/webhook', $t->url);\n $this->assertTrue($t->has_custom_certificate);\n }", "public function testWebinarStatus()\n {\n }", "private function buildVenueSurvey()\n {\n $this->year = current_year();\n\n $this->trainer = Person::factory()->create();\n\n $this->survey = Survey::factory()->create(['year' => $this->year, 'position_id' => Position::TRAINING]);\n $surveyId = $this->survey->id;\n\n $this->venueGroup = SurveyGroup::factory()->create(['survey_id' => $surveyId, 'sort_index' => 1]);\n $this->venueQuestion = SurveyQuestion::factory()->create(['survey_id' => $surveyId, 'survey_group_id' => $this->venueGroup->id]);\n\n $this->trainerGroup = SurveyGroup::factory()->create(['survey_id' => $surveyId, 'type' => 'trainer', 'sort_index' => 2]);\n $this->trainerQuestion = SurveyQuestion::factory()->create(['survey_id' => $surveyId, 'survey_group_id' => $this->trainerGroup->id]);\n\n $this->slot = Slot::factory()->create([\n 'description' => 'Venue 1',\n 'position_id' => Position::TRAINING,\n 'begins' => \"{$this->year}-01-01 00:00\",\n 'ends' => \"{$this->year}-01-01 00:01\"\n ]);\n PersonSlot::factory()->create(['person_id' => $this->user->id, 'slot_id' => $this->slot->id]);\n TraineeStatus::factory()->create(['person_id' => $this->user->id, 'slot_id' => $this->slot->id, 'passed' => true]);\n $this->trainerSlot = Slot::factory()->create([\n 'description' => 'Venue 1',\n 'position_id' => Position::TRAINER,\n 'begins' => \"{$this->year}-01-01 00:00\",\n 'ends' => \"{$this->year}-01-01 00:01\"\n ]);\n PersonSlot::factory()->create(['person_id' => $this->trainer->id, 'slot_id' => $this->trainerSlot->id]);\n TrainerStatus::factory()->create([\n 'person_id' => $this->trainer->id,\n 'slot_id' => $this->slot->id,\n 'trainer_slot_id' => $this->trainerSlot->id,\n 'status' => TrainerStatus::ATTENDED\n ]);\n }", "public function testWebinarRegistrants()\n {\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 store(Request $request)\n {\n $newPoll = new NewPoll;\n $newPoll->poll_message = $request->createPoll;\n $newPoll->invite_id = $request->id;\n $newPoll->save();\n\n return back()->withInput();\n }", "public function testCanCreateCourse()\n {\n \n $response = $this->call('POST', '/course', [\n 'name' => 'Kursur PHP Advance',\n 'level' => 'Beginner',\n 'benefit' => 'Bisa membuat website sendiri'\n ]);\n $this->assertEquals(201, $response->status());\n }", "public function testMeetingCreatePost()\n {\n $user = factory(App\\User::class)->create();\n }", "public function testVenueSubmitSurvey()\n {\n $this->buildVenueSurvey();\n\n $venueG = $this->venueGroup;\n $venueQ = $this->venueQuestion;\n\n $response = $this->json('POST', 'survey/submit', [\n 'slot_id' => $this->slot->id,\n 'type' => Survey::TRAINING,\n 'survey' => [\n [\n 'survey_group_id' => $venueG->id,\n 'answers' => [\n [\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]\n ]\n ],\n ]\n ]);\n\n $response->assertStatus(200);\n\n $this->assertDatabaseHas('survey_answer', [\n 'person_id' => $this->user->id,\n 'slot_id' => $this->slot->id,\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]);\n }", "public function user_can_visit_create_event_page()\n {\n $response = $this->get('/events/create');\n $response->assertStatus(200);\n $response->assertSeeText('Name');\n }", "public function __construct(Poll $poll, ObjectFactory $factory)\n\t{\n\t\t$this->objectFactory = $factory;//new LocalObjectFactory;\n\t\t$this->poll = $poll; //$objectFactory.createPoll();\n\t\t$this->questions = array();\n\t\t// $this->options = array();\n\t}", "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 testWebinarRegistrantStatus()\n {\n }", "public function testCreateSurvey0()\n {\n }", "public function testCreateSurvey0()\n {\n }", "public function test_shoppers_create_page_is_rendered()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $response = $this->get(route('shoppers.create'));\n\n $response->assertStatus(200);\n }", "public function create($websiteId, $prospect) {\n // @TODO - add support for api call\n throw new \\Exception('Not implemented');\n }", "public function testWebinarAbsentees()\n {\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function create()\n\t{\n\t\t$input = JFactory::getApplication()->input;\n\t\t$db = JFactory::getDbo();\n\t\t$view = $this->getView('pbbooking','html');\n\t\t$config = $db->setQuery('select * from #__pbbooking_config')->loadObject();\n\t\t\n\t\t$dateparam = $input->get('dtstart',date_create('now',new DateTimeZone(PBBOOKING_TIMEZONE))->format('YmdHi'),'string');\n\t\t$cal_id = $input->get('cal_id',0,'integer');\n\t\t$opening_hours = json_decode($config->trading_hours,true);\n\t\t$closing_time_arr = str_split( $opening_hours[date_create($dateparam,new DateTimezone(PBBOOKING_TIMEZONE))->format('w')]['close_time'],2 );\n\t\t\n\t\t$view->dateparam = date_create($dateparam,new DateTimeZone(PBBOOKING_TIMEZONE));\n\t\t$view->customfields = $db->setQuery('select * from #__pbbooking_customfields')->loadObjectList();\n\t\t$view->treatments = $db->setQuery('select * from #__pbbooking_treatments')->loadObjectList();\n\t\t$view->cal = new Calendar();\n\t\t$view->cal->loadCalendarFromDbase(array((int)$cal_id));\n\t\t$view->closing_time = clone $view->dateparam;\n\t\t$view->closing_time->setTime((int)$closing_time_arr[0],(int)$closing_time_arr[1],0);\n\t\t$view->config = $config;\n\n\t\t$view->setLayout('create');\n\t\t$view->display();\n\t}", "public function testBookCreatedSuccessfully()\n {\n $book = factory(Book::class)->make();\n \n $payload = [\n 'title' => $book->title,\n 'isbn' => $book->isbn,\n 'published_at' => $book->published_at,\n ];\n\n $this->json('post', '/api/books/create', $payload, $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure([\n 'message'\n ]);\n }", "public function testVolunteerHourCreateForContactSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/volunteer/'.$volunteerID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function test_add_new_wall_route() {\n global $CFG;\n\n // request the page\n $client = new Client($this->_app);\n $crawler = $client->request('GET', '/' . $this->_walls[0]->id . '/add');\n $this->assertTrue($client->getResponse()->isOk());\n\n // post some data\n $form = $crawler->selectButton(get_string('savechanges'))->form();\n $client->submit($form, array(\n 'form[title]' => 'Title 001',\n ));\n\n // expect to get redirected to the wall that was added\n $url = $CFG->wwwroot . SLUG . $this->_app['url_generator']->generate('wall', array(\n 'id' => 6,\n ));\n $this->assertTrue($client->getResponse()->isRedirect($url));\n }", "public function actionCreate()\n {\n $model = new WebinarCreateRequest();\n\n if ($model->load(Yii::$app->request->post()) ) {\n $model->status = Status::STATUS_NEW;\n $model->created_at = gmdate('Y-m-d H:i:s');\n $model->updated_at = gmdate('Y-m-d H:i:s');\n $model->created_by = $model->author_name;\n $model->updated_by = $model->author_name;\n $user = $model->author_name;\n $model->save();\n\n if($this->sendActivationLink($model->id, $model->email, $user)) {\n return $this->render('create', [\n 'model' => $model, \n 'status' => 'success', 'id' => $model->id]);\n }\n \n //return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function testHandleCreate(): void\n {\n $query = 'SELECT * FROM [nt:unstructured]';\n $locale = 'fr';\n $primarySelector = 'p';\n\n $this->queryCreateEvent->getInnerQuery()->willReturn($query);\n $this->queryCreateEvent->getLocale()->willReturn($locale);\n $this->queryCreateEvent->getOptions()->willReturn([]);\n $this->queryCreateEvent->getPrimarySelector()->willReturn($primarySelector);\n $this->queryManager->createQuery($query, 'JCR-SQL2')->willReturn($this->phpcrQuery->reveal());\n $this->queryCreateEvent->setQuery(new Query(\n $this->phpcrQuery->reveal(),\n $this->dispatcher->reveal(),\n $locale,\n [],\n $primarySelector\n ))->shouldBeCalled();\n\n $this->subscriber->handleCreate($this->queryCreateEvent->reveal());\n }", "public function testCreate()\n {\n VCR::insertCassette('pickups/create.yml');\n\n $shipment = Shipment::create(Fixture::oneCallBuyShipment());\n\n $pickupData = Fixture::basicPickup();\n $pickupData['shipment'] = $shipment;\n\n $pickup = Pickup::create($pickupData);\n\n $this->assertInstanceOf('\\EasyPost\\Pickup', $pickup);\n $this->assertStringMatchesFormat('pickup_%s', $pickup->id);\n $this->assertNotNull($pickup->pickup_rates);\n }", "public function testStoreCreate()\n {\n $user = factory(User::class)->create(['id' => 1]);\n $postData = [\n 'slots' => ['10:00', '13:00', '16:00', '19:00']\n ];\n $this->actingAs($user)\n ->post(route('schedule.store'), $postData);\n $this->assertDatabaseHas('schedules', [\n 'user_id' => $user->id,\n 'date' => $tomorrow = Carbon::tomorrow()->format(config('app.date_format_db'))])\n ->assertDatabaseHas('slots', ['slot' => '10:00'])\n ->assertDatabaseHas('slots', ['slot' => '13:00'])\n ->assertDatabaseHas('slots', ['slot' => '16:00'])\n ->assertDatabaseHas('slots', ['slot' => '19:00']);\n }", "public function createBooking(array $data);", "public function testHandleCreateSuccess()\n {\n // Populate data\n $this->_populate();\n \n $response = $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/create', $this->customDealerAccountData, [], [], ['HTTP_REFERER' => '/dealer-account/create']);\n \n $this->assertRedirectedTo('/dealer-account');\n $this->assertSessionHas('dealer-account-created', '');\n }", "public function test_add_status_event()\n {\n $employer = Employer::factory()->create();\n $status = EmployerStatus::create([\n \"employer_id\" => $employer->id,\n \"online_at\" => $online_at = Carbon::now(),\n\n ]);\n $this->assertDatabaseHas(\"employer_statuses\", [\n \"employer_id\" => (string)$employer->id,\n \"online_at\" => $online_at,\n\n ]);\n }", "public function testListPastWebinarQA()\n {\n }", "public function testVolunteerHourCreateForProjectSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $testProjectID = 1;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/project/'.$testProjectID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function testCreateNew(): void\n {\n $requestHandler = $this->createInstance();\n $request = $requestHandler->create();\n\n self::assertInstanceOf(ActivityStub::class, $request);\n }", "public function create(CreateNewOfferRequest $request) {\n\n // Create new paymill request\n $paymillRequest = new \\Paymill\\Request(env('PAYMILL_API_KEY'));\n\n $currency = 'EUR';\n $interval = '1 MONTH';\n\n // Create new offer\n $paymillOffer = new \\Paymill\\Models\\Request\\Offer();\n $paymillOffer->setAmount($request->get('offer_amount'))\n ->setCurrency($currency)\n ->setInterval($interval)\n ->setName($request->get('offer_name'));\n\n $response = $paymillRequest->create($paymillOffer);\n\n $promoCode = $request->get('promo_code');\n $enableOffer = $request->get('enable_offer');\n $useOnSignUp = $request->get('use_on_sign_up');\n\n // If this offer will be used on sign up make sure it is the only one\n if ($useOnSignUp) {\n Offer::where('use_on_sign_up', true)->update(['use_on_sign_up' => false]);\n $promoCode = '';\n $enableOffer = false;\n }\n\n // An enabled offer can not be used on sign up\n if ($enableOffer) {\n $useOnSignUp = false;\n }\n\n // Save in database\n Offer::create([\n 'paymill_offer_id' => $response->getId(),\n 'name' => $request->get('offer_name'),\n 'amount' => $request->get('offer_amount'),\n 'interval' => $interval,\n 'currency' => $currency,\n 'promo_code' => $promoCode,\n 'use_on_sign_up' => (bool)$useOnSignUp,\n 'disabled' => !(bool)$enableOffer\n ]);\n\n // Return response\n $ajaxResponse = new AjaxResponse();\n $ajaxResponse->setSuccessMessage(trans('offers.offer_created'));\n return response($ajaxResponse->get())->header('Content-Type', 'application/json');\n }", "public function create()\n {\n return View::make('polys.create');\n }", "public function createOffer()\n {\n global $mysqli, $_POST;\n $hotel_id = $_POST['hotel_id'];\n $date_begin = date(\"Y-m-d\", strtotime($_POST[\"date_begin\"]));\n $date_end = date(\"Y-m-d\", strtotime($_POST[\"date_end\"]));\n $title = $mysqli->real_escape_string($_POST[\"title\"]);\n $subtitle = $mysqli->real_escape_string($_POST[\"subtitle\"]);\n $header = $mysqli->real_escape_string($_POST[\"header\"]);\n $footer = $mysqli->real_escape_string($_POST[\"footer\"]);\n $services = $mysqli->real_escape_string($_POST[\"services\"]);\n $description = $mysqli->real_escape_string($_POST[\"description\"]);\n $alias = $mysqli->real_escape_string($_POST[\"alias\"]);\n $type = $mysqli->real_escape_string($_POST[\"type\"]);\n $course = $mysqli->real_escape_string($_POST[\"course\"]);\n $status = $mysqli->real_escape_string($_POST[\"status\"]);\n $type_date = $mysqli->real_escape_string($_POST[\"type_date\"]);\n $discount = $mysqli->real_escape_string($_POST[\"discount\"]);\n\n $insert_offer =\"INSERT INTO offers(`hotel_id`,`title`,`subtitle`,`header`,`footer`,`services`,`description`,`alias`,`type`,`type_date`,`course`,`discount`,`date_begin`,`date_end`,`status`,`created_at`)\n VALUES('\".$hotel_id.\"','\".$title.\"','\".$subtitle.\"','\".$header.\"','\".$footer.\"','\".$services.\"','\".$description.\"','\".$alias.\"','\".$type.\"','\".$type_date.\"','\".$course.\"','\".$discount.\"','\".$date_begin.\"','\".$date_end.\"','\".$status.\"',NOW())\";\n $mysqli->query($insert_offer);\n $id = $mysqli->insert_id;\n if($id>0) {\n print json_encode(['success'=>1,'row'=>'']);\n }\n else {\n print json_encode(['success'=>0,'row'=>'']);\n }\n\n }", "public function create()\n {\n $action_plans = ActionPlan::currentReport()->get();\n $observers = Observer::currentReport()->currentUser()->enabled()->get();\n $observer_types = ObserverTypes::optionsWithLabels();\n $data = json_encode(compact('action_plans', 'observers','observer_types'));\n\n return view('pulse-surveys.create', compact('data'));\n }", "public function testCreateBook()\n {\n $this->browse(function (Browser $browser) {\n //Make a book to add \n $book = factory('App\\Book')->make();\n //Navigate to the create page and send the data\n $browser->visit('/api/books/create')\n ->type('title', $book->title)\n ->type('author', $book->author)\n ->press('Add');\n //Check we are redirected to home page with no errors.\n $browser->pause(500);\n $browser->assertPathIs('/api/books')->assertSee('Book was successfully saved');\n //Check the new book is displayed\n $browser \n ->assertSee($book->title)\n ->assertSee($book->author);\n\n });\n\n }", "public function create($observer)\n\t{\n\t\t$webhook\t= Mage::getBaseUrl() . \"compropago/webhook\";\n\t\t$session\t= Mage::getSingleton('adminhtml/session');\n\t\t$publicKey\t= Mage::getStoreConfig('payment/base/publickey');\n\t\t$privateKey\t= Mage::getStoreConfig('payment/base/privatekey');\n\t\t$mode\t\t= intval(Mage::getStoreConfig('payment/base/mode')) == 1;\n\n\t\ttry\n\t\t{\n\t\t\t$objWebhook = (new sdkWebhook)->withKeys($publicKey, $privateKey);\n\n\t\t\t# Create webhook on ComproPago Panel\n\t\t\t$response = $objWebhook->create($webhook);\n\n\t\t\t$session->addSuccess('ComproPago Webhook was registered correctly.');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$errors = [\n\t\t\t\t'Request Error [409]: ',\n\t\t\t];\n\t\t\t$message = json_decode(str_replace($errors, '', $e->getMessage()), true);\n\n\t\t\t# Ignore Webhook registered\n\t\t\tif ( isset($message['code']) && $message['code']==409 )\n\t\t\t{\n\t\t\t\t$session->addSuccess('ComproPago Webhook is registered.');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telseif( isset($message['message']) )\n\t\t\t{\n\t\t\t\tMage::throwException( $message['message'] );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tMage::throwException('$e->getMessage()');\n\t\t\t}\n\t\t}\n\t}", "function create()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t\n\t\tif ($_SERVER['REQUEST_METHOD'] == \"GET\") {\n\t\t\t//render the create form\n\t\t\t$view = $this->getView('manage','html');\n\t\t\t\n\t\t\t//load data\n\t\t\t$db->setQuery('select * from #__pbbooking_customfields');\n\t\t\t$view->customfields = $db->loadObjectList();\n\t\t\t$db->setQuery('select* from #__pbbooking_treatments');\n\t\t\t$view->services = $db->loadObjectList();\n\t\t\t$db->setQuery('select * from #__shbesuche_config');\n\t\t\t$view->config = $db->loadObject();\n\t\t\t$view->date = date_create(JRequest::getVar('date'),new DateTimeZone(SHBESUCHE_TIMEZONE));\n\t\t\t$db->setQuery('select * from #__pbbooking_cals');\n\t\t\t$view->cals = $db->loadObjectList();\n\n\t\t\t//sort out openign and closing times\n\t\t\t$opening_hours = json_decode($view->config->trading_hours,true);\n\t\t\t$opening_time_arr = str_split($opening_hours[$view->date->format('w')]['open_time'],2);\n\t\t\t$closing_time_arr = str_split($opening_hours[$view->date->format('w')]['close_time'],2);\n\t\t\t$view->dt_start = date_create($view->date->format(DATE_ATOM),new DateTimeZone(SHBESUCHE_TIMEZONE));\n\t\t\t$view->dt_end = date_create($view->date->format(DATE_ATOM),new DateTimeZone(SHBESUCHE_TIMEZONE));\n\t\t\t$view->dt_start->setTime($opening_time_arr[0],$opening_time_arr[1]);\n\t\t\t$view->dt_end->setTime($closing_time_arr[0],$closing_time_arr[1]);\n\t\n\t\t\t//display the view\n\t\t\t$view->setLayout('create_event');\n\t\t\tJToolbarHelper::save('create');\n\t\t\t$view->display();\n\t\t}\n\t\tif ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n\t\t\t$_POST['treatment_time'] = $_POST['treatment-time'];\n\t\t\t$event_id = Pbbookinghelper::save_pending_event($_POST);\n\t\t\tif ($event_id) {\n\t\t\t\t$db->setQuery('select * from #__pbbooking_pending where id='.$event_id);\n\t\t\t\t$event = $db->loadObject();\n\t\t\t\t$validated_id = Pbbookinghelper::validate_pending($event_id,$event->email);\n\t\t\t\tif ($validated_id) {\n\t\t\t\t\tif ((int)$_POST['reccur'] == 1) {\n\t\t\t\t\t\tPbbookinghelper::make_recurring($validated_id,$_POST);\n\t\t\t\t\t}\n\t\t\t\t\t$this->setRedirect('index.php?option=com_pbbooking&controller=manage&date='.JRequest::getVar('date'),\"Event \".$validated_id.\" has been added.\");\n\t\t\t\t} else {\n\t\t\t\t\t$this->setRedirect('index.php?option=com_pbbooking&controller=manage&date='.JRequest::getVar('date'),JText::_('COM_SHBESUCHE_VALIDATION_ERROR').' '.$db->getErrorMsg());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->setRedirect('index.php?option=com_pbbooking&controller=manage&date='.JRequest::getVar('date'),JText::_('COM_SHBESUCHE_CREATE_ERROR').' '.$db->getErrorMsg());\n\t\t\t}\n\t\t}\t\n\t}", "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 testHandleCreateSuccess()\n {\n // Populate data\n $this->_populate();\n \n $response = $this->withSession($this->adminSession)\n ->call('POST', '/branch/create', $this->customBranchData, [], [], ['HTTP_REFERER' => '/branch/create']);\n \n $this->assertRedirectedTo('/branch');\n $this->assertSessionHas('branch-created', '');\n }", "public function testProductCreation()\n {\n $response = $this->json('POST', '/api/v1/products', ['name' => 'Sally','sku'=>'Test']);\n\n $response->assertStatus(201)->assertJson(['code' => 201]);\n }", "public function user_can_create_event()\n {\n $user = User::factory()->create();\n $event = Event::factory()->make()->toArray();\n $response = $this->actingAs($user)->post('/events', $event);\n $response->assertStatus(302);\n $this->assertNotNull(Event::where('name', $event['name'])->first());\n }", "protected function setUp()\n {\n parent::setUp();\n $this->webinar = create(Webinar::class);\n }", "public function testHandleCreateEvents()\n {\n $mock_storage_writer_map = Mockery::mock(StorageWriterMap::CLASS)->shouldNotReceive('getItem')->mock();\n $mock_query_service_map = Mockery::mock(QueryServiceMap::CLASS)->shouldNotReceive('getItem')->mock();\n $mock_event_bus = Mockery::mock(EventBus::CLASS)->shouldNotReceive('distribute')->mock();\n\n // prepare and test subject\n $relation_projection_updater = new RelationProjectionUpdater(\n new ArrayConfig([]),\n new NullLogger,\n $mock_storage_writer_map,\n $mock_query_service_map,\n $this->projection_type_map,\n $mock_event_bus\n );\n\n $event = $this->buildEvent([\n '@type' => 'Honeybee\\Projection\\Event\\ProjectionCreatedEvent',\n 'uuid' => '44c4597c-f463-4916-a330-2db87ef36547',\n 'projection_type' => 'honeybee_tests.game_schema.player::projection.standard',\n 'projection_identifier' => 'honeybee.fixtures.player-a726301d-dbae-4fb6-91e9-a19188a17e71-de_DE-1',\n 'data' => []\n ]);\n $relation_projection_updater->handleEvent($event);\n }", "public function testCreate()\n {\n $this->visit('/admin/school/create')\n ->submitForm($this->saveButtonText, $this->school)\n ->seePageIs('/admin/school')\n ;\n\n $this->seeInDatabase('schools', $this->school);\n }", "public function testCreate()\n {\n $this->createInstance();\n $user = $this->createAndLogin();\n\n //test creation as admin\n $res = $this->fConnector->getDiscussionManagement()->postTopic('Hello title', 'My content', [$this->configTest['testTagId']],null)->wait();\n $this->assertInstanceOf(FlarumDiscussion::class,$res);\n $this->assertEquals('Hello title',$res->title, 'Testing discussion creation with admin');\n\n //test creation as user\n $res = $this->fConnector->getDiscussionManagement()->postTopic('Hello title', 'My content', [$this->configTest['testTagId']],$user->userId)->wait();\n $this->assertInstanceOf(FlarumDiscussion::class,$res);\n $this->assertEquals('Hello title',$res->title, 'Testing discussion creation with user');\n\n\n\n }", "public function testWebinarPanelists()\n {\n }", "public function testQuestionCreatePostWithValidData() {\n //Select catalogs\n $catalog = $this->course->catalog()->first();\n $subcatalogs = $catalog->children()->get();\n $ids = array();\n\n foreach ($subcatalogs as $c) {\n $ids[] = $c->id;\n }\n\n $post_data = array(\n 'course' => $this->course->id,\n 'type' => 'Question y',\n 'question' => 'Question y',\n 'answer' => 'Question y',\n 'catalogs' => $ids\n );\n $response = $this->post('question/create', $post_data);\n $this->assertEquals('200', $response->foundation->getStatusCode());\n $this->assertEquals('general.permission', $response->content->view);\n }", "public function create($plan, array $properties = array());", "public function testNew()\n {\n $clientNoAuth = static::createClient();\n $clientNoAuth->request('GET', '/clientes/new');\n //redireccion a main\n $this->assertEquals(302, $clientNoAuth->getResponse()->getStatusCode());\n\n //caso con todo bien, redirección a /departamento/ y bien agregado el nuevo departamento.\n $client = $this->createAuthorizedClient();\n $crawler = $client->request('GET', '/persona/new');\n $form = $crawler->selectButton('Guardar')->form();\n $form['persona[Nombre]'] = 'Celia';\n $form['persona[Apellidos]'] = 'Cruz';\n $form['persona[Cargo]'] = 'Boss';\n $form['persona[Correo]'] = '[email protected]';\n $form['persona[Telefono]'] = '123456789';\n $form['persona[Local_id]'] = '1';\n $form['persona[Departamento]'] = '1';\n\n $crawler = $client->submit($form);\n $this->assertTrue($client->getResponse()->isRedirect());\n $crawler = $client->followRedirect();\n }", "public function create()\n {\n $attributes = validator(request()->all(),\n [\n 'title' => ['required', 'string'],\n 'description' => ['required', 'string'],\n 'lat' => ['required', 'numeric'],\n 'lng' => ['required', 'numeric'],\n 'address_line1' => ['required', 'string'],\n 'hidden' => ['bool'],\n 'price_per_day' => ['required', 'integer', 'min:100'],\n 'monthly_discount' => ['integer', 'min:0'],\n\n 'tags' => ['array'],\n 'tags.*' => ['integer', Rule::exists('tags', 'id')],\n ] \n )->validate();\n\n $attributes['approval_status'] = Office::APPROVAL_PENDING;\n\n $office = auth()->user()->offices()->create(\n Arr::except($attributes, ['tags'])\n );\n\n $office->tags()->sync($attributes['tags']);\n\n return OfficeResource::make($office);\n }" ]
[ "0.645826", "0.64233947", "0.6303108", "0.62919855", "0.6287759", "0.6279859", "0.61923283", "0.59656316", "0.59515786", "0.59352744", "0.5929518", "0.59017617", "0.589709", "0.5864389", "0.5771486", "0.5754985", "0.5707631", "0.5687261", "0.5679037", "0.56305504", "0.5621797", "0.558162", "0.5526383", "0.5512857", "0.551223", "0.5436324", "0.54227895", "0.5414021", "0.5413022", "0.5360863", "0.5351937", "0.53353983", "0.5327531", "0.5325668", "0.53136384", "0.5297932", "0.52841973", "0.52341926", "0.52332693", "0.5231507", "0.5205806", "0.52050585", "0.51654744", "0.51649463", "0.51560414", "0.51409435", "0.510547", "0.51015514", "0.5100825", "0.5099816", "0.50969493", "0.50501233", "0.503632", "0.5027649", "0.50233585", "0.5020792", "0.50161266", "0.50065935", "0.49973834", "0.49707547", "0.49628633", "0.49628633", "0.494406", "0.49366394", "0.49237382", "0.49211353", "0.49010643", "0.49000227", "0.4883732", "0.48792052", "0.48776", "0.48758194", "0.4874905", "0.48363107", "0.48272613", "0.48227292", "0.48198256", "0.48108247", "0.48015898", "0.47992384", "0.47976217", "0.47824764", "0.47805554", "0.47704762", "0.47680047", "0.47666767", "0.47598505", "0.4754207", "0.47288665", "0.4727118", "0.47265342", "0.4722617", "0.4721492", "0.47212026", "0.4713406", "0.47131002", "0.4707143", "0.47005644", "0.46986124", "0.46981326" ]
0.7899342
0
Test case for webinarPollDelete Delete a Webinar Poll.
public function testWebinarPollDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deletepoll(){\n \tSiteController::loggedInCheck();\n\n\t\t$pollid = $_POST['pollid'];\n\t\t$poll = Poll::loadById($pollid);\n\t\t$pollAuthorId = $poll->get('userId');\n\t\t$pollAuthor = User::loadById($pollAuthorId);\n\n\t\t//user is the author of the poll, allow delete\n\t\tif($pollAuthor->get('username') == $_SESSION['username']){\n\t\t\t$poll->delete();\n\t\t} else {\n\t\t\t$_SESSION['info'] = \"You can only delete polls you have created.\";\n\t\t}\n\n\t\t//refresh page\n\t\theader('Location: '.BASE_URL);\t\t\t\t\t\t\t\t\t\t\t//TODO update\n\t}", "public function deletepollAction($poll_id) {\n $em = $this->getDoctrine()->getManager();\n $poll = $em->getRepository('PollPollBundle:PollImpl')->find($poll_id);\n $em->remove($poll);\n $em->flush();\n\n return $this->redirect($this->generateUrl('poll_show_all'));\n }", "public function delete(User $user, Poll $poll)\n {\n //\n }", "public function testWebinarDelete()\n {\n }", "public function polls_delete($pollId){\n $this->load->model(\"poll\");\n\n try {\n $this->poll->deleteRecursive($pollId);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"No such poll :'(\"), 404);\n }\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testDeleteSurvey()\n {\n $survey = Survey::factory()->create();\n $surveyId = $survey->id;\n\n $response = $this->json('DELETE', \"survey/{$surveyId}\");\n\n $response->assertStatus(204);\n $this->assertDatabaseMissing('survey', ['id' => $surveyId]);\n }", "public function votes_delete($pollId) {\n $this->load->model(\"poll\");\n $this->load->model(\"answer\");\n $this->load->model(\"vote\");\n\n try {\n //Check to see if the poll exists (this throws an exception if it doesn't)\n $poll = $this->poll->getPoll($pollId);\n //Clear the votes on the poll\n $this->vote->clearVotes($pollId);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"The poll does not exist!\"), 404);\n }\n }", "public function test_shopper_can_be_deleted()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $shopper2 = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $response = $this->delete(route('shoppers.destroy', $shopper2));\n\n $response->assertStatus(302);\n $response->assertRedirect(route('shoppers.index'));\n }", "public function testDelete()\n\t{\n\t\t// Add test bookings\n\t\t$bookings = [];\n\t\tforeach ($this->clients as $client) {\n\t\t\t$booking = factory(\\App\\Booking::class)->create([\n\t\t\t\t'fitter_id' => $this->admin->fitter->id,\n\t\t\t\t'client_id' => $client->id,\n\t\t\t\t'horse_id' => factory(\\App\\Horse::class)->create(['client_id' => $client->id])->id,\n\t\t\t\t'rider_id' => factory(\\App\\Rider::class)->create(['client_id' => $client->id])->id,\n\t\t\t\t'user_id' => factory(\\App\\User::class)->create([\n\t\t\t\t\t'fitter_id' => $this->admin->fitter->id,\n\t\t\t\t\t'type' => 'fitter-user',\n\t\t\t\t])->id,\n\t\t\t]);\n\n\t\t\t$bookings[] = $booking->toArray();\n\t\t}\n\n\t\t$booking = \\App\\Booking::find($bookings[0]['id']);\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/bookings/' . $booking->id)\n\t\t\t ->assertStatus(200)\n\t\t\t ->assertJsonStructure([\n\t\t\t\t 'success',\n\t\t\t ]);\n\n\t\t$this->assertDatabaseMissing('bookings', ['id' => $booking->id]);\n\t}", "public function testWebinarPollCreate()\n {\n }", "public function destroy(Poll $poll)\n {\n $this->poll->destroy($poll);\n\n return redirect()->route('admin.iquiz.poll.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('iquiz::polls.title.polls')]));\n }", "public function destroy(Poll $poll) {\n // törlés itt nem megengedett\n }", "public function testDeleteLecturerAndAdministrationWorker()\n {\n $user = factory(User::class)->state('lecturer_administration_worker')->create();\n $response = $this->withHeaders([\n ])->deleteJson(\"/api/user/{$user->id}\", []);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n \"deleted\"=> true\n ]);\n\n $this->assertDeleted('users', ['id' => $user->id]);\n $this->assertDeleted('addresses', ['id' => $user->address_id]);\n $this->assertDeleted('addresses', ['id' => $user->correspondal_address_id]);\n }", "public function testDelete()\n\t{\n\t\t$saddle = $this->saddles[0];\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/saddles/' . $saddle->id)\n\t\t\t ->assertStatus(200);\n\n\t\t$this->assertDatabaseMissing('saddles', ['id' => $saddle->id]);\n\t}", "public function delete($episode);", "public function executeDelete(sfWebRequest $request)\n {\n\t\tif(clsCommon::chkDataExist(\"WebsitePracticeArea\", $request->getParameter('id'), $this->getUser()->getAttribute('personalWebsiteId')))\n\t\t{\n\t\t\t$this->forward404Unless($website_practice_area = Doctrine::getTable('WebsitePracticeArea')->find(array($request->getParameter('id'))), sprintf('Object website_practice_area does not exist (%s).', $request->getParameter('id')));\n\n\t\t\t$oWebsitePracticeArea = new WebsitePracticeArea();\n\t\t\t$oWebsitePracticeArea->changeStatus($request->getParameter('id'),sfConfig::get(\"app_Status_Deleted\"));\n\t\t\t$this->getUser()->setFlash('succMsg', \"Deletion successful.\");\n\n\t\t\t$this->redirect('WebsitePracticeArea/index');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n\t\t\t$this->redirect('default/index');\n\t\t}\n }", "public function testDeleteSurvey0()\n {\n }", "public function testDeleteSurvey0()\n {\n }", "public function testDelete()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('DELETE', static::ROUTE . '/' . $model->id, [], [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_NO_CONTENT);\n }", "public function testDelete()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertGreaterThan(0, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--delete')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Supprimer\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Supprimer')->form();\n\t\t$crawler = $client->submit($form);\t\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Le client a bien été supprimé.\")')->count());\n\n\t}", "public function testLeaseDelete()\n {\n $user = factory(User::class)->create();\n $lease = factory(Lease::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('lease.delete', ['id' => $lease->id]))\n ->assertStatus(200);\n }", "public function actionDelete($id)\n\t{\n\t\t$question = $this->findQuestion($id);\n\t\t$this->checkAccess($question->user);\n\t\t$question->delete();\n\t\treturn $this->redirect(['/poll/list']);\n\t}", "public function test_delete() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n outagedb::delete(self::$outage->id);\n\n // Should not exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage) OR (id = :idevent)\",\n ['idoutage' => self::$outage->id, 'idevent' => self::$event->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertFalse($event);\n }", "private function delete()\n {\n $webhookId = $this->ask('Please enter Webhook ID');\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->delete($webhookId);\n\n if ($response) {\n $this->info(\"WebhookId {$webhookId} is deleted successfully\");\n }\n\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "public function testDelete(): void\n {\n $this->createInstance();\n $this->createAndLogin();\n\n\n $res = $this->fConnector->getDiscussionManagement()->postTopic('Hello title', 'My content', [$this->configTest['testTagId']],null)->wait();\n $res2 = $this->fConnector->getDiscussionManagement()->deleteTopic($res->id)->wait();\n $this->assertTrue($res2, 'Test delete of a topic');\n $res3 = $this->fConnector->getDiscussionManagement()->getDiscussions($this->configTest['testTagName'])->wait();\n $found = false;\n foreach($res3 as $discussion){\n if($discussion->id === $res->id){\n $found = true;\n break;\n }\n }\n $this->assertFalse($found, 'Test delete of a topic, search for deleted topic');\n\n }", "public function test_get_delete_link() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'course.created',\n\t\t) );\n\n\t\t$link = $webhook->get_delete_link();\n\n\t\t$this->assertEquals( 0, strpos( admin_url( 'admin.php?page=llms-settings&tab=rest-api&section=webhooks&revoke-webhook=' . $webhook->get( 'id' ) ), $webhook->get_delete_link() ) );\n\t\tparse_str( wp_parse_url( $link, PHP_URL_QUERY ), $parts );\n\t\t$this->assertTrue( array_key_exists( 'delete-webhook-nonce', $parts ) );\n\n\t}", "public function delete(Vote $vote);", "public function delete($Enterprise) { ; }", "public function testWebinarPollGet()\n {\n }", "public function testDeleteSuppliersUsingDELETE()\n {\n }", "public function testDeleteEvent()\n {\n }", "public function test_delete_task()\n {\n Project::create([\n 'id' => 1,\n 'name' => 'Project nae', \n 'description' => 'Project description'\n ]);\n Task::create([\n 'id' => 200,\n 'name' => 'Task ndfame', \n 'priority' => 'high', \n 'schedule_date' => '2020-12-12 12:22:00',\n 'project_id' => 200\n ]);\n $response = $this->delete('/task/200');\n $response->assertStatus(302);\n }", "public function test_deleteSubscriber() {\n\n }", "public function testDelete()\n {\n\n // Create exhibits and items.\n $neatline1 = $this->_createNeatline('Test Exhibit 1', '', 'test-exhibit-1');\n $neatline2 = $this->_createNeatline('Test Exhibit 2', '', 'test-exhibit-2');\n $item1 = $this->_createItem();\n $item2 = $this->_createItem();\n\n // Create records.\n $record1 = new NeatlineDataRecord($item1, $neatline1);\n $record2 = new NeatlineDataRecord($item2, $neatline1);\n $record3 = new NeatlineDataRecord($item1, $neatline2);\n $record4 = new NeatlineDataRecord($item2, $neatline2);\n $record1->save();\n $record2->save();\n $record3->save();\n $record4->save();\n\n // 2 exhibits, 4 data records.\n $_exhibitsTable = $this->db->getTable('NeatlineExhibit');\n $_recordsTable = $this->db->getTable('NeatlineDataRecord');\n $this->assertEquals($_exhibitsTable->count(), 2);\n $this->assertEquals($_recordsTable->count(), 4);\n\n // Call delete.\n $neatline1->delete();\n\n // 1 exhibits, 2 data records.\n $this->assertEquals($_exhibitsTable->count(), 1);\n $this->assertEquals($_recordsTable->count(), 2);\n\n }", "public function delete(){\n\t\t$offerid = $_POST['id'];\n\t\t$delRes = $this->master_db->delete(OFFER_MANAGEMENT,array(\"offer_id\"=>decode_string($offerid)));\n\t\tif($delRes){\n\t\t\t$msg = 'Offer deleted successfully.';\n\t\t\t$msg_type = 'success';\n\t\t\t$msgArr = array(\n\t\t\t\t'msg'=>$msg,\n\t\t\t\t'msg_type'=>$msg_type\n\t\t\t\t);\n\t\t\t$this->session->set_flashdata($msgArr);\n\t\t\t$this->session->flashdata('msg');\n\t\t\t\n\t\t}else{\n\t\t\t$msg ='Oops! error try again.';\n\t\t\t$msg_type = 'error';\n\t\t\t$msgArr = array(\n\t\t\t\t'msg'=>$msg,\n\t\t\t\t'msg_type'=>$msg_type\n\t\t\t\t);\n\t\t\t$this->session->set_flashdata($msgArr);\n\t\t\t\n\t\t}\n\t\techo 1;\n\t\texit();\n\t}", "public function testDeleteWebhook()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function testDeleteById(Partner $partner): void\n {\n $this->assertTrue(Partner::deleteById($partner->getId()));\n }", "public function deleteSportsVenue($venue);", "public function testDeleteVendorComplianceSurvey()\n {\n }", "public function testDeleteSuccessForHr() {\n\t\t$userInfo = [\n\t\t\t'role' => USER_ROLE_USER | USER_ROLE_HUMAN_RESOURCES,\n\t\t\t'prefix' => 'hr'\n\t\t];\n\t\t$opt = [\n\t\t\t'method' => 'POST',\n\t\t];\n\t\t$this->applyUserInfo($userInfo);\n\t\t$this->generateMockedController();\n\t\t$url = '/hr/deferred/delete/3';\n\t\t$this->testAction($url, $opt);\n\t\t$this->checkFlashMessage(__('The deferred save has been deleted.'));\n\t\t$result = $this->Controller->Deferred->find('list', ['recursive' => -1]);\n\t\t$expected = [\n\t\t\t1 => '1',\n\t\t\t2 => '2',\n\t\t\t4 => '4',\n\t\t\t5 => '5',\n\t\t];\n\t\t$this->assertData($expected, $result);\n\t}", "public function testDeleteUrlUsingDELETE()\n {\n }", "public function testDelete()\n {\n\n $this->createDummyRole();\n\n $this->assertDatabaseHas('roles', [\n 'id' => 1,\n ]);\n\n $this->call('POST', '/api/role', array(\n 'action' => $this->deleteAction,\n 'id' => 1,\n ));\n\n $this->assertDatabaseMissing('roles', [\n 'id' => 1,\n ]);\n\n $this->assertDatabaseMissing('role_permission', [\n 'role_id' => 1,\n 'permission_id' => [1, 2]\n ]);\n }", "public function testDeleteWebhookConfig()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $sw->deleteWebhookConfig();\n\n $this->checkDeleteRequests($container, ['/v4/webhooks/configure']);\n }", "public function testDelete()\n\t{\n\t\t$this->resetReservationTable();\n\t\t$this->resetDateTimes();\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$reservation->save(false);\n\t\t$this->assertTrue($reservation->delete());\n\t}", "public function testDeleteDelete()\n {\n $this->mockSecurity();\n $this->_loginUser(1);\n $source = 2;\n\n $readPostings = function () use ($source) {\n $read = [];\n $read['all'] = $this->Entries->find()->all()->count();\n $read['source'] = $this->Entries->find()\n ->where(['category_id' => $source])\n ->count();\n\n return $read;\n };\n\n $this->assertTrue($this->Categories->exists($source));\n $before = $readPostings();\n $this->assertGreaterThan(0, $before['source']);\n\n $data = ['mode' => 'delete'];\n $this->post('/admin/categories/delete/2', $data);\n\n $this->assertFalse($this->Categories->exists($source));\n $this->assertRedirect('/admin/categories');\n\n $after = $readPostings();\n $this->assertEquals(0, $after['source']);\n $expected = $before['all'] - $before['source'];\n $this->assertEquals($expected, $after['all']);\n }", "public function testDeleteSurveyQuestion0()\n {\n }", "public function testDeleteSurveyQuestion0()\n {\n }", "public function testDeleteProductUsingDELETE()\n {\n }", "public function testDeleteChallengeEvent()\n {\n }", "public function testDelete()\n {\n $dataLoader = $this->getDataLoader();\n $data = $dataLoader->getOne();\n $this->deleteTest($data['user']);\n }", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/product/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Product', 'productId', self::$objectId);\n }", "function doRealDelete()\n {\n $this->assignSingle();\n /* Delete the record */\n DatabaseBean::dbDeleteById();\n\n /* Get a lecture that this subtask is related to. */\n $lectureBean = new LectureBean ($this->id, $this->_smarty, \"\", \"\");\n $lectureBean->assignSingle();\n }", "public function testDeleteProduct()\n // Ici je fais un test de suppression de produit\n {\n $response = $this->json('GET', '/api/products');\n // Vérifier le status de réussite.\n $response->assertStatus(200);\n // Je prend le premier produit [0]\n $product = $response->getData()[0];\n //Il faut etre connecté pour pouvoir supprimer\n $user = factory(\\App\\User::class)->create();\n //C'est une demande en DELETE à la place de POST \n $delete = $this->actingAs($user, 'api')->json('DELETE', '/api/products/'.$product->id);\n $delete->assertStatus(200);\n $delete->assertJson(['message' => \"Produit supprimé!\"]);\n }", "public function testDeleteTask()\n {\n $userId = User::first()->value('id');\n $taskId = Task::orderBy('id', 'desc')->first()->id;\n\n echo '/api/v1.0.0/users/'.$userId.'/tasks/'.$taskId;\n\n $response = $this->json('DELETE', '/api/v1.0.0/users/'.$userId.'/tasks/'.$taskId);\n $response->assertStatus(200);\n }", "public function test_deleting_question() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('DELETE', '/api/v1/' . $videoquanda->id . '/questions/1');\n\n $this->assertEquals(204, $client->getResponse()->getStatusCode());\n $this->assertFalse($DB->record_exists('videoquanda_questions', array('instanceid' => $videoquanda->id)));\n }", "public function deleteAction()\r\n {\r\n if ($id = $this->getRequest()->getParam('offer_id')) {\r\n $title = \"\";\r\n try {\r\n // init model and delete\r\n $model = Mage::getModel('submitbestoffer/submitbestoffer');\r\n $model->load($id);\r\n /*$title = $model->getGalleryName();*/\r\n $model->delete();\r\n // display success message\r\n Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('submitbestoffer')->__('The Offer has been deleted.'));\r\n // go to grid\r\n $this->_redirect('*/*/');\r\n return;\r\n\r\n } catch (Exception $e) {\r\n // display error message\r\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\r\n // go back to edit form\r\n $this->_redirect('*/*/edit', array('offer_id' => $id));\r\n return;\r\n }\r\n }\r\n // display error message\r\n Mage::getSingleton('adminhtml/session')->addError(Mage::helper('submitbestoffer')->__('Unable to find an offer to delete.'));\r\n // go to grid\r\n $this->_redirect('*/*/');\r\n }", "public function test_deleting_answer() {\n global $DB;\n\n // Create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, 1, $now, $now + 1, 2, 'dummy text')\n ),\n 'videoquanda_answers' => array(\n array('id', 'questionid', 'userid', 'timecreated', 'timemodified', 'text'),\n array(1, 1, $user->id, $now, $now + 1, 'dummy answer 1.')\n )\n )));\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('DELETE', '/api/v1/' . $videoquanda->id . '/questions/1/answers/1');\n\n $this->assertEquals(204, $client->getResponse()->getStatusCode());\n $this->assertFalse($DB->record_exists('videoquanda_answers', array('questionid' => 1)));\n }", "public function testDeleteSurveyQuestionChoice0()\n {\n }", "public function testDeleteSurveyQuestionChoice0()\n {\n }", "public function testDeleteCampaignFromPromotionUsingDELETE()\n {\n }", "public function testDeletePromotionCampaignApplicationUsingDELETE()\n {\n }", "public function testRemove()\n {\n $paymentMethodId = '36538b73-0ff9-4bf6-bc94-20f499b4f85d';\n $customerId = '20e68ad7-ff54-4cb6-8556-f87f58bcf995';\n\n $this->resource->remove($paymentMethodId,$customerId);\n\n $this->assertAttributeEquals(BASE_URL, 'base_url', $this->connector, 'Failed. Base url not correct');\n $this->assertAttributeEquals('DELETE', 'method', $this->connector, 'Failed. Method is not correct');\n $this->assertAttributeEquals('paymentmethods/' . $paymentMethodId . '?customerId=' .$customerId, 'url', $this->connector, 'Failed. Url is not correct');\n }", "public function testAdminDeleteProduct(): void\n {\n $client = static::createClient([], [\n 'PHP_AUTH_USER' => 'vandana_admin',\n 'PHP_AUTH_PW' => 'vandana@admin',\n ]);\n \n $maxProductId = self::$container->get(ProductRepository::class)->findMaxId(); \n\n $crawler = $client->request('GET', '/en/admin/product/'.$maxProductId);\n $client->submit($crawler->filter('#delete-form-product')->form());\n\n $this->assertResponseRedirects('/en/admin/product/', Response::HTTP_FOUND);\n\n $product = self::$container->get(ProductRepository::class)->find($maxProductId);\n $this->assertNull($product);\n }", "public function delete_watch(){\r\n\r\n\t\tif($this->expectsPost(array('watchId'))){\r\n\r\n\t\t\tif ($this->watch->deleteWatch($this->watchId, $this->session->userdata('userId'))) {\r\n\r\n\t\t\t\t$this->_bodyData['success'] = 'Watch successfully deleted!';\r\n\t\t\t}\r\n\r\n\t\t\t$this->constructMeasurePage();\r\n\t\t}\r\n\t}", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/invoice/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Invoice', 'invoiceId', self::$objectId);\n }", "protected function _deleteEvent($eventId)\n {\n }", "public function testDeleteHospital(){\r\n\t\t$this->http = new Client(['base_uri' => 'http://localhost/casecheckapp/public/index.php/']);\r\n\r\n\t\t//Test HTTP status ok for id=1\r\n\t\t$response= $this->http->request('DELETE','api/v1/hospital/2');//Change ID here\r\n\t\t$this->assertEquals(200,$response->getStatusCode());\r\n\r\n\t\t//Stopping the connexion with Guzzle\r\n\t\t$this->http = null;\r\n\t}", "public function destroy($id)\n {\n $div = Poll::findOrFail($id);\n\n $crud = $div->delete();\n\n if ($crud) {\n return redirect()->route('poll')->with('status', 'Poll Deleted!');\n } else {\n return redirect()->back()->withInput()->with('status', 'Delete Failed!');\n }\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function destroy(Request $request){\n\t\t$input = $request->all();\n\t\t$id = $input['id_spec'];\n\t\t$sub = EventSpec::findOrFail($id);\n\t\t$event = Event::findOrFail($sub->id_event);\n\t\tif($event->id_oratorio==Session::get('session_oratorio')){\n\t\t\t$sub->delete();\n\t\t\t//Session::flash(\"flash_message\", \"Specifica $id cancellata!\");\n\t\t\t//return redirect()->route('eventspecs.show', ['id_event' => $sub->id_event]);\n\t\t\techo true;\n\t\t}else{\n\t\t\t//abort(403, 'Unauthorized action.');\n\t\t\techo false;\n\t\t}\n\t}", "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 function testDeleteVendorComplianceSurveyTag()\n {\n }", "public function destroy($id)\n {\n $poll = Polls::findOrFail($id);\n $poll->delflag=1;\n $poll->save();\n return redirect('/admin/polls')\n ->withSuccess(\"'$poll->title' 删除成功.\");\n }", "public function delete_poll_submissions() {\n\t\tforminator_validate_ajax( 'forminatorPollEntries' );\n\t\tif ( ! empty( $_POST['id'] ) ) {\n\t\t\t$form_id = intval( $_POST['id'] );\n\t\t\tForminator_Form_Entry_Model::delete_by_form( $form_id );\n\n\t\t\t$file = forminator_plugin_dir() . \"admin/views/poll/entries/content-none.php\";\n\n\t\t\tob_start();\n\t\t\t/** @noinspection PhpIncludeInspection */\n\t\t\tinclude $file;\n\t\t\t$html = ob_get_clean();\n\n\t\t\t$data['html'] = $html;\n\t\t\t$data['notification'] = array(\n\t\t\t\t'type' => 'success',\n\t\t\t\t'text' => __( 'All the submissions deleted successfully.', Forminator::DOMAIN ),\n\t\t\t\t'duration' => '4000',\n\t\t\t);\n\t\t\twp_send_json_success( $data );\n\t\t} else {\n\t\t\t$data['notification'] = array(\n\t\t\t\t'type' => 'error',\n\t\t\t\t'text' => __( 'Submission delete failed.', Forminator::DOMAIN ),\n\t\t\t\t'duration' => '4000',\n\t\t\t);\n\t\t\twp_send_json_error( $data );\n\t\t}\n\t}", "public function testDelete(): void\n {\n $this->markTestSkipped('Skipping as PostsService::delete() is not yet ready for prod/testing');\n $this->mock(PostsRepository::class, static function ($mock) {\n $mock->shouldReceive('find')->with(123)->andReturn(new Post());\n $mock->shouldReceive('delete')->with(123)->andReturn(true);\n });\n\n $service = resolve(PostsService::class);\n\n $this->expectsEvents(BlogPostWillBeDeleted::class);\n\n $response = $service->delete(123);\n\n $this->assertIsArray($response);\n }", "public function testCollectionTicketsDelete()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testDelete()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n $db = $this->_setupDb();\n \n $db->create(array('a' => 1), 'mydoc');\n \n // Make sure document exists in DB\n $doc = $db->retrieve('mydoc');\n $this->assertType('Sopha_Document', $doc);\n \n // Delete document\n $ret = $db->delete('mydoc', $doc->getRevision());\n \n // Make sure return value is true\n $this->assertTrue($ret);\n \n // Try to fetch doc again \n $this->assertFalse($db->retrieve('mydoc'));\n \n $this->_teardownDb();\n }", "public function testProjectProjectIDInviteeInviteIDDelete()\n {\n }", "function deleteWebinar($webinarKey, $sendCancellationEmails = true)\n {\n ($sendCancellationEmails) ? $parameters = ['sendCancellationEmails' => true] : $parameters = null;\n\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n return $this->sendRequest('DELETE', $path, $parameters, $payload = null);\n }", "public function deleteLeague($league);", "function evento_pessoa_delete($idevento){\r\n\r\n\t\t$this->idevento = $idevento;\r\n\t\t$this->status = 2;\r\n\t\t$bd = Crud_Evento::conexao();\r\n\t\t$sql = \"UPDATE evento set status = :status WHERE idevento = :idevento\";\r\n\t\t$stmt = $bd->prepare( $sql );\r\n\t\t$stmt->bindParam(':idevento',$this->idevento,PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(':status', $this->status, PDO::PARAM_INT);\r\n\r\n\t\t\r\n\r\n\t\t$bd = Crud_Evento::conexao();\r\n\r\n\t\t$sql = \"DELETE FROM evento_pessoa WHERE idevento = :idevento \";\r\n\t\t$stmt = $bd->prepare($sql);\r\n\t\t$stmt->bindParam(':idevento',$idevento, PDO::PARAM_INT);\r\n\r\n\t\t$result = $stmt->execute();\r\n\r\n\t}", "public function testDeleteChallenge()\n {\n }", "public function testDelete() {\n $this->initializePurgersService(['c']);\n $this->drupalLogin($this->adminUser);\n $this->drupalGet(Url::fromRoute($this->route, ['id' => 'id0']));\n $this->assertRaw('Yes, delete this purger!');\n $this->assertTrue(array_key_exists('id0', $this->purgePurgers->getPluginsEnabled()));\n $json = $this->drupalPostAjaxForm(Url::fromRoute($this->route, ['id' => 'id0'])->toString(), [], ['op' => 'Yes, delete this purger!']);\n $this->assertEqual('closeDialog', $json[1]['command']);\n $this->assertEqual('redirect', $json[2]['command']);\n $this->purgePurgers->reload();\n $this->assertTrue(is_array($this->purgePurgers->getPluginsEnabled()));\n $this->assertTrue(empty($this->purgePurgers->getPluginsEnabled()));\n $this->assertEqual(3, count($json));\n // Assert that deleting a purger that does not exist, passes silently.\n $json = $this->drupalPostAjaxForm(Url::fromRoute($this->route, ['id' => 'doesnotexist'])->toString(), [], ['op' => 'Yes, delete this purger!']);\n $this->assertEqual('closeDialog', $json[1]['command']);\n $this->assertEqual(2, count($json));\n }", "public function testDeleteSchedule() {\n\t\t$numRows = $this->getConnection()->getRowCount(\"schedule\");\n\n\t\t$schedule = new Schedule(null, $this->company->getCompanyId(), $this->VALID_SCHEDULEDAYOFWEEK1, $this->VALID_SCHEDULEENDTIME1, $this->VALID_SCHEDULELOCATIONADDRESS1, $this->VALID_SCHEDULELOCATIONNAME1, $this->VALID_SCHEDULESTARTTIME1);\n\n\t\t$schedule->insert($this->getPDO());\n\n\t\t//make sure it was inserted\n\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"schedule\"));\n\n\t\t//DELETE!!!!!!!!! a.k.a Tallcot it!!!!!!\n\n\t\t$schedule->delete($this->getPDO());\n\n\t\t//make sure there in no longer any data\n\n\t\t$pdoSchedule = Schedule::getScheduleByScheduleId($this->getPDO(), $schedule->getScheduleId());\n\t\t$this->assertNull($pdoSchedule);\n\t\t$this->assertEquals($numRows, $this->getConnection()->getRowCount(\"schedule\"));\n\n\t}", "public function testDeleteTask()\n {\n }", "public function deleteTest()\n {\n $this->assertEquals(true, $this->object->delete(1));\n }", "public function testPageDelete()\n {\n $faker = Faker::create();\n $page = Page::inRandomOrder()->first();\n $response = $this\n ->actingAs(User::where(\"admin\", true)->whereNotNull(\"verified\")->inRandomOrder()->first(), 'api')\n ->withHeaders([\n \"User-Agent\" => $faker->userAgent(),\n ])\n ->json('DELETE', \"/api/pages/\" . $page->slug);\n $response\n ->assertStatus(200);\n }", "function Delete()\r\n\t{\r\n\t\t$connection = Database::Connect();\r\n\t\t$this->pog_query = \"delete from `specialoffer` where `specialofferid`='\".$this->specialofferId.\"'\";\r\n\t\treturn Database::NonQuery($this->pog_query, $connection);\r\n\t}", "public function testMakeDeleteRequest()\n {\n $client = new MockClient('https://api.xavierinstitute.edu', [\n new JsonResponse([\n 'success' => [\n 'code' => 200,\n 'message' => 'Deleted.',\n ],\n ], 200),\n ]);\n\n $this->assertEquals($client->delete('teachers/1'), true);\n }", "public function destroy(pregunta_test $pregunta_test)\n {\n //\n }", "public function deleteWebhook(){\n return $this->make_http_request(__FUNCTION__);\n }", "public function testComAdobeCqSocialCommonsCommentsEndpointsImplCommentDeleteEvent()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.social.commons.comments.endpoints.impl.CommentDeleteEventActivitySuppressor';\n\n $crawler = $client->request('POST', $path);\n }", "public function testDeleteExcludedWebsiteAfterWebsiteDelete(): void\n {\n /** Create website */\n /** @var Website $website */\n $website = $this->objectManager->create(Website::class);\n $website->setName('custom website for delete excluded website test')\n ->setCode(self::STORE_WEBSITE_CODE);\n $website->isObjectNew(true);\n $this->websiteResourceModel->save($website);\n $websiteId = $this->websiteRepository->get(self::STORE_WEBSITE_CODE)->getId();\n\n /** Create a new customer group */\n $group = $this->groupFactory->create()\n ->setId(null)\n ->setCode(self::GROUP_CODE)\n ->setTaxClassId(3);\n $groupId = $this->groupRepository->save($group)->getId();\n self::assertNotNull($groupId);\n\n /** Exclude website from customer group */\n $group = $this->groupRepository->getById($groupId);\n $customerGroupExtensionAttributes = $this->groupExtensionInterfaceFactory->create();\n $customerGroupExtensionAttributes->setExcludeWebsiteIds([$websiteId]);\n $group->setExtensionAttributes($customerGroupExtensionAttributes);\n $this->groupRepository->save($group);\n\n /** Check that excluded website is in customer group excluded website table */\n $connection = $this->resourceConnection->getConnection();\n $selectExcludedWebsite = $connection->select();\n /** @var GroupExcludedWebsite $groupExcludedWebsiteResource */\n $groupExcludedWebsiteResource = $this->objectManager->create(GroupExcludedWebsite::class);\n $selectExcludedWebsite->from($groupExcludedWebsiteResource->getMainTable())\n ->where('website_id = ?', $websiteId);\n $excludedWebsites = $connection->fetchAll($selectExcludedWebsite);\n self::assertCount(1, $excludedWebsites);\n\n /** Marks area as secure so Product repository would allow website removal */\n $registry = $this->objectManager->get(Registry::class);\n $isSecuredAreaSystemState = $registry->registry('isSecuredArea');\n $registry->unregister('isSecureArea');\n $registry->register('isSecureArea', true);\n /** Remove website by id */\n /** @var \\Magento\\Store\\Model\\Website $website */\n $website = $this->objectManager->create(\\Magento\\Store\\Model\\Website::class);\n $website->load((int)$websiteId);\n $website->delete();\n\n /** Revert mark area secured */\n $registry->unregister('isSecuredArea');\n $registry->register('isSecuredArea', $isSecuredAreaSystemState);\n\n /** Check that excluded website is no longer in customer group excluded website table */\n $selectExcludedWebsite = $connection->select();\n /** @var GroupExcludedWebsite $groupExcludedWebsiteResource */\n $groupExcludedWebsiteResource = $this->objectManager->create(GroupExcludedWebsite::class);\n $selectExcludedWebsite->from($groupExcludedWebsiteResource->getMainTable())\n ->where('website_id = ?', $websiteId);\n $excludedWebsites = $connection->fetchAll($selectExcludedWebsite);\n self::assertCount(0, $excludedWebsites);\n }", "public function DELETE() {\n #\n }", "public function testDeleteEnrollmentRequest()\n {\n }", "public function testDeleteSurveyGroup()\n {\n $surveyGroup = SurveyGroup::factory()->create();\n $surveyGroupId = $surveyGroup->id;\n\n $response = $this->json('DELETE', \"survey-group/{$surveyGroupId}\");\n\n $response->assertStatus(204);\n $this->assertDatabaseMissing('survey_group', [ 'id' => $surveyGroupId ]);\n }", "public function testDeleteSite()\n {\n }" ]
[ "0.71641266", "0.66191196", "0.6587096", "0.6559964", "0.64290196", "0.6392854", "0.63748217", "0.6316476", "0.61818117", "0.60412574", "0.59323484", "0.5928612", "0.58898", "0.5859758", "0.5821917", "0.5783073", "0.5772443", "0.57544917", "0.5753902", "0.5753902", "0.57384986", "0.56644094", "0.5661651", "0.5657965", "0.5656854", "0.5655541", "0.56391746", "0.56378573", "0.56320286", "0.5598308", "0.558595", "0.5567753", "0.554321", "0.5541752", "0.5535237", "0.5533021", "0.5532107", "0.55284786", "0.5525423", "0.55055004", "0.55034393", "0.5500193", "0.5491772", "0.54820466", "0.5460484", "0.544605", "0.54427505", "0.5432726", "0.5417641", "0.5417641", "0.54153806", "0.5403378", "0.54032075", "0.5398834", "0.53968376", "0.53875834", "0.53863364", "0.5368522", "0.53684795", "0.5361546", "0.53612775", "0.53612775", "0.53605145", "0.53560483", "0.5351902", "0.53458756", "0.5338257", "0.5321206", "0.5319492", "0.53172326", "0.53171927", "0.53082687", "0.5302217", "0.5295097", "0.5294328", "0.5290411", "0.52834165", "0.5279747", "0.527748", "0.5277356", "0.52732885", "0.5272095", "0.5269831", "0.5265737", "0.5264737", "0.52581507", "0.52563006", "0.52521676", "0.52474165", "0.5247254", "0.5244045", "0.5242299", "0.52372104", "0.5236307", "0.5234292", "0.5228312", "0.52268", "0.5226307", "0.5225768", "0.5222697" ]
0.8047244
0
Test case for webinarPollGet Get a Webinar Poll.
public function testWebinarPollGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function polls_get($pollId = NULL){\n $this->load->model(\"poll\");\n\n if (isset($pollId)) {\n try {\n $poll = $this->poll->getPoll($pollId);\n $this->response($poll, 200);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Poll does not exist!\"), 404);\n }\n } else{\n $polls = $this->poll->getPolls();\n $this->response($polls, 200);\n }\n }", "public function testWebinarPollCreate()\n {\n }", "public function getPoll()\n\t{\n\t\t\t\t// var_dump($poll);\n\n\t\treturn $this->poll;\n\t}", "public function testWebinarPolls()\n {\n }", "public function get_poll($poll_token, Request $request)\n {\n $question = $this->poll_service->get_current_poll_question($poll_token);\n\n if(!$question) {\n //poll is not currently running (no open question)\n return $this->render('user/waitingPoll.html.twig', [\n 'listenerUrl' => $_ENV['SYMFONY_WEBSITE_ROOT_URL'] . '/home/runPoll/' . $poll_token\n ]);\n }\n $answers = $this->poll_service->get_current_poll_answers($question->getId());\n if(!$answers) {\n //question without any answer: means the poll is not correctly defined\n return new Response('Error, question without any answer');\n }\n\n return $this->render('user/poll.html.twig', [\n 'question' => $question,\n 'answers' => $answers,\n 'isSubmitted' => $request->query->get('isSubmitted'),\n 'answerID' => $request->query->get('answerID'),\n 'formUrl' => $_SERVER['SYMFONY_WEBSITE_ROOT_URL'] . '/incrementPollStatistic/' . $poll_token,\n 'listenerUrl' => $_ENV['SYMFONY_WEBSITE_ROOT_URL'] . '/getPoll/' . $poll_token]);\n }", "function citrixonline_get_webinar($webinarKey) \n {\n\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\treturn 0;\n\t\t\t\n\t\t$return_array = array();\n\n\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/\".$webinarKey.\"?oauth_token=\".$this->access_token), true);\n\t\t\n\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t{\n\t\t\t$this->set_access_token('');\n\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t}\n\t\t\n\t\treturn $reponse;\n\t}", "protected function reportWebinarPollsRequest($webinar_id)\n {\n // verify the required parameter 'webinar_id' is set\n if ($webinar_id === null || (is_array($webinar_id) && count($webinar_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $webinar_id when calling reportWebinarPolls'\n );\n }\n\n $resourcePath = '/report/webinars/{webinarId}/polls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($webinar_id !== null) {\n $resourcePath = str_replace(\n '{' . 'webinarId' . '}',\n ObjectSerializer::toPathValue($webinar_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function testGetAllPolls()\n {\n Passport::actingAs(\n factory(\"App\\User\")->create(),\n ['*']\n );\n $polls= factory(\"App\\Poll\",5)->create();\n $response = $this->get('/polls');\n $response->assertStatus(200);\n $response->assertJson($polls->toArray());\n }", "function create_poll () {\n\t\treturn is_object($this->POLL_OBJ) ? $this->POLL_OBJ->_create(array(\"common\" => 1)) : \"\";\n\t}", "function getWebinar($webinarKey)\n {\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function getPollName()\n {\n return $this->_poll_name;\n }", "public function shouldGetPrimaryPollutant(): void\n {\n $expectedValue = $this->faker->randomElement(['pm25', 'pm10', 'co', 'no2', 'o3', 'so2']);\n\n $this->waqi->shouldReceive('getPrimaryPollutant')\n ->once()\n ->withNoArgs()\n ->andReturn($expectedValue);\n\n $result = $this->waqi->getPrimaryPollutant();\n\n $this->assertValue($result, $expectedValue, 'string');\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function testWebinarPollDelete()\n {\n }", "public function testWebinar()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testGetInstitutionsUsingGET()\n {\n }", "public function loadVote($poll)\n {\n $module = Yii::app()->getModule('poll');\n $userId = (int) Yii::app()->user->id;\n $isGuest = Yii::app()->user->isGuest;\n $cookie = isset(Yii::app()->request->cookies['Poll_'. $poll->id])\n ? Yii::app()->request->cookies['Poll_'. $poll->id] \n : NULL;\n\n foreach ($poll->votes as $vote) {\n if ($vote->user_id == $userId) {\n if (($isGuest && $module->guestCookies && ($cookie === NULL || $vote->id != $cookie->value)) ||\n ($isGuest && $module->ipRestrict && $vote->ip_address != $_SERVER['REMOTE_ADDR'])) {\n continue;\n }\n else\n return $vote;\n }\n }\n\n return new PollVote;\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function poll()\n {\n }", "public function poll()\n {\n return $this->belongsTo('App\\Poll');\n }", "public function getPoller ()\r\n\t\t{\r\n\t\t\t\treturn $this -> pollerInstance;\r\n\t\t}", "public function votes_get($pollId){\n $this->load->model(\"poll\");\n $this->load->model(\"answer\");\n $this->load->model(\"vote\");\n\n try {\n //Check to see if the poll exists (this throws an exception if it doesn't)\n $poll = $this->poll->getPoll($pollId);\n $answers = $this->answer->getAnswers($pollId);\n $votes = $this->vote->getVotes($pollId);\n\n $answerVotes = array();\n foreach ($answers as $answer) {\n //Set the number of votes for this answer to 0\n $answerVotes[$answer->optionNo - 1] = 0;\n foreach ($votes as $vote){\n //Foreach vote that counts towards this answer\n //add one to the number of vote it has\n if ($vote->answerId == $answer->id){\n $answerVotes[$answer->optionNo - 1] += 1;\n }\n }\n }\n\n $this->response($answerVotes, 200);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Poll does not exist!\"), 404);\n }\n }", "public function newpoll(){\n SiteController::loggedInCheck();\n\n\t\tinclude_once SYSTEM_PATH.'/view/newpoll.tpl'; //TODO make sure the tpl is correct\n\t}", "public function testGetSuppliersUsingGET()\n {\n }", "private function get()\n {\n $webhookId = $this->ask('Please enter Webhook ID');\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->read($webhookId);\n\n $data = [];\n if ($response) {\n array_push($data, $this->getFetchedData($response));\n\n $headers = ['webhook_id', 'href', 'channel_id', 'events', 'url', 'created_at'];\n $this->table($headers, $data);\n }\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "public function testListPastWebinarQA()\n {\n }", "function smarty_function_PUBLICA_showPoll($params, &$smarty) {\n\tglobal $conexao;\n\t\n\t// Verifica a validade do parametro\n\tif(!isset($params['var']) || !is_numeric($params['var'])) {\n $params['var'] = $conexao->getOne('SELECT MAX(bn_id) FROM tb_enquete WHERE bb_ativo = 1;');\n }\n \n\t// Busca as configuracoes do destaque\n\t$arrE\t= fnEnqueteInfo($params['var'],$smarty);\n\t\n\tif($arrE !== false && is_numeric($arrE['bn_template_conteudo']) && $arrE['bn_template_conteudo'] > 0) {\n\t\t// Busca o nome do arquivo TPL relacionado\n\t\t$query\t= \"\tSELECT bt_arquivo FROM tb_template WHERE bn_id = '\".$arrE['bn_template_conteudo'].\"';\";\n\t\t$strT\t= $conexao->getOne($query);\n\t\tunset($query);\n\t\t\n\t\t// Busca o array das secoes relacionadas ao destaque\n\t\t$arr\t= fnEnqueteResposta($arrE['bn_id']);\n\t\tif($arr !== false && !DB::isError($strT)) {\n\t\t\t// Seta as variaveis do SMARTY\n\t\t\t$smarty->assign('arrPollQuestion',$arrE);\n\t\t\t$smarty->assign('arrPollAnswer',$arr);\n\t\t\t$smarty->display($strT);\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t} else {\n\t\treturn;\n\t}\n}", "public function get($idpoll, $idquestion) {\n\n $poll = Poll::all()->find($idpoll);\n $user = User::all()->find($poll->IDuser);\n $question = Question::all()->find($idquestion)->where('id', $idquestion)->pluck('questionText')->first();\n\n if(Auth::user()->role == 'ADMIN' || Auth::user()->id == $user->id){\n $answer = Answer::where('IDquestion', $idquestion)->get();\n } else {\n $error = 'non si hanno i permessi per accedere alla risorsa';\n return response()->json($error,Response::HTTP_FORBIDDEN);\n }\n\n if($answer->isEmpty()){\n $error = 'nessun utente ha risposto al sondaggio';\n return response()->json($error, Response::HTTP_NOT_FOUND);\n } else {\n return response()->json([$idquestion.\": \".$question, $answer],Response::HTTP_OK);\n }\n\n }", "public function get($id): PollResource\n {\n $poll = Poll::findOrFail($id);\n\n $this->authorize('get', $poll);\n\n return new PollResource($poll);\n }", "public function testWebinarUpdate()\n {\n }", "public function getEvent()\n {\n // get event\n $this\n ->get('/event')\n ->assertStatus(200);\n }", "public function add_poll()\n {\n\n $method = $_SERVER['REQUEST_METHOD'];\n\n\n if ($method != 'POST') {\n\n json_output(400, array('status' => 400, 'message' => 'Bad request.'));\n } else {\n\n $check_auth_client = $this->auth_model->check_auth_client();\n\n\n if ($check_auth_client == true) {\n\n $response = $this->auth_model->auth();\n\n if ($response['status'] == 200) {\n\n $this->load->model('Table_poll_model');\n\n $returned_string = $this->Table_poll_model->add_poll();\n\n $response = array();\n $response['success'] = '1';\n $response['message'] = 'Uploaded';\n $response['return'] = $returned_string;\n\n echo json_encode($response);\n\n }\n }\n }\n\n\n }", "public function showpollAction(Request $request, $poll_id)\n {\n $em = $this->getDoctrine()->getManager();\n $poll = $em->getRepository('PollPollBundle:PollImpl')->find($poll_id);\n $title = $poll->getTitle();\n $description = $poll->getDescription();\n\n $questions = $em->getRepository('PollPollBundle:QuestionImpl')->findBy(array('poll_id' => $poll_id));\n\n $form = $this->createFormBuilder();\n $dq = new DynamicQuestion($form, $em);\n foreach ($questions as $question) {\n $form = $dq->buildQuestion($question);\n }\n $form->setAction($this->generateUrl('poll_add_answers', array('poll_id' => $poll_id)));\n $form->add('submit', 'submit', array(\n 'label' => \"Submit\",\n 'attr' => array(\n 'class' => 'btn btn-primary')));\n\n $form = $form->getForm();\n return $this->render('PollPollBundle:Poll:show_poll.html.twig', array(\n 'id' => $poll_id,\n 'title' => $title,\n 'description' => $description,\n 'form' => $form->createView()));\n }", "function page_manager_poll() {\n // Load my task plugin\n $task = page_manager_get_task('poll');\n\n ctools_include('context');\n ctools_include('context-task-handler');\n $output = ctools_context_handler_render($task, '', array(), array());\n if ($output !== FALSE) {\n return $output;\n }\n\n module_load_include('inc', 'poll', 'poll.pages');\n $function = 'poll_page';\n foreach (module_implements('page_manager_override') as $module) {\n $call = $module . '_page_manager_override';\n if (($rc = $call('poll')) && function_exists($rc)) {\n $function = $rc;\n break;\n }\n }\n\n // Otherwise, fall back.\n return $function();\n}", "public function Get_Bookings_Test()\n {\n $this->get('/bookings')->seeJson(['Test' => 'Test Data']);\n }", "function list_polls($id = NULL) {\n global $course_id, $course_code, $urlServer, $langPollNone, $langQuestionnaire, $langChoice;\n\n $ret_string = '';\n $result = Database::get()->queryArray(\"SELECT * FROM poll WHERE course_id = ?d AND active = 1\", $course_id);\n $pollinfo = array();\n foreach ($result as $row) {\n $pollinfo[] = array(\n 'id' => $row->pid,\n 'title' => $row->name,\n 'active' => $row->active);\n }\n if (count($pollinfo) == 0) {\n $ret_string .= \"<div class='col-12 mt-3'><div class='alert alert-warning'>$langPollNone</div></div>\";\n } else {\n $exist_poll = array();\n\n if (!is_null($id)) { //find existing resources (edit case)\n $post_res = Database::get()->queryArray(\"SELECT * FROM wall_post_resources WHERE post_id = ?d AND type = ?s\", $id, 'poll');\n foreach ($post_res as $exist_res) {\n $exist_poll[] = $exist_res->res_id;\n }\n }\n\n $ret_string .= \"<div class='table-responsive'><table class='table-default'>\" .\n \"<tr class='list-header'>\" .\n \"<th class='text-start'>&nbsp;$langQuestionnaire</th>\" .\n \"<th style='width:20px;' class='text-center'>$langChoice</th>\" .\n \"</tr>\";\n foreach ($pollinfo as $entry) {\n $checked = '';\n if (in_array($entry['id'], $exist_poll)) {\n $checked = 'checked';\n }\n\n $ret_string .= \"<tr>\";\n $ret_string .= \"<td>&nbsp;\".icon('fa-question').\"&nbsp;&nbsp;<a href='{$urlServer}modules/questionnaire/pollresults.php?course=$course_code&amp;pid=$entry[id]'>\" . q($entry['title']) . \"</a></td>\";\n $ret_string .= \"<td class='text-center'><input type='checkbox' $checked name='poll[]' value='$entry[id]'></td>\";\n $ret_string .= \"</tr>\";\n }\n $ret_string .= \"</table></div>\";\n }\n return $ret_string;\n}", "public function test_happy_flow_get()\n {\n $_SERVER['REQUEST_METHOD'] = 'GET';\n $_GET['sp-entity-id'] = 'http://mock-sp';\n\n $request = new Request($_GET, $_POST, [], [], [], $_SERVER);\n\n $this->assertTrue($this->validator->isValid($request));\n }", "public function getPollInformation(){\n $poll_id = $this->input->post('poll_id'); \n $poll_info = $this->Common_model->getDataById($poll_id, 'tbl_polls');\n $poll_three_highest_days = $this->Vote_model->getThreeHighestDays($poll_id);\n $poll_three_lowest_days = $this->Vote_model->getThreeLowestDays($poll_id);\n $votes_from_countries = $this->Vote_model->getVotesNumberFromCountry($poll_id);\n $poll_created_at = $poll_info->created_at;\n $current_date = date('Y-m-d H:i:s');\n $earlier = new DateTime($poll_created_at);\n $later = new DateTime($current_date);\n\n $data = array();\n $company_id = $this->session->userdata('company_id');\n $data['company'] = $this->Common_model->getDataById($company_id,'tbl_companies');\n $data['total_votes'] = $this->Vote_model->getVotesNumberByPollId($poll_id)->total_votes;\n $data['diff'] = $later->diff($earlier)->format(\"%a\");\n $data['poll_three_highest_days'] = $poll_three_highest_days;\n $data['poll_three_lowest_days'] = $poll_three_lowest_days;\n $data['votes_from_countries'] = $votes_from_countries;\n echo json_encode($data);\n }", "public function testWebinarAbsentees()\n {\n }", "public function testGetWebhookRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $response = $sw->getWebhookConfigRaw();\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $this->checkGetRequests($container, ['/v4/webhooks/configure']);\n }", "public function testGetWebhookRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $response = $sw->getWebhookConfigRaw();\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $this->checkGetRequests($container, ['/v4/webhooks/configure']);\n }", "public function testBasicGET()\n\t{\n\t\t$Request = new Request(\n\t\t\tnew URL('http://' . self::TESTHOST . '/hallo'),\n\t\t\tnull, // method. Default GET\n\t\t\tnull, // Payload\n\t\t\t$this->_getDefaultOptions());\n\n\t\t// Return the body as string\n\t\t$Result = $Request->getResponseAs(new StringValue());\n\n\t\t$this->assertEquals('hallo', (string)$Result);\n\t}", "public function testCurrentEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events/current');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'Electrical Seminar']\n ]);\n }", "public function testGetPromotionCampaignApplicationUsingGET()\n {\n }", "protected function handleGetMine() {\n\t\t\tif ($this->verifyRequest('GET') && $this->verifyParams()) {\n\t\t\t\tif ($this->blnAuthenticated) {\n\t\t\t\t\textract($this->getResultParams());\n\t\t\t\t\t\n\t\t\t\t\t$strFilterBy = str_replace('.' . $this->strFormat, '', $this->objUrl->getSegment(3));\n\t\t\t\t\tswitch ($strFilterBy) {\n\t\t\t\t\t\tcase 'connections':\n\t\t\t\t\t\t\t$strMethod = 'loadConnectionsByUserId';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'combined':\n\t\t\t\t\t\t\t$strMethod = 'loadCombinedByUserId';\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\tif (!empty($strMethod)) {\n\t\t\t\t\t\t$objUserEvent = $this->initModel();\n\t\t\t\t\t\tif ($objUserEvent->$strMethod(AppRegistry::get('UserLogin')->getUserId(), $arrFilters)) {\n\t\t\t\t\t\t\t$this->blnSuccess = true;\n\t\t\t\t\t\t\tif ($objUserEvent->count()) {\n\t\t\t\t\t\t\t\t$this->arrResult = array(\n\t\t\t\t\t\t\t\t\t'events' => $this->formatEvents($objUserEvent),\n\t\t\t\t\t\t\t\t\t'total' => $objUserEvent->count()\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$this->arrResult = array(\n\t\t\t\t\t\t\t\t\t'events' => array(),\n\t\t\t\t\t\t\t\t\t'total' => 0\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\ttrigger_error(AppLanguage::translate('There was an error loading the event data'));\n\t\t\t\t\t\t\t$this->error();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttrigger_error(AppLanguage::translate('Missing or invalid filter type'));\n\t\t\t\t\t\t$this->error(401);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttrigger_error(AppLanguage::translate('Missing or invalid authentication'));\n\t\t\t\t\t$this->error(401);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->error(400);\n\t\t\t}\n\t\t}", "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}", "public function testGetWaiver()\n {\n $paths = [\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=true',\n ];\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waiver(), count($paths));\n\n $waiver = $sw->getWaiver('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverWaiver::class, $waiver);\n\n $sw->getWaiver('6jebdfxzvrdkd', false);\n $sw->getWaiver('6jebdfxzvrdkd', true);\n\n $this->checkGetRequests($container, $paths);\n }", "public function testGetWaiver()\n {\n $paths = [\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=true',\n ];\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waiver(), count($paths));\n\n $waiver = $sw->getWaiver('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverWaiver::class, $waiver);\n\n $sw->getWaiver('6jebdfxzvrdkd', false);\n $sw->getWaiver('6jebdfxzvrdkd', true);\n\n $this->checkGetRequests($container, $paths);\n }", "public function testGetPromotionCampaignsUsingGET()\n {\n }", "public function run()\n {\n $poll = new Poll();\n $poll->title = \"This is a simple poll from admin panel\";\n $poll->slug = \"this-is-a-simple-poll-from-admin-panel\";\n $poll->status = 1;\n $poll->start_date = \"2020-06-14\";\n $poll->end_date = \"2020-06-15\";\n $poll->total_yes = 5;\n $poll->total_no = 2;\n $poll->total_no_comment = 1;\n $poll->save();\n\n $poll = new Poll();\n $poll->title = \"This is another poll from admin panel\";\n $poll->slug = \"this-is-another-poll-from-admin-panel\";\n $poll->status = 0;\n $poll->start_date = \"2020-06-15\";\n $poll->end_date = \"2020-06-16\";\n $poll->total_yes = 7;\n $poll->total_no = 11;\n $poll->total_no_comment = 3;\n $poll->save();\n }", "public function testServiceCanPollAds()\n {\n $this->advertiserA->pollAds();\n $data = $this->mockResponseA()['hotels'];\n $orgTax = $data[0]['rooms'][0]['taxes'];\n $hotels = Hotels::with('rooms','rooms.taxes')->get();\n $dbtax = $hotels[0]->rooms[0]->taxes[0];\n $this->assertEquals(count($data), $hotels->count());\n $this->assertEquals(count($data[0]['rooms']), $hotels[0]->rooms->count());\n $this->assertEquals($orgTax['amount'], $dbtax->amount);\n $this->assertEquals($orgTax['currency'], $dbtax->currency);\n $this->assertEquals($orgTax['type'], $dbtax->type);\n }", "public function poll(Request $request)\n {\n $events = ChatMessage::where('chat_session_id', $request->input('chatSessionId'))\n ->where('id', '>', $request->input('checkpoint', 0))\n ->get();\n\n $chat = ChatSession::find($request->input('chatSessionId'));\n\n $active = false;\n if (isset($chat->accepting_user_id)\n && ($chat->accepting_user_id !== null)\n && ($chat->completed == 0)\n ) {\n $active = true;\n }\n\n $strippedEvents = [];\n foreach ($events as $event) {\n $strippedEvents[] = [\n 'id' => $event->id,\n 'message_text' => $event->message_text,\n 'from_initiator' => $event->from_initiator,\n ];\n }\n\n return response()->json([\n 'success' => true,\n 'active' => $active,\n 'participant_id' => $chat->accepting_user_id,\n 'participant_name' => $active ? $chat->accepting_user->name : '',\n 'events' => $strippedEvents,\n ]);\n }", "public function getHotels(){\n\n if (isset($_GET) && !empty($_GET)) {\n\n $validUrl = $this->targetUrl.$this->getParameters(); // create full Url (target Url string + parameters String) \n\n $response = $this->getResponse($validUrl); //call function that sent request and return response & save the result in $response .\n\n return $this->responseHandler($response); // call function that checking the response ,and return array of offers .\n\n }else{\n return false; \n }\n }", "public function testDemoteAutomatchUrlUsingGET()\n {\n }", "public function testPromoteAutomatchUrlUsingGET()\n {\n }", "public function get_webhooks() {\n\n\t\t$this->method = 'GET';\n\t}", "protected function doGet()\n {\n $apptId = intval($_GET['id']);\n try {\n $apptDetailBO = new AppointmentDetailBO();\n $this->appointmentDetail = $apptDetailBO->getAppointmentDetails($apptId);\n } catch (NoDataFoundException $e) {\n parent::setAlertErrorMessage($e->getMessage());\n }\n\n parent::doGet();\n\n }", "public function testGetInstitutionUsingGET()\n {\n }", "public function getAllPolls()\n {\n $pollz = $this->em\n ->getRepository('NkgPollBundle:Poll')\n ->findAll();\n\n return $pollz;\n }", "public static function pollData(array $poll)\n {\n $query = Core::query('poll-data');\n $query->bindValue(':poll', $poll, PDO::PARAM_INT);\n $query->execute();\n return $query->fetch(PDO::FETCH_ASSOC);\n }", "public function testPollTimeOut() {\n $c = new _MockProviderCronRunner(50, 0.0001);\n $provider = $this->createMock(ProviderInterface::class);\n $polling = $this->createMock(PollingInterface::class);\n $provider->method('polling')->willReturn($polling);\n $polling->expects($this->once())->method('poll')->will($this->returnCallback(function () {\n usleep(101);\n return TRUE;\n }));\n $c->providers = [$provider];\n $start = microtime(TRUE);\n $c->poll();\n $this->assertLessThan(1, microtime(TRUE) - $start);\n }", "public function index($tripId, $pollId)\n {\n $resultYes = \"\";\n $resultNo = \"\";\n $allPolls = NewPoll::all();\n $allDays = Days::all();\n $pollResults = PollResults::all();\n $currentUserId = Auth::id();\n $currentUser = Auth::user()->name;\n foreach($pollResults as $results) {\n if($results->invite_id == $tripId && $pollId == $results->poll_id && $results->results == 1) {\n $resultYes+= 1;\n }\n elseif($results->invite_id == $tripId && $pollId == $results->poll_id && $results->results == 0) {\n $resultNo+= 1;\n }\n }\n $total = $resultYes + $resultNo;\n if($resultYes > 0) {\n $resultYes = $resultYes/$total * 100;\n }\n\n if($resultNo > 0) {\n $resultNo = $resultNo/$total * 100;\n }\n return view('pages.pollResults', ['trip_id' => $tripId])\n ->with(['allDays' => $allDays])\n ->with(['allPolls' => $allPolls])\n ->with(['pollId' => $pollId])\n ->with(['currentUserId' => $currentUserId])\n ->with(['pollResults' => $pollResults])\n ->with(['currentUser' => $currentUser])\n ->with(['resultYes' => $resultYes])\n ->with(['resultNo' => $resultNo]);\n }", "public function get_test_rest_availability()\n {\n }", "public function polls() {\n\t\tSiteController::loggedInCheck();\n\n\t\t//Get polls associated with the current group\n\t\t$groupId = $_POST['groupId'];\n\t\t$group = Group::loadById($groupId);\n\t\t$polls = $group->getAllPolls();\n\n\t\tinclude_once SYSTEM_PATH.'/view/polls.tpl'; //TODO: make sure this is the correct tpl\n\t}", "function get_offered($course)\n{\n return $course->offered;\n}", "function getWebinarID($eventId) {\n\t$result;\n\t$customField = CRM_NcnCiviZoom_Utils::getWebinarCustomField();\n\ttry {\n\t\t$apiResult = civicrm_api3('Event', 'get', [\n\t\t 'sequential' => 1,\n\t\t 'return' => [$customField],\n\t\t 'id' => $eventId,\n\t\t]);\n\t\t$result = null;\n\t\tif(!empty($apiResult['values'][0][$customField])){\n\t\t\t// Remove any empty spaces\n\t\t\t$result = trim($apiResult['values'][0][$customField]);\n\t\t\t$result = str_replace(' ', '', $result);\n\t\t}\n\t} catch (Exception $e) {\n\t\tthrow $e;\n\t}\n\n\treturn $result;\n}", "public function testGetWaiverTemplate()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::template());\n\n $template = $sw->getWaiverTemplate('TestingTemplateId');\n $this->assertInstanceOf(SmartwaiverTemplate::class, $template);\n\n $this->checkGetRequests($container, ['/v4/templates/TestingTemplateId']);\n }", "public function testGetWaiverTemplate()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::template());\n\n $template = $sw->getWaiverTemplate('TestingTemplateId');\n $this->assertInstanceOf(SmartwaiverTemplate::class, $template);\n\n $this->checkGetRequests($container, ['/v4/templates/TestingTemplateId']);\n }", "public function testGetWaiverRaw()\n {\n $paths = [\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=true',\n ];\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waiver(), count($paths));\n\n $response = $sw->getWaiverRaw('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $sw->getWaiverRaw('6jebdfxzvrdkd', false);\n $sw->getWaiverRaw('6jebdfxzvrdkd', true);\n\n $this->checkGetRequests($container, $paths);\n }", "public function testGetWaiverRaw()\n {\n $paths = [\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=true',\n ];\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waiver(), count($paths));\n\n $response = $sw->getWaiverRaw('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $sw->getWaiverRaw('6jebdfxzvrdkd', false);\n $sw->getWaiverRaw('6jebdfxzvrdkd', true);\n\n $this->checkGetRequests($container, $paths);\n }", "public function getPollTimeout()\n {\n return $this->pollTimeout;\n }", "public function test_get_request($expected, $yourls_site, $uri) {\n $this->assertSame( $expected, yourls_get_request($yourls_site, $uri) );\n }", "public function show(Poll $poll)\n {\n\n $menuSections = Section::where('level', 1)\n ->where('topnav_back', 1)\n ->where('active', 1)->get();\n\n $menuLeftSections = Section::where('level', 1)\n ->where('active', 1)->get();\n\n $provinces = Province::all();\n\n $not_responded = Contact::where('contacted', 0)->get()->count();\n\n $observations = $poll->observations;\n\n return view('backend.polls.show', compact('polls', 'observations', 'poll', 'not_responded', 'provinces', 'menuSections', 'menuLeftSections'));\n }", "public function test_get_wall_route() {\n $client = new Client($this->_app);\n $client->request('GET', '/wall/3');\n $this->assertTrue($client->getResponse()->isOk());\n $this->assertContains('Wall 003', $client->getResponse()->getContent());\n }", "public function testGetWaiverPhotos()\n {\n $response = APISuccessResponses::photos(1);\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, $response, 1);\n\n $photos = $sw->getWaiverPhotos('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverPhotos::class, $photos);\n\n $paths = ['/v4/waivers/6jebdfxzvrdkd/photos'];\n $this->checkGetRequests($container, $paths);\n }", "public function test_get() {\n $times = array(\n mktime( 9, 0, 0, 11, 5, 2013),\n mktime( 7, 0, 0, 11, 5, 2013),\n mktime( 6, 0, 0, 11, 5, 2013),\n mktime( 8, 0, 0, 11, 5, 2013),\n mktime(10, 0, 0, 11, 5, 2013),\n );\n $course = $this->getDataGenerator()->create_course();\n $module = $this->getDataGenerator()->create_module('talkpoint', array(\n 'course' => $course->id,\n ));\n $this->loadDataSet($this->createArrayDataSet(array(\n 'talkpoint_talkpoint' => array(\n array('id', 'instanceid', 'userid', 'title', 'uploadedfile', 'nimbbguid', 'mediatype', 'closed', 'timecreated', 'timemodified'),\n array(1, $module->id, 2, 'Talkpoint 001', 'foo.mp4', null, 'file', 0, $times[0], $times[0]),\n array(2, $module->id, 2, 'Talkpoint 002', 'foo.mp4', null, 'file', 0, $times[1], $times[1]),\n array(3, $module->id, 2, 'Talkpoint 003', 'foo.mp4', null, 'file', 0, $times[2], $times[2]),\n array(4, $module->id, 2, 'Talkpoint 004', 'foo.mp4', null, 'file', 0, $times[3], $times[3]),\n array(5, $module->id, 2, 'Talkpoint 005', 'foo.mp4', null, 'file', 0, $times[4], $times[4]),\n ),\n )));\n $this->_cut->set_userid(2);\n $talkpoint = $this->_cut->get(3);\n $this->assertEquals(array(\n 'id' => 3,\n 'instanceid' => $module->id,\n 'userid' => 2,\n 'userfullname' => 'Admin User',\n 'is_owner' => true,\n 'title' => 'Talkpoint 003',\n 'uploadedfile' => 'foo.mp4',\n 'nimbbguid' => null,\n 'mediatype' => 'file',\n 'closed' => false,\n 'timecreated' => userdate($times[2]),\n 'timemodified' => userdate($times[2]),\n ), $talkpoint);\n }", "public function testFetchEvent() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Fetch the events\n\t\t$total = 0;\n\t\t$events = $jsonpad->fetchEvents(1, null, null, $total);\n\t\t$this->assertInternalType(\"array\", $events);\n\t\t$this->assertGreaterThanOrEqual(1, $total);\n\t\t$this->assertInstanceOf(\"\\Jsonpad\\Resource\\Event\", $events[0]);\n\t\t\n\t\t// Fetch a single event\n\t\t$event = $jsonpad->fetchEvent($events[0]->getId());\n\t\t$this->assertSame($event->getId(), $events[0]->getId());\n\t}", "public function index()\n {\n return response()->json(Poll::paginate(1), 200);\n }", "function _HCM_poll($id=null, $sirka=150){\n \n //nacteni promennych\n $id=intval($id);\n if(isset($sirka)){$sirka=intval($sirka);}else{$sirka=150;}\n if($sirka<100){$sirka=100;}\n \n //nacteni dat ankety\n $vpolldata=mysql_query(\"SELECT * FROM `\"._mysql_prefix.\"-polls` WHERE id=\".$id);\n if(mysql_num_rows($vpolldata)!=0){$vpolldata=mysql_fetch_array($vpolldata); $rcontinue=true;}\n else{$rcontinue=false;}\n \n //sestaveni kodu\n if($rcontinue){\n \n //odpovedi\n $ranswers=explode(\"#\", $vpolldata['answers']);\n $rvotes=explode(\"-\", $vpolldata['votes']);\n $rvotes_sum=array_sum($rvotes);\n if(_loginright_pollvote==1 and $vpolldata['locked']!=1 and _iplogCheck(4, $id)){$rallowvote=true;}else{$rallowvote=false;}\n \n if($rallowvote){$ranswers_code=\"<form action='\"._indexroot.\"remote/hcm/pvote.php?_return=\".urlencode(_indexOutput_url.\"#hcm_poll_\".$GLOBALS['__hcm_uid']).\"' method='post'>\\n<input type='hidden' name='pid' value='\".$vpolldata['id'].\"' />\";}\n else{$ranswers_code=\"\";}\n \n $ranswer_id=0;\n foreach($ranswers as $item){\n if($rvotes_sum!=0 and $rvotes[$ranswer_id]!=0){$rpercent=$rvotes[$ranswer_id]/$rvotes_sum; $rbarwidth=round($rpercent*($sirka-_template_votebarwidthreduction));}else{$rpercent=0; $rbarwidth=1;}\n if($rallowvote){$item=\"<label><input type='radio' name='option' value='\".$ranswer_id.\"' /> \".$item.\" [\".$rvotes[$ranswer_id].\"/\".round($rpercent*100).\"%]</label>\";}else{$item.=\" [\".$rvotes[$ranswer_id].\"/\".round($rpercent*100).\"%]\";}\n $ranswers_code.=\"<div class='poll-answer'>\".$item.\"<div style='width:\".$rbarwidth.\"px;'></div></div>\\n\";\n $ranswer_id++;\n }\n \n $ranswers_code.=\"<div class='poll-answer'>\";\n if($rallowvote){$ranswers_code.=\"<input type='submit' value='\".$GLOBALS['_lang']['hcm.poll.vote'].\"' class='votebutton' />\";}\n $ranswers_code.=$GLOBALS['_lang']['hcm.poll.votes'].\":&nbsp;\".$rvotes_sum.\"</div>\";\n if($rallowvote){$ranswers_code.=\"</form>\\n\";}\n \n return \"\n<div class='anchor'><a name='hcm_poll_\".$GLOBALS['__hcm_uid'].\"'></a></div>\n<div class='poll' style='width:\".$sirka.\"px;'>\n<div class='poll-content'>\n\n<div class='poll-question'>\n\".$vpolldata['question'].\"\n\".(($vpolldata['locked']==1)?\"<div>(\".$GLOBALS['_lang']['hcm.poll.locked'].\")</div>\":'').\"\n</div>\n\n\".$ranswers_code.\"\n\n</div>\n</div>\\n\n\";\n\n }\n\n}", "public function testGetWebhook()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $webhook = $sw->getWebhookConfig();\n $this->assertInstanceOf(SmartwaiverWebhook::class, $webhook);\n\n $this->checkGetRequests($container, ['/v4/webhooks/configure']);\n }", "public function testPollWithNonPollingProvider() {\n $c = new _MockProviderCronRunner(50, 10);\n $c->providers = [$this->createMock(ProviderInterface::class)];\n $start = microtime(TRUE);\n $c->poll();\n $this->assertLessThan(1, microtime(TRUE) - $start);\n }", "protected function reportMeetingPollsRequest($meeting_id)\n {\n // verify the required parameter 'meeting_id' is set\n if ($meeting_id === null || (is_array($meeting_id) && count($meeting_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $meeting_id when calling reportMeetingPolls'\n );\n }\n\n $resourcePath = '/report/meetings/{meetingId}/polls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($meeting_id !== null) {\n $resourcePath = str_replace(\n '{' . 'meetingId' . '}',\n ObjectSerializer::toPathValue($meeting_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function testGetWebhookConfig()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $webhook = $sw->getWebhookConfig();\n $this->assertInstanceOf(SmartwaiverWebhook::class, $webhook);\n\n $this->checkGetRequests($container, ['/v4/webhooks/configure']);\n }", "public function testGetWaiverPhotosRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::photos(1));\n\n $response = $sw->getWaiverPhotosRaw('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $this->checkGetRequests($container, ['/v4/waivers/6jebdfxzvrdkd/photos']);\n }", "public function testGetOembed()\n\t{\n\t\t$id = 217781292748652545;\n\t\t$maxwidth = 300;\n\t\t$hide_media = true;\n\t\t$hide_thread = true;\n\t\t$omit_script = true;\n\t\t$align = 'center';\n\t\t$related = 'twitter';\n\t\t$lang = 'fr';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->rateLimit;\n\n\t\t$path = $this->object->fetchUrl('/application/rate_limit_status.json', array(\"resources\" => \"statuses\"));\n\n\t\t$this->client->expects($this->at(0))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->sampleString;\n\n\t\t// Set request parameters.\n\t\t$data['id'] = $id;\n\t\t$data['maxwidth'] = $maxwidth;\n\t\t$data['hide_media'] = $hide_media;\n\t\t$data['hide_thread'] = $hide_thread;\n\t\t$data['omit_script'] = $omit_script;\n\t\t$data['align'] = $align;\n\t\t$data['related'] = $related;\n\t\t$data['lang'] = $lang;\n\n\t\t$path = $this->object->fetchUrl('/statuses/oembed.json', $data);\n\n\t\t$this->client->expects($this->at(1))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->getOembed($id, null, $maxwidth, $hide_media, $hide_thread, $omit_script, $align, $related, $lang),\n\t\t\t$this->equalTo(json_decode($this->sampleString))\n\t\t);\n\t}", "function getUpcomingWebinars()\n {\n $path = $this->getPathRelativeToOrganizer('upcomingWebinars');\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function testReportsReferralsGet()\n {\n }", "public function testRejectAutomatchUrlUsingGET()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function retrieveWebhooks()\n {\n return $this->start()->uri(\"/api/webhook\")\n ->get()\n ->go();\n }", "public function testPollWithoutProviders() {\n $c = new _MockProviderCronRunner(50, 10);\n $start = microtime(TRUE);\n $c->poll();\n $this->assertLessThan(1, microtime(TRUE) - $start);\n }", "public function getActivePolls()\n {\n $pollz = $this->em\n ->createQuery('SELECT p\n FROM NkgPollBundle:Poll p\n WHERE p.active = 1\n AND CURRENT_TIMESTAMP() BETWEEN p.startdate AND p.enddate\n ORDER BY p.enddate DESC');\n\n try {\n $res = $pollz->getResult();\n return $res;\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return array();\n }\n }", "public function testFetchEvents() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Fetch the events\n\t\t$total = 0;\n\t\t$events = $jsonpad->fetchEvents(1, null, null, $total);\n\t\t$this->assertInternalType(\"array\", $events);\n\t\t$this->assertGreaterThanOrEqual(1, $total);\n\t\t$this->assertInstanceOf(\"\\Jsonpad\\Resource\\Event\", $events[0]);\n\t}", "public function showpollsAction()\n {\n $polls = $this->getDoctrine()->getRepository('PollPollBundle:PollImpl')->findAll();\n return $this->render('PollPollBundle:Poll:show_polls.html.twig', array(\"polls\" => array_reverse($polls)));\n }", "public function testComDayCqPollingImporterImplManagedPollConfigImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.polling.importer.impl.ManagedPollConfigImpl';\n\n $crawler = $client->request('POST', $path);\n }", "public function testGetAccountPeriodicPaymentsUsingGET()\n {\n }", "public function test_get()\n\t{\n\t\t$_SERVER['REQUEST_METHOD'] = 'GET';\n\n\t\tPigeon::map(function($r){\n\t\t\t$r->get('posts/(:any)', 'posts/show/$1');\n\t\t\t$r->get('posts/(:num)', 'posts#show');\n\t\t\t$r->get('posts/people', array( 'Posts', 'action' ));\n\t\t});\n\n\t\t$this->assertEquals(array( 'posts/(:any)' => 'posts/show/$1', \n\t\t\t\t\t\t\t\t 'posts/people' => 'posts/action',\n\t\t\t\t\t\t\t\t 'posts/(:num)' => 'posts/show/$1' ), Pigeon::draw());\n\t}" ]
[ "0.6517212", "0.63763607", "0.63285667", "0.61603045", "0.61146563", "0.5927292", "0.58602315", "0.56228215", "0.54828477", "0.54216975", "0.53326815", "0.5261555", "0.5261327", "0.5234743", "0.5209806", "0.51862484", "0.5137796", "0.51247567", "0.5106876", "0.50816756", "0.50615215", "0.50030595", "0.49947917", "0.49928623", "0.49740723", "0.4938543", "0.4929184", "0.49227527", "0.48954555", "0.48837635", "0.48292363", "0.48217615", "0.47822097", "0.4774201", "0.47543493", "0.4753188", "0.4748506", "0.47465217", "0.47335157", "0.47317663", "0.47196284", "0.46908402", "0.46723196", "0.46723196", "0.46587244", "0.46550167", "0.46502483", "0.4648983", "0.46480876", "0.46454632", "0.46454632", "0.4631957", "0.4629784", "0.4627866", "0.46250924", "0.46245095", "0.46206763", "0.4617253", "0.46166834", "0.4600943", "0.459614", "0.45843765", "0.45824915", "0.4579361", "0.45668173", "0.45543993", "0.45284453", "0.45284432", "0.4526302", "0.4519469", "0.4519469", "0.45025885", "0.45025885", "0.45019308", "0.45013565", "0.45003435", "0.44904074", "0.44881904", "0.4486273", "0.4482771", "0.44808888", "0.44783095", "0.44680065", "0.4461408", "0.4458169", "0.4454875", "0.44539487", "0.4451962", "0.44511816", "0.44501486", "0.44478893", "0.4442714", "0.4441755", "0.44416794", "0.44413343", "0.4434702", "0.44300076", "0.44299987", "0.44287187", "0.4427197" ]
0.761019
0
Test case for webinarPollUpdate Update a Webinar Poll.
public function testWebinarPollUpdate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_poll()\n {\n //var_dump::display($_POST);\n @session::init();\n $v_website_id = session::get('session_website_id');\n $v_poll_id = get_post_var('hdn_item_id','');\n $v_poll_name = get_post_var('txt_poll_name');\n $v_poll_status = get_post_var('poll_status');\n \n $v_delete_answer_list = get_post_var('hdn_id_delete_answer_list','');\n \n $arr_answer = isset($_POST['txt_poll_answer'])?$_POST['txt_poll_answer']: array(); \n $v_answer_old_list = get_post_var('hdn_item_id_list_old','');\n $arr_answer_old_list = ($v_answer_old_list!='')?explode(',', $v_answer_old_list):array();\n \n $v_answer_new_list = get_post_var('hdn_item_id_list_new','');\n $arr_answer_new_list = ($v_answer_new_list!='')?explode(',', $v_answer_new_list):array();\n \n $v_begin_date = jwDate::ddmmyyyy_to_yyyymmdd(get_post_var('txt_begin_date','')).\" \". get_post_var('txt_begin_time','');\n \n $v_end_date = jwDate::ddmmyyyy_to_yyyymmdd(get_post_var('txt_end_date','')).\" \". get_post_var('txt_end_time','');\n \n //update poll\n if($v_poll_id!='')\n {\n $stmt=\"select distinct FK_WEBSITE from t_ps_poll Where PK_POLL =?\";\n $v_website_id_of_poll = $this->db->getOne($stmt,array($v_poll_id));\n if($v_website_id_of_poll == $v_website_id)\n {\n if($this->gp_check_user_permission('SUA_CUOC_THAM_DO_Y_KIEN')>0)\n {\n //update poll\n $stmt=\"update t_ps_poll set C_STATUS=?,C_NAME=?,C_BEGIN_DATE=?,C_END_DATE=?\n where PK_POLL=?\";\n $arr_stmt = array($v_poll_status,$v_poll_name,$v_begin_date,$v_end_date,$v_poll_id);\n $this->db->Execute($stmt,$arr_stmt);\n //update poll answer\n for($i=0;$i<count($arr_answer_old_list);$i++)\n {\n $v_answer_id = $arr_answer_old_list[$i];\n $v_answer_name = replace_bad_char($arr_answer[$i]);\n $stmt=\"Update t_ps_poll_detail set C_ANSWER = '$v_answer_name' where PK_POLL_DETAIL=$v_answer_id\";\n $this->db->Execute($stmt);\n }\n //xoá dữ liệu answer\n if($v_delete_answer_list !='')\n {\n $stmt = \"Delete From t_ps_poll_detail Where PK_POLL_DETAIL in ($v_delete_answer_list)\";\n $this->db->Execute($stmt);\n }\n //thêm answer\n if($v_answer_new_list!='')\n {\n foreach($arr_answer_new_list as $answer)\n {\n $v_answer_name = $answer;\n $stmt=\"insert into t_ps_poll_detail(FK_POLL,C_ANSWER,C_VOTE)\n values (?,?,?)\";\n $this->db->Execute($stmt,array($v_poll_id,$v_answer_name,0));\n }\n }\n $this->exec_done($this->goback_url);\n }\n else\n {\n echo \"<script>alert('Bạn không có quyền thực hiện thao tác này !!!');</script>\";\n $this->exec_done($this->goback_url);\n }\n }\n }\n //insert poll\n else \n {\n if($this->gp_check_user_permission('THEM_MOI_CUOC_THAM_DO_Y_KIEN')>0)\n {\n //var_dump($_POST);\n \n $stmt= \"insert into t_ps_poll(FK_WEBSITE,C_STATUS,C_NAME,C_BEGIN_DATE,C_END_DATE)\n values(?,?,?,?,?)\";\n $arr_stmt = array($v_website_id,$v_poll_status,$v_poll_name,\n $v_begin_date,$v_end_date);\n $this->db->Execute($stmt,$arr_stmt);\n \n $stmt=\"Select PK_POLL From t_ps_poll ORDER BY PK_POLL desc limit 1\";\n $v_new_id = $this->db->getOne($stmt);\n if($v_answer_new_list!='')\n {\n foreach($arr_answer_new_list as $answer)\n {\n $v_answer_name = $answer;\n $stmt=\"insert into t_ps_poll_detail(FK_POLL,C_ANSWER,C_VOTE)\n values (?,?,?)\";\n $this->db->Execute($stmt,array($v_new_id,$v_answer_name,0));\n }\n }\n $this->exec_done($this->goback_url);\n }\n else \n {\n echo \"<script>alert('Bạn không có quyền thực hiện thao tác này !!!');</script>\";\n $this->exec_done($this->goback_url, $arr_filter);\n }\n }\n \n //Hoàn thành và lưu điều kiện lọc\n //$arr_filter = get_filter_condition(array('sel_goto_page', 'sel_rows_per_page'));\n $this->exec_done($this->goback_url);\n }", "public function testWebinarUpdate()\n {\n }", "public function update(User $user, Poll $poll)\n {\n //\n }", "public function testWebinarPollGet()\n {\n }", "public function update(Request $request, Poll $poll) {\n $parentType = $poll->parent_type;\n $parent = Poll::getParent($parentType,$poll->parent);\n $statuses = $request->input('statuses');\n \n // csak admin modosíthat proposal és debate státuszban\n\t\tif (!$this->accessCheck('edit',$parentType, $parent->id, $poll)) {\n return redirect()->to(\\URL::to('/poll/list/'.$parentType,'/'.$parent->id.'/'.$statuses))\n ->with('error',__('poll.accessDenied'));\n }\n \n // tartalmi ellenörzés\n $this->model->valid($request);\n \n // poll rekord kiirása\n $id = $poll->id;\n $errorInfo = Poll::saveOrStore($id, $request);\n \n // result kialakítása\n if ($errorInfo == '') {\n $result = redirect()->to('/polls/'.$poll->id)\n ->with('success',__('poll.successSave'));\n } else {\n $result = redirect()->to('/polls/'.$poll->id)\n ->with('error',$errorInfo);\n }\n return $result;\n }", "public function testWebinarPollCreate()\n {\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function testUpdateSurvey()\n {\n $survey = Survey::factory()->create();\n\n $response = $this->json('PATCH', \"survey/{$survey->id}\", [\n 'survey' => ['epilogue' => 'epilogue your behind']\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', ['id' => $survey->id, 'epilogue' => 'epilogue your behind']);\n }", "public function testSellerUpdatedSuccess()\n {\n $this->demoUserLoginIn();\n $spu = Spu::create([\n 'users_id' => '1',\n 'name' => 'test',\n 'description' => 'test',\n ]);\n $response = $this->call('PATCH', '/seller/4/update', [\n 'name' => 'testUpdate',\n 'description' => 'testUpdate',\n ]);\n $this->assertEquals(302, $response->status());\n }", "public function update(Poll $poll, UpdatePollRequest $request)\n {\n $this->poll->update($poll, $request->all());\n\n return redirect()->route('admin.iquiz.poll.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('iquiz::polls.title.polls')]));\n }", "public function test_update() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n self::$outage->starttime += 10;\n outagedb::save(self::$outage);\n\n // Should still exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage)\",\n ['idoutage' => self::$outage->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertTrue(is_object($event));\n self::assertSame(self::$event->id, $event->id);\n self::$event = $event;\n }", "public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }", "public function testCollectionTicketsUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function update() {\n\t\t$vars = $this->params['url'];\n\t\t$this->Event->id = $vars['id'];\n\t\t$this->Event->saveField('start', $vars['start']);\n\t\t$this->Event->saveField('end', $vars['end']);\n\t\t$this->Event->saveField('all_day', $vars['allday']);\n\t}", "public function update(Request $request, $id)\n { \n $div = Poll::findOrFail($id);\n\n $validator = Validator::make($request->all(), [\n 'title' => ['required'],\n 'description' => ['required'],\n 'deadline1' => ['required'],\n 'deadline2' => ['required'],\n 'choices1' => ['required']\n ]);\n\n if ($validator->fails()) {\n return redirect()->route('poll')->withInput()->with('status', 'Update Failed!');\n }\n\n $crud = $div->update([\n 'title' => $request->title,\n 'description' => $request->description,\n 'deadline' => $request->deadline1.' '.$request->deadline2\n ]);\n\n if ($crud) {\n $choice = Choice::where('poll_id', '=', $id)->get();\n $count = Choice::where('poll_id', '=', $id)->count();\n $a = 1;\n foreach ($choice as $c) {\n $b = $c->id;\n $z = $a++;\n $cccc = Choice::findOrFail($b);\n $crud2 = $cccc->update([\n 'choices' => $request->input('choices'.$z),\n 'poll_id' => $id\n ]);\n }\n $ccccccc = $count + 1;\n if ($request->input('choices'.$ccccccc)) {\n $crud3 = Choice::create([\n 'choices' => $request->input('choices'.$ccccccc),\n 'poll_id' => $id\n ]);\n } else{}\n return redirect()->route('poll')->with('status', 'Poll Updated!');\n } else {\n return redirect()->back()->with('status', 'Update Failed!');\n }\n }", "public function testD_update() {\n\n $fname = self::$generator->firstName();\n $lname = self::$generator->lastName;\n\n $resp = $this->wrapper->update( self::$randomEmail, [\n 'FNAME' => $fname,\n 'LNAME' => $lname\n ]);\n\n $this->assertObjectHasAttribute('id', $resp);\n $this->assertObjectHasAttribute('merge_fields', $resp);\n\n $updated = $resp->merge_fields;\n\n $this->assertEquals($lname, $updated->LNAME);\n\n }", "private function polls_put($pollId){\n $this->load->model(\"poll\");\n $this->load->model(\"answer\");\n\n try {\n $data = json_decode(trim(file_get_contents('php://input')), true);\n //Validate the poll\n $errors = $this->validate($data);\n if (count($errors) > 0){\n $this->response(array(\"errors\"=>$errors), 404);\n return;\n }\n\n //Angular magically escapes stuff\n $this->poll->update($pollId, $data[\"title\"], $data[\"question\"]);\n\n $answers = $data[\"answers\"];\n $answers_count = count($answers);\n\n //Remove all existing answers\n $this->answer->deleteAll($pollId);\n\n for ($i = 0; $i < $answers_count; ++$i) {\n $answer = $answers[$i];\n\n $answer[\"optionNo\"] = $i + 1;\n $answer[\"questionId\"] = $pollId;\n\n //Angular magically doesn't worry about html being escaped\n $this->answer->create($pollId, $answer[\"optionNo\"], $answer[\"answer\"], $answer[\"id\"]);\n }\n }\n catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Unable to update poll\"), 404);\n }\n }", "public function update($meeting)\n {\n\n }", "public function editpoll_submit(){\n SiteController::loggedInCheck();\n\n\t\tif (isset($_POST['Cancel'])) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\texit();\n\t\t}\n\n\t\t$pollid = $_POST['pollid'];\n\t\t$poll = Poll::loadById($pollid);\n\n\t\t$title = $_POST['title'];\n\t\t$options = $_POST['options'];\n\t\t$timestamp = date(\"Y-m-d\", time());\n\n\t\t$poll->set('title', $title);\n\t\t$poll->set('timestamp', $timestamp);\n\t\t$poll->save();\n\n //remove old options\n $old_options = Poll::getPollOptions();\n foreach($old_options as $opt){\n $opt->delete();\n }\n\n //update options\n foreach ($options as $option){\n $poll_option = new PollOption();\n $poll_option->set('pollId', $pollid);\n $poll_option->set('poll_option', $option);\n $poll_option->save();\n }\n\n\t\theader('Location: '.BASE_URL);\n\t}", "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }", "public function update(Request $request, $id)\n {\n $poll = Polls::findOrFail($id);\n $poll->title=$request->input('title');\n $poll->description=$request->input('description');\n $poll->videosrc=$request->input('videosrc');\n $poll->videoposter=$request->input('videoposter');\n $poll->starttime=$request->input('starttime');\n $poll->endtime=$request->input('endtime');\n $poll->rewardflag=$request->input('rewardflag');\n $poll->save();\n return redirect(\"/admin/polls/$id/edit\")\n ->withSuccess(\"'$poll->title' 更新成功.\");\n }", "public function testUpdateSurvey0()\n {\n }", "public function testUpdateSurvey0()\n {\n }", "public function testHandleUpdateSuccess()\n {\n // Populate data\n $dealerAccountID = $this->_populate();\n \n // Set params\n $params = $this->customDealerAccountData;\n \n // Add ID\n $ID = $this->_pickRandomItem($dealerAccountID);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $params, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHas('dealer-account-updated', '');\n \n // Validate data\n $dealerAccount = $this->dealer_account->getOne($ID);\n $this->assertEquals($dealerAccount->name, $this->customDealerAccountData['name']);\n $this->assertEquals($dealerAccount->branch_ID, $this->customDealerAccountData['branch_ID']);\n }", "public function testHandleUpdateSuccess()\n {\n // Populate data\n $branchIDs = $this->_populate();\n \n // Set params\n $params = $this->customBranchData;\n \n // Add ID\n $ID = $this->_pickRandomItem($branchIDs);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/branch/edit', $params, [], [], ['HTTP_REFERER' => '/branch/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/branch/edit');\n $this->assertSessionHas('branch-updated', '');\n \n // Validate data\n $branch = $this->branch->getOne($ID);\n $this->assertEquals($branch->name, $this->customBranchData['name']);\n $this->assertEquals($branch->promotor_ID, $this->customBranchData['promotor_ID']);\n }", "public function test_admin_can_update_a_worker()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($admin = $this->createAdmin())\n ->visitRoute($this->route, $this->lastWorker()->id)\n ->type('worker_name', $this->makeWorker()->worker_name)\n ->type('worker_nif', $this->makeWorker()->worker_nif)\n ->type('worker_start', str_replace('/', '', $this->makeWorker()->worker_start))\n ->type('worker_ropo', $this->makeWorker()->worker_ropo)\n ->type('worker_ropo_date', str_replace('/', '', $this->makeWorker()->worker_ropo_date))\n ->select('worker_ropo_level', $this->makeWorker()->worker_ropo_level)\n ->type('worker_observations', $this->makeWorker()->worker_observations)\n ->press(trans('buttons.edit'))\n ->assertSee(__('The items has been updated successfuly'));\n });\n\n $this->assertDatabaseHas('workers', [\n 'worker_name' => $this->makeWorker()->worker_name,\n 'worker_nif' => $this->makeWorker()->worker_nif,\n 'worker_ropo' => $this->makeWorker()->worker_ropo,\n 'worker_ropo_level' => $this->makeWorker()->worker_ropo_level,\n 'worker_observations' => $this->makeWorker()->worker_observations,\n ]);\n }", "public function testUpdateVendorComplianceSurvey()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function testUpdate()\n\t{\n\t\t$params = $this->setUpParams();\n\t\t$params['title'] = 'some tag';\n\t\t$params['slug'] = 'some-tag';\n\t\t$response = $this->call('PUT', '/'.self::$endpoint.'/'.$this->obj->id, $params);\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t$result = $response->getOriginalContent()->toArray();\n\n\t\t// tes apakah hasil return adalah yang sesuai\n\t\tforeach ($params as $key => $val) {\n\t\t\t$this->assertArrayHasKey($key, $result);\n\t\t\tif (isset($result[$key])&&($key!='created_at')&&($key!='updated_at'))\n\t\t\t\t$this->assertEquals($val, $result[$key]);\n\t\t}\n\n\t\t// tes tak ada yang dicari\n\t\t$response = $this->call('GET', '/'.self::$endpoint.'/696969', $params);\n\t\t$this->assertEquals(500, $response->getStatusCode());\n\t}", "public function testWebinarPollDelete()\n {\n }", "public function test_shoppers_can_be_updated()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $response = $this->patch(route('shoppers.update', $shopper), $shppr = [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'phone' => '+16089673882',\n 'image' => UploadedFile::fake()->image('avatar.jpg', 400, 400)->size(1000),\n ]);\n\n $response->assertSessionHasNoErrors([\n 'name',\n 'phone',\n 'email',\n ]);\n\n $this->assertDatabaseHas(\n 'shoppers',\n [\n 'name' => $shppr['name'],\n 'email' => $shppr['email'],\n 'phone' => $shppr['phone'],\n 'image' => '/storage/'.time().'.'.$shppr['image']->extension(),\n 'admin_created_id' => '1',\n 'admin_updated_id' => $shopper->id\n ]\n );\n\n $response->assertStatus(302);\n $response->assertRedirect(route('shoppers.index'));\n }", "public function editpoll(){\n SiteController::loggedInCheck();\n\n //retrieve the poll\n\t\t$pollid = $_POST['edit'];\n\t\t$poll = Poll::loadById($pollid);\n\n //retrieve poll author's username\n\t\t$authorid = $poll->get('userId');\n\t\t$user = User::loadById($authorid);\n\t\t$username = $user->get('username');\n\n\t\t//check if author of the poll is the logged in user\n\t\tif($_SESSION['username'] != $username){\n\t\t\t$_SESSION['info'] = \"You can only edit polls of which you are the author of.\";\n\t\t\theader('Location: '.BASE_URL);\n\t\t\texit();\n\t\t} else {\n\t\t\t//allow access to edit poll\n\t\t\t$title = $poll->get('title');\n $options = $poll->getPollOptions();\n\t\t\tinclude_once SYSTEM_PATH.'/view/editpoll.tpl'; //TODO: check tpl is correct\n\t\t}\n\t}", "public function executeUpdate(sfWebRequest $request)\n {\n $this->forward404Unless($request->isMethod(sfRequest::POST) || $request->isMethod(sfRequest::PUT));\n $this->forward404Unless($website_practice_area = Doctrine::getTable('WebsitePracticeArea')->find(array($request->getParameter('id'))), sprintf('Object website_practice_area does not exist (%s).', $request->getParameter('id')));\n $this->form = new WebsitePracticeAreaForm($website_practice_area,array(\"Id\"=>$request->getParameter('id'),\"webId\"=>$website_practice_area->getWebsiteId()));\n $this->websitedetail = UsersWebsite::getUsersWebsiteId($this->getUser()->getAttribute('admin_user_id'));\n\n $this->displaySlugValue = $_POST['WebsitePracticeArea']['Newslug'];\n\n\t\t$redirectFlag = $request->getPostParameter('submit');\n $this->processForm($request, $this->form, $redirectFlag);\n\n $this->setTemplate('edit');\n }", "public function vote()\r\n\t{\r\n\r\n\t\t$poll_id = $_POST['poll_id']; \r\n\r\n\t\t// Increate vote for desired field\r\n\t\tif (have_rows('polls_options', $poll_id)) {\r\n\t\t\twhile (have_rows('polls_options', $poll_id)) {\r\n\t\t\t\tthe_row();\r\n\t\t\t\tif (get_sub_field('poll_option') === $_POST[\"votes_question\"]) {\r\n\r\n\t\t\t\t\t// Update vote count into ACF field\r\n\t\t\t\t\t$current_votes_count = get_sub_field('poll_option_votes');\r\n\t\t\t\t\t$vote = update_sub_field('poll_option_votes', $current_votes_count ? ++$current_votes_count : 1, $poll_id);\r\n\r\n\t\t\t\t\t// Add poll ID to session \r\n\t\t\t\t\tsession_start();\r\n\t\t\t\t\tif (!isset($_SESSION['wppoll'])) {\r\n\t\t\t\t\t\t$_SESSION['wppoll'] = array();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarray_push($_SESSION['wppoll'], (int) $poll_id);\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\twp_die();\r\n\r\n\t\tif (!$vote) {\r\n\t\t\t$data = array('type' => 'error', 'message' => 'Voting failed');\r\n\t\t\theader('HTTP/1.1 400 Bad Request');\r\n\t\t\theader('Content-Type: application/json; charset=UTF-8');\r\n\t\t\techo json_encode($data);\r\n\t\t}\r\n\t\twp_die();\r\n\t}", "public function testUserUpdate()\n {\n $this->browse(function (Browser $browser) {\n $update_button = self::$locator . ' td .update_button';\n\n self::$username = 'A0Tester' . uniqid();\n $browser->visit('/')\n ->click($update_button)\n ->type('username', self::$username)\n ->type('first_name', 'aaaab')\n ->type('last_name', 'aaaab')\n ->click('button[type=\"submit\"]')\n\n ->waitForText('User data successfully updated!')\n ->assertSee('User data successfully updated!')\n ->assertValue('input[name=\"username\"]', self::$username)\n ->assertValue('input[name=\"first_name\"]', 'aaaab')\n ->assertValue('input[name=\"last_name\"]', 'aaaab');\n });\n }", "public function updated(OnlineInquiry $onlineInquiry)\n {\n //\n }", "function update()\n {\n\n $query = \"UPDATE Proposal set \";\n $query = $query . \"LastEditDate=NOW()\";\n if(isset($this->BidderID))\n {\n $query = $query . \", OpportunityID = '\" . $this->OpportunityID . \"'\"; \n }\n\n if(isset($this->BidderID))\n {\n $query = $query . \", BidderID = '\" . $this->BidderID . \"'\"; \n }\n\n if(isset($this->Status))\n {\n $query = $query . \", Status = \" . $this->Status . \"\"; \n }\n\n if(isset($this->TechnicalScore))\n {\n $query = $query . \", TechnicalScore = \" . $this->TechnicalScore . \" \"; \n }\n\n if(isset($this->FeeScore))\n {\n $query = $query . \", FeeScore = \" . $this->FeeScore . \" \"; \n }\n\n if(isset($this->FinalTotalScore))\n {\n $query = $query . \", FinalTotalScore = \" . $this->FinalTotalScore . \" \"; \n }\n\n if(isset($this->ContractAwarded))\n {\n $query = $query . \", ContractAwarded = \" . $this->ContractAwarded . \" \"; \n }\n\n $query = $query . \" WHERE ProposalID = '\" . $this->ProposalID . \"';\";\n\n $stmt = $this->conn->prepare( $query );\n\n // bind parameters\n //$stmt->bindParam(':ProposalID', $this->ProposalID);\n //$stmt->bindParam(':OpportunityID', $this->OpportunityID);\n //$stmt->bindParam(':BidderID', $this->BidderID);\n //$stmt->bindParam(':Status', $this->Status);\n //$stmt->bindParam(':TechnicalScore', $this->TechnicalScore);\n // $stmt->bindParam(':FeeScore', $this->FeeScore);\n //$stmt->bindParam(':FinalTotalScore', $this->FinalTotalScore);\n\n if($stmt->execute())\n return true;\n else\n return false;\n }", "public function testDeveloperUpdate()\n {\n $developer = factory(Developer::class)->create();\n $response = $this->get('/developer/update?id=' . $developer->id);\n $response->assertStatus(200);\n }", "public function testUpdatePayslipByID()\n {\n }", "public function update(Request $request, EventStarter $eventStarter)\n {\n\t\t\n\t\t$eventStarter->schedule_plan = $request->get('schedule_plan');\n\t\t$eventStarter->status = $request->get('status');\n\t\t$eventStarter->save();\n\n\n\t return redirect(route('detail-event', ['eventStarter' => $eventStarter->id]));\n }", "public function testUpdate() {\n\n\t\t$request_uri = $this->root_url . 'update';\n\n\t\t$parameters = array(\n\t\t\t'uri' => $request_uri,\n\t\t\t'method' => 'POST',\n\t\t\t'database' => $this->db,\n\t\t\t'postdata' => array(\n\t\t\t\t'id' => 4,\n\t\t\t\t'firstname' => 'Andrei',\n\t\t\t\t'surname' => 'Kanchelskis',\n\t\t\t)\n\t\t);\n\n\t\t$server = new APIServer( $parameters );\n\n\t\t$server->run();\n\n\t\t$response = $server->getResponse();\n\n\t\t$this->assertArrayHasKey('status', $response);\n\t\t$this->assertArrayHasKey('command', $response);\n\n\t\t$this->assertEquals( $response['command'], 'update' );\n\t}", "public function testUpdate(): void { }", "private function execute_Update() {\n\n if ((isset($_POST['save'])) or (isset($_POST['save_and_close']))) {\n\n // Check posted Informations\n $weblink_status = filter_input(INPUT_POST, 'weblink_status', FILTER_VALIDATE_INT);\n $this->weblink_data = [\n 'weblink_id' => form_sanitizer(filter_input(INPUT_POST, 'weblink_id', FILTER_VALIDATE_INT), 0, 'weblink_id'),\n 'weblink_name' => form_sanitizer(filter_input(INPUT_POST, 'weblink_name', FILTER_DEFAULT), '', 'weblink_name'),\n 'weblink_cat' => form_sanitizer(filter_input(INPUT_POST, 'weblink_cat', FILTER_VALIDATE_INT), 0, 'weblink_cat'),\n 'weblink_url' => form_sanitizer(filter_input(INPUT_POST, 'weblink_url', FILTER_DEFAULT), '', 'weblink_url'),\n 'weblink_description' => form_sanitizer(filter_input(INPUT_POST, 'weblink_description', FILTER_DEFAULT), '', 'weblink_description'),\n 'weblink_datestamp' => form_sanitizer(filter_input(INPUT_POST, 'weblink_datestamp', FILTER_DEFAULT), '', 'weblink_datestamp'),\n 'weblink_visibility' => form_sanitizer(filter_input(INPUT_POST, 'weblink_visibility', FILTER_VALIDATE_INT), 0, 'weblink_visibility'),\n 'weblink_status' => !empty($weblink_status) ? $weblink_status : '0',\n 'weblink_language' => form_sanitizer(filter_input(INPUT_POST, 'weblink_language', FILTER_DEFAULT), LANGUAGE, 'weblink_language'),\n ];\n\n // Handle\n if (\\defender::safe()) {\n\n $update_datestamp = filter_input(INPUT_POST, 'update_datestamp', FILTER_DEFAULT);\n // Update\n if (dbcount(\"('weblink_id')\", DB_WEBLINKS, \"weblink_id=:weblinkid\", [':weblinkid' => $this->weblink_data['weblink_id']])) {\n $this->weblink_data['weblink_datestamp'] = !empty($update_datestamp) ? time() : $this->weblink_data['weblink_datestamp'];\n dbquery_insert(DB_WEBLINKS, $this->weblink_data, 'update');\n addNotice('success', $this->locale['WLS_0031']);\n // Create\n } else {\n $this->weblink_data['weblink_id'] = dbquery_insert(DB_WEBLINKS, $this->weblink_data, 'save');\n addNotice('success', $this->locale['WLS_0030']);\n }\n\n // Redirect\n if (isset($_POST['save_and_close'])) {\n redirect(clean_request('', ['ref', 'action', 'weblink_id'], FALSE));\n } else {\n redirect(clean_request('action=edit&weblink_id='.$this->weblink_data['weblink_id'], ['action', 'weblink_id'], FALSE));\n }\n }\n }\n }", "function updateWebinar($webinarKey, $payloadArray, $sendNotification = true)\n {\n ($sendNotification) ? $parameters = ['notifyParticipants' => true] : $parameters = ['notifyParticipants' => false];\n\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n $webinarObject = new WebinarEntity($payloadArray);\n\n return $this->sendRequest('PUT', $path, $parameters, $payload = $webinarObject->toArray());\n }", "public function testUpdatePayslip()\n {\n }", "public function updateOffer()\n {\n global $mysqli, $_POST;\n $offer_id = $_POST['offer_id'];\n $date_begin = date(\"Y-m-d\", strtotime($_POST[\"date_begin\"]));\n $date_end = date(\"Y-m-d\", strtotime($_POST[\"date_end\"]));\n $title = $mysqli->real_escape_string($_POST[\"title\"]);\n $subtitle = $mysqli->real_escape_string($_POST[\"subtitle\"]);\n $header = $mysqli->real_escape_string($_POST[\"header\"]);\n $footer = $mysqli->real_escape_string($_POST[\"footer\"]);\n $services = $mysqli->real_escape_string($_POST[\"services\"]);\n $description = $mysqli->real_escape_string($_POST[\"description\"]);\n $alias = $mysqli->real_escape_string($_POST[\"alias\"]);\n $type = $mysqli->real_escape_string($_POST[\"type\"]);\n $course = $mysqli->real_escape_string($_POST[\"course\"]);\n $status = $mysqli->real_escape_string($_POST[\"status\"]);\n $type_date = $mysqli->real_escape_string($_POST[\"type_date\"]);\n $discount = $mysqli->real_escape_string($_POST[\"discount\"]);\n $update_qry = \"UPDATE `offers` SET\n `date_begin`='\".$date_begin.\"',\n `date_end`='\".$date_end.\"',\n `title`='\".$title.\"',\n `subtitle`='\".$subtitle.\"',\n `header`='\".$header.\"',\n `footer`='\".$footer.\"',\n `services`='\".$services.\"',\n `description`='\".$description.\"',\n `alias`='\".$alias.\"',\n `type`='\".$type.\"',\n `course`='\".$course.\"',\n `status`='\".$status.\"',\n `type_date`='\".$type_date.\"',\n `discount`='\".$discount.\"',\n `updated_at` =NOW() WHERE id=\".$offer_id;\n $mysqli->query($update_qry);\n $mes = ($mysqli->affected_rows>=0)?1:0;\n $heading = $title.'<small> Typ: '.$type.'</small>&nbsp; '.$_POST[\"date_begin\"].' - '.$_POST[\"date_end\"];\n\n print json_encode(['success'=>$mes,\"heading\" =>$heading]);\n }", "public function testUpdatePayrun()\n {\n }", "public static function update(){\n $idTimeSlot = $_REQUEST[\"idTimeSlot\"];\n $dayOfWeek = $_REQUEST[\"dayOfWeek\"];\n $startTime = $_REQUEST[\"startTime\"];\n $endTime = $_REQUEST[\"endTime\"];\n\n $result = DB::dataManipulation(\"UPDATE timeslots \n SET dayOfWeek='$dayOfWeek', startTime='$startTime', endTime='$endTime'\n WHERE idTimeSlot = '$idTimeSlot'\");\n return $result;\n }", "public function SurveyReadStatusUpdate() {\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_survey_id', 'label' => 'Pushed Survey 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_survey_id = $this->getInput('push_survey_id');\n\t\t$push_survey_idi = $push_survey_id['push_survey_id'];\n\t\t\n $this->db->set('media_play_date', date(\"Y-m-d H:i:s\")); \n $this->db->where('id', $push_survey_idi);\n if ($this->db->update('push_surveys')) {\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 testUpdate()\n\t{\n\t\t// Update just updates the given fields, let's the rest unchanged.\n\t\t// Use Replace to replace all fields.\n\t\t$updateProduct = [\n\t\t\t'description' => 'This is a product description.',\n\t\t\t'price' => 1150.00\n\t\t];\n\n\t\t$service = $this->getService();\n\n\t\t// Update product\n\t\t$this->mockResponseFromFile('products.update.success');\n\t\t$response = $service->update()->pin('AD8CCDD5F9')->area('work')->spn('MBA11')->product($updateProduct)->execute();\n\t\t$this->assertIsArray($response);\n\t\t$this->assertArrayHasKey('kind', $response);\n\t\t$this->assertArrayHasKey('link', $response);\n\t}", "public function testUpdateValue()\n {\n $response = $this->json('PATCH', '/api/values');\n $response->assertStatus(200);\n }", "public function editpollAction(Request $request, $poll_id) {\n $em = $this->getDoctrine()->getManager();\n $poll = $em->getRepository('PollPollBundle:PollImpl')->find($poll_id);\n\n $form = $this->createForm(new NewPoll(), $poll);\n $form->handleRequest($request);\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($poll);\n $em->flush();\n return $this->redirect($this->generateUrl('poll_show_one', array(\"poll_id\" => $poll_id)));\n }\n return $this->render('PollPollBundle:Poll:edit_poll.html.twig', array('form' => $form->createView()));\n }", "public function edit_watch(){\r\n\t\tif($this->expectsPost(array('watchId','brand', 'name', 'yearOfBuy',\r\n\t\t\t'serial', 'caliber'))){\r\n\r\n\t\t\tif ($this->watch->editWatch($this->session->userdata('userId'),\r\n\t\t\t\t\t\t$this->watchId,\r\n\t\t\t\t\t\t$this->brand, $this->name,\r\n\t\t\t\t\t\t$this->yearOfBuy, $this->serial,\r\n\t\t\t\t\t\t$this->caliber)) {\r\n\r\n\t\t\t\t$this->_bodyData['success'] = 'Watch successfully updated!';\r\n\r\n\t\t\t}\r\n\r\n\t\t\t$this->constructMeasurePage();\r\n\t\t}\r\n\t}", "public function updateEvent()\n {\n $result = $this->_signedResponse($this->vars->cal);\n\n if (!($kronolith_driver = $this->_getDriver($this->vars->cal)) ||\n !isset($this->vars->id)) {\n return $result;\n }\n\n try {\n $oevent = $kronolith_driver->getEvent($this->vars->id);\n } catch (Exception $e) {\n $GLOBALS['notification']->push($e, 'horde.error');\n return $result;\n }\n if (!$oevent) {\n $GLOBALS['notification']->push(_(\"The requested event was not found.\"), 'horde.error');\n return $result;\n } elseif (!$oevent->hasPermission(Horde_Perms::EDIT)) {\n $GLOBALS['notification']->push(_(\"You do not have permission to edit this event.\"), 'horde.warning');\n return $result;\n }\n\n $attributes = Horde_Serialize::unserialize($this->vars->att, Horde_Serialize::JSON);\n\n // If this is a recurring event, need to create an exception.\n if ($oevent->recurs()) {\n $this->_addException($oevent, $attributes);\n $event = $this->_copyEvent($oevent, null, $attributes);\n } else {\n $event = clone($oevent);\n }\n\n foreach ($attributes as $attribute => $value) {\n switch ($attribute) {\n case 'start':\n $newDate = new Horde_Date($value);\n $newDate->setTimezone($event->start->timezone);\n $event->start = clone($newDate);\n break;\n\n case 'end':\n $newDate = new Horde_Date($value);\n $newDate->setTimezone($event->end->timezone);\n $event->end = clone($newDate);\n if ($event->end->hour == 23 &&\n $event->end->min == 59 &&\n $event->end->sec == 59) {\n $event->end->mday++;\n $event->end->hour = $event->end->min = $event->end->sec = 0;\n }\n break;\n\n case 'offDays':\n $event->start->mday += $value;\n $event->end->mday += $value;\n break;\n\n case 'offMins':\n $event->start->min += $value;\n $event->end->min += $value;\n break;\n }\n }\n\n $result = $this->_saveEvent($event, ($oevent->recurs() ? $oevent : null), $attributes);\n if ($this->vars->u) {\n Kronolith::sendITipNotifications($event, $GLOBALS['notification'], Kronolith::ITIP_REQUEST);\n }\n\n return $result;\n }", "public function testSchedulesUpdateOut()\n {\n $result = $this->visit('events/{event}/schedules/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testVolunteerHourUpdateFailure_Inactive()\n {\n $this->session([\n 'username' => $this->inactiveUser->username, \n 'access_level' => $this->inactiveUser->access_level\n ]);\n \n // Set test user as current authenticated user\n $this->be($this->inactiveUser);\n \n $testProjectID = 1; \n // Call route under test\n $this->call('POST', 'volunteerhours/volunteerEdit/');\n \n // Assert redirected to access denied page\n $this->assertRedirectedToRoute('unauthorized');\n }", "public function testUpdateActionOk()\n {\n // Mock the property object.\n $oProperty = $this->getMock('Hook\\Commit\\Diff\\Property', array(), array('svn:keywords'));\n $oProperty->expects($this->any())\n ->method('getOldValue')\n ->will($this->returnValue(''));\n\n $oProperty->expects($this->any())\n ->method('getNewValue')\n ->will($this->returnValue('Id'));\n\n $aParams = array(\n 'txn' => '666-1',\n 'rev' => 666,\n 'action' => 'U',\n 'item' => 'file.php',\n 'real' => 'file.php',\n 'ext' => 'php',\n 'isdir' => false,\n 'props' => array('svn:keywords' => $oProperty),\n 'lines' => null,\n 'info' => null\n );\n\n $oObject = new Object($aParams);\n\n $this->oIdListener->processAction($oObject);\n\n // Check.\n $aErrors = $oObject->getErrorLines();\n\n $this->assertTrue(empty($aErrors));\n }", "public function update(Request $request, Offer $offer)\n {\n //\n }", "public function testUpdate(): void\n {\n $this->createInstance();\n $user = $this->createAndLogin();\n\n $res = $this->fConnector->getDiscussionManagement()->postTopic('Hello title', 'My content', [$this->configTest['testTagId']],$user->userId)->wait();\n\n //Test update as admin\n $res2 = $this->fConnector->getDiscussionManagement()->updateTopic($res->id,'Hello title3', 'My content2', [$this->configTest['testTagId']],null)->wait();\n $this->assertInstanceOf(FlarumDiscussion::class,$res2) ;\n $this->assertEquals('Hello title3',$res2->title, 'Test discussion update as admin');\n\n //Test update as user\n $res2 = $this->fConnector->getDiscussionManagement()->updateTopic($res->id,'Hello title4', 'My content3', [$this->configTest['testTagId']],null)->wait();\n $this->assertInstanceOf(FlarumDiscussion::class,$res2) ;\n $this->assertEquals('Hello title4',$res2->title,'Test discussion update as user');\n\n }", "function UpdateEvents() {\n\t\tforeach ($this->data as $i => $row) {\n\t\t\tif (!is_null($row['EventId'])) {\n\t\t\t\t//check wheter event is assigned to calculated event. If it is take the calculated rating, otherwise set the rating to -0.5\n\t\t\t\tif (array_key_exists($i, $this -> rating)) {\n\t\t\t\t\t$rating = $this -> rating[$i];\n\t\t\t\t} else {\n\t\t\t\t\t$rating = -0.5;\n\t\t\t\t}\n\t\t\t\t//update all events\n\t\t\t\t$sql = \"UPDATE Event SET rating=\" . $rating . \" WHERE EventId=\" . $row['EventId'];\n\t\t\t\t$stmt = $this -> DB -> prepare($sql);\n\t\t\t\tif ($stmt -> execute()) {\n\t\t\t\t} else {\n\t\t\t\t\tinclude_once \"Email.php\";\n\t\t\t\t\tnew Email('failed', 'to update event rating with EventId=' . $row['EventId'], $this -> id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this -> updateTask();\n\n\t}", "public function testUpdateAction()\n {\n $res = $this->controller->updateAction(\"1\");\n $this->assertContains(\"Update\", $res->getBody());\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 testUpdateEvents()\n {\n $event= Event::factory(1)->create();\n // dd($event);\n $event->title = 'Maria';\n $this->put(\"/events\". $event[0]->id, $event->toArray());\n\n $this->assertDatabaseHas('events', [\n 'id' => 1,\n 'title' => 'Maria'\n ]);\n }", "public function testWebinarPolls()\n {\n }", "public function testUpdateSurveyQuestion0()\n {\n }", "public function testUpdateSurveyQuestion0()\n {\n }", "public function Update()\n\t{\n\t\t$prefix = $this->Db->TablePrefix;\n\t\t$user = GetUser();\n\t\t$userid = $user->userid;\n\t\t$where = 'id = ' . $this->id;\n\n\t\t$surveys_data = $this->data;\n\n\t\tif (isset($surveys_data['_columns'])) {\n\t\t\tunset($surveys_data['_columns']);\n\t\t}\n\n\t\tif (isset($surveys_data['id'])) {\n\t\t\tunset($surveys_data['id']);\n\t\t}\n\n\t\t$surveys_data['updated'] = $this->GetServerTime();\n\n\t\t$this->Db->UpdateQuery('surveys', $surveys_data, $where);\n\t}", "function TimeIt_operation_updateEvent(&$obj, $params)\n{\n $online = isset($params['online']) ? $params['online'] : 0;\n $obj['status'] = $online;\n //print_r($params);exit();\n $para = array();\n $para['obj'] = &$obj;\n if($params['repeat'] == '1') {\n if(!isset($obj['cid']) && isset($obj['data']['cid'])) {\n $obj['cid'] = $obj['data']['cid'];\n } else if(!isset($obj['cid']) && !isset($obj['data']['cid'])) {\n $obj['cid'] = pnModGetVar('TimeIt', 'defaultCalendar');\n }\n $para['noRecurrences'] = true;\n $prozi = new TimeIt_Recurrence_Processor(new TimeIt_Recurrence_Output_DB(), $obj);\n $prozi->doCalculation();\n } else if($params['deleterepeats'] == '1') {\n pnModAPIFunc('TimeIt', 'user', 'deleteAllRecurrences', array('obj'=>$obj));\n $obj['data']['cid'] = $obj['cid']; // backup calendar id because $obj['cid'] won't be saved\n $para['noRecurrences'] = true;\n }\n \n return pnModAPIFunc('TimeIt', 'user', 'update', $para);\n}", "public function update(Request $request, pregunta_test $pregunta_test)\n {\n //\n }", "public function testGetAccountEventCheckInUpdateIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/event/check-in/update')\n ->see('success\":true')\n ->see('error\":null')\n ->seePageIs('account/event/check-in/update');\n }", "public function updateFeed($feed) {\n\t\t$this->_initDbConnection();\n\t\t\n\t\t$stm = $this->_prepareStatement('feed', 'updatePoll');\n\t\t$stm->execute(array(\n\t\t\t':id' => $feed->id,\n\t\t\t':lastUpdated' => $feed->lastUpdated,\n\t\t\t':lastPolled' => $feed->lastPolled\n\t\t));\n\n\t\tif ($this->_isPdoError($stm)) {\n\t\t\treturn false;\n\t\t}\t\t\n\t\t\n\t\treturn true;\n\t}", "public function testRequestUpdateItem()\n {\n\t\t$response = $this\n\t\t\t\t\t->json('PUT', '/api/items/6', [\n\t\t\t\t\t\t'name' => 'Produkt zostal dodany i zaktualizowany przez test PHPUnit', \n\t\t\t\t\t\t'amount' => 0\n\t\t\t\t\t]);\n\n $response->assertJson([\n 'message' => 'Items updated.',\n\t\t\t\t'updated' => true\n ]);\n }", "private function processPollAndVoteArgumentFromRequest(): void\n {\n if ($this->arguments->hasArgument('poll')) {\n $prop = $this->arguments->getArgument('poll')->getPropertyMappingConfiguration();\n $prop->allowAllProperties();\n $prop->allowProperties('options');\n $prop->forProperty('options.*')->allowProperties('name', 'sorting', 'markToDelete');\n $prop->allowCreationForSubProperty('options.*');\n $prop->allowModificationForSubProperty('options.*');\n }\n\n // Remove empty option entries and trim non-empty ones\n if ($this->request->hasArgument('poll') && is_array($this->request->getArgument('poll'))) {\n $poll = $this->request->getArgument('poll');\n $pollOptions = $poll['options'];\n if ($pollOptions) {\n $lastSorting = 0;\n foreach ($pollOptions as $index => $pollOption) {\n if (empty($pollOption['name'])) {\n unset($poll['options'][$index]); // remove\n } else {\n $poll['options'][$index]['name'] = trim($pollOption['name']); // trim\n\n if (empty($pollOption['sorting'])) {\n $lastSorting = $lastSorting * 2;\n $poll['options'][$index]['sorting'] = (string)$lastSorting;\n } else {\n $lastSorting = $pollOption['sorting'];\n }\n }\n if ('' === $pollOption['__identity']) {\n unset($poll['options'][$index]['__identity']);\n }\n }\n }\n if (is_array($poll['options'])) {\n $poll['options'] = array_values($poll['options']);\n }\n $this->request->setArgument('poll', $poll);\n }\n\n if ($this->arguments->hasArgument('vote')) {\n // Disable generic object validator for option_values in polls\n $this->disableGenericObjectValidator('vote', 'optionValues');\n $this->disableGenericObjectValidator('vote', 'poll');\n }\n\n if ($this->arguments->hasArgument('poll')) {\n // Disable generic object validator for options in polls\n $this->disableGenericObjectValidator('poll', 'options');\n\n // Set DateTimeConverter format\n $this->arguments->getArgument('poll')->getPropertyMappingConfiguration()\n ->forProperty('settingVotingExpiresDate')\n ->setTypeConverterOption(\n DateTimeConverter::class,\n DateTimeConverter::CONFIGURATION_DATE_FORMAT,\n 'Y-m-d'\n );\n $this->arguments->getArgument('poll')->getPropertyMappingConfiguration()\n ->forProperty('settingVotingExpiresTime')\n ->setTypeConverterOption(\n DateTimeConverter::class,\n DateTimeConverter::CONFIGURATION_DATE_FORMAT,\n 'H:i'\n );\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function testUpdate()\n {\n\n $this->createDummyRole();\n\n $this->call('POST', '/api/role', array(\n 'action' => $this->updateAction,\n 'id' => 1,\n 'name' => \"updatedName\",\n 'description' => \"updatedDesc\",\n 'permissionCount' => $this->testPermissionCount,\n 'permission0' => 1,\n ));\n\n $this->assertDatabaseHas('roles', [\n 'id' => 1,\n 'name' => \"updatedName\",\n 'description' => \"updatedDesc\"\n ]);\n\n $this->assertDatabaseHas('role_permission', [\n 'role_id' => 1,\n 'permission_id' => [1]\n ]);\n\n $this->assertDatabaseMissing('role_permission', [\n 'role_id' => 1,\n 'permission_id' => [2]\n ]);\n }", "public function update($id,Request $r, Events $events)\n {\n // dd($r->choice['value']);\n $e=$events->find($id);\n $e->event_name = $r->name;\n $e->event_description = $r->text;\n $e->slot=$r->choice['value'];\n $e->date=$r->date;\n $e->save();\n\n }", "public function testCollectionTicketCommentsUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function test_update_item() {}", "public function test_update_item() {}", "public function testIntegrationUpdate()\n {\n $userFaker = factory(Model::class)->create();\n $this->visit('user/' . $userFaker->slug . '/edit')\n ->type('Foo bar', 'name')\n ->type('Foobar', 'username')\n ->type('[email protected]', 'email')\n ->type('foobar123', 'password')\n ->type('foobar123', 'password_confirmation')\n ->press('Save')\n ->seePageIs('user');\n $this->assertResponseOk();\n $this->seeInDatabase('users', [\n 'username' => 'Foobar',\n 'email' => '[email protected]'\n ]);\n $this->assertViewHas('models');\n }", "public function testSellerUpdatedFailed()\n {\n $this->demoUserLoginIn();\n $response = $this->call('PATCH', '/seller/999/update', [\n 'name' => 'testUpdate',\n 'description' => 'testUpdate',\n ]);\n $this->assertEquals(404, $response->status());\n }", "function wpbs_update_booking($booking_id, $data)\n{\n\n return wp_booking_system()->db['bookings']->update($booking_id, $data);\n\n}", "public function testHandleUpdateValidationError()\n {\n // Populate data\n $this->_populate();\n \n // Request\n $response = $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $this->customDealerAccountData, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Verify\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHasErrors();\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 testSaveUpdate()\n {\n $user = User::findOne(1002);\n $version = Version::findOne(1001);\n\n $this->specify('Error update attempt', function () use ($user, $version) {\n $data = [\n 'scenario' => VersionForm::SCENARIO_UPDATE,\n 'title' => 'Some very long title...Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam dignissim, lorem in bibendum.',\n 'type' => Version::TYPE_TABLET,\n 'subtype' => 31,\n 'retinaScale' => false,\n 'autoScale' => 'invalid_value',\n ];\n $model = new VersionForm($user, $data);\n\n $result = $model->save($version);\n $version->refresh();\n\n verify('Model should not succeed', $result)->null();\n verify('Model should have errors', $model->errors)->notEmpty();\n verify('Title error message should be set', $model->errors)->hasKey('title');\n verify('ProjectId error message should not be set', $model->errors)->hasntKey('projectId');\n verify('Type error message should not be set', $model->errors)->hasntKey('type');\n verify('Subtype error message should be set', $model->errors)->hasKey('subtype');\n verify('AutoScale error message should be set', $model->errors)->hasKey('autoScale');\n verify('RetinaScale error message should not be set', $model->errors)->hasntKey('retinaScale');\n verify('Version title should not change', $version->title)->notEquals($data['title']);\n verify('Version type should not be changed', $version->type)->notEquals($data['type']);\n verify('Version subtype should not be changed', $version->subtype)->notEquals($data['subtype']);\n });\n\n $this->specify('Success update attempt', function () use ($user, $version) {\n $data = [\n 'scenario' => VersionForm::SCENARIO_UPDATE,\n 'projectId' => 1003, // should be ignored\n 'title' => 'My new test version title',\n 'type' => Version::TYPE_MOBILE,\n 'subtype' => 31,\n 'retinaScale' => true,\n 'autoScale' => true,\n ];\n $model = new VersionForm($user, $data);\n\n $result = $model->save($version);\n\n verify('Model should succeed and return an instance of Version', $result)->isInstanceOf(Version::className());\n verify('Model should not has any errors', $model->errors)->isEmpty();\n verify('The returned Version should be the same as the updated one', $result->id)->equals($version->id);\n verify('Version projectId should not change', $result->projectId)->notEquals($data['projectId']);\n verify('Version title should match', $result->title)->equals($data['title']);\n verify('Version type should match', $result->type)->equals($data['type']);\n verify('Version subtype should match', $result->subtype)->equals($data['subtype']);\n verify('Version scaleFactor should match', $result->scaleFactor)->equals(Version::AUTO_SCALE_FACTOR);\n });\n }", "public function update(Request $request, InterviewStatistic $interviewStatistic)\n {\n //\n }", "public function testUpdate()\n {\n $data = array(\n 'foo' => 'baz'\n );\n\n $transaction = $this->client->transaction()->Update(654, $data);\n\n $this->assertEquals($data, get_object_vars($transaction->put), 'Passed variables are not correct');\n $this->assertEquals('PUT', $transaction->request_method, 'The PHP Verb Is Incorrect');\n $this->assertEquals('/transactions/654', $transaction->path, 'The path is incorrect');\n\n }", "function newsslider_update_instance($newsslider) {\n global $DB, $CFG;\n\n $newsslider->intro = '\n <div id=\"newsslider\"></div>\n <script src=\"'.$CFG->wwwroot.'/mod/newsslider/ResizeSensor.js\"></script>\n <script>\n $.get(\"'.$CFG->wwwroot.'/mod/newsslider/newsslider_controller.php/?func=get_newsslider_html&cmid='.$newsslider->coursemodule.'\", (response) => {\n $(\"#newsslider\").append(response);\n })\n </script>\n ';\n $newsslider->timemodified = time();\n $newsslider->id = $newsslider->instance;\n\n $completiontimeexpected = !empty($newsslider->completionexpected) ? $newsslider->completionexpected : null;\n \\core_completion\\api::update_completion_date_event($newsslider->coursemodule, 'newsslider', $newsslider->id, $completiontimeexpected);\n\n return $DB->update_record(\"newsslider\", $newsslider);\n}", "function updateEvent(){\r\n\t\tif(!isset($_POST['submitted'])){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$formvars = array();\r\n\r\n\t\tif(!$this->ValidateUpdatedSubmission()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$itemPicture = $this->upLoadPic();\r\n\t\tif($itemPicture != false){\r\n\t\t\t$formvars['Eflyer'] = $this->upLoadPic();\r\n\t\t}\r\n\t\t\t\t\r\n\t\t$picBanner = $this->upLoadBanner();\r\n\t\tif($picBanner != false){\r\n\t\t\t$formvars['Ebanner'] = $this->upLoadBanner();\r\n\t\t}\r\n\t\t\r\n\t\t$this->CollectUpdatedSubmission($formvars);\r\n\t\t\r\n\t\tif(!$this->updateEventInDatabase($formvars)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public function updated(VoteRate $voteRate)\n {\n //\n }", "public function updateSesi() {\n $this->authorize('admin-itd');\n\n $round_detail = Round::find(1);\n $minute = 1;\n\n // [RICKY] Update round\n $end_time = Carbon::now()->addMinutes($minute);\n $update_round = DB::table('rounds')->where('id', 1)->update(['action'=> true, 'time_end'=> $end_time]);\n\n // [RICKY] Pusher broadcast\n event(new UpdateRound($round_detail->round, true, $minute, null));\n return [\"success\" => true];\n }", "public function update($notification);", "public function test_if_failed_update()\n {\n }", "public function update(Request $request, Volunteer $volunteer)\n {\n //\n }", "public function update(Request $request, OfferedCourse $offeredCourse)\n {\n //\n }", "public function update()\n {\n foreach ($this->updates as list($url, $meetingPlace)) {\n try {\n $c = Page::getByPath(parse_url($url)['path']);\n $cp = new Permissions($c);\n\n // Only allow updates if this user can edit\n if ($cp->canEditPageProperties()) {\n $currentCollectionVersion = $c->getVersionObject();\n\n $map = json_decode($c->getAttribute('gmap'), true);\n\n // Check that we have a map marker\n if (!empty($map['markers'])) {\n $newCollectionVersion = $currentCollectionVersion->createNew('Updated via meetingplaceupdate script');\n $c->loadVersionObject($newCollectionVersion->getVersionID());\n // Set the first marker to the new meeting place\n $map['markers'][0]['title'] = $meetingPlace;\n $c->setAttribute('gmap', json_encode($map));\n\n $newCollectionVersion->approve();\n echo 'Updated walk ' . $url . ' to ' . $meetingPlace . PHP_EOL;\n } else {\n echo 'No map found for: ' . $url . PHP_EOL;\n }\n } else {\n throw new RuntimeException('Insufficient permissions to update');\n }\n } catch (Exception $e) {\n echo $e->getMessage() . ' URL: ' . $url . PHP_EOL;\n }\n }\n }", "function ras_submit_db () {\n\n\t\textract(doSlash(psa(array('poll_id', 'name', 'prompt', 'n0', 'n1', 'n2', 'n3', 'n4', 'n5', 'n6', 'n7', 'n8', 'n9' ,'step', 'event', 'selection'))));\n\t\t$where = \"id='\".$poll_id.\"'\";\n\t\t\n\t\tif($step == 'poll_response') {\n\t\t\t$stat = 'r'.substr($selection, -1);\n\t\t\t\t$current = safe_field( $stat ,'txp_poll' , $where);\n\t\t\t\t\t$newstat = $current + 1;\n\t\t\t\t\t$what = $stat.'='.$newstat;\n\t\t\t\tsafe_update('txp_poll', $what ,$where);\n\t\t}\n}", "public function update(Request $request, Evolution $evolution)\n {\n //\n }", "public function testRenderUpdateSuccess()\n {\n // Populate data\n $dealerAccountIDs = $this->_populate();\n \n // Set data\n $ID = $this->_pickRandomItem($dealerAccountIDs);\n $dealerAccount = $this->dealer_account->getOne($ID);\n \n // Request\n $this->withSession($this->adminSession)\n ->call('GET', '/dealer-account/edit', ['ID' => $ID]);\n \n // Verify\n $this->assertResponseOk();\n $this->assertViewHas('dealer_account', $dealerAccount);\n $this->assertViewHas('dataBranch');\n $this->assertPageContain('Edit Dealer Account');\n }" ]
[ "0.67058426", "0.6567143", "0.6510409", "0.5973442", "0.59719884", "0.5864462", "0.5863904", "0.58290815", "0.57604766", "0.5751709", "0.57137495", "0.5650021", "0.5637855", "0.56267464", "0.5623237", "0.56209123", "0.56080276", "0.5605678", "0.55975664", "0.5576203", "0.5551467", "0.5509922", "0.5509922", "0.5488691", "0.5475772", "0.5468532", "0.54536563", "0.54182446", "0.5393446", "0.5366652", "0.5348787", "0.53429765", "0.53277826", "0.53268456", "0.53054017", "0.52860904", "0.5275172", "0.52699995", "0.5262814", "0.52597195", "0.52569604", "0.5244376", "0.52441615", "0.5236868", "0.5233618", "0.5222365", "0.52167284", "0.5176631", "0.51741827", "0.5169476", "0.5162027", "0.515589", "0.5153823", "0.5150731", "0.5150012", "0.5135403", "0.5123658", "0.5123211", "0.51201445", "0.511967", "0.5119335", "0.5111207", "0.510776", "0.5095193", "0.50934863", "0.50934863", "0.5079204", "0.50670236", "0.5064149", "0.5061944", "0.5061869", "0.50536567", "0.50507855", "0.50445074", "0.50445074", "0.5036651", "0.5035207", "0.5031075", "0.5024137", "0.5024137", "0.5023978", "0.50232285", "0.5022882", "0.5022171", "0.5016855", "0.50146097", "0.5011837", "0.500729", "0.5004417", "0.4998465", "0.49934125", "0.4991326", "0.49904877", "0.49815264", "0.49763954", "0.49689358", "0.4964828", "0.49639747", "0.4949637", "0.49484253" ]
0.79205805
0
Test case for webinarPolls List a Webinar's Polls.
public function testWebinarPolls() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testGetAllPolls()\n {\n Passport::actingAs(\n factory(\"App\\User\")->create(),\n ['*']\n );\n $polls= factory(\"App\\Poll\",5)->create();\n $response = $this->get('/polls');\n $response->assertStatus(200);\n $response->assertJson($polls->toArray());\n }", "public function testWebinarPollGet()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function polls() {\n\t\tSiteController::loggedInCheck();\n\n\t\t//Get polls associated with the current group\n\t\t$groupId = $_POST['groupId'];\n\t\t$group = Group::loadById($groupId);\n\t\t$polls = $group->getAllPolls();\n\n\t\tinclude_once SYSTEM_PATH.'/view/polls.tpl'; //TODO: make sure this is the correct tpl\n\t}", "public function getActivePolls() {\n $this->active = json_decode(file_get_contents(CONTENT.'polls'), TRUE);\n return $this->getPolls($this->active);\n }", "public function testWebinarPollCreate()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "protected function reportWebinarPollsRequest($webinar_id)\n {\n // verify the required parameter 'webinar_id' is set\n if ($webinar_id === null || (is_array($webinar_id) && count($webinar_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $webinar_id when calling reportWebinarPolls'\n );\n }\n\n $resourcePath = '/report/webinars/{webinarId}/polls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($webinar_id !== null) {\n $resourcePath = str_replace(\n '{' . 'webinarId' . '}',\n ObjectSerializer::toPathValue($webinar_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function showpollsAction()\n {\n $polls = $this->getDoctrine()->getRepository('PollPollBundle:PollImpl')->findAll();\n return $this->render('PollPollBundle:Poll:show_polls.html.twig', array(\"polls\" => array_reverse($polls)));\n }", "public function getsAListOfPlans()\n {\n // Arrange\n // Act\n $plans = Ezypay::getPlans();\n\n // Assert\n //$this->assertEquals(3, sizeof($plans->data)); // Causing issues as there are aditional plans\n $this->assertNotNull($plans);\n\n $this->plans = $plans;\n }", "public function getAllPolls()\n {\n $pollz = $this->em\n ->getRepository('NkgPollBundle:Poll')\n ->findAll();\n\n return $pollz;\n }", "public function testListPastWebinarFiles()\n {\n }", "public function list(Request $request): \\Illuminate\\Http\\Resources\\Json\\AnonymousResourceCollection\n {\n $this->authorize('list', Poll::class);\n\n $this->validate($request, [\n 'page' => 'numeric',\n 'perPage' => 'numeric',\n 'with' => 'array',\n 'sort' => 'array',\n ]);\n\n $page = (int)$request->get('page', 1);\n $perPage = (int)$request->get('perPage', 10);\n\n $query = Poll::whereOwnerId($request->user()->id);\n\n if ($request->has('with')) {\n if (in_array('emailsList', $request->get('with', []))) {\n $query->with('emailsList');\n }\n }\n\n if ($request->has('sort')) {\n foreach ($request->get('sort') as $key => $direction) {\n $query->orderBy(Str::snake($key), $direction);\n }\n }\n\n $list = $query->paginate($perPage, ['*'], 'page', $page);\n\n return PollResource::collection($list->items())\n ->additional(['pagination' => [\n 'page' => $page,\n 'perPage' => $list->perPage(),\n 'lastPage' => $list->lastPage(),\n 'total' => $list->total(),\n ]]);\n }", "public function index()\n {\n //$polls = $this->poll->all();\n\n return view('iquiz::admin.polls.index', compact(''));\n }", "public function testWebinar()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }", "public function test_list()\n {\n $response = $this->get('/proposal/all');\n\n $response->assertSee('data-js-proposal-cards');\n\n $response->assertSee('card-header');\n\n $response->assertStatus(200);\n }", "function list_polls($id = NULL) {\n global $course_id, $course_code, $urlServer, $langPollNone, $langQuestionnaire, $langChoice;\n\n $ret_string = '';\n $result = Database::get()->queryArray(\"SELECT * FROM poll WHERE course_id = ?d AND active = 1\", $course_id);\n $pollinfo = array();\n foreach ($result as $row) {\n $pollinfo[] = array(\n 'id' => $row->pid,\n 'title' => $row->name,\n 'active' => $row->active);\n }\n if (count($pollinfo) == 0) {\n $ret_string .= \"<div class='col-12 mt-3'><div class='alert alert-warning'>$langPollNone</div></div>\";\n } else {\n $exist_poll = array();\n\n if (!is_null($id)) { //find existing resources (edit case)\n $post_res = Database::get()->queryArray(\"SELECT * FROM wall_post_resources WHERE post_id = ?d AND type = ?s\", $id, 'poll');\n foreach ($post_res as $exist_res) {\n $exist_poll[] = $exist_res->res_id;\n }\n }\n\n $ret_string .= \"<div class='table-responsive'><table class='table-default'>\" .\n \"<tr class='list-header'>\" .\n \"<th class='text-start'>&nbsp;$langQuestionnaire</th>\" .\n \"<th style='width:20px;' class='text-center'>$langChoice</th>\" .\n \"</tr>\";\n foreach ($pollinfo as $entry) {\n $checked = '';\n if (in_array($entry['id'], $exist_poll)) {\n $checked = 'checked';\n }\n\n $ret_string .= \"<tr>\";\n $ret_string .= \"<td>&nbsp;\".icon('fa-question').\"&nbsp;&nbsp;<a href='{$urlServer}modules/questionnaire/pollresults.php?course=$course_code&amp;pid=$entry[id]'>\" . q($entry['title']) . \"</a></td>\";\n $ret_string .= \"<td class='text-center'><input type='checkbox' $checked name='poll[]' value='$entry[id]'></td>\";\n $ret_string .= \"</tr>\";\n }\n $ret_string .= \"</table></div>\";\n }\n return $ret_string;\n}", "public function displayAllMyPolls(){\r\n $allMyPolls = $this->model->myPolls($_SESSION['id']);\r\n\r\n // Display user's poll \r\n require ROOT.\"/App/View/AllMyPollsView.php\";\r\n \r\n }", "public function testWebinarAbsentees()\n {\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testSubscriptionsList()\n {\n }", "public function index()\n {\n return view('polls.pollsList', [\n 'polls' => Poll::select('*')\n ->orderBy('created_at', 'desc')->get()\n ]); \n }", "public function index()\n {\n $tests = $this->getAllTests();\n return view('poll.index', ['tests' => $tests]);\n }", "public function test_list_all_offices_paginated() {\n Office::factory(3)->create();\n\n $response = $this->get('/api/offices');\n\n $response->assertOk();\n\n // Assert the returned json data has 3 items - the ones we created above\n $response->assertJsonCount(3, 'data');\n\n // Assert atleast the ID of the first item is not null\n $this->assertNotNull($response->json('data')[0]['id']);\n\n // Assert there is meta for the paginated results. You can include links as well\n $this->assertNotNull($response->json('meta'));\n\n //dd($response->json());\n\n }", "public function getListing()\n {\n $user = Auth::user();\n $plans = Plan::all();\n $websites = Website::where('user_id', '=', $user->id)\n ->orderBy('created_at', 'desc')\n ->paginate(15);\n\n foreach ($websites as $website) {\n if (is_null($website->token)) {\n $clients = DB::table('oauth_clients')\n ->where('name', '=', $website->id)\n ->get();\n\n if (isset($clients[0])) {\n $website->oauth_id = $clients[0]->id;\n $website->secret_key = $clients[0]->secret;\n }\n }\n }\n\n $_plans_list = Plan::all();\n $plans_list = [];\n\n foreach ($_plans_list as $plan_list) {\n $plans_list[$plan_list->id] = $plan_list->plan;\n }\n\n return view('website.listing')\n ->with([\n 'user' => $user,\n 'websites' => $websites,\n 'plans' => $plans,\n '_plans_list' => $_plans_list,\n 'plans_list' => $plans_list\n ]);\n }", "public function individualPolls(Request $request, $unit = null)\n {\n try {\n if (!empty($unit)) {\n $pollingUnitResults = PollingUnit::where('id', $unit)->has('announcedpuresult')->with(['announcedpuresult'])->paginate($this->pages);\n } else {\n $pollingUnitResults = PollingUnit::has('announcedpuresult')->with(['announcedpuresult'])->paginate($this->pages);\n }\n return view('index', compact('pollingUnitResults'));\n } catch (\\Throwable $th) {\n logger($th);\n }\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPollDelete()\n {\n }", "public function getActivePolls()\n {\n $pollz = $this->em\n ->createQuery('SELECT p\n FROM NkgPollBundle:Poll p\n WHERE p.active = 1\n AND CURRENT_TIMESTAMP() BETWEEN p.startdate AND p.enddate\n ORDER BY p.enddate DESC');\n\n try {\n $res = $pollz->getResult();\n return $res;\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return array();\n }\n }", "public function test119DisplayBookingListAfterClickOnEachLinkOfPagination()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(20, date('Y-m-d'), 15);\n\n //$this->mockApi($data, 'empty_ok');\n\n $responseBefore = $this->ajax($this->getUrlByParams(['page' => 1, 'per_page' => 10]))->json();\n $responseAfter = $this->ajax($this->getUrlByParams(['page' => 2, 'per_page' => 10]))->json();\n\n $listBefore = $responseBefore['current_list'];\n $listAfter = $responseAfter['current_list'];\n\n $this->assertFalse($listBefore == $listAfter);\n }", "public function testWebinarRegistrants()\n {\n }", "public function polls_get($pollId = NULL){\n $this->load->model(\"poll\");\n\n if (isset($pollId)) {\n try {\n $poll = $this->poll->getPoll($pollId);\n $this->response($poll, 200);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Poll does not exist!\"), 404);\n }\n } else{\n $polls = $this->poll->getPolls();\n $this->response($polls, 200);\n }\n }", "public function test_user_can_view_a_published_concert_listings()\n {\n // Arrange\n $concert = factory(Concert::class)->states('published')->create([\n 'date' => Carbon::parse('December 1, 2017 8:00pm'),\n ]);\n\n // Act\n $this->browse(function (Browser $browser) use ($concert) {\n // Assert\n $browser->visit(\"/concerts/{$concert->id}\")\n ->assertSee($concert->title)\n ->assertSee($concert->subtitle)\n ->assertSee('December 1, 2017')\n ->assertSee('8:00pm')\n ->assertSee('20.00')\n ->assertSee($concert->venue)\n ->assertSee($concert->venue_address)\n ->assertSee($concert->city)\n ->assertSee($concert->state)\n ->assertSee($concert->zip)\n ->assertSee($concert->additional_information);\n });\n }", "public function index()\n {\n $polls = $this->pollRepo->getAvailablePolls();\n\n return view('home', ['polls' => $polls]);\n }", "public function test_list_of_resource()\n {\n $response = $this->artisan('resource:list');\n $this->assertEquals(0, $response);\n }", "public function executeUserWebsitePracticeArea10(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function testListSites()\n {\n }", "public function testUsePlenaryCourseView()\n {\n $this->session->usePlenaryCourseView();\n $courses = $this->session->getCoursesByIds(new phpkit_id_ArrayIdList(array(\n \t\t\t\t\t$this->physId,\n \t\t\t\t\t$this->geolId,\n \t\t\t\t\t$this->unknownId)));\n }", "protected function _getLists() {\n\t\t/** @var Thrive_Dash_Api_WebinarJamStudio $api */\n\t\t$api = $this->getApi();\n\t\ttry {\n\t\t\t$lists = array();\n\t\t\t$webinars = $api->getUpcomingWebinars();\n\t\t\tforeach ( $webinars as $key => $item ) {\n\t\t\t\t$lists [] = array(\n\t\t\t\t\t'id' => $item['webinar_id'],\n\t\t\t\t\t'name' => $item['name']\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn $lists;\n\t\t} catch ( Thrive_Dash_Api_WebinarJamStudio_Exception $e ) {\n\t\t\t$this->_error = $e->getMessage();\n\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function testWebinarUpdate()\n {\n }", "public function testGetMessageListAppointments()\r\n\t{\r\n\t\t// Create an event to make sure we have at least one\r\n\t\t$obj = CAntObject::factory($this->dbh, \"calendar_event\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"My Test Event\");\r\n\t\t$obj->setValue(\"ts_start\", date(\"m/d/Y\") . \" 12:00 PM\");\r\n\t\t$obj->setValue(\"ts_end\", date(\"m/d/Y\") . \" 01:00 PM\");\r\n\t\t$eid = $obj->save();\r\n\r\n\t\t// Get events\r\n\t\t$events = $this->backend->GetMessageList(\"calendar_root\", time()); // second param cuts off to today\r\n\t\t$found = false;\r\n\t\tforeach ($events as $evt)\r\n\t\t{\r\n\t\t\tif ($evt[\"id\"] == $eid)\r\n\t\t\t\t$found = true;\r\n\t\t}\r\n\t\t$this->assertTrue($found);\r\n\r\n\t\t// Cleanup\r\n\t\t$obj->removeHard();\r\n\t}", "public function testSubscriptionsListByType()\n {\n }", "public function testListEnrollmentRequests()\n {\n }", "public function index()\n {\n $poll = Poll::all();\n $polls = Poll::orderBy('created_at', 'DESC')->first();\n $polls = $polls->id + 1;\n return view('admin.poll.index',compact('poll', 'polls'))->with('i');\n }", "public function getPlayLists();", "public function index()\n {\n return response()->json(Poll::paginate(1), 200);\n }", "function GetWebPanelList()\n\t{\n\t\t$result = $this->sendRequest(\"GetWebPanelList\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function displayPolls() {\r\n\tglobal $db, $t, $site;\r\n\r\n\tif ( !$uid )\r\n\t\t$uid = '0';\r\n\r\n\t//print_r( $_SESSION );\r\n\r\n\t$group = $_SESSION['es_auth']['group_id'];\r\n\r\n\t$activePolls = $db->getAll( 'select * from ' . POLLS_TABLE . \" where site_key = '$site' and active = '1'\" );\r\n\r\n\t//print_r( $activePolls );\r\n\r\n\t// for each available active poll, check to see if it has been displayed to the users\r\n\r\n\t$newActivePolls = array();\r\n\r\n\t$userip = $_SERVER['REMOTE_ADDR'];\r\n\r\n\tforeach( $activePolls as $index => $row ) {\r\n\r\n\t\t// check user authentication to view this poll\r\n\r\n\t\tif ( ( $_SESSION['es_auth']['group_id'] > 0 && $row[group_id] == 'auth' )\r\n\t\t\t|| $_SESSION['es_auth']['group_id'] == $row[group_id]\r\n\t\t\t|| $row[group_id] == 'all' ) {\r\n\r\n\t\t\t$pollViewed = $db->getOne( 'select id from ' . POLLRESULTS_TABLE . \" where poll_id = '$row[id]' and site_key = '$site' and user_ip = '$userip'\" );\r\n\r\n\r\n\t\t\tif ( !$pollViewed ) {\r\n\t\t\t\t$newActivePolls [] = $row;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//print_r( $newActivePolls );\r\n\r\n\t// poll popup code will be displayed in default.tpl\r\n\t$t->assign( 'activePolls', $newActivePolls );\r\n}", "public function testWebinarPanelistDelete()\n {\n }", "public function _testMultipleInventories()\n {\n\n }", "public function executeUserWebsitePracticeArea11(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function executeUserWebsitePracticeArea18(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function test_list_players()\n {\n $players = $this->postScriptumServer->listPlayers();\n\n $this->assertCount(77, $players);\n }", "public function testEventsList()\n {\n $response = $this->get('/events');\n\n $response->assertStatus(200);\n }", "public function executeUserWebsitePracticeArea9(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function testWebinarCreate()\n {\n }", "public function test_list_players()\n {\n $players = $this->btwServer->listPlayers();\n\n $this->assertCount(77, $players);\n }", "public function testGetStudentTakesCourseList()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->get($this->url('student-courses'));\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'data' => [\n [\n 'student_id',\n 'staff_teach_course_id'\n ]\n ]\n ]);\n }", "public function testListTasks()\n {\n $this->withoutMiddleware();\n $get = $this->json('GET','/api/v1/tasks');\n $this->assertResponseOk();\n $response = json_decode($get->response->getContent(), true);\n $this->assertNotNull($response, 'Test if is a valid json');\n $this->assertTrue(json_last_error() == JSON_ERROR_NONE, 'Test if the response was ok');\n $this->assertCount(0,$response, 'Test if query count is zero');\n //Test for a non empty list\n $tasks = factory(Task::class,2)->create();\n $get = $this->json('GET', 'api/v1/tasks');\n $this->assertResponseOk();\n $response = json_decode($get->response->getContent(), true);\n $this->assertNotNull($response, 'Test if is a valid json');\n $this->assertTrue(json_last_error() == JSON_ERROR_NONE, 'Test if the response was ok');\n $this->assertCount(2, $response, 'Test if query count is 2');\n\n $tasks->each(function($item, $key) use ($response){\n $this->assertObjectEqualsExclude($item,$response[$key]);\n });\n }", "function managePollsPage() {\n include(plugin_dir_path(__FILE__) . '/add-poll.php');\n}", "public function testGetAll()\n {\n $ret =\\App\\Providers\\ListsServiceProvider::getLists();\n \n $this->assertNotEmpty($ret);\n }", "function getUpcomingWebinars()\n {\n $path = $this->getPathRelativeToOrganizer('upcomingWebinars');\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function testListUserEnrollments()\n {\n }", "private static function removeAllTestingWebinars(): void\n {\n foreach (self::$driverHandler->getWebinars() as $webinar) {\n if (str_starts_with($webinar->slug, 'test-')) {\n self::$driverHandler->removeWebinar($webinar->id);\n }\n }\n }", "function testPowerpackList()\n {\n $request = new PlivoRequest(\n 'GET',\n 'Account/MAXXXXXXXXXXXXXXXXXX/Powerpack/',\n []);\n $body = file_get_contents(__DIR__ . '/../Mocks/powerpackListResponse.json');\n\n $this->mock(new PlivoResponse($request,200, $body));\n\n $actual = $this->client->powerpacks->list();\n\n $this->assertRequest($request);\n\n self::assertNotNull($actual);\n }", "public function index()\n {\n $polls = Poll::select('users.name', 'polls.id', 'polls.deadline', 'polls.description', 'polls.title')->join('users', 'users.id', '=', 'polls.created_by')->get();\n $pollUsers = Poll::select('users.name', 'polls.id', 'polls.deadline', 'polls.description', 'polls.title')->join('users', 'users.id', '=', 'polls.created_by')->where('deadline', '>', date('Y-m-d H:i:s'))->get();\n\n return view('vote.index', compact('polls', 'pollUsers'));\n }", "public function guest_can_get_all_websites() {\n $response = $this->get('api/websites');\n $response->assertStatus(200);\n }", "public function getArchivedPolls() {\n $this->old = json_decode(file_get_contents(CONTENT.'polls-archive'), TRUE);\n return $this->getPolls($this->old);\n }", "public function testGetParliamentaryCandidateWithVoteCast()\n {\n $pollingStation = $this->em->getRepository('VtallyBundle:PollingStation')->find(1);\n $candidates = $pollingStation->getParliamentaryCandidateWithVoteCast();\n $this->assertEquals($candidates[0]->getFirstName(), 'Jhon');\n $this->assertEquals($candidates[0]->getVoteCast(), 100);\n $this->assertEquals($candidates[1]->getFirstName(), 'Jannette');\n $this->assertEquals($candidates[1]->getVoteCast(), 280);\n $this->assertEquals($candidates[2]->getFirstName(), 'Sondra');\n $this->assertEquals($candidates[2]->getVoteCast(), 98);\n $this->assertEquals($candidates[3]->getFirstName(), 'Fadde');\n $this->assertEquals($candidates[3]->getVoteCast(), 0);\n $this->assertEquals($candidates[4]->getFirstName(), 'Vivien');\n $this->assertEquals($candidates[4]->getVoteCast(), 100);\n $this->assertEquals($candidates[5]->getFirstName(), 'Joella');\n $this->assertEquals($candidates[5]->getVoteCast(), 7);\n $this->assertEquals($candidates[6]->getFirstName(), 'Adde');\n $this->assertEquals($candidates[6]->getVoteCast(), 2);\n }", "public function testGetListWithTLTokenAndPromotorMeta()\n {\n // Populate data\n $tlID = $this->_populateTL();\n $dealerID = $this->_populateDealer();\n $dealerAccountID = $this->_populateDealerAccount();\n $branchID = $this->_populateBranch();\n $newsID = $this->_populateNews();\n $dealerNewsID = $this->_populateDealerNews();\n $promtorMetaID = $this->_populatePromotorMeta();\n\n // Create token\n $token = str_random(5);\n $encryptedToken = $this->token->encode($tlID, $token);\n \n $params = [\n 'token' => $encryptedToken \n ];\n\n // Do request\n $response = $this->call('GET', '/api/1.5.0/news-list', $params);\n $result = json_decode($response->getContent(), true);\n\n // Verify\n $this->assertTrue(array_key_exists('result', $result));\n }", "public function testListPeople()\n {\n }", "public function run()\n {\n $poll = new Poll();\n $poll->title = \"This is a simple poll from admin panel\";\n $poll->slug = \"this-is-a-simple-poll-from-admin-panel\";\n $poll->status = 1;\n $poll->start_date = \"2020-06-14\";\n $poll->end_date = \"2020-06-15\";\n $poll->total_yes = 5;\n $poll->total_no = 2;\n $poll->total_no_comment = 1;\n $poll->save();\n\n $poll = new Poll();\n $poll->title = \"This is another poll from admin panel\";\n $poll->slug = \"this-is-another-poll-from-admin-panel\";\n $poll->status = 0;\n $poll->start_date = \"2020-06-15\";\n $poll->end_date = \"2020-06-16\";\n $poll->total_yes = 7;\n $poll->total_no = 11;\n $poll->total_no_comment = 3;\n $poll->save();\n }", "public function testShowAllIncidences()\n {\n //1. Preparar el test\n //2. Executar el codi que vull provar.\n //3. Comprovo: assert\n\n $incidences = factory(Incidence::class, 50) -> create();\n\n\n $response = $this->get('/incidences');\n $response->assertStatus(200);\n $response->assertSuccessful();\n $response->assertViewIs('list_events');\n\n\n //TODO faltaria contar que hi ha 50 al resultat\n\n// foreach ( $incidences as $incidence) {\n// $response->assertSeeText($incidence->title);\n// $response->assertSeeText($incidence->description);\n// }\n }", "public function playlists()\n\t{\n\t\treturn $this->CLI->arrayQuery(\"alarm playlists\");\n\t}", "public function executeUserWebsitePracticeArea19(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function index()\n {\n $polls=Polls::where('delflag',0)\n ->orderBy('id','desc')\n ->paginate(15);\n //var_dump($polls->currentPage());\n return view('admin.polls.index')->withPolls($polls);\n }", "public function testPeopleListsList()\n {\n $r = self::$f1->get('/v1/people/lists.json');\n $this->assertEquals('200', $r['http_code'] );\n $this->assertNotEmpty($r['body'], \"No Response Body\");\n return $r['body']['peopleLists'];\n }", "function citrixonline_get_webinar($webinarKey) \n {\n\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\treturn 0;\n\t\t\t\n\t\t$return_array = array();\n\n\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/\".$webinarKey.\"?oauth_token=\".$this->access_token), true);\n\t\t\n\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t{\n\t\t\t$this->set_access_token('');\n\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t}\n\t\t\n\t\treturn $reponse;\n\t}", "public function testList()\n {\n $this->visit('/admin/school')\n ->see(SchoolCrudController::SINGLE_NAME);\n }", "public function executeUserWebsitePracticeArea1(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function testListProduk()\n {\n $response = $this->getJson('/produk', [\n ]);\n $response->dump();\n $response->assertStatus(200);\n }", "public function testGetWaiverTemplates()\n {\n $numTemplates = 3;\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::templates($numTemplates));\n\n $templates = $sw->getWaiverTemplates();\n\n $this->assertCount($numTemplates, $templates);\n foreach($templates as $template) {\n $this->assertInstanceOf(SmartwaiverTemplate::class, $template);\n }\n\n $this->checkGetRequests($container, ['/v4/templates']);\n }", "public function testGetWaiverTemplates()\n {\n $numTemplates = 3;\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::templates($numTemplates));\n\n $templates = $sw->getWaiverTemplates();\n\n $this->assertCount($numTemplates, $templates);\n foreach($templates as $template) {\n $this->assertInstanceOf(SmartwaiverTemplate::class, $template);\n }\n\n $this->checkGetRequests($container, ['/v4/templates']);\n }", "public function testGamesList()\n {\n Passport::actingAs(\n factory(User::class)->create(),\n ['create-servers']\n );\n factory(Stream::class)->create([\n 'game_id' => 1,\n 'viewers_count' => 3,\n ]);\n\n factory(Stream::class)->create([\n 'game_id' => 1,\n 'viewers_count' => 5,\n ]);\n\n factory(Stream::class)->create([\n 'game_id' => 2,\n ]);\n\n factory(Stream::class)->create([\n 'game_id' => 3,\n ]);\n\n // Exact game\n $response = $this->get('/streams/games?games[]=1');\n\n $response->assertStatus(200);\n $response->assertJsonCount(1, 'data');\n $data = json_decode($response->getContent(), true);\n $this->assertEquals(8, $data['data'][0]['viewers_count']);\n\n // List of games\n $response = $this->get('/streams/games?games[]=1&games[]=2');\n\n $response->assertStatus(200);\n $response->assertJsonCount(2, 'data');\n\n // All games\n $response = $this->get('/streams/games');\n\n $response->assertStatus(200);\n $response->assertJsonCount(3, 'data');\n }", "public function test_that_authorized_user_can_view_courses_within_other_periods()\n {\n \n }", "public function reportWebinarPolls($webinar_id)\n {\n list($response) = $this->reportWebinarPollsWithHttpInfo($webinar_id);\n return $response;\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function testList()\n {\n //Tests all products\n $this->clientAuthenticated->request('GET', '/product/list');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('productId', $first);\n\n //Tests all products linked to a child\n $this->clientAuthenticated->request('GET', '/product/list/child/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('productId', $first);\n }", "public function testList()\n {\n //Tests list by date\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03-06');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by month\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by date and status\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03-06/payed');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by month and status\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03/payed');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by year and status\n $this->clientAuthenticated->request('GET', '/transaction/list/2019/payed');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by date and person\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03-06/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by month and person\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by year and person\n $this->clientAuthenticated->request('GET', '/transaction/list/2019/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by status and person\n $this->clientAuthenticated->request('GET', '/transaction/list/payed/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n }", "public function executeUserWebsitePracticeArea20(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function testListExperts()\n {\n }", "public function testAction()\n {\n if ($this->identity()) {\n $summoners = $this->account()->getSummoners();\n $summoner = $summoners[0];\n $response = $this->getServiceLocator()->get('youtube_service')->findByQuery(\"league of legends\", null, 20, \"this_week\");\n $videos = $response->getVideos(true);\n foreach ($videos as $video) {\n echo $video->getScore() . '<br />';\n }\n # $feeds = $this->getServiceLocator()->get('feed_service')->getLolProFeeds(array(\"Ahri\",\"Aatrox\",\"Jayce\"));\n return new ViewModel();\n } else {\n return $this->notFoundAction();\n }\n }", "public function index()\n {\n // $poling = new polling_unit();\n $pol = $this->get_polling_list();\n\n return view('pollingunit', [\n 'pollingList' => $pol\n ]);\n }", "public function testServiceCanPollAds()\n {\n $this->advertiserA->pollAds();\n $data = $this->mockResponseA()['hotels'];\n $orgTax = $data[0]['rooms'][0]['taxes'];\n $hotels = Hotels::with('rooms','rooms.taxes')->get();\n $dbtax = $hotels[0]->rooms[0]->taxes[0];\n $this->assertEquals(count($data), $hotels->count());\n $this->assertEquals(count($data[0]['rooms']), $hotels[0]->rooms->count());\n $this->assertEquals($orgTax['amount'], $dbtax->amount);\n $this->assertEquals($orgTax['currency'], $dbtax->currency);\n $this->assertEquals($orgTax['type'], $dbtax->type);\n }", "public function executeUserWebsitePracticeArea8(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }" ]
[ "0.7220611", "0.67623955", "0.64286876", "0.6334028", "0.61761254", "0.5999231", "0.58641374", "0.58622104", "0.5815001", "0.5744109", "0.562562", "0.5541564", "0.5434194", "0.54106075", "0.5409291", "0.5376", "0.53354937", "0.53315526", "0.53140426", "0.53073347", "0.52871454", "0.52156824", "0.5198359", "0.51890326", "0.51649815", "0.5155491", "0.5105315", "0.50998294", "0.50601804", "0.50566334", "0.50236034", "0.49969158", "0.4991219", "0.49861944", "0.4959799", "0.49578345", "0.49518174", "0.4944321", "0.49409977", "0.4913001", "0.49085778", "0.48947123", "0.48848644", "0.48726907", "0.48698643", "0.4847245", "0.48371384", "0.48147735", "0.4810734", "0.48070383", "0.47997457", "0.4798519", "0.47901976", "0.478838", "0.47867352", "0.4786381", "0.47767872", "0.47694233", "0.47690728", "0.47639975", "0.47599638", "0.47595826", "0.47462985", "0.47317675", "0.47248626", "0.47229853", "0.47168824", "0.4714799", "0.47146618", "0.47078952", "0.4707687", "0.4703845", "0.4697161", "0.46967807", "0.46908256", "0.46864805", "0.46815598", "0.4679764", "0.46780655", "0.46674827", "0.466666", "0.46663705", "0.4664855", "0.46562153", "0.46551868", "0.465223", "0.46390495", "0.46390495", "0.46390143", "0.46377257", "0.46365988", "0.46362773", "0.46348578", "0.46342963", "0.46325943", "0.4619627", "0.46151432", "0.46131828", "0.46123332", "0.460493" ]
0.7082206
1
Test case for webinarRegistrantCreate Add a Webinar Registrant.
public function testWebinarRegistrantCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarRegistrants()\n {\n }", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function testWebinarRegistrantStatus()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function onRegistrantCreated(MeetingRegistrantCreated $event) {\n\n $meetingId = (string)$event->getObject()['id'];\n\n $meeting = Meeting::whereZoomId($meetingId)->first();\n\n if(!empty($meeting)){\n\n $this->logEvent($event);\n try{\n $zoomRegistrant = new Registrant();\n $zoomRegistrant->create($event->getObject()['registrant']);\n\n $registrantModel = null;\n\n switch ($meeting->getSetting(ZoomMeeting::SETTINGS_KEY_REGISTRATION_TYPE)){\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_ALL_OCCURRENCES:\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_MANY_OCCURRENCES:\n $occurrences = isset($event->getObject()['occurrences']) ? $event->getObject()['occurrences'] : $meeting->occurrences;\n foreach($occurrences as $occurrence){\n $occurrenceId = is_array($occurrence) ? $occurrence['occurrence_id'] : $occurrence->occurrence_id;\n $this->saveRegistrant($zoomRegistrant, $meetingId, $occurrenceId);\n }\n break;\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_ONE_OCCURRENCES:\n $this->saveRegistrant($zoomRegistrant, $meetingId, $event->getObject()['occurrences'][0]['occurrence_id']);\n break;\n }\n\n $registrantModel = $this->getRegistrantFromEvent($event);\n\n event(new SendRegistrantConfirm($registrantModel));\n\n event(new SendNewRegistrant($registrantModel));\n\n $this->logFinishEvent();\n }catch (\\Exception $exception){\n $this->logFailedEvent($exception);\n }\n }else{\n $this->logNotFoundEvent();\n }\n\n }", "public function testWebinarCreate()\n {\n }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = '[email protected]';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "protected function createRegistrant() {\n $registrant = $this->registrantFactory->createRegistrant([\n 'event' => $this->registration->getEvent(),\n ]);\n $registrant->setRegistration($this->registration);\n\n return $registrant;\n }", "public function test_new_user_can_register()\n {\n $this->RegisterRolesAndPermissions();\n// $this->withExceptionHandling();\n $response = $this->postJson(route('auth.register'), [\n 'name' => \"ehsan dastras\",\n 'email' => \"[email protected]\",\n 'password' => \"12345678\",\n ]);\n\n $response->assertStatus(Response::HTTP_CREATED);\n }", "public function newparticipant(Request $request)\n {\n $this->validate($request, [\n 'val1' => 'required',\n 'val2' => 'required' \n\n ]);\n\n $reg = new EventRegistrations;\n $reg->name = \\Auth::user()->name;\n $reg->user_id = \\Auth::user()->id;\n $reg->event_id = $request->val4;\n $reg->email = $request->val2;\n $reg->allergies = $request->val3;\n $reg->save();\n\n \n return redirect()->action('EventsController@loggedindex');\n }", "public function sellerCanRegister()\n {\n $input = [\n 'username' => 'iniusername' . Str::random(3),\n 'fullname' => 'ini nama ' . Str::random(4),\n 'email' => 'ini_email' . Str::random(4) . '@gmail.com',\n 'password' => 'P@sswr0d!',\n 'sex' => 0\n ];\n $response = $this->post('/api/seller/register', $input);\n $response->assertStatus(200);\n }", "public function testNewUserRegistration()\n\t{\n\t $this->visit('/register')\n\t ->type('Taylor', 'name')\n\t ->type('[email protected]', 'email')\n\t ->type('mytest', 'password')\n\t ->type('mytest', 'password_confirmation')\n\t ->press('Register');\n\t}", "public function accountant_create()\n\t{\n\t\t$data['name'] = html_escape($this->input->post('name'));\n\t\t$data['email'] = html_escape($this->input->post('email'));\n\t\t$data['password'] = sha1($this->input->post('password'));\n\t\t$data['phone'] = html_escape($this->input->post('phone'));\n\t\t$data['gender'] = html_escape($this->input->post('gender'));\n\t\t$data['blood_group'] = html_escape($this->input->post('blood_group'));\n\t\t$data['address'] = html_escape($this->input->post('address'));\n\t\t$data['school_id'] = $this->school_id;\n\t\t$data['role'] = 'accountant';\n\t\t$data['watch_history'] = '[]';\n\n\t\t$duplication_status = $this->check_duplication('on_create', $data['email']);\n\t\tif($duplication_status){\n\t\t\t$this->db->insert('users', $data);\n\n\t\t\t$response = array(\n\t\t\t\t'status' => true,\n\t\t\t\t'notification' => get_phrase('accountant_added_successfully')\n\t\t\t);\n\t\t}else{\n\t\t\t$response = array(\n\t\t\t\t'status' => false,\n\t\t\t\t'notification' => get_phrase('sorry_this_email_has_been_taken')\n\t\t\t);\n\t\t}\n\n\t\treturn json_encode($response);\n\t}", "public function test_is_new_user_can_register()\n {\n $data = factory('App\\User')->make();\n\n $this->post(route('register'), $data->toArray())\n ->assertRedirect(\"/\");\n }", "public function testRegister()\n {\n $crawler = $this->client->request('GET', '/cliente/');\n $crawler = $this->client->followRedirect();\n\n $this->assertTrue($this->client->getContainer()->get('security.context')->isGranted('IS_AUTHENTICATED_ANONYMOUSLY'));\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode());\n $this->assertGreaterThan(0, $crawler->filter('html:contains(\"Acesse sua conta\")')->count());\n \n // validate form\n $form = $crawler->selectButton('Cadastrar')->form(array(\n 'marcoshoya_marquejogobundle_customer[username]' => '',\n ));\n \n $crawler = $this->client->submit($form);\n $this->assertGreaterThan(0, $crawler->filter('span:contains(\"Campo obrigatório\")')->count());\n \n $form = $crawler->selectButton('Cadastrar')->form(array(\n 'marcoshoya_marquejogobundle_customer[username]' => '[email protected]',\n ));\n \n $this->client->submit($form);\n $crawler = $this->client->followRedirect();\n\n // Check data in the show view\n $this->assertGreaterThan(0, $crawler->filter('html:contains(\"Novo cadastro\")')->count());\n }", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "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 test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function register(Request $request)\n {\n\n //Validates data\n $this->validator($request->all())->validate();\n\n //Create instructor\n $instructor = $this->create($request->all());\n \n //Authenticates instructor\n $this->guard()->login($instructor);\n\n //Redirects instructors\n return redirect($this->redirectPath);\n }", "private function register()\n {\n $this->browser->visit('/admin')->pause(1000)\n ->assertPathIs('/admin/register')\n ->type('first_name', $this->faker->firstName)\n ->type('last_name', $this->faker->lastName)\n ->type('email', $this->email)\n ->type('password', $this->password)\n ->type('password_confirmation', $this->password)\n ->press('Register')\n ->assertPathIs('/admin');\n }", "public function create(RegistrationPostCreatedEvent $event): void\n {\n }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function user_can_register_account_with_valid_details()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/register')\n ->assertSee('Register')\n ->type('name','keith')\n ->type('email','[email protected]')\n ->type('password','secret')\n ->type('password_confirmation','secret')\n ->press('Register')\n ->assertpathIs('/home')\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'register')\n ;\n });\n }", "public function testShouldFailIFARegistrationIsCreatedWithoutRegistrant() {\n $this->expectException(\\PDOException::class);\n\n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = '[email protected]';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n }", "public function testVolunteerHourCreateForContactSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/volunteer/'.$volunteerID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function user_can_register_with_valid_details() :void\n {\n $this->browse(function (Browser $browser) {\n\n \t$user1= factory(User::class)->make();\n\n//\t\t\tdie($user1);\n $browser->visit('/')\n // ->click('#accountDropdown')\n ->clickLink('Account')\n\n ->waitFor('#nav-register')\n ->click('#nav-register')\n ->assertSee('Register');\n\n\t $this->submitForm($browser,\n\t\t [\n\t\t\t ['field_name'=>'first_name', 'field_value' =>$user1->first_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'last_name', 'field_value' =>$user1->last_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'username', 'field_value' =>$user1->username, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'email', 'field_value' =>$user1->email, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password', 'field_value' =>$user1->password, 'field_type'=> 'password'],\n\t\t\t ['field_name'=>'password_confirmation', 'field_value' =>$user1->password, 'field_type'=> 'password']\n\t ]\n\t );\n $browser->assertpathIs('/restaurants')\n ->assertSeeIn('#accountName',$user1->username)\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'Sign Up')\n ->logout();\n });\n }", "public function testRegister()\n {\n $this->visit('/register')\n ->type('Test User', 'name')\n ->type('081233548738', 'phone')\n ->type('Tester', 'occupation')\n ->type('[email protected]', 'email')\n ->type(bcrypt('testing123'), 'password')\n ->press('Register')\n ->seeInDatabase('users', ['email' => '[email protected]']);\n }", "public function testRegistrationIsSuccessfulWithValidInputs()\n {\n $this->output->writeln('Running testRegistrationIsSuccessfulWithValidInputs...');\n\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->type('name', 'John Smith')\n ->type('email', '[email protected]')\n ->type('password', 'secret')\n ->type('password_confirmation', 'secret')\n ->press('Register')\n ->assertPathIs('/home');\n });\n }", "public function testApiRegistrationSimple()\n {\n $eventsFaker = Event::fake();\n $emailVerificationSend = Notification::fake();\n $uniqueData = $this->getTestRegisterData();\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $uniqueData);\n\n $response->assertStatus(200)->assertJsonMissingValidationErrors();\n\n $responseArray = $response->decodeResponseJson()->json();\n $this->assertArrayNotHasKey('token_type', $responseArray);\n $this->assertArrayNotHasKey('expires_in', $responseArray);\n $this->assertArrayNotHasKey('access_token', $responseArray);\n $this->assertArrayNotHasKey('refresh_token', $responseArray);\n\n $user = CoreUser::byEmail($uniqueData[ 'email' ])->firstOrFail();\n $this->withoutExceptionHandling();\n\n if ( config('kit-auth.should_dispatch_registered_event') ) {\n $eventsFaker->assertDispatched(Registered::class,\n function (Registered $event) use ($emailVerificationSend) {\n app(ProcessEmailVerification::class)->handle($event);\n\n $emailVerificationSend->assertSentTo($event->user, VerifyEmail::class,\n function (VerifyEmail $notice) {\n $this->assertEquals($notice->requestSide, CoreUserContract::FRONTEND_REQUEST_SIDE);\n return $notice->tokens[ 'web' ] && $notice->tokens[ 'mobile' ];\n });\n\n return true;\n });\n } else {\n $eventsFaker->assertNotDispatched(Registered::class);\n }\n }", "public function testMemberRegistrationForm()\n {\n $response = $this\n ->get('/register-member')\n ->assertStatus(200);\n }", "public function testHandleCreateSuccess()\n {\n // Populate data\n $this->_populate();\n \n $response = $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/create', $this->customDealerAccountData, [], [], ['HTTP_REFERER' => '/dealer-account/create']);\n \n $this->assertRedirectedTo('/dealer-account');\n $this->assertSessionHas('dealer-account-created', '');\n }", "public function testMemberRegistrationHandler()\n {\n Mail::fake();\n\n // POST and check status code\n $response = $this\n ->followingRedirects()\n ->post('/register-member', $this->postData)\n ->assertStatus(200);\n\n // Check existence of member and user in DB\n $this->assertDatabaseHas('members', $this->memberData);\n $this->assertDatabaseHas('users', $this->userData);\n $this->assertDatabaseHas('event_member', [\n 'member_id' => \\App\\Models\\Member::latest()->first()->id,\n 'event_id' => $this->postData['selected_camp'],\n ]);\n Event::assertDispatched(MemberUpdated::class);\n }", "public function setRegistrant($value) {\n\t\tself::$_registrant = $value;\n\t}", "public function registrar(){\n\n /*parametros del metodo input:\n *nomnbre del campo,\n *si es requerido o no (true,false)\n *tipo del campo -actualmente valida (string,int,date,email)*/\n\n $nombre=$this->input('nombre',true,'string');\n\n $descripcion=$this->input('descripcion',true,'string');\n\n\n\n //si la validacion falla lo redirecciona a la vista donde esta los mensaje de error\n if($this->validateFails()){\n //este metodo REDIRECCIONA osea cambia de pagina, se le pasa a que controlador y que accion\n\n $this->redirect('Example','index');\n }else{\n\n $example=new Example();//no hace falta incluir el modelo ya esta incluido\n $example->setExampleParameters1($nombre);\n $example->setExampleParameters2($descripcion);\n $example->save();\n $this->redirect('Example','index');\n }\n }", "public function postRegister(Request $request)\n\t{\n\t\t$validator = $this->registrar->validator($request->all());\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\t$this->throwValidationException(\n\t\t\t\t$request, $validator\n\t\t\t);\n\t\t}\n\n\t\t$this->auth->login($this->registrar->create($request->all()));\n\n\t\t$user = Auth::user();\n\n\t\tRole::create(\n\t\t\t[\n\t\t\t\t'user_role' => 'applicant',\n\t\t\t\t'user_id' => $user->id\n\t\t\t]\n\t\t);\n\n\t\treturn Response::json(\n\t\t\t[\n\t\t\t\t'loggedIn' => true,\n\t\t\t\t'name' => $request->get('name'),\n\t\t\t\t'uid' => $request->get('uid'),\n\t\t\t\t'role' => 'applicant',\n\t\t\t\t'message' => 'Account successfully created'\n\t\t\t]\n\t\t);\n\t}", "public function createAction(\\Symfony\\Component\\HttpFoundation\\Request $request) {\n $entity = new CoolwayFestivales\\SafetyBundle\\Entity\\User();\n\n $plan = $request->get('plan');\n\n $form = $this->createForm(new CoolwayFestivales\\SafetyBundle\\Form\\UserType(), $entity);\n $form->bind($request);\n $em = $this->getDoctrine()->getManager();\n\n try {\n $entity->setEnabled(true);\n $role = $em->getRepository(\"SafetyBundle:Role\")->findOneByName(\"ROLE_CMS\");\n if (!$role) {\n $role = new CoolwayFestivales\\SafetyBundle\\Entity\\Role();\n $role->setDescription(\"User CMS\");\n $role->setName(\"ROLE_CMS\");\n $em->persist($role);\n $em->flush();\n }\n $entity->addRole($role);\n $em->persist($entity);\n $em->flush();\n\n// //logear al user\n// try {\n// $token = new \\Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken($entity, $entity->getPassword(), 'usuarios', $entity->getRoles());\n// $this->container->get('security.context')->setToken($token);\n//\n// } catch (Exception $exc) {\n// echo $exc->getTraceAsString();\n// }\n\n $user_id = $entity->getId();\n return $this->redirect(\"https://subs.pinpayments.com/apptibase-test/subscribers/$user_id/subscribe/$plan/apptibase-user-$user_id\");\n } catch (\\Exception $exc) {\n return $this->render('AppBundle:Backend:register.html.twig', array(\n 'error' => $exc->getMessage(),\n 'plan' => \"\"\n ));\n }\n }", "public function testSignUp()\n {\n $user = factory(App\\User::class)->make();\n $response = $this->post('/users', [\n 'first_name' => $user->getAttributeValue('first_name'),\n 'last_name' => $user->getAttributeValue('last_name'),\n 'email' => $user->getAttributeValue('email'),\n 'password' => 'qwerty',\n 'password_confirmation' => 'qwerty',\n '_token' => csrf_token()\n ]);\n\n $this->seeJson([\n 'id' => Auth::id(),\n 'first_name' => $user->getAttributeValue('first_name'),\n 'last_name' => $user->getAttributeValue('last_name'),\n 'email' => $user->getAttributeValue('email'),\n 'created_at' => Auth::user()->created_at->format($this->date_format),\n 'updated_at' => Auth::user()->updated_at->format($this->date_format)\n ]);\n\n $user = Auth::user();\n $this->assertTrue($user->hasRole(config('entrust.default')));\n $this->assertResponseStatus(200);\n }", "public function testRegisterCompany()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->type('name', env('DUSK_NEW_NAME'))\n ->type('email', env('DUSK_NEW_USER'))\n ->type('verificateEmail', env('DUSK_NEW_USER'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function testSignUp()\n {\n //add new user\n $this->browse(function ($browser) {\n $browser->visit('user/signup')\n ->type('email', '[email protected]')\n ->type('phone', '0775635458')\n ->type('name', 'ABC')\n ->type('password', '1234')\n ->type('passwordConfirm', '1234')\n ->click('.signup')\n ->assertPathIs('/');\n\n });\n }", "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 register($request)\n {\n \\Auth::user()->agent()->create([\n\n 'businessNumber' => $request->businessNumber,\n 'agentName' => $request->agentName,\n 'agentEmail' => $request->agentEmail,\n 'agentMobileNumber' => $request->agentMobileNumber,\n 'openingHourWeekDay' => $request->openingHourWeekDay,\n 'closingHourWeekDay' => $request->closingHourWeekDay,\n 'openingHourSaturday' => $request->openingHourSaturday,\n 'closingHourSaturday' => $request->closingHourWeekDay,\n 'openingHourSunday'=> $request->openingHourSunday,\n 'closingHourSunday'=> $request->openingHourSunday,\n\n ]);\n }", "public function register($name = null, $registrant = null) {\n return parent::register($name, $registrant);\n }", "public function testRegistration(): void { }", "public function test_create_request_registered_user() {\n\t\twp_delete_post( self::$request_id, true );\n\n\t\t$test_data = array(\n\t\t\t'test-data' => 'test value here',\n\t\t\t'test index' => 'more privacy data',\n\t\t);\n\n\t\t$actual = wp_create_user_request( self::$registered_user_email, 'export_personal_data', $test_data );\n\n\t\t$this->assertNotWPError( $actual );\n\n\t\t$post = get_post( $actual );\n\n\t\t$this->assertSame( self::$user_id, (int) $post->post_author );\n\t\t$this->assertSame( 'export_personal_data', $post->post_name );\n\t\t$this->assertSame( self::$registered_user_email, $post->post_title );\n\t\t$this->assertSame( 'request-pending', $post->post_status );\n\t\t$this->assertSame( 'user_request', $post->post_type );\n\t\t$this->assertSame( wp_json_encode( $test_data ), $post->post_content );\n\t}", "public function fb_register(Request $req){\n\t\t\t$userData = array(\n\t\t\t'fb_id' => $req->get('fb_id'),\n\t\t\t'fb_token' => $req->get('fb_token'),\n\t\t\t'uid' => $req->get('uid'),\n\t\t\t'username' => $req->get('username').rand(),\n\t\t\t'email' => $req->get('email'),\n\t\t\t'password' => $req->get('uid'),\n\t\t\t'referral' => $req->get('referral'),\n\t\t\t'role' => 0\n\t\t\t);\n\t\t\t\n\t\t\t$Crostutor = new Crostutor();\n\t\t\t$response = $Crostutor->register($userData);\n\t\t\t\n\t\t\tif(isset($response['status']) && $response['status'] == 0){\n\t\t\t\treturn response()->json(['status'=>\"0\",'message'=>\"Acount created Sucessfully\"]);\n\t\t\t\t}else{ \n\t\t\t\treturn response()->json(['status'=>\"101\",'message'=>$response['message']]);\n\t\t\t}\n\t\t\t\n\t\t}", "public function postRegister()\n {\n if ($this->request->is('post')) {\n $input = $this->request->getData();\n $validate = $this->Client->newEntity($input);\n\n if ($validate->errors()) {\n $this->set($validate->errors());\n } else {\n $this->Client->insert($input);\n $this->Flash->success('Sign up success');\n }\n $this->register();\n }\n }", "public function actionCreate()\n {\n $model = new WebinarCreateRequest();\n\n if ($model->load(Yii::$app->request->post()) ) {\n $model->status = Status::STATUS_NEW;\n $model->created_at = gmdate('Y-m-d H:i:s');\n $model->updated_at = gmdate('Y-m-d H:i:s');\n $model->created_by = $model->author_name;\n $model->updated_by = $model->author_name;\n $user = $model->author_name;\n $model->save();\n\n if($this->sendActivationLink($model->id, $model->email, $user)) {\n return $this->render('create', [\n 'model' => $model, \n 'status' => 'success', 'id' => $model->id]);\n }\n \n //return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function testIntegrationCreate()\n {\n $this->visit('user/create')\n ->see('Create New Account');\n $this->assertResponseOk();\n $this->assertViewHas('model');\n }", "public function testUserRegister()\n {\n //Voter user registration testing\n $this->browse(function (Browser $voter,$photographer,$organizer) {\n $voter->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','VoterTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee('LensView Timeline')\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n\n //Photographer user registration testing\n $photographer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','PhotographerTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role2')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Photographer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n \n\n // Contest Organizer registration testing\n $organizer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','OrganizerTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role3')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Organizer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n });\n}", "public function testNewPersonsOwnershipExistingCustomers() {\n $this->addProductToCart($this->product);\n $this->goToCheckout();\n $this->assertCheckoutProgressStep('Event registration');\n\n // Save first registrant.\n $this->clickLink('Add registrant');\n $this->submitForm([\n 'person[field_name][0][value]' => 'Person 1',\n 'person[field_email][0][value]' => '[email protected]',\n 'field_comments[0][value]' => 'No commments',\n ], 'Save');\n\n // Assert that this person profile is now owned by the current logged in\n // user.\n $person = Profile::load(1);\n // Assert that we are checking the expected person.\n $this->assertEquals('Person 1', $person->field_name->value);\n $this->assertEquals($this->adminUser->id(), $person->getOwnerId());\n }", "public function testRegisterSucessful() {\n\t\t$data = $this->getUserData(\n\t\t\t$this->username,\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\t$this->email\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\tvar_dump($resp_data);\n\t\t$this->assertResponseStatus(201);\n\t\t$this->assertEquals($resp_data->user->username, $this->username);\n\t\t$this->assertEquals($resp_data->user->first_name, $this->first_name);\n\t\t$this->assertEquals($resp_data->user->surname, $this->surname);\n\t\t$this->assertEquals($resp_data->user->email, $this->email);\n\t}", "function invite_workshop_attendees_create(){\n\t\t$this->content_data['uri'] = base_url('workshops/invite/register');\n $this->content_data['get_dropdown_all_titles'] = _get_dropdown_all_titles();\t\t\n\t\t$this->content_data['submit_button'] = lang('invite_').lang('attendee');\t\t\t\t\n\t\t$this->panel_title = 'ADD WORKSHOP ATTENDEES';\n\t\t$this->add_external_css(array(\"/themes/core/css/bootstrap-datetimepicker.css\"));\n\t\t$this->add_external_js(array(\"/themes/core/js/date-time-picker/moment.js\", \"/themes/core/js/date-time-picker/transition.js\", \"/themes/core/js/date-time-picker/collapse.js\", \"/themes/core/js/date-time-picker/bootstrap-datetimepicker.js\", \"/themes/core/js/views/training/workshops/workshops.js\"));\n\t\t$this->data = $this->includes;\t\t\n\t\t$this->content_data['workshopId'] = $this->id;\n\t\t$this->data['content'] = $this->load->view('training/workshops/workshop_attendees_add', $this->content_data, true);\n \t $this->load->view($this->template, $this->data);\n }", "function ciniki_fatt_offeringRegistrationAdd(&$ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'customer_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Customer'),\n 'student_id'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Student'),\n 'customer_notes'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Customer Notes'), \n 'notes'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Notes'), \n 'test_results'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Test Results'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'fatt', 'private', 'checkAccess');\n $rc = ciniki_fatt_checkAccess($ciniki, $args['tnid'], 'ciniki.fatt.offeringRegistrationAdd'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Create the invoice\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'sapos', 'public', 'invoiceAdd');\n $rc = ciniki_sapos_invoiceAdd($ciniki);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $invoice = $rc['invoice'];\n\n //\n // Get the registration_id, should be the first one we just created this invoice\n //\n if( !isset($invoice['items']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.fatt.3', 'msg'=>'Internal error creating invoice'));\n }\n\n foreach($invoice['items'] as $item) {\n if( $item['object'] == 'ciniki.fatt.offeringregistration' ) {\n $registration_id = $item['object_id'];\n }\n }\n\n if( !isset($registration_id) || $registration_id === NULL || $registration_id == 0 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.fatt.4', 'msg'=>'Internal error creating invoice'));\n }\n\n //\n // Update the student_id for the registration\n //\n if( isset($args['student_id']) && $args['student_id'] != $args['customer_id'] ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $args['tnid'], 'ciniki.fatt.offeringregistration', $registration_id, array('student_id'=>$args['student_id']), 0x04);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.fatt.5', 'msg'=>'Unable to update student', 'err'=>$rc['err']));\n }\n }\n \n //\n // Get the registration\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'fatt', 'private', 'registrationLoad');\n return ciniki_fatt_registrationLoad($ciniki, $args['tnid'], $registration_id); \n}", "public function getRegistrant();", "public function testWebinarPollCreate()\n {\n }", "public function startWebAuthnRegistration($request)\n {\n return $this->start()->uri(\"/api/webauthn/register/start\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function register_post() \n {\n $first_name = $this->post('fname');\n $last_name = $this->post('lname');\n $username = $this->post('username');\n $email = $this->post('email');\n $password = $this->post('password');\n $dob = $this->post('dob');\n $contact_no = $this->post('contact_no');\n $gender = $this->post('gender');\n $address = $this->post('address');\n $user_type = 2;//Member user\n $status = 1;//Active\n $added_date = time();\n if($first_name != '' && $last_name != '' && $username != '' && $email != '' && $password != '' && $dob != '' && $gender != '' && $address != '')\n {\n $userData = array('fname'=>$first_name,'lname'=>$last_name,'username'=>$username,'status'=>$status,\n 'email'=>$email,'password'=>$password,'dob'=>$dob,'contact_no'=>$contact_no,'address'=>$address,\n 'user_type'=>$user_type,'gender'=>$gender,'added_date'=>$added_date);\n \n $record = $this->artists_model->register_member($userData);\n $message = [\n 'status' => TRUE, \n 'message' => 'Registered successfully',\n 'status_code'=> 200\n ];\n $this->set_response($message, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code\n }\n else\n {\n $message = [\n 'status' => FALSE,\n 'message' => 'Not register,please enter required fields properly',\n 'status_code'=> 400\n ];\n $this->set_response($message, REST_Controller::HTTP_BAD_REQUEST); \n \n }\n }", "public function test_register()\n {\n $faker = Factory::create();\n // User's data\n $user = [\n 'email' => $faker->email,\n 'name' => $faker->name,\n 'password' => 'password',\n ];\n // Send post request\n $response = $this->json('POST', route('api.register'), $user);\n // Assert it was successful\n $response->assertStatus(200)->json(['successfully register test user!']);\n }", "public function testSuccessfulRegistration(){\n \t/*\n \t * Create a user for registration\n \t */\n \t$clearpass = str_random(10);\n \t$user = factory(App\\User::class)->make([\n \t\t\t'password' => bcrypt($clearpass)\n \t]);\n \t\n \t/*\n \t * Visit the Registration page and confirm a user can successfully create an account\n \t */\n \t$this->visit('/register')\n \t->see('E-Mail Address')\n \t->type($user->name, 'name')\n \t->type($user->email, 'email')\n \t->type($clearpass, 'password')\n \t->type($clearpass, 'password_confirmation')\n \t->press('Register') \t\n \t->see('You are logged in!');\n \t\n \t$this->assertFalse(App\\User::where('name', $user->name)->get()->isEmpty());\n }", "public function setRegistrant($registrant = null)\n {\n $this->registrant = $registrant;\n\n return $this;\n }", "public function testRegisterUser()\n {\n $this->withoutExceptionHandling();\n $user = [\n 'email' => '[email protected]',\n 'password' => 'test1234',\n ];\n $response = $this->postJson('/api/register', $user);\n $response->assertStatus(201)->assertJsonFragment([\n 'email' => '[email protected]',\n ]);\n }", "public function getRegistrant()\n {\n return $this->registrant;\n }", "public function addAction(Request $request){\r\n \t$factory = $this->get('services.institution.factory');\r\n \t$institution = $factory->createInstance(); \t\n \t$institutionUser = new InstitutionUser();\n \t\n \t$this->get('services.contact_detail')->initializeContactDetails($institutionUser, array(ContactDetailTypes::PHONE, ContactDetailTypes::MOBILE));\r\n \t\r\n \t$form = $this->createForm(new InstitutionUserSignUpFormType(), $institutionUser, array('include_terms_agreement' => false));\r\n\t \tif ($request->isMethod('POST')) {\n\t \t\t$form->bind($request);\r\n\t \t\t \r\n\t \t\tif ($form->isValid()) {\r\n\t \t\t $postData = $request->get('institutionUserSignUp');\n\t \t\t $institutionUser = $form->getData();\n\t \t\t\t// initialize required database fields\n\t \t\t $institution->setName(uniqid());\r\n\t \t\t\t$institution->setAddress1('');\r\n\t \t\t\t$institution->setContactEmail('');\r\n\t \t\t\t$institution->setContactNumber('');\n\t \t\t\t$institution->setDescription('');\r\n\t \t\t\t$institution->setLogo(null);\n\t \t\t\t$institution->setCoordinates('');\n\t \t\t\t$institution->setType(trim($postData['type'])); /* FIX ME! */\n\t \t\t\t$institution->setWebsites('');\r\n\t \t\t\t$institution->setStatus(InstitutionStatus::getBitValueForInactiveStatus());\r\n\t \t\t\t$institution->setZipCode('');\n\t \t\t\t$institution->setSignupStepStatus(0);\n\n\t \t\t\t// Temporary Code to mark a newly added institution as added internally.\n\t \t\t\t// Added By: Adelbert Silla\n\t \t\t\t$institution->setIsFromInternalAdmin(1);\n\t \t\t\t\n\t \t\t\t\n\t \t\t\t$factory->save($institution);\r\n\t \t\t\t \r\n\t \t\t\t// create Institution user\r\n\t \t\t\t$institutionUser = new InstitutionUser();\r\n\t \t\t\t$institutionUser->setEmail($form->get('email')->getData());\r\n\t \t\t\t$institutionUser->setFirstName($institution->getName());\r\n\t \t\t\t$institutionUser->setLastName('Admin');\r\n\t \t\t\t$institutionUser->setPassword(SecurityHelper::hash_sha256($form->get('password')->getData()));\r\n\t \t\t\t$institutionUser->setInstitution($institution);\r\n\t \t\t\t$institutionUser->setStatus(SiteUser::STATUS_ACTIVE);\r\n\t \t\t\t$this->get('services.contact_detail')->removeInvalidContactDetails($institutionUser);\n// var_dump($institutionUser->getContactDetails()); exit;\r\n\t \t\t\t// dispatch event\r\n\t \t\t\t$this->get('event_dispatcher')->dispatch(InstitutionBundleEvents::ON_ADD_INSTITUTION,\r\n\t \t\t\t\t\t\t\t$this->get('events.factory')->create(InstitutionBundleEvents::ON_ADD_INSTITUTION,$institution,array('institutionUser' => $institutionUser)\r\n \t\t\t\t\t\t\t));\r\n\t \t\n\t \t\t\treturn $this->redirect($this->generateUrl('admin_institution_add_details', array('institutionId' => $institution->getId())));\r\n\t \t\t}\n\t \t\telse {\n\t \t\t \n\t \t\t}\n\t \t}\n\t \t\n \treturn $this->render('AdminBundle:Institution:add.html.twig', array(\r\n \t\t\t\t\t'form' => $form->createView(),\r\n \t\t\t\t\t'institutionTypes' => InstitutionTypes::getFormChoices(),\r\n \t));\r\n }", "public function create()\r\n {\r\n app('antares.asset')->container('antares/installer')->add('validator_min', 'public/packages/core/js/validator.min.js');\r\n set_meta('title', 'Create Administrator');\r\n return $this->processor->create($this);\r\n }", "public function postEventRegister() {\n\n $data = $this->request->all();\n $this->eventRegistar->create($data);\n return json_encode(array('status' => 200, 'message' => 'Saved successfuly'));\n }", "public function test_user_can_register()\n {\n $this->withoutExceptionHandling();\n\n $user = [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'password' => 'password',\n 'password_confirmation' => 'password',\n ];\n\n $response = $this->post('/api/register/', $user);\n\n $response->assertStatus(200);\n $response->assertStatus(Response::HTTP_OK);\n $this->assertDatabaseHas('users', ['email' => '[email protected]']);\n }", "public function testCanDisplayTheAssessorRegistrationForm()\n {\n $response = $this->get('/assessors/register');\n\n $response->assertStatus(200);\n\n $response->assertViewIs('auth.register');\n }", "public function test_admin_can_create_user()\n {\n // $this->withoutExceptionHandling();\n $this->actingAs($this->adminUser())\n ->post(route('users.store'), [\n 'name' => 'Faustino Vasquez'\n ])->assertRedirect('admin/users/faustino-vasquez/edit');\n }", "public function registrar()\n\t{\n\t\t$estado = new Estado();\n\t\t$estado->nombre = $_POST['nombre'];\n\t\t$estado->poblacion_hombres = $_POST['poblacionH'];\n\t\t$estado->poblacion_mujeres = $_POST['poblacionM'];\n\t\t$estado->poblacion_total = $_POST['poblacionT'];\n\t\t$estado->edad_promedio = $_POST['edadP'];\n\t\t$estado->create();\n\t\t//redireccionamos con un header location a la vista de agregarEstado\n\t\theader(\"location: index.php?controller=Direccion&action=agregarEstado\");\n\t}", "public function createAction()\r\n\t{\r\n\t\t$form = $this->createForm(new RegistrationType(), new Registration());\r\n\t\t$form->bindRequest($this->getRequest());\r\n\r\n\t\tif($form->isValid())\r\n\t\t{\r\n\t\t\t$registration = $form->getData();\r\n\r\n\t\t\t$user = $registration->getUser();\r\n\t\t\t$employee = $registration->getEmployee();\r\n\r\n\t\t\t$employee->setUser($user);\r\n\r\n\t\t\t$em = $this->getDoctrine()->getEntityManager();\r\n\t\t\t$em->persist($user);\r\n\t\t\t$em->persist($employee);\r\n\t\t\t$em->flush();\r\n\t\t}\r\n\r\n\t\treturn array('form'=>$form->createView());\r\n\t}", "protected function register(Request $request)\n { \n \n $user= User::create([\n \n 'f_name' => $request->f_name,\n 'l_name' => $request->l_name,\n 'u_name' => str_slug($request->f_name.$request->l_name),\n 'p_number' => $request->p_number,\n 'email' => $request->email,\n 'password' => Hash::make($request->password),\n 'street_address' => $request->street_address,\n 'Division_id' => $request->Divition_id,\n 'District_id' => $request->District_id,\n 'ip_address' => request()->ip(),\n 'remember_token' => str_random(50),\n 'status' => 0,\n\n ]);\n\n $user-> notify (new verifyreg ($user) );\n\n session()->flash('success','A Confirmation Email has sent to you.. please check and Confirma ');\n return redirect('/');\n }", "public function register_new() {\n\t\t$fields = array(\n\t\t\t'address1', 'address2', 'city', 'comment', 'country', 'email', 'fax_src', 'first_name',\n\t\t\t'gender', 'insertion', 'company_name', 'lang', 'last_name', 'middle_name', 'mobile_src',\n\t\t\t'phone_src', 'prefix', 'state', 'suffix', 'zip', 'tax_ex_number', 'timezone'/* , 'house_num', 'house_suff' */\n\t\t);\n\t\t$clean_data = $this->_fill_account_data($fields);\n\n\t\t$clean_data['password'] = $_POST['password'];\t## password may contain escapeable symbols\n\t\t$clean_data['fraud_check'] = 1;\n\t\t$clean_data['ip_address'] = $this->translator->getClientIp();\n\n\t\tinstall_error_handler(array('UserPerson', 'NewAccountsDenied', 'UserExtData', 'InvalidAccountStatus'), 'handle_register_new_account_error');\n\t\t$account_id = call('create_customer', $clean_data, 'HSPC/API/Account');\n\t\tif($account_id) {\n\t\t\t$this->error->add(MC_SUCCESS, 'YOU_BEEN_REGISTERED');\n\t\t\treturn $this->sign_in();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function testRegistration()\n {\n $this->module->enableRegistration = false;\n\n $this->specify(\"we have register if registration disabled\", function () {\n $user = new User([\n 'email' => '[email protected]',\n 'password' => 'password',\n 'name' => 'Tester',\n ]);\n expect(\"we can't register if registration disabled\", $user->register())->false();\n expect(\"we must see message about this\", $user->getErrors())->hasKey('registration');\n });\n\n $this->module->enableRegistration = true;\n $this->module->enableConfirmation = true;\n $this->module->registrationFields = [];\n $this->specify(\"we have register user by email\", function () {\n $user = new User([\n 'email' => '[email protected]',\n ]);\n expect(\"we can register user by email only\", $user->register())->true();\n expect(\"user must have register date\", $user->registered_at)->notEmpty();\n expect(\"user must have status STATUS_CONFIRM\", $user->status)->equals(User::STATUS_CONFIRM);\n expect(\"we can get user profile\", Profile::findOne(['user_id' => $user->id]))->notNull();\n\n $this->tester->seeEmailIsSent();\n $message = $this->tester->grabLastSentEmail();\n expect(\"we must view confirmation email\", $message->getTo())->hasKey($user->email);\n expect(\"we must view confirmation email\", $message->getSubject())->contains('confirm');\n\n //register() on existing user throw \\RuntimeException\n $user->register();\n }, ['throws' => new \\RuntimeException]);\n\n $this->specify(\"we have register user with same email\", function () {\n $user = new User([\n 'email' => '[email protected]',\n ]);\n expect(\"we can't create user with same email\", $user->register())->false();\n expect(\"we must see error message\", $user->getErrors())->hasKey('email');\n });\n\n $this->module->registrationFields = ['password'];\n $this->specify(\"we have register user by email with password\", function () {\n $pass = 'password';\n $user = new User([\n 'email' => '[email protected]',\n ]);\n expect(\"we can't register user without pass\", $user->register())->false();\n expect('we must see error in password', $user->getErrors())->hasKey('password');\n $user->password = $pass;\n expect(\"we can register user\", $user->register())->true();\n expect(\"`pass_hash` must match\", Yii::$app->security->validatePassword($pass, $user->pass_hash))->true();\n expect(\"we can get user profile\", Profile::findOne(['user_id' => $user->id]))->notNull();\n });\n\n $this->module->registrationFields = ['password', 'name'];\n $this->specify(\"we have register user with full data\", function () {\n $pass = 'password';\n $name = 'Tester';\n $user = new User([\n 'email' => '[email protected]',\n ]);\n expect(\"we can't register user without pass and name\", $user->register())->false();\n expect('we must see error in password', $user->getErrors())->hasKey('password');\n expect('we must see error in name', $user->getErrors())->hasKey('name');\n $user->password = $pass;\n $user->name = $name;\n expect(\"we can register user\", $user->register())->true();\n expect(\"`pass_hash` must match\", Yii::$app->security->validatePassword($pass, $user->pass_hash))->true();\n expect(\"we can get user profile\", Profile::findOne(['user_id' => $user->id]))->notNull();\n $user1 = User::findOne($user->id);\n expect(\"name must be set\", $user1->name)->equals($name);\n });\n\n $this->module->registrationFields = ['password', 'name', 'gender', 'birth'];\n $this->specify(\"we have register user with full data\", function () {\n $pass = 'password';\n $name = 'Tester';\n $gender = User::MALE;\n $birth = '2000-01-01';\n $user = new User([\n 'email' => '[email protected]',\n 'password' => $pass,\n 'name' => $name,\n ]);\n expect(\"we can register user without gender and birth\", $user->register())->true();\n\n $user = new User([\n 'email' => '[email protected]',\n 'password' => $pass,\n 'name' => $name,\n 'gender' => $gender,\n 'birth' => $birth,\n ]);\n expect(\"we can register user with full data\", $user->register())->true();\n $user1 = User::findOne($user->id);\n expect('we must see gender', $user1->gender)->equals($gender);\n expect('we must see birth', $user1->birth)->equals($birth);\n });\n\n $this->module->enableConfirmation = false;\n $this->module->registrationFields = [];\n $this->specify(\"we have register user without confirm email\", function () {\n $user = new User([\n 'email' => '[email protected]',\n ]);\n expect(\"we can register user\", $user->register())->true();\n expect(\"user must have status STATUS_ACTIVE\", $user->status)->equals(User::STATUS_ACTIVE);\n $this->tester->seeEmailIsSent();\n $message = $this->tester->grabLastSentEmail();\n expect(\"we must view registration email\", $message->getTo())->hasKey($user->email);\n expect(\"we must view registration email\", $message->getSubject())->contains('register');\n });\n }", "public function createAgency(Request $request) {\n //validate incoming request \n $this->validate($request, [\n 'agencyName' => 'required|string', \n 'agencyAdr' => 'required|string', \n 'agencyPhone' => 'required|string', \n 'agencyContact' => 'required|email',\n ]);\n\n try {\n \n $agency = new Agency;\n $agency->agencyName = $request->input('agencyName');\n $agency->agencyAdr = $request->input('agencyAdr');\n $agency->agencyPhone = $request->input('agencyPhone');\n $agency->agencyContact = $request->input('agencyContact');\n\n $agency->save();\n\n //return successful response\n return response()->json(['agency' => $agency, 'message' => 'CREATED'], 201);\n\n } catch (\\Exception $e) {\n //return error message\n return response()->json(['message' => 'Property Registration Failed!'], 409);\n }\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 testDeveloperCreate()\n {\n $response = $this->get('/developer/create');\n $response->assertStatus(200);\n }", "public function testVolunteerHourCreateForProjectSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $testProjectID = 1;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/project/'.$testProjectID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function register($data, Form $form) {\n if($member = $this->addMember($form)) {\n if(!$this->RequireApproval && $this->EmailType != 'Validation' && !$this->AllowAdding) {\n $member->logIn();\n }\n\n if(isset($data['backURL'])){\n $this->redirect($data['backURL']);\n }\n\n if ($this->RegistrationRedirect) {\n if ($this->PostRegistrationTargetID) {\n $this->redirect($this->PostRegistrationTarget()->Link());\n return;\n }\n\n if ($sessionTarget = Session::get('MemberProfile.REDIRECT')) {\n Session::clear('MemberProfile.REDIRECT');\n if (Director::is_site_url($sessionTarget)) {\n $this->redirect($sessionTarget);\n return;\n }\n }\n }\n\n return $this->redirect($this->Link('afterregistration'));\n } else {\n return $this->redirectBack();\n }\n }", "public function test_it_creates_a_new_user()\n {\n $user = ['email' => '[email protected]', 'given_name' => 'Andrew', 'family_name' => 'Hook'];\n\n $this->json('POST', '/users', $user)\n ->seeJson($user);\n }", "public function testCanRegister()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/');\n $browser->assertSee('TicTacToe');\n $browser->clickLink('register');\n $browser->assertSee('Create your account');\n $browser->type('name', $name = $this->faker->name);\n $browser->type('email', $this->faker->email);\n $password = $this->faker->password;\n $browser->type('password', $password);\n $browser->type('password_confirmation', $password);\n $browser->press('Register')\n ->on(new Home)\n ->assertSee('Dashboard')\n ->assertSee($name . ', you have lost 0 times and won 0 times.');\n });\n }", "public function CreateUser (\\AcceptanceTester $I)\n {\n \n $I->amOnPage(signUpPage::$signUpURL);\n $I->wait('2'); //wait untill all JS scipts are loaded\n $I->fillField(signUpPage::$firstName, signUpPage::$testerName);\n $I->fillField(signUpPage::$lastName, signUpPage::$testerSurname);\n $I->fillField(signUpPage::$email, self::$uniqueEmail = \"check\" . rand(10, 99999) . \"@testBot.com\"); \n $I->fillField(signUpPage::$password, signUpPage::$testerPass);\n $I->fillField(signUpPage::$passConfirm, signUpPage::$testerPass);\n $I->scrollTo(signUpPage::$createUser);\n $I->click(signUpPage::$createUser);\n $I->seeElementInDOM(myAccount::$welcomeMessage);\n \n\n\n }", "function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level', 16 => 'store_owner');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel, 16 => 1);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n }", "function Register()\r\n\t{\r\n\t\tglobal $Site;\r\n\t\t//if all the details is valid save the user on data base\r\n\t\tif ($this->IsValid())\r\n\t\t{\r\n\t\t\t$MemberID = GetID(\"member\", \"MemberID\");//getting last MemberID +1 for adding one more user\r\n\t\t\t$DateAdded = date(\"Y-m-d H:i:s\");\r\n\t\t\t$DateUpdated = $DateAdded;\r\n\t\t\t$IsEnable = 1;\r\n\t\t\t$pass = base64_encode($this->Password);\r\n\t\t\t$SQL = \"insert into member (MemberID, ProfileType, FirstName, LastName, TelNo, Email, Password, IsActive, IsEnable, DateAdded, DateUpdated) values ($MemberID, 'user', '$this->FirstName', '$this->LastName', '$this->PhoneNumber', '$this->Email', '$pass', '1' , '$IsEnable', '$DateAdded', '$DateUpdated')\";\r\n\t\t\tGetRS($SQL);\r\n\t\t\t$_SESSION['SAWMemberID'] = $MemberID;//cookie- to not allow impersonation of another user PHP gives each customer ID\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\t}", "public function testAddConsent(): void\n\t{\n\t\t$request = $this->httpClient->post('ApprovalsRegister/Record', \\App\\Utils::merge(['json' => [\n\t\t\t'subject' => 'Text',\n\t\t\t'approvalsid' => self::$approvalId,\n\t\t\t'contactid' => self::$recordId,\n\t\t\t'approvals_register_type' => 'PLL_ACCEPTANCE',\n\t\t\t'approvals_register_status' => 'PLL_ACCEPTED',\n\t\t\t'registration_date' => date('Y-m-d H:i:s'),\n\t\t]], self::$requestOptions));\n\t\t$this->logs = $body = $request->getBody()->getContents();\n\t\t$response = \\App\\Json::decode($body);\n\t\tstatic::assertSame(200, $request->getStatusCode(), 'ApprovalsRegister/RecordAPI error: ' . PHP_EOL . $request->getReasonPhrase() . '|' . $body);\n\t\tstatic::assertSame(1, $response['status'], 'ApprovalsRegister/Record API error: ' . PHP_EOL . $request->getReasonPhrase() . '|' . $body);\n\t\tstatic::assertNotEmpty($response['result'], 'ApprovalsRegister/Record result is empty and should have at least one entry.');\n\t\tstatic::assertNotEmpty($response['result']['id'], 'ApprovalsRegister/Record record should not be empty');\n\t\tself::assertResponseBodyMatch($response, self::$schemaManager, '/webservice/ManageConsents/ApprovalsRegister/Record', 'post', 200);\n\t\t\\ApprovalsRegister_Module_Model::reloadApprovals(self::$recordId);\n\t}", "public function registerAction() {\n $request = $this->getRequest();\n $plan = $request->get('plan', '25139');\n $entity = new CoolwayFestivales\\SafetyBundle\\Entity\\User();\n $form = $this->createForm(new CoolwayFestivales\\SafetyBundle\\Form\\UserType(), $entity);\n\n return $this->render('AppBundle:Backend:register.html.twig', array(\n 'form' => $form->createView(),\n 'error' => false,\n 'plan' => $plan\n ));\n }", "public function testRegisterRecruiterForm()\n {\n $client = static::createClient();\n\n //Crawler object which can be used to select elements in the response,\n //click on links and submit forms.\n $crawler = $client->request('GET', '/recruiter/register');\n\n //Select the button with ID name\n $buttonCrawlerNode = $crawler->selectButton('submit');\n \n //Get form for override some form values and submit the corresponding form\n $form = $buttonCrawlerNode->form();\n $form = $buttonCrawlerNode->form([\n 'recruiter[firstName]' => 'Azerty',\n 'recruiter[lastName]' => 'Uiopqsd',\n 'recruiter[email]' => '[email protected]',\n 'recruiter[birthDay][year]' => 1984,\n 'recruiter[birthDay][month]'=> 2,\n 'recruiter[birthDay][day]'=> 1,\n 'recruiter[password][first]' => 'Azerty123',\n 'recruiter[password][second]' => 'Azerty123',\n 'recruiter[business]' => '01234567891011',\n 'recruiter[legalConditions]' => 1,\n ]);\n \n $client->submit($form);\n $this->assertResponseIsSuccessful();\n }", "public function test_student_can_be_created_with_new_guardian_info()\n {\n $user = User::factory()->create();\n $classroom = $this->generateTestClassroom();\n $studentInfo = $this->studentInfo($classroom);\n $guardianInfo = [\n 'guardian_title' => $this->faker->title,\n 'guardian_first_name' => $this->faker->firstName,\n 'guardian_last_name' => $this->faker->lastName,\n 'guardian_email' => $this->faker->email,\n 'guardian_phone' => $this->faker->e164PhoneNumber,\n 'guardian_occupation' => $this->faker->jobTitle,\n 'guardian_address' => $this->faker->address\n ];\n $studentInfo = array_merge($studentInfo, $guardianInfo);\n $response = $this->actingAs($user)->post('/store/student', $studentInfo);\n\n $response->assertStatus(302)->assertSessionHas('success')->assertSessionHasNoErrors();\n }", "public function registerAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERREGISTER);\n \t$form = new User_Form_Register();\n $data = $this->_request->getPost();\n if(!$data){\n // Display empty form\n $this->view->registerForm = $form;\n return;\n }\n\n if (!$form->isValid($data) || $this->_request->getParam('emailFailure')) {\n // Display form with errors\n $this->view->registerForm = $form;\n $this->view->emailFailure = $this->_request->getParam('emailFailure', null);\n return;\n }\n\n // Parameters for email and user creation\n $params = array(\n User::COLUMN_USERNAME => $form->getValue(User::INPUT_USERNAME),\n User::COLUMN_PASSWORD => $form->getValue(User::INPUT_PASSWORD),\n User::COLUMN_EMAIL => $form->getValue(User::INPUT_EMAIL),\n //User::COLUMN_OPENID_IDENTITY => $form->getValue(User::INPUT_OPENID_IDENTITY),\n User::INPUT_AUTH_METHOD => $form->getValue(User::INPUT_AUTH_METHOD),\n );\n\n try{\n // Create user in database\n $user = $this->_createNewUser($params);\n $userId = $user->{User::COLUMN_USERID};\n\n $params['activationKey'] = $user->activationKey;\n $params['link'] = APP_URL.Globals::getRouter()->assemble(array(),'userconfirmation');\n $params['link'] .= '?'.User::COLUMN_USERID.\"=$userId&\".self::ACTIVATION_KEY_PARAMNAME.\"={$user->activationKey}\";\n $params['site'] = APP_NAME;\n } catch (Exception $e){\n \t$msg = \"Error while creating user and/or blog. \".$e->getMessage();\n Globals::getLogger()->registrationError($msg);\n \t$userId = null;\n }\n\n if($userId === null){\n // Redirect to error page in case of user creation failure\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::CREATION_FAILURE));\n }\n\n try{\n // Send Email\n $emailStatus = $this->_helper->emailer()->sendEmail($params[User::COLUMN_EMAIL], $params);\n } catch (Exception $e) {\n $emailStatus = false;\n $msg = \"Email error 2 \".$e->getMessage();\n Globals::getLogger()->registrationError($msg);\n }\n\n if(!$emailStatus){\n // If there was en error sending the email, delete user row, and forward to current page\n $this->_cleanupUser($userId);\n $this->_forward('register', null, null, array('emailFailure'=>1));\n return;\n }\n\n // Success !\n $this->_savePendingUserIdentity($userId);\n $this->_helper->redirectToRoute('userpending');\n }", "public function created(Instructor $instructor)\n {\n if (count(request()->all()))\n {\n $role = Role::firstOrCreate(['name' => 'instructor'], ['name' => 'instructor']);\n $data = array_merge(\n request()->all(),\n [\n // 'status' => 'active'\n ]);\n $instructor->details()->create($data);\n $instructor->details->assignRole($role);\n \n event(new NewUserRegistered($instructor->details));\n }\n }", "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function created(OnlineInviteRegister $onlineInviteRegister)\n {\n $courseName = OnlineCourse::find($onlineInviteRegister->course_id)->name;\n $student = ProfileView::find($onlineInviteRegister->user_id)->full_name;\n $action = 'Thêm mời ghi danh '.$student.' (khóa học online)';\n parent::saveHistory($onlineInviteRegister,'Insert',$action,$courseName, $onlineInviteRegister->course_id,app(OnlineCourse::class)->getTable());\n }", "public function store(ANimal_RegistrationRequest $request)\n {\n Animal_Registration::create($request->all());\n return redirect('animal_registration');\n }", "public function user_signup_new(Request $request)\n {\n $request->validate([\n 'first_name' => 'required',\n 'email' => 'required|string|unique:users',\n 'other_mobile_number' => 'required|integer|unique:users',\n 'selectType' => 'required',\n 'agree_check' => 'required|boolean',\n 'password' => 'required|string|confirmed'\n ]);\n\n $token = getenv(\"TWILIO_AUTH_TOKEN\");\n $twilio_sid = getenv(\"TWILIO_SID\");\n $twilio_verify_sid = getenv(\"TWILIO_VERIFY_SID\");\n $twilio = new Client($twilio_sid, $token);\n $twilio->verify->v2->services($twilio_verify_sid)\n ->verifications\n ->create(\"+91\".$request->other_mobile_number, \"sms\");\n\n $user = new User([\n 'name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'email' => $request->email,\n 'usertype' => 3,\n 'userSelect_type' => $request->selectType,\n 'other_mobile_number' => $request->other_mobile_number,\n 'password' => bcrypt($request->password)\n ]);\n\n $user->save();\n eventtracker::create(['symbol_code' => '1', 'event' => $request->email.' created a new account as a User']);\n\n return response()->json([\n 'data' => $user,\n 'message' => 'Successfully created user!'\n ], 201);\n }", "function register_user($username,$email,$institution){\n\t}", "public function create()\n {\n \n $users = User::with(['role' => function($q){\n $q->where('name', 'Doctor');\n }])->get();\n \n $doctors = User::has('role', 1)\n ->orderBy('name', 'desc')->get();\n $proficiencies = Proficiency::all();\n \n return view ('help.appointment.register', compact('users', 'proficiencies'));\n }", "public function testUserRegister()\n {\n $response = $this->get('/register')\n ->assertStatus(200)\n ->assertSee('Register');\n }", "public function create()\n\t{\n\t\t//\n\t\treturn view('registrations.create');\n\t}", "public function register() {\n \n $this->form_validation->set_rules('email', 'Email', 'required|valid_email');\n $this->form_validation->set_rules('password', 'Passwort', 'required');\n $this->form_validation->set_rules('dataprotection', 'Datenschutz', 'required');\n \n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n if (strtolower($this->input->post('dataprotection')) == 'true') {\n \t// TODO: save acceptance or acceptance date to db, i.e. hand over to model\n } else {\n \t$this->error(404, 'Dataprotection error');\n } \n \n $this->user_model->setValue('email', $this->input->post('email'));\n $this->user_model->setValue(\n \t'hashed_password', \n \tpassword_hash($this->input->post('password'), PASSWORD_DEFAULT));\n\n if (! $this->user_model->newUser()) {\n\t\t\t$this->error(409, 'Duplicate');\n }\n\n\t\t$this->sendConfirmationMail($this->input->post('email'));\n\t\t$data['msg'] = $this->input->post('email') . ' registered.';\n\t\t$this->responseWithCode(201, $data);\n }", "public function testRegisterUser()\n {\n\n $data = factory(User::class)->raw([\n 'password' => $this->faker->password,\n ]);\n\n $response = $this->postJson(\"$this->baseurl/signup\", $data);\n $response->assertStatus(201);\n $response->assertJsonStructure([\n \"data\" => [\n \"token\",\n \"user\",\n ],\n \"status\",\n \"message\",\n ]);\n }", "public function create()\n {\n $page_title = trans(\"auth/front_register.registro\");\n\n //return view('modules.auth.front_register', compact('page_title'));\n $user = new User;\n $user_profiles = new UserProfile();\n $user->setRelation('user_profile', $user_profiles);\n\n $form_data = array(\n 'route' => array('register'),\n 'method' => 'POST',\n 'id' => 'formData',\n 'class' => 'form-horizontal'\n );\n\n return view(\n \"modules.auth.front_register\",\n compact(\n 'page_title',\n 'user',\n 'form_data'\n )\n );\n }" ]
[ "0.68164665", "0.68048227", "0.65093935", "0.64443994", "0.6280504", "0.6259114", "0.6228451", "0.6091112", "0.59748995", "0.5923236", "0.58715576", "0.58711356", "0.586229", "0.58319163", "0.58306944", "0.5823281", "0.58220184", "0.5764362", "0.57226545", "0.57079804", "0.5649337", "0.56471825", "0.56303316", "0.5623243", "0.5598284", "0.5591086", "0.556163", "0.5561521", "0.55391264", "0.55347073", "0.5533882", "0.5489937", "0.548095", "0.5475963", "0.5475505", "0.5455002", "0.54531264", "0.54417133", "0.5439179", "0.54380816", "0.5431076", "0.5428557", "0.54131967", "0.5407142", "0.54041445", "0.5400745", "0.5399896", "0.5396645", "0.5385921", "0.53786725", "0.5361904", "0.53609556", "0.5355183", "0.5351725", "0.5328373", "0.53257513", "0.532461", "0.5323038", "0.532025", "0.5315761", "0.5313063", "0.5310774", "0.52998894", "0.52850556", "0.52826333", "0.52776265", "0.5276918", "0.52718264", "0.5253122", "0.52495337", "0.5247805", "0.5246395", "0.52447927", "0.52445954", "0.52416277", "0.52322316", "0.5231971", "0.5230624", "0.5230088", "0.5228983", "0.52282226", "0.5222519", "0.5218932", "0.5213669", "0.5212273", "0.52088714", "0.52085537", "0.5206853", "0.52047396", "0.51909983", "0.5186229", "0.51853544", "0.5184374", "0.518177", "0.5180256", "0.5180209", "0.5177981", "0.51731986", "0.5171937", "0.51718414" ]
0.7710731
0
Test case for webinarRegistrantGet Get a Webinar Registrant.
public function testWebinarRegistrantGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function getRegistrant()\n {\n return $this->registrant;\n }", "public function getRegistrant();", "public function getRegistrant() {\n\t\treturn self::$_registrant;\n\t}", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function registration_get(){\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function getRegistrants()\n {\n if (array_key_exists(\"registrants\", $this->_propDict)) {\n return $this->_propDict[\"registrants\"];\n } else {\n return null;\n }\n }", "public function setRegistrant($registrant = null)\n {\n $this->registrant = $registrant;\n\n return $this;\n }", "public function getAllowedRegistrant()\n {\n if (array_key_exists(\"allowedRegistrant\", $this->_propDict)) {\n if (is_a($this->_propDict[\"allowedRegistrant\"], \"\\Beta\\Microsoft\\Graph\\Model\\MeetingAudience\") || is_null($this->_propDict[\"allowedRegistrant\"])) {\n return $this->_propDict[\"allowedRegistrant\"];\n } else {\n $this->_propDict[\"allowedRegistrant\"] = new MeetingAudience($this->_propDict[\"allowedRegistrant\"]);\n return $this->_propDict[\"allowedRegistrant\"];\n }\n }\n return null;\n }", "function _getRegistration($id){\n\t\tglobal $wpdb;\n\t\t$result=$wpdb->get_row(\"SELECT * FROM {$wpdb->prefix}events_attendee WHERE registration_id='$id'\",ARRAY_A);\n\t\tif(empty($result)){\n\t\t\tthrow new EspressoAPI_ObjectDoesNotExist($id);\n\t\t}\n\t\treturn array(\"registration\"=>$result);\n\t}", "public function getRegistration()\n {\n return $this->_registration;\n }", "public function getRegistratienummer()\n {\n return $this->registratienummer;\n }", "function citrixonline_get_webinar($webinarKey) \n {\n\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\treturn 0;\n\t\t\t\n\t\t$return_array = array();\n\n\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/\".$webinarKey.\"?oauth_token=\".$this->access_token), true);\n\t\t\n\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t{\n\t\t\t$this->set_access_token('');\n\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t}\n\t\t\n\t\treturn $reponse;\n\t}", "public function setRegistrant($value) {\n\t\tself::$_registrant = $value;\n\t}", "public function testGetInstitutionUsingGET()\n {\n }", "public function registrationAction()\n {\n $eventId = $this->params('eventId');\n $registrations = $this->regTable->findRegByEventId($eventId);\n //*** DATABASE TABLE MODULE RELATIONSHIPS LAB: provide secondary data usersModelTableGateway which performs lookups for attendees for each registration\n $data = [];\n if ($registrations) {\n foreach ($registrations as $item) {\n $secondaryDataTable = '???';\n $data[] = [\n $item->registration_time,\n $item->first_name,\n $item->last_name,\n $secondaryDataTable];\n }\n }\n return new JsonModel(['data' => $data]);\n }", "public function onRegistrantCreated(MeetingRegistrantCreated $event) {\n\n $meetingId = (string)$event->getObject()['id'];\n\n $meeting = Meeting::whereZoomId($meetingId)->first();\n\n if(!empty($meeting)){\n\n $this->logEvent($event);\n try{\n $zoomRegistrant = new Registrant();\n $zoomRegistrant->create($event->getObject()['registrant']);\n\n $registrantModel = null;\n\n switch ($meeting->getSetting(ZoomMeeting::SETTINGS_KEY_REGISTRATION_TYPE)){\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_ALL_OCCURRENCES:\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_MANY_OCCURRENCES:\n $occurrences = isset($event->getObject()['occurrences']) ? $event->getObject()['occurrences'] : $meeting->occurrences;\n foreach($occurrences as $occurrence){\n $occurrenceId = is_array($occurrence) ? $occurrence['occurrence_id'] : $occurrence->occurrence_id;\n $this->saveRegistrant($zoomRegistrant, $meetingId, $occurrenceId);\n }\n break;\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_ONE_OCCURRENCES:\n $this->saveRegistrant($zoomRegistrant, $meetingId, $event->getObject()['occurrences'][0]['occurrence_id']);\n break;\n }\n\n $registrantModel = $this->getRegistrantFromEvent($event);\n\n event(new SendRegistrantConfirm($registrantModel));\n\n event(new SendNewRegistrant($registrantModel));\n\n $this->logFinishEvent();\n }catch (\\Exception $exception){\n $this->logFailedEvent($exception);\n }\n }else{\n $this->logNotFoundEvent();\n }\n\n }", "protected function createRegistrant() {\n $registrant = $this->registrantFactory->createRegistrant([\n 'event' => $this->registration->getEvent(),\n ]);\n $registrant->setRegistration($this->registration);\n\n return $registrant;\n }", "public function getRegisterAgent()\n {\n return $this->register_agent;\n }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = '[email protected]';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "public function test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function getRegistrantWrapperId() {\n $uuid = $this->registrant->uuid->first()->getValue();\n return $uuid['value'];\n }", "public function testGetInstitutionsUsingGET()\n {\n }", "function getRegistrationID()\n { \n return $this->getValueByFieldName('registration_id');\n }", "public function testApiRegistrationSimple()\n {\n $eventsFaker = Event::fake();\n $emailVerificationSend = Notification::fake();\n $uniqueData = $this->getTestRegisterData();\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $uniqueData);\n\n $response->assertStatus(200)->assertJsonMissingValidationErrors();\n\n $responseArray = $response->decodeResponseJson()->json();\n $this->assertArrayNotHasKey('token_type', $responseArray);\n $this->assertArrayNotHasKey('expires_in', $responseArray);\n $this->assertArrayNotHasKey('access_token', $responseArray);\n $this->assertArrayNotHasKey('refresh_token', $responseArray);\n\n $user = CoreUser::byEmail($uniqueData[ 'email' ])->firstOrFail();\n $this->withoutExceptionHandling();\n\n if ( config('kit-auth.should_dispatch_registered_event') ) {\n $eventsFaker->assertDispatched(Registered::class,\n function (Registered $event) use ($emailVerificationSend) {\n app(ProcessEmailVerification::class)->handle($event);\n\n $emailVerificationSend->assertSentTo($event->user, VerifyEmail::class,\n function (VerifyEmail $notice) {\n $this->assertEquals($notice->requestSide, CoreUserContract::FRONTEND_REQUEST_SIDE);\n return $notice->tokens[ 'web' ] && $notice->tokens[ 'mobile' ];\n });\n\n return true;\n });\n } else {\n $eventsFaker->assertNotDispatched(Registered::class);\n }\n }", "public function verifyUserRegistration($request)\n {\n return $this->startAnonymous()->uri(\"/api/user/verify-registration\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function getRegister()\n {\n return $this->showRegistrationForm();\n }", "public function getRegister()\n {\n return $this->showRegistrationForm();\n }", "function getWebinar($webinarKey)\n {\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function getEnableRegistration();", "public function testMemberRegistrationForm()\n {\n $response = $this\n ->get('/register-member')\n ->assertStatus(200);\n }", "public function hrregistration(){\n\n \t $rands = str_random(10);\n \t $rand = json_encode($rands);\n return response()->json($rand,200);\n }", "public function getJWT();", "public function getRegistration()\n {\n //output\n return view('auth.registration');\n }", "public function setRegistrants($val)\n {\n $this->_propDict[\"registrants\"] = $val;\n return $this;\n }", "public function testWebinar()\n {\n }", "public function testCanDisplayTheAssessorRegistrationForm()\n {\n $response = $this->get('/assessors/register');\n\n $response->assertStatus(200);\n\n $response->assertViewIs('auth.register');\n }", "public function testWebinarCreate()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testAuthenticationsEmailIdGet()\n {\n }", "public function register($name = null, $registrant = null) {\n return parent::register($name, $registrant);\n }", "public function getLoginAfterRegistration();", "public function setAllowedRegistrant($val)\n {\n $this->_propDict[\"allowedRegistrant\"] = $val;\n return $this;\n }", "public function sellerCanRegister()\n {\n $input = [\n 'username' => 'iniusername' . Str::random(3),\n 'fullname' => 'ini nama ' . Str::random(4),\n 'email' => 'ini_email' . Str::random(4) . '@gmail.com',\n 'password' => 'P@sswr0d!',\n 'sex' => 0\n ];\n $response = $this->post('/api/seller/register', $input);\n $response->assertStatus(200);\n }", "public function adminRegistrer()\n {\n return $this->belongTo(AdminRegistrationController::class);\n }", "public function testAuthenticationsInweboIdGet()\n {\n }", "public function getRegistration_no()\n {\n return $this->registration_no;\n }", "public function testWebinarPollGet()\n {\n }", "public function startWebAuthnRegistration($request)\n {\n return $this->start()->uri(\"/api/webauthn/register/start\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function getGebruiker()\n {\n return KVDutil_Auth_Gebruiker::newNull();\n }", "public function completeWebAuthnRegistration($request)\n {\n return $this->start()->uri(\"/api/webauthn/register/complete\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function testVerifyAllowedEmailAddressGet()\n {\n }", "function ciniki_patents_patentGet($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'patent_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Patent'),\n 'images'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Images'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'patents', 'private', 'checkAccess');\n $rc = ciniki_patents_checkAccess($ciniki, $args['tnid'], 'ciniki.patents.patentGet');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Load tenant settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'intlSettings');\n $rc = ciniki_tenants_intlSettings($ciniki, $args['tnid']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $intl_timezone = $rc['settings']['intl-default-timezone'];\n $intl_currency_fmt = numfmt_create($rc['settings']['intl-default-locale'], NumberFormatter::CURRENCY);\n $intl_currency = $rc['settings']['intl-default-currency'];\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'datetimeFormat');\n $datetime_format = ciniki_users_datetimeFormat($ciniki, 'php');\n\n //\n // Return default for new Patent\n //\n if( $args['patent_id'] == 0 ) {\n $patent = array('id'=>0,\n 'name'=>'',\n 'permalink'=>'',\n 'status'=>'10',\n 'flags'=>'1',\n 'order'=>'1',\n 'primary_image_id'=>'0',\n 'primary_image_caption'=>'',\n 'synopsis'=>'',\n 'description'=>'',\n );\n if( ciniki_core_checkModuleFlags($ciniki, 'ciniki.patents', 0x01) ) {\n $strsql = \"SELECT MAX(sequence) AS seq FROM ciniki_patents WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.patents', 'max');\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n if( isset($rc['max']['seq']) && $rc['max']['seq'] > 0 ) {\n $patent['order'] = $rc['max']['seq'] + 1;\n }\n }\n }\n\n //\n // Get the details for an existing Patent\n //\n else {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'patents', 'private', 'patentLoad');\n $rc = ciniki_patents_patentLoad($ciniki, $args['tnid'], $args);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $patent = $rc['patent'];\n }\n\n return array('stat'=>'ok', 'patent'=>$patent);\n}", "public function getCareer();", "public function getRegistrationNumber(): ?string;", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function testLoginRegister(){\n $user = User::find(1);\n $this->be($user);\n\n $response =$this->get(route('administracion'));\n $response->assertStatus(200);\n }", "public function testAllowedEmailAddressGet()\n {\n }", "public function test_create_request_registered_user() {\n\t\twp_delete_post( self::$request_id, true );\n\n\t\t$test_data = array(\n\t\t\t'test-data' => 'test value here',\n\t\t\t'test index' => 'more privacy data',\n\t\t);\n\n\t\t$actual = wp_create_user_request( self::$registered_user_email, 'export_personal_data', $test_data );\n\n\t\t$this->assertNotWPError( $actual );\n\n\t\t$post = get_post( $actual );\n\n\t\t$this->assertSame( self::$user_id, (int) $post->post_author );\n\t\t$this->assertSame( 'export_personal_data', $post->post_name );\n\t\t$this->assertSame( self::$registered_user_email, $post->post_title );\n\t\t$this->assertSame( 'request-pending', $post->post_status );\n\t\t$this->assertSame( 'user_request', $post->post_type );\n\t\t$this->assertSame( wp_json_encode( $test_data ), $post->post_content );\n\t}", "public function actionRegistration() {\n\n $first_name = Yii::$app->request->post('first_name');\n $last_name = Yii::$app->request->post('last_name');\n $code = Yii::$app->request->post('code');\n $sample_code = Yii::$app->request->post('sample_code');\n $collector_code = Yii::$app->request->post('collector_code');\n $user = new User();\n $result = $user->registration($first_name,$last_name,$code,$sample_code, $collector_code);\n if(array_key_exists('error',$result))\n throw new \\yii\\web\\HttpException(400, 'Error occurred:'. json_encode($result['error']));\n return $result;\n }", "public function testUserRegister()\n {\n $response = $this->get('/register')\n ->assertStatus(200)\n ->assertSee('Register');\n }", "public function testSpecificAllowedEmailAddressGet()\n {\n }", "public function testWebinarAbsentees()\n {\n }", "function get_visitor() {\n \n // Return currently logged in user\n return $this->visitor;\n \n }", "function getAuthenticatedParticipant();", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function testGetSiteMembershipRequestForPerson()\n {\n }", "public function getRegistration()\n {\n return view('social.register');\n }", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "function private_home(){\r\n return sreg_basic(array(\r\n 'role' => 'subscriber',\r\n 'from' => get_bloginfo('admin_email'),\r\n 'message' => 'Thank you for registering',\r\n 'notify' => get_bloginfo('admin_email'),\r\n 'fb' => false,\r\n ));\r\n}", "public function test_admin_member_internship()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/DscMember', 'apprenticeship']);\n $this->assertResponseCode(404);\n }", "public function getRegistration(string $registrationId, bool $spd = true): object\n {\n $request = $this->apiClient(false)\n ->get(\"/v1/registrations/{$registrationId}\", ['statusSPD' => $spd ? 'true' : 'false']);\n\n if ($request->failed()) {\n throw new GetCompanyRegistrationException();\n }\n\n return $request->object()->result;\n }", "public static function isRegistrant($av_id=Null,$e_id=Null){\n static $visits = array();\n if (empty($av_id)) $av_id = bAuth::$av->ID;\n if (!empty($av_id)){\n if (@$visits[$av_id] === Null){\n\tlocateAndInclude('bForm_vm_Visit');\n\t$visits[$av_id] = bForm_vm_Visit::getVisits($av_id,array(VISIT_TYPE_PROGRAM));\n }\n if ($e_id === Null) $reply = !empty($visits[$av_id]);\n else $reply = in_array($e_id,$visits[$av_id]);\n }\n return @$reply;\n }", "public function testRegister()\n {\n $crawler = $this->client->request('GET', '/cliente/');\n $crawler = $this->client->followRedirect();\n\n $this->assertTrue($this->client->getContainer()->get('security.context')->isGranted('IS_AUTHENTICATED_ANONYMOUSLY'));\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode());\n $this->assertGreaterThan(0, $crawler->filter('html:contains(\"Acesse sua conta\")')->count());\n \n // validate form\n $form = $crawler->selectButton('Cadastrar')->form(array(\n 'marcoshoya_marquejogobundle_customer[username]' => '',\n ));\n \n $crawler = $this->client->submit($form);\n $this->assertGreaterThan(0, $crawler->filter('span:contains(\"Campo obrigatório\")')->count());\n \n $form = $crawler->selectButton('Cadastrar')->form(array(\n 'marcoshoya_marquejogobundle_customer[username]' => '[email protected]',\n ));\n \n $this->client->submit($form);\n $crawler = $this->client->followRedirect();\n\n // Check data in the show view\n $this->assertGreaterThan(0, $crawler->filter('html:contains(\"Novo cadastro\")')->count());\n }", "public static function claimPropertyAction() {\n $token = self::getPropertyClaimToken();\n if(empty($token)){\n $referer = wp_get_referer();\n if (empty($referer)) {\n $referer = 'index.php';\n }\n $query = parse_url($referer, PHP_URL_QUERY);\n // Returns a string if the URL has parameters or NULL if not\n if (!empty($query)) {\n $referer .= '&claim_property_error=1';\n } else {\n $referer .= '?claim_property_error=1';\n }\n wp_redirect($referer);\n return;\n }\n // If the token is received though, redirect to signup with the intent to claim-property\n wp_redirect('https://getadmiral.com/a/signup?i=claim-property&t=' . $token . '&d=' . get_site_url() . '&p=' . self::getPropertyID() . '&aid=' . self::$clientID);\n }", "public function getRegister()\n {\n return view(\"Home::auth.register\");\n }", "public function getRegister()\n {\n // if($this->auth->check())\n // \treturn redirect()->route('home');\n\n return view('auth.register');\n }", "public function testGetAccountScheduledPaymentsUsingGET()\n {\n }", "public function canGetRecurringProfileDetails()\r\n {\r\n return true;\r\n }", "public function testShouldFailIFARegistrationIsCreatedWithoutRegistrant() {\n $this->expectException(\\PDOException::class);\n\n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = '[email protected]';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n }", "public function getRegister()\n {\n $user = null;\n\t\t\n\t\tif(Auth::check())\n\t\t{\n\t\t\t$user = Auth::user();\n\t\t\treturn redirect()->intended('/');\n\t\t}\n\t\t\n \treturn view('register',compact(['user']));\n }", "public function getRegistrationCountry(): ?string;", "protected function registered(Request $request)\n {\n $user = $request->user();\n $twoStepVerification = new TwoStepVerificationController();\n $twoStepVerification->setUserRegisteredPhoneSmsCode($user);\n $twoStepVerification->setUserRegisteredEmailCode($user);\n $tokenResult = $user->createToken('Personal Access Web Token');\n return response()->json([\n 'user' => $request->user(),\n 'token' => [\n 'access_token' => $tokenResult->accessToken,\n 'token_type' => 'Bearer',\n 'expires_at' => Carbon::parse(\n $tokenResult->token->expires_at\n )->toDateTimeString()\n ]\n ]);\n return response()->json(['message' => 'Telefonunuza gönderilen doğrulama kodunu giriniz.'],\n 200);\n }", "public function getLaatsteRegistratie(): ?Registratie\n {\n $registraties = $this->getRecenteRegistraties(1);\n\n return (is_array($registraties) || $registraties instanceof \\Countable ? count($registraties) : 0) > 0 ? $registraties[0] : null;\n }", "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 testGet()\n {\n $response = $this->get('/api/merchants');\n\n $response->assertSuccessful();\n }", "public function testProjectProjectIDInviteeInviteIDGet()\n {\n }", "public function getProvisioning();", "public function testRegistration(): void { }", "public function getSubscriber()\n {\n return UserPeer::retrieveByPk($this->getSubscriberId());\n }", "public function retrieveRegistrationReport($applicationId, $start, $end)\n {\n return $this->start()->uri(\"/api/report/registration\")\n ->urlParameter(\"applicationId\", $applicationId)\n ->urlParameter(\"start\", $start)\n ->urlParameter(\"end\", $end)\n ->get()\n ->go();\n }", "public function testListTenant()\n {\n $this->json('GET', 'reseller/'.$this->reseller->id.'/tenants')\n ->assertStatus(200);\n }", "public function testCreateSiteMembershipRequestForPerson()\n {\n }", "function getInstitutionValidate(){\n\t\tif($this->country == \"\"){\n\t\t\t$respArray = $this->makeResponse(\"ERROR\",\" ALL FIELDS ARE REQUIRED! \",\"\");\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\t\t\n\t\t}else{\n\t\t\t$this->basics->getInstitution($this->country);\n\t\t}\n\t}", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function testProjectProjectIDInviteGet()\n {\n }" ]
[ "0.68977153", "0.6843426", "0.6761253", "0.6463811", "0.64311665", "0.6392972", "0.63280797", "0.62443304", "0.60247093", "0.5908627", "0.57308906", "0.55995554", "0.5596293", "0.558569", "0.5451014", "0.54231215", "0.53971064", "0.53788775", "0.53557867", "0.5348735", "0.53368413", "0.5330909", "0.53276604", "0.5318221", "0.52824605", "0.51856107", "0.5129945", "0.5092938", "0.5041742", "0.5028168", "0.5024767", "0.5024767", "0.49968758", "0.49631178", "0.49530962", "0.49238908", "0.4918771", "0.4873702", "0.48610023", "0.4858971", "0.48546076", "0.4847189", "0.48202026", "0.48191574", "0.4812651", "0.48051894", "0.48031396", "0.48029867", "0.48013788", "0.47945407", "0.476892", "0.47611892", "0.47557607", "0.47465572", "0.4744968", "0.47441864", "0.47393614", "0.47271743", "0.47234797", "0.47193864", "0.47122717", "0.4698605", "0.46849194", "0.46698382", "0.46676663", "0.46643558", "0.46601132", "0.4659488", "0.46526095", "0.4651331", "0.4647481", "0.46445957", "0.46400288", "0.46388814", "0.4628644", "0.46273428", "0.4626556", "0.46175846", "0.46150696", "0.45973608", "0.45947787", "0.45938602", "0.4592793", "0.45922196", "0.45919076", "0.45912242", "0.4589872", "0.45818868", "0.45707592", "0.45694438", "0.45678896", "0.45638397", "0.45637056", "0.45585468", "0.45574632", "0.45564032", "0.45546556", "0.4554529", "0.45502523", "0.45408598" ]
0.7519076
0
Test case for webinarRegistrantQuestionUpdate Update Registration Questions.
public function testWebinarRegistrantQuestionUpdate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateSurveyQuestion0()\n {\n }", "public function testUpdateSurveyQuestion0()\n {\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testUpdateVendorComplianceSurvey()\n {\n }", "public function testUpdateSurveyQuestionChoice0()\n {\n }", "public function testUpdateSurveyQuestionChoice0()\n {\n }", "public function testWebinarUpdate()\n {\n }", "public function test_changing_question() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = mktime(9, 0, 0, 11, 7, 2013);\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $time, $time, 2, 'dummy text')\n )\n )));\n\n $question = array(\n 'text' => 'I have updated my question.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertGreaterThan($time, $DB->get_field('videoquanda_questions', 'timemodified', array('id' => 1)));\n }", "private function sync_asked_questions_for_validation($questions): void {\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\n\t\t$user->registration_questions()->sync($questions->pluck('id')->toArray());\n\t}", "public function testUpdateSurvey()\n {\n $survey = Survey::factory()->create();\n\n $response = $this->json('PATCH', \"survey/{$survey->id}\", [\n 'survey' => ['epilogue' => 'epilogue your behind']\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', ['id' => $survey->id, 'epilogue' => 'epilogue your behind']);\n }", "public function testSuccessfulInstructorUpdate() {\n try {\n $updatedInstructor = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->assertNotNull($updatedInstructor, \"The updated instructor is null\");\n $this->assertEquals($this->userTypeEnum->INSTRUCTOR, $updatedInstructor->getType(), \"The updated user is not\n an instance of INSTRUCTOR\");\n\n $InstructorInstitution = PersistentUserXInstitutionPeer::retrieveByPk($updatedInstructor->getUserId(),\n $this->institution->getInstitutionId());\n $this->assertNotNull($InstructorInstitution, \"The user x institution relation was not created for the instructor.\");\n $this->assertEquals(self::IDENTIFICATION, $InstructorInstitution->getIdentification(), \"The Instructor school\n identification is incorrect\");\n $this->assertEquals($updatedInstructor->getUserId(), $InstructorInstitution->getUserId(), \"The user id is\n incorrect on user x institution for the instructor\");\n $this->assertEquals($this->institution->getInstitutionId(), $InstructorInstitution->getInstitutionId(),\n \"The institution id is incorrect on user x institution for the instructor\");\n\n $instXProjec = PersistentUserXProjectPeer::retrieveByPK($updatedInstructor->getJnUsername(),\n $this->project->getProjectJnName());\n $this->assertNotNull($instXProjec, \"The relationship between instructor and project was not created\");\n $this->assertEquals($this->project->getProjectJnName(), $instXProjec->getProjectJnName(), \"The project name\n is incorrect on user x project\");\n $this->assertEquals($updatedInstructor->getJnUsername(), $instXProjec->getJnUsername(), \"The java.net\n username is incorrect on user x project for instructor\");\n $this->assertTrue($instXProjec->getIsOwner() == 1, \"The instructor is the owner of project.\");\n\n } catch (InfinityMetricsException $ime){\n $this->fail(\"The successful update of profile failed: \" . $ime);\n }\n\n }", "public function testUpdateSurvey0()\n {\n }", "public function testUpdateSurvey0()\n {\n }", "public function submit_registration_2(RegistrationQuizSubmissionRequest $request) {\n\t\t$questionIds = $request->questionIds;\n\t\t$answerIds = $request->answerIds;\n\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\n\t\t$user->age = $request->input('age');\n\t\t$user->gender = $request->input('gender');\n\t\t$user->save();\n\n\t\t$savedQuestions = $user->registration_questions()->orderBy('id')->get();\n\n\t\t$this->validateGeneratedQuestions($savedQuestions, $questionIds, $answerIds);\n\n\t\t$randomAlphaNumericString = randomAlphaNumericString(10);\n\t\t$user->registration_participation()->create([\n\t\t\t'token' => $randomAlphaNumericString,\n\t\t\t'selected' => 0,\n\t\t]);\n\n\t\t$this->deleteGeneratedQuestions($user);\n\n\t\treturn response()->json([\n\t\t\t'status' => true,\n\t\t\t'code' => 200,\n\t\t\t'message' => 'Success.',\n\t\t\t'registration_count' => $user->registration_participation()->count(),\n\t\t\t'registration_token' => $randomAlphaNumericString,\n\t\t]);\n\n\t}", "public function testUpdateVendorComplianceSurveyCustomFields()\n {\n }", "public function testPostUpdate()\n {\n $this->getEmailWithLocal('uk');\n /** check email with ticket pdf file */\n $this->findEmailWithText('ticket-php-day-2017.pdf');\n /** check email with string */\n $this->findEmailWithText('Шановний учасник, в вкладенні Ваш вхідний квиток. Покажіть його з екрану телефону або роздрукуйте на папері.');\n }", "public function testWebinarPollUpdate()\n {\n }", "public function updateclaimquestion(){\n try{\n\t if(isset($this->getData['operators'])){\n\t $opertaors = commonfunction::implod_array($this->getData['operators']);\n\t $update = $this->UpdateInToTable(CLAIM_QUESTIONS, array(array('operators'=>$opertaors, 'question'=>$this->getData['claimquename'], 'status'=>$this->getData['claim_status'])), \"question_id='\".$this->getData['question_id'].\"'\");\n\t }\n\t else{\n\t $update = $this->UpdateInToTable(CLAIM_QUESTIONS, array(array('question'=>$this->getData['claimquename'], 'status'=>$this->getData['claim_status'])), \"question_id='\".$this->getData['question_id'].\"'\");\n\t }\n\t}\n\tcatch (Exception $e) {\n $this->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n } \n\t return $update;\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function updated(InterviewQuestion $interviewQuestion): void\n {\n //\n }", "public function testWebinarRegistrants()\n {\n }", "public function update_question() {\r\n $questions = stripcslashes($this->input->get('questions'));\r\n \r\n // Decode the JSON array\r\n $questions = json_decode($questions,TRUE);\r\n \r\n foreach ($questions as $question) {\r\n $data['status'] = $this->question_model->update_correct_answer($question['question_id'],$question['correct_answer']);\r\n //mysqli_next_result( $this->db->conn_id );//Free BDD\r\n }\r\n \r\n $data['status'] = $this->message->warning('U');\r\n echo json_encode($data);\r\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function update(Request $request, Question_Test $question_Test)\n {\n //\n }", "public function changeQuestionAndAnswers () {\n global $ilUser, $tpl, $ilTabs, $ilCtrl;\n $ilTabs->activateTab(\"editQuiz\");\n\n // update database\n // create wizard object\n include_once('class.ilObjMobileQuizWizard.php');\n $wiz = new ilObjMobileQuizWizard();\n $wiz->changeQuestionAndAnswers($this->object);\n\n $_GET['question_id'] = $_POST['question_id'];\n $this->initQuestionAndAnswersEditForm();\n\n // load changed data and display them\n }", "public function test_changing_question_from_other_user() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = mktime(9, 0, 0, 11, 7, 2013);\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, 99, $time, $time, 2, 'dummy text')\n )\n )));\n\n $question = array(\n 'text' => 'I have updated my question.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(405, $client->getResponse()->getStatusCode());\n $this->assertEquals($time, $DB->get_field('videoquanda_questions', 'timemodified', array('id' => 1)));\n }", "public function onQuestionRegister(QuestionEvent $event)\n {\n $questionMail = new QuestionMail($this->serviceContainer);\n\n $em = $this->serviceContainer->get('doctrine.orm.default_entity_manager');\n\n $question = $event->getQuestion();\n\n $date = time();\n\n $question->setDate($date);\n\n $em->persist($question);\n $em->flush();\n\n $questionMail->newQuestion();\n\n $questionMail->registerQuestion($question->getEmail());\n\n $this->session->getFlashBag()->add('success', 'Question sender success');\n }", "public function submit_registration(Request $request) {\n\t\t$data = $request->input('data');\n\t\t$questions = $data['qA'];\n\t\t$duration = $data['duration'];\n\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\t\t$savedQuestions = $user->registration_questions()->orderBy('id')->get();\n\n\t\tif($savedQuestions->count() == 0) {\n\t\t\treturn response()->json([\n\t\t\t\t'status' => false,\n\t\t\t\t'code' => 200,\n\t\t\t\t'message' => 'No questions generated from the server.',\n\t\t\t]);\n\t\t}\n\n\t\t// check if the question asked and sent from user's phone are in the same order\n\t\t// and answer also matches the actual answer\n\t\tforeach($questions as $key => $question) {\n\t\t\tif($question['questionId'] != $savedQuestions[ $key ]->id) {\n\t\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'Failure on question matching.']);\n\t\t\t}\n\n\t\t\t$option = Option::find($question['answerId']);\n\t\t\tif($option->is_answer() && $option->question_id == $question['questionId']) {\n\t\t\t} else {\n\t\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'Failure on option matching.']);\n\t\t\t}\n\t\t}\n\n\t\t$user->registration_participation()->create([\n\t\t\t'token' => str_random(100),\n\t\t\t'selected' => 1,\n\t\t]);\n\n\t\t$this->deleteGeneratedQuestions($user);\n\n\t\treturn response()->json(['status' => true, 'code' => 200, 'message' => 'Success.']);\n\t}", "public function updateUserQuestion()\n\t{\n\t\tif (Input::has('add_good_answer'))\n\t\t{\n\t\t\t// increase number of good answers\n\t\t\t$apiResponse = $this->apiDispatcher->callApiRoute('api_add_good_answer', [\n\t\t\t\t'auth_token' => $this->apiAuthToken,\n\t\t\t\t'id' => Input::get('user_question_id'),\n\t\t\t]);\n\t\t}\n\n\t\tif (Input::has('add_bad_answer'))\n\t\t{\n\t\t\t// increase number of bad answers\n\t\t\t$apiResponse = $this->apiDispatcher->callApiRoute('api_add_bad_answer', [\n\t\t\t\t'auth_token' => $this->apiAuthToken,\n\t\t\t\t'id' => Input::get('user_question_id'),\n\t\t\t]);\n\t\t}\n\n\t\tif (Input::has('update'))\n\t\t{\n\t\t\t// update question and/or answer\n\t\t\t$apiResponse = $this->apiDispatcher->callApiRoute('api_update_user_question', [\n\t\t\t\t'auth_token' => $this->apiAuthToken,\n\t\t\t\t'id' => Input::get('user_question_id'),\n\t\t\t\t'question' => Input::get('question'),\n\t\t\t\t'answer' => Input::get('answer')\n\t\t\t]);\n\n\t\t\t/*\n\t\t\t * Store in session for next request only\n\t\t\t * This will force learning page to display concrete user question instead of random one,\n\t\t\t * and the answer div to be displayed so user can see updated fields\n\t\t\t */\n\t\t\tSession::flash('user_question_id', Input::get('user_question_id'));\n\t\t\tSession::flash('display_answer', true);\n\t\t}\n\n\t\t/*\n\t\t * Success API response\n\t\t */\n\t\tif (isset($apiResponse) && $apiResponse->getSuccess())\n\t\t{\n\t\t\t// redirect to learning page display user question\n\t\t\treturn Redirect::route('learning_page_display_user_question');\n\t\t}\n\n\t\t// unexpected API resppnse\n\t\tthrow new Exception('Unexpected API response');\n\t}", "public function testVenueSubmitSurvey()\n {\n $this->buildVenueSurvey();\n\n $venueG = $this->venueGroup;\n $venueQ = $this->venueQuestion;\n\n $response = $this->json('POST', 'survey/submit', [\n 'slot_id' => $this->slot->id,\n 'type' => Survey::TRAINING,\n 'survey' => [\n [\n 'survey_group_id' => $venueG->id,\n 'answers' => [\n [\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]\n ]\n ],\n ]\n ]);\n\n $response->assertStatus(200);\n\n $this->assertDatabaseHas('survey_answer', [\n 'person_id' => $this->user->id,\n 'slot_id' => $this->slot->id,\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]);\n }", "public function question_and_option_update()\n\t{\t\n\t\t$CI =& get_instance();\n\t\t$CI->auth->check_operator_auth();\n\t\t$CI->load->model('operator/Questions');\t\t\n\t\t$CI->Questions->question_and_option_update();\n\t\t$this->session->set_userdata(array('message'=>display('successfully_update')));\n\t\tredirect(base_url('operator/Oquestion'));\n\t}", "public function registration_questions() {\n\t\t// return $this->get_registration_token_list();\n\t\t$category = Category::with('questions')->where('name', 'registration')->first();\n\n\t\tif($this->categoryHasLessThanFiveQuestions($category)) {\n\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'No questions for registration'], 200);\n\t\t}\n\n\t\t$questions = $category->questions->shuffle()->take(5)->sortBy('id')->values();\n\n\t\t$return_data = $this->format_according_to_multi_language($questions);\n\t\t$advertisement = Advertisement::active()->type('top')->category(3)->first();\n\t\t$return_data['advertisement'] = [\n\t\t\t'image' => $advertisement->image ?? '',\n\t\t\t'url' => $advertisement->url ?? '',\n\t\t];\n\n\t\t$this->sync_asked_questions_for_validation($questions);\n\n\t\treturn response()->json(['status' => true, 'code' => 200, 'data' => $return_data], 200);\n\t}", "public function testEmailUpdate(): void {\n\t\t$user = $this->createUser();\n\t\t$newEmail = '[email protected]';\n\t\tPassport::actingAs($user);\n\t\t$response = $this->withHeaders([\n\t\t\t'Accept' => 'application/json',\n\t\t\t'Content-Type' => 'application/json',\n\t\t])->postJson($this->route.'/email/update', [\n\t\t\t'email' => $user->email,\n\t\t\t'email_update' => $newEmail]);\n\t\t$response->assertStatus(HttpStatus::STATUS_OK);\n\t\t$response->assertJson([\n\t\t\t'message' => 'We have e-mailed you your e-mail verification link!',\n\t\t]);\n\t\t$this->assertDatabaseHas('email_verification',[\n\t\t\t'user_id' => $user->id,\n\t\t\t'email_update' => $newEmail\n\t\t]);\n\t}", "public function testPostVoteOnQuestion(): void {\n $user = factory(User::class)->create();\n $q = factory(Question::class)->create();\n $url = \"/api/questions/$q->id\";\n //up and cancel\n $this->get(url(\"$url/votes\"))\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 0]);\n $this->post(url(\"$url/upvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 1, 'up' => 1]);\n $this->post(url(\"$url/upvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 0, 'up' => 0]);\n //down and cancel\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1, 'down' => 1]);\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 0, 'down' => 0]);\n // down up down\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1, 'down' => 1]);\n $this->post(url(\"$url/upvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 1, 'up' => 1]);\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1, 'down' => 1]);\n\n $this->get(url(\"$url/votes\"))\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1]);\n }", "public function update(Request $request, Questions $questions)\n {\n //\n }", "public function updatequestionAction(){\n\n try{\n\n\t\t global $objSession;\n\n\t\t $this->view->languages = $this->ModelObj->systemlanguage();\n\n\t\t $this->view->operatortype = $this->ModelObj->operatortype(); \n\n\t\t $this->view->addedquestions = $this->ModelObj->addedquestiondata($this->Request);\n\n\t\t if($this->_request->isPost()){\n\n\t\t if(!empty($this->Request['operators']) && count($this->Request['question'])>0){\n\n\t\t\t $this->ModelObj->updatequestions($this->Request);\t\n\n\t\t\t $objSession->successMsg = \"Record Updated Successfully\";\n\n\t\t\t $this->_redirect($this->_request->getControllerName().'/helpdesksetting'); \n\n\t\t }\n\n\t\t else{\n\n\t\t\t $objSession->errorMsg = \"Please enter question and select Operator!\";\n\n\t\t }\n\n\t\t}\n\n\t }\n\n\t \n\n\t catch (Exception $e) {\n\n $this->ModelObj->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n\n }\n\n\t \n\n }", "public function optInAction()\n {\n\n $tokenYes = preg_replace('/[^a-zA-Z0-9]/', '', ($this->request->hasArgument('token_yes') ? $this->request->getArgument('token_yes') : ''));\n $tokenNo = preg_replace('/[^a-zA-Z0-9]/', '', ($this->request->hasArgument('token_no') ? $this->request->getArgument('token_no') : ''));\n $userSha1 = preg_replace('/[^a-zA-Z0-9]/', '', $this->request->getArgument('user'));\n\n /** @var \\RKW\\RkwRegistration\\Tools\\Registration $register */\n $register = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('RKW\\\\RkwRegistration\\\\Tools\\\\Registration');\n $check = $register->checkTokens($tokenYes, $tokenNo, $userSha1, $this->request, $data);\n\n // set hash value for changing subscriptions without login\n $hash = '';\n if ($check == 1) {\n\n $this->addFlashMessage(\n \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\n 'subscriptionController.message.subscriptionSaved',\n 'rkw_newsletter'\n )\n );\n\n if (\n ($data['frontendUser'])\n && ($frontendUser = $data['frontendUser'])\n && ($frontendUser instanceof \\RKW\\RkwRegistration\\Domain\\Model\\FrontendUser)\n && ($frontendUser = $this->frontendUserRepository->findByIdentifier($frontendUser->getUid()))\n ) {\n /** @var \\RKW\\RkwNewsletter\\Domain\\Model\\FrontendUser $frontendUser */\n if (!$frontendUser->getTxRkwnewsletterHash()) {\n $hash = sha1($frontendUser->getUid() . $frontendUser->getEmail() . rand());\n $frontendUser->setTxRkwnewsletterHash($hash);\n $this->frontendUserRepository->update($frontendUser);\n\n } else {\n $hash = $frontendUser->getTxRkwnewsletterHash();\n }\n }\n\n\n } elseif ($check == 2) {\n\n $this->addFlashMessage(\n \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\n 'subscriptionController.message.subscriptionCanceled',\n 'rkw_newsletter'\n )\n );\n\n if (\n ($data['frontendUser'])\n && ($frontendUser = $data['frontendUser'])\n && ($frontendUser instanceof \\RKW\\RkwRegistration\\Domain\\Model\\FrontendUser)\n && ($frontendUser = $this->frontendUserRepository->findByIdentifier($frontendUser->getUid()))\n ) {\n /** @var \\RKW\\RkwNewsletter\\Domain\\Model\\FrontendUser $frontendUser */\n $hash = $frontendUser->getTxRkwnewsletterHash();\n }\n\n } else {\n\n $this->addFlashMessage(\n \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\n 'subscriptionController.error.subscriptionError',\n 'rkw_newsletter'\n ),\n '',\n \\TYPO3\\CMS\\Core\\Messaging\\AbstractMessage::ERROR\n );\n }\n\n $this->redirect('message', null, null, array('hash' => $hash));\n //===\n }", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function testUpdateNotOwnCreated()\r\n {\r\n //create teacher user\r\n $teacher = $this->CreateTeacher();\r\n $lisUser = $this->CreateTeacherUser($teacher);\r\n\r\n //now we have created teacheruser set to current controller\r\n $this->controller->setLisUser($lisUser);\r\n $this->controller->setLisPerson($teacher);\r\n\r\n //create other teacher user\r\n $otherTeacher = $this->CreateTeacher();\r\n $otherLisUser = $this->CreateTeacherUser($otherTeacher);\r\n\r\n //$name = uniqid() . 'Name';\r\n $subjectRound = $this->CreateSubjectRound();\r\n $student = $this->CreateStudent();\r\n //$anotherTeacher = $this->CreateTeacher();\r\n \r\n\r\n $independentWork = $this->CreateIndependentWork([\r\n 'name' => uniqid() . 'Name',\r\n 'duedate' => new \\DateTime,\r\n 'description' => uniqid() . ' Description for independentwork',\r\n 'durationAK' => (int) uniqid(),\r\n 'subjectRound' => $subjectRound->getId(),\r\n 'teacher' => $teacher->getId(),\r\n 'student' => $student->getId(),\r\n 'createdBy' => $otherLisUser->getId()\r\n ]);\r\n\r\n //$subjectRoundIdOld = $independentWork->getSubjectRound()->getId();\r\n //$studentIdOld = $independentWork->getStudent()->getId();\r\n //$teacherIdOld = $independentWork->getTeacher()->getId();\r\n\r\n $this->request->setMethod('put');\r\n $this->routeMatch->setParam('id', $independentWork->getId());\r\n\r\n $this->request->setContent(http_build_query([\r\n 'student' => $this->CreateStudent()->getId(),\r\n 'subjectRound' => $this->CreateSubjectRound()->getId(),\r\n 'teacher' => $teacher->getId(),\r\n ]));\r\n\r\n //fire request\r\n $result = $this->controller->dispatch($this->request);\r\n $response = $this->controller->getResponse();\r\n\r\n $this->PrintOut($result, false);\r\n\r\n $this->assertEquals(200, $response->getStatusCode());\r\n $this->assertEquals(false, $result->success);\r\n $this->assertEquals('SELF_CREATED_RESTRICTION', $result->message);\r\n }", "public function update(Request $request){\n $validators=Validator::make($request->all(),[\n 'question'=>'required',\n 'answer'=>'required'\n ]);\n if($validators->fails()){\n return Response::json(['errors'=>$validators->getMessageBag()->toArray()]);\n }else{\n $q=CommonQuestion::where('id',$request->id)->where('user_id',Auth::user()->id)->first();\n if($q){\n $q->question=$request->question;\n $q->user_id=Auth::user()->id;\n $q->answer=$request->answer;\n $q->save();\n return Response::json(['success'=>'CommonQuestion updated successfully !']);\n }else{\n return Response::json(['error'=>'CommonQuestion not found !']);\n }\n }\n }", "public function update(RegistrationPostUpdatedEvent $event): void\n {\n }", "public function update(Request $request, pregunta_test $pregunta_test)\n {\n //\n }", "public function testQuestionSharev1questionsidQuestionanswer()\n {\n\n }", "public function update(Request $request, UserQuestion $userQuestion)\n {\n //\n }", "public function test_post_question() {\n global $DB;\n\n // Create user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n $question = array(\n 'seconds' => '2',\n 'text' => 'dummy text'\n );\n\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('POST', '/api/v1/' . $videoquanda->id . '/questions', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(201, $client->getResponse()->getStatusCode());\n $this->assertEquals(1, $DB->count_records('videoquanda_questions', array('instanceid' => $videoquanda->id)));\n }", "public function testFriendsUpdateOut()\n {\n $result = $this->visit('account/friends/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testQuestionEditPostWithValidData() {\n //Select catalogs\n $catalog = $this->course->catalog()->first();\n $subcatalogs = $catalog->children()->get();\n $ids = array();\n \n foreach ($subcatalogs as $c) {\n $ids[] = $c->id;\n }\n\n\n $post_data = array(\n 'course' => $this->course->id,\n 'id' => $this->question->id,\n 'type' => 'Question z',\n 'question' => 'Question z',\n 'answer' => 'Question z',\n 'catalogs' => $ids\n );\n $response = $this->post('question/edit', $post_data);\n $this->assertEquals('200', $response->foundation->getStatusCode());\n $this->assertEquals('general.permission', $response->content->view);\n }", "public function testUpdateSiteMembershipRequestForPerson()\n {\n }", "public function testRegistrationExtraFields(): void { }", "public function testWrongFieldInstructorProfileUpdate() {\n try {\n\n $nonExistentInstructor = UserManagementController::updateInstructorProfile(\"gggggg\",\"686875\",\"[email protected]\",\n \"gfhgjhk \",\"hjhkhkj\",\"ghgjhgj\",true,$this->institution->getAbbreviation(),\n \"Teacher572\");\n\n $this->fail(\"The exceptional profile update failed for non existing Instructor\");\n } catch (InfinityMetricsException $ime) {\n $errorFields = $ime->getErrorList();\n $this->assertNotNull($errorFields);\n $this->assertNotNull($errorFields[\"userNotFound\"]);\n }\n\n try {\n\n $wrongProjectNameFieldUpdate = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,\"ABC\"\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->fail(\"The exceptional profile update failed for non existing Project of Instructor\");\n } catch (InfinityMetricsException $ime) {\n $errorFields = $ime->getErrorList();\n $this->assertNotNull($errorFields);\n $this->assertNotNull($errorFields[\"projectNotFound\"]);\n }\n\n try {\n\n $wrongInstitutionNameFieldUpdate = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,\"ABCD\",self::IDENTIFICATION);\n\n $this->fail(\"The exceptional profile update failed for non existing Institution of Instructor\");\n } catch (InfinityMetricsException $ime) {\n $errorFields = $ime->getErrorList();\n $this->assertNotNull($errorFields);\n $this->assertNotNull($errorFields[\"institutionNotFound\"]);\n }\n }", "public function testIntegrationUpdate()\n {\n $userFaker = factory(Model::class)->create();\n $this->visit('user/' . $userFaker->slug . '/edit')\n ->type('Foo bar', 'name')\n ->type('Foobar', 'username')\n ->type('[email protected]', 'email')\n ->type('foobar123', 'password')\n ->type('foobar123', 'password_confirmation')\n ->press('Save')\n ->seePageIs('user');\n $this->assertResponseOk();\n $this->seeInDatabase('users', [\n 'username' => 'Foobar',\n 'email' => '[email protected]'\n ]);\n $this->assertViewHas('models');\n }", "public function update(Request $request, question $question)\n {\n //\n }", "public function updateTask()\n\t{\n\t\t// Check if the user is logged in\n\t\tif (User::isGuest())\n\t\t{\n\t\t\tNotify::warning(Lang::txt('COM_MEMBERS_NOT_LOGGEDIN'));\n\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . 'task=' . $this->_task, false, true)), false)\n\t\t\t);\n\t\t\t//return App::abort(500, Lang::txt('COM_MEMBERS_REGISTER_ERROR_SESSION_EXPIRED'));\n\t\t}\n\n\t\t$force = false;\n\t\t$updateEmail = false;\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\t// Instantiate a new registration object\n\t\t$xregistration = new \\Components\\Members\\Models\\Registration();\n\n\t\t$xprofile = Member::oneOrFail(User::get('id'));\n\n\t\t$hzal = \\Hubzero\\Auth\\Link::find_by_id(User::get('auth_link_id'));\n\n\t\t// Get users component config options, specifically whether or not 'simple' registration is enabled\n\t\t$method = Request::getMethod();\n\t\t$usersConfig = Component::params('com_members');\n\t\t$simpleRegistration = $usersConfig->get('simple_registration', false);\n\n\t\tif ($method == 'POST')\n\t\t{\n\t\t\t// Load POSTed data\n\t\t\t$xregistration->loadPost();\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\t\t}\n\t\telse\n\t\t{\n\t\t\t// Load data from the user object\n\t\t\t$xregistration->loadProfile($xprofile);\n\n\t\t\t$username = User::get('username');\n\t\t\t$email = User::get('email');\n\n\t\t\tif ($username[0] == '-' && is_object($hzal))\n\t\t\t{\n\t\t\t\t$sub_email = explode('@', (string) $hzal->email, 2);\n\t\t\t\t$tmp_username = Session::get('auth_link.tmp_username', $sub_email[0]);\n\t\t\t\t$xregistration->set('login', $tmp_username);\n\t\t\t\t$xregistration->set('orcid', Session::get('auth_link.tmp_orcid', ''));\n\t\t\t\t$xregistration->set('email', $hzal->email);\n\t\t\t\t$xregistration->set('confirmEmail', $hzal->email);\n\n\t\t\t\tif ($simpleRegistration)\n\t\t\t\t{\n\t\t\t\t\t$force = false;\n\t\t\t\t\t$method = 'POST';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$force = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Profile info\n\t\t\t$member = Member::oneOrNew(User::get('id'));\n\t\t\t$entries = $member->profiles();\n\n\t\t\t$p = $entries->getTableName();\n\t\t\t$f = \\Components\\Members\\Models\\Profile\\Field::blank()->getTableName();\n\t\t\t$o = \\Components\\Members\\Models\\Profile\\Option::blank()->getTableName();\n\n\t\t\t$profiles = $entries\n\t\t\t\t->select($p . '.*,' . $o . '.label')\n\t\t\t\t->join($f, $f . '.name', $p . '.profile_key', 'inner')\n\t\t\t\t->joinRaw($o, $o . '.field_id=' . $f . '.id AND ' . $o . '.value=' . $p . '.profile_value', 'left')\n\t\t\t\t->ordered()\n\t\t\t\t->rows();\n\n\t\t\t// Gather data to pass to the form processor\n\t\t\t$profile = \\Components\\Members\\Models\\Profile::collect($profiles);\n\n\t\t\t$xregistration->_registration['_profile'] = $profile;\n\t\t}\n\n\t\t$check = $xregistration->check('update');\n\n\t\t// Validate profile data\n\t\t$fields = \\Components\\Members\\Models\\Profile\\Field::all()\n\t\t\t->including(['options', function ($option){\n\t\t\t\t$option\n\t\t\t\t\t->select('*');\n\t\t\t}])\n\t\t\t->where('action_create', '!=', \\Components\\Members\\Models\\Profile\\Field::STATE_HIDDEN)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Validate profile fields\n\t\tif ($fields->count())\n\t\t{\n\t\t\t$form = new \\Hubzero\\Form\\Form('profile', array('control' => 'profile'));\n\t\t\t$form->load(\\Components\\Members\\Models\\Profile\\Field::toXml($fields, 'create', $profile));\n\t\t\t$form->bind(new \\Hubzero\\Config\\Registry($profile));\n\n\t\t\tif (!$form->validate($profile))\n\t\t\t{\n\t\t\t\t$check = false;\n\n\t\t\t\tforeach ($form->getErrors() as $key => $error)\n\t\t\t\t{\n\t\t\t\t\tif ($error instanceof \\Hubzero\\Form\\Exception\\MissingData)\n\t\t\t\t\t{\n\t\t\t\t\t\t$xregistration->_missing[$key] = $error;\n\t\t\t\t\t}\n\n\t\t\t\t\t$xregistration->_invalid[$key] = $error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$force && $check && $method == 'GET')\n\t\t{\n\t\t\tSession::set('registration.incomplete', false);\n\t\t\tif ($_SERVER['REQUEST_URI'] == rtrim(Request::base(true), '/') . '/register/update'\n\t\t\t || $_SERVER['REQUEST_URI'] == rtrim(Request::base(true), '/') . '/members/register/update')\n\t\t\t{\n\t\t\t\tApp::redirect(rtrim(Request::base(true), '/') . '/');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tApp::redirect($_SERVER['REQUEST_URI']);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!$force && $check && $method == 'POST')\n\t\t{\n\t\t\t// Before going any further, we need to do a sanity check to make sure username isn't being changed.\n\t\t\t// This really only happens on a race condition where someone is creating the same account\n\t\t\t// using a 3rd party auth service in two different browsers. Yes, it's crazy!\n\t\t\tif ($xregistration->get('login') && substr(User::get('username'), 0, 1) == '-')\n\t\t\t{\n\t\t\t\t// Make sure the username hasn't since been set in the database\n\t\t\t\tif (substr(User::getInstance(User::get('id'))->get('username'), 0, 1) != '-')\n\t\t\t\t{\n\t\t\t\t\tApp::redirect(\n\t\t\t\t\t\tRoute::url('index.php?option=com_users&view=login&view=logout'),\n\t\t\t\t\t\tLang::txt('This account appears to already exist. Please try logging in again.'),\n\t\t\t\t\t\t'warning'\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$hubHomeDir = rtrim($this->config->get('homedir'), DS);\n\n\t\t\t$updateEmail = false;\n\n\t\t\tif ($xprofile->get('homeDirectory') == '')\n\t\t\t{\n\t\t\t\t$xprofile->set('homeDirectory', $hubHomeDir . DS . $xprofile->get('username'));\n\t\t\t}\n\n\t\t\tif ($xprofile->get('registerIP') == '')\n\t\t\t{\n\t\t\t\t$xprofile->set('registerIP', Request::getString('REMOTE_ADDR', '', 'server'));\n\t\t\t}\n\n\t\t\tif ($xprofile->get('registerDate') == '')\n\t\t\t{\n\t\t\t\t$xprofile->set('registerDate', Date::toSql());\n\t\t\t}\n\n\t\t\tif ($xregistration->get('email') != $xprofile->get('email'))\n\t\t\t{\n\t\t\t\tif (is_object($hzal) && $xregistration->get('email') == $hzal->email)\n\t\t\t\t{\n\t\t\t\t\t$xprofile->set('activation', 3);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$code = \\Components\\Members\\Helpers\\Utility::genemailconfirm();\n\t\t\t\t\t$xprofile->set('activation', $code);\n\t\t\t\t\t$updateEmail = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($xregistration->get('login') != $xprofile->get('username'))\n\t\t\t{\n\t\t\t\t$xprofile->set('homeDirectory', $hubHomeDir . DS . $xregistration->get('login'));\n\t\t\t}\n\n\t\t\t$keys = array('email', 'name', 'surname', 'givenName', 'middleName', 'usageAgreement', 'sendEmail', 'password');\n\t\t\tforeach ($keys as $key)\n\t\t\t{\n\t\t\t\tif ($xregistration->get($key) !== null)\n\t\t\t\t{\n\t\t\t\t\t$xprofile->set($key, $xregistration->get($key));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$xprofile->set('username', $xregistration->get('login'));\n\n\t\t\tif ($xprofile->save())\n\t\t\t{\n\t\t\t\t$access = array();\n\t\t\t\tforeach ($fields as $field)\n\t\t\t\t{\n\t\t\t\t\t$access[$field->get('name')] = $field->get('access');\n\t\t\t\t}\n\n\t\t\t\t$profile = $xregistration->_registration['_profile'];\n\n\t\t\t\t// Save profile data\n\t\t\t\t$member = Member::oneOrNew($xprofile->get('id'));\n\t\t\t\tif (!$member->saveProfile($profile, $access))\n\t\t\t\t{\n\t\t\t\t\t\\Notify::error($member->getError());\n\t\t\t\t\t// Don't stop the registration process!\n\t\t\t\t\t// At this point, the account was successfully created.\n\t\t\t\t\t// The profile info, however, may have issues. But, it's not crucial.\n\t\t\t\t\t//$result = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update current session if appropriate\n\t\t\t// TODO: update all session of this user\n\t\t\t// TODO: only update if changed\n\t\t\tif ($xprofile->get('id') == User::get('id'))\n\t\t\t{\n\t\t\t\t$suser = Session::get('user');\n\t\t\t\t$suser->set('username', $xprofile->get('username'));\n\t\t\t\t$suser->set('email', $xprofile->get('email'));\n\t\t\t\t$suser->set('name', $xprofile->get('name'));\n\t\t\t\tSession::set('user', $suser);\n\n\t\t\t\t// Update the session entry\n\t\t\t\t// @TODO: Use a model rather than direct query\n\t\t\t\t$database = App::get('db');\n\t\t\t\t$database->setQuery(\n\t\t\t\t\t\"UPDATE `#__session`\n\t\t\t\t\tSET `username`=\" . $database->quote($xprofile->get('username')) . \"\n\t\t\t\t\tWHERE `session_id`=\" . $database->quote(Session::getId())\n\t\t\t\t);\n\t\t\t\t$database->query();\n\t\t\t}\n\n\t\t\tSession::set('registration.incomplete', false);\n\n\t\t\t// Notify the user\n\t\t\tif ($updateEmail)\n\t\t\t{\n\t\t\t\t\\Components\\Members\\Helpers\\Utility::sendConfirmEmail($xprofile, $xregistration);\n\t\t\t}\n\n\t\t\t// Notify administration\n\t\t\tif ($method == 'POST')\n\t\t\t{\n\t\t\t\t$subject = Config::get('sitename') .' '.Lang::txt('COM_MEMBERS_REGISTER_EMAIL_ACCOUNT_UPDATE');\n\n\t\t\t\t$eaview = new \\Hubzero\\Component\\View(array(\n\t\t\t\t\t'name' => 'emails',\n\t\t\t\t\t'layout' => 'adminupdate'\n\t\t\t\t));\n\t\t\t\t$eaview->option = $this->_option;\n\t\t\t\t$eaview->controller = $this->_controller;\n\t\t\t\t$eaview->sitename = Config::get('sitename');\n\t\t\t\t$eaview->xprofile = $xprofile;\n\t\t\t\t$eaview->baseURL = $this->baseURL;\n\t\t\t\t$message = $eaview->loadTemplate();\n\t\t\t\t$message = str_replace(\"\\n\", \"\\r\\n\", $message);\n\t\t\t}\n\n\t\t\tif (!$updateEmail)\n\t\t\t{\n\t\t\t\t$suri = urldecode(Request::getString('return', ''));\n\t\t\t\tif (!$suri)\n\t\t\t\t{\n\t\t\t\t\t$suri = Request::getString('REQUEST_URI', '/', 'server');\n\t\t\t\t}\n\n\t\t\t\tif ($suri == '/register/update' || $suri == '/members/update' || $suri == '/members/register/update')\n\t\t\t\t{\n\t\t\t\t\t$suri = Route::url('index.php?option=' . $this->_option . '&task=myaccount');\n\t\t\t\t}\n\n\t\t\t\tApp::redirect(\n\t\t\t\t\t$suri\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Instantiate a new view\n\t\t\t\t$this->view\n\t\t\t\t\t->set('title', Lang::txt('COM_MEMBERS_REGISTER_UPDATE'))\n\t\t\t\t\t->set('sitename', Config::get('sitename'))\n\t\t\t\t\t->set('xprofile', $xprofile)\n\t\t\t\t\t->set('isSelf', true)\n\t\t\t\t\t->set('updateEmail', $updateEmail)\n\t\t\t\t\t->setErrors($this->getErrors())\n\t\t\t\t\t->display();\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn $this->_show_registration_form($xregistration, 'update');\n\t}", "public function testSchedulesUpdateOut()\n {\n $result = $this->visit('events/{event}/schedules/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testUserUpdate()\n {\n $this->browse(function (Browser $browser) {\n $update_button = self::$locator . ' td .update_button';\n\n self::$username = 'A0Tester' . uniqid();\n $browser->visit('/')\n ->click($update_button)\n ->type('username', self::$username)\n ->type('first_name', 'aaaab')\n ->type('last_name', 'aaaab')\n ->click('button[type=\"submit\"]')\n\n ->waitForText('User data successfully updated!')\n ->assertSee('User data successfully updated!')\n ->assertValue('input[name=\"username\"]', self::$username)\n ->assertValue('input[name=\"first_name\"]', 'aaaab')\n ->assertValue('input[name=\"last_name\"]', 'aaaab');\n });\n }", "public function test_post_question_as_guest() {\n global $DB;\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n // set the instance of the 'guest' enrolment plugin to enabled\n $DB->set_field('enrol', 'status', ENROL_INSTANCE_ENABLED, array(\n 'courseid' => $course->id,\n 'enrol' => 'guest',\n ));\n\n // login as guest\n $this->setGuestUser();\n\n // create a dummy question to post\n $question = array(\n 'seconds' => '2',\n 'text' => 'dummy text'\n );\n\n // try to post a question\n $client = new Client($this->_app);\n $client->request('POST', '/api/v1/' . $videoquanda->id . '/questions', array(), array(), array(\n 'HTTP_X_REQUESTED_WITH' => 'XMLHttpRequest',\n ), json_encode($question));\n $this->assertTrue($client->getResponse()->isClientError());\n $this->assertEquals('application/json', $client->getResponse()->headers->get('Content-Type'));\n $this->assertEquals(get_string('jsonapi:submitquestionasguestdenied', $this->_app['plugin']), json_decode($client->getResponse()->getContent()));\n $this->assertEquals(0, $DB->count_records('videoquanda_questions', array('instanceid' => $videoquanda->id)));\n }", "public function updatecourseRegister(CourseRegister $courseRegister): bool\n {\n }", "public function test_updateReplenishmentProcessCustomFields() {\n\n }", "function testDoubleRegistration() {\n\t\t$pkey = Cgn_User::registerUser($this->user);\n\t\t$this->assertEqual(FALSE, $pkey);\n\t}", "public function testUpdateChallenge()\n {\n }", "public function testUserRegister()\n {\n //Voter user registration testing\n $this->browse(function (Browser $voter,$photographer,$organizer) {\n $voter->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','VoterTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee('LensView Timeline')\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n\n //Photographer user registration testing\n $photographer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','PhotographerTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role2')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Photographer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n \n\n // Contest Organizer registration testing\n $organizer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','OrganizerTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role3')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Organizer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n });\n}", "public function questionFormSucceeded($form) {\n $values = $form->getValues();\n $this->questions->update($values);\n }", "public function testRegistrationEmailAlreadyInUse(): void { }", "public function test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }", "public function update(Request $request, Question $question)\n {\n\n }", "public function test_changing_answer_from_other_user() {\n global $DB;\n\n // create user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, 99, $time, $time, 2, 'dummy text')\n ),\n 'videoquanda_answers' => array(\n array('id', 'questionid', 'userid', 'timecreated', 'timemodified', 'text'),\n array(1, 1, 1, $time, $time, 'dummy answer 1.')\n )\n )));\n\n $answer = array(\n 'text' => 'I have updated my answer.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1/answers/1', array(), array(), array(), json_encode($answer));\n\n $this->assertEquals(405, $client->getResponse()->getStatusCode());\n $this->assertEquals($time, $DB->get_field('videoquanda_answers', 'timemodified', array('id' => 1)));;\n\n }", "public function update(Request $request, Question $question)\n {\n //\n }", "public function update(Request $request, Question $question)\n {\n //\n }", "public function update(Request $request, Question $question)\n {\n //\n }", "public function testApiRegistrationSimple()\n {\n $eventsFaker = Event::fake();\n $emailVerificationSend = Notification::fake();\n $uniqueData = $this->getTestRegisterData();\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $uniqueData);\n\n $response->assertStatus(200)->assertJsonMissingValidationErrors();\n\n $responseArray = $response->decodeResponseJson()->json();\n $this->assertArrayNotHasKey('token_type', $responseArray);\n $this->assertArrayNotHasKey('expires_in', $responseArray);\n $this->assertArrayNotHasKey('access_token', $responseArray);\n $this->assertArrayNotHasKey('refresh_token', $responseArray);\n\n $user = CoreUser::byEmail($uniqueData[ 'email' ])->firstOrFail();\n $this->withoutExceptionHandling();\n\n if ( config('kit-auth.should_dispatch_registered_event') ) {\n $eventsFaker->assertDispatched(Registered::class,\n function (Registered $event) use ($emailVerificationSend) {\n app(ProcessEmailVerification::class)->handle($event);\n\n $emailVerificationSend->assertSentTo($event->user, VerifyEmail::class,\n function (VerifyEmail $notice) {\n $this->assertEquals($notice->requestSide, CoreUserContract::FRONTEND_REQUEST_SIDE);\n return $notice->tokens[ 'web' ] && $notice->tokens[ 'mobile' ];\n });\n\n return true;\n });\n } else {\n $eventsFaker->assertNotDispatched(Registered::class);\n }\n }", "public function testQuestionSharev1questions()\n {\n\n }", "public function update_security_question(){\n\t\t\t\n\t\t\t$this->load->library('form_validation');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('question','Security Question','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('questionID','Question ID','required|trim|xss_clean');\n\t\t\t\n\t\t\t$this->form_validation->set_message('required', '%s cannot be blank!');\n\t\t\t\n\t\t\t$this->form_validation->set_error_delimiters('<div class=\"alert alert-danger text-danger text-center\"><i class=\"fa fa-exclamation-triangle\" aria-hidden=\"true\"></i> ', '</div>');\n\t\t\t \t\n\t\t\tif ($this->form_validation->run()){\n\t\t\t\t\n\t\t\t\t$questionID = $this->input->post('questionID');\n\t\t\t\t$id = preg_replace('#[^0-9]#i', '', $questionID); // filter everything but numbers\n\t\t\t\t\t\n\t\t\t\t$edit_data = array(\n\t\t\t\t\t'question' => ucfirst($this->input->post('question')),\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tif ($this->Security_questions->update_question($edit_data, $id)){\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t$data['notif'] = '<div class=\"alert alert-success text-center\" role=\"alert\"> <i class=\"fa fa-check-circle\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button> Question has been updated!</div>';\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\t$data['success'] = false;\n\t\t\t\t$data['notif'] = '<div class=\"alert alert-danger text-center\" role=\"alert\"><i class=\"fa fa-ban\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button> There are errors on the form!'.validation_errors().'</div>';\n\t\t\t}\n\t\t\t// Encode the data into JSON\n\t\t\t$this->output->set_content_type('application/json');\n\t\t\t$data = json_encode($data);\n\n\t\t\t// Send the data back to the client\n\t\t\t$this->output->set_output($data);\n\t\t\t//echo json_encode($data);\t\t\t\n\t\t}", "public function update()\n {\n $data = Input::all();\n foreach (array_combine($data['question_id'], $data['question_name']) as $question_id => $question_name) {\n $question = Question::find($question_id);\n $question->question_name = $question_name;\n $question->save();\n }\n\n Flash::success('The question has been successfully updated!');\n return Redirect::action('AnswerController@edit', $question->exam_id);\n }", "public static function updateConfirm($aa_inst_id,$fb_user_id)\r\n {\r\n //update app_participation\r\n $lottery = new iCon_Lottery($aa_inst_id,getConfig('aa_app_id'));\r\n $id=$lottery->isUserParticipating($fb_user_id, $aa_inst_id) ;\r\n\r\n if($id != false)\r\n {\r\n $table=new Table_Participation();\r\n $table->load($id);\r\n $table->newsletter_doubleoptin =1;\r\n $table->save();\r\n }\r\n\r\n }", "public function testDeleteSurveyQuestion0()\n {\n }", "public function testDeleteSurveyQuestion0()\n {\n }", "public function testFailedAnswerAdd()\n {\n $this->artisan('migrate:refresh');\n $this->browse(function (Browser $browser) {\n factory(User::class, 2)->create();\n $users = User::All();\n $users->each(function ($user) {\n $profile = factory(Profile::class)->make();\n $user->profile()->save($profile);\n });\n $user = User::find(1);\n $question = new Question;\n $question->user_id = 2;\n $question->question = 'This is a sample question';\n $question->save();\n $browser->visit('/')\n ->clickLink('Login')\n ->assertPathIs('/login')\n ->type('email', $user->email)\n ->type('password', 'secretsecret')\n ->press('LOGIN');\n $browser->pause(1000)\n ->assertPathIs('/')\n ->click('@question')\n ->assertPathIs('/question/1')\n ->click('@addAnswer')\n ->type('answer', ' ')\n ->assertSee('Answer is required.')\n ->type('answer', str_random(1))\n ->assertSee('Answer must be between 10 and 500 characters long.')\n ->type('answer', str_random(501))\n ->assertSee('Answer must be between 10 and 500 characters long.');\n });\n }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = '[email protected]';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "public function testVenueQuestionnaire()\n {\n $this->buildVenueSurvey();\n\n $response = $this->json('GET', \"survey/questionnaire\", ['slot_id' => $this->slot->id, 'type' => Survey::TRAINING]);\n $response->assertStatus(200);\n\n $survey = $this->survey;\n $venueGroup = $this->venueGroup;\n $venueQ = $this->venueQuestion;\n $trainerGroup = $this->trainerGroup;\n $trainerQ = $this->trainerQuestion;\n\n $response->assertJson([\n 'survey' => [\n 'id' => $survey->id,\n 'type' => Survey::TRAINING,\n 'year' => $survey->year,\n 'title' => $survey->title,\n ]\n ]);\n\n $response->assertJson([\n 'survey' => [\n 'survey_groups' => [\n [\n 'id' => $venueGroup->id,\n 'title' => $venueGroup->title,\n 'description' => $venueGroup->description,\n 'survey_questions' => [\n [\n 'id' => $venueQ->id,\n 'sort_index' => $venueQ->sort_index,\n 'type' => $venueQ->type,\n 'description' => $venueQ->description,\n ]\n ]\n ],\n\n [\n 'id' => $trainerGroup->id,\n 'title' => $trainerGroup->title,\n 'description' => $trainerGroup->description,\n 'survey_questions' => [\n [\n 'id' => $trainerQ->id,\n 'sort_index' => $trainerQ->sort_index,\n 'type' => $trainerQ->type,\n 'description' => $trainerQ->description,\n ]\n ]\n\n ]\n ]\n ]\n ]);\n\n $trainer = $this->trainer;\n\n $response->assertJson([\n 'trainers' => [\n [\n 'id' => $trainer->id,\n 'callsign' => $trainer->callsign,\n 'position_id' => Position::TRAINER\n ]\n ]\n ]);\n\n $slot = $this->slot;\n $response->assertJson([\n 'slot' => [\n 'id' => $slot->id,\n 'begins' => $slot->begins\n ]\n ]);\n //return response()->json(['survey' => $survey, 'trainers' => $trainers, 'slot' => $slot]);\n\n }", "public function testQuestionSharev1questionsidQuestion()\n {\n\n }", "public function test_changing_non_existing_answer() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = mktime(9, 0, 0, 11, 7, 2013);\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $time, $time, 2, 'dummy text')\n ),\n 'videoquanda_answers' => array(\n array('id', 'questionid', 'userid', 'timecreated', 'timemodified', 'text'),\n array(1, 1, $user->id, $time, $time, 'dummy answer 1.')\n )\n )));\n\n $answer = array(\n 'text' => 'I have updated my answer.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1/answers/2', array(), array(), array(), json_encode($answer));\n\n $this->assertEquals(404, $client->getResponse()->getStatusCode());\n $this->assertEquals($time, $DB->get_field('videoquanda_answers', 'timemodified', array('id' => 1)));\n }", "public function update(){\n var_dump(parent::update_register($_POST) ? header('location:?controller=factura&method=create'): 'Error al actualizar');\n\n die();\n }", "public function testTestBlockSubmitterRegistration ()\n {\n // This test assumes that you're logged in as manager or admin, and it\n // will leave as a manager.\n\n // First, set it to *NOT* allowed to register. Go to settings...\n $this->driver->get(ROOT_URL . '/src/settings?edit');\n\n // Find the element that defines the setting.\n $element = $this->driver->findElement(WebDriverBy::name('allow_submitter_registration'));\n if ($element->getAttribute('checked')) {\n // It's currently allowed. Turn it off!\n $element->click();\n $element = $this->driver->findElement(WebDriverBy::xpath('//input[@type=\"submit\"]'));\n $element->click();\n $this->chooseOkOnNextConfirmation();\n }\n\n // Log out, then check if element is gone indeed.\n $this->logout();\n\n // There should be no link to register yourself.\n // First, I had this findElements(), but Chrome doesn't like that at all, and times out.\n // Firefox anyway took quite some time, because of the timeout that we have set if elements are not found immediately (normally needed if pages load slowly).\n // $this->assertFalse((bool) count($this->driver->findElements(WebDriverBy::xpath('//a/b[text()=\"Register as submitter\"]'))));\n // New attempt to test for absence of register link.\n $this->assertFalse(strpos($this->driver->findElement(WebDriverBy::xpath('//table[@class=\"logo\"]//td[3]'))->getText(), 'Register as submitter'));\n\n // Not only the link should be gone. Also the form should no longer work.\n $this->driver->get(ROOT_URL . '/src/users?register');\n $this->driver->findElement(WebDriverBy::xpath('//table[@class=\"info\"]//td[contains(text(), \"Submitter registration is not active in this LOVD installation.\")]'));\n\n // Then, log in as a manager again, and enable the feature again. Then test again.\n $this->login('manager', 'test1234');\n\n // Change the setting back.\n $this->driver->get(ROOT_URL . '/src/settings?edit');\n $this->setCheckBoxValue(WebDriverBy::name('allow_submitter_registration'), true);\n $element = $this->driver->findElement(WebDriverBy::xpath('//input[@type=\"submit\"]'));\n $element->click();\n $this->chooseOkOnNextConfirmation();\n\n // Log out, and check if registration is allowed again.\n $this->logout();\n\n // Find the link to register yourself.\n $this->driver->findElement(WebDriverBy::xpath('//a/b[text()=\"Register as submitter\"]'));\n\n // Also verify the form still works.\n $this->driver->get(ROOT_URL . '/src/users?register');\n $this->driver->findElement(WebDriverBy::xpath('//input[contains(@value, \"I don\\'t have an ORCID ID\")]'));\n\n // Log back in, future tests may need it.\n $this->login('manager', 'test1234');\n }", "public function testCreateSurveyQuestion0()\n {\n }", "public function testCreateSurveyQuestion0()\n {\n }", "public function test_authenticated_admin_users_can_hit_the_update_endpoint()\n {\n // First we create a test country\n $country = $this->createCountry();\n\n // Then we check if it was successfully added into the database\n $this->assertDatabaseHas('countries', $country->toArray());\n\n // Then we create an update request with auth headers and empty params\n $this->authenticatedAdmin()->update($country->code, [])\n // We assert status is 422, because now we are authenticated, but request params are invalid\n ->assertStatus(422)\n // Then we assert errors structure matches expected\n ->assertJsonStructure([\n 'errors' => [\n 'name',\n 'code'\n ]\n ]);\n }", "public function testHandleUpdateValidationError()\n {\n // Populate data\n $this->_populate();\n \n // Request\n $response = $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $this->customDealerAccountData, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Verify\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHasErrors();\n }", "public function testQuestionEditExistingID() {\n $response = $this->get('question/' . $this->question->id . '/edit');\n $this->assertEquals('200', $response->foundation->getStatusCode());\n $this->assertEquals('general.permission', $response->content->view);\n }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function testGetDuplicateVendorComplianceSurveyById()\n {\n }", "public function testEmailUpdateNewEmailAlreadyInUse(): void {\n\t\t$user = $this->createUser();\n\t\tPassport::actingAs($user);\n\t\t$response = $this->withHeaders([\n\t\t\t'Accept' => 'application/json',\n\t\t\t'Content-Type' => 'application/json',\n\t\t])->postJson($this->route.'/email/update', [\n\t\t\t'email' => $user->email,\n\t\t\t'email_update' => $user->email]);\n\t\t$response->assertStatus(HttpStatus::STATUS_UNPROCESSABLE_ENTITY);\n\t\t$response->assertJson([\n\t\t\t'message' => 'The given data was invalid.',\n\t\t\t'errors' => [\n\t\t\t\t'email_update' => [\n\t\t\t\t\t'The email update has already been taken.'\n\t\t\t\t]\n\t\t\t]\n\t\t]);\n\t\t$this->assertDatabaseMissing('email_verification',[\n\t\t\t'user_id' => $user->id,\n\t\t\t'email_update' => $user->email\n\t\t]);\n\t}", "public function testUpdateChallengeActivity()\n {\n }", "public function test_users_update_non_unique_email_error(){\n $this->signInUser();\n $this->user['email'] = '[email protected]'; //assume correct test data\n $response = $this->patch(route('users.update', ['user' => 5]), $this->user); \n $response->assertSessionHasErrors(['email']);\n }", "function questionnaire_update_instance($questionnaire) {\n global $DB, $CFG;\n require_once($CFG->dirroot.'/mod/questionnaire/locallib.php');\n\n // Check the realm and set it to the survey if its set.\n if (!empty($questionnaire->sid) && !empty($questionnaire->realm)) {\n $DB->set_field('questionnaire_survey', 'realm', $questionnaire->realm, array('id' => $questionnaire->sid));\n }\n\n $questionnaire->timemodified = time();\n $questionnaire->id = $questionnaire->instance;\n\n // May have to add extra stuff in here.\n if (empty($questionnaire->useopendate)) {\n $questionnaire->opendate = 0;\n }\n if (empty($questionnaire->useclosedate)) {\n $questionnaire->closedate = 0;\n }\n\n if ($questionnaire->resume == '1') {\n $questionnaire->resume = 1;\n } else {\n $questionnaire->resume = 0;\n }\n\n // Field questionnaire->navigate used for branching questionnaires. Starting with version 2.5.5.\n /* if ($questionnaire->navigate == '1') {\n $questionnaire->navigate = 1;\n } else {\n $questionnaire->navigate = 0;\n } */\n\n // Get existing grade item.\n questionnaire_grade_item_update($questionnaire);\n\n questionnaire_set_events($questionnaire);\n\n return $DB->update_record(\"questionnaire\", $questionnaire);\n}", "function TestSave_getAnswers2(){\n \t$newAnswer = new Answer();\n \t$answerArray = array(array(\"elementId\" => 1, \"value\" => \"15\"), array(\"elementId\" => 2, \"value\" => \"0\"), array(\"elementId\" => 2, \"value\" => \"56\"), array(\"elementId\" => 2, \"value\" => \"29\"));\t\n \t$newAnswer->setAnswers($answerArray);\n \t$newAnswer->setRecipient(new User(1));\n \t$newAnswer->setFormId(4);\n \t$newAnswer->save();\n \t$newFormId = $newAnswer->getId();\n \t$newAnswer = new Answer($newFormId);\n \t$this->assertTrue($newAnswer->getAnswers() == $answerArray);\n }", "public function testAddVendorComplianceSurvey()\n {\n }", "public function test_users_update_short_confirmed_password_error(){\n $this->signInUser();\n $this->user['password_confirmation'] = str_repeat('A', 2);\n $response = $this->patch(route('users.update', ['user' => 5]), $this->user); \n $response->assertSessionHasErrors(['password_confirmation']);\n }", "public function updateQuestion($Question){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_QuestionDAO->updateQuestion($Question);\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in QuestionDAO.updateQuestion()\");\t\t\n\n\t\treturn $Result;\n\t}" ]
[ "0.6326959", "0.6326959", "0.6215054", "0.6106913", "0.5868318", "0.5868318", "0.5843494", "0.58333194", "0.5764647", "0.5714424", "0.5704338", "0.570071", "0.570071", "0.56935734", "0.5648956", "0.5614041", "0.5593699", "0.5581167", "0.558031", "0.5559604", "0.5554796", "0.5537029", "0.551252", "0.5498532", "0.54832333", "0.5475688", "0.5472237", "0.5456587", "0.5448332", "0.5439653", "0.539906", "0.53848034", "0.53540844", "0.5335607", "0.53296477", "0.5321542", "0.52844864", "0.5281963", "0.52630144", "0.52541983", "0.5253555", "0.5239794", "0.5238306", "0.5215729", "0.5203376", "0.5189732", "0.5172184", "0.5168448", "0.5164286", "0.5162605", "0.51564133", "0.515628", "0.51545715", "0.5146508", "0.5140458", "0.51373565", "0.51160973", "0.5114457", "0.5112837", "0.5099367", "0.508781", "0.5084989", "0.50783014", "0.50769264", "0.50705963", "0.50484806", "0.5045053", "0.50395733", "0.50304055", "0.50304055", "0.50304055", "0.5029973", "0.5028773", "0.5022362", "0.50216025", "0.502088", "0.5014816", "0.5014816", "0.5011548", "0.5006302", "0.5006158", "0.50041074", "0.49992177", "0.49916682", "0.49911642", "0.49844697", "0.49844697", "0.49775553", "0.49735796", "0.49703628", "0.49699247", "0.49652055", "0.4961575", "0.49591392", "0.49479118", "0.4945627", "0.49440935", "0.494074", "0.4936233", "0.49331766" ]
0.81059843
0
Test case for webinarRegistrantStatus Update Webinar Registrant Status.
public function testWebinarRegistrantStatus() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_organiser_status(){\r\n\t\t$this->organiser_model->update_organiser_status($_POST['status'],$_POST['organiser_id']);\r\n\t\t$this->send_status_email($_POST['status'],$_POST['organiser_id']);\r\n\t\techo \"1\";exit;\r\n\t}", "public function testWebinarUpdate()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function status(Request $request)\n {\n $urow = Registration::where(['id' => $request['Row_id']]);\n if ($urow!= null) {\n $urow->update(['status' => $request['status']]);\n return redirect()->action('FollowupController@index')->with('success', 'Successfully Updated!');\n } else {\n return redirect()->action('FollowupController@index')->with('failed', 'Successfully Updated!');\n }\n }", "public function update_status();", "public function testWebinarRegistrantCreate()\n {\n }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function updateSubmissionStatus() {\n\n $updateStatus = Usersubmissionstatus::where('user_id', Auth::user()->id)\n ->where('quarter_id', Quarter::getRunningQuarter()->id)\n ->update(['status_id' => config('constant.status.L1_APPROVAL_PENDING')]);\n // Let's notify user and L1 about user submission status.\n return $this->sendMail(config('constant.email_status.INFORM_APPRAISEE'));\n }", "public function status() : void\n {\n $jwt = Auth::isValidToken($_COOKIE['SSID']);\n \n if (!$jwt) {\n View::jsonResponse(['status' => 401, 'message' => 'Access denied for you!']);\n }\n\n $data = [ 'status' => $_POST['status'], 'id' => $_POST['statusid']];\n $data = Validator::cleanData($data);\n (new Task())->update($data)->execute();\n header('location: user-profile');\n\n }", "public function testcall(){\n self::updateUserStatus(2,2);\n }", "public function test_should_deliver_status() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'student.created',\n\t\t) );\n\n\t\t// Inactive.\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t\t// Active.\n\t\t$webhook->set( 'status', 'active' )->save();\n\t\t$this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t}", "public function testComAdobeGraniteResourcestatusImplStatusResourceProviderImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.granite.resourcestatus.impl.StatusResourceProviderImpl';\n\n $crawler = $client->request('POST', $path);\n }", "public function ajaxMemberStatus() {\n\t\t$this->autoRender = false;\n\t\t$this->viewBuilder()->setLayout(false);\n\t\tif ($this->request->is('ajax')) {\n\t\t\t$id = $this->request->getData()['id'];\n\t\t\t$status = $this->request->getData()['status'];\n\t\t\t$data = $this->Users->get($id);\n\n\t\t\t$user = $this->Users->patchEntity($data, ['status' => $status]);\n\n\t\t\tif ($this->Users->save($user)) {\n\t\t\t\t$message = ($status == 1) ? 'Member is Active now.' : 'Member is InActive now.';\n\t\t\t\techo json_encode(array('status' => 'success', 'message' => $message));\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$message = ($status == 1) ? 'Error while updating member status to Active.' : 'Error while updating member status to InActive.';\n\t\t\techo json_encode(array('status' => 'error', 'message' => $message));\n\t\t\texit;\n\t\t}\n\t}", "public function test_admin_status()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/DscMember', 'status']);\n $this->assertResponseCode(404);\n }", "public function testSuccessfulInstructorUpdate() {\n try {\n $updatedInstructor = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->assertNotNull($updatedInstructor, \"The updated instructor is null\");\n $this->assertEquals($this->userTypeEnum->INSTRUCTOR, $updatedInstructor->getType(), \"The updated user is not\n an instance of INSTRUCTOR\");\n\n $InstructorInstitution = PersistentUserXInstitutionPeer::retrieveByPk($updatedInstructor->getUserId(),\n $this->institution->getInstitutionId());\n $this->assertNotNull($InstructorInstitution, \"The user x institution relation was not created for the instructor.\");\n $this->assertEquals(self::IDENTIFICATION, $InstructorInstitution->getIdentification(), \"The Instructor school\n identification is incorrect\");\n $this->assertEquals($updatedInstructor->getUserId(), $InstructorInstitution->getUserId(), \"The user id is\n incorrect on user x institution for the instructor\");\n $this->assertEquals($this->institution->getInstitutionId(), $InstructorInstitution->getInstitutionId(),\n \"The institution id is incorrect on user x institution for the instructor\");\n\n $instXProjec = PersistentUserXProjectPeer::retrieveByPK($updatedInstructor->getJnUsername(),\n $this->project->getProjectJnName());\n $this->assertNotNull($instXProjec, \"The relationship between instructor and project was not created\");\n $this->assertEquals($this->project->getProjectJnName(), $instXProjec->getProjectJnName(), \"The project name\n is incorrect on user x project\");\n $this->assertEquals($updatedInstructor->getJnUsername(), $instXProjec->getJnUsername(), \"The java.net\n username is incorrect on user x project for instructor\");\n $this->assertTrue($instXProjec->getIsOwner() == 1, \"The instructor is the owner of project.\");\n\n } catch (InfinityMetricsException $ime){\n $this->fail(\"The successful update of profile failed: \" . $ime);\n }\n\n }", "public function changestatus_post()\r\n {\r\n $userid=$this->uri->segment(3);\r\n\r\n $user=$this->user_m->get($userid);\r\n if($user->status==\"1\"){\r\n $data=array(\r\n \"status\"=> \"0\"\r\n );\r\n }\r\n else{\r\n $data=array(\r\n \"status\"=> \"1\"\r\n ); \r\n }\r\n if ($succes_status = $this->user_m->update_data($userid,$data)){\r\n if($user->status==\"1\"){\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Deactivated\"\r\n )\r\n );\r\n }\r\n else{\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Activated\"\r\n )\r\n ); \r\n }\r\n }\r\n else\r\n {\r\n $this->response(\r\n array(\r\n 'Status_code' => \"401\",\r\n 'Message' => \"ops something went wrong\"\r\n )\r\n ); \r\n }\r\n }", "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 }", "public function updateAllergyStatus(AllergyStatusRequest $request)\r\n {\r\n $allergy = $this->allergy->changeStatus($request);\r\n $message = trans('message.allergy_started_successfully');\r\n\r\n if(!$allergy->status) {\r\n $message = trans('message.allergy_discontinued_successfully');\r\n }\r\n\r\n return $this->respond([\r\n 'status' => 'success',\r\n 'message'=> $message\r\n ]);\r\n }", "protected function getRecordRegistrationStatus() {}", "function updateStatus(){\n $serv_ID=$this->uri->segment(3);\n $status=$this->input->post('status');\n if ($this->deliveryAndPickupModel->updateCustService($serv_ID, $status)) {\n echo \"<script>alert('Successfully Updated');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n else\n {\n echo \"<script>alert('Something when wrong');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n }", "public function update(Request $request, PregnancyStatus $pregnancyStatus)\n {\n //\n }", "public function testWebinarPollUpdate()\n {\n }", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->guest_post_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "public function updateUserStatus($email) {\n $registry = new Registry();\n // Database\n $db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);\n $registry->set('db', $db);\n $db->query(\"UPDATE \" . DB_PREFIX . \"customer SET status = 1, approved = 1 WHERE LOWER(email) = '\" . $db->escape(utf8_strtolower($email)) . \"'\");\n }", "function setStatus( $status )\n {\n\t if (is_int($status)) {\n\t\t \n\t\t switch ( $status ) {\n\t\t\t \n\t\t\t case RowManager_RegistrationManager::STATUS_REGISTERED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\t\t\t \t\n\t\t\t case RowManager_RegistrationManager::STATUS_INCOMPLETE:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\t\t\t \t\n\t\t\t case RowManager_RegistrationManager::STATUS_CANCELLED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\n\t\t\t case RowManager_RegistrationManager::STATUS_UNASSIGNED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\n\t\t }\n\n\t\t}\n\t}", "public function locationChangeStatus(Request $request) {\n $data = [\n 'status' => $request->status,\n ];\n\n $userCount = User::where('location_id',$request->locationid)->count();\n $userLocationCount = UserLocation::where('location_id',$request->locationid)->count();\n $salesAgentCount = Salesagentdetail::where('location_id',$request->locationid)->count();\n\n if(($userCount > 0 || $userLocationCount > 0 || $salesAgentCount > 0) && $request->status =='inactive') {\n return response()->json([ 'status' => 'error', 'message'=> 'Unable to deactivat of location, due to this location assigned to users.' ]);\n } else {\n\n $updateStatus = Salescenterslocations::where('id', $request->locationid)->update($data);\n\n if ($updateStatus) {\n if ($request->status =='active') {\n $message='Sales center location successfully activated.';\n } else {\n $message='Sales center location successfully deactivated';\n }\n return response()->json([ 'status' => 'success', 'message' => $message]);\n } else {\n return response()->json([ 'status' => 'error', 'message'=> 'Unable to update location' ]);\n }\n }\n }", "public function update(Request $request,PropertyStatus $propertyStatus)\n {\n $attribute = $request->validate([\n 'property_status'=>'required'\n ]);\n\n $attribute['updated_by'] = auth()->user()->name;;\n \n $propertyStatus->update($attribute); \n\n Session::flash('success',\"Registro actualizado satisfactoriamente\");\n\n return redirect()->route('property_status.index');\n }", "public function travel_conditions_status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->travel,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/travel-conditions/lists','refresh');\t\t\n\t}", "public function testUpdateStatusByUserId()\n {\n $session = $this->objectManager->create(\\Magento\\Security\\Model\\AdminSessionInfo::class);\n /** @var $session \\Magento\\Security\\Model\\AdminSessionInfo */\n $session->getResource()->updateStatusByUserId(\n \\Magento\\Security\\Model\\AdminSessionInfo::LOGGED_OUT_BY_LOGIN,\n 1,\n [1],\n [1],\n '2016-01-19 12:00:00'\n );\n $collection = $session->getResourceCollection()\n ->addFieldToFilter('main_table.user_id', 1)\n ->addFieldToFilter('main_table.status', \\Magento\\Security\\Model\\AdminSessionInfo::LOGGED_OUT_BY_LOGIN)\n ->load();\n $count = $collection->count();\n $this->assertGreaterThanOrEqual(1, $count);\n }", "public function setStatusTrue($event_id,$user_id,$subgroup_id) {\n\t\tDB::table('event_user')\n\t\t\t->where('myevent_id', $event_id)\n\t\t\t->where('user_id', $user_id)\n\t\t\t->where('subgroup_id', $subgroup_id)\n\t\t\t->update(array('status' => 1));\n\n\t\treturn Redirect::to(URL::previous());\n\t}", "public function update(EstablishmentRegisterRequest $request, $id)\n {\n $data = Establishment::byId($id)->with('users')->firstOrFail();\n $data->status = $request->input('status') ? \"1\" : \"0\";\n $data->branch_no = $request->input('branch_no');\n $data->save();\n \n // Update the user data\n if (isset($data->users)) {\n $data->users()->update(['active' => $data->status]);\n }\n \n return trans('governments_registeration.updated');\n }", "public function update(){\n var_dump(parent::update_register($_POST) ? header('location: ?controller=admin'): 'Error al actualizar');\n\n die();\n }", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function updateCommunityMemberStatus() {\n $community_id = $this->request->params ['named'] ['community_id'];\n $community_owner = $this->Community->find('first', array(\n 'conditions' => array('Community.id' => $community_id),\n 'fields' => array('Community.created_by')\n ));\n $community_owner = $community_owner['Community']['created_by'];\n $user_id = $this->request->params ['named'] ['user_id'];\n $status = $this->request->params ['named'] ['status'];\n $current_user = $this->Auth->user('id');\n $conditions = array(\n 'CommunityMember.user_id' => $user_id,\n 'CommunityMember.community_id' => $community_id\n );\n $current_user_type = $this->CommunityMember->getCommunityMemberUserType($community_id, $current_user);\n if ($this->CommunityMember->hasAny($conditions) && $current_user_type >= CommunityMember::USER_TYPE_ADMIN) {\n $communityMemberRecordId = $this->CommunityMember->find('first', array(\n 'conditions' => $conditions,\n 'fields' => array('CommunityMember.id')\n ));\n $communityMemberRecordId = $communityMemberRecordId['CommunityMember']['id'];\n $requested_user = $this->User->getUserDetails($user_id);\n $requested_user['user_name'] = Common::getUsername($requested_user['user_name'], $requested_user['first_name'], $requested_user['last_name']);\n switch ($status) {\n case 'add':\n //setting staus to Approved.\n\t\t\t\t\t$set_status = 1;\n\t\t\t\t\t$updateCommunityMember = array(\n\t\t\t\t\t\t'CommunityMember' => array(\n\t\t\t\t\t\t\t'id' => $communityMemberRecordId,\n\t\t\t\t\t\t\t'status' => $set_status,\n\t\t\t\t\t\t\t'joined_on' => Date::getCurrentDateTime()\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t$this->CommunityMember->save($updateCommunityMember);\n\n\t\t\t\t\t//Community follow data\n\t\t\t\t\t$followCommunityData = array(\n\t\t\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t\t\t'page_id' => $community_id,\n\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t'notification' => FollowingPage::NOTIFICATION_ON\n\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\t$this->FollowingPage->followPage($followCommunityData);\n\n\t\t\t\t\t$updated_member_count = $this->Community->changeMemberCount($community_id, 1);\n\t\t\t\t\t$result_message = $requested_user['user_name'] . \" has been added as a member to the community.\";\n\t\t\t\t\t$result = array(\n\t\t\t\t\t\t'success' => 'success',\n\t\t\t\t\t\t'member_count' => $updated_member_count,\n\t\t\t\t\t\t'message' => $result_message\n\t\t\t\t\t);\n break;\n case 'ignore':\n //Reject the request. Delete the entry from table.\n\t\t\t\t\tif ($this->CommunityMember->delete($communityMemberRecordId)) {\n\t\t\t\t\t\t//Community unfollow data\n\t\t\t\t\t\t$followCommunityData = array(\n\t\t\t\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t\t\t\t'page_id' => $community_id,\n\t\t\t\t\t\t\t'user_id' => $user_id\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->FollowingPage->unFollowPage($followCommunityData);\n\n\t\t\t\t\t\t$result_message = $requested_user['user_name'] . \" is denied from joining the community.\";\n\t\t\t\t\t\t$result = array(\n\t\t\t\t\t\t\t'success' => 'success',\n\t\t\t\t\t\t\t'message' => $result_message\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n case 'update_admin':\n //update member type to admin or remove the existing secondary admin\n if ($community_owner == $current_user && $user_id != $community_owner) {\n $memberTypeNow = $this->CommunityMember->getCommunityMemberUserType($community_id, $user_id);\n if ($memberTypeNow == CommunityMember::USER_TYPE_MEMBER) {\n $setMemberType = CommunityMember::USER_TYPE_ADMIN;\n $result_message = \"You have set \" . $requested_user['user_name'] . \" as a secondary admin for this community.\";\n } else {\n $setMemberType = CommunityMember::USER_TYPE_MEMBER;\n $result_message = $requested_user['user_name'] . \" is removed from the secondary admin list of this community.\";\n }\n $updateCommunityMember = array(\n 'CommunityMember' => array(\n 'id' => $communityMemberRecordId,\n 'user_type' => $setMemberType\n )\n );\n $this->CommunityMember->save($updateCommunityMember);\n $this->sendMailToNewSecondaryAdmin($community_id, $user_id, $setMemberType); //send mail to new added secondary admin.\n $result = array(\n 'success' => 'success',\n 'message' => $result_message\n );\n } else {\n $result = array(\n 'success' => 'danger',\n 'message' => 'Cannot change member type'\n );\n }\n break;\n default :\n $result = array(\n 'success' => 'danger',\n 'message' => 'invalid status'\n );\n break;\n exit;\n }\n } else {\n $result = array(\n 'success' => 'danger',\n 'message' => 'The user is not a member of the Community.'\n );\n }\n print_r(json_encode($result));\n exit;\n }", "public function test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function setRegistrant($value) {\n\t\tself::$_registrant = $value;\n\t}", "function updatePaymentStatus(){\r\n $payment = new managePaymentModel();\r\n $payment->cust_ID = $_SESSION['cust_ID'];\r\n $payment->updatePaymentStatus();\r\n }", "public function executeChangePracticeAreaStatus(sfWebRequest $request)\n {\n\t\tif(clsCommon::chkDataExist(\"WebsitePracticeArea\", $request->getParameter('id'), $this->getUser()->getAttribute('personalWebsiteId')))\n\t\t{\n\t\t\t$snId \t\t= \t$request->getParameter('id');\n\t\t\t$ssStatus \t= \t$request->getParameter('status');\n\t\t\t$oWebsitePracticeArea = new WebsitePracticeArea();\n\t\t\t$oWebsitePracticeArea->changeStatus($snId, $ssStatus);\n\n\t\t\tif($ssStatus == sfConfig::get(\"app_Status_Active\"))\n\t\t\t$successMessage = \"active\";\n\t\t\telse\n\t\t\t$successMessage = \"inactive\";\n\n\t\t\t$this->getUser()->setFlash(\"succMsg\",'Status successfully changed to '.$successMessage.'.');\n\n\t\t\t$this->redirect('WebsitePracticeArea/index');\n }\n else\n\t\t{\n\t\t\t$this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n\t\t\t$this->redirect('default/index');\n\t\t}\n }", "function update_user_status($id, $pref, $value, $deprecated = \\null)\n {\n }", "function changeStatusQualfications($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\t\t\n $StatusID=$post['StatusID'];\n\t$QualificationID=$post['QualificationID'];\n\t\n\t\n\t $errorMsg=\"Error in updation\";\n\t\t$result2 = mysql_query(\"SELECT * FROM SCP_Qualification_Staff WHERE QualificationID='\".$QualificationID.\"'\")or die(mysql_error());\n\t\t$num_rows = mysql_num_rows($result2);\n\t\t\n\n\t\tif($num_rows>0){\n\t\t $result = '';\n\t\t $errorMsg = 'Sorry, you do not deactivate this Qualification, it is already assigned to some staff.';\n\t\t}else{\n\t\t \t$sql2=\"UPDATE `SCP_Qualification` SET `StatusID` = '\".$StatusID.\"' WHERE `QualificationID` = '\".$QualificationID.\"'\";\t \n $result = mysql_query($sql2) or die(mysql_error());\n\t\t}\n\t\t\t\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Updated successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = $errorMsg;\n $data['responseCode'] = \"200\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "public function testStatusConfirm()\n {\n\n }", "public function onRegistrantApproved(MeetingRegistrantApproved $event) {\n\n $registrant = $this->getRegistrantFromEvent($event);\n\n if(!empty($registrant)){\n $this->logEvent($event);\n\n try{\n foreach ($registrant->occurrences as $occurrence){\n if(is_array($occurrence)){\n $occurrence = (object)$occurrence;\n }\n RegistrantModel::whereMeetingId($registrant->meeting_id)->whereRegistrantId($registrant->registrant_id)->whereOccurrenceId($occurrence->occurrence_id)->update(['status' => 'approved']);\n }\n\n event(new SendApproveRegistrant($registrant));\n $this->logFinishEvent();\n }catch (\\Exception $exception){\n $this->logFailedEvent($exception);\n }\n }else{\n $this->logNotFoundEvent();\n }\n\n\n\n }", "public static function LogInStatusUpdate($status)\n {\t\n\t\t$loginstatuschange = \\App\\AppUser::where('email',\\Auth::guard('appUser')->user()->email )->update(array('login_status'=>$status));\n\t\treturn $loginstatuschange;\n\t\t//return 1; \n }", "function updateNotificationStatus($userData)\n\t\t{\n\t\t\t//update status\n\t\t\t$update = $this->manageContent->updateValueWhere('notification_info', 'view_status', 1, 'notification_id', $userData['noti_id']);\n\t\t\techo $update;\n\t\t}", "public function testUpdateSiteMembershipRequestForPerson()\n {\n }", "public function onChangeStatus(){\n \n if (($groupId = post('groupId')) != ''){\n \n $group = UserGroup::findOrFail($groupId);\n \n if (($status = post('status')) != ''){\n $user = $this->getuser();\n \n switch ($status){\n case UserGroup::MEMBERSHIP_ACCEPTED:\n $group->acceptMembership($user);\n break;\n \n case UserGroup::MEMBERSHIP_REJECTED:\n \t$group->rejectMembership($user);\n \tbreak;\n \t\n \tcase UserGroup::MEMBERSHIP_CANCELLED:\n \t\t$group->cancelMembership($user);\n \t\tbreak; \t \n \n } \n }\n }\n \n \n // Updated list of request and other vars\n $this->prepareVars();\n }", "public function UserListChangeStatus(): void{\n \n if(!ArtworkVerifier::setStatusList($_POST) || !Session::isLogin()){\n exit;\n }\n \n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id)){\n UserList::values([ 'user_list.status' => $_POST['status'] ])\n ->where('user_id' ,Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->update();\n exit;\n }\n }", "public function updatestatus($client_id,$salescenter_id,Request $request)\n {\n\n $user = User::find($request->userid);\n $user->status = $request->status;\n $user->save();\n return redirect()->route('client.salescenter.users',['client_id' => $client_id,'salescenter_id' =>$salescenter_id ])\n ->with('success','User successfully updated.');\n }", "public function test_wp_create_user_request_confirmed_status() {\n\t\t$actual = wp_create_user_request( self::$non_registered_user_email, 'export_personal_data', array(), 'confirmed' );\n\t\t$post = get_post( $actual );\n\n\t\t$this->assertSame( 'request-confirmed', $post->post_status );\n\t}", "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 updateStatus() {\n $ref = ORM::forTable('referrals')\n ->findOne($this->data['id']);\n if ($this->data['status'] == 'Assigned' && $this->data['route_id']) {\n $route = ORM::forTable('estimate_routes')\n ->findOne($this->data['route_id']);\n $assignedReferralsCount = ORM::forTable('referrals')\n ->select('id')\n ->where('route_id', $route->id)\n ->count();\n $ref->route_id = $this->data['route_id'];\n $ref->status = 'Assigned';\n $ref->route_order = $assignedReferralsCount;\n\n } elseif ($this->data['status'] == 'Pending') {\n $ref->status = 'Pending';\n $ref->route_order = 0;\n $ref->route_id = NULL;\n } else {\n $ref->status = $this->data['status'];\n }\n if ($ref->save()) {\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request status updated successfully'\n ]);\n } else {\n $this->renderJson([\n 'success' => false,\n 'message' => 'An error has occurred while saving job request'\n ]);\n }\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 }", "static function set_invite_status(RowUpdate &$upd, RowResult $entity, $status) {\r\n $link_name = null;\r\n\r\n if ($entity->base_model == 'User') {\r\n $link_name = 'users';\r\n } elseif ($entity->base_model == 'Contact') {\r\n $link_name = 'contacts';\r\n }\r\n\r\n if ($link_name != null) {\r\n $id = $entity->getField('id');\r\n $params[$id] = array('name' => 'accept_status', 'value' => $status);\r\n $upd->addUpdateLink($link_name, $id, $params);\r\n }\r\n }", "public function updateRegister(Gest $dto): bool\n {\n }", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->news_letter_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "public function check_and_update_license_status() {\n\n\t\tswitch ( $status = $this->client->get_status() ) {\n\n\t\t\tcase 'valid' :\n\t\t\tcase 'expired' :\n\t\t\t\t$this->set_license_status( $status );\n\t\t\t\tbreak;\n\t\t\tcase 'site_inactive' :\n\t\t\t\tif ( ! is_wp_error( $this->client->activate() ) ) {\n\t\t\t\t\t$this->set_license_status( 'valid' );\n\t\t\t\t} else {\n\t\t\t\t\t$this->set_license_status( $status );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t$this->set_license_status( 'invalid' );\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}", "public function actionUpdateStatus()\n { \n $user_id = Yii::$app->user->identity->id;\n $model = Users::find()->where(['id'=>$user_id])->one();\n $model->step_validate = 2;\n $model->load(Yii::$app->getRequest()->getBodyParams(), '');\n if ($model->validate()) {\n $model->save();\n $response = \\Yii::$app->getResponse();\n $response->setStatusCode(202);\n return $model->getUsersStatusValues();\n }\n else {\n throw new HttpException(422, json_encode($model->errors, JSON_UNESCAPED_UNICODE));\n }\n }", "function change_status()\n {\n //Create Model Object\n $groupObj=new groupModel();\n \n //change status\n $groupObj->changeStatus();\n\n $msg=\"Group Type status has been activated successfully\";\n if($_GET['newstatus']=='0')\n {\n $msg=\"Group Type status has been deactivated successfully\";\n }\n\n echo json_encode(array(\"result\" => \"success\",\"title\" => \"Group Status\",\"message\" => $msg));\n exit();\n }", "public function restaurant_update_status($restaurant_id = '') {\n\t global $foodbakery_plugin_options;\n\t $foodbakery_restaurants_review_option = isset($foodbakery_plugin_options['foodbakery_restaurants_review_option']) ? $foodbakery_plugin_options['foodbakery_restaurants_review_option'] : '';\n\n\t $get_restaurant_id = foodbakery_get_input('restaurant_id', 0);\n\t $is_updating = false;\n\t if ($get_restaurant_id != '' && $get_restaurant_id != 0 && $this->is_publisher_restaurant($get_restaurant_id)) {\n\t\t$is_updating = true;\n\t }\n\n\t $user_data = wp_get_current_user();\n\n\t if ($foodbakery_restaurants_review_option == 'on') {\n\t\tupdate_post_meta($restaurant_id, 'foodbakery_restaurant_status', 'awaiting-activation');\n\t\t// Restaurant not approved\n\t\tdo_action('foodbakery_restaurant_not_approved_email', $user_data, $restaurant_id);\n\t } else {\n\t\tupdate_post_meta($restaurant_id, 'foodbakery_restaurant_status', 'active');\n\t\t// Restaurant approved\n\t\tdo_action('foodbakery_restaurant_approved_email', $user_data, $restaurant_id);\n\n\t\t// social sharing\n\t\t$get_social_reach = get_post_meta($restaurant_id, 'foodbakery_transaction_restaurant_social', true);\n\t\tif ($get_social_reach == 'on') {\n\t\t do_action('foodbakery_restaurant_social_post', $restaurant_id);\n\t\t}\n\t }\n\n\t $foodbakery_free_restaurants_switch = isset($foodbakery_plugin_options['foodbakery_free_restaurants_switch']) ? $foodbakery_plugin_options['foodbakery_free_restaurants_switch'] : '';\n\n\t if ($foodbakery_free_restaurants_switch != 'on') {\n\n\t\t$foodbakery_package_id = get_post_meta($restaurant_id, 'foodbakery_restaurant_package', true);\n\t\tif ($foodbakery_package_id) {\n\t\t $foodbakery_package_data = get_post_meta($foodbakery_package_id, 'foodbakery_package_data', true);\n\n\t\t $restaurant_duration = isset($foodbakery_package_data['restaurant_duration']['value']) ? $foodbakery_package_data['restaurant_duration']['value'] : 0;\n\n\t\t // calculating restaurant expiry date\n\t\t $foodbakery_trans_restaurant_expiry = $this->date_conv($restaurant_duration, 'days');\n\t\t update_post_meta($restaurant_id, 'foodbakery_restaurant_expired', strtotime($foodbakery_trans_restaurant_expiry));\n\t\t}\n\t }\n\t}", "public function updateTask()\n\t{\n\t\t// Check if the user is logged in\n\t\tif (User::isGuest())\n\t\t{\n\t\t\tNotify::warning(Lang::txt('COM_MEMBERS_NOT_LOGGEDIN'));\n\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . 'task=' . $this->_task, false, true)), false)\n\t\t\t);\n\t\t\t//return App::abort(500, Lang::txt('COM_MEMBERS_REGISTER_ERROR_SESSION_EXPIRED'));\n\t\t}\n\n\t\t$force = false;\n\t\t$updateEmail = false;\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\t// Instantiate a new registration object\n\t\t$xregistration = new \\Components\\Members\\Models\\Registration();\n\n\t\t$xprofile = Member::oneOrFail(User::get('id'));\n\n\t\t$hzal = \\Hubzero\\Auth\\Link::find_by_id(User::get('auth_link_id'));\n\n\t\t// Get users component config options, specifically whether or not 'simple' registration is enabled\n\t\t$method = Request::getMethod();\n\t\t$usersConfig = Component::params('com_members');\n\t\t$simpleRegistration = $usersConfig->get('simple_registration', false);\n\n\t\tif ($method == 'POST')\n\t\t{\n\t\t\t// Load POSTed data\n\t\t\t$xregistration->loadPost();\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\t\t}\n\t\telse\n\t\t{\n\t\t\t// Load data from the user object\n\t\t\t$xregistration->loadProfile($xprofile);\n\n\t\t\t$username = User::get('username');\n\t\t\t$email = User::get('email');\n\n\t\t\tif ($username[0] == '-' && is_object($hzal))\n\t\t\t{\n\t\t\t\t$sub_email = explode('@', (string) $hzal->email, 2);\n\t\t\t\t$tmp_username = Session::get('auth_link.tmp_username', $sub_email[0]);\n\t\t\t\t$xregistration->set('login', $tmp_username);\n\t\t\t\t$xregistration->set('orcid', Session::get('auth_link.tmp_orcid', ''));\n\t\t\t\t$xregistration->set('email', $hzal->email);\n\t\t\t\t$xregistration->set('confirmEmail', $hzal->email);\n\n\t\t\t\tif ($simpleRegistration)\n\t\t\t\t{\n\t\t\t\t\t$force = false;\n\t\t\t\t\t$method = 'POST';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$force = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Profile info\n\t\t\t$member = Member::oneOrNew(User::get('id'));\n\t\t\t$entries = $member->profiles();\n\n\t\t\t$p = $entries->getTableName();\n\t\t\t$f = \\Components\\Members\\Models\\Profile\\Field::blank()->getTableName();\n\t\t\t$o = \\Components\\Members\\Models\\Profile\\Option::blank()->getTableName();\n\n\t\t\t$profiles = $entries\n\t\t\t\t->select($p . '.*,' . $o . '.label')\n\t\t\t\t->join($f, $f . '.name', $p . '.profile_key', 'inner')\n\t\t\t\t->joinRaw($o, $o . '.field_id=' . $f . '.id AND ' . $o . '.value=' . $p . '.profile_value', 'left')\n\t\t\t\t->ordered()\n\t\t\t\t->rows();\n\n\t\t\t// Gather data to pass to the form processor\n\t\t\t$profile = \\Components\\Members\\Models\\Profile::collect($profiles);\n\n\t\t\t$xregistration->_registration['_profile'] = $profile;\n\t\t}\n\n\t\t$check = $xregistration->check('update');\n\n\t\t// Validate profile data\n\t\t$fields = \\Components\\Members\\Models\\Profile\\Field::all()\n\t\t\t->including(['options', function ($option){\n\t\t\t\t$option\n\t\t\t\t\t->select('*');\n\t\t\t}])\n\t\t\t->where('action_create', '!=', \\Components\\Members\\Models\\Profile\\Field::STATE_HIDDEN)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Validate profile fields\n\t\tif ($fields->count())\n\t\t{\n\t\t\t$form = new \\Hubzero\\Form\\Form('profile', array('control' => 'profile'));\n\t\t\t$form->load(\\Components\\Members\\Models\\Profile\\Field::toXml($fields, 'create', $profile));\n\t\t\t$form->bind(new \\Hubzero\\Config\\Registry($profile));\n\n\t\t\tif (!$form->validate($profile))\n\t\t\t{\n\t\t\t\t$check = false;\n\n\t\t\t\tforeach ($form->getErrors() as $key => $error)\n\t\t\t\t{\n\t\t\t\t\tif ($error instanceof \\Hubzero\\Form\\Exception\\MissingData)\n\t\t\t\t\t{\n\t\t\t\t\t\t$xregistration->_missing[$key] = $error;\n\t\t\t\t\t}\n\n\t\t\t\t\t$xregistration->_invalid[$key] = $error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$force && $check && $method == 'GET')\n\t\t{\n\t\t\tSession::set('registration.incomplete', false);\n\t\t\tif ($_SERVER['REQUEST_URI'] == rtrim(Request::base(true), '/') . '/register/update'\n\t\t\t || $_SERVER['REQUEST_URI'] == rtrim(Request::base(true), '/') . '/members/register/update')\n\t\t\t{\n\t\t\t\tApp::redirect(rtrim(Request::base(true), '/') . '/');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tApp::redirect($_SERVER['REQUEST_URI']);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!$force && $check && $method == 'POST')\n\t\t{\n\t\t\t// Before going any further, we need to do a sanity check to make sure username isn't being changed.\n\t\t\t// This really only happens on a race condition where someone is creating the same account\n\t\t\t// using a 3rd party auth service in two different browsers. Yes, it's crazy!\n\t\t\tif ($xregistration->get('login') && substr(User::get('username'), 0, 1) == '-')\n\t\t\t{\n\t\t\t\t// Make sure the username hasn't since been set in the database\n\t\t\t\tif (substr(User::getInstance(User::get('id'))->get('username'), 0, 1) != '-')\n\t\t\t\t{\n\t\t\t\t\tApp::redirect(\n\t\t\t\t\t\tRoute::url('index.php?option=com_users&view=login&view=logout'),\n\t\t\t\t\t\tLang::txt('This account appears to already exist. Please try logging in again.'),\n\t\t\t\t\t\t'warning'\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$hubHomeDir = rtrim($this->config->get('homedir'), DS);\n\n\t\t\t$updateEmail = false;\n\n\t\t\tif ($xprofile->get('homeDirectory') == '')\n\t\t\t{\n\t\t\t\t$xprofile->set('homeDirectory', $hubHomeDir . DS . $xprofile->get('username'));\n\t\t\t}\n\n\t\t\tif ($xprofile->get('registerIP') == '')\n\t\t\t{\n\t\t\t\t$xprofile->set('registerIP', Request::getString('REMOTE_ADDR', '', 'server'));\n\t\t\t}\n\n\t\t\tif ($xprofile->get('registerDate') == '')\n\t\t\t{\n\t\t\t\t$xprofile->set('registerDate', Date::toSql());\n\t\t\t}\n\n\t\t\tif ($xregistration->get('email') != $xprofile->get('email'))\n\t\t\t{\n\t\t\t\tif (is_object($hzal) && $xregistration->get('email') == $hzal->email)\n\t\t\t\t{\n\t\t\t\t\t$xprofile->set('activation', 3);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$code = \\Components\\Members\\Helpers\\Utility::genemailconfirm();\n\t\t\t\t\t$xprofile->set('activation', $code);\n\t\t\t\t\t$updateEmail = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($xregistration->get('login') != $xprofile->get('username'))\n\t\t\t{\n\t\t\t\t$xprofile->set('homeDirectory', $hubHomeDir . DS . $xregistration->get('login'));\n\t\t\t}\n\n\t\t\t$keys = array('email', 'name', 'surname', 'givenName', 'middleName', 'usageAgreement', 'sendEmail', 'password');\n\t\t\tforeach ($keys as $key)\n\t\t\t{\n\t\t\t\tif ($xregistration->get($key) !== null)\n\t\t\t\t{\n\t\t\t\t\t$xprofile->set($key, $xregistration->get($key));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$xprofile->set('username', $xregistration->get('login'));\n\n\t\t\tif ($xprofile->save())\n\t\t\t{\n\t\t\t\t$access = array();\n\t\t\t\tforeach ($fields as $field)\n\t\t\t\t{\n\t\t\t\t\t$access[$field->get('name')] = $field->get('access');\n\t\t\t\t}\n\n\t\t\t\t$profile = $xregistration->_registration['_profile'];\n\n\t\t\t\t// Save profile data\n\t\t\t\t$member = Member::oneOrNew($xprofile->get('id'));\n\t\t\t\tif (!$member->saveProfile($profile, $access))\n\t\t\t\t{\n\t\t\t\t\t\\Notify::error($member->getError());\n\t\t\t\t\t// Don't stop the registration process!\n\t\t\t\t\t// At this point, the account was successfully created.\n\t\t\t\t\t// The profile info, however, may have issues. But, it's not crucial.\n\t\t\t\t\t//$result = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update current session if appropriate\n\t\t\t// TODO: update all session of this user\n\t\t\t// TODO: only update if changed\n\t\t\tif ($xprofile->get('id') == User::get('id'))\n\t\t\t{\n\t\t\t\t$suser = Session::get('user');\n\t\t\t\t$suser->set('username', $xprofile->get('username'));\n\t\t\t\t$suser->set('email', $xprofile->get('email'));\n\t\t\t\t$suser->set('name', $xprofile->get('name'));\n\t\t\t\tSession::set('user', $suser);\n\n\t\t\t\t// Update the session entry\n\t\t\t\t// @TODO: Use a model rather than direct query\n\t\t\t\t$database = App::get('db');\n\t\t\t\t$database->setQuery(\n\t\t\t\t\t\"UPDATE `#__session`\n\t\t\t\t\tSET `username`=\" . $database->quote($xprofile->get('username')) . \"\n\t\t\t\t\tWHERE `session_id`=\" . $database->quote(Session::getId())\n\t\t\t\t);\n\t\t\t\t$database->query();\n\t\t\t}\n\n\t\t\tSession::set('registration.incomplete', false);\n\n\t\t\t// Notify the user\n\t\t\tif ($updateEmail)\n\t\t\t{\n\t\t\t\t\\Components\\Members\\Helpers\\Utility::sendConfirmEmail($xprofile, $xregistration);\n\t\t\t}\n\n\t\t\t// Notify administration\n\t\t\tif ($method == 'POST')\n\t\t\t{\n\t\t\t\t$subject = Config::get('sitename') .' '.Lang::txt('COM_MEMBERS_REGISTER_EMAIL_ACCOUNT_UPDATE');\n\n\t\t\t\t$eaview = new \\Hubzero\\Component\\View(array(\n\t\t\t\t\t'name' => 'emails',\n\t\t\t\t\t'layout' => 'adminupdate'\n\t\t\t\t));\n\t\t\t\t$eaview->option = $this->_option;\n\t\t\t\t$eaview->controller = $this->_controller;\n\t\t\t\t$eaview->sitename = Config::get('sitename');\n\t\t\t\t$eaview->xprofile = $xprofile;\n\t\t\t\t$eaview->baseURL = $this->baseURL;\n\t\t\t\t$message = $eaview->loadTemplate();\n\t\t\t\t$message = str_replace(\"\\n\", \"\\r\\n\", $message);\n\t\t\t}\n\n\t\t\tif (!$updateEmail)\n\t\t\t{\n\t\t\t\t$suri = urldecode(Request::getString('return', ''));\n\t\t\t\tif (!$suri)\n\t\t\t\t{\n\t\t\t\t\t$suri = Request::getString('REQUEST_URI', '/', 'server');\n\t\t\t\t}\n\n\t\t\t\tif ($suri == '/register/update' || $suri == '/members/update' || $suri == '/members/register/update')\n\t\t\t\t{\n\t\t\t\t\t$suri = Route::url('index.php?option=' . $this->_option . '&task=myaccount');\n\t\t\t\t}\n\n\t\t\t\tApp::redirect(\n\t\t\t\t\t$suri\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Instantiate a new view\n\t\t\t\t$this->view\n\t\t\t\t\t->set('title', Lang::txt('COM_MEMBERS_REGISTER_UPDATE'))\n\t\t\t\t\t->set('sitename', Config::get('sitename'))\n\t\t\t\t\t->set('xprofile', $xprofile)\n\t\t\t\t\t->set('isSelf', true)\n\t\t\t\t\t->set('updateEmail', $updateEmail)\n\t\t\t\t\t->setErrors($this->getErrors())\n\t\t\t\t\t->display();\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn $this->_show_registration_form($xregistration, 'update');\n\t}", "public function testUpdateSiteMembership()\n {\n }", "private function changeStatusCareOrg() {\n if ($this->get_request_method() != \"POST\") {\n $error = array('status_code' => \"0\", 'message' => \"wrong method\", 'response_code' => \"406\");\n $this->response($this->json($error), 406);\n }\n\n $arr = array();\n if(@$_POST['reqparams']) {\n $post = $_POST['reqparams'];\n $UserID = $post['UserID'];\n $StatusID = $post['StatusID'];\n } else {\n $UserID = $_POST['UserID'];\n $StatusID = $_POST['StatusID'];\n }\n\n mysql_query(\"UPDATE `SCP_UserLogin` SET `StatusID`='$StatusID' WHERE `UserID` = '$UserID'\", $this->db);\n mysql_query(\"UPDATE `SCP_CareOrg` SET `StatusID`='$StatusID' WHERE `UserID` = '$UserID'\", $this->db);\n mysql_query(\"UPDATE `SCP_UserAccess` SET `StatusID`='$StatusID' WHERE `UserID` = '$UserID'\", $this->db);\n\n $success = true;\n\n if ($success) {\n $error = array('status_code' => \"1\", 'status' => \"success\", 'message' => \"Changed Organization Status Successfully\", 'response_code' => \"200\", 'response_data' => $arr);\n $this->response($this->json($error), 200);\n } else {\n $error = array('status_code' => \"0\", 'status' => \"error\", 'message' => \"validation error\", 'response_code' => \"200\", 'response_data' => $arr);\n $this->response($this->json($error), 200);\n }\n }", "public function userLiveStatusUpdate_post() {\n $this->form_validation->set_rules('ContestGUID', 'ContestGUID', 'trim|required|callback_validateEntityGUID[Contest,ContestID]');\n $this->form_validation->set_rules('UserGUID', 'UserGUID', 'trim|callback_validateEntityGUID[User,UserID]');\n $this->form_validation->set_rules('UserStatus', 'UserStatus', 'trim|required|in_list[Yes,No]');\n $this->form_validation->set_rules('SeriesGUID', 'SeriesGUID', 'trim|required|callback_validateEntityGUID[Series,SeriesID]');\n $this->form_validation->validation($this); /* Run validation */\n $AuctionStatus = $this->SnakeDrafts_model->userLiveStatusUpdate($this->Post, $this->ContestID, $this->UserID, $this->SeriesID);\n if ($AuctionStatus) {\n $this->Return['Message'] = \"User status successfully updated.\";\n $this->Return['Data']['DraftUserLiveTime'] = date('Y-m-d H:i:s');\n } else {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = \"User status already updated.\";\n }\n }", "public function admin_status($id = '', $status = '') {\n\n $this->checkAccess('Promocode', 'can_edit');\n $id = base64_decode($id);\n\n $is_valid = true;\n $name = $email = '';\n if('' == $id || '' == $status){\n $is_valid = false;\n }else{\n $check_user_exists = $this->Promocode->Find('first', array('fields' => array('Promocode.code'), 'conditions' => array('Promocode.id' => $id)));\n if (empty($check_user_exists)) {\n $is_valid = false;\n }\n }\n\n if($is_valid) {\n\n $this->Promocode->updateAll(array('Promocode.status' => \"'\" . $status . \"'\"), array('Promocode.id' => $id));\n \n $this->Session->setFlash('Promocode status has been changed successfully', 'success');\n $this->redirect(Router::url( $this->referer(), true ));\n\n }else{\n $this->Session->setFlash('Invalid Request', 'error');\n $this->redirect(array('plugin' => false, 'controller' => 'promocodes', 'action' => 'index', 'admin' => true));\n }\n }", "public function respon(){\n //update 'status'\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 ajaxStaffStatus() {\n\t\t$this->autoRender = false;\n\t\t$this->viewBuilder()->setLayout(false);\n\t\tif ($this->request->is('ajax')) {\n\t\t\t$id = $this->request->getData()['id'];\n\t\t\t$status = $this->request->getData()['status'];\n\t\t\t$data = $this->Users->get($id);\n\n\t\t\t$user = $this->Users->patchEntity($data, ['status' => $status]);\n\n\t\t\tif ($this->Users->save($user)) {\n\t\t\t\t$message = ($status == 1) ? 'Staff is Active now.' : 'Staff is InActive now.';\n\t\t\t\techo json_encode(array('status' => 'success', 'message' => $message));\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$message = ($status == 1) ? 'Error while updating staff status to Active.' : 'Error while updating staff status to InActive.';\n\t\t\techo json_encode(array('status' => 'error', 'message' => $message));\n\t\t\texit;\n\t\t}\n\t}", "public function putUpdateInvitationStatus($data)\n {\n DB::beginTransaction();\n try{\n $invite = UserInvite::checkUsersInvite($data['inviteId'],Auth::user()->user_id);\n if(is_object($invite)) {\n \n $invite = UserInvite::updateInviteStatus($invite,$data['status']);\n $notification = NotificationsLogs::getNotificationById($invite['notification_id']);\n NotificationsLogs::updateInviteNotificstionStatus($notification, $data['status'],Constant::$userReadNotification);\n self::sendInviteNotification($invite['user_id'],self::inviteStatusMessage($data['status']), Constant::$ACCEPT_REJECT_INVITE_NOTIFICATION);\n $result = $this->renderSuccess(trans('messages.invite_status_updated'),$invite);\n } \n else {\n $result = $this->renderFailure(trans('messages.not_authorised_to_update_invite'), StatusCode::$EXCEPTION,[]);\n }\n DB::commit();\n }\n catch(\\Exception $e){\n DB::rollback();\n UtilityHelper::logExceptionWithObject(__METHOD__, $e);\n $result = $this->renderFailure(trans('messages.error.exception'), Response::HTTP_OK);\n }\n return $result;\n }", "public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }", "public function statusAction(){\n $this->_models->changeStatusIcons($this->_arrParam,array('task' => 'change-submit-status'));\n redirect::locationHeader('admin','user','index');\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 update(Request $request){ \n $restaurant = Restaurant::find($request->user_id);\n $restaurant->active = $request->status;\n $restaurant->save();\n $user = $restaurant->user;\n $user->active = $request->status;\n $user->save();\n $response['restaurant'] = $restaurant;\n return response()->json($response, $this-> successStatus); \n }", "public function testSchedulesUpdateOut()\n {\n $result = $this->visit('events/{event}/schedules/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function change_user_status(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\n\t\t\t$user_id = $this->uri->segment(5,0);\r\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\r\n\t\t\t$newdata = array('status' => $status);\r\n\t\t\t$condition = array('id' => $user_id);\r\n\t\t\t$this->seller_model->update_details(USERS,$newdata,$condition);\r\n\t\t\t$this->setErrorMessage('success','Seller Status Changed Successfully');\r\n\t\t\tredirect('admin/seller/display_seller_list');\r\n\t\t}\r\n\t}", "public function updateInviteStatus($cell_number, $invitation_status){\n return DB::table('my_friends')->where('cell_number', $cell_number)->update(['invitation_status'=>$invitation_status]);\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 update(){\n var_dump(parent::update_register($_POST) ? header('location:?controller=factura&method=create'): 'Error al actualizar');\n\n die();\n }", "public function updateStatus()\n {\n $this->Invoice->updateInvoiceStatus($this->input->post('id'));\n }", "public function status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->policy_duration,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/policy-duration/lists','refresh');\t\t\n\t}", "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}", "public function vendorChangeStatus(Request $request)\n {\n $validator=Validator::make($request->all(), [\n 'user_id' => 'required',\n 'vendor_id' => 'required',\n 'tag'=>'required',\n 'gig_id'=>'required',\n 'status'=>'required'\n ]);\n if ($validator->fails())\n {\n return response(array(\n 'success'=>0,\n 'data'=>$validator->errors()\n ));\n }\n else\n {\n $response=VendorServiceGig::where(['id'=>$request->gig_id,'vendor_id'=>$request->vendor_id])->update([\n 'status'=>$request->status\n ]);\n if($response)\n {\n return response(array(\n 'success'=>1,\n 'msg'=>'Successfully Updated'\n ));\n }\n else {\n return response(array(\n 'success'=>0,\n 'msg'=>'Something Went Wrong'\n ));\n }\n }\n }", "public function updateStatus(){\t\t\tif( is_null( $this->id ) ) trigger_error( \"User::update(): Attempt to update a user object that does not have its ID property set.\", E_USER_ERROR );\r\n\t\t\t\r\n\t\t\r\n\r\n\t\t\t//Update the object\r\n\t\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\t\t\r\n\t\t\t$sql = \"UPDATE \".TABLENAME_GROUPS.\" SET status=:status WHERE id = :id\";\r\n\t\t\t$st = $conn->prepare( $sql );\r\n\t\t\t$st->bindValue( \":status\", $this->status, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t\techo \"<br>\";\r\n\t\t\t$st->execute();\r\n\t\t//\tprint_r($st->errorInfo());\r\n\t\t\t$conn = null;\t\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}", "function changeStatusGroup($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\t\t\n $StatusID=$post['StatusID'];\n\t$GroupID=$post['GroupID'];\n\t\n\t\n\t $errorMsg=\"Error in updation\";\n\t\t$result2 = mysql_query(\"SELECT * FROM SCP_Groups_Staff WHERE GroupID='\".$GroupID.\"'\")or die(mysql_error());\n\t\t$num_rows = mysql_num_rows($result2);\n\t\t\n\n\t\tif($num_rows>0){\n\t\t $result = '';\n\t\t $errorMsg = 'Sorry, you do not deactivate this Check, it is already assigned to some staff.';\n\t\t}else{\n\t\t \t$sql2=\"UPDATE `SCP_Groups` SET `StatusID` = '\".$StatusID.\"' WHERE `GroupID` = '\".$GroupID.\"'\";\t \n $result = mysql_query($sql2) or die(mysql_error());\n\t\t}\n\t\t\t\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Updated successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = $errorMsg;\n $data['responseCode'] = \"200\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "public function notConfirmed($dt)\n{\n\n $code = 401;\n $payload = null;\n $remarks = \"failed\";\n $message = \"Unable to retrieve data\";\n\n\n\n $sql = \"UPDATE `crm_reservations_tb` SET `status_id` = '5' WHERE phone_no = '$dt->phone_no' AND status_id = '3'\";\n $res = $this->gm->generalQuery1($sql, \"\");\n\n if($res['code']!=200) {\n \n $code = 200;\n $payload = $res;\n $remarks = \"success\";\n $message = \"Successfully retrieved data\";\n }\n \n \n return $this->gm->sendPayload($payload, $remarks, $message, $code);\n\n}", "public function testAdministrationCreateStatus()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit(new Login())\n ->loginAsUser('[email protected]', 'password');\n\n $browser->visit('/admin/status')\n ->assertSee('Ajouter décision')\n ->clickLink('Ajouter décision')\n ->assertPathIs('/admin/status/create');\n\n $name = 'Test create status';\n\n $browser->type('name', $name)\n ->press('Enregistrer et retour')\n ->waitForText($name)\n ->assertSee($name)\n ->assertDontSee('Aucune donnée à afficher')\n ->assertPathIs('/admin/status');\n });\n }", "public function testVolunteerHourContactEditSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/volunteerEdit/'.$volunteerID);\n \n $this->assertContains(\"Editing Volunteer Hours for\", $response->getContent());\n }", "public function updateTimesheetStatus(Request $request){\n\t\t$timesheetid = $request->id;\n\t\t$status = $request->status;\n\t\t$timesheet = \\App\\Models\\Timesheet::where('id', $timesheetid)->first();\n\t\t$user = User::where('id', $timesheet->user_id)->first();\n\n\t\tMail::to($user->email)->send(new TimeSheetApproved($user, $status));\n\n\t\t$timesheet->client_approved = $status;\n\t\t$timesheet->save();\n\n\t\treturn response()->json(['status'=>true,'message'=>'status updated successfully'], 200);\n\t}", "public function ajax_change_status($id) {\n $result = $this->manager->get_status('user', $id);\n if ($result->status == \"1\") {\n $project_id = $this->manager->update('user', array('user_id' => $id), array('status' => 0));\n \n $subject = \"Account Deactivation Notification\";\n $content = \"<p>Dear \" . ucwords($result->name) . \",</p>\";\n\n $content .= \"<p>We regret to to inform to you that your account \";\n $content .= \"has been automatically disabled from our system due to some problems.</p>\";\n\n $content .= \"<p>Kindly contact our customer care operators at +91 8369516308 \";\n $content .= \"or write to us at [email protected]</p>\";\n\n $content .= \"<p>With your assistance,our team will surely help you to enable your systems again.</p>\";\n\n $content .= \"<p>Thanking you in anticipation.</p>\";\n $content .= \"<p>Regards,</p>\";\n $content .= \"<p>Team Aasaan</p>\";\n $content .= \"<p>http://www.aasaan.co/hajiri</p>\";\n $content .= \"<img src='\" . base_url('assets/admin/images/AASAAN-LOGO.png') . \"' height='80' width='250'/>\";\n \n } else {\n $project_id = $this->manager->update('user', array('user_id' => $id), array('status' => 1));\n \n $subject = \"Account Activation Notification\";\n\n $content = \"<p>Dear \" . ucwords($result->name) . \",</p>\";\n $content .= \"<p>We feel glad to inform you that your account \";\n $content .= \"has been enabled!</p>\";\n\n $content .= \"<p>For any inconvenience do call our customer care services at +91 8369516308 \";\n $content .= \"or write to us at [email protected]</p>\";\n\n $content .= \"<p>Thanking you in anticipation.</p>\";\n $content .= \"<p>Regards,</p>\";\n $content .= \"<p>Team Aasaan</p>\";\n $content .= \"<p>http://www.aasaan.co/hajiri</p>\";\n $content .= \"<img src='\" . base_url('assets/admin/images/AASAAN-LOGO.png') . \"' height='80' width='250'/>\";\n }\n //$result = htmlmail($result->email, $subject, $content);\n $this->session->set_flashdata('success', 'Status Changed Successfully');\n echo json_encode(array(\"status\" => TRUE));\n }", "public function updateAgent() {\r\n $pwd = parent::getPassword();\r\n $sqlQuery = \"UPDATE users SET \"\r\n . \"fname='\" . parent::getFirstname() . \"', \"\r\n . \"lname='\" . parent::getLastname() . \"', \"\r\n . \"image_name='\" . parent::getPictureName() .\"', \"\r\n . \"email='\" . parent::getEmail() . \"', \"\r\n . \"enable=\" . $this->enabled . \", \"\r\n . \"address1='\" . parent::getAddress1() . \"', \"\r\n . \"address2='\" . parent::getAddress2() . \"', \"\r\n . \"zipcode='\" . parent::getZipcode() . \"', \"\r\n . \"phone='\" . parent::getPhone() . \"', \"\r\n . \"city='\" . parent::getCity() . \"', \"\r\n . \"state='\" . parent::getState() . \"', \"\r\n . \"country='\" . parent::getCountry() . \"', \";\r\n // add a comment of what the below line does\r\n // - @vishal\r\n if(!empty($pwd))\r\n $sqlQuery .= \"password='\" . hash(\"sha256\", parent::getPassword()) . \"', \";\r\n \r\n $sqlQuery .= \"modification_date=NOW()\" \r\n . \" WHERE user_id = \" . parent::getID() . \";\";\r\n $result = $this->dbcomm->executeQuery($sqlQuery);\r\n \r\n if ($result != true)\r\n {\r\n echo \"<br><b>\" . $sqlQuery . \"</b>\";\r\n echo \"<br><b>\" . $this->dbcomm->giveError() . \"</b>\";\r\n die(\"Error at agent saving\");\r\n }\r\n else\r\n {\r\n return 1;\r\n }\r\n }", "public function testDeveloperUpdate()\n {\n $developer = factory(Developer::class)->create();\n $response = $this->get('/developer/update?id=' . $developer->id);\n $response->assertStatus(200);\n }", "function changeStatusChecks($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\t\t\n $StatusID=$post['StatusID'];\n\t$ChecksID=$post['ChecksID'];\n\t\n\t\n\t $errorMsg=\"Error in updation\";\n\t\t$result2 = mysql_query(\"SELECT * FROM SCP_Checks_Staff WHERE ChecksID='\".$ChecksID.\"'\")or die(mysql_error());\n\t\t$num_rows = mysql_num_rows($result2);\n\t\t\n\t\t\n\t\tif($num_rows>0){\n\t\t $result = '';\n\t\t $errorMsg = 'Sorry, you do not deactivate this Check, it is already assigned to some staff.';\n\t\t}else{\n\t\t \t$sql2=\"UPDATE `SCP_Checks` SET `StatusID` = '\".$StatusID.\"' WHERE `ChecksID` = '\".$ChecksID.\"'\";\t \n $result = mysql_query($sql2) or die(mysql_error());\n\t\t}\n\t\t\t\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Updated successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = $errorMsg;\n $data['responseCode'] = \"200\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "function changeStatusEquipments($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\t\t\n $StatusID=$post['StatusID'];\n\t$EquipmentID=$post['EquipmentID'];\n\t\n\t\n\t $errorMsg=\"Error in updation\";\n\t\t$result2 = mysql_query(\"SELECT * FROM SCP_Equipments_Staff WHERE EquipmentID='\".$EquipmentID.\"'\")or die(mysql_error());\n\t\t$num_rows = mysql_num_rows($result2);\n\t\t\n\t\t\n\t\tif($num_rows>0){\n\t\t $result = '';\n\t\t $errorMsg = 'Sorry, you do not deactivate this Equipment, it is already assigned to some staff.';\n\t\t}else{\n\t\t \t$sql2=\"UPDATE `SCP_Equipments` SET `StatusID` = '\".$StatusID.\"' WHERE `EquipmentID` = '\".$EquipmentID.\"'\";\t \n $result = mysql_query($sql2) or die(mysql_error());\n\t\t}\n\t\t\t\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Updated successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = $errorMsg;\n $data['responseCode'] = \"200\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "public function test_authenticated_admin_users_can_hit_the_update_endpoint()\n {\n // First we create a test country\n $country = $this->createCountry();\n\n // Then we check if it was successfully added into the database\n $this->assertDatabaseHas('countries', $country->toArray());\n\n // Then we create an update request with auth headers and empty params\n $this->authenticatedAdmin()->update($country->code, [])\n // We assert status is 422, because now we are authenticated, but request params are invalid\n ->assertStatus(422)\n // Then we assert errors structure matches expected\n ->assertJsonStructure([\n 'errors' => [\n 'name',\n 'code'\n ]\n ]);\n }", "public function changeStatus(Request $request)\n {\n $user = User::find($request->id);\n $user->is_admin = $request->is_admin;\n $user->save();\n\n return response()->json(['success'=>'Status change successfully.']);\n }", "public function setstatus()\n {\n $this->checkAjaxToken();\n $this->throwForbiddenUnless(SecurityUtil::checkPermission('Ephemerides::', '::', ACCESS_ADMIN));\n\n $eid = $this->request->request->get('eid', 0);\n $status = $this->request->request->get('status', 0);\n $alert = '';\n \n if ($eid == 0) {\n $alert .= $this->__('No ID passed.');\n } else {\n $item = array('eid' => $eid, 'status' => $status);\n $res = DBUtil::updateObject($item, 'ephem', '', 'eid');\n if (!$res) {\n $alert .= $item['eid'].', '. $this->__f('Could not change item, ID %s.', DataUtil::formatForDisplay($eid));\n if ($item['status']) {\n $item['status'] = 0;\n } else {\n $item['status'] = 1;\n }\n }\n }\n // get current status to return\n $item = ModUtil::apiFunc($this->name, 'user', 'get', array('eid' => $eid));\n if (!$item) {\n $alert .= $this->__f('Could not get data, ID %s.', DataUtil::formatForDisplay($eid));\n }\n\n return new Zikula_Response_Ajax(array('eid' => $eid, 'status' => $item['status'], 'alert' => $alert));\n }", "public function test_admin_status_b()\n {\n $this->request('GET', ['pages/memberdsc', 'status']);\n $this->assertResponseCode(404);\n }", "public function AddEditStatusCode(){\n\t\ttry{\n\t\t\tif(isset($this->getData['emailstatus'])){\n\t\t\t\t\tif($this->getData['emailstatus'] == '0' && isset($this->getData['new_notification_name']) && $this->getData['new_notification_name'] != ''){\n\t\t\t\t\t\t$inserted = $this->_db->insert(MAIL_NOTIFY_TYPES,array('notification_name' => $this->getData['new_notification_name'],'notification_staus' => $this->getData['notification_sta'],'admin_display'=>'1','templatecategory_id'=>3));\n\t\t\t\t\t\t$this->getData['notification_id'] = ($inserted)?$this->_db->lastInsertId():'0';\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tunset($this->getData['notification_id']);\n\t\t\t\t}\n\t\t\tif(isset($this->getData['mode']) && $this->getData['mode'] == 'add'){\n\t\t\t\treturn ($this->insertInToTable(STATUS_MASTER,array($this->getData))) ? TRUE : FALSE;\n\t\t\t}else{\n\t\t\t\t$where = 'master_id ='.Zend_Encript_Encription:: decode($this->getData['token']);\n\t\t\t\t$this->getData['modify_by'] = $this->Useconfig['user_id'];\n\t\t\t\t$this->getData['modify_ip'] = commonfunction::loggedinIP();\n\t\t\t\t$this->getData['modify_date'] = '';\n\t\t\t\treturn ($this->UpdateInToTable(STATUS_MASTER,array($this->getData),$where)) ? TRUE : FALSE;\n\t\t\t}\n\t\t}catch (Exception $e) {\n\t\t\t\t $this->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n\t\t}\n }" ]
[ "0.61954045", "0.596753", "0.5939235", "0.59271204", "0.58863634", "0.58448845", "0.5814457", "0.5804797", "0.573674", "0.55866015", "0.5571828", "0.554309", "0.5540145", "0.55377865", "0.5517234", "0.5506369", "0.54942244", "0.5482305", "0.5469329", "0.5466056", "0.54422605", "0.5428633", "0.5422021", "0.5408735", "0.53940105", "0.5381583", "0.53748757", "0.5356886", "0.5356594", "0.53369457", "0.5328046", "0.5327555", "0.5325396", "0.53186756", "0.5317932", "0.5312355", "0.5308621", "0.530587", "0.53026915", "0.5275358", "0.52551967", "0.5248533", "0.52391624", "0.52355874", "0.5232998", "0.5223237", "0.5222847", "0.52191556", "0.5212606", "0.5210356", "0.52078533", "0.5206044", "0.520384", "0.5203768", "0.520094", "0.5199324", "0.5183782", "0.5178106", "0.5175626", "0.51743996", "0.5170217", "0.51692", "0.5168426", "0.5168267", "0.5166974", "0.51584053", "0.5153102", "0.5149167", "0.5143218", "0.5140963", "0.514079", "0.5135532", "0.5130869", "0.5124444", "0.51213974", "0.51113385", "0.5107608", "0.5095848", "0.5094482", "0.5093297", "0.50909114", "0.5090429", "0.5085609", "0.5084251", "0.50829977", "0.50824404", "0.5076321", "0.50681686", "0.50654125", "0.50638074", "0.50496805", "0.5049297", "0.5049127", "0.5048773", "0.5047315", "0.5046948", "0.5045891", "0.5042373", "0.50422984", "0.5041212" ]
0.7310263
0
Test case for webinarRegistrants List Webinar Registrants.
public function testWebinarRegistrants() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function testWebinarRegistrantGet()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function testListTenant()\n {\n $this->json('GET', 'reseller/'.$this->reseller->id.'/tenants')\n ->assertStatus(200);\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function getRegistrants()\n {\n if (array_key_exists(\"registrants\", $this->_propDict)) {\n return $this->_propDict[\"registrants\"];\n } else {\n return null;\n }\n }", "public function testListSiteMembershipsForPerson()\n {\n }", "public function testListSiteMembershipRequestsForPerson()\n {\n }", "public function testListSiteMemberships()\n {\n }", "function getRegistrationList()\r\n {\r\n global $objDatabase;\r\n \r\n $blnFirst = true;\r\n $arrWhere = array();\r\n if ($this->getRegistrations) { $arrWhere[] = 1; }\r\n if ($this->getDeregistrations) { $arrWhere[] = 0; }\r\n if ($this->getWaitlist) { $arrWhere[] = 2; }\r\n $strWhere = ' AND (';\r\n foreach ($arrWhere as $value) {\r\n $strWhere .= $blnFirst ? '`type` = '.$value : ' OR `type` = '.$value;\r\n $blnFirst = false;\r\n }\r\n $strWhere .= ')';\r\n \r\n $query = '\r\n SELECT `id`\r\n FROM `'.DBPREFIX.'module_'.$this->moduleTablePrefix.'_registration`\r\n WHERE `event_id` = '.$this->eventId.'\r\n '.$strWhere.'\r\n ORDER BY `id` DESC'\r\n ;\r\n $objResult = $objDatabase->Execute($query);\r\n \r\n if ($objResult !== false) {\r\n while (!$objResult->EOF) {\r\n $objRegistration = new \\Cx\\Modules\\Calendar\\Controller\\CalendarRegistration($this->formId, intval($objResult->fields['id']));\r\n $this->registrationList[$objResult->fields['id']] = $objRegistration;\r\n $objResult->MoveNext();\r\n }\r\n }\r\n }", "public function listRegisteredDestinations($request);", "public function testListPastWebinarQA()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarAbsentees()\n {\n }", "public function actionRegistrationList() {\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForDays();\n $userCounter->getNonActiveUsersForDays();\n\n $dayDate = new DateTime();\n\n // TODO registration\n\n $registrationsByDay = [];\n for($i = 0; $i<30; $i++) {\n $day = date_format($dayDate, 'Y-m-d');\n $registrationsByDay[$day]['period'] = $day;\n $registrationsByDay[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByDay[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByDay[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByDay[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByDay[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $dateInterval = new DateInterval('P1D');\n $dateInterval->invert = 1;\n $dayDate->add($dateInterval);\n }\n\n // getting registration by month\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForMonths();\n $userCounter->getNonActiveUsersForMonths();\n\n $dayDate = new DateTime();\n\n $registrationsByMonth = [];\n for($i = 0; $i<12; $i++) {\n $day = date_format($dayDate, 'F');\n $registrationsMonth[$day]['period'] = $day;\n $registrationsMonth[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsMonth[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsMonth[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsMonth[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsMonth[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $dateInterval = new DateInterval('P1M');\n $dateInterval->invert = 1;\n $dayDate->add($dateInterval);\n }\n\n // getting registration by year\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForYears();\n $userCounter->getNonActiveUserForYears();\n\n $dayDate = new DateTime();\n\n $registrationsByYear = [];\n $day = date_format($dayDate, 'Y');\n $registrationsByYear[$day]['period'] = $day;\n $registrationsByYear[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByYear[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByYear[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByYear[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByYear[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $registrationsByYearOld = [];\n $day--;\n $registrationsByYearOld[$day]['period'] = $day;\n $registrationsByYearOld[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByYearOld[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByYearOld[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByYearOld[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByYearOld[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n $this->layout = '//admin_area/layouts/admin_main';\n $this->render('/admin_area/pages/registrationCounterList',\n [\n 'registrationsByDay' => $registrationsByDay,\n 'registrationsByMonth' => $registrationsMonth,\n 'registrationsByYear' => $registrationsByYear,\n 'registrationsByYearOld' => $registrationsByYearOld,\n ]\n );\n }", "public function getRegistrant();", "public function testWebinarPolls()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function registrationAction()\n {\n $eventId = $this->params('eventId');\n $registrations = $this->regTable->findRegByEventId($eventId);\n //*** DATABASE TABLE MODULE RELATIONSHIPS LAB: provide secondary data usersModelTableGateway which performs lookups for attendees for each registration\n $data = [];\n if ($registrations) {\n foreach ($registrations as $item) {\n $secondaryDataTable = '???';\n $data[] = [\n $item->registration_time,\n $item->first_name,\n $item->last_name,\n $secondaryDataTable];\n }\n }\n return new JsonModel(['data' => $data]);\n }", "public function testListEnrollmentRequests()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testSubscriptionsList()\n {\n }", "public function testWebinarCreate()\n {\n }", "public function instructorList()\n\t{\n\t\techo json_encode($this->instructor->get_instructor());\n\t}", "public function testWebinar()\n {\n }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function test_admin_tribe_list_b()\n {\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function get_all_registered()\n {\n }", "public function get_all_registered()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function testAdminCreations() {\n $admins = Config::get('boilerplate.admins');\n foreach ($admins as $email => $pw) {\n $user = User::where('email', $email)->first();\n $this->assertNotNull($user);\n $this->assertTrue($user->isAdmin());\n }\n }", "public function testListUserEnrollments()\n {\n }", "public function generate_users_list()\n {\n $this->get('/usuarios')->assertStatus(200)->assertSee('Pedro');\n }", "public function testListSites()\n {\n }", "public function testListMemberAccounts()\n {\n }", "public function testAuthenticationServiceListIdentityProviders()\n {\n }", "public function setRegistrants($val)\n {\n $this->_propDict[\"registrants\"] = $val;\n return $this;\n }", "public function getRegistrant()\n {\n return $this->registrant;\n }", "public function test_admin_squad_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "public function index()\n {\n return OrganizerResource::collection(\n Auth::user()->organizers\n );\n }", "public function testCanDisplayTheAssessorRegistrationForm()\n {\n $response = $this->get('/assessors/register');\n\n $response->assertStatus(200);\n\n $response->assertViewIs('auth.register');\n }", "public function testSubscriptionsListByType()\n {\n }", "public function updateIncompleteTenantsList()\n\t{\n\t\ttry{\n\t\t\t$rol_arrendatario = Role::where('name', 'Arrendatario')->first();\n\t\t\t$membresia_default = $rol_arrendatario->memberships()->where('name', 'Default')->first();\n\t\t\t$users = $membresia_default->users()->get();\n\t\t\t$arregloUsuarios = [];\n\t\t\tforeach( $users as $user ){\n\t\t\t\t$arregloUsuarios[] = [ 'first_name' => $user->firstname,\n\t\t\t\t\t\t\t\t\t\t'last_name' => $user->lastname,\n\t\t\t\t\t\t\t\t\t\t'email' => $user->email\n\t\t\t\t\t\t\t\t\t ];\n\t\t\t}\n\t\t\t$res = $this->client->request('PUT', 'https://api.sendgrid.com/v3/marketing/contacts', [\n\t\t\t\t//'headers' => ['Authorization' => 'Bearer '.env('SENDGRID_API_KEY'), 'Content-Type' => 'application/json'],\n\t\t\t\t'body' => json_encode([\n\t\t\t\t\t\t'list_ids' => [env('SENDGRID_ID_TENANTS')],\n\t\t\t\t\t\t'contacts' => $arregloUsuarios\n\t\t\t\t\t])\n\t\t\t]);\n\t\t}catch( \\Exception $e )\n\t\t{\n\t\t\tdd($e);\n\t\t}\n\t}", "public function getRegistries()\n {\n return $this->registries;\n }", "public function testAjaxGetVenueListCanBeAccessed()\n {\n $this->dispatch('/venue/ajax-get-venue-list');\n $this->assertResponseStatusCode(200);\n }", "public function testUserRegister()\n {\n //Voter user registration testing\n $this->browse(function (Browser $voter,$photographer,$organizer) {\n $voter->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','VoterTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee('LensView Timeline')\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n\n //Photographer user registration testing\n $photographer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','PhotographerTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role2')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Photographer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n \n\n // Contest Organizer registration testing\n $organizer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','OrganizerTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role3')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Organizer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n });\n}", "public function getInvestigatorsList() {\n return $this->_get(6);\n }", "public function index(){\n\t\t\t\n\t\t\t$this->renderView(\"registrar\");\n\t\t}", "public function testAuthenticationServiceListAuthentications()\n {\n }", "public function testList()\n {\n $this->visit('/admin/school')\n ->see(SchoolCrudController::SINGLE_NAME);\n }", "function customRegisterAttendees($attendees){\n foreach ($attendees as $attendee){\n\t\tcustomRegisterAttendee($attendee);\n }\n\n}", "public function testRegisterPageDisplay()\n {\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->assertDontSee('Contacts Manager');\n });\n }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = '[email protected]';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "public function retrieveTenants()\n {\n return $this->start()->uri(\"/api/tenant\")\n ->get()\n ->go();\n }", "public function testRegistration(): void { }", "public function testGetSiteMembershipForPerson()\n {\n }", "public function GetAllDevise() {\n if ($this->get_request_method() != \"GET\") {\n $this->response('', 406);\n }\n\n $sql = $this->db->prepare(\"SELECT * FROM devise\");\n $sql->execute();\n if ($sql->rowCount() > 0) {\n $result = array();\n while ($rlt = $sql->fetchAll()) {\n $result[] = $rlt;\n }\n // If success everythig is good send header as \"OK\" and return list of users in JSON format\n $this->response($this->json($result[0]), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n }", "public function testCanRegisterUsers()\n {\n $this->post('/api/v1/register', [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'password' => 'johndoepass',\n 'password_confirmation' => 'johndoepass',\n ], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => 'John Doe',\n 'email' => '[email protected]'\n ]\n ]);\n $this->assertDatabaseHas('users', [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'activated' => false\n ]);\n $this->assertDatabaseHas('user_activations', [\n 'email' => '[email protected]'\n ]);\n }", "public function testMerchantsAllForm()\n\t{\n\t\t$crawler = $this->client->request('GET', \"/merchants/$this->from/$this->to\");\n\n\t\t$this->processMerchantsForm($crawler);\n\t}", "public function testGetSiteMembershipRequestForPerson()\n {\n }", "public function getInvestigatorsList() {\n return $this->_get(5);\n }", "public function test_admin_usecase_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'usecase_list']);\n $this->assertResponseCode(404);\n }", "public function getregisteredlaboreres()\n\t{\n\t\t$this->db->where('tenant_id > 0 ');\n\t\t$query = $this->db->get('tenants');\n\t\t\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\t$response['admindetails'] = array();\n\t\t\tforeach ($query->result() as $key) {\n\t\t\t\t# code...\n\t\t\t\t$product = array();\n\t\t\t\t$product['tenant_id'] = $key->tenant_id;\n\t\t\t\t$product['tenant_name'] = $key->tenant_name;\n\n\t\t\t\tarray_push($response['admindetails'], $product);\n\t\t\t}\n\t\t\t$response['status']=1;\n \t$response['message'] =\"Successfull login\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t $response['status']=0;\n \t $response['message'] =\"Successfull login\";\n\t\t}\n\t\treturn $response;\n\t}", "public function guest_can_get_all_websites() {\n $response = $this->get('api/websites');\n $response->assertStatus(200);\n }", "public function getRegistrant() {\n\t\treturn self::$_registrant;\n\t}", "public function updateCompleteTenantsList()\n\t{\n\t\t$role = Role::where('name', 'Arrendatario')->first();\n\n\t\t$arregloUsuarios = $this->usersCompletedByRole($role);\n\n\t\ttry{\n\t\t\t$res = $this->client->request('PUT', 'https://api.sendgrid.com/v3/marketing/contacts', [\n\t\t\t\t//'headers' => ['Authorization' => 'Bearer '.env('SENDGRID_API_KEY'), 'Content-Type' => 'application/json'],\n\t\t\t\t'body' => json_encode([\n\t\t\t\t\t\t'list_ids' => [env('SENDGRID_ID_TENANTS')],\n\t\t\t\t\t\t'contacts' => $arregloUsuarios\n\t\t\t\t\t])\n\t\t\t]);\n\t\t}catch( \\Exception $e )\n\t\t{\n\t\t\tdd($e);\n\t\t}\n\t}", "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n\n// $em = $this->getDoctrine()->getEntityManager();\n// $entity = $em->getRepository('CfpCfpBundle:Registration')->findOneById(1);\n\n// foreach ($entity->getSubmissions() as $submission) {\n// print_r($submission->getRemarks());\n// print \"<hr>\";\n// }\n// exit;\n//\n $entities = $user->getRegistrations();\n\n return $this->render('CfpCfpBundle:Registration:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "public function testListPeople()\n {\n }", "public function actionTest()\n {\n $videoconference = \\lispa\\amos\\videoconference\\models\\Videoconf::findOne(1);\n // pr($videoconference->toArray(), 'videoconference');//exit;\n $users = $videoconference->getVideoconfUsersMms()->all();\n // $users = $videoconference->getVideoconfUsers();\n\n foreach ($users as $u) {\n pr($u->toArray(), '$u relazione'); //exit;\n $userProfile = \\lispa\\amos\\admin\\models\\UserProfile::findOne($u->user_id);\n // pr($userProfile->toArray(), '$userProfile');//exit;\n $user = $userProfile->getUser()->one();\n // pr($user->toArray(), '$user');//exit;\n $userEmail = $userProfile->getUser()->one()->email;\n // print \"Email: $userEmail;<br />\";\n }\n //pr($users->toArray(), '$users');exit;/****/\n }", "public function viewRegister()\n {\n $data = DB::select(\"SELECT * FROM riders WHERE Rider_Status = 'PENDING'\");\n return view('ManageAccount.RegistrationListInterface', compact(\"data\"));\n }", "public function index()\n {\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('property_delete')) {\n return abort(401);\n }\n $tenants = User::whereIn('property_id', Property::where('user_id', auth()->user()->id)->pluck('id'))->onlyTrashed()->get();\n } else {\n\n $tenants = User::whereIn('property_id', Property::where('user_id', auth()->user()->id)->pluck('id'))->get();\n }\n\n return view('admin.tenants.index', compact('tenants'));\n }", "public function testCreateSiteMembershipRequestForPerson()\n {\n }", "public function test_can_get_all_true()\n {\n $this->seed();\n $user = User::where('email', '=', '[email protected]')->first();\n $token = JWTAuth::fromUser($user);\n $response = $this->json('GET','/api/treatments?token='.$token);\n\n $response->assertStatus(200);\n }", "public function testCountRegioes()\n {\n $this->assertCount(5, UF::$REGIOES);\n }", "public function test_admin_member_internship()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/DscMember', 'apprenticeship']);\n $this->assertResponseCode(404);\n }", "public function getAllApplicants();", "public function startWebAuthnRegistration($request)\n {\n return $this->start()->uri(\"/api/webauthn/register/start\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function user_can_register_with_valid_details() :void\n {\n $this->browse(function (Browser $browser) {\n\n \t$user1= factory(User::class)->make();\n\n//\t\t\tdie($user1);\n $browser->visit('/')\n // ->click('#accountDropdown')\n ->clickLink('Account')\n\n ->waitFor('#nav-register')\n ->click('#nav-register')\n ->assertSee('Register');\n\n\t $this->submitForm($browser,\n\t\t [\n\t\t\t ['field_name'=>'first_name', 'field_value' =>$user1->first_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'last_name', 'field_value' =>$user1->last_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'username', 'field_value' =>$user1->username, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'email', 'field_value' =>$user1->email, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password', 'field_value' =>$user1->password, 'field_type'=> 'password'],\n\t\t\t ['field_name'=>'password_confirmation', 'field_value' =>$user1->password, 'field_type'=> 'password']\n\t ]\n\t );\n $browser->assertpathIs('/restaurants')\n ->assertSeeIn('#accountName',$user1->username)\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'Sign Up')\n ->logout();\n });\n }", "public function index()\n {\n $webinar = Webinar::with('user')->get();\n return response()->json($webinar);\n \n }", "public static function get_admins();", "public function testGetInstitutionsUsingGET()\n {\n }", "public function test_get_all_reservations()\n {\n $response = $this->get('/api/reservations');\n\n $response->assertStatus(200);\n }", "function get_super_admins()\n {\n }", "public function testMemberRegistrationForm()\n {\n $response = $this\n ->get('/register-member')\n ->assertStatus(200);\n }", "public function user_can_register_account_with_valid_details()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/register')\n ->assertSee('Register')\n ->type('name','keith')\n ->type('email','[email protected]')\n ->type('password','secret')\n ->type('password_confirmation','secret')\n ->press('Register')\n ->assertpathIs('/home')\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'register')\n ;\n });\n }", "public function setRegistrant($value) {\n\t\tself::$_registrant = $value;\n\t}", "public function testIndexForm()\n\t{\n\t\t$crawler = $this->client->request('GET', '/merchants/');\n\n\t\t$this->processMerchantsForm($crawler);\n\t}", "public function testListUserIdentities()\n {\n }", "public function testIndex(): void\n {\n $response = $this\n ->actingAs($this->user)\n ->get('/');\n $response->assertViewIs('home');\n $response->assertSeeText('Сообщения от всех пользователей');\n }", "function getUpcomingWebinars()\n {\n $path = $this->getPathRelativeToOrganizer('upcomingWebinars');\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function completeWebAuthnRegistration($request)\n {\n return $this->start()->uri(\"/api/webauthn/register/complete\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function getIntervenants()\n {\n return $this->intervenants;\n }", "public function testSoapDeleteRegistrationsInteractingWithOnlineWebservice()\n {\n $this->soap = new \\SoapClient(WSDL, array('trace' => 1));\n $credentials = new Credentials(USERNAME, PASSWORD, SKOLEKODE);\n $client = new Client($credentials, $this->soap);\n\n $repository = new RegistrationRepository($client);\n\n $weblist_id = 11111;\n $response = $repository->delete($weblist_id)->getBody();\n }", "public function testCreateSiteMembership()\n {\n }", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "function geteventlist(){\r\n\t\t\t$res=$this->auth_chk();\r\n\t\t\tif(isset($res[\"trust\"])){\r\n\t\t\t\t$data =$this->model->get_event_list($this->post());\r\n\t\t\t\techo json_encode($data);\r\n\t\t\t}else{\r\n\t\t\t\techo json_encode(array(\"status\" => array(\"code\" => 1,'success'=>false,'msg'=>'User have no permission')));\t\r\n\t\t\t}\t\t\r\n\t\t}", "public function sellerCanRegister()\n {\n $input = [\n 'username' => 'iniusername' . Str::random(3),\n 'fullname' => 'ini nama ' . Str::random(4),\n 'email' => 'ini_email' . Str::random(4) . '@gmail.com',\n 'password' => 'P@sswr0d!',\n 'sex' => 0\n ];\n $response = $this->post('/api/seller/register', $input);\n $response->assertStatus(200);\n }" ]
[ "0.712533", "0.6706353", "0.65471625", "0.63244635", "0.60663444", "0.59959614", "0.5994309", "0.5917624", "0.5810444", "0.57461953", "0.5665831", "0.5652421", "0.56106544", "0.5591197", "0.5565672", "0.5482361", "0.54760706", "0.5439773", "0.54333013", "0.543098", "0.54060936", "0.5389081", "0.5343885", "0.52739346", "0.527223", "0.5270274", "0.524847", "0.5225634", "0.51836187", "0.5166671", "0.5164724", "0.51644534", "0.5148558", "0.51449275", "0.51374924", "0.5123603", "0.5116346", "0.50944066", "0.5081317", "0.5069806", "0.5059505", "0.50571424", "0.5047642", "0.5047351", "0.5038859", "0.5037387", "0.5024242", "0.5013324", "0.50080186", "0.499857", "0.49984077", "0.49726754", "0.49540818", "0.49339357", "0.49317393", "0.49160075", "0.4914116", "0.4906334", "0.48941648", "0.4893917", "0.48915976", "0.48893917", "0.488333", "0.4879833", "0.48761404", "0.48722425", "0.4850241", "0.48500976", "0.48494145", "0.48456752", "0.4843954", "0.4838848", "0.4836128", "0.48191947", "0.48173073", "0.4807996", "0.4804525", "0.4802469", "0.48001993", "0.4797445", "0.47960162", "0.4785518", "0.4785447", "0.47827038", "0.47680962", "0.47678953", "0.4765622", "0.47634932", "0.47634298", "0.4758266", "0.475706", "0.47523063", "0.47511685", "0.47459665", "0.47454283", "0.4743894", "0.47432432", "0.47418636", "0.47413993", "0.47302794" ]
0.72998947
0
Test case for webinarRegistrantsQuestionsGet List Registration Questions.
public function testWebinarRegistrantsQuestionsGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registration_questions() {\n\t\t// return $this->get_registration_token_list();\n\t\t$category = Category::with('questions')->where('name', 'registration')->first();\n\n\t\tif($this->categoryHasLessThanFiveQuestions($category)) {\n\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'No questions for registration'], 200);\n\t\t}\n\n\t\t$questions = $category->questions->shuffle()->take(5)->sortBy('id')->values();\n\n\t\t$return_data = $this->format_according_to_multi_language($questions);\n\t\t$advertisement = Advertisement::active()->type('top')->category(3)->first();\n\t\t$return_data['advertisement'] = [\n\t\t\t'image' => $advertisement->image ?? '',\n\t\t\t'url' => $advertisement->url ?? '',\n\t\t];\n\n\t\t$this->sync_asked_questions_for_validation($questions);\n\n\t\treturn response()->json(['status' => true, 'code' => 200, 'data' => $return_data], 200);\n\t}", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function getQuestions()\n {\n $title = \"Questions\";\n $subtitle = \"Here you will find all the questions!\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n\n // Get all the questions\n $questions = $this->di->get(\"questionModel\")->getQuestions();\n\n // Get number of answers\n $answers = [];\n foreach ($questions as $question) {\n $ans = $this->di->get(\"answerModel\")->getAnswersWhere(\"questionId\", $question->id);\n $answers[$question->id] = count($ans);\n }\n\n $data = [\n \"questions\" => $questions,\n \"subtitle\" => $subtitle,\n \"noOfAnswers\" => $answers,\n ];\n\n $view->add(\"pages/questions\", $data);\n $pageRender->renderPage([\"title\" => $title]);\n }", "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function test_all_questions_and_answers_route_when_questioner_has_sitewide_role() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n $roleid = $DB->get_field('role', 'id', array('shortname' => 'manager'));\n $this->getDataGenerator()->role_assign($roleid, $user->id);\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n $this->setUser($user);\n $client = new Client($this->_app);\n $client->request('GET', '/api/v1/' . $videoquanda->id . '/questions');\n $json = $client->getResponse()->getContent();\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $array = (array) json_decode($json);\n $this->assertCount(1, $array);\n }", "public function submit_registration(Request $request) {\n\t\t$data = $request->input('data');\n\t\t$questions = $data['qA'];\n\t\t$duration = $data['duration'];\n\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\t\t$savedQuestions = $user->registration_questions()->orderBy('id')->get();\n\n\t\tif($savedQuestions->count() == 0) {\n\t\t\treturn response()->json([\n\t\t\t\t'status' => false,\n\t\t\t\t'code' => 200,\n\t\t\t\t'message' => 'No questions generated from the server.',\n\t\t\t]);\n\t\t}\n\n\t\t// check if the question asked and sent from user's phone are in the same order\n\t\t// and answer also matches the actual answer\n\t\tforeach($questions as $key => $question) {\n\t\t\tif($question['questionId'] != $savedQuestions[ $key ]->id) {\n\t\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'Failure on question matching.']);\n\t\t\t}\n\n\t\t\t$option = Option::find($question['answerId']);\n\t\t\tif($option->is_answer() && $option->question_id == $question['questionId']) {\n\t\t\t} else {\n\t\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'Failure on option matching.']);\n\t\t\t}\n\t\t}\n\n\t\t$user->registration_participation()->create([\n\t\t\t'token' => str_random(100),\n\t\t\t'selected' => 1,\n\t\t]);\n\n\t\t$this->deleteGeneratedQuestions($user);\n\n\t\treturn response()->json(['status' => true, 'code' => 200, 'message' => 'Success.']);\n\t}", "public function test_admin_squad_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "public function testListPastWebinarQA()\n {\n }", "public function questions()\n {\n\n $client = new \\GuzzleHttp\\Client();\n\n $request = $client->get('http://localhost/quizci/questions');\n $response = $request->getBody()->getContents();\n\n $res_json_decode = json_decode($response);\n $data_collection = collect($res_json_decode->questions);\n //dd($data_collect);\n\n return View('admin.pages.questions', compact('data_collection'));\n }", "function getRegistrationList()\r\n {\r\n global $objDatabase;\r\n \r\n $blnFirst = true;\r\n $arrWhere = array();\r\n if ($this->getRegistrations) { $arrWhere[] = 1; }\r\n if ($this->getDeregistrations) { $arrWhere[] = 0; }\r\n if ($this->getWaitlist) { $arrWhere[] = 2; }\r\n $strWhere = ' AND (';\r\n foreach ($arrWhere as $value) {\r\n $strWhere .= $blnFirst ? '`type` = '.$value : ' OR `type` = '.$value;\r\n $blnFirst = false;\r\n }\r\n $strWhere .= ')';\r\n \r\n $query = '\r\n SELECT `id`\r\n FROM `'.DBPREFIX.'module_'.$this->moduleTablePrefix.'_registration`\r\n WHERE `event_id` = '.$this->eventId.'\r\n '.$strWhere.'\r\n ORDER BY `id` DESC'\r\n ;\r\n $objResult = $objDatabase->Execute($query);\r\n \r\n if ($objResult !== false) {\r\n while (!$objResult->EOF) {\r\n $objRegistration = new \\Cx\\Modules\\Calendar\\Controller\\CalendarRegistration($this->formId, intval($objResult->fields['id']));\r\n $this->registrationList[$objResult->fields['id']] = $objRegistration;\r\n $objResult->MoveNext();\r\n }\r\n }\r\n }", "public function test_all_questions_and_answers_route_when_questioner_is_admin() {\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // enrolment\n $this->getDataGenerator()->enrol_user($user->id, $course->id);\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, 2, $now, $now + 1, 2, 'dummy text'),\n array(2, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n $this->setAdminUser();\n $client = new Client($this->_app);\n $client->request('GET', '/api/v1/' . $videoquanda->id . '/questions');\n $json = $client->getResponse()->getContent();\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $array = (array) json_decode($json);\n $this->assertCount(2, $array);\n }", "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n\n// $em = $this->getDoctrine()->getEntityManager();\n// $entity = $em->getRepository('CfpCfpBundle:Registration')->findOneById(1);\n\n// foreach ($entity->getSubmissions() as $submission) {\n// print_r($submission->getRemarks());\n// print \"<hr>\";\n// }\n// exit;\n//\n $entities = $user->getRegistrations();\n\n return $this->render('CfpCfpBundle:Registration:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function get_questions() {\n return $this->questions;\n }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function getQuestions()\n {\n $title = \"Questions\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n $post = new Post($this->di->get(\"db\"));\n $user = new User($this->di->get(\"db\"));\n $tag = $this->di->get(\"tag\");\n\n $questions = $post->getQuestions();\n foreach ($questions as $question) {\n $question->tags = $tag->getPostTags($question->id);\n $question->user = $user->findAllWhere(\"id = ?\", [$question->userId])[0];//$user->find(\"id\", $question->userId);\n }\n\n $pag = $this->getPagination($questions);\n $view->add(\"comment/question-list\", [\n \"questions\" => array_slice($questions, $pag[\"offset\"], $pag[\"length\"], true),\n \"pag\" => $pag,\n ]);\n return $pageRender->renderPage([\"title\" => $title]);\n }", "function _getRegistrations($queryParameters){\n\t\t//echo \"get attendees in api 32\";\n // @TODO handle $_GET parameters, specifically allowing for ORs, and LIKE\n\t\tif(!empty($queryParameters))\n\t\t\t$whereSql=\"WHERE \".implode(\" AND \",$this->constructSQLWhereSubclauses($queryParameters));\n\t\telse\n\t\t\t$whereSql='';\n global $wpdb;\n $sql=\"\n SELECT\n *\n FROM\n {$wpdb->prefix}events_detail\n\t\t\t$whereSql\";\n $results=$wpdb->get_results($sql,ARRAY_A);\n return array(\"registrations\"=>$results);\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function actionRegistrationList() {\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForDays();\n $userCounter->getNonActiveUsersForDays();\n\n $dayDate = new DateTime();\n\n // TODO registration\n\n $registrationsByDay = [];\n for($i = 0; $i<30; $i++) {\n $day = date_format($dayDate, 'Y-m-d');\n $registrationsByDay[$day]['period'] = $day;\n $registrationsByDay[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByDay[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByDay[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByDay[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByDay[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $dateInterval = new DateInterval('P1D');\n $dateInterval->invert = 1;\n $dayDate->add($dateInterval);\n }\n\n // getting registration by month\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForMonths();\n $userCounter->getNonActiveUsersForMonths();\n\n $dayDate = new DateTime();\n\n $registrationsByMonth = [];\n for($i = 0; $i<12; $i++) {\n $day = date_format($dayDate, 'F');\n $registrationsMonth[$day]['period'] = $day;\n $registrationsMonth[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsMonth[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsMonth[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsMonth[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsMonth[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $dateInterval = new DateInterval('P1M');\n $dateInterval->invert = 1;\n $dayDate->add($dateInterval);\n }\n\n // getting registration by year\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForYears();\n $userCounter->getNonActiveUserForYears();\n\n $dayDate = new DateTime();\n\n $registrationsByYear = [];\n $day = date_format($dayDate, 'Y');\n $registrationsByYear[$day]['period'] = $day;\n $registrationsByYear[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByYear[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByYear[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByYear[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByYear[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $registrationsByYearOld = [];\n $day--;\n $registrationsByYearOld[$day]['period'] = $day;\n $registrationsByYearOld[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByYearOld[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByYearOld[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByYearOld[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByYearOld[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n $this->layout = '//admin_area/layouts/admin_main';\n $this->render('/admin_area/pages/registrationCounterList',\n [\n 'registrationsByDay' => $registrationsByDay,\n 'registrationsByMonth' => $registrationsMonth,\n 'registrationsByYear' => $registrationsByYear,\n 'registrationsByYearOld' => $registrationsByYearOld,\n ]\n );\n }", "public function testGetSurveyQuestionChoices0()\n {\n }", "public function testGetSurveyQuestionChoices0()\n {\n }", "public function getRegistrants()\n {\n if (array_key_exists(\"registrants\", $this->_propDict)) {\n return $this->_propDict[\"registrants\"];\n } else {\n return null;\n }\n }", "public function submit_registration_2(RegistrationQuizSubmissionRequest $request) {\n\t\t$questionIds = $request->questionIds;\n\t\t$answerIds = $request->answerIds;\n\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\n\t\t$user->age = $request->input('age');\n\t\t$user->gender = $request->input('gender');\n\t\t$user->save();\n\n\t\t$savedQuestions = $user->registration_questions()->orderBy('id')->get();\n\n\t\t$this->validateGeneratedQuestions($savedQuestions, $questionIds, $answerIds);\n\n\t\t$randomAlphaNumericString = randomAlphaNumericString(10);\n\t\t$user->registration_participation()->create([\n\t\t\t'token' => $randomAlphaNumericString,\n\t\t\t'selected' => 0,\n\t\t]);\n\n\t\t$this->deleteGeneratedQuestions($user);\n\n\t\treturn response()->json([\n\t\t\t'status' => true,\n\t\t\t'code' => 200,\n\t\t\t'message' => 'Success.',\n\t\t\t'registration_count' => $user->registration_participation()->count(),\n\t\t\t'registration_token' => $randomAlphaNumericString,\n\t\t]);\n\n\t}", "public function testQuestionSharev1questions()\n {\n\n }", "public function testCanDisplayTheAssessorRegistrationForm()\n {\n $response = $this->get('/assessors/register');\n\n $response->assertStatus(200);\n\n $response->assertViewIs('auth.register');\n }", "public function providertestRequest()\r\n {\r\n return array(array(\"list\",\"course\"),array(\"list\",\"teacher\"));\r\n }", "public function getQuestions()\n {\n return $this->questions;\n }", "public function getQuestions()\n {\n return $this->questions;\n }", "public function test_admin_certification_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/MemberSkills', 'certification_programs']);\n $this->assertResponseCode(404);\n }", "function ipal_get_questions_student($qid){\r\n\r\n global $ipal;\r\n global $DB;\r\n global $CFG;\r\n\t\t$q='';\r\n\t\t$pagearray2=array();\r\n\t\t\r\n $aquestions=$DB->get_record('question',array('id'=>$qid));\r\n\t\t\tif($aquestions->questiontext != \"\"){ \r\n\r\n\t$pagearray2[]=array('id'=>$qid, 'question'=>$aquestions->questiontext, 'answers'=>ipal_get_answers_student($qid));\r\n\t\t\t\t\t\t\t}\r\n return($pagearray2);\r\n}", "public function testUserRegister()\n {\n //Voter user registration testing\n $this->browse(function (Browser $voter,$photographer,$organizer) {\n $voter->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','VoterTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee('LensView Timeline')\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n\n //Photographer user registration testing\n $photographer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','PhotographerTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role2')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Photographer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n \n\n // Contest Organizer registration testing\n $organizer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','OrganizerTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role3')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Organizer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n });\n}", "public function questions() {\n $questions = DB::select('select Question, AnswerType, rowid from Questions WHERE AnswerType<>\"mcq-radio\" AND AnswerType<>\"mcq-dropDown\";');\n\n // Obtain a list of all questions that are mcq\n $MCQ = DB::select('select Question, AnswerType, rowid from Questions WHERE AnswerType=\"mcq-radio\" OR AnswerType=\"mcq-dropDown\";');\n $mcqOptions = DB::select('select Qid, mcqOption from mcqOptions');\n\n return view('userResponseArea', compact(['questions','MCQ', 'mcqOptions']));\n }", "public function testGetSurveyQuestions0()\n {\n }", "public function testGetSurveyQuestions0()\n {\n }", "public function registrationAction()\n {\n $eventId = $this->params('eventId');\n $registrations = $this->regTable->findRegByEventId($eventId);\n //*** DATABASE TABLE MODULE RELATIONSHIPS LAB: provide secondary data usersModelTableGateway which performs lookups for attendees for each registration\n $data = [];\n if ($registrations) {\n foreach ($registrations as $item) {\n $secondaryDataTable = '???';\n $data[] = [\n $item->registration_time,\n $item->first_name,\n $item->last_name,\n $secondaryDataTable];\n }\n }\n return new JsonModel(['data' => $data]);\n }", "public function getQuestions() {\r\n\t\treturn $this->questions;\r\n\t}", "public function testWebinarPolls()\n {\n }", "public function findAll() {\n\t\t$registrations = $this->registrationRepository->findAll();\n\t\t$this->assertEquals(10, $registrations->count());\n\t}", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "private function questionList()\n {\n \t$requiredQuestions = [];\n\n \tfor ($x = 1; $x <= count($this->questions); $x++) {\n \t\t$requiredQuestions[ config('constants.questionInputPrefix') . $x] = 'required';\n \t}\n\n \treturn $requiredQuestions;\n }", "public function testSubscriptionsList()\n {\n }", "public function testListQrcodes()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin')\n ->clickLink('Qrcodes')\n ->assertPathIs('/admin/qrcodes')\n ->assertSee('List Qrcodes');\n });\n }", "public function index()\n {\n $questions = auth()->user()->questions()->paginate(10);\n return view('teacher.question.index',[\n 'questions' => $questions\n ]);\n }", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function actionTest()\n {\n $videoconference = \\lispa\\amos\\videoconference\\models\\Videoconf::findOne(1);\n // pr($videoconference->toArray(), 'videoconference');//exit;\n $users = $videoconference->getVideoconfUsersMms()->all();\n // $users = $videoconference->getVideoconfUsers();\n\n foreach ($users as $u) {\n pr($u->toArray(), '$u relazione'); //exit;\n $userProfile = \\lispa\\amos\\admin\\models\\UserProfile::findOne($u->user_id);\n // pr($userProfile->toArray(), '$userProfile');//exit;\n $user = $userProfile->getUser()->one();\n // pr($user->toArray(), '$user');//exit;\n $userEmail = $userProfile->getUser()->one()->email;\n // print \"Email: $userEmail;<br />\";\n }\n //pr($users->toArray(), '$users');exit;/****/\n }", "public function getQuestionIds(){\n\t\treturn array('todo'); // This will be moved to QuestionTemplate\n\t}", "function ipal_get_questions(){ \r\n \r\n\tglobal $ipal;\r\n\tglobal $DB;\r\n\tglobal $CFG;\r\n\t$q='';\t\r\n\t$pagearray2=array();\r\n\t // is there an quiz associated with an ipal?\r\n//\t$ipal_quiz=$DB->get_record('ipal_quiz',array('ipal_id'=>$ipal->id));\r\n\t\r\n\t// get quiz and put it into an array\r\n\t$quiz=$DB->get_record('ipal',array('id'=>$ipal->id));\r\n\t\r\n\t//Get the question ids\r\n\t$questions=explode(\",\",$quiz->questions);\r\n\t\r\n\t//get the questions and stuff them into an array\r\n\t\tforeach($questions as $q){\t\r\n\t\t\t\r\n\t\t $aquestions=$DB->get_record('question',array('id'=>$q));\r\n\t\t if(isset($aquestions->questiontext)){\r\n\t\t $pagearray2[]=array('id'=>$q, 'question'=>strip_tags($aquestions->questiontext), 'answers'=>ipal_get_answers($q));\r\n\t\t\t\t \r\n\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t}\r\n \r\n\treturn($pagearray2);\r\n\t}", "public function get_all_registered()\n {\n }", "public function get_all_registered()\n {\n }", "public function testApiRegistrationSimple()\n {\n $eventsFaker = Event::fake();\n $emailVerificationSend = Notification::fake();\n $uniqueData = $this->getTestRegisterData();\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $uniqueData);\n\n $response->assertStatus(200)->assertJsonMissingValidationErrors();\n\n $responseArray = $response->decodeResponseJson()->json();\n $this->assertArrayNotHasKey('token_type', $responseArray);\n $this->assertArrayNotHasKey('expires_in', $responseArray);\n $this->assertArrayNotHasKey('access_token', $responseArray);\n $this->assertArrayNotHasKey('refresh_token', $responseArray);\n\n $user = CoreUser::byEmail($uniqueData[ 'email' ])->firstOrFail();\n $this->withoutExceptionHandling();\n\n if ( config('kit-auth.should_dispatch_registered_event') ) {\n $eventsFaker->assertDispatched(Registered::class,\n function (Registered $event) use ($emailVerificationSend) {\n app(ProcessEmailVerification::class)->handle($event);\n\n $emailVerificationSend->assertSentTo($event->user, VerifyEmail::class,\n function (VerifyEmail $notice) {\n $this->assertEquals($notice->requestSide, CoreUserContract::FRONTEND_REQUEST_SIDE);\n return $notice->tokens[ 'web' ] && $notice->tokens[ 'mobile' ];\n });\n\n return true;\n });\n } else {\n $eventsFaker->assertNotDispatched(Registered::class);\n }\n }", "public function testIndexSurvey()\n {\n $year = 2018;\n Survey::factory()->create(['year' => $year]);\n\n $response = $this->json('GET', 'survey', ['year' => $year]);\n $response->assertStatus(200);\n $this->assertCount(1, $response->json()['survey']);\n }", "function getQuestions()\n\t{\n\t\treturn $this->aQuestion;\n\t}", "public function getQuestions()\n {\n if (isset($_GET[\"user_id\"]) && isset($_GET[\"action_id\"]) && isset($_GET[\"attempted\"]) && isset($_GET[\"oq\"] ) ) {\n\n $user_id = $this->input->get('user_id');\n $action_id = $this->input->get('action_id');\n $attempted = $this->input->get('attempted');\n $oq = $this->input->get('oq');\n\n $questions = $this->Question_model->getQuestions($user_id, $action_id, $attempted, $oq);\n\n //var_dump($questions);\n\n foreach ($questions as $key => $question) {\n\n $questions[$key]['answer_id'] = null;\n \n if($answer_question = $this->Answer_model->getAnswer($question['question_id'])){\n if ($answer_question['isRecorded'] == 1) {\n $questions[$key]['answer_id'] = $answer_question['answer_id'];\n }\n }\n\n if ($user_id == \"142566\") $questions[$key]['answer_id'] = 18;\n\n $questions[$key]['listen_before'] = false;\n if($this->Question_model->checkUserQuestion($user_id, $question['question_id']))\n $questions[$key]['listen_before'] = true;\n \n $questions[$key]['like'] = false;\n $questions[$key]['dislike'] = false;\n $questions[$key]['report'] = false;\n $questions[$key]['pref'] = false;\n \n if($response = $this->Question_model->checkUserResponse($user_id, $question['question_id'])) {\n $questions[$key]['pref'] = true;\n $questions[$key][$response['response']] = false;\n }\n }\n echo json_encode(array('result' => array('error' => false, 'length' => sizeof($questions), 'questions' => $questions)));\n return;\n }\n else echo json_encode(array('result' => array('error' => true, 'message' => 'wrong params')));\n }", "public function show(Questions $questions)\n {\n //\n }", "public function getRegistries()\n {\n return $this->registries;\n }", "public function testQuestionSharev1questions0()\n {\n\n }", "public function getSalespersonAllQuestions() {\n return $this->_salespersonDatasource->getSalespersonAllQuestions();\n }", "public function getRegistrant();", "public function testListEnrollmentRequests()\n {\n }", "public function testGetSurveys0()\n {\n }", "public function testGetSurveys0()\n {\n }", "public function testQuestionCreateView() {\n $response = $this->get('course/' . $this->course->id . '/question/create');\n $this->assertEquals('200', $response->foundation->getStatusCode());\n $this->assertEquals('general.permission', $response->content->view);\n }", "public function testVenueQuestionnaire()\n {\n $this->buildVenueSurvey();\n\n $response = $this->json('GET', \"survey/questionnaire\", ['slot_id' => $this->slot->id, 'type' => Survey::TRAINING]);\n $response->assertStatus(200);\n\n $survey = $this->survey;\n $venueGroup = $this->venueGroup;\n $venueQ = $this->venueQuestion;\n $trainerGroup = $this->trainerGroup;\n $trainerQ = $this->trainerQuestion;\n\n $response->assertJson([\n 'survey' => [\n 'id' => $survey->id,\n 'type' => Survey::TRAINING,\n 'year' => $survey->year,\n 'title' => $survey->title,\n ]\n ]);\n\n $response->assertJson([\n 'survey' => [\n 'survey_groups' => [\n [\n 'id' => $venueGroup->id,\n 'title' => $venueGroup->title,\n 'description' => $venueGroup->description,\n 'survey_questions' => [\n [\n 'id' => $venueQ->id,\n 'sort_index' => $venueQ->sort_index,\n 'type' => $venueQ->type,\n 'description' => $venueQ->description,\n ]\n ]\n ],\n\n [\n 'id' => $trainerGroup->id,\n 'title' => $trainerGroup->title,\n 'description' => $trainerGroup->description,\n 'survey_questions' => [\n [\n 'id' => $trainerQ->id,\n 'sort_index' => $trainerQ->sort_index,\n 'type' => $trainerQ->type,\n 'description' => $trainerQ->description,\n ]\n ]\n\n ]\n ]\n ]\n ]);\n\n $trainer = $this->trainer;\n\n $response->assertJson([\n 'trainers' => [\n [\n 'id' => $trainer->id,\n 'callsign' => $trainer->callsign,\n 'position_id' => Position::TRAINER\n ]\n ]\n ]);\n\n $slot = $this->slot;\n $response->assertJson([\n 'slot' => [\n 'id' => $slot->id,\n 'begins' => $slot->begins\n ]\n ]);\n //return response()->json(['survey' => $survey, 'trainers' => $trainers, 'slot' => $slot]);\n\n }", "public function viewQuestion(Request $request)\r\n {\r\n $responseArray = array();\r\n\r\n $userLoggedIn = $this->get('security.token_storage')->getToken()->getUser();\r\n\r\n //Makes sure a user is logged in and not tha anonymous user.\r\n $securityContext = $this->container->get('security.authorization_checker');\r\n if ($securityContext->isGranted('IS_AUTHENTICATED_FULLY')) {\r\n\r\n $viewWellnessQuestions = new ViewWellnessQuestions();\r\n $generatedArray = $viewWellnessQuestions->generateArray($userLoggedIn);\r\n\r\n //Return the array that was created as JSON\r\n return new JsonResponse($generatedArray);\r\n\r\n }else{\r\n $responseArray = array(\r\n 'status'=>\"failure\",\r\n 'message'=>\"User is not logged in.\",\r\n 'data'=> array(\r\n )\r\n );\r\n }\r\n\r\n return new JsonResponse($responseArray);\r\n }", "public function testRegisterPageDisplay()\n {\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->assertDontSee('Contacts Manager');\n });\n }", "public function testCreateSurveyQuestion0()\n {\n }", "public function testCreateSurveyQuestion0()\n {\n }", "public function showRegistrationForm()\n {\n $data = [];\n\n // References\n $data['countries'] = CountryLocalizationHelper::transAll(CountryLocalization::getCountries());\n\n $data['genders'] = Gender::trans()->get();\n $cities = City::where('country_code',\"SA\")->orderBy('name')->get();\n\n MetaTag::set('title', getMetaTag('title', 'register'));\n MetaTag::set('description', strip_tags(getMetaTag('description', 'register')));\n MetaTag::set('keywords', getMetaTag('keywords', 'register'));\n\n return response()->json([\n 'status' => 'success',\n 'cities' => $cities,\n ]);\n }", "public static function getAllQuestionsAndAnswers(){\n $returnArray = array(\n 'Result' => 1,\n 'Reason' => \"\",\n 'QuestionResponses' => array()\n );\n\n $questionObjects = question::getAllQuestions();\n\n if(count($questionObjects) > 0){\n $responsesArray = self::buildQuestionsAndAnswersArray_Admin($questionObjects);\n $returnArray['QuestionResponses'] = $responsesArray;\n }\n else{\n $returnArray['Result'] = 0;\n $returnArray['Reason'] = \"No questions were found\";\n }\n\n return $returnArray;\n }", "public function getStudentRegistrations()\n {\n return $this->hasMany(StudentRegistration::className(), ['courseId' => 'courseId']);\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function getUnansweredQuestions()\n {\n if ($this->input->server('REQUEST_METHOD') == 'GET')\n {\n $unanswered_questions = $this->Question_model->getUnansweredQuestions();\n echo json_encode(array('status' => \"success\", 'unanswered_questions' => $unanswered_questions));\n return;\n }\n }", "public function testGetInstitutionsUsingGET()\n {\n }", "public function registration_get(){\n }", "private function json_retrieveQuestions()\n {\n // Gets the input data from the Front-End\n $input = json_decode(file_get_contents(\"php://input\"));\n// $surveyID = $_POST['surveyID'];\n $surveyID= $input->surveyID;\n\n // Gets Survey Details\n $surveyQuery = \"SELECT surveyTitle, surveyDescription FROM Surveys WHERE surveyID = :surveyID;\";\n $surveyParams = [\n \":surveyID\" => $surveyID,\n ];\n // This decodes the JSON encoded by getJSONRecordSet() from an associative array\n $resSurveyDetails = json_decode($this->recordset->getJSONRecordSet($surveyQuery, $surveyParams), true);\n $surveyTitle = $resSurveyDetails['data']['0']['surveyTitle'];\n $surveyDescription = $resSurveyDetails['data']['0']['surveyDescription'];\n\n // Gets Questions Details\n $questionsQuery = \"SELECT questionID, question, mediaPath FROM Questions WHERE surveyID = :surveyID;\";\n $questionsParams = [\n \":surveyID\" => $surveyID,\n ];\n\n // This decodes the JSON encoded by getJSONRecordSet() from an associative array\n $resQuestions = json_decode($this->recordset->getJSONRecordSet($questionsQuery, $questionsParams), true);\n $questionID = $resQuestions['data']['0']['questionID'];\n $question = $resQuestions['data']['0']['question'];\n $mediaPath = $resQuestions['data']['0']['mediaPath'];\n\n $nextpage = null;\n\n $res['status'] = 200;\n $res['message'] = \"ok\";\n $res['next_page'] = $nextpage;\n $res['surveyTitle'] = $surveyTitle;\n $res['surveyDescription'] = $surveyDescription;\n $res['questionID'] = $questionID;\n $res['question'] = $question;\n $res['mediaPath'] = $mediaPath;\n\n return json_encode($res);\n }", "public static function get_cms_question_url_list()\n\t{\n\t\treturn self::get_cms_post_url_list(Helper_PostType::QUESTION);\n\t}", "public function test_all_questions_and_answers_route_when_in_groupmode_with_sitewide_role() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n $roleid = $DB->get_field('role', 'id', array('shortname' => 'manager'));\n $this->getDataGenerator()->role_assign($roleid, $user->id);\n\n // create a course\n $course = $this->getDataGenerator()->create_course([\n 'groupmode' => SEPARATEGROUPS,\n 'groupmodeforce' => true,\n ]);\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified', 'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n $this->setUser($user);\n $client = new Client($this->_app);\n $client->request('GET', '/api/v1/' . $videoquanda->id . '/questions');\n $json = $client->getResponse()->getContent();\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $array = (array) json_decode($json);\n $this->assertCount(1, $array);\n }", "public function user_can_register_account_with_valid_details()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/register')\n ->assertSee('Register')\n ->type('name','keith')\n ->type('email','[email protected]')\n ->type('password','secret')\n ->type('password_confirmation','secret')\n ->press('Register')\n ->assertpathIs('/home')\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'register')\n ;\n });\n }", "public function index()\n {\n $questions = Question::all();\n return response()->json(['questions' => $questions],200);\n }", "public function test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function testListSiteMembershipRequestsForPerson()\n {\n }", "public function hrregistration(){\n\n \t $rands = str_random(10);\n \t $rand = json_encode($rands);\n return response()->json($rand,200);\n }", "public function questions(Request $request){\n $user_id = $request->user_id;\n\n // Cari question sesuai dengan user_id yang masuk\n $questions = Question::where('user_id', $user_id)->get();\n\n // Kirim response\n return response()->json($questions);\n\n }", "public function index()\n {\n // $questions = Question::all();\n // dd($questions); \n return view('questions::index');\n }", "public function testRegistrationFieldsMissing(): void { }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = '[email protected]';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "public function displayQuestions() {\n $listQuestions = array();\n $sql = 'SELECT `id`, `question`, `picture` FROM `' . self::PREFIX . 'question`';\n $result = $this->db->query($sql);\n $listQuestions = $result->fetchAll(PDO::FETCH_OBJ);\n return $listQuestions;\n }", "public function testRegistration(): void { }", "public function get_research_questions()\n\t{\n\t\treturn $this->research_questions;\n\t}", "public function test_can_get_all_true()\n {\n $this->seed();\n $user = User::where('email', '=', '[email protected]')->first();\n $token = JWTAuth::fromUser($user);\n $response = $this->json('GET','/api/treatments?token='.$token);\n\n $response->assertStatus(200);\n }", "public function testTeacherReg_WithGET_HasBlankForm() {\n\t\t$client = new Client();\n\t\t$response = $client->request('GET', 'http://wordbricks.xyz/teacherReg.php'); \n\t\t$this->assertCount(1, $response->filter('form')); //Check for one form on the page\n\t\t$this->assertEquals('', $response->filter('form input[name=username]')->attr('value')); //Check the value of each field\n\t\t$this->assertEquals('',\t$response->filter('form input[name=email]')->attr('value')); \n\t\t$this->assertEquals('',\t$response->filter('form input[name=password]')->attr('value')); \n\t\t$this->assertEquals('', $response->filter('form input[name=confirm]')->attr('value'));\n\t\t$this->assertEquals('', $response->filter('form input[name=class-name]')->attr('value'));\n\t}", "public function test_admin_training_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/MemberSkills', 'training_programs']);\n $this->assertResponseCode(404);\n }", "public function index()\n {\n // Get questions list\n $questions = Questions::orderby('created_at', 'desc')->paginate(15);\n //return collection as resource\n return $questions;\n\n }", "public function testCountRegioes()\n {\n $this->assertCount(5, UF::$REGIOES);\n }", "public function registeredUsers()\n {\n $data = DB::table('persons')\n ->select('FirstName', 'LastName', 'Email', 'Phone', 'credits', 'Subscribe')\n ->orderBy('FirstName', 'desc')\n ->get();\n\n if(count($data) > 0){\n return response(array(\n 'registered' =>$data-> toArray()\n ));\n }else{\n return response(array(\n \"No registerd users\"\n ));\n }\n }", "public function questions ( ) {\n $hooks = hooks::all();\n\n $title = \"Questions\";\n return view('pages.questions')->with([\n 'title' => $title,\n 'hooks' => $hooks\n ]);\n }", "public function getAllcourseRegister(): array\n {\n }" ]
[ "0.7154707", "0.60555196", "0.60346353", "0.5704522", "0.5638833", "0.5632243", "0.5621794", "0.5526942", "0.5455713", "0.54485816", "0.5391416", "0.53890324", "0.53485394", "0.53445524", "0.53413343", "0.53380704", "0.5323038", "0.5306515", "0.5293291", "0.5253302", "0.5230904", "0.5226102", "0.51825625", "0.51825625", "0.5177561", "0.5176155", "0.5156462", "0.51405275", "0.51341796", "0.51337445", "0.51337445", "0.5130324", "0.51216525", "0.51183397", "0.51105404", "0.50973165", "0.50973165", "0.50939363", "0.5082789", "0.5079721", "0.507704", "0.50585026", "0.5050216", "0.5031543", "0.50277597", "0.49990612", "0.4985358", "0.49797592", "0.49683514", "0.49610394", "0.49609992", "0.49609515", "0.49597877", "0.4959137", "0.49509642", "0.49498582", "0.49494785", "0.494762", "0.49342892", "0.49320254", "0.49247032", "0.49138337", "0.49120817", "0.49120817", "0.4911881", "0.49104738", "0.49099964", "0.4904111", "0.49025458", "0.49025458", "0.4899507", "0.4896924", "0.489626", "0.48899752", "0.48879057", "0.4886232", "0.48844552", "0.48843986", "0.48810306", "0.4873364", "0.4870577", "0.4869776", "0.48695636", "0.4863538", "0.48594236", "0.48500925", "0.48500204", "0.48474836", "0.48418775", "0.48378685", "0.48366958", "0.4830168", "0.4819738", "0.48105478", "0.4799546", "0.47993273", "0.4799234", "0.47929546", "0.47905654", "0.47878057" ]
0.7223803
0
Test case for webinarStatus Update Webinar Status.
public function testWebinarStatus() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarUpdate()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function update_status();", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function executeChangePracticeAreaStatus(sfWebRequest $request)\n {\n\t\tif(clsCommon::chkDataExist(\"WebsitePracticeArea\", $request->getParameter('id'), $this->getUser()->getAttribute('personalWebsiteId')))\n\t\t{\n\t\t\t$snId \t\t= \t$request->getParameter('id');\n\t\t\t$ssStatus \t= \t$request->getParameter('status');\n\t\t\t$oWebsitePracticeArea = new WebsitePracticeArea();\n\t\t\t$oWebsitePracticeArea->changeStatus($snId, $ssStatus);\n\n\t\t\tif($ssStatus == sfConfig::get(\"app_Status_Active\"))\n\t\t\t$successMessage = \"active\";\n\t\t\telse\n\t\t\t$successMessage = \"inactive\";\n\n\t\t\t$this->getUser()->setFlash(\"succMsg\",'Status successfully changed to '.$successMessage.'.');\n\n\t\t\t$this->redirect('WebsitePracticeArea/index');\n }\n else\n\t\t{\n\t\t\t$this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n\t\t\t$this->redirect('default/index');\n\t\t}\n }", "function update_organiser_status(){\r\n\t\t$this->organiser_model->update_organiser_status($_POST['status'],$_POST['organiser_id']);\r\n\t\t$this->send_status_email($_POST['status'],$_POST['organiser_id']);\r\n\t\techo \"1\";exit;\r\n\t}", "public function testcall(){\n self::updateUserStatus(2,2);\n }", "function updateStatus(){\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' => 'Document status updated successfully.');\n\n\t\techo json_encode($response);\n\t}", "public function updateStatus($params)\r\n {\r\n }", "public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }", "public function updateCommunityMemberStatus() {\n $community_id = $this->request->params ['named'] ['community_id'];\n $community_owner = $this->Community->find('first', array(\n 'conditions' => array('Community.id' => $community_id),\n 'fields' => array('Community.created_by')\n ));\n $community_owner = $community_owner['Community']['created_by'];\n $user_id = $this->request->params ['named'] ['user_id'];\n $status = $this->request->params ['named'] ['status'];\n $current_user = $this->Auth->user('id');\n $conditions = array(\n 'CommunityMember.user_id' => $user_id,\n 'CommunityMember.community_id' => $community_id\n );\n $current_user_type = $this->CommunityMember->getCommunityMemberUserType($community_id, $current_user);\n if ($this->CommunityMember->hasAny($conditions) && $current_user_type >= CommunityMember::USER_TYPE_ADMIN) {\n $communityMemberRecordId = $this->CommunityMember->find('first', array(\n 'conditions' => $conditions,\n 'fields' => array('CommunityMember.id')\n ));\n $communityMemberRecordId = $communityMemberRecordId['CommunityMember']['id'];\n $requested_user = $this->User->getUserDetails($user_id);\n $requested_user['user_name'] = Common::getUsername($requested_user['user_name'], $requested_user['first_name'], $requested_user['last_name']);\n switch ($status) {\n case 'add':\n //setting staus to Approved.\n\t\t\t\t\t$set_status = 1;\n\t\t\t\t\t$updateCommunityMember = array(\n\t\t\t\t\t\t'CommunityMember' => array(\n\t\t\t\t\t\t\t'id' => $communityMemberRecordId,\n\t\t\t\t\t\t\t'status' => $set_status,\n\t\t\t\t\t\t\t'joined_on' => Date::getCurrentDateTime()\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t$this->CommunityMember->save($updateCommunityMember);\n\n\t\t\t\t\t//Community follow data\n\t\t\t\t\t$followCommunityData = array(\n\t\t\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t\t\t'page_id' => $community_id,\n\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t'notification' => FollowingPage::NOTIFICATION_ON\n\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\t$this->FollowingPage->followPage($followCommunityData);\n\n\t\t\t\t\t$updated_member_count = $this->Community->changeMemberCount($community_id, 1);\n\t\t\t\t\t$result_message = $requested_user['user_name'] . \" has been added as a member to the community.\";\n\t\t\t\t\t$result = array(\n\t\t\t\t\t\t'success' => 'success',\n\t\t\t\t\t\t'member_count' => $updated_member_count,\n\t\t\t\t\t\t'message' => $result_message\n\t\t\t\t\t);\n break;\n case 'ignore':\n //Reject the request. Delete the entry from table.\n\t\t\t\t\tif ($this->CommunityMember->delete($communityMemberRecordId)) {\n\t\t\t\t\t\t//Community unfollow data\n\t\t\t\t\t\t$followCommunityData = array(\n\t\t\t\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t\t\t\t'page_id' => $community_id,\n\t\t\t\t\t\t\t'user_id' => $user_id\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->FollowingPage->unFollowPage($followCommunityData);\n\n\t\t\t\t\t\t$result_message = $requested_user['user_name'] . \" is denied from joining the community.\";\n\t\t\t\t\t\t$result = array(\n\t\t\t\t\t\t\t'success' => 'success',\n\t\t\t\t\t\t\t'message' => $result_message\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n case 'update_admin':\n //update member type to admin or remove the existing secondary admin\n if ($community_owner == $current_user && $user_id != $community_owner) {\n $memberTypeNow = $this->CommunityMember->getCommunityMemberUserType($community_id, $user_id);\n if ($memberTypeNow == CommunityMember::USER_TYPE_MEMBER) {\n $setMemberType = CommunityMember::USER_TYPE_ADMIN;\n $result_message = \"You have set \" . $requested_user['user_name'] . \" as a secondary admin for this community.\";\n } else {\n $setMemberType = CommunityMember::USER_TYPE_MEMBER;\n $result_message = $requested_user['user_name'] . \" is removed from the secondary admin list of this community.\";\n }\n $updateCommunityMember = array(\n 'CommunityMember' => array(\n 'id' => $communityMemberRecordId,\n 'user_type' => $setMemberType\n )\n );\n $this->CommunityMember->save($updateCommunityMember);\n $this->sendMailToNewSecondaryAdmin($community_id, $user_id, $setMemberType); //send mail to new added secondary admin.\n $result = array(\n 'success' => 'success',\n 'message' => $result_message\n );\n } else {\n $result = array(\n 'success' => 'danger',\n 'message' => 'Cannot change member type'\n );\n }\n break;\n default :\n $result = array(\n 'success' => 'danger',\n 'message' => 'invalid status'\n );\n break;\n exit;\n }\n } else {\n $result = array(\n 'success' => 'danger',\n 'message' => 'The user is not a member of the Community.'\n );\n }\n print_r(json_encode($result));\n exit;\n }", "function updateStatus(){\n $serv_ID=$this->uri->segment(3);\n $status=$this->input->post('status');\n if ($this->deliveryAndPickupModel->updateCustService($serv_ID, $status)) {\n echo \"<script>alert('Successfully Updated');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n else\n {\n echo \"<script>alert('Something when wrong');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n }", "function practice_status()\n {\n $query = \"UPDATE\n\t\t\t\t\t\" . $this->table_name . \"\n\t\t\t\tSET\n\t\t\t\t\tStatus = :status\n\t\t\t\tWHERE\n\t\t\t\t\tid = :id AND Viewer_ID = :vid\";\n\n $stmt = $this->conn->prepare($query);\n\t\t\n\t\t$stmt->bindParam(':status', $this->status);\n $stmt->bindParam(':id', $this->id);\n\t\t$stmt->bindParam(':vid', $this->Viewer_ID);\n\n // execute the query\n if ($stmt->execute()) {\n return true;\n } else {\n return false;\n }\n }", "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 }", "public function testStatusConfirm()\n {\n\n }", "public function test_should_deliver_status() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'student.created',\n\t\t) );\n\n\t\t// Inactive.\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t\t// Active.\n\t\t$webhook->set( 'status', 'active' )->save();\n\t\t$this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t}", "public function UserListChangeStatus(): void{\n \n if(!ArtworkVerifier::setStatusList($_POST) || !Session::isLogin()){\n exit;\n }\n \n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id)){\n UserList::values([ 'user_list.status' => $_POST['status'] ])\n ->where('user_id' ,Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->update();\n exit;\n }\n }", "public function travel_conditions_status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->travel,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/travel-conditions/lists','refresh');\t\t\n\t}", "public function status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->policy_duration,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/policy-duration/lists','refresh');\t\t\n\t}", "public function testWebinar()\n {\n }", "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}", "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_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 updateStatus()\n {\n $data = request()->validate([\n 'estimate' => 'required|exists:estimates,estimate_id',\n 'status_id' => 'required|integer|exists:statuses,id',\n ]);\n\n $estimate = Estimate::where('estimate_id', $data['estimate'])->firstOrFail();\n $estimate->update(['status_id' => $data['status_id']]);\n\n return redirect()->route('admin.estimates.index')->with([\n 'alertType' => 'success',\n 'alertMessage' => 'Le statut a bien été mis à jour',\n ]);\n }", "public function testWebinarPolls()\n {\n }", "public function updateStatus() {\n $ref = ORM::forTable('referrals')\n ->findOne($this->data['id']);\n if ($this->data['status'] == 'Assigned' && $this->data['route_id']) {\n $route = ORM::forTable('estimate_routes')\n ->findOne($this->data['route_id']);\n $assignedReferralsCount = ORM::forTable('referrals')\n ->select('id')\n ->where('route_id', $route->id)\n ->count();\n $ref->route_id = $this->data['route_id'];\n $ref->status = 'Assigned';\n $ref->route_order = $assignedReferralsCount;\n\n } elseif ($this->data['status'] == 'Pending') {\n $ref->status = 'Pending';\n $ref->route_order = 0;\n $ref->route_id = NULL;\n } else {\n $ref->status = $this->data['status'];\n }\n if ($ref->save()) {\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request status updated successfully'\n ]);\n } else {\n $this->renderJson([\n 'success' => false,\n 'message' => 'An error has occurred while saving job request'\n ]);\n }\n }", "public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }", "public function updateStatuses()\n {\n $affected = DB::update('UPDATE los_orders SET status_code=1 WHERE status_code=0 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NOT NULL)');\n $affected = DB::update('UPDATE los_orders SET status_code=0 WHERE status_code=1 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NULL)');\n }", "public function changestatusAction()\n {\n $user_params=$this->_request->getParams();\n $automail=new Ep_Message_AutoEmails();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvcontacts_obj = new Ep_Ftv_FtvContacts();\n $ftvpausetime_obj = new Ep_Ftv_FtvPauseTime();\n\n if($user_params['status'] == 'closed')\n $data = array(\"status\"=>$user_params['status'], \"cancelled_at\"=>date('Y-m-d H:i:s'));////////updating\n elseif($user_params['status'] == 'done')\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>date('Y-m-d H:i:s'));////////updating\n else\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>NULL, \"cancelled_at\"=>NULL);////////updating\n $query = \"identifier= '\".$user_params['requestId'].\"'\";\n $requestdetails = $ftvrequest_obj->requestDetailsById($user_params['requestId']);\n $contactId = $requestdetails[0]['request_by'];\n $contactdetails = $ftvcontacts_obj->getFtvContactDetails($contactId);\n $contactName = $contactdetails[0]['first_name'].\" \".$contactdetails[0]['last_name'];\n $parameters['ftvobject'] = $requestdetails[0]['request_object'];\n $parameters['ftvcontactName'] = $contactName;\n $ftvrequest_obj->updateFtvRequests($data,$query);\n ////making the time resume if its in pause////\n $inpause = $ftvpausetime_obj->inPause($user_params['requestId']);\n if($inpause == 'yes')\n {\n $data = array(\"resume_at\"=>date('Y-m-d H:i:s'));////////updating\n $query = \"ftvrequest_id = '\".$user_params['requestId'].\"' AND resume_at IS NULL \";\n $ftvpausetime_obj->updateFtvPauseTime($data,$query);\n }\n if($user_params['status'] == 'done')\n {\n if($this->adminLogin->userId != '110823103540627' ) ///when not johny head of BO user for FTV changed\n {\n $parameters['ftvrequestlink'] = \"/ftvchaine/ftvch-requests?submenuId=ML11-SL6\";\n $parameters['ftvType'] = \"chaine\";\n $automail->messageToEPMail('110823103540627',114,$parameters);// to johny\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n else // in case jhony change the status\n {\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n }\n\n }", "public function updateStatusProposal()\n { \n $now = Mage::getSingleton('core/date')->gmtDate(\"Y-m-d\"); \n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_PROPOSAL);\n $collection->getSelect()->where('expiry < \\''.$now.'\\' AND no_expiry = \\'0\\'');\n $collection->load(); \n\n foreach ($collection as $item) { \n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_PROPOSAL_EXPIRED);\n $item->save(); \n }\n }", "public function updateStatus()\n {\n $this->Invoice->updateInvoiceStatus($this->input->post('id'));\n }", "function updatePaymentStatus(){\r\n $payment = new managePaymentModel();\r\n $payment->cust_ID = $_SESSION['cust_ID'];\r\n $payment->updatePaymentStatus();\r\n }", "public function testDeveloperUpdate()\n {\n $developer = factory(Developer::class)->create();\n $response = $this->get('/developer/update?id=' . $developer->id);\n $response->assertStatus(200);\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 }", "public function respon(){\n //update 'status'\n }", "public function testWebinarPollGet()\n {\n }", "public function refreshTaskStatus(){\n\n $webCronResult = $this->webCronResults()->orderBy('code', 'desc')->first();\n\n if ($webCronResult) {\n\n if ($webCronResult->code >= 300) {\n // bad status\n $this->status = 0 ;\n }else{\n // good status\n $this->status = 2 ;\n };\n\n $this->save();\n\n };\n\n }", "public function status() : void\n {\n $jwt = Auth::isValidToken($_COOKIE['SSID']);\n \n if (!$jwt) {\n View::jsonResponse(['status' => 401, 'message' => 'Access denied for you!']);\n }\n\n $data = [ 'status' => $_POST['status'], 'id' => $_POST['statusid']];\n $data = Validator::cleanData($data);\n (new Task())->update($data)->execute();\n header('location: user-profile');\n\n }", "public function userLiveStatusUpdate_post() {\n $this->form_validation->set_rules('ContestGUID', 'ContestGUID', 'trim|required|callback_validateEntityGUID[Contest,ContestID]');\n $this->form_validation->set_rules('UserGUID', 'UserGUID', 'trim|callback_validateEntityGUID[User,UserID]');\n $this->form_validation->set_rules('UserStatus', 'UserStatus', 'trim|required|in_list[Yes,No]');\n $this->form_validation->set_rules('SeriesGUID', 'SeriesGUID', 'trim|required|callback_validateEntityGUID[Series,SeriesID]');\n $this->form_validation->validation($this); /* Run validation */\n $AuctionStatus = $this->SnakeDrafts_model->userLiveStatusUpdate($this->Post, $this->ContestID, $this->UserID, $this->SeriesID);\n if ($AuctionStatus) {\n $this->Return['Message'] = \"User status successfully updated.\";\n $this->Return['Data']['DraftUserLiveTime'] = date('Y-m-d H:i:s');\n } else {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = \"User status already updated.\";\n }\n }", "public function test_update() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n self::$outage->starttime += 10;\n outagedb::save(self::$outage);\n\n // Should still exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage)\",\n ['idoutage' => self::$outage->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertTrue(is_object($event));\n self::assertSame(self::$event->id, $event->id);\n self::$event = $event;\n }", "public function updateLeadStatus() {\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['status'])) {\n throw new \\Exception(\"Lead data 'status' must be setted!\");\n }\n\n /////////////////////////////////////////////////////////////////////\n // PREPARE DATA COLLECTION //////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n $this->__translateLeadData();\n\n $this->__leadData['email'] = $this->__leadEmail;\n\n /////////////////////////////////////////////////////////////////////\n // PERFORM REQUEST TO API ///////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n return $this->__request('POST', 'generic');\n }", "public function status(Request $request)\n {\n $urow = Registration::where(['id' => $request['Row_id']]);\n if ($urow!= null) {\n $urow->update(['status' => $request['status']]);\n return redirect()->action('FollowupController@index')->with('success', 'Successfully Updated!');\n } else {\n return redirect()->action('FollowupController@index')->with('failed', 'Successfully Updated!');\n }\n }", "public function updateStatusOnNewDay() {\n // Update advs\n UIAdv::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update advgroups\n UIAdvGroup::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update campaign\n UICampaign::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update project\n UIProject::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n }", "public function actionUpdateStatus() {\n $model = UserJobEditorFlag::model()->findByPk(Yii::app()->request->getPost('instanceId'));\n if (!$model instanceof UserJobEditorFlag) return false;\n $saved = $model->updateStatus(Yii::app()->request->getPost('status'));\n $this->sendResponse(200, $this->getObjectEncoded(array('message' => $saved ? 'ok' : 'error')));\n }", "public function updateJobStatus($status, $additional_info=null, $datasource_id=null){\n $this->status = $status;\n $this->additional_info = $additional_info;\n $this->datasource_id = $datasource_id;\n return $this->submit();\n }", "public function testGetStatus($status)\n\t{\n\t\t$timeSheetStatusChange = new TimeSheetStatusChange($status);\n\n\t\t$this->assertEquals($status, $timeSheetStatusChange->getStatus());\n\t}", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->guest_post_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "public function setWatchStatus()\n\t\t{\n\t\t\t$model = $this->getModel();\n\t\t\t$model->is_watched = 'yes';\n\t\t\t$model->modifying_agent_id = ECash::getAgent()->getAgentId();\n\t\t\t$model->save();\n\t\t}", "public function testWebinarAbsentees()\n {\n }", "public function update(Request $request, EventStarter $eventStarter)\n {\n\t\t\n\t\t$eventStarter->schedule_plan = $request->get('schedule_plan');\n\t\t$eventStarter->status = $request->get('status');\n\t\t$eventStarter->save();\n\n\n\t return redirect(route('detail-event', ['eventStarter' => $eventStarter->id]));\n }", "public function test_if_failed_update()\n {\n }", "public function testWinnerVerifiedStatus()\n\t{\n\t\t$data = new OLPBlackbox_Data();\n\t\t$data->phone_home = '123451234';\n\t\t$data->phone_work = '123451234';\n\t\t$data->paydates = array(time(), strtotime('+1 week'));\n\n\t\t$init = array('target_name' => 'ca', 'name' => 'ca');\n\t\t$state_data = new OLPBlackbox_TargetStateData($init);\n\n\t\t$rule = $this->getMock('OLPBlackbox_Enterprise_Impact_Rule_WinnerVerifiedStatus',\n\t\t\t\t\t\tarray('logEvent')\n\t\t);\n\t\t$rule->expects($this->at(0))\n\t\t\t->method('logEvent')\n\t\t\t->with($this->equalTo('VERIFY_SAME_WH'),\n\t\t\t\t\t$this->equalTo('VERIFY'),\n\t\t\t\t\t$this->equalTo($state_data->name));\n\n\t\t$rule->isValid($data, $state_data);\n\t}", "public function locationChangeStatus(Request $request) {\n $data = [\n 'status' => $request->status,\n ];\n\n $userCount = User::where('location_id',$request->locationid)->count();\n $userLocationCount = UserLocation::where('location_id',$request->locationid)->count();\n $salesAgentCount = Salesagentdetail::where('location_id',$request->locationid)->count();\n\n if(($userCount > 0 || $userLocationCount > 0 || $salesAgentCount > 0) && $request->status =='inactive') {\n return response()->json([ 'status' => 'error', 'message'=> 'Unable to deactivat of location, due to this location assigned to users.' ]);\n } else {\n\n $updateStatus = Salescenterslocations::where('id', $request->locationid)->update($data);\n\n if ($updateStatus) {\n if ($request->status =='active') {\n $message='Sales center location successfully activated.';\n } else {\n $message='Sales center location successfully deactivated';\n }\n return response()->json([ 'status' => 'success', 'message' => $message]);\n } else {\n return response()->json([ 'status' => 'error', 'message'=> 'Unable to update location' ]);\n }\n }\n }", "public function updateTimesheetStatus(Request $request){\n\t\t$timesheetid = $request->id;\n\t\t$status = $request->status;\n\t\t$timesheet = \\App\\Models\\Timesheet::where('id', $timesheetid)->first();\n\t\t$user = User::where('id', $timesheet->user_id)->first();\n\n\t\tMail::to($user->email)->send(new TimeSheetApproved($user, $status));\n\n\t\t$timesheet->client_approved = $status;\n\t\t$timesheet->save();\n\n\t\treturn response()->json(['status'=>true,'message'=>'status updated successfully'], 200);\n\t}", "public function testUpdateAction()\n {\n $res = $this->controller->updateAction(\"1\");\n $this->assertContains(\"Update\", $res->getBody());\n }", "public function update(Request $request,PropertyStatus $propertyStatus)\n {\n $attribute = $request->validate([\n 'property_status'=>'required'\n ]);\n\n $attribute['updated_by'] = auth()->user()->name;;\n \n $propertyStatus->update($attribute); \n\n Session::flash('success',\"Registro actualizado satisfactoriamente\");\n\n return redirect()->route('property_status.index');\n }", "public function actionUpdateStatus()\n { \n $user_id = Yii::$app->user->identity->id;\n $model = Users::find()->where(['id'=>$user_id])->one();\n $model->step_validate = 2;\n $model->load(Yii::$app->getRequest()->getBodyParams(), '');\n if ($model->validate()) {\n $model->save();\n $response = \\Yii::$app->getResponse();\n $response->setStatusCode(202);\n return $model->getUsersStatusValues();\n }\n else {\n throw new HttpException(422, json_encode($model->errors, JSON_UNESCAPED_UNICODE));\n }\n }", "public function testUpdateStatusByUserId()\n {\n $session = $this->objectManager->create(\\Magento\\Security\\Model\\AdminSessionInfo::class);\n /** @var $session \\Magento\\Security\\Model\\AdminSessionInfo */\n $session->getResource()->updateStatusByUserId(\n \\Magento\\Security\\Model\\AdminSessionInfo::LOGGED_OUT_BY_LOGIN,\n 1,\n [1],\n [1],\n '2016-01-19 12:00:00'\n );\n $collection = $session->getResourceCollection()\n ->addFieldToFilter('main_table.user_id', 1)\n ->addFieldToFilter('main_table.status', \\Magento\\Security\\Model\\AdminSessionInfo::LOGGED_OUT_BY_LOGIN)\n ->load();\n $count = $collection->count();\n $this->assertGreaterThanOrEqual(1, $count);\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 testSchedulesUpdateOut()\n {\n $result = $this->visit('events/{event}/schedules/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function updateSubmissionStatus() {\n\n $updateStatus = Usersubmissionstatus::where('user_id', Auth::user()->id)\n ->where('quarter_id', Quarter::getRunningQuarter()->id)\n ->update(['status_id' => config('constant.status.L1_APPROVAL_PENDING')]);\n // Let's notify user and L1 about user submission status.\n return $this->sendMail(config('constant.email_status.INFORM_APPRAISEE'));\n }", "public function testSuccessfulInstructorUpdate() {\n try {\n $updatedInstructor = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->assertNotNull($updatedInstructor, \"The updated instructor is null\");\n $this->assertEquals($this->userTypeEnum->INSTRUCTOR, $updatedInstructor->getType(), \"The updated user is not\n an instance of INSTRUCTOR\");\n\n $InstructorInstitution = PersistentUserXInstitutionPeer::retrieveByPk($updatedInstructor->getUserId(),\n $this->institution->getInstitutionId());\n $this->assertNotNull($InstructorInstitution, \"The user x institution relation was not created for the instructor.\");\n $this->assertEquals(self::IDENTIFICATION, $InstructorInstitution->getIdentification(), \"The Instructor school\n identification is incorrect\");\n $this->assertEquals($updatedInstructor->getUserId(), $InstructorInstitution->getUserId(), \"The user id is\n incorrect on user x institution for the instructor\");\n $this->assertEquals($this->institution->getInstitutionId(), $InstructorInstitution->getInstitutionId(),\n \"The institution id is incorrect on user x institution for the instructor\");\n\n $instXProjec = PersistentUserXProjectPeer::retrieveByPK($updatedInstructor->getJnUsername(),\n $this->project->getProjectJnName());\n $this->assertNotNull($instXProjec, \"The relationship between instructor and project was not created\");\n $this->assertEquals($this->project->getProjectJnName(), $instXProjec->getProjectJnName(), \"The project name\n is incorrect on user x project\");\n $this->assertEquals($updatedInstructor->getJnUsername(), $instXProjec->getJnUsername(), \"The java.net\n username is incorrect on user x project for instructor\");\n $this->assertTrue($instXProjec->getIsOwner() == 1, \"The instructor is the owner of project.\");\n\n } catch (InfinityMetricsException $ime){\n $this->fail(\"The successful update of profile failed: \" . $ime);\n }\n\n }", "public function executeChangeStatus(sfWebRequest $request)\n {\n $snId \t\t= \t$request->getParameter('id');\n $ssStatus \t= \t$request->getParameter('status');\n $oForumCategories = new ForumCategories();\n $oForumCategories->changeStatus($snId,$ssStatus);\n\n if($ssStatus == sfConfig::get(\"app_Status_Active\")){\n $successMessage = \"activated\";\n $msgStatus = \"succMsg\";\n }\n else{\n $successMessage = \"inactivated\";\n $msgStatus = \"errMsg\";\n }\n\n $this->getUser()->setFlash($msgStatus,'Status successfully changed to '.$successMessage.'.');\n\n $this->redirect('Forums/index');\n }", "private function manageStatus()\n {\n $this->updateStatus();\n $this->checkStatus();\n }", "public function testProfileUpdateAll()\n {\n\n }", "function updateInvestigationComepleteStatus($data_status,$fhi_id)\n\t\t{\n\t\t\t$this->db->where(\"id\",$fhi_id);\n\t\t\tif($this->db->update(\"da_farm_hygiene_investigation\",$data_status))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function updateBookingStatus(){\n $command = Yii::$app->db->createCommand();\n $id= Yii::$app->request->bodyParams[\"booking2\"];\n\n try {\n $command->update('car', ['pendingTime' => 'on', 'inUse' => 'pending'], 'id = '.$id)->execute();\n } catch (Exception $e) {\n printf(\"Cannot update data\");\n }\n }", "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 doUpdateStatus()\n\t{\n\n\t\t\n\t\t$rules = array(\n\t\t\t'row_id' => 'required', \n\t\t\t'status' => 'required'\n\t\t);\n\t\t\n\t\t// run the validation rules \n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator->fails()) {\n\t\t\t\n\t\t\treturn Redirect::to('order')\n\t\t\t\t->withErrors($validator);\n\t\t\t\n\t\t}\n\t\t\n\t\ttry {\n\t\t \n\t\t\t$object = Object::find(Input::get('row_id'));\n\t\t\t$object->fk_status = Input::get('status');\n\t\t\t$object->save();\n\t\t\t\n $logDetails = json_encode(['row_id' => Input::get('row_id'),\n\t\t\t\t\t\t\t\t\t 'status' => Input::get('status')]);\n\t\t\t\t\t\n\t\t\tActivity::log([\n\t\t\t\t'contentId' => Auth::User()->id,\n\t\t\t\t'contentType' => 'admin_pickup_status',\n\t\t\t\t'action' => 'Updated',\n\t\t\t\t'description' => 'Pickup Status Updated',\n\t\t\t\t'details' => $logDetails,\n\t\t\t\t'updated' => true,\n\t\t\t]);\n\t\t\t\n\t\t\t Session::flash('message', 'Order #' . Input::get('row_id') . ' updated');\n\t\t\treturn Redirect::to('order');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t \n\t\t\tSession::flash('error', $e->getMessage() );\n\t\t\treturn Redirect::to('order');\n\t\t}\n\t\t\n\t\t\n\t}", "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 function massStatusAction()\n {\n $curriculumdocIds = $this->getRequest()->getParam('curriculumdoc');\n if (!is_array($curriculumdocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('Please select curriculum docs.')\n );\n } else {\n try {\n foreach ($curriculumdocIds as $curriculumdocId) {\n $curriculumdoc = Mage::getSingleton('bs_curriculumdoc/curriculumdoc')->load($curriculumdocId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d curriculum docs were successfully updated.', count($curriculumdocIds))\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_curriculumdoc')->__('There was an error updating curriculum docs.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function updateStatus()\n\t\t{\n\t\t\t$thingdom = $this->getThingdom();\n\n\t\t\tif(!$thingdom) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$page_count = wp_count_posts('page')->publish;\n\t\t\t$post_count = wp_count_posts()->publish;\n\t\t\t$comment_count = wp_count_comments()->approved;\n\n\t\t\t$thing = $thingdom->getThing($this->thingName, $this->thingType);\n\n\t\t\t$thing->status('page_count', $page_count);\n\t\t\t$thing->status('post_count', $post_count);\n\t\t\t$thing->status('comment_count', $comment_count);\n\t\t}", "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 }", "function tep_set_banner_status($banners_id, $status, $site_id) {\n if ($status == '1') {\n return tep_db_query(\"update \" . TABLE_BANNERS . \" set status = '1',\n expires_impressions = NULL, expires_date = NULL, date_status_change = NULL\n where banners_id = '\" . $banners_id . \"' and site_id ='\".$site_id.\"'\");\n } elseif ($status == '0') {\n return tep_db_query(\"update \" . TABLE_BANNERS . \" set status = '0', date_status_change = now() where banners_id = '\" . $banners_id . \"' and site_id ='\".$site_id.\"'\");\n } else {\n return -1;\n }\n}", "function update_event_status($event_id,$event_status)\n {\n if($event_status==0)\n {\n $new_stat=\"1\";\n }\n elseif($event_status==1)\n {\n $new_stat=\"0\";\n }\n $query = $this->db->query(\"UPDATE tbl_events SET event_status = '$new_stat' WHERE event_id='$event_id'\");\n //echo $this->db->last_query();\n }", "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}", "public function changeStatus()\n {\n }", "public function status()\t{\n\t\t\t$this->veiculo->update($this->input->post('id'), array('veiculo_status' => $this->input->post('status')));\n\t\t}", "function updatestatus() {\n global $_lib;\n\n $dataH = array();\n $dataH['ID'] = $this->transaction->ID;\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\n $dataH['RemittanceStatus'] = 'sent';\n \n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\n\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\n }", "public function vendorChangeStatus(Request $request)\n {\n $validator=Validator::make($request->all(), [\n 'user_id' => 'required',\n 'vendor_id' => 'required',\n 'tag'=>'required',\n 'gig_id'=>'required',\n 'status'=>'required'\n ]);\n if ($validator->fails())\n {\n return response(array(\n 'success'=>0,\n 'data'=>$validator->errors()\n ));\n }\n else\n {\n $response=VendorServiceGig::where(['id'=>$request->gig_id,'vendor_id'=>$request->vendor_id])->update([\n 'status'=>$request->status\n ]);\n if($response)\n {\n return response(array(\n 'success'=>1,\n 'msg'=>'Successfully Updated'\n ));\n }\n else {\n return response(array(\n 'success'=>0,\n 'msg'=>'Something Went Wrong'\n ));\n }\n }\n }", "public function notConfirmed($dt)\n{\n\n $code = 401;\n $payload = null;\n $remarks = \"failed\";\n $message = \"Unable to retrieve data\";\n\n\n\n $sql = \"UPDATE `crm_reservations_tb` SET `status_id` = '5' WHERE phone_no = '$dt->phone_no' AND status_id = '3'\";\n $res = $this->gm->generalQuery1($sql, \"\");\n\n if($res['code']!=200) {\n \n $code = 200;\n $payload = $res;\n $remarks = \"success\";\n $message = \"Successfully retrieved data\";\n }\n \n \n return $this->gm->sendPayload($payload, $remarks, $message, $code);\n\n}", "public function setStatusTrue($event_id,$user_id,$subgroup_id) {\n\t\tDB::table('event_user')\n\t\t\t->where('myevent_id', $event_id)\n\t\t\t->where('user_id', $user_id)\n\t\t\t->where('subgroup_id', $subgroup_id)\n\t\t\t->update(array('status' => 1));\n\n\t\treturn Redirect::to(URL::previous());\n\t}", "public function testSellerUpdatedSuccess()\n {\n $this->demoUserLoginIn();\n $spu = Spu::create([\n 'users_id' => '1',\n 'name' => 'test',\n 'description' => 'test',\n ]);\n $response = $this->call('PATCH', '/seller/4/update', [\n 'name' => 'testUpdate',\n 'description' => 'testUpdate',\n ]);\n $this->assertEquals(302, $response->status());\n }", "function twe_set_banner_status($banners_id, $status) {\n global $db;\n if ($status == '1') {\n $db->Execute(\"update \" . TABLE_BANNERS . \" set status = '1', date_status_change = now(), date_scheduled = NULL where banners_id = '\" . $banners_id . \"'\");\n } elseif ($status == '0') {\n $db->Execute(\"update \" . TABLE_BANNERS . \" set status = '0', date_status_change = now() where banners_id = '\" . $banners_id . \"'\");\n } else {\n return -1;\n }\n }", "public static function status($status) {}", "public function testTestStatus()\n {\n // create review record for change 1\n $this->createChange();\n $review = Review::createFromChange('1')->save();\n\n // ensure starting test status of null.\n $this->assertSame($review->get('testStatus'), null);\n\n // dispatch and check output\n $this->dispatch('/reviews/2/tests/fail/' . $review->getToken());\n $result = $this->getResult();\n $review = Review::fetch(2, $this->p4);\n $this->assertRoute('review-tests');\n $this->assertResponseStatusCode(200);\n $this->assertSame(true, $result->getVariable('isValid'));\n $this->assertSame('fail', $review->get('testStatus'));\n }", "public function test_updateSettings() {\n\n }", "public function massStatusAction()\n {\n $traineecertIds = $this->getRequest()->getParam('traineecert');\n if (!is_array($traineecertIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineecert')->__('Please select trainee certificates.')\n );\n } else {\n try {\n foreach ($traineecertIds as $traineecertId) {\n $traineecert = Mage::getSingleton('bs_traineecert/traineecert')->load($traineecertId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d trainee certificates were successfully updated.', count($traineecertIds))\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_traineecert')->__('There was an error updating trainee certificates.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function status_update()\n {\n if (!$this->input->is_ajax_request()) {\n exit('No direct script access allowed');\n }\n \n if ($this->input->server('REQUEST_METHOD') != 'POST') {\n show_ajax_error('403', lang('error_message_forbidden'));\n }\n \n $id = $this->input->post('id',TRUE);\n $status = $this->input->post('status',TRUE);\n if (empty($id) || empty($status)) {\n show_ajax_error('404', lang('error_message'));\n }\n \n $result = $this->cms_page_model->as_array()->get($id);\n if (empty($result)) {\n show_ajax_error('404', lang('error_message'));\n }\n \n $status = ($status == \"true\") ? 1 : 0;\n if ($this->cms_page_model->update($id, array('status' => $status))) {\n if ($status) {\n set_ajax_flashdata('success', lang('status_enabled'));\n } else {\n set_ajax_flashdata('success', lang('status_disabled'));\n }\n } else {\n set_ajax_flashdata('error', lang('error_message'));\n }\n }", "protected function statusUpdate($data)\n {\n // DB::table('status_update')->insert(['date' => Carbon::now(),\n // 'status' => $data['status'],\n // 'booking_id' => $data['id'],\n // 'created_at' => Carbon::now()\n // ]);\n }", "public function updateStatusRequest()\n { \n $now = Mage::getSingleton('core/date')->gmtDate(); \n $items = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $items->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\n $items->getSelect()->group('store_id');\n if($items->getSize() >0 ){\n $data = $items->getData();\n\n foreach($data as $unit) { \n $storeId = $unit['store_id'];\n $day = Mage::getStoreConfig('qquoteadv/general/expirtime_proposal', (int)$storeId); \n \n $now = Mage::getSingleton('core/date')->gmtDate(); \n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\n $collection->getSelect()\n ->where('created_at<INTERVAL -' . $day . ' DAY + \\'' . $now . '\\'');\n $collection->load(); \n\n foreach ($collection as $item) { \n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST_EXPIRED);\n $item->save(); \n }\n }\n }\n }", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->news_letter_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "public function testUpdateVendorComplianceSurvey()\n {\n }", "public function test_add_status_event()\n {\n $employer = Employer::factory()->create();\n $status = EmployerStatus::create([\n \"employer_id\" => $employer->id,\n \"online_at\" => $online_at = Carbon::now(),\n\n ]);\n $this->assertDatabaseHas(\"employer_statuses\", [\n \"employer_id\" => (string)$employer->id,\n \"online_at\" => $online_at,\n\n ]);\n }", "function _updateStatus($a_obj_id, $a_usr_id, $a_obj = null, $a_percentage = false, $a_no_raise = false, $a_force_raise = false)\n\t{\n//global $ilLog;\n//$ilLog->write(\"ilLPStatus-_updateStatus-\");\n\n\t\t$status = $this->determineStatus($a_obj_id, $a_usr_id, $a_obj);\n\t\t$percentage = $this->determinePercentage($a_obj_id, $a_usr_id, $a_obj);\n\t\t$changed = self::writeStatus($a_obj_id, $a_usr_id, $status, $percentage);\n\t\t\n\t\tif(!$a_no_raise && \n\t\t\t($changed || $a_force_raise)) // #15529\n\t\t{\n\t\t\tself::raiseEvent($a_obj_id, $a_usr_id, $status, $percentage);\t\t\t\n\t\t}\t\t\t\n\t}", "public function testUpdateUpdatesDateValue()\n {\n $account_status_spans_table = $this->insight->getTableName('account_status_spans');\n\n $this->insight->accounts->addTrial(1);\n $this->insight->accounts->changePlan(1, new PlanM(), new Yearly());\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM `$account_status_spans_table` WHERE `id` = ?\", 1);\n\n $this->assertInternalType('array', $row);\n\n $this->assertInstanceOf(DateTimeValue::class, $row['started_at']);\n $this->assertInstanceOf(DateValue::class, $row['started_on']);\n $this->assertEquals($row['started_at']->format('Y-m-d'), $row['started_on']->format('Y-m-d'));\n\n $this->assertInstanceOf(DateTimeValue::class, $row['ended_at']);\n $this->assertInstanceOf(DateValue::class, $row['ended_on']);\n $this->assertEquals($row['ended_at']->format('Y-m-d'), $row['ended_on']->format('Y-m-d'));\n }", "public function SurveyReadStatusUpdate() {\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_survey_id', 'label' => 'Pushed Survey 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_survey_id = $this->getInput('push_survey_id');\n\t\t$push_survey_idi = $push_survey_id['push_survey_id'];\n\t\t\n $this->db->set('media_play_date', date(\"Y-m-d H:i:s\")); \n $this->db->where('id', $push_survey_idi);\n if ($this->db->update('push_surveys')) {\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 }", "function change_status()\n {\n //Create Model Object\n $helpDeskObj=new HelpDeskModel();\n \n //change status\n $helpDeskObj->changeStatus();\n\n $msg=\"Help Desk status has been activated successfully\";\n if($_GET['newstatus']=='0')\n {\n $msg=\"Help Desk status has been deactivated successfully\";\n }\n\n echo json_encode(array(\"result\" => \"success\",\"title\" => \"Help Desk Status\",\"message\" => $msg));\n exit();\n }" ]
[ "0.7402796", "0.7066509", "0.6592195", "0.65656424", "0.614286", "0.6069463", "0.6058696", "0.59344006", "0.5911069", "0.5883186", "0.5882107", "0.58265615", "0.5811445", "0.5768166", "0.5738013", "0.5712161", "0.569947", "0.568407", "0.56723994", "0.56482786", "0.5633261", "0.56320846", "0.56204545", "0.5619602", "0.56175125", "0.56159323", "0.56117266", "0.5594314", "0.55940014", "0.5589019", "0.5586751", "0.5583319", "0.5581159", "0.5581068", "0.55802447", "0.5571759", "0.55628026", "0.5562245", "0.55354303", "0.5531027", "0.55269027", "0.5525164", "0.5523639", "0.5520364", "0.55196536", "0.5515871", "0.5515266", "0.55074966", "0.5506252", "0.5505785", "0.550574", "0.54974204", "0.54926604", "0.549148", "0.54883146", "0.5481498", "0.54787946", "0.54714155", "0.5467625", "0.5463993", "0.54608035", "0.5458126", "0.5456452", "0.545555", "0.54470915", "0.5433578", "0.54301393", "0.54222095", "0.5420393", "0.5416217", "0.5412949", "0.54101956", "0.54073054", "0.5404168", "0.53988373", "0.53980535", "0.5396924", "0.5395683", "0.5394738", "0.53918445", "0.5391393", "0.5389182", "0.53878903", "0.53870195", "0.53869116", "0.5381488", "0.5379293", "0.53758365", "0.53738636", "0.5372725", "0.5370994", "0.5368245", "0.53670776", "0.5362626", "0.5354274", "0.53472257", "0.53437304", "0.53413635", "0.5337966", "0.5335678" ]
0.7082255
1
Test case for webinarUpdate Update a Webinar.
public function testWebinarUpdate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollUpdate()\n {\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function update($meeting)\n {\n\n }", "public function test_update() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n self::$outage->starttime += 10;\n outagedb::save(self::$outage);\n\n // Should still exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage)\",\n ['idoutage' => self::$outage->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertTrue(is_object($event));\n self::assertSame(self::$event->id, $event->id);\n self::$event = $event;\n }", "public function testDeveloperUpdate()\n {\n $developer = factory(Developer::class)->create();\n $response = $this->get('/developer/update?id=' . $developer->id);\n $response->assertStatus(200);\n }", "public function testUpdateSurvey()\n {\n $survey = Survey::factory()->create();\n\n $response = $this->json('PATCH', \"survey/{$survey->id}\", [\n 'survey' => ['epilogue' => 'epilogue your behind']\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', ['id' => $survey->id, 'epilogue' => 'epilogue your behind']);\n }", "public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }", "public function testD_update() {\n\n $fname = self::$generator->firstName();\n $lname = self::$generator->lastName;\n\n $resp = $this->wrapper->update( self::$randomEmail, [\n 'FNAME' => $fname,\n 'LNAME' => $lname\n ]);\n\n $this->assertObjectHasAttribute('id', $resp);\n $this->assertObjectHasAttribute('merge_fields', $resp);\n\n $updated = $resp->merge_fields;\n\n $this->assertEquals($lname, $updated->LNAME);\n\n }", "public function testSuccessfulInstructorUpdate() {\n try {\n $updatedInstructor = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->assertNotNull($updatedInstructor, \"The updated instructor is null\");\n $this->assertEquals($this->userTypeEnum->INSTRUCTOR, $updatedInstructor->getType(), \"The updated user is not\n an instance of INSTRUCTOR\");\n\n $InstructorInstitution = PersistentUserXInstitutionPeer::retrieveByPk($updatedInstructor->getUserId(),\n $this->institution->getInstitutionId());\n $this->assertNotNull($InstructorInstitution, \"The user x institution relation was not created for the instructor.\");\n $this->assertEquals(self::IDENTIFICATION, $InstructorInstitution->getIdentification(), \"The Instructor school\n identification is incorrect\");\n $this->assertEquals($updatedInstructor->getUserId(), $InstructorInstitution->getUserId(), \"The user id is\n incorrect on user x institution for the instructor\");\n $this->assertEquals($this->institution->getInstitutionId(), $InstructorInstitution->getInstitutionId(),\n \"The institution id is incorrect on user x institution for the instructor\");\n\n $instXProjec = PersistentUserXProjectPeer::retrieveByPK($updatedInstructor->getJnUsername(),\n $this->project->getProjectJnName());\n $this->assertNotNull($instXProjec, \"The relationship between instructor and project was not created\");\n $this->assertEquals($this->project->getProjectJnName(), $instXProjec->getProjectJnName(), \"The project name\n is incorrect on user x project\");\n $this->assertEquals($updatedInstructor->getJnUsername(), $instXProjec->getJnUsername(), \"The java.net\n username is incorrect on user x project for instructor\");\n $this->assertTrue($instXProjec->getIsOwner() == 1, \"The instructor is the owner of project.\");\n\n } catch (InfinityMetricsException $ime){\n $this->fail(\"The successful update of profile failed: \" . $ime);\n }\n\n }", "public function updated(Instructor $instructor)\n {\n //\n }", "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }", "public function test_update_item() {}", "public function test_update_item() {}", "function update() {\n\t\t$vars = $this->params['url'];\n\t\t$this->Event->id = $vars['id'];\n\t\t$this->Event->saveField('start', $vars['start']);\n\t\t$this->Event->saveField('end', $vars['end']);\n\t\t$this->Event->saveField('all_day', $vars['allday']);\n\t}", "public function update(Request $request, InterviewStatistic $interviewStatistic)\n {\n //\n }", "public function testUpdateVendorComplianceSurvey()\n {\n }", "public function testIntegrationUpdate()\n {\n $userFaker = factory(Model::class)->create();\n $this->visit('user/' . $userFaker->slug . '/edit')\n ->type('Foo bar', 'name')\n ->type('Foobar', 'username')\n ->type('[email protected]', 'email')\n ->type('foobar123', 'password')\n ->type('foobar123', 'password_confirmation')\n ->press('Save')\n ->seePageIs('user');\n $this->assertResponseOk();\n $this->seeInDatabase('users', [\n 'username' => 'Foobar',\n 'email' => '[email protected]'\n ]);\n $this->assertViewHas('models');\n }", "public function testUpdate()\n\t{\n\t\t$params = $this->setUpParams();\n\t\t$params['title'] = 'some tag';\n\t\t$params['slug'] = 'some-tag';\n\t\t$response = $this->call('PUT', '/'.self::$endpoint.'/'.$this->obj->id, $params);\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t$result = $response->getOriginalContent()->toArray();\n\n\t\t// tes apakah hasil return adalah yang sesuai\n\t\tforeach ($params as $key => $val) {\n\t\t\t$this->assertArrayHasKey($key, $result);\n\t\t\tif (isset($result[$key])&&($key!='created_at')&&($key!='updated_at'))\n\t\t\t\t$this->assertEquals($val, $result[$key]);\n\t\t}\n\n\t\t// tes tak ada yang dicari\n\t\t$response = $this->call('GET', '/'.self::$endpoint.'/696969', $params);\n\t\t$this->assertEquals(500, $response->getStatusCode());\n\t}", "function updateWebinar($webinarKey, $payloadArray, $sendNotification = true)\n {\n ($sendNotification) ? $parameters = ['notifyParticipants' => true] : $parameters = ['notifyParticipants' => false];\n\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n $webinarObject = new WebinarEntity($payloadArray);\n\n return $this->sendRequest('PUT', $path, $parameters, $payload = $webinarObject->toArray());\n }", "public function testUnitUpdate()\n {\n $input = [\n 'username' => 'foo.bar',\n 'email' => '[email protected]',\n 'password' => 'asdfg',\n 'password_confirmation' => 'asdfg',\n 'name' => 'foo bar'\n ];\n $request = Mockery::mock('Suitcoda\\Http\\Requests\\UserEditRequest[all]');\n $request->shouldReceive('all')->once()->andReturn($input);\n\n $model = Mockery::mock('Suitcoda\\Model\\User[save]');\n $model->shouldReceive('findOrFailByUrlKey')->once()->andReturn($model);\n $model->shouldReceive('save')->once();\n\n $user = new UserController($model);\n\n $this->assertInstanceOf('Illuminate\\Http\\RedirectResponse', $user->update($request, 1));\n }", "public function testUpdateAction()\n {\n $res = $this->controller->updateAction(\"1\");\n $this->assertContains(\"Update\", $res->getBody());\n }", "public function updated(Investor $investor)\n {\n //\n }", "public function testUpdate()\n {\n $data = array(\n 'foo' => 'baz'\n );\n\n $transaction = $this->client->transaction()->Update(654, $data);\n\n $this->assertEquals($data, get_object_vars($transaction->put), 'Passed variables are not correct');\n $this->assertEquals('PUT', $transaction->request_method, 'The PHP Verb Is Incorrect');\n $this->assertEquals('/transactions/654', $transaction->path, 'The path is incorrect');\n\n }", "public function test_it_updates_a_user()\n {\n $user = User::create(['email' => '[email protected]', 'given_name' => 'Andrew', 'family_name' => 'Hook']);\n\n $update = ['email' => '[email protected]', 'given_name' => 'A', 'family_name' => 'H'];\n\n $this->json('PUT', sprintf('/users/%d', $user->id), $update)\n ->seeJson($update);\n }", "public function testExampleUpdateRequestShouldSucceed()\n {\n $example = Example::factory()->create();\n $response = $this->put(route('example.update', $example->id), [\n 'param1' => 100,\n 'param2' => 'Hello World',\n ]);\n $response->assertStatus(200);\n }", "public function testHandleUpdateSuccess()\n {\n // Populate data\n $dealerAccountID = $this->_populate();\n \n // Set params\n $params = $this->customDealerAccountData;\n \n // Add ID\n $ID = $this->_pickRandomItem($dealerAccountID);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $params, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHas('dealer-account-updated', '');\n \n // Validate data\n $dealerAccount = $this->dealer_account->getOne($ID);\n $this->assertEquals($dealerAccount->name, $this->customDealerAccountData['name']);\n $this->assertEquals($dealerAccount->branch_ID, $this->customDealerAccountData['branch_ID']);\n }", "public function update(Request $request, Meeting $meeting)\n {\n //\n }", "public function update(Request $request, Appointments $appointments)\n {\n //\n }", "public function testUpdate(): void { }", "public function update(Request $request, EventStarter $eventStarter)\n {\n\t\t\n\t\t$eventStarter->schedule_plan = $request->get('schedule_plan');\n\t\t$eventStarter->status = $request->get('status');\n\t\t$eventStarter->save();\n\n\n\t return redirect(route('detail-event', ['eventStarter' => $eventStarter->id]));\n }", "public function testUpdateSurvey0()\n {\n }", "public function testUpdateSurvey0()\n {\n }", "public function testUpdate()\n\t{\n\t\t$this->resetReservationTable();\n\t\t$this->resetDateTimes();\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$reservation->save(false);\t\n\t\t$newDateTo = DateTime::createFromFormat('Y-m-d',$this->_dateOverlapToObj->format('Y-m-d'));;\n\t\t$newDateTo->add(new DateInterval('P10D'));\n\n\n\t\t$reservation = Reservation::model()->findByPk($reservation->getAttribute('id'));\n\t\t$reservation->setAttribute('dateto',$newDateTo->format('Y-m-d'));\n\t\t$reservation->setAttribute('confirmreservation',true);\n\t\t\n\t\t//must run validation rules\n\t\t$this->assertTrue($reservation->save());\n\t\n\t\t\n\t\t$reservation = Reservation::model()->findByPk($reservation->getAttribute('id'));\n\t\t$this->assertEquals($newDateTo->format('Y-m-d'),$reservation->dateto);\t\n\n\t\t\n\t}", "public function testApiUpdate()\n {\n $user = User::find(1);\n\n \n $compte = Compte::where('name', 'compte22')->first();\n\n $data = [\n 'num' => '2019',\n 'name' => 'compte22',\n 'nature' => 'caisse',\n 'solde_init' => '12032122' \n \n ];\n\n $response = $this->actingAs($user)->withoutMiddleware()->json('PUT', '/api/comptes/'.$compte->id, $data);\n $response->assertStatus(200)\n ->assertJson([\n 'success' => true,\n 'compte' => true,\n ]);\n }", "public function testUpdatePayrun()\n {\n }", "public function testSellerUpdatedSuccess()\n {\n $this->demoUserLoginIn();\n $spu = Spu::create([\n 'users_id' => '1',\n 'name' => 'test',\n 'description' => 'test',\n ]);\n $response = $this->call('PATCH', '/seller/4/update', [\n 'name' => 'testUpdate',\n 'description' => 'testUpdate',\n ]);\n $this->assertEquals(302, $response->status());\n }", "public function testSchedulesUpdateOut()\n {\n $result = $this->visit('events/{event}/schedules/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testWebinarStatus()\n {\n }", "public function test_admin_can_update_a_worker()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($admin = $this->createAdmin())\n ->visitRoute($this->route, $this->lastWorker()->id)\n ->type('worker_name', $this->makeWorker()->worker_name)\n ->type('worker_nif', $this->makeWorker()->worker_nif)\n ->type('worker_start', str_replace('/', '', $this->makeWorker()->worker_start))\n ->type('worker_ropo', $this->makeWorker()->worker_ropo)\n ->type('worker_ropo_date', str_replace('/', '', $this->makeWorker()->worker_ropo_date))\n ->select('worker_ropo_level', $this->makeWorker()->worker_ropo_level)\n ->type('worker_observations', $this->makeWorker()->worker_observations)\n ->press(trans('buttons.edit'))\n ->assertSee(__('The items has been updated successfuly'));\n });\n\n $this->assertDatabaseHas('workers', [\n 'worker_name' => $this->makeWorker()->worker_name,\n 'worker_nif' => $this->makeWorker()->worker_nif,\n 'worker_ropo' => $this->makeWorker()->worker_ropo,\n 'worker_ropo_level' => $this->makeWorker()->worker_ropo_level,\n 'worker_observations' => $this->makeWorker()->worker_observations,\n ]);\n }", "public function update($bunch_id , $subscriber_id, SubscriberRequest $request) {\n\n\n $update = Subscriber::find($subscriber_id);\n\n $update->update($request->all());\n\n return redirect()->route('subscriber.index',[$bunch_id]);\n\n }", "public function update(Request $request, Volunteer $volunteer)\n {\n //\n }", "public function testDebtorUpdate()\n {\n $this->saveDebtor();\n\n $oDebtor = (new DebtorDAO())->findByCpfCnpj('01234567890');\n $this->assertTrue(!is_null($oDebtor->getId()));\n\n $aDadosUpdate = [\n 'id' => $oDebtor->getId(),\n 'name' => 'Carlos Vinicius Atualização',\n 'email' => '[email protected]',\n 'cpf_cnpj' => '14725836905',\n 'birthdate' => '01/01/2000',\n 'phone_number' => '(79) 9 8888-8888',\n 'zipcode' => '11111-111',\n 'address' => 'Rua Atualização',\n 'number' => '005544',\n 'complement' => 'Conjunto Atualização',\n 'neighborhood' => 'Bairro Atualização',\n 'city' => 'Maceió',\n 'state' => 'AL'\n ];\n\n $oDebtorFound = (new DebtorDAO())->find($aDadosUpdate['id']);\n $oDebtorFound->update($aDadosUpdate);\n\n $oDebtorUpdated = (new DebtorDAO())->find($aDadosUpdate['id']);\n $this->assertTrue($oDebtorUpdated->getName() == 'Carlos Vinicius Atualização');\n $this->assertTrue($oDebtorUpdated->getEmail() == '[email protected]');\n $this->assertTrue($oDebtorUpdated->getCpfCnpj() == '14725836905');\n $this->assertTrue($oDebtorUpdated->getBirthdate()->format('d/m/Y') == '01/01/2000');\n $this->assertTrue($oDebtorUpdated->getPhoneNumber() == '79988888888');\n $this->assertTrue($oDebtorUpdated->getZipcode() == '11111111');\n $this->assertTrue($oDebtorUpdated->getAddress() == 'Rua Atualização');\n $this->assertTrue($oDebtorUpdated->getNumber() == '005544');\n $this->assertTrue($oDebtorUpdated->getComplement() == 'Conjunto Atualização');\n $this->assertTrue($oDebtorUpdated->getNeighborhood() == 'Bairro Atualização');\n $this->assertTrue($oDebtorUpdated->getCity() == 'Maceió');\n $this->assertTrue($oDebtorUpdated->getState() == 'AL');\n $this->assertTrue(!is_null($oDebtorUpdated->getUpdated()));\n $oDebtorUpdated->delete();\n }", "public function update($data) {}", "public function update($data) {}", "public function update(Request $request, Appointment $appointment)\n {\n //\n }", "public function update(Request $request, Appointment $appointment)\n {\n //\n }", "public function update(Request $request, appointment $appointment)\n {\n //\n }", "public function update(Request $request, TestResult $testResult)\n {\n //\n }", "public function testUpdate() {\n\n\t\t$request_uri = $this->root_url . 'update';\n\n\t\t$parameters = array(\n\t\t\t'uri' => $request_uri,\n\t\t\t'method' => 'POST',\n\t\t\t'database' => $this->db,\n\t\t\t'postdata' => array(\n\t\t\t\t'id' => 4,\n\t\t\t\t'firstname' => 'Andrei',\n\t\t\t\t'surname' => 'Kanchelskis',\n\t\t\t)\n\t\t);\n\n\t\t$server = new APIServer( $parameters );\n\n\t\t$server->run();\n\n\t\t$response = $server->getResponse();\n\n\t\t$this->assertArrayHasKey('status', $response);\n\t\t$this->assertArrayHasKey('command', $response);\n\n\t\t$this->assertEquals( $response['command'], 'update' );\n\t}", "public function testUpdate()\n {\n $requestInstance = null;\n\n $this->router->patch('/customers/{id}/relationships/{relationship}', [\n 'middleware' => ['request', 'response'],\n function(\\Luminary\\Http\\Requests\\Update $request) use(&$requestInstance) {\n $requestInstance = $request;\n }\n ]);\n\n $data = [\n 'data' => [\n 'type' => 'location',\n 'id' => '1234'\n ]\n ];\n\n $this->json('PATCH', 'customers/1234/relationships/location', $data , $this->headers());\n\n $this->assertResponseStatus(204);\n $this->assertInstanceOf(\\Luminary\\Http\\Requests\\Update::class, $requestInstance);\n $this->assertInstanceOf(CustomerAuthorize::class, $requestInstance->getAuthorize());\n $this->assertInstanceOf(\\Luminary\\Http\\Requests\\Update::class, $requestInstance->validatorArgs());\n $this->assertInstanceOf(\\Luminary\\Services\\Sanitation\\DefaultSanitizable::class, $requestInstance->getSanitizable());\n }", "public function updated(OnlineInquiry $onlineInquiry)\n {\n //\n }", "public function update(Request $request, RemoteAssessment $remoteAssessment)\n {\n //\n }", "public function testUpdateEvents()\n {\n $event= Event::factory(1)->create();\n // dd($event);\n $event->title = 'Maria';\n $this->put(\"/events\". $event[0]->id, $event->toArray());\n\n $this->assertDatabaseHas('events', [\n 'id' => 1,\n 'title' => 'Maria'\n ]);\n }", "public function testWebinarCreate()\n {\n }", "public function testHandleUpdateValidationError()\n {\n // Populate data\n $this->_populate();\n \n // Request\n $response = $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $this->customDealerAccountData, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Verify\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHasErrors();\n }", "public function testRequestUpdateItem()\n {\n\t\t$response = $this\n\t\t\t\t\t->json('PUT', '/api/items/6', [\n\t\t\t\t\t\t'name' => 'Produkt zostal dodany i zaktualizowany przez test PHPUnit', \n\t\t\t\t\t\t'amount' => 0\n\t\t\t\t\t]);\n\n $response->assertJson([\n 'message' => 'Items updated.',\n\t\t\t\t'updated' => true\n ]);\n }", "public function testUpdateNotOwnCreated()\r\n {\r\n //create teacher user\r\n $teacher = $this->CreateTeacher();\r\n $lisUser = $this->CreateTeacherUser($teacher);\r\n\r\n //now we have created teacheruser set to current controller\r\n $this->controller->setLisUser($lisUser);\r\n $this->controller->setLisPerson($teacher);\r\n\r\n //create other teacher user\r\n $otherTeacher = $this->CreateTeacher();\r\n $otherLisUser = $this->CreateTeacherUser($otherTeacher);\r\n\r\n //$name = uniqid() . 'Name';\r\n $subjectRound = $this->CreateSubjectRound();\r\n $student = $this->CreateStudent();\r\n //$anotherTeacher = $this->CreateTeacher();\r\n \r\n\r\n $independentWork = $this->CreateIndependentWork([\r\n 'name' => uniqid() . 'Name',\r\n 'duedate' => new \\DateTime,\r\n 'description' => uniqid() . ' Description for independentwork',\r\n 'durationAK' => (int) uniqid(),\r\n 'subjectRound' => $subjectRound->getId(),\r\n 'teacher' => $teacher->getId(),\r\n 'student' => $student->getId(),\r\n 'createdBy' => $otherLisUser->getId()\r\n ]);\r\n\r\n //$subjectRoundIdOld = $independentWork->getSubjectRound()->getId();\r\n //$studentIdOld = $independentWork->getStudent()->getId();\r\n //$teacherIdOld = $independentWork->getTeacher()->getId();\r\n\r\n $this->request->setMethod('put');\r\n $this->routeMatch->setParam('id', $independentWork->getId());\r\n\r\n $this->request->setContent(http_build_query([\r\n 'student' => $this->CreateStudent()->getId(),\r\n 'subjectRound' => $this->CreateSubjectRound()->getId(),\r\n 'teacher' => $teacher->getId(),\r\n ]));\r\n\r\n //fire request\r\n $result = $this->controller->dispatch($this->request);\r\n $response = $this->controller->getResponse();\r\n\r\n $this->PrintOut($result, false);\r\n\r\n $this->assertEquals(200, $response->getStatusCode());\r\n $this->assertEquals(false, $result->success);\r\n $this->assertEquals('SELF_CREATED_RESTRICTION', $result->message);\r\n }", "public function update(Request $request, ClientSurvey $clientSurvey)\n {\n //\n }", "public function Update()\n\t{\n\t\t$prefix = $this->Db->TablePrefix;\n\t\t$user = GetUser();\n\t\t$userid = $user->userid;\n\t\t$where = 'id = ' . $this->id;\n\n\t\t$surveys_data = $this->data;\n\n\t\tif (isset($surveys_data['_columns'])) {\n\t\t\tunset($surveys_data['_columns']);\n\t\t}\n\n\t\tif (isset($surveys_data['id'])) {\n\t\t\tunset($surveys_data['id']);\n\t\t}\n\n\t\t$surveys_data['updated'] = $this->GetServerTime();\n\n\t\t$this->Db->UpdateQuery('surveys', $surveys_data, $where);\n\t}", "public function update(User $user, Meeting $meeting)\n {\n //\n }", "public function update(Request $request, Nurse $nurse)\n {\n //\n }", "public function testUserUpdate()\n {\n $this->browse(function (Browser $browser) {\n $update_button = self::$locator . ' td .update_button';\n\n self::$username = 'A0Tester' . uniqid();\n $browser->visit('/')\n ->click($update_button)\n ->type('username', self::$username)\n ->type('first_name', 'aaaab')\n ->type('last_name', 'aaaab')\n ->click('button[type=\"submit\"]')\n\n ->waitForText('User data successfully updated!')\n ->assertSee('User data successfully updated!')\n ->assertValue('input[name=\"username\"]', self::$username)\n ->assertValue('input[name=\"first_name\"]', 'aaaab')\n ->assertValue('input[name=\"last_name\"]', 'aaaab');\n });\n }", "public function update(Request $request, Dateplanner $dateplanner)\n {\n //\n }", "public function actionUpdate() {}", "public function actionUpdate() {}", "public function update(Request $request, pregunta_test $pregunta_test)\n {\n //\n }", "public function updated(Apartment $apartment)\n {\n //\n }", "public function testUpdate()\n {\n Item::factory()->create(\n ['email' => '[email protected]', 'name' => 'test']\n );\n\n Item::factory()->create(\n ['email' => '[email protected]', 'name' => 'test']\n );\n\n Item::factory()->count(10)->create();\n\n //test item not found\n $this->call('PUT', '/items/11111')\n ->assertStatus(404);\n\n //test validation\n $this->put('items/1', array('email' => 'test1!kl'))\n ->seeJson([\n 'email' => array('The email must be a valid email address.'),\n ]);\n\n //test exception\n $this->put('items/1', array('email' => '[email protected]'))\n ->seeJsonStructure([\n 'error', 'code'\n ])\n ->seeJson(['code' => 400]);\n\n //test success updated item\n $this->put('items/1', array('email' => '[email protected]', 'name' => 'test1 updated'))\n ->seeJson([\n 'status' => 'ok',\n ])\n ->seeJson([\n 'email' => '[email protected]',\n ])\n ->seeJson([\n 'name' => 'test1 updated',\n ])\n ->seeJsonStructure([\n 'data' => [\n 'id',\n 'guid',\n 'name',\n 'email',\n 'created_dates',\n 'updated_dates',\n ]\n ]);\n\n $this->seeInDatabase('items', array('email' => '[email protected]', 'name' => 'test1 updated'));\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 testUpdateSession()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->put($this->url('sessions/1'), [\n 'name' => '2020-2021'\n ]);\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'name',\n 'school_id',\n 'start_date',\n 'end_date'\n ]);\n\n $response->assertJson([\n 'name' => '2020-2021'\n ]);\n }", "public function update($bannerclient);", "public function test_user_update()\n {\n $this->withoutMiddleware(ValidJWTMiddleware::class);\n\n $user = User::first();\n\n $response = $this->json('PUT', \"api/usuario/$user->id\", [\n 'first_name' => $this->faker->firstName(),\n 'last_name' => $this->faker->lastName(),\n 'email' => $this->faker->email(),\n 'telephone' => '+55' . $this->faker->phoneNumberCleared(),\n ]);\n\n $userValidate = User::first();\n\n $response->assertStatus(200)\n ->assertJson([\n 'success' => true,\n ]);\n\n $this->assertNotEquals($userValidate, $user);\n }", "public function Do_update_Example1(){\n\n\t}", "public function testUpdate()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $newModel = $this->makeFactory();\n\n $this->json('PUT', static::ROUTE . '/' . $model->id, $newModel->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_OK) \n ->seeJson($newModel->toArray());\n }", "public function testHandleUpdateSuccess()\n {\n // Populate data\n $branchIDs = $this->_populate();\n \n // Set params\n $params = $this->customBranchData;\n \n // Add ID\n $ID = $this->_pickRandomItem($branchIDs);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/branch/edit', $params, [], [], ['HTTP_REFERER' => '/branch/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/branch/edit');\n $this->assertSessionHas('branch-updated', '');\n \n // Validate data\n $branch = $this->branch->getOne($ID);\n $this->assertEquals($branch->name, $this->customBranchData['name']);\n $this->assertEquals($branch->promotor_ID, $this->customBranchData['promotor_ID']);\n }", "public function update(Agenda $agenda)\n {\n //\n }", "public function testCollectionTicketsUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testSaveUpdate()\n {\n $city = $this->existing_city;\n\n // set string properties to \"updated <property_name>\"\n // set numeric properties to strlen(<property_name>)\n foreach (get_object_vars($city) as $key => $value) {\n if ($key !== 'id' && $key != 'created') {\n if (is_string($value)) {\n $city->$key = \"updated \".$key;\n } elseif (is_numeric($value)) {\n $city->$key = strlen($key);\n }\n }\n }\n\n // update the city\n $city->save();\n\n // go get the updated record\n $updated_city = new City($city->id);\n // check the properties of the updatedCity\n foreach (get_object_vars($updated_city) as $key => $value) {\n if ($key !== 'id' && $key != 'created') {\n if (is_string($city->$key)) {\n $this->assertEquals(\"updated \".$key, $value);\n } elseif (is_numeric($city->$key)) {\n $this->assertEquals(strlen($key), $value);\n }\n }\n }\n }", "public function testPageUpdate()\n {\n $faker = Faker::create();\n $page = Page::inRandomOrder()->first();\n $response = $this\n ->actingAs(User::inRandomOrder()->first(), 'api')\n ->withHeaders([\n \"User-Agent\" => $faker->userAgent(),\n ])\n ->json('PUT', \"/api/pages/\" . $page->slug, [\n \"data\" => [\n \"name\" => $faker->sentence(4, true),\n ],\n \"relationships\" => [\n \"body\" => [\n \"data\" => [\n \"content\" => $faker->paragraphs(4, true),\n ],\n ],\n ],\n ]);\n $response\n ->assertStatus(200);\n }", "public function update(Request $request, Trainer $trainer)\n {\n //\n }", "public function Update($data) {\n\n }", "public function testProfileUpdateAll()\n {\n\n }", "public function update(Request $request, TrainingInstitute $trainingInstitute)\n {\n //\n }", "public function testUpdateUser()\n {\n $userData = [\n \"name\" => \"User 2\",\n \"email\" => \"[email protected]\",\n \"password\" => \"demo12345123\",\n \"org_id\" => 2\n ];\n $id = 4;\n $this->json('PUT', \"api/user/update/$id\", $userData, ['Accept' => 'application/json'])\n ->assertStatus(200)\n ->assertJsonStructure([\n \"action\",\n \"data\" => [],\n \"status\"\n ]);\n }", "public function update(Request $request, BookTour $bookTour)\n {\n //\n }", "public function testProfilePrototypeUpdateByIdReviews()\n {\n\n }", "public function test_authenticated_admin_users_can_hit_the_update_endpoint()\n {\n // First we create a test country\n $country = $this->createCountry();\n\n // Then we check if it was successfully added into the database\n $this->assertDatabaseHas('countries', $country->toArray());\n\n // Then we create an update request with auth headers and empty params\n $this->authenticatedAdmin()->update($country->code, [])\n // We assert status is 422, because now we are authenticated, but request params are invalid\n ->assertStatus(422)\n // Then we assert errors structure matches expected\n ->assertJsonStructure([\n 'errors' => [\n 'name',\n 'code'\n ]\n ]);\n }", "public function update(Request $request, AgendaItemSpeaker $agendaItemSpeaker)\n {\n //\n }", "public function test_shoppers_can_be_updated()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $response = $this->patch(route('shoppers.update', $shopper), $shppr = [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'phone' => '+16089673882',\n 'image' => UploadedFile::fake()->image('avatar.jpg', 400, 400)->size(1000),\n ]);\n\n $response->assertSessionHasNoErrors([\n 'name',\n 'phone',\n 'email',\n ]);\n\n $this->assertDatabaseHas(\n 'shoppers',\n [\n 'name' => $shppr['name'],\n 'email' => $shppr['email'],\n 'phone' => $shppr['phone'],\n 'image' => '/storage/'.time().'.'.$shppr['image']->extension(),\n 'admin_created_id' => '1',\n 'admin_updated_id' => $shopper->id\n ]\n );\n\n $response->assertStatus(302);\n $response->assertRedirect(route('shoppers.index'));\n }", "public function testWebinar()\n {\n }", "public function update(Request $request, Visit $visit)\n {\n //\n }", "public function update(Request $request, specimen_results $specimen_results)\n {\n //\n }", "public function test_if_failed_update()\n {\n }", "public function testUpdate()\n {\n\n $this->createDummyRole();\n\n $this->call('POST', '/api/role', array(\n 'action' => $this->updateAction,\n 'id' => 1,\n 'name' => \"updatedName\",\n 'description' => \"updatedDesc\",\n 'permissionCount' => $this->testPermissionCount,\n 'permission0' => 1,\n ));\n\n $this->assertDatabaseHas('roles', [\n 'id' => 1,\n 'name' => \"updatedName\",\n 'description' => \"updatedDesc\"\n ]);\n\n $this->assertDatabaseHas('role_permission', [\n 'role_id' => 1,\n 'permission_id' => [1]\n ]);\n\n $this->assertDatabaseMissing('role_permission', [\n 'role_id' => 1,\n 'permission_id' => [2]\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(Request $request, Contest $contest)\n {\n //\n }", "public function update(Request $request, Test $test)\n {\n //\n }", "public function update(Request $request,Instagrame $instagrame)\n {\n // dd($request);\n // // dd('hello');\n $insta=Instagrame::where('id',$request->id)->first();\n // dd($insta);\n DB::beginTransaction();\n try {\n $insta->update([\n // $personne_info->update([\n 'nombre_abonne'=>$request->nombre_abonne,\n 'engagement'=>$request->engagement,\n 'qualite'=>$request->qualite,\n 'like'=>$request->like,\n 'followers'=>$request->followers,\n 'commentaire'=>$request->commentaire\n ]);\n $insta->domaine()->sync($request->arr);\n Story::where('instagrame_id',$request->id)->update([\n 'date_1er'=>$request->date_1ers,\n 'nombre_publicaion'=>$request->nombre_publicaions, \n 'taux_reponse'=>$request->taux_reponses,\n 'nombre_jaime'=>$request->nombre_jaimes,\n ]);\n Feed::where('instagrame_id',$request->id)->update([\n 'date_1er'=>$request->date_1erf,\n 'nombre_publicaion'=>$request->nombre_publicaionf, \n 'taux_reponse'=>$request->taux_reponsef,\n 'nombre_jaime'=>$request->nombre_jaimef,\n ]);\n DB::commit();\n return response()->json(['message'=>'modification bien fait insta feed story']);\n } catch (Exception $e) {\n // } catch (\\Throwable $th) {\n DB::rollback();\n return response()->json(['message'=>'modification failed']);\n // return response()->json(['message1'=>'l\\'Ajout failed','error'=>$th->getMessage()]);\n }\n }", "public function update($banner);", "private function update($eventid,$title, $venue,$privacy,$email,$password)\n {\n $response =array();\n $response[\"success\"]=0;\n \n //check if the user is valid\n $tryLoginUser= new TryUserLogin($email,$password);\n if($tryLoginUser->isExists())\n {\n //get the current event if exist\n $event = TryFetchUserEvent::FetchById($eventid);\n if($event!=null){\n \n //set the event properties to the new added informations\n $eventObject= $this->parserEventJson(json_encode($event));\n if($eventObject!=null){\n \n $eventObject->setTitle($title);\n $eventObject->setId($eventid);\n $eventObject->setVenue($venue); \n $eventObject->setType($privacy); \n \n //validate to match such the date send is current\n if($this->validateEvent($eventObject))\n {\n //update the vent\n $tryUpdateEvent = new TryUpdateUserEvent($eventObject);\n $status= $tryUpdateEvent->update();\n if($status){\n $response[\"success\"]=1;\n $response[\"message\"]=\"Event Updated\";\n \n }else{\n $response[\"message\"]=\"There was error when trying to update event\";\n }\n }else{\n $response[\"error_message\"]=$this->__message; \n } \n }\n \n }else{\n $response[\"error_message\"]=\"Know event with the given information\"; \n } \n //exist\n\n }else{\n $response[\"error_message\"]=\"Unknown user request...\";\n }\n \n \n $jsonView = new JsonViewer();\n $jsonView->setContent($response);\n return $jsonView;\n }" ]
[ "0.73612994", "0.6821884", "0.6562233", "0.6452065", "0.64265007", "0.6362201", "0.6313415", "0.6226509", "0.6219833", "0.60943675", "0.6045985", "0.6031974", "0.6031974", "0.6027522", "0.5991147", "0.5972692", "0.59578246", "0.59480345", "0.59453034", "0.59413856", "0.5924573", "0.59210736", "0.5906127", "0.58821946", "0.58794975", "0.58515316", "0.58504605", "0.5848199", "0.58480036", "0.584564", "0.58452433", "0.58452433", "0.58313054", "0.58188504", "0.58002126", "0.57887113", "0.57680106", "0.5749245", "0.57330954", "0.5721358", "0.5718621", "0.57179826", "0.5710528", "0.5710528", "0.5707028", "0.5707028", "0.5703953", "0.569939", "0.56960404", "0.5687183", "0.5678702", "0.56770116", "0.56748253", "0.5670351", "0.56577086", "0.5657707", "0.56545717", "0.5649456", "0.5639158", "0.56344634", "0.5629755", "0.5626197", "0.5614427", "0.5613854", "0.5613854", "0.56092495", "0.5602793", "0.5601443", "0.5601411", "0.5598476", "0.5593626", "0.557799", "0.55763507", "0.55632204", "0.5563054", "0.5557327", "0.5554806", "0.5551512", "0.55503684", "0.5548486", "0.55478865", "0.55457157", "0.5542875", "0.55411893", "0.55397666", "0.5539407", "0.5538849", "0.5536886", "0.55366635", "0.55331486", "0.55328536", "0.55283105", "0.55267864", "0.5526217", "0.55252415", "0.5522929", "0.5519219", "0.5519176", "0.55135715", "0.55106884" ]
0.8108941
0
Test case for webinars List Webinars.
public function testWebinars() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelists()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function list_wilayah()\n\t{\n\t\tif($this->is_login){\n\t\t\t$products = $this->M_region->getAll();\n\t\t\t// Set Response\n\t\t\t$this->response_code = 200;\n\t\t\t$this->response['status'] = TRUE;\n\t\t\t$this->response['data'] = $products;\n\t\t}\n\n\t\t// Run the Application\n\t\t$this->run(SECURED);\n\t}", "public function testListSites()\n {\n }", "public function testIndex()\n {\n $client = static::createClient();\n $crawler = $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertCount(1, $crawler->filter('h1'));\n $this->assertEquals(1, $crawler->filter('html:contains(\"Trick List\")')->count());\n }", "function getAllWebinars($parameters = null)\n {\n $path = $this->getPathRelativeToOrganizer('webinars');\n\n return $this->sendRequest('GET', $path, $parameters, $payload = null);\n }", "function citrixonline_get_list_of_webinars($type = 0) \n {\n\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\treturn 0;\n\t\t\t\n\t\t$return_array = array();\n\t\t\n\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/upcomingWebinars?oauth_token=\".$this->access_token), true);\n\t\t\n\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t{\n\t\t\t$this->set_access_token('');\n\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t}\n\t\t\n\t\t$return_array['upcoming']['webinars'] = $reponse;\n $return_array['upcoming']['status'] = true;\n\t\t\n\t\tif($type>0)\n\t\t{\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/historicalWebinars?oauth_token=\".$this->access_token), true);\n\t\t\t\t\t\t\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t\t\n\t\t\t$return_array['historical']['webinars'] = $reponse;\n\t\t\t$return_array['historical']['status'] = true;\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function testListPastWebinarPollResults()\n {\n }", "public function testList()\n {\n $this->visit('/admin/school')\n ->see(SchoolCrudController::SINGLE_NAME);\n }", "public function guest_can_get_all_websites() {\n $response = $this->get('api/websites');\n $response->assertStatus(200);\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testListSiteContainers()\n {\n }", "public function testIndex()\n {\n // full list\n $response = $this->get(url('api/genre?api_token=' . $this->api_token));\n $response->assertStatus(200);\n $response->assertSeeText('Thriller');\n $response->assertSeeText('Fantasy');\n $response->assertSeeText('Sci-Fi');\n }", "public function test_list_how_do_you_hears()\n {\n $data = factory(HowDoYouHear::class)->create();\n $response = $this->get($this->url, $this->headers());\n $response->assertStatus(200);\n $response->assertJsonStructure(array_keys($data->toarray()), $data->toarray());\n $this->assertDatabaseHas($this->table, $data->toarray());\n }", "public function listing();", "function getUpcomingWebinars()\n {\n $path = $this->getPathRelativeToOrganizer('upcomingWebinars');\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function testIndex()\n {\n $this->getBrowser()->\n getAndCheck('partenaire', 'index', '/partenaire/index', 404)\n ;\n }", "public function test_show_list_of_products()\n {\n $response = $this->getJson('/api/products');\n $response->assertStatus(200);\n }", "public function listar() {\n \t$lista_webs = Web::all();\n \treturn view('webs')\n \t\t->with('lista_webs',$lista_webs);\n }", "protected function _getLists() {\n\t\t/** @var Thrive_Dash_Api_WebinarJamStudio $api */\n\t\t$api = $this->getApi();\n\t\ttry {\n\t\t\t$lists = array();\n\t\t\t$webinars = $api->getUpcomingWebinars();\n\t\t\tforeach ( $webinars as $key => $item ) {\n\t\t\t\t$lists [] = array(\n\t\t\t\t\t'id' => $item['webinar_id'],\n\t\t\t\t\t'name' => $item['name']\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn $lists;\n\t\t} catch ( Thrive_Dash_Api_WebinarJamStudio_Exception $e ) {\n\t\t\t$this->_error = $e->getMessage();\n\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function testGetAll()\n {\n $ret =\\App\\Providers\\ListsServiceProvider::getLists();\n \n $this->assertNotEmpty($ret);\n }", "function testListBuckets() {\n $this->get('/');\n $this->assertEqual(api_response::getInstance()->getCode(), 200);\n $this->assertText('/buckets/bucket[@id=\"test\"]/@id', 'test');\n }", "public function test_list()\n {\n $response = $this->get('/api/employees');\n\n $response->assertStatus(200);\n }", "public function testIndexTahun()\n\t{\n\t\t$response = $this->action('GET', 'TahunController@index');\n\t}", "public function testListPastWebinarFiles()\n {\n }", "private static function removeAllTestingWebinars(): void\n {\n foreach (self::$driverHandler->getWebinars() as $webinar) {\n if (str_starts_with($webinar->slug, 'test-')) {\n self::$driverHandler->removeWebinar($webinar->id);\n }\n }\n }", "public function testWebinarPolls()\n {\n }", "public function test_listIndexAction ( )\n {\n $params = array(\n 'event_id' => 1,\n 'action' => 'list',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n\n }", "public function testListPagination()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visit('admin/users')\n ->assertSee('Users Gestion')\n ->clickLink('3')\n ->assertSee('GreatRedactor');\n });\n }", "public function getMagentoWebsites();", "function GetWebPanelList()\n\t{\n\t\t$result = $this->sendRequest(\"GetWebPanelList\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function testgetHyperLinks() {\n //Setup \n $pageTest = new INM5001A13_WebTools(\"http://localhost/EquipeRene/Snippets/pagePourTestUnitaireWebTool.html\");\n\n $resultat = $pageTest->getHyperLinks();\n\n\n $this->assertEquals($resultat[\"http://google.ca\"], 'Search GGxxGLE');\n }", "public function testListaProdutoTest()\n {\n $response = $this->get('/pedidos');\n $response->assertStatus(200);\n\n }", "public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }", "public function testList()\n {\n //Tests all products\n $this->clientAuthenticated->request('GET', '/product/list');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('productId', $first);\n\n //Tests all products linked to a child\n $this->clientAuthenticated->request('GET', '/product/list/child/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('productId', $first);\n }", "public function apiList();", "function loadUsersListPage()\n {\n $this->get('/usuarios')\n ->assertStatus(200)\n ->assertSee('Listado de usuarios')\n ->assertSee('Javier')\n ->assertSee('Francisco');\n }", "public function test_rangLista()\n\t{\n\t\t$output = $this->request('GET', ['UserController','rangLista']);\n\t\t$this->assertContains('<h3 class=\"text-center text-dark\"><i>Običan korisnik -> Rang lista</i></h3>\t', $output);\n\t}", "public function testListProduk()\n {\n $response = $this->getJson('/produk', [\n ]);\n $response->dump();\n $response->assertStatus(200);\n }", "public function testGetBrandsUsingGET()\n {\n }", "public function index()\n {\n // Get all of the wishlists from the database, and return them as JSON data\n $wishlists = Wishlist::with(['wishitems'])->get();\n return response($wishlists, 200)\n ->header('Content-Type', 'application/json');\n }", "public function testFindAllByRoute()\n {\n $this->markTestIncomplete('WebTestCases are not implemented yet.');\n }", "public function listsList()\n {\n\tthrow new Exception('Not implemented');\n }", "public function testWebSearchForSite()\n {\n $webResultSet = $this->_yahoo->webSearch('php', ['site' => 'www.php.net']);\n\n $this->assertTrue($webResultSet instanceof Zend_Service_Yahoo_WebResultSet);\n\n $this->assertTrue($webResultSet->totalResultsAvailable > 10);\n $this->assertEquals(10, $webResultSet->totalResultsReturned);\n $this->assertEquals(10, $webResultSet->totalResults());\n $this->assertEquals(1, $webResultSet->firstResultPosition);\n\n foreach ($webResultSet as $webResult) {\n $this->assertTrue($webResult instanceof Zend_Service_Yahoo_WebResult);\n }\n }", "public function testDashboardGet()\n {\n $this->visit('/dashboard/articless')\n ->see('Nieuws');\n }", "public function getServerList() {}", "public function testListServers()\n {\n }", "public function test_list()\n {\n $response = $this->get('/proposal/all');\n\n $response->assertSee('data-js-proposal-cards');\n\n $response->assertSee('card-header');\n\n $response->assertStatus(200);\n }", "function index() {\n\t\t$this->show_list();\n\t}", "public function testIndex()\n\t{\n\t\t$data = [];\n\n\t\tforeach ($this->saddles as $saddle) {\n\t\t\t$data[] = [\n\t\t\t\t'id' => $saddle->id,\n\t\t\t\t'name' => $saddle->name,\n\t\t\t\t'horse' => [\n\t\t\t\t\t'id' => $saddle->horse->id,\n\t\t\t\t\t'stable_name' => $saddle->horse->stable_name,\n\t\t\t\t],\n\t\t\t\t'brand' => [\n\t\t\t\t\t'id' => $saddle->brand->id,\n\t\t\t\t\t'name' => $saddle->brand->name,\n\t\t\t\t],\n\t\t\t\t'style' => [\n\t\t\t\t\t'id' => $saddle->style->id,\n\t\t\t\t\t'name' => $saddle->style->name,\n\t\t\t\t],\n\t\t\t\t'type' => $saddle->type,\n\t\t\t\t'serial_number' => $saddle->serial_number,\n\t\t\t\t'created_at' => $saddle->created_at->format('d/m/Y'),\n\t\t\t];\n\t\t}\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->get('/api/v1/admin/saddles?per_page=9999')\n\t\t\t ->assertStatus(200)\n\t\t\t ->assertJson(['data' => $data]);\n\t}", "public function testIndex()\n {\n // $this->assertTrue(true);\n $response = $this->json('get','/api/todos');\n $this->seeJsonStructure($response, [\n '*' => [\n 'id', 'status', 'title', 'created_at', 'updated_at'\n ]\n ]);\n }", "public function index()\n {\n //\n //$warehouses = Warehouse::paginate(10);\n //return WarehouseResource::collection($warehouses);\n return Warehouse::all();\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function list();", "public function list();", "public function list();", "public function _testMultipleInventories()\n {\n\n }", "public function show(web $web)\n {\n //\n }", "public function test_index()\n {\n Instrument::factory(2)->create();\n $response = $this->get('instrument');\n $response->assertStatus(200);\n }", "public function testWebinarPollGet()\n {\n }", "public function test_all_movies_list_should_be_accessible()\n {\n $response=$this->get(route('index.movies'));\n $response->assertStatus(Response::HTTP_OK);\n }", "public function testGetListActionWithToken()\n {\n // Get an authenticated client\n $client = $this->createAuthenticatedClient('sjouan', '1GreatP@ssword');\n // Test the route\n $client->request('GET', '/api/products');\n\n // Check the response\n $this->assertSame(Response::HTTP_OK, $client->getResponse()->getStatusCode());\n // asserts that the response status code is 2xx\n $this->assertTrue($client->getResponse()->isSuccessful(), 'response status is 2xx');\n }", "public function testGetSuppliersUsingGET()\n {\n }", "public function browseAction() {\n $this->validateRequestMethod();\n // Prepare the response\n $params = $response = array();\n $params = $this->_getAllParams();\n Engine_Api::_()->getApi('Core', 'siteapi')->setView();\n\n //GET PAGINATOR\n $params['pagination'] = 1;\n $paginator = Engine_Api::_()->getDbtable('wishlists', 'sitereview')->getBrowseWishlists($params);\n $page = $this->_getParam('page', 1);\n $limit = $this->_getParam('limit', 20);\n $paginator->setItemCountPerPage($limit);\n $paginator->setCurrentPageNumber($page);\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $totalItemCount = $paginator->getTotalItemCount();\n $totalPages = ceil(($totalItemCount) / $limit);\n $response['totalItemCount'] = $totalItemCount;\n if (!empty($totalItemCount)) {\n foreach ($paginator as $wishlistObj) {\n $wishlist = $wishlistObj->toArray();\n if (isset($wishlist['body']) && !empty($wishlist['body']))\n $wishlist['body'] = strip_tags($wishlist['body']);\n $lists = $wishlistObj->getWishlistMap(array('orderby' => 'listing_id'));\n $count = $lists->getTotalItemCount();\n $tempListings = array();\n $counter = 0;\n if (_ANDROID_VERSION >= '1.8.6' || _IOS_VERSION >= '1.8.0') {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n } else {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n }\n $wishlist = array_merge($wishlist, $tempListings);\n $check_availability = Engine_Api::_()->sitereview()->check_availability('sitereview_wishlist', $wishlistObj->wishlist_id);\n $checkFollowAvailablity = $wishlistObj->follows()->isFollow($viewer);\n $tempMenu = array();\n if (!empty($viewer_id)) {\n if (empty($check_availability)) {\n $wishlist['isLike'] = 0;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Like'),\n 'url' => '/like',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n } else {\n $wishlist['isLike'] = 1;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Unlike'),\n 'url' => '/unlike',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n }\n\n if (!empty($checkFollowAvailablity)) {\n $wishlist['followed'] = 1;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Unfollow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n } else {\n $wishlist['followed'] = 0;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Follow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n }\n\n $wishlist['gutterMenu'] = $tempMenu;\n }\n $tempResponse[] = $wishlist;\n }\n }\n if (!empty($viewer_id)) {\n $level_id = $viewer->level_id;\n } else {\n $level_id = Engine_Api::_()->getDbtable('levels', 'authorization')->fetchRow(array('type = ?' => \"public\"))->level_id;\n }\n $can_create = ($viewer_id) ? 1 : 0;\n $response['canCreate'] = $can_create;\n if (!empty($tempResponse))\n $response['response'] = $tempResponse;\n $this->respondWithSuccess($response, true);\n }", "public function testWebinarPanelistsDelete()\n {\n }", "function listing() {\r\n\r\n }", "public function testIndex(): void\n {\n $response = $this\n ->actingAs($this->user)\n ->get('/');\n $response->assertViewIs('home');\n $response->assertSeeText('Сообщения от всех пользователей');\n }", "public function testListExperts()\n {\n }", "public function testListSiteMemberships()\n {\n }", "public function lister()\r\n {\r\n }", "public function test_list_of_resource()\n {\n $response = $this->artisan('resource:list');\n $this->assertEquals(0, $response);\n }", "public function testIndexRouteIsWorking()\n {\n $client = static::createClient();\n $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertSelectorExists('.profit_amount');\n $this->assertSelectorTextContains('.navbar-brand', 'Margin Calculator');\n\n return null;\n }", "public function testListQrcodes()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin')\n ->clickLink('Qrcodes')\n ->assertPathIs('/admin/qrcodes')\n ->assertSee('List Qrcodes');\n });\n }", "public function testIndexAction()\n {\n// $this->logInAsSuperAdmin();\n\n $crawler = $this->client->request('GET', '/admin/dashboard');\n\n $this->assertTrue($this->client->getResponse()->isSuccessful());\n $this->assertEquals(1, $crawler->filter('h2:contains(\"Tableau de bord\")')->count());\n }", "public function listsWhostageget()\r\n {\r\n $response = Whostage::all();\r\n return response()->json($response,200);\r\n }", "public function testAllManufacturerUrls()\n {\n $this->loginAsMeatManufacturer();\n\n $testUrls = [\n $this->Slug->getManufacturerMyOptions(),\n $this->Slug->getMyDepositList(),\n $this->Slug->getMyStatistics(),\n $this->Slug->getManufacturerProfile(),\n $this->Slug->getProductAdmin(),\n $this->Network->getSyncProductData(),\n $this->Network->getSyncProducts()\n ];\n\n $this->assertPagesForErrors($testUrls);\n\n $this->logout();\n }", "public function testWebinar()\n {\n }", "public function testListarProdutos()\n {\n $response = $this->get('/api/produtos/listar');\n\n $response->assertStatus(200);\n }", "public function testIndex()\n {\n $this->browse(function (Browser $browser) {\n $bill_1 = Bill::factory()->create(['contract_id' => $this->contract->id, 'tenant_id' => $this->tenant->id]);\n $bill_2 = Bill::factory()->create(['contract_id' => $this->contract->id, 'tenant_id' => $this->tenant->id]);\n\n $browser->loginAs($this->user)\n ->visit('/tenants/'.$this->tenant->id.'?tab=bills#tab')\n ->assertSee($bill_1->number)\n ->assertSee($bill_2->number);\n });\n }", "public function test_list_stores_url()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit(new ListStores());\n });\n }", "public function listAction() {}", "public function testIndex()\n\t{\n\t\t// correct route for posts\n\t\t$this->call('GET', '/api/posts');\n\t}", "public function webIndex()\n {\n $data['roles'] = Role::where('guard_name','web')->paginate(10);\n $data['title'] = 'Available Roles for Web';\n\n if (View::exists('roles.index')) {\n return view('roles.index', $data);\n } else {\n return view('laravel-permission::roles.index', $data);\n }\n }", "public function test_admin_squad_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "public function testAllProductsList()\n {\n $response = $this->runApp('GET', '/v1/products?password=' . $this->apiPassword);\n\n $this->assertEquals(StatusCode::HTTP_OK, $response->getStatusCode());\n $result = (array)json_decode($response->getBody())->result;\n $this->assertEquals(count($result), 100);//default 100 products in db\n }", "public function testIndex()\n\t{\n\t\t$client = static::createClient();\n\n\t\t$crawler = $client->request('GET', '/');\n\n\t\t$this->assertEquals(200, $client->getResponse()->getStatusCode());\n\t}", "public function test_shows_skills_list()\n {\n factory(Skill::class)->create(['name' => 'PHP']);\n factory(Skill::class)->create(['name' => 'JS']);\n factory(Skill::class)->create(['name' => 'SQL']);\n\n $this->get('/habilidades')\n \t\t ->assertStatus(200)\n \t\t ->assertSeeInOrder([\n \t\t \t'JS',\n \t\t \t'PHP',\n \t\t \t'SQL'\n \t\t ]);\n }", "public function web();", "public function index()\n {\n $data['webpages'] = WebPage::orderBy('id', 'desc')->paginate(10);\n\n return view('webpage.list', $data);\n }", "public function index()\n {\n // CHANGED TO FRONTENDCONTROLLER@HOMEPAGE\n\n $client = new Client(['base_uri' => 'http://www.mocky.io/v2/']);\n $response = $client->request('GET', '5c67eb6b3800002615b100ff');\n if($response->getStatusCode() == 200){\n $allergens = json_decode($response->getBody()->getContents())->items;\n }\n //send list of allergens to frontend\n dd($allergens);\n }", "public function testInitCleanHTML()\n {\n new DomainList();\n }", "public function testListServer()\n {\n }", "public function listAction()\n {\n // some logic\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testIndex(){\r\n\t\t$destino = Enhance::getCodeCoverageWrapper('EventosControllerClass');\r\n\t\t$destino->index();\r\n\t\t$this->call('GET', 'admin');\r\n\t\t$this->assertResponseOk();\r\n\t}", "public function testIndex()\n {\n // serializing it back in indexAction().\n $client = new Client('http://svsjbshc1.stg.allegiantair.com:8580');\n $request = $client->get(\n 'otares/v2/api/lookups/CustomerRole'\n );\n\n $response = $request->send();\n $initialResult = $response->getBody(true);\n\n $client = static::createClient();\n $client->request(\n 'GET',\n 'customer-role',\n array(),\n array(),\n array('CONTENT_TYPE' => 'application/json')\n );\n\n $processedResult = $client->getResponse()->getContent();\n\n $this->assertJsonStringEqualsJsonString(\n $initialResult,\n $processedResult\n );\n\n $this->assertEquals(200, $response->getStatusCode());\n }", "public function testListIdentities()\n {\n }", "public function testListIdentities()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function getViewWarehouseList();" ]
[ "0.635775", "0.6300158", "0.6266826", "0.61853427", "0.6053846", "0.5991229", "0.59525377", "0.59223324", "0.5878913", "0.5813563", "0.5790048", "0.57246953", "0.5714969", "0.5712513", "0.56930894", "0.5674928", "0.5632804", "0.5627633", "0.5627321", "0.56119186", "0.559497", "0.55930626", "0.55845904", "0.55688286", "0.5553756", "0.55341005", "0.5530284", "0.5523856", "0.55195713", "0.5516311", "0.5511735", "0.5501357", "0.5493221", "0.5465281", "0.5450625", "0.5446986", "0.5445108", "0.54348856", "0.54337084", "0.5423535", "0.5418711", "0.5415779", "0.5385932", "0.5377176", "0.53720254", "0.53719234", "0.5365518", "0.53632176", "0.5362812", "0.5337342", "0.5333619", "0.5330253", "0.5325894", "0.5317813", "0.5317813", "0.5317813", "0.53163445", "0.53092164", "0.5302191", "0.5301722", "0.53016657", "0.5291455", "0.5287518", "0.5275879", "0.5274605", "0.5261326", "0.52573377", "0.52570623", "0.52526015", "0.5250963", "0.5250002", "0.52493185", "0.5239685", "0.5238256", "0.5229972", "0.5229695", "0.52267694", "0.52224064", "0.5220437", "0.52195305", "0.52168083", "0.5216212", "0.5214993", "0.52145296", "0.5210848", "0.5204256", "0.5202572", "0.51891154", "0.51872253", "0.5183883", "0.51810896", "0.51808506", "0.5177136", "0.5176728", "0.51723766", "0.51707673", "0.51525456", "0.51525456", "0.51506156", "0.5148257" ]
0.7002258
0
Function that return the user index page
public function index() { $users = $this->getDoctrine() ->getRepository(User::class) ->findAll(); $recipes = $this->getDoctrine() ->getRepository(Recipe::class) ->findAll(); $reviews = $this->getDoctrine() ->getRepository(Review::class) ->findAll(); return $this->render('user/index.html.twig', [ 'users' => $users]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return view('Admin::pages.user.index');\n }", "public function index()\n\t{\n\n\t\treturn \"this is the index of the user\";\n\t}", "public function index()\r\n\t{\r\n\t\tif(\\Gate::denies('user-index')){//allows=false, denies=true\r\n\t\t\treturn back()->withInput();\r\n\t\t}\r\n\t\t$users = User::wherenotin('id',[Auth::user()->id,'1'])->get();\r\n\t\treturn View('users.index', ['titlepage' => $this->title,'users' => $users]);\r\n\t}", "public function index()\n\t{\n\t\treturn view('admin.pages.users-index', [\n\t\t\t'users' => User::paginate(10), \n\t\t]);\n\t}", "public function index()\n {\n if (auth()->user()->is_admin == 'Y') {\n $items = User::latest()->paginate(10);\n } else {\n $items = User::where('id', auth()->user()->id)->paginate(10);\n }\n return view('pages.user.index', compact('items'));\n }", "public function userIndex(){\n\t\t$playerId = Auth::user()->id;\n\t\treturn $this->index($playerId);\n\t}", "public function index() {\n if(!$this->user){\n die('Members Only <a href=\"/users/login\">Login</a>');\n } \n echo \"This is the index page\";\n }", "public function index()\n {\n\t\t\n // Grab all the users\n $users = User::All();\n\n // Show the page\n return View('admin.users.index', compact('users'));\n }", "public function index()\n {\n // show list user\n }", "public function index()\n\t{\n\t\t// $users = $this->userRepo->getPaginatedWhere(3, 'disabled', 1);\n\n\t\t$users = $this->userRepo->getUserIndex(Input::all());\n\n\t\treturn View::make('user.index')->with('users', $users);\n\t}", "public function index()\n {\n // Show the page\n return view('admin.users.index');\n }", "public function index()\n { \n $users = User::latest()->paginate(10);\n return view('admin.index_user', compact('users'))\n ->with('i', (request()->input('page', 1) - 1) * 10);\n }", "public function index()\n {\n $users = User::All();\n $iduser = Auth::id();\n // Show the page\n return View('admin.users.index', compact('users', 'iduser'));\n }", "public function index()\n {\n $this->checkAdmin();\n $users = $this->userRepository->getPaginate(parent::$nbrPerPage);\n $links = $users->setPath('')->render();\n\n return view('users/index', compact('users', 'links'));\n }", "public function index()\n\t{\n\t\treturn View('kagi::users.index');\n\t}", "public function index(){\n Auth::checkUserLogin();\n\n\t\t// Set the Page Title ('pageName', 'pageSection', 'areaName')\n\t\t$this->_view->pageTitle = array('Index Users', 'Users');\n\t\t// Set Page Description\n\t\t$this->_view->pageDescription = 'Users';\n\t\t// Set Page Section\n\t\t$this->_view->pageSection = 'Users';\n\n\t\t###### PAGINATION ######\n //sanitise or set keywords to false\n if(isset($_GET['keywords']) && !empty($_GET['keywords'])){\n $_GET['keywords'] = FormInput::checkKeywords($_GET['keywords']);\n }else{\n $_GET['keywords'] = false;\n }\n\n $totalItems = $this->_model->countAllData($_GET['keywords'], 'active');\n $pages = new Pagination(12,'keywords='.$_GET['keywords'].'&page', $totalItems[0]['total']);\n $this->_view->getAllData = $this->_model->getAllData($pages->get_limit(), $_GET['keywords'], 'active');\n\n\t\t// Create the pagination nav menu\n\t\t$this->_view->page_links = $pages->page_links('?', null, 'front');\n\n\t\t// Render the view ($renderBody, $layout, $area)\n\t\t$this->_view->render('users/index', 'layout');\n\t}", "public function index()\n {\n $this->authorize('index', User::class);\n return view('theme.backoffice.pages.user.index', [\n 'users' => auth()->user()->visible_users()\n ]);\n }", "public function index()\n {\n return view('admin.users.index')\n ->with('users',User::all())\n ->with('title','List Users')\n ->with('page_name_active',$this->page_name_active);\n }", "public function index()\n\t{\n\t\tLog::info('Ingreso al Index');\n\t\t$page = Input::get('page', 1);\n\n\t\t$data = $this->user->getByPage($page, 15);\n\n\t\t$users = Paginator::make($data->items, $data->totalItems, 15);\n\t\t$users = $this->presenter->paginator($users, new UserPresenter);\n\n\t\treturn View::make(\"users.index\", compact(\"users\"));\n\t}", "public function index()\n {\n $users = User::all();\n return view('pages.user.index',['users' => $users]);\n }", "public function getIndex()\n\t{\n\t\treturn \\View::make('admin/user.index');\n\t\t\n\t}", "public function index()\n {\n $userLists = UserList::where('public', 1)->paginate(12);\n return view('pages.userlist.index', compact('userLists'));\n }", "public function index()\n {\n $page = [\n 'title' => 'List User'\n ];\n\n return view('layouts.user.index')->withPage($page);\n }", "public function index()\n {\n $users = User::all();\n return view('pages/index_users')->with('users', $users);\n }", "public function index()\n {\n $pageConfigs = ['pageHeader' => false];\n return view('content.admin.users.index', ['pageConfigs' => $pageConfigs]);\n }", "public function index()\n {\n $model = User::where(\"id\",\"!=\",1)->orderby(\"id\",\"desc\")->paginate(10);\n return view(\"ContentManager::user.index\",['model' => $model]);\n }", "public function index() {\n\t\t// add page title\n\t\t$this->output->append_title('users');\n\t\t// add breadcrumbs\n\t\t\n\t\t$this->breadcrumb->populate(array(\n\t\t\t'Dashboard' => parent::$module.'/dashboard',\n\t\t\t'users'\n\t\t));\n\t\t\n\t\t$data = array();\n\t\t// load view\n\t\t$this->load->view(parent::$module.'/index',$data);\n\t}", "public function index()\n\t\t{\n\t\treturn view('shop.user.index');\n\t\t}", "public function index()\n\t{\n\t\t$data['logo'] = \"/img/ilih.png\";\n\t\t$data['users'] = $this->User->getAll();\n\n\t\t$this->parser->parse('home', $data);\n\t}", "public function index()\n {\n return view('user::index');\n }", "public function userHome() {\n\n $this->page->getPage('userhome.tpl');\n }", "public function index()\n {\n $this->user_list();\n }", "public function index() {\n\t\t$this->CurrentUser = BankAccessor::create()->getCurrentUser();\n\t\t\n\t\tif ($this->CurrentUser == null) {\n\t\t\t\n\t\t\t// If there isn't one, redirect to login\n\t\t\treturn $this->redirect(\"login/\");\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\t// Otherwise, render with page\n\t\t\treturn $this->renderWith(\"Page\");\n\t\t}\n\t}", "public function getUserIndex()\n\t{\n\t\t//当不是超级管理员时 只显示本人用户信息\n\t\t$query = array();\n\t\tif($this->cVariable['userInfo']->id != 17){\n\t\t\t$query['id'] = $this->cVariable['userInfo']->id;\n\t\t}\n\t\t\n\t\t$this->cVariable['total'] = $this->user->getUserCount($query);\n\n $this->cVariable['pages'] = ceil($this->cVariable['total'] / 10); //总页数\n\n $this->cVariable['userData'] = $this->user->getUserData($query);\n\n\t\treturn View::make('User.UserIndex', $this->cVariable);\n\t}", "public function index()\n {\n $data = Users::all();\n return view('pages.users.index')->with('users', $data);\n }", "public function index()\n {\n $users = User::sortable()->orderBy('created_at', 'desc')->paginate(config('paginate.number_users'));\n return view('admin.pages.users.index', compact('users'));\n }", "public function index()\n {\n $users = $this->model->paginate();\n return view('menu-maker::users.index', compact('users'));\n }", "public function index()\n {\n $users = User::paginate(10);\n if(count($users)>0)\n return view('admin.users.index', compact('users'));\n else\n return view('errors.404');\n }", "public function index()\n {\n\n //$users = User::paginate(10, ['*'], 'page', 15);\n return view('admin.pages.user_manage.list');\n }", "public function index()\n\t{\n\n\t\t//get all users in the database\t\t\n\t\t$users = User::where('id', '!=', Auth::user()->id)->paginate(15);\n\n\t\t//create a view for index page\n\t\treturn View::make('user.index')\n\t\t\t->with(array('users' => $users));\n\t}", "public function index()\n {\n $this->userlist();\n }", "public function index()\n {\n $page_title = \"user Dashboard\";\n return view('user.index', compact('page_title'));\n }", "public function index()\n {\n if(!auth()->user()->isSuperadmin())\n return redirect(\"home\")->withErrors(\"No puedes acceder a esta seccion de la web\");\n\n\n $users = User::paginate(9);\n\n return view($this->pathViews.\"index\",compact('users'));\n }", "public function index ()\n {\n // Set some page vars\n $User = new User;\n\n $Vars = compact('User');\n View::Make('index', $Vars);\n }", "public function index()\n\t{\n\t\t$stokbrg = $this->SModel->findAll();\n\t\t$mod = $this->JModel->findAll();\n\n\t\t$tdata = [\n\t\t\t'title' => 'Admin | Home Page',\n\t\t\t'rekap' => $mod,\n\t\t\t'stok' => $stokbrg\n\t\t];\n\n\t\treturn view('user/index', $tdata);\n\t}", "public function index()\n {\n\n $users = User::paginate($this->pagination);\n\n $sno = (($users->CurrentPage() - 1) * $this->pagination) + 1;\n\n return view('admin.manage.users.index',[\n 'users' => $users,\n 'sno' => $sno,\n ]);\n }", "public function indexAction()\n {\n // Get a query of listing all users from user service\n $pages = $this->get('app.user.service')->getUsers();\n \n // Get pagination\n $pagination = $this->get('app.service')->paginate($pages);\n \n // Render and return the view\n return $this->render(\n '::admin/user/users.html.twig',\n array(\n 'pagination' => $pagination\n )\n );\n }", "public function index(){\n\t\t// Set the Page Title ('pageName', 'pageSection', 'areaName')\n\t\t$this->_view->pageTitle = array('View Users', 'Users');\n\t\t// Set Page Description\n\t\t$this->_view->pageDescription = 'Users';\n\t\t// Set Page Section\n\t\t$this->_view->pageSection = 'Users';\n // Set Page Sub Section\n $this->_view->pageSubSection = 'Users';\n\n\t\t$userTypes = explode(',', USERS);\n\t\t$this->_view->userTypes = $userTypes;\n\n ###### PAGINATION ######\n //sanitise or set keywords to false\n if(isset($_GET['keywords']) && !empty($_GET['keywords'])){\n $_GET['keywords'] = FormInput::checkKeywords($_GET['keywords']);\n }else{\n $_GET['keywords'] = false;\n }\n\n $totalItems = $this->_model->countAllData($_GET['keywords']);\n if(!isset($totalItems) || empty($totalItems)){\n $totalItems = 0;\n }\n $pages = new Pagination(20,'keywords='.$_GET['keywords'].'&page', $totalItems[0]['total']);\n $this->_view->getAllData = $this->_model->getAllData($pages->get_limit(), $_GET['keywords']);\n\n\t\t// Create the pagination nav menu\n\t\t$this->_view->page_links = $pages->page_links();\n\n\t\t// Render the view ($renderBody, $layout, $area)\n\t\t$this->_view->render('users/index', 'layout', 'backoffice');\n\t}", "public function index()\n {\n return view('dashboard.user.index')\n ->with([\n 'page_title' => trans('lang.user.page_title'),\n 'entity' => trans('lang.user.entity'),\n ]);\n }", "public function index()\n {\n //User Page\n $users = User::all()->sortDesc();\n return view('admin.user.index')->with('users', $users);\n }", "public function index()\n {\n $title = 'User Page';\n $users = User::paginate(6);\n\n session(['active' => 'user']);\n return view('admin.user.index', compact('title','users'));\n }", "public function index()\n {\n return view('admin.users.index', ['users' => User::paginate(5)]);\n }", "public function index()\n {\n $this->checkPermission();\n\n $this->title = trans('admin.users');\n $users = User::with('roles')->paginate(10);\n\n $this->content = view('admin.users.index')->with(compact('users'))->render();\n return $this->renderOutput();\n }", "public function index()\n {\n if (! Gate::allows('users_manage')) {\n return abort(401);\n }\n\n $users = User::all();\n $pageName = 'Users';\n\n return view('admin.users.index', compact('users','pageName'));\n }", "public function index()\n {\n $users = User::all();\n //show the users list, mostly advanced users\n return view('users.index')->with('users', $users);\n }", "public function index()\n {\n return view('users.index', array('users' => User::paginate(20)));\n }", "public function index()\n {\n $users = $this->userRepository->getPaginate($this->nbrPerPage);\n $links = $users->render();\n\n return view('users.index', compact('users','links'));\n }", "public function index()\n {\n $users = $this->userRepository->getPaginate();\n \n return view('admin.users.index', compact('users'));\n }", "public function index()\n {\n $users = $this->usersRepo->paginate();\n return view('CMS::users.index', compact('users'));\n }", "public function index()\n\t{\n\t\t$this->view($this->user_id);\n\t}", "public function index()\n {\n $users = $this->userRepository->paginate(10);\n return view('users.index')->with(['users' => $users]);\n }", "public function index()\n {\n $data['page_title'] = \"Users Management\";\n $data['page_description'] = \"\";\n $data['breadcrumbs'] = [\n [\n 'action' => '',\n 'title' => 'Users'\n ]\n ]; \n $data['users'] = \\DB::table('users')->paginate(10);\n \n return view('modules.users.index', $data);\n }", "public function index()\n {\n $this->global['pageTitle'] = '系统管理';\n\n $this->userListing();\n }", "public function index()\n {\n return view('admin.users',[\n 'users'=>User::all(),\n 'currentPage'=>'Our Team',\n 'middlePage'=>null,\n 'job_titles'=>JobTitle::all(),\n 'polyvalent'=>PolyvalentToggle::first(),\n ]);\n }", "public function index()\n {\n $users = User::latest()->paginate(10);\n $i = 1;\n return view('user_management.user', compact(['users', 'i']));\n }", "public function actionIndex(){\n if(Yii::app()->user->isAdmin()){\n $userModel = User::model()->findAll();\n $countUser = count($userModel);\n $defaultRecordsPerPage = Yii::app()->params['defaultPerPageTable'][0];\n $pages = ($countUser%$defaultRecordsPerPage == 0) ?\n $countUser/$defaultRecordsPerPage :\n floor($countUser/$defaultRecordsPerPage) + 1;\n $this->render('index', array(\n 'pages' => $pages,\n\n ));\n }else\n $this->redirect(array('//checklist/checklistmanagement'));\n }", "public function index()\n {\n $this->authorize('viewAny', User::class);\n $users = User::paginate(40);\n return view('admin.users.index', compact('users'));\n }", "public function index()\n\t{\n\t\t\n\t\t\tif (Auth::check()) {\n\t\t\t\t\n\t\t\t\t$Manageuser = Manageuser::latest()->where(\"external_user\", 1)->paginate(5);\n\t\t\t\t\n\t\t\t\treturn view('Manageuser.index', compact('Manageuser'))\n\t\t\t\t\t->with('i', (request()->input('page', 1) - 1) * 5);\n\t\t\t\t\t \n\t\t\t} else {\n\t\t\t\treturn view('auth.login');\n\t\t\t}\n\t\t\n\t}", "public function index()\n { \n \n return view('admin.user.index');\n }", "public function index()\n\t{\n $users = User::search(Request::all())->paginate(50);\n return view('user.index')->with(compact('users'));\n\t}", "public function index()\n\t{\n return View::make('users.index');\n\t}", "public function index()\n\t{\n\t\t$users = $this->user->active()->paginate(10);\n\n\t\treturn $this->view->make('users.index', compact('users'));\n\t}", "public function index()\n {\n $users = $this->userService::getAll();\n\n return view('admin.pages.users')->with(compact('users'));\n }", "function index() {\n\t\n\t\t$users = $this->user->getAll();\n\t\t\n\t\t// if user is logged in, remove them from the list\n\t\tif($this->session->has_userdata(\"user_id\"))\n\t\t{\n\t\t\t$i = 0;\n\t\t\t$row = null;\n\t\t\tforeach($users as $u)\n\t\t\t{\n\t\t\t\tif($u['userid'] == $this->session->userdata(\"user_id\"))\n\t\t\t\t{\n\t\t\t\t\t$row = $i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\tunset($users[$row]);\n\t\t}\n\t\t\n\t\t// set data for display and linking to profiles\n\t\t$i = 0;\n\t\tforeach($users as $u)\n\t\t{\t\t\t\n\t\t\tif($u['type'] == 1)\n\t\t\t{\n\t\t\t\t$users[$i]['typename'] = 'user';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$users[$i]['typename'] = 'organization';\n\t\t\t}\n\t\t\t\n\t\t\t$users[$i]['matchPercent'] = $this->matchPercentage( $u['userid'], $u['type'], $u['typeid'] );\n\t\t\t\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\tusort($users, function($a, $b) {\n\t\t\treturn $b['matchPercent'] - $a['matchPercent'];\n\t\t});\n\t\t\n\t\t$this->data['users'] = $users;\n $this->data['pagebody'] = 'search'; // this is the view we want shown\n\t\t\n $this->render();\n }", "public function index()\n {\n $users = $this->userRepo->getDataPaginate($this->limit);\n\n return view('admin.user.index', compact('users'));\n }", "public function actionIndex() {\n\t\treturn $this->txIndex ( \"\\app\\models\\search\\User\" );\n\t}", "public function index()\n {\n return view('user.index');\n }", "public function index()\n {\n return view('user.index');\n }", "public function index()\n\t{\n\t\treturn view('users.index');\n\t}", "public function index()\n {\n $users = User::where('type', 'user')->latest()->paginate(10);\n return view('pages.users.list',['users' => $users]);\n }", "public function index()\n {\n return view('user.user-index');\n }", "public function index()\n {\n return view('admin.user.index');\n }", "public function index()\n {\n return view('admin.user.index');\n }", "public function index()\n {\n return view('admin.user.index');\n }", "public function index()\n {\n return view('admin.user.index');\n }", "public function index()\n {\n return view('backend.user.index');\n }", "public function index()\n\t{\n\t\t//\n\t\t// echo \"HELLLLLLLLL\";\n\t\t// die();\n\t\t// return view('dashboard.userprofile');\n\t\n\t}", "public function index()\n {\n $users = User::paginate(10);\n return view('admin.user.index', ['users' => $users]);\n }", "public function indexAction(){\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $perpage = 2;\n $count = \\R::count('user');\n $pagination = new Pagination($page, $perpage, $count);\n $start = $pagination->getStart();\n $users = \\R::findAll('user', \"LIMIT $start, $perpage\");\n\n $this->setMeta('All users');\n $this->setData(compact('users', 'pagination', 'count'));\n }", "function get_index()\n {\n $this->vm->page_title = \"Login\";\n $this->vm->errors = $this->errors;\n\n return \"login/index\";\n }", "public function Index()\n {\n $user = Container::getModel(\"User\");\n $this->views->listUsers = $user->fetchAll();\n $this->render(\"index\");\n// include_once \"../App/Views/index/index.phtml\";\n }", "public function index()\n {\n $users = $this->user->getUserList();\n return view('home')->with('users', $users);\n }", "public function index()\n {\n $users = User::latest()->paginate(2);\n return view('admin.user.index',compact('users'));\n }", "public function index()\n {\n //return view('home');\n //return view('userdash');\n return $this->__invoke();\n }", "public function index()\n {\n if(isset($_SESSION['user'])){\n //mostro l'index per gli utenti loggati\n if($_SESSION['user']['nome_ruolo'] == 'admin'){\n ViewLoader::load(\"_templates/header_admin\");\n ViewLoader::load(\"newUser/index\");\n ViewLoader::load(\"_templates/footer\");\n }elseif($_SESSION['user']['nome_ruolo'] == 'utente'){\n ViewLoader::load(\"_templates/header_user\");\n ViewLoader::load(\"home/index\");\n ViewLoader::load(\"_templates/footer\");\n }\n }else{\n //mostro l'index di base\n ViewLoader::load(\"_templates/header_base\");\n ViewLoader::load(\"home/index\");\n ViewLoader::load(\"_templates/footer\");\n }\n }", "function index()\n {\n\t$data = $this->page_settings('default', NULL, NULL, 'Users', 'users');\n\t$this->templates->backend($data);\n }", "public function indexAction()\n {\n // If the user's not logged in, send them to registration.\n $securityContext = $this->container->get('security.context');\n if( ! $securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED') ){\n return $this->homeAction();\n } else {\n // Otherwise, send them to their profile page.\n $user = $this->getUser();\n $username = $user->getUsername();\n return $this->redirect($this->generateUrl('lists_io_user_view_by_username', array('username' => $username)));\n }\n\n }", "public function index()\n {\n if (Auth::guest())\n {\n return view('auth.login');\n }\n\n //checking user role\n $check = Auth::user()->role_id;\n if($check!=\"ADMIN\")\n {\n $dept = Auth::user()->department;\n if($check!=\"HOD\" && $dept!=\"HUMAN CAPITAL\")\n {\n return view('errors.404');\n }\n }\n\n $users = User::orderBy('id', 'desc')->paginate(10);\n\n return view('users.index')->with('users', $users);\n }", "public function index()\n {\n $users = User::paginate();\n return view('admin.users.index')->with('users', $users);\n }", "public function index()\n {\n // ACL\n abort_if(Gate::denies('user-view'), 403);\n\n // if(Gate::denies('user-view')){\n // abort(403, 'Não autorizado!');\n // }\n\n $goToSection = 'index';\n $items = User::paginate(50); // limit de 3; Em blade: {{ $items->links() }}\n\n // view() -> 'admin' é um diretório >>> views/admin/users.blade.php\n return view('admin.users', compact('items', 'goToSection'));\n }", "public function index()\n {\n //return View::make('admin.user.index');\n }" ]
[ "0.77639157", "0.7499306", "0.7486094", "0.7472788", "0.7465875", "0.7460587", "0.74434274", "0.7431844", "0.74158597", "0.74060506", "0.7405215", "0.737081", "0.7366425", "0.7346302", "0.7329595", "0.7312476", "0.7292304", "0.7280763", "0.72574264", "0.7253274", "0.72514105", "0.7247831", "0.7244275", "0.7239038", "0.72360724", "0.723382", "0.7231807", "0.7226419", "0.7222795", "0.7217476", "0.7214017", "0.7209207", "0.7202967", "0.7201488", "0.71944046", "0.7190931", "0.71842504", "0.7183341", "0.71739596", "0.7172688", "0.71718526", "0.7170749", "0.7162216", "0.7156625", "0.715315", "0.71504486", "0.7149246", "0.7142738", "0.7141879", "0.71405834", "0.7140436", "0.7121523", "0.7120477", "0.7118867", "0.71148497", "0.7109093", "0.7107973", "0.7106072", "0.70969105", "0.70901394", "0.7079394", "0.70774066", "0.70764816", "0.70707804", "0.70664376", "0.7065734", "0.7062281", "0.70572513", "0.7052843", "0.70525223", "0.704918", "0.70458525", "0.7040059", "0.70382386", "0.70368063", "0.7035125", "0.70349425", "0.70349425", "0.7034018", "0.7032906", "0.7031277", "0.70299304", "0.70299304", "0.70299304", "0.70299304", "0.7028078", "0.70266265", "0.7025179", "0.7021971", "0.70211524", "0.70194256", "0.7015028", "0.701228", "0.7011311", "0.70055515", "0.70016587", "0.69988084", "0.69977564", "0.6993777", "0.6993635", "0.6986684" ]
0.0
-1
Function for managing the users account
public function userAccount() { $recipes= $this->getDoctrine() ->getRepository(Recipe::class) ->findAll(); $user = $this->getUser(); $reviews= $this->getDoctrine() ->getRepository(Review::class) ->findAll(); $user = $this->getUser(); return $this->render('user/show.html.twig', [ 'user' => $user, 'recipes' => $recipes, 'reviews' => $reviews, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function manageAccountAction()\n {\n $errors = [];\n $preserved = [];\n if(!empty($_POST)){\n $userValidation = new UserValidation($_POST, ['fullname', 'address', 'contact']);\n $errors = $userValidation->getNamedErrors();\n\n $preserved = $_POST;\n\n if(empty($errors)){\n $user = Auth::getUser();\n $user->update($_POST);\n Extra::setMessageCookie(\"Profile updated successfully.\");\n $this->redirect(\"/manage-account/\");\n }\n }\n View::renderTemplate(\"LoggedUser/manage-account.html\", [\n 'errors' => $errors,\n 'preserved' => $preserved\n ]);\n }", "private function action_adminAccount()\n\t{\n\t\tglobal $txt, $db_type, $db_connection, $databases, $incontext, $db_prefix, $db_passwd, $webmaster_email;\n\t\tglobal $db_persist, $db_server, $db_user, $db_port;\n\t\tglobal $db_type, $db_name, $mysql_set_mode;\n\n\t\t$incontext['sub_template'] = 'admin_account';\n\t\t$incontext['page_title'] = $txt['user_settings'];\n\t\t$incontext['continue'] = 1;\n\n\t\t// Need this to check whether we need the database password.\n\t\trequire(TMP_BOARDDIR . '/Settings.php');\n\t\tif (!defined('ELK'))\n\t\t{\n\t\t\tdefine('ELK', 1);\n\t\t}\n\t\tdefinePaths();\n\n\t\t// These files may be or may not be already included, better safe than sorry for now\n\t\trequire_once(SOURCEDIR . '/Subs.php');\n\n\t\t$db = load_database();\n\n\t\tif (!isset($_POST['username']))\n\t\t{\n\t\t\t$_POST['username'] = '';\n\t\t}\n\n\t\tif (!isset($_POST['email']))\n\t\t{\n\t\t\t$_POST['email'] = '';\n\t\t}\n\n\t\t$incontext['username'] = htmlspecialchars(stripslashes($_POST['username']), ENT_COMPAT, 'UTF-8');\n\t\t$incontext['email'] = htmlspecialchars(stripslashes($_POST['email']), ENT_COMPAT, 'UTF-8');\n\t\t$incontext['require_db_confirm'] = empty($db_type) || !empty($databases[$db_type]['require_db_confirm']);\n\n\t\t// Only allow create an admin account if they don't have one already.\n\t\t$db->skip_next_error();\n\t\t$request = $db->query('', '\n\t\t\tSELECT \n\t\t\t\tid_member\n\t\t\tFROM {db_prefix}members\n\t\t\tWHERE id_group = {int:admin_group} \n\t\t\t\tOR FIND_IN_SET({int:admin_group}, additional_groups) != 0\n\t\t\tLIMIT 1',\n\t\t\tarray(\n\t\t\t\t'admin_group' => 1,\n\t\t\t)\n\t\t);\n\t\t// Skip the step if an admin already exists\n\t\tif ($request->num_rows() != 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t$request->free_result();\n\n\t\t// Trying to create an account?\n\t\tif (isset($_POST['password1']) && !empty($_POST['contbutt']))\n\t\t{\n\t\t\t// Wrong password?\n\t\t\tif ($incontext['require_db_confirm'] && $_POST['password3'] != $db_passwd)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_db_connect'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Not matching passwords?\n\t\t\tif ($_POST['password1'] != $_POST['password2'])\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_again_match'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// No password?\n\t\t\tif (strlen($_POST['password1']) < 4)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_no_password'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (!file_exists(SOURCEDIR . '/Subs.php'))\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_subs_missing'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Update the main contact email?\n\t\t\tif (!empty($_POST['email']) && (empty($webmaster_email) || $webmaster_email == '[email protected]'))\n\t\t\t{\n\t\t\t\tupdateSettingsFile(array('webmaster_email' => $_POST['email']));\n\t\t\t}\n\n\t\t\t// Work out whether we're going to have dodgy characters and remove them.\n\t\t\t$invalid_characters = preg_match('~[<>&\"\\'=\\\\\\]~', $_POST['username']) != 0;\n\t\t\t$_POST['username'] = preg_replace('~[<>&\"\\'=\\\\\\]~', '', $_POST['username']);\n\n\t\t\t$db->skip_next_error();\n\t\t\t$result = $db->query('', '\n\t\t\t\tSELECT \n\t\t\t\t\tid_member, password_salt\n\t\t\t\tFROM {db_prefix}members\n\t\t\t\tWHERE member_name = {string:username} \n\t\t\t\t\tOR email_address = {string:email}\n\t\t\t\tLIMIT 1',\n\t\t\t\tarray(\n\t\t\t\t\t'username' => stripslashes($_POST['username']),\n\t\t\t\t\t'email' => stripslashes($_POST['email']),\n\t\t\t\t)\n\t\t\t);\n\t\t\tif ($result->num_rows() != 0)\n\t\t\t{\n\t\t\t\tlist ($incontext['member_id'], $incontext['member_salt']) = $result->fetch_row();\n\t\t\t\t$result->free_result();\n\n\t\t\t\t$incontext['account_existed'] = $txt['error_user_settings_taken'];\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (trim($_POST['username']) === '' || strlen($_POST['username']) > 25)\n\t\t\t{\n\t\t\t\t// Try the previous step again.\n\t\t\t\t$incontext['error'] = $_POST['username'] == '' ? $txt['error_username_left_empty'] : $txt['error_username_too_long'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($invalid_characters || $_POST['username'] == '_' || $_POST['username'] == '|' || strpos($_POST['username'], '[code') !== false || strpos($_POST['username'], '[/code') !== false)\n\t\t\t{\n\t\t\t\t// Try the previous step again.\n\t\t\t\t$incontext['error'] = $txt['error_invalid_characters_username'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (empty($_POST['email']) || !filter_var(stripslashes($_POST['email']), FILTER_VALIDATE_EMAIL) || strlen(stripslashes($_POST['email'])) > 255)\n\t\t\t{\n\t\t\t\t// One step back, this time fill out a proper email address.\n\t\t\t\t$incontext['error'] = sprintf($txt['error_valid_email_needed'], $_POST['username']);\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// All clear, lets add an admin\n\t\t\trequire_once(SUBSDIR . '/Auth.subs.php');\n\n\t\t\t$incontext['member_salt'] = substr(base64_encode(sha1(mt_rand() . microtime(), true)), 0, 16);\n\n\t\t\t// Format the username properly.\n\t\t\t$_POST['username'] = preg_replace('~[\\t\\n\\r\\x0B\\0\\xA0]+~', ' ', $_POST['username']);\n\t\t\t$ip = isset($_SERVER['REMOTE_ADDR']) ? substr($_SERVER['REMOTE_ADDR'], 0, 255) : '';\n\n\t\t\t// Get a security hash for this combination\n\t\t\t$password = stripslashes($_POST['password1']);\n\t\t\t$incontext['passwd'] = validateLoginPassword($password, '', $_POST['username'], true);\n\n\t\t\t$request = $db->insert('',\n\t\t\t\t$db_prefix . 'members',\n\t\t\t\tarray(\n\t\t\t\t\t'member_name' => 'string-25', 'real_name' => 'string-25', 'passwd' => 'string', 'email_address' => 'string',\n\t\t\t\t\t'id_group' => 'int', 'posts' => 'int', 'date_registered' => 'int', 'hide_email' => 'int',\n\t\t\t\t\t'password_salt' => 'string', 'lngfile' => 'string', 'avatar' => 'string',\n\t\t\t\t\t'member_ip' => 'string', 'member_ip2' => 'string', 'buddy_list' => 'string', 'pm_ignore_list' => 'string',\n\t\t\t\t\t'message_labels' => 'string', 'website_title' => 'string', 'website_url' => 'string',\n\t\t\t\t\t'signature' => 'string', 'usertitle' => 'string', 'secret_question' => 'string',\n\t\t\t\t\t'additional_groups' => 'string', 'ignore_boards' => 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tstripslashes($_POST['username']), stripslashes($_POST['username']), $incontext['passwd'], stripslashes($_POST['email']),\n\t\t\t\t\t1, 0, time(), 0,\n\t\t\t\t\t$incontext['member_salt'], '', '',\n\t\t\t\t\t$ip, $ip, '', '',\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\tarray('id_member')\n\t\t\t);\n\n\t\t\t// Awww, crud!\n\t\t\tif ($request->hasResults() === false)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_query'] . '<br />\n\t\t\t\t<div style=\"margin: 2ex;\">' . nl2br(htmlspecialchars($db->last_error($db_connection), ENT_COMPAT, 'UTF-8')) . '</div>';\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$incontext['member_id'] = $db->insert_id(\"{$db_prefix}members\", 'id_member');\n\n\t\t\t// If we're here we're good.\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function accountAction()\n {\n \tif(!in_array($this->_user->{User::COLUMN_STATUS}, array(User::STATUS_BANNED, User::STATUS_PENDING, User::STATUS_GUEST))){\n \t\t$this->_forward('homepage');\n \t\treturn;\n \t}\n \t$this->view->registerForm = new User_Form_Register();\n \t$this->view->loginForm = new User_Form_Login();\n }", "private function editAccount()\n {\n try\n {\n global $userquery; \n\n $request = $_REQUEST;\n\n if(!userid())\n throw_error_msg(\"Please login to perform this action\");\n\n //country\n if(!isset($request['country']) || $request['country']==\"\")\n throw_error_msg(\"provide country\");\n\n //sex\n if(!isset($request['sex']) || $request['sex']==\"\")\n throw_error_msg(\"provide sex\");\n\n if(!in_array($request['sex'], array('male','female')))\n throw_error_msg(\"sex must be male/female\");\n\n //dob\n if(!isset($request['dob']) || $request['dob']==\"\")\n throw_error_msg(\"provide dob\");\n\n if(!isset($request['dob']) || $request['dob']==\"\")\n throw_error_msg(\"provide dob\");\n\n $is_valid_date = DateTime::createFromFormat('Y-m-d', $request['dob']);\n\n if(!$is_valid_date)\n throw_error_msg(\"dob must be in Y-m-d like 1990-11-18 format\");\n\n if(!isset($request['category']) || $request['category']==\"\")\n throw_error_msg(\"provide category\");\n\n $request['userid'] = userid();\n $userquery->update_user($request);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $user_info = format_users($request['userid']);\n \n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => $user_info);\n $this->response($this->json($data)); \n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function updateAccount()\n {\n $user = Auth::user();\n\n if(Input::get('edit')) {\n\n $manager = new AccountManager($user, Input::all());\n if ($manager->save()) {\n\n return Redirect::route('home');\n } else {\n return Redirect::back()->withInput()->withErrors($manager->getErrors());\n }\n }\n elseif(Input::get('delete'))\n {\n $user = Auth::user();\n $id =$user->id;\n User::destroy($id);\n return Redirect::route('home')->with('user_deleted', 1);\n }\n }", "public function update_account() {\n global $dbconfig;\n\n $user_id = $this->params['user_id'];\n $status = isset($this->params['status']) ? $this->params['status'] : BLOCKED;\n $account_dbobj = $this->params['account_dbobj'];\n $user_status = BLOCKED;\n $store_status = PENDING;\n\n if($status === ACTIVATED) {\n $user_status = CREATED;\n $store_status = PENDING;\n }\n\n // update users table\n $user_obj = new User($account_dbobj, $user_id);\n $user_obj->setStatus($status);\n $user_obj->save();\n\n $user = BaseModel::findCachedOne($dbconfig->account->name . \".user?id=$user_id\");\n if(!empty($user['store_id'])){\n $store_id = $user['store_id'];\n // store need to manually launch\n $store_obj = new Store($account_dbobj, $store_id);\n if($store_obj->getId()) {\n $store_obj->setStatus($store_status);\n $store_obj->save();\n if($store_status != ACTIVATED){\n GlobalProductsMapper::deleteProductsInStore($account_dbobj, $store_id);\n }\n }\n }\n }", "public function testUpdateUser()\n {\n }", "public function create()\n\t{\n\t\t$data = ['user_role_id' => USER_ROLE_ADMINISTRATOR];\n\t\tif ($id = $this->users_model->save($data)) {\n\n\t\t\t//if user has not access to update\n\t\t\t$this->session->set_userdata(['new_item' => ['module' => 'administrators', 'id' => $id]]);\n\n\t\t\tredirect(\"/admin/users/update/$id\");\n\t\t}\n\t\telse {\n\t\t\t$this->pls_alert_lib->set_flash_messages('error', lang('admin_create_failed'));\n\t\t\tredirect(\"/admin/administrators\");\n\t\t}\n\t}", "public function useraccountsAction()\r\n {\r\n\r\n $this->view->ses_user=$ses_user=$_SESSION['tranzgo_session']['user_id'];\r\n $this->view->ses_role=$ses_role=$_SESSION['tranzgo_session']['account_id'];\r\n $this->sessionAuth->menu_permission('List_User');\r\n $this->view->TRANZGO_STR=$this->sessionAuth->get_breadcrumb('List_User');\r\n $del_id=trim($this->_request->getParam('del_id',0));\r\n $ob_User = new Signup();\r\n if($ses_role!=1)\r\n {\r\n $getCompanyBySessId = $ob_User->get_company_by_sess_id($ses_user);\r\n\r\n $this->view->getCompanyBySessId=$getCompanyBySessId;\r\n\r\n $comp_id = $getCompanyBySessId['company_id'];\r\n\r\n }else{\r\n $comp_id = 0;\r\n }\r\n\r\n if($del_id)\r\n {\r\n $ob_User\t= new User();\r\n $this->sessionAuth->menu_permission('Delete_User');\r\n $user_is_deleted=$ob_User->user_is_deleted($del_id);\r\n if(!$user_is_deleted)\r\n {\r\n\t\t\t\t\r\n $ob_User->delete_user($del_id);\r\n $this->sessionAuth->msg_centre('User deleted successfully');\r\n\t\t\t\t$this->view->server_msg = $this->sessionAuth->msg_centre();\r\n }\r\n\t\t\t\r\n\t\t\t$this->_redirect('/accounts/useraccounts/');\r\n }\r\n $act_id=trim($this->_request->getParam('act_id',0));\r\n $act_type=trim($this->_request->getParam('act_type'));\r\n if($act_id)\r\n {\r\n $this->sessionAuth->menu_permission('Deactivate_User');\r\n $user_is_active_status=$ob_User->user_is_active_status($act_id);\r\n if($user_is_active_status!=$act_type)\r\n {\r\n $ob_User->de_act_user($act_id,$act_type);\r\n if($act_type)\r\n {\r\n $this->sessionAuth->msg_centre('User account Un-locked successfully');\r\n }\r\n else\r\n {\r\n $this->sessionAuth->msg_centre('User account Locked successfully');\r\n }\r\n }\r\n\r\n $this->view->server_msg = $this->sessionAuth->msg_centre();\r\n }\r\n $this->view->quick_search= $quick_search= trim($this->_request->getParam('quick_search',''));\r\n $this->view->num_row= $num_row= trim($this->_request->getParam('num_row',LIMIT));\r\n $this->view->page= $page= trim($this->_request->getParam('page',1));\r\n $this->view->order_col= $order_col= trim($this->_request->getParam('order_col','add_date'));\r\n $this->view->order_typ= $order_typ= trim($this->_request->getParam('order_typ','DESC'));\r\n $arr_limit=array();\r\n $arr_limit['limit']=$limit=($num_row>0)?$num_row:0;\r\n $arr_limit['page']=$page;\r\n $arr_order=array();\r\n $arr_order['col']=$order_col;\r\n $arr_order['typ']=$order_typ;\r\n\r\n $ob_User\t= new User();\r\n\r\n\r\n $getuserdetails = $this->view->user_rows=$ob_User->get_user_list_rows($comp_id,$quick_search,$arr_limit,$arr_order);\r\n\t\t\r\n $row_count=$ob_User->get_user_list_rows_count($comp_id,$quick_search);\r\n\r\n $arr_rows=array('email','user_fname','user_lname','account_name','company_name','is_active','add_date');\r\n $this->view->page_sorting_images=$this->sessionAuth->get_sorting_html($arr_rows,$arr_order);\r\n\r\n $this->view->page_peginetion=$this->sessionAuth->get_peginetion($row_count,$page,$num_row);\r\n\t\t//print \"<pre>\"; print_r($this->view->page_peginetion); print \"</pre>\"; exit;\r\n $layout = $this->_helper->layout();\r\n $layout->setLayout('frontend/onecolumn');\r\n }", "public function processNewAccount() {\n\n\t\t// List of accounts\n\t\t$accounts = ['admin','bennabbott','oriongregg'];\n\n\t\t// Validate the form\n\t\t// Check that the user has privided a username\n\t\tif( $this->username == '' ) {\n\t\t\t$this->usernameErrorMsg = 'Invalid Username';\n\t\t} elseif(in_array($this->username, $accounts)) {\n\t\t\t$this->usernameErrorMsg = 'Username already exists';\t\t\t\n\t\t} else {\n\t\t\t$this->usernameErrorMsg = '';\n\t\t}\n\t\t\n\t\t// Check and make sure the paswords match\n\t\tif ($_POST['password'] == '' || $_POST ['password2'] == '') {\n\t\t\t$this->passwordErrorMsg = '* required';\t\t\t\n\t\t} elseif( $_POST['password'] != $_POST['password2']) {\n\t\t\t$this->passwordErrorMsg = 'Passwords do not match';\n\t\t} else {\n\t\t\t$this->passwordErrorMsg = '';\n\t\t}\n\t}", "public function addUser()\n {\n $categoryList = $this->itemModel->getCategories();\n\n //Check that register button exists and was clicked\n if (isset($_POST[\"user_submit\"])) { \n\n //Insert new row in Account and setting the User's name in database using values inputted in the HTML form\n $username = $_POST['username']; \n\n $newly_registered_account_id = $this->accountModel->registerAccount($username,$_POST[\"password\"],$_POST[\"sfsu_id\"]);\n\n $this->userModel->setUser($newly_registered_account_id,$_POST[\"firstname\"], \n $_POST[\"lastname\"],$_POST[\"country\"],$_POST[\"state\"],\n $_POST[\"address\"],$_POST[\"city\"],$_POST[\"zipcode\"],$_POST[\"phoneNumber\"]);\n\n } else {\n echo '<script language=\"javascript\">';\n echo 'alert(\"accounts.php registerUser bad.\")';\n echo '</script>';\n }\n\n header('location: ' . URL . 'home/index');\n }", "function create_user()\n{\n\t// Check to see if the account is admin\n\t$account_type = account_type();\n\t\n\tif ( $account_type == 0 )\n\t{\n\t\t// Connect to the database\n\t\t$link = dbConnect();\n\t\t\n\t\t$query = mysql_query( \"SELECT first_name, last_name FROM BCD_User WHERE username = '\" . $_SESSION[ 'username' ] . \"'\" );\n\t\t\n\t\t// Close the database\n\t\tdbClose( $link );\n\t}\n}", "public function accountChange(){\n\t\t\n\t\t// If user want to change his informations\n\t\tif(isset($_POST['account_save']))\n\t\t{\n\t\t\trequire 'Database.php';\n\t\t\t\n\t\t\t$order_id = $_REQUEST['order_id'];\n\t\t\tif($order_id!=\"\")\n\t\t\t{\n\t\t\t // Update database with his informations\n\t\t\t$req = $db->prepare(\"UPDATE orders SET lol_server = ?, lol_summoner = ?, lol_account = ?, lol_password = ? WHERE order_id = ?\");\n\t\t\t$req->execute(array($_POST['server'], $_POST['summonername'], $_POST['accountname'], $_POST['accountpassword'], $order_id));\n\t\t\t$_SESSION['account_information'] = 1;\n\t\t\t\n\t\t\t// Update current league, LP\n\t\t\t$update = new Member();\n\t\t\t$update->updateOrderLeague();\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\n\t\t\t// Update database with his informations\n\t\t\t$req = $db->prepare(\"UPDATE orders SET lol_server = ?, lol_summoner = ?, lol_account = ?, lol_password = ? WHERE user_id = ?\");\n\t\t\t$req->execute(array($_POST['server'], $_POST['summonername'], $_POST['accountname'], $_POST['accountpassword'], $_SESSION['id']));\n\t\t\t$_SESSION['account_information'] = 1;\n\t\t\t\n\t\t\t// Update current league, LP\n\t\t\t$update = new Member();\n\t\t\t$update->updateOrderLeague();\n\t\t\t}\necho \"<script>window.location='index.php'</script>\";\n\t\t\t//header('Location: index.php');\n\t\t}\n\n\t}", "public function post_account()\n {\n $rules = array();\n $rules['username'] = 'required|min:4|max:32';\n $rules['email'] = Input::has('email') ? 'required|email' : '';\n $rules['password'] = Input::has('email') ? 'required|confirmed|min:4|max:32' : '';\n\n $v = Validator::make( Input::all(), $rules );\n if ($v->fails()) {\n return Redirect::to( Config::get('user.account_route', Config::get('user::config.account_route')) )\n ->with_errors($v)\n ->with_input();\n }\n\n Auth::user()->username = Input::get('username');\n Auth::user()->email = Input::get('email');\n\n // Leave password alone if the user doesn't want to change it\n if(Input::has('password')) {\n Auth::user()->password = Input::get('password');\n }\n\n Auth::user()->save();\n\n Event::fire('user: account updated');\n\n return Redirect::to( Config::get('user.account_route', Config::get('user::config.account_route')) )\n ->with('success', 'Account changes saved');\n }", "public function adminAccount(){\n\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n $password = password_hash(trim($_POST['password']),PASSWORD_DEFAULT);\n $this->adminModel->updateAdmin($_SESSION['adminID'],trim($_POST['email']),$password);\n unset($_SESSION['adminEmail']);\n $_SESSION['adminEmail'] = trim($_POST['email']);\n $this->view('admins/adminAccount');\n }\n\n $this->view('admins/adminAccount');\n\n }", "public function updateUser()\n {\t\t\n\t\t$user = $this->checkToken();\n\t\tif ($user) {\t\n\t\t\t$userModel = UserModel::find($user->id);\n\t\t\t$data = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\t\t\t$userModel->fill($data);\n\t\t\t$userModel->save();\n\t\t\treturn $this->sendResponse('Your details have been successfully updated');\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to update this account');\n }", "function m_dspUserAccount()\n\t{\n\t\tif(!isset($_SESSION['userid']) || $_SESSION['userid']==\"\")\n\t\t{\n\t\t\t#URL TEMPER\n\t\t\t$this->libFunc->m_mosRedirect($this->m_safeUrl(SITE_URL.\"user/index.php?action=user.loginForm\"));\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\t#INTIALIZING TEMPLATES\n\t\t\t$this->ObTpl=new template();\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"\");\n\t\t\t$this->ObTpl->set_file(\"TPL_USER_FILE\", $this->userTemplate);\n\t\t\t$this->ObTpl->set_block(\"TPL_USER_FILE\",\"TPL_CURRENTINFO_BLK\",\"current_blk\");\n\t\t\t$this->ObTpl->set_block(\"TPL_CURRENTINFO_BLK\",\"TPL_ORDERLISTMAIN_BLK\",\"orderlistmain_blk\");\n\t\t\t$this->ObTpl->set_block(\"TPL_ORDERLISTMAIN_BLK\",\"TPL_ORDERLIST_BLK\",\"orderlist_blk\");\n\t\t\t$this->ObTpl->set_block(\"TPL_USER_FILE\",\"TPL_EDITACCOUNT_BLK\",\"edit_blk\");\n\t\t\t$this->ObTpl->set_block(\"TPL_USER_FILE\",\"TPL_CHANGEPASS_BLK\",\"changepass_blk\");\n\t\t\t$this->ObTpl->set_block(\"TPL_USER_FILE\",\"countryblk\",\"countryblks\");\n\t\t\t$this->ObTpl->set_block(\"TPL_EDITACCOUNT_BLK\",\"BillCountry\",\"nBillCountry\");\n\t\t\t$this->ObTpl->set_block(\"TPL_EDITACCOUNT_BLK\",\"TPL_NEWSLETTER_BLK\",\"news_blk\");\n\t\t\t$this->ObTpl->set_block(\"TPL_USER_FILE\",\"stateblk\",\"stateblks\");\n\t\t\t#INTIALIZING\n\t\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEURL\",SITE_URL);\n\n\t\t\t$this->ObTpl->set_var(\"news_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"current_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"edit_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"changepass_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"orderlistmain_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"orderlist_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"BILL_STATE\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_STATE\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_STATENAME\",\"\");\n\n\t\t\t$this->obTpl->set_var(\"TPL_VAR_BREDCRUMBS\",\"&nbsp;&raquo;&nbsp;My Account\");\n\n\t\t\t$accountUrl=$this->libFunc->m_safeUrl(SITE_URL.\"user/index.php?action=user.home\");\n\t\t\tif(isset($this->request['msg']) && $this->request['msg']==1)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_PASSWORD_CHANGED);\n\t\t\t}\n\t\t\tif($this->err==1)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$this->errMsg);\n\t\t\t}\n\t\t\t\n\t\t\t#SAFE URLS\n\t\t\t$updateUrl=SITE_URL.\"user/index.php?action=user.home&mode=editDetails\";\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_UPDATEURL\",$this->libFunc->m_safeUrl($updateUrl));\n\t\t\t$changePassUrl=SITE_URL.\"user/index.php?action=user.home&mode=changePass\";\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHANGEPASSURL\",$this->libFunc->m_safeUrl($changePassUrl));\n\t\t\t$logoutUrl=SITE_URL.\"user/index.php?action=user.logout\";\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LOGOUTURL\",$this->libFunc->m_safeUrl($logoutUrl));\n\t\t\t$reportsUrl=SITE_URL.\"user/index.php?action=user.home&mode=reports\";\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_REPORTS_URL\",$this->libFunc->m_safeUrl($reportsUrl));\n\n\n\t\t\t#QUERY DATABASE\n\t\t\t$this->obDb->query = \"SELECT * FROM \".CUSTOMERS.\" where iCustmerid_PK = '\".$_SESSION['userid'].\"'\";\n\t\t\t$row_customer = $this->obDb->fetchQuery();\n\t\t\t$recordCount=$this->obDb->record_count;\n\t\t\tif($recordCount!=1)\n\t\t\t{\n\t\t\t\t$this->libFunc->m_sessionUnregister(\"userid\");\n\t\t\t\t$this->libFunc->m_sessionUnregister(\"username\");\n\t\t\t\t$retUrl=$this->libFunc->m_safeUrl(SITE_URL.\"user/index.php?action=user.home\");\n\t\t\t\t$_SESSION['referer']=$retUrl;\n\t\t\t\t$siteUrl=SITE_URL.\"user/index.php?action=user.loginForm\";\n\t\t\t\t$this->libFunc->m_mosRedirect($this->libFunc->m_safeUrl($siteUrl));\n\t\t\t\texit;\n\t\t\t}\t\t\t\t\t\n\t\t\t$this->obDb->query = \"SELECT iStateId_PK, vStateName FROM \".STATES.\" ORDER BY vStateName\";\n\t\t\t$row_state = $this->obDb->fetchQuery();\n\t\t\t$row_state_count = $this->obDb->record_count;\n\t\t\t\n\t\t\t$this->obDb->query = \"SELECT iCountryId_PK, vCountryName, vShortName FROM \".COUNTRY.\" ORDER BY iSortFlag,vCountryName\";\n\t\t\t$row_country = $this->obDb->fetchQuery();\n\t\t\t$row_country_count = $this->obDb->record_count;\n\n\t\t\t# Loading billing country list\t\t\n\t\t\tfor($i=0;$i<$row_country_count;$i++)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"k\", $row_country[$i]->iCountryId_PK);\n\t\t\t\t$this->ObTpl->parse('countryblks','countryblk',true);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_COUNTRY_VALUE\", $row_country[$i]->iCountryId_PK);\n\t\t\t\t\n\t\t\t\tif($row_customer[0]->vCountry> 0)\n\t\t\t\t{\n\t\t\t\t\tif($row_customer[0]->vCountry == $row_country[$i]->iCountryId_PK)\n\t\t\t\t\t\t$this->ObTpl->set_var(\"BILL_COUNTRY_SELECT\", \"selected=\\\"selected\\\"\");\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->ObTpl->set_var(\"BILL_COUNTRY_SELECT\", \"\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$row_customer[0]->vCountry = $row_country[$i]->iCountryId_PK;\n\t\t\t\t\tif($row_country[$i]->iCountryId_PK==251)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ObTpl->set_var(\"BILL_COUNTRY_SELECT\", \"selected=\\\"selected\\\"\");\n\t\t\t\t\t}\t\n\t\t\t\t}\t\n\t\t\t\t$this->ObTpl->set_var(\"TPL_COUNTRY_NAME\",$this->libFunc->m_displayContent($row_country[$i]->vCountryName));\n\t\t\t\t$this->ObTpl->parse(\"nBillCountry\",\"BillCountry\",true);\n\t\t\t}\n\t\t\tif(isset($row_customer[0]->vCountry) && $row_customer[0]->vCountry != '')\n\t\t\t\t$this->ObTpl->set_var('selbillcountid',$row_customer[0]->vCountry);\n\t\t\telse\n\t\t\t\t$this->ObTpl->set_var('selbillcountid',\"251\");\n\t\t\tif(isset($row_customer[0]->vState) && $row_customer[0]->vState != '')\n\t\t\t\t$this->ObTpl->set_var('selbillstateid',$row_customer[0]->vState);\n\t\t\telse\n\t\t\t\t$this->ObTpl->set_var('selbillstateid',\"0\");\n\t\t\t\n\t\t\t# Loading the state list here\n\t\t\t$this->obDb->query = \"SELECT C.iCountryId_PK as cid,S.iStateId_PK as sid,S.vStateName as statename FROM \".COUNTRY.\" C,\".STATES.\" S WHERE S.iCountryId_FK=C.iCountryId_PK ORDER BY C.vCountryName,S.vStateName\";\n\t\t\t$cRes = $this->obDb->fetchQuery();\n\t\t\t$country_count = $this->obDb->record_count;\n\n\t\t\tif($country_count == 0)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"countryblks\", \"\");\n\t\t\t\t$this->ObTpl->set_var(\"stateblks\", \"\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t$loopid=0;\n\t\t\t\tfor($i=0;$i<$country_count;$i++)\n\t\t\t\t{\n\t\t\t\t\tif($cRes[$i]->cid==$loopid)\n\t\t\t\t\t{\n\t\t\t\t\t\t$stateCnt++;\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$loopid=$cRes[$i]->cid;\n\t\t\t\t\t\t$stateCnt=0;\n\t\t\t\t\t}\n\t\t\t\t\t$this->ObTpl->set_var(\"i\", $cRes[$i]->cid);\n\t\t\t\t\t$this->ObTpl->set_var(\"j\", $stateCnt);\n\t\t\t\t\t$this->ObTpl->set_var(\"stateName\",$cRes[$i]->statename);\n\t\t\t\t\t$this->ObTpl->set_var(\"stateVal\",$cRes[$i]->sid);\n\t\t\t\t\t$this->ObTpl->parse('stateblks','stateblk',true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_FNAME\", $this->libFunc->m_displayContent($row_customer[0]->vFirstName));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LNAME\", $this->libFunc->m_displayContent($row_customer[0]->vLastName));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_EMAIL\", $this->libFunc->m_displayContent($row_customer[0]->vEmail));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PASS\", $this->libFunc->m_displayContent($row_customer[0]->vPassword));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ADDRESS1\", $this->libFunc->m_displayContent($row_customer[0]->vAddress1 ));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ADDRESS2\", $this->libFunc->m_displayContent($row_customer[0]->vAddress2 ));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CITY\", $this->libFunc->m_displayContent($row_customer[0]->vCity));\n\t\t\tif($row_customer[0]->vState>1)\n\t\t\t{\n\t\t\t\t$this->obDb->query = \"SELECT vStateName FROM \".STATES.\" where iStateId_PK = '\".$row_customer[0]->vState.\"'\";\n\t\t\t\t$row_state = $this->obDb->fetchQuery();\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_STATE\",\n\t\t\t\t$this->libFunc->m_displayContent($row_state[0]->vStateName));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_STATENAME\",\n\t\t\t\t$this->libFunc->m_displayContent($row_customer[0]->vStateName));\n\t\t\t}\n\t\t\t$this->obDb->query = \"SELECT vCountryName FROM \".COUNTRY.\" where iCountryId_PK = '\".$row_customer[0]->vCountry.\"' order by vCountryName\";\n\t\t\t\t$row_country = $this->obDb->fetchQuery();\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_COUNTRY\",\n\t\t\t\t$this->libFunc->m_displayContent($row_country[0]->vCountryName));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ZIP\",\n\t\t\t\t$this->libFunc->m_displayContent($row_customer[0]->vZip));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_COMPANY\",\n\t\t\t\t$this->libFunc->m_displayContent($row_customer[0]->vCompany));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PHONE\",\n\t\t\t\t$this->libFunc->m_displayContent($row_customer[0]->vPhone));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_HOMEPAGE\",\n\t\t\t\t$this->libFunc->m_displayContent($row_customer[0]->vHomePage));\n\t\t\tif($row_customer[0]->iMailList==1)\n\t\t\t{\n\t\t\t\t$maillist=\"HTML\";\n\t\t\t}\n\t\t\telseif($row_customer[0]->iMailList==2)\n\t\t\t{\n\t\t\t\t$maillist=\"Plain text \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$maillist=\"None\";\n\t\t\t}\n\n\t\t\tif(MAIL_LIST==1)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_NEWSLETTER\",$maillist);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_NEWSLETTER\",$maillist.\"(opt-out)\");\n\t\t\t}\n\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SIGNUPDATE\",\n\t\t\t$this->libFunc->dateFormat1($row_customer[0]->tmSignupDate));\n\n\t\t\tif($row_customer[0]->iMailList==1)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHECK1\",\"selected=\\\"selected\\\"\");\n\t\t\t}\n\t\t\telseif($row_customer[0]->iMailList==2)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHECK2\",\"selected=\\\"selected\\\"\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHECK3\",\"selected=\\\"selected\\\"\");\n\t\t\t}\n\n\t\t\tif(!isset($this->request['mode']) || empty($this->request['mode']))\n\t\t\t{\n\t\t\t\t$this->m_displayInvoiceList();\n\t\t\t\t$this->ObTpl->parse(\"current_blk\",\"TPL_CURRENTINFO_BLK\");\n\t\t\t}\n\t\t\telseif($this->request['mode']==\"editDetails\")\n\t\t\t{\n\t\t\t\t#DISPLAY EDIT ACCOUNT FORM\n\t\t\t\t$this->obTpl->set_var(\"TPL_VAR_BREDCRUMBS\",\"&nbsp;&raquo;&nbsp;<a href=\".$accountUrl.\">My Account</a>&nbsp;&raquo;&nbsp;Update Information\");\n\t\t\t\tif(MAIL_LIST==1)\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->parse(\"news_blk\",\"TPL_NEWSLETTER_BLK\");\n\t\t\t\t}\n\t\t\t\t$this->ObTpl->parse(\"edit_blk\",\"TPL_EDITACCOUNT_BLK\");\n\t\t\t}\n\t\t\telseif($this->request['mode']==\"changePass\")\n\t\t\t{\n\t\t\t\t#DISPLAY CHANGEPASS FORM\n\t\t\t\t$this->obTpl->set_var(\"TPL_VAR_BREDCRUMBS\",\"&nbsp;&raquo;&nbsp;<a href=\".$accountUrl.\">My Account</a>&nbsp;&raquo;&nbsp;Change Password\");\n\t\t\t\t$this->ObTpl->parse(\"changepass_blk\",\"TPL_CHANGEPASS_BLK\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->m_displayInvoiceList();\n\t\t\t\t$this->ObTpl->parse(\"current_blk\",\"TPL_CURRENTINFO_BLK\");\n\t\t\t}\n\t\t\n\t\t\treturn($this->ObTpl->parse(\"return\",\"TPL_USER_FILE\"));\n\t\t}#END ELSE LOOP\n\t\n\t}", "public function profile()\n {\n if (isset($_REQUEST['submit'])) {\n\n $fullname = $_POST['fullname'];\n\n $phone = $_POST['phone'];\n\n $username = $_POST['username'];\n\n $des = $_POST['des'];\n\n $user = $_POST['user'];\n\n\n //Checking for User login or not\n $change = $this->getChange($username, $fullname, $phone ,$des, $user);\n\n if ($change) {\n $success = 'Change profile successful!';\n echo \"<p><span class='error' style='color: green'>\" . $success . \"</span></p><br>\";\n } else {\n // Registration Failed\n $fail = 'Change profile failed. Account already not exits, please try again.';\n echo \"<p><span class='error' style='color: red;'>\" . $fail . \"</span></p><br>\";\n };\n }\n }", "public static function addUser()\n {\n // ADD NEW DATA TO A TABLE\n // MAKE SURE TO SEND USERS TO THE /users page when a user is added\n }", "public function createUserAction() {\n $this->authService->createUser();\n die();\n }", "function master_add_user($conn, $user_id, $user_firstname, $user_lastname, $user_email, $user_password, $user_picture){\n //encrypt email\n $user_email = encrypt_user_email($user_email);\n //encrypt password\n $user_password = encrypt_user_password($user_password);\n\n if($this->user->add_user($conn, $user_id, $user_firstname, $user_lastname, $user_email, $user_password,\n upload_user_profile_picture()) == true){\n // alert user not added\n //add user details to session\n }\n else{\n //alert user not added\n //allow user to try or ask if pass is forgotten\n }\n }", "public function account_update_info()\n\t{\n\t\t$data = $this->input->post();\n\t\tif ($this->ion_auth->update($this->mUser->id, $data))\n\t\t{\n\t\t\t$messages = $this->ion_auth->messages();\n\t\t\t$this->system_message->set_success($messages);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$errors = $this->ion_auth->errors();\n\t\t\t$this->system_message->set_error($errors);\n\t\t}\n\n\t\tredirect('admin/panel/account');\n\t}", "public function adduseraccount() {\n\n $usr = new UserAccount();\n\n if(!$usr->access()) {\n\n return \"connection failure!\";\n\n }\n\n if($this->ruseript('name', 'username')) {\n\n return \"username already exists\";\n\n }\n\n else if($this->ruseript('mail', 'email')) {\n\n return \"email already exists\";\n\n }\n\n else {\n\n $usr->insertuserinfo($_POST);\n\n return;\n\n }\n\n }", "public function addUser(){\n\t}", "public function addUser(){}", "public function post_index()\n\t{\n\t\t$input = Input::all();\n\t\t$rules = array(\n\t\t\t'email' => array('required', 'email'),\n\t\t\t'fullname' => array('required'),\n\t\t);\n\n\t\tif (Auth::user()->id !== $input['id']) return Response::error('500');\n\n\t\tEvent::fire('orchestra.validate: user.account', array(& $rules));\n\n\t\t$msg = Messages::make();\n\t\t$val = Validator::make($input, $rules);\n\n\t\tif ($val->fails())\n\t\t{\n\t\t\treturn Redirect::to(handles('orchestra::account'))\n\t\t\t\t\t->with_input()\n\t\t\t\t\t->with_errors($val);\n\t\t}\n\n\t\t$user = Auth::user();\n\t\t$user->email = $input['email'];\n\t\t$user->fullname = $input['fullname'];\n\n\t\ttry\n\t\t{\n\t\t\t$this->fire_event('updating', array($user));\n\t\t\t$this->fire_event('saving', array($user));\n\n\t\t\tDB::transaction(function () use ($user)\n\t\t\t{\n\t\t\t\t$user->save();\n\t\t\t});\n\n\t\t\t$this->fire_event('updated', array($user));\n\t\t\t$this->fire_event('saved', array($user));\n\n\t\t\t$msg->add('success', __('orchestra::response.account.profile.update'));\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$msg->add('error', __('orchestra::response.db-failed', array(\n\t\t\t\t'error' => $e->getMessage(),\n\t\t\t)));\n\t\t}\n\n\t\treturn Redirect::to(handles('orchestra::account'));\n\t}", "public function saveUser()\n {\n $connection = \\Yii::$app->db;\n $command = $connection->createCommand()\n ->update('users', [\n 'name' => $this->name,\n 'email' => $this->email,\n ], 'id='.$this->id);\n $command->execute();\n }", "public function update_new_user(){\n\t\t$this->data[\"activationCode\"] = $this->make_activation_code();\n\t\tif( $this->send_email($this->get_activation_msg($this->data[\"activationCode\"])) ){\n\t\t\t$mysql = New Mysql();\n\t\t\treturn( $mysql->update_user($this->data[\"name\"], $this->data[\"lastname\"], $this->data[\"email\"], $this->data[\"password\"], $this->data[\"joinDate\"], $this->data[\"lastAccess\"], $this->data[\"activationCode\"]) );\n\t\t}\t\n\t}", "public function postUserAccount(){\n\t\t$this->_loader();\n\n\t\t// get email and password from sign_in form\n\t\t$fname = $this->input->post('fname');\n\t\t$lname = $this->input->post('lname');\n\t\t$image = $_FILES['user_image']['name'];\n\n\t\t// change image name\n\t\t$new_name=str_replace(' ', '_', $image);\n\n\t\t/*\n\t\t*\n\t\t* Check the validation of submitting form\n\t\t* Server side validation is need since\n\t\t*\t\t Client side validation can be modified by {Hacker}\n\t\t*\n\t\t*/\n\t\t$this->form_validation->set_rules('fname','First Name','required|min_length[1]');\n\t\t$this->form_validation->set_rules('lname','Last Name','required|min_length[1]');\n\t\t\n\t\t// update users table of db\n\t\t$data = $this->user->find($this->user());\n\t\t$data->fname = $fname;\n\t\t$data->lname = $lname;\n\t\t$data->image = $new_name;\n\t\t$this->parser->parse('pages/account',['title'=>'Social Site | Account','data'=>(array)$data]);\n\n\n\t\t// upload image in asset/img file\n\t\t$this->do_upload($new_name);\n\n\t\tif($this->user->update($this->user(), $data)){\n\t\t\t$this->session->set_flashdata('successmessage', 'Account has been updated!!');\n\t\t\treturn redirect('account');\n\t\t}else{\n\t\t\t$this->session->set_flashdata('errormessage', 'Something went wrong!!');\n\t\t\treturn redirect('account');\n\t\t}\n\n\t}", "public function update(){\n\t\t\t$record = $this->modelGetrenter_user();\n\t\t\tinclude \"Views/AccountUpdateView.php\";\n\t\t}", "function addAccount($idNumber, $username, $name, $password, $retypedPassword, $email, $position, $status)\n\t\t{\n // escape the characters that are needed to be escaped to avoid sql injection\n $idNumber = mysql_escape_string($idNumber);\n $username = mysql_escape_string($username);\n $name = mysql_escape_string($name);\n $password = mysql_escape_string($password);\n $retypedPassword = mysql_escape_string($retypedPassword);\n $email = mysql_escape_string($email);\n\t\t\t\n\t\t\t// check if the id number is blank or not, if the id number is blank, then that means that the administrator is adding\n\t\t\t// a special guest account. Special guest account has different validation.\n // trim the id number, removing the spaces found\n\t\t\t$idNumber = trim($idNumber);\n\t\t\t\n\t\t\t// check if the id number is empty or not\n\t\t\tif(empty($idNumber))\n\t\t\t{\t\n\t\t\t\t// if the id number is empty, insert \"GUEST\" as an id number to identify that the account is a guest account\n\t\t\t\t$idNumber = \"GUEST\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// validate the id number if it has an ID number\n\t\t\t\t$idError = $this -> validateIdNumber($idNumber, $name);\n\t\t\t}\n\t\t\t\n\t\t\t// validate the username\n\t\t\t$usernameError = $this -> validateUsername(null, $username);\n\t\t\t\n\t\t\t// validate the password\n\t\t\t$passwordError = $this -> validatePassword($password, $retypedPassword);\n\t\t\t\n\t\t\t// validate the email\n\t\t\t$emailError = $this -> validateEmail(null, $email);\n\t\t\t\n\t\t\tif($idError == null && $usernameError == null && $passwordError == null && $emailError == null)\n\t\t\t{\n\t\t\t\t// update the slu students database to REGISTERED from UNREGISTERED\n\t\t\t\tmysql_query(\"UPDATE argus_slu_students SET status = 'REGISTERED' WHERE id_number = '\".$idNumber.\"'\") or die(mysql_error());\n\t\t\t\t\n\t\t\t\t// insert the new account to the database if validation has passed\n\t\t\t\tmysql_query(\"INSERT INTO argus_accounts(id_number, username, password, name , position, email, last_login_date, date_registered, status)\n\t\t\t\t\t\t \tVALUES('\".$idNumber.\"', '\".$username.\"', '\".$password.\"' ,'\".$name.\"', '\".$position.\"', '\".$email.\"', '\".time().\"', '\".time().\"', '\".$status.\"')\") or die(mysql_error());\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// set the errors and return un successful validation\n\t\t\t\t$this -> errors = array(\"id\" => $idError, \"username\" => $usernameError, \"password\" => $passwordError, \"email\" => $emailError);\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn;\n\t\t}", "public function manage() {\n if (User::getRole() == 10) {\n if (Input::get(\"id\") != null && Input::get(\"action\") != null) {\n $users = DB::select(\"select * from users where id = ?\", [Input::get(\"id\")]);\n foreach ($users as $user) {\n switch ($user -> role) {\n case 0:\n if ($_REQUEST[\"action\"] == 2) {\n return \"No change.\";\n } else if ($_REQUEST[\"action\"] == 1) {\n DB::update(\"update users set role = 1 where id = ?\", [Input::get(\"id\")]);\n return \"This user is now activated. :-)\";\n }\n break;\n case 1:\n if ($_REQUEST[\"action\"] == 1) {\n return \"No change.\";\n } else if ($_REQUEST[\"action\"] == 2) {\n DB::update(\"update users set role = 0 where id = ?\", [Input::get(\"id\")]);\n return \"This user is now deactivated. :-(\";\n }\n break;\n case 10:\n return \"I will not allow this to be happened :-D\";\n }\n }\n }\n }\n return null;\n }", "public function addAccount(){\n\n\t}", "public function userAdd($userModel) {\n // Validating the input on back-end\n $validateEmail = $this->validate->validateEmail($userModel->getEmail());\n $validateUsername = $this->validate->validateInput($userModel->getUsername(), \"/^[a-zA-Z0-9_.-]*$/\", 1, 25);\n $validatePassword = $this->validate->validateInput($userModel->getPassword(), \"/^[a-zA-Z0-9@+_.!?|]*$/\", 8, 20);\n\n // Checking if they all return true\n if ($validateEmail && $validateUsername && $validatePassword) {\n // Checking if email or username is already used\n $emailExist = $this->userDB->checkUserEmailUsed($userModel->getEmail());\n $usernameExist = $this->userDB->checkUsernameUsed($userModel->getUsername());\n\n if ($emailExist != 1) {\n // Returning error if one or more failes\n header(\"Location: create-account?error=3\");\n } else if ($usernameExist != 1) {\n // Returning error if one or more failes\n header(\"Location: create-account?error=4\");\n } else {\n // Sending the model to the database layer create the account\n if ($this->userDB->userAdd($userModel)) {\n // Getting the user info by username and filling the userModel with it\n $userModel = $this->userDB->getUserByUsername($userModel);\n\n // Achievements ophalen\n $achievementList = $this->achievementDB->getAchievements();\n\n // Checking if achievements are connected\n if($this->userDB->connectAchievementsToUser($userModel, $achievementList)) {\n // Logging the user in with session\n session_start();\n $_SESSION['userID'] = $userModel->getID();\n\n // Sending user to home page\n header(\"Location: index\");\n } else {\n // Returning with error\n header(\"Location: create-account?error=5\");\n }\n } else {\n // Returning error if user account is not added\n header(\"Location: create-account?error=5\");\n }\n }\n } else {\n // Returning error if one or more failes\n header(\"Location: create-account?error=5\");\n } \n }", "public function account() {\n\t\t\t// choix du layout\n\t\t\t$this->layout = 'default2';\n\t\t\t// si l'utilisateur appuie sur \"modifier\"\n\n\t\t\tif (!empty($this->request->data)) {\n\n\t\t\t\tif (!isset($this->request->data['User']['password'])) {\n\n\t\t\t\t\t$this->request->data['User']['id'] = $this->Auth->user('id');\n\t\t\t\t\t// récupération de l'utilisateur courant\n\t\t\t\t\t$this->User->id = $this->Auth->user('id');\n\n\t\t\t\t\t// validation des champs\n\t\t\t\t\tif ($this->User->validates()) {\n\t\t\t\t\t\t// vérification de la présence d'un avatar\n\t\t\t\t\t\tif (!empty($this->request->data['User']['avatarf']['tmp_name'])) {\n\t\t\t\t\t\t\t// création du chemin (ou récupération)\n\t\t\t\t\t\t\t// supposons qu'il y ait beaucoup d'utilisateur, on va mettre les images dans des\n\t\t\t\t\t\t\t// dossiers séparés 1 pour utilisateur 1 à 1000 etc etc\n\t\t\t\t\t\t\t$directory = IMAGES . 'avatars' . DS . ceil($this->User->id / 1000);\n\t\t\t\t\t\t\tif (!file_exists($directory)) {\n\t\t\t\t\t\t\t\t// si le dossier n'existe pas on le créer\n\t\t\t\t\t\t\t\tmkdir($directory, 0777);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// enfin on récupère l'image pour la mettre dans notre dossier\n\t\t\t\t\t\t\tmove_uploaded_file($this->request->data['User']['avatarf']['tmp_name'], $directory . DS . $this->User->id . '.jpg');\n\t\t\t\t\t\t\t// on modifie la colonne \"avatar\" de la tables users pour mettre la valeur 1\n\t\t\t\t\t\t\t$this->User->saveField('avatar', 1);\n\t\t\t\t\t\t\t$this->Session->destroy();\n\t\t\t\t\t\t\t$this->Session->write('Auth.User.avatari', $directory . DS . $this->User->id . '.jpg');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!empty($this->request->data['User']['mail'])) {\n\t\t\t\t\t\t\t$this->User->saveField(\n\t\t \t\t\t\t'mail', $this->request->data['User']['mail']\n\t \t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// on recharge les informations\n\t\t\t\t\t\t$user = $this->User->read();\n\n\t\t\t\t\t\t$this->Auth->login($user['User']);\n\n\t\t\t\t\t\t// on laisse un message de validation\n\t\t\t\t\t\t$this->Session->setFlash(__(\"Vos informations ont bien été modifiées\"), 'success');\n\n\t\t\t\t\t\t$user = $this->User->findById($this->Auth->user('id'));\n\t\t\t\t\t\t$this->set('user', $user);\n\t\t\t\t\t\t$this->redirect($this->referer());\n\t\t\t\t\t}\n\t\t\t\t} else {\n\n\t\t\t\t\t$user = $this->User->find('first', array(\n\t\t\t\t\t\t'conditions'=>array('id'=>$this->Auth->user('id'))\n\t\t\t\t\t));\n\n\t\t\t\t\t$this->User->create($this->request->data);\n\t\t\t\t\t// validation des champs\n\t\t\t\t\tif ($this->User->validates()) {\n\t\t\t\t\t\t// modification de la DB\n\t\t\t\t\t\t$this->User->create();\n\t\t\t\t\t\t$this->User->save(array(\n\t\t\t\t\t\t\t'id'=>$user['User']['id'],\n\t\t\t\t\t\t\t'active'=>1,\n\t\t\t\t\t\t\t'password'=>$this->Auth->password($this->request->data['User']['password']),\n\t\t\t\t\t\t\t'groups_id'=>$user['User']['groups_id'],\n\t\t\t\t\t\t\t'avatar'=>$user['User']['avatar']\n\t\t\t\t\t\t));\n\t\t\t\t\t\t$user = $this->User->read();\n\n\t\t\t\t\t\t$this->Auth->login($user['User']);\n\t\t\t\t\t\t// on laisse un petit message\n\t\t\t\t\t\t$this->Session->setFlash(__(\"Votre mot de passe a bien été modifié\"), 'success');\n\t\t\t\t\t\t$user = $this->User->findById($this->Auth->user('id'));\n\t\t\t\t\t\t$this->set('user', $user);\n\t\t\t\t\t\t// on redirige notre utilisateur\n\t\t\t\t\t\treturn $this->redirect($this->referer());\n\t\t\t\t\t}\n\n\t\t\t\t\t$user = $this->User->findById($this->Auth->user('id'));\n\t\t\t\t\t$this->set('user', $user);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// sinon on se contente d'afficher les informations de l'utilisateur\n\t\t\t\t$user = $this->User->findById($this->Auth->user('id'));\n\t\t\t\t$this->set('user', $user);\n\t\t\t\t$this->User->id = $this->Auth->user('id');\n\t\t\t\t$this->request->data = $this->User->read();\n\t\t\t\t$this->request->data['User']['password'] = array();\n\t\t\t}\n\t\t}", "function saveUser(){\n global $conn, $errors, $username, $role_id, $class_id, $email, $isEditing;\n $errors = validateUser($_POST, ['save_user']);\n // receive all input values from the form\n $username = $_POST['username'];\n $email = $_POST['email'];\n $password = password_hash($_POST['password'], PASSWORD_DEFAULT); //encrypt the password before saving in the database\n $profile_picture = uploadProfilePicture(); // upload profile picture and return the picture name\n if (count($errors) === 0) {\n if (isset($_POST['role_id'])) {\n $role_id = $_POST['role_id'];\n }\n if (isset($_POST['class_id'])) {\n $class_id = $_POST['class_id'];\n }\n $sql = \"INSERT INTO users SET username=?, role_id=?, class_id=?, email=?, password=?, profile_picture=?\";\n $result = modifyRecord($sql, 'siisss', [$username, $role_id, $class_id, $email, $password, $profile_picture]);\n\n if($result){\n $_SESSION['success_msg'] = \"User account created successfully\";\n header(\"location: \" . BASE_URL . \"admin/users/userList.php\");\n exit(0);\n } else {\n $_SESSION['error_msg'] = \"Something went wrong. Could not save user in Database\";\n }\n }\n}", "public static function deleteAccount(){\n\n //if user is logged in proceed, else send them to login\n if(login::isLoggedIn()){\n \n //if user clicked submit proceed\n if(isset($_POST['delete-account'])) {\n \n //grab the user's id and proceed to deletion\n $userId = login::isLoggedIn();\n \n database::query(\"DELETE FROM login_tokens WHERE fk_users_id = :userId\", array(':userId'=>$userId));\n database::query(\"DELETE FROM users WHERE users_id = :userId\", array(':userId'=>$userId));\n\n controller::redirectTo('login');\n \n }\n \n } else {\n controller::redirectTo('login');\n }\n }", "public function editAccountAction()\n {\n //Current customer Data.\n $cst = $this->model->getByUserName($_SESSION['userName']);\n if (empty($_POST) === false) {\n //User want to Update his Data.\n if (isset($_POST['update'])) {\n $message = \"\";\n $currentUserName = $cst->getuserName();\n //Check if customer`s new User Name or \n //new Email exists in Data Base.\n if ($currentUserName != $_POST['userName'])\n $message = $this->checkIfExists($_POST['userName'], \"\");\n if (!$message)\n if ($cst->getemail() != $_POST['email'])\n $message = $this->checkIfExists(\"\", $_POST['email']);\n if ($message != \"\")\n $this->regMassage($message);\n //Upadating Customer`s Data.\n else {\n $cst = $this->customerCreate();\n $this->update($cst, $currentUserName);\n $_SESSION['userName'] = $_POST['userName'];\n }\n }\n }\n\n $vars['update'] = \"\";\n $vars['customer'] = $cst;\n $this->view->render('edit profile', $vars);\n }", "public function editUser($params) {\n $token = $this->require_authentication();\n\n try {\n $baseType = USER::TYPE_COMMENTER;\n $user = $token->getUser();\n\n $user->setUsername(strtolower($_POST['username2']));\n $user->setPassword($_POST['password2']);\n $user->setEmail($_POST['email2']);\n $user->setType($baseType);\n $user->setFirstname($_POST['firstname2']);\n $user->setLastname($_POST['lastname2']);\n $user->setPrivacy($_POST['privacy2']);\n\n $res = $user->commit($this->getDBConn());\n\n error_log(\"Edited user \". $user->getUserId());\n if ($res) {\n // display success message and redirect to new user's page\n $this->addFlashMessage('Edited user: ' . $user->getUsername(), self::FLASH_LEVEL_SUCCESS);\n $this->redirect(\"/users/\");\n } else {\n $this->addFlashMessage('Unknown error adding user. Please try again: ', self::FLASH_LEVEL_SERVER_ERR);\n }\n } catch (\\PDOException $dbErr) {\n $this->addFlashMessage('Database error on adding user:<br>'.$dbErr->getMessage(), self::FLASH_LEVEL_SERVER_ERR);\n }\n\n }", "public function myAccount() {\n if ($this->_model->isLogged()) {\n $username = $_SESSION['user'];\n $email = $this->_model->getMailFromSessionUsername();\n $checked = $this->_model->getNotifsFromSessionUsername();\n $edit_success = \"<p class='flash_success'>\" . $this->_model->getFlash('edit_success') . \"</p>\";\n $edit_err = \"<p class='flash_err'>\" . $this->_model->getFlash('edit_err') . \"</p>\";\n $this->render('General.Account', compact('username', 'email', 'edit_success', 'edit_err', 'checked'));\n }\n else {\n $this->login();\n }\n }", "public function formUserCreate(){\n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_account')){\n $this->_app->notFound();\n }\n \n $get = $this->_app->request->get();\n \n if (isset($get['render']))\n $render = $get['render'];\n else\n $render = \"modal\";\n \n // Get a list of all groups\n $groups = GroupLoader::fetchAll();\n \n // Get a list of all locales\n $locale_list = $this->_app->site->getLocales();\n \n // Get default primary group (is_default = GROUP_DEFAULT_PRIMARY)\n $primary_group = GroupLoader::fetch(GROUP_DEFAULT_PRIMARY, \"is_default\");\n \n // Get the default groups\n $default_groups = GroupLoader::fetchAll(GROUP_DEFAULT, \"is_default\");\n \n // Set default groups, including default primary group\n foreach ($groups as $group_id => $group){\n $group_list[$group_id] = $group->export();\n if (isset($default_groups[$group_id]) || $group_id == $primary_group->id)\n $group_list[$group_id]['member'] = true;\n else\n $group_list[$group_id]['member'] = false;\n }\n \n $data['primary_group_id'] = $primary_group->id;\n // Set default title for new users\n $data['title'] = $primary_group->new_user_title;\n // Set default locale\n $data['locale'] = $this->_app->site->default_locale;\n \n // Create a dummy user to prepopulate fields\n $target_user = new User($data); \n \n if ($render == \"modal\")\n $template = \"components/user-info-modal.html\";\n else\n $template = \"components/user-info-panel.html\";\n \n // Determine authorized fields for those that have default values. Don't hide any fields\n $fields = ['title', 'locale', 'groups', 'primary_group_id'];\n $show_fields = [];\n $disabled_fields = [];\n $hidden_fields = [];\n foreach ($fields as $field){\n if ($this->_app->user->checkAccess(\"update_account_setting\", [\"user\" => $target_user, \"property\" => $field]))\n $show_fields[] = $field;\n else\n $disabled_fields[] = $field;\n } \n \n // Load validator rules\n $schema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-create.json\");\n $validators = new \\Fortress\\ClientSideValidator($schema, $this->_app->translator); \n \n $this->_app->render($template, [\n \"box_id\" => $get['box_id'],\n \"box_title\" => \"Create User\",\n \"submit_button\" => \"Create user\",\n \"form_action\" => $this->_app->site->uri['public'] . \"/users\",\n \"target_user\" => $target_user,\n \"groups\" => $group_list,\n \"locales\" => $locale_list,\n \"fields\" => [\n \"disabled\" => $disabled_fields,\n \"hidden\" => $hidden_fields\n ],\n \"buttons\" => [\n \"hidden\" => [\n \"edit\", \"enable\", \"delete\", \"activate\"\n ]\n ],\n \"validators\" => $validators->formValidationRulesJson()\n ]); \n }", "public function processUser(){\n \n $this->setCurrentUser();\n $this->setUsersAttributes();\n }", "public function add()\n {\n $storedPassword = password_hash($_POST['password'], PASSWORD_DEFAULT);\n\n $data = [];\n $data['username'] = $_POST[\"username\"];\n $data['password'] = $storedPassword;\n $data['email'] = $_POST['email'];\n $data['profile_picture'] = $_FILES['profile']['tmp_name'];\n $data['mime'] = $_FILES['profile']['type'];\n $data['phone_num'] = $_POST['phone-number'];\n\n if ($this->model('User')->addNewUser($data) > 0) {\n $this->redirect(BASE_URL . \"/home/index/{$data['username']}\");\n }\n }", "public static function index() {\n $loggedInUserId = parent::getLoggedInUsersId();\n\n if (!$loggedInUserId) {\n header(\"Location: /\");\n }\n else {\n\n # Get the database handler\n $mysqli = parent::dbConnect();\n\n # Get the user's current email address\n $stmt = $mysqli->prepare('select name, username, author_email from mobile_users where id = ?');\n $stmt->bind_param('s', $loggedInUserId);\n $stmt->execute();\n $stmt->bind_result($displayname, $username, $userEmailAddress);\n $stmt->fetch();\n $stmt->close();\n\n # Initialize and inflate the template\n $tpl = parent::tpl()->loadTemplate('account');\n\n print $tpl->render(array_merge(parent::getGlobalTemplateData(),\n array(\n 'displayname' => $displayname,\n 'username' => $username,\n 'emailaddress' => $userEmailAddress,\n 'success' => isSet($_GET['success']) ? (($_GET['success'] == 1) ? '✔︎ Successfully updated!' : '❌ Oh no! Something went wrong.') : null\n )\n ));\n }\n }", "public function store()\n\t{\n\t\t// save the new user\n\t\t// TODO : limit the admin to 3 accounts only\n\t\t$this->user->create(array(\n\t\t\t\t\t\t\t\t\t'user_username' =>\tInput::get('user_username'),\n\t\t\t\t\t\t\t\t\t'user_password_md5' => \tmd5(Input::get('user_password')),\n\t\t\t\t\t\t\t\t\t'password' => \tHash::make(Input::get('user_password')),\n\t\t\t\t\t\t\t\t\t'user_role' \t=>\tInput::get('user_role')\n\t\t\t\t\t\t\t));\n\n\t\t$users = $this->user->all();\n\t\treturn Redirect::to('settings/system-users')\n\t\t\t\t\t\t->with('users',$users)\n\t\t\t\t\t\t->with('flash_msg','User has been successfully created !');\n\t}", "public function updateAccount()\n\t{\n\t\tif (in_array('newsletter', $this->Config->getActiveModules()))\n\t\t{\n\t\t\t$GLOBALS['TL_DCA']['tl_member']['palettes']['default'] = str_replace('newsletter;', 'newsletter,newsalert;', $GLOBALS['TL_DCA']['tl_member']['palettes']['default']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$GLOBALS['TL_DCA']['tl_member']['palettes']['default'] = str_replace('assignDir;', 'assignDir;{newsletter_legend:hide},newsalert;', $GLOBALS['TL_DCA']['tl_member']['palettes']['default']);\n\t\t}\n\t\t\n\t\t$intUser = $this->Input->get('id');\n\n\t\t// Front end call\n\t\tif (TL_MODE == 'FE')\n\t\t{\n\t\t\t$this->import('FrontendUser', 'User');\n\t\t\t$intUser = $this->User->id;\n\t\t}\n\n\t\t// Edit account\n\t\tif (TL_MODE == 'FE' || $this->Input->get('act') == 'edit')\n\t\t{\n\t\t\t$objUser = $this->Database->prepare(\"SELECT email FROM tl_member WHERE id=?\")\n\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t ->execute($intUser);\n\n\t\t\tif ($objUser->numRows)\n\t\t\t{\n\t\t\t\t// E-mail address has changed\n\t\t\t\tif (!empty($_POST) && $this->Input->post('email', true) != $objUser->email)\n\t\t\t\t{\n\t\t\t\t\t$this->Database->prepare(\"UPDATE tl_news_recipients SET email=? WHERE email=?\")\n\t\t\t\t\t\t\t\t ->execute($this->Input->post('email', true), $objUser->email);\n\n\t\t\t\t\t$objUser->email = $this->Input->post('email', true);\n\t\t\t\t}\n\n\t\t\t\t$objSubscriptions = $this->Database->prepare(\"SELECT pid FROM tl_news_recipients WHERE email=?\")\n\t\t\t\t\t\t\t\t\t\t\t\t ->execute($objUser->email);\n\n\t\t\t\t$strNews = serialize($objSubscriptions->fetchEach('pid'));\n\n\t\t\t\t$this->Database->prepare(\"UPDATE tl_member SET newsalert=? WHERE id=?\")\n\t\t\t\t\t\t\t ->execute($strNews, $intUser);\n\n\t\t\t\t// Update the front end user object\n\t\t\t\tif (TL_MODE == 'FE')\n\t\t\t\t{\n\t\t\t\t\t$this->User->newsalert = $strNews;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Delete account\n\t\telseif ($this->Input->get('act') == 'delete')\n\t\t{\n\t\t\t$objUser = $this->Database->prepare(\"SELECT email FROM tl_member WHERE id=?\")\n\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t ->execute($intUser);\n\n\t\t\tif ($objUser->numRows)\n\t\t\t{\n\t\t\t\t$objSubscriptions = $this->Database->prepare(\"DELETE FROM tl_news_recipients WHERE email=?\")\n\t\t\t\t\t\t\t\t\t\t\t\t ->execute($objUser->email);\n\t\t\t}\n\t\t}\n\t}", "public function saveAction(){\n\t\t$request = $this->_request->getParams();\n\t\t$oValidationHelper = new Helpers_Usermanagement_Validate();\n\t\t\n\t\t$error = false;\n\t\tif(!$oValidationHelper->ifEmailAvailable($request['user_email'],$this->_auth->user_id)){\n\t\t\t$error = true;\n\t\t\t$this->_messages->setMessage('User with such email already exists','error','user_email');\n\t\t}\n\n\t\tif(!$oValidationHelper->ifUsernameAvailable($request['user_login'],$this->_auth->user_id)){\n\t\t\t$this->_messages->setMessage('User with such username already exists','error','user_login');\n\t\t\t$error = true;\n\t\t}\n\t\t\t\t\n\t\tif($this->_validator->validate('registration_form',$request) && !$error){\n\t\t\t\n\t\t\tif($request['user_email']!=$this->_auth->user_email){\n\t\t\t\t$request['user_confirmation_code'] = md5(time()+rand(10000,99999));\n\t\t\t\t$request['user_active'] = 0;\n\t\t\t\t$this->_sendConfirmationEmail($request['user_email'],$request['user_login'],$request['user_confirmation_code']);\n\t\t\t\t$this->_messages->setMessage('WARNING!!! Your email has been changed and your account has been disabled. Instructions on how to activate account were sent to you','error');\n\t\t\t}\n\t\t\t\n\t\t\t$request['user_id'] = $this->_auth->user_id;\n\t\t\t$oUsers = new Models_Usermanagement_Users();\n\t\t\t$oUsers->updateEntry($request);\t\t\t\n\t\t\t\n\t\t\t$this->_messages->setMessage('Account has been updated');\n\t\t\t$this->_redirect('/usermanagement/profile/generaldataform/');\n\t\t}else{\n\t\t\tforeach ( $this->_validator->getErrors () as $field=>$error ) {\n\t\t\t\t$this->_messages->setMessage ( $error, 'error' , $field);\n\t\t\t}\n\t\t\t$this->_redirect('/usermanagement/profile/generaldataform/?error=1');\n\t\t}\n\t}", "public function doUserSubmit() {\n\t\tif (@isset( $_REQUEST ['id'] )) {\n\t\t\t$user = new User($_REQUEST['id']);\n\t\t\tif ($_REQUEST['a_password'] != '') {\n\t\t\t\t$user->setPassword($_REQUEST['a_password']);\n\t\t\t}\n\t\t} else {\n\t\t\t$user = new User();\n\t\t\t$user->setPassword($_REQUEST['a_password']);\n\t\t\t\t\n\t\t}\n\t\t$user->setUsername($_REQUEST['a_username']);\n\t\t$user->setName($_REQUEST['a_name']);\n\t\t$user->setEmail($_REQUEST['a_username']);\n\t\t$user->setJoinNewsletter(@$_REQUEST['a_join_newsletter']);\n\t\tif (isset($_REQUEST['a_group'])) {\n\t\t\t$user->setAuthGroup($_REQUEST['a_group']);\n\t\t} else {\n\t\t\t$user->setAuthGroup(2);\n\t\t}\n\t\tif (isset($_REQUEST['a_status'])) {\n\t\t\t$user->setActiveStatus($_REQUEST['a_status']);\n\t\t} else {\n\t\t\t$user->setActiveStatus(1);\n\t\t}\n\t\t$user->save();\n\n\t\t$this->setupMainList();\n\t\t$this->template = 'admin/user_table.tpl';\n\t}", "function create_account($db, $name, $username, $password, $password_confirmation)\n{\n global $signup_messages;\n\n global $sticky_signup_username;\n global $sticky_signup_name;\n\n $name = trim($name);\n $username = trim($username);\n $password = trim($password);\n $password_confirmation = trim($password_confirmation);\n\n $sticky_signup_username = $username;\n $sticky_signup_name = $name;\n\n $account_valid = True;\n\n $db->beginTransaction();\n\n // check if username is unique, give error message if not.\n if (empty($username)) {\n $account_valid = False;\n array_push($signup_messages, \"Please provide a username.\");\n } else {\n $records = exec_sql_query(\n $db,\n \"SELECT username FROM users WHERE (username = :username);\",\n array(\n ':username' => $username\n )\n )->fetchAll();\n if (count($records) > 0) {\n $account_valid = False;\n array_push($signup_messages, \"Username is already taken, please pick another username.\");\n }\n }\n\n // TODO: check if password meets security requirements.\n if (empty($password)) {\n $account_valid = False;\n array_push($signup_messages, \"Please provide a password.\");\n }\n\n // Check if passwords match\n if ($password != $password_confirmation) {\n $account_valid = False;\n array_push($signup_messages, \"Password confirmation doesn't match your password. Please reenter your password.\");\n } else {\n // hash the password\n $hashed_password = password_hash($password, PASSWORD_DEFAULT);\n }\n\n if ($account_valid) {\n $result = exec_sql_query(\n $db,\n \"INSERT INTO users (name, username, password) VALUES (:name, :username, :password);\",\n array(\n ':name' => $name,\n ':username' => $username,\n ':password' => $hashed_password\n )\n );\n if ($result) {\n // account creation was successful. Login.\n password_login($db, $messages, $username, $password);\n } else {\n array_push($messages, \"Password confirmation doesn't match your password. Please reenter your password.\");\n }\n }\n\n $db->commit();\n}", "public function modify_user($user);", "public function manageaccountAction()\r\n {\r\n\r\n\t\t\r\n $this->view->ses_user=$ses_user=$_SESSION['tranzgo_session']['user_id'];\r\n $this->view->ses_role=$ses_role=$_SESSION['tranzgo_session']['account_id'];\r\n $idd= trim($this->_request->getParam('idd',''));\r\n $user_id=0;\r\n\t\t\r\n $ob_User = new Signup();\r\n $dataAcc = [];\r\n\r\n if($ses_role==1){ $dataAcc = [1,2,3,4,5] ;}\r\n if($ses_role==2 || $ses_role==3){ $dataAcc = [2,3,4,5] ;}\r\n\r\n\r\n\r\n\r\n //$dataAcc = ($ses_role=='1') ? ['1','2','3','4','5']: ($ses_role==2 || $ses_role==3) ? ['2','3','4','5'] : '';\r\n\r\n\r\n\r\n if($ses_role!=1)\r\n {\r\n\r\n $getCompanyBySessId = $ob_User->get_company_by_sess_id($ses_user);\r\n\r\n $this->view->getCompanyBySessId=$getCompanyBySessId;\r\n\r\n $comp_id = $getCompanyBySessId['company_id'];\r\n\r\n }else{\r\n $this->view->companyList = $ob_User->get_company();\r\n }\r\n\r\n\r\n\r\n\r\n $this->view->accountList=$ob_User->get_account($dataAcc);\r\n //$this->view->companyList=$ob_User->get_company();\r\n\r\n\r\n\r\n\r\n\r\n $this->view->cancel_link = '/Accounts/useraccounts';\r\n\r\n if ($this->_request->isPost()){\r\n\r\n\r\n $fname = trim($this->_request->getParam('first_name',''));\r\n $lname = trim($this->_request->getParam('last_name',''));\r\n $nickname = trim($this->_request->getParam('nickname',''));\r\n $email = trim($this->_request->getParam('user_name',''));\r\n $pass = trim($this->_request->getParam('password',''));\r\n //$confirm_password = trim($this->_request->getParam('confirm_password',''));\r\n $company = trim($this->_request->getParam('company',''));\r\n $account = trim($this->_request->getParam('account',''));\r\n $status = trim($this->_request->getParam('status',''));\r\n\t\t\t if($idd)\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tif($pass)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$ob_User\t= new User();\r\n\r\n\t\t\t\t\t\t\t$ob_User->updateUserWithPass($fname,$lname,$email,$pass,$nickname,$company,$account,$status,$ses_user,$idd);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$ob_User\t= new User();\r\n\t\t\t\t\t\t\t$ob_User->updateUserWithoutPass($fname,$lname,$email,$pass,$nickname,$company,$account,$status,$ses_user,$idd);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->sessionAuth->msg_centre('User updated successfully');\r\n\t\t\t\t\t//$this->view->server_msg = $this->sessionAuth->msg_centre();\r\n\t\t\t\t}else{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$ob_User->insertUser($fname,$lname,$email,$pass,$nickname,$company,$account,$status,$ses_user);\r\n\t\t\t\t\t$this->sessionAuth->msg_centre('User added successfully');\r\n\t\t\t\t\t//$this->view->server_msg = $this->sessionAuth->msg_centre();\r\n\t\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\t$this->_redirect('/Accounts/useraccounts');\r\n }\r\n\r\n if($idd)\r\n {\r\n\t\t\t$ob_User\t= new User();\r\n $this->view->user_detail = $user_detail=$ob_User->get_user_detail_from_idd($idd);\r\n\r\n\r\n //echo '<pre>';print_r($user_detail);exit;\r\n $get_user_id = $user_detail['user_id'];\r\n $this->view->get_user_active_log_details = $ob_User->get_user_active_log_by_idd($get_user_id);\r\n\r\n $this->view->get_user_deactive_log_details = $ob_User->get_user_deactive_log_by_idd($get_user_id);\r\n //echo '<pre>';print_r($get_user_deactive_log_details); echo '</pre>';\r\n\r\n\t\t\t/*$this->view->user_detail=$user_detail;\r\n\t\t\t$createdby = $user_detail['created_by'];\r\n\t\t\t$createdbydetails=$ob_User->get_user_detail_from_idd($createdby);\r\n\t\t\t$this->view->createdbydetails=$createdbydetails;*/\r\n\t\t\t\r\n $user_id=$user_detail['user_id'];\r\n }\r\n\r\n if($user_id)\r\n {\r\n $this->sessionAuth->menu_permission('Edit_User');\r\n $this->view->page_title='Edit <span class=\"semi-bold\">User</span>';\r\n }\r\n else\r\n {\r\n $this->sessionAuth->menu_permission('Add_User');\r\n $this->view->page_title='Add <span class=\"semi-bold\">User</span>';\r\n }\r\n $this->view->user_id=$user_id;\r\n\r\n // if($user_id)\r\n //{\r\n // $this->view->user_detail=$ob_User->getUserDetails($user_id);\r\n //}\r\n\r\n//print \"<pre>\"; print_r($this->view->user_detail); print \"</pre>\"; exit;\r\n $layout = $this->_helper->layout();\r\n $layout->setLayout('frontend/onecolumn');\r\n }", "public function actionIndex()\n {\n $authManager = \\Yii::$app->authManager;\n $adminRole = $authManager->createRole(\"admin\");\n $authManager->add($adminRole);\n $adminUser = new AccountUser();\n $adminUser->username = \"admin\";\n $adminUser->password = \"pf3Zt49nsgoPFbr\";\n $adminUser->authKey= uniqid();\n $adminUser->accessToken = uniqid();\n if ($adminUser->save()) {\n $authManager->assign($adminRole, $adminUser->id);\n /*assign the role */\n }\n }", "public function set_new_user () { //вынести в отдельный класс Admin\n \n if ($this->user_status == 0) {\n file_put_contents ('user.csv', $this->userID.\",\". time() .\"\\n\", FILE_APPEND);\n $this->set_new_password();\n $result = 'Новый пользователь: '.$this->userID.\"\\n\";\n }\n else {\n $result = 'Пользователь: '.$this->userID.\" уже зарегистрирован\\n\";\n }\n return $result; \n }", "public function createAccount(){\n\t\t\n\t\t$email = trim($_POST['signupemail']);\n\t\t$uname = trim($_POST['uname']);\n\t\t\n\t\t$v = sha1(time());\n\t\t//check for previous uses of that username\n\t\t$sql = \"SELECT COUNT(uname) AS theCount FROM user where uname=:uname\";\n\t\t\n\t\tif($stmt = $this->_db->prepare($sql)){\n\t\t\t$stmt->bindParam(\":uname\", $uname, PDO::PARAM_STR);\n\t\t\t$stmt->execute();\n\t\t\t$row = $stmt->fetch();\n\t\t\tif($row['theCount']!=0){\n\t\t\t\treturn \"Sorry, that username is already on the system.\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sql = \"SELECT COUNT(email) AS theCount FROM user where email=:email\";\n\n\t\tif($stmt = $this->_db->prepare($sql)){\n\t\t\t$stmt->bindParam(\":email\", $email, PDO::PARAM_STR);\n\t\t\t$stmt->execute();\n\t\t\t$row = $stmt->fetch();\n\t\t\tif($row['theCount']!=0){\n\t\t\t\treturn \"Sorry, that email is already on the system. \";\n\t\t\t}\n\t\t\tif(!$this->sendVerificationEmail($email, $v)){\n\t\t\t\treturn \"There was an error sending the verification email.\";\n\t\t\t}\n\t\t\t$stmt ->closeCursor();\n\t\t}\n\t\t\n\t\t$sql = \"INSERT INTO user(email, uname, ver_code) VALUES(:email, :uname, :ver)\";\n\t\tif($stmt = $this->_db->prepare($sql)) {\n\t\t\t$stmt->bindParam(\":email\", $email, PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":ver\", $v, PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":uname\", $uname, PDO::PARAM_STR);\n\t\t\t$stmt->execute();\n\t\t\t$stmt->closeCursor();\n\t\t}\n\t\telse{\n\t\t\treturn \"Could not create the user\";\n\t\t}\n\t}", "function add() {\n $this->layout = \"no_header\";\n if (!empty($this->data)) {\n if ($this->User->save($this->data)) {\n $this->Session->setFlash(\"Your account has been created successfully\");\n $this->go_back(\"login\");\n }\n }\n }", "public function createUser(){\n $post = $this->_app->request->post();\n \n // Load the request schema\n $requestSchema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-create.json\");\n \n // Get the alert message stream\n $ms = $this->_app->alerts; \n \n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_account')){\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n\n // Set up Fortress to process the request\n $rf = new \\Fortress\\HTTPRequestFortress($ms, $requestSchema, $post); \n \n // Sanitize data\n $rf->sanitize();\n \n // Validate, and halt on validation errors.\n $error = !$rf->validate(true);\n \n // Get the filtered data\n $data = $rf->data(); \n \n // Remove csrf_token, password confirmation from object data\n $rf->removeFields(['csrf_token, passwordc']);\n \n // Perform desired data transformations on required fields. Is this a feature we could add to Fortress?\n $data['user_name'] = strtolower(trim($data['user_name']));\n $data['display_name'] = trim($data['display_name']);\n $data['email'] = strtolower(trim($data['email']));\n $data['active'] = 1;\n \n // Check if username or email already exists\n if (UserLoader::exists($data['user_name'], 'user_name')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_USERNAME_IN_USE\", $data);\n $error = true;\n }\n\n if (UserLoader::exists($data['email'], 'email')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_EMAIL_IN_USE\", $data);\n $error = true;\n }\n \n // Halt on any validation errors\n if ($error) {\n $this->_app->halt(400);\n }\n \n // Get default primary group (is_default = GROUP_DEFAULT_PRIMARY)\n $primaryGroup = GroupLoader::fetch(GROUP_DEFAULT_PRIMARY, \"is_default\");\n \n // Set default values if not specified or not authorized\n if (!isset($data['locale']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"locale\"]))\n $data['locale'] = $this->_app->site->default_locale;\n \n if (!isset($data['title']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"title\"])) {\n // Set default title for new users\n $data['title'] = $primaryGroup->new_user_title;\n }\n \n if (!isset($data['primary_group_id']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"primary_group_id\"])) {\n $data['primary_group_id'] = $primaryGroup->id;\n }\n \n // Set groups to default groups if not specified or not authorized to set groups\n if (!isset($data['groups']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"groups\"])) {\n $default_groups = GroupLoader::fetchAll(GROUP_DEFAULT, \"is_default\");\n $data['groups'] = [];\n foreach ($default_groups as $group_id => $group){\n $data['groups'][$group_id] = \"1\";\n }\n }\n \n // Hash password\n $data['password'] = Authentication::hashPassword($data['password']);\n \n // Create the user\n $user = new User($data);\n\n // Add user to groups, including selected primary group\n $user->addGroup($data['primary_group_id']);\n foreach ($data['groups'] as $group_id => $is_member) {\n if ($is_member == \"1\"){ \n $user->addGroup($group_id); \n }\n }\n \n // Store new user to database\n $user->store(); \n \n // Success message\n $ms->addMessageTranslated(\"success\", \"ACCOUNT_CREATION_COMPLETE\", $data);\n }", "public function store()\n\t{\n\t\tif( Input::get('password') !== Input::get('password2') )\n\t\t\t$message = Functions::GetMessage ('ACCOUNT_PASS_MISMATCH');\n\t\telse if( strlen(Input::get('password')) < 6 || strlen(Input::get('password')) > 32 )\n\t\t\t$message = Functions::GetMessage('ACCOUNT_PASS_CHAR_LIMIT', array(6, 32));\n\t\telse\n\t\t{\n\t\t\t$user = Member::create(Input::all());\n\t\t\tif( empty($user) )\n\t\t\t{\n\t\t\t\treturn Redirect::back()\n\t\t\t\t\t\t->withErrors('message', $message)\n\t\t\t\t\t\t->withInput();\n\t\t\t}\t\n\t\t\t\n\t\t\t$user->username = $user->fullname;\n\t\t\t$user->role = 2;\n\t\t\t$user->password = Hash::make(Input::get('password'));\n\t\t\t$user->save();\t\t\t\n\t\t\t\n\t\t\t$message = 'SUCCESS';\n\t\t}\t\t\t\n\t\t\n\t\t$user = new Member();\n\t\t\n\t\t$user->fullname = Input::get('fullname');\n\t\t$user->email = Input::get('email');\n\t\t$user->contact = Input::get('contact');\n\n\t\treturn Redirect::back()\n\t\t\t\t\t\t->withErrors([$message])\n\t\t\t\t\t\t->withInput();\n\t}", "function manageUser(){\n\n if($this->session->has_userdata('userId')){\n\n if(! $this->_isUserAdmin()){\n\n $this->deniedAccess();\n }else{\n\n $this->load->view(\"admin/includes/top_base\");\n $this->load->view(\"admin/includes/adminNav\");\n $this->load->view(\"admin/manageUser\");\n $this->load->view(\"admin/includes/bottom_base\");\n }\n }\n else{\n\n //redirect to home page\n redirect(site_url());\n }\n }", "public function account() {\n if ($this->ion_auth->logged_in()) {\n // Refresh the session\n $this->ion_auth->login_remembered_user();\n $this->body_class[] = 'my_account';\n\n $this->page_title = 'My Account';\n\n $this->current_section = 'my_account';\n\n $user = $this->ion_auth->user()->row_array();\n// var_dump($user);\n\n $this->render_page('user/account', array('user' => $user));\n } else {\n redirect('login');\n }\n \n \n }", "function deleteUserAccount(){\n\t\t\t$id = $_POST[\"id\"];\n\t\t\t$this->db->set('status', 'Deactivated');\n\t\t\t$this->db->where('userID', $id);\n\t\t\t$query = $this->db->update('users');\n\t\t\t\n\t\t\tif($query){\n\t\t\t\techo \"done\";\n\t\t\t}\n\t\t\t\n\t\t}", "public function confirmationAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n \t$userId = $this->getRequest()->getParam('userId');\n $activationKey = $this->getRequest()->getParam(self::ACTIVATION_KEY_PARAMNAME);\n\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if(!$user){\n // No such user\n Globals::getLogger()->registrationError(\"Account activation: user retrieval failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $user->clearCache();\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if($user->{User::COLUMN_STATUS} == User::STATUS_PENDING){\n $user->{User::COLUMN_STATUS} = User::STATUS_MEMBER;\n $user->date = date('Y-m-d H:i:s');\n $id = $user->save();\n if($id !== $userId){\n Globals::getLogger()->registrationError(\"Account activation: user save failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $this->view->success = true;\n $this->view->alreadyDone = false;\n \t$this->_savePendingUserIdentity($userId);\n } else {\n $this->view->success = false;\n $this->view->alreadyDone = true;\n }\n }", "function insertAdminUser() {\n // Insert Admin info;\n $userController = new UserController;\n $this->db->exec(\n \"INSERT INTO users (username, password) VALUES (?, ?)\",\n [\n 1 => $this->formValues['adminUsername'],\n 2 => $userController->cryptPassword($this->formValues['adminPassword_1']),\n ]\n );\n }", "function admin_add() {\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t$this->User->create();\n\n\t\t\t/**\n\t\t\t * Save new user.\n\t\t\t */\n\t\t\tif ($this->User->save($this->data)) {\n\n\t\t\t\t/**\n\t\t\t\t * If the new user is saved, a success message is displayed.\n\t\t\t\t * Redirect to the index page.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has been saved.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the user is not saved, an error message is displayed.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has not been saved.', true), 'default', array('class' => 'error'));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Select all profiles (Administrator or Member).\n\t\t * @var array\n\t\t */\n\t\t$profiles = $this->User->Profile->find('list');\n\n\t\t/**\n\t\t * Select all offers enabled.\n\t\t * @var array\n\t\t */\n\t\t$offers = $this->User->Offer->find('list');\n\n\t\t/**\n\t\t * Put all profiles in \"profiles\" and offers in \"offers\".\n\t\t * $profiles and $offers will be available in the view.\n\t\t */\n\t\t$this->set(compact('profiles', 'offers'));\n\n\t}", "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}", "public function executeCreateAdmin() {\n do {\n if (!empty($email_input)) {\n echo \"That is not a valid email.\\n\";\n }\n $email_input = $this->readline('Email: ');\n } while (!$email = Scrub::email($email_input));\n\n do {\n $password = $this->readline('Password: ');\n } while (strlen($password) < 6);\n\n $res = UserModel::create($email, $password);\n if ($res['success']) {\n $user = ClientUser::getInstance(); \n $user->setType(UserModel::TYPE_ADMIN);\n } else {\n echo \"Failed to create user.\\n\";\n }\n }", "public function index(){\n\t\t\tif ($this->user->isUserLogged())\n\t\t\t\treturn $this->redirect('/account');\n\t\t\t\n\t\t\tif ($this->isPost) {\n\t\t\t\t$data = $this->getRequestData();\n\t\t\t\t\n\t\t\t\t$user_data = $this->user->getByField('username', $data['user']['username']);\n\t\t\t\t\n\t\t\t\tif (empty($user_data)) {\n\t\t\t\t\tNotifications::set('empty_user_data', 'User not found', Notifications::MESSAGE_ERROR);\n\t\t\t\t\treturn $this->reload();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->user->pushData($user_data);\n\t\t\t\t\n\t\t\t\tif (!$this->user->checkPassword($data['user']['password'])) {\n\t\t\t\t\tNotifications::set('wrong_user_password', 'Wrong user password', Notifications::MESSAGE_ERROR);\n\t\t\t\t\treturn $this->reload();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->user->storeSessionLoginData();\n\t\t\t\t\n\t\t\t\treturn $this->redirect('/account');\n\t\t\t}\n\t\t\t\n\t\t\t$formFields = FormUser::build(['username', 'password']);\n\t\t\t$this->assign('form_fields', $formFields);\n\t\t}", "public function administration()\n {\n\t\t// user connecter\n\t\tif (!$this->isUserConnected()) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\t\t// user admin\n\t\tif ($this->getUserInfo('droit') != 'ARW' && $this->getUserInfo('droit') != 'MASTER') {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\n $this->loadModel('user');\n\n $result = $this->getModel()->getAllUsersInfos();\n\n\t\t$arrobj = new ArrayObject($result);\n for($i = $arrobj->getIterator(); $i->valid(); $i->next())\n {\n \t$usersInfos[] = array(\n \t\t'subject' => $i->current()->subject->getUri(),\n \t\t'pseudo' => $i->current()->pseudo->getValue(),\n \t\t'givenName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'givenName'),\n \t\t'familyName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'familyName'),\n \t\t'droit' => $i->current()->droit->getValue()\n \t\t);\n }\n\n \t$this->set('userPseudo', $this->getUserInfo('pseudo'));\n\n \t$this->set('usersInfos', $usersInfos);\n\n // On set la variable a afficher sur dans la vue\n $this->set('title', 'Administration des utilisateurs');\n // On fait le rendu de la vue signup.php\n $this->render('adminUser');\n }", "function createAccount() {\n echo \"create account<br>\";\n global $username, $email, $password, $accountType,\n $payment, $ccbNumber, $ccNumber, $ccExpiration,\n $baNumber, $transitNumber;\n $accountType = $_POST[\"accountType\"];\n $firstName = $_POST[\"firstName\"];\n $lastName = $_POST[\"lastName\"];\n $number = $_POST[\"number\"];\n $flag = false;\n $conn = connectDB();\n $sql = \"insert into user (UserName, FirstName, LastName, Email, ContactNumber, Password) \n VALUES ('$username', '$firstName', '$lastName', '$email', '$number', '$password')\";\n if (mysqli_query($conn, $sql)) {\n $flag = true;\n } else {\n echo \"database operation: insert into user table failed<br>\";\n }\n\n if ($flag) {\n if (insertEmployerOrApplicant($accountType, $username)) {\n if (insertPaymentInfo($accountType, $payment, $username)) echo \"operation success\";\n else echo \"database operation: insert into payment information failed\";\n } else {\n echo \"database operation: insert into employer or applicant table failed<br>\";\n }\n }\n}", "public function actionAccount()\n {\n /** @var AccountForm $model */\n $model = Yii::createObject(AccountForm::className());\n\n $this->performAjaxValidation($model);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success', '您的用户信息修改成功');\n return $this->refresh();\n }\n\n return $this->render('account', [\n 'model' => $model,\n ]);\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 admin_add()\n {\n if ($this->request->is('post')) {\n $this->User->create();\n\n $this->request->data['Impi']['auth_scheme'] = 127;\n\n if ($this->User->saveAll($this->request->data)) {\n $this->Session->setFlash(__('The user has been saved'));\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n }\n }\n $utilityFunctions = $this->User->UtilityFunction->find('list');\n\n $this->set(compact('utilityFunctions', 'utilityFunctionsParameters'));\n }", "private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }", "public function add_user_get(){\r\n if (!$this->pronet_model->add_user('Fname Lname', '7711223344553', '[email protected]', '31111225', '1990-01-01','134091830-2')) {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n } else {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => TRUE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_OK);\r\n }\r\n }", "public function newUser($request)\r\n {\r\n /*\r\n * As before we set $params1 'Username'. We need this to check if user exist in database beacuse we don't allow\r\n * two user in database with the same username.\r\n */\r\n $params1 = [\r\n 'Username' => $request['username']\r\n ];\r\n if ($this->existUser($params1) == True) {\r\n /*\r\n * If in the database exits user with the same username then you return false (user must change username)\r\n */\r\n\r\n return False;\r\n } else {\r\n\r\n /*\r\n * Next step is creating a valid activation hash code. We need this for security (in URL you dont want to show UserID\r\n * beacuse in this case attacker has more information about your database)\r\n * Each of users in database has unique activation hash code. Activation hash code we need for activation account and\r\n * reseting password.\r\n *\r\n * Now,follow algorithm for creating unique activation hash code.\r\n */\r\n while (True) {\r\n $params2 = [\r\n 'Activation' => password_hash(rand(), PASSWORD_DEFAULT)\r\n ];\r\n\r\n if ($this->existUser($params2) != True) {\r\n break;\r\n }\r\n }\r\n\r\n /*\r\n * Next step is set params which need to create new user into database.\r\n */\r\n\r\n $params3 = [\r\n 'Username' => $request['username'],\r\n 'Email' => $request['email'],\r\n 'Password' => password_hash($request['password'], PASSWORD_DEFAULT),\r\n 'IsDeleted' => '0',\r\n 'Registration' => (new DateTime('now'))->format('Y-m-d h:s'),\r\n 'Activation' => $params2['Activation']\r\n ];\r\n\r\n $userID = $this->create();\r\n\r\n /*\r\n * Creating link which is send to user mail at registration for activating his account.\r\n */\r\n $link = \"http://www.mdtohtml.com/index.php?activation=\" . $params3['Activation'];\r\n\r\n /*\r\n * Inserting new user in database\r\n */\r\n $this->update($userID, $params3);\r\n\r\n /*\r\n * Now we have to prepare data to send activation mail to user (mail).\r\n */\r\n\r\n $data = [\r\n 'email' => $request['email'],\r\n 'title' => 'Registration support',\r\n 'body' => \"Hello!\\n\\nClick on below link to confirm your registration.\\n\\n$link\",\r\n 'subject' => 'Confirm password',\r\n 'user' => $request['username'],\r\n 'link' => $link,\r\n 'username' => '[email protected]',\r\n 'password' => 'preskok123'\r\n\r\n ];\r\n\r\n /*\r\n * At the end sending activating mail to user.\r\n */\r\n\r\n $this->send_mail($data);\r\n return True;\r\n }\r\n\r\n }", "function editUserAccount($update_user_name, $update_pwd, $update_uid, $current_user_name, $current_pwd, $current_uid) {\r\n\t\t\t$editQuery \t\t= \"update user_account set user_name=?, password=?, user_id=? where user_name=? and password=? and user_id=?\";\r\n\t\t\t\r\n\t\t\t$query\t\t\t= $this->pdo->prepare($editQuery);\r\n\t\t\t$editDetails\t= array($update_user_name, $update_pwd, $update_uid, $current_user_name, $current_pwd, $current_uid);\r\n\t\t\t\r\n\t\t\t$query->execute($editDetails);\r\n\t\t\t\r\n\t\t\t$rowUserEdited\t= $query->rowCount();\r\n\t\t\treturn $rowUserEdited;\r\n\t\t}", "function account_edit()\n {\n }", "private function addUser()\n {\n $this->online->addUser($this->user, $this->place, $this->loginTime);\n }", "public function Create_Account($p_CompanyName, $p_UserName, $p_Password, $p_Email){\n $acc_info=new Account_Info();\n $acc_info->AccountId = $this->GetGUID();//GUID Creation\n $acc_info->CompanyName = $p_CompanyName;\n $acc_info->Status = AccountStatus::Trail;//Enum Data Type Creation\n print_r($acc_info->Status);\n $acc_info->AccountType = AccountType::Starter;//Enum Data Type Creation\n $acc_info->ExpiryDate = date('Y-m-d', strtotime('+15 days'));\n \t $acc_info->CreatedDate = date('Y-m-d');\n \t $acc_info->Email = $p_Email;\n $acc_info->Insert();\n \t $usr_info = new User_Info();\n $usr_info->UserId = $this->GetGUID();\n \t $usr_info->AccountId =\"$acc_info->AccountId\";\n $usr_info->Email = $p_Email;\n \t $usr_info->UserName =$p_UserName;\n \t $usr_info->Password = $p_Password; \n \t $usr_info->Role = UserRole::Admin;//Enum Data Type Creation\n $usr_info->Insert();\n }", "function admin_add_user()\n{\n global $app;\n\n $user_data = $app->request()->post();\n $app->getLog()->debug('admin_add_user: ' . var_export($user_data, true));\n try {\n $user = $app->bbs->addUser($user_data['username'], $user_data['password']);\n } catch (Exception $e) {\n $app->getLog()->error('admin_add_user: error for adding user ' . var_export($user_data, true));\n $app->getLog()->error('admin_add_user: exception ' . $e->getMessage());\n $user = null;\n }\n $resp = $app->response();\n if (isset($user) && !is_null($user)) {\n $resp->status(200);\n $msg = getMessageString('admin_modified');\n $answer = json_encode(['user' => $user->getProperties(), 'msg' => $msg]);\n $resp->header('Content-type', 'application/json');\n } else {\n $resp->status(500);\n $resp->header('Content-type', 'text/plain');\n $answer = getMessageString('admin_modify_error');\n }\n $resp->header('Content-Length', strlen($answer));\n $resp->body($answer);\n}", "public function admin_add() {\n if ($this->isAuthorized()) {\n if ($this->request->is('post')) {\n $this->User->create();\n if ($this->User->save($this->request->data)) {\n $this->Session->setFlash(__('The user has been created'));\n return $this->redirect(array(\n 'action' => 'index',\n ));\n } else {\n $this->Session->setFlash(__('The user could not be created. Please, try again.'));\n }\n }\n } else {\n $this->Session->setFlash(__('You do not have permission to do this'));\n return $this->redirect(array(\n 'action' => 'admin_dashboard',\n ));\n }\n }", "public function signUp(): void\n {\n $request_method = filter_input(INPUT_SERVER, \"REQUEST_METHOD\");\n if ('GET' === $request_method) {\n $profile = (new ProfileDao())->getInfo();\n // Guard against registration if already an admin\n if (!empty($profile)) {\n header(\"Location: /admin/signin\");\n }\n // If no admin exists allows the form\n else {\n require implode(DIRECTORY_SEPARATOR, [TEMPLATES, 'admin', 'signup.html.php']);\n }\n //POST a admin\n } elseif ('POST' === $request_method) {\n\n $args = [\n \"email\" => [],\n \"passwordOne\" => [],\n \"passwordTwo\" => [],\n ];\n\n $admin = filter_input_array(INPUT_POST, $args);\n\n if (empty($admin['email']) || empty($admin['passwordOne']) || empty($admin['passwordTwo'])) {\n $error_messages = \"Merci de completer tous les champs !\";\n } elseif ($_POST['passwordOne'] !== $_POST['passwordTwo']) {\n $error_messages = \"Merci de mettre les memes mots de passe !\";\n } else {\n $passwordHash = password_hash($_POST['passwordOne'], PASSWORD_DEFAULT);\n $error_messages = \"\";\n $admin = (new Profile())->setFirstName(\"John\")\n ->setLastName(\"Doe\")\n ->setGender(1)\n ->setAdress(null)\n ->setCp(69000)\n ->SetCity(\"Lyon\")\n ->setEmail($admin['email'])\n ->setPhone(null)\n ->setLinkedinUrl(null)\n ->setGithubUrl(null)\n ->setTwitterUrl(null)\n ->setPassword($passwordHash)\n ->setDriveLicence(null)\n ->setCatchphrase(null)\n ->setBirthdate(null);\n }\n if (empty($error_messages)) {\n try {\n (new PortfolioDao())->signUp($admin);\n header(\"Location: /admin/signin\");\n exit;\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n } else {\n //ERROR 404\n }\n }\n }", "public function actionAdmin()\n {\n if (User::findOne(['email' => '[email protected]'])) {\n echo \"Руководитель уже существует\\n\";\n\n return ExitCode::USAGE;\n }\n\n $user = new User();\n $user->email = '[email protected]';\n $user->full_name = 'Тестовый Руководитель';\n $user->is_admin = 1;\n $user->password = Yii::$app->security->generatePasswordHash('test');\n $user->save();\n echo \"Руководитель создан\\n\";\n\n return ExitCode::OK;\n }", "public function delete_user_account() {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,0);\n \n // Delete the user's data saved by apps\n $this->load->file(APPPATH . '/apps/main.php');\n\n // List all apps\n foreach (glob(APPPATH . 'apps/collection/*', GLOB_ONLYDIR) as $dir) {\n\n $app_dir = trim(basename($dir) . PHP_EOL);\n\n // Create an array\n $array = array(\n 'MidrubApps',\n 'Collection',\n ucfirst($app_dir),\n 'Main'\n );\n\n // Implode the array above\n $cl = implode('\\\\', $array);\n\n // Delete user's data\n (new $cl())->delete_account($this->user_id);\n\n }\n \n // Delete connected social accounts\n $this->networks->delete_network('all', $this->user_id);\n \n // Delete campaigns\n $this->campaigns->delete_campaigns($this->user_id);\n \n // Delete templates\n $this->campaigns->delete_templates($this->user_id);\n \n // Delete lists\n $this->campaigns->delete_lists($this->user_id);\n \n // Delete schedules\n $this->campaigns->delete_schedules($this->user_id);\n \n // Load Fourth Helper\n $this->load->helper('fourth_helper');\n \n // Load Tickets Model\n $this->load->model('tickets');\n \n // Delete tickets\n $this->tickets->delete_tickets($this->user_id);\n \n // Load Botis Model\n $this->load->model('botis');\n \n // Delete all user's bots\n $this->botis->delete_user_bots($this->user_id);\n \n // Load Activity Model\n $this->load->model('activity');\n \n // Delete all user's activity\n $this->activity->delete_user_activity($this->user_id);\n \n // Load Media Model\n $this->load->model('media');\n \n // Get all user medias\n $getmedias = $this->media->get_user_medias($this->user_id, 0, 1000000);\n \n // Verify if user has media and delete them\n if ( $getmedias ) {\n \n // Load Media Helper\n $this->load->helper('media_helper');\n \n foreach( $getmedias as $media ) {\n delete_media($media->media_id, false);\n }\n \n }\n \n // Load Team Model\n $this->load->model('team');\n \n // Delete the user's team\n $this->team->delete_members( $this->user_id );\n \n // Load Activities Model\n $this->load->model('activities');\n \n // Delete the user's activities\n $this->activities->delete_activity( $this->user_id, 0 ); \n \n // Delete user account\n if ( $this->user->delete_user($this->user_id) ) {\n \n // Deletes user's session\n $this->session->unset_userdata('username');\n $this->session->unset_userdata('member');\n $this->session->unset_userdata('autodelete');\n \n echo json_encode(array(\n 'success' => TRUE,\n 'message' => $this->lang->line('mm64')\n )); \n \n } else {\n \n echo json_encode(array(\n 'success' => FALSE,\n 'message' => $this->lang->line('mm65')\n )); \n \n }\n \n }", "public function p_signup() {\n $duplicate = DB::instance(DB_NAME)->select_field(\"SELECT email FROM users WHERE email = '\" . $_POST['email'] . \"'\");\n \n //If email already exists \n if($duplicate){ \n //Redirect to error page \n Router::redirect('/users/login/?duplicate=true');\n }\n\n // Encrypt the password \n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \n\n // Create an encrypted token via their email address and a random string\n $_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \n\n // Insert this user into the database\n $user_id = DB::instance(DB_NAME)->insert('users', $_POST);\n\n\n\n //Image Upload\n Upload::upload($_FILES, \"/uploads/avatars/\", array(\"JPG\", \"JPEG\", \"jpg\", \"jpeg\", \"gif\", \"GIF\", \"png\", \"PNG\"), $user_id);\n \n $filename = $_FILES['avatar']['name']; // original filename (i.e. picture.jpg)\n $extension = substr($filename, strrpos($filename, '.')); // filename format extension (i.e. .jpg)\n $avatar = $user_id.$extension; // user id + .jpg or .png or .gif (i.e. 26.png)\n\n // Add Image to DB in \"avatar\" column\n $data = Array(\"avatar\" => $avatar);\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE id = '\".$user_id.\"'\"); \n\n // Send them back to the login page with a success message\n Router::redirect(\"/users/login/?success=true\"); \n\n \n }", "public function changeUser($parameters):void\n {\n \n if(isset($parameters['idUser']))$this->idUser = $parameters[\"idUser\"];\n if(isset($parameters['nameUser']))(string) $this->nameUser = $parameters['nameUser'];\n if(isset($parameters['emailUser']))(string) $this->emailUser = $parameters['emailUser'];\n if(isset($parameters['passwordUser']))$this->passwordUser = $parameters[\"passwordUser\"];\n if(isset($parameters['genderUser']))(string) $this->genderUser = $parameters['genderUser'];\n if(isset($parameters['birthDateUser']))$this->birthDateUser = new \\DateTime($parameters['birthDateUser']);\n if(isset($parameters['birthDateUser']))$this->birthDateUser = $this->birthDateUser->format('YYYY-MM-DD');\n if(isset($parameters['dateCreationUser']))(string) $this->dateCreationUser = $parameters['dateCreationUser'];\n if(isset($parameters['permissionUser']))$this->permissionUser = $parameters['permissionUser'];\n \n }", "function updateUser($userID, $role)\n{\n}", "public function procEditAccount() {//IF time permits, re-implement using new User classes\r\n global $session;\r\n\r\n $edUserInfo = array(\"uid\"=>$_POST['uid'], \"username\"=>$_POST['username']);\r\n\r\n /* Account edit attempt */\r\n /* New Password error checking */\r\n if(isset($_POST['newpass']) && !empty($_POST['newpass'])) {\r\n if($_POST['newpass'] == $_POST['newpassconf']) {\r\n $edUserInfo['newpass'] = $session->hashPassword($_POST['newpass']);\r\n } else {\r\n $session->form->setError(\"newpassconf\", \"* Must match new password entered above\");\r\n }\r\n }\r\n\r\n /* Email error checking */\r\n if(isset($_POST['edemail']) && !empty($_POST['edemail'])) {\r\n $edUserInfo['edemail'] = stripslashes(trim($_POST['edemail']));\r\n } else {\r\n $session->form->setError(\"edemail\", \"* An email is required\");\r\n }\r\n\r\n $edUserInfo['edfname'] = $_POST['edfname'];\r\n $edUserInfo['edlname'] = $_POST['edlname'];\r\n\r\n if(isset($_POST['edbirthmonth']) && !empty($_POST['edbirthmonth']) &&\r\n isset($_POST['edbirthday']) && !empty($_POST['edbirthday']) &&\r\n isset($_POST['edbirthyear']) && !empty($_POST['edbirthyear'])) {\r\n /* Convert birthdate into timestamp */\r\n date_default_timezone_set('America/New_York');\r\n $edbirth = mktime(0, 0, 0, $_POST['edbirthmonth'], $_POST['edbirthday'],\r\n $_POST['edbirthyear']);\r\n $edUserInfo['edbirthdate'] = $edbirth;\r\n } else {\r\n $session->form->setError(\"edbirth\", \"* Must specifiy birthdate\");\r\n }\r\n\r\n $edUserInfo['edgender'] = $_POST['edgender'];\r\n $edUserInfo['edaddrline1'] = $_POST['edaddrline1'];\r\n $edUserInfo['edaddrline2'] = $_POST['edaddrline2'];\r\n $edUserInfo['edcity'] = $_POST['edcity'];\r\n $edUserInfo['edstate'] = $_POST['edstate'];\r\n $edUserInfo['edzip'] = $_POST['edzip'];\r\n $edUserInfo['edphone'] = $_POST['edphone'];\r\n $edUserInfo['edutype'] = $_POST['edutype'];\r\n\r\n /* Usertype error checking */\r\n $field = \"edutype\"; //Use field name for usertype\r\n if(($edUserInfo['uid'] == $session->uid) &&\r\n ($edUserInfo['edutype'] != ADMIN) && $session->database->getNumAdmins < 2) {\r\n $session->form->setError($field, \"* You are the only Administrator in the system<br />\");\r\n }\r\n\r\n if($session->form->num_errors == 0) { /* No errors exist */\r\n if($session->database->confirmUID($edUserInfo['uid'], DB_TBL_ADMINS)) {\r\n $user = new Administrator($edUserInfo);\r\n $retval = $user->update($edUserInfo);\r\n if(($retval == 0) && ($edUserInfo['edutype'] != ADMIN)) {\r\n if(!$user->updateUserType($edUserInfo['edutype'])) {\r\n $session->form->setError(\"edutype\", \"* Usertype has remained the same\");\r\n $retval = 1;\r\n }\r\n }\r\n } else if($session->database->confirmUID($edUserInfo['uid'], DB_TBL_TELLERS)) {\r\n $user = new Teller($edUserInfo);\r\n $retval = $user->update($edUserInfo);\r\n if(($retval == 0) && ($edUserInfo['edutype'] != TELLER)) {\r\n if(!$user->updateUserType($edUserInfo['edutype'])) {\r\n $session->form->setError(\"edutype\", \"* Usertype has remained the same\");\r\n $retval = 1;\r\n }\r\n }\r\n } else if($session->database->confirmUID($edUserInfo['uid'], DB_TBL_CUSTOMERS)) {\r\n $user = new Customer($edUserInfo);\r\n $retval = $user->update($edUserInfo);\r\n if(($retval == 0) && ($edUserInfo['edutype'] != CUSTOMER)) {\r\n if(!$user->updateUserType($edUserInfo['edutype'])) {\r\n $session->form->setError(\"edutype\", \"* Usertype has remained the same\");\r\n \t$retval = 1;\r\n }\r\n }\r\n } else {\r\n $session->form->setError(\"edutype\", \"* Invalid Usertype\");\r\n $retval = 1;\r\n }\r\n } else {\r\n \t$retval = 1;\r\n }\r\n\r\n /* Account edit successful */\r\n if(isset($retval) && ($retval == 0)) {\r\n $_SESSION['edituser'] = true;\r\n } else { /* Error found with form */\r\n $_SESSION['value_array'] = $_POST;\r\n $_SESSION['error_array'] = $session->form->getErrorArray();\r\n }\n header(\"Location: \".$session->referrer.\"?uid=\".$_POST['uid']);\r\n }", "function adminadduser()\n {\n //Check Login\n if ($this->cek_login() != true) {\n return redirect()->to(base_url('login'));\n }\n //Check Role\n if ($this->cek_role() != true) {\n return redirect()->to(base_url('login'));\n }\n $email = $this->request->getPost('email_add');\n $email = esc($email);\n $password = $this->request->getPost('password_add');\n $password = esc($password);\n $name = $this->request->getPost('name_add');\n $name = esc($name);\n $birthdate = $this->request->getPost('birthdate_add');\n $role = $this->request->getPost('role_add');\n $link_foto = '';\n\n $addresult = $this->user_model->addUser($email, $password, $name, $birthdate, $role, $link_foto);\n if ($addresult) {\n session()->setFlashdata('sekolah.project_uas.success', 'User created successfully');\n return redirect()->to(base_url('adminuser'));\n } else {\n //kalo gagal ngapain\n session()->setFlashdata('sekolah.project_uas.fail', 'User cannot created');\n return redirect()->to(base_url('adminuser'));\n }\n }", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "public function AddNewUser()\r\n {\r\n $aUser = array(\r\n 'sFunction' => 'AddNewUser',\r\n 'result' => 'false'\r\n );\r\n \r\n if(isset($_GET['Email']))\r\n {\r\n $mail = $_GET['Email'];\r\n \r\n //Check if user is allready created with that username\r\n $sQuery = $this->conPDO->prepare(\"SELECT sUsername FROM users WHERE sUsername = :email LIMIT 1\");\r\n $sQuery->bindValue(\":email\", $mail);\r\n $sQuery->execute();\r\n \r\n if($sQuery->rowCount() == 0)\r\n {\r\n \r\n //Create the user token\r\n $number = uniqid();\r\n $sUserToken = $this->oBcrypt->genHash($number);\r\n\r\n //Opret en bruger med email som brugernavn, med med en token som skal sendes med email, og det er den token som identifisere hvem brugeren er \r\n //Insert the user into the database, prepare statement runs the security\r\n $sQuery = $this->conPDO->prepare(\"INSERT INTO users (sUsername,iUserRole,sUserCreateToken) VALUES (:sUsername, :iUserRole, :sUserToken)\");\r\n\r\n $sQuery->bindValue(':sUsername', $mail);\r\n $sQuery->bindValue(':iUserRole', '1');\r\n $sQuery->bindValue(':sUserToken', $sUserToken);\r\n\r\n\r\n try\r\n {\r\n $sQuery->execute();\r\n $iUserId = $this->conPDO->lastInsertId();\r\n //Get last inserted id and generate a hash of that to save in the database (the hash is generate with a random string and the iUserId)\r\n //The generated hash is the id to be passed with ajax\r\n $iUserIdHashed = $this->oBcrypt->genHash($iUserId);\r\n\r\n //Update the user\r\n $sQuery = $this->conPDO->prepare(\"UPDATE users SET iUserIdHashed = ? WHERE iUserId = ?\");\r\n\r\n $sQuery->bindValue(1, $iUserIdHashed);\r\n $sQuery->bindValue(2, $iUserId);\r\n\r\n $sQuery->execute(); \r\n }\r\n catch(PDOException $e)\r\n {\r\n die($e->getMessage());\r\n }\r\n\r\n $sMessage = \"Ny bruger til My Local Café, Tryk på dette <a href='http://mylocalcafe.dk/register?sUserToken=$sUserToken'>link</a> for at oprette din profil\";\r\n $sTo = $mail;\r\n $sFrom = '[email protected]';\r\n $sSubject = 'Ny konto hos MyLocal';\r\n\r\n $this->oEmail->SendEmail($sTo, $sFrom, $sSubject, $sMessage);\r\n\r\n $aUser['result'] = 'true';\r\n }\r\n \r\n return $aUser;\r\n }\r\n }", "function createUser(){\n\t\t\tglobal $db;\n\t\t\tglobal $json;\n\t\t\t\n\t\t\t//Check if username meets minimum requirements\n\t\t\tif($this->username == \"\" || $this->username == null || strlen($this->username) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Username\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t//Check if username already exists\n\t\t\t\tif($db->query('SELECT * FROM user WHERE Username = \"'.$this->username.'\"')->rowCount() > 0){\n\t\t\t\t\t$json->exists(\"Username\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if password meets minimum requirements\n\t\t\tif($this->password == \"\" || $this->password == null || strlen($this->password) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Password\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$passHash = generatePassword($this->password);\n\t\t\t\t$this->password = $passHash;\n\t\t\t\t$apiHash = generateApiKey($this->username.\"\".date('Y-m-d'));\n\t\t\t}\n\t\t\t\n\t\t\t//Check if admin is empty or invalid, if so make user non-admin\n\t\t\tif($this->admin == \"\" || $this->admin == null || $this->admin < 0)\n\t\t\t\t$this->admin = 0;\n\t\t\t\n\t\t\tif($this->subject == \"\" || $this->subject == null || $this->subject < 0)\n\t\t\t\t$this->subject = 0;\n\t\t\t\t\n\t\t\t$insert = $db->prepare('INSERT INTO user VALUES (DEFAULT, :username, :password, :subject, :admin, :api)');\n\t\t\t$insert->bindParam(':username', $this->username);\n\t\t\t$insert->bindParam(':password', $this->password);\n\t\t\t$insert->bindParam(':subject', $this->subject);\n\t\t\t$insert->bindParam(':admin', $this->admin);\n\t\t\t$insert->bindParam(':api', $apiHash);\n\t\t\t\n\t\t\tif($insert->execute()){\n\t\t\t\t$json->created(\"User\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$json->server();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "function addUser(){\n\t$conn = db_connect();\n\n\tif(isset($_GET['id']) && (int)$_GET['id'] > 0){#proper data must be on querystring\n\t\t$myID = (int)$_GET['id']; #Convert to integer, will equate to zero if fails\n\t}\n \n\tif(isset($_POST['firstname'])){$firstName=$_POST['firstname'];}else{$firstName = '';}\n if(isset($_POST['lastName'])){$lastName=$_POST['lastName'];}else{$lastName = '';}\n if(isset($_POST['userPhone'])){$userPhone=$_POST['userPhone'];}else{$firstName = '';}\n if(isset($_POST['userEmail'])){$userEmail=$_POST['userEmail'];}else{$lastName = '';}\n if(isset($_POST['type'])){$type=$_POST['type'];}else{$type = '';}\n \n if(strlen($firstName) >=3)#check if users last name is smaller than 3 characters\n { \n $userName = substr($firstName,0,3) . substr($lastName,0,2);\n }else{#if first name is shorter use as is for username\n $userName = $firstName . substr($lastName,0,2);\n }\n $userName = strtolower($userName); #format users name to site standards\n $userPW = $userName; #default pw is userName\n \n\t$sql = \"INSERT INTO users(FirstName,LastName,PhoneNumber,EmailAddress,TypeId,UserName,UserPassword) VALUES('%s','%s','%s','%s',%d,'%s','%s')\";\n\t$sql = sprintf($sql,$firstName,$lastName,$userPhone,$userEmail,$type,$userName,$userPW);\n\t$result = mysqli_query($conn,$sql); \n\n\tif ($result)\n\t{#successful update!\n\t\t$newURL = 'list.php';\n\t}else{\n\t\t$newURL = 'add.php';\n\t}\n\theader('Location: '.$newURL);\n\tdie();\n}", "public function updateUserLinked\t(){\n\t\t\n\t\t}", "public function addendUser($params) {\n \t\n\n \t$currdate = date(\"Y-m-d\", strtotime( \"today\" ));\n \t\t\n \t$this->email = BackEnd_Helper_viewHelper::stripSlashesFromString(@$params['email']);\n \tif(isset($params['facebookId']) && @$params['facebookId'] != NULL){\n \t\t$this->facebookId = BackEnd_Helper_viewHelper::stripSlashesFromString($params['facebookId']);\n \t}\n \tif(!isset($params['facebookId']) && @$params['facebookId'] == NULL){\n \t$this->password = BackEnd_Helper_viewHelper::stripSlashesFromString(@$params['password']);\n \t}\n \t$this->ZipCode = BackEnd_Helper_viewHelper::stripSlashesFromString(@$params['ZipCode']);\n \t$this->dob = BackEnd_Helper_viewHelper::stripSlashesFromString(@$params['birthDate']);\n\t$this->Gender = BackEnd_Helper_viewHelper::stripSlashesFromString(@$params['gender']);\n\t$this->DeviceToken = BackEnd_Helper_viewHelper::stripSlashesFromString(@$params['Token']);\n\t$this->roleId = 2; // This type for end user\n if(!isset($params['facebookId']) && @$params['facebookId'] == NULL){\n \t\n\t$this->usertype = \"S\";\n\t \t}else{\n\t\n\t$this->usertype = \"F\";\n\t \t}\n\t$this->isLogin = \"1\";\n\t\n\t$this->downloadDate = $currdate;\n\t\n\t \t// call doctrine save function\n\t \t$this->save();\n\t \t$result = $this->id;\n\t \treturn $result;\n }", "public function put()\n {\n $request = new EditRequest();\n\n $account = new User();\n\n $account->update($_SESSION['user'], [\n 'first_name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'password' => $request->password,\n 'email' => $request->email,\n ]);\n\n Redirect::route('account');\n }", "public function user()\n {\n if ($this->form_validation->run() === FALSE)\n {\n $users = $this->admin_model->get_admin();\n $data['users'] = $users;\n $data['title'] = 'Utilisateur'; \n $this->load->view('layouts/header');\n $this->load->view('admin/user', $data);\n $this->load->view('layouts/footer');\n }\n else\n {\n if ($this->admin_model->update_users());\n {\n redirect('admin/accueil');\n }\n }\n }", "function updateUser(){\n\t\t\tif($this->rest->getRequestMethod() != \"PUT\"){\n\t\t\t\t$this->rest->response('',406);\n\t\t\t\texit;\n\t\t\t}\n\t\t\t//Validate the user\n\t\t\t$validUser = $this->validateUser(\"admin\", \"basic\");\n\t\t\tif ($validUser) {\n\t\t\t\tif (isset($_POST['user_name']) && isset($_POST['password']) && isset($_POST['_id'])){\n\t\t\t\t\t$user_id = $_POST['_id'];\n\t\t\t\t\t$array['user_name'] = $_POST['user_name'];\n\t\t\t\t\t$array['password'] = $_POST['password'];\n\t\t\t\t\t$result = $this->model->setUser($array, \"_id='\".$user_id.\"'\");\n\t\t\t\t\tif($result) {\n\t\t\t\t\t\t$response_array['status']='success';\n\t\t\t\t\t\t$response_array['message']='One record updated.';\n\t\t\t\t\t\t$update = $this->model->getUser('*',\"_id = \".\"'\".$user_id.\"'\");\n\t\t\t\t\t\t$response_array['data']=$update;\n\t\t\t\t\t\t$this->rest->response($response_array, 200);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response_array['status']='fail';\n\t\t\t\t\t\t$response_array['message']='no record updated';\n\t\t\t\t\t\t$response_array['data']='';\n\t\t\t\t\t\t$this->rest->response($response_array, 304);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->rest->response('No parameters given',204);\t// If no records \"No Content\" status\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->rest->response('Unauthorized Access ',401);\t\n\t\t\t}\n\t\t\t\n\n\t\t}", "public function edit_user()\n {\n //make sure user logged in or pending\n if (Session::has('user') || Session::has('pending_user'))\n {\n //check to make sure phone number in correct format\n $number = Input::get('phone_number');\n\n //took pattern from http://www.w3resource.com/javascript/form/phone-no-validation.php\n $pattern = \"/^\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/\";\n\n //if phone entered correctly\n if (preg_match ($pattern, $number))\n {\n\n // Input doesn't return zero for unchecked boxes, so change these to zero\n $hours_notification = (Input::get('hours_notification') ? 1 : 0);\n $deals_notification = (Input::get('deals_notification') ? 1 : 0);\n\n //strip any punctuation from phone number, if exists\n $phone = str_replace(array(\"-\",\".\",\"(\",\")\",\" \"), \"\", Input::get('phone_number'));\n\n //if user already logged in\n if (Session::has('user'))\n {\n $user_session = Session::get('user');\n $user = User::find($user_session->id);\n $user->preferred_name = Input::get('preferred_name');\n $user->phone_number = $phone;\n $user->hours_notification = $hours_notification;\n $user->deals_notification = $deals_notification;\n $user->save();\n\n //put updated user on to session\n\n Session::put('user', $user);\n\n }\n //else create new user\n else\n {\n //create user based on session data and input\n $pending = Session::get('pending_user');\n\n $user = new User();\n $user->cs50_id = $pending[\"cs50_id\"];\n $user->name = $pending[\"fullname\"];\n $user->preferred_name = Input::get('preferred_name');\n $user->email = $pending[\"email\"];\n $user->phone_number = $phone;\n $user->hours_notification = $hours_notification;\n $user->deals_notification = $deals_notification;\n $user->save();\n\n //remove pending user from session\n Session::forget('pending_user');\n\n //log user in\n Session::put('user', $user);\n Auth::loginUsingId($user->id);\n\n //send user text message about signing up\n\n $grille_name = Grille::where('id', $this->grille_id)->pluck('name');\n $message = \"Thanks for signing up for \" . $grille_name . \"'s online ordering!\n If you received this message by accident, reply 'STOP'\";\n\n Sms::send_sms($phone, $message);\n }\n\n //redirect to most recent page\n $url = Session::get('redirect');\n Session::forget('redirect');\n return Redirect::to($url);\n }\n //else alert user to enter correct phone number\n else\n {\n $failure = 'Please enter a 10-digit phone number';\n\n //if user already has account\n if (Session::has('user'))\n {\n $user = Session::get('user');\n $user->new = 0;\n $user->grille_number = Grille::where('id', $this->grille_id)->pluck('phone_number');\n $this->layout->content = View::make('users.edit', ['user' => $user, 'failure' => $failure]);\n }\n\n //if user is logging in for first time\n else\n {\n $user = Session::get('pending_user');\n $this->layout->content = View::make('users.edit', ['user' => $user, 'failure' => $failure]);\n }\n\n }\n }\n\n //if not user or pending user, redirect\n else\n {\n try {\n return Redirect::back();\n }\n catch (Exception $e) {\n return Redirect::to('/');\n }\n }\n\n }" ]
[ "0.7514075", "0.70708793", "0.70543474", "0.6989934", "0.6916115", "0.67563695", "0.6702663", "0.6675265", "0.66733545", "0.6635744", "0.662976", "0.66025585", "0.65718895", "0.6527581", "0.6526054", "0.65228367", "0.6500487", "0.64702404", "0.6467899", "0.64444", "0.64378524", "0.6422496", "0.6417725", "0.6405263", "0.64036906", "0.6402696", "0.639134", "0.6391136", "0.6390009", "0.63802034", "0.6355098", "0.63498145", "0.631669", "0.6310572", "0.63066286", "0.630369", "0.62967473", "0.62796915", "0.6270082", "0.6261279", "0.6260438", "0.62599474", "0.62564063", "0.62549895", "0.6243347", "0.62374324", "0.62340814", "0.6231191", "0.6219274", "0.6218308", "0.62144524", "0.621216", "0.6206517", "0.6203071", "0.620003", "0.6197599", "0.6183889", "0.617819", "0.61669904", "0.6161483", "0.6158347", "0.6146072", "0.6140615", "0.6137552", "0.6135435", "0.61291057", "0.61276096", "0.6126231", "0.6112393", "0.6110389", "0.6108536", "0.61083204", "0.6101015", "0.6095394", "0.6092618", "0.6085525", "0.6083361", "0.6081091", "0.60598487", "0.60556614", "0.60508883", "0.6047878", "0.60453844", "0.60422", "0.6038137", "0.6036131", "0.60352", "0.6034708", "0.6030814", "0.6030814", "0.6030814", "0.6030814", "0.60297817", "0.6025202", "0.6021007", "0.6020915", "0.60153294", "0.60137355", "0.6013248", "0.60108346", "0.60103494" ]
0.0
-1
Get the tender for the this essence.
public function newTender() { return $this->belongsTo( Tender::class, BelongsToTenderRestartSchema::COLUMN_NEW_TENDER_ID ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tender()\n {\n return $this->hasOne('App\\Tender', 'id', 'tender_id')->first();\n }", "public function getParticipant()\n\t{\n\t\treturn $this->getContext()->getParticipant();\n\t}", "public function getEventTactic()\n {\n return $this->eventTactic;\n }", "public function getTreatment()\n\t{\n\t\treturn $this->getContext()->getTreatment();\n\t}", "public function getEtat()\n {\n return $this->etat;\n }", "public function getLitreEssence()\n\t{\n\t\treturn $this->litreEssence;\n\t}", "public function getPorAtender() {\n return $this->por_atender;\n }", "public function getParticipant()\n {\n return $this->participant;\n }", "public function getParticipant()\n {\n return $this->participant;\n }", "public function getEtablissement()\n {\n return $this->etablissement;\n }", "public function getAttendee()\n {\n return $this->attendee;\n }", "public function getAttendee()\n {\n return $this->attendee;\n }", "public function getRace()\n {\n return $this->race;\n }", "public function getRace()\n {\n return $this->race;\n }", "public function getRecommender()\n {\n return $this->recommender;\n }", "public function getENTETE()\n {\n return $this->ENTETE;\n }", "public function getDefender()\n {\n if ($this->isSkillsAvailable()) {\n return $this->getXml()->getElementsByTagName('DefenderSkill')->item(0)->nodeValue;\n }\n return null;\n }", "public function getName()\n {\n return 'lender';\n }", "public function transporter() {\n if(is_null($this->transporter)){\n $this->transporter = Transporter::getByIdentifier($this->transporter_id);\n }\n return $this->transporter;\n }", "public function getDefender()\n {\n return $this->_turn === 0 ? $this->_army2 : $this->_army1;\n }", "public function getProposerEndowment()\n {\n return $this->getAttribute(self::$PROPOSER_ENDOWMENT_KEY);\n }", "public function getParticipation()\n {\n return $this->participation;\n }", "public function getParticipation()\n {\n return $this->participation;\n }", "public function getEnterer()\n {\n return $this->enterer;\n }", "public function getEmenta()\n {\n return $this->ementa;\n }", "public function getRentalEventType()\n {\n return $this->_fields['RentalEventType']['FieldValue'];\n }", "public function getOfficeT()\n {\n return $this->office_t;\n }", "public function getTweet() {\n return $this->_tweet;\n }", "public function getEnemy() {\n if($this->combatantAID == CD()->id) {\n return $this->combatantB;\n } else {\n return $this->combatantA;\n }\n }", "public function getDescender() {}", "public function seeker()\n {\n return Seeker::where('id', $this->seeker_id)->first();\n }", "public function getTeacher()\n {\n return $this->hasOne(Teacher::className(), ['teacher_id' => 'teacher_id']);\n }", "public function getRenderer(){\n return $this->getParent()->getRenderer();\n }", "public function getTraining()\n {\n return Wrapper\\Player\\Senior::training($this->getId());\n }", "public function getTrainerType()\n {\n if ($this->isTrainer()) {\n return $this->getXml()->getElementsByTagName('TrainerType')->item(0)->nodeValue;\n }\n return null;\n }", "public function teacher()\n {\n return $this->hasOne(Teacher::class);\n }", "public function audience()\n {\n return $this->belongsTo('App\\Attendance', 'teacher_id', 'teacher_id');\n }", "public function getAttorney()\n {\n return $this->get(self::ATTORNEY);\n }", "public function getConductMeeting()\n {\n return $this->conductMeeting;\n }", "public function getTypeAem() {\n return $this->typeAem;\n }", "public function get_etat(){ return $this->_etat;}", "public function getRenderer()\n\t{\n\t\treturn $this->getEngine()->getRenderer($this);\n\t}", "public function getTeaser()\n {\n return $this->teaser;\n }", "public function getEnseigne()\n {\n return $this->_enseigne;\n }", "public function getDispenseTravail() {\n return $this->dispenseTravail;\n }", "public function getSingleUtterance()\n {\n return $this->single_utterance;\n }", "public function getTees() {\n\t\treturn $this->registration ? $this->registration->tees : $this->practice->tees;\n\t}", "private function getThreadId() {\n $event = $this->getEvent();\n return (empty($event['thread_ts'])) ? $event['ts']: $event['thread_ts'];\n }", "public function getSpan()\n {\n return $this->Span;\n }", "public function getExperiment()\n\t{\n\t\treturn $this->getContext()->getExperiment();\n\t}", "public function attorney()\n {\n if ( ! $this->bean->fetchAs('user')->attorney) $this->bean->attorney = R::dispense('user');\n return $this->bean->attorney;\n }", "public function getRutEmisor()\n {\n return $this->rutEmisor;\n }", "protected function getEntity() {\n return $this->getContextValue('entity');\n }", "public function getTSExcellenceId()\n {\n if ($this->_sTSExcellenceId == null) {\n $this->_sTSExcellenceId = false;\n $oConfig = $this->getConfig();\n $aTsType = $oConfig->getConfigParam('tsSealType');\n $sTsActive = $oConfig->getConfigParam('tsSealActive');\n $aTrustedShopIds = $oConfig->getConfigParam('iShopID_TrustedShops');\n $iLangId = (int) oxRegistry::getLang()->getBaseLanguage();\n if ($sTsActive && $aTrustedShopIds && $aTsType[$iLangId] == 'EXCELLENCE') {\n $this->_sTSExcellenceId = $aTrustedShopIds[$iLangId];\n }\n }\n\n return $this->_sTSExcellenceId;\n }", "public function attorney(){\r\n if($this->attorney_id >0)\r\n return Consultant::find($this->attorney_id);\r\n else\r\n return -1;\r\n }", "public function getEditorial()\n {\n return $this->editorial;\n }", "public function getEstudiante( ){\n\t\treturn $this->estudiante;\n\t}", "public function getEier(): Eier\n {\n return $this->eier;\n }", "public function getTypeAttestation() {\n return $this->typeAttestation;\n }", "public function getExperiment() {\n return $this->_parent;\n }", "public function getDOCTOR()\n {\n return $this->DOCTOR;\n }", "public function getEngine(): Engine\r\n {\r\n return $this->template;\r\n }", "public function getTreatmentName() {\n return $this->_treatment_name;\n }", "public function attorneyName()\n {\n return $this->bean->attorney()->name;\n }", "public function getIrt()\n {\n return $this->_irt;\n }", "public function getRoomEntity()\n {\n return $this->roomEntity;\n }", "public function getCourseEnrollment()\n {\n return isset($this->CourseEnrollment) ? $this->CourseEnrollment : null;\n }", "function getEngineType() {\n\t\treturn $this->engineType;\n\t}", "public function getRenderer()\r\n {\r\n return $this->renderer;\r\n }", "public function getTrainerSkill()\n {\n if ($this->isTrainer()) {\n return $this->getXml()->getElementsByTagName('TrainerSkill')->item(0)->nodeValue;\n }\n return null;\n }", "public function application()\n {\n return $this->hasOne(\n TenderApplication::class\n );\n }", "public function getRenderer()\n\t{\n\t\treturn $this->renderer;\n\t}", "public function getEndorserParty()\n {\n return $this->endorserParty;\n }", "public function getRenderer()\n {\n\n return $this->renderer;\n }", "protected function getTrainer()\n {\n return $this->selectOneByParameter();\n }", "public function entity() {\n\t\t\treturn $this->entity;\n\t\t}", "public function activitySubject()\n {\n return $this;\n }", "public function getThreadEntity() {\n\t\treturn get_entity($this->getThreadGUID());\n\t}", "public function getTelevision()\n {\n return $this->television;\n }", "public function getTicketDesignatorExtension()\n {\n return $this->ticketDesignatorExtension;\n }", "public function getMailer()\n {\n return $this->get('mailer');\n }", "public function getEtabLieuTravail() {\n return $this->etabLieuTravail;\n }", "public function tender_type(){\n return $this->belongsTo('App\\model\\tender_type');\n }", "public function getEyes()\n {\n return $this->eyes;\n }", "public function engine() { return $this->Textile; }", "public function getCurrentBeltGrade()\n {\n return $this->currentBeltGrade;\n }", "public function getTransportation()\n {\n return $this->_transportation;\n }", "public function get_leitor()\n {\n return $this->_leitor;\n }", "public function getWithheld() : TweetWithheld\n {\n return $this->withheld;\n }", "public function entity()\r\n {\r\n return $this->entity;\r\n }", "public function getSpeakerPost()\n {\n return $this->get(self::_SPEAKER_POST);\n }", "public function getRoom()\n {\n return $this->room;\n }", "public function getTierItem()\n {\n return $this->getItem()->getTierItem();\n }", "public function getEnemySvrid()\n {\n return $this->get(self::_ENEMY_SVRID);\n }", "public function getErstellt()\n {\n return $this->erstellt;\n }", "public function getMeeting()\n {\n return $this->hasOne(Meeting::className(), ['id' => 'meeting_id']);\n }", "public function getTypeEvenement()\n {\n return $this->typeEvenement;\n }", "public function getEntity() {\n\t\treturn get_entity($this->entity_guid);\n\t}", "public function getCalle()\n {\n return $this->calle;\n }", "public function tenders()\n {\n $tenders = collect([]);\n $usersOnCompany = $this->users();\n foreach ($usersOnCompany as $user) {\n foreach ($user->tenders() as $tender) {\n $tenders->push($tender);\n }\n }\n return $tenders;\n }" ]
[ "0.70141715", "0.6030877", "0.5965515", "0.59264225", "0.57535315", "0.57524127", "0.5688184", "0.56827146", "0.56827146", "0.5671178", "0.566597", "0.566597", "0.565748", "0.565748", "0.5602234", "0.56008667", "0.55848664", "0.55658627", "0.5485963", "0.5439807", "0.5430029", "0.5379355", "0.5379355", "0.53644544", "0.5359431", "0.53445894", "0.53365004", "0.5331017", "0.5317622", "0.5288785", "0.52804554", "0.5273391", "0.52366227", "0.5235089", "0.52308106", "0.52283376", "0.52217424", "0.5220181", "0.5218553", "0.521566", "0.51889414", "0.5182849", "0.5176645", "0.5173224", "0.5167166", "0.5166335", "0.515703", "0.51535684", "0.51457447", "0.5130763", "0.5114211", "0.51115036", "0.5111154", "0.5093708", "0.509116", "0.50889856", "0.5088473", "0.50844663", "0.50792414", "0.50775963", "0.50755066", "0.506042", "0.50584704", "0.50546825", "0.5042353", "0.50385773", "0.5033389", "0.50318456", "0.50279534", "0.5022689", "0.50109726", "0.50039744", "0.5003051", "0.50021124", "0.49961752", "0.49901968", "0.4988052", "0.49799323", "0.49773005", "0.49731463", "0.49722993", "0.4966316", "0.4966307", "0.49567527", "0.4952752", "0.49499488", "0.49468705", "0.4941194", "0.49394977", "0.4932882", "0.49274936", "0.49268088", "0.49191812", "0.49112117", "0.49071714", "0.49052483", "0.4902619", "0.48971006", "0.48922738", "0.4889015" ]
0.5709085
6
Composer hook that fires when composer createproject has finished.
public static function postCreateProjectCmd(Event $event): void { // Get a CLI object $cli = new CLImate(); $cli->br(); // Is the user running windows? if (Platform::isWindows()) { // Is the user running under WSL? If not then display warning message and die. if (!Platform::isWindowsSubsystemForLinux()) { $cli->br(); $cli ->bold() ->lightYellow( 'Warning: The Willow command line will only work in Linux, Mac or Windows running WSL' ); $cli ->bold() ->lightYellow( 'It appears you are running Windows without WSL. Please install WSL on Windows,' ); $cli->bold()->lightYellow('then re-run `composer create-project ...`'); $cli ->bold() ->lightYellow( 'See https://itsfoss.com/run-linux-commands-in-windows for methods of installing WSL' ); $cli->br(); die(); } } // Display Willow's fancy message self::fancyBanner($cli); $vendorDir = $event->getComposer()->getConfig()->get('vendor-dir'); $binDir = $event->getComposer()->getConfig()->get('bin-dir'); $baseDir = preg_replace('/vendor$/', '', $vendorDir); $projectName = basename($baseDir); // Create the willow symlink file try { $symlinkCreated = symlink($binDir . '/robo', 'willow'); } catch (\Exception $exception) { $symlinkCreated = false; } // Did the symlink NOT get created? if (!$symlinkCreated) { $cli->br(); $cli->bold()->lightYellow('Warning: Unable to create a symlink for the `willow` command.'); $cli->bold()->white('You may not have rights to create symlinks.'); $cli->bold()->white('You will need to create the willow symlink manually.'); $cli->br(); } $cli->br(); $cli->bold()->lightGray('# change directory to ' . $projectName); $cli->bold()->lightGreen('cd ' . $projectName)->br(); // Display what commands to run depending on if the symlink was created and the O/S if ($symlinkCreated) { $cli->bold()->lightGray('# Run the sample app'); $cli->bold()->lightGreen('./willow sample')->br(); $cli->bold()->lightGray('# Open the docs on the web'); $cli->bold()->lightGreen('./willow docs')->br(); $cli->bold()->lightGray('# List available commands'); $cli->bold()->lightGreen('./willow list')->br(); } else { $cli->error('Unable to create a symlink to robo. You will need to run robo in vendor\bin')->br(); $cli->bold()->lightGray('# Run the sample app'); $cli->bold()->lightGreen('./vendor/bin/robo sample'); $cli->bold()->lightGray('# Open the docs on the web'); $cli->bold()->lightGray('./vendor/bin/robo docs'); $cli->bold()->lightGray('# List available commands'); $cli->bold()->lightGray('./vendor/bin/robo list'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onPostCreateProject(Event $event): void\n {\n if (self::$isGlobalCommand) {\n return;\n }\n\n [$json, $manipulator] = Util::getComposerJsonFileAndManipulator();\n\n // new projects are most of the time proprietary\n $manipulator->addMainKey('license', 'proprietary');\n\n // 'name' and 'description' are only required for public packages\n $manipulator->removeProperty('name');\n $manipulator->removeProperty('description');\n\n foreach ($this->container->get('composer-extra') as $key => $value) {\n if ($key !== self::COMPOSER_EXTRA_KEY) {\n $manipulator->addSubNode('extra', $key, $value);\n }\n }\n\n $this->container->get(Filesystem::class)->dumpFile($json->getPath(), $manipulator->getContents());\n\n $this->updateComposerLock();\n }", "static function onPostCreateProject(Event $event = null)\n\t{\n\t\t$workbench = new static(new Filesystem, getcwd());\n\t\t$workbench->setup();\n\t}", "public static function postCreateProject(Event $event)\n {\n $io = $event->getIO();\n $config = [\n 'ddevShouldStart' => $io->askConfirmation('Would you like DDEV to start after the installation is complete?: [y/n] ', true),\n ];\n\n self::updateDDevName();\n self::copyEnv();\n self::removeReadme();\n self::installNpm();\n\n if ($config['ddevShouldStart']) {\n self::startDDEV();\n }\n\n exit;\n }", "protected function onFinishSetup()\n {\n }", "public function main()\n\t{\n\t\t$this->loadConfig();\n\t\t$this->validateProject();\n\t\t$this->cleanConfig();\n\t\t$this->installDependencies();\n\t\t$this->createAutoload();\n\t\t$this->finish();\n\t}", "public function postPackageInstall ( Event $event ) {\n//\n// if( !file_exists( $config_file ) ){\n//\n// copy( './config/build-tool.php', base_path() . '/config/build-tool.php' );\n// }\n $event->getIO()->write( \"postPackageInstall\" );\n\n }", "function created()\n {\n /**\n * [signal]\n *\n * IDF_Project::created\n *\n * [sender]\n *\n * IDF_Project\n *\n * [description]\n *\n * This signal allows an application to perform special\n * operations at the creation of a project.\n *\n * [parameters]\n *\n * array('project' => $project)\n *\n */\n $params = array('project' => $this);\n Pluf_Signal::send('IDF_Project::created',\n 'IDF_Project', $params);\n }", "public function beforeFinishingDeploy()\n {\n // $this->runRemote('{{ console_bin }} app:my-task-name');\n // $this->runLocal('say \"The deployment has finished.\"');\n }", "function rpostinstall() {\n\t\tif (file_exists('composer.json')) {\n\t\t\t$composer = json_decode(file_get_contents('composer.json'));\n\t\t\t//debug($composer);\n\t\t\tif (isset($composer->scripts) && isset($composer->scripts->{'post-install-cmd'})) {\n\t\t\t\t$cmd = $this->composerCommand . ' run-script post-install-cmd';\n\t\t\t\t$deployPath = $this->getVersionPath();\n\t\t\t\t$remoteCmd = 'cd ' . $deployPath . ' && ' . $cmd;\n\t\t\t\t$this->ssh_exec($remoteCmd);\n\t\t\t}\n\t\t}\n\t}", "public function testComposerPostPackageInstallEventHandlerDoesRun(): void {\n // Clean up must run when \"lemberg/draft-environment\" is being uninstalled.\n $package = new Package(App::PACKAGE_NAME, '1.0.0.0', '^1.0');\n $operation = new InstallOperation($package);\n $event = new PackageEvent(PackageEvents::POST_PACKAGE_INSTALL, $this->composer, $this->io, FALSE, $this->installedRepo, [$operation], $operation);\n $this->configInstallManager\n ->expects(self::once())\n ->method('install');\n $this->app->handleEvent($event);\n }", "public static function postCreateProject(Event $event)\n {\n $io = $event->getIO();\n $config = [\n 'sql-host' => $io->ask('Please specify the database host: '),\n 'sql-name' => $io->ask('Please specify the database name: '),\n 'sentry-dsn' => $io->ask('Please enter the Sentry DSN (if applicable): '),\n ];\n\n self::applyConfiguration($config);\n self::installNpm();\n self::removeReadme();\n\n exit;\n }", "public function runComposer():Create {\n\n # Check input > application is set and not empty\n if(empty($this->inputs['application'] ?? []))\n \n # New error\n throw new CrazyException(\n \"Input of application create is missing\", \n 500,\n [\n \"custom_code\" => \"create-002\",\n ]\n );\n\n # Decalare input\n $inputs = $this->inputs[\"application\"];\n\n # Push autoload_psr-4_App\\\\_0 in inputs\n $inputs[] = Composer::DEFAULT_PROPERTIES[\"autoload_psr-4_App\\\\_0\"];\n\n # Wash input\n $inputs = Process::wash($inputs, Composer::DEFAULT_PROPERTIES);\n\n # Compilate inputs\n $inputs = Process::compilate($inputs);\n\n # Sort inputs\n $inputs = Process::sortByConditions($inputs, Composer::DEFAULT_PROPERTIES);\n\n # Stretch inputs\n $inputs = Arrays::stretch($inputs);\n\n # Get path of composer\n $composer = File::path(\"@app_root/composer.json\");\n\n # Check json file exists\n if(!Json::check($composer))\n\n # Create composer file\n Composer::create($composer);\n\n # Set composer.json\n # - Reqire script to be executed from the project folder \n Composer::set($inputs, $composer);\n\n # Return instance\n return $this;\n\n }", "private function initializeProjectDirectory()\n {\n $this->output->write('Adding initial files... ');\n\n // Create directory\n if (!@mkdir($this->project->getDirectory())) {\n $message = 'Error: Could not create directory';\n $this->output->writeln('<error>' . $message . '</error>');\n throw new \\RuntimeException($message);\n }\n\n // Add template files\n $templateHandler = new TemplateHandler();\n $templateHandler->setProject($this->project);\n\n $templateHandler->writeTemplate('README.md');\n $templateHandler->writeTemplate('gitignore');\n $templateHandler->writeTemplate('Vagrantfile');\n\n // Add Dirtfile\n $this->project->save();\n\n // Initialize git for working directory\n $process = new Process(null, $this->project->getDirectory());\n $process->setTimeout(3600);\n\n $commands = array(\n 'git init',\n 'git add -A .',\n 'git commit -m \"Initial commit, added README, gitignore, Dirtfile and Vagrantfile\"'\n );\n\n if (!$this->input->getOption('skip-repository')) {\n $commands[] = 'git remote add origin ' . $this->project->getRepositoryUrl();\n $commands[] = 'git push -u origin master';\n }\n\n foreach ($commands as $command) {\n $process->setCommandLine($command);\n $process->run();\n if (!$process->isSuccessful()) {\n $message = 'Error: Could not run \"'. $command .'\", git returned: ' . $process->getErrorOutput();\n $this->output->writeln('<error>'. $message . '</error>');\n throw new \\RuntimeException($message);\n }\n }\n\n $this->output->writeln('<info>OK</info>');\n }", "public function created(Project $project)\n {\n $this->createActivity($project,'project_created');\n }", "function pm_update_complete($project, $version_control) {\n drush_print(dt('Project !project was updated successfully. Installed version is now !version.', array('!project' => $project['name'], '!version' => $project['candidate_version'])));\n drush_command_invoke_all('pm_post_update', $project['name'], $project['releases'][$project['candidate_version']]);\n $version_control->post_update($project);\n}", "public function addproject() {\n\t\t\t\n\t\t\t\n\t\t}", "public function execute()\n {\n\t $composer = $this->composer;\n\n\t $composer->extra = isset($composer->extra) ? $composer->extra : array('fof' => new \\stdClass());\n\t $composer->extra->fof = isset($composer->extra->fof) ? $composer->extra->fof : new \\stdClass();\n\n\t $info = $composer->extra->fof;\n\n\t if (!is_object($info))\n\t {\n\t\t if (empty($info))\n\t\t {\n\t\t\t $info = new \\stdClass();\n\t\t }\n\t\t else\n\t\t {\n\t\t\t $info = (object) $info;\n\t\t }\n\t }\n\n\t\t// Component Name (default: what's already stored in composer / composer package name)\n\t\t$info->name = $this->getComponentName($composer);\n\n\t\t$files = array(\n\t\t\t'backend' => 'component/backend',\n\t\t\t'frontend' => 'component/frontend',\n\t\t\t'media' => 'component/media',\n\t\t\t'translationsbackend' => 'translations/component/backend',\n\t\t\t'translationsfrontend' => 'translations/component/frontend'\n\t\t);\n\n\t if (!isset($info->paths) || empty($info->paths) || is_null($info->paths))\n\t {\n\t\t $info->paths = array();\n\t }\n\n\t if (is_object($info->paths))\n\t {\n\t\t $info->paths = (array) $info->paths;\n\t }\n\n\t $files = array_merge($files, $info->paths);\n\n\t\tforeach ($files as $key => $default)\n {\n\t\t\t$info->paths[$key] = $this->getPath($composer, $key, $default);\n\t\t}\n\n\t\t// Now check for fof.xml file\n\t\t$fof_xml = getcwd() . '/' . $info->paths['backend'] . '/fof.xml';\n\n\t\tif (file_exists($fof_xml))\n {\n // @todo Read the XML?\n\t\t}\n\n\t // @todo Maybe ask for namespaces?\n\n\t\t// Store back the info into the composer.json file\n\t $composer->extra->fof = $info;\n\t \\JFile::write(getcwd() . '/composer.json', json_encode($composer, JSON_PRETTY_PRINT));\n\n\t\t$this->setDevServer(false);\n\t}", "public function run()\n {\n $items = [\n \n ['title' => 'New Startup Project', 'client_id' => 1, 'description' => 'The best project in the world', 'start_date' => '2016-11-16', 'budget' => '10000', 'project_status_id' => 1],\n\n ];\n\n foreach ($items as $item) {\n \\App\\Project::create($item);\n }\n }", "public function afterInstall()\n\t{}", "public function finalize_deployment() : void {\n $deployer = new Deployer();\n $deployer->finalizeDeployment();\n\n echo 'SUCCESS';\n }", "function wp_cli_app_basic_composer( $args, $assoc_args ) {\n\n\t//Check Composer is installed in System\n\tif ( CLI::command_exists( \"composer\" ) === false ) {\n\t\tCLI::error( \"Composer Package Manager is not active in your system, read more : https://getcomposer.org/doc/00-intro.md\" );\n\t\treturn;\n\t}\n\n\t//Check Active Workspace\n\tWorkSpace::is_active_workspace();\n\t$workspace = WorkSpace::get_workspace();\n\n\t//Create Custom Composer Cli\n\t$arg = array();\n\tfor ( $x = 0; $x <= 3; $x ++ ) {\n\t\tif ( isset( $args[ $x ] ) and ! empty( $args[ $x ] ) ) {\n\t\t\t$arg[] = $args[ $x ];\n\t\t}\n\t}\n\n\t//Run command\n\tCLI::run_composer( $workspace['path'], $arg );\n}", "public function run()\n {\n factory( App\\Project::class )->create( [\n 'name' => 'rbc',\n 'description' => 'sistema resto bar' \n ] ) ;\n\n factory( App\\Project::class )->create( [\n 'name' => 'pm',\n 'description' => 'project manager' \n ] ) ;\n\n factory( App\\Project::class, 20 )->create() ;\n }", "public function created(Project $project)\n {\n \n $project->recordActivity('created');\n\n }", "public function after_run() {}", "private function composerReload()\n {\n $composer = $this->findComposer();\n\n $process = new Process($composer.' dump-autoload');\n $process->setTimeout(null); // Setting timeout to null to prevent installation from stopping at a certain point in time\n $process->setWorkingDirectory(base_path())->run();\n }", "public function _postSetup()\n {\n }", "protected function writeProjectFile()\r\n\t{\r\n\t\t//override to implement the parsing and file creation.\r\n\t\t//to add a new file, use: $this->addFile('path to new file', 'file contents');\r\n\t\t//echo \"Create Project File.\\r\\n\";\r\n\t}", "public function runComposer()\n\t{\n\t\t// Find Composer\n\t\t$composer = $this->getComposer();\n\t\tif (!$composer) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check for Composer file\n\t\t$dependencies = $this->releasesManager->getCurrentReleasePath().'/composer.json';\n\t\tif (!$this->fileExists($dependencies)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Run install\n\t\t$this->command->comment('Installing Composer dependencies');\n\t\t$output = $this->runForCurrentRelease($this->getComposer(). ' install');\n\n\t\treturn $this->checkStatus('Composer could not install dependencies', $output);\n\t}", "public function preExecute() {\n }", "private function extendComposer(array $backtrace): void\n {\n foreach ($backtrace as $trace) {\n if (isset($trace['object']) && $trace['object'] instanceof Installer) {\n /** @var \\Composer\\Installer $installer */\n $installer = $trace['object'];\n $installer->setSuggestedPackagesReporter(new SuggestedPackagesReporter(new NullIO()));\n\n break;\n }\n }\n\n foreach ($backtrace as $trace) {\n if (! isset($trace['object']) || ! isset($trace['args'][0])) {\n continue;\n }\n\n if ($trace['object'] instanceof GlobalCommand) {\n self::$isGlobalCommand = true;\n }\n\n if (! $trace['object'] instanceof Application || ! $trace['args'][0] instanceof ArgvInput) {\n continue;\n }\n\n /** @var \\Symfony\\Component\\Console\\Input\\InputInterface $input */\n $input = $trace['args'][0];\n $app = $trace['object'];\n\n try {\n /** @var null|string $command */\n $command = $input->getFirstArgument();\n $command = $command !== null ? $app->find($command)->getName() : null;\n } catch (InvalidArgumentException $e) {\n $command = null;\n }\n\n if ($command === 'create-project') {\n if (\\version_compare(Util::getComposerVersion(), '1.7.0', '>=')) {\n $input->setOption('remove-vcs', true);\n } else {\n $input->setInteractive(false);\n }\n } elseif ($command === 'suggests') {\n $input->setOption('by-package', true);\n }\n\n if ($input->hasOption('no-suggest')) {\n $input->setOption('no-suggest', true);\n }\n\n break;\n }\n }", "public function run()\n {\n passthru('cd ' . realpath($this->basedir) . ' && git pull origin master && curl -sS https://getcomposer.org/installer | php && php composer.phar install && git remote update && cd -');\n }", "public function testComposerPostPackageUpdateEventHandlerDoesRun(): void {\n // Update must run when \"lemberg/draft-environment\" is being updated.\n $initial = new Package(App::PACKAGE_NAME, '1.0.0.0', '^1.0');\n $target = new Package(App::PACKAGE_NAME, '1.2.0.0', '^1.0');\n $operation = new UpdateOperation($initial, $target);\n $packageEvent = new PackageEvent(PackageEvents::POST_PACKAGE_UPDATE, $this->composer, $this->io, FALSE, $this->installedRepo, [$operation], $operation);\n\n $this->configUpdateManager\n ->expects(self::once())\n ->method('update');\n\n $this->app->handleEvent($packageEvent);\n }", "public function run()\n {\n\n $this->repo->generate(3);\n\n }", "function rcomposer() {\n\t\t$this->checkOnce();\n\t\t$deployPath = $this->getVersionPath();\n\t\t//$this->ssh_exec($this->composerCommand.' clear-cache');\n\t\t$this->ssh_exec($this->composerCommand.' config -g secure-http false');\n\t\t$remoteCmd = 'cd '.$deployPath.' && '.$this->composerCommand.' install --ignore-platform-reqs';\n\t\t$this->ssh_exec($remoteCmd);\n\t}", "public abstract function resetComposer();", "public function run()\n {\n \t$project_owner = User::where('name', 'Owner Name')->first();\n \t$project = new Project();\n \t$project->name = 'New Project';\n \t$project->owner = $project_owner->id;\n \t$project->save();\n }", "protected function finishCoreBootstrap() {}", "public function prepare(): void\n {\n $this->processRunner->runAndReport(\n sprintf(\n 'git clone %s --depth 1 --single-branch --branch %s project/sylius',\n $this->getGitRepository(),\n $this->getVersion()\n )\n );\n $this->processRunner->runAndReport('composer install --working-dir project/sylius --no-dev --no-interaction');\n }", "public function testComposerInstall()\n {\n $this->assertFileNotExists('vendor/test/strawberry-jam/subordinate/jam.out');\n\n PH::runOk('COMPOSER_COMPILE=1 composer install -v');\n\n $this->assertFileContent('vendor/test/strawberry-jam/subordinate/jam.out', \"STRAWBERRY-FIELDS\\n\");\n }", "protected function afterInstall()\n {\n }", "protected function execute(InputInterface $input, OutputInterface $output)\n {\n $this->input = $input;\n $this->output = $output;\n\n // Define the new project's metadata\n $this->project = new Project();\n $this->project->setConfig($this->config);\n $this->project->setName($input->getArgument('name'));\n $this->project->generateProperties();\n $this->project->setDirectory(getcwd() . '/' . $this->project->getName(true));\n $this->project->setDescription($input->getOption('description'));\n\n // Check if directory already exists\n if (file_exists($this->project->getDirectory())) {\n throw new \\RuntimeException('Directory \"' . $this->project->getDirectory() . '\" already exists!');\n }\n\n // Validate framework\n $frameworkName = $input->getOption('framework');\n\n if ($frameworkName) {\n $frameworkName = strtolower($frameworkName);\n\n foreach (Framework::availableFrameworks() as $framework) {\n if (in_array($frameworkName, $framework->getShortcuts())) {\n $this->project->setFramework($framework);\n break;\n }\n }\n\n if ($this->project->getFramework() === FALSE) {\n throw new \\InvalidArgumentException('Invalid framework ' . $frameworkName . ', valid frameworks are: ' . implode(' ', Framework::validFrameworkShortcuts()));\n }\n }\n\n // Perform project creation actions\n $output->writeln('Creating new project in ' . $this->project->getDirectory());\n\n // Only create repository if skip-repository flag hasn't been set\n if (!$input->getOption('skip-repository')) {\n $this->createRepository();\n }\n\n $this->initializeProjectDirectory();\n\n // Install framework if needed\n if ($this->project->getFramework() !== FALSE) {\n $this->output->writeln('Installing ' . $this->project->getFramework()->getName(false) . '...');\n\n $o = $this->output;\n $this->project->getFramework()->install($this->project, function ($message) use ($o) {\n $o->write($message);\n });\n $this->project->getFramework()->configureEnvironment('dev', $this->project);\n\n // Push this change to the git remote\n $this->output->write(\"\\t\" . 'Pushing changes to git remote.');\n $process = new Process(null, $this->project->getDirectory());\n $process->setTimeout(3600);\n\n $commands = array(\n 'git add -A .',\n 'git commit -m \"Added '. $this->project->getFramework()->getName(false) .'\"'\n );\n\n if (!$input->getOption('skip-repository')) {\n $commands[] = 'git push origin master';\n }\n\n foreach ($commands as $command) {\n $process->setCommandLine($command);\n $process->run();\n $this->output->write('.');\n if (!$process->isSuccessful()) {\n $message = 'Error: Could not run \"'. $command .'\", git returned: ' . $process->getErrorOutput();\n $this->output->writeln('<error>'. $message . '</error>');\n throw new \\RuntimeException($message);\n }\n }\n $this->output->writeln('<info>OK</info>');\n } else {\n // Just create the public directory\n mkdir($this->project->getDirectory() . '/public');\n }\n\n // Output final project information\n $this->showProjectInfo();\n }", "public function execute()\n\t{\n\t\tChangeProject::getInstance()->executeTask('cd');\n\t\tChangeProject::getInstance()->executeTask('gdb');\n\t\tChangeProject::getInstance()->executeTask('ci18n', array('markergmaps'));\n\t\tChangeProject::getInstance()->executeTask('cb');\n\t\tChangeProject::getInstance()->executeTask('cec');\n\t\tChangeProject::getInstance()->executeTask('croles');\n\t\tChangeProject::getInstance()->executeTask('cperm');\n\t\tChangeProject::getInstance()->executeTask('import-data', array('markergmaps', 'init.xml'));\n\t}", "public function createProject()\n\t{\n\t\t$this->verifyTeam();\n\t\tAuthBackend::ensureWrite($this->team);\n\t\t$this->openProject($this->team, $this->projectName, true);\n\t\treturn true;\n\t}", "public function shutdown()\n {\n unset($this->project);\n }", "public function runBackupComposer():Create {\n \n # Composer path\n $composerPath = \"@app_root/composer.json\";\n\n # Check file exists\n if(!File::exists($composerPath))\n \n # New error\n throw new CrazyException(\n \"How did you execute this code if your composer.json doesn't exist in your app folder ??\", \n 500,\n [\n \"custom_code\" => \"create-001\",\n ]\n );\n\n # Get timestamp of now\n $currentTimestamp = time();\n\n # Copy the file in backup folder\n File::copy($composerPath, \"@app_root/assets/Json/backup/composer/$currentTimestamp-new-composer.json\");\n\n # Return instance\n return $this;\n\n }", "public function after_run(){}", "public function run()\n {\n AboutProject::create([\n 'main_title' => 'Жамбыл жастарының ресурстық орталығы',\n 'main_description' => 'default',\n 'main_image' => 'modules/front/assets/img/picture_slider.png',\n 'footer_title' => 'Жастар Саясаты басқармасы',\n 'footer_image' => 'modules/front/assets/img/logo.png',\n 'footer_address' => 'Желтоқсан көшесі, 78',\n 'footer_number' => '555-556-557'\n ]);\n }", "public function created()\n\t{\n\t\t$parent = $this->projectService->getProject($this->projectid);\n\t\tif ($parent) {\n\t\t\t$this->versioningService->createVersion($parent, 'featureupdate');\n\t\t}\n\t\t$this->versioningService->createVersion($this);\n\t}", "public function projectContractPrepared()\n\t{\n\n\t}", "public function prepareDirectory(): void\n {\n if (!file_exists($makerRepoPath = sprintf('%s/maker-repo', $this->cachePath))) {\n MakerTestProcess::create(sprintf('git clone %s %s', $this->rootPath, $makerRepoPath), $this->cachePath)->run();\n }\n\n if (!$this->fs->exists($this->flexPath)) {\n $this->buildFlexSkeleton();\n }\n\n if (!$this->fs->exists($this->path)) {\n try {\n // let's do some magic here git is faster than copy\n MakerTestProcess::create(\n '\\\\' === \\DIRECTORY_SEPARATOR ? 'git clone %FLEX_PATH% %APP_PATH%' : 'git clone \"$FLEX_PATH\" \"$APP_PATH\"',\n \\dirname($this->flexPath),\n [\n 'FLEX_PATH' => $this->flexPath,\n 'APP_PATH' => $this->path,\n ]\n )\n ->run();\n\n // In Window's we have to require MakerBundle in each project - git clone doesn't symlink well\n if ($this->isWindows) {\n $this->composerRequireMakerBundle($this->path);\n }\n\n // install any missing dependencies\n $dependencies = $this->determineMissingDependencies();\n if ($dependencies) {\n MakerTestProcess::create(sprintf('composer require %s', implode(' ', $dependencies)), $this->path)\n ->run();\n }\n\n $this->changeRootNamespaceIfNeeded();\n\n file_put_contents($this->path.'/.gitignore', \"var/cache/\\nvendor/\\n\");\n\n MakerTestProcess::create('git diff --quiet || ( git config user.name \"symfony\" && git config user.email \"[email protected]\" && git add . && git commit -a -m \"second commit\" )',\n $this->path\n )->run();\n } catch (\\Exception $e) {\n $this->fs->remove($this->path);\n\n throw $e;\n }\n } else {\n MakerTestProcess::create('git reset --hard && git clean -fd', $this->path)->run();\n }\n }", "protected static function updateComposerScripts(): void\n {\n if (! file_exists(base_path('composer.json'))) {\n return;\n }\n\n $composer = json_decode(file_get_contents(base_path('composer.json')), true);\n\n $composer['scripts'] = static::updateComposerScriptsArray(\n array_key_exists('scripts', $composer) ? $composer['scripts'] : []\n );\n\n ksort($composer['scripts']);\n\n file_put_contents(\n base_path('composer.json'),\n json_encode($composer, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT).PHP_EOL\n );\n }", "function run() {\n #CRM_Utils_System::setTitle(\"Create upcoming Recurring Contribution installments for Creditor $creditorId\");\n #\n #civicrm_api3('SepaContributionGroup', 'createnext', array('creditor_id' => $creditorId));\n civicrm_api3('SepaContributionGroup', 'createnext', array());\n\n CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/sepa'));\n }", "public function setUp()\n {\n $this->files = array(\n 'composer' => sys_get_temp_dir().'/composer.phar',\n 'selfupdater' => sys_get_temp_dir().'/composerselfupdateissuetest.php',\n );\n }", "function setup()\n{\n // Say hello\n outputString(PHP_EOL.'Woof!', Console::FG_YELLOW);\n // Install the default plugins\n installPlugins();\n // Install the NodeJS packages\n installNodePackages();\n // Initialize a git repository\n initializeGit();\n // Run Webpack for the first time\n runLaravelMix();\n // Say goodbye\n outputString(PHP_EOL.'Setup complete. Don\\'t forget to import the database!', Console::FG_YELLOW);\n}", "private static function composerAutoload(): void\n {\n self::require(ROOT . '/vendor/autoload.php');\n }", "protected function composerInit(string $name, string $description, string $author_name, string $author_email) :void\n {\n $path = app_path();\n\n $command = '/opt/composer/composer.phar init';\n $command .= \" --name='$name'\";\n $command .= \" --description='$description'\";\n $command .= \" --author='$author_name <$author_email>'\";\n $command .= $this->composerRequireDev();\n\n $process = new Process(\"cd $path && $command\");\n $process->run();\n\n if (!$process->isSuccessful()) {\n throw new ProcessFailedException($process);\n }\n\n $this->info($process->getOutput());\n }", "public function preInstall()\n {\n }", "public function afterSetup()\n {\n }", "public function install() {\n\t\t\\GO\\Projects2\\Projects2Module::createDefaultIncomeContractNotificationCron();\n\t\t\n//\t\tif(!GO::modules()->isInstalled('projects')){\n\t\tGO::getDbConnection()->query(\"SET sql_mode=''\");\n\t\t\n\t\tif(!Utils::tableExists(\"pm_projects\")){\n\t\t\tparent::install();\n\t\t\t\n\t\t\t$defaultType = new Type();\n\t\t\t$defaultType->name = GO::t(\"Default\");\n\t\t\t$defaultType->save();\n\n\t\t\t$defaultStatus = new Status();\n\t\t\t$defaultStatus->name = GO::t(\"Ongoing\", \"projects2\");\n\t\t\t$defaultStatus->show_in_tree=true;\n\t\t\t$defaultStatus->save();\n\t\t\t\n\t\t\t$noneStatus = new Status();\n\t\t\t$noneStatus->name = GO::t(\"None\", \"projects2\");\n\t\t\t$noneStatus->show_in_tree=true;\n\t\t\t$noneStatus->filterable=true;\n\t\t\t$noneStatus->save();\n\n\t\t\t$status = new Status();\n\t\t\t$status->name = GO::t(\"Complete\", \"projects2\");\n\t\t\t$status->complete=true;\n\t\t\t$status->show_in_tree=false;\n\t\t\t$status->save();\n\t\t\t\n\t\t\t\n\t\t\t$folder = new \\GO\\Base\\Fs\\Folder(GO::config()->file_storage_path.'projects2/template-icons');\n\t\t\t$folder->create();\t\t\t\n\t\t\t\n\t\t\tif(!$folder->child('folder.png')){\n\t\t\t\t$file = new \\GO\\Base\\Fs\\File(GO::modules()->projects2->path . 'install/images/folder.png');\n\t\t\t\t$file->copy($folder);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(!$folder->child('project.png')){\n\t\t\t\t$file = new \\GO\\Base\\Fs\\File(GO::modules()->projects2->path . 'install/images/project.png');\n\t\t\t\t$file->copy($folder);\t\t\t\n\t\t\t}\n\n\t\t\t$template = new Template();\n\t\t\t$template->name = GO::t(\"Projects folder\", \"projects2\");\n\t\t\t$template->default_status_id = $noneStatus->id;\n\t\t\t$template->default_type_id = $defaultType->id;\n\t\t\t$template->icon=$folder->stripFileStoragePath().'/folder.png';\n\t\t\t$template->project_type=Template::PROJECT_TYPE_CONTAINER;\n\t\t\t$template->save();\n\t\t\t\n\t\t\t$template->acl->addGroup(GO::config()->group_everyone);\n\n\n\t\t\t$template = new Template();\n\t\t\t$template->name = GO::t(\"Standard project\", \"projects2\");\n\t\t\t$template->default_status_id = $defaultStatus->id;\n\t\t\t$template->default_type_id = $defaultType->id;\n\t\t\t$template->project_type=Template::PROJECT_TYPE_PROJECT;\n\t\t\t$template->fields = 'responsible_user_id,status_date,customer,budget_fees,contact,expenses';\n\t\t\t$template->icon=$folder->stripFileStoragePath().'/project.png';\n\t\t\t$template->save();\n\t\t\t\n\t\t\t$template->acl->addGroup(GO::config()->group_everyone);\n\t\t\t\n\t\t}else\n\t\t{\n\t\t\tGO::setMaxExecutionTime(0);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$oldModelTypeId = \\GO\\Base\\Model\\ModelType::model()->findByModelName(\"GO\\Projects\\Model\\Project\");\n\t\t\t$modelTypeId = \\GO\\Base\\Model\\ModelType::model()->findByModelName(\"GO\\Projects2\\Model\\Project\");\n\t\t\t\n\t\t\t//copy old projects module tables\n\t\t\t$stmt = GO::getDbConnection()->query('SHOW TABLES');\n\t\t\twhile ($r = $stmt->fetch()) {\n\t\t\t\t$tableName = $r[0];\n\n\n\t\t\t\tif (substr($tableName, 0, 9) == 'go_links_' && !is_numeric(substr($tableName, 9, 1))) {\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\t$sql = \"ALTER TABLE `$tableName` ADD `ctime` INT NOT NULL DEFAULT '0';\";\n\t\t\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception $e){}\n\t\t\t\t\t\n\t\t\t\t\t$sql = \"DELETE FROM `$tableName` WHERE model_type_id=\".intval($modelTypeId);\n\t\t\t\t\tGO::debug($sql);\n\t\t\t\t\tGO::getDbConnection()->query($sql);\n\n\t\t\t\t\t$sql = \"INSERT IGNORE INTO `$tableName` SELECT id,folder_id, model_id,'$modelTypeId', description, ctime FROM `$tableName` WHERE model_type_id=$oldModelTypeId\";\n\t\t\t\t\tGO::debug($sql);\n\t\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (strpos($tableName, 'pm_') !== false) {\n\t\t\t\t\t\n\t\t\t\t\t//some GLOBAL2000 tables we do not want to copy\n\t\t\t\t\tif(!in_array($tableName,array('pm_employees','pm_resources','pm_employment_agreements'))){\n\t\t\t\t\t\n\t\t\t\t\t\t$newTable = str_replace('pm_', \"pr2_\", $tableName);\n\n\t\t\t\t\t\t$sql = \"DROP TABLE IF EXISTS `$newTable`\";\n\t\t\t\t\t\tGO::getDbConnection()->query($sql);\n\n\t\t\t\t\t\t$sql = \"CREATE TABLE `$newTable` LIKE `$tableName`\";\n\t\t\t\t\t\tGO::getDbConnection()->query($sql);\n\n\t\t\t\t\t\t$sql = \"INSERT INTO `$newTable` SELECT * FROM `$tableName`\";\n\t\t\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$sql = \"update pr2_projects set name = replace(name, '/','-')\";\n\t\t\tGO::getDbConnection()->query($sql);\n\n\t\t\t\n//\t\t\t$sql = \"update pr2_projects set files_folder_id=0\";\n//\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\n\t\t\t$sql = \"select version from go_modules where id='projects'\";\t\t\t\n\t\t\t$stmt = GO::getDbConnection()->query($sql);\n\t\t\t\n\t\t\t$record = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t\tGO::modules()->projects2->version = $record['version'];\n\t\t\tGO::modules()->projects2->save();\t\t\t\n//\t\t\tGO::modules()->projects->acl->copyPermissions(GO::modules()->projects2->acl);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//start files\n//\t\t\t$sql = \"UPDATE pr2_projects SET files_folder_id=(SELECT files_folder_id FROM pm_projects WHERE pm_projects.id=pr2_projects.id);\";\n//\t\t\tGO::getDbConnection()->query($sql);\n\n\t\t\t$fsFolder = new GO\\Base\\Fs\\Folder(GO::config()->file_storage_path.'projects2');\n\t\t\tif($fsFolder->exists()){\n\t\t\t\t$fsFolder->rename('projects2-'.date('c'));\n\t\t\t}\n\n\t\t\t$folder = \\GO\\Files\\Model\\Folder::model()->findByPath('projects');\n\t\t\t$folder->name='projects2';\n\t\t\t$folder->acl_id=GO::modules()->projects2->acl_id;\n\t\t\t$folder->save();\n\n\n//\t\t\t$sql = \"UPDATE pm_projects SET files_folder_id=0;\";\n//\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\n\t\t\t$sql = \"update `pr2_templates` set icon = replace(icon, 'projects/', 'projects2/');\";\n\t\t\tGO::getDbConnection()->query($sql);\t\t\t\n\t\t\t\n\t\t\t//end files\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t//upgrade database\n\t\t\tob_start();\n\t\t\t$mc = new \\GO\\Core\\Controller\\MaintenanceController();\n\t\t\t$mc->run(\"upgrade\", array(), false);\n\t\t\tob_end_clean();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//create new acl's\n\t\t\t\n//\t\t\t$types = \\GO\\Projects\\Model\\Type::model()->find();\t\t\t\n//\t\t\tforeach($types as $type){\t\t\t\t\n//\t\t\t\t$type2 = Model\\Type::model()->findByPk($type->id);\t\t\t\t\n//\t\t\t\t$type2->setNewAcl($type->user_id);\t\t\t\t\n//\t\t\t\t$type->acl->copyPermissions($type2->acl);\t\t\t\n//\t\t\t\t$type2->save();\n//\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$sql=\"ALTER TABLE `pr2_hours` CHANGE `income_id` `old_income_id` INT( 11 ) NULL DEFAULT NULL ;\";\n\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t$sql=\"ALTER TABLE `pr2_hours` ADD `income_id` INT( 11 ) NULL AFTER `old_income_id` ;\";\n\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t$sql=\"UPDATE `pr2_hours` SET old_income_id=-1*old_income_id;\";\n\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\n\t\t\t\n\t\t\tif(\\GO\\Base\\Db\\Utils::tableExists(\"pm_employment_agreements\")){\n\t\t\t\t\n\t\t\t\t//GLOBAL 2000 version\n\t\t\t\t\n\t\t\t\t$sql = \"replace into pr2_employees (user_id, external_fee, internal_fee) select employee_id, max(external_fee),max(internal_fee) from pm_employment_agreements group by employee_id\";\n\t\t\t\tGO::getDbConnection()->query($sql);\n\n\n\t\t\t\t$sql = \"replace into pr2_resources (user_id,project_id, external_fee, internal_fee) select user_id,project_id, external_fee, internal_fee from pm_resources\";\n\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\t\n//\t\t\tNo longer necessary because of $updates['201310041023'] in updates.inc.php :\t\n//\t\t\t\t//untested\n//\t\t\t\t$sql = \"ALTER TABLE `pr2_hours` CHANGE `external_value` `external_fee` DOUBLE NOT NULL DEFAULT '0'\";\n//\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$sql = \"insert ignore into pr2_employees (user_id, external_fee, internal_fee) select user_id, max(ext_fee_value), max(int_fee_value) from pm_hours group by user_id\";\n\t\t\t\tGO::getDbConnection()->query($sql);\n\n\n\t\t\t\t$sql = \"insert ignore into pr2_resources (user_id,project_id, external_fee, internal_fee) select user_id,project_id, max(ext_fee_value), max(int_fee_value) from pm_hours group by user_id, project_id\";\n\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$sql = \"update pr2_templates set project_type=1\";\n\t\t\tGO::getDbConnection()->query($sql);\n\n\n\t\t\tif (GO::modules()->customfields) {\n\t\t\t\t\n//\t\t\t\trequire(dirname(__FILE__).'/install/migrate/models.php');\n\t\t\t\t\n//\t\t\t\t\\GO\\Customfields\\CustomfieldsModule::replaceRecords(\"GO\\Projects\\Model\\Project\", \"GO\\Projects2\\Model\\Project\");\n\t\t\t\t\n//\t\t\t\t\\GO\\Customfields\\CustomfieldsModule::replaceRecords(\"GO\\Projects\\Model\\Hour\", \"GO\\Projects2\\Model\\TimeEntry\");\n\t\t\t\t\n\t\t\t\t//$sql = \"RENAME TABLE `cf_pm_projects` TO `cf_pr2_projects` \";\n\t\t\t\t//GO::getDbConnection()->query($sql);\n\t\t\t\t\n\t\t\t\t//$sql = \"RENAME TABLE `cf_pm_hours` TO `cf_pr2_hours` \";\n\t\t\t\t//GO::getDbConnection()->query($sql);\n\t\t\t\t\n\t\t\t\t$sql = \"update `cf_categories` set extends_model = 'GO\\\\\\\\Projects2\\\\\\\\Model\\\\\\\\Project' where extends_model = 'GO\\\\\\\\Projects\\\\\\\\Model\\\\\\\\Project';\";\n\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\t\n\t\t\t\t$sql = \"update `cf_categories` set extends_model = 'GO\\\\\\\\Projects2\\\\\\\\Model\\\\\\\\Hour' where extends_model = 'GO\\\\\\\\Projects\\\\\\\\Model\\\\\\\\Hour';\";\n\t\t\t\tGO::getDbConnection()->query($sql);\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tGO::getDbConnection()->query(\"UPDATE go_search_cache set model_type_id=$modelTypeId where model_type_id=$oldModelTypeId\");\n\t\t\t\n\t\t\n\t\t\t\n\n\t\t\t// Now, let's make sure that all the projects have a template.\n\t\t\t\n\t\t\t$folder = new Folder(GO::config()->file_storage_path.'projects2/template-icons');\n\t\t\t$folder->create();\t\t\t\n\t\t\t\n\t\t\tif(!$folder->child('folder.png')){\n\t\t\t\t$file = new File(GO::modules()->projects2->path . 'install/images/folder.png');\n\t\t\t\t$file->copy($folder);\n\t\t\t}\n\t\t\t\n\t\t\tif(!$folder->child('project.png')){\n\t\t\t\t$file = new File(GO::modules()->projects2->path . 'install/images/project.png');\n\t\t\t\t$file->copy($folder);\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (\\GO::modules()->files) {\n\t\n\t\t\t\t$fileFolder = \\GO\\Files\\Model\\Folder::model()->findByPath('projects2/template-icons',true);\n\t\t\t\tif(!$fileFolder->acl_id!=\\GO::modules()->projects2->acl_id){\n\t\t\t\t\t$oldIgnore = \\GO::$ignoreAclPermissions;\n\t\t\t\t\t\\GO::$ignoreAclPermissions=true;\n\t\t\t\t\t$fileFolder->acl_id=\\GO::modules()->projects2->acl_id;\n\t\t\t\t\t$fileFolder->save();\t\t\n\t\t\t\t\t\\GO::$ignoreAclPermissions=$oldIgnore;\n\t\t\t\t}\n\t\t\t\t//for icons added after install\n\t\t\t\t$fileFolder->syncFilesystem();\n\t\t\t}\n\t\t\t\n\t\t\t$normalTemplate = new Template();\n\t\t\t$normalTemplate->name = GO::t(\"Normal project\", \"projects2\");\n\t\t\t$normalTemplate->project_type=Template::PROJECT_TYPE_PROJECT;\n\t\t\t$normalTemplate->fields = 'responsible_user_id,status_date,customer,budget_fees,contact,expenses';\n\t\t\t$normalTemplate->icon=$folder->stripFileStoragePath().'/project.png';\n\t\t\t$normalTemplate->save();\n\t\t\t\n\t\t\tGO\\Base\\Db\\Columns::$forceLoad = true;\n\t\t\t\n\t\t\t$noTemplateProjectsStmt = Project::model()->find(\n\t\t\t\tFindParams::newInstance()\n\t\t\t\t\t->criteria(\n\t\t\t\t\t\tFindCriteria::newInstance()\n\t\t\t\t\t\t\t->addCondition('template_id',0)\n\t\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\tGO\\Base\\Db\\Columns::$forceLoad = false;\n\t\t\t\n\t\t\tforeach ($noTemplateProjectsStmt as $noTemplateProjectModel) {\n\t\t\t\t$noTemplateProjectModel->template_id = $normalTemplate->id;\n\t\t\t\t$noTemplateProjectModel->save();\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\t// Upgrade closed weeks\n\t\t\tob_start();\n\t\t\t$pc = new \\GO\\Projects2\\Controller\\ProjectController();\n\t\t\t$pc->run(\"v1toV2Upgrade\", array(), false);\n\t\t\tob_end_clean();\n\t\t\t\n\t\t}\n\n\t\t\n\t}", "public function upgrader_post_install($true, $hook_extra, $result) {\n $base_plugin_name = $this->github_username . '-' . $this->github_project;\n if (substr($result['destination_name'], 0, strlen($base_plugin_name)) === $base_plugin_name) {\n $new_destination = $result['local_destination'] . '/' . $this->github_project . '/';\n rename($result['destination'], $new_destination);\n $result['destination'] = $new_destination;\n $result['remote_destination'] = $new_destination;\n $result['destination_name'] = $this->github_project;\n }\n return $result;\n }", "public function __invoke( $args ) {\n\t\t\\WP_CLI::success( 'Hello WordCamp Minneapolis-St. Paul! You just installed a Composer package!' );\n\t}", "public function hookInstall(): void\n {\n $this->say(\"Executing the Plugin's install hook...\");\n $this->_exec(\"php ./src/hook_install.php\");\n }", "public function setUp()\n {\n $composer = new Composer(__DIR__ . '/Fixtures');\n\n $data = $composer->data();\n\n $this->styles = $data['styles'];\n\n $this->paths = $data['paths'];\n\n $this->command = new Builder($this->paths, $this->styles);\n\n $this->command->data((array) $data);\n\n $this->creator = new Creator($this->paths);\n }", "public function projectCreated($creator,$project)\n\t{\n\t\t$log = new Log();\n\t\t$log->setText(\"Project \".$project->getName().\" created\");\n\t\t$log->setItem(\"project\");\n\t\t$log->setAction(LogAction::PROJECTCREATED);\n\t\t$log->setCreationdate(new \\DateTime(\"NOW\",new \\DateTimeZone(TIMEZONE)));\n\t\t$log->setUser($creator->getCredentials());\n\t\t$log->setProject($project);\n\t\t$this->em->persist($log);\n\t\t$this->em->flush();\n\t\t$keyaccount=$project->getOwner()->getKeyAccount();\n\t\t$client=$project->getOwner();\n\t\t$creator_name=$creator->getName();\n\t\t$admins=$this->getAdmins();\n\t\tforeach ($admins as $key) {\n\t\t\t$this->emailService->notifyProjectCreated($key->getEmail(),$key->getName(),$client,$project,$creator_name,false);\n\t\t}\n\t\tif($client->getReferencedBy() != null)\n\t\t{\n\t\t\tif($client->getReferencedBy()->getId() == $keyaccount->getCredentials()->getId())\n\t\t\t\t$isPartner = true;\n\t\t\telse\n\t\t\t\t$isPartner = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$isPartner = false;\n\t\t}\n\t\t\n\t\t$this->emailService->notifyProjectCreated($keyaccount->getEmail(),$keyaccount->getName(),$client,$project,$creator_name,$isPartner);\n\t\t$attribute=array(\"lastProjectCreated\"=>time());\n\t\t$this->intercomService->addCustomAttribute($client->getEmail(),$attribute);\n\t}", "public function run()\n {\n \n $project = Project::create([\n 'project_code' => '10001',\n 'name' => 'Head Office',\n 'short_name' => 'HQ',\n 'start_date' => date('Y-m-d'),\n 'end_date' => date('Y-m-d', strtotime(\"+365 days\")),\n ]);\n $this->command->info('Create Project ' . $project->project_code);\n $project = Project::create([\n 'project_code' => '10002',\n 'name' => 'Depot',\n 'short_name' => 'DEPOT',\n 'start_date' => date('Y-m-d'),\n 'end_date' => date('Y-m-d', strtotime(\"+365 days\")),\n ]);\n $this->command->info('Create Project ' . $project->project_code);\n $project = Project::create([\n 'project_code' => '10003',\n 'name' => 'Safty',\n 'short_name' => 'SAFTY',\n 'start_date' => date('Y-m-d'),\n 'end_date' => date('Y-m-d', strtotime(\"+365 days\")),\n ]);\n $this->command->info('Create Project ' . $project->project_code);\n $project = Project::create([\n 'project_code' => '10004',\n 'name' => 'IT',\n 'short_name' => 'IT',\n 'start_date' => date('Y-m-d'),\n 'end_date' => date('Y-m-d', strtotime(\"+365 days\")),\n ]);\n $this->command->info('Create Project ' . $project->project_code);\n $project = Project::create([\n 'project_code' => '11016',\n 'name' => 'Amber',\n 'short_name' => 'AMBER',\n 'start_date' => date('Y-m-d'),\n 'end_date' => date('Y-m-d', strtotime(\"+365 days\")),\n ]);\n $this->command->info('Create Project ' . $project->project_code);\n $project = Project::create([\n 'project_code' => '11023',\n 'name' => 'Niche Mono Borom Sales Office',\n 'short_name' => 'MONO',\n 'start_date' => date('Y-m-d'),\n 'end_date' => date('Y-m-d', strtotime(\"+365 days\")),\n ]);\n $this->command->info('Create Project ' . $project->project_code);\n }", "public static function postInstall(Event $event)\n {\n\n // Check environment type\n if (self::getEnvironmentType() !== 'dev') {\n exit;\n }\n\n $io = $event->getIO();\n $basePath = self::getBasepath();\n\n // If the theme has already been renamed, assume this setup is complete\n if (file_exists($basePath.'/themes/default')) {\n\n // Only try to rename things if the user actually provides some info\n if ($theme = $io->ask('Please specify the theme name: ')) {\n $config = array(\n 'theme' => $theme,\n // 'sql-host' => $io->ask('Please specify the database host: '),\n 'sql-name' => $io->ask('Please specify the database name: '),\n );\n self::applyConfiguration($config);\n\n $io->write('New configuration settings have been applied.');\n $io->write('Foundation will now be installed...');\n\n // install foundation\n self::installFoundation($config['theme']);\n\n // settings have been updated so it's time to tidy up what was downloaded from Foundation.\n self::cleanUpFoundation($config['theme']);\n $io->write('Foundation has been installed and the contents have been organised.');\n $io->write('Bundle will now be run and then compass will compile the stylesheets...');\n\n // run bundle and compass compile\n self::compileSass($config['theme']);\n\n $io->write('Installation complete!!!');\n\n }\n\n }\n\n }", "public function handle()\n {\n if (config('package.vendorNameChanged') == false) {\n $this->error(\"Your vendor name hasn't been set yet! Run parcel set:vendor first.\");\n $this->info('You can override the default vendor by passing the --vendor flag with a new vendor name, after you set it the first time');\n\n return;\n }\n\n // sanitize name input.\n $name = strtolower($this->argument('name'));\n $location = getcwd();\n $directories = config('package.directories');\n $names = [\n 'vendorName' => ['target' => '#VENDORNAME#', 'payload' => strtolower(config('package.vendor'))],\n 'packageName' => ['target' => '#PACKAGENAME#', 'payload' => $name],\n 'className' => ['target' => '#CLASSNAME#', 'payload' => ucfirst($name) . 'ServiceProvider'],\n 'namespace' => ['target' => '#NAMESPACE#', 'payload' => ucfirst(config('package.vendor')) . '\\\\' . ucfirst($name)],\n 'namespace' => ['target' => '#COMPOSERNAMESPACE#', 'payload' => ucfirst(config('package.vendor')) . '\\\\\\\\' . ucfirst($name)]\n ];\n $files = [\n [\n 'message' => 'Creating basic composer.json file...',\n 'stub' => 'composer.json.stub',\n 'filename' => 'composer.json'\n ],\n [\n 'message' => 'Creating basic service provider file...',\n 'stub' => 'provider.stub',\n 'filename' => DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . $names['className']['payload'] . '.php'\n ],\n [\n 'message' => 'Creating laravel gitignore file...',\n 'stub' => 'gitignore.stub',\n 'filename' => '.gitignore'\n ],\n [\n 'message' => 'Creating phpunit.xml file...',\n 'stub' => 'phpunit.stub',\n 'filename' => 'phpunit.xml'\n ]\n ];\n\n // Create package folder structure.\n $this->info('Creating top level package directory...');\n foreach ($directories as $directory) {\n $path = $location . DIRECTORY_SEPARATOR . $names['packageName']['payload'] . DIRECTORY_SEPARATOR . $directory;\n File::makeDirectory($path, 0777, true, true);\n }\n\n // Create package files\n foreach ($files as $file) {\n $this->info($file['message']);\n $payload = File::get(template_path($file['stub']));\n foreach ($names as $name) {\n $payload = str_replace($name['target'], $name['payload'], $payload);\n }\n $path = $location\n . DIRECTORY_SEPARATOR . $names['packageName']['payload']\n . DIRECTORY_SEPARATOR . $file['filename'];\n File::put($path, $payload);\n }\n }", "public function initAutoScripts(): void\n {\n if (self::$isGlobalCommand) {\n return;\n }\n\n $scripts = $this->container->get(Composer::class)->getPackage()->getScripts();\n\n $autoScript = '@' . ScriptEvents::AUTO_SCRIPTS;\n\n if (isset($scripts[ComposerScriptEvents::POST_INSTALL_CMD], $scripts[ComposerScriptEvents::POST_UPDATE_CMD])\n && \\in_array($autoScript, $scripts[ComposerScriptEvents::POST_INSTALL_CMD], true)\n && \\in_array($autoScript, $scripts[ComposerScriptEvents::POST_UPDATE_CMD], true)\n ) {\n return;\n }\n\n [$json, $manipulator] = Util::getComposerJsonFileAndManipulator();\n\n if ((\\is_countable($scripts) ? \\count($scripts) : 0) === 0) {\n $manipulator->addMainKey('scripts', []);\n }\n\n $manipulator->addSubNode(\n 'scripts',\n ComposerScriptEvents::POST_INSTALL_CMD,\n \\array_merge($scripts[ComposerScriptEvents::POST_INSTALL_CMD] ?? [], [$autoScript])\n );\n $manipulator->addSubNode(\n 'scripts',\n ComposerScriptEvents::POST_UPDATE_CMD,\n \\array_merge($scripts[ComposerScriptEvents::POST_UPDATE_CMD] ?? [], [$autoScript])\n );\n\n if (! isset($scripts[ScriptEvents::AUTO_SCRIPTS])) {\n $manipulator->addSubNode('scripts', ScriptEvents::AUTO_SCRIPTS, new stdClass());\n }\n\n $this->container->get(Filesystem::class)->dumpFile($json->getPath(), $manipulator->getContents());\n\n $this->updateComposerLock();\n }", "public function createPackageFile()\n\t{\n\t\t$packageFilePath = __DIR__ . \"/templates/packagefile.txt\";\n\n\t\t// If file exists, copy content into new file called package.json in project root.\n\t\tif($this->filesystem->exists($packageFilePath))\n\t\t{\n\t\t\t$this->filesystem->put('package.json', $this->filesystem->get($packageFilePath));\n\t\t}\n\t}", "public function init()\n {\n if (!file_exists($this->project->getBasedir() . '/vendor/autoload.php')) {\n throw new \\BuildException(\n \"Dependencies not installed; run 'composer install --dev' before launching this task\"\n );\n }\n }", "function after_create() {}", "public function run()\n {\n $project = Project::create([\n 'name' => 'projects',\n 'mission' => 'mission',\n 'vision' => 'vision',\n 'estatud' => '1',\n 'user_id' => 2\n ]);\n $project = Project::create([\n 'name' => 'projects',\n 'mission' => 'mission',\n 'vision' => 'vision',\n 'estatud' => '1',\n 'user_id' => 3\n ]);\n }", "public function setUp(): void\n {\n try {\n self::extractStubProject('example_project.zip');\n self::extractStubProject('no_tags_project.zip');\n } catch (\\RuntimeException $exception) {\n $this->fail($exception->getMessage());\n }\n parent::setUp();\n }", "public function onBuildingStart(BuildEvent $event);", "public function beforeStartingDeploy()\n {\n // $this->runLocal('./vendor/bin/simple-phpunit');\n }", "protected function beforeGeneration(): void\n {\n // Initialize some classes and things.\n if (!$this->preGenerationCompleted) {\n $this->log->startBreak('Generator Class Initialization');\n $this->log->info('Compiling Copyrights...');\n CopyrightUtils::compileCopyrights($this->config);\n $this->log->endBreak('Generator Class Initialization');\n $this->preGenerationCompleted = true;\n }\n }", "private function init(): void\n {\n // Load composer.json\n $this->composerJson = $this->loadJsonFile($this->composerJsonFilename);\n\n // Reconstitute the composer.lock filename\n $composerLockFilename = dirname($this->composerJsonFilename) .\n DIRECTORY_SEPARATOR .\n basename($this->composerJsonFilename, '.json') .\n '.lock';\n\n // Check if composer.lock file exists\n if (!file_exists($composerLockFilename)) {\n throw new ComposerException(\n sprintf('Project is not initialized with Composer, \"%s\" file doest not exists', $composerLockFilename)\n );\n }\n\n // Get JSON content of composer.json file\n if (($this->composerLock = json_decode(file_get_contents($composerLockFilename), true)) === false) {\n throw new ComposerException(\n sprintf('\"%s\" file of project is corrupted or not readable', $composerLockFilename)\n );\n }\n\n // Reindex packages\n $this->composerLock['packages'] = array_column($this->composerLock['packages'], null, 'name');\n\n // Load packages\n $this->packages = array_fill_keys(array_column($this->composerLock['packages'], 'name'), null);\n }", "public function run()\n {\n Project::truncate();\n \n factory(Project::class)->create([\n 'owner_id' => 1,\n 'client_id' => 1,\n 'name' => 'Project Test',\n 'description' => 'Lorem ipsum',\n 'progress' => rand(1, 100),\n 'status' => rand(1, 3),\n 'due_date' => '2016-06-06'\n ]);\n\n factory(Project::class, 10)->create();\n }", "private function finalize() {\n\n\t\t// Remove git before it's moved.\n\t\t$plugin_dir = untrailingslashit( dirname( app()->plugin_file ) );\n\n\t\tif ( ! $this->dryrun ) {\n\t\t\t$this->fs->delete( \"{$plugin_dir}/.git\", true ); // Remove git.\n\t\t\t$this->fs->delete( \"{$plugin_dir}/.gitignore\", true ); // Remove gitignore.\n\t\t}\n\n\t\t// Move it.\n\t\t$slug = $this->slugify( $this->cli_args->get_arg( 'name' ) );\n\n\t\t$plugins_dir = untrailingslashit( dirname( dirname( app()->plugin_file ) ) );\n\n\t\t$olddir = dirname( app()->plugin_file );\n\t\t$newdir = \"{$plugins_dir}/{$slug}\";\n\n\t\tif ( ! file_exists( $newdir ) ) {\n\t\t\tif ( ! $this->dryrun ) {\n\t\t\t\t$this->fs->move( $olddir, $newdir );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! $this->dryrun ) {\n\t\t\t// @codingStandardsIgnoreLine: Try and activate that plugin.\n\t\t\tshell_exec( \"wp plugin activate {$slug} --allow-root\" );\n\t\t}\n\t}", "protected function setup() {\n\t\t/**\n\t\t * Add template for projects shortcode\n\t\t */\n\t\tadd_filter( 'nprojects/shortcode_template', array( $this, 'shortcode_template' ) );\n\n\t\tadd_filter( 'nprojects/shortcode_parameters', array( $this, 'shortcode_parameters' ) );\n\n\t\t/**\n\t\t * Change project post type settings\n\t\t */\n\t\tadd_filter( 'nprojects/post_type_args', array( $this, 'post_type_args' ) );\n\n\t\t/**\n\t\t * Change project category settings\n\t\t */\n\t\tadd_filter( 'nprojects/taxonomy_category_args', array( $this, 'taxonomy_category_args' ) );\n\n\t\t/**\n\t\t * Change project tag settings\n\t\t */\n\t\tadd_filter( 'nprojects/taxonomy_tag_args', array( $this, 'taxonomy_tag_args' ) );\n\n\t\t/**\n\t\t * Override the theme options\n\t\t */\n\t\tadd_filter( 'op/prepare_options', array( $this, 'override_options' ) );\n\n\t\t/**\n\t\t * Register filter to adding specific classes for projects archive\n\t\t */\n\t\tadd_filter( 'projects/archive-class', array( $this, 'archive_class' ) );\n\n\t\t/**\n\t\t * Return the thumbnail size name\n\t\t */\n\t\tadd_filter( 'projects/archive-thumbnail-size', array( $this, 'archive_thumbnail_size' ) );\n\n\t\t/**\n\t\t * Pagination option\n\t\t */\n\t\tadd_filter( 'option_posts_per_page', array( $this, 'posts_per_page' ) );\n\n\t\t/**\n\t\t * Register theme customize panels\n\t\t */\n\t\tadd_action( 'mountain/customize-panels', array( $this, 'customize_panels' ) );\n\n\t\t/**\n\t\t * Register theme customize sections\n\t\t */\n\t\tadd_action( 'mountain/customize-sections', array( $this, 'customize_sections' ) );\n\n\t\t/**\n\t\t * Register theme customize controls\n\t\t */\n\t\tadd_action( 'mountain/customize-controls', array( $this, 'customize_controls' ) );\n\n\t\t/**\n\t\t * Register project metabox\n\t\t */\n\t\tadd_action( 'add_meta_boxes', array( $this, 'add_metabox' ) );\n\n\t\t/**\n\t\t * Register action for save project settings\n\t\t */\n\t\tadd_action( 'save_post', array( $this, 'save_project_settings' ) );\n\n\t\t/**\n\t\t * Register action to enqueue admin assets\n\t\t */\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );\n\t}", "static function init_js_composer(){\n\n\t\t\tif(defined('WPB_VC_VERSION')){//check if visual composer is active and the version is 3.7 or greater.\n\n\t\t\t\tif( version_compare(WPB_VC_VERSION, '3.7') <= 0){\n\n\t\t\t\t\tadd_action( 'admin_notices', array(__CLASS__, 'admin_version_notification') );\n \n\t\t\t\t} else {\n\n\t\t\t\t\tself::add_actions();\n\t\t\t\t\trequire_once(PS_PATH . \t'config/setup.php');\n\t\t\t\t\trequire_once(PS_PATH . \t'config/custon_paramaters.php');\n\t\t\t\t\tself::declare_shortcodes();\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tadd_action( 'admin_notices', array(__CLASS__, 'admin_activation_notification') );\n\t\t\t}\n\t\t}", "public function after_setup_theme()\n {\n }", "protected function configure()\n {\n parent::configure();\n\n $this->composer = new Composer($this->preset->filesystem(), $this->preset->basePath());\n }", "public function test_creating_a_project()\n {\n $project = ProjectFactory::create();\n\n $this->assertCount(1,$project->activity);\n\n\n tap($project->activity->last(),function($activity){\n\n $this->assertEquals('created',$activity->description);\n\n $this->assertNull($activity->changes);\n\n });\n }", "public function finish(): void\n {\n }", "private function createProject() {\n\n require_once('../ProjectController.php');\n $maxMembers = $this->provided['maxMembers'];\n $minMembers = $this->provided['minMembers'];\n $difficulty = $this->provided['difficulty'];\n $name = $this->provided['name'];\n $description = $this->provided['description'];\n //TODO REMOVE ONCE FETCHED\n //$tags = $this->provided['tags'];\n setcookie('userId', \"userId\", 0, \"/\");\n // TODO FIX ISSUE HERE: you have to reload the page to get the result with a cookie set\n $tags = array(new Tag(\"cool\"), new Tag(\"java\"), new Tag(\"#notphp\"));\n $project = new Project($maxMembers, $minMembers, $difficulty, $name, $description, $tags);\n foreach (ProjectController::getAllPools() as $pool) {\n if ($pool->hasID($this->provided['sessionID'])) {\n $pool->addProject($project, $tags);\n ProjectController::redirectToHomeAdmin($pool);\n }\n }\n }", "public static function postInstall(Event $event)\n {\n require_once $event->getComposer()->getConfig()->get('vendor-dir') . '/autoload.php';\n\n self::setEnv();\n }", "public function afterHandle()\n {\n $this->createStubs();\n $this->alert('Done Boss');\n }", "public function afterCallActionHandler()\n\t{\n\t\t$committer = AssetCommitterFactory::getCommitter();\n\n\t\t// Check if there are any pushable commits\n\t\tif ($committer->isPushingEnabled() && $committer->hasCreatedNewCommits())\n\t\t{\n\t\t\t$committer->PushToRemoteRepository();\n\t\t}\n\t}", "public function makeProject()\n {\n return $this->setDocumentPropertiesWithMetas(new PhpProject());\n }", "public function setUpTheme() {\n parent::setUpPlugin();\n\n $this->composer->addAction( 'edit_post', 'saveMetaBoxes' );\n $this->composer->addAction( 'wp_ajax_wpb_get_element_backend_html', 'elementBackendHtmlJavascript_callback' );\n $this->composer->addAction( 'wp_ajax_wpb_shortcodes_to_visualComposer', 'shortCodesVisualComposerJavascript_callback' );\n $this->composer->addAction( 'wp_ajax_wpb_show_edit_form', 'showEditFormJavascript_callback' );\n $this->composer->addAction('wp_ajax_wpb_save_template', 'saveTemplateJavascript_callback');\n $this->composer->addAction('wp_ajax_wpb_load_template', 'loadTemplateJavascript_callback');\n $this->composer->addAction('wp_ajax_wpb_delete_template', 'deleteTemplateJavascript_callback');\n\n // Add specific CSS class by filter\n $this->addFilter('body_class', 'jsComposerBodyClass');\n $this->addFilter( 'get_media_item_args', 'jsForceSend' );\n\n $this->addAction( 'admin_menu','composerSettings' );\n $this->addAction( 'admin_init', 'composerRedirect' );\n $this->addAction( 'admin_init', 'jsComposerEditPage', 5 );\n\n $this->addAction( 'admin_init', 'registerCss' );\n $this->addAction( 'admin_init', 'registerJavascript' );\n\n $this->addAction( 'admin_print_scripts-post.php', 'editScreen_js' );\n $this->addAction( 'admin_print_scripts-post-new.php', 'editScreen_js' );\n\n /* Create Media tab for images */\n $this->composer->createImagesMediaTab();\n }", "public function afterCallActionHandler()\n {\n $envIsAllowed = Director::isDev() && Config::inst()->get(DataObjectAnnotator::class, 'enabled');\n $skipAnnotation = $this->owner->getRequest()->getVar('skipannotation');\n \n // Only instatiate things when we want to run it, this is for when the module is accidentally installed\n // on non-dev environments for example\n if ($skipAnnotation === null && $envIsAllowed) {\n $this->setUp();\n\n $this->displayMessage(\"<div class='build'><p><b>Generating class docblocks</b></p><ul>\\n\\n\");\n\n $modules = $this->permissionChecker->enabledModules();\n foreach ($modules as $module) {\n $this->annotator->annotateModule($module);\n }\n\n $this->displayMessage(\"</ul>\\n<p><b>Docblock generation finished!</b></p></div>\");\n }\n }", "function autoMetadata(){\n\t\t \n\t\t $this->getMakeMetadata();\n\t\t $this->getProjects();\n\t\t $this->getPersons();\n\t\t $this->getProjectCreators();\n\t\t $this->saveMetadata(); //save the results\n\t }", "protected function createPreCommit() :void\n {\n $this->preCommitConfig();\n $this->preCommitSetup();\n }", "public function fire()\n {\n $this->runCreator($this->buildPackage());\n\n $this->info('Orchestra Platform extension created. Run php artisan dump-autoload');\n }", "public function execute(ProjectDescriptor $project)\n {\n }", "function init__make_release()\n{\n\trequire_code('files2');\n\n\t// Make sure builds folder exists\n\tget_builds_path();\n\n\t// Tracking\n\tglobal $MAKE_INSTALLERS__FILE_ARRAY,$MAKE_INSTALLERS__DIR_ARRAY,$MAKE_INSTALLERS__TOTAL_DIRS,$MAKE_INSTALLERS__TOTAL_FILES;\n\t$MAKE_INSTALLERS__FILE_ARRAY=array();\n\t$MAKE_INSTALLERS__DIR_ARRAY=array();\n\t$MAKE_INSTALLERS__TOTAL_DIRS=0;\n\t$MAKE_INSTALLERS__TOTAL_FILES=0;\n}", "public function beforeInstall()\n\t{}", "public function finish() {\n\t\t$this->_check();\n\t\t$d['title_for_layout'] = __(\"Installation complete\");\n\t\t$path = PLUGIN_CONFIG.'bootstrap.php';\n\t\tif(!$this->Install->changeConfiguration('Database.installed', 'true', $path)){\n\t\t\t$this->Session->setFlash(__(\"Cannot modify Database.installed variable in app/Plugin/Install/Config/bootstrap.php\"), 'Install.alert');\n\t\t}\n\t\t\n\t\tif($this->request->is('post')) {\n\t\t\tCakeSession::delete('Install.create');\n\t\t\tCakeSession::delete('Install.salt');\n\t\t\tCakeSession::delete('Install.seed');\n\t\t\t\n\t\t\t$this->redirect('/');\n\t\t}\n\t\n\t\t$this->set($d);\n\t}", "private function _doProjectsJob($parameters) {\n\t\trequire(wgPaths::getModulePath().'actions/class.projects.php');\n\t\t$class = new documentstructureActionsProjects();\n\t\tif ((bool) $class->init()) { wgError::add('actionok', 2);\n\t\t\treturn true;\n\t\t}\n\t\telse { wgError::add('actionfailed');\n\t\t\treturn false;\n\t\t}\n\t}" ]
[ "0.6951853", "0.6223732", "0.60013527", "0.5837917", "0.5768798", "0.5731014", "0.56544524", "0.5625449", "0.5586626", "0.5584911", "0.55537343", "0.5547075", "0.5485206", "0.5451462", "0.5417309", "0.5415619", "0.5399613", "0.5349584", "0.5326386", "0.53252244", "0.5311584", "0.52512944", "0.52423155", "0.52304286", "0.52245075", "0.52242434", "0.52162075", "0.5215409", "0.52048576", "0.51887494", "0.51815283", "0.5152054", "0.5148505", "0.51342815", "0.5111933", "0.5100366", "0.50876653", "0.5085677", "0.505781", "0.5057432", "0.5028878", "0.5025469", "0.5016851", "0.50094086", "0.500866", "0.5003772", "0.5001532", "0.4993039", "0.4977129", "0.49741527", "0.49707714", "0.4966649", "0.4964745", "0.49632436", "0.49576798", "0.49569988", "0.49552366", "0.4953102", "0.49432868", "0.49421546", "0.49410856", "0.49384642", "0.49350697", "0.49293974", "0.4928556", "0.4918395", "0.49143896", "0.49138132", "0.49109438", "0.49082065", "0.49062774", "0.48976046", "0.4894707", "0.48843846", "0.48801118", "0.48708817", "0.48708662", "0.48669294", "0.48668322", "0.4864024", "0.4857656", "0.48472708", "0.48470896", "0.4844911", "0.4843108", "0.4837696", "0.4836188", "0.48324594", "0.48311248", "0.4827514", "0.4824289", "0.48194587", "0.48177612", "0.48148015", "0.48010883", "0.48008323", "0.47982705", "0.4791511", "0.47809792", "0.47794226" ]
0.5642597
7
Show Willow fancy Banner
public static function fancyBanner(CLImate $cli): void { // Display Willow's fancy message $cli->forceAnsiOn(); $cli->green()->border('*', 55); $cli->addArt(__DIR__); $cli->bold()->lightGreen()->animation('willow')->speed(200)->enterFrom('left'); $cli->backgroundGreen()->lightGray(' https://github.com/RyanNerd/willow'); $cli->green()->border('*', 55); $cli->bold()->white()->inline('Thanks for installing '); $cli->bold()->lightGreen()->inline('Willow'); $cli->bold()->white('!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display_banner() {\n\n\t\tif ( empty( $this->browser_args['banner'] ) ) {\n\t\t\treturn;\n\t\t}\n\n \t\t$banner = $this->browser_args['banner'];\n\n \t\t$defaults = array(\n \t\t\t'html' => '',\n\t\t\t'src' => '',\n\t\t\t'url' => '',\n\t\t\t'title' => '',\n\t\t\t'message' => '',\n\t\t);\n\t\t$banner = wp_parse_args( $banner, $defaults );\n\n\t\t$allowedtags = array(\n\t\t\t'a' => array( 'href' => array(),'title' => array(), 'target' => array(), 'style' => array() ),\n\t\t\t'abbr' => array( 'title' => array() ),'acronym' => array( 'title' => array() ),\n\t\t\t'code' => array(), 'pre' => array(), 'em' => array(),'strong' => array(),\n\t\t\t'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array( 'style' => array() ), 'br' => array(), 'div' => array( 'style' => array() ),\n\t\t);\n\n \t\tif ( $banner['src'] && $banner['url'] ) {\n\t \t\techo html( 'a', array( 'href' => esc_url( $banner['url'] ), 'rel' => 'nofollow' ), html( 'img', array( 'src' => esc_attr( $banner['src'] ), 'title' => esc_attr( $banner['title'] ) ), '&nbsp;' ) );\n\t \t} elseif( ! empty( $banner['html'] ) ) {\n\t \t\techo wp_kses_post( $banner['html'], $allowedtags );\n\t \t}\n\n }", "function quadro_options_video_banner() {\n\t?>\n\t<aside class=\"qi-aside banner\">\n\t\t<a href=\"https://artisanthemes.io/kb?utm_source=Indigo&utm_medium=theme&utm_content=101videoBanner\">\n\t\t\t<img src=\"<?php echo get_template_directory_uri(); ?>/images/admin/video-training-banner.jpg\"/>\n\t\t</a>\n\t</aside>\n\t<?php\n}", "public function show(Banner $banner)\n {\n //\n }", "public function show(Banner $banner)\n {\n //\n }", "public function show(Banner $banner)\n {\n //\n }", "public function show(Banner $banner)\n {\n //\n }", "public function Show(){\n\t\techo(\"\n\t\t<div class='$this->claseCSS'>\n\t\t<div class='WidgetTitle'><a id='TitleBlock' href='$this->masURL'><div id='TitleText'>$this->Titulo</div></a></div>\n\t\t\t$this->Contenido\n\t\t\t<div class='footer'><a href='$this->masURL'>Ver m&aacute;s...</a></div>\n\t\t</div>\n\t\t\");\n\t}", "public static function banner() {?>\n \n <section class=\"container-fluid st-banner\" data-aos=\"fade-up\" data-aos-duration=\"800\">\n \t<div class=\"row container\">\n \t\t<div class=\"col-md-12\">\n \t\t\t<h3 class=\"hero-title-w text-center\">Nos adaptamos a ti</h3>\n \t\t\t<ul>\n \t\t\t\t<li><i class=\"far fa-clock\"></i> <span>Elige tu horario</span></li>\n \t\t\t\t<li><i class=\"far fa-heart\"></i><span>Tarifa plana</span></li>\n \t\t\t\t<li><i class=\"far fa-calendar-check\"></i><span>Empieza cuando\n \t\t\t\t\t\tquieras</span></li>\n \t\t\t</ul>\n \t\t\t<ul>\n \t\t\t\t<li><i class=\"fas fa-university\"></i> <span>Clases en la academia y\n \t\t\t\t\t\ten videoconferencia</span></li>\n \t\t\t\t<li><i class=\"fas fa-edit\"></i><span>Tutorías personalizadas con tu\n \t\t\t\t\t\tCoach de Idioma</span></li>\n \t\t\t</ul>\n \t\t</div>\n \t</div>\n </section>\n \n\t<?php }", "function theme_banner($location) {\n $banner = new UN_Banner();\n $banner->setWhere(' (isdeleted=0 OR isdeleted IS NULL) AND location='.$banner->quote(filter_var($location)));\n $aAll = $banner->getAll();\n $output = '';\n foreach($aAll as $k=>$f) {\n $output .= '<p>'.url($f['url'], '<img alt=\"'.$f['origname'] . '\" border=\"0\" src=\"'. LC_UPLOAD . $f['filename'].'\"/>').'</p>'; \n }\n echo $output;\n}", "function farmhouse_do_top_banner() {\n\n if ( get_theme_mod( 'farmhouse-top-banner-visibility', true ) ) {\n\n $button = sprintf( '<button id=\"farmhouse-top-banner-close\"><span class=\"dashicons dashicons-no-alt\"></span><span class=\"screen-reader-text\">%s</span></button>', __( 'Close Top Banner', 'farmhouse-theme' ) );\n printf(\n '<div class=\"farmhouse-top-banner\"><div class=\"farmhouse-top-banner-inner\">%s</div>%s</div>',\n get_theme_mod( 'farmhouse-top-banner-text', farmhouse_get_default_top_banner_text() ),\n $button\n );\n\n }\n\n}", "public function WPHead() {\n\t\t// Just tag the page for fun.\n\t\techo \"\\n\\t\" . '<!-- This site uses Good Old Gallery, get it from http://wp.unwi.se/good-old-gallery -->' . \"\\n\\n\";\n\t}", "function displayBanner()\n\t\t{\n\t\t\techo \"\n <div class='bg2'>\n\t\t\t<h2><em>Accounts Manager</em></h2>\n\t\t\t<p align='center'>\";\n\t\t\t\n\t\t\t// menus\n\t\t\techo \"\n <a href='accounts.php'>Members</a> . \n\t\t\t<a href='accounts.php?event=contributor'>Contributors</a> . \n\t\t\t<a href='accounts.php?event=disabled'>Disabled</a> . \n\t\t\t<a href='accountscompose.php'>Create</a> . \n <a href='search.php?event=accounts'>Search</a>\";\n\t\t\t\n\t\t\techo \"\n </p>\n\t\t\t</div>\";\n\t\t\t\n\t\t\treturn;\n\t\t}", "function uxbannerShortcode( $atts, $content = null ){\n global $flatsome_opt;\n $bannerid = rand();\n extract( shortcode_atts( array(\n 'text_pos' => 'center',\n 'height' => '300px',\n 'text_color' => 'light',\n 'link' => '',\n 'text_width' => '60%',\n 'text_align' => 'center',\n 'text_box' => '',\n 'animation' => 'fadeIn',\n 'animation_duration' => '',\n 'effect' => '',\n 'video_mp4' => '',\n 'video_ogg' => '',\n 'video_webm' => '',\n 'video_sound' => 'false',\n 'hover' => '',\n 'bg' => '', \n 'parallax' => '',\n 'parallax_text' => '',\n 'text_bg' => '',\n 'text_bg_opacity' => '0.8',\n 'padding' => '30px',\n 'callout' => '',\n 'callout_size' => 'small',\n 'data_height' => '',\n 'target' => '',\n ), $atts ) );\n\n ob_start();\n\n // replace ___ with a nice divider\n $fix = array (\n '&nbsp;' => '', \n '<p></p>' => '', \n '<p>[' => '[', \n ']</p>' => ']', \n ']<br />' => ']',\n '_____' => '<div class=\"tx-div large\"></div>',\n '____' => '<div class=\"tx-div medium\"></div>',\n '___' => '<div class=\"tx-div small\"></div>',\n );\n $content = strtr($content, $fix);\n\n $content = do_shortcode( $content ); \n\n $img_link = get_template_directory_uri().'/img/';\n\n $color = \"light\";\n if($text_color == 'light') $color = \"dark\";\n\n if($hover) $hover = 'hover_'.$hover;\n\n $animated = \"\";\n if($animation != \"none\") $animated = \"animated\";\n\n $start_link = \"\";\n $end_link = \"\";\n if($link) {$start_link = '<a href=\"'.$link.'\"';\n if ($target) {\n $start_link .= ' target=\"'.$target.'\" ';\n }\n $start_link .= '>';\n $end_link = '</a>';};\n\n $background = \"\";\n $background_color = \"\";\n if (strpos($bg,'http://') !== false || strpos($bg,'https://') !== false) {\n $background = $bg;\n }\n elseif (strpos($bg,'#') !== false) {\n $background_color = 'background-color:'.$bg.'!important';\n }\n else {\n $bg = wp_get_attachment_image_src($bg, 'large');\n $background = $bg[0];\n }\n\n $textalign = \"\";\n if($text_align) {$textalign = \"text-\".$text_align;}\n\n /* set rgba background */\n if($text_bg){$text_bg = hex2rgba($text_bg,$text_bg_opacity); };\n \n $parallax_class = '';\n if($parallax){$parallax_class = 'ux_parallax'; $parallax='data-velocity=\"'.(intval($parallax)/10).'\"';} \n \n $text_parallax_class = '';\n if($parallax_text){$text_parallax_class = 'parallax_text'; $parallax_text='data-velocity=\"'.(intval($parallax_text)/10).'\"';} \n \n ?>\n \n <div id=\"banner_<?php echo $bannerid; ?>\" class=\"ux_banner <?php if($text_box)echo 'ux-textbox-'.$text_box; ?> <?php echo $color; ?> <?php echo $hover; ?>\" style=\"height:<?php echo $height; ?>\" data-height=\"<?php echo $height; ?>\" role=\"banner\">\n <?php echo $start_link; ?>\n <div class=\"banner-bg zig <?php echo $parallax_class; ?>\" <?php echo $parallax; ?> style=\"background-image:url(<?php echo $background; ?>); <?php echo $background_color; ?>\"></div>\n <?php if($video_mp4 || $video_webm || $video_ogg){ ?>\n <div class=\"video-overlay\" style=\"position:absolute;top:0;bottom:0;right:0;left:0;z-index:2;background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0IxQjNGRDQ0QUMxMTFFMzhBQzM5OUZBMEEzN0Y1RUUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0IxQjNGRDU0QUMxMTFFMzhBQzM5OUZBMEEzN0Y1RUUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFN0M5QzFENzRBQTcxMUUzOEFDMzk5RkEwQTM3RjVFRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFN0M5QzFEODRBQTcxMUUzOEFDMzk5RkEwQTM3RjVFRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhPF5GwAAAAYSURBVHjaYmJgYPD6//8/AyOIAAGAAAMAPRIGSKhmMMMAAAAASUVORK5CYII=');\"></div>\n <video class=\"ux-banner-video hide-for-small\" <?php echo $parallax; ?> style=\"position:absolute;top:0;left:0;bottom:0;right:0;min-width: 100%;min-height: 100%;z-index:1;\" poster=\"<?php echo $background; ?>\" preload=\"auto\" autoplay=\"\" loop=\"loop\" <?php if($video_sound == 'false') echo \"muted='muted'\"; ?>>\n <source src=\"<?php echo $video_mp4; ?>\" type=\"video/mp4\">\n <source src=\"<?php echo $video_webm; ?>\" type=\"video/webm\">\n <source src=\"<?php echo $video_ogg; ?>\" type=\"video/ogg\">\n </video>\n <?php } ?>\n <?php if($effect){ ?>\n <div class=\"banner-effect\"></div>\n <?php } ?>\n <div class=\"row parallax_text <?php echo $text_parallax_class; ?>\" <?php echo $parallax_text; ?>>\n <div class=\"inner <?php echo $text_pos; ?> <?php echo $animated; ?> <?php echo $textalign; ?> <?php if($text_box){echo 'text-boxed';} ?>\n\" data-animate=\"<?php echo $animation; ?>\" style=\"width:<?php echo $text_width; ?>; <?php if($text_bg){echo 'background-color:'.$text_bg.';';} ?> <?php if($text_bg){echo 'padding:'.$padding;} ?>\">\n <?php echo $content; ?>\n <?php if($callout) { ?> \n <div class=\"callout <?php echo $flatsome_opt['bubble_style']; ?>\">\n <div class=\"inner\">\n <div class=\"inner-text\"><?php echo $callout; ?></div>\n </div>\n </div><!-- end callout -->\n <?php } ?>\n </div> \n </div>\n <?php echo $end_link; ?>\n <?php if($animation_duration){ ?><style>#banner_<?php echo $bannerid; ?> .inner{ animation-duration:<?php echo $animation_duration; ?> ; -webkit-animation-duration:<?php echo $animation_duration; ?> ; -moz-animation-duration:<?php echo $animation_duration; ?> ; -o-animation-duration:<?php echo $animation_duration; ?>; } </style><?php } // End animation duration ?>\n\n<?php // EFFECTS // ?>\n<?php if($effect){ ?>\n<?php if($effect === 'snow'){ ?>\n<style>\n@keyframes snow { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n@-moz-keyframes snow { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n@-webkit-keyframes snow { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;\n }\n}\n@-ms-keyframes snow { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/snow1.png'),\n url('<?php echo get_template_directory_uri(); ?>/css/effects/snow2.png'); \n -webkit-animation: snow 20s linear infinite;\n -moz-animation: snow 20s linear infinite;\n -ms-animation: snow 20s linear infinite;\n animation: snow 20s linear infinite;\n}\n</style>\n<?php } // End snow effect ?>\n\n\n<?php if($effect === 'confetti'){ ?>\n<style>\n@keyframes confetti { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n@-moz-keyframes confetti { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n@-webkit-keyframes confetti { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}\n}\n@-ms-keyframes confetti { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/confetti1.png'),\n url('<?php echo get_template_directory_uri(); ?>/css/effects/confetti2.png'); \n -webkit-animation: confetti 10s linear infinite;\n -moz-animation: confetti 10s linear infinite;\n -ms-animation: confetti 10s linear infinite;\n animation: confetti 10s linear infinite;\n}\n</style>\n<?php } // End confetti effect ?>\n\n<?php if($effect === \"sliding-glass\"){ ?>\n<style>\n@keyframes glass { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px}\n}\n@-moz-keyframes glass { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n\n 100% { background-position: 500px 1000px, 400px 400px}\n}\n@-webkit-keyframes glass { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% {background-position: 500px 1000px, -400px -400px; }\n}\n@-ms-keyframes glass { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px }\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/glass1.png'),\n url('<?php echo get_template_directory_uri(); ?>/css/effects/glass2.png'); \n -webkit-animation: glass 30s linear infinite;\n -moz-animation: glass 30s linear infinite;\n -ms-animation: glass 30s linear infinite;\n animation: glass 30s linear infinite;\n}\n</style>\n<?php } // End sliding glass effect ?>\n\n\n<?php if($effect === 'sparkle'){ ?>\n<style>\n@keyframes sparkle { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: -500px -1000px, -400px -400px, 300px 300px }\n}\n@-moz-keyframes sparkle { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: -500px -1000px, -400px -400px, 300px 300px }\n}\n@-webkit-keyframes sparkle { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% {background-position: -500px -1000px, -200px -400px, 300px 300px;\n }\n}\n@-ms-keyframes sparkle { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: -500px -1000px, -400px -400px, 300px 300px }\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/sparkle1.png'),\n url('<?php echo get_template_directory_uri(); ?>/css/effects/sparkle2.png');\n -webkit-animation: sparkle 60s linear infinite;\n -moz-animation: sparkle 60s linear infinite;\n -ms-animation: sparkle 60s linear infinite;\n animation: sparkle 60s linear infinite;\n}\n</style>\n<?php } // End sparkle effect ?>\n\n\n\n<?php if($effect === 'rain'){ ?>\n<style>\n@keyframes rain { \n 0% { background-position: 0px 0px }\n 100% { background-position: 500px 1000px }\n}\n@-moz-keyframes rain { \n 0% { background-position: 0px 0px }\n 100% { background-position: 500px 1000px }\n}\n@-webkit-keyframes rain { \n 0% { background-position: 0px 0px }\n 100% {background-position: 500px 1000px;\n }\n}\n@-ms-keyframes rain { \n 0% { background-position: 0px 0px}\n 100% { background-position: 500px 1000px}\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/rain.png');\n -webkit-animation: rain 2s linear infinite;\n -moz-animation: rain 2s linear infinite;\n -ms-animation: rain 2s linear infinite;\n animation: rain 2s linear infinite;\n}\n</style>\n<?php } // End sparkle effect ?>\n<?php } ?>\n\n\n\n</div><!-- end .ux_banner -->\n\n<?php \n\n $content = ob_get_contents();\n ob_end_clean();\n return $content;\n \n}", "function ThemeistsLogoShowcase()\n\t\t\t{\n\t\t\n\t\t\t\t//load_plugin_textdomain( self::locale, false, plugin_dir_path( dirname( dirname( __FILE__ ) ) ) . '/lang/' );\n\n\t\t\n\t\t\t\t$widget_opts = array (\n\n\t\t\t\t\t'classname' => 'ThemeistsLogoShowcase', \n\t\t\t\t\t'description' => __( 'A simple widget to showcase your client\\'s logos', self::locale )\n\n\t\t\t\t);\n\n\t\t\t\t$control_options = array(\n\n\t\t\t\t\t'width' => '400'\n\n\t\t\t\t);\n\n\t\t\t\t//Register the widget\n\t\t\t\t$this->WP_Widget( self::slug, __( self::name, self::locale ), $widget_opts, $control_options );\n\t\t\n\t\t \t// Load JavaScript and stylesheets\n\t\t \t$this->register_scripts_and_styles();\n\t\t\n\t\t\t}", "function honeycomb_page_banner() {\n\t\tglobal $post;\n\n\t\tif ( !isset($post->ID) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$post_id = $post->ID;\n\t\tif ( is_post_type_archive('property') )\n\t\t{\n\t\t\t$post_id = ph_get_page_id( 'search_results' );\n\t\t}\n\n\t\t$banner_type = get_post_meta( $post_id, '_banner_type', TRUE );\n\n\t\tswitch ( $banner_type )\n\t\t{\n\t\t\tcase \"map\":\n\t\t\t{\n\t\t\t\tif ( class_exists( 'PH_Map_Search' ) )\n\t\t\t\t{\n\t\t\t\t\t$query = '';\n\n\t\t\t\t\tif ( is_post_type_archive('property') )\n\t\t\t\t\t{\n\t\t\t\t\t\tglobal $wp_query;\n\n\t\t\t\t $query = $wp_query->request;\n\n\t\t\t\t // Remove limit\n\t\t\t\t $last_limit_pos = strrpos(strtolower($query), \"limit\");\n\t\t\t\t if ($last_limit_pos !== FALSE)\n\t\t\t\t {\n\t\t\t\t // We found a limit\n\t\t\t\t $query = substr($query, 0, $last_limit_pos - 1); // -1 because strrpos return starts at zero\n\t\t\t\t }\n\n\t\t\t\t $query = base64_encode($query);\n\t\t\t\t\t}\n\n\t\t\t\t\techo do_shortcode('[propertyhive_map_search scrollwheel=\"false\" query=\"' . $query . '\"]');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo __( 'The Property Hive Map Search add on does not exist or is not activated', 'honeycomb' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"revslider\":\n\t\t\t{\n\t\t\t\tif ( class_exists( 'RevSlider' ) ) \n\t\t\t\t{\n\t\t\t\t\t$rev_slider = esc_html( get_post_meta( $post_id, '_banner_rev_slider', TRUE ) ); \n\t\t\t\t\tputRevSlider($rev_slider);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo __( 'Revolution Slider does not exist or is not activated', 'honeycomb' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"featured\":\n\t\t\t{\n\t\t\t\tif ( has_post_thumbnail($post_id) ) \n\t\t\t\t{\n\t\t\t\t\t$url = get_the_post_thumbnail_url($post_id, 'full');\n\t\t\t\t\techo '<div class=\"featured-image-page-banner\" style=\"background-image:url(\\'' . $url . '\\');\"></div>';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public function banner()\n {\n $artikel = Artikel::latest()->get()->random(2);\n $artikels = Artikel::latest()->paginate(5);\n $comments = Comment::where('approve','1')->get();\n $projects = counter::latest()->paginate(5);\n counter::increment('views');\n return view('landingpage', compact('comments','projects','artikel','artikels'));\n }", "public static function print_banner() {\n\t\tprint $GLOBALS['i18n']['framework']['cli_banner'] . \"\\n\";\n\t}", "private function print_banner() {\n if ($this->debug_state('banner')) {\n echo PHP_EOL, 'PHP Daemon - Worker Debug Console';\n echo PHP_EOL, 'Use `help` for list of commands', PHP_EOL, PHP_EOL;\n $this->debug_state('banner', false);\n }\n }", "public function bannerAction()\n {\n $brand = $this->route['brand'];\n $category = $this->route['category'];\n $vars['products'] = $this->model->getProductsByCategoryAndBrand($category,$brand);\n $this->view->render('Riding Gear', $vars);\n }", "public function print_media_templates() {\n if ( ! isset( get_current_screen()->id ) || get_current_screen()->base != 'post' )\n return;\n ?>\n <script type=\"text/html\" id=\"tmpl-editor-boutique-banner\">\n\t\t\t\t<b class=\"wp-svg-{{ data.icon }}\"></b>\n\t\t</script>\n <?php\n }", "function halter() {\n print \"<section class=\\\"w3-row w3-theme\\\">\\n\"; // Banner\n print \"<article class=\\\"w3-col m3 l2 w3-cell w3-theme w3-center\\\">\\n\"; // Logo Block\n print \"<img title=\\\"Logo\\\" alt=\\\"Or, A Chamfron and in base the letters IKEqC vert.\\\" src=\\\"I3Logo3.png\\\">\\n\";\n print \"</article>\\n\"; // End Logo block\n print \"<article class=\\\"w3-col m9 l10 w3-theme w3-center w3-cell-middle\\\">\\n\"; // Title Block\n print \"<H1>Inter-Kingdom Equestrian Competition</H1>\\n\";\n long_as();\n print \"<div class=\\\"w3-bar w3-center\\\">\\n\"; // Quick Links\n print \"<a href=\\\"https://scaikeqc.org/rules/index.php\\\" class=\\\"w3-bar-item w3-button w3-mobile\\\">Rules</a>\\n\";\n print \"<a href=\\\"https://scaikeqc.org/emta.php\\\" class=\\\"w3-bar-item w3-button w3-mobile\\\">EM/TA Portal</a>\\n\";\n print \"<a href=\\\"https://scaikeqc.org/dl/index.php\\\" class=\\\"w3-bar-item w3-button w3-mobile\\\">Forms/Downloads</a>\\n\";\n print \"<a href=\\\"https://scaikeqc.org/blog/index.php\\\" class=\\\"w3-bar-item w3-button w3-mobile\\\">Blog</a>\\n\";\n print \"</div>\"; // End Quick Links\n print \"</article>\\n\"; // End Title block\n print \"</section>\\n\"; // End Banner block\n}", "function cpl_wra() {\n\t//You May NOT Edit It!\n\techo \"<img src='http://www.auburnflame.com/brk1.gif'>\";\n}", "public function create()\n {\n echo 'create a banner juice';\n }", "function slide_show_splash()\n {\n // Grab the category information\n if( $this->ipsclass->input['cat'] )\n {\n $info = $this->setup_cat();\n }\n else\n {\n $info = $this->setup_album();\n }\n \n // Show the form\n $this->output .= $this->html->ss_form();\n\n $sort = $this->glib->build_sort_order_info( $info['def_view'] );\n\n $this->output = preg_replace( \"/<#SORT_KEY_HTML#>/\", $sort['SORT_KEY_HTML'], $this->output );\n $this->output = preg_replace( \"/<#ORDER_HTML#>/\" , $sort['ORDER_KEY_HTML'], $this->output );\n $this->output = preg_replace( \"/<#PRUNE_HTML#>/\" , $sort['PRUNE_KEY_HTML'], $this->output );\n \n // Page Info\n $this->title = $this->ipsclass->vars['board_name'].$this->ipsclass->lang['sep'].$this->ipsclass->lang['gallery'];\n $this->nav[] = \"<a href='{$this->ipsclass->base_url}act=module&amp;module=gallery'>{$this->ipsclass->lang['gallery']}</a>\";\n $this->nav[] = \"{$this->ipsclass->lang['ss_start']} {$info['name']}\";\n }", "function printFull()\n {\n echo'<div class=\"box\" style=\"background-image: url(\\'';\n if($this->img!=\"\")echo $this->img;\n else echo(\"https://$_SERVER[HTTP_HOST]/media/favicons/placeholder.jpg\");\n echo'\\');\">\n <div class=\"box-overlay\">\n <div>\n <h6>'.$this->name.'</h6>';\n if($this->position!=\"\")echo'<h5 class=\"w\" style=\"margin-bottom:3px;margin-top: 3px;\">'.$this->position.'</h5>';\n if($this->email!=\"\")echo'<span><a href=\"mailto:'.$this->email.'@pacificmun.com\">'.$this->email.'@pacificmun.com</a></span>';\n echo'</div><p>'.$this->bio.'</p>\n </div></div>';\n }", "private function makeBanner($stream)\r\n {\r\n $BANNER = \"<!--# banner -->\";\r\n \r\n if (strpos($stream, $BANNER) === FALSE) {\r\n echo \"No banner<br>\";\r\n return $stream;\r\n }\r\n\r\n $image = '{impath}/' . $this->customer->bannerimage();\r\n $content = \"<img src='$image' style='width:100%; height:300px'>\";\r\n $content .= \"<div id='bannerContent'>\";\r\n $content .= $this->customer->bannercontent();\r\n $content .= \"</div>\";\r\n\r\n return str_replace($BANNER, $content, $stream);\r\n }", "function honeycomb_page_header() {\n\t\tglobal $post;\n\n\t\t$post_id = $post->ID;\n\t\tif ( is_post_type_archive('property') )\n\t\t{\n\t\t\t$post_id = ph_get_page_id( 'search_results' );\n\t\t}\n\n\t\t$banner_type = get_post_meta( $post_id, '_banner_type', TRUE );\n\n\t\t$show_post_thumbnail = true;\n\t\tif ( $banner_type == 'featured' ) { $show_post_thumbnail = false; } // don't show post thumbnail if it's already been used as the page banner\n\t\t?>\n\t\t<header class=\"entry-header\">\n\t\t\t<?php\n\t\t\tif ( $show_post_thumbnail ) honeycomb_post_thumbnail( 'full' );\n\t\t\tthe_title( '<h1 class=\"entry-title\">', '</h1>' );\n\t\t\t?>\n\t\t</header><!-- .entry-header -->\n\t\t<?php\n\t}", "function displayEggBanner($mode=0)\n{\n\tglobal $cfg,$egg,$pg,$escrow;\n\n\tif(!$cfg) @include dirname(__FILE__).\"/../../conf/config.php\";\n\tif(!$egg) @include dirname(__FILE__).\"/../../conf/egg.usafe.php\";\n\tif(!$escrow) @include dirname(__FILE__).\"/../../conf/pg.escrow.php\";\n\tif((!is_array($pg) && $cfg[settlePg]) || is_object($pg)) {\n\t\t$pg = null;\n\t\t@include dirname(__FILE__).\"/../../conf/pg.\".$cfg[settlePg].\".php\";\n\t}\n\t$compSerial = str_replace('-','',$cfg['compSerial']);\n\n\t$tags[0][usafe] = \"<script>function usafe(){var win=window.open('http://www.usafe.co.kr/usafeShopCheck.asp?com_no=\".$compSerial.\"','', 'width=500, height=370, scrollbars=no, location=yes,status=yes,left=0, top=0');}</script><a href=\\\"javascript:usafe()\\\"><img src='../skin/\".$cfg['tplSkin'].\"/img/banner/usafe.gif' border=0></a>\";\n\n\tif ($escrow[type] == 'INI') {\n\t\t$tags[0][inicis] = stripslashes(html_entity_decode($escrow['eggDisplayLogo'], ENT_QUOTES));\n\t} else {\n\t\t$tags[0][inicis] = \"<a href='http://www.hanaescrow.com/hnbecc/serviceJoinSrchManagement/escser003l.jsp?shopBsnNo=\".$compSerial.\"&mid=\".$escrow[id].\"' target=_blank><img src='../skin/\".$cfg['tplSkin'].\"/img/banner/inicis.gif' border=0></a>\";\n\t}\n\n\t$tags[0][inipay] = stripslashes(html_entity_decode($escrow['eggDisplayLogo'], ENT_QUOTES));\n\n\t$tags[0][dacom] = \"<script>function dacom(){var win=window.open('https://pgweb.dacom.net/pg/wmp/mertadmin/jsp/mertservice/s_escrowYn.jsp?mertid=\".$pg[id].\"','check','width=339, height=263, scrollbars=no, left = 200, top = 50');}</script><a href=\\\"javascript:dacom()\\\"><img src='../skin/\".$cfg['tplSkin'].\"/img/banner/dacom.gif' border=0></a>\";\n\n\t$tags[0][allat] = \"<script>function f_escrowAllat(){var win=window.open('https://www.allatpay.com/servlet/AllatBiz/svcinfo/si_escrowview.jsp?menu_id=idS16&shop_id=\".$pg[id].\"&business_no=\".$compSerial.\"','allat_escrow','top=0,left=0,width=980,height=600,scrollbars,menubar=no,resizable,status,location=yes,toolbar=yes');}</script><a href=\\\"javascript:f_escrowAllat()\\\"><img src='../skin/\".$cfg['tplSkin'].\"/img/banner/allat.gif' border=0></a>\";\n\n\t$tags[0][allatbasic] = \"<script>function f_escrowAllat(){var win=window.open('https://www.allatpay.com/servlet/AllatBiz/svcinfo/si_escrowview.jsp?menu_id=idS16&shop_id=\".$pg[id].\"&business_no=\".$compSerial.\"','allat_escrow','top=0,left=0,width=980,height=600,scrollbars,menubar=no,resizable,status,location=yes,toolbar=yes');}</script><a href=\\\"javascript:f_escrowAllat()\\\"><img src='../skin/\".$cfg['tplSkin'].\"/img/banner/allat.gif' border=0></a>\";\n\n\t$tags[0][kcp] = \"<script language=\\\"JavaScript\\\">function go_check(){var status = \\\"width=500 height=450 menubar=no,scrollbars=no,resizable=no,status=no\\\"; var obj = window.open('', 'kcp_pop', status);document.shop_check.method = \\\"post\\\";document.shop_check.target = \\\"kcp_pop\\\";document.shop_check.action = \\\"http://admin.kcp.co.kr/Modules/escrow/kcp_pop.jsp\\\";document.shop_check.submit();}</script><form name=\\\"shop_check\\\" method=\\\"post\\\" action=\\\"http://admin.kcp.co.kr/Modules/escrow/kcp_pop.jsp\\\"><input type=\\\"hidden\\\" name=\\\"site_cd\\\" value=\\\"\".$pg[id].\"\\\"><a href='javascript:go_check()'><img src='../skin/\".$cfg['tplSkin'].\"/img/banner/kcp.gif' border=0></a></form>\";\n\n\t$tags[0][agspay] = \"<a href=\\\"http://www.allthegate.com/hyosung/support/escrow.jsp\\\"><img src='../skin/\".$cfg['tplSkin'].\"/img/banner/agspay.gif' border=0></a>\";\n\t$tags[0][easypay] = \"<a href='http://www.easypay.co.kr/escrow/escrow_memb_auth.jsp?memb_id=\".$pg[id].\"' target=\\\"_blank\\\"><img src='../skin/\".$cfg['tplSkin'].\"/img/banner/easypay.gif' border=0></a>\";\n\t$tags[1][usafe] = \"<table width=100% style='border:1px solid #DEDEDE' cellpadding=0 cellspacing=0>\n\t\t\t\t\t\t<tr><td style='padding-left:25px;padding-top:10px;' height=130 valign=middle>\n\t\t\t\t\t\t\t<div style='height:20px;'>* 고객님은 안전거래를 위하여 현금 등으로 결제시 저희 쇼핑몰에서 가입한 <span class='red'><b>쇼핑몰보증보험 구매안전서비스</b></span>를</div>\n\t\t\t\t\t\t\t<div style='height:20px;padding-left:10px;'>이용하실 수 있습니다.</div>\n\t\t\t\t\t\t\t<div style='height:20px;'>* 보상대상 : <span class='red'><b>미배송,반품/환불거부, 쇼핑몰부도</b></span></div>\n\t\t\t\t\t\t\t<div style='height:20px;'>* 구매안전서비스를 통하여 주문하시고 <span class='red'><b>서울보증보험에서 발행하는 보험계약 체결내역서를 반드시 확인</b></span></div>\n\t\t\t\t\t\t\t<div style='height:20px;padding-left:10px;'>하시기 바랍니다.</div>\n\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t\t</table><div style='font-size:0;height:5px'></div>\";\n\tif ($escrow[type] == 'INI') {\n\t\t$tags[1][inicis] = \"<table width=100% style='border:1px solid #DEDEDE' cellpadding=0 cellspacing=0>\n\t\t\t\t\t\t<tr><td style='padding-left:25px;padding-top:10px;' height=70 valign=middle>\n\t\t\t\t\t\t\t<div style='height:20px;'>* 고객님은 안전거래를 위하여 현금 등으로 결제시 저희 쇼핑몰에서 가입한 <span class='red'><b>이니시스의 구매안전(에스크로)</b></span></div>\n\t\t\t\t\t\t\t<div style='height:20;padding-left:10px;'><span class='red'><b>서비스</b></span>를 이용하실 수 있습니다.</div>\n\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t\t</table><div style='font-size:0;height:5px'></div>\";\n\t} else {\n\t\t$tags[1][inicis] = \"<table width=100% style='border:1px solid #DEDEDE' cellpadding=0 cellspacing=0>\n\t\t\t\t\t\t<tr><td style='padding-left:25px;padding-top:10px;' height=70 valign=middle>\n\t\t\t\t\t\t\t<div style='height:20px;'>* 고객님은 안전거래를 위하여 현금 등으로 결제시 저희 쇼핑몰에서 가입한 <span class='red'><b>하나은행의 구매안전(에스크로)</b></span></div>\n\t\t\t\t\t\t\t<div style='height:20px;padding-left:10px;'><span class='red'><b>서비스</b></span>를 이용하실 수 있습니다.</div>\n\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t\t</table><div style='font-size:0;height:5px'></div>\";\n\t}\n\n\t$tags[1][inipay] = \"<table width=100% style='border:1px solid #DEDEDE' cellpadding=0 cellspacing=0>\n\t\t\t\t\t\t<tr><td style='padding-left:25px;padding-top:10px;' height=70 valign=middle>\n\t\t\t\t\t\t\t<div style='height:20px;'>* 고객님은 안전거래를 위하여 현금 등으로 결제시 저희 쇼핑몰에서 가입한 <span class='red'><b>이니시스의 구매안전(에스크로)</b></span></div>\n\t\t\t\t\t\t\t<div style='height:20px;padding-left:10px;'><span class='red'><b>서비스</b></span>를 이용하실 수 있습니다.</div>\n\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t\t</table><div style='font-size:0;height:5px'></div>\";\n\n\t$tags[1][dacom] = \"<table width=100% style='border:1px solid #DEDEDE' cellpadding=0 cellspacing=0>\n\t\t\t\t\t\t<tr><td style='padding-left:25px;padding-top:10px;' height=70 valign=middle>\n\t\t\t\t\t\t\t<div style='height:20px;'>* 고객님은 안전거래를 위해 현금 등으로 결제시 저희 쇼핑몰에서 가입한 <span class='red'><b>LG데이콤의 구매안전(에스크로)</b></span></div>\n\t\t\t\t\t\t\t<div style='height:20px;padding-left:10px;'><span class='red'><b>서비스</b></span>를 이용하실 수 있습니다.</div>\n\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t\t</table><div style='font-size:0;height:5px'></div>\";\n\t$tags[1][allat] = \"<table width=100% style='border:1px solid #DEDEDE' cellpadding=0 cellspacing=0>\n\t\t\t\t\t\t<tr><td style='padding-left:25px;padding-top:10px;' height=70 valign=middle>\n\t\t\t\t\t\t\t<div style='height:20px;'>* 고객님은 안전거래를 위하여 현금 등으로 결제시 저희 쇼핑몰에서 가입한 <span class='red'><b>올엣의 구매안전(에스크로)</b></span></div>\n\t\t\t\t\t\t\t<div style='height:20px;padding-left:10px;'><span class='red'><b>서비스</b></span>를 이용하실 수 있습니다.</div>\n\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t\t</table><div style='font-size:0;height:5px'></div>\";\n\t$tags[1][allatbasic] = \"<table width=100% style='border:1px solid #DEDEDE' cellpadding=0 cellspacing=0>\n\t\t\t\t\t\t<tr><td style='padding-left:25px;padding-top:10px;' height=70 valign=middle>\n\t\t\t\t\t\t\t<div style='height:20px;'>* 고객님은 안전거래를 위하여 현금 등으로 결제시 저희 쇼핑몰에서 가입한 <span class='red'><b>올엣의 구매안전(에스크로)</b></span></div>\n\t\t\t\t\t\t\t<div style='height:20px;padding-left:10px;'><span class='red'><b>서비스</b></span>를 이용하실 수 있습니다.</div>\n\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t\t</table><div style='font-size:0;height:5px'></div>\";\n\t$tags[1][kcp] = \"<table width=100% style='border:1px solid #DEDEDE' cellpadding=0 cellspacing=0>\n\t\t\t\t\t\t<tr><td style='padding-left:25px;padding-top:10px;' height=70 valign=middle>\n\t\t\t\t\t\t\t<div style='height:20px;'>* 고객님은 안전거래를 위하여 현금 등으로 결제시 저희 쇼핑몰에서 가입한 <span class='red'><b>KCP의 구매안전(에스크로)</b></span></div>\n\t\t\t\t\t\t\t<div style='height:20px;padding-left:10px;'><span class='red'><b>서비스</b></span>를 이용하실 수 있습니다.</div>\n\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t\t</table><div style='font-size:0;height:5px'></div>\";\n\t$tags[1][agspay] = \"<table width=100% style='border:1px solid #DEDEDE' cellpadding=0 cellspacing=0>\n\t\t\t\t\t\t<tr><td style='padding-left:25px;padding-top:10px;' height=70 valign=middle>\n\t\t\t\t\t\t\t<div style='height:20px;'>* 고객님은 안전거래를 위하여 현금 등으로 결제시 저희 쇼핑몰에서 가입한 <span class='red'><b>올더게이트의 구매안전(에스크로)</b></span></div>\n\t\t\t\t\t\t\t<div style='height:20px;padding-left:10px;'><span class='red'><b>서비스</b></span>를 이용하실 수 있습니다.</div>\n\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t\t</table><div style='font-size:0;height:5px'></div>\";\n\t$tags[1][easypay] = \"<table width=100% style='border:1px solid #DEDEDE' cellpadding=0 cellspacing=0>\n\t\t\t\t\t\t<tr><td style='padding-left:25px;padding-top:10px;' height=70 valign=middle>\n\t\t\t\t\t\t\t<div style='height:20px;'>* 고객님은 안전거래를 위하여 현금 등으로 결제시 저희 쇼핑몰에서 가입한 <span class='red'><b>이지페이의 구매안전(에스크로)</b></span></div>\n\t\t\t\t\t\t\t<div style='height:20px;padding-left:10px;'><span class='red'><b>서비스</b></span>를 이용하실 수 있습니다.</div>\n\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t\t</table><div style='font-size:0;height:5px'></div>\";\n\tif($egg['use'] == 'Y'){\n\t\t$img = $tags[$mode][usafe];\n\t}else if($escrow['use'] == 'Y'){\n\t\t$img = $tags[$mode][$cfg[settlePg]];\n\t\tif($cfg['settlePg']=='lgdacom')$img = $tags[$mode]['dacom'];\n\t}\n\n\n\t//return $tags[0][usafe];\n\tif(!$img && !$mode)\t$img = \"\";\n\tif( $cfg[displayEgg] == 1 || ($cfg[displayEgg] == 0 && ( preg_match('/index.php/',$_SERVER[PHP_SELF]) || preg_match('/order.php/',$_SERVER[PHP_SELF]) )) ){\n\t\treturn $img;\n\t}else{\n\t\treturn '';\n\t}\n}", "public static function getBannerHTML() {\n\t\tglobal $wgAdConfig;\n\n\t\t$skinName = self::determineSkin();\n\n\t\t$adSlot = '';\n\t\tif ( isset( $wgAdConfig[$skinName . '-banner-ad-slot'] ) ) {\n\t\t\t$adSlot = $wgAdConfig[$skinName . '-banner-ad-slot'];\n\t\t}\n\n\t\tif ( isset( $wgAdConfig['debug'] ) && $wgAdConfig['debug'] === true ) {\n\t\t\treturn '<!-- Begin banner ad (ShoutWikiAds) -->\n\t\t<div id=\"' . $skinName . '-banner-ad\" class=\"' . $skinName . '-ad noprint\">\n\t\t\t<img src=\"http://www.google.com/help/hc/images/adsense/adsense_185665_adformat-text_468x60_en.png\" alt=\"\" />\n\t\t</div>\n<!-- End banner ad (ShoutWikiAds) -->' . \"\\n\";\n\t\t}\n\n\t\tif ( isset( $wgAdConfig['mode'] ) && $wgAdConfig['mode'] == 'responsive' ) {\n\t\t\t$adHTML = '<ins class=\"adsbygoogle\"\n\t\t\t\tstyle=\"display:block\"\n\t\t\t\tdata-ad-client=\"ca-pub-' . $wgAdConfig['adsense-client'] . '\"\n\t\t\t\tdata-ad-slot=\"' . $adSlot . '\"\n\t\t\t\tdata-ad-format=\"horizontal\"></ins>\n\t\t\t<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>';\n\t\t} else {\n\t\t\t$borderColorMsg = wfMessage( 'shoutwiki-' . $skinName . '-banner-ad-color-border' )->inContentLanguage();\n\t\t\t$colorBGMsg = wfMessage( 'shoutwiki-' . $skinName . '-banner-ad-color-bg' )->inContentLanguage();\n\t\t\t$colorLinkMsg = wfMessage( 'shoutwiki-' . $skinName . '-banner-ad-color-link' )->inContentLanguage();\n\t\t\t$colorTextMsg = wfMessage( 'shoutwiki-' . $skinName . '-banner-ad-color-text' )->inContentLanguage();\n\t\t\t$colorURLMsg = wfMessage( 'shoutwiki-' . $skinName . '-banner-ad-color-url' )->inContentLanguage();\n\n\t\t\t$colorBorderDefault = 'F6F4C4';\n\t\t\t$colorBGDefault = 'FFFFE0';\n\t\t\t$colorLinkDefault = '000000';\n\t\t\t$colorURLDefault = '002BB8';\n\n\t\t\t// different defaults for Truglass from old Truglass ad code\n\t\t\tif ( $skinName == 'truglass' ) {\n\t\t\t\t$colorBorderDefault = 'CDCDCD';\n\t\t\t\t$colorBGDefault = 'FFFFFF';\n\t\t\t\t$colorLinkDefault = '0066FF';\n\t\t\t\t$colorURLDefault = '00A000';\n\t\t\t}\n\n\t\t\t$adHTML = '<script type=\"text/javascript\">\ngoogle_ad_client = \"pub-' . $wgAdConfig['adsense-client'] . '\";\ngoogle_ad_slot = \"' . $adSlot . '\";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\ngoogle_ad_format = \"468x60_as\";\n//google_ad_type = \"\";\ngoogle_ad_channel = \"\";\ngoogle_color_border = ' . Xml::encodeJsVar( $borderColorMsg->isDisabled() ? $colorBorderDefault : $borderColorMsg->text() ) . ';\ngoogle_color_bg = ' . Xml::encodeJsVar( $colorBGMsg->isDisabled() ? $colorBGDefault : $colorBGMsg->text() ) . ';\ngoogle_color_link = ' . Xml::encodeJsVar( $colorLinkMsg->isDisabled() ? $colorLinkDefault : $colorLinkMsg->text() ) . ';\ngoogle_color_text = ' . Xml::encodeJsVar( $colorTextMsg->isDisabled() ? '000000' : $colorTextMsg->text() ) . ';\ngoogle_color_url = ' . Xml::encodeJsVar( $colorURLMsg->isDisabled() ? $colorURLDefault : $colorURLMsg->text() ) . ';\n</script>\n<script type=\"text/javascript\" src=\"https://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>';\n\t\t}\n\n\t\treturn '<!-- Begin banner ad (ShoutWikiAds) -->\n\t\t<div id=\"' . $skinName . '-banner-ad\" class=\"' . $skinName . '-ad noprint\">' .\n\t\t\t$adHTML . '</div>\n\t\t<!-- End banner ad (ShoutWikiAds) -->' . \"\\n\";\n\t}", "function printHTML() \n {\n $this->openBlockHeader(\"Candidate Event\");\n?>\n <img id='candidate_image' src=\"<?echo $this->cand_url?>\">\n<?\n $this->closeBlockHeader();\n }", "public function show();", "public function show();", "public function show();", "public function show();", "function showContent()\n {\n // FIXME: URL, image, video, audio\n $this->out->elementStart('p', array('class' => 'entry-content'));\n \n \n $this->out->raw($this->notice->content);\n //$this->out->raw(common_render_content($this->notice->content, $this->notice));\n /*\n if ($this->notice->rendered) {\n $this->out->raw($this->notice->rendered);\n } else {\n // XXX: may be some uncooked notices in the DB,\n // we cook them right now. This should probably disappear in future\n // versions (>> 0.4.x)\n $this->out->raw(common_render_content($this->notice->content, $this->notice));\n }\n */\n $this->out->elementEnd('p');\n }", "public function showImage()\n {\n }", "function tb_longwave_header_options_callback() {\n\techo '<p>Settings for things visible in the Head of the theme.</p>';\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}", "private function getBanner()\n {\n $banner = \"/**\\n * \";\n $banner .= str_replace(\n \" \\n\",\n \"\\n\",\n str_replace(\"\\n\", \"\\n * \", $this->banner)\n );\n\n $banner .= \"\\n */\";\n\n return $banner;\n }", "function _call_banner( $options )\n\t{\n\n\t\t\t$button = false;\n\t\t\t$div_size = 'span12';\n\t\t\t\n\t\t\tif ( !empty ( $options['cab_button_text'] ) && !empty ( $options['cab_button_link']['url'] ) ) {\n\t\t\t\t$button = true;\n\t\t\t\t$div_size = 'span10';\n\t\t\t}\n\t\t\n\t\t\tif ( !empty ( $options['cab_main_title'] ) || !empty ( $options['cab_sec_title'] ) ) {\n\t\t\t\t\n\t\t\t\techo '<div class=\"'.$div_size.'\">';\n\t\t\t\n\t\t\t\tif ( !empty ( $options['cab_main_title'] ) ) {\n\t\t\t\t\techo '<h3 class=\"m_title\" style=\"margin-top:25px;\">'.$options['cab_main_title'].'</h3>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( !empty ( $options['cab_sec_title'] ) ) {\n\t\t\t\t\techo '<p>'.$options['cab_sec_title'].'</p>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '</div>';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ( $button ) {\n\t\t\t\techo '<div class=\"span2\">';\n\t\t\t\t\n\t\t\t\t\techo '<a href=\"'.$options['cab_button_link']['url'].'\" class=\"circlehover with-symbol\" data-size=\"\" data-position=\"top-left\" data-align=\"right\" target=\"'.$options['cab_button_link']['target'].'\">';\n\t\t\t\t\t\techo '<span class=\"text\">'.$options['cab_button_text'].'</span>';\n\t\t\t\t\t\tif ( !empty ( $options['cab_button_image'] ) ) {\n\t\t\t\t\t\t\techo '<span class=\"symbol\"><img src=\"'.$options['cab_button_image'].'\" alt=\"\"></span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\techo '<span class=\"symbol\"><img src=\"'.MASTER_THEME_DIR.'/images/ok.png\" alt=\"\"></span>';\n\t\t\t\t\t\t}\n\t\t\t\t\techo '</a>';\n\t\t\t\techo '</div>';\n\t\t\t}\n\n\t}", "function _call_banner( $options )\n\t{\n\n\t\t\t$button = false;\n\t\t\t$div_size = 'span12';\n\t\t\t\n\t\t\tif ( !empty ( $options['cab_button_text'] ) && !empty ( $options['cab_button_link']['url'] ) ) {\n\t\t\t\t$button = true;\n\t\t\t\t$div_size = 'span10';\n\t\t\t}\n\t\t\n\t\t\tif ( !empty ( $options['cab_main_title'] ) || !empty ( $options['cab_sec_title'] ) ) {\n\t\t\t\t\n\t\t\t\techo '<div class=\"'.$div_size.'\">';\n\t\t\t\n\t\t\t\tif ( !empty ( $options['cab_main_title'] ) ) {\n\t\t\t\t\techo '<h3 class=\"m_title\" style=\"margin-top:25px;\">'.$options['cab_main_title'].'</h3>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( !empty ( $options['cab_sec_title'] ) ) {\n\t\t\t\t\techo '<p>'.$options['cab_sec_title'].'</p>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '</div>';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ( $button ) {\n\t\t\t\techo '<div class=\"span2\">';\n\t\t\t\t\n\t\t\t\t\techo '<a href=\"'.$options['cab_button_link']['url'].'\" class=\"circlehover with-symbol\" data-size=\"\" data-position=\"top-left\" data-align=\"right\" target=\"'.$options['cab_button_link']['target'].'\">';\n\t\t\t\t\t\techo '<span class=\"text\">'.$options['cab_button_text'].'</span>';\n\t\t\t\t\t\tif ( !empty ( $options['cab_button_image'] ) ) {\n\t\t\t\t\t\t\techo '<span class=\"symbol\"><img src=\"'.$options['cab_button_image'].'\" alt=\"\"></span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\techo '<span class=\"symbol\"><img src=\"'.MASTER_THEME_DIR.'/images/ok.png\" alt=\"\"></span>';\n\t\t\t\t\t\t}\n\t\t\t\t\techo '</a>';\n\t\t\t\techo '</div>';\n\t\t\t}\n\n\t}", "public function show()\n\t{\n\t\t\n\t}", "public function preview($slug){\n\n echo <<<HTML\n<!doctype html>\n<html lang=\"\">\n <head>\n <meta charset=\"utf-8\">\n </head>\n <body>\nHTML;\n\n $this->embed($slug);\n\n echo <<<HTML\n </body>\n</html>\nHTML;\n\n }", "public function show()\n {\n header('Content-Type: image/' . $this->config->mimeType);\n echo $this;\n }", "public function show(Blogger $blogger)\n {\n //\n }", "public function sobre() {\n $this->template->set_title( 'Work for all - Sobre' );\n\n // renderiza a pagina\n\t\t$this->template->render( 'sobre' );\n }", "function printPreview()\n {\n echo '<div class=\"theme_preview\">';\n echo '<h2>' . htmlspecialchars($this->getName())\n .' (' . htmlspecialchars($this->getVersion()) . ')</h2>'\n .'<p>'\n .'<a target=\"_top\" href=\"index.php'\n .PMA_generate_common_url(array('set_theme' => $this->getId())) . '\"'\n .' onclick=\"takeThis(\\'' . addslashes($this->getId()) . '\\');'\n .' return false;\">';\n if (@file_exists($this->getPath() . '/screen.png')) {\n // if screen exists then output\n\n echo '<img src=\"' . $this->getPath() . '/screen.png\" border=\"1\"'\n .' alt=\"' . htmlspecialchars($this->getName()) . '\"'\n .' title=\"' . htmlspecialchars($this->getName()) . '\" /><br />';\n } else {\n echo $GLOBALS['strThemeNoPreviewAvailable'];\n }\n\n echo '[ <strong>' . $GLOBALS['strTakeIt'] . '</strong> ]</a>'\n .'</p>'\n .'</div>';\n }", "public function getBrief() {\n\t\t$baseUrl = \"http://\" . $_SERVER['SERVER_NAME'] . Director::BaseURL();\n\t\t$themeDir = $baseUrl . 'themes/' . SSViewer::current_theme();\n\t\t$html = '<div class=\"brief\">\n\t\t\t\t\t<div class=\"cell\" >'.$this->statusButton().'</div>\n\t\t\t\t\t<div class=\"cell weather\"><img src=\"'.$themeDir.'/images/weather_report/'.$this->getWeatherBrief().'.png\" alt=\"weather-icon\" /></div>\n\t\t\t\t\t<div class=\"cell temp\">'.$this->getWeatherTempurature().'&deg;</div>\n\t\t\t\t\t<div class=\"cell snowfall\">\n\t\t\t\t\t\tLast Snowfall<br />\n\t\t\t\t\t\t<span class=\"amount\">'.$this->getLatestFall().'cm</span><br />\n\t\t\t\t\t\t\ton '.$this->getLatestFallDate().'\n\t\t\t\t\t</div>\n\t\t\t\t</div>';\n\t\treturn $html;\n\t}", "function scoreboard_widget() {\r\n\r\n\techo\"<div class='widget'><h2>Scoreboard</h2><img src='http://www.bollywoodjalwa.com/cricket-widget.php'></div>\";\r\n\r\n}", "public function show()\n {\n require_once BFT_PATH_BASE.DS.'templates'.DS.'html-header.php';\n if ($this->section != 'start' and $this->template != 'infos') require_once BFT_PATH_BASE.DS.'templates'.DS.'box-header.php';\n require_once BFT_PATH_BASE.DS.'templates'.DS.$this->template.'.php';\n if ($this->section != 'start' and $this->template != 'infos') require_once BFT_PATH_BASE.DS.'templates'.DS.'box-footer.php';\n require_once BFT_PATH_BASE.DS.'templates'.DS.'html-footer.php';\n }", "function display( array $atts, $content = '' ) {\n\n\t\tob_start();\n\n\t\tpublisher_set_prop( 'shortcode-better-newsticker', $atts );\n\n\t\tpublisher_get_view( 'shortcodes', 'better-newsticker' );\n\n\t\tpublisher_clear_props();\n\t\tpublisher_clear_query();\n\n\t\treturn ob_get_clean();\n\t}", "function goodrds_show() {\n\t\t\n\t\t// if we have valid options, else our shortcode should spit instructions\n\t\tif (!$this->goodrds_haveInfo())\n\t\t\treturn \"<div id='goodrds' class='error'>\".__(\"Good Reads Books plugin requires you to setup a proper API key and USERNAME in your wp-admin > Settings > Good Reads Books\",'goodrds').\"</div>\";\t\n\t\t\n\t\tif (!function_exists('curl_version'))\n\t\t\treturn \"<div id='goodrds' class='error'>\".__(\"Good Reads Books plugin requires your server to have CURL enabled. You'll need to contact your hosting provider for assistance. See plugin FAQ for more information.\",'goodrds').\"</div>\";\n\t\t\t\n\t\t// get the json returns for the API and parse them\n\t\t$goodrds_reading_json = get_option('goodrds_reading_json');\n\t\t$goodrds_read_json = get_option('goodrds_read_json');\n\t\tif (empty($goodrds_reading_json) || empty($goodrds_read_json))\n\t\t\treturn \"<div id='goodrds' class='error'>\".__(\"Good Reads Books can't get anything back from the Goodreads API. Make sure your Goodreads profile is set to Public in Settings. If you're still having issues, please contact plugin author.\",'goodrds').\"</div>\";\t\n\t\t\n\t\t$reading \t= new SimpleXMLElement($goodrds_reading_json);\n\t\t$read \t\t= new SimpleXMLElement($goodrds_read_json);\n\t\t$image_fix = array();\n\t\t\n\t\t// options for showing\n\t\t$goodrds_options = $this->goodrds_options;\n\t\t$showbooks = $goodrds_options['show'];\n\t\t\n\t\t$cReading = count($reading->reviews->review);\n\t\t$cRead = $showbooks - $cReading;\n\t\t\n\t\t// start the showcase\n\t\t$return = \"\n\t\t<div id='goodrds'>\n\t\t\t<div id='goodrds_headings'>\";\n\t\t\t\t$return .= ($cReading > 0) ? \"<h5 id='reading' style='flex:{$cReading}'>\".__('Reading','goodrds').\"</h5>\" : '';\n\t\t\t\t$return .= ($cRead > 0) ? \"<h5 id='read' style='flex:{$cRead}'>\".__('Recently Read','goodrds').\"</h5>\" : '';\n\t\t\t\t$return .= \"\n\t\t\t</div><!--/goodrds_headings-->\n\t\t\t<div id='goodrds_shelves'>\\n\";\n\t\t\n\t\t// CURRENTLY READING\n\t\tforeach ($reading->reviews->review as $reading) {\n\t\t\tif (!$img = $this->goodrds_image_exceptions($reading->book->id))\n\t\t\t\t$img = $reading->book->image_url;\n\t\t\t$return .= \"<a target='_Blank' href='https://www.goodreads.com/book/show/{$reading->book->id}' title='{$reading->book->title} - #{$reading->book->id}' class='book reading' style='background-image:url({$img});'></a>\";\n\t\t\t$showbooks--;\n\t\t}\n\t\t\n\t\t// RECENTLY READ\n\t\t#->id\n\t\t#->book->id\n\t\t#->book->title\n\t\t#->book->average_rating\n\t\t#->book->authors->author->name\n\t\tforeach ($read->reviews->review as $read) {\n\t\t\tif ($showbooks > 0) {\n\t\t\t\tif (!$img = $this->goodrds_image_exceptions($read->book->id))\n\t\t\t\t\t$img = $read->book->image_url;\n\t\t\t\t$return .= \"<a target='_Blank' href='https://www.goodreads.com/book/show/{$read->book->id}' title='{$read->book->title} - #{$read->book->id}' class='book read' style='background-image:url({$img});'></a>\";\n\t\t\t\t$showbooks--;\n\t\t\t}\n\t\t}\n\t\t$return .= \"\n\t\t</div><!--/goodrds_shelves-->\";\n\t\t\n\t\tif (isset($goodrds_options['credit']) && $goodrds_options['credit'] == '1')\n\t\t\t$return .= \"<a href='https://goodreads.com/' target='_Blank' id='goodrds_poweredby'>\".__('Goodreads').\"</a>\";\n\t\t\n\t\t$return .= \"\n\t\t</div><!--/goodrds-->\";\n\t\treturn $return;\n\t\t\t\n\t}", "function showAd()\r\n {\r\n }", "abstract public function show($img);", "function sitebuilder_uva_mediamosa_sb_powered_by_mediamosa() {\n $image = theme('image', array(\n 'path' => drupal_get_path('module', 'mediamosa_sb') . '/images/logo32.png',\n 'alt' => t('Powered by MediaMosa'),\n 'title' => t('Powered by MediaMosa'),\n )\n );\n $output = '<div class=\"mediamosa-logo-small\">';\n $output .= l($image, 'http://mediamosa.org', array('attributes' => array(), 'html' => TRUE));\n $output .= '</div>';\n return $output;\n}", "function showContent()\n {\n $this->showForm();\n\n $this->elementStart('div', array('id' => 'notices_primary'));\n\n\n $sharing = null;\n $sharing = $this->getSharings();\n $cnt = 0;\n\n if (!empty($sharing)) {\n $profileList = new SharingsList(\n $sharing,\n $this\n );\n\n $cnt = $profileList->show();\n $sharing->free();\n\n if (0 == $cnt) {\n $this->showEmptyListMessage();\n }\n }\n\n $this->elementEnd('div');\n\n }", "public function get_banner_preview( $id ) \n\t{\t\n\t\t$banner_type = get_post_meta( $id, 'banner_type', true );\n\t\t$banner_url = get_post_meta( $id, 'banner_url', true );\n\t\t$banner_is_image = $this->check_if_banner_is_image($banner_type);\n\t\n\t\tif( $banner_is_image )\n\t\t{\n\t\t\t$img = !empty($banner_url) ? $banner_url : WP_ADS_URL.'images/placeholder.png';\n\t\t\t$html.= '<div class=\"preview_banner\" style=\"background: url('.$img.') no-repeat center center; width:40px; height:40px;\"></div>';\n\t\t}\n\t\telseif( $banner_type == 'swf')\n\t\t{\n\t\t\t$html.= \"<object>\";\n\t\t\t\t$html.= \"<embed allowscriptaccess='always' id='banner-swf' width='40' height='40' src='\".$banner_url.\"'>\";\n\t\t\t$html.= \"</object>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$html.= '<img src=\"'.WP_ADS_URL.'images/placeholder.png\" width=\"40\" />';\n\t\t}\n\t\t\n\t\treturn $html;\n\t}", "public function inject_banner() {\n\t\t$this->banner_settings = get_option( 'cookieproCCPASettings' );\n\t\t$this->behavior_settings = get_option( 'cookieproCCPABehaviorSettings' );\n\t\t$this->floatingdata = get_option( 'CookieProCCPAButtonFloatings' );\n\t\tif( ! empty( $this->floatingdata ) ){\n\t\t\t$this->linkenable = $this->floatingdata;\n\t\t} else {\n\t\t\t$this->linkenable = $this->banner_settings;\n\t\t}\n\t\tinclude_once WP_PLUGIN_DIR . '/' . $this->plugin->name . '/assets/html/banner.php';\n\t}", "function Get_Banner($banner)\n{\n $html = \"<div class = \\\"page_banner\\\">\";\n $html .= $banner;\n $html .= \"</div>\";\n\n return $html;\n}", "function aurora_borealis() {\n\t$chosen = steamed_hams_get_lyric();\n\techo \"<p id='seymour'>$chosen</p>\";\n}", "abstract protected function show();", "protected function display(){\n echo \"<div class='wrap'><h1 class='wp-heading-inline'>\".__('Hello There', 'eventus').\"</h1></div>\";\n return;\n }", "function bbboing_oik_loaded() { \r\n //bw_add_shortcode( 'bbboing', 'bbboing_sc', oik_path( \"bbboing.inc\", \"bbboing\" ), false );\r\n}", "function display_phlagpage($keyword) {\n\n $title = yourls_get_keyword_title( $keyword );\n $url = yourls_get_keyword_longurl( $keyword );\n $base = YOURLS_SITE;\n\t$img = yourls_plugin_url( dirname( __FILE__ ).'/assets/caution.png' );\n\t$css = yourls_plugin_url( dirname( __FILE__ ).'/assets/bootstrap.min.css');\n\n\t$vars = array();\n\t\t$vars['keyword'] = $keyword;\n\t\t$vars['title'] = $title;\n\t\t$vars['url'] = $url;\n\t\t$vars['base'] = $base;\n\t\t$vars['img'] = $img;\n\t\t$vars['css'] = $css;\n\n\t$intercept = file_get_contents( dirname( __FILE__ ) . '/assets/intercept.php' );\n\t// Replace all %stuff% in the intercept with variable $stuff\n\t$intercept = preg_replace_callback( '/%([^%]+)?%/', function( $match ) use( $vars ) { return $vars[ $match[1] ]; }, $intercept );\n\n\techo $intercept;\n\n\tdie();\n}", "public function showImage()\n {\n $gif = new AnimatedGif($this->frames, $this->delays, $this->loops);\n $gif->display();\n }", "function ShowBox() {\n\t\tglobal $db, $apcms;\n\t\t\n\t\techo \"<div align=\\\"center\\\">\n\t\t\t<a class=\\\"link\\\" href=\\\"http://www.php-programs.de\\\"><img style=\\\"padding: 2px\\\" src=\\\"\".$this->pluginurl.\"/gfx/apcms.png\\\" border=\\\"0\\\" width=\\\"80\\\" height=\\\"28\\\" alt=\\\"\".$apcms['LANGUAGE']['GLOBAL_POWEREDBY'].\"\\\" title=\\\"\".$apcms['LANGUAGE']['GLOBAL_POWEREDBY'].\"\\\" /></a><br />\n\t\t\t<a class=\\\"link\\\" href=\\\"http://validator.w3.org/check?uri=referer\\\"><img style=\\\"padding: 2px\\\" src=\\\"\".$this->pluginurl.\"/gfx/valid.xhtml.gif\\\" border=\\\"0\\\" width=\\\"80\\\" height=\\\"15\\\" alt=\\\"Valid XHTML 1.0\\\" title=\\\"Valid XHTML 1.0\\\" /></a><br />\n\t\t\t<a class=\\\"link\\\" href=\\\"http://jigsaw.w3.org/css-validator/check/referer\\\"><img style=\\\"padding: 2px\\\" src=\\\"\".$this->pluginurl.\"/gfx/valid.css.gif\\\" border=\\\"0\\\" width=\\\"80\\\" height=\\\"15\\\" alt=\\\"Valid XHTML 1.1\\\" title=\\\"Valid XHTML 1.1\\\" /></a><br />\n\t\t</div>\\n\";\n\t\t\n\t}", "function htheme_banner_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_content_banner($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "function banner($message) {\n $decoration = '*';\n $prefix = $decoration . ' ';\n $postfix = ' ' . $decoration;\n $line_len = strlen($prefix) + strlen($message) + strlen($postfix);\n\n for($i = 0; $i < $line_len; $i++) {\n echo $decoration;\n }\n echo '<br />';\n echo $prefix . $message . $postfix;\n echo '<br />';\n for($i = 0; $i < $line_len; $i++) {\n echo $decoration;\n }\n echo '<br />';\n }", "abstract protected function showContent(): self;", "public function show(Better $better)\n {\n //\n }", "public function show(Better $better)\n {\n //\n }", "function showAd()\n {\n echo '2019女装';\n }", "public function show()\n\t{\n\n\t}", "function getbanners()\n\t\t{\n\t\t\t$banners = $this->manage_content->getValue('banner_info','*');\n\t\t\techo '<div id=\"add_space\">';\n\t\t\tforeach($banners as $banner)\n\t\t\t{\n\t\t\t\tif($banner['banner_status'] == 1)\n\t\t\t\t{\n\t\t\t\t\techo '<a href=\"'.$banner['banner_link'].'\">';\n\t\t\t\t\techo '<div class=\"add_section\"><img src=\"images/'.$banner['banner_image'].'\" style=\"height:'.$banner['banner_height'].'px;width:'.$banner['banner_width'].'px;float:left;\"/></div></a>';\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '</div>';\n\t\t}", "function showWidget($login) {\n\t\t\n\t\t$window = HeadsUpWidget::Create($login);\n\t\t$window->setSize($this->config->width, 50);\n\t\t$window->setText($this->config->text);\n\t\t$window->setUrl($this->config->url);\n\t\t$pos = explode(\",\", $this->config->pos);\n\t\t$window->setPosition($pos[0], $pos[1]);\n\t\t$window->show();\n\t}", "function bpfit_weight_subtab_show_screen() {\n\t\t\tadd_action( 'bp_template_title', array($this, 'bpfit_weight_subtab_function_to_show_title') );\n\t\t\tadd_action( 'bp_template_content', array($this, 'bpfit_weight_subtab_function_to_show_content') );\n\t\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t}", "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n ?>\n\t\t<div class=\"happyden-feature-image\">\n\t\t\t\t<?php the_post_thumbnail( get_the_Id(), 'full' ); ?>\n\t\t</div>\n\t\t<?php\n\t}", "function _adRenderFlash(&$aBanner, $zoneId=0, $source='', $ct0='', $withText=false, $logClick=true, $logView=true, $useAlt=false, $richMedia=true, $loc='', $referer='', $context=array())\n{\n $conf = $GLOBALS['_MAX']['CONF'];\n $prepend = !empty($aBanner['prepend']) ? $aBanner['prepend'] : '';\n $append = !empty($aBanner['append']) ? $aBanner['append'] : '';\n $width = !empty($aBanner['width']) ? $aBanner['width'] : 0;\n $height = !empty($aBanner['height']) ? $aBanner['height'] : 0;\n $pluginVersion = !empty($aBanner['pluginversion']) ? _adRenderGetRealPluginVersion($aBanner['pluginversion']) : '4';\n // $imageUrlPrefix = ($_SERVER['SERVER_PORT'] == $conf['openads']['sslPort']) ? $conf['type_web_ssl_url'] : $conf['type_web_url'];\n if (!empty($aBanner['alt_filename']) || !empty($aBanner['alt_imageurl'])) {\n $altImageAdCode = _adRenderImage($aBanner, $zoneId, $source, $ct0, false, $logClick, false, true, true, $loc, $referer, false);\n $fallBackLogURL = _adRenderBuildLogURL($aBanner, $zoneId, $source, $loc, $referer, '&', true);\n } else {\n $altImageAdCode = \"<img src='\" . _adRenderBuildImageUrlPrefix() . '/1x1.gif' . \"' alt='\".$aBanner['alt'].\"' title='\".$aBanner['alt'].\"' border='0' />\";\n $fallBackLogURL = false;\n }\n\n // Create the anchor tag..\n $clickUrl = _adRenderBuildClickUrl($aBanner, $zoneId, $source, $ct0, $logClick);\n if (!empty($clickUrl)) { // There is a link\n $status = _adRenderBuildStatusCode($aBanner);\n $target = !empty($aBanner['target']) ? $aBanner['target'] : '_blank';\n $swfParams = array('clickTARGET' => $target, 'clickTAG' => $clickUrl);\n $clickTag = \"<a href='$clickUrl' target='$target'$status>\";\n $clickTagEnd = '</a>';\n } else {\n $swfParams = array();\n $clickTag = '';\n $clickTagEnd = '';\n }\n\n if (!empty($aBanner['parameters'])) {\n $aAdParams = unserialize($aBanner['parameters']);\n if (isset($aAdParams['swf']) && is_array($aAdParams['swf'])) {\n // Converted SWF file, use paramters content\n $swfParams = array();\n $aBannerSwf = $aBanner;\n // Set the flag to let _adRenderBuildClickUrl know that we're not using clickTAG\n $aBannerSwf['noClickTag'] = true;\n foreach ($aAdParams['swf'] as $iKey => $aSwf) {\n $aBannerSwf['url'] = $aSwf['link'];\n $swfParams[\"alink{$iKey}\"] = _adRenderBuildClickUrl($aBannerSwf, $zoneId, $source, $ct0, $logClick);\n $swfParams[\"atar{$iKey}\"] = $aSwf['tar'];\n }\n }\n }\n $fileUrl = _adRenderBuildFileUrl($aBanner, false);\n $rnd = md5(microtime());\n\n $swfId = (!empty($aBanner['alt']) ? $aBanner['alt'] : 'Advertisement');\n\n $code = \"\n<div id='ox_$rnd' style='display: inline;'>$altImageAdCode</div>\n<script type='text/javascript'><!--/\".\"/ <![CDATA[\n var ox_swf = new FlashObject('{$fileUrl}', '{$swfId}', '{$width}', '{$height}', '{$pluginVersion}');\\n\";\n foreach ($swfParams as $key => $value) {\n // URL encode the value, but leave any Openads \"magic macros\" unescaped to allow substitution\n $code .= \" ox_swf.addVariable('{$key}', '\" . preg_replace('#%7B(.*?)%7D#', '{$1}', urlencode($value)) . \"');\\n\";\n }\n if (!empty($aBanner['transparent'])) {\n $code .= \"\\n ox_swf.addParam('wmode','transparent');\";\n } else {\n $code .= \"\\n ox_swf.addParam('wmode','opaque');\";\n }\n $code .= \"\n ox_swf.addParam('allowScriptAccess','always');\n ox_swf.write('ox_$rnd');\\n\";\n\n if ($logView && $conf['logging']['adImpressions']) {\n // Only render the log beacon if the user has the minumum required flash player version\n $code .= \" if (ox_swf.installedVer.versionIsValid(ox_swf.getAttribute('version'))) { document.write(\\\"\"._adRenderImageBeacon($aBanner, $zoneId, $source, $loc, $referer).\"\\\"); }\";\n // Otherwise log a fallback impression (if there is a fallback creative configured)\n if ($fallBackLogURL) {\n $code .= ' else { document.write(\"'._adRenderImageBeacon($aBanner, $zoneId, $source, $loc, $referer, $fallBackLogURL).'\"); }';\n }\n }\n $code .= \"\\n/\".\"/ ]]> --></script>\";\n if ($fallBackLogURL) {\n $code .= '<noscript>' . _adRenderImageBeacon($aBanner, $zoneId, $source, $loc, $referer, $fallBackLogURL) . '</noscript>';\n }\n $bannerText = $withText && !empty($aBanner['bannertext']) ? \"<br />{$clickTag}{$aBanner['bannertext']}{$clickTagEnd}\" : '';\n\n return $prepend . $code . $bannerText . $append;\n}", "public function intro(){\n\t\t$html = \"\";\n\t\t$html.= '\n\t\t<div class=\"row description\">\n\t\t\t<div class=\"small-12 large-12 columns\">\n\t\t\t\t\t<h1>Actualites</h1>\n\t\t\t\t<hr/>\n\t\t\t</div>\n\t\t\t<div class=\"small-8 large-8 columns\">\n\t\t\t\t<div class=\"center\">\n\t\t\t\t\t<h2>Qu\\'est ce qui ce trame en Altraya ?</h2>\n\t\t\t\t</div>\n\t\t\t\t<hr/>\n\t\t\t\t<p>- Ajout d\\'une fonctionnalité d\\'élevage : la reproduction</p>\n\t\t\t</div>\n\t\t\t<div class=\"small-4 large-4 columns\">\n\t\t\t\t<a class=\"twitter-timeline\" href=\"https://twitter.com/Karakayne\" data-widget-id=\"579726233640005632\">Tweets de @Karakayne</a>\n\t\t\t\n\t\t\t\t<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?\\'http\\':\\'https\\';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+\"://platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>\n\t\t\t\n\t\t\t</div>\n\t\t</div>\n\t\t';\n\n\t\techo($html);\n\t}", "function preview()\n\t{\n\t\theader(\"Content-type: {$this->mimetype}\");\n\t\t$this->showImage();\n\t}", "function showView()\n\t{\n\t\techo '<a href=\"https://twitter.com/share?url='. urlencode(\"http://t3kno.dewpixel.net/view.php?s=\".$this->ytcode) .'&amp;text=This song rocks you gotta hear this!\" \n\t\t\tclass=\"twitter-share-button\" style=\"float:right;\">Tweet</a> <br />' .\n\t\t $this->title . ' by <a href=\"index.php?topof=new&artist=' . $this->artist . '\">' . $this->artist . '</a><br />\n\t\t\tGenre: <a href=\"index.php?topof=new&genre=' . strtolower($this->genre) .'\">' . $this->genre . '</a><br />\n\t\t\tUploaded By: '.$this->user .'<br />\n\t\t\tDownload: <u>Amazon</u> <u>Apple</u> <br />\n\t\t\t';\n\n\t}", "public function BannerPickerPopUp()\n\t{\tob_start();\n\t\techo '<script type=\"text/javascript\">$().ready(function(){$(\"body\").append($(\".jqmWindow\"));$(\"#banner_modal_popup\").jqm();});</script>',\n\t\t\t'<!-- START instructor list modal popup --><div id=\"banner_modal_popup\" class=\"jqmWindow\" style=\"padding-bottom: 5px; width: 640px; margin-left: -320px; top: 10px; height: 600px; \"><a href=\"#\" class=\"jqmClose submit\">Close</a><div id=\"bannerModalInner\" style=\"height: 500px; overflow:auto;\"></div></div>';\n\t\treturn ob_get_clean();\n\t}", "private function generateHead() {\n echo '<h3><span class=\"glyphicon glyphicon-camera\"></span> Images</h3>';\n echo '<div class=\"row\">';\n }", "public function display() {\n\n\t\t// Register WP built-in Thickbox for popup.\n\t\tadd_thickbox();\n\n\t\tparent::display();\n\t}", "public function show() {\n \n }", "function showPageNotice()\n {\n $instr = $this->getInstructions();\n $output = common_markup_to_html($instr);\n\n $this->elementStart('div', 'instructions');\n $this->raw($output);\n $this->elementEnd('div');\n }", "public function reqBiblePage() {\n $this->instance = new Bible();\n $this->view($this->instance->getBible(false, false), 'bible', 'Bíblia');\n }", "function _adRenderImage(&$aBanner, $zoneId=0, $source='', $ct0='', $withText=false, $logClick=true, $logView=true, $useAlt=false, $richMedia=true, $loc='', $referer='', $context=array(), $useAppend=true)\n{\n $conf = $GLOBALS['_MAX']['CONF'];\n $aBanner['bannerContent'] = $imageUrl = _adRenderBuildFileUrl($aBanner, $useAlt);\n\n if (!$richMedia) {\n return _adRenderBuildFileUrl($aBanner, $useAlt);\n }\n $prepend = (!empty($aBanner['prepend']) && $useAppend) ? $aBanner['prepend'] : '';\n $append = (!empty($aBanner['append']) && $useAppend) ? $aBanner['append'] : '';\n\n // Create the anchor tag..\n $clickUrl = _adRenderBuildClickUrl($aBanner, $zoneId, $source, $ct0, $logClick);\n if (!empty($clickUrl)) { // There is a link\n $status = _adRenderBuildStatusCode($aBanner);\n //$target = !empty($aBanner['target']) ? $aBanner['target'] : '_blank';\n $clickTag = \"<a href='$clickUrl' target='{target}'$status>\";\n $clickTagEnd = '</a>';\n } else {\n $clickTag = '';\n $clickTagEnd = '';\n }\n // Create the image tag..\n if (!empty($imageUrl)) {\n $imgStatus = empty($clickTag) && !empty($status) ? $status : '';\n $width = !empty($aBanner['width']) ? $aBanner['width'] : 0;\n $height = !empty($aBanner['height']) ? $aBanner['height'] : 0;\n $alt = !empty($aBanner['alt']) ? htmlspecialchars($aBanner['alt'], ENT_QUOTES) : '';\n $imageTag = \"$clickTag<img src='$imageUrl' width='$width' height='$height' alt='$alt' title='$alt' border='0'$imgStatus />$clickTagEnd\";\n } else {\n $imageTag = '';\n }\n // Get the text below the banner\n $bannerText = $withText && !empty($aBanner['bannertext']) ? \"<br />$clickTag\" . htmlspecialchars($aBanner['bannertext'], ENT_QUOTES) . \"$clickTagEnd\" : '';\n // Get the image beacon...\n $beaconTag = ($logView && $conf['logging']['adImpressions']) ? _adRenderImageBeacon($aBanner, $zoneId, $source, $loc, $referer) : '';\n return $prepend . $imageTag . $bannerText . $beaconTag . $append;\n}", "static function banner($path) {\n\t\tself::$banner = $path;\n\t}", "private function showDisplay() {\n\t\twp_enqueue_style('pokamodule-settings');\n//\t\twp_enqueue_script('pokamodule-settings');\n\t\t\n\t\trequire_once $this->sPath . '/tpl/template/display.php';\n\t}", "public function display() {\n\t\techo '<iframe src=\"http://norulesweb.com/contact/\" width=\"800\" height=\"400\"></iframe>';\n\t}", "function showIntro() {\n if (! $_SESSION[\"eligible\"]) {\n return $this->showStart();\n }\n $nexturl = $this->action . '?mode=details';\n $safety = $this->action . '?mode=safety';\n $extra = array('next' => $nexturl, 'safetyurl' => $safety);\n $output = $this->outputBoilerplate('introduction.html', $extra);\n return $output;\n }", "public function start_display ()\n {\n $this->display_doc_type ();\n\n $opts = $this->page->template_options;\n if ($opts->css_class)\n {\n?>\n<html class=\"<?php echo $opts->css_class; ?>\" lang=\"<?php echo $opts->language; ?>\">\n<?php\n }\n else\n {\n?>\n<html lang=\"<?php echo $opts->language; ?>\">\n<?php\n }\n?>\n <head>\n <?php\n $this->display_head ();\n ?>\n </head>\n <body>\n<?php\n\n $this->_start_body ();\n }", "public function show() {\n\t}", "public function display()\n\t{\n\t\tprint_r(\"<br/>RedheadDuck looks like this!<br/>\");\n\t}", "function ShowHeader()\n{\n\t//IPTrackingAdmin();\n\tinclude(\"dbconnect.php\"); \n\t//echo('<embed src=\"upload/flash/hoainhon.swf\" quality=\"high\" type=\"application/x-shockwave-flash\" '); \n\t//echo('wmode=\"transparent\" width=\"1000\" height=\"110\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ');\n\t//echo('allowScriptAccess=\"always\"></embed>');\n\tinclude_once(\"Browser.php\");\n\t$browser = new Browser();\n\tif(($browser->getBrowser() == Browser::BROWSER_SAFARI)||($browser->getBrowser() == Browser::BROWSER_IPHONE))\n\t{\n\t\tShowHeader1();\n\t}\n\telse\t\n\t\tShowHeader2();\n}", "function wpvideocoach_display_introduction()\r\n{\r\n\tglobal $wpvideocoach_introduction, $wpvideocoach_introduction_box_background_color, $wpvideocoach_introduction_title_color, $wpvideocoach_introduction_text_color;\r\n\tif($wpvideocoach_introduction == 1){\r\n\t\t//don't do anything\r\n\t}\r\n\telse {\r\n\t\techo \"<div id='introduction' style='background-color:\" . $wpvideocoach_introduction_box_background_color . \"'><h3 style='color:\" . $wpvideocoach_introduction_title_color . \"'>\". wpvideocoach_introduction_title() .\"</h3><p style='color:\" . $wpvideocoach_introduction_text_color . \"'>\". wpvideocoach_introduction_text() .\"</p></div><!--introduction-->\";\r\n\t}\r\n}", "public function smartape_display( $atts, $content ) {\n\t\t//* Let's build this bitch too.\n\t\t$output = '<a class=\"shortcode-this\" href=\"https://www.smartape.ru/?partner=2922\"'\n\t\t . 'target=\"_blank\">'\n\t\t . $content\n\t\t . '<span class=\"shortcode-this-icon\">&darr;</span>'\n\t\t . '<img class=\"shortcode-this-image\" src=\"'\n\t\t . plugin_dir_url( __FILE__ )\n\t\t . '/img/smartape-logo.png\" alt=\"Smartape логотип\"></a>';\n\n\t\treturn $output;\n\t}" ]
[ "0.68516976", "0.6587832", "0.6394018", "0.6394018", "0.6394018", "0.6394018", "0.632088", "0.63093805", "0.62459654", "0.6232449", "0.6146874", "0.60914296", "0.6090134", "0.6030458", "0.6026002", "0.59937584", "0.5976901", "0.5966882", "0.59396654", "0.5919131", "0.590568", "0.5897447", "0.5888441", "0.5869554", "0.5850342", "0.583612", "0.5802995", "0.57973355", "0.57911456", "0.57779354", "0.5770039", "0.5770039", "0.5770039", "0.5770039", "0.57594186", "0.5742016", "0.57336587", "0.5722163", "0.5722163", "0.5722163", "0.5713991", "0.5710893", "0.5710893", "0.5702189", "0.57000107", "0.56935364", "0.56895596", "0.5678701", "0.5670844", "0.5670839", "0.5658207", "0.56554645", "0.56524396", "0.5637303", "0.56348616", "0.5634456", "0.5625677", "0.5624884", "0.5621229", "0.561846", "0.5617764", "0.56140435", "0.56097513", "0.5605728", "0.56034565", "0.5591314", "0.558904", "0.55851245", "0.5585001", "0.5557744", "0.55533034", "0.5550835", "0.5550835", "0.5541766", "0.5538416", "0.5532792", "0.55179846", "0.5517892", "0.5516883", "0.5515065", "0.5509331", "0.5504908", "0.5492689", "0.54899204", "0.5483837", "0.54834485", "0.54772645", "0.54721427", "0.5468524", "0.54632306", "0.5462889", "0.54616416", "0.54612094", "0.544197", "0.5437991", "0.5436925", "0.54366636", "0.54218054", "0.54192406", "0.5415339" ]
0.64830697
2
Display the comment form after the article
public function onContentAfterDisplay($context, &$row, &$params, $page = 0) { $component = $this->findOutComponent($context); $lang = JFactory::getLanguage(); $lang->load('com_comment', JPATH_SITE, '', true); $showinfeatured = JComponentHelper::getParams('com_comment')->get('showinfeatured', 0); $showincategory = JComponentHelper::getParams('com_comment')->get('showincategory', 0); if($component == 'featured' || $component == 'article' || $component == 'category') { $enablecomment = json_decode($row->attribs)->enablecomment; } if((($component == 'featured' && $showinfeatured == '1') || ($component == 'category' && $showincategory=='1')) && $enablecomment=='1') { $model = JModelLegacy::getInstance('Comment', 'CommentModel'); $countComment = $model->countComment($row->id); // get url of article $url = JRoute::_(ContentHelperRoute::getArticleRoute($row->id, $row->catid, $row->language)); return '<span>'.JText::_('COM_COMMENT_COMMENT_COUNT').': <a href="'.$url.'/#article-comment">'.$countComment.'</a></span>'; } elseif($component == 'article' && $enablecomment=='1') // if( setting allow comment = ON ) { JLoader::register('CommentViewComments', JPATH_SITE . '/components/com_comment/views/comments/view.html.php'); $view = new CommentViewComments( array('base_path' => JPATH_SITE . '/components/com_comment') ); //die($view->getLayout()); $model = JModelLegacy::getInstance('Comments', 'CommentModel'); $view->setModel( $model, true); ob_start(); $view->display(); $content = ob_get_clean(); return $content; } else { return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewLayoutComments($article) {\n\t\tif (!HookRegistry::call('CopyeditorAction::viewLayoutComments', array(&$article))) {\n\t\t\timport(\"submission.form.comment.LayoutCommentForm\");\n\n\t\t\t$commentForm = &new LayoutCommentForm($article, ROLE_ID_COPYEDITOR);\n\t\t\t$commentForm->initData();\n\t\t\t$commentForm->display();\n\t\t}\n\t}", "public function displayBeforeForm(){\n if(get_post_type() != WPLMS_ASSIGNMENTS_CPT)\n return;\n if(empty($this->plupload_assignment_e_d))\n echo '</form><form action=\"'.site_url( '/wp-comments-post.php' ).'\" method=\"post\" enctype=\"multipart/form-data\" id=\"attachmentForm\" class=\"comment-form\" novalidate>';\n }", "public function articleAction()\n\t{\n\t\t$id = (int) $this->getRequest()->getParam('id');\n\t\t$this->view->article = $this->_blogService->findArticle($id);\n\t\t\n\t\t$form = new Application_Form_Comment();\n\t\t\n\t\tif ($this->getRequest()->isPost()) {\n\t\t $result = $this->_blogService->saveComment($form);\n\t\t \n\t\t\tif ($result instanceof Application_Model_Comment) {\n\t\t\t $this->view->message = \"Le commentaire {$result->getTitle()} a bien été créé\";\n\t\t\t} elseif (Application_Service_Blog::COMMENT_CREATION_FAILURE_FORM_INVALID == $result) {\n\t\t\t $this->view->message = \"Erreur dans les données du formulaire\";\n\t\t\t} else {\n\t\t\t $this->view->message = \"Erreur inconnue\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->view->form = $form;\n\t\t$this->view->form->setAction('/blog/article/id/' . $id);\n\t}", "function register_block_core_post_comments_form()\n {\n }", "function render_block_core_post_comments_form($attributes, $content, $block)\n {\n }", "function displayForm() {\n $output = '<form action=\"\" method=\"post\" name=\"commentForm\">' . \"\\n\";\n\n if ( $this->allow ) {\n $pos = strpos(\n strtoupper( addslashes( $this->allow ) ),\n strtoupper( addslashes( $this->getUser()->getName() ) )\n );\n }\n\n // 'comment' user right is required to add new comments\n if ( !$this->getUser()->isAllowed( 'comment' ) ) {\n $output .= wfMessage( 'comments-not-allowed' )->parse();\n } else {\n // Blocked users can't add new comments under any conditions...\n // and maybe there's a list of users who should be allowed to post\n // comments\n if ( $this->getUser()->isBlocked() == false && ( $this->allow == '' || $pos !== false ) ) {\n $output .= '<div class=\"c-form-title\">' . wfMessage( 'comments-submit' )->plain() . '</div>' . \"\\n\";\n $output .= '<div id=\"replyto\" class=\"c-form-reply-to\"></div>' . \"\\n\";\n // Show a message to anons, prompting them to register or log in\n if ( !$this->getUser()->isLoggedIn() ) {\n $login_title = SpecialPage::getTitleFor( 'Userlogin' );\n $register_title = SpecialPage::getTitleFor( 'Userlogin', 'signup' );\n $output .= '<div class=\"c-form-message\">' . wfMessage(\n 'comments-anon-message',\n htmlspecialchars( $register_title->getFullURL() ),\n htmlspecialchars( $login_title->getFullURL() )\n )->text() . '</div>' . \"\\n\";\n }\n\n $output .= '<textarea name=\"commentText\" id=\"comment\" rows=\"5\" cols=\"64\"></textarea>' . \"\\n\";\n $output .= '<div class=\"c-form-button\"><input type=\"button\" value=\"' .\n wfMessage( 'comments-post' )->plain() . '\" class=\"site-button\" /></div>' . \"\\n\";\n }\n $output .= '<input type=\"hidden\" name=\"action\" value=\"purge\" />' . \"\\n\";\n $output .= '<input type=\"hidden\" name=\"pageId\" value=\"' . $this->id . '\" />' . \"\\n\";\n $output .= '<input type=\"hidden\" name=\"commentid\" />' . \"\\n\";\n $output .= '<input type=\"hidden\" name=\"lastCommentId\" value=\"' . $this->getLatestCommentID() . '\" />' . \"\\n\";\n $output .= '<input type=\"hidden\" name=\"commentParentId\" />' . \"\\n\";\n $output .= '<input type=\"hidden\" name=\"' . $this->pageQuery . '\" value=\"' . $this->getCurrentPagerPage() . '\" />' . \"\\n\";\n $output .= Html::hidden( 'token', $this->getUser()->getEditToken() );\n }\n $output .= '</form>' . \"\\n\";\n return $output;\n }", "function cosmetics_comment_form() {\n\n if ( comments_open() || get_comments_number() ) :\n?>\n\n <div class=\"site-comments\">\n <?php comments_template( '', true ); ?>\n </div>\n\n<?php\n endif;\n}", "public function commenting() {\n if(strlen($this->request->getParameter(\"content\")) > 10)\n {\n $postId = $this->request->getParameter(\"id\");\n $author = $this->request->getParameter(\"author\");\n $content = $this->request->getParameter(\"content\");\n \n $this->comment->addComment($author, $content, $postId);\n $this->redirect('Post','index/'.$postId);\n }\n else {\n echo \"Commentaire trop court\";\n }\n \n // Execute the default action to reload and display the Posts list\n $this->executeAction(\"index\");\n\n }", "public function addComment(): void\n {\n $this->articleId = $_GET['articleId'];\n $this->content = $_POST['comment'];\n $this->author = $_POST['nickname'];\n $datetime = new DateTime();\n $this->date = $datetime->format('Y-m-d H:i:s');\n\n $this->commentModel->addComment($this->content, $this->date, $this->author, $this->articleId);\n\n // Redirect to the article page\n Router::redirectTo('articleDetails&id=' . $this->articleId);\n exit();\n }", "public function comment_form() {\n\n\t\t/** Don't do anything if we are in the admin */\n\t\tif ( is_admin() )\n\t\t\treturn;\n\n\t\t/** Don't do anything unless the user has already logged in and selected a list */\n/*\t\tif ( empty( $tgm_mc_options['current_list_id'] ) )\n\t\t\treturn;\n*/\n\t\t$clear = CTCT_Settings::get('comment_form_clear') ? 'style=\"clear: both;\"' : '';\n\t\t$checked_status = ( ! empty( $_COOKIE['tgm_mc_checkbox_' . COOKIEHASH] ) && 'checked' == $_COOKIE['tgm_mc_checkbox_' . COOKIEHASH] ) ? true : false;\n\t\t$checked = $checked_status ? 'checked=\"checked\"' : '';\n\t\t$status = ''; //$this->get_viewer_status();\n\n\t\tif ( 'admin' == $status ) {\n\t\t\techo '<p class=\"ctct-subscribe\" ' . $clear . '>' . CTCT_Settings::get('comment_form_admin_text') . '</p>';\n\t\t}\n\t\telseif ( 'subscribed' == $status ) {\n\t\t\techo '<p class=\"ctct-subscribe\" ' . $clear . '>' . CTCT_Settings::get('comment_form_subscribed_text') . '</p>';\n\t\t}\n\t\telseif ( 'pending' == $status ) {\n\t\t\techo '<p class=\"ctct-subscribe\" ' . $clear . '>' . CTCT_Settings::get('comment_form_pending_text') . '</p>';\n\t\t}\n\t\telse {\n\t\t\techo '<p class=\"ctct-subscribe\" ' . $clear . '>';\n\n\t\t\t\techo sprintf('<label for=\"ctct-comment-subscribe\"><input type=\"checkbox\" name=\"ctct-subscribe\" id=\"ctct-comment-subscribe\" value=\"subscribe\" style=\"width: auto;\" %s /> %s</label>', $checked, CTCT_Settings::get('comment_form_check_text'));\n\t\t\techo '</p>';\n\t\t}\n\n\t}", "function mft_form_comment_form_alter(&$form, &$form_state) {\n $form['author']['homepage']['#access'] = FALSE;\n $form['actions']['submit']['#value'] = t('Post');\n}", "private function addEditFormAfterContent() {\n\t\t// this div is opened when encapsulating the default editor in addEditFormBeforeContent.\n\t\treturn '</div><div style=\"clear: both\"></div>';\n\t}", "function view_comment()\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$comment_id = $this->input->get('comment_id');\n\t\t$this->view_comments('', '', '', array($comment_id));\n\t}", "public function post_after_article() {\n\t\tglobal $post;\n\t\t$categories = get_the_category( $post->ID );\n\t\t?>\n\n\t\t<div class=\"section section-blog-info\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t<div class=\"entry-categories\"><?php esc_html_e( 'Categories:', 'hestia' ); ?>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tforeach ( $categories as $category ) {\n\t\t\t\t\t\t\techo '<span class=\"label label-primary\"><a href=\"' . esc_url( get_category_link( $category->term_id ) ) . '\">' . esc_html( $category->name ) . '</a></span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php the_tags( '<div class=\"entry-tags\">' . esc_html__( 'Tags: ', 'hestia' ) . '<span class=\"entry-tag\">', '</span><span class=\"entry-tag\">', '</span></div>' ); ?>\n\t\t\t\t</div>\n\t\t\t\t<?php do_action( 'hestia_blog_social_icons' ); ?>\n\t\t\t</div>\n\t\t\t<hr>\n\t\t\t<?php\n\t\t\t$this->maybe_render_author_box();\n\t\t\tif ( comments_open() || get_comments_number() ) :\n\t\t\t\tcomments_template();\n\t\t\tendif;\n\t\t\t?>\n\t\t</div>\n\t\t<?php\n\t}", "public function actionComments()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render(\n\t\t\t'comments',\n\t\t\tarray(\n\t\t\t\t'_Comments' => Feedback::model()->findAll(array('order'=>'date_inserted DESC'))\n\t\t\t)\n\t\t);\n\t}", "public function action_block_form_recent_comments( $form, $block )\n\t{\n\t\t$form->append( FormControlLabel::wrap( _t( 'Comments to show:' ),\n\t\t\tFormControlText::create( 'quantity', $block ) \n\t\t));\n\t}", "function warquest_home_comment_edit_do() {\r\n\r\n\t/* input */\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $uid;\r\n\tglobal $other;\r\n\t\t \r\n\t/* output */\r\n\tglobal $page;\r\n\t\t\t\r\n\tif ($uid!=0) {\r\n\t\t$query = 'select comment from comment where id='.$uid;\r\n\t\t$result = warquest_db_query($query);\r\n\t\t$data = warquest_db_fetch_object($result);\r\n\t\t\r\n\t\t$comment = $data->comment;\r\n\t\t\r\n\t} else {\r\n\t\r\n\t\t/* Clear input parameters */\r\n\t\t$comment = \"\";\r\n\t}\r\n\t\r\n\t$page .= \"<script language=\\\"JavaScript\\\" type=\\\"text/javascript\\\">function limitText(limitField, limitNum) { if (limitField.value.length >= limitNum) { limitField.value = limitField.value.substring(0, limitNum); } } </script>\";\r\n\t\t\r\n\t$page .= '<div class=\"box\">';\t\r\n\t\r\n\t$page .= '<table>';\r\n\t$page .= '<tr>';\r\n\t$page .= '<td width=\"500\">';\r\n\r\n\tif (isset($other->pid)) {\r\n\t\t$tmp = player_format($other->pid, $other->name, $other->country);\r\n\t} else {\r\n\t\t$tmp = t('GENERAL_ALL');\r\n\t}\r\n\t$page .= t('ALLIANCE_COMMENT_TEXT2', $tmp).'<br/>'; \r\n\t\r\n\t$page .= '<textarea style=\"width:100%\" id=\"comment\" name=\"comment\" rows=\"5\" ';\r\n\t$page .= 'onKeyDown=\"limitText(this,400)\">'.$comment.'</textarea><br/>';\r\n\t$page .= warquest_show_smilies();\r\n\t$page .= '<br/><br/>';\r\n\t\r\n\tif (isset($other->pid)) {\r\n\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_SAVE.'&oid='.$other->pid.'&uid='.$uid, t('LINK_SAVE'), 'save').' ';\r\n\t} else {\r\n\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_SAVE.'&uid='.$uid, t('LINK_SAVE'), 'save').' ';\r\n\t}\r\n\t\r\n\tif ($uid!=0) {\r\n\t\t$page .= ' ';\r\n\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_DELETE.'&uid='.$uid, t('LINK_DELETE'), 'delete');\r\n\t}\r\n\t\r\n\t$page .= '</td>';\r\n\t$page .= '</tr>';\r\n\t$page .= '</table>';\r\n\r\n\t$page .= '</div>';\t\r\n}", "function perform()\r\n {\r\n // init variables (see private function below)\r\n $this->initVars();\r\n\r\n // Should we show and allow article comments and show the comment form\r\n //\r\n // $this->config->getModuleVar('article', 'use_comment') == 1\r\n // --------------------------------------------\r\n // global enables comments for all articles\r\n //\r\n // $this->config->getModuleVar('article', 'allow_comment') == 1\r\n // ----------------------------------------------\r\n // Allow comments for just this article\r\n //\r\n //\r\n // Do we show comments but not the add comment form?\r\n // Means: Visitors cant add no more comments\r\n //\r\n if($this->viewVar['article']['close_comment'] == 0)\r\n {\r\n $this->viewVar['showCommentForm'] = true;\r\n\r\n // add or preview comment\r\n if(!empty($this->previewComment))\r\n {\r\n $this->previewComment();\r\n }\r\n else\r\n {\r\n if(false !== ($num = $this->model->session->get('c_submit_number')))\r\n {\r\n $addComment = $this->httpRequest->getParameter( 'addComment'.$num, 'post', 'alnum' );\r\n if(false !== $addComment)\r\n {\r\n $this->addComment();\r\n }\r\n }\r\n else\r\n {\r\n \t// simple anti spam methode\r\n \t//\r\n $trial = $this->httpRequest->getParameter( 'trial', 'post', 'alnum' );\r\n if(false !== $trial)\r\n {\r\n $_txt = \"\\n################# Blog ####################\\n\";\r\n $_txt .= \"Date: \".date('Y-m-d H:i:s').\"\\n\";\r\n $_txt .= \"IP: \".$_SERVER[\"REMOTE_ADDR\"].\"\\n\";\r\n $_txt .= \"Agent: \".$_SERVER[\"HTTP_USER_AGENT\"].\"\\n\";\r\n $_txt .= \"Name: \".JapaCommonUtil::stripSlashes(trim($this->httpRequest->getParameter( 'cauthor', 'post', 'raw' )));\r\n $_txt .= \"\\nEmail: \".JapaCommonUtil::stripSlashes(trim($this->httpRequest->getParameter( 'cemail', 'post', 'raw' )));\r\n $_txt .= \"\\nBody: \".JapaCommonUtil::stripSlashes(trim($this->httpRequest->getParameter( 'cbody', 'post', 'raw' )));\r\n\r\n @error_log($_txt, 3, JAPA_APPLICATION_DIR . \"logs/wrong_button.log\");\r\n }\r\n }\r\n }\r\n\r\n $this->viewVar['c_submit_number'] = rand(1,19);\r\n $this->model->session->set('c_submit_number', $this->viewVar['c_submit_number']);\r\n\r\n // get article comments\r\n $this->model->action('article','comments',\r\n array('result' => & $this->viewVar['articleComments'],\r\n 'id_article' => (int)$this->viewVar['article']['id_article'],\r\n 'status' => array('=', 2),\r\n 'fields' => array('id_comment','pubdate',\r\n 'body','id_user',\r\n 'author','email','url') ));\r\n\r\n // add html code to comments\r\n foreach($this->viewVar['articleComments'] as & $comment)\r\n {\r\n $comment['body'] = $this->addHtmlToComments( $comment['body'] );\r\n }\r\n }\r\n }", "public function display_fields_front() {\n add_action('comment_form_top', array(&$this, 'load_fields_front'));\n add_action('comment_form_before_fields', array(&$this, 'load_fields_front'));\n add_action('comment_form_logged_in_after', array(&$this, 'load_fields_front'));\n add_action('comment_form_after_fields', array(&$this, 'load_fields_front'));\n add_filter('comment_form_submit_field', function ($field, $args) {\n ob_start();\n $this->load_fields_front();\n $out = ob_get_clean();\n return $out . $field;\n }, 10, 2);\n }", "public function comments()\n\t{\n\t\t$this->_crud->set_table('ent_cr_comments');\n\t\t$this->_crud->set_subject('Comment');\n\t\t$this->_crud->set_relation('ent_cr_recipes_id','ent_cr_recepies','title');\n\t\t$this->_crud->display_as('ent_cr_recepies_id', 'Recipe');\n\t\t$this->_crud->required_fields('name', 'email', 'comments', 'ent_cr_recipes_id');\n\t\tstatic::$data['name'] = 'crud';\n\t\tstatic::$data['content_replace'] = $this->_crud->render();\n\n\t\t$this->_crud_output('main', static::$data);\n\t}", "public function render()\n {\n return view('components.post.add_comment');\n }", "public function render() {\n\n\t\tif(!$this->commentsField) return \"Unable to determine comments field\";\n\t\t$options = $this->options; \t\n\t\t$labels = $options['labels'];\n\t\t$attrs = $options['attrs'];\n\t\t$id = $attrs['id'];\n\t\t$submitKey = $id . \"_submit\";\n\t\t$honeypot = $options['requireHoneypotField'];\n\t\t$inputValues = array('cite' => '', 'email' => '', 'website' => '', 'stars' => '', 'text' => '', 'notify' => '');\n\t\tif($honeypot) $inputValues[$honeypot] = '';\n\t\t\n\t\t$user = $this->wire('user'); \n\n\t\tif($user->isLoggedin()) {\n\t\t\t$inputValues['cite'] = $user->name; \n\t\t\t$inputValues['email'] = $user->email;\n\t\t}\n\t\t\n\t\t$input = $this->wire('input'); \n\t\t$divClass = 'new';\n\t\t$class = trim(\"CommentForm \" . $attrs['class']); \n\t\t$note = '';\n\n\t\t/*\n\t\t * Removed because this is not cache safe! Converted to JS cookie. \n\t\t * \n\t\tif(is_array($this->session->CommentForm)) {\n\t\t\t// submission data available in the session\n\t\t\t$sessionValues = $this->session->CommentForm;\n\t\t\tforeach($inputValues as $key => $value) {\n\t\t\t\tif($key == 'text') continue; \n\t\t\t\tif(!isset($sessionValues[$key])) $sessionValues[$key] = '';\n\t\t\t\t$inputValues[$key] = htmlentities($sessionValues[$key], ENT_QUOTES, $this->options['encoding']); \n\t\t\t}\n\t\t\tunset($sessionValues);\n\t\t}\n\t\t*/\n\n\t\tforeach($options['presets'] as $key => $value) {\n\t\t\tif(!is_null($value)) $inputValues[$key] = $value; \n\t\t}\n\n\t\t$out = '';\n\t\t$showForm = true; \n\t\t\n\t\tif($options['processInput'] && $input->post->$submitKey == 1) {\n\t\t\t$comment = $this->processInput(); \n\t\t\tif($comment) { \n\t\t\t\t$out .= $this->renderSuccess($comment); // success, return\n\t\t\t} else {\n\t\t\t\t$inputValues = array_merge($inputValues, $this->inputValues);\n\t\t\t\tforeach($inputValues as $key => $value) {\n\t\t\t\t\t$inputValues[$key] = htmlentities($value, ENT_QUOTES, $this->options['encoding']);\n\t\t\t\t}\n\t\t\t\t$note = \"\\n\\t$options[errorMessage]\";\n\t\t\t\t$divClass = 'error';\n\t\t\t}\n\n\t\t} else if($this->options['redirectAfterPost'] && $input->get('comment_success') === \"1\") {\n\t\t\t$note = $this->renderSuccess();\n\t\t}\n\n\t\t$form = '';\n\t\tif($showForm) {\n\t\t\tif($this->options['depth'] > 0) {\n\t\t\t\t$form = $this->renderFormThread($id, $class, $attrs, $labels, $inputValues);\n\t\t\t} else {\n\t\t\t\t$form = $this->renderFormNormal($id, $class, $attrs, $labels, $inputValues); \n\t\t\t}\n\t\t\tif(!$options['presetsEditable']) {\n\t\t\t\tforeach($options['presets'] as $key => $value) {\n\t\t\t\t\tif(!is_null($value)) $form = str_replace(\" name='$key'\", \" name='$key' disabled='disabled'\", $form); \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$out .= \n\t\t\t\"\\n<div id='{$id}' class='{$id}_$divClass'>\" . \t\n\t\t\t\"\\n\" . $this->options['headline'] . $note . $form . \n\t\t\t\"\\n</div><!--/$id-->\";\n\n\n\t\treturn $out; \n\t}", "function addComment(){\n\t\t$this->Article->Comment->create();\n\t\tif ($this->Article->Comment->save($this->data)) {\n\t\t\techo __('Your comment has been added successfully, and will be viewed soon after approving.', true);\n\t\t} else {\n\t\t\techo __('Your comment could not be added.', true);\n\t\t\techo '<br />';\n\t\t\tforeach($this->Article->Comment->validationErrors as $key=>$val){\n\t\t\t\techo $val.',<br />';\n\t\t\t}\n\t\t\techo 'and try again.';\n\t\t}\n\t\t$this->autoRender = false;\n\t}", "public function comment()\n {\n $commentManager = new CommentManager();\n \n $comment = $commentManager->getComment($_GET['id']);\n \n require (__DIR__ . '/../view/frontend/commentView.php');\n }", "function dispEapprvDeleteComment(){\n\t\t$comment_srl = Context::get('comment_srl');\n\n\t\t// if the comment exists, then get the comment information\n\t\tif($comment_srl)\n\t\t{\n\t\t\t$oCommentModel = getModel('comment');\n\t\t\t$oComment = $oCommentModel->getComment($comment_srl, $this->grant->manager);\n\t\t}\n\t\t\n\t\t\t\t// if the comment is not granted, then back to the password input form\n\t\tif(!$oComment->isGranted())\n\t\t{\n\t\t\treturn $this->setTemplateFile('input_password_form');\n\t\t}\n\n\t\tContext::set('oComment',$oComment);\n\t\t/**\n\t\t * add JS filters\n\t\t **/\n\t\tContext::addJsFilter($this->module_path.'tpl/filter', 'delete_comment.xml');\n\t\t$this->setTemplateFile('delete_comment_form');\n\t}", "public function addComment()\n {\n session_start();\n $superglobalsPost = $this->getSuperglobals()->get_POST();\n $newComment = new CommentManager;\n $superglobalsPost['status'] = \"waiting\";\n $newComment->createComment($superglobalsPost);\n if (isset($superglobalsPost['post_id'])) {\n $post_id = $superglobalsPost['post_id'];\n }\n $titleAction = \"Confirmation d'enregistrement\"; //confirmation message\n $actionConfirmation = \"/post?id=\" . $post_id;\n $textConfirmation = \"Votre commentaire a bien été enregistré\";\n echo $this->getRender()->render('confirmationTemplate.twig', [\n 'titleAction' => $titleAction,\n 'actionConfirmation' => $actionConfirmation,\n 'textConfirmation' => $textConfirmation,\n 'session' => $this->getSuperglobals()->get_SESSION()\n ]);\n }", "function affiche_form_edition($content,$idCom,$idPost)\r\n{\r\n\tif(isset($_SESSION['id']))\r\n\t{\r\n\t\tif(isadmin($_SESSION['id']))\r\n\t\t{\r\n\t\t\techo \"<form name='edit_com' action='controller/actions.php' method='post'>\";\r\n\t\t\t\techo \"<textarea name='commentaire' cols='50' row='30'>\".$content.\"</textarea></br>\";\r\n\t\t\t\techo \"<input name='id_com' type='hidden' value='\".$idCom.\"'/>\";\r\n\t\t\t\techo \"<input name='action' value='Editer com' type='submit'/>\";\r\n\t\t\t\techo \"<input type='hidden' name='url' value='?page=article&POST_ID=\".$idPost.\"'/>\";\r\n\t\t\techo \"</form>\";\r\n\t\t}\r\n\t}\r\n}", "protected function addShowForm() \n {\n return view('dashboard.article.add');\n }", "function action_form_comment($form)\n {\n $user = User::identify();\n if ($user->loggedin) {\n return;\n }\n\n $this->load_options();\n if (!$this->ready) {\n return;\n }\n\n // If the commenter has been approved as valid before, don't show the captcha\n if (isset($_SESSION['recaptchaV2_commenter_validated'])\n && $_SESSION['recaptchaV2_commenter_validated'] == true) {\n $form->insert('cf_submit', 'static', 'recaptcha', '');\n } // If the commenter has been checked and not approved, show the captcha and add validation\n else if (isset($_SESSION['recaptchaV2_commenter_validated'])) {\n $html\n = '<script>\n window.onload = function() { \n document.getElementById(\"cf_submit\").style.display=\"none\";\n document.getElementById(\"g-recaptcha\").style.display=\"block\";\n }\n\t\t function YourOnSubmitFn(token) {\n\t\t document.getElementById(\"comment-public\").submit();\n\t\t }\n\t\t </script>';\n $html\n .= '<button class=\"g-recaptcha\" id=\"g-recaptcha\" data-sitekey=\"'.$this->options['public_key'].'\"\n\t\t\t\tdata-callback=\"YourOnSubmitFn\" style=\"display: none\">Senden</button>';\n\n $recaptcha = $form->insert('cf_submit', 'static', 'recaptcha', $html);\n $recaptcha->add_validator([$this, 'validate']);\n } // If the commenter has not yet been checked, don't show the captcha, but add validation for the commenter\n else {\n $form->cf_commenter->add_validator([$this, 'validate_commenter']);\n $form->insert('cf_submit', 'static', 'recaptcha', '');\n }\n }", "public function addComment()\n {\n $this->isConnect();\n\n $post = $this->token->check($_POST);\n\n $formMessage = $this->commentsValidationForm->checkForm($post);\n\n if(!$formMessage)\n {\n $post['user_id'] = $_SESSION['id'];\n $post['validated'] = ($_SESSION['statut'] === 'admin') ? 1 : null;\n $this->comments->add($post);\n header('Location: index.php?route=front.postById&id=' . $_POST['post_id'] . '&success=' . $_SESSION['statut'] . '#comments');\n exit;\n }\n else\n {\n $postAddUnvalid = $post;\n $post = $this->posts->postById($_GET['id']);\n $comments = $this->comments->commentsById($_GET['id']);\n $this->render('postById', compact('formMessage', 'postAddUnvalid', 'post', 'comments'));\n }\n }", "function gk_comment_form( $fields ) {\n ob_start();\n wp_editor( '', 'comment', array( 'teeny' => true ));\n $fields['comment_field'] = ob_get_clean();\n return $fields;\n}", "public function execute() {\n\t\tif(!empty($_POST['author']) OR (empty($_POST['author']) AND isset($_SESSION['username']) AND !empty($_POST['content']))) {\n\t\t\t$comment = new Comment();\n\t\t\t$comment->setArticleId($_GET['id']);\n\t\t\tif(isset($_SESSION['username'])) {\n\t\t\t\t$comment->setAuthor($_SESSION['username']);\n\t\t\t} else {\n\t\t\t\t$comment->setAuthor($_POST['author']);\n\t\t\t}\n\t\t\t$comment->setContent($_POST['content']);\n\t\t\tif(isset($_POST['parentId'])) {\n\t\t\t\t$comment->setParentId($_POST['parentId']);\n\t\t\t}\n\t\t\t$this->commentManager->add($comment);\n\t\t\t$_SESSION['flash']['success'] = 'Votre commentaire a bien été ajouté.';\n\t\t}\n\n\t\t// Signalement d'un commentaire.\n\t\tif(isset($_GET['action'])) {\n\t\t\tif($_GET['action'] == 'signal') {\n\t\t\t\t$comment = $this->commentManager->getSpecificComment($_GET['commentId']);\n\t\t\t\t$this->commentManager->signal($comment);\n\t\t\t\t$_SESSION['flash']['success'] = 'Le commentaire a bien été signalé. Il sera modéré par l\\'administrateur dès que possible.';\n\t\t\t}\n\t\t}\n\n\t\t// Les 5 derniers articles publiés et un article spécifique.\n\t\t$lastArticles = $this->articleManager->getLastArticles();\n\t\t$articleUnique = $this->articleManager->getUnique($_GET['id']);\n\t\t// Liste des commentaires de l'article courant et total de ses commentaires.\n\t\t$listOfComments = $this->commentManager->getComments($_GET['id']);\n\t\t$numberOfComments = $this->commentManager->count($_GET['id']);\n\n\t\t$viewSingle = new ViewSingle($articleUnique, $listOfComments, $numberOfComments, $lastArticles);\n\t\t$viewSingle->display();\n\t}", "public function run(){\n\t\tYii::app()->clientScript->registerScript('enterComment',\"\n\t\t\t$('#Comment_content').live('keypress', function(e){\n\t\t\t if(e.keyCode == 13){\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t//jQuery.ajax({'type':'POST','url':'/comment/comment','cache':false,'data':jQuery(this).parents(\\\"form\\\").serialize(),'success':function(html){jQuery(\\\"#comment-page\\\").html(html)}});$('#Comment_content').attr('disabled', 'disabled');\n\t\t\t\t $('#comment').trigger('click'); \n\t\t\t\t\treturn false;\n\t\t\t\t }\n \t});\", CClientScript::POS_END);\n\t\t\n\t\tYii::app()->clientScript->registerScript('deleteComment',\"\n\t\t\t$('.close > a').live('click', function(e){jQuery.ajax({'type':'GET','success':$('#comment'+$(this).attr('id').substring(1)).hide('slow'),'data':{'id':$(this).attr('id').substring(1)},'url':'\".CHtml::normalizeUrl(array('/comment/deleteComment')).\"','cache':false});return false;\n\t\t});\", CClientScript::POS_END);\n\t\t\n\t\t$this->render('commenting',array(\n\t\t\t'model'=>$this->model,\n\t\t\t'comments'=>$this->comments,\n\t\t));\n }", "public static function load()\n {\n P4Cms_PubSub::subscribe('p4cms.content.render.close',\n function($html, $helper)\n {\n $entry = $helper->getEntry();\n\n // if we don't have an entry id or the entry being rendered\n // isn't the default we won't append comments\n if (!$entry->getId()\n || $entry->getId() != $helper->getDefaultEntry()->getId()\n ) {\n return $html;\n }\n\n // let comment view helper take care of the rest.\n $html = $helper->getView()->comments(\n \"content/\" . $entry->getId(),\n (array) $entry->getValue('comments')\n ) . $html;\n\n return $html;\n }\n );\n\n // participate in content editing by providing a subform.\n P4Cms_PubSub::subscribe('p4cms.content.form.subForms',\n function(Content_Form_Content $form)\n {\n return new Comment_Form_Content(\n array(\n 'name' => 'comments',\n 'order' => -10\n )\n );\n }\n );\n\n // provide comment grid (moderate) actions\n P4Cms_PubSub::subscribe('p4cms.comment.grid.actions',\n function($actions)\n {\n $actions->addPages(\n array(\n array(\n 'label' => 'Approve',\n 'onClick' => 'p4cms.comment.grid.Actions.onClickApprove();',\n 'onShow' => 'p4cms.comment.grid.Actions.onShowApprove(this);',\n 'order' => '10'\n ),\n array(\n 'label' => 'Reject',\n 'onClick' => 'p4cms.comment.grid.Actions.onClickReject();',\n 'onShow' => 'p4cms.comment.grid.Actions.onShowReject(this);',\n 'order' => '20'\n ),\n array(\n 'label' => 'Pend',\n 'onClick' => 'p4cms.comment.grid.Actions.onClickPend();',\n 'onShow' => 'p4cms.comment.grid.Actions.onShowPend(this);',\n 'order' => '30'\n ),\n array(\n 'label' => 'Delete',\n 'onClick' => 'p4cms.comment.grid.Actions.onClickDelete();',\n 'order' => '40'\n ),\n array(\n 'label' => '-',\n 'onShow' => 'p4cms.comment.grid.Actions.onShowView(this);',\n 'order' => '50'\n ),\n array(\n 'label' => 'View Content Entry',\n 'onClick' => 'p4cms.comment.grid.Actions.onClickView();',\n 'onShow' => 'p4cms.comment.grid.Actions.onShowView(this);',\n 'order' => '60'\n ),\n )\n );\n }\n );\n\n // provide form to search comments\n P4Cms_PubSub::subscribe('p4cms.comment.grid.form.subForms',\n function(Zend_Form $form)\n {\n return new Ui_Form_GridSearch;\n }\n );\n\n // filter comment list by search term\n P4Cms_PubSub::subscribe('p4cms.comment.grid.populate',\n function(P4Cms_Record_Query $query, Zend_Form $form)\n {\n $values = $form->getValues();\n\n // extract search query.\n $keywords = isset($values['search']['query'])\n ? $values['search']['query']\n : null;\n\n // early exit if no search text.\n if (!$keywords) {\n return;\n }\n\n // add a text search filter to the comment query.\n $filter = new P4Cms_Record_Filter;\n $fields = array('comment', 'user', 'name');\n $filter->addSearch($fields, $keywords);\n $query->addFilter($filter);\n }\n );\n\n // provide form to filter comments by status.\n P4Cms_PubSub::subscribe('p4cms.comment.grid.form.subForms',\n function(Zend_Form $form)\n {\n $form = new P4Cms_Form_SubForm;\n $form->setName('status');\n $form->addElement(\n 'radio',\n 'status',\n array(\n 'label' => 'Status',\n 'multiOptions' => array(\n '' => 'Any State',\n Comment_Model_Comment::STATUS_PENDING => 'Only Pending',\n Comment_Model_Comment::STATUS_APPROVED => 'Only Approved',\n Comment_Model_Comment::STATUS_REJECTED => 'Only Rejected'\n ),\n 'autoApply' => true,\n 'value' => ''\n )\n );\n\n return $form;\n }\n );\n\n // filter comment list by status\n P4Cms_PubSub::subscribe('p4cms.comment.grid.populate',\n function(P4Cms_Record_Query $query, Zend_Form $form)\n {\n $values = $form->getValues();\n\n // extract status filter.\n $status = isset($values['status']['status'])\n ? $values['status']['status']\n : null;\n\n // early exit if no status filter.\n if (!$status) {\n return;\n }\n\n // add a status filter to the comment query.\n $filter = new P4Cms_Record_Filter;\n $filter->add('status', $status);\n $query->addFilter($filter);\n }\n );\n\n // organize comment records when pulling changes.\n P4Cms_PubSub::subscribe(\n 'p4cms.site.branch.pull.groupPaths',\n function($paths, $source, $target, $result)\n {\n $paths->addSubGroup(\n array(\n 'label' => 'Comments',\n 'basePaths' => $target->getId() . '/comments/...',\n 'inheritPaths' => $target->getId() . '/comments/...'\n )\n );\n }\n );\n }", "public function DisplayCommentForm($comment_id = null)\n {\n global $DB, $bbcode, $categoryid, $mainsettings, $sdlanguage, $userinfo, $sdurl;\n\n if(empty($this->_internal_call))\n {\n $this->setPerm($this->plugin_id,$this->object_id);\n }\n if(empty($this->plugin_id) || empty($this->object_id))\n {\n return false;\n }\n\n if(!$this->hasPostAccess)\n {\n return false;\n }\n\n if(!empty($_POST['insert_comment']))\n {\n $comment_username = GetVar('comment_username', '', 'string');\n $comment_comment = GetVar('comment_comment', '', 'string');\n }\n else\n {\n $comment_username = '';\n $comment_comment = '';\n }\n\n // SD313: use last comment for current object as page hash\n $lastentry = $DB->query_first('SELECT MAX(commentid) max_id'.\n ' FROM {comments}'.\n ' WHERE pluginid = %d AND objectid = %d'.\n ' LIMIT 1', $this->plugin_id, $this->object_id);\n\n $link = $this->isArticle ? $this->url : RewriteLink($this->url);\n $anchor = isset($lastentry['max_id']) ? '&amp;c='.$lastentry['max_id'].'#c'.$lastentry['max_id'] : '';\n\n //SD360: ajax-submittal of new comment to avoid post-buffer on reload\n if($this->allow_comments && $this->hasPostAccess)\n\t{\n\t\t// Instantiate smarty object\n\t\t$_smarty = SD_Smarty::getNew(true); //SD370: 1st param must be \"true\"\n\t\t$_smarty->assign('AdminAccess', ($userinfo['adminaccess'] || (!empty($userinfo['pluginadminids']) &&\n\t\t\t\t\t\t\t\t\t\t\t\t@array_key_exists($this->plugin_id,array_flip($userinfo['pluginadminids'])))));\n\t\t$_smarty->assign('categoryid', $categoryid);\n\t\t$_smarty->assign('pluginid',\t$this->plugin_id);\n\t\t$_smarty->assign('objectid',\t$this->object_id);\n\t\t$_smarty->assign('language', $sdlanguage);\n\t\t$_smarty->assign('settings', \t$mainsettings);\n\t\t$_smarty->assign('userinfo',\t$userinfo);\n\t\t$_smarty->assign('sdurl',\t\t$sdurl);\n\t\t$_smarty->assign('secure_token', PrintSecureToken('comment_token'));\n\t\t$_smarty->assign('link',\t\t$link);\n\t\t$_smarty->assign('comment_username', $comment_username);\n\t\t$_smarty->assign('comment_comment',\t $comment_comment);\n\t\n\n // SD313: is site-wide BBCode enabled?\n $allow_bbcode = !empty($mainsettings['allow_bbcode']) && isset($bbcode) && ($bbcode instanceof BBCode);\n\n \n $_smarty->assign('bbeditor', DisplayBBEditor($allow_bbcode, 'comment_comment', $comment_comment,'','','', true));\n\t $_smarty->assign('captcha',\t DisplayCaptcha(false));\n $_smarty->assign('allow_bbcode', $allow_bbcode);\n\t\n //SD370: output new custom comments form footer option\n $footer_done = false;\n if(!empty($mainsettings['comments_form_footer']) && ($tmp = $mainsettings['comments_form_footer']) &&\n (strlen($tmp) > 10) && (strpos($tmp, 'type=\"submit\"')!==false))\n {\n $_smarty->assign('footer', str_replace('{post_comment}',htmlspecialchars($sdlanguage['post_comment']),$tmp));\n $footer_done = true;\n }\n\t\n if(!$footer_done)\n {\n $_smarty->assign('footer', '<input type=\"submit\" value=\"'.htmlspecialchars($sdlanguage['post_comment']).'\" />');\n }\n\t\n\t$err_msg = '<br /><b>'.$plugin_names[$this->plugin_id].' ('.$this->plugin_id.') template file NOT FOUND!</b><br />';\n \n if(defined('SD_SMARTY_VERSION') && (SD_SMARTY_VERSION > 2)) //SD344\n {\n $error = !SD_Smarty::display(0, 'comment_form.tpl', $_smarty);\n \n if($error && !empty($userinfo['adminaccess']))\n {\n $err = SD_Smarty::getLastError();\n echo $err.$err_msg;\n }\n }\n else\n {\n\t\t if(is_file(SD_INCLUDE_PATH.'tmpl/comment_form.tpl')) //SD343\n\t\t {\n\t\t\t $_smarty->display('comment_form.tpl');\n\t\t }\n\t\t elseif(is_file(SD_INCLUDE_PATH.'tmpl/defaults/comment_form.tpl'))\n\t\t {\n\t\t\t $_smarty->setTemplateDir(SD_INCLUDE_PATH.'tmpl/defaults/');\n\t\t\t $_smarty->display('comment_form.tpl');\n\t\t }\n\t }\n\n }\n return true;\n\n }", "public function detailsAction()\n {\n // Get first parameter from URL as article $id.($this->params are from Controller)\n // $id = $this->params[0];\n $id = $this->getParam();\n\n // If NO parameters = redirect to Home Page\n if (!$id) {\n return redirect('');\n }\n\n /**\n * Call static function from Model which return article object or null.\n *\n * $article = new Article();\n * $article->findOne($sql, $params);\n */\n $article = Article::findById($id);\n\n // To get author for article\n $user = $article->getUser();\n\n // Set variable in Controller which will be sent to the Views (afterAction())\n $this->variables = [\n 'article' => $article,\n 'author' => $user,\n ];\n\n // Start of comment validation\n $validation = new Validation();\n\n // From post data\n $validation->setData($_POST);\n\n $validation->setRules([\n 'content' => ['required', 'minimum:4'],\n ]);\n\n // Added to $this->variables another variable(validation).\n $this->variables['validation'] = $validation;\n\n if (!empty($_POST)) {\n if (!Auth::loggedIn()) {\n return redirect('auth/login');\n }\n\n // Check all the rules and - add errors if not passed\n $validation->validate();\n\n // Get errors if any\n $errors = $validation->getErrors();\n\n // Check whether validation on all fields passed (no errors)\n if (!$errors) {\n\n // Create empty comment object\n $comment = new Comment();\n\n // $comment->setContent($_POST['content']);\n // $comment->setArticleId($id);\n // $comment->setUserId(Auth::getLoggedInUserId());\n\n $comment->fill([\n 'content' => $_POST['content'],\n 'article_id' => $article->getId(),\n 'user_id' => Auth::getLoggedInUserId(),\n ]);\n\n // Save comment to database\n $comment = $comment->create();\n\n set_alert('success', '<b>Success!</b> Comment has been added!');\n\n return redirect('articles/details/' . $article->getId());\n } else {\n set_alert('danger', '<b>Warning!</b> Please correct the errors!');\n }\n }\n }", "public function comments()\n {\n $comments = $this->comment->getAllComments();\n $this->buildView(array('comments' => $comments));\n }", "public function newComment() {\n $datas['chapter_id'] = abs((int) $_GET['id']);\n $datas['author'] = trim(htmlspecialchars((string) $_POST['newCommentAuthor']));\n $datas['content'] = trim(htmlspecialchars((string) $_POST['newCommentContent']));\n\n if (!empty($datas['content']) && !empty($datas['author'])) {\n $commentMngr = new CommentManager();\n $commentMngr->add($datas);\n \n $_SESSION['commentsPseudo'] = $datas['author'];\n } else {\n $GLOBALS['error']['newComment'] = \"Un commentaire ne peut pas être vide et doit impérativement être associé à un pseudo.\";\n }\n }", "public function displayComments()\n {\n global $lexicon;\n $lexicon = new Lexicon(COMMENTIA_LEX_LOCALE);\n\n global $roles;\n $roles = new Roles();\n\n /**\n * Iterates through each comment recursively, and appends it to the var holding the HTML markup.\n *\n * @param array $comment An array containing all the comment data\n */\n\n foreach ($this->comments as $comment) {\n if (isset($this->comments['ucid-'.$comment['ucid']])) {\n $this->renderCommentView($comment['ucid']);\n unset($this->comments['ucid-'.$comment['ucid']]);\n }\n }\n\n if ($_SESSION['__COMMENTIA__']['member_is_logged_in']) {\n $this->html_output .= ('<div class=\"commentia-new_comment_area\">'.\"\\n\".'<h4>'.TITLES_NEW_COMMENT.'</h4>'.\"\\n\".'<textarea id=\"comment-box\" oninput=\"autoGrow(this);\"></textarea>'.\"\\n\".'<button id=\"post-comment-button\" onclick=\"postNewComment(this);\">'.COMMENT_CONTROLS_PUBLISH.'</button>'.\"\\n\".'</div>'.\"\\n\");\n }\n\n return $this->html_output;\n }", "private function add_comment()\n\t{\n\t\tif(!$this->owner->logged_in())\n\t\t\treturn new View('public_forum/login');\n\t\t\n\t\tif(empty($_POST['body']))\n\t\t\treturn 'Reply cannot be empty.';\n\t\t\n\t\t$post_id = $this->filter;\n\t\t$new_comment = ORM::Factory('forum_cat_post_comment');\n\t\t$new_comment->forum_cat_post_id = $post_id;\n\t\t$new_comment->owner_id\t= $this->owner->get_user()->id;\n\t\t$new_comment->body\t\t\t= $_POST['body'];\n\t\t$new_comment->save();\n\t\treturn 'Thank you, your comment has been added!';\t\t\n\t}", "function print_embed_comments_button()\n {\n }", "function pmi_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "function fl_comment_form() {\n\t\n\t$comment_author = '';\n\t$comment_author_email = '';\n\t$comment_author_url = '';\n\t\n\tglobal $id;\n\tglobal $post; \n\t$post = get_post( $_GET['id'] );\t\n\t\n\tif ( isset($_COOKIE['comment_author_'.COOKIEHASH]) ) {\n\t\t$comment_author = apply_filters('pre_comment_author_name', $_COOKIE['comment_author_'.COOKIEHASH]);\n\t\t$comment_author = stripslashes($comment_author);\n\t\t$comment_author = esc_attr($comment_author);\n\t\t$_COOKIE['comment_author_'.COOKIEHASH] = $comment_author;\n\t}\n\t\n\tif ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) ) {\n\t\t$comment_author_email = apply_filters('pre_comment_author_email', $_COOKIE['comment_author_email_'.COOKIEHASH]);\n\t\t$comment_author_email = stripslashes($comment_author_email);\n\t\t$comment_author_email = esc_attr($comment_author_email);\n\t\t$_COOKIE['comment_author_email_'.COOKIEHASH] = $comment_author_email;\n\t}\n\t\n\tif ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) ) {\n\t\t$comment_author_url = apply_filters('pre_comment_author_url', $_COOKIE['comment_author_url_'.COOKIEHASH]);\n\t\t$comment_author_url = stripslashes($comment_author_url);\n\t\t$_COOKIE['comment_author_url_'.COOKIEHASH] = $comment_author_url;\n\t}\t\n?>\n\n<div class=\"content-box comment-form\">\n\t\n\t<div class=\"box-c\">\n\t\t\n\t\t<div class=\"box-holder\">\n\t\t\t\n\t\t\t<div class=\"post-box clearfix\">\n\t\t\t\t\n\t\t\t\t<div class=\"head iconfix\"><h3> <i class=\"icon-comment\"></i> <?php echo fl_get_option( 'fl_lbl_leave_comment' ); ?> </h3></div>\n\t\t\t\t\n\t\t\t\t<div id=\"respond\">\n\t\t\t\t\t\n\t\t\t\t\t<form action=\"/\" method=\"post\" id=\"commentform-<?php echo $post->ID; ?>\" class=\"commentForm\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p><?php printf( __( 'You must be <a href=\"%s\">logged in</a> to post a comment.', APP_TD ), wp_login_url( get_permalink() ) ); ?></p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php if ( is_user_logged_in() ) : global $user_identity; ?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p><?php printf( __( 'Logged in as <a href=\"%1$s\">%2$s</a>.', APP_TD ), CLPR_PROFILE_URL, $user_identity ); ?> <a href=\"<?php echo clpr_logout_url(get_permalink()); ?>\"><?php _e( 'Log out &raquo;', APP_TD ); ?></a></p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<p class=\"comment-text\">\n\t\t\t\t\t\t\t\t<label><?php _e( 'Name:', APP_TD ); ?></label>\n\t\t\t\t\t\t\t\t<input type=\"text\" class=\"text required\" name=\"author\" id=\"author-<?php echo $post->ID; ?>\" value=\"<?php echo esc_attr($comment_author); ?>\" />\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<p class=\"comment-text\">\n\t\t\t\t\t\t\t\t<label><?php _e( 'Email:', APP_TD ); ?></label>\n\t\t\t\t\t\t\t\t<input type=\"text\" class=\"text required email\" name=\"email\" id=\"email-<?php echo $post->ID; ?>\" value=\"<?php echo esc_attr($comment_author_email); ?>\" />\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<p class=\"comment-text\">\n\t\t\t\t\t\t\t\t<label><?php _e( 'Website:', APP_TD ); ?></label>\n\t\t\t\t\t\t\t\t<input type=\"text\" class=\"text\" name=\"url\" id=\"url-<?php echo $post->ID; ?>\" value=\"<?php echo esc_attr($comment_author_url); ?>\" />\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p class=\"comment-textarea\">\n\t\t\t\t\t\t\t<label><?php _e( 'Comments:', APP_TD ); ?></label>\n\t\t\t\t\t\t\t<textarea cols=\"30\" rows=\"10\" name=\"comment\" class=\"commentbox required\" id=\"comment-<?php echo $post->ID; ?>\"></textarea>\t\t\t\t\t\t\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<button type=\"submit\" class=\"comment-submit btn submit\" id=\"submitted\" name=\"submitted\" value=\"submitted\"><?php _e( 'Submit', APP_TD ); ?></button>\t\t\t\n\t\t\t\t\t\t\t<input type='hidden' name='comment_post_ID' value='<?php echo $post->ID; ?>' id='comment_post_ID' />\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php do_action('comment_form', $post->ID); ?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\n\t\t\t\t\t</form>\n\t\t\t\t\t\n\t\t\t\t</div> <!-- #respond -->\n\t\t\t\t\n\t\t\t</div> <!-- #post-box -->\n\t\t\t\n\t\t</div> <!-- #box-holder -->\n\t\t\n\t</div> <!-- #box-c -->\n\t\n</div> <!-- #content-box -->\n\n<?php\n\tdie;\n}", "function showContent()\n {\n if (!empty($this->error)) {\n $this->element('p', 'error', $this->error);\n }\n\n if ($this->boolean('ajax')) {\n $this->showAjaxReviseForm();\n } else {\n $form = new QnareviseanswerForm($this->answer, $this);\n $form->show();\n }\n\n return;\n }", "function dp_facebook_comment_box() {\n\tglobal $options, $options_visual;\n\t// Facebook comment\n\tif ( get_post_meta(get_the_ID(), 'dp_hide_fb_comment', true) ) return;\n\n\tif ( ($options['facebookcomment'] && get_post_type() === 'post') || ($options['facebookcomment_page'] && is_page()) ) {\n\t\techo '<div class=\"dp_fb_comments_div\"><h3 class=\"inside-title\"><span class=\"title\">'.htmlspecialchars_decode($options['fb_comments_title']).'</span></h3><div class=\"fb-comments\" data-href=\"'.get_permalink ().'\" data-num-posts=\"'.$options['number_fb_comment'].'\" data-width=\"100%\"></div></div>';\n\t}\n}", "function garland_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "public function comments()\n {\n $task = $this->getTask();\n $commentSortingDirection = $this->userMetadataCacheDecorator->get(UserMetadataModel::KEY_COMMENT_SORTING_DIRECTION, 'ASC');\n\n $this->response->html($this->template->render('CommentTooltip:board/tooltip_comments', array(\n 'task' => $task,\n 'comments' => $this->commentModel->getAll($task['id'], $commentSortingDirection)\n )));\n }", "function maennaco_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">' . t('Comments') . '</h2>' . $vars['content'];\n }\n}", "function phptemplate_comment_wrapper($content, $node) {\n if (!$content || $node->type == 'forum') {\n return '<div id=\"comments\">'. $content .'</div><a name=\"comments\"></a>';\n }\n else {\n return '<div id=\"comments\"><h2 class=\"comments\">'. t('Comments') .'</h2>'. $content .'</div><a name=\"comments\"></a>';\n }\n}", "private function comment_edit_submit( ) {\n\n if ( ! ( in('post_ID') || in('comment_ID') || in('comment_parent') ) ) ferror(-500481, \"None of post_ID, comment_ID, comment_parent has provided.\");\n $comment_ID = in( 'comment_ID' );\n $update = $comment_ID ? true : false;\n \n \n if ( $update ) {\n $comment = get_comment( $comment_ID );\n $post_ID = $comment->comment_post_ID;\n }\n else {\n $post_ID = in('post_ID');\n if ( empty( $post_ID ) ) {\n $comment = get_comment(in('comment_parent'));\n $post_ID = $comment->comment_post_ID;\n }\n }\n forum()->setCategoryByPostID($post_ID);\n\n\n\n //\n if ( $update ) { // update\n $this->endIfNotMyComment( $comment_ID );\n remove_filter( 'pre_comment_content', 'wp_filter_kses' );\n $re = wp_update_comment([\n 'comment_ID' => $comment_ID,\n 'comment_content' => in('comment_content')\n ]);\n add_filter( 'pre_comment_content', 'wp_filter_kses' );\n\n if ( ! $re ) {\n // error or content has not changed.\n }\n }\n else { // new\n $user_ID = $this->get_post_author();\n $user = get_user_by( 'id', $user_ID );\n $comment_ID = wp_insert_comment([\n 'comment_post_ID' => $post_ID,\n 'comment_parent' => in('comment_parent'),\n 'comment_author' => $user->user_login,\n 'user_id' => $user_ID,\n 'comment_content' => in('comment_content'),\n 'comment_approved' => 1,\n ]);\n if ( ! $comment_ID ) {\n $this->errorResponse(-50302, \"Comment was not created\");\n }\n }\n\n //$this->updateFileWithPost( FORUM_COMMENT_POST_NUMBER + $comment_ID );\n\n // $url = get_permalink( $post_ID ) . '#comment-' . $comment_ID ; // this is not used.\n\n //\n $files = in('files');\n if ( $files ) {\n $arr = explode('| |', $files);\n $files = array_filter( $arr );\n comment()->meta( $comment_ID, 'files', $files );\n }\n\n\n\n // Save All extra input into post meta.\n comment()->saveAllMeta( $comment_ID );\n\n\n $o = [ 'post_ID' => $post_ID, 'comment_ID' => $comment_ID ];\n // if ( in('response') == 'ajax' ) $o['comment'] = comment()->get_comment_with_meta( $comment_ID );\n $this->response( $o );\n }", "public function comment()\n {\n $result = $this->dtbs->list('comment');\n $data['info'] = $result;\n $this->load->view('back/comment/anasehife',$data);\n }", "function add_comment($replier, $code, $feed_code) {\n\t\techo '<form target = \"targetframe\" action=\"comment/reply.php\" method=\"post\" enctpye=\"\" name=\"new_comment\">'\n\t\t.'<div class = \"cut-line\"></div>'\n\t\t\t\t.'<input type=\"hidden\" name=\"par_code\" value=\"'.$code.'\" />'\n\t\t\t\t.'<input type=\"hidden\" name=\"feed_code\" value=\"'.$feed_code.'\" />'\n\t\t\t\t.'<textarea class=\"text_cmt form-control message\" name=\"text_cmt\" placeholder=\"Reply to '.$replier.'\"></textarea><br />'\n\t\t\t\t.'<input type=\"submit\" class = \"btn btn-primary pull-right\" value=\"Reply\" />'\n\t\t\t.'</form>';\n\t}", "public function commentAction() {\n $ses = new Application_Model_Session();\n $ses->startSession();\n {\n $request = $this->getRequest();\n $ExpId = $this->_getParam('expid');\n $form = new Campuswisdom_Form_Comment();\n $this->view->form = $form;\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($request->getPost())) {\n $mapper = new Campuswisdom_Model_ExpMapper();\n $Comment = $form->getValue(\"comment\");\n $mapper->setDbTable('campuswisdom_Model_DbTable_Comments');\n $smthn = $mapper->save($ExpId, $Comment);\n if ($smthn == null) {\n //an error occurred so nothing was saved\n } else {\n $ses->setSessionParameter('comnt', 1);\n }\n $this->_helper->redirector('viewcomments', 'exps', 'default', array('expid' => $ExpId));\n }\n }\n }\n }", "public function editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "function wrapper(){\r\n\tadd_comments_page('Remarks', 'Remarks', 'manage_options', 'remarks', 'remarks_main');\r\n}", "protected function prepareOnlineComment(){\n $this->onlineComment();\n header('Location: index.php?action=article&number='.$this->getNumber().'');\n }", "public function displayArticle(Application $app , Request $request, $id){\n $em = $app['em'];\n $repository = $em->getRepository('DUT\\\\Models\\\\Article');\n $article = $repository->find($id); //Retourne l'id de l'article\n $comments = $this->returnComment($app, $id); //Retourne tous les commentaires\n\n /*\n * traitement du formulaire de commentaire\n */\n\n // On créé l'objet form à partir du formBuilder (En passant en param l'objet form)\n $form = $app['form.factory']->createBuilder('form')\n //On ajoute chaque champs de notre form\n ->add('commentPseudo', 'text', array(\n 'required' => true,\n 'constraints' => array(new Assert\\NotBlank(), new Assert\\Length(array('min' => 5)))\n ))\n ->add('commentDescription', 'textarea', array(\n 'required' => true,\n 'constraints' => array(new Assert\\NotBlank(), new Assert\\Length(array('min' => 5)))\n ))\n ->getForm(); // On récupère l'objet form\n\n if ('POST' == $request->getMethod()){ // Si on a soumis le formulaire\n $form->bind($request); // On bind les valeurs du POST à notre formulaire\n if ($form->isValid()){ // On teste si les données entrées dans notre formulaire sont valides\n $data = $form->getData(); //Met les données dans data\n\n // Insertion du commentaire dans la BD\n $newComment = new Comment($id, $data[\"commentPseudo\"], $data[\"commentDescription\"]);\n $em->persist($newComment);\n $em->flush();\n return $app->redirect($id);\n }\n }\n\n /*\n * fin traitement du formulaire de commentaire\n */\n return $app['twig']->render('basedCommentArticle.twig', ['article' => $article , 'comments' => $comments, 'form' => $form->createView()]);\n }", "function display() {\n\t\t$mainframe =& JFactory::getApplication(); \n\n\t\t// obtiene el modelo\n\t\t$model =& $this->getModel('comments');\n\t\t$view = & $this->getView('comments', 'html');\n\t\t$view->setModel($model, true);\n $modelProducts =& $this->getModel('producttype');\n $productTypes = $modelProducts->getActiveProductTypesInfo();\n\n // Recupera los valores de los filtros\n $filter_state = $mainframe->getUserStateFromRequest($filter_prefix . 'filter_state', 'filter_state', 'A', 'word');\n $product_type_code = $mainframe->getUserStateFromRequest($filter_prefix . 'product_type_code', 'product_type_code', $productTypes[0]->product_type_code, 'word');\n\n // Recupera la información\n\t\t$lists = array();\n\t\t$data = $model->getList();\n\t\t$pagination = & $model->getPagination();\n\t\t$filter_prefix = $model->getFilterPrefix();\n\t\t$filter_order = $model->getOrderByField();\n\t\t$filter_order_Dir = $model->getOrderByDirection();\n\n // Generar lista de tipos producto\n $lists['productTypes'] = JHTML::_('select.genericlist', $productTypes, 'product_type_code', 'class=\"inputbox\" onchange=\"submitform();\"', 'product_type_code', 'product_type_name', $product_type_code);\n\n\t\t// filtro de estado\n\t\t$lists['state']\t= JHTML::_('grid.state', $filter_state, 'PUBLISHED', 'UNPUBLISHED', 'CP.COMMENTS_NEW_STATE');\n\n\t\t// ordenamiento de la tabla\n\t\t$lists['order_Dir'] = $filter_order_Dir;\n\t\t$lists['order'] = $filter_order;\n\n\t\t// filtro de búsqueda\n\t\t$lists['product_type_code'] = $product_type_code;\n\n\t\t// Asignar la información a la vista\n\t\t$view->assignRef('data', $data);\n\t\t$view->assignRef('lists', $lists);\n\t\t$view->assignRef('items', $items);\n\t\t$view->assignRef('pagination', $pagination);\n\n\t\t$view->display();\n\t}", "public function addCommentAction($parent=null)\n {\n\n if($this->UserauthenticationController->isAuthenticated()) {\n \n $post = $this->getQuestionById($parent);\n \n if($post[0]['commentTypeId'] == 1){\n $qid = $post[0]['id'];\n }\n else {\n $qid = $post[0]['questionId'];\n }\n \n $qt = $post[0]['title'];\n \n $form = new \\Mos\\HTMLForm\\CForm(array(), array(\n 'text' => array(\n 'type' => 'textarea',\n 'label' => 'Text:',\n 'required' => true,\n 'validation' => array('not_empty'),\n ), \n 'submit' => array(\n 'type' => 'submit',\n 'value' => 'Publicera kommentar',\n 'callback' => function($form) {\n return true;\n }\n ),\n )\n );\n \n // Check the status of the form\n $status = $form->Check();\n \n // What to do if the form was submitted\n if($status === true) {\n \n $now = gmdate('Y-m-d H:i:s');\n \n $sql = \"INSERT INTO mvc_comments (commentTypeId, questionId, parentId, userId, userAcronym, userEmail, title, text, created) VALUES ('3', '\" . $qid . \"','\" . $parent . \"','\" . $_SESSION['user']->id . \"', '\" . $_SESSION['user']->acronym . \"', '\" . $_SESSION['user']->email . \"', '\" . $qt . \"', '\" . $form->Value('text') . \"', '\" . $now . \"')\";\n $res = $this->db->executeFetchAll($sql);\n $qw = '/question/view/' . $qid;\n $url = $this->url->create('') . $qw;\n $this->response->redirect($url);\n }\n \n // What to do when form could not be processed\n else if($status === false){\n header(\"Location: \" . $_SERVER['PHP_SELF']);\n }\n\n $this->views->add('comment/view_single_post', [\n 'presentation' => $post\n ]);\n \n $this->theme->setTitle(\"Skriv en kommentar\");\n \n $this->views->add('comment/form', [\n 'title' => \"Skriv en kommentar\",\n 'content' => $form->getHTML()\n ]);\n }\n }", "public function the_comment()\n {\n }", "protected function prepareSendEditComment(){\n if (!empty($_POST['comment'])) {\n $this->sendEditComment();\n header('Location: index.php?action=article&number='.$this->getNumber().'');\n }\n else{\n $this->prepareEditComment();\n }\n }", "function tp_comm_comments_enable() {\r\n\tglobal $tp_comm_comments_form;\r\n\t$tp_comm_comments_form = true;\r\n}", "static public function comment_submission() {\n ?>\n\n /**\n * Déclenchement d'événements Google analytics lors de la soumission\n * d'un commentaire.\n *\n * source https://felix-arntz.me/blog/customizing-google-analytics-configuration-site-kit-plugin/\n */\n $('#commentform input[type=\"submit\"]').on('click',function(){\n console.log('SFP: Comment submited');\n if(typeof gtag=='function'){\n gtag('event','Commentaire',{\n 'event_category':'Implication',\n 'event_label':window.location.href\n });\n }\n });\n\n <?php\n }", "public function showcommentsAction()\n {\n $comment_params=$this->_request->getParams();\n $ftvcontacts_obj = new Ep_Ftv_FtvContacts();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvcomments_obj = new Ep_Ftv_FtvComments();\n //$this->render(\"ftv_addcomment\"); exit;\n $request_id = $comment_params['request_id'];\n $this->_view->request_id=$request_id;\n $commentDetails=$ftvcomments_obj->getCommentsByRequests($request_id);\n\n /*$this->_view->commentDetails=$commentDetails;\n $commentsData='';\n if($commentDetails != 'NO')\n {\n $commentsData='';\n $cnt=0;\n foreach($commentDetails as $comment)\n {\n $commentsData.=\n '<li class=\"media\" id=\"comment_'.$comment['identifier'].'\">';\n $commentsData.='<div class=\"media-body\">\n <h4 class=\"media-heading\">\n <a href=\"#\" role=\"button\" data-toggle=\"modal\" data-target=\"#viewProfile-ajax\">'.utf8_encode($comment['first_name']).'</a></h4>\n '.utf8_encode(stripslashes($comment['comments'])).'\n <p class=\"muted\">'.$comment['created_at'].'</p>\n </div>\n </li>';\n }\n }*/\n $this->_view->ftvtype = \"chaine\";\n $this->_view->commentDetails = $commentDetails;\n\n $this->render(\"ftv_ftvaddcomment\");\n\n }", "public function editComment()\n {\n session_start();\n if (isset($_SESSION['isLoggedIn']) && !empty($_SESSION['isLoggedIn'])) {\n $post = $this->postRepository->readById($_GET['post_id']);\n $comment = $this->commentRepository->readById($_GET['comment_id']);\n $view = new View('comment/edit');\n $view->comment = $comment;\n $view->title = 'Post editieren';\n $view->post = $post;\n $view->display();\n } else {\n header('Location: /user/index?error=Du bist nicht eingeloggt!');\n }\n }", "function wpgnv_display_form() {\n?>\n\t<div style='display: none;' class='row idea-form-row'>\n\t\t<div class='idea sixteen columns alpha omega border-radius-4 box-shadow-5-light'>\n\t\t\t<form method=\"post\" action=\"\" class='idea-form'>\n\t\t\t\t<h1 class='tk-nimbus-sans-condensed'>Add your own idea!</h1>\n\t\t\t\t<p>First, make sure that none of the ideas already submitted contain your idea. You can just fill out the form below to enter your own idea for a MeetUp topic. These topics will be moderated and then added to the list.</p>\n\t\t\t\t<label for=\"title\">TITLE</label>\n\t\t\t\t<textarea placeholder=\"enter your idea here\" type=\"text\" name=\"post-title\"></textarea>\n\t\t\t\t<?php wp_nonce_field( 'wpgnv_new_idea', 'wpgnv_new_idea' ); ?>\n\t\t\t\t<button type=\"submit\">Submit Your Idea</button>\n\t\t\t</form><!-- end .idea-form -->\n\t\t</div><!-- end .sixteen -->\n\t</div>\n<?php\n}", "function setup_comment_form(){\r\n $options = $this->get_options();\r\n if($options['field_method'] == 'after_fields' && $options['form_type'] == 'wp3'){\r\n add_filter('comment_form_defaults',array(&$this,'add_twitterfield_wp3'));\r\n } elseif( $options['field_method'] == 'after_fields' && $options['form_type']== 'legacy'){\r\n add_action('comment_form_after_fields',array(&$this,'add_twitterfield_legacy'));\r\n } elseif( $options['field_method'] == 'after_form' ){\r\n add_action('comment_form',array(&$this,'add_twitterfield_box'));\r\n }\r\n }", "public function add_edit_activity_comment_button() {\r\n\r\n\t\tglobal $activities_template;\r\n\t\t\r\n\t\tif ( yzea_is_activity_editable( $activities_template->activity ) ) {\r\n\r\n\t\t\t?>\r\n\r\n\t\t\t<a class=\"bp-secondary-action yz-edit-activity\" data-activity-id=\"<?php echo $activities_template->activity->current_comment->id;?>\" data-activity-type=\"activity_comment\"><?php _e( 'Edit', 'youzer-edit-activity' ); ?>\r\n\t\t\t</a>\r\n\r\n\t\t\t<?php \r\n\t\t}\r\n\t}", "function addCommentHandler() {\n global $inputs;\n\n $content = $inputs['content'];\n $id = $inputs['id'];\n $replyId = insert('reply',[\n 'content' => $content\n ]);\n\n insert('posting_reply',[\n 'posting_id' => $id,\n 'reply_id' => $replyId\n ]);\n\n insert('member_reply',[\n 'member_id' => getLogin()['mid'],\n 'posting_id' => $id\n ]);\n\n formatOutput(true, 'success');\n}", "public function slcr_comment_after() {\n if ( class_exists( 'WooCommerce' )) {\n if ( !is_product() ){\n echo '\n <div class=\"col-md-12 col-sm-12 col-xs-12\">\n <h5 class=\"font-700 mb-30 sub-heading single\">' . esc_html__('Write a comment','moppers') . '</h5>\n </div>\n ';\n }\n }\n }", "public function view() {\n\t\t$blogName = $this->args[1];\n\t\t$postURL = $this->args[2];\n\t\t$id = isset($this->args[4]) ? $this->args[4] : false;\n\t\t$this->post = $this->blogpostModel->getPostFromURL($blogName, $postURL);\n $this->postID = $this->post['postID'];\n\t\t$isOwner = ($this->user && $this->post['userID'] == $this->user->model->userID);\n\n\t\tif($id !== false) {\n\t\t\t$comments = $this->commentsModel->getComment($id);\n\t\t} else {\n\t\t\t$comments = $this->commentsModel->getComments($this->postID);\n\t\t}\n\t\t$this->view->setVar('isOwner', $isOwner);\t\n\t\t$this->view->setVar('comments', $comments);\n\n\t\t$user = false;\n\n\t\t$userInput = new Form('comment', 'comments/commentDo/' . $this->postID, 'post');\n\t\t$userInput->addInput('hidden', 'redirect', false, 'blogpost/view/' . $blogName . '/' . $postURL);\n\t\tif($this->user()) {\n\t\t\t$user = $this->user->model->userName;\n\t\t} else {\n\t\t\tif($this->fbUser) {\n\t\t\t\t$user = $this->fbUser['username'];\n\t\t\t\t$this->view->setVar('fbLogoutURL', $this->fb->getLogoutURL());\n\t\t\t} else {\n\t\t\t\t$this->view->setVar('loginError', true);\n\t\t\t\t$this->view->setVar('fbLoginURL', $this->fb->getLoginURL());\n\t\t\t}\n\t\t}\t\n\t\t$userInput->addTextArea('comment', 10, 60);\n\t\t$userInput->addInput('submit', 'submit', false, 'Submit');\n\n\t\t$this->view->setVar('commentForm', $userInput->genForm());\n\t\t$this->view->setVar('userName', $user);\n\t\t$this->view->setVar('title', 'Comments');\n\t\t$this->view->addViewFile('comments');\n\t}", "function showComments($postId){\n $user = getUserIdPost($postId);\n $commentIds = getCommentIdsofPost($postId);\n\n\n # displays Comments\n foreach ($commentIds as $commentId) {\n\n printComment($commentId);\n\n }\n\n # new Comment Input Form \n ?>\n <form method=\"POST\">\n <input type=\"hidden\" name=\"postId\" value=\"<?php echo $postId; ?>\">\n <input type=\"hidden\" name=\"user\" value=\"<?php echo $user; ?>\">\n <input type=\"hidden\" name=\"url\" value=\"<?php echo parse_url($_SERVER[\"REQUEST_URI\"], PHP_URL_PATH); ?>\">\n <input class=\"inputComment\" type=\"text\" name=\"newCommentText\" maxlength=150 placeholder=\"Comment...\">\n <button class=\"submitComment\" type=\"submit\" name=\"newCommentSubmit\">></button>\n </form>\n\n <?php\n\n}", "public function addCommentAction()\n {\n /** @var Facepalm_Model_Row_Comment $comment */\n\n $this->_helper->assertHasParameter('point_id');\n\n $form = new Facepalm_Form_Comment();\n\n if($this->getRequest()->isPost()) {\n $post = $this->getRequest()->getPost();\n\n if($form->isValid($post)) {\n $comments = new Facepalm_Model_Comments();\n $comment = $comments->createRow($form->getValues());\n\n $form->persist($this->getCurrentUser(), $comment);\n\n $this->_helper->sendNotifications(\n $comment, $this->getCurrentUser()\n );\n\n $form->reset();\n }\n }\n\n $points = new Facepalm_Model_Points();\n $point = $points->find($this->_getParam('point_id'))->current();\n\n $form->getElement('point_id')->setValue($point->id);\n\n $this->view->point = $point;\n $this->view->form = $form;\n\n $this->_helper->layout->disableLayout();\n }", "function adminUpdateComment() {\r\n\r\n\t\t$chapterManager = new \\Alaska2\\Model\\ChapterManager();\r\n\t\t$commentManager = new \\Alaska2\\Model\\CommentManager();\r\n\r\n\t\t$chapter = $chapterManager->getChapter($_GET['chapter_id']);\r\n\t\t$comment = $commentManager->getComment($_GET['id']);\r\n\r\n\t\trequire ('view/backend/updateCommentView.php');\r\n\t}", "function fre_freelancer_review_form() {\n wp_reset_query();\n global $user_ID;\n $status = get_post_status(get_the_ID());\n $bid_accepted = get_post_field('accepted', get_the_ID());\n $freelan_id = (int)get_post_field('post_author', $bid_accepted);\n $comment = get_comments(array(\n 'status' => 'approve',\n 'post_id' => get_the_ID() ,\n 'type' => 'fre_review'\n ));\n $review = isset($_GET['review']) ? (int)$_GET['review'] : 0;\n $status = get_post_status(get_the_ID());\n \n if (empty($comment) && $user_ID == $freelan_id && $review && $status == 'complete') { ?>\n <script type=\"text/javascript\">\n (function($, Views, Models, Collections) {\n $(document).ready(function(){\n this.modal_review = new AE.Views.Modal_Review();\n this.modal_review.openModal();\n });\n })(jQuery, AE.Views, AE.Models, AE.Collections);\n </script>\n\n <?php\n }\n }", "public function draw (\n\t)\t\t\t\t\t// RETURNS <void>\n\t\n\t// $contentForm->draw();\n\t{\n\t\t// Draw the appropriate form block\n\t\techo '\n\t\t<form class=\"uniform\" action=\"' . $this->baseURL . '?id=' . $this->contentID . '\" enctype=\"multipart/form-data\" method=\"post\">' . Form::prepare(SITE_HANDLE . \"-content-\" . $this->contentID);\n\t\t\n\t\t$this->drawSettings();\n\t\t$this->drawBlocks();\n\t\t$this->drawFooter();\n\t\t\n\t\techo '\n\t\t</form>';\n\t}", "function shop_preprocess_comment(&$vars) {\n $vars['submitted'] = $vars['created'] . ' — ' . $vars['author'];\n}", "public function ajoutcommentaireAction()\n\t{\n\t\t$formAjoutCommentaire= new AjoutCommentaire;\n\t\t//Instancie le model Commentaire\n\t\t$class_commentaire= new Commentaire;\n\t\t//récupére l'id article passé dans l'url\n\t\t$idArticle = $this->_getParam('idArticle');\t\t\n\t\t\n\t\t// Selectionne le dernier article qui peut etre publié\r\n\t\t$sql = 'select id\r\n\t\tfrom articles\r\n\t\tWHERE id IN (select id\r\n\t\tfrom articles\r\n\t\twhere id IN (select MAX( id )\r\n\t\tfrom articles\r\n\t\tWHERE publication != 0))\r\n\t\tGROUP BY `id`;';\n\t\t\n\t\tif ($idArticle == \"\")\n\t\t{\t\t\t\n\t\t\t$db = Zend_Db_Table::getDefaultAdapter();\n\t\t\t$datas = $db->query($sql)->fetchAll();\n\t\t\tforeach ($datas as $data )\n\t\t\t{\n\t\t\t\t$idArticle = $data['id'];\n\t\t\t}\n\t\t}\t\n\t\t\n\t\tif(!$this->getRequest()->getPost())\n\t\t{\n\t\t\t//Envoie le formulaire à la vue\n\t\t\t$this->view->assign('formAjoutCommentaire',$formAjoutCommentaire);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// on récupère les données du formulaire\n\t\t\t$data = $this->getRequest()->getPost();\t\t\n\t\t\t$data[\"idArticle\"] = $idArticle;\n\t\t\t//Verifie les donnée du formulaire\n\t\t\tif($formAjoutCommentaire->isValid($data)==true)\n\t\t\t{\n\t\t\t\t//Récupère les infos du formulaire\n\t\t\t\tif(isset($data['auteur']) && isset($data['date'])\t&& isset($data['commentaire'])\t&& isset($data[\"idArticle\"]))\t\t\t\t\t \n\t\t\t\t{\n\t\t\t\t\t$auteur= $data['auteur'];\n\t\t\t\t\t$dateCommentaire= $data['date'];\n\t\t\t\t\t$commentaire = $data['commentaire'];\n\t\t\t\t\t$idArticle = $data[\"idArticle\"];\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$auteur= \"\";\n\t\t\t\t\t$dateCommentaire= \"\";\n\t\t\t\t\t$commentaire = \"\";\n\t\t\t\t\t$idArticle = \"\";\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif($auteur!= \"\"\t&& $dateCommentaire!= \"\" && $commentaire != \"\" && $idArticle != \"\")\n\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t//AJOUT DANS LA BD\n\t\t\t\t\t$ajoutCommentaire= $class_commentaire->createRow($data);\n\t\t\t\t\t$ajoutCommentaire->save();\n\t\t\t\t\t//Envoie a la vue le form\n\t\t\t\t\t$this->view->assign('formAjoutCommentaire',$formAjoutCommentaire);\n\t\t\t\t\t$Valide = true;\n\t\t\t\t\t$this->view->Valide = $Valide;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//remplie le formulaire avec les données existante\n\t\t\t\t$formAjoutCommentaire->populate($data);\n\t\t\t\t//Envoie a la vue le form\n\t\t\t\t$this->view->assign('formAjoutCommentaire',$formAjoutCommentaire);\n\t\t\n\t\t\t}\n\t\t}\t\t\n\t}", "function crunchify_move_comment_form_below( $fields ) { \n $comment_field = $fields['comment']; \n unset( $fields['comment'] ); \n $fields['comment'] = $comment_field; \n return $fields; \n}", "public function addCommentAction()\n {\n $this->confirmSession();\n\n $this->view->disable();\n if ($this->request->isPost()) {\n $validator = new CommentValidation();\n $errorMessages = $validator->validate($this->request->getPost());\n \n if (count($errorMessages)) {\n $this->redirect('/index/notFound');\n return;\n }\n\n $postId = $this->request->getPost('postId');\n\n $post = News::findFirst([\n 'conditions' => 'id = ?0 AND isDeleted = 0',\n 'bind' => [\n $postId\n ]\n ]);\n \n if (!$post) {\n $this->redirect('/index/notFound');\n return;\n }\n\n $comment = new Comments();\n\n $comment->userId = $this->session->get('user')['id'];\n $comment->newsId = $postId;\n $comment->content = $this->request->getPost('content');\n $comment->createdAt = date('Y-m-d H:i:s');\n\n $comment->save();\n\n $this->redirect(\"/index/postDetails?id={$postId}\");\n }\n }", "public function create()\n {\n $post_comment = null;\n if (isset($_REQUEST['post_comment'])) {\n $post_comment = $_REQUEST['post_comment'];\n }\n $posts = Post::groupBy('date_publication')->get();\n return view('backend.post_comments.form', [\n 'nameAction' => 'Новый комментарий',\n 'controllerPathList' => self::$path,\n 'controllerAction' => 'add',\n 'controllerEntity' => new PostComment(),\n 'posts'=>$posts,\n 'parent_comment'=>$post_comment,\n\n 'scripts'=> [\n '/js/lib/moment.js',\n '/js/lib/loc/ru.js',\n '/js/lib/bootstrap-datetimepicker.min.js'\n ],\n 'styles' => [\n '/css/bootstrap-datetimepicker.min.css'\n ]\n ]);\n }", "function getButton_addComment() {\r\r\n\t$PView = new PView;\r\r\n\t// PERMISSION!!!\r\r\n\tif ($PView -> getPermission(\"config\",\"permComment\",\"\")) {\r\r\n\t\tif (!$_GET['comment'] && !$_POST['submit']) {\r\r\n\t\t\t$btn = \"<a href='javascript:pv_CommentAdd();'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/comment_add.png' border='0px'alt='\".LAN_IMAGE_18.\"' title='\".LAN_IMAGE_18.\"'></a>\";\r\r\n\t\t}\r\r\n\t}\r\r\n\treturn $btn;\r\r\n}", "public function actionShow()\n {\n $post=$this->loadPostSlug();\n $newComment=$this->newComment($post);\n\n $this->pageTitle=$post->title.(($post->category)?' / '.$post->category->name:'');\n $this->render('show',array(\n 'post'=>$post,\n 'comments'=>$post->comments,\n 'newComment'=>$newComment,\n ));\n }", "function register_block_core_comment_edit_link()\n {\n }", "function tempera_comments_on() {\nglobal $temperas;\nforeach ($temperas as $key => $value) { ${\"$key\"} = $value; }\t\n\tif ( comments_open() && ! post_password_required() && $tempera_blog_show['comments'] && ! is_single()) :\n\t\tprint '<div class=\"comments-link\"><i class=\"icon-comments icon-metas\" title=\"' . __('Comments', 'tempera') . '\"></i>';\n\t\tprintf ( comments_popup_link( __( '<b>0</b>', 'tempera' ), __( '<b>1</b>', 'tempera' ), __( '<b>%</b>', 'tempera' ),(''),__('<b>-</b>','tempera') ));\n\t\tprint '</div>';\n\tendif;\n}", "function lastcomments_block() {\r\n\r\n\tglobal $template;\r\n\t// Action if sidepanel is enabled\r\n\tif (pluginGetVariable('lastcomments', 'sidepanel')) {\r\n\t\t$template['vars']['plugin_lastcomments'] = lastcomments();\r\n\t} else {\r\n\t\t$template['vars']['plugin_lastcomments'] = \"\";\r\n\t}\r\n}", "public function after_editor() {\n echo '</div>';\n $this->render_builder();\n }", "protected function setFormContent()\n {\n\t\t$content = $this->getTitle();\n\t\t\n\t\t$content .= '<p>Your meditation time on <b>';\n\t\t$content .= $this->data['long_date'];\n\t\t$content .= '</b> has been deleted. Would you like to restore it?</p>';\n\t\t\n\t\t$this->Form = new Form;\n\t\t$this->buildForm();\n\t\t$content .= $this->Form->getHtml();\n\t\t\n\t\t// Add the cancel link\n\t\t$content .= $this->cancelLink();\n\t\t\n\t\t$this->content = $content;\n }", "public function actionShowNewCommentForm($id){\n $commentForm = new Comments();\n echo $this->renderPartial('newComment', array('model' => $commentForm, 'id'=>$id), true, true);\n }", "function commentFormFields() {\n \tglobal $LePress;\n \t$current_user = wp_get_current_user();\n \t/* Return false if not multisite OR current_user is blog owner */\n \tif(!is_multisite() || $LePress->getBlogOwnerUser()->ID == $current_user->ID) { return false; }\n \t\n \t/* Otherwise carry on */\n \t$post = get_queried_object();\n \t$cat_ID_found = 0;\n \t$post_cat_url = '';\n \tif($post && $post->post_type == 'post') {\n \t\t$cats = wp_get_post_categories($post->ID);\n \t\tforeach($cats as $cat_ID) {\n \t\t\t$course_meta = new CourseMeta($cat_ID);\n \t\t\tif($course_meta->getIsCourse()) {\n \t\t\t\t$cat_ID_found = $cat_ID;\n \t\t\t\t$post_cat_url = get_category_link($cat_ID_found);\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \t\n \t/* Category ID found, let's move forward */\n \tif($cat_ID_found > 0) {\n \t\tif($course_meta->getStudentSubscriptionByEmail($current_user->user_email)) {\n \t\t\t$comment = $LePress->fetchComment($post->ID, $current_user->user_email, 'LePressStudent');\n\t\t\t\t$meta_data = get_post_meta($post->ID, '_lepress-student-'.md5($post->ID.$current_user->user_email), true);\n\t\t\t\tif(!$comment) {\n\t\t\t\t\techo '<p><strong>LePress</strong></p>';\n\t\t\t\t\trequire_once('student_include/class-my_subscriptions.php');\n\t\t\t\t\t$user_blogs = get_blogs_of_user($current_user->ID);\n\t\t\t\t\tglobal $blog_id;\n\t\t\t\t\t$current_blog_id = $blog_id;\n\t\t\t\t\t$found_blog = false;\n\t\t\t\t\t//Iterate through all the user's blogs\n\t\t\t\t\tforeach($user_blogs as $blog) {\n\t\t\t\t\t\tswitch_to_blog($blog->userblog_id);\n\t\t\t\t\t\tif($LePress->isStudentFeatures()) {\n\t\t\t\t\t\t\t//Let's check, if this is the one blog, where student is subscribed also\n\t\t\t\t\t\t\t$subscriptions = new StudentSubscriptions();\n\t\t\t\t\t\t\t$course_found = $subscriptions->getActiveCourseByURL($post_cat_url);\n\t\t\t\t\t\t\t//We have found the blog with specified course, break the foreach cycle\n\t\t\t\t\t\t\tif($course_found) {\n\t\t\t\t\t\t\t\t$found_blog = $blog;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//Revert to current blog\n\t\t\t\t\tswitch_to_blog($current_blog_id);\n\t\t\t\t\tif($found_blog) {\n\t\t\t\t\t\techo '<p>'.sprintf(__('You are trying to post a comment into LePress assignment post. Please note that you still haven\\'t submitted your work. If you like to submit your work, please submit it %s; you will be redirected to your LePress dashboard.', lepress_textdomain), '<a href=\"'.add_query_arg(array('p' => $post->ID, 'c' => $course_found->ID), $found_blog->siteurl.'/wp-admin/post-new.php').'\">'.__('clicking here', lepress_textdomain).'</a>', '<a href=\"'.$found_blog->siteurl.'\">'.$found_blog->blogname.'</a>').'</p>';\n\t\t\t\t\t\techo '<p>'.sprintf(__('Assignment deadline: %s', lepress_textdomain), $LePress->date_i18n_lepress(strtotime(get_post_meta($post->ID, '_lepress-assignment-end-date', true)))).'</p>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }", "public function comment() {\n if (isset($_POST) && !empty($_POST) && isset($_POST['comment']) && !empty($_POST['comment'])) {\n if (isset($_POST['token']) && $this->_model->compareTokens($_POST['token'])) {\n if (!$this->_model->comment(explode(\"/\", $this->_url)[1], $_POST['comment'])) {\n echo \"error\";\n }\n }\n }\n }", "function comment_editor($comment=array('ID'=>0,'post_ID'=>0,'author_name'=>'','author_email'=>'','author_url'=>'','author_IP'=>'','posted_on'=>'','status'=>'','user_id'=>0,'content'=>'')) {\n\tglobal $bj;\n\tob_start(); ?>\n\t\t\t<form name=\"edit-<?php echo $comment['ID']; ?>\" action=\"\" method=\"post\" id=\"commentform\" class=\"editform\">\n\t\t\t\t<div class=\"column width33\">\n\t\t\t\t\t<div class=\"c-ontent\">\n\t\t\t\t\t\t<p class=\"label\"><label for=\"author_name\"><?php _e('Name:'); ?></label></p>\n\t\t\t\t\t\t<p><input type=\"text\" name=\"author_name\" value=\"<?php echo formatted_for_editing($comment['author_name']); ?>\" class=\"text100\" /></p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"column width33\">\n\t\t\t\t\t<div class=\"c-ontent\">\n\t\t\t\t\t\t<p class=\"label\"><label for=\"author_email\"><?php _e('Email:'); ?></label></p>\n\t\t\t\t\t\t<p><input type=\"text\" name=\"author_email\" value=\"<?php echo formatted_for_editing($comment['author_email']); ?>\" class=\"text100\" /></p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"column width33\">\n\t\t\t\t\t<div class=\"c-ontent\">\n\t\t\t\t\t\t<p class=\"label\"><label for=\"author_url\"><?php _e('URL:'); ?></label></p>\n\t\t\t\t\t\t<p><input type=\"text\" name=\"author_url\" value=\"<?php echo formatted_for_editing($comment['author_url']); ?>\" class=\"text100\" /></p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t<div class=\"column width25\">\n\t\t\t\t\t<div class=\"c-ontent\">\n\t\t\t\t\t\t<p class=\"label\"><?php _e('Status'); ?></p>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"status\" id=\"status_normal\" value=\"normal\"<?php bj_checked($comment['status'],'normal'); ?> /> <label for=\"status_normal\"><?php _e('Normal'); ?></label><br />\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"status\" id=\"status_hidden\" value=\"hidden\"<?php bj_checked($comment['status'],'hidden'); ?> /> <label for=\"status_hidden\"><?php _e('Hidden'); ?></label>\n\t\t\t\t\t\t</p>\n\r\n\t\t\t\t\t\t<p class=\"label\"><?php _e('Edit Timestamp'); ?></p>\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t<select name=\"stamp_month\" id=\"stamp_month\">\r\n<?php\n\t\t\t\t\tfor($int=1;$int <= 12;$int++) {\n\t\t\t\t\t\t$num = (strlen($int) == 1) ? '0'.$int : $int; ?>\r\n\t\t\t\t\t\t\t\t<option value=\"<?php echo $num; ?>\"<?php bj_selected(get_entry_date('m',$comment['posted_on']),$num); ?>><?php echo $bj->locale->month[$num]; ?></option>\r\n<?php\n\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t\t</select> \r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"stamp_date\" maxlength=\"2\" size=\"2\" value=\"<?php entry_date('d',$comment['posted_on']); ?>\" class=\"aligncenter\" /> \r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"stamp_year\" maxlength=\"4\" size=\"4\" value=\"<?php entry_date('Y',$comment['posted_on']); ?>\" class=\"aligncenter\" /> <?php _e('on'); ?> \r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"stamp_hour\" maxlength=\"2\" size=\"2\" value=\"<?php entry_date('H',$comment['posted_on']); ?>\" class=\"aligncenter\" /> :\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"stamp_min\" maxlength=\"2\" size=\"2\" value=\"<?php entry_date('i',$comment['posted_on']); ?>\" class=\"aligncenter\" /> :\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"stamp_sec\" maxlength=\"2\" size=\"2\" value=\"<?php entry_date('s',$comment['posted_on']); ?>\" class=\"aligncenter\" />\r\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"column width75\">\n\t\t\t\t\t<div class=\"c-ontent\">\n\t\t\t\t\t\t<div id=\"editor\">\r\n<?php bj_editbar(); ?>\r\n\t\t\t\t\t\t\t<textarea name=\"content\" id=\"textarea\"><?php echo formatted_for_editing($comment['content']); ?></textarea>\r\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<p class=\"submit\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"edit-comment-send\" value=\"yes\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"edit-comment-id\" value=\"<?php echo $comment['ID']; ?>\" />\n\t\t\t\t\t\t\t<input type=\"submit\" class=\"submit\" value=\"<?php _e('Save'); ?>\" />\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\r\n\t\t\t</form>\n<?php\n\t$content = run_actions('comment_editor',ob_get_contents());\n\tob_end_clean();\n\techo $content;\n}", "public function addForm() {\n $this->view->displayForm();\n }", "public function commentDo() {\n\t\tif($this->user() || $this->fbUser) { \n\t\t\tif(isset($this->args[1]) && isset($_POST['comment']) && isset($_POST['redirect'])) {\n\t\t\t\t$userName = ($this->user()) ? $this->user->model->userName : $this->fbUser['username'];\n\t\t\t\t$_POST['name'] = $userName;\n\n\t\t\t\ttry {\n\t\t\t\t\t$this->commentsModel->insertComment($this->args[1], $_POST);\t\n\t\t\t\t\tHTML::redirect($_POST['redirect']);\n\t\t\t\t} catch(Exception $excpt) {\n\t\t\t\t\t$this->view->setError($excpt);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->view->setError(new Exception('Unable to set up function'));\n\t\t\t}\n\t\t}\n\t}", "public function editAction()\n {\n $isPosted = $this->request->getPost('doEdit');\n if (!$isPosted) {\n $this->response->redirect($this->request->getPost('redirect'));\n }\n $comment = $this->getCommentSessionValuesFromForm();\n $comments = new \\Anax\\Comment\\CommentsInSession();\n $comments->setDI($this->di);\n $comments->edit($comment);\n $this->response->redirect($this->request->getPost('redirect'));\n }", "public function show(Comment $comment)\n {\n \n }", "public function set_post_content( $entry, $form ) {\t\t\n\t \t\n\t $comment_author_ip = $entry['ip']; // IP of the user's machine\n\t\t$comment_author_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $comment_author_ip );\n\n\t\t$review_content = $entry['6']; // Body of Review\n\t\t$comment_type = 'edd_review'; // Comment Type\n\t\t$comment_agent = $entry['user_agent']; // User Agent\n\t\t\n\t\t/**\n\t\t * Getting Download ID for the plugin selected when submitting the review.\n\t\t */\n\n\t\t$comment_post_ID = '';\n\n\t\tswitch ( $entry['4'] ) {\n\t\t\tcase 'bkap':\n\t\t\t\t$comment_post_ID = 22; // Booking & Appointment Plugin for WooCommerce \n\t\t\t\tbreak;\n\t\t\tcase 'ac':\n\t\t\t\t$comment_post_ID = 20; // Abandoned Cart Pro\n\t\t\t\tbreak;\n\t\t\tcase 'orddd':\n\t\t\t\t$comment_post_ID = 16; // Order Delivery Date Pro\n\t\t\t\tbreak;\n\t\t\tcase 'pdd':\n\t\t\t\t$comment_post_ID = 238877; // Product Delivery Date Pro\n\t\t\t\tbreak;\n\t\t\tcase 'dw':\n\t\t\t\t$comment_post_ID = 286317; // Deposits for WooCommerce\n\t\t\t\tbreak;\n\t\t}\n\n\t\t/**\n\t\t * Getting user infomration.\n\t\t * If the user is logged in user then its data will be fetched from system \n\t\t * else only those data will be assieged which are subbmitted by reviewer.\n\t\t */\n\n\t\t$user_id = '';\n\t\t\n\t\tif( ( isset( $entry['created_by'] ) && $entry['created_by'] != \"\" ) || email_exists( $entry['2'] ) ){\n\t\t\t\n\t\t\tif ( isset( $entry['created_by'] ) && $entry['created_by'] != \"\" ) {\n\t\t\t\t$user_id \t= $entry['created_by'];\n\t\t\t}else{\n\t\t\t\t$user_id \t= email_exists( $entry['2'] );\n\t\t\t}\n\t\t\t\n\t\t\t$user = get_user_by( 'ID', $user_id );\n\n\t\t\tif ( empty( $user->display_name ) ) {\n\t\t\t\t$user->display_name = $user->user_login;\n\t\t\t}\n\n\t\t\t$review_author = wp_slash( $user->display_name );\n\t\t\t$review_author_email = wp_slash( $user->user_email );\n\t\t\t$review_author_url = wp_slash( $user->user_url );\n\n\t\t}else{\n\t\t\t$review_author = isset( $entry['1'] ) ? trim( $entry['1'] ) : null;\n\t\t\t$review_author_email = isset( $entry['2'] ) ? trim( $entry['2'] ) : null;\n\t\t\t$review_author_url = \"\";\n\t\t\t\n\t\t\t$review_author = wp_slash( sanitize_text_field( wp_filter_nohtml_kses( esc_html( $review_author ) ) ) );\n\t\t\t$review_author_email = wp_slash( sanitize_text_field( wp_filter_nohtml_kses( esc_html( $review_author_email ) ) ) );\n\t\t}\n\n\t\t/**\n\t\t * Getting rating infromation.\n\t\t */\n\n\t\t$rating = 0;\n\n\t\tif ( isset( $entry['10'] ) && $entry['10'] != \"\" ){\n\n\t\t\tswitch ( $entry['10'] ) {\n\t\t\t\tcase 'poor':\n\t\t\t\t\t$rating = 1;\n\t\t\t \t\t$review_title = __( \"Poor Plugin\", \"edd-gf\" );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'average':\n\t\t\t\t\t$rating = 2;\n\t\t\t \t\t$review_title = __( \"Average Plugin\", \"edd-gf\" );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'good':\n\t\t\t\t\t$rating = 3;\n\t\t\t \t\t$review_title = __( \"Good Plugin\", \"edd-gf\" );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'very_good':\n\t\t\t\t\t$rating = 4;\n\t\t\t \t\t$review_title = __( \"Very Good Plugin\", \"edd-gf\" );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'excellent':\n\t\t\t\t\t$rating = 5;\n\t\t\t \t\t$review_title = __( \"Excellent Plugin\", \"edd-gf\" );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Image url of the reviewer.\n\t\t */\n\n\t\t$img_url = '';\n\t\tif ( isset( $entry['6'] ) && $entry['6'] != \"\" ){\n\t\t\t$img_url = $entry['6'];\n\t\t}\n\n\t\t/**\n\t\t * Preparing arguments which is to be passed to create a comment(review).\n\t\t */\n\n\t\t$args = apply_filters( 'edd_reviews_insert_review_args', array(\n\t\t\t'comment_post_ID' => $comment_post_ID,\n\t\t\t'comment_author' => $review_author,\n\t\t\t'comment_author_email' => $review_author_email,\n\t\t\t'comment_author_url' => $review_author_url,\n\t\t\t'comment_content' => $review_content,\n\t\t\t'comment_type' => $comment_type,\n\t\t\t'comment_parent' => '',\n\t\t\t'comment_author_IP' => $comment_author_ip,\n\t\t\t'comment_agent' => isset( $comment_agent ) ? substr( $comment_agent, 0, 254 ) : '',\n\t\t\t'user_id' => $user_id,\n\t\t\t'comment_date' => current_time( 'mysql' ),\n\t\t\t'comment_date_gmt' => current_time( 'mysql', 1 ),\n\t\t\t'comment_approved' => 1\n\t\t) );\n\n\t\t$comment_allowed \t= wp_allow_comment( $args );\n\t\t$args \t\t\t\t= apply_filters( 'preprocess_comment', $args );\n\t\t$review_id \t\t\t= wp_insert_comment( wp_filter_comment( $args ) );\n\n\t\t/**\n\t\t * Comment meta to be inserted when review (comment) is created.\n\t\t */\n\n\t\tadd_comment_meta( $review_id, 'edd_rating', $rating );\n\t\tadd_comment_meta( $review_id, 'edd_review_title', $review_title );\n\t\tadd_comment_meta( $review_id, 'edd_review_approved', $comment_allowed );\n\n\t\t/**\n\t\t * Additional Comment meta to store image url and category related information\n\t\t */\n\n\t\tadd_comment_meta( $review_id, 'edd_review_source', 546 );\n\t\tadd_comment_meta( $review_id, 'edd_review_categories', '' );\n\t\tadd_comment_meta( $review_id, 'edd_review_generic', '' );\n\t\tadd_comment_meta( $review_id, 'edd_review_img_url', $img_url );\n\n\t\t/**\n\t\t * Add review metadata to the $args so it can be passed to the notification email\n\t\t */\n\n\t\t$args['id'] = $review_id;\n\t\t$args['rating' ] = $rating;\n\t\t$args['review_title'] = $review_title;\n\t\t$args['review_approved'] = $comment_allowed;\t\t\n\n\t\tupdate_post_meta( $comment_post_ID, 'edd_reviews_average_rating', EDD_Reviews::average_rating( false, $comment_post_ID ) );\t\n\t}", "function newsdot_comments_link() {\n\t\tif ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {\n\t\t\techo '<span class=\"comments-link\">';\n\t\t\techo '<i class=\"far fa-comments mr-1\"></i>';\n\t\t\tcomments_popup_link(\n\t\t\t\tsprintf(\n\t\t\t\t\twp_kses(\n\t\t\t\t\t\t/* translators: %s: post title */\n\t\t\t\t\t\t__( 'Leave a Comment<span class=\"screen-reader-text\"> on %s</span>', 'newsdot' ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'span' => array(\n\t\t\t\t\t\t\t\t'class' => array(),\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\twp_kses_post( get_the_title() )\n\t\t\t\t)\n\t\t\t);\n\t\t\techo '</span>';\n\t\t}\n\t}", "function charity_show_commentreply() {\n $display = TRUE;\n $display = apply_filters('charity_show_commentreply', $display);\n if ($display)\n if ( is_singular() ) \n wp_enqueue_script( 'comment-reply' ); // support for comment threading\n}", "public function postPage(){\n require_once \"controller/Post.php\";\n $post = new Post();\n require_once \"controller/Comment.php\";\n $comment = new Comment();\n //gets the post id in URL\n $idPost = $this->_url[1];\n //adds post info\n $html_post = $post->getPost($idPost);\n $html = View::makeHtml($html_post, \"post_template\");\n $html .= \"<br/><div id=\\\"comments\\\"><h2>Commentaires</h2><ul>\";\n //count nb of comments for the post\n $nb_comments = $comment->countComments($idPost);\n //according to nb of comments\n switch ($nb_comments[\"nb_comments\"]){\n case 0:\n $html .= \"<p>Pas encore de commentaire</p>\";\n break;\n case 1:\n //adds comments infos\n $html_comments = $comment->getComments($idPost);\n $html .= View::makeHtml($html_comments, \"comments_template\");\n break;\n default:\n $html_comments = $comment->getComments($idPost);\n $html .= View::makeLoopHtml($html_comments, \"comments_template\");\n break;\n }\n //adds the \"leave a comment\" form\n $html .= \"</ul>\";\n $html .= View::makeHtml([\n \"{{ path }}\" => $GLOBALS[\"path\"],\n \"{{ idPost }}\" => $idPost\n ],\"add_comment_template\");\n $html .= \"</div>\";\n return [\n \"{{ pageTitle }}\" => $html_post[\"{{ post_title }}\"],\n \"{{ content }}\" => $html,\n \"{{ path }}\" => $GLOBALS[\"path\"]\n ];\n }" ]
[ "0.70642835", "0.6915574", "0.6703869", "0.66667587", "0.6615313", "0.66068804", "0.6592865", "0.6561666", "0.6531651", "0.64475995", "0.6400383", "0.6360965", "0.63443464", "0.6284919", "0.6280764", "0.62241083", "0.62152326", "0.6213076", "0.6189545", "0.6167252", "0.6116764", "0.6109007", "0.6106001", "0.6101738", "0.6073616", "0.60492444", "0.60473263", "0.6045484", "0.602204", "0.60010314", "0.600089", "0.5992127", "0.5981764", "0.5969259", "0.59662443", "0.595448", "0.59158605", "0.59134007", "0.59098774", "0.58950895", "0.5894037", "0.5888216", "0.58792204", "0.58725923", "0.58687633", "0.5866716", "0.5852551", "0.58425134", "0.58088094", "0.5800937", "0.57927155", "0.57859915", "0.5784136", "0.5782489", "0.5769576", "0.5763846", "0.57636523", "0.57618165", "0.5755515", "0.5754863", "0.57448727", "0.57362807", "0.57292515", "0.5727088", "0.57250535", "0.5721501", "0.5721082", "0.5712757", "0.5709045", "0.57012546", "0.5693684", "0.5692201", "0.56570446", "0.5627042", "0.56258494", "0.56145835", "0.561354", "0.56081635", "0.56054795", "0.55949014", "0.55943084", "0.55908793", "0.55904996", "0.5586277", "0.5583521", "0.55788827", "0.5575122", "0.5558297", "0.55555004", "0.5554421", "0.5548507", "0.55459344", "0.55427456", "0.55276674", "0.5520288", "0.55202", "0.5517667", "0.55131376", "0.55118614", "0.5511198" ]
0.58897406
41
Prepare form and add my field.
function onContentPrepareForm($form, $data) { $app = JFactory::getApplication(); $option = $app->input->get('option'); switch($option) { case 'com_content': if ($app->isAdmin()) { JForm::addFormPath(__DIR__ . '/forms'); $form->loadFile('content', false); } return true; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepare() {\n $this->addChild(new fapitng_FormHidden('form_build_id', array(\n 'value' => $this->build_id,\n )));\n $this->addChild(new fapitng_FormHidden('form_id', array(\n 'value' => $this->id,\n )));\n if ($this->token) {\n $this->addChild(new fapitng_FormHidden('form_token', array(\n 'value' => $this->token,\n )));\n }\n }", "protected function createFormFields() {\n\t}", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'add_form',\n 'action' => $this->getUrl('*/faq/save', array(\n 'ret' => Mage::registry('ret'),\n 'id' => $this->getRequest()->getParam('id')\n )\n ),\n 'method' => 'post'\n ));\n\n $fieldset = $form->addFieldset('faq_new_question', array(\n 'legend' => $this->__('New Question'),\n 'class' => 'fieldset-wide'\n ));\n\n $fieldset->addField('new_question', 'text', array(\n 'label' => Mage::helper('inchoo_faq')->__('New Question'),\n 'required' => true,\n 'name' => 'question'\n ));\n\n $fieldset->addField('new_answer', 'textarea', array(\n 'label' => Mage::helper('inchoo_faq')->__('Answer'),\n 'required' => false,\n 'name' => 'answer',\n 'style' => 'height:12em;',\n ));\n\n $form->setUseContainer(true);\n// $form->setValues();\n $this->setForm($form);\n\n// echo \"_prepareForm()\";\n\n return parent::_prepareForm();\n\n\n }", "public function prepareForm() {\n $fieldFactory = FieldFactory::getInstance();\n $translator = I18n::getInstance()->getTranslator();\n\n $profileList = array();\n $profiles = $this->wizard->getInstaller()->getProfiles();\n foreach ($profiles as $profileName => $profile) {\n $profileList[$profileName] = $profile->getName($translator) . '<span>' . $profile->getDescription($translator) . '</span>';\n }\n\n $profile = $this->wizard->getProfile();\n\n $profileField = $fieldFactory->createField(FieldFactory::TYPE_OPTION, self::FIELD_PROFILE, $profile);\n $profileField->setOptions($profileList);\n $profileField->addValidator(new RequiredValidator());\n\n $this->wizard->addField($profileField);\n }", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n [\n 'data' => [\n 'id' => 'edit_form',\n 'action' => $this->getUrl('reverbsync/reverbsync_field/save'),\n 'method' => 'post',\n\t\t\t\t\t'enctype' => 'multipart/form-data',\n ],\n ]\n );\n $form->setUseContainer(true);\n\t\t$model = $this->_coreRegistry->registry('reverbsync_field_mapping');\n\t\t$fieldset = $form->addFieldset(\n 'base_fieldset',\n array('legend' => __('Magento-Reverb Field Mapping'), 'class'=>'fieldset-wide')\n );\n\t\t\n\t\tif ($model->getMappingId()) {\n $fieldset->addField(\n\t\t\t\t'mapping_id',\n\t\t\t\t'hidden', \n\t\t\t\t['name' => 'mapping_id']\n\t\t\t);\n }\n\t\t$fieldset->addField(\n 'magento_attribute_code',\n 'select',\n [\n\t\t\t\t'name' => 'magento_attribute_code', \n\t\t\t\t'label' => __('Magento Attribute'), \n\t\t\t\t'title' => __('Magento Attribute Code'),\n\t\t\t\t'values' => $this->_productAttribute->toOptionArray(),\n\t\t\t\t'required' => true\n\t\t\t]\n );\n\t\t$fieldset->addField(\n 'reverb_api_field',\n 'text',\n [\n\t\t\t\t'name' => 'reverb_api_field', \n\t\t\t\t'label' => __('Reverb API Field'), \n\t\t\t\t'title' => __('Reverb API Field'), \n\t\t\t\t'required' => true\n\t\t\t]\n );\n\t\t$form->setValues($model->getData());\n $this->setForm($form);\n return parent::_prepareForm();\n }", "function addToField(\\Foundation\\Form\\Field $field);", "public function onAddField()\n {\n return $this->makePartial('create_field_form');\n }", "abstract function setupform();", "public function init_form_fields() {\n\t\t$this->form_fields = include( 'settings-xendit.php' );\n\t}", "public function buildFormFields()\n {\n $this->addField(\n SharpFormTextField::make('title')\n ->setLabel('Title')\n )->addField(\n SharpFormUploadField::make('cover')\n ->setLabel('Cover')\n ->setFileFilterImages()\n ->setCropRatio('1:1')\n ->setStorageBasePath('data/service')\n )->addField(\n SharpFormNumberField::make('price')\n ->setLabel('Price')\n )->addField(\n SharpFormMarkdownField::make('description')->setToolbar([\n SharpFormMarkdownField::B, SharpFormMarkdownField::I,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::IMG,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::A,\n ])\n )->addField(\n SharpFormTagsField::make('tags',\n Tag::orderBy('label')->get()->pluck('label', 'id')->all()\n )->setLabel('Tags')\n ->setCreatable(true)\n ->setCreateAttribute('name')\n );\n }", "public function hookForm() {\n if ($this->isCompanyForm()) {\n $this->setDefaultExpDate();\n $this->makeBillingAreaRequired();\n }\n elseif ($this->isCompanyViewsMultiSearchForm()) {\n $this->form['company_name']['#type'] = 'textarea';\n $this->duplicateField('sort_by');\n }\n }", "public function init_form_fields() {\n\t\t$this->form_fields = array(\n\t\t\t'api_key' => array(\n\t\t\t\t'title' => __( 'API Key', PLUGIN_TXT ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Enter with your API Key. You can find this in \"User Profile\" drop-down (top right corner) > API Keys.', PLUGIN_TXT ),\n\t\t\t\t'desc_tip' => true,\n\t\t\t\t'default' => ''\n\t\t\t),\n\t\t\t'debug' => array(\n\t\t\t\t'title' => __( 'Debug Log', PLUGIN_TXT ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable logging', PLUGIN_TXT ),\n\t\t\t\t'default' => 'no',\n\t\t\t\t'description' => __( 'Log events such as API requests', PLUGIN_TXT ),\n\t\t\t),\n\t\t);\n\t}", "function _prepareForm() {\n\t\t\t$this->getFieldset( );\n\t\t\t$fieldset = parent::_prepareForm( );\n\n\t\t\tif ($fieldset) {\n\t\t\t\t$this->getTextHelper( );\n\t\t\t\t$model = $helper = $this->getModel( );\n\t\t\t\t$isElementDisabled = !$this->isSaveAllowed( );\n\t\t\t\t$fieldset->addField( 'country_id', 'select', array( 'name' => 'country_id', 'label' => $helper->__( 'Country' ), 'title' => $helper->__( 'Country' ), 'required' => false, 'value' => $model->getCountryId( ), 'default' => '0', 'values' => $this->getCountryValues( ), 'disabled' => $isElementDisabled ) );\n\t\t\t\t$fieldset->addField( 'region_id', 'select', array( 'name' => 'region_id', 'label' => $helper->__( 'Region/State' ), 'title' => $helper->__( 'Region/State' ), 'required' => false, 'value' => $model->getRegionId( ), 'default' => '0', 'values' => $this->getRegionValues( ), 'disabled' => $isElementDisabled ) );\n\t\t\t\t$fieldset->addField( 'zip', 'text', array( 'name' => 'zip', 'label' => $helper->__( 'Zip/Postal Code' ), 'title' => $helper->__( 'Zip/Postal Code' ), 'note' => $helper->__( '* or blank - matches any' ), 'required' => false, 'value' => $this->getZipValue( ), 'default' => '', 'disabled' => $isElementDisabled ) );\n\t\t\t}\n\n\t\t\treturn $this;\n\t\t}", "public function populateForm() {}", "public function init_form_fields(){\n \n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => 'Enable/Disable',\n\t\t\t\t'label' => 'Enable Vortex Gateway',\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => '',\n\t\t\t\t'default' => 'no'\n\t\t\t),\n\t\t\t'title' => array(\n\t\t\t\t'title' => 'Title',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => 'This controls the title which the user sees during checkout.',\n\t\t\t\t'default' => 'Vortex Payment',\n\t\t\t\t'desc_tip' => true,\n\t\t\t),\n\t\t\t'description' => array(\n\t\t\t\t'title' => 'Description',\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'description' => 'This controls the description which the user sees during checkout.',\n\t\t\t\t'default' => 'Paga con Vortex Payment.',\n\t\t\t),\n\t\t\t'BID' => array(\n\t\t\t\t'title' => 'Business ID',\n\t\t\t\t'type' => 'text'\n\t\t\t)\n\n\t\t\t);\n \n\t \t}", "public function buildForm()\n {\n }", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "function add_form_field($field, $error = \"\", $prefill = \"\"){\n\t\t$this->form_row($field, $error , $prefill );\n\t}", "public function addField();", "public function init_form_fields() {\n\t\t$this->form_fields = include( 'data/data-settings.php' );\n\t}", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('item_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Select order')]);\n $fieldset->addField(\n 'direction',\n 'select',\n [\n 'name' => 'direction',\n 'label' => __('Direction'),\n 'title' => __('Direction'),\n 'required' => true,\n 'options' => ['shipment' => 'Store -> Customer', 'invert' => 'Customer -> Store', 'refund' => 'RMA (return)']\n ]\n );\n $fieldset->addField(\n 'order_id',\n 'text',\n [\n 'name' => 'order_id',\n 'label' => __('Order #'),\n 'title' => __('Order #'),\n 'required' => true\n ]\n );\n $this->setForm($form);\n return parent::_prepareForm();\n }", "function init_form_fields() {\n\n \tinclude ( SUMO_SAGEPLUGINPATH . 'includes/sagepay-form-admin.php' );\n\n }", "function init_form_fields() {\r\n $this->form_fields = array(\r\n 'enabled' => array(\r\n 'title' => __('Enable/Disable', 'mondido'),\r\n 'type' => 'checkbox',\r\n 'label' => __('Enable mondido Payment Module.', 'mondido'),\r\n 'default' => 'no'),\r\n 'merchant_id' => array(\r\n 'title' => __('Merchant ID', 'mondido'),\r\n 'type' => 'text',\r\n 'description' => __('Merchant ID for Mondido')),\r\n 'secret' => array(\r\n 'title' => __('Secret', 'mondido'),\r\n 'type' => 'text',\r\n 'description' => __('Given secret code from Mondido', 'mondido'),\r\n ),\r\n 'test' => array(\r\n 'title' => __('Test', 'mondido'),\r\n 'type' => 'checkbox',\r\n 'label' => __('Set in testmode.', 'mondido'),\r\n 'default' => 'no')\r\n );\r\n }", "protected function prepareForm()\n {\n if(method_exists($this->controller, 'prepareCustomForm')){\n $this->controller->prepareCustomForm($this, $this->form);\n }\n $this->form->get('submit')->setValue('Agregar');\n return $this->form;\n }", "protected function _prepareForm()\n {\n /** @var DataForm $form */\n /** @noinspection PhpUnhandledExceptionInspection */\n $form = $this->_formFactory->create();\n\n // define field set\n $fieldSet = $form->addFieldset('base_fieldset', ['legend' => __('Widget')]);\n\n // retrieve widget key\n $widgetKey = $this->widgetInstance->getWidgetKey();\n\n // add new field\n $fieldSet->addField(\n 'select_widget_type_' . $widgetKey,\n 'select',\n [\n 'label' => __('Widget Type'),\n 'title' => __('Widget Type'),\n 'name' => 'widget_type',\n 'required' => true,\n 'onchange' => \"$widgetKey.validateField()\",\n 'options' => $this->_getWidgetSelectOptions(),\n 'after_element_html' => $this->_getWidgetSelectAfterHtml()\n ]\n );\n\n // set form information\n /** @noinspection PhpUndefinedMethodInspection */\n $form->setUseContainer(true);\n /** @noinspection PhpUndefinedMethodInspection */\n $form->setId('widget_options_form' . '_' . $widgetKey);\n /** @noinspection PhpUndefinedMethodInspection */\n $form->setMethod('post');\n /** @noinspection PhpUndefinedMethodInspection */\n $form->setAction($this->getUrl('adminhtml/*/buildWidget'));\n $this->setForm($form);\n }", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix(self::HTML_ID_PREFIX);\n $integrationData = $this->_coreRegistry->registry(\n Integration::REGISTRY_KEY_CURRENT_INTEGRATION\n );\n $this->_addGeneralFieldset($form, $integrationData);\n if (isset($integrationData['integration_id'])) {\n $integrationStores = $this->integrationStoresRepository->getListByIntegration(\n $integrationData['integration_id']\n );\n $integrationData['integration_stores'] = $integrationStores;\n }\n $form->addValues($integrationData);\n $this->setForm($form);\n return $this;\n }", "function buildForm(){\n\t\t# menampilkan form\n\t}", "function init_form_fields() {\n\n $this->form_fields = array(\n\n 'enabled' => array(\n 'title' => 'Активировать',\n 'type' => 'checkbox',\n 'description' => 'Активировать способ доставки КС2008',\n 'default' => 'yes'\n ),\n\n 'title' => array(\n 'title' => 'Заголовок',\n 'type' => 'text',\n 'description' => 'Заговок способа доствки КС2008',\n 'default' => 'Курьерская служба 2008 '\n ),\n\n 'description' => array(\n 'title' => 'Описание',\n 'type' => 'text',\n 'description' => 'Описание способа доставки КС2008',\n 'default' => 'Выберите для доставки через КС2008'\n ),\n\n );\n\n }", "public static function create() {\n\t\tFrmAppHelper::permission_check('frm_edit_forms');\n check_ajax_referer( 'frm_ajax', 'nonce' );\n\n\t\t$field_type = FrmAppHelper::get_post_param( 'field_type', '', 'sanitize_text_field' );\n\t\t$form_id = FrmAppHelper::get_post_param( 'form_id', 0, 'absint' );\n\n\t\t$field = self::include_new_field( $field_type, $form_id );\n\n // this hook will allow for multiple fields to be added at once\n do_action('frm_after_field_created', $field, $form_id);\n\n wp_die();\n }", "function _prep_for_form($field)\r\n\t{\r\n\t\t$this->{$field} = $this->form_validation->prep_for_form($this->{$field});\r\n\t}", "protected function _prepareForm()\n {\n //instantiate the form\n $_form = new Varien_Data_Form(\n array(\n 'id' => 'edit_form',\n 'action' => $this->getData('action'),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n )\n );\n \n //the artist\n $_consumer = Mage::registry('current_consumer');\n\n if ($_consumer->getId()) {\n $_form->addField(\n 'consumer_id', \n 'hidden', \n array(\n 'name' => 'consumer_id',\n )\n );\n $_form->setValues($_consumer->getData());\n }\n\n $_form->setUseContainer(true);\n $this->setForm($_form);\n return parent::_prepareForm();\n }", "protected function _prepareForm()\n {\n // @codingStandardsIgnoreEnd\n $locatorId = $this->getLocator()->getId();\n\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n ['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']]\n );\n\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Settings')]);\n\n $fieldset->addField(\n 'description',\n 'textarea',\n [\n 'name' => 'description',\n 'label' => __('Description'),\n 'title' => __('Description'),\n 'required' => false,\n ]\n );\n\n $fieldset->addField(\n 'extra_info',\n 'textarea',\n [\n 'name' => 'extra_info',\n 'label' => __('Extra Information'),\n 'title' => __('Extra Information'),\n 'required' => false,\n ]\n );\n\n $fieldset->addField(\n 'email',\n 'text',\n [\n 'name' => 'email',\n 'label' => __('Email'),\n 'title' => __('Email')\n ]\n );\n\n $fieldset->addField(\n 'visiting_hours',\n 'text',\n [\n 'name' => 'visiting_hours',\n 'label' => __('Visiting Hours'),\n 'title' => __('Visiting Hours')\n ]\n );\n\n $fieldset->addField(\n 'website',\n 'text',\n [\n 'name' => 'website',\n 'label' => __('Website'),\n 'title' => __('Website')\n ]\n );\n\n $fieldset->addField(\n 'banner',\n 'hidden',\n [\n 'name' => 'banner'\n ]\n );\n\n $locatorId = $this->getLocator()->getId();\n $value = '';\n if ($locatorId) {\n $value = $this->getLocator()->getBanner();\n }\n $fieldset->addField(\n 'banner_locator',\n 'image',\n [\n 'name' => 'banner_locator',\n 'label' => __('Banner'),\n 'title' => __('Banner'),\n 'value' => $value,\n 'note' => __('Allowed image types: jpg, jpeg, gif, png.')\n ]\n );\n\n if ($locatorId) {\n $form->addValues($this->getLocator()->getData());\n }\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "public function add(IField $field): IFormBuilder;", "public function addMetaFieldsToAddForm()\n\t{\n\t\t$interval = $this->getMetaFields('interval');\n\t\t$animation = $this->getMetaFields('animation');\n\n\t\t?>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"interval\">Tijd tussen slides</label>\n\t\t\t\t<input name=\"interval\" id=\"interval\" type=\"text\" value=\"<?php echo $interval;?>\" size=\"40\">\n\t\t\t\t<p class=\"description\">De tijd tussen slides in milliseconden (1000ms = 1s).</p>\n\t\t\t</div>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"animation\">Animatie</label>\n\t\t\t\t<select name=\"animation\" id=\"animation\">\n\t\t\t\t\t<option <?php selected($animation, 'slide'); ?> value=\"slide\">Slide</option>\n\t\t\t\t\t<option <?php selected($animation, 'fade'); ?> value=\"fade\">Fade</option>\n\t\t\t\t</select>\n\t\t\t\t<p class=\"description\">Selecteer de animatie die gebruikt wordt door de slideshow.</p>\n\t\t\t</div>\n\t\t<?php\n\t}", "public function init_form_fields() {\n $this->form_fields = require( dirname(__FILE__) . '/../class/midtrans-admin-settings.php' );\n // Currency conversion rate if currency is not IDR\n if (get_woocommerce_currency() != 'IDR') {\n $this->form_fields['to_idr_rate'] = array(\n 'title' => __(\"Current Currency to IDR Rate\", 'midtrans-woocommerce'),\n 'type' => 'text',\n 'description' => 'The current currency to IDR rate',\n 'default' => '10000',\n );\n }\n }", "public function actionAdd()\n\t{\n\t\t$formId = $this->_input->filterSingle('form_id', XenForo_Input::UINT);\n\t\t$type = $this->_input->filterSingle('type', XenForo_Input::STRING);\n\t\t\n\t\t$fieldModel = $this->_getFieldModel();\n\t\t$fieldTypes = $fieldModel->getCountByType();\n\t\t\n\t\t$options = array();\n\t\t$options[] = array(\n\t\t 'value' => 'user',\n\t\t 'label' => new XenForo_Phrase('field'),\n\t\t 'selected' => true\n\t\t);\n\t\t\n\t\t// if global fields exist, include in the types\n\t\tif (array_key_exists('global', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'global',\n\t\t\t 'label' => new XenForo_Phrase('global_field')\n\t\t\t);\n\t\t}\n\t\t\n\t\t// if template fields exist, include in the types\n\t\tif (array_key_exists('template', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'template',\n\t\t\t 'label' => new XenForo_Phrase('template_field') \n\t\t\t);\n\t\t}\n\t\t\n\t\t// if there are no options other than user, just send them to the add field page\n\t\tif (!$type && count($options) == 1)\n\t\t{\n\t\t\t$type = 'user';\n\t\t}\n\t\t\n\t\t// association a field to a form\n\t\tif ($formId && $type)\n\t\t{\n\t\t\t$default = array(\n\t\t\t\t'field_id' => null,\n\t\t\t\t'form_id' => $this->_input->filterSingle('form_id', XenForo_Input::UINT),\n\t\t\t\t'display_order' => $this->_getFieldModel()->getGreatestDisplayOrderByFormId($formId) + 10,\n\t\t\t\t'field_type' => 'textbox',\n\t\t\t\t'field_choices' => '',\n\t\t\t\t'match_type' => 'none',\n\t\t\t\t'match_regex' => '',\n\t\t\t\t'match_callback_class' => '',\n\t\t\t\t'match_callback_method' => '',\n\t\t\t\t'max_length' => 0,\n\t\t\t\t'min_length' => 0,\n\t\t\t\t'required' => 0,\n\t\t\t\t'type' => $type,\n\t\t\t\t'active' => 1,\n\t\t\t\t'pre_text' => '',\n\t\t\t\t'post_text' => ''\n\t\t\t);\n\t\t\t\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t case 'global':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-global-field');\n\t\t }\n\t\t\t case 'template':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-template-field');\n\t\t }\n\t\t\t default:\n\t\t {\n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// adding a global/template field\n\t\telse if (!$formId && $type)\n\t\t{\n\t\t $default = array(\n\t 'field_id' => null,\n\t 'field_type' => 'textbox',\n\t 'field_choices' => '',\n\t 'match_type' => 'none',\n\t 'match_regex' => '',\n\t 'match_callback_class' => '',\n\t 'match_callback_method' => '',\n\t 'max_length' => 0,\n\t\t \t'min_length' => 0,\n\t 'type' => $type,\n\t\t \t'pre_text' => '',\n\t\t \t'post_text' => ''\n\t\t );\n\t\t \n\t\t if ($type != 'global')\n\t\t {\n\t\t \t$default['display_order'] = 1;\n\t\t \t$default['required'] = 0;\n\t\t \t$default['active'] = 1;\n\t\t }\n\t\t \n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t}\n\t\t\n\t\t// association type\n\t\telse\n\t\t{\n\t\t\t$viewParams = array(\n\t\t\t\t'formId' => $formId,\n\t\t\t\t'options' => $options\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->responseView('KomuKu_SimpleForms_ViewAdmin_Field_AddType', 'kmkform__field_add_type', $viewParams);\n\t\t}\n\t}", "public function buildForm()\n {\n $this\n ->addNarrative('location_description_narrative')\n ->addAddMoreButton('add', 'location_description_narrative');\n }", "function init_form_fields()\n {\n\n $this->form_fields = array(\n\n 'enabled' => array(\n 'title' => __('Enable'),\n 'type' => 'checkbox',\n 'description' => __('Enable this shipping.'),\n 'default' => 'yes'\n ),\n 'title' => array(\n 'title' => __('Title'),\n 'type' => 'text',\n 'description' => __('Title to be display on site'),\n 'default' => __('CDEK Shipping')\n ),\n 'priceSet' => array(\n 'title' => __('Delivery cost'),\n 'type' => 'text',\n 'description' => __('Default delivery cost'),\n 'default' => __('405')\n ),\n );\n }", "public function buildFormFields()\n {\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"titre\")\n ->setLabel(\"Titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"soustitre\")\n ->setLabel(\"Sous-titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"slug\")\n ->setLabel(\"Slug\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"url\")\n ->setLabel(\"URL du projet\")\n );\n\n $this->addFormField(\n SharpMarkdownFormFieldConfig::create(\"texte\")\n ->setLabel(\"Texte\")\n ->showToolbar(true)\n );\n\n $this->addFormField(\n SharpCheckFormFieldConfig::create(\"is_open_source\")\n ->setText(\"Projet Open-source\")\n );\n\n $this->addFormField(\n SharpPivotFormFieldConfig::create(\"technos\", SharpTechnoRepository::class)\n ->setLabel(\"Technologies\")\n ->setAddable(true)\n ->setSortable(true)\n ->setOrderAttribute(\"ordre\")\n ->setCreateAttribute(\"nom\")\n );\n\n $this->addFormField(\n SharpListFormFieldConfig::create(\"screenshots\")\n ->setLabel(\"Screenshots\")\n ->setSortable(true)->setOrderAttribute(\"ordre\")\n ->setAddable(true)->setAddButtonText(\"Ajouter un screenshot\")\n ->setRemovable(true)->setRemoveButtonText(\"Supprimer\")\n ->addItemFormField(\n SharpFileFormFieldConfig::create(\"fichier\")\n ->setFileFilterImages()\n ->setMaxFileSize(5)\n ->setThumbnail(\"100x100\")\n ->addGeneratedThumbnail(\"600x\"))\n ->addItemFormField(\n SharpTextFormFieldConfig::create(\"tag\")\n ->addAttribute(\"placeholder\", \"Tag\"))\n ->addItemFormField(\n SharpTextareaFormFieldConfig::create(\"legende\")\n ->setRows(3))\n ->setItemFormTemplate(\n SharpListItemFormTemplateConfig::create()\n ->addField(\"fichier\")\n ->addField(\"tag\")\n ->addField(\"legende\")\n )\n );\n\n $this->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(7)\n ->addField(\"titre\")\n ->addField(\"soustitre\")\n ->addField([\"slug:5\", \"url:7\"])\n ->addField(\"technos\")\n ->addField(\"is_open_source\")\n\n )->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(5)\n ->addField(\"texte\")\n ->addField(\"screenshots\")\n );\n }", "protected function & createField() {\n\t\t# Initialize\n\t\t$linker =& $this->getLinker();\n\t\t# Create Form FIELD!\n\t\t$linker->create($this);\n\t\t# Chain\n\t\treturn $this;\n\t}", "function do_form(){\n\t\tob_start();\n\t\t\n\t\t$op = ($this->id_base == $this->id)? __('Add', JCF_TEXTDOMAIN) : __('Edit', JCF_TEXTDOMAIN);\n\t\t?>\n\t\t<div class=\"jcf_edit_field\">\n\t\t\t<h3 class=\"header\"><?php echo $op . ' ' . $this->title; ?></h3>\n\t\t\t<div class=\"jcf_inner_content\">\n\t\t\t\t<form action=\"#\" method=\"post\" id=\"jcform_edit_field\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id\" value=\"<?php echo $this->id; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_number\" value=\"<?php echo $this->number; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id_base\" value=\"<?php echo $this->id_base; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"fieldset_id\" value=\"<?php echo $this->fieldset_id; ?>\" />\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->form( $this->instance );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// need to add slug field too\n\t\t\t\t\t\t\t$slug = esc_attr($this->slug);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('slug'); ?>\"><?php _e('Slug:', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('slug'); ?>\" name=\"<?php echo $this->get_field_name('slug'); ?>\" type=\"text\" value=\"<?php echo $slug; ?>\" />\n\t\t\t\t\t\t\t<br/><small><?php _e('Machine name, will be used for postmeta field name.', JCF_TEXTDOMAIN); ?></small>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t// enabled field\n\t\t\t\t\t\t\tif( $this->is_new ){\n\t\t\t\t\t\t\t\t$this->instance['enabled'] = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('enabled'); ?>\">\n\t\t\t\t\t\t\t\t<input class=\"checkbox\" type=\"checkbox\" \n\t\t\t\t\t\t\t\t\t\tid=\"<?php echo $this->get_field_id('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tname=\"<?php echo $this->get_field_name('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tvalue=\"1\" <?php checked(true, @$this->instance['enabled']); ?> />\n\t\t\t\t\t\t\t\t<?php _e('Enabled', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"field-control-actions\">\n\t\t\t\t\t\t\t<div class=\"alignleft\">\n\t\t\t\t\t\t\t\t<?php if( $op != __('Add', JCF_TEXTDOMAIN) ) : ?>\n\t\t\t\t\t\t\t\t<a href=\"#remove\" class=\"field-control-remove\"><?php _e('Delete', JCF_TEXTDOMAIN); ?></a> |\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t<a href=\"#close\" class=\"field-control-close\"><?php _e('Close', JCF_TEXTDOMAIN); ?></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"alignright\">\n\t\t\t\t\t\t\t\t<?php echo print_loader_img(); ?>\n\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"<?php _e('Save', JCF_TEXTDOMAIN); ?>\" class=\"button-primary\" name=\"savefield\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<br class=\"clear\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\t\t\n\t\t$html = ob_get_clean();\n\t\treturn $html;\n\t}", "function add_specific_form_fields() {\n\t\treturn false;\n\t}", "public function init_form_fields() {\n\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => __( 'Enable/Disable', $this->domain ),\n 'type' => 'checkbox',\n 'label' => __( 'Enable Custom Payment', $this->domain ),\n 'default' => 'yes'\n ),\n 'title' => array(\n 'title' => __( 'Title', $this->domain ),\n 'type' => 'text',\n 'description' => __( 'This controls the title which the user sees during checkout.', $this->domain ),\n 'default' => __( 'Cartão de Crédito', $this->domain ),\n 'desc_tip' => true,\n ),\n 'order_status' => array(\n 'title' => __( 'Order Status', $this->domain ),\n 'type' => 'select',\n 'class' => 'wc-enhanced-select',\n 'description' => __( 'Choose whether status you wish after checkout.', $this->domain ),\n 'default' => 'wc-completed',\n 'desc_tip' => true,\n 'options' => wc_get_order_statuses()\n ),\n 'description' => array(\n 'title' => __( 'Description', $this->domain ),\n 'type' => 'textarea',\n 'description' => __( 'Payment method description that the customer will see on your checkout.', $this->domain ),\n 'default' => __('Informação do método de pagamento', $this->domain),\n 'desc_tip' => true,\n ),\n 'instructions' => array(\n 'title' => __( 'Instructions', $this->domain ),\n 'type' => 'textarea',\n 'description' => __( 'Instructions that will be added to the thank you page and emails.', $this->domain ),\n 'default' => '',\n 'desc_tip' => true,\n ),\n );\n }", "protected function _prepareForm() {\r\n\t $form = new Varien_Data_Form();\r\n\t $this->setForm($form);\r\n\t $fieldset = $form->addFieldset(\"reason_form\", array(\"legend\" => Mage::helper(\"mprmasystem\")->__(\"RMA Reason\")));\r\n\r\n\t\t\t$fieldset->addField(\"reason\", \"textarea\", array(\r\n\t\t\t\t\"label\" => Mage::helper(\"mprmasystem\")->__(\"Reason Provided\"),\r\n\t\t\t\t\"name\" => \"reason\",\r\n\t\t\t\t\"class\" => \"required-entry\",\r\n\t\t\t\t\"required\" => true\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\t$fieldset->addField(\"status\", \"select\", array(\r\n\t\t\t\t\"label\" => Mage::helper(\"mprmasystem\")->__(\"Status\"),\r\n\t\t\t\t\"name\" \t\t=> \"status\",\r\n\t\t\t\t\"class\" => \"required-entry\",\r\n\t\t\t\t\"required\" => true,\r\n\t\t\t\t\"values\"\t=> array(\r\n\t\t\t\t\t\t\t\t\tarray(\"value\" => \"\",\"label\" => Mage::helper(\"mprmasystem\")->__(\"Please Select\")),\r\n\t\t\t\t\t\t\t\t\tarray(\"value\" => \"1\",\"label\" => Mage::helper(\"mprmasystem\")->__(\"Enable\")),\r\n\t\t\t\t\t\t\t\t\tarray(\"value\" => \"0\",\"label\" => Mage::helper(\"mprmasystem\")->__(\"Disable\"))\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t));\r\n\t\t\t\r\n\t if(Mage::registry(\"mprmareason_data\"))\r\n\t $form->setValues(Mage::registry(\"mprmareason_data\")->getData());\t\t\t\r\n\t return parent::_prepareForm();\r\n\t }", "public function xadmin_createfield() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$field_title = $args [1];\n\t\t$field_type = $args [2];\n\t\t\n\t\t/* Load Model */\n\t\t$field = $this->getModel ( 'field' );\n\t\t$this->session->returnto ( 'fields' );\n\t\t\n\t\t/* create the form */\n\t\t$field->createNewField ( $field_title, $field_type );\n\t\t\n\t\t$this->loadPluginModel ( 'fields' );\n\t\t$plug = Plugins_Fields::getInstance ();\n\t\t\n\t\t/* allow changes to be made by plugin */\n\t\t$plug->trigger ( 'onAfterCreateField', $field );\n\t\t\n\t\t/* allow changes to be made by plugin - extend schema of data table */\n\t\t$plug->trigger ( 'onAfterCreateField_ExtendDataTable', $field );\n\t\t\n\t\t$plug->trigger ( 'onAfterSaveNewField', $field );\n\t\t\n\t\t$this->setArguments ( array ($field->id ) );\n\t\t\n\t\t$this->_registry->setValue ( 'usedTabs', 1 );\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( '_editField' );\n\t}", "function init_extra_fields() {\n $temp = $this->uc->CallMethod('PickupLocations', array(), 'GET', $this->token);\n $pickups = array();\n if (is_array($temp)) {\n foreach ($temp as $t) {\n $pickups[$t['LocationId']] = $t['Name'];\n }\n }\n\n // obtine lista planurilor tarifare\n $temp = $this->uc->CallMethod('PriceTables', array(), 'GET', $this->token);\n\n $prices = array();\n if (is_array($temp)) {\n foreach ($temp as $t) {\n $prices[$t['PriceTableId']] = empty($t['Name']) ? $t['PriceTableId'] : $t['Name'];\n }\n }\n\n $this->form_fields += array(\n 'pickup' => array(\n 'title' => __('Punct de ridicare', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(null => 'Alege punctul de ridicare') + $pickups\n ),\n 'priceplan' => array(\n 'title' => __('Plan tarifar', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(null => 'Alege planul tarifar') + $prices\n ),\n 'insurance' => array(\n 'title' => __('', 'urgentcargus'),\n 'label' => __('Asigurare', 'urgentcargus'),\n 'type' => 'checkbox',\n 'default' => 'no'\n ),\n 'saturday' => array(\n 'title' => __('', 'urgentcargus'),\n 'label' => __('Livrare sambata', 'urgentcargus'),\n 'type' => 'checkbox',\n 'default' => 'no'\n ),\n 'morning' => array(\n 'title' => __('', 'urgentcargus'),\n 'label' => __('Livrare dimineata', 'urgentcargus'),\n 'type' => 'checkbox',\n 'default' => 'no'\n ),\n 'open' => array(\n 'title' => __('', 'urgentcargus'),\n 'label' => __('Deschidere colet', 'urgentcargus'),\n 'type' => 'checkbox',\n 'default' => 'no'\n ),\n 'repayment' => array(\n 'title' => __('Incasare ramburs', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(\n 'cash' => 'Numerar',\n 'bank' => 'Transfer bancar'\n )\n ),\n 'payer' => array(\n 'title' => __('Platitor expeditie', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(\n 'sender' => 'Expeditor',\n 'recipient' => 'Destinatar'\n )\n ),\n 'type' => array(\n 'title' => __('Tip expeditie', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(\n 'parcel' => 'Colet',\n 'envelope' => 'Plic'\n )\n ),\n 'free' => array(\n 'title' => __('Plafon transport gratuit', 'urgentcargus'),\n 'type' => 'text',\n ),\n 'fixed' => array(\n 'title' => __('Cost fix transport', 'urgentcargus'),\n 'type' => 'text',\n ),\n 'height' => array(\n 'title' => __('Inaltime', 'urgentcargus'),\n 'type' => 'number',\n ),\n 'width' => array(\n 'title' => __('Latime', 'urgentcargus'),\n 'type' => 'number',\n ),\n 'length' => array(\n 'title' => __('Lungime', 'urgentcargus'),\n 'type' => 'number',\n ),\n 'service' => array(\n 'title' => __('Serviciu', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(\n 0 => 'Inactiv',\n 1 => 'Activ'\n )\n ),\n );\n }", "protected function _prepareForm()\r\n\t{\r\n\t\t$model = Mage::helper('slider')->getBannerItemInstance();\r\n\t\t\r\n\t\t/**\r\n\t\t * Checking if users have permission to save information\r\n\t\t */\r\n\t\tif (Mage::helper('slider/admin')->isActionAllowed('save')) {\r\n\t\t\t$isElementDisabled = false;\r\n\t\t} else {\r\n\t\t\t$isElementDisabled = true;\r\n\t\t}\r\n\t\t\r\n\t\t$form = new Varien_Data_Form();\r\n\t\t\r\n\t\t$form->setHtmlIdPrefix('banner_main_');\r\n\t\t\r\n\t\t$fieldset = $form->addFieldset('base_fieldset', array(\r\n\t\t\t'legend' => Mage::helper('slider')->__('Banner Item Info')\r\n\t\t));\r\n\t\t\r\n\t\tif ($model->getId()) {\r\n\t\t\t$fieldset->addField('banner_id', 'hidden', array(\r\n\t\t\t\t'name' => 'banner_id'\r\n\t\t\t));\r\n\t\t}\r\n\t\t\r\n\t\t$fieldset->addField('title', 'text', array(\r\n\t\t\t'name'\t\t=> 'title',\r\n\t\t\t'label'\t\t=> Mage::helper('slider')->__('Banner Title'),\r\n\t\t\t'title'\t\t=> Mage::helper('slider')->__('Banner Title'),\r\n\t\t\t'required'\t=> true,\r\n\t\t\t'disabled'\t=> $isElementDisabled\r\n\t\t));\r\n\t\t\r\n\t\t$fieldset->addField('link', 'text', array(\r\n\t\t\t'name'\t\t=> 'link',\r\n\t\t\t'label'\t\t=> Mage::helper('slider')->__('Link'),\r\n\t\t\t'title'\t\t=> Mage::helper('slider')->__('Link'),\r\n\t\t\t'required'\t=> false,\r\n\t\t\t'disabled'\t=> $isElementDisabled\r\n\t\t));\r\n\t\t\r\n\t\tMage::dispatchEvent('adminhtml_banner_edit_tab_main_prepare_form',\r\n\t\t\t\tarray('form' => $form));\r\n\t\t\r\n\t\t$form->setValues($model->getData());\r\n\t\t$this->setForm($form);\r\n\t\t\r\n\t\treturn parent::_prepareForm();\r\n\t}", "function init_form_fields() {\n\t\t\t\n\t\t\t$abs_path = str_replace('/wp-admin', '', getcwd());\n\t\t\n\t\t\t$this->form_fields = array(\n\t\t\t\t'enabled' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Activer/Désactiver:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'checkbox', \n\t\t\t\t\t\t\t\t'label' => __( 'Activer le module de paiement Atos.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => 'yes'\n\t\t\t\t\t\t\t), \n\t\t\t\t'title' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Nom:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Intitulé affiché à l\\'utilisateur lors de la commande.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __( 'Paiement sécurisé par carte bancaire', 'woothemes' )\n\t\t\t\t\t\t\t),\n\t\t\t\t'description' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Description:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'textarea', \n\t\t\t\t\t\t\t\t'description' => __( 'Description affichée à l\\'utilisateur lors de la commande.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('Payez en toute sécurité grâce à notre système de paiement Atos.', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'merchant_id' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Identifiant commerçant:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Identifiant commerçant fourni par votre banque. Ex: 014295303911112', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('014295303911112', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'pathfile' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Chemin du fichier pathfile:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Chemin absolu vers le fichier de configuration \"pathfile\" du kit de paiement, sans le / final', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __($abs_path . '/atos/param/pathfile', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'request_file' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Chemin du fichier request:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Chemin absolu vers le fichier exécutable \"request\" du kit de paiement, sans le / final', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __($abs_path . '/atos/bin/request', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'response_file' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Chemin du fichier response:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Chemin absolu vers le fichier exécutable \"response\" du kit de paiement, sans le / final', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __($abs_path . '/atos/bin/response', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'payment_means' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Cartes acceptées:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Moyens de paiement acceptés. Ex pour CB, Visa et Mastercard: CB,2,VISA,2,MASTERCARD,2', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('CB,2,VISA,2,MASTERCARD,2', 'woothemes')\n\t\t\t\t\t\t\t),\n\n\t\t\t\t'currency_code' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Devise:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'select', \n\t\t\t\t\t\t\t\t'description' => __( 'Veuillez sélectionner une devise pour les paiemenents.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => '978',\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'840' => 'USD',\n\t\t\t\t\t\t\t\t\t'978' => 'EUR',\n\t\t\t\t\t\t\t\t\t'124' => 'CAD',\n\t\t\t\t\t\t\t\t\t'392' => 'JPY',\n\t\t\t\t\t\t\t\t\t'826' => 'GBP',\n\t\t\t\t\t\t\t\t\t'036' => 'AUD' \n\t\t\t\t\t\t\t\t ) \t\t\t\t\t\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\n\t\t\t\t'paybtn' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Texte bouton de paiement:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Texte affiché sur le bouton qui redirige vers le terminal de paiement.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('Régler la commande.', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'paymsg' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Message page de paiement:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'textarea', \n\t\t\t\t\t\t\t\t'description' => __( 'Message affiché sur la page de commande validée, avant passage sur le terminal de paiement.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('Merci pour votre commande. Veuillez cliquer sur le bouton ci-dessous pour effectuer le règlement.', 'woothemes')\n\t\t\t\t\t\t\t)\n\t\t\t\t/*'payreturn' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Texte bouton retour:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Texte affiché sur le bouton de retour ver la boutique.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('Retour', 'woothemes')\n\t\t\t\t\t\t\t)*/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t);\n\t\t\n\t\t}", "public function add_field(form_item $field) {\n $this->_fields[] = $field;\n }", "protected function addField() {\n foreach(func_get_args() as $argument) {\n if ( (!is_null($argument)) && (is_array($argument)) ) {\n $this->form_fields[$argument['name']] = new UIFormField($argument);\n }\n }\n return $this;\n }", "function extraFields() {\n\t\n\t\t$file_id = JRequest::getVar('id');\n\t\t$filename = JRequest::getVar('filename');\n\t\t\n\t\tif (!$filename) {\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$model = $this->getModel();\n\t\t$form = $model->getFieldForm($file_id, 'bulk');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\">';\n\t\techo '<legend>Edit '.$filename.'</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}", "protected function _prepareForm() {\n /**\n * Set save form action.\n */\n $form = new Varien_Data_Form ( array (\n 'id' => 'edit_form',\n 'action' => $this->getUrl ( '*/*/save', array (\n 'id' => $this->getRequest ()->getParam ( 'id' ) \n ) ),\n 'enctype' => 'multipart/form-data',\n 'method' => 'post',\n \n ) );\n /**\n * Set calues to form.\n */\n $form->setUseContainer ( true ); \n /**\n * Set form data \n */\n $this->setForm ( $form ); \n $fieldset = $form->addFieldset ( 'base_fieldset', array (\n 'legend' => Mage::helper ( 'airhotels' )->__ ( 'Bank details' ) \n ) );\n /**\n * Get collection from country list.\n *\n * @var $countryList\n */\n $countryList = Mage::getModel ( 'directory/country' )->getResourceCollection ()->loadByStore ()->toOptionArray ( false );\n /**\n * Display country code.\n * Field type 'multi select'.\n * Required entry true.\n */\n $fieldset->addField ( 'country_code', 'multiselect', array (\n 'name' => 'country_code[]',\n 'label' => Mage::helper ( 'airhotels' )->__ ( 'Countries' ),\n 'title' => Mage::helper ( 'airhotels' )->__ ( 'Countries' ),\n 'required' => true,\n 'values' => $countryList \n ) );\n /**\n * Get currency collection.\n */\n $allCurrency = Mage::getModel ( 'airhotels/allcurrency' )->getCollection ()->addFieldToSelect ( 'value' )->addFieldToSelect ( 'label' )->getData ();\n /**\n * Display currency.\n * Field Name 'currency'.\n * Fields type 'multiselect'\n * Requird entry true.\n */\n $fieldset->addField ( 'currency_code', 'multiselect', array (\n 'name' => 'currency_code[]',\n 'label' => Mage::helper ( 'airhotels' )->__ ( 'Curreny' ),\n 'title' => Mage::helper ( 'airhotels' )->__ ( 'Currency' ),\n 'required' => true,\n 'values' => $allCurrency \n ) );\n /**\n * Display note message.\n */\n $note = Mage::helper ( 'airhotels' )->__ ( 'Example: bank_name, account_number, ifsc_code, payee etc..' );\n /**\n * Display fields name.\n * Field name 'field_name'\n * Field type 'text'\n * Required entry true.\n */\n $fieldset->addField ( 'field_name', 'text', array (\n 'label' => Mage::helper ( 'airhotels' )->__ ( 'Field Name' ),\n 'title' => Mage::helper ( \"airhotels\" )->__ ( 'Field Name' ),\n 'class' => 'required-entry',\n 'required' => true,\n 'name' => 'field_name',\n 'note' => $note \n ) );\n /**\n * Display field title.\n * Field name 'field_title'\n * Field type 'text'\n * Required entry true.\n */\n $fieldset->addField ( 'field_title', 'text', array (\n 'label' => Mage::helper ( 'airhotels' )->__ ( 'Field Title' ),\n 'title' => Mage::helper ( \"airhotels\" )->__ ( 'Field Title' ),\n 'class' => 'required-entry',\n 'required' => true,\n 'name' => 'field_title' \n ) );\n /**\n * Display managebankdetails.\n * Field name 'managebankdetails_data'\n * Field type 'checkbox'\n * Required entry false.\n */\n $bankDataInfo = Mage::registry ( 'managebankdetails_data' )->getData ();\n $fieldset->addField ( 'field_required', 'checkbox', array (\n 'name' => 'field_required',\n 'label' => Mage::helper ( 'airhotels' )->__ ( 'This Field Is Required' ),\n 'title' => Mage::helper ( \"airhotels\" )->__ ( 'This Fieldd Is Required' ),\n 'required' => false,\n 'value' => 1,\n 'checked' => ($bankDataInfo ['field_required'] == 1) ? 'true' : '',\n 'onclick' => 'this.value = this.checked ? 1 : 0;',\n 'disabled' => false,\n 'readonly' => false \n ) );\n if (Mage::registry ( 'managebankdetails_data' )) {\n /**\n * Get managebank details.\n */\n $bankDataInfo = Mage::registry ( 'managebankdetails_data' )->getData ();\n }\n /**\n * Set bank data info.\n */\n $form->setValues ( $bankDataInfo );\n /**\n * Set value to form.\n */\n $this->setForm ( $form );\n /**\n * Calling the parent Construct Method.\n */\n return parent::_prepareForm ();\n }", "abstract function setupForm(&$mform);", "protected function _prepareForm()\n {\n /** @var \\ParadoxLabs\\Subscriptions\\Model\\Subscription $subscription */\n $subscription = $this->_coreRegistry->registry('current_subscription');\n\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('subscription_');\n\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Subscription Details')]);\n\n if ($subscription->getId()) {\n $fieldset->addField('entity_id', 'hidden', ['name' => 'entity_id']);\n }\n\n /** @var \\Magento\\Quote\\Model\\Quote $quote */\n $quote = $subscription->getQuote();\n $products = '';\n\n /** @var \\Magento\\Quote\\Model\\Quote\\Item $item */\n foreach ($quote->getAllItems() as $item) {\n $products .= sprintf('%s (SKU: %s)<br />', $item->getName(), $item->getSku());\n }\n\n $fieldset->addField(\n 'product_label',\n 'note',\n [\n 'name' => 'product',\n 'label' => __('Product'),\n 'text' => $products,\n ]\n );\n\n $fieldset->addField(\n 'description',\n 'text',\n [\n 'name' => 'description',\n 'label' => __('Description'),\n 'title' => __('Description'),\n ]\n );\n\n $fieldset->addField(\n 'status_label',\n 'note',\n [\n 'name' => 'status',\n 'label' => __('Status'),\n 'text' => $this->statusModel->getOptionText($subscription->getStatus()),\n ]\n );\n\n $fieldset->addField(\n 'created_at_formatted',\n 'note',\n [\n 'name' => 'created_at',\n 'label' => __('Started'),\n 'text' => $this->_localeDate->formatDateTime(\n $subscription->getCreatedAt(),\n \\IntlDateFormatter::MEDIUM\n )\n ]\n );\n\n $fieldset->addField(\n 'last_run_formatted',\n 'note',\n [\n 'name' => 'last_run',\n 'label' => __('Last run'),\n 'text' => $this->_localeDate->formatDateTime(\n $subscription->getLastRun(),\n \\IntlDateFormatter::MEDIUM\n )\n ]\n );\n\n $subscription->setData(\n 'next_run_formatted',\n $this->_localeDate->date($subscription->getNextRun())\n );\n $fieldset->addField(\n 'next_run_formatted',\n 'date',\n [\n 'name' => 'next_run',\n 'label' => __('Next run'),\n 'date_format' => $this->_localeDate->getDateFormat(\\IntlDateFormatter::MEDIUM),\n 'time_format' => $this->_localeDate->getTimeFormat(\\IntlDateFormatter::SHORT),\n 'class' => 'validate-date validate-date-range date-range-custom_theme-from',\n 'style' => 'width:200px',\n ]\n );\n\n $fieldset->addField(\n 'run_count',\n 'label',\n [\n 'name' => 'run_count',\n 'label' => __('Number of times billed'),\n ]\n );\n\n $fieldset->addField(\n 'frequency_count',\n 'text',\n [\n 'name' => 'frequency_count',\n 'label' => __('Frequency: Every'),\n 'title' => __('Frequency: Every'),\n ]\n );\n\n $fieldset->addField(\n 'frequency_unit',\n 'select',\n [\n 'name' => 'frequency_unit',\n 'title' => __('Frequency Unit'),\n 'options' => $this->periodModel->getOptionArrayPlural(),\n ]\n );\n\n $fieldset->addField(\n 'length',\n 'text',\n [\n 'name' => 'length',\n 'label' => __('Length'),\n 'title' => __('Length'),\n 'note' => __('Number of cycles the subscription should run. 0 for indefinite.'),\n ]\n );\n\n if ($subscription->getCustomerId() > 0) {\n try {\n $customer = $this->customerRepository->getById($subscription->getCustomerId());\n\n $fieldset->addField(\n 'customer',\n 'note',\n [\n 'name' => 'customer',\n 'label' => __('Customer'),\n 'text' => __(\n '<a href=\"%1\">%2 %3</a> (%4)',\n $this->escapeUrl(\n $this->getUrl('customer/index/edit', ['id' => $subscription->getCustomerId()])\n ),\n $customer->getFirstname(),\n $customer->getLastname(),\n $customer->getEmail()\n )\n ]\n );\n } catch (\\Exception $e) {\n // Do nothing on exception.\n }\n }\n\n // TODO: Add notes field?\n // TODO: Consider adding store, subtotal\n\n $form->setValues($subscription->getData());\n $this->setForm($form);\n\n $this->_eventManager->dispatch('adminhtml_subscription_view_tab_main_prepare_form', ['form' => $form]);\n\n parent::_prepareForm();\n\n return $this;\n }", "protected function addFormFieldNamesToViewHelperVariableContainer() {}", "protected function _prepareForm()\r\n {\r\n $form = new Varien_Data_Form(array(\r\n 'id' => 'edit_form',\r\n 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),\r\n 'method' => 'post',\r\n 'enctype' => 'multipart/form-data',\r\n )\r\n );\r\n\r\n $fieldSet = $form->addFieldset('magento_form', array('legend' => $this->helper->__('Webhook information')));\r\n\r\n $fieldSet->addField('code', 'select', array(\r\n 'label' => $this->helper->__('Code'),\r\n 'class' => 'required-entry',\r\n 'name' => 'code',\r\n 'values' => ApiExtension_Magento_Block_Adminhtml_Webhooks_Grid::getAvailableHooks()\r\n ));\r\n\r\n $fieldSet->addField('url', 'text', array(\r\n 'label' => $this->helper->__('Callback URL'),\r\n 'class' => 'required-entry',\r\n 'name' => 'url',\r\n ));\r\n\r\n $fieldSet->addField('description', 'textarea', array(\r\n 'label' => $this->helper->__('Description'),\r\n 'name' => 'description',\r\n ));\r\n\r\n $fieldSet->addField('data', 'textarea', array(\r\n 'label' => $this->helper->__('Data'),\r\n 'name' => 'data',\r\n ));\r\n\r\n $fieldSet->addField('token', 'text', array(\r\n 'label' => $this->helper->__('Token'),\r\n 'name' => 'token',\r\n ));\r\n\r\n $fieldSet->addField('active', 'select', array(\r\n 'label' => $this->helper->__('Active'),\r\n 'values' => ApiExtension_Magento_Block_Adminhtml_Webhooks_Grid::getOptionsForActive(),\r\n 'name' => 'active',\r\n ));\r\n\r\n if ($this->session->getWebhooksData()) {\r\n $form->setValues($this->session->getWebhooksData());\r\n $this->session->setWebhooksData(null);\r\n } elseif (Mage::registry('webhooks_data')) {\r\n $form->setValues(Mage::registry('webhooks_data')->getData());\r\n }\r\n\r\n $form->setUseContainer(true);\r\n $this->setForm($form);\r\n return parent::_prepareForm();\r\n }", "protected function _prepareForm()\n {\n $model = $this->_coreRegistry->registry('current_dcs_faq_items');\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('item_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('FAQ Information')]);\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id']);\n }\n $fieldset->addField(\n 'question',\n 'text',\n ['name' => 'question', 'label' => __('Question'), 'title' => __('Question'), 'required' => true]\n );\n \n $wysiwygConfig = $this->_wysiwygConfig->getConfig();\n $fieldset->addField(\n 'answer',\n 'editor',\n [\n 'name' => 'answer',\n 'label' => __('Answer'), \n 'title' => __('Answer'), \n 'required' => true ,\n 'config' => $wysiwygConfig \n ]\n );\n\n $fieldset->addField(\n 'category',\n 'select',\n ['name' => 'category',\n 'label' => __('Select Category'),\n 'title' => __('Select Category'),\n 'required' => false ,\n 'options' => $this->_catData->getLoadedFaqCategoryCollection()\n ]\n );\n \n /*$fieldset->addField(\n 'Answer',\n 'editor',\n ['name' => 'answer', 'label' => __('Answer'), 'title' => __('Answer'), 'required' => true, 'style' => 'height:36em',\n 'required' => true]\n );*/\n \n $fieldset->addField(\n 'rank',\n 'text',\n ['name' => 'rank', 'label' => __('Rank'), 'title' => __('Rank'), 'required' => true, 'class' => 'required-entry validate-number validate-greater-than-zero']\n );\n $fieldset->addField(\n 'status',\n 'select',\n ['name' => 'status', 'label' => __('Publish'), 'title' => __('Publish'), 'required' => true, 'options' => $this->_options->getOptionArray()]\n );\n $form->setValues($model->getData());\n $this->setForm($form);\n return parent::_prepareForm();\n }", "protected function _prepareForm()\n {\n $model = $this->getModel();\n \n\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n ['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']]\n );\n\n $fieldset = $form->addFieldset(\n 'base_fieldset',\n ['legend' => __('Template Information'), 'class' => 'fieldset-wide']\n );\n $fieldset->addType('background', 'Sample\\Gridpart2\\Block\\Adminhtml\\Template\\Helper\\Background');\n \n \n if ($model->getGridpart2templateId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id', 'value' => $model->getGridpart2templateId()]);\n }\n\n $fieldset->addField(\n 'name',\n 'text',\n [\n 'name' => 'name',\n 'label' => __('Template Name'),\n 'title' => __('Template Name'),\n 'required' => true,\n 'value' => $model->getName()\n ]\n );\n $fieldset->addField(\n 'pid',\n 'hidden',\n [\n 'name' => 'pid',\n 'value' => $model->getId()\n ]\n );\n\n $fieldset->addField(\n 'status',\n 'select',\n [\n 'label' => __('Status'),\n 'required' => true,\n 'name' => 'status',\n 'values' => $this->_statusOption->getStatusesOptionArray()\n ]\n );\n\n $form->setAction($this->getUrl('*/*/save'));\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "function form_init_data()\r\n {\r\n // Initialize the form fields\r\n\r\n $this->set_hidden_element_value(\"_action\", FT_ACTION_ADD) ;\r\n\r\n $this->set_element_value(\"Meet Start\", array(\"year\" => date(\"Y\"),\r\n \"month\" => date(\"m\"), \"day\" => date(\"d\"))) ;\r\n $this->set_element_value(\"Meet End\", array(\"year\" => date(\"Y\"),\r\n \"month\" => date(\"m\"), \"day\" => date(\"d\"))) ;\r\n\r\n // If the config is set to US only, initialize the country\r\n\r\n if (FT_US_ONLY)\r\n $this->set_element_value(\"Meet Country\",\r\n FT_SDIF_COUNTRY_CODE_UNITED_STATES_OF_AMERICA_VALUE) ;\r\n\r\n $this->set_element_value(\"Pool Altitude\", \"0\") ;\r\n }", "protected function prepare_fields()\n {\n }", "protected function _prepareForm()\n {\n /**\n * @var $value \\Amasty\\Finder\\Model\\Value\n */\n $value = $this->_coreRegistry->registry('current_amasty_finder_value');\n $finder = $this->_coreRegistry->registry('current_amasty_finder_finder');\n $settingData = [];\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n [\n 'data' => [\n 'id' => 'edit_form',\n 'action' => $this->getUrl('amasty_finder/value/save', ['id' => $this->getRequest()->getParam('id'), 'finder_id'=>$finder->getId()]),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data',\n ],\n ]\n );\n $form->setUseContainer(true);\n $this->setForm($form);\n\n $fieldset = $form->addFieldset('set', array('legend'=> __('General')));\n $fieldset->addField('sku', 'text', [\n 'label' => __('SKU'),\n 'title' => __('SKU'),\n 'name' => 'sku',\n ]);\n\n if($value->getId()) {\n $settingData['sku'] = $value->getSkuById($this->getRequest()->getParam('id'), $value->getId());\n }\n $currentId = $value->getId();\n\n\n $fields = [];\n while($currentId) {\n $alias_name = 'name_' . $currentId;\n $alias_label = 'label_'.$currentId;\n\n $model = clone $value;\n $model->load($currentId);\n $currentId = $model->getParentId();\n $dropdownId = $model->getDropdownId();\n $dropdown = $this->_objectManager->create('Amasty\\Finder\\Model\\Dropdown')->load($dropdownId);\n $dropdownName = $dropdown->getName();\n $settingData[$alias_name] = $model->getName();\n $fields[$alias_name] = [\n 'label' => __($dropdownName),\n 'title' => __($dropdownName),\n 'name' => $alias_label\n ];\n }\n\n $fields = array_reverse($fields);\n\n foreach($fields as $alias_name=>$fieldData) {\n $fieldset->addField($alias_name, 'text', $fieldData);\n }\n\n if(!$value->getId()) {\n $finder = $value->getFinder();\n\n foreach ($finder->getDropdowns() as $drop){\n $alias_name = 'name_'.$drop->getId();\n $alias_label = 'label_'.$drop->getId();\n $fieldset->addField($alias_name, 'text', [\n 'label' => __($drop->getName()),\n 'title' => __($drop->getName()),\n 'name' => $alias_label\n ]);\n }\n\n $fieldset->addField('new_finder', 'hidden', ['name' => 'new_finder']);\n $settingData['new_finder'] = 1;\n }\n\n\n //set form values\n $form->setValues($settingData);\n\n return parent::_prepareForm();\n }", "public function buildFields()\n {\n $this->addField('name', 'kuma_menu.menu.adminlist.field.name', true);\n }", "public function init()\n {\n\n $this->setMethod('post');\n\n // Add the name element\n $this->addElement('text','name', array(\n 'label' => 'Sub-Section Name'\n , 'size' => 50\n , 'required' => true\n , 'filters' => array('StringTrim')\n ));\n\n My_Plugin_Form::setDefaultLayout($this->getElement('name'));\n\n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Save Changes',\n 'disableLoadDefaultDecorators' => true,\n ));\n\n $label = $this->getElement('submit');\n $label->addDecorators(array(\n array('ViewHelper'),\n array('HtmlTag')\n ));\n\n // Add a hidden field to handle the application id\n $this->addElement('hidden','application_id');\n\n // Add a hidden field to handle the sub-section id\n $this->addElement('hidden','id');\n\n // And finally, add some CSRF protection\n $this->addElement('hash','csrf', array(\n 'ignore' => 'true',\n ));\n\n }", "function init_form_fields() {\n\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => '启用',\n 'type' => 'checkbox',\n 'label' => '启用交通银行支付',\n 'default' => 'no'\n ),\n 'title' => array(\n 'title' => '',\n 'type' => 'text',\n 'description' => '支付过程中所显示的支付名称',\n 'default' => '交通银行支付'\n ),\n 'description' => array(\n 'title' => '交通银行',\n 'type' => 'textarea',\n 'default' => '',\n ),\n 'merchantID' => array(\n 'title' => '商户编号',\n 'type' => 'text',\n 'description' => '',\n 'css' => 'width:400px'\n ),\n 'debug' => array(\n 'title' => 'debug模式',\n 'type' => 'checkbox',\n 'label' => '启用log',\n 'default' => 'no',\n 'description' => '选项无效,LOG始终启用,woocommerce/logs/bocpay',\n )\n );\n }", "protected function _prepareForm()\n {\n $model = $this->_coreRegistry->registry('current_amasty_finder_finder');\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('finder_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('General')]);\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id']);\n }\n $fieldset->addField(\n 'name',\n 'text',\n ['name' => 'name', 'label' => __('Title'), 'title' => __('Title'), 'required' => true]\n );\n\n if (!$model->getId()) {\n $fieldset->addField(\n 'cnt',\n 'text',\n [\n 'name' => 'cnt',\n 'label' => __('Number of Dropdowns'),\n 'title' => __('Number of Dropdowns'),\n 'class' => 'validate-greater-than-zero',\n 'required' => true\n ]\n );\n }\n\n $fieldset->addField(\n 'template',\n 'select',\n [\n 'name' => 'template',\n 'label' => __('Template'),\n 'title' => __('Template'),\n 'required' => false,\n 'values' => [\n ['value' => 'horizontal', 'label' => __('Horizontal')],\n ['value' => 'vertical', 'label' => __('Vertical')]\n ],\n 'note' => __('The `horizontal` option is responsive and set by default')\n ]\n );\n\n $fieldset->addField(\n 'custom_url',\n 'text',\n [\n 'name' => 'custom_url',\n 'label' => __('Custom Destination URL'),\n 'title' => __('Custom Destination URL'),\n 'required' => false,\n 'note' =>\n __(\n 'It determines the page the Finder will redirect customers to when the Find button is pressed. \n Enter category URL, e.g. special-category.html to redirect search results to one category.'\n )\n ]\n );\n\n $fieldset->addField(\n 'default_category',\n 'select',\n [\n 'name' => 'default_category',\n 'label' => __('Add Finder to the Default Category'),\n 'title' => __('Add Finder to the Default Category'),\n 'required' => false,\n 'values' => $this->yesno->toOptionArray(),\n 'note' =>\n __(\n 'Keep \\'Yes\\' to get the Finder working properly at the home and cms pages.'\n )\n ]\n );\n\n $fieldset->addField(\n 'hide_finder',\n 'select',\n [\n 'name' => 'hide_finder',\n 'label' => __('Finder block visibility on the Default Category'),\n 'title' => __('Finder block visibility on the Default Category'),\n 'required' => false,\n 'values' => [\n ['value' => 0, 'label' => __('Hide')],\n ['value' => 1, 'label' => __('Show')]\n ],\n 'note' =>\n __(\n 'Keep \\'Hide\\' to not display this finder block on the default category on the frontend. \n It is useful when there are several finders added to the default category but you need to \n display only one of them at the frontend.'\n )\n ]\n );\n\n $fieldset->addField(\n 'search_page',\n 'select',\n [\n 'name' => 'search_page',\n 'label' => __('Add Finder to the Search Page'),\n 'title' => __('Add Finder to the Search Page'),\n 'required' => false,\n 'values' => $this->yesno->toOptionArray()\n ]\n );\n\n $fieldset->addField(\n 'position',\n 'text',\n [\n 'name' => 'position',\n 'label' => __('Add the finder block in'),\n 'title' => __('Add the finder block in'),\n 'required' => false,\n 'note' =>\n __(\n 'Place the product finder in particular themes, categories, and other locations.\n Possible options: sidebar.main, content, content.top, footer.'\n )\n ]\n );\n\n $fieldset->addField(\n 'categories',\n 'multiselect',\n [\n 'name' => 'categories',\n 'label' => __('Categories'),\n 'title' => __('Categories'),\n 'style' => 'height: 500px; width: 300px;',\n 'values' => $this->categorySource->toOptionArray(),\n ]\n );\n\n if ($model->getId()) {\n $fieldset->addField(\n 'code_for_inserting',\n 'textarea',\n [\n 'label' => __('Code for inserting'),\n 'title' => __('Code for inserting'),\n 'disabled' => 1,\n 'note' =>\n 'Use this code if you want to put product finder in any CMS page or block.'\n ]\n );\n $fieldSettings = [\n 'label' => __('Code for inserting in Layout Update XML'),\n 'title' => __('Code for inserting in Layout Update XML'),\n 'disabled' => 1,\n ];\n\n if (version_compare($this->magentoVersion->get(), '2.3.4', '<')) {\n $fieldSettings['note'] = 'To add a product finder to a category manually, navigate to \n Catalog > Categories > Select your category (i.e. Wheels). \n In the Design section find Layout Update XML field and paste the code there.';\n }\n\n $fieldset->addField(\n 'code_for_inserting_in_layout',\n 'textarea',\n $fieldSettings\n );\n }\n\n if (!$model->getId()) {\n $form->addValues(\n [\n 'default_category' => 1,\n 'hide_finder' => 0\n ]\n );\n }\n\n $htmlIdPrefix = $form->getHtmlIdPrefix();\n\n $this->setChild(\n 'form_after',\n $this->getLayout()->createBlock(\\Magento\\Backend\\Block\\Widget\\Form\\Element\\Dependence::class)\n ->addFieldMap($htmlIdPrefix . 'default_category', 'default_category')\n ->addFieldMap($htmlIdPrefix . 'hide_finder', 'hide_finder')\n ->addFieldDependence('hide_finder', 'default_category', 1)\n );\n\n $form->setValues($model->getData());\n $form->addValues(\n [\n 'id' => $model->getId(),\n 'code_for_inserting' =>\n '{{block class=\"Amasty\\\\Finder\\\\Block\\\\Form\" block_id=\"finder_form\" '\n . 'location=\"cms\" id=\"' . $model->getId() . '\"}}',\n 'code_for_inserting_in_layout' => $model->getFinderXmlCode()\n ]\n );\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "protected function _prepareForm()\n {\n $model = Mage::registry('maduranga_wall');\n\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n ));\n\n $fieldset = $form->addFieldset('base_fieldset', array(\n 'legend' => $this->__('Visualizer Background Information'),\n 'class' => 'fieldset-wide',\n ));\n\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', array(\n 'name' => 'id',\n ));\n }\n\n $fieldset->addField('name', 'text', array(\n 'name' => 'name',\n 'label' => $this->__('Name'),\n 'title' => $this->__('Name'),\n 'required' => true,\n ));\n\n $fieldset->addField('image', 'file', array(\n 'name' => 'image',\n 'label' => $this->__('Background Image'),\n 'title' => $this->__('Background Image'),\n 'required' => true,\n ));\n\n $fieldset->addField('status', 'select', array(\n 'label' => $this->__('Status'),\n 'name' => 'status',\n 'required' => true,\n 'values' => array(\n array(\n 'value' => 1,\n 'label' => $this->__('Enable'),\n ),\n\n array(\n 'value' => 0,\n 'label' => $this->__('Disable'),\n ),\n ),\n ));\n\n $form->setValues($model->getData());\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "public function init_form_fields() {\r\n\r\n $this->form_fields = array(\r\n 'enabled' => array(\r\n 'title' => __('Enable/Disable', 'azericard'),\r\n 'type' => 'checkbox',\r\n 'label' => __('Enable Azericard Payment Module.', 'azericard'),\r\n 'default' => 'no'),\r\n 'title' => array(\r\n 'title' => __('Title:', 'azericard'),\r\n 'type'=> 'text',\r\n 'description' => __('This controls the title which the user sees during checkout.', 'azericard'),\r\n 'default' => __('Azericard', 'azericard')),\r\n 'description' => array(\r\n 'title' => __('Description:', 'azericard'),\r\n 'type' => 'textarea',\r\n 'description' => __('This controls the description which the user sees during checkout.', 'azericard'),\r\n 'default' => __('Pay securely by Credit or Debit card or internet banking through Azericard Secure Servers.', 'azericard')),\r\n\r\n 'select_mode' => array(\r\n 'title' => __( 'Sale mode', 'azericard' ),\r\n 'type' => 'select',\r\n 'description' => __( 'Select which mode do you want to use.', 'azericard' ),\r\n 'options' => array(\r\n 'test' => 'Test mode',\r\n 'production' => 'Production mode'\r\n ),\r\n 'default' => 'Authorize &amp; Capture'\r\n ),\r\n\r\n 'url_test' => array(\r\n 'title' => __('Azericard url (Test mode):', 'azericard'),\r\n 'type' => 'text',\r\n 'class' => 'test-mode',\r\n 'description' => __('Azericard url.', 'azericard'),\r\n 'default' => __('https://213.172.75.248/cgi-bin/cgi_link', 'azericard')),\r\n 'terminal_test' => array(\r\n 'title' => __('Terminal (Test mode)', 'azericard'),\r\n 'type' => 'text',\r\n 'class' => 'test-mode',\r\n 'description' => __('This terminal id use at Azericard.'),\r\n 'default' => __('77777777', 'azericard')),\r\n 'key_for_sign_test' => array(\r\n 'title' => __('Key for sign (Test mode)', 'azericard'),\r\n 'type' => 'text',\r\n 'class' => 'test-mode',\r\n 'description' => __('Given to key by Azericard', 'azericard'),\r\n 'default' => __('00112233445566778899AABBCCDDEEFF', 'azericard')),\r\n\r\n 'url_production' => array(\r\n 'title' => __('Azericard url (Production mode):', 'azericard'),\r\n 'type'=> 'text',\r\n 'class' => 'production-mode',\r\n 'description' => __('Azericard url.', 'azericard'),\r\n 'default' => __('https://213.172.75.248/cgi-bin/cgi_link', 'azericard')),\r\n 'terminal_production' => array(\r\n 'title' => __('Terminal (Production mode)', 'azericard'),\r\n 'type' => 'text',\r\n 'class' => 'production-mode',\r\n 'description' => __('This terminal id use at Azericard.'),\r\n 'default' => __('77777777', 'azericard')),\r\n 'key_for_sign_production' => array(\r\n 'title' => __('Key for sign (Production mode)', 'azericard'),\r\n 'type' => 'text',\r\n 'class' => 'production-mode',\r\n 'description' => __('Given to key by Azericard', 'azericard'),\r\n 'default' => __('00112233445566778899AABBCCDDEEFF', 'azericard')),\r\n\r\n 'redirect_page_id' => array(\r\n 'title' => __('Return Page'),\r\n 'type' => 'select',\r\n 'options' => $this -> get_pages_az('Select Page'),\r\n 'description' => \"URL of success page\"\r\n )\r\n );\r\n }", "function MYMODULE_my_custom_form(&$form_state) {\n // Add some normal FAPI item.\n $form['title'] = array (\n '#type' => 'textfield',\n '#title' => 'Title',\n '#required' => true,\n '#default_value' => NULL,\n '#maxlength' => 255,\n '#weight' => -5,\n );\n // Add special CCK form items.\n module_load_include('inc', 'content', 'includes/content.node_form');\n // Assume a hypothetical content type called \"article\"\n $type = content_types('article');\n // Go through each of its custom fields and add them to our form.\n foreach ($type['fields'] as $field_name => $field) {\n // If we wanted a specific field, we'd filter it here, by name:\n // if ($field_name == 'field_article_my_custom_field') { }\n // But for this example we're going to add them all.\n $form['#field_info'][$field['field_name']] = $field;\n $form += (array) content_field_form($form, $form_state, $field);\n }\n $form['submit'] = array (\n '#value' => 'Submit',\n '#type' => 'submit',\n );\n return $form;\n}", "public function prepareForm($form, $field)\n\t{\n\t\t$orig = $form->getFieldXml($field->getAttribute('name'), 'com_fields');\n\t\t\n\t\t$xml = clone $orig;\n\t\t$form->setField($xml, 'filter', true, 'filter');\n\t}", "private function build()\n {\n $this->form->addText(\n 'name',\n $this->teamMember === null ? null : $this->teamMember->getName(),\n null,\n 'inputText title',\n 'inputTextError title'\n );\n\n $this->form->addEditor(\n 'description',\n $this->teamMember === null ? null : $this->teamMember->getDescription()\n );\n\n $this->meta = new Meta(\n $this->form,\n $this->teamMember === null ? null : $this->teamMember->getMetaId(),\n 'name',\n true\n );\n }", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "function _addMetadataFields()\n {\n $config =& NDB_Config::singleton();\n $this->dateOptions = array(\n 'language' => 'en',\n 'format' => 'YMd',\n 'minYear' => $config->getSetting('startYear'),\n 'maxYear' => $config->getSetting('endYear'),\n 'addEmptyOption' => true,\n 'emptyOptionValue' => null\n );\n\n $this->form->addElement('date', 'Date_taken', 'Date of Administration', $this->dateOptions);\n\n $examiners = $this->_getExaminerNames();\n $this->form->addElement('select', 'Examiner', 'Radiologist', $examiners);\n\n \t$this->form->addGroupRule('Date_taken', 'Date of Administration is required', 'required');\n\n $this->form->registerRule('checkdate', 'callback', '_checkDate');\n $this->form->addRule('Date_taken', 'Date of Administration is invalid', 'checkdate');\n\n $this->form->addRule('Examiner', 'Examiner is required', 'required');\n }", "public function onContentPrepareForm($form, $data)\n {\n // You can use this method to alter the property form\n // See the JForm Class {JOOMLA_PATH}/libraries/joomla/form/form.php\n // See the JEA property form {JOOMLA_PATH}/administrator/components/com_jea/models/forms/property.xml\n\n $xml = '<?xml version=\"1.0\"?>\n<form>\n\t<fieldset name=\"details\">\n\t\t<field name=\"owner_name\" type=\"text\" label=\"PLG_JEA_OWNER_NAME\" />\n\t</fieldset>\n</form>';\n // This add a nex field in the fieldset details\n // You can also load an XML file\n $form->load($xml);\n }", "protected function _prepareForm()\n {\n\n $form = new Varien_Data_Form();\n $this->setForm($form);\n $fieldset = $form->addFieldset('cron_form', array(\n 'legend' =>Mage::helper('aoe_scheduler')->__('Settings')\n ));\n\n $fieldset->addField('model', 'select', array(\n 'label' => Mage::helper('aoe_scheduler')->__('Model'),\n 'title' => Mage::helper('aoe_scheduler')->__('Model'),\n 'class' \t=> 'input-select',\n 'required' => true,\n 'name' => 'model',\n 'options' => Mage::helper('aoe_scheduler')->getModelOptions(),\n ));\n $continueButton = $this->getLayout()\n ->createBlock('adminhtml/widget_button')\n ->setData(array(\n 'label' => Mage::helper('aoe_scheduler')->__('Continue'),\n 'onclick' => \"setSettings('\".$this->getContinueUrl().\"', 'model')\",\n 'class' => 'save'\n ));\n $fieldset->addField('continue_button', 'note', array(\n 'text' => $continueButton->toHtml(),\n ));\n \n return parent::_prepareForm();\n }", "function populate() {\n // @todo We inject client input directly into the form. What about\n // security issues?\n if (isset($this->form->request['raw_input'][$this->attributes['name']])) {\n // Disabled input elements do not accept new input.\n if (!$this->disabled) {\n $this->value = $this->form->request['raw_input'][$this->attributes['name']];\n }\n }\n }", "public function set_fields() {\n $this->fields = apply_filters('wpucommentmetas_fields', $this->fields);\n foreach ($this->fields as $id => $field) {\n if (!is_array($field)) {\n $this->fields[$id] = array();\n }\n if (!isset($field['label'])) {\n $this->fields[$id]['label'] = ucfirst($id);\n }\n if (!isset($field['admin_label'])) {\n $this->fields[$id]['admin_label'] = $this->fields[$id]['label'];\n }\n if (!isset($field['type'])) {\n $this->fields[$id]['type'] = 'text';\n }\n if (!isset($field['help'])) {\n $this->fields[$id]['help'] = '';\n }\n if (!isset($field['required'])) {\n $this->fields[$id]['required'] = false;\n }\n if (!isset($field['admin_visible'])) {\n $this->fields[$id]['admin_visible'] = true;\n }\n if (!isset($field['admin_column'])) {\n $this->fields[$id]['admin_column'] = false;\n }\n if (!isset($field['admin_list_visible'])) {\n $this->fields[$id]['admin_list_visible'] = false;\n }\n if (!isset($field['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array(\n 'comment_form_logged_in_after',\n 'comment_form_after_fields'\n );\n }\n if (!is_array($this->fields[$id]['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array($this->fields[$id]['display_hooks']);\n }\n }\n }", "function buildSettingsForm() {}", "protected function _prepareForm()\n {\n $model = Mage::helper('lavi_news')->getNewsItemInstance();\n\n /**\n * Checking if user have permissions to save information\n */\n if (Mage::helper('lavi_news/admin')->isActionAllowed('save')) {\n $isElementDisabled = false;\n } else {\n $isElementDisabled = true;\n }\n\n $form = new Varien_Data_Form();\n\n $form->setHtmlIdPrefix('news_main_');\n\n $fieldset = $form->addFieldset('base_fieldset', array(\n 'legend' => Mage::helper('lavi_news')->__('News Item Info')\n ));\n\n if ($model->getId()) {\n $fieldset->addField('news_id', 'hidden', array(\n 'name' => 'news_id',\n ));\n }\n\n $fieldset->addField('title', 'text', array(\n 'name' => 'title',\n 'label' => Mage::helper('lavi_news')->__('News Title'),\n 'title' => Mage::helper('lavi_news')->__('News Title'),\n 'required' => true,\n 'disabled' => $isElementDisabled\n ));\n\n $fieldset->addField('author', 'text', array(\n 'name' => 'author',\n 'label' => Mage::helper('lavi_news')->__('Author'),\n 'title' => Mage::helper('lavi_news')->__('Author'),\n 'required' => true,\n 'disabled' => $isElementDisabled\n ));\n\n $fieldset->addField('published_at', 'date', array(\n 'name' => 'published_at',\n 'format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT),\n 'image' => $this->getSkinUrl('images/grid-cal.gif'),\n 'label' => Mage::helper('lavi_news')->__('Publishing Date'),\n 'title' => Mage::helper('lavi_news')->__('Publishing Date'),\n 'required' => true\n ));\n\n Mage::dispatchEvent('adminhtml_news_edit_tab_main_prepare_form', array('form' => $form));\n\n $form->setValues($model->getData());\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "private function _set_fields()\n {\n @$this->form_data->question_id = 0;\n\n $this->form_data->category_id = 0;\n $this->form_data->sub_category_id = 0;\n $this->form_data->sub_two_category_id = 0;\n $this->form_data->sub_three_category_id = 0;\n $this->form_data->sub_four_category_id = 0;\n\n $this->form_data->ques_text = '';\n $this->form_data->survey_weight = '';\n $this->form_data->ques_type = '';\n $this->form_data->qus_fixed = 0;\n $this->form_data->ques_expiry_date = '';\n\n\n $this->form_data->filter_question = '';\n $this->form_data->filter_category = 0;\n $this->form_data->filter_type = '';\n $this->form_data->filter_expired = '';\n }", "public function buildForm()\n {\n $this\n ->add('group_name', 'text')\n ->add(\n 'organizations',\n 'choice',\n [\n 'choices' => $this->getOrganizationName(),\n 'attr' => ['style' => 'height:100px'],\n 'multiple' => true\n ]\n )\n ->add(\n 'group_identifier',\n 'text',\n [\n 'attr' => [\n 'id' => 'group_identifier'\n ],\n 'help_block' => [\n 'text' => \"Your group identifier will be used as a prefix for your organisation group. We recommend that you use a short abbreviation that uniquely identifies your organisation group. If your group identifier is 'abc' the username for the group created with this registration will be 'abc_group'.\",\n 'tag' => 'p',\n 'attr' => ['class' => 'help-block']\n ],\n 'label' => 'Group Identifier'\n ]\n );\n }", "protected function _prepareForm() {\r\n $model = Mage::getModel('attributeSplash/rule');\r\n $form = new Varien_Data_Form();\r\n\r\n $form->setHtmlIdPrefix('rule_');\r\n $form->setFieldNameSuffix('splash');\r\n\r\n $renderer = Mage::getBlockSingleton('adminhtml/widget_form_renderer_fieldset')\r\n ->setTemplate('promo/fieldset.phtml')\r\n ->setNewChildUrl($this->getUrl('*/promo_catalog/newConditionHtml/form/rule_conditions_fieldset'));\r\n\r\n $fieldset = $form->addFieldset('conditions_fieldset', array(\r\n 'legend'=>Mage::helper('catalogrule')->__('Conditions (leave blank for all products)'))\r\n )->setRenderer($renderer);\r\n\r\n $fieldset->addField('conditions', 'text', array(\r\n 'name' => 'conditions',\r\n 'label' => Mage::helper('catalogrule')->__('Conditions'),\r\n 'title' => Mage::helper('catalogrule')->__('Conditions'),\r\n 'required' => true,\r\n ))->setRule($model)->setRenderer(Mage::getBlockSingleton('rule/conditions'));\r\n \r\n $form->setValues($this->_getFormData());\r\n\r\n $this->setForm($form);\r\n\r\n return $this;\r\n }", "public function init_form_fields() {\n\t\t\t$this->form_fields = array(\n\t\t\t\t'enabled' => array(\n\t\t\t\t\t'title' => __('Enable/Disable', 'Cointopay'),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => __('Enable Cointopay', 'Cointopay'),\n\t\t\t\t\t'default' => 'yes',\n\t\t\t\t),\n\t\t\t\t'title' => array(\n\t\t\t\t\t'title' => __('Title', 'Cointopay'),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'description' => __('This controls the title the user can see during checkout.', 'Cointopay'),\n\t\t\t\t\t'default' => __('Cointopay', 'Cointopay'),\n\t\t\t\t),\n\t\t\t\t'description' => array(\n\t\t\t\t\t'title' => __('Description', 'Cointopay'),\n\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t'description' => __('This controls the title the user can see during checkout.', 'Cointopay'),\n\t\t\t\t\t'default' => __('You will be redirected to cointopay.com to complete your purchase.', 'Cointopay'),\n\t\t\t\t),\n\t\t\t\t'merchantid' => array(\n\t\t\t\t\t'title' => __('Your MerchantID', 'Cointopay'),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'description' => __('Please enter your Cointopay Merchant ID, You can get this information in: <a href=\"' . esc_url( 'https://cointopay.com' ) . '\" target=\"_blank\">Cointopay Account</a>.', 'Cointopay'),\n\t\t\t\t\t'default' => '',\n\t\t\t\t),\n\t\t\t\t'secret' => array(\n\t\t\t\t\t'title' => __('SecurityCode', 'Cointopay'),\n\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t'description' => __('Please enter your Cointopay SecurityCode, You can get this information in: <a href=\"' . esc_url( 'https://cointopay.com' ) . '\" target=\"_blank\">Cointopay Account</a>.', 'Cointopay'),\n\t\t\t\t\t'default' => '',\n\t\t\t\t),\n\t\t\t);\n\n\t\t}", "protected function _prepareForm()\n {\n $model = $this->_coreRegistry->registry('current_lapisbard_storelocator_locations');\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('item_');\n\n $countries = [['value' => 'UK', 'label' => __('UK')], ['value' => 'India', 'label' => __('India')]];\n $yesno = [['value' => 'Enabled', 'label' => __('Enabled')], ['value' => 'Disabled', 'label' => __('Disabled')]];\n\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Location Information')]);\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id']);\n }\n\n $fieldset->addField(\n 'store_title',\n 'text',\n ['name' => 'store_title', 'label' => __('Store Title'), 'title' => __('Store Title'), 'required' => true]\n );\n $fieldset->addField(\n 'address',\n 'text',\n ['name' => 'address', 'label' => __('Address'), 'title' => __('Address'), 'required' => true]\n );\n $fieldset->addField(\n 'city',\n 'text',\n ['name' => 'city', 'label' => __('City'), 'title' => __('City'), 'required' => false]\n );\n $fieldset->addField(\n 'state',\n 'text',\n ['name' => 'state', 'label' => __('State'), 'title' => __('State'), 'required' => true]\n );\n $fieldset->addField(\n 'pincode',\n 'text',\n ['name' => 'pincode', 'label' => __('Pin Code'), 'title' => __('Pin Code'), 'required' => true]\n );\n $fieldset->addField(\n 'country',\n 'select',\n ['name' => 'country', 'label' => __('Country'), 'title' => __('Country'), 'values' => $countries]\n );\n $fieldset->addField(\n 'phone',\n 'text',\n ['name' => 'phone', 'label' => __('Phone Number'), 'title' => __('Phone Number'), 'required' => true]\n );\n $fieldset->addField(\n 'email',\n 'text',\n ['name' => 'email', 'label' => __('Email'), 'title' => __('Email'), 'required' => false]\n );\n $fieldset->addField(\n 'is_enable',\n 'select',\n [\n 'name' => 'is_enable',\n 'label' => __('Status'),\n 'title' => __('Status'),\n 'values' => $yesno\n ]\n );\n $form->setValues($model->getData());\n $this->setForm($form);\n return parent::_prepareForm();\n }", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "public function init_form_fields() {\n\t\t$this->form_fields = [\n\t\t\t'enabled' => [\n\t\t\t\t'title' => 'Enable/Disable',\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => 'Enable this email digest',\n\t\t\t\t'default' => 'no'\n\t\t\t],\n\t\t\t'recipient' => [\n\t\t\t\t'title' => 'Recipient(s)',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => 'Enter recipients (comma separated) for this email. Defaults to ' . get_option( 'admin_email' ),\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'default' => '',\n\t\t\t],\n\t\t\t'schedule' => [\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => 'Scheduled Frequency',\n\t\t\t\t'description' => 'Weekly emails will be sent on Mondays. All emails are sent at 7:00am.',\n\t\t\t\t'options' => [\n\t\t\t\t\t'daily' => 'Daily',\n\t\t\t\t\t'weekly' => 'Weekly'\n\t\t\t\t],\n\t\t\t\t'default' => 'daily'\n\t\t\t],\n\t\t\t'email_type' => [\n\t\t\t\t'title' => 'Email type',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'description' => 'Choose which format of email to send.',\n\t\t\t\t'default' => 'html',\n\t\t\t\t'class' => 'email_type wc-enhanced-select',\n\t\t\t\t'options' => $this->get_email_type_options(),\n\t\t\t\t'desc_tip' => true,\n\t\t\t],\n\t\t\t'send_now' => [\n\t\t\t\t'title' => 'Send now?',\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => 'Yes, send the email digest on save',\n\t\t\t\t'default' => 'no'\n\t\t\t]\n\t\t];\n\t}", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'view_form',\n 'action' => $this->getUrl(\n 'incentivize/submitted/send',\n array(\n '_current' => true,\n )\n ),\n 'method' => 'post',\n )); // The above code creates the action for the fieldset\n\n $form->setUseContainer(true);\n $this->setForm($form);\n\n // Define a new fieldset, only one is necassary\n $fieldset = $form->addFieldset(\n 'general',\n array(\n 'legend' => $this->__('Coupon Selection')\n )\n );\n\n // Pull available coupon data to populate option list\n $rulesCollection = Mage::getModel('salesrule/rule')->getCollection();\n $counter = 1;\n\n // Iterate through each shopping cart rule\n foreach($rulesCollection as $rule) {\n $coupon = $rule->getCoupons();\n // Iterate through each coupon in the current iterated shopping cart rule\n foreach ($coupon as $coupons) {\n $options[] = array(\n 'label' => $coupon[$counter]['code'],\n 'value' => $coupon[$counter]['code'],\n );\n $counter++;\n }\n /* GET THE FUCK OUTTA HERE I FUCKIN SOLVED IT! HOLY FUCKIN SHIT */\n\n /**\n * So its better to use '$arr[] = value' to append values to an array then\n * array_push() because it won't make a function call to your code. $arr[]\n * is more performant\n */\n };\n\n // Add the fields we want to be editable\n $fieldset->addField('couponselect', 'multiselect', array(\n 'label' => Mage::helper('bricks_incentivize')->__('Coupons'),\n 'class' => 'required-entry',\n 'required' => true,\n 'name' => 'couponselect',\n 'values' => $options,\n 'disabled' => false,\n 'readonly' => true,\n 'after_element_html' => '<small>Choose one or more coupons to send to the user</small>',\n 'tabindex' => 1\n ));\n $fieldset->addField('sendcoupon', 'submit', array(\n 'label' => Mage::helper('bricks_incentivize')->__('Send Coupon'),\n 'required' => false,\n 'value' => 'Send Coupon',\n 'after_element_html' => '<small>Send coupon to the current users email</small>',\n 'tabindex' => 2\n ));\n\n //var_dump($this->getRequest()->getParam(\"couponselect\")); // So couponselects data is in $_POST, you just can't see it without dumping the data\n\n $couponSelectParam = $this->getRequest()->getParam(\"couponselect\");\n\n // Pull user and store data\n $idParam = $this->getRequest()->getParam('id'); // Get ID param value\n $incentivizeCustomer = Mage::getModel('incentivize/users')->load($idParam);\n\n $customerFirstname = $incentivizeCustomer->getFirstname(); // Pull customer firstname\n $customerLastname = $incentivizeCustomer->getLastname(); // Pull customer lastname\n $customerEmail = $incentivizeCustomer->getEmail(); // Pull user email address\n $store = Mage::app()->getStore(); // Why do I have to pull the store name in two steps?\n $storeName = $store->getName(); // Pull store name\n $storeEmail = Mage::getStoreConfig('trans_email/ident_general/email'); // Pull store general email\n\n // Now check if couponselect param has a value, if it does send an email\n if (isset($couponSelectParam)) {\n // Use a try and catch block for error checking\n try {\n // Load email template\n $emailTemplate = Mage::getModel('core/email_template')->loadDefault('incentivize_email_template');\n // Create variables to use inside the email template\n $emailTemplateVar = array(); // Declare the variable as an array first\n $emailTemplateVar['storeName'] = $storeName;\n $emailTemplateVar['firstName'] = $customerFirstname;\n $emailTemplateVar['lastName'] = $customerLastname;\n $emailTemplateVar['couponCodes'] = implode(\"<br/>\", $couponSelectParam); // Use implode to separate the elements of the array, convert to string, and add line breaks to the output\n // Now inject the variables into the template, and it will return the parsed content to be used in the email\n $processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVar);\n\n // Set $mail object settings (More in depth way of doing it - Keeping it for referential purposes)\n /*$mail = Mage::getModel('core/email')\n ->setName('bilaa')\n ->setToEmail('[email protected]')\n ->setBody($processedTemplate)\n ->setSubject('Subject :')\n ->setFromEmail('[email protected]')\n ->setFromName('bilaa')\n ->setType('html');*/\n // Send email\n // $mail->send();\n\n $emailTemplate->setSenderName($storeName);\n $emailTemplate->setSenderEmail($storeEmail); // This line MUST be included!\n $emailTemplate->setTemplateSubject($storeName . ' - You received a free coupon');\n // Send the email - Note: getProcessedTemplate is executed within send()\n $emailTemplate->send($customerEmail, $customerFirstname . \" \" . $customerLastname, $emailTemplateVar);\n\n // Output successful message\n Mage::getSingleton('core/session')->addSuccess('Coupon successfully emailed to user!');\n\n return true;\n\n } catch(Exception $error) {\n // If theres an error, output the error\n Mage::getSingleton('core/session')->addError($error->getMessage());\n return false;\n }\n }\n\n // Return the form\n return $this;\n }", "function acf_add_local_field($field, $prepared = \\false)\n{\n}", "public function extra_form_fields() {\n\t?>\n\t\t<tr valign=\"top\">\n\t\t\t<th scope=\"row\"><?php _e( 'Make slider featured randomly?', $this->textdomain ); ?></th>\n\t\t\t<td><input type=\"checkbox\" name=\"slider_featured\" value=\"1\" checked=\"checked\" /></td>\n\t\t</tr>\n\t<?php\n\t}", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n )\n );\n \n $this->setForm($form);\n $fieldset = $form->addFieldset('message_form', array('legend'=>Mage::helper('orderprocessing')->__('Message')));\n $fieldset->addField('id', 'hidden', array(\n 'name' => 'id',\n )\n );\n $fieldset->addField('created_at', 'label', array(\n 'label' => Mage::helper('orderprocessing')->__('Created_at'),\n 'name' => 'created_at',\n ));\n $fieldset->addField('message_type', 'label', array(\n 'label' => Mage::helper('orderprocessing')->__('Message type'),\n 'name' => 'message_type',\n ));\n $fieldset->addField('shop_order_id', 'label', array(\n 'label' => Mage::helper('orderprocessing')->__('Order Id'),\n 'name' => 'shop_order_id',\n ));\n $fieldset->addField('processed_at', 'label', array(\n 'label' => Mage::helper('orderprocessing')->__('Processed at'),\n 'name' => 'processed_at',\n ));\n $fieldset->addField('exception_log', 'textarea', array(\n 'label' => Mage::helper('orderprocessing')->__('Exception log'),\n 'style' => 'width: 1000px;',\n 'name' => 'exception_log',\n #'disabled' => true,\n ));\n $fieldset->addField('status_xml', 'select', array(\n 'label' => Mage::helper('orderprocessing')->__('Status'),\n 'name' => 'status_xml',\n 'values' => array(\n array(\n 'value' => 'open',\n 'label' => Mage::helper('orderprocessing')->__('open'),\n ),\n array(\n 'value' => 'complete',\n 'label' => Mage::helper('orderprocessing')->__('complete'),\n ),\n array(\n 'value' => 'error',\n 'label' => Mage::helper('orderprocessing')->__('error'),\n ),\n ),\n 'value' => 1,\n ));\n \n #$form->setAction($this->getUrl('*/adminhtml_brands/save'));\n #$form->setMethod('post');\n $form->setUseContainer(true);\n #$form->setId('edit_form');\n\n if($this->getRequest()->getParam('id')) {\n $id = $this->getRequest()->getParam('id');\n $data = Mage::getModel('orderprocessing/message')->load($id);\n $form->setValues($data->getData());\n \n }\n return parent::_prepareForm();\n }", "function init_form_fields() {\n /**\n * Build array of configurations that will be displayed on Admin Panel\n */\n parent::init_form_fields();\n WC_Midtrans_Utils::array_insert( $this->form_fields, 'enable_3d_secure', array(\n 'acquring_bank' => array(\n 'title' => __( 'Acquiring Bank', 'midtrans-woocommerce'),\n 'type' => 'text',\n 'label' => __( 'Acquiring Bank', 'midtrans-woocommerce' ),\n 'description' => __( 'You should leave it empty, it will be auto configured. </br> Alternatively may specify your card-payment acquiring bank for this payment option. </br> Options: BCA, BRI, DANAMON, MAYBANK, BNI, MANDIRI, CIMB, etc (Only choose 1 bank).' , 'midtrans-woocommerce' ),\n 'default' => ''\n )\n ));\n // Make this payment method enabled by default\n $this->form_fields['enabled']['default'] = 'yes';\n }", "protected function _prepareForm()\r\n {\r\n \t/* @var $model Lanot_EasyBanner_Model_Category */\r\n $model = $this->_getHelper()->getCategoryItemInstance();\r\n\r\n /**\r\n * Checking if user have permissions to save information\r\n */\r\n if (Mage::helper('lanot_easybanner/admin')->isActionAllowed('manage_category/save')) {\r\n $isElementDisabled = false;\r\n } else {\r\n $isElementDisabled = true;\r\n }\r\n\r\n $form = new Varien_Data_Form();\r\n\r\n $form->setHtmlIdPrefix('category_main_');\r\n\r\n $fieldset = $form->addFieldset('base_fieldset', array(\r\n 'legend' => $this->_getHelper()->__('Category Item Info')\r\n ));\r\n\r\n if ($model->getId()) {\r\n $fieldset->addField('category_id', 'hidden', array(\r\n 'name' => 'id',\r\n ));\r\n }\r\n\r\n //Add main elements to the category\r\n $fieldset->addField('title', 'text', array(\r\n 'name' => 'title',\r\n 'label' => $this->_getHelper()->__('Title'),\r\n 'title' => $this->_getHelper()->__('Title'),\r\n 'required' => true,\r\n 'disabled' => $isElementDisabled\r\n ));\r\n\r\n $fieldset->addField('description', 'textarea', array(\r\n \t'name' => 'description',\r\n \t'label' => $this->_getHelper()->__('Description'),\r\n \t'title' => $this->_getHelper()->__('Description'),\r\n \t'required' => false,\r\n \t'disabled' => $isElementDisabled,\r\n \t'style' => 'height: 100px',\t\r\n ));\r\n \r\n $fieldset->addField('is_active', 'select', array(\r\n \t'name' => 'is_active',\r\n \t'label' => $this->_getHelper()->__('Is Active'),\r\n \t'title' => $this->_getHelper()->__('Is Active'),\r\n \t'required' => true,\r\n \t'disabled' => $isElementDisabled,\r\n \t'options' => $model->getAvailableStatuses(),\r\n ));\r\n\r\n /*\r\n //Add layout updates elements to the category\r\n $lBlock = $this->getLayout()->createBlock('lanot_easybanner/adminhtml_widget_instance_edit_tab_main_layout');\r\n $fieldset = $form->addFieldset('layout_updates_fieldset', array(\r\n 'legend' => $this->_getHelper()->__('Layout Updates')\r\n ));\r\n\r\n $fieldset->addField('layout_updates', 'note', array());\r\n $form->getElement('layout_updates_fieldset')->setRenderer($lBlock);\r\n */\r\n\r\n $form->setValues($model->getData());\r\n \r\n Mage::dispatchEvent('adminhtml_easybanner_category_edit_tab_main_prepare_form', array('form' => $form));\r\n\r\n $this->setForm($form);\r\n\r\n return parent::_prepareForm();\r\n }", "public function init_form_fields() {\n\n\t\t\t$this->form_fields = array(\n\t\t\t\t'enabled' => array(\n\t\t\t\t\t'title' => __( 'Enable/Disable', 'storefront-child' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => __( 'Enable Gold Payment', 'storefront-child' ),\n\t\t\t\t\t'default' => 'yes'\n\t\t\t\t),\n\t\t\t\t'title' => array(\n\t\t\t\t\t'title' => __( 'Title', 'storefront-child' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'storefront-child' ),\n\t\t\t\t\t'default' => __( 'Gold Payment', 'storefront-child' ),\n\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t),\n\t\t\t\t'order_status' => array(\n\t\t\t\t\t'title' => __( 'Order Status', 'storefront-child' ),\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'class' => 'wc-enhanced-select',\n\t\t\t\t\t'description' => __( 'Choose whether status you wish after checkout.', 'storefront-child' ),\n\t\t\t\t\t'default' => 'wc-completed',\n\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t'options' => wc_get_order_statuses()\n\t\t\t\t),\n\t\t\t\t'description' => array(\n\t\t\t\t\t'title' => __( 'Description', 'storefront-child' ),\n\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t'description' => __( 'Payment method description that the customer will see on your checkout.', 'storefront-child' ),\n\t\t\t\t\t'default' => __( 'Payment Information', 'storefront-child' ),\n\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t),\n\t\t\t\t'instructions' => array(\n\t\t\t\t\t'title' => __( 'Instructions', 'storefront-child' ),\n\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t'description' => __( 'Instructions that will be added to the thank you page and emails.', 'storefront-child' ),\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t),\n\t\t\t);\n\t\t}", "public function init_form_fields() {\n\t\t\t$this->form_fields = array(\n\t\t\t\t\t// required plugin entries\n\t\t\t\t\t'enabled' => array(\n\t\t\t\t\t\t'title'=>__('Enable/disable', 'woocommerce'),\n\t\t\t\t\t\t'type'=>'checkbox',\n\t\t\t\t\t\t'label'=>__('Enable CoinSimple payments for woocommerce', 'woocommerce'),\n\t\t\t\t\t\t'default'=>'yes',\n\t\t\t\t\t\t),\n\t\t\t\t\t'notes'=>array(\n\t\t\t\t\t\t'title'=>__('Invoice Notes', 'woocommerce'),\n\t\t\t\t\t\t'type'=>'textarea',\n\t\t\t\t\t\t'placeholder'=>__('Replace this text with your message!', 'woocommerce'),\n\t\t\t\t\t\t'description'=>__('Message customer will see on the invoice', 'woocommerce'),\n\t\t\t\t\t\t'default'=>__('Thank you for using CoinSimple.', 'woocommerce'),\n\t\t\t\t\t\t'desc_tip'=>true,\n\t\t\t\t\t\t),\n\t\t\t\t\t'api_key'=>array(\n\t\t\t\t\t\t'title'=>__('API key', 'woocommerce'),\n\t\t\t\t\t\t'type'=>'text',\n\t\t\t\t\t\t'placeholder'=>__('Replace this text with your API key!', 'woocommerce'),\n\t\t\t\t\t\t'description'=>__('The API key can be found on the setting page of a business on CoinSimple.', 'woocommerce'),\n\t\t\t\t\t\t'desc_tip'=>true,\n\t\t\t\t\t\t),\n\t\t\t\t\t'redirect_url'=>array(\n\t\t\t\t\t\t\t'title'=>__('Redirect URL', 'woocommerce'),\n\t\t\t\t\t\t\t'type'=>'text',\n\t\t\t\t\t\t\t'placeholder'=>__('Replace this text with the redirect url', 'woocommerce'),\n\t\t\t\t\t\t\t'description'=>__('This is the page where the customer will be redirected to after payment', 'woocommerce'),\n\t\t\t\t\t\t\t'default'=> '',\n\t\t\t\t\t\t\t'desc_tip'=>true,\n\t\t\t\t\t\t),\n\t\t\t\t\t'business_id'=>array(\n\t\t\t\t\t\t'title'=>__('Business ID', 'woocommerce'),\n\t\t\t\t\t\t'type'=>'text',\n\t\t\t\t\t\t'placeholder'=>__('Replace this text with your Business ID!', 'woocommerce'),\n\t\t\t\t\t\t'description'=>__('The Business ID can be found on the setting page of a business on CoinSimple.', 'woocommerce'),\n\t\t\t\t\t\t'desc_tip'=>true,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t}", "abstract protected function _setNewForm();", "function acf_prepare_field($field)\n{\n}", "protected function _readFormFields() {}", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "function form_init_data()\r\n {\r\n $this->set_element_value(\"Swimmers\", FT_CREATE) ;\r\n $this->set_element_value(\"Swim Meets\", FT_CREATE) ;\r\n $this->set_element_value(\"Swim Teams\", FT_CREATE) ;\r\n }", "public function testPrepareForm()\n {\n $this->markTestIncomplete('This test has not been implemented yet.');\n }", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n // 'action' => $this->getUrl('*/*/courseOrder'),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n )\n );\n\n\n\n $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('adminhtml')->__('设置订单价格')));\n\n $fieldset->addField('money', 'text', array(\n 'name' => 'money',\n 'label' => Mage::helper('adminhtml')->__('设置价格'),\n 'value' => Mage::registry('current_order')->getFinancialMoney(),\n\n\n\n ));\n\n /* $fieldset->addField('startDate', 'text', array(\n 'name' => 'startDate',\n 'label' => Mage::helper('adminhtml')->__('开始日期'),\n 'title' => Mage::helper('adminhtml')->__('开始日期'),\n //'style' => 'width:600px;height:350px;',\n 'required' => true,\n 'after_element_html' => '<br/>请选择一个开始日期',\n )\n );\n\n $fieldset->addField('endtDate', 'text', array(\n 'name' => 'endtDate',\n 'label' => Mage::helper('adminhtml')->__('结束日期'),\n 'title' => Mage::helper('adminhtml')->__('结束日期'),\n //'style' => 'width:600px;height:350px;',\n 'required' => true,\n 'after_element_html' => '<br/>请选择一个开结束日期',\n )\n );*/\n /* $fieldset->addField('psubmit', 'submit', array(\n 'name' => 'psubmit',\n 'label' => '',\n 'value' => '检查数据',\n 'after_element_html' => '',\n )\n );*/\n // $form->setMethod('post');\n\n $form->setUseContainer(true);\n // $form->setAction(true);\n // $form->setEnctype('multipart/form-data');\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n\n }", "public function onPreSetData(FormEvent $event)\n {\n $this->form = $event->getForm();\n $user = $event->getData();\n\n if ($user && $user->getId() !== null) {\n\n // username field rebuilding\n $username = $this->getField(self::USERNAME);\n $usernameOptions = $username->getOptions();\n $usernameOptions['attr']['readonly'] = '';\n $this->rebuildField($username, $usernameOptions);\n\n // password field rebuilding\n $password = $this->getField(self::PASSWORD);\n $passwordOptions = $password->getOptions();\n $passwordOptions['required'] = false;\n $this->rebuildField($password, $passwordOptions);\n\n //$this->buildErrorInputs();\n }\n }" ]
[ "0.73237437", "0.72511697", "0.6938432", "0.67985356", "0.6775654", "0.6767052", "0.6766404", "0.67580056", "0.6753042", "0.6696634", "0.6693603", "0.66925764", "0.6690799", "0.66672605", "0.6639371", "0.6610207", "0.6603243", "0.65810496", "0.65748847", "0.65747625", "0.6573", "0.6552781", "0.6507599", "0.6494105", "0.6491603", "0.6486887", "0.64467156", "0.64310235", "0.6428705", "0.6425698", "0.64158005", "0.64110106", "0.6408969", "0.6405345", "0.63984686", "0.6389345", "0.63692397", "0.63405967", "0.6333171", "0.63326955", "0.63297766", "0.6324744", "0.63129675", "0.6308441", "0.6285651", "0.62775505", "0.62725914", "0.6261649", "0.6254208", "0.6239336", "0.62298846", "0.62282205", "0.62258214", "0.6211999", "0.6208275", "0.6201128", "0.6194457", "0.61849207", "0.6183761", "0.61753", "0.6172837", "0.616952", "0.6167059", "0.6155908", "0.61547756", "0.6150428", "0.61424476", "0.6139455", "0.6137272", "0.6130223", "0.6126363", "0.6123277", "0.61060625", "0.6104264", "0.608451", "0.6077774", "0.6071689", "0.606221", "0.6059347", "0.60572696", "0.6055018", "0.6052418", "0.6043637", "0.60423404", "0.60348916", "0.60288787", "0.6026781", "0.6024913", "0.6020828", "0.6019435", "0.60135925", "0.6007505", "0.6004132", "0.59971774", "0.5993643", "0.59912694", "0.59896237", "0.5989547", "0.59885484", "0.59863263", "0.59809244" ]
0.0
-1
Find out the component that we are integrating with
private function findOutComponent($context) { $component = null; switch ($context) { case 'com_content.article': $component = 'article'; break; case 'com_content.featured': $component = 'featured'; break; case 'com_content.category': $component = 'category'; break; } return $component; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getComponentImplementation();", "public function component()\n {\n return $this->component;\n }", "function getComponentName()\n {\n $p = get_class($this);\n\n $reflector = new ReflectionClass($p);\n $path = dirname($reflector->getFileName());\n\n $component = str_replace(BW_PATH_COMPONENTS . DS, '', $path);\n $component = str_replace(DS . 'models', '', $component);\n\n if (bwFolder::is(BW_PATH_COMPONENTS . DS . $component)) {\n return $component;\n } else {\n return NULL;\n }\n }", "public function get_registered_component( $name );", "public function getComponent()\n\t{\n\t\treturn $this->component;\n\t}", "public function get_component() : string\n {\n return $this->component;\n }", "function getComponent()\n {\n }", "public function getComponent()\n {\n $component = 'Magento_Ui/js/form/element/image-uploader';\n if (version_compare($this->magentoMetadata->getVersion(), '2.3.0', '<')) {\n $component = 'Magento_Ui/js/form/element/file-uploader';\n }\n\n return $component;\n }", "public function getComponent()\n {\n }", "public function get_component_name() {\n return $this->plugintype.'_'.$this->pluginname;\n }", "public function getComponentInterface()\n {\n return 'Nerrad\\\\WPCLI\\\\EE\\\\interfaces\\\\ComponentHas' . $this->type . 'Interface';\n }", "public function getComponentName(): string;", "function post_layouts_fll_get_plugin_component( $name, $args ) {\r\n return require( COMPONENTS . \"/$name.php\" );\r\n}", "public function getComponentClass()\n {\n return $this->_componentClass;\n }", "public function getComponent($name);", "public function getComponentName()\n {\n return $this->_componentName;\n }", "public function getComponentByName($name);", "abstract protected function get_plugin_components();", "public function loadComponent()\r\n {\r\n return $this->selectVersion($this->currentVersion);\r\n }", "public function getIsComponent()\n {\n return $this->_blIsComponent;\n }", "public function getComponentName()\n {\n $component = $this->argument('component') ?: app('components')->getUsedNow();\n\n $component = app('components')->findOrFail($component);\n\n return $component->getStudlyName();\n }", "public function getComponent($name) {\n return $this->components[$name];\n }", "function kleo_bp_get_component_id() {\n $current_page_id = NULL;\n $page_array = get_option('bp-pages');\n\n if (bp_is_register_page()) { /* register page */\n $current_page_id = $page_array['register'];\n } elseif( bp_is_members_component() || bp_is_user() ) { /* members component */\n $current_page_id = $page_array['members'];\n } elseif ( bp_is_activity_directory() ) { /* activity directory */\n $current_page_id = $page_array['activity'];\n } elseif ( bp_is_groups_directory() || bp_is_group_single() ) { /* groups directory */\n $current_page_id = $page_array['groups'];\n } elseif ( bp_is_activation_page() ) { /* activation page */\n $current_page_id = $page_array['activate'];\n }\n return $current_page_id;\n}", "public function getActiveComponent(): string\n {\n return $this->rule->getComponent($this->dotIndex);\n }", "public function getIssueOfComponent() {\n return $this->issueOfComponent;\n }", "public function providerGetComponentName()\n {\n return array(\n array('components/jquery', array(), 'jquery'),\n array('components/jquery', array('name' => 'myownjquery'), 'myownjquery'),\n array('jquery', array(), 'jquery'),\n );\n }", "public function getComponent($name) {\n\t\treturn $this->registry->get($name);\n\t}", "public function get_component() {\n return \"dataformview_$this->type\";\n }", "public function component_info() {\n \n // Load the component's language files\n $this->CI->lang->load( 'frontend', $this->CI->config->item('language'), FALSE, TRUE, MIDRUB_BASE_ADMIN_FRONTEND );\n \n // Return component information\n return array(\n 'app_name' => $this->CI->lang->line('frontend'),\n 'display_app_name' => $this->CI->lang->line('frontend'),\n 'component_slug' => 'frontend',\n 'component_icon' => '<i class=\"far fa-edit\"></i>',\n 'version' => '0.0.1',\n 'required_version' => '0.0.7.8'\n );\n \n }", "public function isInstalled()\n\t{\n\t\t$db = JFactory::getDBO();\n\t\t$q = sprintf(\"SELECT * FROM jos_components WHERE parent = 0 AND `option` LIKE 'com_%s' LIMIT 1\",str_replace('_','',$this->name));\n\t\t$db->execute($q);\n\t\treturn ($object = $db->loadObject()) ? $object->id : false;\n\t}", "public function current() {\n return current($this->components);\n }", "function humcore_deposit_component_include() {\n\n\trequire( dirname( __FILE__ ) . '/component-loader.php' );\n\n}", "public function getComponent()\n {\n return $this->hasOne(Component::className(), ['id' => 'component_id']);\n }", "public function testComponentReturnsNullForUnknownComponent() {\n $node = self::nodeStub();\n $webform = new Webform($node);\n $this->assertNull($webform->component(12));\n }", "function getComponent($id) \n\t{\n\t\t$db\t=& JFactory::getDBO();\n\t\t// Joomla! 1.5\n\t\tif (WF_JOOMLA15) {\n\t\t\t$query = 'SELECT * FROM #__components'\n\t\t\t. ' WHERE id = '.(int) $id\n\t\t\t;\n\t\t\t$db->setQuery($query);\n\t\t\treturn $db->loadObject();\n\t\t\t// Joomla! 1.6\n\t\t} else {\n\t\t\t$query = 'SELECT * FROM #__extensions'\n\t\t\t. ' WHERE extension_id = '.(int) $id\n\t\t\t. ' AND type = '. $db->Quote('component')\n\t\t\t;\n\t\t\t$db->setQuery($query);\n\t\t\t\n\t\t\t$component = $db->loadObject();\n\t\t\t$component->option = $component->element;\n\t\t\t\n\t\t\treturn $component;\n\t\t}\n\t}", "public function getComponent($name) {\n if(!isset($this->components[$name])) throw new Exception(\"Component $name not exists\");\n\n return $this->components[$name];\n }", "public function component()\n {\n return 'quick-works-card';\n }", "private function getSharedComponent() {\n\t\t$activeSheet = $this->getActiveSheet();\n\t\t$selectedCell = $activeSheet->getActiveCell();\n\n\t\tif ($activeSheet->cellExists($selectedCell)) {\n\t\t\t$xfIndex = $activeSheet->getCell($selectedCell)->getXfIndex();\n\t\t} else {\n\t\t\t$xfIndex = 0;\n\t\t}\n\n\t\treturn $this->workbook->getCellXfByIndex($xfIndex);\n\t}", "public function getComponent() {\r\n\t\t$parameters = func_get_args();\r\n\t\tif (count($paramters) < 1) {\r\n\t\t\tthrow new tx_auxo_exception('component parameter is missing');\r\n\t\t}\r\n\t\t\r\n\t\t$path = sprintf('%s/class.tx_%s.php', $this->interfaceLibraryPath, $this->interfaceExtension, $parameters[0]);\r\n\t\tif (!is_readable($path)) {\r\n\t\t\tthrow new tx_auxo_presentationException(sprintf('presentation component %s not supported', $parameters[0]));\r\n\t\t}\r\n\t\t\r\n\t\t$className = 'tx_' . $this->interfaceExtension . '_' . $parameters[0];\r\n\t\tunset($parameters[0]);\r\n\t\t\r\n\t\trequire_once($path);\r\n\t\t\r\n\t\tif (!class_exists($className)) {\r\n\t\t\tthrow new tx_auxo_presentationException(sprintf('presentation class %s is missing', $className));\r\n\t\t}\r\n\t\t\r\n\t\t$object = new $className();\r\n\t\t\r\n\t\tif (method_exists($object, '__construct')) {\r\n\t\t\treturn call_user_func_array($object, '__construct', $parameters);\r\n\t\t}\r\n\t\t\r\n\t\treturn $object;\r\n\t}", "public function get_component_name() {\n return 'user';\n }", "public static function getAllComponents()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true)\n\t\t\t->select('element')\n\t\t\t->from('#__extensions')\n\t\t\t->where('type = ' . $db->quote('component'))\n\t\t\t->where('enabled = 1');\n\t\t$db->setQuery($query);\n\t\t$result = $db->loadColumn();\n\n\t\treturn $result;\n\t}", "public function getComponents() {\n return $this->components;\n }", "public function getContainedPluginInstance();", "public function getComponentNameSpace(): string\n {\n if ($this->namespace === null) {\n return Arr::get($this->component->getComponentNameSpace(), 'component');\n }\n\n return $this->namespace;\n }", "public function getComponents();", "public function getComponents();", "public function getComponent(string $type): IComponent;", "public function testComponentReturnsComponentArray() {\n $node = self::nodeStub();\n $webform = new Webform($node);\n $component = $webform->component(6);\n $this->assertEqual('email_subject', $component['form_key']);\n }", "function culturefeed_get_facet_component() {\n if ($type = culturefeed_get_searchable_type_by_path()) {\n $page = culturefeed_get_search_page($type);\n return $page->getFacetComponent();\n }\n return FALSE;\n}", "public function componentName()\n {\n return 'config';\n }", "public function component(): string\n {\n return 'custom-text-card';\n }", "public function register_component( sn\\base\\component\\I_Component $component );", "function readComponents() { return $this->components; }", "public function component()\n {\n return 'cards-latest-updates';\n }", "public function getPlugin();", "public function getPlugin();", "protected function componentDoesNotExist() : bool\n\t{\n\t\treturn ! method_exists($this->className(), $this->component);\n\t}", "public function getComponent()\n {\n return $this->hasOne(Component::class, ['id' => 'component_id']);\n }", "function tep_browser_detect($component) {\n\tglobal $HTTP_USER_AGENT;\n\treturn stristr($HTTP_USER_AGENT, $component);\n}", "private function getComponent($name, $type = '')\n\t{\n\t\t$c_name = ucfirst($name) . ($type ? '_' . $type : '') . '_Component';\n\n\t\tif ($type == '')\n\t\t\t$c_type = 'default';\n\t\telse\n\t\t\t$c_type = strtolower($type);\n\n\t\tif (!isset(self::$m_components[$c_type]))\n\t\t\tself::$m_components[$c_type] = array();\n\n\t\tif (isset(self::$m_components[$c_type][$name]))\n\t\t\treturn self::$m_components[$c_type][$name];\n\n\t\t//TODO: Try to check class file existence before create instance of class.\n\t\t//If this will be implemented, we'll can safely handle controller errors (404).\n\n\t\t$c_name = str_replace('-', '', $c_name);\n\t\t$component = new $c_name($c_name, $this->core); // \n\n\t\t$this->addComponent($name, $c_type, $component);\n\n\t\treturn $component->initialize()->setInitialized(true);\n\t}", "public function provides()\n {\n return ['components'];\n }", "public function getContainedPluginId();", "public function component()\n {\n return $this->morphTo();\n }", "public static function getAll(){\n\t\treturn self::$components;\n\t}", "public function getViewComponent();", "public function component()\n {\n return 'resource-header-card';\n }", "function getCatalogInventoryHelper() {\n\t\t\treturn $this->getWarehouseHelper( )->getCatalogInventoryHelper( );\n\t\t}", "public function getComponents(): array\n {\n return $this->components;\n }", "protected function getComponent($component)\n\t{\n\t\tif (!Yii::app() instanceof CWebApplication) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ($instance = Yii::app()->getComponent($component)) {\n\t\t\treturn $instance;\n\t\t}\n\n\t\treturn null;\n\t}", "public function getComponents () : array\n {\n return $this->components;\n }", "public function componentDetails()\n {\n return[\n 'name' => 'Logo',\n 'description' => ' Logo'\n ];\n }", "public function getComponentPath()\n {\n return empty($this->aframe_component_path) ? $this->setComponentPath() : $this->aframe_component_path;\n }", "function getHtmlComponents() {\n return $this->components;\n }", "function getIsSubcomponent() {\n\t\treturn false;\n\t}", "public function component($component, $mode = '') {\n\n\t\t//force mode alows to load components for ALL extensions to bypass extension enabled only status\n\t\t//This might be helpful in storefront. In admin all installed extenions are available \n\t\t$force = '';\n\t\tif ($mode == 'force') {\n\t\t\t$force = 'all';\n\t\t}\n\t\t\n\t\t$section = DIR_ROOT . '/common/';\n\t\t\n $file = $section . 'component/' . $component . '.php';\n if ( $this->registry->has('extensions') && $result = $this->extensions->isExtensionResource('M', $component, $force, $mode) ) {\n if ( is_file($file) ) {\n $warning = new AWarning(\"Extension <b>{$result['extension']}</b> override component <b>$component</b>\" );\n $warning->toDebug();\n }\n $file = $result['file'];\n }\n\n\t\t$class = 'Component' . preg_replace('/[^a-zA-Z0-9]/', '', $component);\n\t\t$obj_name = 'component_' . str_replace('/', '_', $component);\n\n\t\t//if modal is loaded return it back \n\t\tif ( is_object($this->registry->get($obj_name) )) {\n\t\t\treturn $this->registry->get($obj_name);\n\t\t} else if (file_exists($file)) {\n\t\t\tinclude_once($file);\n\t\t\t$this->registry->set($obj_name, new $class($this->registry));\n\t\t\treturn $this->registry->get($obj_name);\n\t\t} else if ( $mode != 'silent' ) {\n\t\t\t$backtrace = debug_backtrace();\n\t\t \t$file_info = $backtrace[ 0 ][ 'file' ] . ' on line ' . $backtrace[ 0 ][ 'line' ];\n\t\t\tthrow new AException(AC_ERR_LOAD, 'Error: Could not load component ' . $component . ' from ' . $file_info);\n return false;\n\t\t} else {\n return false;\n }\n\t}", "public function getComponent()\n {\n return $this->hasOne(Asset::className(), ['id' => 'component_id']);\n }", "public function component_info() {\n return array(\n 'name' => 'Accessibility Content Utility',\n 'description' => 'Add utility functions to Content for Accessibility',\n 'category' => 'accessibility',\n );\n }", "public function getPluginName() {}", "public function getParentPluginName() {}", "public function getVendor()\n {\n return $this->_coreRegistry->registry('current_vendor');\n }", "public function registerComponents()\n {\n return []; // Remove this line to activate\n\n return [\n 'Gency\\Slack\\Components\\MyComponent' => 'myComponent',\n ];\n }", "public function Component($component,$type){\r\n $fullpath=cf(\"BASE/MVCPATH\").$type.DS.\"components\".DS.ucwords($component).EXT;\r\n if($this->Load($fullpath)){\r\n return new $component();\r\n }\r\n else {\r\n return null;\r\n } \r\n }", "public function getUiComponentFactory();", "public function getContainer()\n {\n return $this->getModule()->getContainer();\n }", "function &_getPlugin() {\n\t\t$plugin =& PluginRegistry::getPlugin('generic', OAS_PLUGIN_NAME);\n\t\treturn $plugin;\n\t}", "protected function getModuleComponents() {\n\t return [\n\t ];\n\t}", "function &getComponent( $name, $strict = false )\n\t{\n\t\t$result = null;\n\t\t$components = JComponentHelper::_load();\n\n\t\tif (isset( $components[$name] ))\n\t\t{\n\t\t\t$result = &$components[$name];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result\t\t\t\t= new stdClass();\n\t\t\t$result->enabled\t= $strict ? false : true;\n\t\t\t$result->params\t\t= null;\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getInjector() {\n\t\t// Does this component have an injector?\n\t\tif ( Injector::isInjector( $this -> injector ) ) {\n\t\t\treturn $this -> injector;\n\t\t} else {\n\t\t\t// Get parent\n\t\t\t$parent\t=&\t$this -> getParent();\n\n\t\t\t// Does parent have an injector?\n\t\t\treturn\tisset( $parent ) && Injector::isInjector( $parent -> getInjector() )\n\t\t\t\t?\t$parent -> getInjector()\n\t\t\t// Fallback to default injector\n\t\t\t\t:\tself::defaultInjector();\n\t\t}\n\t}", "public static function componentExist($component)\n {\n return isset(self::$commands[$component]);\n }", "public function getValidateComponent(): ValidateComponentInterface\n {\n return $this->validateComponent;\n }", "public function getComponent( $abstract ) {\n\t\treturn $this->components[ $abstract ];\n\t}", "public function get_name() {\n if(get_config(constants::M_COMPONENT,'customname')){\n return get_config(constants::M_COMPONENT,'customname');\n }else {\n return get_string('pluginname', constants::M_COMPONENT);\n }\n }", "private static function get_components_having_css() {\r\n\t\t$ret = self::get_all_widgets();\r\n\t\t$ret[] = self::FEATURE_RESIZABLE;\r\n\t\t$ret[] = self::FEATURE_SELECTABLE;\r\n\t\treturn $ret;\r\n\t}", "function getComponentFromURL($url, $component){\n\t$url_parts = parse_url($url);\n\tif($url_parts !== false && isset($url_parts[$component])){\n\t\treturn $url_parts[$component];\n\t}\n\n\treturn false;\n}", "protected function registerExtDirectComponents() {}", "public function getComponentKey();", "public function getVendorPackageService() {\n\t\treturn $this->get('sly-service-package-vendor');\n\t}", "function loadComponent($component) {\n\tglobal $_base;\n\n\t$component = \"./include/core/\" . $component . \".php\";\n\t// component exists?\n\tif (file_exists($component)) {\n\t\trequire_once($component);\n\t}\n}", "public function get_component() {\n $file_types = json_encode($this->file_types);\n $is_image = json_encode($this->is_image);\n $image_dimensions = json_encode($this->image_dimensions);\n $error_tooltip = $this->error_message ? new Tooltip([\n \"content\" => $this->error_message,\n \"focus\" => $this->label,\n \"is_error\" => true,\n \"position\" => \"bottom\",\n \"\"\n ]) : \"$this->label\";\n $this->label_classes .= \"label\";\n \n return \"\n <div {$this->class()}>\n <div class=\\\"label_container\\\">\n <label>\n <input\n class=\\\"file_upload\\\"\n type=\\\"file\\\"\n {$this->id()}\n name=\\\"$this->name\\\"\n data-file-types='$file_types'\n data-file-size=\\\"$this->file_size\\\"\n data-is-image='$is_image'\n data-image-dimensions='$image_dimensions'\n data-validation=\\\"true\\\"\n />\n <div class=\\\"value_text\\\">\n <div>\n <span>None Selected</span>\n <i class=\\\"fa fa-upload\\\" aria-hidden=\\\"true\\\"></i>\n </div>\n </div>\n </label>\n </div>\n <div {$this->label_class()} {$this->required()}>\n $error_tooltip\n </div>\n </div>\n \";\n }", "public function registerComponents()\n {\n return []; // Remove this line to activate\n\n return [\n 'Media1\\MightySeoPlus\\Components\\MyComponent' => 'myComponent',\n ];\n }" ]
[ "0.69335926", "0.68826085", "0.68071604", "0.6785194", "0.6765853", "0.67071277", "0.66711885", "0.66655177", "0.6653527", "0.6510271", "0.64143026", "0.63449496", "0.62314475", "0.6209189", "0.6167782", "0.6112368", "0.60868937", "0.60348946", "0.60175943", "0.6013549", "0.59846526", "0.58824784", "0.58406156", "0.58264637", "0.5819596", "0.58107996", "0.58094025", "0.5785111", "0.5753084", "0.57427514", "0.5729134", "0.569967", "0.56994987", "0.56810534", "0.5655101", "0.56321573", "0.5603598", "0.5597525", "0.5547931", "0.5536517", "0.5482427", "0.5482077", "0.54757273", "0.5473943", "0.5471216", "0.5471216", "0.5468466", "0.54652333", "0.54593533", "0.54506487", "0.54267675", "0.541956", "0.5416169", "0.5396905", "0.5360028", "0.5360028", "0.5359427", "0.5355106", "0.5309938", "0.5308732", "0.5302008", "0.5290885", "0.52798134", "0.52733314", "0.52534276", "0.52503854", "0.52356863", "0.5228591", "0.52266717", "0.52252865", "0.5219284", "0.52165", "0.51976126", "0.5187775", "0.5179653", "0.5176444", "0.5137772", "0.5128629", "0.5124202", "0.5117942", "0.5116827", "0.50888807", "0.5084068", "0.50835395", "0.5077096", "0.50715977", "0.50677097", "0.50661725", "0.50625074", "0.506079", "0.50458276", "0.5041638", "0.50335115", "0.5029971", "0.5018457", "0.49974856", "0.49891508", "0.49879596", "0.49842218", "0.49840605" ]
0.6282652
12
Returns 1, 0, or 1 for left wins, draw, or right wins
function compare_cards($lhs, $rhs) { // Ignore the suit $lhs = substr($lhs, 1); $rhs = substr($rhs, 1); // Elevate the Aces if($lhs == 1) $lhs = 1000; if($rhs == 1) $rhs = 1000; // Spaceships! // Pew pew pew // and you said you'd never found a use for them... return $lhs <=> $rhs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkForWinState() {\n $squares = $this->buildSquaresArray();\n foreach($this->winConditions as $strike => $cond) {\n if($this->conditionMet($cond, $squares)) {\n $this->winner = $squares[$cond[0]];\n $this->strike = $strike;\n $this->save();\n }\n }\n\n //check for Draw\n if($this->isDraw($squares)) {\n $this->winner = 'd';\n $this->save();\n }\n }", "public function getWinner(){\n $this->game->UpdateStatus();\n if ($this->game->getWinner()!=$this->game->get_current_turn()){\n return false;\n }else{\n return true;\n }\n }", "public function getWinner()\r\n {\r\n// todo\r\n $p = $this->pieces;\r\n $i=0;\r\n //check the rows for winner\r\n for($i=0;$i<self::ROWS;$i++)\r\n {\r\n if(($p[$i][0] == $p[$i][1]) && ($p[$i][1] == $p[$i][2]) && $p[$i][0] != '')\r\n {\r\n if($p[$i][0] == 'O')\r\n\t\t\t{\r\n\t\t\t\treturn 'O';\r\n\t\t\t}\r\n else\r\n\t\t\t{\r\n\t\t\t\treturn 'X';\r\n\t\t\t}\r\n }\r\n }\r\n\r\n //check the columns for winner\r\n for($j=0;$j<self::ROWS;$j++)\r\n {\r\n if(($p[0][$j] == $p[1][$j]) && ($p[1][$j] == $p[2][$j]) && $p[0][$j] != '')\r\n {\r\n if($p[0][$j] == 'O')\r\n \t{\r\n\t\t\t\treturn 'O';\r\n\t\t\t}\r\n else\r\n\t\t\t{\r\n \t\treturn 'X';\r\n\r\n\t\t\t}\r\n }\r\n\r\n }\r\n\r\n //check the diagonals for winner\r\n if(($p[0][0]==$p[1][1] && $p[1][1] == $p[2][2] && $p[0][0] != '') || ($p[0][2] == $p[1][1] && $p[1][1] == $p[2][0] && $p[0][2] != ''))\r\n {\r\n if($p[1][1] == 'O')\r\n\t\t{\r\n\t\t\treturn 'O';\r\n\t\t}\r\n else\r\n\t\t{\r\n \t\treturn 'X';\r\n\r\n\t\t}\r\n }\r\n return -1; //return -1, keep playing\r\n }", "abstract public function winner();", "public function testCheckWinner()\n {\n $gamestate = $this->game->getGamestate();\n $this->game->holdHand();\n $this->assertNull($gamestate[\"hasWon\"]);\n\n $gamestate[\"active\"]->addPoints(100);\n $exp = $gamestate[\"active\"];\n $this->game->holdHand();\n\n $gamestate = $this->game->getGamestate();\n $this->assertEquals($exp, $gamestate[\"hasWon\"]);\n }", "public function testCheckWinner()\n {\n $rawBoard = [2,2,1,0,1,1,2,2,2];\n $feedback = [0=>8, 1=>1, 2=>6, 3=>3, 4=>5, 5=>7, 6=>4, 7=>9, 8=>2];\n $formatedBoardRow = 0;\n foreach ($feedback as $index=>$value) {\n if ($index%3==0) {\n $formatedBoardRow++;\n }\n if ($rawBoard[$index] == 1) {\n $formatedBoard[$formatedBoardRow][$value] = \"X\";\n }\n if ($rawBoard[$index] == 2) {\n $formatedBoard[$formatedBoardRow][$value] = \"O\";\n }\n }\n $this->_board = $formatedBoard;\n\n $playerOneAnswers = [];\n $playerTwoAnswers = [];\n foreach ($this->_board as $boardIndex => $boardRow) {\n foreach ($boardRow as $boardRowIndex => $boardRowValue) {\n if ($boardRowValue == \"X\") {\n $this->_scorePlayerOne += $boardRowIndex;\n $playerOneAnswers[] = $boardRowIndex;\n }\n if ($boardRowValue == \"O\") {\n $this->_scorePlayerTwo += $boardRowIndex;\n $playerTwoAnswers[] = $boardRowIndex;\n }\n }\n }\n\n $whoHasWon = 0;\n if ($this->_scorePlayerOne == 15) {\n $whoHasWon = 1;\n }\n\n if ($this->_scorePlayerTwo == 15) {\n $whoHasWon = 2;\n }\n\n if ($whoHasWon == 0) {\n foreach ($this->_winningConditions as $winningCondition) {\n $playerOneMatchResult = array_intersect(\n $playerOneAnswers, $winningCondition\n );\n if (count($playerOneMatchResult) ==3) {\n $whoHasWon = 1;\n }\n\n $playerTwoMatchResult = array_intersect(\n $playerTwoAnswers, $winningCondition\n );\n if (count($playerTwoMatchResult) ==3) {\n $whoHasWon = 2;\n }\n }\n }\n\n //$this->assertGreaterThan($this->_maxScore, $this->_scorePlayerOne);\n //$this->assertEquals($this->_scorePlayerTwo, 10);\n\n $this->assertNotEquals(1, $whoHasWon);\n $this->assertEquals(2, $whoHasWon);\n }", "public function isWin() {\n\t\tif ($_SESSION['game']->getState()==\"correct\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function checkWinner($game) {\n\tglobal $message ;\n\t$winner = \"999\";\n\t$board = $game[\"board\"];\n\t$cellClicked = $game[\"clicked\"];\n\tif ($game[\"clicked\"] !== 9) {\n\t\tsettype($cellClicked, \"string\");\n\t\t$winCombo = array(\"012\",\"345\",\"678\",\"036\",\"147\",\"258\",\"840\",\"246\");\n\t\tfor( $row = 0; $row < 8; $row++ ) {\t\n\t\t\t// identify which row, column, and diag has been changed by current selection\n\t\t\t$idx = ($cellClicked < 9) \n\t\t\t\t? substr_count($winCombo[$row], $cellClicked)\n\t\t\t\t: -1;\n\t\t\t// test only the changed row, columns, and diags\n\t\t\tif ($idx == 1) { \n\t\t\t\tif ( $board[$winCombo[$row][0]] == $board[$winCombo[$row][1]] && \n\t\t\t\t\t $board[$winCombo[$row][1]] == $board[$winCombo[$row][2]] ) \t{\t\n\t\t\t\t\t\t$game[\"winningCombo\"] = $board[$winCombo[$row][0]];\n\t\t\t\t\t\t$winner = $winCombo[$row];\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\n\t\tif ($game[\"winningCombo\"] != -1) {\n\t\t\t$message = substr($game[\"playToken\"],$game[\"winningCombo\"],1) . \" wins\";\n\t\t}\n\t\telseif (count_chars($board,3) == \"01\") {\n\t\t\t$message = \"Game over. No winner\";\n\t\t}\n\t} \n\treturn $winner;\n}", "public function testCheckNoWinner()\n {\n $this->_board[0][8] = \"O\";\n $this->_board[0][1] = \"O\";\n $this->_board[0][6] = \"X\";\n $this->_board[1][5] = \"X\";\n $this->_board[1][7] = \"X\";\n $this->_board[2][9] = \"O\";\n $this->_board[2][2] = \"O\";\n\n $playerOneAnswers = [];\n $playerTwoAnswers = [];\n foreach ($this->_board as $boardIndex => $boardRow) {\n foreach ($boardRow as $boardRowIndex => $boardRowValue) {\n if ($boardRowValue == \"X\") {\n $this->_scorePlayerOne += $boardRowIndex;\n $playerOneAnswers[] = $boardRowIndex;\n }\n if ($boardRowValue == \"O\") {\n $this->_scorePlayerTwo += $boardRowIndex;\n $playerTwoAnswers[] = $boardRowIndex;\n }\n }\n }\n\n $whoHasWon = 0;\n if ($this->_scorePlayerOne == 15) {\n $whoHasWon = 1;\n }\n\n if ($this->_scorePlayerTwo == 15) {\n $whoHasWon = 2;\n }\n\n if ($whoHasWon == 0) {\n foreach ($this->_winningConditions as $winningCondition) {\n\n $playerOneMatchResult = array_intersect(\n $playerOneAnswers, $winningCondition\n );\n if (count($playerOneMatchResult) ==3) {\n $whoHasWon = 1;\n }\n\n $playerTwoMatchResult = array_intersect(\n $playerTwoAnswers, $winningCondition\n );\n if (count($playerTwoMatchResult) ==3) {\n $whoHasWon = 2;\n }\n }\n }\n\n $this->assertNotEquals(1, $whoHasWon);\n $this->assertNotEquals(2, $whoHasWon);\n }", "public function checkForWinner($playerOne, $playerTwo){\n if(($playerOne == 1 && $playerTwo == 2) || ($playerOne == 2 && $playerTwo == 3 || ($playerOne == 3 && $playerTwo == 1))){\n $this->printResult($playerOne, $playerTwo, 1);\n return 1;\n }elseif(($playerOne == 1 && $playerTwo == 1) || ($playerOne == 2 && $playerTwo == 2) || ($playerOne == 3 && $playerTwo == 3)){\n $this->printResult($playerOne, $playerTwo, 2);\n return 2;\n }else{\n $this->printResult($playerOne, $playerTwo, 3);\n return 3;\n }\n}", "public function winRound() {\n\n\t\t$this->points++;\n\n\t\t$this->output($this->name.' has won this round');\n\t}", "public function getWins()\n {\n return $this->wins;\n }", "function isOver()\n\t{\n\t\tif ($this->won)\n\t\t\treturn true;\n\t\t\t\n\t\tif ($this->over)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "public function checkForWin() \n\t{\n\n\t\t$score = array_intersect($this->phrase->selected, $this->phrase->getLetters());\n\n\t\tif (count($score) == count($this->phrase->getLetters())) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "abstract protected function winnerExists();", "function isDraw($winningspots, $spots) {\n\t\t$impossibleStates = 0;\n\t\tforeach($winningspots as $winstate) {\n\t\t\t$countX = 0;\n\t\t\t$countO = 0;\n\t\t\tforeach ($winstate as $wincell) {\n\t\t\t\tif($spots[$wincell] == \"x\") {\n\t\t\t\t\t$countX++;\n\t\t\t\t} else if($spots[$wincell] == \"o\") {\n\t\t\t\t\t$countO++;\n\t\t\t\t}\n\t\t\t\tif ($countX > 0 && $countO > 0) {\n\t\t\t\t\t$impossibleStates++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ($impossibleStates == count($winningspots));\n\t}", "private function decideVictory()\n {\n echo 'Jugador ';\n if (!$this->human->isOver() &&\n (\n ($this->human->getPoints() == $this->machine->getPoints() && $this->human->getPoints() != PLAYER_WIN_POINTS)\n || $this->human->getPoints() > $this->machine->getPoints()\n || $this->machine->isOver()\n )\n ) echo 'Humano';\n else echo 'Máquina';\n echo ' gana la partida. ';\n }", "private function determineWhoseTurn()\n {\n $query = \"SELECT player, event_value FROM events\n WHERE game_id = ? AND event_type = 'shot' ORDER BY id DESC LIMIT 1\";\n $result = $this->oDB->getFirst($query, array($this->oData->getIdGames()));\n\n if (empty($result)) {\n $whoseTurn = 1;\n } elseif ($result['player'] == $this->oData->getPlayerNumber()) {\n $whoseTurn = in_array($result['event_value'], $this->oData->getOtherShips())\n ? $this->oData->getPlayerNumber() : $this->oData->getOtherNumber();\n } else {\n $whoseTurn = in_array($result['event_value'], $this->oData->getPlayerShips())\n ? $this->oData->getOtherNumber() : $this->oData->getPlayerNumber();\n }\n\n $this->oData->setWhoseTurn($whoseTurn);\n }", "public function getWinner() {\n if($this->winnerType == \"draw\") {\n return \"draw\";\n } elseif($this->winnerID == $this->combatantAID && $this->winnerType == \"player\") {\n return $this->combatantA;\n } else {\n return $this->combatantB;\n }\n }", "public function isWinner() {\n\t\t$winner = null;\n\t\t$rule = $this->getRule(); // note: rule is required for matches\n\t\tif($rule->rule_type == Rule::TYPE_MATCHPLAY) {\n\t\t\t// Get opponent scorecard\n\t\t\tif($opponent = $this->getOpponent()) {\n\t\t\t\tif($opponent_scorecard = $opponent->getScorecard()) {\n\t\t\t\t\t$this_total = $this->points_total($rule->handicap);\n\t\t\t\t\t$opponent_total = $opponent_scorecard->points_total($rule->handicap);\n\t\t\t\t\t//Yii::trace('tie:'.$this->tie_break.'vs.'.$opponent_scorecard->tie_break, 'Scorecard::isWinner');\n\t\t\t\t\t$winner = ($this_total > $opponent_total) ?\n\t\t\t\t\t\t\t\ttrue :\n\t\t\t\t\t\t\t\t($opponent_total > $this_total ?\n\t\t\t\t\t\t\t\t\tfalse :\n\t\t\t\t\t\t\t\t\t($this->tie_break > $opponent_scorecard->tie_break ?\n\t\t\t\t\t\t\t\t\t\ttrue :\n\t\t\t\t\t\t\t\t\t\t($this->tie_break < $opponent_scorecard->tie_break ?\n\t\t\t\t\t\t\t\t\t\t\tfalse :\n\t\t\t\t\t\t\t\t\t\t\tnull)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Yii::trace('return:'.($winner ? 't' : 'f'), 'Scorecard::isWinner');\n\t\treturn $winner;\n\t}", "public function checkWin() {\n\n $data = $this->getDeathRecord();\n $data = array_map(function($d) {\n return $d[key($d)];\n }, $data);\n\n if ($data) {\n if (in_array(\"FARMER\", $data)) {\n return FALSE;\n }\n if (in_array(\"COW_1\", $data) && in_array(\"COW_2\", $data)) {\n return FALSE;\n }\n if (in_array(\"BUNNY_1\", $data) && in_array(\"BUNNY_2\", $data) && in_array(\"BUNNY_4\", $data) && in_array(\"BUNNY_4\", $data)) {\n return FALSE;\n }\n }\n return true;\n }", "public function gameOver() : bool\n {\n return $this->cpu->totalScore() >= 100 || $this->player->totalScore() >= 100;\n }", "function rpc ($p1, $p2) {\n if ($p1 === $p2) {\n \t$result = 'Draw!';\n } elseif (($p1 == 'scissors' && $p2 == 'paper') || ($p1 == 'paper' && $p2 == 'rock') || ($p1 == 'rock' && $p2 == 'scissors')) {\n \t$result = 'Player 1 won!';\n } elseif (($p2 == 'scissors' && $p1 == 'paper') || ($p2 == 'paper' && $p1 == 'rock') || ($p2 == 'rock' && $p1 == 'scissors')) {\n \t$result = 'Player 2 won!';\n }\n return $result;\n}", "abstract protected function isGameOver();", "public function gameWon()\n {\n return $this->countStones() === 1;\n }", "public function isDraw()\n {\n return !$this->hasAvailableMoves() &&\n !$this->isWinner('X') &&\n !$this->isWinner('O');\n }", "private function checkIfPlayerHasWon()\n {\n $totalResult = $this->score + $this->savedScore;\n if ($totalResult >= self::POINTS_AT_WIN) {\n $this->playerMessage = 'GRATTIS, du har VUNNIT. Du har ett hundra poäng eller mer!';\n $this->hasWon = true;\n }\n }", "public static function check_win($game_id)\n {\n $sum = 0;\n $matrix = (new self)->fill_matrix($game_id);\n // horisont\n for ($i = 0; $i < count($matrix); $i++) {\n $sum = (new self)->sum($matrix[$i]);\n if ($sum == 3) {\n return \"user\";\n }\n if ($sum == -3) {\n return \"pc\";\n }\n }\n\n\n // vertihal\n for ($j = 0; $j < count($matrix[0]); $j++) {\n $sum = (new self)->sum(array_column($matrix, $j));\n if ($sum == 3) {\n return \"user\";\n }\n if ($sum == -3) {\n return \"pc\";\n }\n }\n\n // diagonal 1\n $sum = 0;\n $main_diagonal = array();\n for ($i = 0; $i < count($matrix); $i++) {\n $main_diagonal[] = $matrix[$i][$i];\n }\n\n $sum = (new self)->sum($main_diagonal);\n if ($sum == 3) {\n return \"user\";\n }\n if ($sum == -3) {\n return \"pc\";\n }\n\n // diagonal 2\n $sum = 0;\n $secondary_diagonal = array();\n for ($i = count($matrix) - 1; $i >=0; $i--) {\n $secondary_diagonal[] = $matrix[$i][count($matrix) - $i - 1];\n }\n $sum = (new self)->sum($secondary_diagonal);\n if ($sum == 3) {\n return \"user\";\n }\n if ($sum == -3) {\n return \"pc\";\n }\n }", "public function play()\n {\n $this->spin();\n foreach ($this->bets as $bet_type => $wager)\n {\n if (method_exists(Game, $bet_type))\n {\n if ($payoff = $this->$bet_type())\n {\n $this->win = true;\n $money_won = ($wager * $payoff);\n $this->increment_money_won($money_won);\n $this->increment_money($money_won);\n }\n else\n {\n $this->increment_money_lost($wager);\n $this->decrement_money($wager);\n }\n }\n }\n return $this->win;\n }", "public function totalComputerWins()\n {\n $qb = $this->createQueryBuilder('r')\n ->select('COUNT(r)')\n ->where('r.win = false AND r.tie = false')\n ;\n\n return $qb->getQuery()->getSingleScalarResult();\n }", "function isOver()\n\t{\n\t\t\n\t\t//top row\n\t\tif ($this->board[0][0] && $this->board[0][0] == $this->board[0][1] && $this->board[0][1] == $this->board[0][2])\n\t\t\treturn $this->board[0][0];\n\t\t\t\n\t\t//middle row\n\t\tif ($this->board[1][0] && $this->board[1][0] == $this->board[1][1] && $this->board[1][1] == $this->board[1][2])\n\t\t\treturn $this->board[1][0];\n\t\t\t\n\t\t//bottom row\n\t\tif ($this->board[2][0] && $this->board[2][0] == $this->board[2][1] && $this->board[2][1] == $this->board[2][2])\n\t\t\treturn $this->board[2][0];\n\t\t\t\n\t\t//first column\n\t\tif ($this->board[0][0] && $this->board[0][0] == $this->board[1][0] && $this->board[1][0] == $this->board[2][0])\n\t\t\treturn $this->board[0][0];\n\t\t\t\n\t\t//second column\n\t\tif ($this->board[0][1] && $this->board[0][1] == $this->board[1][1] && $this->board[1][1] == $this->board[2][1])\n\t\t\treturn $this->board[0][1];\n\t\t\t\n\t\t//third column\n\t\tif ($this->board[0][2] && $this->board[0][2] == $this->board[1][2] && $this->board[1][2] == $this->board[2][2])\n\t\t\treturn $this->board[0][2];\n\t\t\t\n\t\t//diagonal 1\n\t\tif ($this->board[0][0] && $this->board[0][0] == $this->board[1][1] && $this->board[1][1] == $this->board[2][2])\n\t\t\treturn $this->board[0][0];\n\t\t\t\n\t\t//diagonal 2\n\t\tif ($this->board[0][2] && $this->board[0][2] == $this->board[1][1] && $this->board[1][1] == $this->board[2][0])\n\t\t\treturn $this->board[0][2];\n\t\t\t\n\t\tif ($this->totalMoves >= 9)\n\t\t\treturn \"Tie\";\n\t}", "public function winloss()\n {\n $sql = '\n SELECT \n t.name,\n ( \n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team1_id=t.id\n AND m.team1_goalcount > m.team2_goalcount ) +\n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team2_id=t.id\n AND m.team1_goalcount < m.team2_goalcount ) \n ) wins,\n ( \n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team1_id=t.id\n AND m.team1_goalcount < m.team2_goalcount ) +\n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team2_id=t.id\n AND m.team1_goalcount > m.team2_goalcount )\n ) losses\n FROM teams t';\n\n return view( 'winloss', ['matches' => \\DB::select( $sql ) ] );\n }", "function getTurn ($board_num) {\n //get database info on player turn and player user ids\n $result = selectDB(\"SELECT PLAYERX, PLAYERO, TURN FROM BOARD WHERE BOARD_NUM='$board_num'\");\n\n //separate results into variables\n $playerx = $result['PLAYERX'];\n $playero = $result['PLAYERO'];\n $turnUser = $result['TURN'];\n \n //return 0 or 1\n if (strcmp($playerx, $turnUser) == 0) {\n return 0; //playerx's turn\n }\n else if (strcmp($playero, $turnUser) == 0) {\n return 1; //playero's turn\n }\n}", "function checkWin($board) {\n $values = array();\n // horizontal\n for($r = 0; $r < 6; $r++) {\n $values[] = '';\n $i = count($values) - 1;\n for($c = 0; $c < 6; $c++) {\n $values[$i] .= $board[$r][$c];\n }\n }\n // vertical\n for($c = 0; $c < 6; $c++) {\n $values[] = '';\n $i = count($values) - 1;\n for($r = 0; $r < 6; $r++) {\n $values[$i] .= $board[$r][$c];\n }\n }\n\n // sub diagonal 1 right\n $values[] = '';\n $i = count($values) - 1;\n $c = 0;\n for($r = 4; $r >= 0; $r--) {\n $values[$i] .= $board[$r][$c];\n $c++;\n }\n \n // full diagonal right\n $values[] = '';\n $i = count($values) - 1;\n $c = 0;\n for($r = 5; $r >= 0; $r--) {\n $values[$i] .= $board[$r][$c];\n $c++;\n }\n\n // sub diagonal 2 right\n $values[] = '';\n $i = count($values) - 1;\n $c = 1;\n for($r = 4; $r >= 0; $r--) {\n $values[$i] .= $board[$r][$c];\n $c++;\n }\n\n // sub diagonal 1 left\n $values[] = '';\n $i = count($values) - 1;\n $c = 0;\n for($r = 1; $r < 6; $r++) {\n $values[$i] .= $board[$r][$c];\n $c++;\n }\n\n // full diagonal left\n $values[] = '';\n $i = count($values) - 1;\n $c = 0;\n for($r = 0; $r < 6; $r++) {\n $values[$i] .= $board[$r][$c];\n $c++;\n }\n\n // sub diagonal 2 left\n $values[] = '';\n $i = count($values) - 1;\n $c = 1;\n for($r = 0; $r < 5; $r++) {\n $values[$i] .= $board[$r][$c];\n $c++;\n }\n print_r($values);\n\n $winChaos = false;\n $winOrder = false;\n $boardFull = true;\n foreach($values as $v) {\n if(strpos($v, '11111') !== false) {\n $winOrder = true;\n }\n if(strpos($v, '22222') !== false) {\n $winOrder = true;\n }\n if(strpos($v, '0') !== false) {\n $boardFull = false;\n }\n }\n if($winOrder == false && $boardFull == true) {\n $winChaos = true;\n }\n\n if($winChaos == false && $winOrder == false && $boardFull == false)\n return 0; // nadie ha ganado aun\n if($winOrder)\n return 1; // gana order\n if($winChaos)\n return 2; // gana chaos\n}", "public function roll()\n {\n $res = $this->dice->roll();\n if ($res == 1) {\n $this->dice->reset();\n $this->gamerounds[] = 0;\n }\n $this->roundsum = array_sum($this->dice->rolls());\n\n if (array_sum($this->gamerounds) + $this->roundsum >= 100) {\n $this->gamerounds[] = $this->roundsum;\n echo \"<script>alert('$this->name won')</script>\";\n $res = 100;\n }\n\n return $res;\n }", "function compare_user_data($a, $b) {\n if ($a['won'] == $b['won']) {\n return 0;\n } else if ($a['won'] > $b['won']) {\n return -1;\n } else {\n return 1;\n }\n}", "public function checkWin($justReturn = false)\n {\n $actions = Action::get();\n $gameBoard = array(\n [' ', ' ', ' '],\n [' ', ' ', ' '],\n [' ', ' ', ' ']\n );\n\n foreach ($actions as $action) {\n $gameBoard[$action->row][$action->column] = $action->player;\n }\n\n\n $isX = 'X'; // Player X in gameBoard array is assigned to \"X\"\n $isO = 'O'; // Player O in gameBoard array is assigned to \"O\"\n $checkPlayer = $isX; // Tells us, which player we are checking for win\n $result = true; // Win result, after each loop must be \"true\"\n\n // Checking diagonally 0,0 1,1 2,2 game board fields\n $res = array();\n for ($a = 0; $a < 2; $a++) {\n // This loop first time checking player X, and second time player O\n $result = true; // Resetting $result to true\n if ($a == 1) {\n // loop goes 2nd time, so we are setting $checkPlayer to $isO(true), to check for player O\n $checkPlayer = $isO;\n }\n for ($b = 0; $b < 3; $b++) {\n /**\n * Because variable $result = true, on win check must be:\n * $result = true && true, to get result that there is any winner(because true && true is TRUE)\n * if there is other condition, for example:\n * $result = true && false, there is no winner(because true && false is FALSE)\n */\n $result = $result && $gameBoard[$b][$b] === $checkPlayer;\n }\n\n if ($result) {\n /**\n * $result = true, that means that there is a winner.\n * Winner would be that one, which was checked last time by loop and defined by variable $checkPlayer.\n * Returning winner.\n */\n if ($justReturn)\n return true;\n\n return response()->json([\n 'winner' => $checkPlayer,\n ], 200);\n }\n }\n\n\n // Checking diagonally 2,0 1,1 0,2 game board fields\n $checkPlayer = $isX; // Resetting player that we are checking to player X.\n for ($a = 0; $a < 2; $a++) {\n // This loop first time checking player X, and second time player O\n $result = true; // Resetting $result to true\n if ($a == 1) {\n // loop goes 2nd time, so we are setting $checkPlayer to $isO(true), to check for player O\n $checkPlayer = $isO;\n }\n for ($b = 0; $b < 3; $b++) {\n /**\n * Because variable $result = true, on win check must be:\n * $result = true && true, to get result that there is any winner(because true && true is TRUE)\n * if there is other condition, for example:\n * $result = true && false, there is no winner(because true && false is FALSE)\n */\n $result = $result && $gameBoard[2 - $b][$b] === $checkPlayer;\n }\n\n if ($result) {\n /**\n * $result = true, that means that there is a winner.\n * Winner would be that one, which was checked last time by loop and defined by variable $checkPlayer.\n * Returning winner.\n */\n if ($justReturn)\n return true;\n\n return response()->json([\n 'winner' => $checkPlayer,\n ], 200);\n }\n }\n\n\n $checkPlayer = $isX; // Resetting player that we are checking to player X.\n for ($a = 0; $a < 2; $a++) {\n if ($a == 1) $checkPlayer = $isO;\n for ($b = 0; $b < 3; $b++) {\n $result = true;\n for ($c = 0; $c < 3; $c++) {\n // Checking for rows\n $result = $result && $gameBoard[$b][$c] === $checkPlayer;\n }\n if ($result) {\n if ($justReturn)\n return true;\n\n return response()->json([\n 'winner' => $checkPlayer,\n ], 200);\n }\n $result = true;\n for ($c = 0; $c < 3; $c++) {\n // Checking for columns\n $result = $result && $gameBoard[$c][$b] === $checkPlayer;\n }\n if ($result) {\n if ($justReturn)\n return true;\n\n return response()->json([\n 'winner' => $checkPlayer,\n ], 200);\n }\n }\n }\n\n\n /**\n * None conditinion was succes, that means there is no winner yet, so now checking if there is any free game board fields.\n */\n $foundEmpty = 0;\n foreach ($gameBoard as $row => $col) {\n foreach ($col as $player) {\n if ($player === ' ')\n $foundEmpty++;\n }\n }\n if ($foundEmpty == 0) {\n if ($justReturn)\n return true;\n\n return response()->json([\n 'winner' => ' ',\n ], 200);\n }\n\n if ($justReturn)\n return false;\n\n return response()->json([\n 'noWinner' => true\n ], 200);\n }", "public function winner($resultOne, $resultTwo){\n if($resultOne > $resultTwo){\n echo 'You are Winner';\n }else{\n echo 'You are Loser';\n }\n }", "function chanceToWin($lastWin)\n{\n $rough = (int) ((time() - $lastWin) / 60);\n $chance = 0;\n if ($rough > 120) {\n if ($rough > 180) {\n $rough = rand(120, 180);\n }\n $rough = $rough - 120;\n $chance = (int) ($rough * 100) / 60;\n }\n return $chance;\n}", "function checkWinner($shot){\r\n\t\t\tforeach ( $this->ships as $shipNumber => $ship ) {\r\n\t\t\t\tif( !$ship->isShipSunk() ){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}", "public function testVerifyToWin()\n {\n $match = $this->createMatch();\n\n foreach([0, 1, 2, 3, 4, 5, 6, 7, 8] as $position) {\n $this->createMove($position, $match->id);\n }\n\n foreach([0, 1, 2] as $position) {\n\n $move = Move::where('position', $position)\n ->where(\"match_id\", $match->id)\n ->first();\n\n $move->value = 1;\n $move->save();\n\n }\n\n $winner = new Winner();\n $winner->verify($match, $position, 1);\n\n $matchFound = Match::find($match->id);\n\n $this->assertEquals(1, $matchFound->winner);\n\n }", "function getWinRatio($player, $matches) {\n\t$matchesPlayed = 0;\n\t$matchesWon = 0;\n\tforeach ($matches as $key => $value) {\n\t\tif ($value['ChallengerID'] == $player || $value['DefenderID'] == $player) {\n\t\t\t$matchesPlayed++;\n\t\t\tif ($value['ChallengerID'] == $player && $value['ChallengerScore'] > $value['DefenderScore'] || $value['DefenderID'] == $player && $value['ChallengerScore'] < $value['DefenderScore']) {\n\t\t\t\t$matchesWon++;\n\t\t\t}\n\t\t}\n\t}\n\treturn $matchesWon / $matchesPlayed;\n}", "public function totalPlayerWins()\n {\n $qb = $this->createQueryBuilder('r')\n ->select('COUNT(r)')\n ->where('r.win = true')\n ;\n\n return $qb->getQuery()->getSingleScalarResult();\n }", "function compete2($a,$b){\n $p = intval(100 * getWinProb($a['elo']-$b['elo']));\n $expected = ($a['elo']>=$b['elo']) ? $a['name'] : $b['name'];\n $percent = ($a['elo']>=$b['elo']) ? $p.'%' : (100-$p).'%';\n $tempo = round(($a['tempo']+$b['tempo'])/2);\n $a_score = 0;\n $b_score = 0;\n echo sprintf(\"Now Playing: %s (%s) vs. %s (%s) \\n\", $a['name'], $a['elo'], $b['name'], $b['elo']);\n echo sprintf(\"Expected winner: %s (%s)\\n\", $expected, $percent);\n \n //echo sprintf(\"------------\\n\");\n //echo sprintf(\"| Game Log |\\n\");\n //echo sprintf(\"------------\\n\");\n //echo sprintf(\"Playing %s possessions\\n\\n\",$tempo);\n for($i=0;$i<$tempo;$i++){\n $a_points = playPosession($a['off'],$b['def']);\n $a_score += $a_points;\n $b_points = playPosession($b['off'],$a['def']);\n $b_score += $b_points;\n //echo sprintf(\"Possession #%s\\n\",$i);\n //echo sprintf(\"%s scored %s points\\n\",$a['name'],$a_points);\n //echo sprintf(\"%s scored %s points\\n\",$b['name'],$b_points);\n //echo sprintf(\"Score is %s %s-%s %s\\n\\n\", $a['name'], $a_score, $b_score, $b['name']);\n }\n while($a_score==$b_score){\n $ot = round($tempo/8);\n //echo sprintf(\"Overtime\\n\");\n //echo sprintf(\"Playing %s possessions\\n\", $ot);\n for($i=0;$i<$ot;$i++){\n $a_points = playPosession($a['off'],$b['def']);\n $a_score += $a_points;\n $b_points = playPosession($b['off'],$a['def']);\n $b_score += $b_points;\n //echo sprintf(\"Possession #%s\\n\",$i);\n //echo sprintf(\"%s scored %s points\\n\",$a['name'],$a_points);\n //echo sprintf(\"%s scored %s points\\n\",$b['name'],$b_points);\n //echo sprintf(\"Score is %s %s-%s %s\\n\\n\", $a['name'], $a_score, $b_score, $b['name']);\n }\n }\n $winner = ($a_score>$b_score) ? $a['name'] : $b['name'];\n $a_ppp = number_format($a_score/$tempo,3);\n $b_ppp = number_format($b_score/$tempo,3);\n echo sprintf(\"Final score is %s-%s, %s wins\\n\\n\", max($a_score,$b_score), min($a_score,$b_score), $winner);\n //echo sprintf(\"Points per Possession: %s: %s %s: %s\\n\\n\", $a['name'], $a_ppp, $b['name'], $b_ppp);\n return ($a_score>$b_score) ? $a : $b;\n}", "public function getWinsAttribute()\n {\n $wins = $this->allMatches()->filter(function ($match) {\n // Don't include playoff wins\n if ($match->isPlayoff()) {\n return false;\n }\n\n $home = ($this->id == $match->team1_id);\n if ($home && $match->team1_score > $match->team2_score) {\n return $match;\n }\n if (!$home && $match->team2_score > $match->team1_score) {\n return $match;\n }\n })->count();\n\n return $wins;\n }", "protected function checkForWin($matchID, $userID)\n {\n $sql = new Sql($this->dbAdapter);\n \n $where = new \\Zend\\Db\\Sql\\Where();\n $where->nest()\n ->equalTo('tblmatchsteps.mUserID', $userID)\n ->and->equalTo('tblmatchsteps.mMatchID', $matchID)\n ->and->equalTo('tblmatchsteps.mState', 1)\n ->unnest();\n $select = $sql->select('tblmatchsteps')->columns(array('countState' => new Expression('COUNT(mState)')))\n ->where($where);\n $stmt = $sql->prepareStatementForSqlObject($select);\n $result = $stmt->execute();\n $count = $result->current();\n \n //If he hit 20 times\n if ($count[\"countState\"] == 20)\n {\n return true;\n }\n \n return false;\n \n }", "function checkSide( $x, $y ){\n\t\tif( $this->axis == 1){\n\t\t\t//x axis\t\n\t\t\tif( $x < $this->x ){\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn 1;\n\t\t\t\n\t\t}elseif( $this->axis == 2){\n\t\t\t// y axis\n\t\t\tif( $y < $this->y ){\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn 1;\t\n\t\t}\n\t\treturn 0;\n\t}", "public function testCheckRoll()\n {\n $dice = new DiceHand();\n\n $dice->roll();\n $res = $dice->values();\n $res2 = $dice->checkRoll();\n\n if (in_array(1, $res)) {\n $this->assertEquals(-1, $res2);\n } else {\n $this->assertEquals(0, $res2);\n }\n }", "public function playerHasWon() {\n foreach ($this->players as $player) {\n if ($player->score >= $this->game->winningScore) {\n return true;\n }\n }\n return false;\n }", "public function checkHorizontalWin($userMove){\r\n $HorizontalCounter = self::ZERO;\r\n $gameBoards = $this->board->gameBoard; \r\n $row = $this->lastRowInsert;\r\n $current_player = \"[$this->currentPlayer]\";\r\n\r\n for($col = $userMove-1; $col > -1 ; $col-- ){\r\n if($gameBoards[$row][$col] != $current_player){\r\n break; \r\n }\r\n $HorizontalCounter++;\r\n }\r\n for($col= $userMove; $col < Board::COLUMNS ; $col++){\r\n if($gameBoards[$row][$col] != $current_player){\r\n break;\r\n }\r\n $HorizontalCounter++; \r\n }\r\n return $HorizontalCounter >= self::WIN ? true : false;\r\n \r\n }", "function getTurn()\n{\n $board = getArray();\n $victory = false;\n//test victoire ligne\n if ($board[0] == $board[1] && $board[0] == $board[2]) {\n if ($board[0] == \"X\") {\n $victory = \"X\";/*victoire X*/\n } else {\n $victory = \"O\";/*victoire O*/\n }\n }\n if ($board[3] == $board[4] && $board[3] == $board[5]) {\n if ($board[0] == \"X\") {\n $victory = \"X\";/*victoire X*/\n } else {\n $victory = \"O\";/*victoire O*/\n }\n }\n if ($board[4] == $board[5] && $board[4] == $board[6]) {\n if ($board[0] == \"X\") {\n $victory = \"X\";/*victoire X*/\n } else {\n $victory = \"O\";/*victoire O*/\n }\n }\n\n//test victoire colone\n if ($board[0] == $board[3] && $board[0] == $board[6]) {\n if ($board[0] == \"X\") {\n $victory = \"X\";/*victoire X*/\n } else {\n $victory = \"O\";/*victoire O*/\n }\n }\n if ($board[1] == $board[4] && $board[1] == $board[7]) {\n if ($board[0] == \"X\") {\n $victory = \"X\";/*victoire X*/\n } else {\n $victory = \"O\";/*victoire O*/\n }\n }\n if ($board[2] == $board[5] && $board[2] == $board[8]) {\n if ($board[0] == \"X\") {\n $victory = \"X\";/*victoire X*/\n } else {\n $victory = \"O\";/*victoire O*/\n }\n }\n\n//test victoire diagonal\n if ($board[0] == $board[4] && $board[0] == $board[8]) {\n if ($board[0] == \"X\") {\n $victory = \"X\";/*victoire X*/\n } else {\n $victory = \"O\";/*victoire O*/\n }\n }\n if ($board[2] == $board[4] && $board[2] == $board[6]) {\n if ($board[0] == \"X\") {\n $victory = \"X\";/*victoire X*/\n } else {\n $victory = \"O\";/*victoire O*/\n }\n }\n //test pour le prochain tour\n if ($victory = null){\n $turn = $board[9];\n if ( $turn == 'X' ){\n $board[9] = 'O';\n }else{\n $board[9] = 'X';\n }\n return $turn;\n }else{\n return $victory;\n }\n}", "function ms_is_switched()\n {\n }", "function result_for_side($vitez, $presvedcive, $strana) {\n\tglobal $lang;\n\t\n\t$pers = $presvedcive ? $lang[\"3:0\"] : $lang[\"2:1\"];\n\tif ($vitez == DRES_DRAW) {\n\t\treturn $lang[\"draw\"];\n\t} elseif ($vitez == $strana) {\n\t\treturn $lang[\"won\"] . \" \" . $pers;\n\t} else {\n\t\treturn $lang[\"lost\"] . \" \" . $pers;\n\t}\n}", "public function isUserWinner() {\n if($this->winnerType == \"player\" && $this->winnerID == CD()->id) {\n return true;\n }\n return false;\n }", "function calc_character_rank($honor_points)\n{\n\tif($honor_points < 150 and $honor_points >= 0)\n\t{\n\techo \"rank0\";\n\t}\n\telseif ($honor_points < 2000 and $honor_points >= 150)\n\t{\n\techo \"rank1\";\n\t}\n\telseif ($honor_points < 5000 and $honor_points >= 2000)\n\t{\n\techo \"rank2\";\n\t}\n\telseif ($honor_points >= 5000 and $honor_points < 65000)\n\t{\n\t$lvl=round(($honor_points / 5000) + 2,0);\n\techo \"rank$lvl\";\n\t}\n\telseif ($honor_points >= 65000)\n\t{\n\techo \"rank15\";\n\t}\n}", "function countWin($userID)\n {\n $MC = $this->countMCWin($userID);\n $YN = $this->countYNWin($userID);\n return ($MC + $YN);\n }", "function displayWinner($total1, $total2, $total3, $total4, $person, $person2, $person3, $person4)\n {\n echo \"Winner: \";\n \n if($total1 > $total2 && $total1 > $total3 && $total1 > $total4)\n {\n echo \"<img src='\".$person[\"profilePicUrl\"].\"'>\";\n }\n else if ($total2 > $total1 && $total2 > $total3 && $total2 > $total4)\n {\n echo \"<img src='\".$person2[\"profilePicUrl\"].\"'>\";\n }\n else if($total3 > $total1 && $total3 > $total2 && $total3 > $total4)\n {\n echo \"<img src='\".$person3[\"profilePicUrl\"].\"'>\";\n }\n else if($total4 > $total1 && $total4 > $total2 && $total4 > $total3)\n {\n echo \"<img src='\".$person4[\"profilePicUrl\"].\"'>\";\n }\n else {\n echo \"More than one winner\";\n }\n \n }", "function create_winner_image($player_left, $player_right) {\n $i = imagecreatefrompng(_PWD . '/images/winner.png');\n\n $levelsketch = imagecreatefrompng(_PWD . '/images/levelsketch.png');\n\n // Coordinates for background images in the levelsketch.png file\n // Backgrounds are around 330x190\n $backgrounds = array(\n array(0, 0),\n array(330, 0),\n array(660, 0),\n array(0, 190),\n array(330, 190)\n );\n\n // Coordinates for character images from the char_*.png files\n // Character sprites are 80x80\n $characters = array(\n array(880, 720), // Winner\n array(720, 0) // Loser\n );\n\n // Characters are stored as a hex value on the leaderboards. The process.php script translates them\n // to decimal which is used as the index for this array\n $colors = array(\n 'orange',\n 'red',\n 'green',\n 'blue',\n 'white',\n 'pink',\n 'yellow',\n 'brown',\n 'purple',\n 'black',\n 'cyan',\n 'lime',\n 'dlc1',\n 'dlc2',\n 'dlc3',\n 'dlc4',\n 'dlc5',\n 'dlc6',\n 'dlc7',\n 'dlc8'\n );\n\n $white = imagecolorallocate($i, 255, 255, 255);\n $black = imagecolorallocate($i, 0, 0, 0);\n\n // Get left side player icon\n $icon_left = imagecreatefromjpeg(_PWD . '/images/' . $player_left->steamid . '.jpg');\n list($width_left, $height_left) = getimagesize(_PWD . '/images/' . $player_left->steamid . '.jpg');\n $left_text = ($player_left->score > $player_right->score ? $player_left->hashtag : date('m-d-Y'));\n $left_level = substr($player_left->level, 0, 1) - 1;\n\n imagefilledrectangle($i, 131, 241, 132 + ($width_left / 2), 242 + ($height_left / 2), $white);\n imagecopyresized($i, $icon_left, 132, 242, 0, 0, ($width_left / 2), ($height_left / 2), $width_left, $height_left);\n\n // Place left side character \n $character_coords = ($player_left->score > $player_right->score ? $characters[0] : $characters[1]);\n $character = imagecreatefrompng(_PWD . '/images/char_' . $colors[$player_left->character] . '.png');\n imagecopy($i, $character, 300, 300, $character_coords[0], $character_coords[1], 80, 80);\n imagedestroy($character);\n\n // Copy left player level to image\n imagecopy($i, $levelsketch, 95, 28, $backgrounds[$left_level][0], $backgrounds[$left_level][1], 330, 190);\n\n // Fill out left side of book text\n imagettfstroketext($i, 24.0, 0, 175, 265, $white, $black, 'fonts/Tekton-Bold', $player_left->string, 3);\n imagettfstroketext($i, 20.0, 0, 145, 308, $white, $black, 'fonts/Tekton-Bold', 'Level ' .$player_left->level, 3);\n imagettfstroketext($i, 20.0, 0, 145, 348, $white, $black, 'fonts/Tekton-Bold', $player_left->score, 3);\n imagettftext($i, 16.0, 0, 210, 433, $black, 'fonts/Tekton-Bold', $left_text);\n\n // Get right side player icon\n $icon_right = imagecreatefromjpeg(_PWD . '/images/' . $player_right->steamid . '.jpg');\n list($width_right, $height_right) = getimagesize(_PWD . '/images/' . $player_right->steamid . '.jpg');\n $right_text = ($player_right->score > $player_left->score ? $player_right->hashtag : date('m-d-Y'));\n $right_level = substr($player_right->level, 0, 1) - 1;\n\n imagefilledrectangle($i, 541, 241, 542 + ($width_right / 2), 242 + ($height_right / 2), $white);\n imagecopyresized($i, $icon_right, 542, 242, 0, 0, ($width_right / 2), ($height_right / 2), $width_right, $height_right);\n\n // Place right side character. Have to flip it horizontally. My installed version of PHP doesn't have the \n // native imageflip function so I included one from Stack Overflow here. I modified it slightly to preserve\n // transparency.\n $character_coords = ($player_right->score > $player_left->score ? $characters[0] : $characters[1]);\n $temp = imagecreatetruecolor(80, 80);\n $character = imagecreatefrompng(_PWD . '/images/char_' . $colors[$player_right->character] . '.png');\n imagealphablending($temp, false);\n imagesavealpha($temp, true);\n imagecopy($temp, $character, 0, 0, $character_coords[0], $character_coords[1], 80, 80);\n imageflip($temp, IMG_FLIP_HORIZONTAL);\n imagecopy($i, $temp, 535, 300, 0, 0, 80, 80);\n imagedestroy($temp);\n imagedestroy($character);\n \n // Copy right player level to image\n imagecopy($i, $levelsketch, 485, 28, $backgrounds[$right_level][0], $backgrounds[$right_level][1], 330, 190);\n\n // Fill out right side book text\n imagettfstroketext($i, 24.0, 0, 583, 265, $white, $black, 'fonts/Tekton-Bold', $player_right->string, 3);\n imagettfstroketext($i, 20.0, 0, 678, 308, $white, $black, 'fonts/Tekton-Bold', 'Level ' . $player_right->level, 3);\n imagettfstroketext($i, 20.0, 0, 678, 348, $white, $black, 'fonts/Tekton-Bold', $player_right->score, 3);\n imagettftext($i, 16.0, 0, 610, 433, $black, 'fonts/Tekton-Bold', $right_text);\n\n imagettftext($i, 10.0, 0, 745, 470, $black, 'fonts/Tekton-Bold', '@KlepekVsRemo');\n\n // Preserve transparency\n imagealphablending($i, false);\n imagesavealpha($i, true);\n\n // Save with highest compression and lowest filesize\n // Would like to decrease filesize further, but haven't been able to as yet\n imagepng($i, _PWD . '/images/daily_winner.png', 9, PNG_ALL_FILTERS);\n\n imagedestroy($levelsketch);\n imagedestroy($icon_left);\n imagedestroy($icon_right);\n imagedestroy($i); \n }", "function compete($a,$b){\n $p = intval(100 * getWinProb($a['elo']-$b['elo']));\n $expected = ($a['elo']>=$b['elo']) ? $a['name'] : $b['name'];\n $percent = ($a['elo']>=$b['elo']) ? $p.'%' : (100-$p).'%';\n $n = mt_rand(1,100);\n $winner = ($n<=$p) ? $a['name'] : $b['name'];\n \n //echo sprintf(\"Now Playing: %s (%s) vs. %s (%s) \\n\", $a['name'], $a['elo'], $b['name'], $b['elo']);\n //echo sprintf(\"Expected winner: %s (%s)\\n\", $expected, $percent);\n //echo sprintf(\"Actual winner: %s\\n\\n\", $winner);\n return ($n<=$p) ? $a : $b;\n}", "function whoWins(){\n $winners = array();\n $n = 100;\n for($i=0;$i<=$n;$i++){\n $winner = playTournament();\n if(!isset($winners[$winner])){\n $winners[$winner] = 1;\n } else {\n $winners[$winner] += 1;\n }\n }\n arsort($winners);\n foreach($winners as $key=>$value){\n echo $key.' '.$value.\"\\n\";\n }\n}", "public function getWinPercent()\n {\n $total = array_sum($this->performance);\n\n if ($total == 0) {\n return 0;\n }\n\n return ($this->wins / $total) * 100;\n }", "public function getWinPercent()\n {\n $total = array_sum($this->performance);\n\n if ($total == 0) {\n return 0;\n }\n\n return ($this->wins / $total) * 100;\n }", "public function gameOver()\n\t{\n\n\t\tif($this->checkForWin() == true) {\n\n\t\t\t$gameover = '<div id=\"overlay\" class=\"win\"><div>';\n\t\t\t$gameover .= '<h1 id=\"game-over-message\">Congratulations on guessing: ' . $this->phrase->activePhrase . '</h1>';\n\t\t\t$gameover .= '<form action=\"play.php\" method=\"POST\"><input type=\"submit\" value=\"Play again\" class=\"btn__reset\"></form>';\n\t\t\t$gameover .= '</div></div>';\n\n\t\t} elseif ($this->checkForLose() == true) {\n\n\t\t\t$gameover = '<div id=\"overlay\" class=\"lose\"><div>';\n\t\t\t$gameover .= '<h1 id=\"game-over-message\">The phrase was: ' . $this->phrase->activePhrase . '. Better luck next time!</h1>';\n\t\t\t$gameover .= '<form action=\"play.php\" method=\"POST\"><input type=\"submit\" value=\"Try again\" class=\"btn__reset\"></form>';\n\t\t\t$gameover .= '</div></div>';\n\t\n\t\t} else {\n\t\t\t$gameover = false;\n\t\t}\n\n\t\treturn $gameover;\n\n\t}", "public static function currentLevel()\n\t{\n\t\tif (!auth()->check()) return 0;\n\t\t$member = \\PanicHDMember::find(auth()->user()->id);\n\t\tif ($member->isAdmin()){\n\t\t\treturn 3;\n\t\t}elseif($member->isAgent()){\n\t\t\tif (session()->exists('panichd_filter_currentLevel') and session('panichd_filter_currentLevel')==1){\n\t\t\t\treturn 1;\n\t\t\t}else{\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t}else\n\t\t\treturn 1;\n\t}", "public function getWon()\n {\n return $this->won;\n }", "function countYNWin($userID)\n\t{\n\t\t$this->db->where('IS_WINNER', true);\n $this->db->where('USER_ID', $userID);\n $this->db->from('YN_GAME_LOGS');\n return $this->db->count_all_results();\n\t}", "function win_check($token) {\r\n if ($this->debug && debug_backtrace()[1]['function'] == 'game_check') {\r\n echo '<br />> Check function called from Game for token ' . $token . '...<br />';\r\n }\r\n\r\n $this->winning_line = []; \r\n foreach ($this->win_lines as $line_type => $lines) {\r\n foreach ($lines as $line_name => $line) {\r\n $this->winning_line[0] = $line; \r\n $check_value = 0; \r\n $win_move = 0; \r\n foreach ($line as $pos) {\r\n if ($this->debug && debug_backtrace()[1]['function'] == 'game_check') {\r\n echo 'Checking for token ' . $token . ' in ' . $line_type . ' ' . $line_name . ' [' . implode(',', $line) . ']';\r\n }\r\n if ($this->position[$pos] != $token) {\r\n if (debug_backtrace()[1]['function'] == 'game_check') {\r\n\r\n if ($this->debug) {\r\n echo ' - Position ' . $pos . '. Result: Not Found. Skipping rest of ' . $line_name . '<br />';\r\n }\r\n break;\r\n } else if (debug_backtrace()[1]['function'] == 'pick_move') {\r\n $win_move = $pos;\r\n }\r\n } else {\r\n if ($this->debug && debug_backtrace()[1]['function'] == 'game_check') {\r\n echo ' - Position ' . $pos . '. Result: Found.<br />';\r\n }\r\n $check_value++;\r\n }\r\n }\r\n\r\n if (debug_backtrace()[1]['function'] == 'pick_move') {\r\n if ($check_value == ($this->grid_size - 1)) {\r\n if ($this->position[$win_move] == '-') {\r\n return $win_move;\r\n }\r\n }\r\n } else if (debug_backtrace()[1]['function'] == 'game_check') {\r\n if ($check_value == $this->grid_size) {\r\n if ($this->debug) {\r\n echo 'We have a winner!<br />';\r\n }\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n $this->winning_line = []; \r\n if (debug_backtrace()[1]['function'] == 'game_check') {\r\n return false;\r\n } else if (debug_backtrace()[1]['function'] == 'pick_move') {\r\n return -1;\r\n } else {\r\n return null;\r\n }\r\n }", "function playPosession($off,$def){\n $off_roll = mt_rand(1,10*$off);\n $def_roll = mt_rand(1,10*(200-$def));\n $n = $off_roll - $def_roll;\n if($n>800){\n return 3;\n } elseif($n>200){\n return 2;\n }\n return ($n>0) ? 1 : 0;\n}", "public function playRounds($rounds){\n $resultOne = 0;\n $resultTwo = 0;\n\n for($x = 1; $x <= $rounds; $x++){\n $playerOne = rand(1,3);\n $playerTwo = rand(1,3);\n\n $finalResult = $this->checkForWinner($playerOne,$playerTwo);\n if($finalResult == 3){\n $resultOne++;\n }elseif($finalResult == 1){\n $resultTwo++;\n }else{\n $x--;\n echo \"You have Draw -> New Game\\n\";\n }\n\n }\n $this->winner($resultOne,$resultTwo);\n\n }", "protected function isWon($marker) {\n $markedBox = $this->_markers[$marker];\n foreach ($this->_winningCombination AS $box) {\n $lineBoxes = explode(\",\", $box); //separate the winning combination to 3\n if (in_array($lineBoxes[0], $markedBox) && in_array($lineBoxes[1], $markedBox) && in_array($lineBoxes[2], $markedBox)) {\n echo \"Player $marker won!\" . PHP_EOL;\n return TRUE;\n }\n }\n return FALSE;\n }", "public function get_winning_team()\n {\n if ($this->score_team_1 > $this->score_team_2) {\n return Game::TEAM_1;\n }\n if ($this->score_team_2 > $this->score_team_1) {\n return Game::TEAM_2;\n }\n }", "public function getHandName($playerHand){\n $result = 'Scissor';\n\n if($playerHand == 1){\n $result = 'Rock';\n }elseif($playerHand == 2) {\n $result = 'Paper';\n }\n return $result;\n\n}", "protected function winCheck($userMove){\r\n // Check if we have reached the minimum steps to have a win\r\n if($this->totalMoves < Board::COLUMNS){\r\n return false;\r\n }\r\n //check vertical Horizontal Positive Diagonal Negative Diagona win\r\n if(($this->checkVerticalWin($userMove)) \r\n || ($this->checkHorizontalWin($userMove))\r\n || ($this->checkPositiveDiagonalWin($userMove))\r\n || ($this->checkNegativeDiagonalWin($userMove))\r\n ){\r\n //winning message \r\n winningMsg($this->currentPlayer);\r\n $this->gameOver = true;\r\n return;\r\n }\r\n }", "public function testStartNextTurn()\n {\n $this->game->startNextTurn();\n $gamestate = $this->game->getGamestate();\n\n $exp = 1;\n $res = $gamestate[\"turnCounter\"];\n $this->assertEquals($exp, $res);\n\n $exp = 0;\n $res = $gamestate[\"currentPoints\"];\n $this->assertEquals($exp, $res);\n\n $exp = false;\n $res = $gamestate[\"turnIsOver\"];\n $this->assertEquals($exp, $res);\n\n $exp = $this->game->getPlayer($gamestate[\"turnCounter\"]);\n $res = $gamestate[\"active\"];\n $this->assertEquals($exp, $res);\n\n $this->game->startNextTurn();\n $gamestate = $this->game->getGamestate();\n\n $exp = 0;\n $res = $gamestate[\"turnCounter\"];\n $this->assertEquals($exp, $res);\n }", "function checkSponsoredLeftAndRight($userKey)\n {\n\t\t\n\t\tif(isset($userKey))\n\t\t{\t\t\t\t\t\t\n\t\t\t$leftSide = 0;\n\t\t\t$rightSide = 0;\n\t\t\t$status = '';\n\t\t\t\n\t\t\t$sql1 = \"SELECT user_id,user_key,sponsor_key,leg FROM \".WPMLM_TABLE_USER.\" WHERE sponsor_key = '\".$userKey.\"' AND banned='0' AND payment_status IN ('1','2')\";\n\t\t\t\t\t\t\t\t\n\t\t\t$rs1 = @mysql_query($sql1);\n\t\t\tif($rs1 && @mysql_num_rows($rs1)>0) \n\t\t\t{\n\t\t\t\twhile($row1 = @mysql_fetch_array($rs1))\n\t\t\t\t{\n\t\t\t\t\t$leg = $row1['leg'];\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif($leg==0){\n\t\t\t\t\t\t$leftSide = $leftSide + 1; \t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}else if($leg==1){\n\t\t\t\t\t\t$rightSide = $rightSide + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$referrerCriteria = get_option( 'wpmlm_eligibility_settings', true );\n\t\t\t\t \n\t\t\t\t/*this condition is for switch criteria if not found*/\n\t\t\t\tif( ($leftSide >= $referrerCriteria['group1referrer'] && $rightSide >= $referrerCriteria['group2referrer']) || ($leftSide >= $referrerCriteria['group2referrer'] && $rightSide >= $referrerCriteria['group1referrer'] ) )\n\t\t\t\t{\n\t\t\t\t\t$status = \"TRUE\";\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$status = \"FALSE\";\n\t\t\t\t}\n\t\t\t\n\t\t\t}else{\n\t\t\t\t$status = \"FALSE\";\n\t\t\t}\n\t\t}\n\t\treturn $status; \t\n }", "function checkLevel($who){\n\t$r = polacz();\n\t$czas = date('Y-m-d H:i:s');\n\t$zapytanie = \"SELECT * FROM players WHERE ID_Player = \" . $who . \";\";\n\t$res = $r->query($zapytanie);\n\t$row = $res->fetch_assoc();\n\tif($row){\n\t\t$lvl = $row['Level'];\n\t\t$exp = $row['Experience'];\n\t\t$points = $row['AvaPoints'];\n\t\t$minexp = (pow(2,$lvl-1)*100);\n\t\tif($exp >= $minexp){\n\t\t\t$exp -= $minexp;\n\t\t\t$lvl++;\n\t\t\t$points += 5;\n\t\t\t$zapytanie = \"UPDATE players SET Experience = '\" . $exp . \"', Level = '\" . $lvl . \"', AvaPoints = '\".$points.\"' WHERE ID_Player = \" . $who . \";\nINSERT INTO komunikaty (PLAYER_ID, Komunikat, Kom_Typ_ID, Data_Kom) VALUES ('\" . $who . \"', 'Nowy Poziom \".$lvl.\". Masz punkty do rozdania.', '0', '\" . $czas . \"');\";\n\t\t\t$res = $r->multi_query($zapytanie);\n\t\t\trozlacz($r);\n\t\t\treturn $res;\n\n\t\t}\n\t}\n\trozlacz($r);\n\treturn false;\n}", "protected function winnerExists()\n\t{\n\t\treturn ($this->winner instanceof Blackbox_IWinner);\n\t}", "protected function winByDiagonal(string $playerUnit)\n {\n $d0 = '';\n $d1 = '';\n\n for ($x = 0; $x <= $this->getSize() - 1; $x++) {\n $d0 .= $this->getState()[$x][$x];\n }\n\n for ($x = 0; $x <= $this->getSize() - 1; $x++) {\n $d1 .= $this->getState()[$x][$this->getSize() - 1 - $x];\n }\n\n return $d0 === $this->getWinnerResult($playerUnit)\n ? 0\n : ($d1 === $this->getWinnerResult($playerUnit)\n ? 1\n : false);\n }", "public function calcRating(){\n //opponents winning percentage\n $owp = 0.0;\n //oppponents opponents winning percentage\n $oowp = 0.0;\n //total number of opponents opponents\n $numOfOppOpps = 0;\n \n for($i=0; $i<$this->numOfOpponents; $i++){\n $opp = $this->teamsPlayed[$i];\n $owp += $opp->getWP();\n for($j=0; $j<$opp->numOfOpponents; $j++){\n \t$oppOpp = $opp->getOpponentByIndex($j);\n \t$oowp += $oppOpp->getWP();\n \t$numOfOppOpps++;\n } \n }\n if($owp == 0 || $this->numOfOpponents == 0){\n $owp = 0;\n } else {\n $owp = $owp/$this->numOfOpponents;\n }\n if($oowp == 0 || $numOfOppOpps == 0){\n $oowp == 0;\n } else {\n $oowp = $oowp/$numOfOppOpps;\n }\n $this->rating = ($this->getWP() *0.25) +\n \t\t ($owp * 0.50) +\n \t\t ($oowp *0.25);\n }", "function get_hammer_wct($game) {\n\t$hammer = $game->find(\".linescorehammer\");\n\t//Check if the upper linescore team has hammer\n\tif (strpos($hammer[0]->innertext, 'hammer.gif') !== false) {\n\t\treturn 1;\n\t}\n\telse {\n\t\treturn 2;\n\t}\t\n}", "function paperSiccorsRockChooseWinner($gameList){\n\t\t$movesArray = explode(\",\",$gameList);\n\t\t//printf(\"El gamelist es: \" . $gameList . \"<br>\");\n\t\t//printf(\"La jugada1 es: \" . substr($movesArray[1],1,1) . \"<br>\");\n\t\t$player1move = substr($movesArray[1],1,1);\n\t\t$player2move = substr($movesArray[3],1,1);\n\t\t$gameResult = \"\";\n\n\t\t//console.log(\" \");\n\t\t//console.log(\" \");\n\t\t\n\n\t\t//Se pregunta si la cantidad de jugadores es valida\n\t\tif(validateQuantityOfPlayers($movesArray) == false){\n\t\t\t//console.log(\"Error Cantidad de jugadores\");\n\t\t\t//throw \"Error with number of players\"; \n\t\t}\n\n\t\t//Se preguntan si las jugadas son validas\n\t\tif(validateMove($player1move) == false || validateMove($player2move) == false){\n\t\t\t//console.log(\"Error Jugada no valida\");\n\t\t\t//throw \"Error not valid move\";\n\t\t}\n\n\t\t//Se averigua cual jugador gano\n\t\t$winner = paperSiccorsRockRules($player2move, $player1move);\n\t\tif($winner == true){\n\t\t\t////printf(\"1 El gamelist es: \" .$movesArray[2] . ',' . substr($movesArray[3],0,-1). \"<br>\");\n\t\t\t$gameResult = $movesArray[2] . ',' . substr($movesArray[3],0,-1);\n\t\t}else{\n\t\t\t////printf(\"2 El gamelist es: \" . substr($movesArray[0],1). ',' .$movesArray[1] . \"<br>\");\n\t\t\t$gameResult = substr($movesArray[0],1). ',' .$movesArray[1]; //Se puede caer\n\t\t}\n\n\t\t//printf(\"El juego es \" . $gameList . \"<br>\");\n\t\t//printf(\"Jugada player 1 \" . $player1move .\"<br>\");\n\t\t//printf(\"Jugada player 2 \" . $player2move .\"<br>\");\n\t\t//printf(\"El ganadore es player2 \" . $winner .\"<br>\");\n\n\t\t//console.log(\" \");\n\t\t//console.log(\" \");\n\t\treturn $gameResult;\n\t}", "public function countGame()\n {\n }", "public function getInGame() : int {\n\t\treturn $this->generator->getInGame();\n\t}", "public function displayWinner()\n {\n // Search in array scores, for the username with the highest score.\n $nameWinner = array_search(max($this->scores), $this->scores);\n $scoreWinner = max($this->scores);\n\n $this->console->stdInput(1);\n $this->console->getInpunt(\"De winnaar met \" . $scoreWinner[\"scoreTotal\"] . \" punten is: \" . $nameWinner . \"\\nPress enter to end the game!\");\n $this->console->stdInput(1);\n }", "public function outcome()\n {\n $gameOutcome = array(\"win\", \"lose\");\n $this->shuffle = $gameOutcome[array_rand($gameOutcome)];\n\n if ($this->shuffle === \"win\") {\n\n $bet = new confirmBet(db::getConnection());\n $arg = $bet->getBetId();\n $explode = explode(',', $arg, -1);\n $lastBetId = end($explode);\n\n $mysqli = db::getConnection();\n $saveOutcome = \"INSERT INTO outcome (outcome_status,score,bet_id) VALUES('win',10,$lastBetId)\";\n mysqli_query($mysqli, $saveOutcome);\n\n\n $this->win();\n\n } else {\n $bet = new confirmBet(db::getConnection());\n $arg = $bet->getBetId();\n $explode = explode(',', $arg, -1);\n $lastBetId = end($explode);\n\n $mysqli = db::getConnection();\n $saveOutcome = \"INSERT INTO outcome (outcome_status,score,bet_id) VALUES('lose',0,$lastBetId)\";\n mysqli_query($mysqli, $saveOutcome);\n\n\n $this->lose();\n\n }\n }", "function checkStatePoints($level)\n {\n $pontosStatus = 0;\n for($i=2;$i<=$level;$i++)\n {\n if($i <= 70) {\n $pontosStatus = $pontosStatus + 5;\n } else if(($i > 70) and ($i <= 90)) {\n $pontosStatus = $pontosStatus + 7;\n } else {\n $pontosStatus = $pontosStatus + 10;\n }\n\n }\n return $pontosStatus;\n }", "public function testWinWhenHasAdvantageAndScore($player, $otherPlayer)\n {\n $match = $this->getMatchWithAdvantage($player);\n\n $match->score($player);\n\n $this->assertEquals(1, $match->getWonGame($player));\n }", "public function testVerifyToNotWin()\n {\n\n $match = $this->createMatch();\n foreach([0, 1, 2, 3, 4, 5, 6, 7, 8] as $position) {\n $this->createMove($position, $match->id);\n }\n\n $winner = new Winner();\n $winner->verify($match, 0, 1);\n\n $matchFound = Match::find($match->id);\n\n $this->assertEquals(0, $matchFound->winner);\n\n }", "function checkGameEnd(){\n\tglobal $roomid, $db;\n\t$q = $db -> prepare(\"SELECT * FROM game WHERE roomid = ? LIMIT 1\");\n\t$q->execute(array($roomid));\n\t$r = $q->fetch();\n\t// When one of the players played all cards\n\tif($r['cardnorth'] == null || $r['cardeast'] == null || $r['cardsouth'] == null || $r['cardwest'] == null){\n\t\treturn '1';\n\t}\n\treturn '0';\n}", "function the_champ_horizontal_counter_enabled(){\r\n\tglobal $theChampCounterOptions;\r\n\tif(isset($theChampCounterOptions['hor_enable']) && $theChampCounterOptions['hor_enable'] == 1){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public function isFinished()\n {\n return $this->isWinner('X') || $this->isWinner('O') || $this->isDraw();\n }", "public function getLoser() {\n if($this->winnerType == \"draw\") {\n return \"draw\";\n } elseif($this->winnerID == $this->combatantAID && $this->winnerType == \"player\") {\n return $this->combatantB;\n } else {\n return $this->combatantA;\n }\n }", "function countMCWin($userID)\n {\n $this->db->where('IS_WINNER', true);\n $this->db->where('USER_ID', $userID);\n $this->db->from('MULTI_CHOICE_GAME_LOGS');\n return $this->db->count_all_results();\n }", "public function getWinnerType()\n {\n return $this->winnerType;\n }", "function calculate_winners($stdin){\r\n\r\n if (isset($_POST['single'])){\r\n\r\n // Setting the stdin to the value input by the user \r\n $stdin = $_POST['input'];\r\n\r\n // Getting the vars that will store the total wins\r\n global $x;\r\n global $o;\r\n global $d; \r\n\r\n // Replacing all line breaks with nothing so we get one big long string with all results inside\r\n $stdin = str_replace(\"\\\\n\",\"\",$stdin);\r\n \r\n // create a variable equal to the length of the string so that we can separate out individual games easily\r\n $length = strlen($stdin);\r\n\r\n // loop through the entire input (here $i is set as individual moves as this point)\r\n for ($i=1; $i<=$length; $i++) {\r\n\r\n if ($i % 9 === 0){\r\n\r\n // Separate out each individual 9 game move and set it to the $outcome var\r\n $outcome = substr($stdin, $i-9, 9);\r\n\r\n // Calculate the outcome of the winner of each 9 move game\r\n // Probably an ineffient way to do this **REVISIT**\r\n if ($outcome[0] === \"x\" && $outcome[1] === \"x\" && $outcome[2] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[3] === \"x\" && $outcome[4] === \"x\" && $outcome[5] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[6] === \"x\" && $outcome[7] === \"x\" && $outcome[8] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[0] === \"x\" && $outcome[3] === \"x\" && $outcome[6] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[1] === \"x\" && $outcome[4] === \"x\" && $outcome[7] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[2] === \"x\" && $outcome[5] === \"x\" && $outcome[8] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[0] === \"x\" && $outcome[4] === \"x\" && $outcome[8] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[2] === \"x\" && $outcome[4] === \"x\" && $outcome[6] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[0] === \"o\" && $outcome[1] === \"o\" && $outcome[2] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[3] === \"o\" && $outcome[4] === \"o\" && $outcome[5] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[6] === \"o\" && $outcome[7] === \"o\" && $outcome[8] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[0] === \"o\" && $outcome[3] === \"o\" && $outcome[6] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[1] === \"o\" && $outcome[4] === \"o\" && $outcome[7] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[2] === \"o\" && $outcome[5] === \"o\" && $outcome[8] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[0] === \"o\" && $outcome[4] === \"o\" && $outcome[8] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[2] === \"o\" && $outcome[4] === \"o\" && $outcome[6] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else {\r\n $winner = \"draw\";\r\n self::add_game($winner, $outcome);\r\n $d++;\r\n } \r\n }\r\n }\r\n \r\n // End of for loop for individual input\r\n // This will take the amount of wins and call a function that will display to the end user\r\n // No need for SQL input at this point as this information is just displayed and then not needed\r\n // All relevant information has already been added to the db \r\n self::calculate_single_input($x, $o, $d);\r\n }\r\n }", "public function hasScore() {\n\t\treturn $this->thru > 0;\n\t}", "public function rewardWinners(& $wins,& $table){\n\t\t$pots=& $table->game_pots;\n\t\t$leftOvers=$pots[\"left_overs\"]->amount;\n\t\t$x.=print_r($wins,true);\n\t\t$x.=\"\\n\\n\";\n\t\tforeach ($wins as $points=>$winners){// loop through winners by highest points , search for elegible pot then add that pot to the users'amount'\n\t\t\t$pot_on=count($winners); // how many winners for single pot ?\n\t\t\t$x.= \"got $pot_on winners with score of $points\\n\";\n\t\t\tif ($pon_on=='1'){\n\t\t\t\t$table->dealerChat($pot_on.' winner .');\n\t\t\t}elseif($pon_on>'1'){\n\t\t\t\t$table->dealerChat($pot_on.' winners .');\n\t\t\t}\n\t\t\t$winName=$this->getWinName($points);\n\t\t\t//generate win text\n\t\t\t$winText=' With <label class=\"hand_name\">'.$winName->handName.'</label>' ;\n\t\t\tif ($winName->handName=='High Card'){\n\t\t\t\t$winText.=' '.$winName->normalKicker ;\n\t\t\t}else{\n\t\t\t\tif (isset($winName->doubleKicker)){\n\t\t\t\t\t$winText.=' of '.$winName->doubleKicker ;\n\t\t\t\t}\n\t\t\t\tif ((isset($winName->normalKicker) && !isset($winName->doubleKicker)) || isset($winName->normalKicker) && isset($winName->doubleKicker) && $winName->doubleKicker!=$winName->normalKicker){\n\t\t\t\t\t$winText.=' and '.$winName->normalKicker.' kicker' ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($winners as $winnerId){\n\t\t\t\t$x.= \" - checking winner $winnerId :\\n\";\n\t\t\t\t//search for pots who has this player id\n\t\t\t\t$winPlayer=new Player($winnerId);\n\t\t\t\t\t$x.= \" - Winner is $winPlayer->display_name $winPlayer->seat_id has $ $winPlayer->amount :\\n\";\n\t\t\t\t\tforeach ($pots as $id=>$pot){\n\t\t\t\t\t\tif ($pot->amount>0 && $id!=='left_overs'){\n\t\t\t\t\t\t\t$pot->amount+=$leftOvers;\n\t\t\t\t\t\t\t$leftOvers=0;\n\t\t\t\t\t\t\tif (!isset($pot->original_amount)){$pot->original_amount=$pot->amount;}\n\t\t\t\t\t\t\t$winAmount=round($pot->original_amount/$pot_on);\n\t\t\t\t\t\t\tif (in_array($winnerId,$pot->eligible)!==false){\n\t\t\t\t\t\t\t\t$pots[$id]->amount-=$winAmount;\n\t\t\t\t\t\t\t\t$winPlayer->amount+=$winAmount;\n\t\t\t\t\t\t\t\t$table->dealerChat($winPlayer->profile_link.' has won the pot <label class=\"cash_win\">($'.$winAmount.')</label> '.$winText.' .');\n\t\t\t\t\t\t\t\tif ($winAmount>0){$winPlayer->won=5;}else{$winPlayer->won=0;}\n\t\t\t\t\t\t\t\tif (substr($winPlayer->bet_name,0,6)=='<label'){\n\t\t\t\t\t\t\t\t\t$oldAmount=substr($winPlayer->bet_name,26,strpos($winPlayer->bet_name,'</label>')-26);\n\t\t\t\t\t\t\t\t\t$oldAmount+=$winAmount;\n\t\t\t\t\t\t\t\t\t$winPlayer->bet_name='<label class=\"winLabel\">+$'.$oldAmount.'</label>';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$winPlayer->bet_name='<label class=\"winLabel\">+$'.$winAmount.'</label>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$winPlayer->saveBetData();\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\t\n\t\t\t}//\n\t\t\t\n\t\t}//\n\t\tfile_put_contents('wins.txt',$x);\n\t\n\t}", "abstract public function pickWinner($reset = FALSE, $bypass_used_info = FALSE);", "public function isWinnerCombinationPresent(array $boardState) : bool;", "function statusAfterRoll($rolledNumber, $currentPlayer) {\n\t}", "function nomside($id){\nif (($id) == 1 || ($id) == 3 || ($id) == 4 || ($id) == 7 || ($id) == 11) \n{ \necho \"alliance\";\n}\nelse \n{ \necho \"horde\";\n}\n}" ]
[ "0.68886536", "0.6453478", "0.6437333", "0.6333727", "0.6307213", "0.6273931", "0.624584", "0.6217939", "0.616523", "0.61190385", "0.60731834", "0.6040307", "0.6033046", "0.6025202", "0.59888196", "0.5966481", "0.5951794", "0.5896567", "0.58789885", "0.587759", "0.5874849", "0.5816314", "0.57836485", "0.5684183", "0.5673907", "0.5579901", "0.5560064", "0.5510434", "0.5501064", "0.5481444", "0.5458005", "0.5449423", "0.54448843", "0.54300207", "0.5428922", "0.54080296", "0.53962135", "0.53780717", "0.5362946", "0.5353169", "0.53335375", "0.5315243", "0.53086597", "0.5284075", "0.527822", "0.5275422", "0.52683353", "0.5254248", "0.52387923", "0.5232643", "0.5211695", "0.52095485", "0.51930034", "0.5181279", "0.5167611", "0.51569605", "0.515669", "0.51560557", "0.5149199", "0.51481324", "0.5147712", "0.5147712", "0.51379114", "0.5126716", "0.5121553", "0.51126915", "0.5110958", "0.50990653", "0.5095906", "0.5086811", "0.5079979", "0.50642556", "0.5061014", "0.5052856", "0.5052158", "0.5044606", "0.5031133", "0.50192666", "0.5012863", "0.5011194", "0.5009389", "0.5002923", "0.4994346", "0.49843803", "0.4981043", "0.49807912", "0.4976428", "0.49581152", "0.4953769", "0.49522075", "0.49490896", "0.49430203", "0.493667", "0.4929779", "0.4921565", "0.4919058", "0.49111786", "0.49110427", "0.490499", "0.49043882", "0.48989764" ]
0.0
-1
Where deck is either $p1Deck or $p2Deck
function displayDeck($deck, $id) { echo "<select name='$id' class='deckPicker'>\n"; foreach($deck as $card) { echo "<option data-img-src='gamepieces/$card.jpg' data-img-class='card' value='$card'/>"; } echo "</select>\n"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rpc ($p1, $p2) {\n if ($p1 === $p2) {\n \t$result = 'Draw!';\n } elseif (($p1 == 'scissors' && $p2 == 'paper') || ($p1 == 'paper' && $p2 == 'rock') || ($p1 == 'rock' && $p2 == 'scissors')) {\n \t$result = 'Player 1 won!';\n } elseif (($p2 == 'scissors' && $p1 == 'paper') || ($p2 == 'paper' && $p1 == 'rock') || ($p2 == 'rock' && $p1 == 'scissors')) {\n \t$result = 'Player 2 won!';\n }\n return $result;\n}", "function compare_hands(array $hand1, array $hand2): int {\n // get hands ranking\n $hand1rank = poker_rank($hand1);\n $hand2rank = poker_rank($hand2);\n\n // at first, check ranking\n if ($hand1rank['rank'] > $hand2rank['rank']) return 1;\n if ($hand1rank['rank'] < $hand2rank['rank']) return -1;\n\n // if ranking is the same, compare ranking value\n $by_value = by_value($hand1rank['result']['value'][0], $hand2rank['result']['value'][0]);\n if ($by_value !== 0) return $by_value;\n\n // if value consists of two values, compare the second\n if (strlen($hand1rank['result']['value']) === 2) {\n $by_value = by_value($hand1rank['result']['value'][1], $hand2rank['result']['value'][1]);\n if ($by_value !== 0) return $by_value;\n }\n\n // compare remaining cards\n $remaining1 = $hand1rank['result']['remaining'];\n $remaining2 = $hand2rank['result']['remaining'];\n while (count($remaining1) > 0) {\n $rem1 = highest_value_card($remaining1);\n $rem2 = highest_value_card($remaining2);\n $by_value = by_value($rem1['value'], $rem2['value']);\n\n if ($by_value !== 0) return $by_value;\n\n $remaining1 = $rem1['remaining'];\n $remaining2 = $rem2['remaining'];\n }\n\n // tie\n return 0;\n}", "function compare_cards($lhs, $rhs) {\n // Ignore the suit\n $lhs = substr($lhs, 1);\n $rhs = substr($rhs, 1);\n\n // Elevate the Aces\n if($lhs == 1) $lhs = 1000;\n if($rhs == 1) $rhs = 1000;\n\n // Spaceships!\n // Pew pew pew\n // and you said you'd never found a use for them...\n return $lhs <=> $rhs;\n}", "public function card_list_query($deck){\n\n }", "function game(&$deck,&$players,&$stack)\n{\n $end = false;\n $skip = false;\n $takeCards = 0;\n\n //now the turns will begin until the game ends\n while($end != true)\n {\n //loop through players\n foreach ($players as &$p)\n {\n //check last played card\n $stackIndex = count($stack)-1;\n $lastcard = $stack[$stackIndex];\n\n if ($skip) {\n echo $p['name'].\" has to skip their turn.<br>\";\n $skip = false;\n continue;\n }\n\n $index = 0;\n $played = false;\n $turn = true;\n\n while($turn)\n {\n //Loop through the players hand to find compatible card if the player hasn't played yet\n if ($takeCards > 0){\n foreach ($p['hand'] as &$h)\n {\n //check if this card is compatible with the card on the stack\n if($h['name'] == '2')\n {\n if($h['name'] === '2')\n {\n $takeCards = $takeCards+2;\n echo $p['name'].' plays '.$h['name'].$h['symbol'].\". Since it is a 2 the next player has to take \" . $takeCards . \" cards or play a 2.<br>\";\n } else{\n echo $p['name'].' plays '.$h['name'].$h['symbol'].\".<br>\";\n }\n array_push($stack,$h);\n array_splice($p['hand'],$index,1);\n $played = true;\n $turn = false;\n }\n $index++;\n }\n if (!$played) {\n echo $p['name'].\" can't play, \";\n dealCards($deck,$p,$stack,$takeCards);\n $turn = false;\n $takeCards = 0;\n }\n } else {\n foreach ($p['hand'] as &$h)\n {\n if(!$played && !$end)\n {\n\n //check if this card is compatible with the card on the stack\n if($h['name'] == $lastcard['name']|| $h['symbol'] == $lastcard['symbol'])\n {\n if($h['name'] === '7')\n {\n echo $p['name'].' plays '.$h['name'].$h['symbol'].\". Since it is a 7 they can play again.<br>\";\n }else if($h['name'] === '8')\n {\n echo $p['name'].' plays '.$h['name'].$h['symbol'].\". Since it is a 8 the next player has to skip their turn.<br>\";\n $skip = true;\n }else if($h['name'] === '2')\n {\n echo $p['name'].' plays '.$h['name'].$h['symbol'].\". Since it is a 2 the next player has to take 2 cards or play a 2.<br>\";\n $takeCards = $takeCards+2;\n } else{\n echo $p['name'].' plays '.$h['name'].$h['symbol'].\".<br>\";\n }\n array_push($stack,$h);\n array_splice($p['hand'],$index,1);\n if($h['name'] != '7')\n {\n $played = true;\n $turn = false;\n }\n }\n }\n $index++;\n }\n\n //check if players hand is empty, if so game is over\n if(count($p['hand']) == 0)\n {\n echo $p['name'].' won<br>';\n $end = true;\n die();\n }\n\n //check if the players has played this turn, else take a card\n if (!$played)\n {\n echo $p['name'].\" can't play, \";\n dealCards($deck,$p,$stack);\n $turn = false;\n }\n }\n }\n }\n }\n}", "function deck_card_in_deck(int $user_id, int $unit_id): int\r\n{\r\n\tglobal $DATABASE;\r\n\t\r\n\t$data = $DATABASE->execute_query(\"SELECT deck_table, main_deck FROM `users` WHERE user_id = $user_id\")[0];\r\n\t\r\n\tforeach($DATABASE->execute_query(\"SELECT deck_num, deck_members FROM `{$data[0]}`\") as $deck)\r\n\t{\r\n\t\tforeach(explode(':', $deck[1]) as $member)\r\n\t\t{\r\n\t\t\tif($member == $unit_id)\r\n\t\t\t\treturn $deck[0] == $data[1] ? 2 : 1;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn 0;\r\n}", "public static function isMatch(iDeck $deck) : bool;", "function proto($a, $b){\r\n $dbManager = new DatabasesManager();\r\n $selectPro = $dbManager->getPdo()->prepare(\"SELECT * FROM prestation INNER JOIN provider ON provider.id = prestation.fk_provider WHERE s_date NOT BETWEEN ? AND ? AND end_date NOT BETWEEN ? AND ? AND (NOT s_date < ? OR NOT end_date > ?)\");\r\n $selectPro->execute([$a, $b, $a, $b, $a, $b]);\r\n return $selectPro;\r\n}", "public function isSameFood($foodA, $foodB);", "function variant_or($left, $right) {}", "function two_pairs(array $hand) {\n if (count($hand) < 4) return false;\n\n $values = cards_values($hand);\n\n $dups = [];\n foreach(array_count_values($values) as $val => $c)\n if($c === 2) $dups[] = strval($val);\n\n if (count($dups) != 2) return false;\n\n usort($dups, \"by_value\");\n $val = strrev(implode($dups));\n\n return ['value' => $val, 'remaining' => remove_values(remove_values($hand, $val[0]), $val[1])];\n}", "public function two()\n {\n $mockCriterionOne = $this->getMock('stubCriterion');\n $mockCriterionOne->expects($this->once())->method('toSQL')->will($this->returnValue('foo'));\n $this->assertSame($this->orCriterion, $this->orCriterion->addCriterion($mockCriterionOne));\n $mockCriterionTwo = $this->getMock('stubCriterion');\n $mockCriterionTwo->expects($this->once())->method('toSQL')->will($this->returnValue('bar'));\n $this->assertSame($this->orCriterion, $this->orCriterion->addCriterion($mockCriterionTwo));\n $this->assertTrue($this->orCriterion->hasCriterion());\n $this->assertEquals('(foo OR bar)', $this->orCriterion->toSQL());\n }", "function variant_and($left, $right) {}", "function common_el($l1, $l2) {\n $vx = lvar('x');\n\n return conj(\n choice($vx, $l1),\n choice($vx, $l2));\n}", "private static function pipelinesMatch(Pipeline $p1, Pipeline $p2): bool\n {\n $params1 = $p1->getParametersValues(true);\n $params2 = $p2->getParametersValues(true);\n\n if (count($params1) !== count($params2)) {\n return false;\n }\n\n foreach ($params1 as $key => $value) {\n if ($value !== $params2[$key]) {\n return false;\n }\n }\n\n return true;\n }", "public function checkForWinner($playerOne, $playerTwo){\n if(($playerOne == 1 && $playerTwo == 2) || ($playerOne == 2 && $playerTwo == 3 || ($playerOne == 3 && $playerTwo == 1))){\n $this->printResult($playerOne, $playerTwo, 1);\n return 1;\n }elseif(($playerOne == 1 && $playerTwo == 1) || ($playerOne == 2 && $playerTwo == 2) || ($playerOne == 3 && $playerTwo == 3)){\n $this->printResult($playerOne, $playerTwo, 2);\n return 2;\n }else{\n $this->printResult($playerOne, $playerTwo, 3);\n return 3;\n }\n}", "function drawCard(&$hand, &$deck, $drawNumber) {\n\t$card1 = array_rand($deck);\n\t$hand[] = $deck[$card1];\n\tif($drawNumber == 2) {\n\t\t$card2 = array_rand($deck);\n\t\t$hand[] = $deck[$card2];\n\t\tunset($deck[$card2]);\n\t}\n\tunset($deck[$card1]);\n}", "protected static function logicalOR(){\n\t\t$values = func_get_args();\n\t\tif(is_array($values[0])){\n\t\t\t$values = $values[0];\n\t\t}\n\t\treturn self::junction('OR', $values);\n\t}", "public function permutation(int ...$p) : Deck;", "function in_both($type, $A, $B){\n foreach ($A as $A_p => $A_v){\n foreach ($B as $B_p => $B_v){\n switch($type) {\n case \"wifi_global\": //fallthrough\n case \"bluetooth\":\n if ($A_v == $B_v){\n $result[] = $A_v;\n }\n break;\n case \"wifi_local\":\n if (is_anagram($A_v[0], $B_v[0])) {\n if (count($A_v) > count($B_v)) {\n $result[] = $A_v;\n } else {\n $result[] = $B_v;\n }\n }\n break;\n default:\n die(\"function in_both ERROR: Unknown type: \" . $type);\n }\n }\n }\n return $result;\n}", "function splitCards($player, $dealer, $name, $insuranceBet, $bankroll, $bet, $deck) {\n\t//if two cards are same value and ($bankroll >= ($bet*2)), ask if they want to split cards\n\tif (getCardValue($player[0]['card']) == getCardValue($player[1]['card']) && $bankroll >= ($bet*2)) {\n\t\tfwrite(STDOUT, 'Do you want to split your hand? (y)es or (n)o? ') . PHP_EOL;\n\t\t$choice = strtolower(trim(fgets(STDIN)));\n\t\tif ($choice == 'y') {\n\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\t//create two hands, both of which contain one of the cards from previous hand, both with the assigned bet\n\t\t\t\t//draw a card to each new hand\n\t\t\t$firstSplitHandCardOne = $player[0];\n\t\t\t$firstSplitHand[] = $firstSplitHandCardOne;\n\t\t\t$firstSplitHandCardTwo = drawACard($deck);\n\t\t\t$firstSplitHand[] = $firstSplitHandCardTwo;\n\t\t\t$firstSplitHandBet = $bet;\n\t\t\techoPlayer($firstSplitHand, $name);\n\t\t\tif (blackjackCheck($firstSplitHand)) {\n\t\t\t\t$bankroll += ($firstSplitHandBet * 1.50);\n\t\t\t\techo 'Blackjack!! ' . $name . ' wins $' . ($firstSplitHandBet * 1.50) . '!' . PHP_EOL;\n\t\t\t}\n\t\t\twhile (getTotal($firstSplitHand) < 21) {\n\t\t\t\tfwrite(STDOUT, \"(H)it or (S)tay? \") . PHP_EOL;\n\t\t\t\t$decision = strtolower(trim(fgets(STDIN)));\n\t\t\t\t//Stay option\n\t\t\t\tif ($decision == 'h') {\n\t\t\t\t\t$newCard = drawACard($deck);\n\t\t\t\t\t$firstSplitHand[] = $newCard;\n\t\t\t\t\t$total = getTotal($firstSplitHand);\n\t\t\t\t\t//echo out each card and total\n\t\t\t\t\tforeach ($firstSplitHand as $card) {\n\t\t\t\t\t\techo '[' . $card['card'] . ' ' . $card['suit'] . '] ';\n\t\t\t\t\t}\n\t\t\t\t\techo $name . ' total = ' . $total . PHP_EOL;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$secondSplitHandCardOne = $player[1];\n\t\t\t$secondSplitHand[] = $secondSplitHandCardOne;\n\t\t\t$secondSplitHandCardTwo = drawACard($deck);\n\t\t\t$secondSplitHand[] = $secondSplitHandCardTwo;\n\t\t\t$secondSplitHandBet = $bet;\n\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\techoPlayer($secondSplitHand, $name);\n\t\t\tif (blackjackCheck($secondSplitHand)) {\n\t\t\t\t$bankroll += ($secondSplitHandBet * 1.50);\n\t\t\t\techo 'Blackjack!! ' . $name . ' wins $' . ($secondSplitHandBet * 1.50) . '!' . PHP_EOL;\n\t\t\t}\n\t\t\twhile (getTotal($secondSplitHand) < 21) {\n\t\t\t\tfwrite(STDOUT, \"(H)it or (S)tay? \") . PHP_EOL;\n\t\t\t\t$decision = strtolower(trim(fgets(STDIN)));\n\t\t\t\t//Stay option\n\t\t\t\tif ($decision == 'h') {\n\t\t\t\t\t$newCard = drawACard($deck);\n\t\t\t\t\t$secondSplitHand[] = $newCard;\n\t\t\t\t\t$total = getTotal($secondSplitHand);\n\t\t\t\t\t//echo out each card and total\n\t\t\t\t\tforeach ($secondSplitHand as $card) {\n\t\t\t\t\t\techo '[' . $card['card'] . ' ' . $card['suit'] . '] ';\n\t\t\t\t\t}\n\t\t\t\t\techo $name . ' total = ' . $total . PHP_EOL;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\techo 'Dealer: ' . PHP_EOL; \n\t\t\techoDealer($dealer, false);\n\t\t\t$dealer = dealerHit ($deck, $dealer);\n\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\t//Evaluate Hands\n\t\t\t//evaluate if dealer busts, both hands win\n\n\t\t\t//evaluate first hand\n\t\t\t//evaluate first hand busts\n\t\t\techoDealer($dealer, false);\n\t\t\techoPlayer($firstSplitHand, $name);\n\t\t\tif (getTotal($firstSplitHand) > 21 && !blackjackCheck($firstSplitHand)) {\n\t\t\t\t$bankroll -= $firstSplitHandBet;\n\t\t\t\techo 'Dealer wins. ' . $name . ' loses $' . $firstSplitHandBet . PHP_EOL;\n\t\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\t} elseif (getTotal($dealer) > 21 && !blackjackCheck($firstSplitHand)) {\n\t\t\t\t$bankroll += $firstSplitHandBet;\n\t\t\t\techo 'Dealer busted! ' . $name . ' wins $' . $firstSplitHandBet . PHP_EOL;\n\t\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\t} elseif (getTotal($firstSplitHand) == getTotal($dealer) && !blackjackCheck($firstSplitHand)) {\n\t\t\t\techo $name . ' and Dealer push!' . PHP_EOL;\n\t\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\t} elseif (getTotal($firstSplitHand) > getTotal($dealer) && !blackjackCheck($firstSplitHand)) {\n\t\t\t\t$bankroll += $firstSplitHandBet;\n\t\t\t\techo $name . ' wins ' . $firstSplitHandBet . '! ' . PHP_EOL;\n\t\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\t} elseif (getTotal($firstSplitHand) < getTotal($dealer) && !blackjackCheck($firstSplitHand)) {\n\t\t\t\t$bankroll -= $firstSplitHandBet;\n\t\t\t\techo 'Dealer wins! ' . $name . ' loses $' . $firstSplitHandBet . PHP_EOL;\n\t\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\t}\n\t\t\t//evaluate second Hand\n\t\t\t//evaluate if player busts\n\t\t\techoDealer($dealer, false);\n\t\t\techoPlayer($secondSplitHand, $name);\n\t\t\tif (getTotal($secondSplitHand) > 21 && !blackjackCheck($secondSplitHand)) {\n\t\t\t\t$bankroll -= $secondSplitHandBet;\n\t\t\t\techo 'Dealer wins. ' . $name . ' loses $' . $secondSplitHandBet . PHP_EOL;\n\t\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\t} elseif (getTotal($dealer) > 21 && !blackjackCheck($secondSplitHand)) {\n\t\t\t\t$bankroll += $secondSplitHandBet;\n\t\t\t\techo 'Dealer busted! ' . $name . ' wins $' . $secondSplitHandBet . PHP_EOL;\n\t\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\t} elseif (getTotal($secondSplitHand) == getTotal($dealer) && !blackjackCheck($secondSplitHand)) {\n\t\t\t\techo $name . ' and Dealer push!' . PHP_EOL;\n\t\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\t} elseif (getTotal($secondSplitHand) > getTotal($dealer) && !blackjackCheck($secondSplitHand)) {\n\t\t\t\t$bankroll += $secondSplitHandBet;\n\t\t\t\techo $name . ' wins $' . $secondSplitHandBet . '!' . PHP_EOL;\n\t\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\t} elseif (getTotal($secondSplitHand) < getTotal($dealer) && !blackjackCheck($secondSplitHand)) {\n\t\t\t\t$bankroll -= $secondSplitHandBet;\n\t\t\t\techo 'Dealer wins. ' . $name . ' loses $' . $secondSplitHandBet . PHP_EOL;\n\t\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\t}\n\t\t\techoBankroll($bankroll);\n\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\tplayAgain($name, $bankroll);\n\t\t}\n\t}\n}", "static function findPairs( $cards, $ignore_num = 0 ) {\n usort( $cards, array( \"poker\", \"card_cmp\" ) );\n $buffer = 0;\n $second_pair = 0;\n $last_number = 0;\n $no_of_pairs = 0;\n foreach ($cards as $card) {\n if ( $buffer == 0 ) {\n $buffer = $card->number;\n } else {\n if ( $card->number == $buffer && $card->number != $ignore_num ) {\n $buffer = 0;\n if ( $last_number > 0 ) {\n $second_pair = $last_number;\n }\n $last_number = $card->number;\n $no_of_pairs++;\n if ( $no_of_pairs >= 3 ) {\n $no_of_pairs = 2;\n break;\n }\n } else {\n $buffer = $card->number;\n }\n }\n }\n # two pairs, one pair, high card\n if ( $no_of_pairs == 2 ) {\n return array_merge( array( 200+($last_number?$last_number:$buffer), 200+$second_pair ), self::kicker( $cards, 1, array($last_number?$last_number:$buffer, $second_pair) ) );\n } elseif ( $no_of_pairs == 1 ) {\n return array_merge( array( 100+($last_number?$last_number:$buffer) ), self::kicker( $cards, 3, array($last_number?$last_number:$buffer) ) );\n }\n return array_merge( array( $last_number?$last_number:$buffer ), self::kicker( $cards, 4, array($last_number?$last_number:$buffer) ) );\n }", "public function isOr();", "public function lOr(\n ComponentSpecification $specification1,\n ComponentSpecification $specification2\n ) : Specification\\OrSpecification {\n $args = func_get_args();\n $andSpec = new \\ReflectionClass('\\\\ElementTree\\\\Specification\\\\OrSpecification');\n\n return $andSpec->newInstanceArgs($args);\n }", "public function setResByCompets($c1, $c2, $s1, $s2)\r\n {\r\n\r\n $match = $round = 0;\r\n $swap = $foundIt = false;\r\n\r\n foreach ($this->bracket as $r_idx => $r) {\r\n foreach ($r as $m_idx => $m) {\r\n if ($m['c1'] === $c1 && $m['c2'] === $c2 || $m['c1'] === $c2 && $m['c2'] === $c1 && $swap = true) {\r\n if ($swap) {\r\n $tmp = $s1;\r\n $s1 = $s2;\r\n $s2 = $tmp;\r\n }\r\n $match = $m_idx;\r\n $round = $r_idx;\r\n $foundIt = true;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if ($foundIt && $this->setResByMatch($match, $round, $s1, $s2))\r\n return true;\r\n else\r\n return false;\r\n }", "public function equal($pGroup1, $pGroup2) {\n if ($pGroup1['CoGrouperProvisionerGroup']['co_grouper_provisioner_target_id'] \n != $pGroup2['CoGrouperProvisionerGroup']['co_grouper_provisioner_target_id']) {\n return false;\n }\n if ($pGroup1['CoGrouperProvisionerGroup']['co_group_id'] \n != $pGroup2['CoGrouperProvisionerGroup']['co_group_id']) {\n return false;\n }\n if ($pGroup1['CoGrouperProvisionerGroup']['stem'] \n != $pGroup2['CoGrouperProvisionerGroup']['stem']) {\n return false;\n }\n if ($pGroup1['CoGrouperProvisionerGroup']['extension'] \n != $pGroup2['CoGrouperProvisionerGroup']['extension']) {\n return false;\n }\n if ($pGroup1['CoGrouperProvisionerGroup']['description'] \n != $pGroup2['CoGrouperProvisionerGroup']['description']) {\n return false;\n }\n\n return true;\n }", "public function orConstraint(ConstraintInterface $constraint1,\n ConstraintInterface $constraint2);", "function drawHand(&$deck, &$hand) {\n\t$cardOne = drawACard($deck);\n\t$hand[] = $cardOne;\n\t$cardTwo = drawACard($deck);\n\t$hand[] = $cardTwo;\n\treturn $hand;\n}", "function orB($lhs = null, $rhs = null)\n{\n return call_user_func_array(__PRIVATE__::$instance[orB], func_get_args());\n}", "function selectEligibleCards() {\n // Return the number of selected cards that way \n \n // Condition for owner\n $owner_from = self::getGameStateValue('owner_from');\n if ($owner_from == -2) { // Any player\n $condition_for_owner = \"owner <> 0\";\n }\n else if ($owner_from == -3) { // Any opponent\n $player_id = self::getActivePlayerId();\n $opponents = self::getObjectListFromDB(self::format(\"\n SELECT\n player_id\n FROM\n player\n WHERE\n player_team <> (\n SELECT\n player_team\n FROM\n player\n WHERE\n player_id = {player_id}\n )\n \",\n array('player_id' => $player_id)), true\n );\n $condition_for_owner = self::format(\"owner IN ({opponents})\", array('opponents' => join($opponents, ',')));\n }\n else {\n $condition_for_owner = self::format(\"owner = {owner_from}\", array('owner_from' => $owner_from));\n }\n \n // Condition for location\n $location_from = self::decodeLocation(self::getGameStateValue('location_from'));\n if ($location_from == 'revealed,hand') {\n $condition_for_location = \"location IN ('revealed', 'hand')\";\n }\n else if ($location_from == 'pile') {\n $condition_for_location = \"location = 'board'\";\n }\n else {\n $condition_for_location = self::format(\"location = '{location_from}'\", array('location_from' => $location_from));\n }\n \n // Condition for age\n $age_min = self::getGameStateValue('age_min');\n $age_max = self::getGameStateValue('age_max');\n $condition_for_age = self::format(\"age BETWEEN {age_min} AND {age_max}\", array('age_min' => $age_min, 'age_max' => $age_max));\n \n // Condition for color\n $color_array = self::getGameStateValueAsArray('color_array');\n $condition_for_color = count($color_array) == 0 ? \"FALSE\" : \"color IN (\".join($color_array, ',').\")\";\n \n // Condition for icon\n $with_icon = self::getGameStateValue('with_icon');\n $without_icon = self::getGameStateValue('without_icon');\n if ($with_icon > 0) {\n $condition_for_icon = self::format(\"AND (spot_1 = {icon} OR spot_2 = {icon} OR spot_3 = {icon} OR spot_4 = {icon})\", array('icon' => $with_icon));\n }\n else if ($without_icon > 0) {\n $condition_for_icon = self::format(\"AND spot_1 <> {icon} AND spot_2 <> {icon} AND spot_3 <> {icon} AND spot_4 <> {icon}\", array('icon' => $without_icon));\n }\n else {\n $condition_for_icon = \"\";\n }\n \n // Condition for id\n $not_id = self::getGameStateValue('not_id');\n if ($not_id != -2) { // Only used by Fission and Self service\n $condition_for_id = self::format(\"AND id <> {not_id}\", array('not_id' => $not_id));\n }\n else {\n $condition_for_id = \"\";\n }\n \n if (self::getGameStateValue('splay_direction') == -1 && $location_from == 'board') {\n // Only the active card can be selected\n self::DbQuery(self::format(\"\n UPDATE\n card\n LEFT JOIN\n (SELECT owner AS joined_owner, color AS joined_color, MAX(position) AS position_of_active_card FROM card WHERE location = 'board' GROUP BY owner, color) AS joined\n ON\n owner = joined_owner AND\n color = joined_color\n SET\n selected = TRUE\n WHERE\n {condition_for_owner} AND\n {condition_for_location} AND\n {condition_for_age} AND\n position = position_of_active_card AND\n {condition_for_color}\n {condition_for_icon}\n {condition_for_id}\n \",\n array(\n 'condition_for_owner' => $condition_for_owner,\n 'condition_for_location' => $condition_for_location,\n 'condition_for_age' => $condition_for_age,\n 'condition_for_color' => $condition_for_color,\n 'condition_for_icon' => $condition_for_icon,\n 'condition_for_id' => $condition_for_id\n )\n ));\n }\n else {\n self::DbQuery(self::format(\"\n UPDATE\n card\n SET\n selected = TRUE\n WHERE\n {condition_for_owner} AND\n {condition_for_location} AND\n {condition_for_age} AND\n {condition_for_color}\n {condition_for_icon}\n {condition_for_id}\n \",\n array(\n 'condition_for_owner' => $condition_for_owner,\n 'condition_for_location' => $condition_for_location,\n 'condition_for_age' => $condition_for_age,\n 'condition_for_color' => $condition_for_color,\n 'condition_for_icon' => $condition_for_icon,\n 'condition_for_id' => $condition_for_id\n )\n ));\n }\n \n //return self::DbAffectedRow(); // This does not seem to work all the time...\n return self::getUniqueValueFromDB(\"SELECT COUNT(*) FROM card WHERE selected IS TRUE\");\n }", "protected function shuffle_cards($deck = array()) {\n if(count($deck) == 0){\n $deck = $this->get_deck();\n }\n \n for ($i = 0; $i != $this->shuffle; $i++) {\n mt_srand((double) microtime() * 1000000);\n $offset = mt_rand(10, 40);\n //First we will split our deck cards:\n $sliced_cards[0] = array_slice($deck, 0, $offset);\n $sliced_cards[1] = array_slice($deck, $offset, 52);\n\n //Then Shuffle Eeach\n shuffle($sliced_cards[0]);\n shuffle($sliced_cards[1]);\n\n //Reverse each pile\n $sliced_cards[0] = array_reverse($sliced_cards[0]);\n $sliced_cards[1] = array_reverse($sliced_cards[1]);\n\n //Re-Shuffle\n shuffle($sliced_cards[0]);\n shuffle($sliced_cards[1]);\n\n //Merge both stacks\n $unsliced = array_merge($sliced_cards[0], $sliced_cards[1]);\n\n //And another shuffle\n shuffle($unsliced);\n\n //Add in a flip\n array_flip($unsliced);\n }\n $this->set_deck($unsliced);\n\n return $this;\n }", "public function isAnd();", "function compete($a,$b){\n $p = intval(100 * getWinProb($a['elo']-$b['elo']));\n $expected = ($a['elo']>=$b['elo']) ? $a['name'] : $b['name'];\n $percent = ($a['elo']>=$b['elo']) ? $p.'%' : (100-$p).'%';\n $n = mt_rand(1,100);\n $winner = ($n<=$p) ? $a['name'] : $b['name'];\n \n //echo sprintf(\"Now Playing: %s (%s) vs. %s (%s) \\n\", $a['name'], $a['elo'], $b['name'], $b['elo']);\n //echo sprintf(\"Expected winner: %s (%s)\\n\", $expected, $percent);\n //echo sprintf(\"Actual winner: %s\\n\\n\", $winner);\n return ($n<=$p) ? $a : $b;\n}", "public function comparerReponses($rep1, $rep2) {\r\n $somme = 0;\r\n for($i = 1; $i <= 5; $i++) {\r\n if(getBit($rep1, $i) == getBit($rep2, $i)) {\r\n $somme++;\r\n }\r\n }\r\n return $somme;\r\n }", "function masteryDataCompareHighToLow($champA, $champB)\n{\n if(intval($champA['championPoints']) < intval($champB['championPoints']))\n {\n return 1;\n }\n // the first item's points are higher than the second, so we need to return something < 0\n else if(intval($champA['championPoints']) > intval($champB['championPoints']))\n {\n return -1;\n }\n // the mastery percents are the same, so we'll go in numerical order based on champion ID\n else\n {\n // sort by champion ID, lowest to highest\n // the first item's ID is higher than the second, return something > 0\n if(intval($champA['championId']) > intval($champB['championId']))\n {\n return 1;\n }\n // the first item's ID is lower than the second, return something < 0\n if(intval($champA['championId']) < intval($champB['championId']))\n {\n return -1;\n }\n // the IDs are the same??? This should never happen...\n else\n {\n return 0;\n }\n }\n}", "private function populateBoth($feed) {\n\t\t\t\t$this->pickFromLeft = [];\n\t\t\t\t$this->pickFromRight = [];\n\t\t\t\tforeach ($feed as $key => $twoPart) {\n\t\t\t\t\tarray_push($this->pickFromRight, $twoPart[1]);\n\t\t\t\t\t$candidate = $twoPart[0];\n\t\t\t\t\t$found = in_array($candidate, $this->pickFromLeft);\n\t\t\t\t\tif ($found==false) {\n\t\t\t\t\t\tarray_push($this->pickFromLeft, $candidate);\t\t\t\t\n\t\t\t\t\t} # End If\n\t\t\t\t} # End Loop\n\t\t\t}", "function pick_in(){\n $args = func_get_args();\n\n $possibles = array_pop($args);\n $value = first(array_filter($args));\n return in_array($value, $possibles) ? $value : first($possibles);\n}", "function noDuplicates($set1, $set2) {\n\t\t$noDuplicate = null;\n if ($set1 == null || $set2 == null) {\n return $noDuplicate;\n } else {\n foreach (array_keys($set1) as $key) {\n if (isset($set2[$key])) {\n $noDuplicate = $key;\n break;\n }\n \t }\n }\n return $noDuplicate;\n\t}", "public function findTeamForPlayers(Player $playerOne, Player $playerTwo)\n {\n $rsm = new ResultSetMapping;\n $rsm->addEntityResult('KickFoo\\Domain\\Entity\\Team', 't');\n $rsm->addFieldResult('t', 'id', 'id');\n $rsm->addFieldResult('t', 'name', 'name');\n\n $sql = \"SELECT t . *\nFROM `kickfoo_teams` t\nJOIN `kickfoo_player_teams` pt ON pt.team_id = t.id\nWHERE pt.`player_id` = :playerOne\nAND pt.`team_id`\nIN (\n\nSELECT pt2.`team_id`\nFROM `kickfoo_player_teams` pt2\nWHERE pt2.`player_id` = :playerTwo\n)\";\n \n $query = $this->_em->createNativeQuery($sql, $rsm);\n $query->setParameter('playerOne', $playerOne);\n $query->setParameter('playerTwo', $playerTwo);\n \n return $query->getOneOrNullResult();\n }", "function cargarP1($cargo1,$cargo2){\n $sql=\"SELECT nombrecandidato,cargocandidato,imagencandidato,idlista,idcandidato,apellidocandidato FROM candidato\n WHERE (cargocandidato='$cargo1' OR cargocandidato='$cargo2')\n ORDER BY idlista,cargocandidato asc;\";\n return $sql;\n }", "public function getHandName($playerHand){\n $result = 'Scissor';\n\n if($playerHand == 1){\n $result = 'Rock';\n }elseif($playerHand == 2) {\n $result = 'Paper';\n }\n return $result;\n\n}", "function verifDemande($id1, $id2) {\n\t\t$selectPrepa = self::$bdd -> prepare(\"SELECT * FROM demandeami WHERE (envoyeur = '$id2' AND receveur = '$id1') OR (envoyeur = '$id1' AND receveur = '$id2')\");\n\t\t$selectPrepa -> execute();\n\t\treturn $selectPrepa -> rowCount();\n\t}", "function match( $cad, $cad2 ) \n{\n\treturn strcasecmp( $cad, $cad2 ) == 0; // Son iguales\n}", "public function findConversationByUsers(int $first_user_id, int $second_user_id)\n {\n $qb = $this->createQueryBuilder('c');\n // NOTE: try not to use native sql, a chance to master doctrine queries\n /*\n * [php]\n * // (u.type = ?1) AND (u.role = ?2)\n * $expr->andX($expr->eq('u.type', ':1'), $expr->eq('u.role', ':2'));\n *\n */\n $qb->where(\n $qb->expr()->orX(\n $qb->expr()->andX(\n $qb->expr()->eq('c.first_user', ':first_user_id'),\n $qb->expr()->eq('c.second_user', ':second_user_id')\n ),\n $qb->expr()->andX(\n $qb->expr()->eq('c.first_user', ':second_user_id'),\n $qb->expr()->eq('c.second_user ', ':first_user_id')\n )\n ) // end of andX\n )// end of where\n// ->andWhere('c.first_user = :first_user_id')// This wil be an expression im pretty sure what i did here isn't gonna workm just putting the bricks where they belong\n// ->andWhere('c.first_user = :second_user_id')\n// ->orWhere('c.second_user = :first_user_id')\n// ->andWhere('c.first_user = :second_user_id')\n ->setParameter('first_user_id', $first_user_id)\n ->setParameter('second_user_id', $second_user_id);\n\n\n return $qb\n ->getQuery()\n ->getOneOrNullResult();\n }", "static function _OR($params1, $params2){\n /* del parametro 1 separa el campo del valor */\n $params_1 = explode('=', $params1);\n $campo1 = trim($params_1[0]);\n $var1 = trim($params_1[1]);\n\n /* del parametro 2 separa el campo del valor */\n $params_2 = explode('=', $params2);\n $campo2 = trim($params_2[0]);\n $var2 = trim($params_2[1]);\n\n if($campo1 != $campo2)\n throw new \\Exception('Unexpected error creating OR clause. The fields involved should be the same.');\n\n /* busca si existe el campo en el modelo en cuestion */\n if(aModels::findFieldModel($campo1) == 'STRING'){\n return \"(\". $campo1 . \"= '\" .(strip_tags($var1)). \"' {or} \". $campo2 . \"= '\" .(strip_tags($var2)) .\"')\";\n }else\n return '('. $params1 . ' {or} '. $params2 .')';\n }", "function getDeckFlashcards($deckId)\r\n{\r\n // after user selects a deck, get flashcards with that deck's id\r\n global $dbh;\r\n\r\n // 1. define the query\r\n $sql = \"SELECT pairId, question, answer FROM flashcard WHERE deckId = :deckId\";\r\n\r\n // 2. prepare the statement\r\n $statement = $dbh->prepare($sql);\r\n\r\n // 3. bind parameters\r\n $statement->bindParam(':deckId', $deckId, PDO::PARAM_INT);\r\n\r\n // 4. execute the statement\r\n $statement->execute();\r\n\r\n // 5. Return the result\r\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n // returns all flashcards with given deckId\r\n return $result;\r\n}", "public function two()\n {\n $inCriterion = new stubInCriterion('foo', array('bar', 'dummy'));\n $this->assertEquals(\"`foo` IN ('bar', 'dummy')\", $inCriterion->toSQL());\n $inCriterion = new stubInCriterion('foo', array('bar', 'dummy'), 'baz');\n $this->assertEquals(\"`baz`.`foo` IN ('bar', 'dummy')\", $inCriterion->toSQL());\n }", "function transferCardFromTo($card, $owner_to, $location_to, $bottom_to=false, $score_keyword=false) {\n if ($location_to == 'deck') { // We always return card at the bottom of the deck\n $bottom_to = true;\n }\n \n $id = $card['id'];\n $age = $card['age'];\n $color = $card['color'];\n $owner_from = $card['owner'];\n $location_from = $card['location'];\n $position_from = $card['position'];\n $splay_direction_from = $card['splay_direction'];\n \n // Determine the splay direction of destination if any\n if ($location_to == 'board') {\n // The card must continue the current splay\n $splay_direction_to = self::getCurrentSplayDirection($owner_to, $color);\n }\n else { // $location_to != 'board'\n $splay_direction_to = 'NULL';\n }\n \n // Filters for cards of the same family: the cards of the decks are grouped by age, whereas the cards of the board are grouped by player and by color\n // Filter from\n $filter_from = self::format(\"owner = {owner_from} AND location = '{location_from}'\", array('owner_from' => $owner_from, 'location_from' => $location_from));\n switch ($location_from) {\n case 'deck':\n case 'hand':\n case 'score':\n $filter_from .= self::format(\" AND age = {age}\", array('age' => $age));\n break;\n case 'board':\n $filter_from .= self::format(\" AND color = {color}\", array('color' => $color));\n break;\n default:\n break;\n }\n \n // Filter to\n $filter_to = self::format(\"owner = {owner_to} AND location = '{location_to}'\", array('owner_to' => $owner_to, 'location_to' => $location_to));\n switch ($location_to) {\n case 'deck':\n case 'hand':\n case 'score':\n $filter_to .= self::format(\" AND age = {age}\", array('age' => $age));\n break;\n case 'board':\n $filter_to .= self::format(\" AND color = {color}\", array('color' => $color));\n break;\n default:\n break;\n }\n \n // Get the position of destination and update some other card positions if needed\n if ($bottom_to) { // The card must go to bottom of the location: update the position of the other cards accordingly\n // Execution of the query\n self::DbQuery(self::format(\"\n UPDATE\n card\n SET\n position = position + 1\n WHERE\n {filter_to}\n \",\n array('filter_to' => $filter_to)\n ));\n $position_to = 0;\n }\n else { // $bottom_to is false\n // new_position = number of cards in the location\n $position_to = self::getUniqueValueFromDB(self::format(\"\n SELECT\n COUNT(position)\n FROM\n card\n WHERE\n {filter_to}\n \",\n array('filter_to' => $filter_to)\n )); \n }\n\n // Execute the transfer\n self::DbQuery(self::format(\"\n UPDATE\n card\n SET\n owner = {owner_to},\n location = '{location_to}',\n position = {position_to},\n selected = FALSE,\n splay_direction = {splay_direction_to}\n WHERE\n id = {id}\n \",\n array('owner_to' => $owner_to, 'location_to' => $location_to, 'position_to' => $position_to, 'id' => $id, 'splay_direction_to' => $splay_direction_to)\n ));\n \n // Update the position of the cards of the location the transferred card came from to fill the gap\n self::DbQuery(self::format(\"\n UPDATE\n card\n SET\n position = position - 1 \n WHERE\n {filter_from} AND\n position > {position_from}\n \",\n array('filter_from' => $filter_from, 'position_from' => $position_from)\n ));\n\n \n $transferInfo = array(\n 'owner_from' => $owner_from, 'location_from' => $location_from, 'position_from' => $position_from, 'splay_direction_from' => $splay_direction_from, \n 'owner_to' => $owner_to, 'location_to' => $location_to, 'position_to' => $position_to, 'splay_direction_to' => $splay_direction_to, \n 'bottom_to' => $bottom_to, 'score_keyword' => $score_keyword\n );\n \n // Update the current state of the card\n $card['owner'] = $owner_to;\n $card['location'] = $location_to;\n $card['position'] = $position_to; \n $card['splay_direction'] = $splay_direction_to;\n \n $current_state = $this->gamestate->state();\n if ($current_state['name'] != 'gameSetup') {\n try {\n self::updateGameSituation($card, $transferInfo);\n }\n catch (EndOfGame $e) {\n self::trace('EOG bubbled from self::transferCardFromTo');\n throw $e; // Re-throw exception to higher level\n }\n finally {\n // Determine if the loss of the card from its location of depart breaks a splay. If it's the case, change the splay_direction of the remaining card to unsplay (a notification being sent).\n if ($location_from == 'board' && $splay_direction_from > 0) {\n $number_of_cards_in_pile = self::getUniqueValueFromDB(self::format(\"\n SELECT\n COUNT(*)\n FROM\n card\n WHERE\n owner={owner_from} AND\n location='board' AND\n color={color}\n \",\n array('owner_from'=>$owner_from, 'color'=>$color)\n ));\n \n if ($number_of_cards_in_pile <= 1) {\n self::splay($owner_from, $color, 0); // Unsplay\n }\n }\n }\n }\n return $card;\n }", "public function and_on($c1, $op, $c2)\n {\n return $this->on($c1, $op, $c2);\n }", "function sontAmis($id1, $id2) {\n\t\t$selectPrepa = self::$bdd -> prepare(\"SELECT * FROM etreamis WHERE (idUtilisateur1 = '$id1' AND idUtilisateur2 = '$id2') OR (idUtilisateur1 = '$id2' AND idUtilisateur2 = '$id1')\");\n\t\t$selectPrepa -> execute();\n\t\t$result = $selectPrepa -> rowCount();\n\t\treturn ($result) ? true : false;\n\t}", "public function testGetDecksWithTag() {\n $title = \"Deck1\";\n $tags = array(\"aaa\", \"bbb\", \"ccc\");\n $deckid_1 = $this->user->add_deck($title, $tags, true, $this->con);\n\n // add the deck 2\n $title = \"Deck2\";\n $tags = array(\"aaa\", \"bbb\", \"ddd\");\n $deckid_2 = $this->user->add_deck($title, $tags, true, $this->con);\n\n // add the deck 3\n $title = \"Deck3\";\n $tags = array(\"aaa\", \"ccc\", \"eee\");\n $deckid_3 = $this->user->add_deck($title, $tags, true, $this->con);\n\n $deckids_aaa = Tag::get_decks_with_tag(\"aaa\", $this->con);\n $deckids_aaa_exp = array($deckid_1, $deckid_2, $deckid_3);\n $this->assertEquals($deckids_aaa_exp, $deckids_aaa);\n\n $deckids_ccc = Tag::get_decks_with_tag(\"ccc\", $this->con);\n $deckids_ccc_exp = array($deckid_1, $deckid_3);\n $this->assertEquals($deckids_ccc_exp, $deckids_ccc);\n \n // delete decks\n delete_from(\"decks\", \"\", \"\", $this->con);\n // delete tags\n delete_from(\"tags\", \"\", \"\", $this->con);\n }", "private function q2($answer) {\n\t\t// TODO: make sure no other consecutive questions have identical answers\n\t\tswitch ($answer) {\n\t\t\tcase A:\n\t\t\t\treturn $this->a(6) == $this->a(7);\n\t\t\tcase B:\n\t\t\t\treturn $this->a(6) == $this->a(7);\n\t\t\tcase C:\n\t\t\t\treturn $this->a(6) == $this->a(7);\n\t\t\tcase D:\n\t\t\t\treturn $this->a(6) == $this->a(7);\n\t\t\tcase E:\n\t\t\t\treturn $this->a(6) == $this->a(7);\n\t\t}\n\t\t\n\t}", "public function winner($resultOne, $resultTwo){\n if($resultOne > $resultTwo){\n echo 'You are Winner';\n }else{\n echo 'You are Loser';\n }\n }", "function one_pair(array $hand) {\n $values = cards_values($hand);\n\n $dups = [];\n foreach(array_count_values($values) as $val => $c)\n if($c === 2) $dups[] = strval($val);\n\n if (count($dups) === 0) return false;\n\n usort($dups, \"by_value\");\n $val = $dups[count($dups) - 1];\n\n return ['value' => $val, 'remaining' => remove_values($hand, $val)];\n}", "function hasRecordOfTwoConds($tableName, $key1, $val1, $key2, $val2)\r\n{\r\n\t$sql = \"select * from \" . $tableName . \" where \" . wrapCol($key1) . \"=\" . wrapStr($val1) . \" and \" . wrapCol($key2) . \"=\" . wrapStr($val2);\r\n\t$result = mysql_query($sql);\r\n\tif(mysql_num_rows($result) > 0)\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "function winner($eq1, $eq2)\n{\n $conn = DBConnect();\n $sql = \"SELECT victoire from Confrontation WHERE equipe1=$eq1 and equipe2=$eq2\";\n if ($exec = $conn->query($sql)->fetchObject()) {\n return $exec->victoire;\n }\n return 0;\n}", "function gamePlay($deck, $player, $dealer, $name, $bankroll, $bet) {\n\tif (blackjackCheck($player)) {\n\t\t$bankroll += ($bet * 1.50);\n\t\techo 'Blackjack!! ' . $name . ' wins $' . ($bet * 1.50) . '!' . PHP_EOL;\n\t\techoBankroll($bankroll);\n\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\tplayAgain($name, $bankroll);\n\t} \n\n\t//insurance bet?\n\t$insuranceBet = playerInsurance($name, $dealer, $bet, $bankroll);\n\n\t//split option here\n\tsplitCards($player, $dealer, $name, $insuranceBet, $bankroll, $bet, $deck);\n\n\t//double down option\n\tdoubleDown($name, $deck, $player, $dealer, $insuranceBet, $deck, $bet, $bankroll);\n\n\t//player must select (H)it or (S)tay\n\thitOrStay($name, $deck, $player, $dealer, $bet, $insuranceBet, $bankroll);\n\tplayAgain($name, $bankroll);\n}", "public function ssbos($string1, $string2) {\r\n if ($this->sex === Cfg::read('db.sex.female')) {\r\n return $string1;\r\n }\r\n return $string2;\r\n }", "protected static function logicalAND(){\n\t\t$values = func_get_args();\n\t\tif(is_array($values[0])){\n\t\t\t$values = $values[0];\n\t\t}\n\t\treturn self::junction('AND', $values);\n\t}", "function egality($nombre1, $nombre2){\n if($nombre1 == $nombre2)//on défini la condition\n return true; //retourne true si la condition est bonne\n }", "public function findBondId($id1, $id2){\n\t\treturn $this->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'member_id' => array($id1, $id2),\n\t\t\t\t'member2_id' => array($id1, $id2)\n\t\t\t)));\n\t}", "function isLandMonster($twig,$land,$deckPlayerOne,$deckPlayerTwo,$deckOrigin)\n {\n // Si terrain du monstre joueur 2 alors boost\n // Sinon rien\n $land->setCard_Land();\n $terrain=$land->getCard_Land();\n $cardPlayerOne=$deckPlayerOne->getMonster();\n $cardPlayerTwo=$deckPlayerTwo->getMonster();\n\n if($terrain[\"id\"]==$cardPlayerOne[\"id\"])\n {\n foreach($deckOrigin as $deck)\n {\n if($deck[\"id\"]==$cardPlayerOne[\"id\"])\n {\n $defense=$deck[\"defense\"];\n }\n }\n if($defense!=$cardPlayerOne[\"defense\"])\n {\n $cardPlayerOne[\"defense\"]=$defense;\n }\n else\n {\n $cardPlayerOne[\"attack\"]*=2;\n }\n } \n if($terrain[\"id\"]==$cardPlayerTwo[\"id\"])\n {\n foreach($deckOrigin as $deck)\n {\n if($deck[\"id\"]==$cardPlayerTwo[\"id\"])\n {\n $defense=$deck[\"defense\"];\n }\n }\n if($defense!=$cardPlayerTwo[\"defense\"])\n {\n $cardPlayerTwo[\"defense\"]=$defense;\n }\n else\n {\n $cardPlayerTwo[\"attack\"]*=2;\n }\n }\n\n\n\n echo $twig->render('index.html.twig');\n }", "function compete2($a,$b){\n $p = intval(100 * getWinProb($a['elo']-$b['elo']));\n $expected = ($a['elo']>=$b['elo']) ? $a['name'] : $b['name'];\n $percent = ($a['elo']>=$b['elo']) ? $p.'%' : (100-$p).'%';\n $tempo = round(($a['tempo']+$b['tempo'])/2);\n $a_score = 0;\n $b_score = 0;\n echo sprintf(\"Now Playing: %s (%s) vs. %s (%s) \\n\", $a['name'], $a['elo'], $b['name'], $b['elo']);\n echo sprintf(\"Expected winner: %s (%s)\\n\", $expected, $percent);\n \n //echo sprintf(\"------------\\n\");\n //echo sprintf(\"| Game Log |\\n\");\n //echo sprintf(\"------------\\n\");\n //echo sprintf(\"Playing %s possessions\\n\\n\",$tempo);\n for($i=0;$i<$tempo;$i++){\n $a_points = playPosession($a['off'],$b['def']);\n $a_score += $a_points;\n $b_points = playPosession($b['off'],$a['def']);\n $b_score += $b_points;\n //echo sprintf(\"Possession #%s\\n\",$i);\n //echo sprintf(\"%s scored %s points\\n\",$a['name'],$a_points);\n //echo sprintf(\"%s scored %s points\\n\",$b['name'],$b_points);\n //echo sprintf(\"Score is %s %s-%s %s\\n\\n\", $a['name'], $a_score, $b_score, $b['name']);\n }\n while($a_score==$b_score){\n $ot = round($tempo/8);\n //echo sprintf(\"Overtime\\n\");\n //echo sprintf(\"Playing %s possessions\\n\", $ot);\n for($i=0;$i<$ot;$i++){\n $a_points = playPosession($a['off'],$b['def']);\n $a_score += $a_points;\n $b_points = playPosession($b['off'],$a['def']);\n $b_score += $b_points;\n //echo sprintf(\"Possession #%s\\n\",$i);\n //echo sprintf(\"%s scored %s points\\n\",$a['name'],$a_points);\n //echo sprintf(\"%s scored %s points\\n\",$b['name'],$b_points);\n //echo sprintf(\"Score is %s %s-%s %s\\n\\n\", $a['name'], $a_score, $b_score, $b['name']);\n }\n }\n $winner = ($a_score>$b_score) ? $a['name'] : $b['name'];\n $a_ppp = number_format($a_score/$tempo,3);\n $b_ppp = number_format($b_score/$tempo,3);\n echo sprintf(\"Final score is %s-%s, %s wins\\n\\n\", max($a_score,$b_score), min($a_score,$b_score), $winner);\n //echo sprintf(\"Points per Possession: %s: %s %s: %s\\n\\n\", $a['name'], $a_ppp, $b['name'], $b_ppp);\n return ($a_score>$b_score) ? $a : $b;\n}", "private function adaptersEqual( $adap1, $adap2 )\n {\n return ( $adap1['class'] === $adap2['class'] ) && (\n ( empty( $adap1['options']['exec'] ) ^ empty( $adap2['options']['exec'] ) ) ||\n ( $adap1['options']['exec'] === $adap2['options']['exec'] )\n );\n }", "public function cpSelectGreater($tablename,$value1=0,$value2=0) {\n /*\n * Prepare the select statement\n */\n $sql=\"SELECT * FROM $tablename\";\n if($value1!=0)\n { $key1= key($value1);\n $sql.=\" where $key1>'$value1[$key1]'\";\n }\n if($value1!=0 && $value2!=0) \n {\n $key2= key($value2);\n $sql.=\" AND $key2='$value2[$key2]'\";\n }\n \n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n \n}", "function addPairsIntoDatabase($deckObject)\r\n{\r\n global $dbh;\r\n\r\n $isValid = true;\r\n\r\n //get question and answer arrays from user object\r\n $answerArray = $deckObject->getAnswers();\r\n $questionArray = $deckObject->getQuestions();\r\n\r\n // get deckId from userObject\r\n $deckId = $deckObject->getDeckId();\r\n\r\n //loop through array and insert each flashcard into database\r\n for($i = 0; $i < sizeof($questionArray); $i++) {\r\n $question = $questionArray[$i];\r\n $answer = $answerArray[$i];\r\n\r\n $sql = \"INSERT INTO flashcard (question, answer, deckId) VALUES (:question, :answer, :deckId)\";\r\n\r\n // 2. prepare the statement\r\n $statement = $dbh->prepare($sql);\r\n\r\n // 3. bind parameters\r\n $statement->bindParam(':question', $question, PDO::PARAM_STR);\r\n $statement->bindParam(':answer', $answer, PDO::PARAM_STR);\r\n $statement->bindParam(':deckId', $deckId, PDO::PARAM_INT);\r\n\r\n $success = $statement->execute();\r\n\r\n if(!$success) {\r\n $isValid = false;\r\n }\r\n }\r\n return $isValid;\r\n}", "public function hasMoneyid2(){\n return $this->_has(5);\n }", "public function compare($t1, $t2)\n {\n // Zwangsabstieg prüfen\n if ($t1['static_position']) {\n return 1;\n }\n if ($t2['static_position']) {\n return -1;\n }\n\n // Zuerst die Punkte\n if ($t1['points'] == $t2['points']) {\n // tx_rnbase_util_Debug::debug($t1,'compare'.__LINE__);\n // Die gewonnenen Spiele prüfen\n if ($t1['winCount'] == $t2['winCount']) {\n // Jetzt den Satzquotient prüfen\n $t1setquot = $t1['sets_quot'];\n $t2setquot = $t2['sets_quot'];\n if ($t1setquot == $t2setquot) {\n // Jetzt der Ballquotient\n $t1balls = $t1['balls_quot'];\n $t2balls = $t2['balls_quot'];\n if ($t1balls == $t2balls) {\n // Und jetzt der direkte Vergleich\n $baseData = Util::prepareH2H($this->_teamData, $t1, $t2);\n $t1vst2 = $baseData['t1vst2'];\n $t2vst1 = $baseData['t2vst1'];\n $t1H2HPoints = $baseData['t1H2HPoints'];\n $t2H2HPoints = $baseData['t2H2HPoints'];\n if ($t1H2HPoints == $t2H2HPoints) {\n // dann eben zuerst die Satzdifferenz der 2 Spiele prüfen (Hin- und Rückspiel)\n $t1H2HDiff = 0 + $t1vst2[0] + $t2vst1[1] - $t1vst2[1] - $t2vst1[0];\n $t2H2HDiff = 0 + $t1vst2[1] + $t2vst1[0] - $t1vst2[0] - $t2vst1[1];\n if ($t1H2HDiff == $t2H2HDiff) {\n return 0; // Gleichstand. Entscheidungsspiel wird nicht beachtet\n }\n\n return $t1H2HDiff > $t2H2HDiff ? -1 : 1;\n }\n\n return $t1H2HPoints > $t2H2HPoints ? -1 : 1;\n }\n\n return $t1balls > $t2balls ? -1 : 1;\n }\n\n return $t1setquot > $t2setquot ? -1 : 1;\n }\n\n return $t1['winCount'] > $t2['winCount'] ? -1 : 1;\n }\n\n return $t1['points'] > $t2['points'] ? -1 : 1;\n }", "function startGame() {\n // First game is one card for dealer, two for player\n\n $deck = getCardDeck();\n\n $dealer = array(drawRandomCard($deck));\n $player = array(drawRandomCard($deck), drawRandomCard($deck));\n\n return array($dealer, $player, $deck); \n}", "public function findSimilarDecklists ($decklist_id, $number)\n {\n\n $dbh = $this->get('doctrine')->getConnection();\n \n $list = $dbh->executeQuery(\n \"SELECT\n \t\t\tl.id,\n \t\t\t(\n \t\t\t\tSELECT COUNT(s.id)\n \t\t\t\tFROM decklistslot s\n \t\t\t\tWHERE (\n \t\t\t\t\ts.decklist_id=l.id\n \t\t\t\t\tAND s.card_id NOT IN (\n \t\t\t\t\t\tSELECT t.card_id\n \t\t\t\t\t\tFROM decklistslot t\n \t\t\t\t\t\tWHERE t.decklist_id=?\n \t\t\t\t\t)\n \t\t\t\t)\n \t\t\t\tOR\n \t\t\t\t(\n \t\t\t\t\ts.decklist_id=?\n \t\t\t\t\tAND s.card_id NOT IN (\n \t\t\t\t\t\tSELECT t.card_id\n \t\t\t\t\t\tFROM decklistslot t\n \t\t\t\t\t\tWHERE t.decklist_id=l.id\n \t\t\t\t\t)\n\t\t\t \t)\n \t\t\t) difference\n \t\t\tFROM decklist l\n \t\t\tWHERE l.id!=?\n \t\t\tORDER BY difference ASC\n \t\t\tLIMIT 0,$number\", array(\n $decklist_id,\n $decklist_id,\n $decklist_id\n ))->fetchAll();\n \n $arr = array();\n foreach ($list as $item) {\n \n $dbh = $this->get('doctrine')->getConnection();\n $rows = $dbh->executeQuery(\"SELECT\n\t\t\t\t\td.id,\n\t\t\t\t\td.name,\n\t\t\t\t\td.prettyname,\n\t\t\t\t\td.nbvotes,\n\t\t\t\t\td.nbfavorites,\n\t\t\t\t\td.nbcomments\n\t\t\t\t\tfrom decklist d\n\t\t\t\t\twhere d.id=?\n\t\t\t\t\t\", array(\n $item[\"id\"]\n ))->fetchAll();\n \n $decklist = $rows[0];\n $arr[] = $decklist;\n }\n return $arr;\n \n }", "static function users_have_added_them_both($user1, $user2) {\n global $con;\n $sql = \"SELECT COUNT(`id`) AS 'count' \n FROM `relationship` \n WHERE `user1` = \".$user1.\" AND `user2` = \".$user2.\" AND `relationship`.`type` = 1 OR \n `user2` = \".$user1.\" AND `user1` = \".$user2.\" AND `relationship`.`type` = 1;\";\n $query = mysqli_query($con, $sql);\n return (mysqli_fetch_object($query)->count == 2);\n }", "public function secondCrop() : Crop\n {\n if($this->secondCrop) {\n return $this->secondCrop;\n }\n return $this->secondCrop = Crop::find(2);\n }", "function full_house(array $hand) {\n if (count($hand) < 5) return false;\n\n $suits = cards_values($hand);\n\n $same = array_count_values($suits);\n if (count($same) != 2) return false;\n $two_three = array_flip($same);\n return ['value' => $two_three[3] . $two_three[2], 'remaining' => []];\n}", "function trouverPetit ($nombre1, $nombre2)\r\n{\r\n if ($nombre1 < $nombre2) {\r\n return $nombre1;\r\n }\r\n else {\r\n return $nombre2;\r\n }\r\n}", "public function getPointProd2():?int\n {\n //Verifier si au moins un produit 1 est vendu afin de dettminer \n //le nombre de point du produit 2\n\n return $this->produit1<=0 ? 0 : ($this->produit2<=0 ? 0 : $this->produit2 * 5);\n }", "public abstract function common($output1, $output2);", "private function compareOdds ($odd1, $odd2) {\n return $odd1->getOdds() > $odd2->getOdds(); \n }", "function validateCompare ($input, $input2, $option = 'same') {\n if($input === $input2) {\n return true;\n } else {\n return false;\n }\n}", "function comp($a,$b) {\n if ((count($a == count($b))) && ($a !== \"\")) { \n foreach ($a as $check) {\n // if !exists $a ~ $b\n if (!in_array($check*$check, $b)) {\n return false;\n }\n }\n return true;\n }\n return false;\n}", "function calculate_sameness($val1, $val2) {\n if ($val1 == 0 || $val2 == 0) return 0; //if either are unsure this is not a match\n else if ($val1 == $val2) return 1; //if both are sure and the same it is a match\n else return -10; //if both are sure and different it is not a match\n}", "function pokerWinner($player1Hand){\n $pairCount = 0;\n $twoPairCount = 0;\n $threeOfAKind = 0;\n $fourOfAKindCount = 0;\n $straightCount = 0;\n $flushCount = 0;\n $fullHouseCount = 0;\n $fourOfAKindCount = 0;\n $straightFlushCount = 0;\n $royalFlushCount = 0;\n $consecutive = 0;\n $value = 10;\n\n $matchingCardCount = pairFinder($player1Hand);\n\n if($matchingCardCount == 3){\n \n $fourOfAKindCount = 1;\n $threeOfAKind = 1;\n $pairCount = 2;\n }\n\n if($matchingCardCount == 2){\n $threeOfAKind = 1;\n $pairCount = 1;\n }\n\n if($matchingCardCount == 1){\n $pairCount = 1;\n\n }\n\n //check for two pairs\n if(twoPairFinder($player1Hand)){\n $pairCount = 2;\n $twoPairCount = 1;\n }\n\n\n\n if(straightFinder($player1Hand)){\n $straightCount = 1;\n\n\n }\n\n //check for flush\n if(flushFinder($player1Hand)){\n $flushCount = 1;\n\n }\n\n //check for straight flush\n if($flushCount == 1 && $straightCount == 1){\n $straightFlushCount = 1;\n }\n\n //check for royal flush\n if($straightFlushCount == 1){\n if(royalFlushFinder($player1Hand)){\n $royalFlushCount = 1;\n }\n }\n\n //Testing area\n\n // echo 'The $pairCount is: ' . $pairCount . \"\\n\" . \"\\n\";\n // echo 'The $twoPairCount is: ' . $twoPairCount . \"\\n\" . \"\\n\";\n // echo 'The $threeOfAKind is: ' . $threeOfAKind . \"\\n\" . \"\\n\";\n // echo 'The $fourOfAKindCount is: ' . $fourOfAKindCount . \"\\n\" . \"\\n\";\n // echo 'The $straightCount is: ' . $straightCount . \"\\n\" . \"\\n\";\n // echo 'The $flushCount is: ' . $flushCount . \"\\n\" . \"\\n\";\n // echo 'The $fullHouseCount is: ' . $fullHouseCount . \"\\n\" . \"\\n\";\n // echo 'The $fourOfAKindCount is: ' . $fourOfAKindCount . \"\\n\" . \"\\n\";\n // echo 'The $straightFlushCount is: ' . $straightFlushCount . \"\\n\" . \"\\n\";\n // echo 'The $royalFlushCount is: ' . $royalFlushCount . \"\\n\" . \"\\n\";\n\n\n //Give out points\n if($royalFlushCount == 1){\n $value = 10;\n return $value;\n }\n\n if($straightFlushCount == 1){\n $value = 9;\n return $value;\n }\n\n if($fourOfAKindCount == 1){\n $value = 8;\n return $value;\n }\n\n if($fullHouseCount == 1){\n $value = 7;\n return $value;\n }\n\n if($flushCount == 1){\n $value = 6;\n return $value;\n }\n\n if($straightCount == 1){\n $value = 5;\n return $value;\n }\n\n if($threeOfAKind == 1){\n $value = 4;\n return $value;\n }\n\n if($twoPairCount == 1){\n $value = 3;\n return $value;\n }\n\n if($pairCount == 1){\n $value = 2;\n return $value;\n }\n\n else{\n $value = 1;\n return $value;\n }\n\n\n}", "public function andConstraint(ConstraintInterface $constraint1,\n ConstraintInterface $constraint2);", "function comparePswd(&$formvars){\r\n\t\t$pswd1 = $formvars['UPswd'];\r\n\t\t$pswd2 = $formvars['ConPswd'];\r\n\t\t\r\n\t\tif($pswd1 !== $pswd2){\r\n\t\t\t$this->HandleError(\"Passwords do not match\");\r\n return false;\r\n\t\t}\r\n return true;\r\n\t}", "public function card_json_query($deck){\n $card_list = this.card_list_query($deck);\n // TODO convert to json\n }", "function buildDeck($suits, $cards) {\n\t$deck = [];\n\tforeach ($cards as $card) {\n\t\tforeach($suits as $suit) {\n\t\t\t$deck[] = \"$card\" . \"\" . \"$suit\";\n\t\t}\n\t}\n\tif(shuffle($deck)) {\n\t\treturn $deck;\n\t}\n}", "function compairUserLink($d1,$d2) {\n if (isset($d1[\"lastname\"]) && isset($d2[\"lastname\"]) && isset($d1[\"firstname\"]) && isset($d2[\"firstname\"])) {\n return getPersonLink($d1[\"lastname\"],$d1[\"firstname\"])==getPersonLink($d2[\"lastname\"],$d2[\"firstname\"]);\n }\n else\n return false;\n}", "static function card_cmp( $a, $b ) {\n return $a->number - $b->number;\n }", "function deck_alter(int $user_id, int $deck_num, array $unit_list): bool\r\n{\r\n\tglobal $DATABASE;\r\n\t\r\n\t$deck_table = $DATABASE->execute_query(\"SELECT deck_table FROM `users` WHERE user_id = $user_id\")[0][0];\r\n\t$current = explode(':', $DATABASE->execute_query(\"SELECT deck_members FROM `$deck_table` WHERE deck_num = $deck_num\")[0][0]);\r\n\t\r\n\tforeach($unit_list as $k => $v)\r\n\t{\r\n\t\tif($v)\r\n\t\t\t$current[$k] = $v;\r\n\t}\r\n\t\r\n\treturn $DATABASE->execute_query(\"UPDATE `$deck_table` SET deck_members = ? WHERE deck_num = $deck_num\", 's', implode(':', $current));\r\n}", "function agreeOrDisagree($string_one, $string_two)\n{\n //note the triple equals for equality\n if ($string_one === $string_two)\n {\n return \"You agree!\";\n } else {\n return \"You disagree!\";\n }\n}", "public function conditions_for($arg1 = null, $arg2 = null) {\n switch (func_num_args()) {\n case 0:\n return '';\n case 1:\n if (is_array($arg1)) {\n $values = array();\n foreach ($this->auto_quote_array($arg1) as $k => $v) $values[] = \"$k = $v\";\n return implode(' AND ', $values);\n } else {\n return $arg1;\n }\n case 2:\n if (is_array($arg2)) {\n return $this->auto_quote_query($arg1, $arg2);\n } else {\n list($type, $name) = $this->resolve_field_type_and_name($arg1);\n if ($type !== null) {\n $quoter = self::$quote_methods[$type];\n $arg2 = $this->$quoter($arg2);\n }\n return \"$name = $arg2\";\n }\n default:\n throw new GDBException;\n }\n }", "function __construct(Deck $deck){\n\n $this->cards = [];\n array_push($this->cards, $deck->drawCard(), $deck->drawCard()); // twice because 2 cards\n }", "public function filterByCards($cards = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($cards)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $cards)) {\n $cards = str_replace('*', '%', $cards);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(CardPeer::CARDS, $cards, $comparison);\n }", "private function _compare($outputStack)\n {\n $res = array();\n $len = count($outputStack);\n \n if ($len > 1) {\n for ($i = 0; $i < $len; $i++) {\n if (is_bool($outputStack[$i])) {\n continue;\n }\n else if ($outputStack[$i] === '&&') {\n $con1 = isset($outputStack[$i - 2]) && is_bool($outputStack[$i - 2]);\n $con2 = isset($outputStack[$i - 1]) && is_bool($outputStack[$i - 1]);\n \n if ($con1 && $con2) {\n $outputStack[$i] = $outputStack[$i - 2] && $outputStack[$i - 1];\n unset($outputStack[$i - 2], $outputStack[$i - 1]);\n }\n else {\n return $this->_compare(array_values($outputStack));\n }\n }\n else if ($outputStack[$i] === '||') {\n $con1 = isset($outputStack[$i - 2]) && is_bool($outputStack[$i - 2]);\n $con2 = isset($outputStack[$i - 1]) && is_bool($outputStack[$i - 1]);\n \n if ($con1 && $con2) {\n $outputStack[$i] = $outputStack[$i - 2] || $outputStack[$i - 1];\n unset($outputStack[$i - 2], $outputStack[$i - 1]);\n }\n else {\n return $this->_compare(array_values($outputStack));\n }\n }\n }\n }\n \n return end($outputStack);\n }", "static function card_rcmp( $a, $b ) {\n return $b->number - $a->number;\n }", "public function passwordsMatch($pw1, $pw2) {\n if ($pw1 === $pw2)\n return true; \n else \n return false; \n }", "static function puissance($operande1, $operande2){\n return pow($operande1, $operande2);\n }", "protected function get_facet_by_p2p_connexion_name( $connexion ) {\n\t\t$facets = FWP()->helper->get_facets();\n\t\tforeach( $facets as $facet ) {\n\t\t\tif( 'p2p/' . $connexion === $facet['source'] ) {\n\t\t\t\treturn $facet;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function both() {\r\n $query = \"SELECT id, text, author, category FROM quotes WHERE categoryId = :categoryId AND authorId = :authorId\";\r\n $statement = $this->conn->prepare( $query );\r\n $this->categoryId=htmlspecialchars(strip_tags($this->categoryId));\r\n $this->authorId=htmlspecialchars(strip_tags($this->authorId));\r\n $statement->bindParam(\":authorId\", $this->authorId);\r\n $statement->bindParam(\":categoryId\", $this->categoryId);\r\n $statement->execute();\r\n return $statement;\r\n }", "public function lAnd(\n ComponentSpecification $specification1,\n ComponentSpecification $specification2\n ) : Specification\\AndSpecification {\n $args = func_get_args();\n $andSpec = new \\ReflectionClass('\\\\ElementTree\\\\Specification\\\\AndSpecification');\n\n return $andSpec->newInstanceArgs($args);\n }", "function hasDuplicate($g,$r,$p){\n\t//create query\n\t$query = \"SELECT `b_id` FROM `bet` WHERE `g_id`=$g AND `b_round`=$r AND `p_id`=$p\";\n\t$result = @mysql_query($query);\n\tif(mysql_error()) handleError(\"query 0\");\n\t\n\tif(mysql_num_rows($result) > 0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "function o_comparePipe(...$comparisons) {\n\t\t\treturn Obj::singleton()->comparePipe(...$comparisons);\n\t\t}" ]
[ "0.56040764", "0.49433467", "0.48106474", "0.479095", "0.45728463", "0.45610946", "0.45520627", "0.4543738", "0.45402363", "0.4532464", "0.45183286", "0.44582188", "0.4454192", "0.4452065", "0.43948802", "0.4379582", "0.43509", "0.43356055", "0.43310162", "0.43303293", "0.4325183", "0.43108815", "0.42827418", "0.426743", "0.42508778", "0.4232356", "0.41793886", "0.41725975", "0.41643336", "0.4163035", "0.4161253", "0.41583055", "0.41132486", "0.4109377", "0.40965816", "0.40949237", "0.40613556", "0.40550593", "0.4051665", "0.40493444", "0.40435275", "0.40406224", "0.40316874", "0.40234974", "0.40137017", "0.40113255", "0.40037835", "0.40013695", "0.39953786", "0.3993955", "0.3986993", "0.39748", "0.3974513", "0.3971769", "0.39683565", "0.39627984", "0.39601013", "0.3953242", "0.39433283", "0.39417294", "0.39324433", "0.3930588", "0.39140704", "0.39043817", "0.3902729", "0.3902313", "0.38881767", "0.38859707", "0.38844225", "0.38733962", "0.38714615", "0.38580033", "0.38456073", "0.38450545", "0.38396677", "0.38381356", "0.3818953", "0.38183284", "0.3815884", "0.3811831", "0.3808168", "0.38081613", "0.37991", "0.37914756", "0.37912464", "0.37881112", "0.37867922", "0.37856254", "0.37833905", "0.37754124", "0.37744075", "0.3766287", "0.37621853", "0.37539613", "0.37514648", "0.37438494", "0.3734712", "0.3733941", "0.37286735", "0.3728042", "0.37277448" ]
0.0
-1
Display a listing of the resource.
public function __construct() { $this->middleware('auth'); }
{ "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()->user()->can('model.register')) { // abort(401, 'You are not allowed to access this page.'); // } // if(!auth()->user()->hasPermissionTo('model.register', 'web')){ // abort(401, 'You are not allowed to access this page.'); // } $data['countries'] = Selector::GetCountries(); $data['builds'] = Selector::GetBuilds(); $data['services'] = Selector::GetServices(); $data['availabilities'] = Selector::GetAvailabilities(); return view('models::create')->with($data); }
{ "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) { $name = ucwords($request->name); $email = $request->email; $phone_no = $request->phone_no; $real_phone_no = $request->real_phone_no; $gender = $request->gender; $dob = $request->dob; $age = Carbon::parse($dob)->diffInYears(Carbon::now()); $country_id = $request->country_id; $city_id = $request->city_id; $town_id = $request->town_id; $ethnicity_id = $request->ethnicity_id; $build_id = $request->build_id; $service_id = $request->service_id; $availability_id = $request->availability_id; $about = $request->about; //$password = Hash::make($request->password); /** Run validator for both email and phone number */ $email_validator = Validator::make($request->all(), [ 'email' => ['unique:users'], ]); $phone_validator = Validator::make($request->all(), [ 'phone_no' => ['unique:models'], ]); if ($email_validator->fails() && !$phone_validator->fails()) { toastr()->error('Email already registered!'); DB::rollBack(); return back(); } elseif (!$email_validator->fails() && $phone_validator->fails()) { toastr()->error('Phone already registered!'); DB::rollBack(); return back(); } elseif ($email_validator->fails() && $phone_validator->fails()) { toastr()->error('Email and phone already registered!'); DB::rollBack(); return back(); }elseif($age < 18){ toastr()->error('Minimum age should be 18 years'); DB::rollBack(); return back(); } else { /** Generate random password */ $password = Models::GeneratePassword(8); $password = '1234.abc'; $user = new User(); $user->name = $name; $user->email = $email; $user->password = Hash::make($password); DB::beginTransaction(); try { $user->save(); $saved_user_id = $user->id; $user_role_data = array( 'role_id' => 2, 'model_type' => 'App\User', 'model_id' => $saved_user_id ); $save_user_role_data = DB::table('model_has_roles')->insert($user_role_data); $accessToken = $user->createToken('authToken')->accessToken; $success_response['token'] = $user->createToken('authToken')->accessToken; $success_response['name'] = $user->name; /** Generate model number */ $length = 6; $intMin = (10 ** $length) / 10; // 100... $intMax = (10 ** $length) - 1; // 999... $model_no = mt_rand($intMin, $intMax); /** Process the image */ $file = $request->file('preview_image'); $file_name = Models::GeneratePassword(30).$file->getClientOriginalName(); $file->move('uploads/model_preview_images', $file_name); $preview_image_url = 'uploads/model_preview_images/' . $file_name; /** Save model details */ $model = new Models(); $model->model_no = $model_no; $model->m_model_id = $saved_user_id; $model->phone_no = $phone_no; $model->real_phone_no = $real_phone_no; $model->gender = $gender; $model->age = $age; $model->country_id = $country_id; $model->city_id = $city_id; $model->m_town_id = $town_id; $model->ethnicity_id = $ethnicity_id; $model->build_id = $build_id; $model->services = 1; $model->availability = 1; $model->preview_image = $preview_image_url; $model->about = $about; $model->save(); /** save model services in m_services table */ $count = count($service_id); for ($i = 0; $i < $count; $i++) { $data = array( 'ms_model_id' => $saved_user_id, 'ms_service_id' => $service_id[$i] ); $insertServices[] = $data; } ModelServices::insert($insertServices); /** save model availabilities in m_availability table */ $count = count($availability_id); for ($i = 0; $i < $count; $i++) { $data1 = array( 'ma_model_id' => $saved_user_id, 'ma_availability_id' => $availability_id[$i] ); $insertAvailability[] = $data1; } ModelAvailability::insert($insertAvailability); DB::commit(); toastr()->success('User added successfully'); return back(); } catch (\Throwable $e) { DB::rollBack(); \Log::emergency("File:" . $e->getFile() . "Line:" . $e->getLine() . "Message:" . $e->getMessage()); toastr()->error('Ooops!!! Try again'); return back(); } } }
{ "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
Show the specified resource.
public function show($id) { return view('models::show'); }
{ "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 }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "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(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\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 show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function show($id) {}", "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 show(Question $question) // the show part requires an id (default)\n {\n //Show function does Route Model Binding, is the simple way of telling that this\n // function provides the id of the question by default\n return new QuestionResource($question);\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 return auth()->user()->getResource();\n }", "public function show($id)\n { \n \n }", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show($id)\n {\n // ..\n }", "public function show(Resena $resena)\n {\n }", "public function show($id)\n {\n $obj = Obj::where('id',$id)->first();\n \n $this->authorize('view', $obj);\n if($obj)\n return view('appl.'.$this->app.'.'.$this->module.'.show')\n ->with('obj',$obj)->with('app',$this);\n else\n abort(404);\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 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)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n // Code Goes Here\n }", "public function show(Show $show)\n {\n $this->authorize('basicView', $show);\n\n if (Auth::user()->can('view', $show)) {\n return $show->with(['hosts', 'invitees'])->first();\n }\n\n return new ShowResource($show);\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 }", "public function show($id) {\n\n\t}", "public function show($id){\n \n }", "public function show($id) {\n }", "public function show($id)\n {\n\n }", "public function show($id) {\n //\n }", "public function show($id) {\n //\n }", "public function show($id) {\n //\n }", "public function show($id) {\r\n //\r\n }", "public function show($id) {\r\n //\r\n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show($id)\r\r\n {\r\r\n //\r\r\n }", "public function show($id)\r\r\n {\r\r\n //\r\r\n }", "public function show($id)\r\n {\r\n \r\n }", "public function show($id)\n {\n \n \n }", "public function show($id)\n {\n \n \n }", "public function show($id) {\n\t //\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }" ]
[ "0.8661945", "0.8655518", "0.70617014", "0.70157945", "0.6972034", "0.6936089", "0.6916712", "0.6891719", "0.68023425", "0.6679236", "0.66607267", "0.6638694", "0.6617495", "0.6607225", "0.6594313", "0.65942454", "0.658194", "0.658077", "0.65533966", "0.6550209", "0.6550209", "0.6550209", "0.6550209", "0.6550209", "0.6550209", "0.6550209", "0.6550209", "0.6550209", "0.6550209", "0.65432423", "0.65432423", "0.65432423", "0.65432423", "0.65432423", "0.65432423", "0.65432423", "0.65432423", "0.65432423", "0.65432423", "0.654101", "0.65349215", "0.6526978", "0.65207326", "0.65170187", "0.6515921", "0.65077204", "0.6507069", "0.6507069", "0.6507069", "0.65060925", "0.65060925", "0.6500031", "0.6500031", "0.6500031", "0.6500031", "0.64969707", "0.64969707", "0.64907444", "0.64907444", "0.64907444", "0.64907444", "0.6489605", "0.6489174", "0.6488905", "0.6488905", "0.6482979", "0.6481028", "0.6481028", "0.6480175", "0.64769554", "0.6475207", "0.6472861", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503", "0.6472503" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { return view('models::edit'); }
{ "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()\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() {\n return view('routes::edit');\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($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 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 return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::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 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($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\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 \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 $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() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }" ]
[ "0.78557473", "0.76946205", "0.72731614", "0.7241571", "0.71700776", "0.70650244", "0.7052897", "0.698311", "0.69465625", "0.6944826", "0.69399333", "0.69286525", "0.69031185", "0.68969506", "0.68969506", "0.6878258", "0.6862812", "0.6859171", "0.68560475", "0.68436426", "0.6834711", "0.6810601", "0.680613", "0.6804975", "0.68015367", "0.6795471", "0.6791821", "0.6791821", "0.6787303", "0.6783644", "0.67790574", "0.67766285", "0.6767741", "0.67610145", "0.67455536", "0.67455536", "0.6744367", "0.6743159", "0.6739656", "0.67351145", "0.67246765", "0.67128825", "0.6692859", "0.66916454", "0.6687554", "0.66875297", "0.6687494", "0.6684443", "0.668203", "0.66689324", "0.66680384", "0.6664605", "0.6664605", "0.66621166", "0.66604865", "0.66589504", "0.6655767", "0.66542184", "0.66422516", "0.6631665", "0.663077", "0.6627607", "0.6627607", "0.66193914", "0.6618503", "0.66160196", "0.66146857", "0.6609641", "0.6608315", "0.6605284", "0.6595882", "0.65947276", "0.6594626", "0.65895563", "0.6589339", "0.6587281", "0.65805006", "0.6579201", "0.6579166", "0.657641", "0.6576111", "0.65740323", "0.65692765", "0.6568046", "0.6567221", "0.6565346", "0.6560687", "0.6560687", "0.6560384", "0.65577257", "0.65569293", "0.65558636", "0.6555392", "0.65553015", "0.65542984", "0.655418", "0.6554106", "0.6547678", "0.65473104", "0.6543329" ]
0.665213
58
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "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
Populate this object from an array
public function fromArray(array $input) { if(array_key_exists("includeEpisodes", $input)) $this->includeEpisodes = $input["includeEpisodes"]; if(array_key_exists("id", $input)) $this->id = $input["id"]; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fromArray($array) {\n \n foreach ( $array as $key => $value ) {\n \n $this->$key = $value; \n }\n \n //return $this;\n }", "public function init_from_array($array)\n { \n foreach($array as $key => $val)\n { \n $this->set($key,$val);\n }\n }", "public function fromArray(array $data);", "public function fromArray(array $data);", "public function __construct(array $array)\n {\n parent::hydrate($array);\n }", "public function fromArray(array $array){\n if(array_key_exists($this->idField, $array)){//verifica se possui id se sim seta o id;\n $this->{$this->idField} = $array[$this->idField];\n }\n $this->content = $array;\n }", "public function __construct($array)\n {\n foreach ($array as $elem) {\n $this->insert($elem);\n }\n }", "public function fromArray(array $arrayData);", "public function fromArray($array) {\n \n foreach ( $array as $key => $value ) {\n \n if ( $this->$key instanceof PersistentCollection ) {\n \n $value = new ArrayCollection(\n array_unique(array_merge($this->$key->toArray(), $value->toArray()), \\SORT_REGULAR)\n );\n \n }\n \n $this->$key = $value; \n }\n \n //return $this;\n }", "public function fromArray($array) {\n \n foreach ( $array as $key => $value ) {\n \n if ( $this->$key instanceof PersistentCollection ) {\n \n $value = new ArrayCollection(\n array_unique(array_merge($this->$key->toArray(), $value->toArray()), \\SORT_REGULAR)\n );\n \n }\n \n $this->$key = $value; \n }\n \n //return $this;\n }", "public function fromArray(array $data)\n {\n parent::fromArray($data);\n $this->parseDynamicProperties($data);\n }", "public function fromArray(array $data)\n {\n foreach ($data as $key => $value) {\n $this->{'set'.ucfirst($key)}($value);\n }\n }", "public static function fromArray(array $data);", "function from_array($array)\r\n {\r\n\r\n $this->first_name = $this->get_index($array, \"first_name\", true);\r\n $this->last_name = $this->get_index($array, \"last_name\", true);\r\n $this->email = $this->get_index($array, \"email\", true);\r\n\r\n $this->age = $this->get_index($array, \"age\");\r\n $this->is_active = $this->get_index($array, \"is_active\");\r\n\r\n $this->admission_date = DateTime::createfromformat(\"Y-m-d g:iA\", $this->get_index($array, \"admission_date\"));\r\n $this->admission_time = DateTime::createfromformat(\"g:iA\", $this->get_index($array, \"admission_time\"));\r\n\r\n $this->get_index($array, \"interests\");\r\n\r\n if (!empty($this->msg)){\r\n throw new Exception(\"Error Processing Request \\n\" . $this->msg, 1);\r\n }\r\n\r\n if (array_key_exists(\"interests\", $array)){\r\n foreach($array[\"interests\"] as $interest){\r\n $this->interests[] = Interest::withName($interest);\r\n }\r\n }\r\n\r\n return $this;\r\n }", "public function fromArray(array $values){\n foreach ($values as $property => $value) {\n \n $this->__set($property, $value);\n }\n \n }", "public function __construct($array)\n {\n if ($array !== null) {\n foreach ($array as $key => $value) {\n $this->$key = $value;\n }\n }\n }", "public function fromArray ($fieldsArr)\n\t{\n\t\tforeach ($fieldsArr as $name => $value) {\n\t\t\t$this->$name = $value;\n\t\t}\n\t}", "public function __construct(array $array = [])\n {\n $this->fillFromArray($array);\n }", "public function fromArray($data = array())\n {\n foreach ($data as $property => $value) {\n $method = \"set{$property}\";\n $this->$method($value);\n }\n }", "public function fromArray(array $array)\n {\n $this->uid = $array['uid'];\n $this->title = $array['title'];\n $this->description = $array['description'];\n $this->itemTableName = $array['table_name'];\n }", "public function fromArray($data)\n {\n $this->data = $data;\n\n\n }", "public function initWithArray($array)\n {\n $this->array = $array;\n return $this;\n }", "public function setFromArray($array){\n\t\tif(isset($array['nome_artista'])) $this->nome_artista = $array['nome_artista'];\n\t\tif(isset($array['foto'])) $this->foto = $array['foto'];\n\t\tif(isset($array['autore'])) $this->autore = $array['autore'];\n\t\tif(isset($array['genere'])) $this->genere = $array['genere'];\n\t\tif(isset($array['data'])) $this->data = $array['data'];\n\t\tif(isset($array['stato'])) $this->stato = $array['stato'];\n\t\tif(isset($array['stato_pubblicazione'])) $this->stato_pubblicazione = $array['stato_pubblicazione'];\n\t\tif(isset($array['id'])) $this->id = $array['id'];\n\t\tif(isset($array['id_artista'])) $this->id_artista = $array['id_artista'];\n\t\tif(isset($array['descrizione'])) $this->descrizione = $array['descrizione'];\n\t\t\n\t}", "public function fromArray($args) {\n foreach ($args as $key => $value) {\n $this->{$key} = $value;\n }\n }", "function setDataByArray($array) {\n\t\n\t\tforeach($array as $key => $value) {\n\t\t\t$this->setData($key, $value);\n\t\t}\n\t\t\n\t\t$this->dataLoaded = true;\n\t\treturn $this;\n\t\t//surely we need to set dataLoaded = true?\n\t}", "public function initWithObjects()\n {\n $this->array = func_get_args();\n return $this;\n }", "public function fromArray(array $data)\n {\n\n $this->event_id = $data['event_id'] ?? null;\n $this->marketing_id = $data['marketing_id'] ?? null;\n $this->value = $data['value'] ?? null;\n\n }", "public function __construct(array $array = array()) {\n\t\tif(count($array)) {\n\t\t\t$this->_obj = &$array;\n\t\t}\n\t}", "function populateFromArray(array $arr);", "function populateFromArray(array $arr);", "public function & fromArray( array $a_array )\r\n\t{\r\n\t\tif(is_array($a_array))\r\n\t\t\t$this->m_data = $a_array;\r\n\r\n\t\treturn $this;\r\n\t}", "public function fromArray(array $array)\n {\n if (isset($array['id'])) {\n $this->setId($array['id']);\n }\n if (isset($array['artist'])) {\n $this->setArtist($array['artist']);\n }\n if (isset($array['title'])) {\n $this->setTitle($array['title']);\n }\n\n return $this;\n }", "public static function fromArray($array) {\n\t\t$revision = new self();\n\t\t$revision->setData($array);\n\t\treturn $revision;\n\t}", "protected function hydrate($array){\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\t$methodName = 'set'.ucfirst($key);\r\n\t\t\tif(method_exists($this, $methodName)){\r\n\t\t\t\t$this->$methodName($value);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function fromArray($data)\r\n {\r\n $inputFilter = $this->getInputFilter($data);\r\n if (!$inputFilter->isValid()) {\r\n Thrower::throwValidationException('Error de Validacion', $inputFilter->getMessages());\r\n }\r\n $data = $inputFilter->getValues();\r\n \r\n foreach ($data as $property => $value) {\r\n $this->$property = $value;\r\n }\r\n }", "public function fromArray($array)\n {\n if (isset($array['channel_code'])) {\n $this->setChannelCode($array['channel_code']);\n }\n if (isset($array['time'])) {\n $this->setTime($array['time']);\n }\n\n }", "public function fromArray($data)\n {\n if (isset($data['field_name']))\n $this->fieldName = $data['field_name'];\n\n if (isset($data['direction']))\n $this->direction = $data['direction'];\n }", "function set(array $array){\n foreach($this as $atributo => $valor){\n if(isset($array[$atributo])){\n $this->$atributo = $array[$atributo];\n }\n }\n }", "static public function fromArray($anArray) {\n\t\t$theClassName = get_called_class();\n\t\t$o = new $theClassName();\n\t\treturn $o->setDataFrom($anArray);\n\t}", "public function __construct(&$array1) {\n $this->items = $array1;\n }", "public function __construct(array $array, $allowModifications = false)\n {\n $this->_allowModifications = (boolean) $allowModifications;\n $this->_loadedSection = null;\n $this->_index = 0;\n $this->_data = [];\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $this->_data[$key] = new self($value, $this->_allowModifications);\n } else {\n $this->_data[$key] = $value;\n }\n }\n $this->_count = count($this->_data);\n }", "public function exchangeArray($array)\n {\n if (isset($array['id'])) {\n $this->setId($array['id']);\n }\n if (isset($array['usuario'])) {\n $this->usuario = $array['usuario'];\n }\n if (isset($array['senha'])) {\n $this->senha = $array['senha'];\n }\n if (isset($array['perfil_id'])) {\n $this->perfilId = $array['perfil_id'];\n }\n return $this;\n }", "public function __construct(array $arr)\n {\n $this->data = $arr;\n }", "public static function fromData(array $data);", "public function fromArray($update)\n {\n if (is_array($update)) {\n foreach ($update as $key => $value) {\n $this->{$key} = $value;\n }\n }\n }", "public function fromArray(array $array)\n\t{\n\t\treturn $this\n ->setAvatarclientmessageId($array['avatarclientmessage_id'])\n ->setCreatedTimestamp($array['created'])\n ->setAvatarId($array['avatar_id'])\n ->setKey($array['key'])\n ->setData($array['data']);\n\t}", "function __construct($array = []) {\n $this->array = $array;\n $this->setCalculate();\n }", "public function fromArray($array)\n {\n if (isset($array['rev'])) {\n $this->setRev($array['rev']);\n }\n if (isset($array['cover'])) {\n $this->setCover($array['cover']);\n }\n if (isset($array['wiki_id'])) {\n $this->setWikiId($array['wiki_id']);\n }\n if (isset($array['title'])) {\n $this->setTitle($array['title']);\n }\n if (isset($array['html_cache'])) {\n $this->setHtmlCache($array['html_cache']);\n }\n if (isset($array['content'])) {\n $this->setContent($array['content']);\n }\n if (isset($array['tags'])) {\n $this->setTags($array['tags']);\n }\n if (isset($array['comment_tags'])) {\n $this->setCommentTags($array['comment_tags']);\n }\n if (isset($array['model'])) {\n $this->setModel($array['model']);\n }\n if (isset($array['has_video'])) {\n $this->setHasVideo($array['has_video']);\n }\n if (isset($array['like_num'])) {\n $this->setLikeNum($array['like_num']);\n }\n if (isset($array['dislike_num'])) {\n $this->setDislikeNum($array['dislike_num']);\n }\n if (isset($array['watched_num'])) {\n $this->setWatchedNum($array['watched_num']);\n }\n if (isset($array['admin_id'])) {\n $this->setAdminId($array['admin_id']);\n }\n if (isset($array['do_date'])) {\n $this->setDoDate($array['do_date']);\n }\n if (isset($array['source'])) {\n $this->setSource($array['source']);\n }\n if (isset($array['tvsou_id'])) {\n $this->setTvsouId($array['tvsou_id']);\n }\n if (isset($array['first_letter'])) {\n $this->setFirstLetter($array['first_letter']);\n }\n if (isset($array['douban_id'])) {\n $this->setDoubanId($array['douban_id']);\n }\n if (isset($array['verify'])) {\n $this->setVerify($array['verify']);\n }\n if (isset($array['created_at'])) {\n $this->setCreatedAt($array['created_at']);\n }\n if (isset($array['updated_at'])) {\n $this->setUpdatedAt($array['updated_at']);\n }\n\n }", "public function __construct()\n {\n $args = func_get_args();\n\n // if an array or object load using fromArray\n if (!empty($args[0]) && (Validate::isAssociativeArray($args[0]) || is_object($args[0]))) {\n $this->fromArray((array)$args[0]);\n }\n }", "function loadFromArray(array $inArray) {\n\t\t$this->setMovieID((int)$inArray['movieID']);\n\t\t$this->setUserID((int)$inArray['UserID']);\n\t\t$this->setCountryID((int)$inArray['CountryID']);\n\t\t$this->setBroadCastDate($inArray['broadCastDate']);\n\t\t$this->setCreatedDate($inArray['createdDate']);\n\t\t$this->setModified(false);\n\t}", "public function __construct(array $data)\n {\n $this->hydrate($data);\n }", "public function __construct(array $data)\n {\n $this->hydrate($data);\n }", "abstract protected function initStateFromArray($array);", "public function __construct(array $array)\n {\n parent::__construct($array);\n }", "public function __construct( array $data = [] )\n {\n\n $this->reinitFromArray( $data );\n\n }", "function setValues($array){\r\n\t\tforeach($array as $key => $val){\r\n\t\t\t$key = lcfirst(str_replace(\" \",\"\",ucwords(str_replace(\"_\",\" \",$key))));\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t\t}\r\n\t}", "function setValues($array){\r\n\t\tforeach($array as $key => $val){\r\n\t\t\t$key = lcfirst(str_replace(\" \",\"\",ucwords(str_replace(\"_\",\" \",$key))));\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t\t}\r\n\t}", "public function __construct($array)\n\t{\n\t\tif(count($array) > 0)\n\t\t{\n\t\t\tforeach($array as $k => $v)\n\t\t\t{\n\t\t\t\t$this->{$k} = $v;\n\t\t\t}\n\t\t}\n\n\t\tif(!empty($this->totalrows) && !empty($this->limit))\n\t\t{\n\t\t\t$this->numofpages = $this->totalrows / $this->limit;\n\t\t}\t\n\t}", "public function __construct(array $array)\n\t{\n\t\tparent::__construct($array, ArrayObject::ARRAY_AS_PROPS | ArrayObject::STD_PROP_LIST);\n\t}", "protected function _setFromArray($array){\n\t\t/* setFromArray method content */\n\t\tif(isset($array[self::FIELD_USER])){\n\t\t\t$this->user = new User((integer) $array[self::FIELD_USER]);\n\t\t}\n\t\tif(isset($array[self::FIELD_IDENT])){\n\t\t\t$this->ident = (string) $array[self::FIELD_IDENT];\n\t\t}\n\t\tif(isset($array[self::FIELD_VALUE])){\n\t\t\t$this->value = (string) $array[self::FIELD_VALUE];\n\t\t}\n\t\t/* setFromArray method content end */\n\t}", "public function __construct(){\n\t\t\tparent::__construct(array(), \\ArrayObject::STD_PROP_LIST);\n\t\t\t$values = func_get_args();\n\t\t\tif(is_array($values) === true && count($values) > 0 && is_array($values[0])){\n\t\t\t\t$values = current($values);\n\t\t\t\tforeach($values as $k => $v){\n\t\t\t\t\t$this[$k] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function exchangeArray(array $array)\n {\n foreach ($array as $key => $value) {\n switch ($key) {\n case 'createdAt':\n $this->setCreatedAt($value);\n break;\n case 'forename':\n $this->setForename($value);\n break;\n case 'surname':\n $this->setSurname($value);\n break;\n case 'email':\n $this->setEmail($value);\n break;\n case 'password':\n $this->setPassword($value);\n break;\n default:\n break;\n }\n }\n\n return $this;\n }", "public function __construct($array)\n\t{\n\t\tif (is_array($array))\n\t\t{\n\t\t $this->var = $array;\n\t\t}//end if\n\t}", "public function fromArray(array $input)\n\t{\n\t\tif(array_key_exists(\"id\", $input))\n\t\t\t$this->id = $input[\"id\"];\n\n\t\tif(array_key_exists(\"streamUrl\", $input))\n\t\t\t$this->streamUrl = $input[\"streamUrl\"];\n\n\t\tif(array_key_exists(\"name\", $input))\n\t\t\t$this->name = $input[\"name\"];\n\n\t\tif(array_key_exists(\"homepageUrl\", $input))\n\t\t\t$this->homepageUrl = $input[\"homepageUrl\"];\n\n\t\treturn $this;\n\t}", "public function assignByArray($array) {\n\t\t$result=array();\n\t\tforeach ($array as $fieldId=>$value) {\n\t\t\t$result[self::$FIELD_NAMES[$fieldId]]=$value;\n\t\t}\n\t\t$this->assignByHash($result);\n\t}", "public function assignByArray($array) {\n\t\t$result=array();\n\t\tforeach ($array as $fieldId=>$value) {\n\t\t\t$result[self::$FIELD_NAMES[$fieldId]]=$value;\n\t\t}\n\t\t$this->assignByHash($result);\n\t}", "public function populate($arr)\n\t{\n\t\t//print_r($arr);\n\t\t$this->mPopulated = TRUE;\n\t\t$this->setValues($arr,TRUE);\n\t}", "public function fromArray($arr)\n\t{\n\t\t$arr = array_key_exists('results', $arr) ? $arr['results'] : $arr;\n\t\tforeach($arr as $trackData)\t{\n\t\t\t$this->add(new Track($trackData));\n\t\t}\n\t}", "public function __construct($location_array) {\r\n foreach ($location_array as $key => $value) {\r\n if (isset($this->{$key})) {\r\n $this->{$key} = $value;\r\n }\r\n }\r\n }", "private function fillArray($array) {\n\t\t$result = array();\n\t\tforeach ($array as $attr => $val) {\n\t\t\t$setMethod = 'set' . ucfirst($attr);\n\t\t\t$returnType = $this->getReturnTypeOfSetMethod($setMethod);\n\t\t\tif ($returnType) {\n\t\t\t\t$result[$attr] = new $returnType(); \n\t\t\t} else {\n\t\t\t\t$result[$attr] = 'abc';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function & fromArrayRef( array & $a_array )\r\n\t{\r\n\t\tif(is_array($a_array))\r\n\t\t\t$this->m_data = & $a_array;\r\n\r\n\t\treturn $this;\r\n\t}", "public function __construct(){\n\t\t\tparent::__construct(array(), \\ArrayObject::STD_PROP_LIST);\n\t\t\t$values = func_get_args();\n\t\t\tif(is_array($values) === true){\n\t\t\t\tforeach($values as $k => $v){\n\t\t\t\t\t$this[$k] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function fromArray($data)\n {\n $this->setName(array_key_exists('name', $data) ? $data['name'] : null);\n $this->setActive(array_key_exists('active', $data) ? $data['active'] : false);\n $this->setUrl(array_key_exists('url', $data) ? $data['url'] : null);\n $this->setDescription(array_key_exists('description', $data) ? $data['description'] : null);\n $this->setLogo(array_key_exists('logo', $data) ? $data['logo'] : null);\n $this->setAbstract(array_key_exists('abstract', $data) ? $data['abstract'] : null);\n \n return $this;\n }", "public function fromArray($prm_array){\n if(is_array($prm_array)){\n foreach ($prm_array as $index => $element){\n if(is_array($element)){\n $this->startElement('row');\n $this->fromArray($element);\n $this->endElement();\n }\n else\n $this->setElement($index, $element);\n \n }\n }\n }", "public function __construct(Array $data)\n {\n //\n $this->_data = $data;\n }", "public function initFromArray($o) {\n }", "public function from(array $input);", "public static function fromArray(array $data): self\n {\n return new self($data['Name']);\n }", "public function setFromArray(array $data);", "public function __construct(array $datas) {\n $this->hydrate($datas);\n }", "public function __construct(array $array) {\n $this->data = $array;\n foreach($array as $language => $row) {\n $this->translations[$language] = $row->translation;\n }\n \n $language = $_SESSION[\"lang\"];\n \n if(isset($this->translations[$language])) {\n $this->current = $this->translations[$language];\n } else {\n $this->current = current($this->translations);\n }\n }", "public static function fromArray(array $array)\n {\n return new static($array);\n }", "public function set_values_from_array(array $Data) {\n foreach ($Data as $field => $value) {\n if (!isset ($this->$field)) continue;\n $this->$field->setValue ($value);\n }\n }", "function setValues($array){\r\n\t\tforeach($array as $key => $val)\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t}", "static function fromArray($array)\n {\n return new self($array[0], $array[1], $array[2], $array[3], rtrim($array[4], PHP_EOL));\n }", "public function exchangeArray(array $array) {\n\t\t$this->setId($array['id']);\n\t\t$this->setName($array['name']);\n\t}", "public function __construct($arr)\n\t{\n\t\t$this->_object = $arr; \n\t}", "public function __construct(array $data = array()) {\n foreach ($data as $key => $value) {\n $this->$key = $value;\n }\n }", "public function __construct(array $data = array()) {\n foreach ($data as $key => $value) {\n $this->$key = $value;\n }\n }", "public function __construct(array $data = array()) {\n foreach ($data as $key => $value) {\n $this->$key = $value;\n }\n }", "public function __construct($data = array()) {\n \n if(!is_array($data)){\n return;\n }\n \n foreach ($data as $key => $value) {\n $key = $this->_getKey($key);\n if(!$key) {\n continue;\n }\n \n $this->$key = $value;\n }\n }", "public function updateFromArray(array $array)\n\t{\n\t\tif (!empty($array)) {\n\t\t\tforeach ($array as $key=>$item) {\n\t\t\t\t$this->set($key,$item);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "public function updateFromArray(array $array)\n\t{\n\t\tif (!empty($array)) {\n\t\t\tforeach ($array as $key=>$item) {\n\t\t\t\t$this->set($key,$item);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "function loadFromArray(array $inArray) {\n\t\t$this->setID((int)$inArray['ID']);\n\t\t$this->setEventID((int)$inArray['EventID']);\n\t\t$this->setSourceID((int)$inArray['SourceID']);\n\t\t$this->setUserID((int)$inArray['UserID']);\n\t\t$this->setHasEvent($inArray['hasEvent']);\n\t\t$this->setModified(false);\n\t}", "public function __construct(?array $array = [])\n {\n if (is_iterable($array)) {\n foreach ($array as $name => $relationship) {\n $this->addRelationship($name, $relationship);\n }\n }\n }", "public function __construct($array)\n {\n $array = (object)$array;\n $this->credentials = $array;\n }", "public static function __set_state(array $array)\n {\n return new self(...array_values($array));\n }", "function loadFromArray($inArray) {\n\t\t$this->setID((int)$inArray['ID']);\n\t\t$this->setUserID((int)$inArray['userID']);\n\t\t$this->setProfileName($inArray['profileName']);\n\t\t$this->setActive((int)$inArray['active']);\n\t\t$this->setCreateDate($inArray['createDate']);\n\t\t$this->setUpdateDate($inArray['updateDate']);\n\t\t$this->setModified(false);\n\t}", "public final function initFromArray( array $data )\n {\n\n $this->Instructions = isset( $data[ 'Instructions' ] )\n ? $data[ 'Instructions' ]\n : ( isset( $data[ 'Special Instructions' ] )\n ? $data[ 'Special Instructions' ]\n : null\n );\n\n $this->TransmissionReference = isset( $data[ 'Transmission Reference' ] )\n ? $data[ 'Transmission Reference' ]\n : ( isset( $data[ 'Original Transmission Reference' ] )\n ? $data[ 'Original Transmission Reference' ]\n : null\n );\n\n $this->Credit = isset( $data[ 'Credit' ] ) ? $data[ 'Credit' ] : null;\n $this->Source = isset( $data[ 'Source' ] ) ? $data[ 'Source' ] : null;\n\n }", "public function setArray(array $data) {\n\t\tforeach($data as $key => $value) $this->set($key, $value); \n\t\treturn $this; \n\t}" ]
[ "0.76482165", "0.73549527", "0.7252974", "0.7252974", "0.723193", "0.7192051", "0.71524996", "0.7125901", "0.7115698", "0.7115698", "0.7049943", "0.6965487", "0.69480735", "0.6943731", "0.69368577", "0.69111794", "0.687051", "0.6850275", "0.6841959", "0.68289727", "0.68244815", "0.68143225", "0.677326", "0.67704326", "0.6709825", "0.6704051", "0.6614138", "0.66018957", "0.657466", "0.657466", "0.65725577", "0.65474296", "0.6489714", "0.6484819", "0.6474747", "0.6456146", "0.64541554", "0.64417547", "0.64347947", "0.6419567", "0.64156944", "0.6397339", "0.6380259", "0.6355549", "0.63521034", "0.6348683", "0.63428175", "0.6330158", "0.6307078", "0.629783", "0.62790865", "0.62790865", "0.6278485", "0.6271151", "0.6250962", "0.6249476", "0.6249476", "0.62492716", "0.6247983", "0.6246099", "0.6240681", "0.6239927", "0.6236603", "0.6228489", "0.6204698", "0.6204698", "0.620438", "0.6191862", "0.6188913", "0.61784124", "0.61711484", "0.61676", "0.61673826", "0.6162695", "0.6152279", "0.61506224", "0.61482996", "0.6143671", "0.6141654", "0.6134059", "0.6129585", "0.61231184", "0.6114624", "0.6114579", "0.6113303", "0.6112154", "0.61087114", "0.61023307", "0.61023307", "0.61023307", "0.6094497", "0.6084108", "0.6084108", "0.608258", "0.60703313", "0.605921", "0.60580313", "0.6048746", "0.6038064", "0.6021568" ]
0.62006336
67
Serialize this object to an array
public function toArray(): array { return [ "includeEpisodes" => $this->includeEpisodes, "id" => $this->id, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __serialize(): array\n {\n return $this->buffered()->toArray();\n }", "public function serialize(): array;", "function jsonSerialize() {\n return $this->asArray();\n }", "function jsonSerialize()\r\n {\r\n return $this->to_array();\r\n }", "function jsonSerialize()\n {\n return $this->to_array();\n }", "public function toArray()\n {\n return json_decode(json_encode($this), true);\n }", "public function toArray()\n {\n return json_decode(json_encode($this), true);\n }", "public function toArray() {\n return json_decode(json_encode($this), true);\n }", "public function toArray()\n {\n\n }", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function jsonSerialize()\n {\n if (method_exists($this, 'toArray')) {\n return $this->toArray();\n }\n\n return [];\n }", "public function to_array()\n {\n }", "public function to_array()\n {\n }", "public function to_array()\n {\n }", "public function to_array()\n {\n }", "public function to_array()\n {\n }", "public function to_array()\n {\n }", "public function jsonSerialize() {\n return $this->toArray();\n }", "public function jsonSerialize() {\n\t\treturn $this->toArray();\n\t}", "public function toArray()\n {\n // TODO: Implement toArray() method.\n }", "public function toArray()\n {\n // TODO: Implement toArray() method.\n }", "function jsonSerialize()\n {\n return $this->toArray();\n }", "function jsonSerialize()\n {\n return $this->toArray();\n }", "public function arr() {\n\t\t\treturn \\uri\\generate::to_array($this->object);\n\t\t}", "#[ReturnTypeWillChange]\n public function __serialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\r\n {\r\n return $this->toArray();\r\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function __toArray()\n {\n return $this->toArray();\n }", "function asArray(){\n\t\t\t$array = $this->toArray( $this );\n\t\t\treturn $array;\n\t\t}", "public function serialize(): array\n {\n return [\n 'className' => get_class($this),\n 'id' => $this->id,\n 'backendId' => $this->backendId,\n 'queue' => $this->queue,\n 'arguments' => serialize(new ArrayObject($this->arguments)),\n 'attempts' => $this->attempts,\n 'enqueued' => $this->enqueued,\n 'serialized' => date('Y-m-d H:i:s'),\n ];\n }", "public function toArray(){\n $this->buildArray();\n return $this->array;\n }", "public function jsonSerialize()\n {\n // TODO: Implement jsonSerialize() method.\n return $this->toArray();\n }", "public function toArray() {\n return $this->array;\n }", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();" ]
[ "0.7780803", "0.7753661", "0.76458377", "0.76345575", "0.7628547", "0.76049304", "0.76049304", "0.75964075", "0.75543237", "0.7550399", "0.7550399", "0.75494975", "0.75494975", "0.75494975", "0.75494975", "0.7549406", "0.7549406", "0.7549406", "0.7549406", "0.7549406", "0.7549406", "0.7549406", "0.7549406", "0.7549406", "0.7549406", "0.74823165", "0.7466357", "0.7466351", "0.7466351", "0.7465555", "0.7465555", "0.7465555", "0.7445579", "0.74206525", "0.7418068", "0.7418068", "0.7405848", "0.7405848", "0.7405203", "0.74037457", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7400624", "0.73575574", "0.73575574", "0.73575574", "0.73575574", "0.73575574", "0.7349576", "0.7285166", "0.72652423", "0.7264752", "0.72511804", "0.72444826", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427", "0.722427" ]
0.0
-1
Request information from API endpoint, using a Guzzle client
public function execute(SubsonicClient $client): ResponseInterface { return $client->executeRequest("/rest/getPodcasts", $this->toArray(), ["podcasts"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function requestFromApi() \n {\n $clientApi = new \\GuzzleHttp\\Client([\n \"base_uri\" => \"https://services.mysublime.net/st4ts/data/get/type/\",\n \"timeout\" => 4.0]);\n \n try { \n $response = $clientApi->request(\"GET\", $this->_urlEndPoint);\n if ($response->getStatusCode() == \"200\") {\n $body = $response->getBody();\n $this->_jsonRequestedArr = json_decode($body); \n }\n else { \n $this->_error .= \"Bad status code: . \" . $response->getStatusCode(); \n }\n }\n catch (Exception $exc) {\n $this->_error .= $exc->getMessage();\n }\n\n }", "public function getGuzzleClient();", "function getInfo($string){\n $sym = $string;\n try {\n //Create a request but don't send it immediately\n $client = new Client();\n\n //$Client is server we are using to connect server API\n $client = new GuzzleHttp\\Client(['base_url' => '192.168.1.109']);\n\n //This 'page' is the one we use to gather Stock Information\n $response = $client->get('192.168.1.109:9090/stocks?sym='.$sym);\n \n $getInfo = $response->getBody();\n } catch (Exception $e) {\n echo \"ay, caught exception \", $e->getMessage();\n }\n return $getInfo;\n}", "public function getHelicopterAppApi()\n {\n $client = new \\GuzzleHttp\\Client();\n $url = \"http://localhost:8000/api/helicopters\";\n $res = $client->request('GET',$url, \n ['headers' => [\n 'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjgwNzdkODc2ZjQyNjRkZDZjYzkzZTUyZWNhMmI3YmMyMTBmMzQ1NjBkNDdhZWVmZGI1NDg0Y2U1Nzc3M2I2MWJmOGI5M2NjODhkMzNiMjZkIn0.eyJhdWQiOiIyIiwianRpIjoiODA3N2Q4NzZmNDI2NGRkNmNjOTNlNTJlY2EyYjdiYzIxMGYzNDU2MGQ0N2FlZWZkYjU0ODRjZTU3NzczYjYxYmY4YjkzY2M4OGQzM2IyNmQiLCJpYXQiOjE1NDM4NTUxMTAsIm5iZiI6MTU0Mzg1NTExMCwiZXhwIjoxNTc1MzkxMTA5LCJzdWIiOiIzIiwic2NvcGVzIjpbXX0.CrANY_mIeprQ4MiHURKlErLPCKHhsVYKtn8iAD5e4vzHJyEUKKsYIyBYVfFhVqxeYe9u2-iAieksq9lvHfNRSpOBWukC6jHu894ww715d9Buw96UTeAWphiQSdzhFwhr4OrQdWJ-0AHOXvgyc6ZNweZE3SAuiW3nd9z_AR3rB2HuVszny7k9qUxs5ssoY6mT-W9JvcIwijUCQKFfhysbla6imOTRmHuiAuxdpVy_J9vP-MbATg4Vcyjnlod3tF8lMkCBMizY8SQP68taRxHYRuzmsSvJL_cyxTI2MnBe2CvBPSHHGxGsE82vU7rFZ0a2k0FCbnfy6Jgwr1GLRTdz7IYaxXPD3xGFj8ennZ_mvF_lenGppB6-RKeCt47bQOH3DRxyiXIkcmvvC77paPzJO4_YetbehEABrxNNSv5XppR5m9syotlA2IsJSTVpwIgRRovvLpJ1hfxMtu7Ns_UG9GdErGTYL8QMHWmlvvLIfniz_6rmZanCfQDdikBlPvb5IvB_K_t9ffS0zudOebvRkI0pzAAGmSXh48gSAbzb8K5R-UWDKtooNqS6_MJNjUHzPvBGdN7HDUOFhujBEAN5kCx_ZgUVTo2_pBBIOgxoCPz3vf5wA8O7J9yjebmCF1yslzGrNGVwklQ484NBA2Kwy4riNahH-bVaT-6Jlj3fQUw',\n 'Accept' => 'application/json']]);\n \n echo $res->getStatusCode();\n // \"200\"\n //echo $request->getHeader('content-type');\n // 'application/json; charset=utf8'\n echo $res->getBody();\n // {\"type\":\"User\"...'\n\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 }", "public function request( $request )\n {\n $request = $request->withHeader('ApiKey', $this->apikey);\n \n $result = $this->http_client->send($request); \n \n return json_decode($result->getBody(), true);\n }", "public function apiGetRequest($endpoint);", "public function request()\n {\n $request = new GuzzleHttp\\Psr7\\Request('GET', 'ProductsSimple');\n\n return $request->withUri($request->getUri()->withQuery(http_build_query([\n 'startRow' => $this->skip ? $this->skip + 1 : null,\n 'pageRows' => $this->take,\n 'updatedAfter' => $this->updatedAfter ? $this->updatedAfter->format('Y-m-d\\TH:i:s') : null\n ])));\n }", "public function fetch()\n {\n// $client = new \\GuzzleHttp\\Client();\n\n $url = $this->provider->getUrl();\n\n// if (empty($url)) {\n// throw new \\InvalidArgumentException('Provider \"url\" must be specified.');\n// }\n\n// $response = $client->get($url);\n\n $result = $response->getBody();\n\n// try {\n// $response = $client->get($url);\n//\n// $result = $response->getBody();\n// } catch (ClientException | RequestException $e) {\n// // TODO: handle exception, log, mail etc...\n// return [];\n// }\n\n $result = json_decode($result, true);\n\n return $this->provider->transform($result);\n }", "public function exchangeRate() {\n try{\n $client = new GuzzleHttp\\Client(['base_uri' => 'https://api.exchangeratesapi.io/']);\n // Latest endpoint \n $response = $client->request('GET', 'latest');\n $statusCode = $response->getStatusCode();\n if($statusCode == 200) {\n // Get body of the response and stringify\n $body = (string)$response->getBody();\n // Parse json to ApiResponse Object\n $apiResponse = new ApiResponse($body);\n // Print associative response to console\n print_r($apiResponse);\n }\n }catch(Exception $e){\n echo $e;\n }\n\n }", "public function call()\n\t{\n\t\tcall_user_func_array(array($this->client, 'request'), func_get_args());\n\n\t\treturn $this->client->getResponse();\n\t}", "public function get($endpoint = '', $query=[], $body='');", "public function getClient();", "public function getClient();", "private function getClient()\n {\n return new \\GuzzleHttp\\Client([\n 'base_uri' => $this->url,\n 'timeout' => 2.0,\n ]);\n }", "public function index()\n {\n $client = new Client(['base_uri' => 'http://127.0.0.1:8000/api/skorpoint']);\n $request = $client->request('GET');\n // $response = json_decode($request->getBody());\n // echo $response[0]->id;\n $response = $request->getBody();\n return $response;\n }", "public function request() {\n // The basic flow: build the url, make the request, parse and return the\n // output.\n $url = $this->query_builder->getUrl();\n\n // @todo: does this make sense to be in a separate class? Anyway, this shoudl\n // be somehow refactored because it is hard to replace or overwrite it.\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n $response = curl_exec($curl);\n // @todo: very important: check the curl errors here.\n\n return $this->parser->parse($response);\n }", "function json_api_request() {\n /** @var \\CloudCreativity\\LaravelJsonApi\\Services\\JsonApiService $service */\n $service = app('json-api');\n\n return $service->request();\n }", "abstract function do_api_request();", "public function getAPI(Request $request)\n {\n }", "public function get() {\n $config = [\n 'base_uri' => 'https://example.com',\n ];\n\n $client = new Client($config);\n\n return $client;\n }", "public function getInternalRequestClient();", "public function getHttpClient();", "public function request()\n {\n return new GuzzleHttp\\Psr7\\Request('GET', 'Persons/'.$this->id);\n }", "abstract public function getHttpClient();", "public function getClient() {}", "protected function getIdentityprovidersPingRequest()\n {\n\n $resourcePath = '/api/v2/identityproviders/ping';\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\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 }", "protected function get($uri){\n // $method = 'GET';\n\n // $res = $client->request($method, $uri);\n // $res = $res->getBody()->getContents();\n // $res = json_decode($res);\n // return $res;\n // }\n try {\n $client = new Client();\n $res = $client->request('GET', $uri);\n return json_decode($res->getBody()->getContents());\n } catch (\\Exception $e) {\n //$e stock les erreures\n return abort(500);\n } \n\n /*$client = new Client(['http_errors' => false]);\n $res = $client->request('GET', $url);\n $statuscode = $res->getStatusCode();\n\n if (200 === $statuscode) {\n return json_decode($res->getBody()->getContents());\n }\n elseif (304 === $statuscode) {\n return json_decode($res->getBody()->getContents());\n }\n elseif (404 === $statuscode) {\n return abort(500);\n }\n else {\n return abort(500);\n }*/\n }", "public function get()\n {\n #HTTP method in uppercase (ie: GET, POST, PATCH, DELETE)\n $sMethod = 'GET';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData('');\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'GET::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'GET::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'GET::RESPONSE', $sOutput);\n\n if ($iHTTPCode !== 200) {\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 200');\n }\n\n return $sOutput;\n }", "public function sendRequestToEndpoint(): Response;", "public function getApi();", "public function getApi();", "public function getApi();", "public function getApiEndpoint();", "private function setupGuzzleClient() {\n $config = $this->getClientConfig();\n $this->client = $this->createGuzzleClient($config);\n }", "protected function accountDetailsRequest()\n {\n\n $resourcePath = '/accounts';\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/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function get($uri, $queryParams = ''){\n// $headers = [\n// 'Authorization' => 'Bearer '.$this->token\n// ];\n//\n// return $client->request(\n// 'GET',\n// $this->getUrl($uri),\n// array('headers'=>$headers,'query' =>$queryParams)\n// );\n//\n $client = new Client();\n return $client->request('GET', $this->getUrl($uri), ['query' => $queryParams]);\n }", "public function __construct()\n { \n //New GuzzleHttp Client\n $this->http_client= new \\GuzzleHttp\\Client([\n 'base_uri' => 'http://127.0.0.1:8000'\n ]);\n\n\n //INITIALIZE Request Path\n $this->request_path= '/api';\n\n //INITIALIZE Request Body\n $this->request_body= [];\n\n }", "public function get(string $endpoint, array $query = []): array;", "public function __construct()\n {\n $this->client = GuzzleFactory::make([\n 'base_uri' => 'https://min-api.cryptocompare.com/',\n ]);\n }", "function getProducts() {\n\techo \"Getting Products </br>\";\n\t$response = getRequest('/api/product');\n\tprintInfo($response);\n}", "public function get($apiQuery, $options = array());", "private function makeRequest()\n {\n $credentials = $this->generateCredentials();\n\n return $this->engine->client->request('POST', $this->endpoint, [\n 'json' => $credentials,\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n ],\n ]);\n }", "protected function locationsGetRequest()\n {\n\n $resourcePath = '/locations/';\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 []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api_token');\n if ($apiKey !== null) {\n $queryParams['api_token'] = $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 request($method, $endpoint = '', $query=[], $body='');", "protected function getRequest(){\n $client = $this->client;\n if(!$client instanceof Client){\n $client = new Client();\n }\n return $client;\n }", "public function testSingle() {\n $client = new Client();\n $request = $client->get('http://web/v1/combined/ibuprofen');\n $response = $request;\n $this->assertEquals(200, $response->getStatusCode());\n }", "function request($host_url, $id, $entity, $auth)\n {\n $url = \"$host_url/v1/checkouts/$id/payment?entityId=$entity\";\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Authorization:Bearer $auth\"));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // this should be set to true in production\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $responseData = curl_exec($ch);\n if (curl_errno($ch)) {\n return curl_error($ch);\n }\n curl_close($ch);\n return $responseData;\n }", "public function testClientQuery_returnsGraphQLResponse_WhenGuzzleReturnsGoodResponse()\n {\n $mock = new MockHandler([\n new Response(200, [], json_encode(['data' => ['Foo' => 'Bar']]))\n ]);\n $handler = HandlerStack::create($mock);\n $client = new HttpClient(['handler' => $handler]);\n\n $sut = new Client($client);\n\n $graphQLResponse = $sut->query('test', ['variable1' => 'value1']);\n $payload = $graphQLResponse->getPayload();\n $this->assertInstanceOf(GraphQLResponse::class, $graphQLResponse);\n $this->assertEquals('Bar',$payload['Foo']);\n }", "public function testRequest() {\n\t\t$this->startHttpHalting();\n\n\t\t$client_id = uniqid();\n\t\t$client_secret = uniqid();\n\n\t\tself::$options->set( 'domain', self::TEST_DOMAIN );\n\t\tself::$options->set( 'client_id', $client_id );\n\t\tself::$options->set( 'client_secret', $client_secret );\n\t\t$api_client_creds = new WP_Auth0_Api_Client_Credentials( self::$options );\n\n\t\t$decoded_res = [];\n\t\ttry {\n\t\t\t$api_client_creds->call();\n\t\t} catch ( Exception $e ) {\n\t\t\t$decoded_res = unserialize( $e->getMessage() );\n\t\t}\n\n\t\t$this->assertNotEmpty( $decoded_res );\n\t\t$this->assertEquals( 'https://' . self::TEST_DOMAIN . '/oauth/token', $decoded_res['url'] );\n\t\t$this->assertEquals( 'POST', $decoded_res['method'] );\n\t\t$this->assertArrayHasKey( 'Content-Type', $decoded_res['headers'] );\n\t\t$this->assertEquals( 'application/json', $decoded_res['headers']['Content-Type'] );\n\t\t$this->assertArrayHasKey( 'client_id', $decoded_res['body'] );\n\t\t$this->assertEquals( $client_id, $decoded_res['body']['client_id'] );\n\t\t$this->assertArrayHasKey( 'client_secret', $decoded_res['body'] );\n\t\t$this->assertEquals( $client_secret, $decoded_res['body']['client_secret'] );\n\t\t$this->assertArrayHasKey( 'audience', $decoded_res['body'] );\n\t\t$this->assertEquals( 'https://' . self::TEST_DOMAIN . '/api/v2/', $decoded_res['body']['audience'] );\n\t\t$this->assertArrayHasKey( 'grant_type', $decoded_res['body'] );\n\t\t$this->assertEquals( 'client_credentials', $decoded_res['body']['grant_type'] );\n\t}", "function request($host, $path, $url_params = array()) {\n // Send Yelp API Call\n try {\n $curl = curl_init();\n if (FALSE === $curl)\n throw new Exception('Failed to initialize');\n $url = $host . $path . \"?\" . http_build_query($url_params);\n curl_setopt_array($curl, array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true, // Capture response.\n CURLOPT_ENCODING => \"\", // Accept gzip/deflate/whatever.\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"authorization: Bearer \" . $GLOBALS['API_KEY'],\n \"cache-control: no-cache\",\n ),\n ));\n $response = curl_exec($curl);\n if (FALSE === $response)\n throw new Exception(curl_error($curl), curl_errno($curl));\n $http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n if (200 != $http_status)\n throw new Exception($response, $http_status);\n curl_close($curl);\n } catch(Exception $e) {\n trigger_error(sprintf(\n 'Curl failed with error #%d: %s',\n $e->getCode(), $e->getMessage()),\n E_USER_ERROR);\n }\n return $response;\n}", "function request($host, $path, $url_params = array()) {\n // Send Yelp API Call\n try {\n $curl = curl_init();\n if (FALSE === $curl)\n throw new Exception('Failed to initialize');\n $url = $host . $path . \"?\" . http_build_query($url_params);\n curl_setopt_array($curl, array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true, // Capture response.\n CURLOPT_ENCODING => \"\", // Accept gzip/deflate/whatever.\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"authorization: Bearer \" . $GLOBALS['API_KEY'],\n \"cache-control: no-cache\",\n ),\n ));\n $response = curl_exec($curl);\n if (FALSE === $response)\n throw new Exception(curl_error($curl), curl_errno($curl));\n $http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n if (200 != $http_status)\n throw new Exception($response, $http_status);\n curl_close($curl);\n } catch(Exception $e) {\n trigger_error(sprintf(\n 'Curl failed with error #%d: %s',\n $e->getCode(), $e->getMessage()),\n E_USER_ERROR);\n }\n return $response;\n}", "protected function getAPIResourcesRequest()\n {\n\n $resourcePath = '/apis/apps/v1beta1/';\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', 'application/yaml', 'application/vnd.kubernetes.protobuf']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'],\n ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('authorization');\n if ($apiKey !== null) {\n $headers['authorization'] = $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 get($endpoint, array $options = []);", "public function get(): Response {\n try {\n $query = http_build_query($this->parameters);\n return $this->client->get($this->resource.\"?\".$query);\n }\n catch (ClientException $e) {\n if ($e->getCode() == 401) {\n //attempt new login\n $this->auth = $this->auth->login();\n $this->createClient($this->auth->token());\n\n //retry query\n $query = http_build_query($this->parameters);\n return $this->client->get($this->resource.\"?\".$query);\n }\n }\n }", "public function & GetResponse ();", "public function getme(){\n return $this->make_http_request(__FUNCTION__);\n }", "public function get()\n {\n return $this->client->post($this->endPoint, $this->params);\n }", "public function getResponse() {}", "public function getResponse() {}", "protected function Request($url)\n {\n $guzzle = new Client;\n\n return $guzzle->get($url, ['http_errors' => false]);\n }", "public function getHttpClient(): ClientInterface;", "function get_rest_api($api_url = '')\n{\n try {\n // url\n $url = $api_url;\n\n // init\n $curl = curl_init();\n // execute rest\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n \n // save data \n $response = curl_exec($curl); \n\n // close connection\n curl_close($curl);\n\n return $response;\n\n } catch (\\Throwable $th) {\n //throw $th;\n }\n}", "private function info() {\n $this->client->info();\n }", "protected function getApiResult()\n {\n return Singleton::class('ZN\\Services\\Restful')->get($this->address);\n }", "protected function getCurrentAccountRequest()\n {\n\n $resourcePath = '/v1/account';\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 []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling get'\n );\n }\n\n $resourcePath = '/subscriptions/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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 = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "abstract function getPairsFromAPI();", "public function api_call($query) {\n $query = $this->sanitize_str($query); \n $url = \"https://superheroapi.com/api/1180364012471833/search/\" . $query;\n \n if (!file_get_contents($url)) {\n $err = array(\n \"response\" => \"error\",\n \"error\" => \"Couldn't connect to API\",\n );\n \n $res = json_encode($err);\n }\n else {\n $res = file_get_contents($url);\n }\n \n return $res;\n }", "protected function client() : GuzzleClient {\n return $this->client;\n }", "private function makeHttpRequest(): \\Psr\\Http\\Message\\StreamInterface\n {\n try {\n $this->options['headers'] = [\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Basic '.base64_encode($this->config['api_key']),\n ];\n\n return $this->client->{$this->verb}(\n \"{$this->apiUrl}{$this->apiEndPoint}\",\n $this->options\n )->getBody();\n } catch (HttpClientException $e) {\n throw new RuntimeException($e->getRequest()->getBody().' '.$e->getResponse()->getBody());\n }\n }", "protected function getHttp()\n\t{\n\t\treturn new \\Guzzle\\Http\\Client;\n\t}", "protected function userMeGetRequest()\n {\n\n $resourcePath = '/user/me';\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 []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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 testMakeGetRequest()\n {\n $client = new MockClient('https://api.xavierinstitute.edu', [\n new JsonResponse(['teacher' => 'Charles Xavier']),\n ]);\n\n $this->assertEquals($client->get('classes/1'), ['teacher' => 'Charles Xavier']);\n }", "public function testRetrive()\n {\n $json = <<<JSON\n{\n \"order_id\": \"f3392f8b-6116-4073-ab96-e330819e2c07\",\n \"order_amount\": 50000,\n \"order_tax_amount\": 5000\n}\nJSON;\n\n $this->mock->append(\n new Response(\n 200,\n ['Content-Type' => 'application/json'],\n $json\n )\n );\n\n $order = new Orders($this->connector, 'auth-token-123456');\n $this->assertEquals('auth-token-123456', $order->getId());\n\n $order->retrieve();\n\n $this->assertEquals('f3392f8b-6116-4073-ab96-e330819e2c07', $order['order_id']);\n $this->assertEquals(50000, $order['order_amount']);\n\n $request = $this->mock->getLastRequest();\n $this->assertEquals(Method::GET, $request->getMethod());\n $this->assertEquals(\n '/instantshopping/v1/authorizations/auth-token-123456',\n $request->getUri()->getPath()\n );\n\n $this->assertAuthorization($request);\n }", "public function get(string $endpoint): array;", "function acapi_call($method, $resource, $args, $params = array(), $body = array(), $options = array()) {\n $default_options = array(\n 'display' => TRUE,\n );\n $options = array_merge($default_options, $options);\n\n $debug = drush_get_option('debug', FALSE);\n $verbose = drush_get_option('verbose', FALSE);\n $simulate = drush_get_option('simulate', FALSE);\n $format = acapi_get_option('format');\n\n // Build the API call URL.\n $url = acapi_get_option('endpoint');\n $url .= acapi_dt($resource, $args);\n $url .= '.json';\n\n foreach ($params as $k => $v) {\n if (is_array($v)) {\n unset($params[$k]);\n foreach ($v as $key => $val) {\n $params[\"$k-$key\"] = \"$k%5B%5D=\" . urlencode($val);\n }\n }\n else {\n $params[$k] = \"$k=\" . urlencode($v);\n }\n }\n\n $url .= '?' . implode('&', $params);\n\n $creds = acapi_get_creds();\n if (!$creds) {\n return FALSE;\n }\n\n // Build the body.\n $json_body = json_encode($body);\n\n $display = \"curl -X $method '$url'\";\n if ($debug) {\n $display .= \" ($creds)\";\n }\n if ($debug || $verbose || $simulate) {\n drush_print($display, 0, STDERR);\n if (!empty($body)) {\n drush_print(\" $json_body\", 0, STDERR);\n }\n }\n\n if ($simulate) {\n return;\n }\n\n $headers = array();\n $ch = curl_init($url);\n // Basic request settings\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\n curl_setopt($ch, CURLOPT_USERAGENT, basename(__FILE__));\n if (!empty($options['result_stream'])) {\n curl_setopt($ch, CURLOPT_FILE, $options['result_stream']);\n }\n else {\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n }\n // User authentication\n curl_setopt($ch, CURLOPT_HTTPAUTH, TRUE);\n curl_setopt($ch, CURLOPT_USERPWD, $creds);\n // SSL\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, preg_match('@^https:@', acapi_get_option('endpoint')));\n curl_setopt($ch, CURLOPT_CAINFO, acapi_get_option('cainfo'));\n // Redirects\n if (!empty($options['redirect'])) {\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_MAXREDIRS, $options['redirect']+1);\n }\n /* Body\n We need to set a Content-Length header even on empty POST requests, or the webserver\n will throw a 411 Length Required.\n */\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, $json_body);\n $headers[] = 'Content-Type: application/json;charset=utf-8';\n $headers[] = 'Content-Length: ' . strlen($json_body);\n // Headers\n if (!empty($headers)) {\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n }\n // Debugging\n curl_setopt($ch, CURLOPT_VERBOSE, $debug);\n // Go\n $content = curl_exec($ch);\n if (curl_errno($ch) > 0) {\n return drush_set_error('ACAPI_CURL_ERROR', dt('Error accessing @url: @err', array('@url' => $url, '@err' => curl_error($ch))));\n }\n\n $result = json_decode($content);\n $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n\n if (!empty($format)) {\n drush_print(drush_format($result, NULL, $format));\n }\n else if ($options['display']) {\n if (is_array($result)) {\n foreach ($result as $item) {\n if (! is_scalar($item)) {\n drush_print_table(drush_key_value_to_array_table(acapi_convert_values($item)));\n }\n else {\n drush_print($item);\n }\n }\n }\n else {\n if ($method == 'POST') {\n // All POST actions return a task. Display something helpful.\n drush_log(dt('Task @taskid started.', array('@taskid' => $result->id)), 'ok');\n }\n else {\n drush_print_table(drush_key_value_to_array_table(acapi_convert_values($result)));\n }\n }\n }\n\n if ($status != 200) {\n return drush_set_error('ACAPI_HTTP_STATUS_' . $status, dt('API status code @status', array('@status' => $status)));\n }\n\n return array($status, $result);\n}", "private function call($method, $params)\n {\n $client = new Client(['base_uri' => self::BASE_URL]);\n $params['api_key'] = self::API_KEY;\n $response = $client->request('GET', $method, [\n 'query' => $params\n ]);\n return $response->getBody();\n }", "public function query($endpoint, array $where = null, string $operations = null, string $tag = null): ClientInterface;", "function get_business_details($business_id) {\n\n //converts into '/v3/businesses/{id}'\n $business_path = $GLOBALS['BUSINESS_PATH'] . urlencode($business_id);\n \n $response = request($GLOBALS['API_HOST'], $business_path);\n\n $pretty_response = json_encode(json_decode($response), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n\n $data = json_decode($pretty_response, true);\n\n //var_dump($data);\n\n return $data;\n}", "public function getRequest() {}", "public function getRequest() {}", "function getClientURL($id, $username, $businessSector, $name, $phone, $email, $fax, $search)\n{\n $url = getAPIBaseDomain().'/api/Client/'.$id.'?username='.$username.'&businessSector='.$businessSector.'&name='.$name.'&phone='.$phone.'&email='.$email.'&fax='.$fax.'&search='.$search;\n return $url;\n}", "protected function getClanBannerSourceRequest()\n {\n\n $resourcePath = '/Destiny2/Clan/ClanBannerDictionary/';\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 []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-API-Key');\n if ($apiKey !== null) {\n $headers['X-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "protected function restNewslettersGetRequest()\n {\n\n $resourcePath = '/rest/newsletters';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function request() {\r\n\t\t$this->verbose('protocol', $this->protocol);\r\n\t\t$this->verbose('method', $this->method);\r\n\t\t$this->verbose('host', $this->host);\r\n\t\t$this->verbose('path', $this->path);\r\n\t\t$this->verbose('query', $this->query);\r\n\t\t$this->verbose('headers', $this->headers);\r\n\t\t$this->verbose('body', $this->body);\r\n\t\t$this->verbose('timeout', $this->timeout);\r\n\r\n\t\t$this->addQueryToPath();\r\n\t\t$this->verbose('path + query', $this->path);\r\n\t\t$this->cleanHost();\r\n\t\t$this->verbose('cleanHost', $this->host);\r\n\r\n\t\t$url = $this->protocol . '://' . $this->host . $this->path;\r\n\t\t$this->verbose('url', $url);\r\n\r\n\t\t$this->headers['Authorization'] = $this->makeAuthHeader();\r\n\r\n\r\n\t\tforeach ($this->headers as $header_key => $header_value) {\r\n\t\t\t$header_array[] = $header_key . \":\" . $header_value;\r\n\t\t}\r\n\r\n\t\t$ch = curl_init();\r\n\t\t$options = array(\r\n\t\t\tCURLOPT_URL => $url,\r\n\t\t\tCURLOPT_RETURNTRANSFER => 1,\r\n\t\t\tCURLOPT_CUSTOMREQUEST => $this->method,\r\n\t\t\tCURLOPT_POSTFIELDS => $this->body,\r\n\t\t\tCURLOPT_HEADER => false,\r\n\t\t\tCURLINFO_HEADER_OUT => true,\r\n\t\t\tCURLOPT_HTTPHEADER => $header_array,\r\n\t\t\tCURLOPT_TIMEOUT => $this->timeout\r\n\t\t);\r\n\t\tcurl_setopt_array($ch, $options);\r\n\r\n\t\t$this->verbose('body at exec', $this->body);\r\n\t\t$response_body = curl_exec($ch);\r\n\t\t$response_error = curl_error($ch);\r\n\t\t$response_headers = curl_getinfo($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$response['error'] = $response_error;\r\n\t\t$response['body'] = $response_body;\r\n\t\t$response['header'] = $response_headers;\r\n\t\treturn $response;\r\n\t}", "abstract public function getClientInformation();", "public function testCanMakeHttpGet()\n {\n # Set desired response\n $resp = $this->createMock('Psr\\Http\\Message\\ResponseInterface');\n\n $this->mockClient->addResponse($resp);\n $httpClient = $this->givenSdk()->getHttpClient();\n\n $response = $httpClient->get(\"/dummy_uri\");\n\n $this->assertSame($resp, $response);\n }", "function getSkus() {\n\techo \"Getting Skus </br>\";\n\t$response = getRequest('/api/sku');\n\tprintInfo($response);\n}", "public function index()\n {\n try {\n $client = new Client;\n $request = $client->request('GET', env('API_URL') . '/api/shipments', [\n 'headers' => [\n 'Content-type' => 'application/json',\n 'Accept' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->token_f(),\n ],\n ]);\n // $response = $http->get(env('API_URL').'/api/getUsers');\n return $response = $request->getBody()->getContents();\n } catch (\\Exception $e) {\n\n \\Log::error($e->getMessage() . ' ' . $e->getLine() . ' ' . $e->getFile());\n return $e->getMessage() . ' ' . $e->getLine() . ' ' . $e->getFile();\n }\n }", "protected function request($endpoint, $method = 'GET', $queryParams = [], $body = '') {\n\n // GCI API requires a trailing slash with every request.\n $response = $this->guzzle->request($method, $endpoint . '/', [\n RequestOptions::QUERY => $queryParams,\n RequestOptions::BODY => $body,\n ]);\n $statusCode = $response->getStatusCode();\n\n if ($statusCode == 200 || $statusCode == 201) {\n $body = json_decode($response->getBody(), TRUE);\n return $body;\n }\n elseif ($statusCode == 204) {\n return TRUE;\n }\n elseif ($statusCode == 400) {\n echo $response->getBody();\n throw new BadRequestException();\n }\n elseif ($statusCode == 401) {\n throw new MissingApiTokenException();\n }\n elseif ($statusCode == 404) {\n throw new NotFoundException();\n }\n else {\n throw new RequestFailedException();\n }\n }", "public function createInternalRequestClient();", "public function get()\n\t{\n\t\t$response = $this->builder->get( $this->buildParameters(), $this->buildUrlAdditions() );\n\n\t\treturn $response;\n\t}", "public function call()\n {\n $client = new Client([\n 'base_url' => 'https://api.brt.it/rest/v1/',\n 'timeout' => 2.0\n ]);\n\n $request = $client->createRequest($this->method, $this->endpoint, [\n 'json' => $this->createRequestBody()\n ]);\n\n $response = $client->send($request);\n\n $response = json_decode($response->getBody());\n\n if (json_last_error() !== JSON_ERROR_NONE) {\n throw new InvalidJsonException(json_last_error_msg(), json_last_error());\n }\n\n return $response;\n }", "function get(Request &$request, Response &$response);", "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 }", "protected function getGuzzleClient() {\n\n $headerMiddleware = function (RequestInterface $request) {\n return $request\n ->withHeader('Authorization', 'Bearer ' . $this->getApiKey())\n ->withHeader('Content-type', 'application/json');\n };\n $headerMiddleware->bindTo($this);\n\n $stack = new HandlerStack();\n $stack->setHandler(new CurlHandler());\n $stack->push(Middleware::mapRequest($headerMiddleware));\n\n $client = new GuzzleHttpClient([\n 'base_uri' => self::BASE_URL,\n 'handler' => $stack,\n ]);\n\n return $client;\n }", "public function testReturnsStringIfExistingEndpointRequested()\n {\n $result = $this->apiCaller->retrieve('http://api.openweathermap.org/data/2.5');\n $this->assertTrue(is_string($result));\n }", "protected function sendViaGet(): self\n {\n $this->response = $this->callApi('GET', $this->getUrl(), $this->body());\n\n return $this->parseResponse();\n }", "public function requestData() {\n\t\t// Set up cURL \n\t\t$curl = curl_init($this->query); \n\t\tcurl_setopt($curl, CURLOPT_POST, false); \n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t\t\n\t\treturn $this->parseAPIResponse($response);\n\t}", "public function testMultiple() {\n $client = new Client();\n $request = $client->get('http://web/v1/combined/CRESTOR/BENICAR/ASPIRIN');\n $response = $request;\n $this->assertEquals(200, $response->getStatusCode());\n }" ]
[ "0.7312213", "0.6698579", "0.629872", "0.6262119", "0.6256361", "0.6190327", "0.6172232", "0.6075884", "0.60495263", "0.601892", "0.59545106", "0.5939351", "0.5889484", "0.5889484", "0.58766663", "0.58695644", "0.5858623", "0.5837372", "0.5829674", "0.5782101", "0.5771461", "0.5764839", "0.5764539", "0.5736783", "0.5732143", "0.57257587", "0.5715432", "0.57143515", "0.57091206", "0.56936", "0.56805587", "0.56805587", "0.56805587", "0.56763387", "0.5672695", "0.56583416", "0.5646217", "0.56411266", "0.562634", "0.5622716", "0.5619489", "0.56082815", "0.56049025", "0.5582766", "0.55758685", "0.55744016", "0.55716795", "0.55638117", "0.55456394", "0.5545004", "0.5541825", "0.5541825", "0.55385745", "0.55346066", "0.5526916", "0.5521684", "0.551973", "0.5498842", "0.5495268", "0.5495268", "0.54931575", "0.549191", "0.5484385", "0.548422", "0.5483554", "0.5478261", "0.54707706", "0.54614294", "0.54507077", "0.5447551", "0.5442272", "0.5437077", "0.5436751", "0.54358226", "0.54309076", "0.5430216", "0.5421092", "0.5417613", "0.54170185", "0.54142195", "0.5412698", "0.5412698", "0.5409216", "0.5407572", "0.5404984", "0.5404461", "0.54004234", "0.5396163", "0.5395833", "0.5391217", "0.53879285", "0.53876823", "0.5385996", "0.5384678", "0.53846705", "0.53838414", "0.53696215", "0.5359082", "0.5358457", "0.5357431", "0.53560084" ]
0.0
-1
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.
protected function setUp() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }", "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}", "protected function setUp()\n {\n $this->fixture = new Record();\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->load();\n }", "protected function setUp()\n {\n\t global $sys_datacite_username, $sys_datacite_password, $sys_datacite_url ;\n\n\t $this->client = new DataCiteClient($sys_datacite_username, $sys_datacite_password);\n $this->client->setDataciteUrl($sys_datacite_url);\n }", "protected function setUp()\n {\n $this->fixture = new Configuration();\n }", "public function setUp() {\r\n // and doing it every test slows the tests down to a crawl\r\n $this->sharedFixture = new MovieLensDataSet(DATA_DIR);\r\n }", "public function setUp()\n {\n parent::setUp();\n $this->prepareForTests();\n }", "protected function setUp() {\n\n $this->client = new Client(['base_uri' => getenv('API_ADDR')]);\n $this->locIDs = $this->insertTestLocations();\n reuse_generateXML();\n }", "protected function setUp(): void\n {\n $servername = '18.222.31.30';\n $username = 'phpclient';\n $password = 'leftoverkillerphp';\n $dbname = 'leftover_killer';\n self::$RecipeModel = new GetRecipeDetails($servername, $username, $password, $dbname);\n }", "public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }", "protected function setUp() {\n parent::setUp ();\n $this->storage = new Storage();\r\n $this->connectDB();\r\n $this->cleanDB();\r\n $this->createUser();\n $this->storage->connect($this->dbh);\n }", "protected function setUp() {\r\n\t\tparent::setUp ();\r\n\t\t$this->storage = new Storage ( );\r\n\t\t$this->connectDB();\r\n\t\t$this->cleanDB ();\r\n\t\t$this->createUser ();\r\n\t\t$this->storage->connect ( $this->dbh );\n\t}", "public function setUp() {\n $this->fixture= new FreeTdsLookup($this->getClass()->getPackage()->getResourceAsStream('freetds.conf'));\n }", "public static function setUpBeforeClass(): void\r\n {\r\n self::$MemoryTestAsset = new MemoryTestAsset();\r\n\r\n self::$clients = self::$MemoryTestAsset->getClients();\r\n self::$ClientsStorage = self::$MemoryTestAsset->getClientsStorage();\r\n }", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "protected function setUp()\n {\n parent::setUp();\n $config = new LocalConfiguration();\n $this->local = new Local($config);\n }", "function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t\n\t\t// Set up fixture\n\t\tif($fixtureFile) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(),0,5) != 'tmpdb') {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\t// This code is a bit misplaced; we want some way of the whole session being reinitialised...\n\t\t\tVersioned::reading_stage(null);\n\n\t\t\tsingleton('DataObject')->flushCache();\n\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// We have to disable validation while we import the fixtures, as the order in\n\t\t\t// which they are imported doesnt guarantee valid relations until after the\n\t\t\t// import is complete.\n\t\t\t$validationenabled = DataObject::get_validation_enabled();\n\t\t\tDataObject::set_validation_enabled(false);\n\t\t\t$this->fixture = new YamlFixture($fixtureFile);\n\t\t\t$this->fixture->saveIntoDatabase();\n\t\t\tDataObject::set_validation_enabled($validationenabled);\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t}", "protected function setUp() {\n\t\tparent::setUp();\n\n\t\t$this->object = new ControllerFixture([\n\t\t\t'module' => 'module',\n\t\t\t'controller' => 'controller',\n\t\t\t'action' => 'action',\n\t\t\t'args' => [100, 25]\n\t\t]);\n\n\t\t// Used by throwError()\n\t\tTiton::router()->initialize();\n\t}", "protected function setUp(): void\n {\n \tparent::setUp();\n\n \t$this->authorize();\n\n \t$this->loadFixtures([\n \t\t'product'=>ProductFixture::class\n \t]);\n }", "protected function setUp()\n {\n $this->fixture = new NamespaceDescriptor();\n }", "public function setUp()\n {\n $this->fixture = new Finder();\n }", "protected function setUp(): void\n {\n $this->fixture = new TestSubjectDescriptor();\n }", "function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// i18n needs to be set to the defaults or tests fail\n\t\ti18n::set_locale(i18n::default_locale());\n\t\ti18n::set_date_format(null);\n\t\ti18n::set_time_format(null);\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\t\t\n\t\tif(class_exists('RootURLController')) RootURLController::reset();\n\t\tif(class_exists('Translatable')) Translatable::reset();\n\t\tVersioned::reset();\n\t\tDataObject::reset();\n\t\tif(class_exists('SiteTree')) SiteTree::reset();\n\t\tHierarchy::reset();\n\t\tif(Controller::has_curr()) Controller::curr()->setSession(new Session(array()));\n\t\t\n\t\t$this->originalTheme = SSViewer::current_theme();\n\t\t\n\t\tif(class_exists('SiteTree')) {\n\t\t\t// Save nested_urls state, so we can restore it later\n\t\t\t$this->originalNestedURLsState = SiteTree::nested_urls();\n\t\t}\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\n\t\t// Set up fixture\n\t\tif($fixtureFile || $this->usesDatabase || !self::using_temp_db()) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(), 0, strlen($prefix) + 5) != strtolower(sprintf('%stmpdb', $prefix))) {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\tsingleton('DataObject')->flushCache();\n\t\t\t\n\t\t\tself::empty_temp_db();\n\t\t\t\n\t\t\tforeach($this->requireDefaultRecordsFrom as $className) {\n\t\t\t\t$instance = singleton($className);\n\t\t\t\tif (method_exists($instance, 'requireDefaultRecords')) $instance->requireDefaultRecords();\n\t\t\t\tif (method_exists($instance, 'augmentDefaultRecords')) $instance->augmentDefaultRecords();\n\t\t\t}\n\n\t\t\tif($fixtureFile) {\n\t\t\t\t$pathForClass = $this->getCurrentAbsolutePath();\n\t\t\t\t$fixtureFiles = (is_array($fixtureFile)) ? $fixtureFile : array($fixtureFile);\n\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($fixtureFiles as $fixtureFilePath) {\n\t\t\t\t\t// Support fixture paths relative to the test class, rather than relative to webroot\n\t\t\t\t\t// String checking is faster than file_exists() calls.\n\t\t\t\t\t$isRelativeToFile = (strpos('/', $fixtureFilePath) === false || preg_match('/^\\.\\./', $fixtureFilePath));\n\t\t\t\t\tif($isRelativeToFile) {\n\t\t\t\t\t\t$resolvedPath = realpath($pathForClass . '/' . $fixtureFilePath);\n\t\t\t\t\t\tif($resolvedPath) $fixtureFilePath = $resolvedPath;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$fixture = new YamlFixture($fixtureFilePath);\n\t\t\t\t\t$fixture->saveIntoDatabase();\n\t\t\t\t\t$this->fixtures[] = $fixture;\n\n\t\t\t\t\t// backwards compatibility: Load first fixture into $this->fixture\n\t\t\t\t\tif($i == 0) $this->fixture = $fixture;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->logInWithPermission(\"ADMIN\");\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t\tEmail::send_all_emails_to(null);\n\t\t\n\t\t// Preserve memory settings\n\t\t$this->originalMemoryLimit = ini_get('memory_limit');\n\t}", "public function setUp(): void\n {\n $this->fixture = new Finder();\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }", "protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}" ]
[ "0.7593164", "0.71706903", "0.6927489", "0.6910292", "0.6891104", "0.6882925", "0.6814723", "0.6802981", "0.67535055", "0.67530024", "0.6745982", "0.67330414", "0.67140543", "0.67068344", "0.67015326", "0.6683793", "0.6683793", "0.6683793", "0.6683793", "0.6683793", "0.6679458", "0.6677139", "0.6672487", "0.6669946", "0.6647294", "0.66458243", "0.66452134", "0.6636708", "0.6618305", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617435", "0.6617141", "0.6617141", "0.6617096", "0.6617096", "0.66168785", "0.66168785", "0.66168785", "0.66168785", "0.66168785", "0.66168785", "0.66168785", "0.66168785", "0.66168785", "0.66168785" ]
0.0
-1
Tears down the fixture, for example, closes a network connection. This method is called after a test is executed.
protected function tearDown() { $test_dirs = array( ROOT.DS.'test_dir', ROOT.DS.'test_new_dir', SYSTEM.DS.'test_dir', ); foreach($test_dirs as $f){ is_dir($f) and rmdir($f); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tearDown(): void\n {\n parent::tearDown();\n\n Mockery::close();\n\n unset($this->faker, $this->waqi);\n }", "public function teardown()\n {\n //\n }", "protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test data\n\t\tunset($modSettings);\n\t}", "public function tearDown()\n {\n unset(\n $this->plugins,\n $this->events,\n $this->connection,\n $this->config\n );\n }", "public function teardown()\n {\n }", "public function _after(TestCase $test)\n {\n $this->unloadFixtures();\n }", "public function tearDown()\n {\n unset($this->app);\n unset($this->client);\n\n m::close();\n }", "protected function tearDown(): void\n {\n self::$driver->close();\n }", "public function tearDown()\n\t{\n\t\tm::close();\n\t}", "protected function tearDown()\n {\n if ($this->databaseTester !== null) {\n if (method_exists($this, 'getTearDownOperation')) {\n $this->getDatabaseTester()->setTearDownOperation($this->getTearDownOperation());\n }\n if (method_exists($this, 'getDataSet')) {\n $this->getDatabaseTester()->setDataSet($this->getDataSet());\n }\n $this->getDatabaseTester()->onTearDown();\n }\n\n $this->databaseTester = null;\n\n set_time_limit(0);\n }", "public function tearDown() {\n\t\tFixtures::clear('db');\n\t\tGalleries::reset();\n\t\tImages::reset();\n\t}", "function teardown() {\n // close database connection\n $this->conn = null;\n }", "protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }", "protected function tearDown() {\r\n\t\t$this->dbh = null;\r\n\t\t$this->storage = null;\r\n\t\tparent::tearDown ();\r\n\t}", "protected function tearDown(): void\n {\n $this->closeDatabase();\n }", "protected function tearDown() {\n\t\tm::close();\n\t}", "public function tearDown()\n\t{\n\t\t$this->beforeApplicationDestroyed(function () {\n\t\t\tDB::disconnect();\n\t\t});\n\t\n\t\t\tparent::tearDown();\n\t\t\t// \t\tMockery::close();\n\t}", "public function tearDown()\n {\n unset($this->db);\n unset($this->statement);\n unset($this->mockData);\n }", "protected function tearDown() {\n\t\tparent::tearDown();\n\n\t\t$this->cleanupTestDirectory();\n\t}", "protected function tearDown()\n {\n $this->testData = null;\n parent::tearDown();\n }", "protected function tearDown(): void\n {\n $this->provider = null;\n $this->response = null;\n }", "protected function tearDown(): void\n {\n $client = $this->getProvidedData()[0] ?? null;\n if ($client instanceof Client) {\n $this->logout($client);\n }\n }", "public function teardown()\n {\n parent::teardown();\n }", "protected function doTearDown(): void\n {\n }", "protected function tearDown()\n\t{\n\t\tunset($GLOBALS['__DB__']);\n\n\t\tparent::tearDown();\n\t}", "public function teardown() {\n m::close();\n }", "public function tearDownFixtures()\n {\n if (is_array($this->_fixtures)) {\n /** @var ActiveRecordFixture $object */\n foreach ($this->_fixtures as $object) {\n $object->cleanup();\n }\n }\n }", "protected function tearDown()\n {\n // Make sure any test entities created are deleted\n foreach ($this->testEntities as $entity)\n {\n // Second param is a 'hard' delete which actually purges the data\n $this->entityLoader->delete($entity, true);\n }\n }", "public function teardown()\n {\n m::close();\n }", "public function tearDown()\n\t{\n\t\tunset($this->target);\n\t}", "protected function tearDown ()\n {\n $this->downTest();\n\n parent::tearDown();\n }", "public function tearDown()\n {\n $fs = new SymfonyFileSystem();\n $fs->remove($this->fakeTestFileDir);\n\n unset($this->builder);\n unset($this->builder);\n unset($this->fs);\n m::close();\n }", "protected function tearDown(): void\n {\n $this->tearDownTheTestEnvironment();\n }", "protected function tearDown() {\r\n\t\tunset ( $this->configReader );\r\n\t}", "protected function tearDown() {\n\t\t$this->sql->Disconnect(__FILE__, __LINE__);\n\t\tsqlsolution_unlink_sqlite($this->sql);\n\t\t$this->sql = null;\n\t}", "protected function tearDown()\n {\n parent::tearDown();\n\n $this->em->close();\n $this->em = null; // avoid memory leaks\n }", "protected function tearDown()\n {\n $this->testDBConnector->clearDataFromTables();\n }", "public function tearDown() {\n\n\t\tparent::tearDown();\n\t\tMockery::close();\n\t}", "public function tearDown()\n {\n $this->stop();\n }", "public function tearDown()\n {\n m::close();\n }", "public function tearDown()\n {\n m::close();\n }", "public function tearDown()\n {\n m::close();\n }", "public function tearDown()\n {\n unset($this->helper);\n }", "protected function tearDown() {\n\n $this->client = null;\n $this->deleteTestLocations();\n $this->locIDs = null;\n reuse_generateXML();\n }", "public function tearDown()\n\t{\n\t\tunset($this->stub);\n\t}", "protected function tearDown()\n\t {\n\t\tunset($this->object);\n\n\t\t$conn = $this->getConnection();\n\t\t$db = $conn->getConnection();\n\t\t$db->exec(\"DROP TABLE IF EXISTS `MySQLdatabase`;\");\n\n\t\tunset($GLOBALS[\"errstr\"]);\n\t\tunset($GLOBALS[\"stuckerror\"]);\n\t }", "protected function tearDown()\n {\n $this->local = null;\n parent::tearDown();\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tearDown() {\n $this->dbh = null;\n $this->storage = null;\n parent::tearDown ();\n }", "public function tear_down()\n {\n }", "public function tear_down()\n {\n }", "public function tear_down()\n {\n }", "protected function tearDown()\n {\n $this->kernel->shutdown();\n $this->kernel = null;\n parent::tearDown();\n }", "public function tearDown()\n\t{\n\t\t\\Orchestra\\Core::shutdown();\n\n\t\tunset($this->user);\n\t\tunset($this->stub);\n\n\t\tparent::tearDown();\n\t}", "public function tearDown()\n {\n unset($this->VenusFuelDepot);\n }", "protected function tearDown()\n\t{\n\t\tunset($this->_instance);\n\t\tparent::tearDown();\n\t}", "public function tearDown()\n {\n parent::tearDown();\n\n if ((bool) getenv('CLEANUP_TEST_DOCKER_SECRETS')) {\n DockerSecretFile::cleanup();\n }\n }", "protected function tearDown()\n\t{\n\t\t$this->restoreFactoryState();\n\t}", "protected function tearDown()\n {\n $this->dataCollector = null;\n parent::tearDown();\n }", "public function tearDown()\n {\n unset($this->app);\n unset($_SERVER['RouteManagerTest@callback']);\n m::close();\n }", "protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }", "public function tearDown(){\n\t\t$this->container->get('doctrine')->getConnection()->close();\n\t\n\t\tparent::tearDown();\n\t}", "protected function tearDown()\n {\n unset($this->app);\n\n m::close();\n }", "protected function tearDown(): void\n {\n $this->_connection->dropTable($this->_tableName);\n $this->_connection->resetDdlCache($this->_tableName);\n $this->_connection = null;\n }", "public function tearDown()\n {\n if (null !== $this->ldap) {\n $this->ldap->unbind();\n }\n }", "public function tearDown()\n {\n $this->deleteAdminUserFixture();\n }", "public function tearDown()\n {\n $this->flushModelEventListeners();\n parent::tearDown();\n unset($this->app);\n\n /*\n * Restore environment\n */\n if (file_exists(base_path($this->envTestingFile())) && file_exists(base_path('.env.backup'))) {\n $this->restoreEnvironment();\n }\n }", "public function tearDown()\n {\n unset($this->commonDataClassRepository);\n }", "protected function tearDown()\n\t{\n\t\tparent::tearDown();\n\t\tEnUser::release();\n\t\tRPCContext::getInstance()->resetSession();\n\t\tRPCContext::getInstance()->unsetSession('global.uid');\n\t\tFragseizeObj::release( $this->uid );\n\t}", "protected function tearDown()\n {\n $this->client = null;\n }", "public function tearDown() \n {\n $this->flushSession();\n \n $this->inactiveUser->delete();\n $this->basicUser->delete();\n $this->contactManager->delete();\n $this->projectManager->delete();\n $this->administrator->delete();\n\n parent::tearDown();\n Mockery::close();\n }", "public function tearDown() {\n // tests using these functions.\n \\mod_forum\\subscriptions::reset_forum_cache();\n\n $this->messagesink->clear();\n $this->messagesink->close();\n unset($this->messagesink);\n\n $this->mailsink->clear();\n $this->mailsink->close();\n unset($this->mailsink);\n }", "public function tearDown()\n\t{\n\t\tparent::tearDown();\n\t\t$this->databaseTester = NULL;\n\t}", "public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }", "protected function tearDown()\n {\n $this->helper = null;\n parent::tearDown();\n }", "public function tearDown()\n {\n $this->client = null;\n }", "protected function tearDown() {\n\t}", "protected function tearDown() {\n\t}", "protected function tearDown() {\n\t}", "protected function tearDown() {\n\t}", "protected function tearDown() {\n\t}", "protected function tearDown() {\n\t}", "protected function tearDown()\n\t{\n\t\t$this->instance = null;\n\t}", "public static function tearDownAfterClass(): void\n {\n if (file_exists(static::$ou)) {\n unlink(static::$ou);\n }\n }", "protected function tearDown()\r\n {\r\n $application = new Application(self::$kernel);\r\n $application->setAutoExit(false);\r\n\r\n $options = array('command' => 'doctrine:database:drop', '--force' => true);\r\n $application->run(new ArrayInput($options));\r\n\r\n parent::tearDown();\r\n\r\n $this->em->close();\r\n $this->em = null;\r\n }", "protected function tearDown()\n {\n parent::tearDown();\n if (!is_null($this->em)) {\n $this->em->getConnection()->close();\n }\n }", "protected function tearDown()\n {\n $this->deleteTemporaryFiles();\n }", "protected function tearDown(): void\n {\n m::close();\n }", "protected function tearDown(): void\n {\n m::close();\n }", "protected function tearDown(): void\n {\n m::close();\n }", "protected function tearDown(): void\n {\n m::close();\n }", "protected function tearDown(): void\n {\n m::close();\n }", "protected function tearDown(): void\n {\n m::close();\n }", "public function tearDown()\n {\n Resistance::reset();\n }", "public function tearDown()\n\t{\n\t\tMockery::close();\n\t}", "protected function tearDown()\n {\n $this->clock = NULL;\n }", "protected function tearDown()\n\t{\n\t\tparent::tearDown ();\n\t\tEnUser::release();\n\t\tRPCContext::getInstance()->resetSession();\n\t\tRPCContext::getInstance()->unsetSession('global.uid');\n\t}" ]
[ "0.7307295", "0.72373646", "0.72212124", "0.71885014", "0.7186963", "0.71493495", "0.7140486", "0.7134767", "0.71205044", "0.7103491", "0.70815605", "0.7079464", "0.7077445", "0.70528567", "0.70491225", "0.7033102", "0.70235026", "0.70154876", "0.7002158", "0.69997466", "0.69997215", "0.69913113", "0.69911915", "0.6980351", "0.69593203", "0.6956807", "0.69554454", "0.6946395", "0.69386446", "0.69347864", "0.69289035", "0.6926076", "0.6923075", "0.691891", "0.69103754", "0.6910236", "0.69065684", "0.69007057", "0.6892851", "0.68898815", "0.68898815", "0.68898815", "0.68890655", "0.6888701", "0.68837935", "0.68633074", "0.68610644", "0.68593764", "0.68593764", "0.68593764", "0.68593764", "0.68593764", "0.68542683", "0.6853351", "0.6853351", "0.6853351", "0.6852269", "0.6851849", "0.68441683", "0.68404126", "0.68389857", "0.6833703", "0.6830133", "0.6829759", "0.68119836", "0.6810888", "0.6808186", "0.6807382", "0.6807131", "0.68028027", "0.6800549", "0.6792887", "0.6791933", "0.67879957", "0.6779562", "0.6774282", "0.6769828", "0.67697936", "0.676703", "0.67669386", "0.6761217", "0.6761217", "0.6761217", "0.6761217", "0.6761217", "0.6761217", "0.67601454", "0.6759811", "0.6758291", "0.67550105", "0.6754296", "0.6753337", "0.6753337", "0.6753337", "0.6753337", "0.6753337", "0.6753337", "0.67507684", "0.6749744", "0.6748939", "0.6748269" ]
0.0
-1
Test for Directory::factory() The directory doesn't exist. Throws Kaili\DirectoryException because the provided directory doesn't exist.
public function test_factory_not_exist() { Directory::factory(ROOT.DS.'test_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function should_throw_if_trying_to_build_on_non_existing_directory(): void\n {\n $this->expectException(\\InvalidArgumentException::class);\n new DirectorySnapshot(__DIR__ . '/not-existing');\n }", "private function ensureDirectory() {\n\t\tif (!is_dir($this -> directory)) {\n\t\t\tif (!mkdir($this -> directory)) {\n\t\t\t\tthrow new LatexException('Could not create directory ' . $this -> directory);\n\t\t\t}\n\t\t}\n\t}", "function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }", "private function createDir()\n {\n if ($this->dirCreated) {\n return;\n }\n\n $dir = $this->getDirFromStream($this->url);\n if (null !== $dir && !is_dir($dir)) {\n $this->errorMessage = null;\n set_error_handler(array($this, 'customErrorHandler'));\n $status = mkdir($dir, 0777, true);\n restore_error_handler();\n if (false === $status) {\n throw new \\UnexpectedValueException(sprintf('There is no existing directory at \"%s\" and its not buildable: '.$this->errorMessage, $dir));\n }\n }\n $this->dirCreated = true;\n }", "private function check_directory()\n\t{\n\t\tif (!is_dir(Kohana::config($this->type.'.cache_folder')))\n\t\t\tmkdir(Kohana::config($this->type.'.cache_folder'));\n\t}", "public function testInvalidArgumentExceptionIsThrownIfDirectoryIsNotReadableWhenCreatingProcedureLoader()\n {\n $this->setExpectedException('\\InvalidArgumentException');\n\n $procedureFactory = $this->getProcedureFactory();\n\n $procedureLoaderFactory = $this->getProcedureLoaderFactory($procedureFactory);\n $procedureLoaderFactory->createProcedureLoader('invalid/directory');\n }", "public function test_create_exists()\n {\n Directory::create(ROOT.DS.'application');\n }", "public function testOnNewDirectoryWithIllegalArgumentException() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n try {\n\n $obj->onNewDirectory($this->doc1);\n } catch (Exception $ex) {\n\n $this->assertInstanceOf(IllegalArgumentException::class, $ex);\n $this->assertEquals(\"The document must be a directory\", $ex->getMessage());\n }\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "protected function createDirectory() {}", "protected function isDirectory() {}", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function testLoadThrowsDataDirectoryNotFoundForNonExistingDir(): void\n {\n $dirname = 'nonexistent';\n $path = $this->getFullPath($dirname);\n $this->expectException(DataDirectoryNotFoundException::class);\n $this->expectExceptionExactMessage(\"Root folder $path was not found.\");\n\n $directoryDataLoader = $this->prepareDirectoryDataLoader();\n\n $directoryDataLoader->load($path, '/^.*\\..*$/');\n }", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function createDirectoriesIfTheyDontExist()\n\t{\n\t\t$directories = array(\n\t\t\t$this->getIntegrationDirectory(),\n\t\t\t$this->getProductsProcessingDirectory(),\n\t\t\t$this->getProductsProcessedDirectory(),\n\t\t\t$this->getStockProcessingDirectory(),\n\t\t\t$this->getStockProcessedDirectory()\n\t\t);\n\t\tforeach ($directories as $directory){\n\t\t\tif(!file_exists($directory)){\n\t\t\t\tmkdir($directory);\n\t\t\t}\n\t\t}\n\t}", "function mdl_create_directory_if_not_exists(string $dirname)\n{\n // Create the path directory if not exists\n if (!is_dir($dirname)) {\n mkdir($dirname, 0777, true);\n }\n}", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "public function testEmptyDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory]);\n \n $this->assertFalse($this->mockFileUploadDir->hasChild('bar'));\n $this->assertFileExists(vfsStream::url('foo'));\n }", "protected static function checkForDirectoryToBeExisting($directory) {\n\t\tif (!file_exists($directory)) {\n\t\t\tthrow new Exception($directory . ' is not existing! 1287234117');\n\t\t}\n\t}", "public function testCreateDataCollectionFailsBecauseOfEmptyDirectory(): void\n {\n $path = __DIR__ . '/../../../fixtures/empty-directory';\n\n $this->expectException(RuntimeException::class);\n $this->expectExceptionMessage(sprintf('Directory \"%s/browsers\" was empty.', $path));\n\n $this->object->createDataCollection($path);\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function testLoadThrowsDataDirectoryNotFoundForNonReadableDirectory(): void\n {\n $dirname = 'forbidden';\n $this->addDirectoryToVFS($dirname, 0);\n $path = $this->getFullPath($dirname);\n $this->expectException(DataDirectoryNotFoundException::class);\n $this->expectExceptionExactMessage(\"Root folder $path was not found.\");\n\n $directoryDataLoader = $this->prepareDirectoryDataLoader();\n\n $directoryDataLoader->load($path, '/^.*\\..*$/');\n }", "public function createDirectory($directory = null)\n {\n if (!empty($directory) && !file_exists($directory)) {\n if (!mkdir($directory, 0755, true)) {\n throw new \\Exception('Unable to create directory: ' . $directory);\n }\n }\n return $directory;\n }", "function check_directory($directory)\n{\n if (!Storage::exists($directory)) {\n Storage::makeDirectory($directory);\n }\n\n return $directory;\n}", "private function checkDirectory($directory, Output $output = null)\n {\n if (!is_dir($directory)) {\n if ($output != null) {\n $output->writeNewLine();\n $output->writeLine(\"Invalid folder ($directory) is given.\");\n $output->writeNewLine();\n }\n\n throw new \\Exception(\"Invalid folder ($directory) is given.\");\n }\n }", "public function testCacheFileDoesNotExistsAndDirectoryIsNotWritable()\n {\n $cacheFile = __DIR__ . '/non-writable-directory/router.cache';\n\n $this->expectException(RuntimeException::class);\n $this->expectExceptionMessage(sprintf(\n 'Route collector cache file directory `%s` is not writable',\n dirname($cacheFile)\n ));\n\n $responseFactoryProphecy = $this->prophesize(ResponseFactoryInterface::class);\n $callableResolverProphecy = $this->prophesize(CallableResolverInterface::class);\n\n $routeCollector = new RouteCollector($responseFactoryProphecy->reveal(), $callableResolverProphecy->reveal());\n $routeCollector->setCacheFile($cacheFile);\n }", "public function checkDir($directory)\n {\n if (!is_dir($directory)) {\n //Directory does not exist, so lets create it.\n mkdir($directory, 0755, true);\n }\n\n }", "public function testTypeIdentifiesDirectory()\n {\n mkdir(self::$temp.DS.'foo-dir');\n\n $this->assertSame('dir', Storage::type(self::$temp.DS.'foo-dir'));\n }", "public function testCreateDataCollectionThrowsExceptionOnInvalidDirectory(): void\n {\n $collection = $this->getMockBuilder(DataCollection::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $property = new ReflectionProperty($this->object, 'collection');\n $property->setValue($this->object, $collection);\n\n $this->expectException(RuntimeException::class);\n $this->expectExceptionMessage('Directory \"./platforms\" does not exist.');\n\n $this->object->createDataCollection('.');\n }", "protected function checkDirectory()\n {\n $directoryPath = $this\n ->directory\n ->getDirectoryPath();\n\n if (!is_dir($directoryPath)) {\n\n mkdir($directoryPath);\n }\n\n return $this;\n }", "private function dirIsValid() {\n return is_dir($this->directory);\n }", "public function createDirectoriesIfTheyDontExist()\n {\n $directories = array(\n $this->getNewSitemapPath(),\n $this->getExistingSitemapPath()\n );\n foreach ($directories as $directory){\n if(!file_exists($directory)){\n mkdir($directory);\n }\n }\n }", "public function canNotOpenDirectory()\n {\n $this->assertFalse(@dir(vfsStream::url('foo')));\n }", "public function testLoadThrowsDataDirectoryNotFoundForFileInsteadOfDirectory(): void\n {\n $filename = 'accessible.json';\n $this->addFileToVFS($filename);\n $path = $this->getFullPath($filename);\n $this->expectException(DataDirectoryNotFoundException::class);\n $this->expectExceptionExactMessage(\"Root folder $path was not found.\");\n\n $directoryDataLoader = $this->prepareDirectoryDataLoader();\n\n $directoryDataLoader->load($path, '/^.*\\..*$/');\n }", "public function testOnNewDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onNewDirectory($this->dir1);\n $this->assertFileExists($this->directory . \"/1\");\n\n $obj->onNewDirectory($this->dir2);\n $this->assertFileExists($this->directory . \"/1/2\");\n\n $obj->onNewDirectory($this->dir3);\n $this->assertFileExists($this->directory . \"/1/2/3\");\n }", "public function setupPath()\n {\n // if directory doesn't exist, create it\n if (!is_dir($this->path->getPath())) {\n $reporting = error_reporting();\n error_reporting(0);\n $created = mkdir($this->path->getPath(), 0755, true);\n error_reporting($reporting);\n if (!$created) {\n throw new Exception(sprintf('cant\\'t create directory: %s', $this->path->getPath()));\n }\n }\n if (!is_writable($this->path->getPath())) {\n throw new Exception(sprintf('no write permission for directory: %s', $this->path->getPath()));\n }\n }", "protected function checkFilesDir() {\n\t\t$perms = @fileperms(self::FILES_DIR);\n\t\t/* create if not exist */\n\t\tif ($perms === false) {\n\t\t\tif (!mkdir(self::FILES_DIR, 0700, true)) {\n\t\t\t\tthrow new QuicksandException(\"Cannot create files dir.\");\n\t\t\t}\n\t\t}\n\t\t/* check if dir */\n\t\telse if (($perms & 0x4000) != 0x4000) {\n\t\t\tthrow new QuicksandException(\"Files dir is not actually a directory.\");\n\t\t}\n\t\t/* check permissions */\n\t\telse if (($perms & 0700) != 0700) {\n\t\t\tthrow new QuicksandException(\"Missing permissions. Make sure this script can read, write and enter the files dir.\");\n\t\t}\n\t}", "public function ensureDirExists($dirs);", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "function destinationIsValid($destination, $make = true) {\n if (file_exists($destination) AND !is_dir($destination)) {\n throw new TerminusException(\n 'Destination given is a file. It must be a directory.'\n );\n }\n\n if (!is_dir($destination)) {\n if (!$make) {\n $make = Input::confirm(\n array('message' => 'Directory does not exists. Create it now?')\n );\n }\n if ($make) {\n mkdir($destination, 0755);\n }\n }\n\n return $destination;\n}", "private function check_directory($path) {\n\t\tif (!@opendir($path)) {\n\t\t\tmkdir($path, 0755);\n\t\t} //if(!@opendir($path))\n\t\treturn;\n\t}", "function IsDirExists($dir) {\n\t\tif (!is_dir($dir)) {\n\t\t\t$msg = \"There is no Directory in this path: \";\n\t\t\techo $msg = $msg . $dir; \n\t\t}else {\n\t\t\treturn $dir;\n\t\t} \n\t}", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "private function mustCreateFolder(){\n }", "private static function defaultDirectory($dir){\n $dirs = array(\"controller\", \"model\");\n\n foreach ($dirs as $d){\n if(!file_exists($dir . \"/\" . $d)) {\n if (@!mkdir($dir . \"/\" . $d, 0777))//criar arquivo de log caso não crie o path\n print \"<< [create_path_\" . self::$pathName . \"] Error ao criar o diretorio << \" . self::$pathName .\"/\".$d. \" >>\\n\";\n\n }\n }\n }", "private function ensureDirectoryExists( $directory )\n\t{\n\t\t$TargetDirName = realpath( \"./\" ) . '/' . $directory;\n\t\tif( ( ! realpath( $directory ) ) &&\n\t\t\t ( ! mkdir( $TargetDirName, 0777, true ) ) )\n\t\t{\n\t\t\t;\n\t\t}\n\t}", "private function checkSaveDir()\n\t{\n\t\t// Determines the path to check:\n\t\t$path = $_SERVER['DOCUMENT_ROOT'] . $this->save_dir;\n\n\t\t// Check to see if directory exists:\n\t\tif(!is_dir($path))\n\t\t{\n\t\t\t// Check to see if directory can be made, this will also make the directory:\n\t\t\tif(!mkdir($path, 0777, TRUE))\n\t\t\t{\n\t\t\t\t// If fails, throw execption:\n\t\t\t\tthrow new Exception(\"Can't create the directory!\");\n\t\t\t\n\t\t\t}\n\t\t}\n\t}", "private function checkDir()\n {\n if (!is_dir($this->basePath)) {\n throw new InvalidArgumentException('base path: ' . $this->basePath .\n ' is not a directory or does not exist' .\n ' current working dir is ' . getcwd());\n }\n // check writable\n if (!is_writable($this->basePath)) {\n throw new InvalidArgumentException('base path: ' . $this->basePath .\n ' is not writable' .\n ' current working dir is ' . getcwd());\n }\n }", "public function hasDirectory(): bool;", "public function hasDirectory(): bool;", "protected function checkIfImagineCacheDirectoryExists(): void\n {\n $cacheDirectory = $this->kernel->getProjectDir() . '/public/media/cache';\n $fs = new Filesystem();\n if ($fs->exists($cacheDirectory)) {\n return;\n }\n try {\n $parentDirectory = mb_substr($cacheDirectory, 0, -6);\n if (!$fs->exists($parentDirectory)) {\n $fs->mkdir($parentDirectory);\n }\n $fs->mkdir($cacheDirectory);\n } catch (IOExceptionInterface $exception) {\n $request = $this->requestStack->getCurrentRequest();\n if ($request->hasSession() && $session = $request->getSession()) {\n $session->getFlashBag()->add(\n 'warning',\n $this->translator->trans(\n 'The cache directory \"%directory%\" does not exist. Please create it and make it writable for the webserver.',\n ['%directory%' => $cacheDirectory],\n 'config'\n )\n );\n }\n }\n }", "public function test_UserFileWithDrDir()\n {\n $this->setExpectedException('Q\\Exception', \"File '{$this->file}' is not a directory, but a file\");\n $config = Config::with(\"dir:mock:{$this->file}\");\n }", "function check_dir_exists($dir,$create=false) {\n\n global $CFG; \n\n $status = true;\n if(!is_dir($dir)) {\n if (!$create) {\n $status = false;\n } else {\n umask(0000);\n $status = mkdir ($dir,$CFG->directorypermissions);\n }\n }\n return $status;\n }", "private function ensureDirectory($directoryPath) {\r\n\t\tif (! is_dir ( $directoryPath )) {\r\n\t\t\t$this->logger->writeLOG( '-not already a directory ' . $directoryPath);\r\n\t\t\tif (mkdir ( $directoryPath )) {\r\n\t\t\t\t$this->logger->writeLOG( '-created directory ' . $directoryPath);\r\n\t\t\t} else {\r\n\t\t\t\t$this->logger->writeLOG( '-failed to create directory ' . $directoryPath);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->logger->writeLOG( '-existing directory ' . $directoryPath);\r\n\t\t}\r\n\t}", "protected function verifyApplicationDoesntExist($directory, OutputInterface $output)\n {\n if (is_dir($directory)) {\n throw new RuntimeException('Application already exists!');\n }\n }", "private function checkDir()\n {\n $this->init = $this->url[0].'/';\n\n for ($i=0; $i < $this->count; $i++) { \n if (is_dir($this->init)) {\n if ($i == 0) {\n $this->dir .= $this->init;\n } elseif (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n } else {\n if ($i == 0) {\n $this->dir .= 'views/';\n }\n \n if (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n \n }\n }\n\n $this->dir = str_replace(\"//\", \"/\", $this->dir);\n $this->checkFile();\n }", "public function createRootDirectory(DirectoryInterface $directory): DirectoryInterface;", "public static function assertIsDirectory($path) {\n if (!is_dir($path)) {\n throw new FilesystemException(\n $path,\n pht(\"Requested path '%s' is not a directory.\", $path));\n }\n }", "public function testOnDeletedDirectoryWithIllegalArgumentException() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n try {\n\n $obj->onDeletedDirectory($this->doc1);\n } catch (Exception $ex) {\n\n $this->assertInstanceOf(IllegalArgumentException::class, $ex);\n $this->assertEquals(\"The document must be a directory\", $ex->getMessage());\n }\n }", "function create_dir($dir_path){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }", "private function checkFolderPathExist()\n {\n $folderPath = $this->getFolderPath();\n if (!file_exists($folderPath)) {\n mkdir($folderPath, 0777, true);\n }\n }", "public function mkdirDeepCreatesDirectoryWithAndWithoutDoubleSlashesDataProvider() {}", "public function testGetDirectory(): void\n {\n $model = Hash::load([\n \"directory\" => \"directory\",\n ], $this->container);\n\n $this->assertSame(\"directory\", $model->getDirectory());\n }", "private function checkDir() {\n if (! is_dir ( $this->option ['templateDir'] ))\n $this->core->err ( '101', $this->option ['templateDir'] );\n \n if (! is_dir ( $this->option ['compileDir'] ))\n $this->core->err ( '101', $this->option ['compileDir'] );\n \n if (! is_dir ( $this->option ['cacheDir'] ))\n $this->core->err ( '101', $this->option ['cacheDir'] );\n }", "public function testDirnameReturnsDirectory()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame(self::$temp, Storage::dirname(self::$temp.DS.'foo.txt'));\n }", "protected function throwUnableToCreate()\n {\n throw new FilesystemException(\"Unable to create the file '{$this->path}'. A directory with the same path already exists.\");\n }", "public function testConstructSingleDirectory()\n {\n $filter = new FileRename($this->newDir);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "public function createDirectory()\n {\n $bReturn = $this->exists();\n if( !$bReturn && $this->_sPath->isValid() )\n {\n $bReturn = mkdir( (string)$this->_sPath, 0770, TRUE);\n if( $bReturn )\n {\n $this->_sPath->setValue( $this->getRealPath() );\n }\n }\n return $bReturn;\n }", "private function checkSaveDir(){\n\t\t//determines the path to check\n\t\t$path=$_SERVER['DOCUMENT_ROOT'].$this->save_dir;\n\t\t\n\t\t//check if the directory exists\n\t\tif(!is_dir($path)){\n\t\t\t//creates the directory\n\t\t\tif(!mkdir($path,0777,TRUE)){\n\t\t\t\tthrow new Exception(\"Can't create the directory\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function crearCarpeta($ruta){\r\n if (!is_dir(($ruta))){\r\n mkdir($ruta);\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n}", "public function makeDirIfNotExist(string $dir): void\n {\n if (!is_dir($dir))\n mkdir($dir, 0777, true);\n \n }", "public function createDirectory(DirectoryInterface $directory, DirectoryInterface $parent): DirectoryInterface;", "function cemhub_create_directory($directory) {\n $return = FALSE;\n\n if (!is_dir($directory)) {\n if (!mkdir($directory, 0777, TRUE)) {\n watchdog('cemhub', 'Could not create directory: {$directory}');\n }\n else {\n $return = TRUE;\n }\n }\n\n return $return;\n}", "public function assertIsDirectory($path);", "public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }", "public abstract function getDirectory();", "public function testFileExists()\n {\n $filePointer = 'Core/RandomNonExistentDirectory/RandomFileNamexhjctgyutcgasghj.php';\n //initial test will fail\n $this->assertFalse(FileExists::exists($filePointer));\n\n // test using a file that should definitely exist\n $filePointer = 'Core/Config/bootstrap.php';\n // if the core has not been tampered with, this test should pass\n $this->assertTrue(FileExists::exists($filePointer));\n }", "public function __construct($path, \\Exception $previous = null) {\n\t\tparent::__construct('Directory ' . $path . ' does not exists', 0, $previous);\n\t}", "public function testCreateInvalidFile()\n {\n new MaterializedResource(new GenericResource('file_not_found.txt'), '/probably/not/a/directory');\n }", "public function createDirectory()\n\t{\n\t\tif(is_dir($this->storagePath) and is_writable($this->storagePath)===false)\n\t\t{\n\t\t\tchmod($this->storagePath,$this->permissions);\n\t\t}\n\t\t\n\t\tif(is_dir($this->storagePath) and is_writable($this->storagePath))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(!is_dir($this->storagePath) and $this->createDir===true and mkdir($this->storagePath,$this->permissions,true))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tthrow new \\RuntimeException(\"Cannot to create the storage path:\".$this->storagePath);\n\t}", "function dossier_existe($dossier)\n{\n $result = false;\n \n if(file_exists($dossier) && is_dir($dossier))\n $result = true;\n \n return $result;\n}", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "protected function verifyApplicationDoesntExist($directory)\n {\n if ((is_dir($directory) || is_file($directory)) && $directory != getcwd()) {\n throw new RuntimeException('Application already exists!');\n }\n }", "protected function verifyApplicationDoesntExist($directory)\n {\n if ((is_dir($directory) || is_file($directory)) && $directory != getcwd()) {\n throw new RuntimeException('Application already exists!');\n }\n }", "function is_needed_new_folder_form($directory)\n{\n\t// SEE: ternary operator.\n\treturn (is_dir($directory))?TRUE:FALSE;\n}", "function createDirectory() {\n\t$fmpImporter = new FilemakerProImporter();\n\t$fmpImporter->createDirectory();\n}", "private static function checkDirectory( $directoryName ) {\n\t\tif( ! is_dir( CACHE . \"$directoryName\" ) ) {\n\t\t\t// TODO: Provjera ispravnosti imena direktorija?\n\t\t\tmkdir( CACHE . \"$directoryName\" );\n\t\t\t// Odmah i index.html da se ne bi vidio sadrzaj:\n\t\t\tfile_put_contents( CACHE . $directoryName . '/index.html', '' );\n\t\t}\n\t}", "public function createDirectory(string $directory) : bool\n {\n if(!file_exists($directory)) {\n mkdir($directory);\n return true;\n } else if (file_exists($directory)) {\n return true;\n } else {\n return false;\n }\n }", "protected function assertFilesDontExist()\n {\n $this->assertFileNotExists($this->getSeedFilePath('LarafolioSeeder.php'));\n\n $this->assertFileNotExists($this->getSeedFilePath('ImagesTableSeeder.php'));\n\n $this->assertFileNotExists($this->getSeedFilePath('ProjectsTableSeeder.php'));\n\n $this->assertFileNotExists($this->getSeedFilePath('TextBlocksTableSeeder.php'));\n\n $this->assertFileNotExists($this->getSeedFilePath('UsersTableSeeder.php'));\n\n $this->assertFileNotExists(database_path('factories/ModelFactory.php'));\n }", "protected function createDestinationDirectory()\n {\n if ($this->fs->exists($this->destinationDirectory)) {\n if (!$this->overwrite) {\n throw new RuntimeException(t('The directory %s already exists.', $this->destinationDirectory));\n }\n if ($this->fs->isFile($this->destinationDirectory)) {\n throw new RuntimeException(t('The destination %s is a file, not a directory.', $this->destinationDirectory));\n }\n\n return;\n }\n if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {\n $this->output->writeln(t('Creating directory %s', $this->destinationDirectory));\n }\n if (!$this->fs->makeDirectory($this->destinationDirectory)) {\n throw new RuntimeException(t('Failed to create the directory %s.', $this->destinationDirectory));\n }\n }", "public function is_dir(string $message = ''): self {\n if (is_dir(filename: $this->path)) {\n return $this;\n }\n\n throw new \\InvalidArgumentException(\n message: $message ?: \"Path '{$this->path}' must be a directory.\",\n );\n }", "public function createDirectory(\\SplFileInfo $directoryToCreate)\n {\n\n // set the umask that is necessary to create the directory\n $this->initUmask();\n\n // we don't have a directory to change the user/group permissions for\n if ($directoryToCreate->isDir() === false) {\n // create the directory if necessary\n if (mkdir($directoryToCreate->getPathname()) === false) {\n throw new \\Exception(sprintf('Directory %s can\\'t be created', $directoryToCreate->getPathname()));\n }\n }\n\n // load the deployment service\n $this->setUserRights($directoryToCreate);\n }", "protected static function try_create_folder( $dir, $allow_dir_create ) {\r\n\t\t\tif ( !is_dir( $dir ) ) {\r\n\t\t\t\tif ( $allow_dir_create ) {\r\n\t\t\t\t\tif ( !mkdir( $dir, 0777, true ) ) {\r\n\t\t\t\t\t\tthrow new Exception( 'Unable to create folder, check the parent folder\\'s permissions it must be writable for the system user which executes PHP.' );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// ensure file mode\r\n\t\t\t\t\tchmod( $dir, 0777 );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new Exception( '\"' . htmlspecialchars( $dir ) . '\" \\n\\n\\npath does not exist, set @param $allow_dir_create to TRUE to allow path creation.' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function initializeObject()\n {\n if (!is_writable($this->path)) {\n Files::createDirectoryRecursively($this->path);\n }\n if (!is_dir($this->path) && !is_link($this->path)) {\n throw new StorageException('The directory \"' . $this->path . '\" which was configured as a resource storage does not exist.', 1361533189);\n }\n if (!is_writable($this->path)) {\n throw new StorageException('The directory \"' . $this->path . '\" which was configured as a resource storage is not writable.', 1361533190);\n }\n }", "function parseAndValidateDirectory($dirname) {\n\t\tif (empty($dirname) || !is_string($dirname)){\n\t\t\treturn new File_Exception(\"La ruta del directorio no es un string o es nula\");\n\t\t}\n\t\t//podria usarse la constante PATH_SEPARATOR o DIRECTORY_SEPARATOR pero no tiene sentido ya que directamente se usa /\n\t\t$dirname = stripslashes($dirname);\n\n\t\t$dirname = preg_replace(\"/([\\\\\\\\\\/]+)/\",\"/\",$dirname);\n\t\t\n\t\tif (substr($dirname, -1, 1) !== \"/\")\n\t\t\t$dirname .= \"/\";\n\t\t$primerCaracter = substr($dirname,0,1);\n\t\tif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'){\n\t\t\t//windows\n\t\t\tif (strtolower($primerCaracter) === strtoupper($primerCaracter)){\n\t\t\t\t//no es una letra\n\t\t\t\treturn new File_Exception(\"La ruta del directorio debe comenzar con una letra\");\n\t\t\t}\n\t\t\tif (substr($dirname, 1, 1) !== \":\"){\n\t\t\t\t//tiene :\n\t\t\t\treturn new File_Exception(\"La ruta del directorio debe poser el caracter ':' luego de la letra de unidad\");\n\t\t\t}\n\t\t}else{\n\t\t\t//es linux u otro SO\n\t\t\tif ($primerCaracter!== \"/\"){\n\t\t\t\t//no es una /\n\t\t\t\treturn new File_Exception(\"La ruta del directorio debe comenzar con una /\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!is_dir($dirname)){\n\t\t\treturn new File_Exception(\"El directorio especificado no existe\");\n\t\t}\n\t\tif (!is_writable($dirname)){\n\t\t\treturn new File_Exception(\"El directorio especificado no puede ser escrito por la aplicacion. Chequee que los permisos sobre el directorio sean correctos.\");\n\t\t}\n\t\treturn $dirname;\n\t}", "public function createDirectory(Directory $directory): void;", "public function testEmptyDirectoryShouldReturnEmptyResult(): void\n {\n $iterator = new FileIterator('vfs://', []);\n self::assertEmpty(iterator_to_array($iterator->iterate()));\n }", "public function test__isset()\n \t{\n \t$this->setExpectedException('Q\\Fs_Exception', \"Unable to get '{$this->file}/test': '{$this->file}' is not a directory, but a \" . Fs::typeOfNode($this->Fs_Node, Fs::DESCRIPTION));\n $this->Fs_Node->has('test');\n\t}" ]
[ "0.7088399", "0.6924278", "0.6888639", "0.68042946", "0.6631374", "0.6572095", "0.6568139", "0.6549179", "0.64917636", "0.6464703", "0.64470893", "0.64444333", "0.6375025", "0.63464355", "0.63353115", "0.63278794", "0.6325423", "0.6319147", "0.6303984", "0.6292826", "0.6269976", "0.62117875", "0.6208824", "0.6204837", "0.62011856", "0.6166056", "0.6144788", "0.61340123", "0.61208504", "0.6118696", "0.611023", "0.60731894", "0.60656923", "0.60581386", "0.60431784", "0.6028946", "0.6016461", "0.60127676", "0.60062677", "0.5963742", "0.59380925", "0.59293383", "0.5910736", "0.5901576", "0.58953047", "0.58886576", "0.5865613", "0.58610207", "0.5840802", "0.58346623", "0.5797142", "0.5797142", "0.57962435", "0.57733166", "0.57727647", "0.57663894", "0.57627875", "0.57366496", "0.5735633", "0.5730349", "0.5728194", "0.57268584", "0.572682", "0.5709688", "0.5707856", "0.5707581", "0.5705188", "0.57028407", "0.56837505", "0.56800675", "0.56684726", "0.56567734", "0.5656559", "0.5643631", "0.5643255", "0.564196", "0.56401354", "0.5623235", "0.5617377", "0.5615485", "0.56105804", "0.5607827", "0.5601765", "0.5599503", "0.5588596", "0.5588596", "0.5586058", "0.5584204", "0.5583396", "0.5576788", "0.5569176", "0.55682045", "0.5566005", "0.5564666", "0.5561494", "0.55534166", "0.5544129", "0.5543039", "0.5528356", "0.55250967" ]
0.82290375
0
Test for Directory::create() The Directory already exist. Throws Exception because provided path is an already existent Directory
public function test_create_exists() { Directory::create(ROOT.DS.'application'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "protected function createDirectory() {}", "public function createDirectory()\n {\n $bReturn = $this->exists();\n if( !$bReturn && $this->_sPath->isValid() )\n {\n $bReturn = mkdir( (string)$this->_sPath, 0770, TRUE);\n if( $bReturn )\n {\n $this->_sPath->setValue( $this->getRealPath() );\n }\n }\n return $bReturn;\n }", "private static function createDirectory($path)\n {\n $success = true;\n\n if (! is_dir($path))\n $success = mkdir($path, 0700, true);\n\n if ($success === false)\n throw new RuntimeException(\"Could not create $path\");\n }", "private function checkFolderPathExist()\n {\n $folderPath = $this->getFolderPath();\n if (!file_exists($folderPath)) {\n mkdir($folderPath, 0777, true);\n }\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "private function checkPath($path)\r\n {\r\n if (!file_exists($path)) {\r\n mkdir($path, 0777, true);\r\n }\r\n }", "function check_dir_exists($dir,$create=false) {\n\n global $CFG; \n\n $status = true;\n if(!is_dir($dir)) {\n if (!$create) {\n $status = false;\n } else {\n umask(0000);\n $status = mkdir ($dir,$CFG->directorypermissions);\n }\n }\n return $status;\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "public function createDirectoriesIfTheyDontExist()\n {\n $directories = array(\n $this->getNewSitemapPath(),\n $this->getExistingSitemapPath()\n );\n foreach ($directories as $directory){\n if(!file_exists($directory)){\n mkdir($directory);\n }\n }\n }", "private function ensureDirectoryExists($path)\n {\n if (!file_exists($path)) {\n mkdir($path, 0775, true);\n }\n }", "private function check_directory($path) {\n\t\tif (!@opendir($path)) {\n\t\t\tmkdir($path, 0755);\n\t\t} //if(!@opendir($path))\n\t\treturn;\n\t}", "private function createDir($path)\n {\n if (!is_dir($path)) {\n if (!mkdir($path, self::CHMOD, true)) {\n throw new Exception('unable to create path '.$path);\n }\n }\n }", "private function createPathIfNeeded($path)\n {\n if ( ! is_dir($path)) {\n if (false === @mkdir($path, 0777, true) && !is_dir($path)) {\n return false;\n }\n }\n\n return true;\n }", "public function test_factory_not_exist()\n {\n Directory::factory(ROOT.DS.'test_dir');\n }", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "private function createDir()\n {\n if ($this->dirCreated) {\n return;\n }\n\n $dir = $this->getDirFromStream($this->url);\n if (null !== $dir && !is_dir($dir)) {\n $this->errorMessage = null;\n set_error_handler(array($this, 'customErrorHandler'));\n $status = mkdir($dir, 0777, true);\n restore_error_handler();\n if (false === $status) {\n throw new \\UnexpectedValueException(sprintf('There is no existing directory at \"%s\" and its not buildable: '.$this->errorMessage, $dir));\n }\n }\n $this->dirCreated = true;\n }", "private function createDir($path)\n {\n if (!is_dir($path)) {\n $success = mkdir($path, 0775, true);\n if (!$success) {\n throw new \\Exception(\"Cannot create folder {$path}. Check file system permissions.\");\n }\n }\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "function mdl_create_directory_if_not_exists(string $dirname)\n{\n // Create the path directory if not exists\n if (!is_dir($dirname)) {\n mkdir($dirname, 0777, true);\n }\n}", "public function createDirectoriesIfTheyDontExist()\n\t{\n\t\t$directories = array(\n\t\t\t$this->getIntegrationDirectory(),\n\t\t\t$this->getProductsProcessingDirectory(),\n\t\t\t$this->getProductsProcessedDirectory(),\n\t\t\t$this->getStockProcessingDirectory(),\n\t\t\t$this->getStockProcessedDirectory()\n\t\t);\n\t\tforeach ($directories as $directory){\n\t\t\tif(!file_exists($directory)){\n\t\t\t\tmkdir($directory);\n\t\t\t}\n\t\t}\n\t}", "public function createFolderIfNotExisted($path)\n {\n if (!file_exists($path)) {\n mkdir($path);\n }\n }", "public function createDirectory()\n\t{\n\t\tif(is_dir($this->storagePath) and is_writable($this->storagePath)===false)\n\t\t{\n\t\t\tchmod($this->storagePath,$this->permissions);\n\t\t}\n\t\t\n\t\tif(is_dir($this->storagePath) and is_writable($this->storagePath))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(!is_dir($this->storagePath) and $this->createDir===true and mkdir($this->storagePath,$this->permissions,true))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tthrow new \\RuntimeException(\"Cannot to create the storage path:\".$this->storagePath);\n\t}", "public function mkdirIfNotExist($path=array())\n\t{\n\t\tforeach($path as $key=>$value)\n\t\t{\n\t\t\tif(file_exists($value) && is_dir($value)){\n\t\t\t}else{\n\t\t\t\tmkdir($value,0777);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}", "function check_create($name) {\n global $lsarray;\n if (!in_array($name, $lsarray)) { mkdir($name); return true; }\n else { echo \"Folder already exists: $name\".PHP_EOL; return false; }\n}", "private function mustCreateFolder(){\n }", "public function createDirectory($name, $path)\n {\n if (Directory::exists($this->disk, $path) && Directory::notExists($name, $this->disk, $path)) {\n Directory::createDirectory($name, $this->disk, $path );\n return Directory::metaDataOf(Path::normalize($path) . $name , $this->disk);\n }\n\n throw new DirectoryAlreadyExistsException();\n }", "public function createPath( $path ) {\n\t\tif ( !file_exists($path) || !is_dir($path) ) {\n\t\t\tif ( !mkdir( $path, 0777, true ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn $path;\n\t}", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "private function ensureDirectory() {\n\t\tif (!is_dir($this -> directory)) {\n\t\t\tif (!mkdir($this -> directory)) {\n\t\t\t\tthrow new LatexException('Could not create directory ' . $this -> directory);\n\t\t\t}\n\t\t}\n\t}", "public static function createDirectory ($path) {\n\t\t\\clearstatcache(true, $path);\n\t\tif (!\\is_dir($path)) {\n\t\t\t\\mkdir($path, 493, true);\n\t\t}\n\t}", "public static function existsOrCreatePath($path)\n\t{\n\t\tFile::exists($path) or File::makeDirectory($path);\n\t\treturn $path;\n\t}", "function create_dir($dir_path){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }", "private function ensureDirectory($directoryPath) {\r\n\t\tif (! is_dir ( $directoryPath )) {\r\n\t\t\t$this->logger->writeLOG( '-not already a directory ' . $directoryPath);\r\n\t\t\tif (mkdir ( $directoryPath )) {\r\n\t\t\t\t$this->logger->writeLOG( '-created directory ' . $directoryPath);\r\n\t\t\t} else {\r\n\t\t\t\t$this->logger->writeLOG( '-failed to create directory ' . $directoryPath);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->logger->writeLOG( '-existing directory ' . $directoryPath);\r\n\t\t}\r\n\t}", "public static function mkdir($path)\n {\n // (array) Convert Traversable object to array\n if ($path instanceof Traversable) {\n $path = iterator_to_array($path, FALSE);\n }\n\n // Loop through each directory to create (convert string to array if needed)\n foreach ((array) $path as $p) {\n // Directory doesn't exist, create it now\n if ( ! is_dir($p)) {\n // [recursion] Create parent directory if needed\n static::mkdir(dirname($p));\n\n // Failed to create directory\n if ( ! @mkdir($p)) {\n throw new RuntimeException('Failed to create directory: ' . $p);\n }\n }\n }\n\n // Successful if no exceptions thrown\n return TRUE;\n }", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "private function make_path($path){\n\t\t\t// Test if path extist\n\t\t\tif(is_dir($path) || file_exists($path))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Create it\n\t\t\t\tmkdir($path, 0777, true);\n\t\t\t}\n\t}", "protected static function ensureDirectoryExists($path)\n {\n if(!File::isDirectory($path)) {\n File::makeDirectory($path);\n }\n }", "public static function createDirectory($path)\n {\n // init\n $path\t= self::normalizePath($path);\n\n // creation (if needed)\n if (!is_dir(realPath($path))) {\n mkdir($path, 0777, true);\n }\n\n return is_dir($path);\n }", "function ensure_directory_writable($path, $base_path = '') {\n $result = false;\n if ($base_path != '') {\n $base_path = rtrim($base_path, '/').'/';\n $path = trim(substr($path, count($base_path) -1), '/');\n }\n if (file_exists($base_path.$path)) {\n $result = is_dir($base_path.$path) && is_writable($base_path.$path);\n } else {\n $result = true;\n $path_item = $base_path;\n foreach (explode('/', $path) as $item) {\n $path_item .= $item.'/';\n if (!file_exists($path_item)) {\n $result = mkdir($path_item);\n // if (!$result) debug('path_item', $path_item);\n } else {\n $result = is_dir($path_item);\n }\n if (!$result) {\n break;\n }\n }\n $result &= is_writable($base_path.$path);\n }\n return $result;\n}", "private function checkSaveDir(){\n\t\t//determines the path to check\n\t\t$path=$_SERVER['DOCUMENT_ROOT'].$this->save_dir;\n\t\t\n\t\t//check if the directory exists\n\t\tif(!is_dir($path)){\n\t\t\t//creates the directory\n\t\t\tif(!mkdir($path,0777,TRUE)){\n\t\t\t\tthrow new Exception(\"Can't create the directory\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function createDirectory(string $path): bool\n {\n if (!is_dir($path)) {\n return mkdir($path, 0755, true);\n }\n\n return true;\n }", "protected function checkIfTempFolderExists() {\n $dir = codemonkey_pathTempDir;\n if (file_exists($dir) && is_dir($dir)) {\n return;\n }\n mkdir($dir);\n }", "private function check_directory()\n\t{\n\t\tif (!is_dir(Kohana::config($this->type.'.cache_folder')))\n\t\t\tmkdir(Kohana::config($this->type.'.cache_folder'));\n\t}", "protected function createDirectory($path)\n {\n if (! File::exists($path)) {\n File::makeDirectory($path, 0755, true);\n }\n }", "public function validate_directory($path) {\n if(!File::isDirectory($path)){\n if(File::makeDirectory($path, 0777, true, true)) {\n return true;\n } else {\n # Unable to create directory.\n return false;\n }\n\n } else {\n return true;\n }\n\n\n }", "public function ensureDirectoryExists($path, $mode = 0755, $recursive = true)\n {\n\n }", "public function testMkdirRecursive() {\n $testDirName = self::TEST_DIR . '/testMkdirRecursive/recursiveFlag';\n\n (new Directory($testDirName))->mkdir(true);\n\n $this->assertDirectoryExists($testDirName);\n }", "private function checkSaveDir()\n\t{\n\t\t// Determines the path to check:\n\t\t$path = $_SERVER['DOCUMENT_ROOT'] . $this->save_dir;\n\n\t\t// Check to see if directory exists:\n\t\tif(!is_dir($path))\n\t\t{\n\t\t\t// Check to see if directory can be made, this will also make the directory:\n\t\t\tif(!mkdir($path, 0777, TRUE))\n\t\t\t{\n\t\t\t\t// If fails, throw execption:\n\t\t\t\tthrow new Exception(\"Can't create the directory!\");\n\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public function createDirectory(string $directory) : bool\n {\n if(!file_exists($directory)) {\n mkdir($directory);\n return true;\n } else if (file_exists($directory)) {\n return true;\n } else {\n return false;\n }\n }", "public function createDir($dirName) {\n if(!file_exists($dirName)){\n if(mkdir($dirName, 0755))\n\treturn TRUE;\n else Throw new AMUECannotCreateDir($dirName);\n }else Throw new AMUEFileExists($dirName);\n }", "protected function _createWriteableDir($path) {\n $io = new Varien_Io_File();\n if (!$io->isWriteable($path) && !$io->mkdir($path, 0777, true)) {\n Mage::throwException(Mage::helper('catalog')->__(\"Cannot create writeable directory '%s'.\", $path));\n }\n }", "protected function createDirectories() {\n\t\t@mkdir($this->getAbsoluteBasePath(), 0777, TRUE); // @ - Directories may exist\n\t}", "public function mkdirDeepCreatesDirectoryWithAndWithoutDoubleSlashesDataProvider() {}", "public function setupPath()\n {\n // if directory doesn't exist, create it\n if (!is_dir($this->path->getPath())) {\n $reporting = error_reporting();\n error_reporting(0);\n $created = mkdir($this->path->getPath(), 0755, true);\n error_reporting($reporting);\n if (!$created) {\n throw new Exception(sprintf('cant\\'t create directory: %s', $this->path->getPath()));\n }\n }\n if (!is_writable($this->path->getPath())) {\n throw new Exception(sprintf('no write permission for directory: %s', $this->path->getPath()));\n }\n }", "function crearCarpeta($ruta){\r\n if (!is_dir(($ruta))){\r\n mkdir($ruta);\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n}", "function create_dir($path, $make_writable = false) {\n if(mkdir($path)) {\n if($make_writable) {\n if(!chmod($path, 0777)) {\n return false;\n } // if\n } // if\n } else {\n return false;\n } // if\n \n return true;\n }", "function fud_mkdir($path)\n{\n\t$dirs = array();\n\twhile (!is_dir($path)) {\n\t\t$dirs[] = $path;\n\t\t$path = dirname($path);\n\t\tif (!$path || $path == '/') {\n\t\t\tbreak;\n\t\t}\n\t}\n\tforeach (array_reverse($dirs) as $dir) {\n\t\tif (!mkdir($dir, 0755)) {\n\t\t\tfe('Failed to create \"'. $dir .'\" directory.');\t\n\t\t}\n\t}\n}", "public function mkdir($path)\n {\n \n }", "static public function mkdir($path) {\n\t\treturn self::$defaultInstance->mkdir($path);\n\t}", "public function createDirectory($path) {\n\n $parentPath = dirname($path);\n if ($parentPath=='.') $parentPath='/';\n $parent = $this->getNodeForPath($parentPath);\n $parent->createDirectory(basename($path));\n\n }", "public function createDirectory(string $path, array $properties = []) : bool\n {\n if (is_array($path))\n {\n $path = $path['path'] ?? '';\n }\n\n $connection_identifier = '';\n $rpath = '';\n $service = $this->getServiceFromPath($path, $connection_identifier, $rpath);\n\n return $service->createDirectory($rpath, $properties);\n }", "protected function ensure_path_exists() {\n global $CFG;\n if (!is_writable($this->path)) {\n if ($this->custompath && !$this->autocreate) {\n throw new coding_exception('File store path does not exist. It must exist and be writable by the web server.');\n }\n $createdcfg = false;\n if (!isset($CFG)) {\n // This can only happen during destruction of objects.\n // A cache is being used within a destructor, php is ending a request and $CFG has\n // already being cleaned up.\n // Rebuild $CFG with directory permissions just to complete this write.\n $CFG = $this->cfg;\n $createdcfg = true;\n }\n if (!make_writable_directory($this->path, false)) {\n throw new coding_exception('File store path does not exist and can not be created.');\n }\n if ($createdcfg) {\n // We re-created it so we'll clean it up.\n unset($CFG);\n }\n }\n return true;\n }", "protected function throwUnableToCreate()\n {\n throw new FilesystemException(\"Unable to create the file '{$this->path}'. A directory with the same path already exists.\");\n }", "public function testFolderAlreadyExists()\n {\n CodeIgniterHelper::setDefaults($this->appPath);\n\n $options = [\n 'name' => $this->table,\n '--camel' => true,\n '--bootstrap' => true,\n '--keep' => false\n ];\n\n $createCommand = new CommandTester($this->createCommand);\n $createCommand->execute($options);\n\n $createCommand = new CommandTester($this->createCommand);\n $createCommand->execute($options);\n\n $expected = 'The \"' . plural($this->table) . '\" views folder already exists!' . PHP_EOL;\n\n $this->assertEquals($expected, $createCommand->getDisplay());\n\n CodeIgniterHelper::setDefaults($this->appPath);\n }", "private function createDirectory(string $pathDirectory) : void{\n if(!file_exists($pathDirectory) && !is_dir($pathDirectory)){\n mkdir($pathDirectory, 0777);\n }\n }", "private function Make_UniqueDIR( )\n\t{\n\t\t$this -> DIR = self :: $Request -> server -> get( 'DOCUMENT_ROOT' ) . $this -> FULL_PATH . self :: FOLDER_BASE_NAME . $this -> ID;\n\t\tif ( !file_exists( $this -> DIR ) )\n\t\t\tmkdir( $this -> DIR , 0777 , true ) ;\n\t}", "private function createFolder()\n {\n if (!file_exists($this->cacheDir)) {//if folder doesn't exist\n mkdir($this->cacheDir, 0755);//create folder\n }\n if (!file_exists($this->cacheFile)) {//if cache doesnt exist\n $file = fopen($this->cacheFile, 'w');\n fclose($file);\n } else {\n return true;\n } //return true if folder exists\n }", "public function createDirectory(Directory $directory): void;", "protected function checkIfFoldersExist() {\n $arrFilePath = explode(DIRECTORY_SEPARATOR, $this->filePath);\n array_pop($arrFilePath); //Remove filename\n if (count($arrFilePath) > 0) {\n $folderPath = implode(DIRECTORY_SEPARATOR, $arrFilePath);\n $folder = new Folder();\n $folder->createFolderIfNotExists($folderPath);\n }\n }", "public function createCacheDirectory() {\n\t\tif (!file_exists(dirname($this->cache_file))) {\n\t\t\tif (!@mkdir(dirname($this->cache_file))) {\n\t\t\t\tdie('Please create the cache directory: '.dirname($this->cache_file).' and make sure it\\'s writeable by this script.');\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} elseif (file_exists(dirname($this->cache_file)) && !is_writable(dirname($this->cache_file))) {\n\t\t\tdie('Cannot write to cache directory. Please make it writeable.');\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "private static function createCurrentFolder() : bool {\n return is_dir(self::getCurrentFolder()) || mkdir(self::getCurrentFolder(), 0777, true);\n }", "function checkPaths() {\n\tif(!file_exists(MODEL_PATH)) {\n\t\tmkdir(MODEL_PATH);\n\t}\n\tif(!file_exists(ENTITY_PATH)) {\n\t\tmkdir(ENTITY_PATH);\n\t}\n\tif(!file_exists(REPOSITORY_PATH)) {\n\t\tmkdir(REPOSITORY_PATH);\n\t}\n}", "private function recursiveCreateDirectory($path)\n {\n if ( !File::isDirectory($path) )\n {\n File::makeDirectory($path, 0755, true);\n }\n }", "protected function ensureCacheDirectoryExists($path)\n {\n $directory = dirname($path);\n\n if (! $this->files->exists($directory)) {\n $this->files->makeDirectory($directory, 0777, true, true);\n\n // We're creating two levels of directories (e.g. 7e/24), so we check them both...\n $this->ensurePermissionsAreCorrect($directory);\n $this->ensurePermissionsAreCorrect(dirname($directory));\n }\n }", "public function validate_directory($path)\n {\n if (!File::isDirectory($path)) {\n if (File::makeDirectory($path, 0777, true, true)) {\n return true;\n } else {\n # Unable to create directory.\n return false;\n }\n\n } else {\n return true;\n }\n\n\n }", "private function mkpath($path){\n $dirs=array();\n $path=preg_replace('/(\\/){2,}|(\\\\\\){1,}/','/',$path);\n $dirs=explode(\"/\",$path);\n $path=\"\";\n foreach ($dirs as $element){\n $path.=$element.\"/\";\n if(!is_dir($path)){ \n if(!mkdir($path)){ \n return false; \n }\n } \n }\n }", "private function ensureFileUploadFolderExists(): void\n {\n // Create directory\n if (!file_exists($this->uploadPath)) {\n mkdir($this->uploadPath, 0777, true);\n }\n }", "public function makeDirIfNotExist(string $dir): void\n {\n if (!is_dir($dir))\n mkdir($dir, 0777, true);\n \n }", "public function create($path)\n {\n return $this->fs->cloud()->createDir($path);\n }", "protected static function makeDir($path) {\n\t\tif (!file_exists($path)) {\n\t\t\tmkdir($path, 0777, true);\n\t\t}\n\t}", "protected static function makeDir($path) {\n\t\tif (!file_exists($path)) {\n\t\t\tmkdir($path, 0777, true);\n\t\t}\n\t}", "protected function createDirectory($path)\n {\n $filesystem = App::make('files');\n if (!$filesystem->isDirectory($path)) {\n $this->comment(\"Creating directory: \".$path);\n $filesystem->makeDirectory($path, 0777, true);\n return $filesystem;\n }\n return $filesystem;\n }", "public function should_throw_if_trying_to_build_on_non_existing_directory(): void\n {\n $this->expectException(\\InvalidArgumentException::class);\n new DirectorySnapshot(__DIR__ . '/not-existing');\n }", "function cemhub_create_directory($directory) {\n $return = FALSE;\n\n if (!is_dir($directory)) {\n if (!mkdir($directory, 0777, TRUE)) {\n watchdog('cemhub', 'Could not create directory: {$directory}');\n }\n else {\n $return = TRUE;\n }\n }\n\n return $return;\n}", "function check_and_create_import_dir($unique_code) {\n\n global $CFG; \n\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp\",true);\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import\",true);\n }\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import/\".$unique_code,true);\n }\n \n return $status;\n }", "function mkdir_or_exit($dir, $retry_alllowed = 2){\n mkdir($dir);\n $retry_used = 0;\n while (!file_exists($dir) && $retry_used < $retry_alllowed){ if (!empty($retry_used)){ sleep(1); } $retry_used++; mkdir($dir); }\n if (!file_exists($dir)){ ob_echo('Failed to make directory '.clean_path($dir).'!'); ob_echo('Force exiting script!'); die(); }\n}", "public function ensureDirExists($dirs);", "function check_and_create_import_dir($unique_code) {\n global $CFG; \n $status = $this->check_dir_exists($CFG->dataroot.\"/temp\",true);\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import\",true);\n }\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import/\".$unique_code,true);\n }\n return $status;\n }", "public function createFolder(string $fullPath) : bool;", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "function create($path = '', $mode = 0755) \n {\n \n // Initialize variables\n static $nested = 0;\n \n // Check to make sure the path valid and clean\n $path = $this->_fs->path()->clean($path);\n\n // Check if parent dir exists\n $parent = dirname($path);\n \n if (!$this->exists($parent)) {\n // Prevent infinite loops!\n $nested++;\n if (($nested > 20) || ($parent == $path)) {\n $nested--;\n return VWP::raiseWarning(VText::_('Infinite loop detected'),get_class($this) . ':create',null,false); \n }\n\n // Create the parent directory\n $cr = $this->create($parent, $mode);\n if (VWP::isWarning($cr)) {\n $nested--;\n return $cr;\n }\n // OK, parent directory has been created\n $nested--;\n }\n\n // Check if dir already exists\n if ($this->exists($path)) {\n return true;\n }\n\n // Check for safe mode\n \n // We need to get and explode the open_basedir paths\n $obd = ini_get('open_basedir');\n\n // If open_basedir is set we need to get the open_basedir that the path is in\n if ($obd != null) {\n if (VPATH_ISWIN) {\n $obdSeparator = \";\";\n } else {\n $obdSeparator = \":\";\n }\n \n // Create the array of open_basedir paths\n $obdArray = explode($obdSeparator, $obd);\n $inBaseDir = false;\n // Iterate through open_basedir paths looking for a match\n foreach ($obdArray as $test) {\n $test = $this->_fs->path()->clean($test);\n if (strpos($path, $test) === 0) {\n $obdpath = $test;\n $inBaseDir = true;\n break;\n }\n }\n \n if ($inBaseDir == false) {\n // Return false because the path to be created is not in open_basedir\n return VWP::raiseWarning(VText::_('Path not in open_basedir paths'), get_class($this). \":create\",null,false);\n }\n }\n\n // First set umask\n $origmask = @umask(0);\n\n // Create the path\n if (!$ret = @mkdir($path, $mode)) {\n @umask($origmask);\n return VWP::raiseWarning(VText::_('Could not create directory' ) . ' Path: ' . $path,get_class($this) . ':create',null,false);\n }\n\n // Reset umask\n @umask($origmask);\t\t\n return $ret;\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "private function _mkdir($target)\n\t{\n\t\t// from php.net/mkdir user contributed notes\n\t\tif (file_exists($target))\n\t\t{\n\t\t\tif ( ! @is_dir($target))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\t// Attempting to create the directory may clutter up our display.\n\t\tif (@mkdir($target))\n\t\t{\n\t\t\t$stat = @stat(dirname($target));\n\t\t\t$dir_perms = $stat['mode'] & 0007777; // Get the permission bits.\n\t\t\t@chmod($target, $dir_perms);\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (is_dir(dirname($target)))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// If the above failed, attempt to create the parent node, then try again.\n\t\tif ($this->_mkdir(dirname($target)))\n\t\t{\n\t\t\treturn $this->_mkdir($target);\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public static function create_dir($dir_to_create)\n\t{\n\t\tif (mkdir($dir_to_create))\n\t\t{\n\t\t\tif (self::findServerOS() == 'LINUX')\n\t\t\t{\n\t\t\t\t$perms = self::unix_file_permissions($dir_to_create);\n\t\t\t\tif ( $perms != '0755') @chmod($dirPath, 0755);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthrow new Exception(\"Error creating directory '{$dir_to_create}'\");\n\n\t\t\treturn false;\n\t\t}\n\t}", "protected static function try_create_folder( $dir, $allow_dir_create ) {\r\n\t\t\tif ( !is_dir( $dir ) ) {\r\n\t\t\t\tif ( $allow_dir_create ) {\r\n\t\t\t\t\tif ( !mkdir( $dir, 0777, true ) ) {\r\n\t\t\t\t\t\tthrow new Exception( 'Unable to create folder, check the parent folder\\'s permissions it must be writable for the system user which executes PHP.' );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// ensure file mode\r\n\t\t\t\t\tchmod( $dir, 0777 );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new Exception( '\"' . htmlspecialchars( $dir ) . '\" \\n\\n\\npath does not exist, set @param $allow_dir_create to TRUE to allow path creation.' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "protected function _create_folder($path = null)\n {\n if (is_dir(APPPATH . $path)) {\n $this->_message(\"This \" . $this->_command . \": \" . $this->_name . \" folder \" . $path . \" already exists.\");\n return false;\n } else {\n $mkdir = mkdir(APPPATH . $path, 0755, TRUE);\n // If unable to write folder in path\n if (!$mkdir) {\n $this->_message(\"Unable to write the folder \" . $path . \" \" . $this->_command . \": \" . $this->_name . \".\");\n return false;\n } else\n return true;\n }\n }", "function crateFolder($path,$mode)\n\t{\n\t\tif(!is_dir($path))\n\t\t\t{\n\t\t\t\tif(!mkdir($path,$mode))\n\t\t\t\t\t{return false;}else{return true;}\n\t\t\t}\n\t\telse{return \"Found\";}\n\t}", "private function makeFolder()\n {\n if (file_exists($this->backup_folder)) {\n // folder exist nothing to do\n return true;\n }\n\n if (!mkdir($this->backup_folder, 0777, true)) {\n throw new FileDropperException('Make folder function failure');\n }\n\n return true;\n }" ]
[ "0.803957", "0.738031", "0.7285328", "0.7276571", "0.7262561", "0.7183224", "0.71716", "0.705012", "0.70488226", "0.70256615", "0.69991064", "0.69938815", "0.6983108", "0.6961843", "0.69514316", "0.6939701", "0.6902881", "0.68776363", "0.6841167", "0.68147177", "0.68039656", "0.6802962", "0.67876834", "0.6785655", "0.67531645", "0.6743948", "0.6728339", "0.672519", "0.67141783", "0.66998243", "0.6675574", "0.66679853", "0.6655082", "0.66406935", "0.6638223", "0.6611964", "0.6604112", "0.6564655", "0.65459204", "0.6522401", "0.651573", "0.6505709", "0.6499935", "0.6465713", "0.6463352", "0.6455552", "0.64399904", "0.6435476", "0.6435437", "0.6415902", "0.6412701", "0.6398237", "0.6395258", "0.6387554", "0.6378042", "0.6361352", "0.635792", "0.635702", "0.6330095", "0.63293964", "0.63148904", "0.63107675", "0.6303931", "0.6303412", "0.62991846", "0.6298145", "0.6295943", "0.62888277", "0.6279582", "0.62573373", "0.6256336", "0.6254109", "0.62473744", "0.62431574", "0.6242915", "0.62380123", "0.6234902", "0.62227434", "0.62154776", "0.6203423", "0.62031865", "0.61968666", "0.61968666", "0.6186424", "0.61785084", "0.6174598", "0.616999", "0.6162551", "0.6149055", "0.6147648", "0.6146606", "0.6134467", "0.61327714", "0.6132761", "0.6124114", "0.61143976", "0.6112269", "0.6095324", "0.6093514", "0.6066828" ]
0.74785715
1
Test for Directory::rename() Create a new directory named test_dir and renames it as test_new_dir. At the end of the test, remove the created directory.
public function test_rename() { $object = Directory::create(ROOT.DS.'test_dir'); $object->rename('test_new_dir'); $this->assertEquals($object->get_base_name(), 'test_new_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function testRename()\n {\n $oldFilename = static::$baseFile . '/fs/tmp.txt';\n $newFilename = static::$baseFile . '/fs/test/tmp.txt';\n\n file_put_contents($oldFilename, 'It works!');\n\n $this->assertTrue(rename($oldFilename, $newFilename));\n\n $this->assertFalse(file_exists($oldFilename));\n $this->assertTrue(file_exists($newFilename));\n }", "public function renameDirectory(DirectoryInterface $directory, string $newName): DirectoryInterface;", "public function testConstructSingleDirectory()\n {\n $filter = new FileRename($this->newDir);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testRenameFailure($newFilename)\n {\n $oldFilename = static::$baseFile . '/fs/tmp.txt';\n\n file_put_contents($oldFilename, 'It works!');\n $this->assertFalse(rename($oldFilename, $newFilename));\n }", "public function renameDir($curpath, $newname)\n {\n $filterSlug = new FrontZend_Filter_Slug();\n $newpath = strstr($newname, '/') || strstr($newname, DIRECTORY_SEPARATOR)\n ? $newname\n : substr($curpath, 0, strrpos($curpath, DIRECTORY_SEPARATOR)+1)\n . $filterSlug->filter($newname);\n\n $newfullpath = Media_Model_File::getFullPath($newpath);\n if (is_dir($newfullpath)) {\n throw new FrontZend_Exception('Já existe uma pasta com este nome');\n }\n\n $curfullpath = Media_Model_File::getFullPath($curpath);\n\n if (is_dir($curfullpath)) {\n if (rename($curfullpath, $newfullpath)) {\n try {\n $this->_renamePath($curpath, $newpath);\n return true;\n } catch(Exception $e) {\n rename($newfullpath, $curfullpath);\n throw $e;\n }\n\n };\n }\n return false;\n }", "private function renameDirectories(): void\n {\n //update directory names and update file created paths accordingly\n foreach ($this->dirsToRename as $dirPath) {\n $updateDirPath = $this->pathHelper->renamePathBasenameSingularOrPlural(\n $dirPath,\n $this->singularNamespacedName,\n $this->pluralNamespacedName\n );\n foreach ($this->filesCreated as $k => $filePath) {\n $this->filesCreated[$k] = str_replace($dirPath, $updateDirPath, $filePath);\n }\n }\n }", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "protected function createRealTestdir() {}", "public function renameDirNames($base_old_dir, $old_name, $base_new_dir, $new_name) {\n $paths = $this->_arrayDataFolders();\n\n foreach ($paths as $dir) {\n $basePath = WikiGlobalConfig::getConf($dir);\n $oldPath = \"$basePath/$base_old_dir/$old_name\";\n if (file_exists($oldPath)) {\n $newPath = \"$basePath/$base_new_dir/$new_name\";\n if ($base_old_dir !== $base_new_dir && !is_dir($newPath))\n mkdir($newPath, 0775, true);\n if (! rename($oldPath, $newPath))\n throw new Exception(\"renameProjectOrDirectory: Error mentre canviava el nom del projecte/carpeta a $dir.\");\n }\n }\n }", "public function rename($new_dirname, $overwrite)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\tif (!$this->getParent()->isWritable()) {\n\t\t\tthrow new fEnvironmentException(\n\t\t\t\t'The directory, %s, can not be renamed because the directory containing it is not writable',\n\t\t\t\t$this->directory\n\t\t\t);\n\t\t}\n\t\t\n\t\t$info = fFilesystem::getPathInfo($new_dirname);\n\t\t\n\t\tif (!file_exists($info['dirname'])) {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The new directory name specified, %s, is inside of a directory that does not exist',\n\t\t\t\t$new_dirname\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Make the dirname absolute\n\t\t$new_dirname = fDirectory::makeCanonical(realpath($new_dirname));\n\t\t\n\t\tif (file_exists($new_dirname)) {\n\t\t\tif (!is_writable($new_dirname)) {\n\t\t\t\tthrow new fEnvironmentException(\n\t\t\t\t\t'The new directory name specified, %s, already exists, but is not writable',\n\t\t\t\t\t$new_dirname\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!$overwrite) {\n\t\t\t\t$new_dirname = fFilesystem::makeUniqueName($new_dirname);\n\t\t\t}\n\t\t} else {\n\t\t\t$parent_dir = new fDirectory($info['dirname']);\n\t\t\tif (!$parent_dir->isWritable()) {\n\t\t\t\tthrow new fEnvironmentException(\n\t\t\t\t\t'The new directory name specified, %s, is inside of a directory that is not writable',\n\t\t\t\t\t$new_dirname\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\trename($this->directory, $new_dirname);\n\t\t\n\t\t// Allow filesystem transactions\n\t\tif (fFilesystem::isInsideTransaction()) {\n\t\t\tfFilesystem::rename($this->directory, $new_dirname);\n\t\t}\n\t\t\n\t\tfFilesystem::updateFilenameMapForDirectory($this->directory, $new_dirname);\n\t}", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "protected function tearDown()\n {\n $test_dirs = array(\n ROOT.DS.'test_dir',\n ROOT.DS.'test_new_dir',\n SYSTEM.DS.'test_dir',\n );\n foreach($test_dirs as $f){\n is_dir($f) and rmdir($f);\n }\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "public function testDeleteDirectory()\n {\n $this->createTestDirectories(\n array(\n '/artifacts/foo/12345',\n '/artifacts/foo/67890',\n )\n );\n\n $this->createTestFile( '/artifacts/foo/12345/bar.txt' );\n $this->createTestFile( '/artifacts/foo/67890/bar.txt' );\n $this->createTestFile( '/artifacts/foo/bar.txt' );\n $this->createTestFile( '/artifacts/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/artifacts' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/artifacts' );\n }", "function rename_folder()\n\t{\n\t\t$new_name = trailingslashit($this->paths['fontdir']).$this->font_name;\n\t\t\n\t\t//delete folder and contents if they already exist\n\t\t$this->delete_folder($new_name);\n\t\n\t\trename($this->paths['tempdir'], $new_name);\n\t}", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function moveDirectory(string $oldDirName, string $newDirName): MoveDirectory\n {\n return $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n }", "public function moveDirectory($oldDirName, $newDirName)\n\t{\n\t\treturn $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n\t}", "public function testDirnameReturnsDirectory()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame(self::$temp, Storage::dirname(self::$temp.DS.'foo.txt'));\n }", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "function rename($old, $new = null) {\n \n if (!$new) {\n $new = $old;\n \t$old = $this->_file;\n }\n \n if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' && (strtolower($old) == strtolower($new))) {\n \n $rand = sprintf('%s%s%s%s%s',\n dirname($old),\n DIRECTORY_SEPARATOR,\n microtime(),\n rand(1, 999),\n basename($old)\n );\n \n if (!@rename($old, $rand)) {\n Fire_Error::throwError(sprintf('Failed to temporary rename \"%s\".',\n $old\n ), __FILE__, __LINE__\n );\n }\n $old = $rand;\n }\n \n if (!@rename($old, $new)) {\n Fire_Error::throwError(sprintf('Failed to rename \"%s\" to \"%s\".',\n $old,\n $new\n ), __FILE__, __LINE__\n );\n } \n }", "public function testOnNewDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onNewDirectory($this->dir1);\n $this->assertFileExists($this->directory . \"/1\");\n\n $obj->onNewDirectory($this->dir2);\n $this->assertFileExists($this->directory . \"/1/2\");\n\n $obj->onNewDirectory($this->dir3);\n $this->assertFileExists($this->directory . \"/1/2/3\");\n }", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "public function testConstructTruncatedSourceDirectory()\n {\n $filter = new FileRename([\n 'target' => $this->newDir]);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "function renameFolder($oldName,$newName){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\r\n\t\t\t}", "public function test_mkdir_and_rmdir() {\n /**\n * Test creating a single directory\n */\n $dir = 'dir1';\n $uri = 'test://'.$dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri);\n $this->assertFileExists($path);\n rmdir($uri);\n $this->assertFileNotExists($path);\n\n /**\n * Test creating multiple directories recursively as needed\n */\n $dir = 'dir2/dir3/dir4';\n $uri = 'test://' . $dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri, 0777, true);\n\n $error_tripped = false;\n $this->assertFileExists($path);\n try {\n $return = rmdir('test://dir2');\n }\n catch (PHPUnit_Framework_Error $e) {\n $error_tripped = true;\n }\n\n $this->assertTrue($error_tripped, \"rmdir() on a non-empty directory should trigger an error.\");\n $this->assertTrue(wp_rmdir_recursive('test://dir2'));\n $this->assertFileNotExists($this->test_dir.'/dir2');\n }", "function narrative_purge_files($old_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($old_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n $file_extension = pathinfo($filecheck, PATHINFO_EXTENSION);\n if ($file_extension == 'jpg')\n {\n rename($old_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "abstract function rename($old_file, $new_file, $move = FALSE);", "protected static function moveTemporaryDirs()\n {\n if (static::isCapsular()) {\n // Rename directories\n $original = static::getCacheDirs(false);\n foreach (static::getCacheDirs(true) as $i => $tmpDir) {\n \\Includes\\Utils\\FileManager::unlinkRecursive($tmpDir);\n $originalDir = $original[$i];\n rename($originalDir, $tmpDir);\n }\n\n // Rename files\n $original = static::getDecoratorDataFiles(false);\n foreach (static::getDecoratorDataFiles(true) as $i => $tmpPath) {\n $destPath = $original[$i];\n if (file_exists($tmpPath)) {\n rename($tmpPath, $destPath);\n }\n }\n }\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function tearDown(): void\n {\n if (is_dir($this->tmpPath)) {\n if (file_exists($this->oldFile)) {\n unlink($this->oldFile);\n }\n if (file_exists($this->origFile)) {\n unlink($this->origFile);\n }\n if (file_exists($this->newFile)) {\n unlink($this->newFile);\n }\n if (is_dir($this->newDir)) {\n if (file_exists($this->newDirFile)) {\n unlink($this->newDirFile);\n }\n rmdir($this->newDir);\n }\n rmdir($this->tmpPath);\n }\n }", "function move_dir_to_tmp($src, $id)\n{\n $CI =& get_instance();\n $tmpPath = $CI->config->item('site_data_dir') . '/tmp/' . time() . '/';\n if (!is_dir($tmpPath))\n {\n mkdir($tmpPath, 0775, TRUE);\n }\n $tmpPath .= '/' . $id . '/';\n rename($src, $tmpPath);\n return $tmpPath;\n}", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "private function moveFile($old_file, $new_file)\n {\n if (!file_exists($old_file)) {\n return;\n }\n\n if (!is_dir(dirname($new_file))) {\n mkdir(dirname($new_file), 0755, true);\n }\n\n // move the file to the archive folder\n rename($old_file, $new_file);\n }", "public function renameFolder($oldName, $newName)\n {\n // TODO: This is also not atomar and has similar problems as removeFolder()\n\n if ($oldName instanceof Zend_Mail_Storage_Folder) {\n $oldName = $oldName->getGlobalName();\n }\n\n $oldName = trim($oldName, $this->_delim);\n if (strpos($oldName, 'INBOX' . $this->_delim) === 0) {\n $oldName = substr($oldName, 6);\n }\n\n $newName = trim($newName, $this->_delim);\n if (strpos($newName, 'INBOX' . $this->_delim) === 0) {\n $newName = substr($newName, 6);\n }\n\n if (strpos($newName, $oldName . $this->_delim) === 0) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('new folder cannot be a child of old folder');\n }\n\n // check if folder exists and has no children\n $folder = $this->getFolders($oldName);\n\n if ($oldName == 'INBOX' || $oldName == DIRECTORY_SEPARATOR || $oldName == '/') {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('wont rename INBOX');\n }\n\n if ($oldName == $this->getCurrentFolder()) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('wont rename selected folder');\n }\n\n $newdir = $this->createFolder($newName);\n\n if (!$folder->isLeaf()) {\n foreach ($folder as $k => $v) {\n $this->renameFolder($v->getGlobalName(), $newName . $this->_delim . $k);\n }\n }\n\n $olddir = $this->_rootdir . '.' . $folder;\n foreach (['tmp', 'new', 'cur'] as $subdir) {\n $subdir = DIRECTORY_SEPARATOR . $subdir;\n if (!file_exists($olddir . $subdir)) {\n continue;\n }\n // using copy or moving files would be even better - but also much slower\n if (!rename($olddir . $subdir, $newdir . $subdir)) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('error while moving ' . $subdir);\n }\n }\n // create a dummy if removing fails - otherwise we can't read it next time\n mkdir($olddir . DIRECTORY_SEPARATOR . 'cur');\n $this->removeFolder($oldName);\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "function moveFiles($src, $dest)\n{\n if (!is_dir($src)) {\n return false;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n rename($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else {\n if (!$f->isDot() && $f->isDir()) {\n rmDirRecursive($f->getRealPath(), \"$dest/$f\");\n unlink($f->getRealPath());\n }\n }\n }\n unlink($src);\n}", "public function testRenameTo()\n {\n /*\n * remove all tables\n */\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->fixture->getDBObject()->simpleQuery('DROP TABLE '. $table['Tables_in_'.$this->fixture->a['db_name']]);\n }\n\n /*\n * create fresh store and check tables\n */\n $this->fixture->setup();\n\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->assertTrue(\n false !== strpos($table['Tables_in_'.$this->fixture->a['db_name']], $this->dbConfig['db_table_prefix'].'_')\n );\n }\n\n /*\n * rename store\n */\n $prefix = 'new_store';\n $this->fixture->renameTo($prefix);\n\n /*\n * check for new prefixes\n */\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->assertTrue(\n false !== strpos($table['Tables_in_'.$this->fixture->a['db_name']], $prefix)\n );\n }\n }", "public function testChDir() {\n $currentDir = getcwd();\n $parentDir = dirname($currentDir);\n\n $handle = new Directory($parentDir);\n $handle->chdir();\n\n $this->assertEquals($parentDir, getcwd());\n chdir($currentDir);\n }", "public function testDeleteDirectoryWithLinksAndSymlinks()\n {\n if ( !function_exists( 'link' ) || !function_exists( 'symlink' ) )\n {\n $this->markTestSkipped( 'Missing \"link\" or \"symlink\" function.' );\n return;\n }\n\n $this->createTestDirectories( array( '/logs/foo/12345' ) );\n $this->createTestFile( '/logs/foo/12345/bar.txt' );\n\n $file = PHPUC_TEST_DIR . '/logs/foo/12345/bar.txt';\n\n link( $file, PHPUC_TEST_DIR . '/logs/bar.txt' );\n symlink( $file, PHPUC_TEST_DIR . '/logs/foo/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/logs' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/logs' );\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }", "function fn_rename($oldname, $newname, $context = null)\n{\n $result = ($context === null) ? rename($oldname, $newname) : rename($oldname, $newname, $context);\n if ($result !== false) {\n @chmod($newname, is_dir($newname) ? DEFAULT_DIR_PERMISSIONS : DEFAULT_FILE_PERMISSIONS);\n }\n\n return $result;\n}", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }", "public function dir_rewinddir() {}", "public function move($new_dirname){\n\t \tif($this->dirname == $new_dirname)\n\t\t\treturn true;\t\t\n\t \t\n\t\tif(!is_dir(Yii::getPathOfAlias('webroot').'/'.$new_dirname))\n\t\t\treturn false;\n\t\t\n\t\t$filename=$this->filename;\n\t\t$new_file=Yii::getPathOfAlias('webroot').'/'.$new_dirname.'/'.$filename.'.'.$this->extension;\n\t\t\n\t\twhile(file_exists($new_file)){\n\t\t\t$filename .= '_copy';\n\t\t\t$new_file=Yii::getPathOfAlias('webroot').'/'.$new_dirname.'/'.$filename.'.'.$this->extension;\n\t\t}\n\t\t\n\t\t$old_file=$this->getAbsolutePath();\n\t\tif(copy($old_file,$new_file)){\n\t\t\t$this->filename=$filename;\n\t\t\t$this->dirname=$new_dirname;\n\t\t\tif($this->save()){\n\t\t\t\tunlink($old_file);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tunlink($new_file);\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\t\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t\t}", "public static function move($_path, $_target)\r\n {\r\n return rename($_path, $_target);\r\n }", "protected function tearDown()\n {\n if (file_exists(\"{$this->dir}/file1.mock\")) unlink(\"{$this->dir}/file1.mock\");\n if (file_exists(\"{$this->dir}/file2.mock\")) unlink(\"{$this->dir}/file2.mock\");\n if (file_exists(\"{$this->dir}/dir1/file3.mock\")) unlink(\"{$this->dir}/dir1/file3.mock\");\n if (file_exists(\"{$this->dir}/dir1/file4.mock\")) unlink(\"{$this->dir}/dir1/file4.mock\");\n if (file_exists(\"{$this->dir}/dir1\")) rmdir(\"{$this->dir}/dir1\");\n\n if (file_exists(sys_get_temp_dir().'/def/xyz.mock')) unlink(sys_get_temp_dir().'/def/xyz.mock'); \n if (file_exists(sys_get_temp_dir().'/def')) rmdir(sys_get_temp_dir().'/def'); \n\n if (file_exists($this->dir.\"/abc.mock\")) unlink($this->dir.\"/abc.mock\");\n if (file_exists($this->dir.\"/def.mock\")) unlink($this->dir.\"/def.mock\");\n\n if (file_exists(sys_get_temp_dir().'/abc/def/xy/abc.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/abc.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy/dd.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/dd.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy')) rmdir(sys_get_temp_dir().'/abc/def/xy'); \n if (file_exists(sys_get_temp_dir().'/abc/def')) rmdir(sys_get_temp_dir().'/abc/def'); \n if (file_exists(sys_get_temp_dir().'/abc')) rmdir(sys_get_temp_dir().'/abc'); \n \n if (file_exists(\"{$this->dir}/dir2\")) rmdir(\"{$this->dir}/dir2\");\n if (file_exists($this->dir)) rmdir($this->dir);\n \n Config_Mock_Unserialize:$created = array();\n unset(Q\\Transform::$drivers['from-mock']);\n }", "public static function renamefile()\n\t{\n\t\tglobal $g_dir;\n\t\t$filetorename = $_POST['fileToRename'];\n\t\t$newfilename = $_POST['newRenamedFileName'];\n\n\t\t//$dir= '/var/www/html/UPLOADS/';\n\n\t\tif(rename($g_dir.$filetorename, $g_dir.$newfilename))\n\t\t\techo(\"Successfully renamed $filetorename to $newfilename!\");\n\t\telse\n\t\t\techo(\"ERROR: Could not rename $filetorename to $newfilename!\");\n\t}", "public function tearDown() {\n\t\tif(is_dir('/tmp/clara')) {\n\t\t\t$this->rrmdir('/tmp/clara');\n\t\t}\n\t}", "public function testOnDeletedDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $this->dir3->setParent($this->dir1); // This directory was moved.\n\n $obj->onDeletedDirectory($this->dir3);\n $this->assertFileNotExists($this->directory . \"/1/3\");\n\n $obj->onDeletedDirectory($this->dir2);\n $this->assertFileNotExists($this->directory . \"/1/2\");\n\n $obj->onDeletedDirectory($this->dir1);\n $this->assertFileNotExists($this->directory . \"/1\");\n }", "function moveFinalDirectories($aBooksDone, $aDirectories)\r\n{\r\n\t$readydir = $aDirectories['ready'];\r\n\t$sipdir = $aDirectories['sip'];\r\n\t$result = 0;\r\n\r\n\tforeach ($aBooksDone as $itemnumber) {\r\n\t\t$sourcedir = $readydir . '\\\\' . $itemnumber;\r\n\t\t$destinationdir = $sipdir . '\\\\' . $itemnumber;\r\n\r\n\t\tif (!(@opendir($destinationdir))) {\r\n\t\t\t$mk = mkdir($destinationdir);\r\n\t\t\t//if ($mk === FALSE) {\r\n\t\t\t//\t$result = 0;\r\n\t\t\t//\treturn $result;\r\n\t\t\t//}\r\n\t\t}\r\n\r\n\t\t$dh = opendir($sourcedir);\r\n if ($dh) {\r\n while (($file = @readdir($dh)) !== false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $source = $sourcedir . \"\\\\\" . $file;\r\n $destination = $destinationdir . \"\\\\\" . $file;\r\n //echo 'ik zou ' . $source . ' verplaatsen naar ' . $destination . '<br>';\r\n $result = @rename($source, $destination);\r\n }\r\n }\r\n \t\t}\r\n\r\n\t\t$result = rmdir($sourcedir);\r\n\t}\r\n\r\n\treturn $result;\r\n}", "public function renameOnDFS( $oldPath, $newPath )\n {\n $this->accumulatorStart();\n\n $oldPath = $this->makeDFSPath( $oldPath );\n $newPath = $this->makeDFSPath( $newPath );\n\n if(strpos($oldPath,'/storage/') !== FALSE )\n {\n try\n {\n $result = $this->s3->getObject(array('Bucket' => $this->bucket,\n 'Key' => $oldPath));\n $contents=(string) $result['Body'];\n \n $this->s3->putObject(array('Bucket' => $this->bucket,\n 'Key' => $newPath,\n 'Body' => $contents,\n 'ACL' => 'public-read'));\n \n $this->s3->deleteObject(array('Bucket' => $this->bucket,\n 'Key' => $oldPath ));\n $ret = true;\n }catch(S3Exception $e){\n $ret =false;\n }\n }\n else\n {\n $item_old = $this->pool->getItem($oldPath);\n $item_new = $this->pool->getItem($newPath);\n \n $item_new->lock();\n $item_new->set($item_old->get($oldPath));\n $item_old->clear();\n\n $ret = eZFile::rename( $oldPath, $newPath, true );\n\n if ( $ret )\n eZClusterFileHandler::cleanupEmptyDirectories( $oldPath );\n }\n \n $this->accumulatorStop();\n\n return $ret;\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "function moveDIR($dir,$dest=\"\",$debug,$nMode=0755) {\n //$debug = 1;\n $result=true;\n\n //if($debug) { echo \"<h2>Moving directory</h2><p> From:<br> $dir <br>To: $dest</p>\";}\n\n $path = dirname(__FILE__);\n $files = scandir($dir);\n\n foreach($files as $file) {\n if (substr( $file ,0,1) != \".\") {\n $pathFile = $dir.'/'.$file;\n if (is_dir($pathFile)) {\n //if($debug) { echo \"<p><b>Directory:</b> $pathFile</p>\"; }\n\n $newDir = $dest.\"/\".$file;\n\n if (!moveDIR($pathFile,$newDir,$debug)) {\n $result = false;\n }\n\n } else {\n //echo ($debug) ? \"<p>$pathFile is a file</p>\" : \"\";\n\n // $currentFile = realpath($file); // current location\n $currentFile = $pathFile;\n\n $newFile = $dest.\"/\".$file;\n\n if (!file_exists($dest)) {\n makeDIR($dest,0,$nMode);\n }\n // if file already exists remove it\n if (file_exists($newFile)) {\n //if($debug) { echo \"<p>File $newFile already exists - Deleting</p>\"; }\n unlink($newFile);\n } else {\n //if($debug) { echo \"<p>File $newFile doesn't exist yet</p>\"; }\n }\n\n // Move via rename\n // rename(oldname, newname)\n if (rename($currentFile , $newFile)) {\n (CHMOD == 1) ? chmod($newFile, 0755) : '';\n //if($debug) { echo \"<p>Moved $currentFile to $newFile</p>\"; }\n } else {\n //if($debug) { echo \"<p>Failed to move $currentFile to $newFile</p>\"; }\n $result = false;\n } // END rename \n\n } // END if dir or file\n } // end if no dot\n } // END foreach\n return $result;\n }", "function rename_folder($json_path,$folder,$newFolder){\n\t$oldPath = $json_path.$folder;\n\t$newPath = $json_path.$newFolder;\n\tif(!file_exists($oldPath)){\n\t\treturn 'no exist';\n\t}\n\tif(file_exists($newPath)){\n\t\treturn 'folder just exist';\n\t}\n\tif(rename($oldPath,$newPath)){\n\t\treturn 'renamed';\n\t} else {\n\t\treturn 'fatal error';\n\t}\n}", "public function rename_folder($folder, $new_name) {\n\n // mailbox esists?\n $mailbox_idnr = $this->get_mail_box_id($folder);\n if (!$mailbox_idnr) {\n // mailbox not found\n return FALSE;\n }\n\n // ACLs check ('create' grant required )\n $ACLs = $this->_get_acl($folder);\n if (!is_array($ACLs) || !in_array(self::ACL_CREATE_FLAG, $ACLs)) {\n // Unauthorized!\n return FALSE;\n }\n\n // new mailbox name already exists?\n if ($this->get_mail_box_id($new_name)) {\n // name already exist\n return FALSE;\n }\n\n // start transaction\n if (!$this->dbmail->startTransaction()) {\n return FALSE;\n }\n\n // has children?\n $sub_folders = $this->get_sub_folders($folder);\n\n if (count($sub_folders) > 0) {\n\n // target path segment level\n $current_path_segment_level = count(explode($this->delimiter, $folder));\n\n // fetch children\n foreach ($sub_folders as $sub_folder_idnr => $sub_folder_name) {\n\n // explode sub folder name\n $exploded_sub_folder = explode($this->delimiter, $sub_folder_name);\n\n // append to $new_name sub folders\n $new_sub_folder_name = $new_name . $this->delimiter . implode($this->delimiter, array_slice($exploded_sub_folder, $current_path_segment_level));\n\n // rename sub folder\n $query = \"UPDATE dbmail_mailboxes \"\n . \" set name = '{$this->dbmail->escape($new_sub_folder_name)}' \"\n . \" WHERE mailbox_idnr = {$this->dbmail->escape($sub_folder_idnr)} \";\n\n if (!$this->dbmail->query($query)) {\n // rollbalk transaction\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // increment folder 'seq' flag\n if (!$this->increment_mailbox_seq($sub_folder_idnr)) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // unset temporary stored mailbox_id (if present)\n if (!$this->unset_temp_value(\"MBOX_ID_{$sub_folder_name}_{$this->user_idnr}\")) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n }\n }\n\n // rename target folder\n $query = \"UPDATE dbmail_mailboxes \"\n . \" set name = '{$this->dbmail->escape($new_name)}' \"\n . \" WHERE mailbox_idnr = {$this->dbmail->escape($mailbox_idnr)} \";\n\n if (!$this->dbmail->query($query)) {\n // rollbalk transaction\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // increment folder 'seq' flag\n if (!$this->increment_mailbox_seq($mailbox_idnr)) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // unset temporary stored mailbox_id (if present)\n if (!$this->unset_temp_value(\"MBOX_ID_{$folder}_{$this->user_idnr}\")) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n return ($this->dbmail->endTransaction() ? TRUE : FALSE);\n }", "public function rename($new_name) {\n\t\t$new_path = $this->getParentDirectory()->getPath().DIRECTORY_SEPARATOR.$new_name;\n\t\tif (!rename($this->getPath(), $new_path)) throw new \\Exception(\"Couldn't rename the file $this to $new_path\");\n\t\t$this->path = $new_path;\n\t}", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function rename($path, $newpath)\n {\n }", "function _moveFile($sourceDir, $destDir, $filename) {\n\t\t$currentFilePath = $sourceDir . DIRECTORY_SEPARATOR . $filename;\n\t\t$destinationPath = $destDir . DIRECTORY_SEPARATOR . $filename;\n\n\t\tif (!rename($currentFilePath, $destinationPath)) {\n\t\t\t$message = __('admin.fileLoader.moveFileFailed', array('filename' => $filename,\n\t\t\t\t'currentFilePath' => $currentFilePath, 'destinationPath' => $destinationPath));\n\t\t\t$this->addExecutionLogEntry($message, SCHEDULED_TASK_MESSAGE_TYPE_ERROR);\n\n\t\t\t// Script should always stop if it can't manipulate files inside\n\t\t\t// its own directory system.\n\t\t\tfatalError($message);\n\t\t}\n\n\t\treturn $destinationPath;\n\t}", "abstract function changedir($path = '', $supress_debug = FALSE);", "public function testMkdirRecursive() {\n $testDirName = self::TEST_DIR . '/testMkdirRecursive/recursiveFlag';\n\n (new Directory($testDirName))->mkdir(true);\n\n $this->assertDirectoryExists($testDirName);\n }", "function makedir($dir)\n{\n\tglobal $config_vars;\n\t$ret = ForceDirectories($dir,$config_vars['dir_mask']);\n\ttouch ($dir . '/index.html');\n\treturn $ret;\n}", "public function testRenameKey()\n {\n $data = array(\n 'Hello' => 'Funilrys',\n 'How' => 'is',\n 'Are' => 'on',\n 'You?' => 'GitHub'\n );\n $toChange = array(\n 'How' => 'world',\n 'Are' => 'from',\n 'You?' => 'Germany'\n );\n\n $validKeys = array('Hello', 'world', 'from', 'Germany');\n $validValues = array('Funilrys', 'is', 'on', 'GitHub');\n\n $invalidData = array('Funilrys', 'is', 'on', 'GitHub');\n $invalidToChange = array('Hello', 'How', 'Are', 'You?');\n\n $this\n ->given($array = new classToTest())\n ->then\n ->array($array::renameKey($data, $toChange))\n ->keys\n ->isEqualTo($validKeys)\n ->array($array::renameKey($data, $toChange))\n ->containsValues($validValues)\n ->array($array::renameKey($data, $toChange))\n ->isNotEmpty()\n ->boolean($array::renameKey($invalidData, $invalidToChange))\n ->isFalse()\n ;\n }", "public function rename($new_name, $new_extension = false)\n\t{\n\t\t$info = pathinfo($this->path);\n\n\t\t$new_name = str_replace(array('..', '/', '\\\\'), array('', '', ''), $new_name);\n\t\t$extension = $new_extension === false\n\t\t\t? $info['extension']\n\t\t\t: ltrim(str_replace(array('/', '\\\\'), array('', '', ''), $new_name), '.');\n\t\t$extension = ! empty($extension) ? '.'.$extension : '';\n\n\t\t$new_path = $info['dirname'].DS.$new_name.$extension;\n\n\t\t$return = $this->area->rename($this->path, $new_path);\n\t\t$return and $this->path = $new_path;\n\t\t\n\t\treturn $return;\n\t}", "protected function removeTestFilePath()\n {\n $path = $this->getTestFilePath();\n FileHelper::removeDirectory($path);\n }", "public function rename(string $source, string $newFileName): bool\n {\n $path = pathinfo($source);\n $newFilePath = $path['dirname'] . '/' . $newFileName;\n\n return rename($source, $newFilePath);\n }", "private function renameTempFile($path, $newPath, $webRoot)\n {\n $fs = $this->getFileSystem();\n\n $fs->copy($webRoot.$path, $webRoot.$newPath, true);\n $fs->remove($webRoot.$path);\n }", "function tearDown() {\n\t\t$this->wfRecursiveRemoveDir( $this->tmpName );\n\t}", "public function move($new_path)\n\t{\n\t\t$info = pathinfo($this->path);\n\t\t$new_path = $this->area->get_path($new_path);\n\n\t\t$new_path = rtrim($new_path, '\\\\/').DS.$info['basename'];\n\n\t\t$return = $this->area->rename($this->path, $new_path);\n\t\t$return and $this->path = $new_path;\n\t\t\n\t\treturn $return;\n\t}", "protected function tearDown()\n {\n chdir(CWD);\n }", "function renameDirectory($path=\"\", $filter, $transform) {\n\t\t$dir_handle = @opendir($path) or die(\"Unable to open $path\");\n\n\t\t//running the while loop\n\t\t$count = 0;\n\n\t\twhile ($name = readdir($dir_handle)) \n\t\t{\n\t\t\t// echo \"dir loop: $path/$name\\n\";\n\t\t\tif(strpos($name, \".\") === 0) {\n\t\t\t\t// skipping dot file\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// run the item through our filter\n\t\t\tif($filter && !$filter($name)) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\t// transform it\n\t\t\t\t$newName = $transform($name);\n\t\t\t\t$this->log(\"$name transformed to $newName\");\n\t\t\t\tif($this->dryRun) {\n\t\t\t\t\t$this->log(\"(dry run) rename $path/$name to $path/$newName\");\n\t\t\t\t} else {\n\t\t\t\t\t$result = rename(\"$path/$name\", \"$path/$newName\");\n\t\t\t\t\tif(!$result) {\n\t\t\t\t\t\tthrow new Exception(\"Failed to rename: $path/$name to $path/$newName\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$name = $newName;\n\t\t\t}\n\t\t\t\n\t\t\tif(is_dir(\"$path/$name\")) {\n\t\t\t\t$this->renameDirectory(\"$path/$name\", $filter, $transform);\n\t\t\t}\n\t\t\t$count++;\n\t\t}\n\t\tclosedir($dir_handle);\n\n\t\t// // return array\n\t\t// return $items;\n\t}", "function frename($oldfile=false, $newfile=false, $dir=false) {\n//\t\t$ereg = '\\.([a-zA-Z0-9]*)$';\n//\t\tereg($ereg, $oldfile, $arr);\n preg_match('/\\.([a-zA-Z0-9]*)$/', $oldfile, $arr);\n\t\tif (ereg('/\\.([a-zA-Z0-9]*)$/', $newfile)) \n\t\t $newfile = preg_replace('/\\.([a-zA-Z0-9]*)$/', \".\" . $arr[1], $newfile);\n\t\telse $newfile .= \".\" . $arr[1];\n\t\treturn $this->rename($oldfile, $newfile, $dir);\n\t}", "public function & renamePath ($newRenamedName) {\n if (($this->pathExists->toBoolean () == TRUE) && !(file_exists ($newRenamedName))) {\n if (rename ($this->varContainer, $newRenamedName)) {\n $this->varContainer = $newRenamedName;\n return $this->returnToChain ();\n } else {\n if (self::checkCanOutputErrorScreen ()->toBoolean ()) {\n self::renderScreenOfDeath (new S (__CLASS__),\n new S (RENAME_OPERATION_FAILED),\n new S (RENAME_OPERATION_FAILED_FIX));\n } else {\n return $this->pathExists;\n }\n }\n } else {\n return $this->pathExists;\n }\n }", "public function moveTo(Directory $dir) {\n\t\t$new_path = $this->pathIn($dir);\n\t\tif (!rename($this->getPath(), $new_path)) throw new \\Exception(\"Couldn't rename the file $this to $new_path\");\n\t\t$this->path = $new_path;\n\t}", "public function testRemoveDummyTestFileAfterDoneTest()\n {\n unlink(TESTING_STORE);\n\n // boolean result must be === false\n $this->assertFalse(file_exists(TESTING_STORE));\n }", "public function createDirectory(Directory $directory): void;", "protected function createDirectory() {}", "public static function rename($old, $new) {\n $old = self::resolvePath($old);\n $new = self::resolvePath($new);\n\n self::assertExists($old);\n\n $ok = rename($old, $new);\n if (!$ok) {\n throw new FilesystemException(\n $new,\n pht(\"Failed to rename '%s' to '%s'!\", $old, $new));\n }\n }", "public function rename($source, $destination);", "public function rename($newname);", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function changeCurrentDirectory(Directory $newCurrentDirectory);", "public function testMoveSuccess_zipSubfolder()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "function setName( $newName )\r\n\t{\r\n\t\t$basePath = dirname( $this->path );\r\n\t\tif(rename( $this->path, $basePath.'/'.$newName ))\r\n\t\t{\r\n\t\t\t$this->path = $basePath.'/'.$newName;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttrigger_error(\"Não foi possível renomear a pasta \" . $this->path);\r\n\t\t}\r\n\t}", "public function uploadCheckForExistingFile($directory, $testFilename)\n\t{\n\t\tif (file_exists($directory . $testFilename)) {\n\t\t\t$filenamePieces = explode('_', $testFilename);\n\n\t\t\tif (is_numeric($filenamePieces[0])) {\n\t\t\t\t$filenamePieces[0] = intval($filenamePieces[0]) + 1;\n\t\t\t\t$newFilenamePieces = $filenamePieces;\n\t\t\t} else {\n\t\t\t\t$newFilenamePieces = array_merge([0], $filenamePieces);\n\t\t\t}\n\n\t\t\treturn $this->uploadCheckForExistingFile($directory, implode('_', $newFilenamePieces));\n\t\t} else {\n\t\t\treturn $testFilename;\n\t\t}\n\t}" ]
[ "0.7675573", "0.6942143", "0.6803566", "0.66557056", "0.6410179", "0.63514674", "0.63316065", "0.6303983", "0.62753636", "0.6271949", "0.6264431", "0.6144328", "0.6107304", "0.6092823", "0.60601956", "0.6049897", "0.6024232", "0.60035455", "0.59846485", "0.59535265", "0.59388083", "0.59384656", "0.5845024", "0.58058167", "0.58050144", "0.57979053", "0.5794211", "0.5774315", "0.57674843", "0.5746615", "0.5708963", "0.56981796", "0.5697029", "0.5694243", "0.5659459", "0.5654342", "0.559932", "0.5583654", "0.5577599", "0.55681765", "0.5548854", "0.5540921", "0.55369276", "0.55194485", "0.5514052", "0.5511689", "0.5510175", "0.54919803", "0.5491625", "0.5475125", "0.5473948", "0.5467575", "0.5467575", "0.5453702", "0.54414594", "0.54276425", "0.5409281", "0.5386303", "0.53822905", "0.537898", "0.534635", "0.5336339", "0.5326326", "0.5323985", "0.53125596", "0.5308049", "0.5301367", "0.5299388", "0.5294618", "0.5285136", "0.52823514", "0.52817947", "0.52639127", "0.52604246", "0.5220661", "0.5213533", "0.5211713", "0.5195872", "0.5194506", "0.518953", "0.51854306", "0.51623887", "0.5157265", "0.51521087", "0.51246136", "0.51197916", "0.5119735", "0.51185906", "0.5106501", "0.5101603", "0.50863385", "0.5083668", "0.50755155", "0.50605386", "0.50495386", "0.5049277", "0.50449926", "0.50417894", "0.5022774", "0.50223505" ]
0.8054311
0
Test for Directory::rename() Create a new Directory named test_dir and renames it with the same name. At the end of the test, remove the created directory.
public function test_rename_same_name() { $object = Directory::create(ROOT.DS.'test_dir'); $object->rename('test_dir'); $this->assertEquals($object->get_base_name(), 'test_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function testRename()\n {\n $oldFilename = static::$baseFile . '/fs/tmp.txt';\n $newFilename = static::$baseFile . '/fs/test/tmp.txt';\n\n file_put_contents($oldFilename, 'It works!');\n\n $this->assertTrue(rename($oldFilename, $newFilename));\n\n $this->assertFalse(file_exists($oldFilename));\n $this->assertTrue(file_exists($newFilename));\n }", "public function renameDirectory(DirectoryInterface $directory, string $newName): DirectoryInterface;", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function testConstructSingleDirectory()\n {\n $filter = new FileRename($this->newDir);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "private function renameDirectories(): void\n {\n //update directory names and update file created paths accordingly\n foreach ($this->dirsToRename as $dirPath) {\n $updateDirPath = $this->pathHelper->renamePathBasenameSingularOrPlural(\n $dirPath,\n $this->singularNamespacedName,\n $this->pluralNamespacedName\n );\n foreach ($this->filesCreated as $k => $filePath) {\n $this->filesCreated[$k] = str_replace($dirPath, $updateDirPath, $filePath);\n }\n }\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function testDeleteDirectory()\n {\n $this->createTestDirectories(\n array(\n '/artifacts/foo/12345',\n '/artifacts/foo/67890',\n )\n );\n\n $this->createTestFile( '/artifacts/foo/12345/bar.txt' );\n $this->createTestFile( '/artifacts/foo/67890/bar.txt' );\n $this->createTestFile( '/artifacts/foo/bar.txt' );\n $this->createTestFile( '/artifacts/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/artifacts' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/artifacts' );\n }", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "public function testRenameFailure($newFilename)\n {\n $oldFilename = static::$baseFile . '/fs/tmp.txt';\n\n file_put_contents($oldFilename, 'It works!');\n $this->assertFalse(rename($oldFilename, $newFilename));\n }", "protected function tearDown()\n {\n $test_dirs = array(\n ROOT.DS.'test_dir',\n ROOT.DS.'test_new_dir',\n SYSTEM.DS.'test_dir',\n );\n foreach($test_dirs as $f){\n is_dir($f) and rmdir($f);\n }\n }", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "protected function createRealTestdir() {}", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "function rename_folder()\n\t{\n\t\t$new_name = trailingslashit($this->paths['fontdir']).$this->font_name;\n\t\t\n\t\t//delete folder and contents if they already exist\n\t\t$this->delete_folder($new_name);\n\t\n\t\trename($this->paths['tempdir'], $new_name);\n\t}", "public function testDirnameReturnsDirectory()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame(self::$temp, Storage::dirname(self::$temp.DS.'foo.txt'));\n }", "public function test_mkdir_and_rmdir() {\n /**\n * Test creating a single directory\n */\n $dir = 'dir1';\n $uri = 'test://'.$dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri);\n $this->assertFileExists($path);\n rmdir($uri);\n $this->assertFileNotExists($path);\n\n /**\n * Test creating multiple directories recursively as needed\n */\n $dir = 'dir2/dir3/dir4';\n $uri = 'test://' . $dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri, 0777, true);\n\n $error_tripped = false;\n $this->assertFileExists($path);\n try {\n $return = rmdir('test://dir2');\n }\n catch (PHPUnit_Framework_Error $e) {\n $error_tripped = true;\n }\n\n $this->assertTrue($error_tripped, \"rmdir() on a non-empty directory should trigger an error.\");\n $this->assertTrue(wp_rmdir_recursive('test://dir2'));\n $this->assertFileNotExists($this->test_dir.'/dir2');\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function renameDir($curpath, $newname)\n {\n $filterSlug = new FrontZend_Filter_Slug();\n $newpath = strstr($newname, '/') || strstr($newname, DIRECTORY_SEPARATOR)\n ? $newname\n : substr($curpath, 0, strrpos($curpath, DIRECTORY_SEPARATOR)+1)\n . $filterSlug->filter($newname);\n\n $newfullpath = Media_Model_File::getFullPath($newpath);\n if (is_dir($newfullpath)) {\n throw new FrontZend_Exception('Já existe uma pasta com este nome');\n }\n\n $curfullpath = Media_Model_File::getFullPath($curpath);\n\n if (is_dir($curfullpath)) {\n if (rename($curfullpath, $newfullpath)) {\n try {\n $this->_renamePath($curpath, $newpath);\n return true;\n } catch(Exception $e) {\n rename($newfullpath, $curfullpath);\n throw $e;\n }\n\n };\n }\n return false;\n }", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "protected static function moveTemporaryDirs()\n {\n if (static::isCapsular()) {\n // Rename directories\n $original = static::getCacheDirs(false);\n foreach (static::getCacheDirs(true) as $i => $tmpDir) {\n \\Includes\\Utils\\FileManager::unlinkRecursive($tmpDir);\n $originalDir = $original[$i];\n rename($originalDir, $tmpDir);\n }\n\n // Rename files\n $original = static::getDecoratorDataFiles(false);\n foreach (static::getDecoratorDataFiles(true) as $i => $tmpPath) {\n $destPath = $original[$i];\n if (file_exists($tmpPath)) {\n rename($tmpPath, $destPath);\n }\n }\n }\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }", "public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function tearDown(): void\n {\n if (is_dir($this->tmpPath)) {\n if (file_exists($this->oldFile)) {\n unlink($this->oldFile);\n }\n if (file_exists($this->origFile)) {\n unlink($this->origFile);\n }\n if (file_exists($this->newFile)) {\n unlink($this->newFile);\n }\n if (is_dir($this->newDir)) {\n if (file_exists($this->newDirFile)) {\n unlink($this->newDirFile);\n }\n rmdir($this->newDir);\n }\n rmdir($this->tmpPath);\n }\n }", "public function testOnNewDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onNewDirectory($this->dir1);\n $this->assertFileExists($this->directory . \"/1\");\n\n $obj->onNewDirectory($this->dir2);\n $this->assertFileExists($this->directory . \"/1/2\");\n\n $obj->onNewDirectory($this->dir3);\n $this->assertFileExists($this->directory . \"/1/2/3\");\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "public function testConstructTruncatedSourceDirectory()\n {\n $filter = new FileRename([\n 'target' => $this->newDir]);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "public function testDeleteDirectoryWithLinksAndSymlinks()\n {\n if ( !function_exists( 'link' ) || !function_exists( 'symlink' ) )\n {\n $this->markTestSkipped( 'Missing \"link\" or \"symlink\" function.' );\n return;\n }\n\n $this->createTestDirectories( array( '/logs/foo/12345' ) );\n $this->createTestFile( '/logs/foo/12345/bar.txt' );\n\n $file = PHPUC_TEST_DIR . '/logs/foo/12345/bar.txt';\n\n link( $file, PHPUC_TEST_DIR . '/logs/bar.txt' );\n symlink( $file, PHPUC_TEST_DIR . '/logs/foo/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/logs' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/logs' );\n }", "public function renameDirNames($base_old_dir, $old_name, $base_new_dir, $new_name) {\n $paths = $this->_arrayDataFolders();\n\n foreach ($paths as $dir) {\n $basePath = WikiGlobalConfig::getConf($dir);\n $oldPath = \"$basePath/$base_old_dir/$old_name\";\n if (file_exists($oldPath)) {\n $newPath = \"$basePath/$base_new_dir/$new_name\";\n if ($base_old_dir !== $base_new_dir && !is_dir($newPath))\n mkdir($newPath, 0775, true);\n if (! rename($oldPath, $newPath))\n throw new Exception(\"renameProjectOrDirectory: Error mentre canviava el nom del projecte/carpeta a $dir.\");\n }\n }\n }", "public function rename($new_dirname, $overwrite)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\tif (!$this->getParent()->isWritable()) {\n\t\t\tthrow new fEnvironmentException(\n\t\t\t\t'The directory, %s, can not be renamed because the directory containing it is not writable',\n\t\t\t\t$this->directory\n\t\t\t);\n\t\t}\n\t\t\n\t\t$info = fFilesystem::getPathInfo($new_dirname);\n\t\t\n\t\tif (!file_exists($info['dirname'])) {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The new directory name specified, %s, is inside of a directory that does not exist',\n\t\t\t\t$new_dirname\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Make the dirname absolute\n\t\t$new_dirname = fDirectory::makeCanonical(realpath($new_dirname));\n\t\t\n\t\tif (file_exists($new_dirname)) {\n\t\t\tif (!is_writable($new_dirname)) {\n\t\t\t\tthrow new fEnvironmentException(\n\t\t\t\t\t'The new directory name specified, %s, already exists, but is not writable',\n\t\t\t\t\t$new_dirname\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!$overwrite) {\n\t\t\t\t$new_dirname = fFilesystem::makeUniqueName($new_dirname);\n\t\t\t}\n\t\t} else {\n\t\t\t$parent_dir = new fDirectory($info['dirname']);\n\t\t\tif (!$parent_dir->isWritable()) {\n\t\t\t\tthrow new fEnvironmentException(\n\t\t\t\t\t'The new directory name specified, %s, is inside of a directory that is not writable',\n\t\t\t\t\t$new_dirname\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\trename($this->directory, $new_dirname);\n\t\t\n\t\t// Allow filesystem transactions\n\t\tif (fFilesystem::isInsideTransaction()) {\n\t\t\tfFilesystem::rename($this->directory, $new_dirname);\n\t\t}\n\t\t\n\t\tfFilesystem::updateFilenameMapForDirectory($this->directory, $new_dirname);\n\t}", "function narrative_purge_files($old_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($old_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n $file_extension = pathinfo($filecheck, PATHINFO_EXTENSION);\n if ($file_extension == 'jpg')\n {\n rename($old_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "function renameFolder($oldName,$newName){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\r\n\t\t\t}", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function testOnDeletedDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $this->dir3->setParent($this->dir1); // This directory was moved.\n\n $obj->onDeletedDirectory($this->dir3);\n $this->assertFileNotExists($this->directory . \"/1/3\");\n\n $obj->onDeletedDirectory($this->dir2);\n $this->assertFileNotExists($this->directory . \"/1/2\");\n\n $obj->onDeletedDirectory($this->dir1);\n $this->assertFileNotExists($this->directory . \"/1\");\n }", "protected function tearDown()\n {\n if (file_exists(\"{$this->dir}/file1.mock\")) unlink(\"{$this->dir}/file1.mock\");\n if (file_exists(\"{$this->dir}/file2.mock\")) unlink(\"{$this->dir}/file2.mock\");\n if (file_exists(\"{$this->dir}/dir1/file3.mock\")) unlink(\"{$this->dir}/dir1/file3.mock\");\n if (file_exists(\"{$this->dir}/dir1/file4.mock\")) unlink(\"{$this->dir}/dir1/file4.mock\");\n if (file_exists(\"{$this->dir}/dir1\")) rmdir(\"{$this->dir}/dir1\");\n\n if (file_exists(sys_get_temp_dir().'/def/xyz.mock')) unlink(sys_get_temp_dir().'/def/xyz.mock'); \n if (file_exists(sys_get_temp_dir().'/def')) rmdir(sys_get_temp_dir().'/def'); \n\n if (file_exists($this->dir.\"/abc.mock\")) unlink($this->dir.\"/abc.mock\");\n if (file_exists($this->dir.\"/def.mock\")) unlink($this->dir.\"/def.mock\");\n\n if (file_exists(sys_get_temp_dir().'/abc/def/xy/abc.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/abc.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy/dd.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/dd.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy')) rmdir(sys_get_temp_dir().'/abc/def/xy'); \n if (file_exists(sys_get_temp_dir().'/abc/def')) rmdir(sys_get_temp_dir().'/abc/def'); \n if (file_exists(sys_get_temp_dir().'/abc')) rmdir(sys_get_temp_dir().'/abc'); \n \n if (file_exists(\"{$this->dir}/dir2\")) rmdir(\"{$this->dir}/dir2\");\n if (file_exists($this->dir)) rmdir($this->dir);\n \n Config_Mock_Unserialize:$created = array();\n unset(Q\\Transform::$drivers['from-mock']);\n }", "function rename($old, $new = null) {\n \n if (!$new) {\n $new = $old;\n \t$old = $this->_file;\n }\n \n if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' && (strtolower($old) == strtolower($new))) {\n \n $rand = sprintf('%s%s%s%s%s',\n dirname($old),\n DIRECTORY_SEPARATOR,\n microtime(),\n rand(1, 999),\n basename($old)\n );\n \n if (!@rename($old, $rand)) {\n Fire_Error::throwError(sprintf('Failed to temporary rename \"%s\".',\n $old\n ), __FILE__, __LINE__\n );\n }\n $old = $rand;\n }\n \n if (!@rename($old, $new)) {\n Fire_Error::throwError(sprintf('Failed to rename \"%s\" to \"%s\".',\n $old,\n $new\n ), __FILE__, __LINE__\n );\n } \n }", "public function testRenameTo()\n {\n /*\n * remove all tables\n */\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->fixture->getDBObject()->simpleQuery('DROP TABLE '. $table['Tables_in_'.$this->fixture->a['db_name']]);\n }\n\n /*\n * create fresh store and check tables\n */\n $this->fixture->setup();\n\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->assertTrue(\n false !== strpos($table['Tables_in_'.$this->fixture->a['db_name']], $this->dbConfig['db_table_prefix'].'_')\n );\n }\n\n /*\n * rename store\n */\n $prefix = 'new_store';\n $this->fixture->renameTo($prefix);\n\n /*\n * check for new prefixes\n */\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->assertTrue(\n false !== strpos($table['Tables_in_'.$this->fixture->a['db_name']], $prefix)\n );\n }\n }", "function move_dir_to_tmp($src, $id)\n{\n $CI =& get_instance();\n $tmpPath = $CI->config->item('site_data_dir') . '/tmp/' . time() . '/';\n if (!is_dir($tmpPath))\n {\n mkdir($tmpPath, 0775, TRUE);\n }\n $tmpPath .= '/' . $id . '/';\n rename($src, $tmpPath);\n return $tmpPath;\n}", "public function tearDown() {\n\t\tif(is_dir('/tmp/clara')) {\n\t\t\t$this->rrmdir('/tmp/clara');\n\t\t}\n\t}", "public function moveDirectory($oldDirName, $newDirName)\n\t{\n\t\treturn $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n\t}", "public function moveDirectory(string $oldDirName, string $newDirName): MoveDirectory\n {\n return $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n }", "function moveFiles($src, $dest)\n{\n if (!is_dir($src)) {\n return false;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n rename($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else {\n if (!$f->isDot() && $f->isDir()) {\n rmDirRecursive($f->getRealPath(), \"$dest/$f\");\n unlink($f->getRealPath());\n }\n }\n }\n unlink($src);\n}", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "abstract function rename($old_file, $new_file, $move = FALSE);", "public function testMkdirRecursive() {\n $testDirName = self::TEST_DIR . '/testMkdirRecursive/recursiveFlag';\n\n (new Directory($testDirName))->mkdir(true);\n\n $this->assertDirectoryExists($testDirName);\n }", "public function testChDir() {\n $currentDir = getcwd();\n $parentDir = dirname($currentDir);\n\n $handle = new Directory($parentDir);\n $handle->chdir();\n\n $this->assertEquals($parentDir, getcwd());\n chdir($currentDir);\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "function fn_rename($oldname, $newname, $context = null)\n{\n $result = ($context === null) ? rename($oldname, $newname) : rename($oldname, $newname, $context);\n if ($result !== false) {\n @chmod($newname, is_dir($newname) ? DEFAULT_DIR_PERMISSIONS : DEFAULT_FILE_PERMISSIONS);\n }\n\n return $result;\n}", "public static function move($_path, $_target)\r\n {\r\n return rename($_path, $_target);\r\n }", "function tearDown() {\n\t\t$this->wfRecursiveRemoveDir( $this->tmpName );\n\t}", "public function testRenameKey()\n {\n $data = array(\n 'Hello' => 'Funilrys',\n 'How' => 'is',\n 'Are' => 'on',\n 'You?' => 'GitHub'\n );\n $toChange = array(\n 'How' => 'world',\n 'Are' => 'from',\n 'You?' => 'Germany'\n );\n\n $validKeys = array('Hello', 'world', 'from', 'Germany');\n $validValues = array('Funilrys', 'is', 'on', 'GitHub');\n\n $invalidData = array('Funilrys', 'is', 'on', 'GitHub');\n $invalidToChange = array('Hello', 'How', 'Are', 'You?');\n\n $this\n ->given($array = new classToTest())\n ->then\n ->array($array::renameKey($data, $toChange))\n ->keys\n ->isEqualTo($validKeys)\n ->array($array::renameKey($data, $toChange))\n ->containsValues($validValues)\n ->array($array::renameKey($data, $toChange))\n ->isNotEmpty()\n ->boolean($array::renameKey($invalidData, $invalidToChange))\n ->isFalse()\n ;\n }", "public function renameFolder($oldName, $newName)\n {\n // TODO: This is also not atomar and has similar problems as removeFolder()\n\n if ($oldName instanceof Zend_Mail_Storage_Folder) {\n $oldName = $oldName->getGlobalName();\n }\n\n $oldName = trim($oldName, $this->_delim);\n if (strpos($oldName, 'INBOX' . $this->_delim) === 0) {\n $oldName = substr($oldName, 6);\n }\n\n $newName = trim($newName, $this->_delim);\n if (strpos($newName, 'INBOX' . $this->_delim) === 0) {\n $newName = substr($newName, 6);\n }\n\n if (strpos($newName, $oldName . $this->_delim) === 0) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('new folder cannot be a child of old folder');\n }\n\n // check if folder exists and has no children\n $folder = $this->getFolders($oldName);\n\n if ($oldName == 'INBOX' || $oldName == DIRECTORY_SEPARATOR || $oldName == '/') {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('wont rename INBOX');\n }\n\n if ($oldName == $this->getCurrentFolder()) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('wont rename selected folder');\n }\n\n $newdir = $this->createFolder($newName);\n\n if (!$folder->isLeaf()) {\n foreach ($folder as $k => $v) {\n $this->renameFolder($v->getGlobalName(), $newName . $this->_delim . $k);\n }\n }\n\n $olddir = $this->_rootdir . '.' . $folder;\n foreach (['tmp', 'new', 'cur'] as $subdir) {\n $subdir = DIRECTORY_SEPARATOR . $subdir;\n if (!file_exists($olddir . $subdir)) {\n continue;\n }\n // using copy or moving files would be even better - but also much slower\n if (!rename($olddir . $subdir, $newdir . $subdir)) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('error while moving ' . $subdir);\n }\n }\n // create a dummy if removing fails - otherwise we can't read it next time\n mkdir($olddir . DIRECTORY_SEPARATOR . 'cur');\n $this->removeFolder($oldName);\n }", "function renameDirectory($path=\"\", $filter, $transform) {\n\t\t$dir_handle = @opendir($path) or die(\"Unable to open $path\");\n\n\t\t//running the while loop\n\t\t$count = 0;\n\n\t\twhile ($name = readdir($dir_handle)) \n\t\t{\n\t\t\t// echo \"dir loop: $path/$name\\n\";\n\t\t\tif(strpos($name, \".\") === 0) {\n\t\t\t\t// skipping dot file\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// run the item through our filter\n\t\t\tif($filter && !$filter($name)) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\t// transform it\n\t\t\t\t$newName = $transform($name);\n\t\t\t\t$this->log(\"$name transformed to $newName\");\n\t\t\t\tif($this->dryRun) {\n\t\t\t\t\t$this->log(\"(dry run) rename $path/$name to $path/$newName\");\n\t\t\t\t} else {\n\t\t\t\t\t$result = rename(\"$path/$name\", \"$path/$newName\");\n\t\t\t\t\tif(!$result) {\n\t\t\t\t\t\tthrow new Exception(\"Failed to rename: $path/$name to $path/$newName\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$name = $newName;\n\t\t\t}\n\t\t\t\n\t\t\tif(is_dir(\"$path/$name\")) {\n\t\t\t\t$this->renameDirectory(\"$path/$name\", $filter, $transform);\n\t\t\t}\n\t\t\t$count++;\n\t\t}\n\t\tclosedir($dir_handle);\n\n\t\t// // return array\n\t\t// return $items;\n\t}", "public function createDirectory(Directory $directory): void;", "public static function renamefile()\n\t{\n\t\tglobal $g_dir;\n\t\t$filetorename = $_POST['fileToRename'];\n\t\t$newfilename = $_POST['newRenamedFileName'];\n\n\t\t//$dir= '/var/www/html/UPLOADS/';\n\n\t\tif(rename($g_dir.$filetorename, $g_dir.$newfilename))\n\t\t\techo(\"Successfully renamed $filetorename to $newfilename!\");\n\t\telse\n\t\t\techo(\"ERROR: Could not rename $filetorename to $newfilename!\");\n\t}", "function moveDIR($dir,$dest=\"\",$debug,$nMode=0755) {\n //$debug = 1;\n $result=true;\n\n //if($debug) { echo \"<h2>Moving directory</h2><p> From:<br> $dir <br>To: $dest</p>\";}\n\n $path = dirname(__FILE__);\n $files = scandir($dir);\n\n foreach($files as $file) {\n if (substr( $file ,0,1) != \".\") {\n $pathFile = $dir.'/'.$file;\n if (is_dir($pathFile)) {\n //if($debug) { echo \"<p><b>Directory:</b> $pathFile</p>\"; }\n\n $newDir = $dest.\"/\".$file;\n\n if (!moveDIR($pathFile,$newDir,$debug)) {\n $result = false;\n }\n\n } else {\n //echo ($debug) ? \"<p>$pathFile is a file</p>\" : \"\";\n\n // $currentFile = realpath($file); // current location\n $currentFile = $pathFile;\n\n $newFile = $dest.\"/\".$file;\n\n if (!file_exists($dest)) {\n makeDIR($dest,0,$nMode);\n }\n // if file already exists remove it\n if (file_exists($newFile)) {\n //if($debug) { echo \"<p>File $newFile already exists - Deleting</p>\"; }\n unlink($newFile);\n } else {\n //if($debug) { echo \"<p>File $newFile doesn't exist yet</p>\"; }\n }\n\n // Move via rename\n // rename(oldname, newname)\n if (rename($currentFile , $newFile)) {\n (CHMOD == 1) ? chmod($newFile, 0755) : '';\n //if($debug) { echo \"<p>Moved $currentFile to $newFile</p>\"; }\n } else {\n //if($debug) { echo \"<p>Failed to move $currentFile to $newFile</p>\"; }\n $result = false;\n } // END rename \n\n } // END if dir or file\n } // end if no dot\n } // END foreach\n return $result;\n }", "function moveFinalDirectories($aBooksDone, $aDirectories)\r\n{\r\n\t$readydir = $aDirectories['ready'];\r\n\t$sipdir = $aDirectories['sip'];\r\n\t$result = 0;\r\n\r\n\tforeach ($aBooksDone as $itemnumber) {\r\n\t\t$sourcedir = $readydir . '\\\\' . $itemnumber;\r\n\t\t$destinationdir = $sipdir . '\\\\' . $itemnumber;\r\n\r\n\t\tif (!(@opendir($destinationdir))) {\r\n\t\t\t$mk = mkdir($destinationdir);\r\n\t\t\t//if ($mk === FALSE) {\r\n\t\t\t//\t$result = 0;\r\n\t\t\t//\treturn $result;\r\n\t\t\t//}\r\n\t\t}\r\n\r\n\t\t$dh = opendir($sourcedir);\r\n if ($dh) {\r\n while (($file = @readdir($dh)) !== false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $source = $sourcedir . \"\\\\\" . $file;\r\n $destination = $destinationdir . \"\\\\\" . $file;\r\n //echo 'ik zou ' . $source . ' verplaatsen naar ' . $destination . '<br>';\r\n $result = @rename($source, $destination);\r\n }\r\n }\r\n \t\t}\r\n\r\n\t\t$result = rmdir($sourcedir);\r\n\t}\r\n\r\n\treturn $result;\r\n}", "protected function removeTestFilePath()\n {\n $path = $this->getTestFilePath();\n FileHelper::removeDirectory($path);\n }", "public function dir_rewinddir() {}", "public function moveTo(Directory $dir) {\n\t\t$new_path = $this->pathIn($dir);\n\t\tif (!rename($this->getPath(), $new_path)) throw new \\Exception(\"Couldn't rename the file $this to $new_path\");\n\t\t$this->path = $new_path;\n\t}", "public function testRemoveDummyTestFileAfterDoneTest()\n {\n unlink(TESTING_STORE);\n\n // boolean result must be === false\n $this->assertFalse(file_exists(TESTING_STORE));\n }", "function makedir($dir)\n{\n\tglobal $config_vars;\n\t$ret = ForceDirectories($dir,$config_vars['dir_mask']);\n\ttouch ($dir . '/index.html');\n\treturn $ret;\n}", "public function rename_folder($folder, $new_name) {\n\n // mailbox esists?\n $mailbox_idnr = $this->get_mail_box_id($folder);\n if (!$mailbox_idnr) {\n // mailbox not found\n return FALSE;\n }\n\n // ACLs check ('create' grant required )\n $ACLs = $this->_get_acl($folder);\n if (!is_array($ACLs) || !in_array(self::ACL_CREATE_FLAG, $ACLs)) {\n // Unauthorized!\n return FALSE;\n }\n\n // new mailbox name already exists?\n if ($this->get_mail_box_id($new_name)) {\n // name already exist\n return FALSE;\n }\n\n // start transaction\n if (!$this->dbmail->startTransaction()) {\n return FALSE;\n }\n\n // has children?\n $sub_folders = $this->get_sub_folders($folder);\n\n if (count($sub_folders) > 0) {\n\n // target path segment level\n $current_path_segment_level = count(explode($this->delimiter, $folder));\n\n // fetch children\n foreach ($sub_folders as $sub_folder_idnr => $sub_folder_name) {\n\n // explode sub folder name\n $exploded_sub_folder = explode($this->delimiter, $sub_folder_name);\n\n // append to $new_name sub folders\n $new_sub_folder_name = $new_name . $this->delimiter . implode($this->delimiter, array_slice($exploded_sub_folder, $current_path_segment_level));\n\n // rename sub folder\n $query = \"UPDATE dbmail_mailboxes \"\n . \" set name = '{$this->dbmail->escape($new_sub_folder_name)}' \"\n . \" WHERE mailbox_idnr = {$this->dbmail->escape($sub_folder_idnr)} \";\n\n if (!$this->dbmail->query($query)) {\n // rollbalk transaction\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // increment folder 'seq' flag\n if (!$this->increment_mailbox_seq($sub_folder_idnr)) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // unset temporary stored mailbox_id (if present)\n if (!$this->unset_temp_value(\"MBOX_ID_{$sub_folder_name}_{$this->user_idnr}\")) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n }\n }\n\n // rename target folder\n $query = \"UPDATE dbmail_mailboxes \"\n . \" set name = '{$this->dbmail->escape($new_name)}' \"\n . \" WHERE mailbox_idnr = {$this->dbmail->escape($mailbox_idnr)} \";\n\n if (!$this->dbmail->query($query)) {\n // rollbalk transaction\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // increment folder 'seq' flag\n if (!$this->increment_mailbox_seq($mailbox_idnr)) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // unset temporary stored mailbox_id (if present)\n if (!$this->unset_temp_value(\"MBOX_ID_{$folder}_{$this->user_idnr}\")) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n return ($this->dbmail->endTransaction() ? TRUE : FALSE);\n }", "function rename_folder($json_path,$folder,$newFolder){\n\t$oldPath = $json_path.$folder;\n\t$newPath = $json_path.$newFolder;\n\tif(!file_exists($oldPath)){\n\t\treturn 'no exist';\n\t}\n\tif(file_exists($newPath)){\n\t\treturn 'folder just exist';\n\t}\n\tif(rename($oldPath,$newPath)){\n\t\treturn 'renamed';\n\t} else {\n\t\treturn 'fatal error';\n\t}\n}", "public function tearDown()\n {\n if (file_exists($this->__testFilePath)) {\n unlink($this->__testFilePath);\n }\n if (is_dir($this->__testFileDir)) {\n rmdir($this->__testFileDir);\n }\n }", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }", "protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }", "function _moveFile($sourceDir, $destDir, $filename) {\n\t\t$currentFilePath = $sourceDir . DIRECTORY_SEPARATOR . $filename;\n\t\t$destinationPath = $destDir . DIRECTORY_SEPARATOR . $filename;\n\n\t\tif (!rename($currentFilePath, $destinationPath)) {\n\t\t\t$message = __('admin.fileLoader.moveFileFailed', array('filename' => $filename,\n\t\t\t\t'currentFilePath' => $currentFilePath, 'destinationPath' => $destinationPath));\n\t\t\t$this->addExecutionLogEntry($message, SCHEDULED_TASK_MESSAGE_TYPE_ERROR);\n\n\t\t\t// Script should always stop if it can't manipulate files inside\n\t\t\t// its own directory system.\n\t\t\tfatalError($message);\n\t\t}\n\n\t\treturn $destinationPath;\n\t}", "protected function tearDown()\n {\n chdir(CWD);\n }", "protected function createDirectory() {}", "public function renameOnDFS( $oldPath, $newPath )\n {\n $this->accumulatorStart();\n\n $oldPath = $this->makeDFSPath( $oldPath );\n $newPath = $this->makeDFSPath( $newPath );\n\n if(strpos($oldPath,'/storage/') !== FALSE )\n {\n try\n {\n $result = $this->s3->getObject(array('Bucket' => $this->bucket,\n 'Key' => $oldPath));\n $contents=(string) $result['Body'];\n \n $this->s3->putObject(array('Bucket' => $this->bucket,\n 'Key' => $newPath,\n 'Body' => $contents,\n 'ACL' => 'public-read'));\n \n $this->s3->deleteObject(array('Bucket' => $this->bucket,\n 'Key' => $oldPath ));\n $ret = true;\n }catch(S3Exception $e){\n $ret =false;\n }\n }\n else\n {\n $item_old = $this->pool->getItem($oldPath);\n $item_new = $this->pool->getItem($newPath);\n \n $item_new->lock();\n $item_new->set($item_old->get($oldPath));\n $item_old->clear();\n\n $ret = eZFile::rename( $oldPath, $newPath, true );\n\n if ( $ret )\n eZClusterFileHandler::cleanupEmptyDirectories( $oldPath );\n }\n \n $this->accumulatorStop();\n\n return $ret;\n }", "private function moveFile($old_file, $new_file)\n {\n if (!file_exists($old_file)) {\n return;\n }\n\n if (!is_dir(dirname($new_file))) {\n mkdir(dirname($new_file), 0755, true);\n }\n\n // move the file to the archive folder\n rename($old_file, $new_file);\n }", "public function testMoveSuccess_zipSubfolder()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function rename($path, $newpath)\n {\n }", "abstract function changedir($path = '', $supress_debug = FALSE);", "public function rename($newname);", "public function rename($new_name) {\n\t\t$new_path = $this->getParentDirectory()->getPath().DIRECTORY_SEPARATOR.$new_name;\n\t\tif (!rename($this->getPath(), $new_path)) throw new \\Exception(\"Couldn't rename the file $this to $new_path\");\n\t\t$this->path = $new_path;\n\t}", "public function testMoveFileFromTmp(): void\n {\n $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';\n\n $this->assertFalse($this->mediaDirectory->isExist($expectedFilePath));\n\n $this->imageUploader->moveFileFromTmp('magento_small_image.jpg');\n\n $this->assertTrue($this->mediaDirectory->isExist($expectedFilePath));\n }", "private function renameTempFile($path, $newPath, $webRoot)\n {\n $fs = $this->getFileSystem();\n\n $fs->copy($webRoot.$path, $webRoot.$newPath, true);\n $fs->remove($webRoot.$path);\n }", "public function testTypeIdentifiesDirectory()\n {\n mkdir(self::$temp.DS.'foo-dir');\n\n $this->assertSame('dir', Storage::type(self::$temp.DS.'foo-dir'));\n }", "protected function tearDown()\n {\n \\RPI\\Foundation\\Helpers\\FileUtils::delTree(__DIR__.\"/LESSPHPTest/ROOT\");\n }", "protected function doCopyRename($fn, $dir, $name, $flags=0)\n\t{\n\t\tif (($fn == 'rename' && ~$flags & Fs::MERGE) || ($this instanceof Fs_Symlink && $flags & Fs::NO_DEREFERENCE)) return parent::doCopyRename($fn, $dir, $name, $flags); \n\t\t\n\t\tif (empty($name) || $name == '.' || $name == '..' || strpos('/', $name) !== false) throw new SecurityException(\"Unable to $fn '{$this->_path}' to '$dir/$name'; Invalid filename '$name'.\");\n\t\t\n\t\tif (!($dir instanceof Fs_Dir)) $dir = Fs::dir($dir);\n\t\tif (!$dir->exists() && ~$flags & Fs::MKDIR) throw new Fs_Exception(\"Unable to \" . ($fn == 'rename' ? 'move' : $fn) . \" '{$this->_path}' to '$dir/': Directory does not exist\");\n\n\t\t$files = @scandir($this->_path);\n\t\tif ($files === false) throw new Fs_Exception(\"Failed to read directory to $fn '{$this->_path}' to '$dir/$name'\", error_get_last());\n\t\t\n\t\tif ($dir->has($name) && (~$flags & Fs::MERGE || !($dir->$name instanceof Fs_Dir))) {\n\t\t\t$dest = $dir->$name;\n\t\t\tif ($dest instanceof Fs_Dir && !($dest instanceof Fs_Symlink) && count($dest) != 0) throw new Fs_Exception(\"Unable to $fn '{$this->_path}' to '{$dest->_path}': Target is a non-empty directory\");\n\t\t\tif (~$flags & Fs::OVERWRITE) throw new Fs_Exception(\"Unable to $fn '{$this->_path}' to '{$dest->_path}': Target already exists\");\n\t\t\t$dest->delete();\n\t\t}\n\t\t\n\t\t$dest = Fs::dir(\"$dir/$name\");\n\t\t$dest->create($this->getAttribute('mode'), Fs::RECURSIVE | Fs::PRESERVE);\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\tif ($file == '.' || $file == '..') continue;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif (is_dir(\"{$this->_path}/$file)\") && (!is_link(\"{$this->_path}/$file)\") || $flags & ALWAYS_FOLLOW)) {\n\t\t\t\t\t$this->$file->doCopyRename($fn, $dest, $file, $flags);\n\t\t\t\t} else {\n\t\t\t\t\tif ($dest->has($file)) {\n\t\t\t\t\t\tif ($flags & Fs::UPDATE == Fs::UPDATE && $dest->$file['ctime'] >= $this->$file['ctime']) continue;\n\t\t\t\t\t\tif (~$flags & Fs::OVERWRITE) throw new Fs_Exception(\"Unable to $fn '{$this->_path}/$file' to '{$dest->_path}/$file': Target already exists\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (is_link(\"{$this->_path}/$file)\") && ~$flags & ALWAYS_FOLLOW) symlink(readlink(\"{$this->_path}/$file\"), \"{$dest->_path}/$file\");\n\t\t\t\t\t else $fn(\"{$this->_path}/$file\", \"{$dest->_path}/$file\");\n\t\t\t\t}\n\t\t\t} catch (Fs_Exception $e) {\n\t\t\t\ttrigger_error($e->getMessage(), E_USER_WARNING);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($fn == 'rename') rmdir($this->_path);\n\t\treturn Fs::get(\"$dir/$name\");\n\t}", "public function testPrepareDirOriginal()\n {\n $imgPath = $this->imageService->imgPath(\n \\Media\\Service\\Image::ORIGINAL,\n $this->imageId,\n $this->imageEntityData['extension']\n );\n $this->assertTrue($this->imageService->prepareDir($imgPath));\n }", "function chdir(string $directory): void\n{\n error_clear_last();\n $safeResult = \\chdir($directory);\n if ($safeResult === false) {\n throw DirException::createFromPhpError();\n }\n}", "function tempdir($dir=false,$prefix='php') {\n $tempfile=tempnam('','');\n if (file_exists($tempfile)) { unlink($tempfile); }\n mkdir($tempfile);\n if (is_dir($tempfile)) { return $tempfile . '/'; }\n}", "function setName( $newName )\r\n\t{\r\n\t\t$basePath = dirname( $this->path );\r\n\t\tif(rename( $this->path, $basePath.'/'.$newName ))\r\n\t\t{\r\n\t\t\t$this->path = $basePath.'/'.$newName;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttrigger_error(\"Não foi possível renomear a pasta \" . $this->path);\r\n\t\t}\r\n\t}", "public function rename($source, $destination);" ]
[ "0.8073711", "0.69530237", "0.6793304", "0.67131215", "0.66003954", "0.63539195", "0.6330553", "0.62984866", "0.6267685", "0.6255804", "0.6138651", "0.61358964", "0.61334026", "0.609102", "0.6087658", "0.597927", "0.59581673", "0.5946811", "0.59413356", "0.59262115", "0.59253424", "0.5842497", "0.5831824", "0.58051944", "0.57979715", "0.5795752", "0.57305807", "0.5704202", "0.570261", "0.56702673", "0.5640221", "0.5636418", "0.5635786", "0.562599", "0.5622357", "0.5621054", "0.5605761", "0.55978984", "0.558438", "0.5574252", "0.554932", "0.5540337", "0.5540337", "0.55373454", "0.55096155", "0.5509557", "0.5507776", "0.55003726", "0.54957914", "0.5486431", "0.54795915", "0.5471601", "0.5462886", "0.5434698", "0.54305977", "0.5428296", "0.5417201", "0.54141814", "0.5337627", "0.5334376", "0.5308587", "0.53050464", "0.52722883", "0.52562636", "0.5236864", "0.5235377", "0.52352077", "0.5232183", "0.5222511", "0.52156633", "0.5214544", "0.5212495", "0.51995873", "0.5192058", "0.5171613", "0.51698554", "0.5169113", "0.5164821", "0.5154672", "0.51502764", "0.5142243", "0.5126412", "0.5081973", "0.50521326", "0.5044448", "0.50383914", "0.5033482", "0.5028941", "0.5027866", "0.5019489", "0.50144625", "0.5012466", "0.50084186", "0.50048065", "0.49995542", "0.49975473", "0.49964425", "0.4995419", "0.4986369", "0.4985804" ]
0.78430563
1
Test for Directory::move() Create the Directory test_dir in [ROOT] and moves it to [SYSTEM] At the end of the test, remove the moved directory.
public function test_move() { $object = Directory::create(ROOT.DS.'test_dir'); $object->move(SYSTEM); $this->assertTrue(is_dir(SYSTEM.DS.'test_dir')); $this->assertFalse(is_dir(ROOT.DS.'test_dir')); $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "function moveDIR($dir,$dest=\"\",$debug,$nMode=0755) {\n //$debug = 1;\n $result=true;\n\n //if($debug) { echo \"<h2>Moving directory</h2><p> From:<br> $dir <br>To: $dest</p>\";}\n\n $path = dirname(__FILE__);\n $files = scandir($dir);\n\n foreach($files as $file) {\n if (substr( $file ,0,1) != \".\") {\n $pathFile = $dir.'/'.$file;\n if (is_dir($pathFile)) {\n //if($debug) { echo \"<p><b>Directory:</b> $pathFile</p>\"; }\n\n $newDir = $dest.\"/\".$file;\n\n if (!moveDIR($pathFile,$newDir,$debug)) {\n $result = false;\n }\n\n } else {\n //echo ($debug) ? \"<p>$pathFile is a file</p>\" : \"\";\n\n // $currentFile = realpath($file); // current location\n $currentFile = $pathFile;\n\n $newFile = $dest.\"/\".$file;\n\n if (!file_exists($dest)) {\n makeDIR($dest,0,$nMode);\n }\n // if file already exists remove it\n if (file_exists($newFile)) {\n //if($debug) { echo \"<p>File $newFile already exists - Deleting</p>\"; }\n unlink($newFile);\n } else {\n //if($debug) { echo \"<p>File $newFile doesn't exist yet</p>\"; }\n }\n\n // Move via rename\n // rename(oldname, newname)\n if (rename($currentFile , $newFile)) {\n (CHMOD == 1) ? chmod($newFile, 0755) : '';\n //if($debug) { echo \"<p>Moved $currentFile to $newFile</p>\"; }\n } else {\n //if($debug) { echo \"<p>Failed to move $currentFile to $newFile</p>\"; }\n $result = false;\n } // END rename \n\n } // END if dir or file\n } // end if no dot\n } // END foreach\n return $result;\n }", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "public function testMoveMovesStorages()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n Storage::move(self::$temp.DS.'foo.txt', self::$temp.DS.'bar.txt');\n\n $this->assertTrue(is_file(self::$temp.DS.'bar.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'foo.txt'));\n }", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "function moveFolder($user_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}", "public function moveDirectory( $source, $destination )\n {\n $path = explode( DS, $source );\n\n $destination = $destination . DS . $path[ count( $path ) - 1 ];\n\n $result = $this->copyDirectory( $source, $destination, TRUE );\n\n if ( TRUE === $result )\n {\n $result = $this->deleteDirectory( $source );\n }\n\n return $result;\n }", "public function testMoveFileFromTmp(): void\n {\n $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';\n\n $this->assertFalse($this->mediaDirectory->isExist($expectedFilePath));\n\n $this->imageUploader->moveFileFromTmp('magento_small_image.jpg');\n\n $this->assertTrue($this->mediaDirectory->isExist($expectedFilePath));\n }", "protected static function moveTemporaryDirs()\n {\n if (static::isCapsular()) {\n // Rename directories\n $original = static::getCacheDirs(false);\n foreach (static::getCacheDirs(true) as $i => $tmpDir) {\n \\Includes\\Utils\\FileManager::unlinkRecursive($tmpDir);\n $originalDir = $original[$i];\n rename($originalDir, $tmpDir);\n }\n\n // Rename files\n $original = static::getDecoratorDataFiles(false);\n foreach (static::getDecoratorDataFiles(true) as $i => $tmpPath) {\n $destPath = $original[$i];\n if (file_exists($tmpPath)) {\n rename($tmpPath, $destPath);\n }\n }\n }\n }", "protected function createRealTestdir() {}", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }", "protected function _move($source, $targetDir, $name) {\r\n\t\treturn false;\r\n\t}", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }", "public function testOnMovedDocument() {\n\n $obj = new FileSystemStorageProvider($this->logger, getcwd());\n\n $this->dir3->setParentBackedUp($this->dir3->getParent());\n $this->dir2->removeChildren($this->dir3);\n $this->dir1->addChildren($this->dir3);\n\n $obj->onMovedDocument($this->dir3);\n $this->assertFileExists($this->directory . \"/1/3\");\n }", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function testMoveSuccess_zipSubfolder()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testMoveSuccess_ZipNoSubfolder()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function moveDirectory(string $oldDirName, string $newDirName): MoveDirectory\n {\n return $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n }", "public function testDeleteDirectory()\n {\n $this->createTestDirectories(\n array(\n '/artifacts/foo/12345',\n '/artifacts/foo/67890',\n )\n );\n\n $this->createTestFile( '/artifacts/foo/12345/bar.txt' );\n $this->createTestFile( '/artifacts/foo/67890/bar.txt' );\n $this->createTestFile( '/artifacts/foo/bar.txt' );\n $this->createTestFile( '/artifacts/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/artifacts' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/artifacts' );\n }", "public function testChDir() {\n $currentDir = getcwd();\n $parentDir = dirname($currentDir);\n\n $handle = new Directory($parentDir);\n $handle->chdir();\n\n $this->assertEquals($parentDir, getcwd());\n chdir($currentDir);\n }", "public function test_mkdir_and_rmdir() {\n /**\n * Test creating a single directory\n */\n $dir = 'dir1';\n $uri = 'test://'.$dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri);\n $this->assertFileExists($path);\n rmdir($uri);\n $this->assertFileNotExists($path);\n\n /**\n * Test creating multiple directories recursively as needed\n */\n $dir = 'dir2/dir3/dir4';\n $uri = 'test://' . $dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri, 0777, true);\n\n $error_tripped = false;\n $this->assertFileExists($path);\n try {\n $return = rmdir('test://dir2');\n }\n catch (PHPUnit_Framework_Error $e) {\n $error_tripped = true;\n }\n\n $this->assertTrue($error_tripped, \"rmdir() on a non-empty directory should trigger an error.\");\n $this->assertTrue(wp_rmdir_recursive('test://dir2'));\n $this->assertFileNotExists($this->test_dir.'/dir2');\n }", "public function move (MetaFolder $destination): MetaFolder\n {\n if ($destination->l >= $this->l && $destination->r <= $this->r) {\n throw new MetaFolderException('Metafolder cannot be moved into itself or a contained subfolder.');\n }\n if (!$this->level) {\n throw new MetaFolderException('Root metafolder cannot be moved.');\n }\n\n $newRelPath = $destination->getRelativePath() . array_slice (explode('/', trim($this->getRelativePath(), '/')), -1)[0] . '/';\n\n try {\n $existingFolder = self::getInstance($newRelPath);\n }\n catch (MetaFolderException $e) {\n }\n if (isset($existingFolder)) {\n throw new MetaFolderException('Cannot move folder. Folder with same path already exists.');\n }\n\n // metafile updates\n\n $db = Application::getInstance()->getVxPDO();\n\n // handle nesting, kudos to https://rogerkeays.com/how-to-move-a-node-in-nested-sets-with-sql\n\n $subtreeWidth = $this->r - $this->l + 1;\n $newPos = $destination->l + 1;\n $subtreeDist = $newPos - $this->l;\n $tmpPos = $this->l;\n $levelDiff = $destination->level - $this->level + 1;\n\n // observe backward movement\n\n if($subtreeDist < 0) {\n $subtreeDist -= $subtreeWidth;\n $tmpPos += $subtreeWidth;\n }\n\n $db->beginTransaction();\n\n // create space for subtree at new position\n\n $db->execute('UPDATE folders SET l = l + ? WHERE l >= ?', [$subtreeWidth, $newPos]);\n $db->execute('UPDATE folders SET r = r + ? WHERE r >= ?', [$subtreeWidth, $newPos]);\n\n // move subtree into new space\n\n $db->execute('UPDATE folders SET l = l + ?, r = r + ?, level = level + (?) WHERE l >= ? AND r < ?', [$subtreeDist, $subtreeDist, $levelDiff, $tmpPos, $tmpPos + $subtreeWidth]);\n\n // remove space previously occupied by subtree\n\n $db->execute('UPDATE folders SET l = l - ? WHERE l > ?', [$subtreeWidth, $this->r]);\n $db->execute('UPDATE folders SET r = r - ? WHERE r > ?', [$subtreeWidth, $this->r]);\n\n // update path\n\n $db->execute('UPDATE folders SET path = REGEXP_REPLACE(path, ?, ?) WHERE path LIKE ?', ['^' . $this->getRelativePath(), $newRelPath, $this->getRelativePath() . '%']);\n $db->commit();\n\n self::refreshNestings();\n\n // move filesystem folder\n\n $this->filesystemFolder->move($destination->getFilesystemFolder());\n\n // unset cached instances\n\n unset(self::$instancesById[$this->id], self::$instancesByPath[$this->filesystemFolder->getPath()]);\n return self::getInstance(null, $this->id);\n }", "public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }", "public function testOnDeletedDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $this->dir3->setParent($this->dir1); // This directory was moved.\n\n $obj->onDeletedDirectory($this->dir3);\n $this->assertFileNotExists($this->directory . \"/1/3\");\n\n $obj->onDeletedDirectory($this->dir2);\n $this->assertFileNotExists($this->directory . \"/1/2\");\n\n $obj->onDeletedDirectory($this->dir1);\n $this->assertFileNotExists($this->directory . \"/1\");\n }", "public function testMove()\n {\n $this->rlpMapper->save($this->content1, '/products/news/content1-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n // move\n $this->rlpMapper->move('/products/news/content1-news', '/products/asdf/content2-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->session->getNode('/cmf/default/routes/de/products/news/content1-news');\n $newNode = $this->session->getNode('/cmf/default/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals($this->content1, $newNode->getPropertyValue('sulu:content'));\n\n // get content from new path\n $result = $this->rlpMapper->loadByResourceLocator('/products/asdf/content2-news', 'default', 'de');\n $this->assertEquals($this->content1->getIdentifier(), $result);\n\n // get content from history should throw an exception\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorMovedException');\n $result = $this->rlpMapper->loadByResourceLocator('/products/news/content1-news', 'default', 'de');\n }", "public function testMove(): void\n {\n $this->document1->setResourceSegment('/products/news/content1-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n // move\n $this->document1->setResourceSegment('/products/asdf/content2-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/news/content1-news');\n $newNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals(\n $this->documentInspector->getNode($this->document1),\n $newNode->getPropertyValue('sulu:content')\n );\n\n // get content from new path\n $result = $this->phpcrMapper->loadByResourceLocator('/products/asdf/content2-news', 'sulu_io', 'de');\n $this->assertEquals($this->document1->getUuid(), $result);\n\n // get content from history should throw an exception\n $this->expectException(ResourceLocatorMovedException::class);\n $this->phpcrMapper->loadByResourceLocator('/products/news/content1-news', 'sulu_io', 'de');\n }", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "protected function tearDown()\n {\n $test_dirs = array(\n ROOT.DS.'test_dir',\n ROOT.DS.'test_new_dir',\n SYSTEM.DS.'test_dir',\n );\n foreach($test_dirs as $f){\n is_dir($f) and rmdir($f);\n }\n }", "public function testDirnameReturnsDirectory()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame(self::$temp, Storage::dirname(self::$temp.DS.'foo.txt'));\n }", "public function testCopy() {\n $sourceDirName = self::TEST_DIR . '/testCopyDirectorySource';\n $targetDirName = self::TEST_DIR . '/testCopyDirectoryTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->copy(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryExists($sourceDirName);\n }", "public function move(string $source, string $destination)\n {\n $this->filesystem->move(\n $this->relativeToRoot($source),\n $this->relativeToRoot($destination)\n );\n }", "public function testMoveNotExist()\n {\n $this->rlpMapper->save($this->content1, '/news/news-1', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorNotFoundException');\n $this->rlpMapper->move('/news', '/neuigkeiten', 'default', 'de');\n }", "function move_dir_to_tmp($src, $id)\n{\n $CI =& get_instance();\n $tmpPath = $CI->config->item('site_data_dir') . '/tmp/' . time() . '/';\n if (!is_dir($tmpPath))\n {\n mkdir($tmpPath, 0775, TRUE);\n }\n $tmpPath .= '/' . $id . '/';\n rename($src, $tmpPath);\n return $tmpPath;\n}", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "function moveFinalDirectories($aBooksDone, $aDirectories)\r\n{\r\n\t$readydir = $aDirectories['ready'];\r\n\t$sipdir = $aDirectories['sip'];\r\n\t$result = 0;\r\n\r\n\tforeach ($aBooksDone as $itemnumber) {\r\n\t\t$sourcedir = $readydir . '\\\\' . $itemnumber;\r\n\t\t$destinationdir = $sipdir . '\\\\' . $itemnumber;\r\n\r\n\t\tif (!(@opendir($destinationdir))) {\r\n\t\t\t$mk = mkdir($destinationdir);\r\n\t\t\t//if ($mk === FALSE) {\r\n\t\t\t//\t$result = 0;\r\n\t\t\t//\treturn $result;\r\n\t\t\t//}\r\n\t\t}\r\n\r\n\t\t$dh = opendir($sourcedir);\r\n if ($dh) {\r\n while (($file = @readdir($dh)) !== false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $source = $sourcedir . \"\\\\\" . $file;\r\n $destination = $destinationdir . \"\\\\\" . $file;\r\n //echo 'ik zou ' . $source . ' verplaatsen naar ' . $destination . '<br>';\r\n $result = @rename($source, $destination);\r\n }\r\n }\r\n \t\t}\r\n\r\n\t\t$result = rmdir($sourcedir);\r\n\t}\r\n\r\n\treturn $result;\r\n}", "function move($source, $destination);", "public function moveToTmpDir()\n\t{\n\t\tif($this->source instanceof UploadedFile) {\n\t\t\t$this->source->move($this->getTmpDir()->getRootPath());\n\t\t} else if(is_string($this->source)) {\n\t\t\tcopy($this->params['path'], $this->getTmpDir()->getRootPath() . '/' . $this->params['name']);\n\t\t}\n\t}", "function make_move_build($build_path) {\n $tmp_path = make_tmp();\n $ret = TRUE;\n if ($build_path == '.') {\n $info = drush_scan_directory($tmp_path . DIRECTORY_SEPARATOR . '__build__', '/./', array('.', '..'), 0, FALSE, 'filename', 0, TRUE);\n foreach ($info as $file) {\n $destination = $build_path . DIRECTORY_SEPARATOR . $file->basename;\n if (file_exists($destination)) {\n // To prevent the removal of top-level directories such as 'modules' or\n // 'themes', descend in a level if the file exists.\n // TODO: This only protects one level of directories from being removed.\n $files = drush_scan_directory($file->filename, '/./', array('.', '..'), 0, FALSE);\n foreach ($files as $file) {\n $ret = $ret && drush_copy_dir($file->filename, $destination . DIRECTORY_SEPARATOR . $file->basename, FILE_EXISTS_MERGE);\n }\n }\n else {\n $ret = $ret && drush_copy_dir($file->filename, $destination);\n }\n }\n }\n else {\n drush_mkdir(dirname($build_path));\n $ret = drush_move_dir($tmp_path . DIRECTORY_SEPARATOR . '__build__', $tmp_path . DIRECTORY_SEPARATOR . basename($build_path), TRUE);\n $ret = $ret && drush_copy_dir($tmp_path . DIRECTORY_SEPARATOR . basename($build_path), $build_path);\n }\n\n // Copying to final destination resets write permissions. Re-apply.\n if (drush_get_option('prepare-install')) {\n $default = $build_path . '/sites/default';\n chmod($default . '/settings.php', 0666);\n chmod($default . '/files', 0777);\n }\n\n if (!$ret) {\n drush_set_error('MAKE_CANNOT_MOVE_BUILD', dt(\"Cannot move build into place.\"));\n }\n return $ret;\n}", "public function testDeleteDirectoryWithLinksAndSymlinks()\n {\n if ( !function_exists( 'link' ) || !function_exists( 'symlink' ) )\n {\n $this->markTestSkipped( 'Missing \"link\" or \"symlink\" function.' );\n return;\n }\n\n $this->createTestDirectories( array( '/logs/foo/12345' ) );\n $this->createTestFile( '/logs/foo/12345/bar.txt' );\n\n $file = PHPUC_TEST_DIR . '/logs/foo/12345/bar.txt';\n\n link( $file, PHPUC_TEST_DIR . '/logs/bar.txt' );\n symlink( $file, PHPUC_TEST_DIR . '/logs/foo/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/logs' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/logs' );\n }", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "function moveTestSuite(&$smartyObj,$template_dir,&$tprojectMgr,$argsObj)\r\n{\r\n $exclude_node_types=array('testplan' => 1, 'requirement' => 1, 'requirement_spec' => 1);\r\n\r\n $tprojectMgr->tree_manager->change_parent($argsObj->objectID,$argsObj->containerID);\r\n $tprojectMgr->tree_manager->change_child_order($argsObj->containerID,$argsObj->objectID,\r\n $argsObj->target_position,$exclude_node_types);\r\n\r\n $guiObj = new stdClass();\r\n $guiObj->id = $argsObj->tprojectID;\r\n $guiObj->refreshTree = $argsObj->refreshTree;\r\n\r\n $tprojectMgr->show($smartyObj,$guiObj,$template_dir,$argsObj->tprojectID,null,'ok');\r\n}", "public function testMoveFail_PluginExists()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n // check we got the correct result first time around\n $this->assertEquals(false, $result);\n\n $result = $service->upload($file);\n // check we got the correct result second time around\n $this->assertEquals('A plugin with the same name (TestPlugin) is already uploaded.', $result);\n }", "public function moveDirectory($oldDirName, $newDirName)\n\t{\n\t\treturn $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n\t}", "public function testMoveFileFromTmpWithMediaStorageDatabase(): void\n {\n $fileName = 'magento_small_image.jpg';\n $storage = $this->objectManager->get(Storage::class);\n $databaseStorage = $this->objectManager->get(Storage\\Database::class);\n $directory = $this->objectManager->get(DatabaseFactory::class)->create();\n // Synchronize media.\n $storage->synchronize(\n [\n 'type' => 1,\n 'connection' => 'default_setup'\n ]\n );\n // Upload file.\n $fixtureDir = realpath(__DIR__ . '/../_files');\n $filePath = $this->tmpDirectory->getAbsolutePath($fileName);\n copy($fixtureDir . DIRECTORY_SEPARATOR . $fileName, $filePath);\n $_FILES['image'] = [\n 'name' => $fileName,\n 'type' => 'image/jpeg',\n 'tmp_name' => $filePath,\n 'error' => 0,\n 'size' => 12500,\n ];\n $result = $this->imageUploader->saveFileToTmpDir('image');\n // Move file from tmp dir.\n $moveResult = $this->imageUploader->moveFileFromTmp($result['name'], true);\n // Verify file moved to new dir.\n $databaseStorage->loadByFilename($moveResult);\n $directory->loadByPath('catalog/category');\n $this->assertEquals('catalog/category', $databaseStorage->getDirectory());\n $this->assertEquals($directory->getId(), $databaseStorage->getDirectoryId());\n }", "public function tearDown() {\n\t\tif(is_dir('/tmp/clara')) {\n\t\t\t$this->rrmdir('/tmp/clara');\n\t\t}\n\t}", "function moveFiles($src, $dest)\n{\n if (!is_dir($src)) {\n return false;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n rename($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else {\n if (!$f->isDot() && $f->isDir()) {\n rmDirRecursive($f->getRealPath(), \"$dest/$f\");\n unlink($f->getRealPath());\n }\n }\n }\n unlink($src);\n}", "public function testCopyDirectoryReturnsFalseIfSourceIsntDirectory()\n {\n $origin = self::$temp.DS.'breeze'.DS.'boom'.DS.'foo'.DS.'bar'.DS.'baz';\n $this->assertFalse(Storage::cpdir($origin, self::$temp));\n }", "public function move(string $from, string $to) : bool\n {\n $absoluteFrom = $this->absolutePath($from);\n $absoluteTo = $this->absolutePath($to);\n\n if ($absoluteFrom == $absoluteTo)\n return true;\n\n $parts = explode('/', $absoluteTo);\n $folderTo = implode('/', array_splice($parts, 0, count($parts) - 1));\n\n $old = umask(0);\n $this->fileSystem()->makeDirectory($folderTo, 0777, true, true);\n umask($old);\n\n return $this->fileSystem()->move($absoluteFrom, $absoluteTo);\n }", "protected function tearDown()\n {\n if (file_exists(\"{$this->dir}/file1.mock\")) unlink(\"{$this->dir}/file1.mock\");\n if (file_exists(\"{$this->dir}/file2.mock\")) unlink(\"{$this->dir}/file2.mock\");\n if (file_exists(\"{$this->dir}/dir1/file3.mock\")) unlink(\"{$this->dir}/dir1/file3.mock\");\n if (file_exists(\"{$this->dir}/dir1/file4.mock\")) unlink(\"{$this->dir}/dir1/file4.mock\");\n if (file_exists(\"{$this->dir}/dir1\")) rmdir(\"{$this->dir}/dir1\");\n\n if (file_exists(sys_get_temp_dir().'/def/xyz.mock')) unlink(sys_get_temp_dir().'/def/xyz.mock'); \n if (file_exists(sys_get_temp_dir().'/def')) rmdir(sys_get_temp_dir().'/def'); \n\n if (file_exists($this->dir.\"/abc.mock\")) unlink($this->dir.\"/abc.mock\");\n if (file_exists($this->dir.\"/def.mock\")) unlink($this->dir.\"/def.mock\");\n\n if (file_exists(sys_get_temp_dir().'/abc/def/xy/abc.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/abc.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy/dd.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/dd.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy')) rmdir(sys_get_temp_dir().'/abc/def/xy'); \n if (file_exists(sys_get_temp_dir().'/abc/def')) rmdir(sys_get_temp_dir().'/abc/def'); \n if (file_exists(sys_get_temp_dir().'/abc')) rmdir(sys_get_temp_dir().'/abc'); \n \n if (file_exists(\"{$this->dir}/dir2\")) rmdir(\"{$this->dir}/dir2\");\n if (file_exists($this->dir)) rmdir($this->dir);\n \n Config_Mock_Unserialize:$created = array();\n unset(Q\\Transform::$drivers['from-mock']);\n }", "public function ftp_moveAll($src_dir, $dst_dir) {\n if (!(@$this->rmdir($directory) || @$this->delete($directory))) {\n # if the attempt to delete fails, get the file listing\n $filelist = @$this->listFiles($directory);\n\n # loop through the file list and recursively delete the FILE in the list\n foreach ($filelist as $file) {\n $this->recursiveDelete($file);\n }\n\n #if the file list is empty, delete the DIRECTORY we passed\n $this->recursiveDelete($directory);\n }\n }", "public function move($target_directory, $target_name = '', $replace = true, $target_filesystem_type = '')\n {\n if ($target_filesystem_type == '') {\n $target_filesystem_type = $this->getFilesystemType();\n }\n\n $this->moveOrCopy($target_directory, $target_name,\n $replace, $target_filesystem_type, 'move');\n\n return;\n }", "function __moveUploadedFile($source, $destination) {\r\n\t\tif (!Configure::read('Documents.isTesting')) {\r\n\t\t\treturn move_uploaded_file($source, $destination);\r\n\t\t} else {\r\n\t\t\treturn rename($source, $destination);\r\n\t\t}\r\n\r\n\t}", "public function move($sourcePath, $destinationPath) {\n\n\t\t$sourceNode = $this->getNodeForPath($sourcePath);\n\t\tif ($sourceNode instanceof \\Sabre_DAV_ICollection and $this->nodeExists($destinationPath)) {\n\t\t\tthrow new \\Sabre_DAV_Exception_Forbidden('Could not copy directory ' . $sourceNode . ', target exists');\n\t\t}\n\t\tlist($sourceDir,) = \\Sabre_DAV_URLUtil::splitPath($sourcePath);\n\t\tlist($destinationDir,) = \\Sabre_DAV_URLUtil::splitPath($destinationPath);\n\n\t\tFilesystem::rename($sourcePath, $destinationPath);\n\n\t\t$this->markDirty($sourceDir);\n\t\t$this->markDirty($destinationDir);\n\n\t}", "protected function _moveToImageDir()\n\t{\n\t\t$path = $this->getFilePath();\n\t\t$this->_uploadedFile->moveTo($path);\n\t\tchmod($path, 0644);\n\t}", "public function test_factory_not_exist()\n {\n Directory::factory(ROOT.DS.'test_dir');\n }", "public function move($source, $dest);", "public function move($destination)\r\n {\r\n if (!is_dir($destination)) {\r\n $this->createDirectory($destination);\r\n }\r\n\r\n if (!rename($this->filename, $destination . '/' . $this->getFilename())) {\r\n throw new \\DomainException(\r\n 'File (`' . $this->filename . '`) could not be moved to the destination directory (`' . $destination . '`).'\r\n );\r\n }\r\n\r\n $this->filename = $destination . $this->getFilename();\r\n }", "private function _moveImagesToNewFileSystem()\n\t{\n\t\tif (!Image::testFileSystem())\n\t\t\t$this->_errors[] = Tools::displayError('Error: your server configuration is not compatible with the new image system. No images were moved');\n\t\telse\n\t\t{\n\t\t\tini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value\n\t\t\t$this->max_execution_time = (int)ini_get('max_execution_time');\t\n\t\t\t$result = Image::moveToNewFileSystem($this->max_execution_time);\n\t\t\tif ($result === 'timeout')\n\t\t\t\t$this->_errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on \\\"Move images\\\" again to resume moving images');\n\t\t\telseif ($result === false)\n\t\t\t\t$this->_errors[] = Tools::displayError('Error: some or all images could not be moved.');\n\t\t}\n\t\treturn (sizeof($this->_errors) > 0 ? false : true);\n\t}", "public function move(sfAssetFolder $new_parent)\n {\n // controls\n if($this->getNode()->isRoot())\n {\n throw new sfAssetException('The root folder cannot be moved');\n }\n else if($new_parent->hasSubFolder($this->getName()))\n {\n throw new sfAssetException('The target folder \"%folder%\" already contains a folder named \"%name%\". The folder has not been moved.', array('%folder%' => $new_parent, '%name%' => $this->getName()));\n }\n else if($new_parent->getNode()->isDescendantOf($this))\n {\n throw new sfAssetException('The target folder cannot be a subfolder of moved folder. The folder has not been moved.');\n }\n else if ($this->getId() == $new_parent->getId())\n {\n return;\n }\n \n $old_path = $this->getFullPath();\n \n $this->getNode()->moveAsLastChildOf($new_parent);\n $this->save();\n \n $descendants = $this->getNode()->getChildren();\n $descendants = $descendants ? $descendants : array();\n \n // move its assets\n self::movePhysically($old_path, $this->getFullPath());\n \n foreach ($descendants as $descendant)\n {\n // Update relative path\n $descendant->save();\n }\n \n // else: nothing to do\n }", "function move_uploaded_file_to_temp_directory($file, $destination_sufix_name) {\n do {\n $temp_destination = WORK_PATH.'/'.make_string(10).'_'.$destination_sufix_name;\n } while (is_file($temp_destination));\n \n if (move_uploaded_file($file, $temp_destination)) {\n return $temp_destination;\n } // if\n\n return false;\n }", "public function testGoBack() {\n $currentDir = getcwd();\n $parentDir = dirname($currentDir);\n\n $handle = new Directory($parentDir);\n $handle->chdir()->goBack();\n\n $this->assertEquals($currentDir, getcwd());\n chdir($currentDir);\n }", "public function move($path){\n\t\t$oldPath = $this->path;\n\t\t$path_array = explode(self::DS, $this->path);\n\t\t$fileName = $path_array[sizeof($path_array) - 1];\n\t\t$newPath = $path . self::DS . $fileName;\n\t\t$this->path = $newPath;\n\t\t$this->createFile($newPath);\n\t\tunlink($oldPath);\n\t}", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "function _moveFile($sourceDir, $destDir, $filename) {\n\t\t$currentFilePath = $sourceDir . DIRECTORY_SEPARATOR . $filename;\n\t\t$destinationPath = $destDir . DIRECTORY_SEPARATOR . $filename;\n\n\t\tif (!rename($currentFilePath, $destinationPath)) {\n\t\t\t$message = __('admin.fileLoader.moveFileFailed', array('filename' => $filename,\n\t\t\t\t'currentFilePath' => $currentFilePath, 'destinationPath' => $destinationPath));\n\t\t\t$this->addExecutionLogEntry($message, SCHEDULED_TASK_MESSAGE_TYPE_ERROR);\n\n\t\t\t// Script should always stop if it can't manipulate files inside\n\t\t\t// its own directory system.\n\t\t\tfatalError($message);\n\t\t}\n\n\t\treturn $destinationPath;\n\t}", "public function testOnNewDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onNewDirectory($this->dir1);\n $this->assertFileExists($this->directory . \"/1\");\n\n $obj->onNewDirectory($this->dir2);\n $this->assertFileExists($this->directory . \"/1/2\");\n\n $obj->onNewDirectory($this->dir3);\n $this->assertFileExists($this->directory . \"/1/2/3\");\n }", "public function dir_rewinddir() {}", "public function moveOrCopy\n (\n $target_directory,\n $target_name = '',\n $replace = false,\n $target_filesystem_type,\n $move_or_copy = 'copy'\n ) {\n\n /** Defaults */\n if ($target_directory == '') {\n $target_directory = $this->parent;\n }\n\n if ($target_name == '' && $this->is_file) {\n if ($target_directory == $this->parent) {\n throw new FilesystemException\n ('Ftp Filesystem ' . $move_or_copy\n . ': Must specify new file name when using the same target path: '\n . $this->path);\n }\n $target_name = $this->name;\n }\n\n if ($this->is_file === true) {\n $base_folder = $this->parent;\n } else {\n $base_folder = $this->path;\n }\n\n /** Edits */\n if (file_exists($this->path)) {\n } else {\n throw new FilesystemException\n ('Ftp Filesystem moveOrCopy: failed. This path does not exist: '\n . $this->path . ' Specified as source for ' . $move_or_copy\n . ' operation to ' . $target_directory);\n }\n\n if (file_exists($target_directory)) {\n } else {\n throw new FilesystemException\n ('Ftp Filesystem moveOrCopy: failed. This path does not exist: '\n . $this->path . ' Specified as destination for ' . $move_or_copy\n . ' to ' . $target_directory);\n }\n\n if (is_writeable($target_directory) === false) {\n throw new FilesystemException\n ('Ftp Filesystem Delete: No write access to file/path: ' . $target_directory);\n }\n\n if ($move_or_copy == 'move') {\n if (is_writeable($this->path) === false) {\n throw new FilesystemException\n ('Ftp Filesystem Delete: No write access for moving source file/path: '\n . $move_or_copy);\n }\n }\n\n if ($this->is_file === true || $target_name == '') {\n\n } else {\n if (is_dir($target_directory . '/' . $target_name)) {\n\n } else {\n\n new fsAdapter('write', $target_directory, $target_filesystem_type,\n $this->options = array('file' => $target_name)\n );\n }\n $target_directory = $target_directory . '/' . $target_name;\n $target_name = '';\n }\n\n /** Create new target directories from source directories list */\n if (count($this->directories) > 0) {\n\n asort($this->directories);\n\n $parent = '';\n $new_node = '';\n $new_path = '';\n\n foreach ($this->directories as $directory) {\n\n $new_path = $this->build_new_path($directory, $target_directory, $base_folder);\n\n if (is_dir($new_path)) {\n\n } else {\n\n $parent = dirname($new_path);\n $new_node = basename($new_path);\n\n new fsAdapter('write', $parent, $target_filesystem_type,\n $this->options = array('file' => $new_node)\n );\n }\n\n $parent = '';\n $new_node = '';\n $new_path = '';\n }\n }\n\n /** Copy files now that directories are in place */\n if (count($this->files) > 0) {\n\n $path_name = '';\n $file_name = '';\n\n foreach ($this->files as $file) {\n\n $new_path = $this->build_new_path($file, $target_directory, $base_folder);\n\n /** Single file copy or move */\n if ($this->is_file === true) {\n $file_name = $target_name;\n } else {\n $file_name = basename($file);\n }\n\n /** Source */\n $adapter = new fsAdapter('Read', $file);\n $data = $adapter->fs->data;\n\n /** Write Target */\n new fsAdapter('Write', $new_path, $target_filesystem_type,\n $this->options = array(\n 'file' => $file_name,\n 'replace' => $replace,\n 'data' => $data,\n )\n );\n\n $path_name = '';\n $file_name = '';\n }\n }\n\n /** For move, remove the files and folders just copied */\n if ($move_or_copy == 'move') {\n $this->_deleteDiscoveryFilesArray();\n $this->_deleteDiscoveryDirectoriesArray();\n }\n\n return true;\n }", "public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }", "public function move($source, $target)\n {\n \n }", "protected function _before() {\n\t\tparent::_before ();\n\t\t$this->uFileSystem = new UFileSystem ();\n\t\t$this->testDir = $this->uFileSystem->cleanFilePathname ( \\ROOT . \\DS . \"tests-files/\" );\n\t\t$this->uFileSystem->xcopy ( $this->uFileSystem->cleanFilePathname ( \\ROOT . \\DS . \"files-tests/\" ), $this->testDir );\n\t}", "protected function removeTestFilePath()\n {\n $path = $this->getTestFilePath();\n FileHelper::removeDirectory($path);\n }", "public static function move($_path, $_target)\r\n {\r\n return rename($_path, $_target);\r\n }", "public function move($sourceDir,$sourceFile,$targetDir,$targetFile){\n\t\tif(!$this->connected){\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->apiCall('move',array('sourcedir'=>$sourceDir,'source'=>$sourceFile,'targetdir'=>$targetDir,'target'=>$targetFile),true);\n\t}", "public function testPrepareDirOriginal()\n {\n $imgPath = $this->imageService->imgPath(\n \\Media\\Service\\Image::ORIGINAL,\n $this->imageId,\n $this->imageEntityData['extension']\n );\n $this->assertTrue($this->imageService->prepareDir($imgPath));\n }", "public function testDeleteFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new DeleteFolderRequest();\n $request->setPath( \"OutResult/Create\");\n $request->setStorageName( \"\");\n $request->setRecursive( 'true');\n $this->instance->deleteFolder($request);\n }", "protected function onMove(){\n\t\tif (empty($this->post['directory']) || empty($this->post['file'])) return;\n\t\t\n\t\t$rename = empty($this->post['newDirectory']) && !empty($this->post['name']);\n\t\t$dir = $this->getDir($this->post['directory']);\n\t\t$file = realpath($dir . '/' . $this->post['file']);\n\t\t\n\t\t$is_dir = is_dir($file);\n\t\tif (!$this->checkFile($file) || (!$rename && $is_dir))\n\t\t\treturn;\n\t\t\n\t\tif ($rename || $is_dir){\n\t\t\tif (empty($this->post['name'])) return;\n\t\t\t$newname = $this->getName($this->post['name'], $dir);\n\t\t\t$fn = 'rename';\n\t\t}else{\n\t\t\t$newname = $this->getName(pathinfo($file, PATHINFO_FILENAME), $this->getDir($this->post['newDirectory']));\n\t\t\t$fn = !empty($this->post['copy']) ? 'copy' : 'rename';\n\t\t}\n\t\t\n\t\tif (!$newname) return;\n\t\t\n\t\t$ext = pathinfo($file, PATHINFO_EXTENSION);\n\t\tif ($ext) $newname .= '.' . $ext;\n\t\t$fn($file, $newname);\n\t\t\n\t\techo json_encode(array(\n\t\t\t'name' => pathinfo($this->normalize($newname), PATHINFO_BASENAME),\n\t\t));\n\t}", "function ftp_put_dir($loc_dir, $rmt_dir, $isRecursive=TRUE, $useWhiteList=FALSE) {\n\t\t$loc_dir = rtrim($loc_dir, '/');\n\t\t$rmt_dir = rtrim($rmt_dir, '/');\n\t\t\n\t\t$this->prv_ftp_put_dir($loc_dir, $rmt_dir, $isRecursive, $useWhiteList);\n\t}", "public static function move($path, $toPath, $replace = TRUE) {\n \n }", "public function testTypeIdentifiesDirectory()\n {\n mkdir(self::$temp.DS.'foo-dir');\n\n $this->assertSame('dir', Storage::type(self::$temp.DS.'foo-dir'));\n }", "function tearDown() {\n\t\t$this->wfRecursiveRemoveDir( $this->tmpName );\n\t}", "public function test_create_exists()\n {\n Directory::create(ROOT.DS.'application');\n }", "function movefile($POSTfrom, $POSTto, $currentdir) {\n\tif(count($POSTto) == 1) { //if the user selected only one \"move to\" location\n\t\tforeach($POSTfrom as $fromItem => $n1) { //$fromItem returns selected file/folder name to be moved, $n is checkbox status\n\t\t\tforeach($POSTto as $toItem => $n2) {//$toItem returns selected folder to have the files put in\n\t\t\t\tif(!file_exists($currentdir . \"/\" . $toItem . \"/\" . $fromItem)) {\n\t\t\t\t\tif(rename($currentdir . \"/\" . $fromItem, $currentdir . \"/\" . $toItem . \"/\" . $fromItem)) { //if rename worked, do nothing. Else, echo an error. Since rename() can rename a folder, it is possible to rename a file/folder to its new directory and have linux move it accourdingly\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ($fromItem == $toItem) { //if user tries to move the same folder into its self\n\t\t\t\t\t\techo \"<p><b>Error</b>: Could not move file or folder <b>\" . $fromItem . \"</b>. You cannot move a file into its self. Everything before it was moved.</p>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<p><b>Error</b>: Could not move file or folder <b>\" . $fromItem . \"</b>. Everything before it was moved.</p>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo \"<p><b>Error</b>: File already exists in the folder you want to move it to. Everything before <b>\" . $fromItem . \"</b> has been moved.</p>\";\n\t\t\t\t\techo \"<p>Rename file if you want to move it.</p>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\techo \"<p><b>Error</b>: You selected more than one destination folder, or none at all. Or, you might have not selected anything to move.</p>\";\n\t\treturn false;\n\t}\n\t\n\treturn true; // If everything worked out, return true\n}", "public function remove_dir() {\n\n $path = $this->get_upload_pres_path();\n\n //append_debug_msg($path);\n\n if(!$path || !file_exists($path)){ return; }\n delete_dir($path);\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }" ]
[ "0.80949366", "0.7867393", "0.76190865", "0.7546802", "0.73030376", "0.7230169", "0.7162468", "0.6590736", "0.6350258", "0.6209349", "0.6183593", "0.6081983", "0.60330856", "0.5999443", "0.59931886", "0.5987112", "0.5961271", "0.59227955", "0.59041375", "0.5877521", "0.58459896", "0.58384687", "0.58262146", "0.5798939", "0.57848257", "0.5776328", "0.5723072", "0.5710129", "0.5704671", "0.5688802", "0.56250817", "0.56173205", "0.5613123", "0.5611958", "0.55716544", "0.5564868", "0.5542967", "0.5540844", "0.55406123", "0.5508295", "0.54881096", "0.5481234", "0.547544", "0.5452461", "0.5446057", "0.5422859", "0.5409587", "0.5407662", "0.5372875", "0.5350599", "0.53405005", "0.53332514", "0.53269327", "0.5325039", "0.5318805", "0.5308968", "0.5306821", "0.5299757", "0.52949876", "0.5269429", "0.5267709", "0.5262666", "0.5250621", "0.5227147", "0.52254", "0.5217053", "0.51947385", "0.51707006", "0.51673514", "0.51628804", "0.5159453", "0.5139611", "0.5139095", "0.51228327", "0.51184684", "0.51147395", "0.5111571", "0.5101115", "0.510105", "0.5078859", "0.50727654", "0.5069836", "0.50607467", "0.50598925", "0.50565666", "0.5052254", "0.50457454", "0.5037839", "0.5026886", "0.5018082", "0.5013133", "0.50055677", "0.50054705", "0.49945748", "0.49925277", "0.49851608", "0.49809313", "0.49780834", "0.49719653", "0.49719653" ]
0.84177864
0
Test for Directory::move() Attempts to move [ROOT]/test.txt to [ROOT] with overwriting disabled Throws \Kaili\DirectoryException because Directory alredy exists
public function test_move_directory_exists() { $object = Directory::create(ROOT.DS.'test_dir'); $object->move(ROOT, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "function moveDIR($dir,$dest=\"\",$debug,$nMode=0755) {\n //$debug = 1;\n $result=true;\n\n //if($debug) { echo \"<h2>Moving directory</h2><p> From:<br> $dir <br>To: $dest</p>\";}\n\n $path = dirname(__FILE__);\n $files = scandir($dir);\n\n foreach($files as $file) {\n if (substr( $file ,0,1) != \".\") {\n $pathFile = $dir.'/'.$file;\n if (is_dir($pathFile)) {\n //if($debug) { echo \"<p><b>Directory:</b> $pathFile</p>\"; }\n\n $newDir = $dest.\"/\".$file;\n\n if (!moveDIR($pathFile,$newDir,$debug)) {\n $result = false;\n }\n\n } else {\n //echo ($debug) ? \"<p>$pathFile is a file</p>\" : \"\";\n\n // $currentFile = realpath($file); // current location\n $currentFile = $pathFile;\n\n $newFile = $dest.\"/\".$file;\n\n if (!file_exists($dest)) {\n makeDIR($dest,0,$nMode);\n }\n // if file already exists remove it\n if (file_exists($newFile)) {\n //if($debug) { echo \"<p>File $newFile already exists - Deleting</p>\"; }\n unlink($newFile);\n } else {\n //if($debug) { echo \"<p>File $newFile doesn't exist yet</p>\"; }\n }\n\n // Move via rename\n // rename(oldname, newname)\n if (rename($currentFile , $newFile)) {\n (CHMOD == 1) ? chmod($newFile, 0755) : '';\n //if($debug) { echo \"<p>Moved $currentFile to $newFile</p>\"; }\n } else {\n //if($debug) { echo \"<p>Failed to move $currentFile to $newFile</p>\"; }\n $result = false;\n } // END rename \n\n } // END if dir or file\n } // end if no dot\n } // END foreach\n return $result;\n }", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "public function testMoveNotExist()\n {\n $this->rlpMapper->save($this->content1, '/news/news-1', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorNotFoundException');\n $this->rlpMapper->move('/news', '/neuigkeiten', 'default', 'de');\n }", "public function testOnMovedDocument() {\n\n $obj = new FileSystemStorageProvider($this->logger, getcwd());\n\n $this->dir3->setParentBackedUp($this->dir3->getParent());\n $this->dir2->removeChildren($this->dir3);\n $this->dir1->addChildren($this->dir3);\n\n $obj->onMovedDocument($this->dir3);\n $this->assertFileExists($this->directory . \"/1/3\");\n }", "public function move (MetaFolder $destination): MetaFolder\n {\n if ($destination->l >= $this->l && $destination->r <= $this->r) {\n throw new MetaFolderException('Metafolder cannot be moved into itself or a contained subfolder.');\n }\n if (!$this->level) {\n throw new MetaFolderException('Root metafolder cannot be moved.');\n }\n\n $newRelPath = $destination->getRelativePath() . array_slice (explode('/', trim($this->getRelativePath(), '/')), -1)[0] . '/';\n\n try {\n $existingFolder = self::getInstance($newRelPath);\n }\n catch (MetaFolderException $e) {\n }\n if (isset($existingFolder)) {\n throw new MetaFolderException('Cannot move folder. Folder with same path already exists.');\n }\n\n // metafile updates\n\n $db = Application::getInstance()->getVxPDO();\n\n // handle nesting, kudos to https://rogerkeays.com/how-to-move-a-node-in-nested-sets-with-sql\n\n $subtreeWidth = $this->r - $this->l + 1;\n $newPos = $destination->l + 1;\n $subtreeDist = $newPos - $this->l;\n $tmpPos = $this->l;\n $levelDiff = $destination->level - $this->level + 1;\n\n // observe backward movement\n\n if($subtreeDist < 0) {\n $subtreeDist -= $subtreeWidth;\n $tmpPos += $subtreeWidth;\n }\n\n $db->beginTransaction();\n\n // create space for subtree at new position\n\n $db->execute('UPDATE folders SET l = l + ? WHERE l >= ?', [$subtreeWidth, $newPos]);\n $db->execute('UPDATE folders SET r = r + ? WHERE r >= ?', [$subtreeWidth, $newPos]);\n\n // move subtree into new space\n\n $db->execute('UPDATE folders SET l = l + ?, r = r + ?, level = level + (?) WHERE l >= ? AND r < ?', [$subtreeDist, $subtreeDist, $levelDiff, $tmpPos, $tmpPos + $subtreeWidth]);\n\n // remove space previously occupied by subtree\n\n $db->execute('UPDATE folders SET l = l - ? WHERE l > ?', [$subtreeWidth, $this->r]);\n $db->execute('UPDATE folders SET r = r - ? WHERE r > ?', [$subtreeWidth, $this->r]);\n\n // update path\n\n $db->execute('UPDATE folders SET path = REGEXP_REPLACE(path, ?, ?) WHERE path LIKE ?', ['^' . $this->getRelativePath(), $newRelPath, $this->getRelativePath() . '%']);\n $db->commit();\n\n self::refreshNestings();\n\n // move filesystem folder\n\n $this->filesystemFolder->move($destination->getFilesystemFolder());\n\n // unset cached instances\n\n unset(self::$instancesById[$this->id], self::$instancesByPath[$this->filesystemFolder->getPath()]);\n return self::getInstance(null, $this->id);\n }", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testMoveMovesStorages()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n Storage::move(self::$temp.DS.'foo.txt', self::$temp.DS.'bar.txt');\n\n $this->assertTrue(is_file(self::$temp.DS.'bar.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'foo.txt'));\n }", "protected function _move($source, $targetDir, $name) {\r\n\t\treturn false;\r\n\t}", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function testMoveSuccess_ZipNoSubfolder()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "public function testMoveFileFromTmp(): void\n {\n $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';\n\n $this->assertFalse($this->mediaDirectory->isExist($expectedFilePath));\n\n $this->imageUploader->moveFileFromTmp('magento_small_image.jpg');\n\n $this->assertTrue($this->mediaDirectory->isExist($expectedFilePath));\n }", "public function move($destination)\r\n {\r\n if (!is_dir($destination)) {\r\n $this->createDirectory($destination);\r\n }\r\n\r\n if (!rename($this->filename, $destination . '/' . $this->getFilename())) {\r\n throw new \\DomainException(\r\n 'File (`' . $this->filename . '`) could not be moved to the destination directory (`' . $destination . '`).'\r\n );\r\n }\r\n\r\n $this->filename = $destination . $this->getFilename();\r\n }", "public function testMoveFail_PluginExists()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n // check we got the correct result first time around\n $this->assertEquals(false, $result);\n\n $result = $service->upload($file);\n // check we got the correct result second time around\n $this->assertEquals('A plugin with the same name (TestPlugin) is already uploaded.', $result);\n }", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }", "public function move(string $from, string $to) : bool\n {\n $absoluteFrom = $this->absolutePath($from);\n $absoluteTo = $this->absolutePath($to);\n\n if ($absoluteFrom == $absoluteTo)\n return true;\n\n $parts = explode('/', $absoluteTo);\n $folderTo = implode('/', array_splice($parts, 0, count($parts) - 1));\n\n $old = umask(0);\n $this->fileSystem()->makeDirectory($folderTo, 0777, true, true);\n umask($old);\n\n return $this->fileSystem()->move($absoluteFrom, $absoluteTo);\n }", "public function testMoveSuccess_zipSubfolder()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "function move($source, $destination);", "function moveFiles($src, $dest)\n{\n if (!is_dir($src)) {\n return false;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n rename($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else {\n if (!$f->isDot() && $f->isDir()) {\n rmDirRecursive($f->getRealPath(), \"$dest/$f\");\n unlink($f->getRealPath());\n }\n }\n }\n unlink($src);\n}", "public function testMove(): void\n {\n $this->document1->setResourceSegment('/products/news/content1-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n // move\n $this->document1->setResourceSegment('/products/asdf/content2-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/news/content1-news');\n $newNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals(\n $this->documentInspector->getNode($this->document1),\n $newNode->getPropertyValue('sulu:content')\n );\n\n // get content from new path\n $result = $this->phpcrMapper->loadByResourceLocator('/products/asdf/content2-news', 'sulu_io', 'de');\n $this->assertEquals($this->document1->getUuid(), $result);\n\n // get content from history should throw an exception\n $this->expectException(ResourceLocatorMovedException::class);\n $this->phpcrMapper->loadByResourceLocator('/products/news/content1-news', 'sulu_io', 'de');\n }", "public function testMove()\n {\n $this->rlpMapper->save($this->content1, '/products/news/content1-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n // move\n $this->rlpMapper->move('/products/news/content1-news', '/products/asdf/content2-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->session->getNode('/cmf/default/routes/de/products/news/content1-news');\n $newNode = $this->session->getNode('/cmf/default/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals($this->content1, $newNode->getPropertyValue('sulu:content'));\n\n // get content from new path\n $result = $this->rlpMapper->loadByResourceLocator('/products/asdf/content2-news', 'default', 'de');\n $this->assertEquals($this->content1->getIdentifier(), $result);\n\n // get content from history should throw an exception\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorMovedException');\n $result = $this->rlpMapper->loadByResourceLocator('/products/news/content1-news', 'default', 'de');\n }", "public static function move($_path, $_target)\r\n {\r\n return rename($_path, $_target);\r\n }", "public function moveDirectory( $source, $destination )\n {\n $path = explode( DS, $source );\n\n $destination = $destination . DS . $path[ count( $path ) - 1 ];\n\n $result = $this->copyDirectory( $source, $destination, TRUE );\n\n if ( TRUE === $result )\n {\n $result = $this->deleteDirectory( $source );\n }\n\n return $result;\n }", "public function move(DirectoryInterface $directory, string $name = null): void\n {\n if ( ! $this->exists() ) {\n throw new FileSystemException('can not move not existing file: '.$this->filename);\n }\n\n if ( ! $directory->exists() ) {\n throw new FileSystemException('can not move to not existing target directories: '.$directory->getPath());\n }\n\n if ( false !== strpos(str_replace('\\\\', '/', $name), '/') ) {\n throw new FileSystemException('name parameter can not contain slashes');\n }\n\n $name = $name ?? $this->filename;\n\n $done = rename(\n $this->getPathname(),\n $directory->getPath().'/'.$name\n );\n\n if ( ! $done ) {\n throw new FileSystemException('moving failed, probably due to access issues');\n }\n\n $this->directory = $directory;\n $this->filename = $name;\n $this->extension = pathinfo($name, PATHINFO_EXTENSION);\n $this->basename = basename($name, '.'.$this->extension);\n }", "public static function move($path, $toPath, $replace = TRUE) {\n \n }", "public function move(string $source, string $destination)\n {\n $this->filesystem->move(\n $this->relativeToRoot($source),\n $this->relativeToRoot($destination)\n );\n }", "function moveFolder($user_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}", "function movefile($POSTfrom, $POSTto, $currentdir) {\n\tif(count($POSTto) == 1) { //if the user selected only one \"move to\" location\n\t\tforeach($POSTfrom as $fromItem => $n1) { //$fromItem returns selected file/folder name to be moved, $n is checkbox status\n\t\t\tforeach($POSTto as $toItem => $n2) {//$toItem returns selected folder to have the files put in\n\t\t\t\tif(!file_exists($currentdir . \"/\" . $toItem . \"/\" . $fromItem)) {\n\t\t\t\t\tif(rename($currentdir . \"/\" . $fromItem, $currentdir . \"/\" . $toItem . \"/\" . $fromItem)) { //if rename worked, do nothing. Else, echo an error. Since rename() can rename a folder, it is possible to rename a file/folder to its new directory and have linux move it accourdingly\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ($fromItem == $toItem) { //if user tries to move the same folder into its self\n\t\t\t\t\t\techo \"<p><b>Error</b>: Could not move file or folder <b>\" . $fromItem . \"</b>. You cannot move a file into its self. Everything before it was moved.</p>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<p><b>Error</b>: Could not move file or folder <b>\" . $fromItem . \"</b>. Everything before it was moved.</p>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo \"<p><b>Error</b>: File already exists in the folder you want to move it to. Everything before <b>\" . $fromItem . \"</b> has been moved.</p>\";\n\t\t\t\t\techo \"<p>Rename file if you want to move it.</p>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\techo \"<p><b>Error</b>: You selected more than one destination folder, or none at all. Or, you might have not selected anything to move.</p>\";\n\t\treturn false;\n\t}\n\t\n\treturn true; // If everything worked out, return true\n}", "function _moveFile($sourceDir, $destDir, $filename) {\n\t\t$currentFilePath = $sourceDir . DIRECTORY_SEPARATOR . $filename;\n\t\t$destinationPath = $destDir . DIRECTORY_SEPARATOR . $filename;\n\n\t\tif (!rename($currentFilePath, $destinationPath)) {\n\t\t\t$message = __('admin.fileLoader.moveFileFailed', array('filename' => $filename,\n\t\t\t\t'currentFilePath' => $currentFilePath, 'destinationPath' => $destinationPath));\n\t\t\t$this->addExecutionLogEntry($message, SCHEDULED_TASK_MESSAGE_TYPE_ERROR);\n\n\t\t\t// Script should always stop if it can't manipulate files inside\n\t\t\t// its own directory system.\n\t\t\tfatalError($message);\n\t\t}\n\n\t\treturn $destinationPath;\n\t}", "public function move($path) {\n\n if (!$this->exists())\n throw new Exception\\FileException(\"File not found\", 1);\n\n if (!rename($this->path, $path))\n throw new Exception\\FileException(\"Unknown error\", 0);\n\n return true;\n }", "function __moveUploadedFile($source, $destination) {\r\n\t\tif (!Configure::read('Documents.isTesting')) {\r\n\t\t\treturn move_uploaded_file($source, $destination);\r\n\t\t} else {\r\n\t\t\treturn rename($source, $destination);\r\n\t\t}\r\n\r\n\t}", "public function move($sourcePath, $destinationPath, $checkIfIsUploaded = false, $overwrite = true);", "public function move($uid) {\n\n $uid = str::slug($uid);\n\n if(empty($uid)) {\n throw new Exception('The uid is missing');\n }\n\n // don't do anything if the uid exists\n if($this->uid() === $uid) return true;\n\n // check for an existing page with the same UID\n if($this->siblings()->not($this)->find($uid)) {\n throw new Exception('A page with this uid already exists');\n }\n\n $dir = $this->isVisible() ? $this->num() . '-' . $uid : $uid;\n $root = dirname($this->root()) . DS . $dir;\n\n if(!dir::move($this->root(), $root)) {\n throw new Exception('The directory could not be moved');\n }\n\n $this->dirname = $dir;\n $this->root = $root;\n $this->uid = $uid;\n\n // assign a new id and uri\n $this->id = $this->uri = ltrim($this->parent->id() . '/' . $this->uid, '/');\n\n // clean the cache\n $this->kirby->cache()->flush();\n $this->reset();\n return true;\n\n }", "public function move($sourcePath, $destinationPath) {\n\n\t\t$sourceNode = $this->getNodeForPath($sourcePath);\n\t\tif ($sourceNode instanceof \\Sabre_DAV_ICollection and $this->nodeExists($destinationPath)) {\n\t\t\tthrow new \\Sabre_DAV_Exception_Forbidden('Could not copy directory ' . $sourceNode . ', target exists');\n\t\t}\n\t\tlist($sourceDir,) = \\Sabre_DAV_URLUtil::splitPath($sourcePath);\n\t\tlist($destinationDir,) = \\Sabre_DAV_URLUtil::splitPath($destinationPath);\n\n\t\tFilesystem::rename($sourcePath, $destinationPath);\n\n\t\t$this->markDirty($sourceDir);\n\t\t$this->markDirty($destinationDir);\n\n\t}", "public function move($source, $dest);", "private function _moveImagesToNewFileSystem()\n\t{\n\t\tif (!Image::testFileSystem())\n\t\t\t$this->_errors[] = Tools::displayError('Error: your server configuration is not compatible with the new image system. No images were moved');\n\t\telse\n\t\t{\n\t\t\tini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value\n\t\t\t$this->max_execution_time = (int)ini_get('max_execution_time');\t\n\t\t\t$result = Image::moveToNewFileSystem($this->max_execution_time);\n\t\t\tif ($result === 'timeout')\n\t\t\t\t$this->_errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on \\\"Move images\\\" again to resume moving images');\n\t\t\telseif ($result === false)\n\t\t\t\t$this->_errors[] = Tools::displayError('Error: some or all images could not be moved.');\n\t\t}\n\t\treturn (sizeof($this->_errors) > 0 ? false : true);\n\t}", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "public function moveOrCopy\n (\n $target_directory,\n $target_name = '',\n $replace = false,\n $target_filesystem_type,\n $move_or_copy = 'copy'\n ) {\n\n /** Defaults */\n if ($target_directory == '') {\n $target_directory = $this->parent;\n }\n\n if ($target_name == '' && $this->is_file) {\n if ($target_directory == $this->parent) {\n throw new FilesystemException\n ('Ftp Filesystem ' . $move_or_copy\n . ': Must specify new file name when using the same target path: '\n . $this->path);\n }\n $target_name = $this->name;\n }\n\n if ($this->is_file === true) {\n $base_folder = $this->parent;\n } else {\n $base_folder = $this->path;\n }\n\n /** Edits */\n if (file_exists($this->path)) {\n } else {\n throw new FilesystemException\n ('Ftp Filesystem moveOrCopy: failed. This path does not exist: '\n . $this->path . ' Specified as source for ' . $move_or_copy\n . ' operation to ' . $target_directory);\n }\n\n if (file_exists($target_directory)) {\n } else {\n throw new FilesystemException\n ('Ftp Filesystem moveOrCopy: failed. This path does not exist: '\n . $this->path . ' Specified as destination for ' . $move_or_copy\n . ' to ' . $target_directory);\n }\n\n if (is_writeable($target_directory) === false) {\n throw new FilesystemException\n ('Ftp Filesystem Delete: No write access to file/path: ' . $target_directory);\n }\n\n if ($move_or_copy == 'move') {\n if (is_writeable($this->path) === false) {\n throw new FilesystemException\n ('Ftp Filesystem Delete: No write access for moving source file/path: '\n . $move_or_copy);\n }\n }\n\n if ($this->is_file === true || $target_name == '') {\n\n } else {\n if (is_dir($target_directory . '/' . $target_name)) {\n\n } else {\n\n new fsAdapter('write', $target_directory, $target_filesystem_type,\n $this->options = array('file' => $target_name)\n );\n }\n $target_directory = $target_directory . '/' . $target_name;\n $target_name = '';\n }\n\n /** Create new target directories from source directories list */\n if (count($this->directories) > 0) {\n\n asort($this->directories);\n\n $parent = '';\n $new_node = '';\n $new_path = '';\n\n foreach ($this->directories as $directory) {\n\n $new_path = $this->build_new_path($directory, $target_directory, $base_folder);\n\n if (is_dir($new_path)) {\n\n } else {\n\n $parent = dirname($new_path);\n $new_node = basename($new_path);\n\n new fsAdapter('write', $parent, $target_filesystem_type,\n $this->options = array('file' => $new_node)\n );\n }\n\n $parent = '';\n $new_node = '';\n $new_path = '';\n }\n }\n\n /** Copy files now that directories are in place */\n if (count($this->files) > 0) {\n\n $path_name = '';\n $file_name = '';\n\n foreach ($this->files as $file) {\n\n $new_path = $this->build_new_path($file, $target_directory, $base_folder);\n\n /** Single file copy or move */\n if ($this->is_file === true) {\n $file_name = $target_name;\n } else {\n $file_name = basename($file);\n }\n\n /** Source */\n $adapter = new fsAdapter('Read', $file);\n $data = $adapter->fs->data;\n\n /** Write Target */\n new fsAdapter('Write', $new_path, $target_filesystem_type,\n $this->options = array(\n 'file' => $file_name,\n 'replace' => $replace,\n 'data' => $data,\n )\n );\n\n $path_name = '';\n $file_name = '';\n }\n }\n\n /** For move, remove the files and folders just copied */\n if ($move_or_copy == 'move') {\n $this->_deleteDiscoveryFilesArray();\n $this->_deleteDiscoveryDirectoriesArray();\n }\n\n return true;\n }", "protected function onMove(){\n\t\tif (empty($this->post['directory']) || empty($this->post['file'])) return;\n\t\t\n\t\t$rename = empty($this->post['newDirectory']) && !empty($this->post['name']);\n\t\t$dir = $this->getDir($this->post['directory']);\n\t\t$file = realpath($dir . '/' . $this->post['file']);\n\t\t\n\t\t$is_dir = is_dir($file);\n\t\tif (!$this->checkFile($file) || (!$rename && $is_dir))\n\t\t\treturn;\n\t\t\n\t\tif ($rename || $is_dir){\n\t\t\tif (empty($this->post['name'])) return;\n\t\t\t$newname = $this->getName($this->post['name'], $dir);\n\t\t\t$fn = 'rename';\n\t\t}else{\n\t\t\t$newname = $this->getName(pathinfo($file, PATHINFO_FILENAME), $this->getDir($this->post['newDirectory']));\n\t\t\t$fn = !empty($this->post['copy']) ? 'copy' : 'rename';\n\t\t}\n\t\t\n\t\tif (!$newname) return;\n\t\t\n\t\t$ext = pathinfo($file, PATHINFO_EXTENSION);\n\t\tif ($ext) $newname .= '.' . $ext;\n\t\t$fn($file, $newname);\n\t\t\n\t\techo json_encode(array(\n\t\t\t'name' => pathinfo($this->normalize($newname), PATHINFO_BASENAME),\n\t\t));\n\t}", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function move($destination,$filename){\n\t\tif(!is_uploaded_file($this->getPathname())){\n\t\t\tthrow new \\Exception('File couldn\\'t be uploaded!');\n\t\t}\n\n\t\t/// chceck that destination directory exists\n\t\tif(!is_dir($destination)){\n\t\t\t/// try to create the directory\n if(false === @mkdir($destination,0777,true) && !is_dir($destination)){\n throw new \\Exception('Can\\'t create directory \"'.$destination.'\"');\n }\n }\n /// check access rights\n else if(!is_writable($destination)){\n throw new \\Exception('Can\\'t write to directory \"'.$destination.'\"');\n }\n\n /// determine target path\n $target = rtrim($destination,'/\\\\').DIRECTORY_SEPARATOR.$this->getFilename($filename);\n\n\t\t/// move the file\n\t\tif(!@move_uploaded_file($this->getPathname(), $target)){\n\t\t\tthrow new \\Exception('Can\\'t move the file from \"'.$this->getPathname().'\" to \"'.$target.'\"');\n\t\t}\n\n\t\t/// set access rights\n\t\t@chmod($target,0666 & ~umask());\n\n\t\treturn $target;\n\t}", "protected function _moveToImageDir()\n\t{\n\t\t$path = $this->getFilePath();\n\t\t$this->_uploadedFile->moveTo($path);\n\t\tchmod($path, 0644);\n\t}", "public function method_MOVE( $destination, $overwrite, $path )\n{\n $multistatus = new DAV_Multistatus();\n \n // This might generate an exception, but that's OK:\n $retval = ($destination[0] == '/')\n ? $this->method_COPY( $destination, $overwrite )\n : $this->method_COPY_external( $destination, $overwrite );\n \n foreach ( $this as $member ) {\n try {\n $deeppath = DAV::slashify($path) . $member;\n $deepdest = DAV::slashify($destination) . (\n $destination[0] == '/' ? $member : DAV::urlencode($member)\n );\n $resource = DAV_Server::inst()->resource($deeppath);\n if (!$resource)\n $multistatus->addStatus(\n $deeppath, new DAV_Status(\n REST::HTTP_INTERNAL_SERVER_ERROR,\n \"Resource not found: $deeppath\"\n )\n );\n elseif ( $resource instanceof DAV_Collection )\n $resource->method_MOVE( $deepdest, $overwrite, $deeppath );\n elseif ($destination[0] == '/')\n $resource->method_MOVE( $deepdest, $overwrite );\n else\n $resource->method_MOVE_external( $deepdest, $overwrite );\n }\n catch (DAV_Status $e) {\n $multistatus->addStatus($deeppath, $e);\n }\n catch (DAV_Multistatus $e) {\n $multistatus->mergeWith($e);\n }\n }\n if ( count( $multistatus->statuses() ) )\n throw $multistatus;\n \n try { $this->method_DELETE(); }\n catch (DAV_Status $e) {}\n \n return $retval;\n}", "function move_uploaded_file_to_temp_directory($file, $destination_sufix_name) {\n do {\n $temp_destination = WORK_PATH.'/'.make_string(10).'_'.$destination_sufix_name;\n } while (is_file($temp_destination));\n \n if (move_uploaded_file($file, $temp_destination)) {\n return $temp_destination;\n } // if\n\n return false;\n }", "public function move($path){\n\t\t$oldPath = $this->path;\n\t\t$path_array = explode(self::DS, $this->path);\n\t\t$fileName = $path_array[sizeof($path_array) - 1];\n\t\t$newPath = $path . self::DS . $fileName;\n\t\t$this->path = $newPath;\n\t\t$this->createFile($newPath);\n\t\tunlink($oldPath);\n\t}", "function narrative_move_xml($id, $new_narrative_dir)\n{\n $CI =& get_instance();\n $base_dir = $CI->config->item('site_data_dir') . '/' . $id . '/';\n $file_scan = scandir($base_dir);\n foreach ($file_scan as $filecheck)\n {\n $file_extension = pathinfo($filecheck, PATHINFO_EXTENSION);\n // Finding the XML file to be moved\n if ($file_extension == \"xml\" && $filecheck != 'AudioTimes.xml')\n {\n rename($base_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "function moveDirs($source, $dest, $recursive = true, $message) {\n jimport('joomla.filesystem.folder');\n jimport('joomla.filesystem.file');\n \n $error = false;\n\t\n\tif (!is_dir($dest)) { \n mkdir($dest); \n \t} \n \n $handle = @opendir($source);\n \n if(!$handle) {\n $message = JText::_('COM_JDOWNLOADS_BACKEND_CATSEDIT_ERROR_CAT_COPY');\n return $message;\n }\n \n while ($file = @readdir ($handle)) {\n if (eregi(\"^\\.{1,2}$\",$file)) {\n continue;\n }\n \n if(!$recursive && $source != $source.$file.\"/\") {\n if(is_dir($source.$file))\n continue;\n }\n \n if(is_dir($source.$file)) {\n moveDirs($source.$file.\"/\", $dest.$file.\"/\", $recursive, $message);\n } else {\n if (!JFile::copy($source.$file, $dest.$file)) {\n\t\t\t\t$error = true;\n\t\t\t}\n }\n }\n @closedir($handle);\n \n // $source loeschen wenn KEIN error\n if (!$error) {\n\t\t$res = delete_dir_and_allfiles ($source);\t\n if ($res) {\n\t\t\t$message = JText::_('COM_JDOWNLOADS_BACKEND_CATSEDIT_ERROR_CAT_DEL_AFTER_COPY');\t\t\n\t\t}\n\t} else {\n\t\t$message = JText::_('COM_JDOWNLOADS_BACKEND_CATSEDIT_ERROR_CAT_COPY');\n\t}\n\treturn $message;\n}", "public function move($source, $target)\n {\n \n }", "public function move(sfAssetFolder $new_parent)\n {\n // controls\n if($this->getNode()->isRoot())\n {\n throw new sfAssetException('The root folder cannot be moved');\n }\n else if($new_parent->hasSubFolder($this->getName()))\n {\n throw new sfAssetException('The target folder \"%folder%\" already contains a folder named \"%name%\". The folder has not been moved.', array('%folder%' => $new_parent, '%name%' => $this->getName()));\n }\n else if($new_parent->getNode()->isDescendantOf($this))\n {\n throw new sfAssetException('The target folder cannot be a subfolder of moved folder. The folder has not been moved.');\n }\n else if ($this->getId() == $new_parent->getId())\n {\n return;\n }\n \n $old_path = $this->getFullPath();\n \n $this->getNode()->moveAsLastChildOf($new_parent);\n $this->save();\n \n $descendants = $this->getNode()->getChildren();\n $descendants = $descendants ? $descendants : array();\n \n // move its assets\n self::movePhysically($old_path, $this->getFullPath());\n \n foreach ($descendants as $descendant)\n {\n // Update relative path\n $descendant->save();\n }\n \n // else: nothing to do\n }", "public function renameDirectory(DirectoryInterface $directory, string $newName): DirectoryInterface;", "public function checkMove($source, $destination) {\n\t\t$sourceNode = $this->tree->getNodeForPath($source);\n\t\tif (!$sourceNode instanceof Node) {\n\t\t\treturn;\n\t\t}\n\t\tlist($sourceDir, ) = \\Sabre\\HTTP\\URLUtil::splitPath($source);\n\t\tlist($destinationDir, ) = \\Sabre\\HTTP\\URLUtil::splitPath($destination);\n\n\t\tif ($sourceDir !== $destinationDir) {\n\t\t\t$sourceNodeFileInfo = $sourceNode->getFileInfo();\n\t\t\tif ($sourceNodeFileInfo === null) {\n\t\t\t\tthrow new NotFound($source . ' does not exist');\n\t\t\t}\n\n\t\t\tif (!$sourceNodeFileInfo->isDeletable()) {\n\t\t\t\tthrow new Forbidden($source . \" cannot be deleted\");\n\t\t\t}\n\t\t}\n\t}", "public function testCopy() {\n $sourceDirName = self::TEST_DIR . '/testCopyDirectorySource';\n $targetDirName = self::TEST_DIR . '/testCopyDirectoryTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->copy(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryExists($sourceDirName);\n }", "function move_dir_to_tmp($src, $id)\n{\n $CI =& get_instance();\n $tmpPath = $CI->config->item('site_data_dir') . '/tmp/' . time() . '/';\n if (!is_dir($tmpPath))\n {\n mkdir($tmpPath, 0775, TRUE);\n }\n $tmpPath .= '/' . $id . '/';\n rename($src, $tmpPath);\n return $tmpPath;\n}", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "function _pm_update_move_files($src_dir, $dest_dir, $skip_list, $remove_conflicts = TRUE) {\n $items_to_move = drush_scan_directory($src_dir, '/.*/', array_merge(array('.', '..'), $skip_list), 0, FALSE, 'filename', 0, TRUE);\n foreach ($items_to_move as $filename => $info) {\n if ($remove_conflicts) {\n drush_delete_dir($dest_dir . '/' . basename($filename));\n }\n if (!file_exists($dest_dir . '/' . basename($filename))) {\n $move_result = drush_move_dir($filename, $dest_dir . '/' . basename($filename));\n }\n }\n return TRUE;\n}", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function move($sDestinationFileName);", "public function testDirnameReturnsDirectory()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame(self::$temp, Storage::dirname(self::$temp.DS.'foo.txt'));\n }", "private function moveFile($old_file, $new_file)\n {\n if (!file_exists($old_file)) {\n return;\n }\n\n if (!is_dir(dirname($new_file))) {\n mkdir(dirname($new_file), 0755, true);\n }\n\n // move the file to the archive folder\n rename($old_file, $new_file);\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "public function move($new_path)\n\t{\n\t\t$info = pathinfo($this->path);\n\t\t$new_path = $this->area->get_path($new_path);\n\n\t\t$new_path = rtrim($new_path, '\\\\/').DS.$info['basename'];\n\n\t\t$return = $this->area->rename($this->path, $new_path);\n\t\t$return and $this->path = $new_path;\n\t\t\n\t\treturn $return;\n\t}", "public static function x_move($source, $destination, $overwrite = false) {\n // source is array\n if (is_array($source)) {\n $result = true;\n foreach($source as $s) {\n $result = self::x_move($s, $destination, $overwrite) && $result;\n }\n return $result;\n }\n\n // target not existing\n // => rename\n // target file\n // => rename if overwrite\n if (!self::file_exists($destination) || $overwrite)\n return self::rename($source, $destination);\n\n // source is file and target folder\n // => rename if target not exists\n $new_dest = new Path($destination->getPath().DIRECTORY_SEPARATOR.basename($source->getPath()), $destination->getType());\n if (self::is_file($source) && self::is_dir($destination) && !self::file_exists($new_dest))\n return self::rename($source, $new_dest);\n }", "public function testOnNewDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onNewDirectory($this->dir1);\n $this->assertFileExists($this->directory . \"/1\");\n\n $obj->onNewDirectory($this->dir2);\n $this->assertFileExists($this->directory . \"/1/2\");\n\n $obj->onNewDirectory($this->dir3);\n $this->assertFileExists($this->directory . \"/1/2/3\");\n }", "public function testOnDeletedDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $this->dir3->setParent($this->dir1); // This directory was moved.\n\n $obj->onDeletedDirectory($this->dir3);\n $this->assertFileNotExists($this->directory . \"/1/3\");\n\n $obj->onDeletedDirectory($this->dir2);\n $this->assertFileNotExists($this->directory . \"/1/2\");\n\n $obj->onDeletedDirectory($this->dir1);\n $this->assertFileNotExists($this->directory . \"/1\");\n }", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function move($file, $path)\n {\n if (! \\File::exists($file)) return $this->notify('The file or directory doesn\\'t exist.', 400); \n try {\n \\File::move($file, $path . '/' . fileName($file));\n }\n catch (Exception $e) {\n return $this->notify($e->getMessage(), 500);\n }\n }", "public function move(string $directory, string $name = null): File\n {\n $reflector = new \\ReflectionMethod($this, 'move');\n if ($reflector->getDeclaringClass()->getName() !== get_class($this)) {\n throw new \\BadFunctionCallException(sprintf('%s must override method \\'move\\' method.', get_class($this)));\n }\n\n return parent::move($directory, $name);\n }", "function FilesMoveToFolder()\r\n{\r\n global $PH;\r\n\r\n $file_ids= getPassedIds('file','files_*');\r\n\r\n if(!$file_ids) {\r\n $PH->abortWarning(__(\"Select some files to move\"));\r\n exit();\r\n }\r\n\r\n\r\n\r\n /**\r\n * by default render list of folders...\r\n */\r\n $target_id=-1;\r\n\r\n /**\r\n * ...but, if folder was given, directly move files...\r\n */\r\n $folder_ids= getPassedIds('folder','folders_*');\r\n if(count($folder_ids) == 1) {\r\n if($folder_task= Task::getVisibleById($folder_ids[0])) {\r\n $target_id= $folder_task->id;\r\n }\r\n }\r\n\r\n /**\r\n * if no folders was selected, move files to project root\r\n */\r\n else if(get('from_selection')) {\r\n $target_id= 0;\r\n }\r\n\r\n\r\n if($target_id != -1) {\r\n\r\n\r\n if($target_id != 0){\r\n if(!$target_task= Task::getEditableById($target_id)) {\r\n $PH->abortWarning(__(\"insufficient rights\"));\r\n\r\n }\r\n ### get path of target to check for cycles ###\r\n $parent_tasks= $target_task->getFolder();\r\n $parent_tasks[]= $target_task;\r\n }\r\n else {\r\n $parent_tasks=array();\r\n }\r\n\r\n\r\n $count=0;\r\n foreach($file_ids as $id) {\r\n if($file= File::getEditableById($id)) {\r\n\r\n $file->parent_item= $target_id;\r\n $file->update();\r\n }\r\n else {\r\n $PH->messages[]= sprintf(__(\"Can not edit file %s\"), $file->name);\r\n }\r\n }\r\n\r\n ### return to from-page? ###\r\n if(!$PH->showFromPage()) {\r\n $PH->show('home');\r\n }\r\n exit();\r\n }\r\n #else if($target_id != -1) {\r\n # $PH->abortWarning(__(\"insufficient rights to edit any of the selected items\"));\r\n #}\r\n\r\n\r\n\r\n\r\n /**\r\n * build page folder lists...\r\n */\r\n\r\n ### get project ####\r\n if(!$file= File::getVisibleById($file_ids[0])) {\r\n $PH->abortWarning(\"could not get file\", ERROR_BUG);\r\n }\r\n\r\n if(!$project= Project::getVisibleById($file->project)) {\r\n $PH->abortWarning(\"file without project?\", ERROR_BUG);\r\n }\r\n\r\n\r\n ### set up page and write header ####\r\n {\r\n $page= new Page(array('use_jscalendar'=>false, 'autofocus_field'=>'company_name'));\r\n $page->cur_tab='projects';\r\n $page->type= __(\"Edit files\");\r\n $page->title=\"$project->name\";\r\n $page->title_minor=__(\"Select folder to move files into\");\r\n\r\n $page->crumbs= build_project_crumbs($project);\r\n\r\n $page->options[]= new NaviOption(array(\r\n 'target_id' =>'filesMoveToFolder',\r\n ));\r\n\r\n echo(new PageHeader);\r\n }\r\n echo (new PageContentOpen);\r\n\r\n\r\n ### write form #####\r\n {\r\n ### write files as hidden entry ###\r\n foreach($file_ids as $id) {\r\n if($file= File::getEditableById($id)) {\r\n echo \"<input type=hidden name='files_{$id}_chk' value='1'>\";\r\n }\r\n }\r\n\r\n\r\n ### write list of folders ###\r\n {\r\n require_once(confGet('DIR_STREBER') . 'lists/list_tasks.inc.php');\r\n $list= new ListBlock_tasks();\r\n $list->reduced_header= true;\r\n $list->query_options['show_folders']= true;\r\n #$list->query_options['folders_only']= true;\r\n $list->query_options['project']= $project->id;\r\n $list->groupings= NULL;\r\n $list->block_functions= NULL;\r\n $list->id= 'folders';\r\n $list->no_items_html= __('No folders available');\r\n unset($list->columns['status']);\r\n unset($list->columns['date_start']);\r\n unset($list->columns['days_left']);\r\n unset($list->columns['created_by']);\r\n unset($list->columns['label']);\r\n unset($list->columns['project']);\r\n\r\n $list->functions= array();\r\n\r\n $list->active_block_function = 'tree';\r\n\r\n\r\n $list->print_automatic($project,NULL);\r\n }\r\n\r\n echo __(\"(or select nothing to move to project root)\"). \"<br> \";\r\n\r\n echo \"<input type=hidden name='from_selection' value='1'>\"; # keep flag to ungroup files\r\n echo \"<input type=hidden name='project' value='$project->id'>\";\r\n $button_name=__(\"Move items\");\r\n echo \"<input class=button2 type=submit value='$button_name'>\";\r\n\r\n $PH->go_submit='filesMoveToFolder';\r\n\r\n }\r\n echo (new PageContentClose);\r\n echo (new PageHtmlEnd());\r\n\r\n}", "public function testCopyDirectoryReturnsFalseIfSourceIsntDirectory()\n {\n $origin = self::$temp.DS.'breeze'.DS.'boom'.DS.'foo'.DS.'bar'.DS.'baz';\n $this->assertFalse(Storage::cpdir($origin, self::$temp));\n }", "public function moveDirectory(string $oldDirName, string $newDirName): MoveDirectory\n {\n return $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n }", "public function moveTo(Directory $dir) {\n\t\t$new_path = $this->pathIn($dir);\n\t\tif (!rename($this->getPath(), $new_path)) throw new \\Exception(\"Couldn't rename the file $this to $new_path\");\n\t\t$this->path = $new_path;\n\t}", "public function testFindDestination() {\n\t\t$this->assertEquals(TEMP_DIR . '/scott-pilgrim.jpg', $this->object->findDestination('scott-pilgrim.jpg', true));\n\t\t$this->assertEquals(TEMP_DIR . '/scott-pilgrim-1.jpg', $this->object->findDestination(new File($this->baseFile), false));\n\t}", "public function upload_move($file, $local_file);", "public function test_factory_not_exist()\n {\n Directory::factory(ROOT.DS.'test_dir');\n }", "public function move($source, $destination, $overwrite = \\false)\n {\n }", "public function move($source, $destination, $overwrite = \\false)\n {\n }", "public function move($source, $destination, $overwrite = \\false)\n {\n }", "public function move($source, $destination, $overwrite = \\false)\n {\n }", "function moveFinalDirectories($aBooksDone, $aDirectories)\r\n{\r\n\t$readydir = $aDirectories['ready'];\r\n\t$sipdir = $aDirectories['sip'];\r\n\t$result = 0;\r\n\r\n\tforeach ($aBooksDone as $itemnumber) {\r\n\t\t$sourcedir = $readydir . '\\\\' . $itemnumber;\r\n\t\t$destinationdir = $sipdir . '\\\\' . $itemnumber;\r\n\r\n\t\tif (!(@opendir($destinationdir))) {\r\n\t\t\t$mk = mkdir($destinationdir);\r\n\t\t\t//if ($mk === FALSE) {\r\n\t\t\t//\t$result = 0;\r\n\t\t\t//\treturn $result;\r\n\t\t\t//}\r\n\t\t}\r\n\r\n\t\t$dh = opendir($sourcedir);\r\n if ($dh) {\r\n while (($file = @readdir($dh)) !== false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $source = $sourcedir . \"\\\\\" . $file;\r\n $destination = $destinationdir . \"\\\\\" . $file;\r\n //echo 'ik zou ' . $source . ' verplaatsen naar ' . $destination . '<br>';\r\n $result = @rename($source, $destination);\r\n }\r\n }\r\n \t\t}\r\n\r\n\t\t$result = rmdir($sourcedir);\r\n\t}\r\n\r\n\treturn $result;\r\n}", "public function testChDir() {\n $currentDir = getcwd();\n $parentDir = dirname($currentDir);\n\n $handle = new Directory($parentDir);\n $handle->chdir();\n\n $this->assertEquals($parentDir, getcwd());\n chdir($currentDir);\n }", "public function move($folder)\r\n\t{\r\n\t\tif (!$folder || !$folder->id && $this->getValue(\"name\") != \"/\")\r\n\t\t\treturn false;\r\n\t\t$this->setValue(\"parent_id\", $folder->id);\r\n\t\treturn $this->save();\r\n\t}", "public function move( $dest )\n\t\t{\n\t\t\tif( $this->path )\n\t\t\t{\n\t\t\t\tFileSystem::move( $this->path, $dest );\n\t\t\t\t$this->path = $dest;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\System\\Base\\InvalidOperationException(\"attempt to perform action on empty Folder object\");\n\t\t\t}\n\t\t}", "public function testConstructSingleDirectory()\n {\n $filter = new FileRename($this->newDir);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "public function move($sourceDir,$sourceFile,$targetDir,$targetFile){\n\t\tif(!$this->connected){\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->apiCall('move',array('sourcedir'=>$sourceDir,'source'=>$sourceFile,'targetdir'=>$targetDir,'target'=>$targetFile),true);\n\t}", "public function move(string $path, string $target): bool\n {\n return rename($path, $target);\n }", "public function MOVE(ResourceObject $resource) {\n\t\t$depth = $this->request->headers['Depth'] !== null ? 'infinity' : $this->request->headers['Depth'];\n\t\t\n\t\t// get the destination\n\t\t$url = parse_url($this->request->headers['Destination']);\n\t\t$path = urldecode($url['path']);\n\t\t$host = $url['host'];\n\t\tif (isset($url['port']) && $url['port'] != 80)\n\t\t\t$host .= ':' . $url['port'];\n\t\t\n\t\t// get the host header\n\t\t$hostHeader = preg_replace('/:80$/', '', $this->request->headers['Host']);\n\t\t\n\t\t// check whether the destination is on this host or not\n#[TODO] ensure no file is moved above base folder! supply base folder?\n\t\tif ($host == $hostHeader) {\n\t\t\t// the destination is on this server\n#[TODO] we can't use filenames!\n\t\t\t$dest = $_SERVER['DOCUMENT_ROOT'] . $path;\n#[TODO]\t\t\t// check lock status\n#\t\t\tif (!$this->_check_lock_status($this->path))\n#\t\t\t\tthrow new HTTPStatusException(423, 'Locked');\n\t\t} else {\n\t\t\t// the destination is on another server\n\t\t\t$destURI = $this->request->headers['Destination'];\n\t\t}\n\t\t\n\t\t// get overwrite flag\n\t\t$overwrite = ($this->request->headers['Overwrite'] != 'F');\n\t\n#[TODO]\t\t// body parsing not supported\n\t\tif (strlen($this->request->content->get()))\n\t\t\tthrow new HTTPStatusException(415);\n\t\t\n#[TODO]\t\t// no copying to other servers yet\n\t\tif (isset($destURI))\n\t\t\tthrow new HTTPStatusException(502);\n\t\t \n#[TODO]\t\t// property updates are broken\n\n\t\t// check if the destination file exists or not\n\t\t$new = !file_exists($dest);\n\t\t$existing_col = false;\n\n\t\t// if the destination is a folder, overwrite, or make child\n\t\tif (!$new && is_dir($dest)) {\n\t\t\t// prevent overwrite\n\t\t\tif (!$overwrite)\n\t\t\t\tthrow new HTTPStatusException(412);\n\t\t\t// add the filename to the destination\n\t\t\t$dest .= basename($resource->getPath());\n\t\t\t// \n\t\t\t\tif (file_exists($dest)) {\n\t\t\t\t\t$options[\"dest\"] .= basename($source);\n\t\t\t\t} else {\n\t\t\t\t\t$new = true;\n\t\t\t\t\t$existing_col = true;\n\t\t\t\t}\n\t\t}\n\n\t\tif (!$new) {\n\t\t\tif ($options[\"overwrite\"]) {\n\t\t\t\t$stat = $this->DELETE(array(\"path\" => $options[\"dest\"]));\n\t\t\t\tif (($stat{0} != \"2\") && (substr($stat, 0, 3) != \"404\")) {\n\t\t\t\t\treturn $stat; \n\t\t\t\t}\n\t\t\t} else {\t\t\t\t\n\t\t\t\treturn \"412 precondition failed\";\n\t\t\t}\n\t\t}\n\n\t\tif (is_dir($source) && ($options[\"depth\"] != \"infinity\")) {\n\t\t\t// RFC 2518 Section 9.2, last paragraph\n\t\t\treturn \"400 Bad request\";\n\t\t}\n\n\t\tif ($del) {\n\t\t\tif (!rename($source, $dest)) {\n\t\t\t\treturn \"500 Internal server error\";\n\t\t\t}\n\t\t\t$destpath = $this->_unslashify($options[\"dest\"]);\n\t\t\tif (is_dir($source)) {\n\t\t\t\t$query = \"UPDATE properties \n\t\t\t\t\t\t\t SET path = REPLACE(path, '\".$options[\"path\"].\"', '\".$destpath.\"') \n\t\t\t\t\t\t WHERE path LIKE '\".$this->_slashify($options[\"path\"]).\"%'\";\n\t\t\t\tmysql_query($query);\n\t\t\t}\n\n\t\t\t$query = \"UPDATE properties \n\t\t\t\t\t\t SET path = '\".$destpath.\"'\n\t\t\t\t\t WHERE path = '\".$options[\"path\"].\"'\";\n\t\t\tmysql_query($query);\n\t\t}\n\n\t\treturn ($new && !$existing_col) ? \"201 Created\" : \"204 No Content\";\n\t}", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }", "public function moveUploadedFile($directory){\n\n $target_path = dirname(__DIR__, 3) . Config::DS . static::$upload_directories[$directory] . Config::DS . $this->filename;\n if(file_exists($target_path)){\n $this->errors_on_upload[] = 'This file already exists in this directory';\n return false;\n }\n\n if( !empty($this->tmp_name)){ // if tmp_name is empty, we just don't upload files\n\n if( ! move_uploaded_file($this->tmp_name, $target_path)){\n $this->errors_on_upload[] = 'The folder probably doesnt have permissions';\n return false;\n } else {\n return true;\n }\n\n }\n\n }", "protected static function moveTemporaryDirs()\n {\n if (static::isCapsular()) {\n // Rename directories\n $original = static::getCacheDirs(false);\n foreach (static::getCacheDirs(true) as $i => $tmpDir) {\n \\Includes\\Utils\\FileManager::unlinkRecursive($tmpDir);\n $originalDir = $original[$i];\n rename($originalDir, $tmpDir);\n }\n\n // Rename files\n $original = static::getDecoratorDataFiles(false);\n foreach (static::getDecoratorDataFiles(true) as $i => $tmpPath) {\n $destPath = $original[$i];\n if (file_exists($tmpPath)) {\n rename($tmpPath, $destPath);\n }\n }\n }\n }" ]
[ "0.8364826", "0.8341061", "0.8054002", "0.80286586", "0.78115845", "0.7408394", "0.7035016", "0.6758503", "0.66618764", "0.6528062", "0.6508351", "0.6483764", "0.6476313", "0.64304525", "0.6402691", "0.640205", "0.62653875", "0.62580246", "0.6214017", "0.6189024", "0.615714", "0.6121776", "0.611669", "0.60829675", "0.6081632", "0.6075489", "0.60714054", "0.6010069", "0.5984624", "0.5955704", "0.5940004", "0.5904826", "0.5890759", "0.586669", "0.5851714", "0.5826814", "0.582352", "0.58203965", "0.58132154", "0.58042186", "0.5803951", "0.57796377", "0.5773684", "0.5767549", "0.5767391", "0.57599634", "0.57365656", "0.5722986", "0.57200927", "0.56904835", "0.5690054", "0.5690044", "0.56873167", "0.5673279", "0.5660467", "0.56548727", "0.56537074", "0.565355", "0.5650831", "0.56332195", "0.56285197", "0.5628207", "0.5605148", "0.56046814", "0.5603835", "0.55804044", "0.55724746", "0.5565373", "0.55623317", "0.5549444", "0.5543108", "0.5538597", "0.55357736", "0.5528144", "0.55184466", "0.5493391", "0.54861695", "0.5486061", "0.54715073", "0.5466918", "0.5459096", "0.5449544", "0.5448666", "0.5431774", "0.5411378", "0.54044604", "0.54044604", "0.54044604", "0.5403021", "0.54000866", "0.5377332", "0.53762484", "0.5355896", "0.53442734", "0.5342765", "0.5336259", "0.5335891", "0.53268147", "0.5315364", "0.5314672" ]
0.84916425
0
Test for Directory::move() Attempts to move [ROOT]/index.php to [ROOT]/not_exist Throws \InvalidArgumentException because provided path doesn't exist
public function test_move_not_exists_dir() { $object = Directory::create(ROOT.DS.'test_dir'); $object->move(ROOT.DS.'not_exist'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "public function testMoveNotExist()\n {\n $this->rlpMapper->save($this->content1, '/news/news-1', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorNotFoundException');\n $this->rlpMapper->move('/news', '/neuigkeiten', 'default', 'de');\n }", "public function testMoveFail_PluginExists()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n // check we got the correct result first time around\n $this->assertEquals(false, $result);\n\n $result = $service->upload($file);\n // check we got the correct result second time around\n $this->assertEquals('A plugin with the same name (TestPlugin) is already uploaded.', $result);\n }", "public function testMoveMovesStorages()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n Storage::move(self::$temp.DS.'foo.txt', self::$temp.DS.'bar.txt');\n\n $this->assertTrue(is_file(self::$temp.DS.'bar.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'foo.txt'));\n }", "function move($source, $destination);", "public function testMoveSuccess_ZipNoSubfolder()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function move($path) {\n\n if (!$this->exists())\n throw new Exception\\FileException(\"File not found\", 1);\n\n if (!rename($this->path, $path))\n throw new Exception\\FileException(\"Unknown error\", 0);\n\n return true;\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function move($file, $path)\n {\n if (! \\File::exists($file)) return $this->notify('The file or directory doesn\\'t exist.', 400); \n try {\n \\File::move($file, $path . '/' . fileName($file));\n }\n catch (Exception $e) {\n return $this->notify($e->getMessage(), 500);\n }\n }", "public static function move($path, $toPath, $replace = TRUE) {\n \n }", "public function move($destination)\r\n {\r\n if (!is_dir($destination)) {\r\n $this->createDirectory($destination);\r\n }\r\n\r\n if (!rename($this->filename, $destination . '/' . $this->getFilename())) {\r\n throw new \\DomainException(\r\n 'File (`' . $this->filename . '`) could not be moved to the destination directory (`' . $destination . '`).'\r\n );\r\n }\r\n\r\n $this->filename = $destination . $this->getFilename();\r\n }", "public function move (MetaFolder $destination): MetaFolder\n {\n if ($destination->l >= $this->l && $destination->r <= $this->r) {\n throw new MetaFolderException('Metafolder cannot be moved into itself or a contained subfolder.');\n }\n if (!$this->level) {\n throw new MetaFolderException('Root metafolder cannot be moved.');\n }\n\n $newRelPath = $destination->getRelativePath() . array_slice (explode('/', trim($this->getRelativePath(), '/')), -1)[0] . '/';\n\n try {\n $existingFolder = self::getInstance($newRelPath);\n }\n catch (MetaFolderException $e) {\n }\n if (isset($existingFolder)) {\n throw new MetaFolderException('Cannot move folder. Folder with same path already exists.');\n }\n\n // metafile updates\n\n $db = Application::getInstance()->getVxPDO();\n\n // handle nesting, kudos to https://rogerkeays.com/how-to-move-a-node-in-nested-sets-with-sql\n\n $subtreeWidth = $this->r - $this->l + 1;\n $newPos = $destination->l + 1;\n $subtreeDist = $newPos - $this->l;\n $tmpPos = $this->l;\n $levelDiff = $destination->level - $this->level + 1;\n\n // observe backward movement\n\n if($subtreeDist < 0) {\n $subtreeDist -= $subtreeWidth;\n $tmpPos += $subtreeWidth;\n }\n\n $db->beginTransaction();\n\n // create space for subtree at new position\n\n $db->execute('UPDATE folders SET l = l + ? WHERE l >= ?', [$subtreeWidth, $newPos]);\n $db->execute('UPDATE folders SET r = r + ? WHERE r >= ?', [$subtreeWidth, $newPos]);\n\n // move subtree into new space\n\n $db->execute('UPDATE folders SET l = l + ?, r = r + ?, level = level + (?) WHERE l >= ? AND r < ?', [$subtreeDist, $subtreeDist, $levelDiff, $tmpPos, $tmpPos + $subtreeWidth]);\n\n // remove space previously occupied by subtree\n\n $db->execute('UPDATE folders SET l = l - ? WHERE l > ?', [$subtreeWidth, $this->r]);\n $db->execute('UPDATE folders SET r = r - ? WHERE r > ?', [$subtreeWidth, $this->r]);\n\n // update path\n\n $db->execute('UPDATE folders SET path = REGEXP_REPLACE(path, ?, ?) WHERE path LIKE ?', ['^' . $this->getRelativePath(), $newRelPath, $this->getRelativePath() . '%']);\n $db->commit();\n\n self::refreshNestings();\n\n // move filesystem folder\n\n $this->filesystemFolder->move($destination->getFilesystemFolder());\n\n // unset cached instances\n\n unset(self::$instancesById[$this->id], self::$instancesByPath[$this->filesystemFolder->getPath()]);\n return self::getInstance(null, $this->id);\n }", "public function testOnMovedDocument() {\n\n $obj = new FileSystemStorageProvider($this->logger, getcwd());\n\n $this->dir3->setParentBackedUp($this->dir3->getParent());\n $this->dir2->removeChildren($this->dir3);\n $this->dir1->addChildren($this->dir3);\n\n $obj->onMovedDocument($this->dir3);\n $this->assertFileExists($this->directory . \"/1/3\");\n }", "public static function move($_path, $_target)\r\n {\r\n return rename($_path, $_target);\r\n }", "public function move(string $from, string $to) : bool\n {\n $absoluteFrom = $this->absolutePath($from);\n $absoluteTo = $this->absolutePath($to);\n\n if ($absoluteFrom == $absoluteTo)\n return true;\n\n $parts = explode('/', $absoluteTo);\n $folderTo = implode('/', array_splice($parts, 0, count($parts) - 1));\n\n $old = umask(0);\n $this->fileSystem()->makeDirectory($folderTo, 0777, true, true);\n umask($old);\n\n return $this->fileSystem()->move($absoluteFrom, $absoluteTo);\n }", "public function move($path){\n\t\t$oldPath = $this->path;\n\t\t$path_array = explode(self::DS, $this->path);\n\t\t$fileName = $path_array[sizeof($path_array) - 1];\n\t\t$newPath = $path . self::DS . $fileName;\n\t\t$this->path = $newPath;\n\t\t$this->createFile($newPath);\n\t\tunlink($oldPath);\n\t}", "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "public function move($source, $dest);", "public function move($sourcePath, $destinationPath, $checkIfIsUploaded = false, $overwrite = true);", "public function move(string $source, string $destination)\n {\n $this->filesystem->move(\n $this->relativeToRoot($source),\n $this->relativeToRoot($destination)\n );\n }", "public function checkMove($source, $destination) {\n\t\t$sourceNode = $this->tree->getNodeForPath($source);\n\t\tif (!$sourceNode instanceof Node) {\n\t\t\treturn;\n\t\t}\n\t\tlist($sourceDir, ) = \\Sabre\\HTTP\\URLUtil::splitPath($source);\n\t\tlist($destinationDir, ) = \\Sabre\\HTTP\\URLUtil::splitPath($destination);\n\n\t\tif ($sourceDir !== $destinationDir) {\n\t\t\t$sourceNodeFileInfo = $sourceNode->getFileInfo();\n\t\t\tif ($sourceNodeFileInfo === null) {\n\t\t\t\tthrow new NotFound($source . ' does not exist');\n\t\t\t}\n\n\t\t\tif (!$sourceNodeFileInfo->isDeletable()) {\n\t\t\t\tthrow new Forbidden($source . \" cannot be deleted\");\n\t\t\t}\n\t\t}\n\t}", "function __moveUploadedFile($source, $destination) {\r\n\t\tif (!Configure::read('Documents.isTesting')) {\r\n\t\t\treturn move_uploaded_file($source, $destination);\r\n\t\t} else {\r\n\t\t\treturn rename($source, $destination);\r\n\t\t}\r\n\r\n\t}", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }", "public function testMoveMessageException()\n {\n $this->assertSame($this->funcForTestMove(\"exception\"), \"exception\");\n }", "public function testMove(): void\n {\n $this->document1->setResourceSegment('/products/news/content1-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n // move\n $this->document1->setResourceSegment('/products/asdf/content2-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/news/content1-news');\n $newNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals(\n $this->documentInspector->getNode($this->document1),\n $newNode->getPropertyValue('sulu:content')\n );\n\n // get content from new path\n $result = $this->phpcrMapper->loadByResourceLocator('/products/asdf/content2-news', 'sulu_io', 'de');\n $this->assertEquals($this->document1->getUuid(), $result);\n\n // get content from history should throw an exception\n $this->expectException(ResourceLocatorMovedException::class);\n $this->phpcrMapper->loadByResourceLocator('/products/news/content1-news', 'sulu_io', 'de');\n }", "function moveDIR($dir,$dest=\"\",$debug,$nMode=0755) {\n //$debug = 1;\n $result=true;\n\n //if($debug) { echo \"<h2>Moving directory</h2><p> From:<br> $dir <br>To: $dest</p>\";}\n\n $path = dirname(__FILE__);\n $files = scandir($dir);\n\n foreach($files as $file) {\n if (substr( $file ,0,1) != \".\") {\n $pathFile = $dir.'/'.$file;\n if (is_dir($pathFile)) {\n //if($debug) { echo \"<p><b>Directory:</b> $pathFile</p>\"; }\n\n $newDir = $dest.\"/\".$file;\n\n if (!moveDIR($pathFile,$newDir,$debug)) {\n $result = false;\n }\n\n } else {\n //echo ($debug) ? \"<p>$pathFile is a file</p>\" : \"\";\n\n // $currentFile = realpath($file); // current location\n $currentFile = $pathFile;\n\n $newFile = $dest.\"/\".$file;\n\n if (!file_exists($dest)) {\n makeDIR($dest,0,$nMode);\n }\n // if file already exists remove it\n if (file_exists($newFile)) {\n //if($debug) { echo \"<p>File $newFile already exists - Deleting</p>\"; }\n unlink($newFile);\n } else {\n //if($debug) { echo \"<p>File $newFile doesn't exist yet</p>\"; }\n }\n\n // Move via rename\n // rename(oldname, newname)\n if (rename($currentFile , $newFile)) {\n (CHMOD == 1) ? chmod($newFile, 0755) : '';\n //if($debug) { echo \"<p>Moved $currentFile to $newFile</p>\"; }\n } else {\n //if($debug) { echo \"<p>Failed to move $currentFile to $newFile</p>\"; }\n $result = false;\n } // END rename \n\n } // END if dir or file\n } // end if no dot\n } // END foreach\n return $result;\n }", "protected function _move($source, $targetDir, $name) {\r\n\t\treturn false;\r\n\t}", "public function testMoveSuccess_zipSubfolder()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function move($sourcePath, $destinationPath) {\n\n\t\t$sourceNode = $this->getNodeForPath($sourcePath);\n\t\tif ($sourceNode instanceof \\Sabre_DAV_ICollection and $this->nodeExists($destinationPath)) {\n\t\t\tthrow new \\Sabre_DAV_Exception_Forbidden('Could not copy directory ' . $sourceNode . ', target exists');\n\t\t}\n\t\tlist($sourceDir,) = \\Sabre_DAV_URLUtil::splitPath($sourcePath);\n\t\tlist($destinationDir,) = \\Sabre_DAV_URLUtil::splitPath($destinationPath);\n\n\t\tFilesystem::rename($sourcePath, $destinationPath);\n\n\t\t$this->markDirty($sourceDir);\n\t\t$this->markDirty($destinationDir);\n\n\t}", "public function move(string $directory, string $name = null): File\n {\n $reflector = new \\ReflectionMethod($this, 'move');\n if ($reflector->getDeclaringClass()->getName() !== get_class($this)) {\n throw new \\BadFunctionCallException(sprintf('%s must override method \\'move\\' method.', get_class($this)));\n }\n\n return parent::move($directory, $name);\n }", "public function testMove()\n {\n $this->rlpMapper->save($this->content1, '/products/news/content1-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n // move\n $this->rlpMapper->move('/products/news/content1-news', '/products/asdf/content2-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->session->getNode('/cmf/default/routes/de/products/news/content1-news');\n $newNode = $this->session->getNode('/cmf/default/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals($this->content1, $newNode->getPropertyValue('sulu:content'));\n\n // get content from new path\n $result = $this->rlpMapper->loadByResourceLocator('/products/asdf/content2-news', 'default', 'de');\n $this->assertEquals($this->content1->getIdentifier(), $result);\n\n // get content from history should throw an exception\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorMovedException');\n $result = $this->rlpMapper->loadByResourceLocator('/products/news/content1-news', 'default', 'de');\n }", "function moveFiles($src, $dest)\n{\n if (!is_dir($src)) {\n return false;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n rename($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else {\n if (!$f->isDot() && $f->isDir()) {\n rmDirRecursive($f->getRealPath(), \"$dest/$f\");\n unlink($f->getRealPath());\n }\n }\n }\n unlink($src);\n}", "public function testMoveFileFromTmp(): void\n {\n $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';\n\n $this->assertFalse($this->mediaDirectory->isExist($expectedFilePath));\n\n $this->imageUploader->moveFileFromTmp('magento_small_image.jpg');\n\n $this->assertTrue($this->mediaDirectory->isExist($expectedFilePath));\n }", "public function move(DirectoryInterface $directory, string $name = null): void\n {\n if ( ! $this->exists() ) {\n throw new FileSystemException('can not move not existing file: '.$this->filename);\n }\n\n if ( ! $directory->exists() ) {\n throw new FileSystemException('can not move to not existing target directories: '.$directory->getPath());\n }\n\n if ( false !== strpos(str_replace('\\\\', '/', $name), '/') ) {\n throw new FileSystemException('name parameter can not contain slashes');\n }\n\n $name = $name ?? $this->filename;\n\n $done = rename(\n $this->getPathname(),\n $directory->getPath().'/'.$name\n );\n\n if ( ! $done ) {\n throw new FileSystemException('moving failed, probably due to access issues');\n }\n\n $this->directory = $directory;\n $this->filename = $name;\n $this->extension = pathinfo($name, PATHINFO_EXTENSION);\n $this->basename = basename($name, '.'.$this->extension);\n }", "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "public function testOnNewDirectoryWithIllegalArgumentException() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n try {\n\n $obj->onNewDirectory($this->doc1);\n } catch (Exception $ex) {\n\n $this->assertInstanceOf(IllegalArgumentException::class, $ex);\n $this->assertEquals(\"The document must be a directory\", $ex->getMessage());\n }\n }", "public function upload_move($file, $local_file);", "public function move($source, $target)\n {\n \n }", "public function move($new_path)\n\t{\n\t\t$info = pathinfo($this->path);\n\t\t$new_path = $this->area->get_path($new_path);\n\n\t\t$new_path = rtrim($new_path, '\\\\/').DS.$info['basename'];\n\n\t\t$return = $this->area->rename($this->path, $new_path);\n\t\t$return and $this->path = $new_path;\n\t\t\n\t\treturn $return;\n\t}", "function movefile($POSTfrom, $POSTto, $currentdir) {\n\tif(count($POSTto) == 1) { //if the user selected only one \"move to\" location\n\t\tforeach($POSTfrom as $fromItem => $n1) { //$fromItem returns selected file/folder name to be moved, $n is checkbox status\n\t\t\tforeach($POSTto as $toItem => $n2) {//$toItem returns selected folder to have the files put in\n\t\t\t\tif(!file_exists($currentdir . \"/\" . $toItem . \"/\" . $fromItem)) {\n\t\t\t\t\tif(rename($currentdir . \"/\" . $fromItem, $currentdir . \"/\" . $toItem . \"/\" . $fromItem)) { //if rename worked, do nothing. Else, echo an error. Since rename() can rename a folder, it is possible to rename a file/folder to its new directory and have linux move it accourdingly\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ($fromItem == $toItem) { //if user tries to move the same folder into its self\n\t\t\t\t\t\techo \"<p><b>Error</b>: Could not move file or folder <b>\" . $fromItem . \"</b>. You cannot move a file into its self. Everything before it was moved.</p>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<p><b>Error</b>: Could not move file or folder <b>\" . $fromItem . \"</b>. Everything before it was moved.</p>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo \"<p><b>Error</b>: File already exists in the folder you want to move it to. Everything before <b>\" . $fromItem . \"</b> has been moved.</p>\";\n\t\t\t\t\techo \"<p>Rename file if you want to move it.</p>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\techo \"<p><b>Error</b>: You selected more than one destination folder, or none at all. Or, you might have not selected anything to move.</p>\";\n\t\treturn false;\n\t}\n\t\n\treturn true; // If everything worked out, return true\n}", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "public static function move(string $src, string $target)\n {\n if( is_null($src) || is_null($target) )\n {\n return false;\n } \n\n if( Storage::getDefaultDriver() === 'local' )\n {\n //Use File facade since Storage facade points to app/storage by default\n\n $target = sprintf('%s/%s',public_path(),$target);\n \n if( ! File::exists($src) )\n {\n return false;\n }\n\n return File::move($src,$target); \n }\n\n else \n {\n if( ! Storage::has($src) )\n {\n return false;\n } \n\n return Storage::move($src,$target);\n }\n }", "public function move($destination,$filename){\n\t\tif(!is_uploaded_file($this->getPathname())){\n\t\t\tthrow new \\Exception('File couldn\\'t be uploaded!');\n\t\t}\n\n\t\t/// chceck that destination directory exists\n\t\tif(!is_dir($destination)){\n\t\t\t/// try to create the directory\n if(false === @mkdir($destination,0777,true) && !is_dir($destination)){\n throw new \\Exception('Can\\'t create directory \"'.$destination.'\"');\n }\n }\n /// check access rights\n else if(!is_writable($destination)){\n throw new \\Exception('Can\\'t write to directory \"'.$destination.'\"');\n }\n\n /// determine target path\n $target = rtrim($destination,'/\\\\').DIRECTORY_SEPARATOR.$this->getFilename($filename);\n\n\t\t/// move the file\n\t\tif(!@move_uploaded_file($this->getPathname(), $target)){\n\t\t\tthrow new \\Exception('Can\\'t move the file from \"'.$this->getPathname().'\" to \"'.$target.'\"');\n\t\t}\n\n\t\t/// set access rights\n\t\t@chmod($target,0666 & ~umask());\n\n\t\treturn $target;\n\t}", "public function move(string $destination, ?string $name = null, ?string $ext = null): bool {\n $path = explode(self::SEPARATOR, $this->getPath());\n $old_name = $path[count($path) - 1];\n $ext = $ext ?? (strpos($old_name, \".\") !== false ? explode(\".\", $old_name)[count(explode(\".\", $old_name)) - 1] : '');\n $ext = $ext !== '' ? \".\" . $ext : '';\n $name = $name ?? $old_name;\n if(substr($destination, -strlen($destination)) !== self::SEPARATOR) $destination .= self::SEPARATOR;\n return rename($this->getPath(), $destination . $name . $ext);\n }", "private function _moveImagesToNewFileSystem()\n\t{\n\t\tif (!Image::testFileSystem())\n\t\t\t$this->_errors[] = Tools::displayError('Error: your server configuration is not compatible with the new image system. No images were moved');\n\t\telse\n\t\t{\n\t\t\tini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value\n\t\t\t$this->max_execution_time = (int)ini_get('max_execution_time');\t\n\t\t\t$result = Image::moveToNewFileSystem($this->max_execution_time);\n\t\t\tif ($result === 'timeout')\n\t\t\t\t$this->_errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on \\\"Move images\\\" again to resume moving images');\n\t\t\telseif ($result === false)\n\t\t\t\t$this->_errors[] = Tools::displayError('Error: some or all images could not be moved.');\n\t\t}\n\t\treturn (sizeof($this->_errors) > 0 ? false : true);\n\t}", "public function move(string $fromPath, string $toPath, array $mimeType) : bool\n {\n $fromPath = $this->normalizePath($fromPath);\n\n $toPath = $this->normalizePath($toPath);\n\n // If plain/text, its a folder\n if (substr($mimeType['mimetype'], 0, 4) === 'text') {\n $action = 'GetFolderByServerRelativeUrl(\\''.$this->folderPath.$fromPath.'\\')/moveTo(newUrl=\\''.$this->folderPath.$toPath.'\\')';\n } else {\n $action = 'GetFileByServerRelativeUrl(\\''.$this->folderPath.$fromPath.'\\')/moveTo(newUrl=\\''.$this->folderPath.$toPath.'\\', flags=1)';\n }\n\n $options = [\n 'headers' => $this->requestHeaders,\n ];\n\n $response = $this->send('POST', $action, $options);\n\n return $response->getStatusCode() === 200 ? true : false;\n }", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function move($sDestinationFileName);", "function _moveFile($sourceDir, $destDir, $filename) {\n\t\t$currentFilePath = $sourceDir . DIRECTORY_SEPARATOR . $filename;\n\t\t$destinationPath = $destDir . DIRECTORY_SEPARATOR . $filename;\n\n\t\tif (!rename($currentFilePath, $destinationPath)) {\n\t\t\t$message = __('admin.fileLoader.moveFileFailed', array('filename' => $filename,\n\t\t\t\t'currentFilePath' => $currentFilePath, 'destinationPath' => $destinationPath));\n\t\t\t$this->addExecutionLogEntry($message, SCHEDULED_TASK_MESSAGE_TYPE_ERROR);\n\n\t\t\t// Script should always stop if it can't manipulate files inside\n\t\t\t// its own directory system.\n\t\t\tfatalError($message);\n\t\t}\n\n\t\treturn $destinationPath;\n\t}", "public function move( $dest )\n\t\t{\n\t\t\tif( $this->path )\n\t\t\t{\n\t\t\t\tFileSystem::move( $this->path, $dest );\n\t\t\t\t$this->path = $dest;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\System\\Base\\InvalidOperationException(\"attempt to perform action on empty Folder object\");\n\t\t\t}\n\t\t}", "public function move_to_slideshow_dir()\n\t{\n\t\t\n\t\t$file_name = substr($this->file_handler[\"name\"], 0, strrpos($this->file_handler[\"name\"], \".\"));\n\t\t$file_name = $file_name . \"-\" . time();\n\t\t$file_name = $file_name . \".\" . pathinfo($this->file_handler['name'], PATHINFO_EXTENSION);\n\t\t$file_name = strtolower($file_name);\n\t\t\n\t\t$new_file_name = $this->base_path . $file_name;\n\n\t\t\n\t\tif(move_uploaded_file($this->file_handler[\"tmp_name\"], $new_file_name))\n\t\t\treturn $this->relative_path . $file_name;\n\t\telse\n\t\t\treturn false;\n\t}", "public function moveDirectory( $source, $destination )\n {\n $path = explode( DS, $source );\n\n $destination = $destination . DS . $path[ count( $path ) - 1 ];\n\n $result = $this->copyDirectory( $source, $destination, TRUE );\n\n if ( TRUE === $result )\n {\n $result = $this->deleteDirectory( $source );\n }\n\n return $result;\n }", "public function move($uid) {\n\n $uid = str::slug($uid);\n\n if(empty($uid)) {\n throw new Exception('The uid is missing');\n }\n\n // don't do anything if the uid exists\n if($this->uid() === $uid) return true;\n\n // check for an existing page with the same UID\n if($this->siblings()->not($this)->find($uid)) {\n throw new Exception('A page with this uid already exists');\n }\n\n $dir = $this->isVisible() ? $this->num() . '-' . $uid : $uid;\n $root = dirname($this->root()) . DS . $dir;\n\n if(!dir::move($this->root(), $root)) {\n throw new Exception('The directory could not be moved');\n }\n\n $this->dirname = $dir;\n $this->root = $root;\n $this->uid = $uid;\n\n // assign a new id and uri\n $this->id = $this->uri = ltrim($this->parent->id() . '/' . $this->uid, '/');\n\n // clean the cache\n $this->kirby->cache()->flush();\n $this->reset();\n return true;\n\n }", "public function method_MOVE( $destination, $overwrite, $path )\n{\n $multistatus = new DAV_Multistatus();\n \n // This might generate an exception, but that's OK:\n $retval = ($destination[0] == '/')\n ? $this->method_COPY( $destination, $overwrite )\n : $this->method_COPY_external( $destination, $overwrite );\n \n foreach ( $this as $member ) {\n try {\n $deeppath = DAV::slashify($path) . $member;\n $deepdest = DAV::slashify($destination) . (\n $destination[0] == '/' ? $member : DAV::urlencode($member)\n );\n $resource = DAV_Server::inst()->resource($deeppath);\n if (!$resource)\n $multistatus->addStatus(\n $deeppath, new DAV_Status(\n REST::HTTP_INTERNAL_SERVER_ERROR,\n \"Resource not found: $deeppath\"\n )\n );\n elseif ( $resource instanceof DAV_Collection )\n $resource->method_MOVE( $deepdest, $overwrite, $deeppath );\n elseif ($destination[0] == '/')\n $resource->method_MOVE( $deepdest, $overwrite );\n else\n $resource->method_MOVE_external( $deepdest, $overwrite );\n }\n catch (DAV_Status $e) {\n $multistatus->addStatus($deeppath, $e);\n }\n catch (DAV_Multistatus $e) {\n $multistatus->mergeWith($e);\n }\n }\n if ( count( $multistatus->statuses() ) )\n throw $multistatus;\n \n try { $this->method_DELETE(); }\n catch (DAV_Status $e) {}\n \n return $retval;\n}", "private function moveMigration($arguments){\n\n $migrationPathWillBeMoved=staticPathModel::getProjectPath($arguments['move']).'/'.utils::getAppVersion($arguments['move']).'/migrations/schemas/'.$arguments['schema'];\n $newPath=root.'/'.staticPathModel::$storeMigrationsPath.'/schemas/'.$arguments['schema'];\n\n\n $migrationPurePath=str_replace(root.'/','',$migrationPathWillBeMoved);\n $migrationNamespace=str_replace('/','\\\\',$migrationPurePath);\n $newMigrationNamespace=str_replace('/','\\\\',str_replace(root.'/','',$newPath));\n\n\n if(rename($migrationPathWillBeMoved,$newPath)){\n\n foreach (glob($newPath.\"/*.php\") as $filename) {\n utils::changeClass($filename,[\n $migrationNamespace=>$newMigrationNamespace\n ]);\n }\n\n echo 'migration named '.$arguments['schema'].' in '.$arguments['move'].' project has been successfully moved';\n echo PHP_EOL;\n }\n\n\n $migrationSeedPathWillBeMoved=staticPathModel::getProjectPath($arguments['move']).'/'.utils::getAppVersion($arguments['move']).'/migrations/seeds';\n $newSeedPath=root.'/'.staticPathModel::$storeMigrationsPath.'/seeds';\n\n\n $migrationSeedPurePath=str_replace(root.'/','',$migrationSeedPathWillBeMoved);\n $migrationSeedNamespace=str_replace('/','\\\\',$migrationSeedPurePath);\n $newMigrationSeedNamespace=str_replace('/','\\\\',str_replace(root.'/','',$newSeedPath));\n\n if(rename($migrationSeedPathWillBeMoved,$newSeedPath)){\n\n foreach (glob($newSeedPath.\"/*.php\") as $filename) {\n utils::changeClass($filename,[\n $migrationSeedNamespace=>$newMigrationSeedNamespace\n ]);\n }\n\n echo 'migration seeds named '.$arguments['schema'].' in '.$arguments['move'].' project has been successfully moved';\n\n }\n }", "public function move(string $path, string $target): bool\n {\n return rename($path, $target);\n }", "public function move($path)\n {\n return move_uploaded_file($this->tmp, $path);\n }", "public function moveUploadedFile($source, $dest)\n {\n if (!is_dir($dest)) {\n throw new UploadableDirectoryNotFoundException(sprintf('File \"%s\" cannot be moved because that directory does not exist!',\n $dest\n ));\n }\n\n return $this->doMoveUploadedFile($source, $dest);\n }", "public function test_factory_not_exist()\n {\n Directory::factory(ROOT.DS.'test_dir');\n }", "public function renameDirectory(DirectoryInterface $directory, string $newName): DirectoryInterface;", "public function moveTo($destination) {}", "function move_file($path) {\n $pathto = 'upload/'.$path;\n move_uploaded_file( $_FILES['new_file']['tmp_name'], $pathto) or\n die( \"Le format du fichier n\\'est pas compatibe !\");\n\n return $pathto;\n}", "public static function x_move($source, $destination, $overwrite = false) {\n // source is array\n if (is_array($source)) {\n $result = true;\n foreach($source as $s) {\n $result = self::x_move($s, $destination, $overwrite) && $result;\n }\n return $result;\n }\n\n // target not existing\n // => rename\n // target file\n // => rename if overwrite\n if (!self::file_exists($destination) || $overwrite)\n return self::rename($source, $destination);\n\n // source is file and target folder\n // => rename if target not exists\n $new_dest = new Path($destination->getPath().DIRECTORY_SEPARATOR.basename($source->getPath()), $destination->getType());\n if (self::is_file($source) && self::is_dir($destination) && !self::file_exists($new_dest))\n return self::rename($source, $new_dest);\n }", "function move($src, $dest)\n\t{\n\t\treturn rename($src, $dest);\n\t}", "public function testCopyDirectoryReturnsFalseIfSourceIsntDirectory()\n {\n $origin = self::$temp.DS.'breeze'.DS.'boom'.DS.'foo'.DS.'bar'.DS.'baz';\n $this->assertFalse(Storage::cpdir($origin, self::$temp));\n }", "function _pm_update_move_files($src_dir, $dest_dir, $skip_list, $remove_conflicts = TRUE) {\n $items_to_move = drush_scan_directory($src_dir, '/.*/', array_merge(array('.', '..'), $skip_list), 0, FALSE, 'filename', 0, TRUE);\n foreach ($items_to_move as $filename => $info) {\n if ($remove_conflicts) {\n drush_delete_dir($dest_dir . '/' . basename($filename));\n }\n if (!file_exists($dest_dir . '/' . basename($filename))) {\n $move_result = drush_move_dir($filename, $dest_dir . '/' . basename($filename));\n }\n }\n return TRUE;\n}", "function move($pathFrom , $pathTo, $overwrite = true)\r\n\t{\r\n\t\tif (file_exists($pathTo)) {\r\n\t\t\tif ($overwrite) {\r\n\t\t\t\tunlink($pathTo);\r\n\t\t\t\t$ok = rename($pathFrom, $pathTo);\r\n\t\t\t} else {\r\n\t\t\t\t$ok = false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$ok = rename($pathFrom, $pathTo);\r\n\t\t}\r\n\t\treturn $ok;\r\n\t}", "public static function move($path, $target)\n\t{\n\t\treturn rename($path, $target);\n\t}", "function make_move_build($build_path) {\n $tmp_path = make_tmp();\n $ret = TRUE;\n if ($build_path == '.') {\n $info = drush_scan_directory($tmp_path . DIRECTORY_SEPARATOR . '__build__', '/./', array('.', '..'), 0, FALSE, 'filename', 0, TRUE);\n foreach ($info as $file) {\n $destination = $build_path . DIRECTORY_SEPARATOR . $file->basename;\n if (file_exists($destination)) {\n // To prevent the removal of top-level directories such as 'modules' or\n // 'themes', descend in a level if the file exists.\n // TODO: This only protects one level of directories from being removed.\n $files = drush_scan_directory($file->filename, '/./', array('.', '..'), 0, FALSE);\n foreach ($files as $file) {\n $ret = $ret && drush_copy_dir($file->filename, $destination . DIRECTORY_SEPARATOR . $file->basename, FILE_EXISTS_MERGE);\n }\n }\n else {\n $ret = $ret && drush_copy_dir($file->filename, $destination);\n }\n }\n }\n else {\n drush_mkdir(dirname($build_path));\n $ret = drush_move_dir($tmp_path . DIRECTORY_SEPARATOR . '__build__', $tmp_path . DIRECTORY_SEPARATOR . basename($build_path), TRUE);\n $ret = $ret && drush_copy_dir($tmp_path . DIRECTORY_SEPARATOR . basename($build_path), $build_path);\n }\n\n // Copying to final destination resets write permissions. Re-apply.\n if (drush_get_option('prepare-install')) {\n $default = $build_path . '/sites/default';\n chmod($default . '/settings.php', 0666);\n chmod($default . '/files', 0777);\n }\n\n if (!$ret) {\n drush_set_error('MAKE_CANNOT_MOVE_BUILD', dt(\"Cannot move build into place.\"));\n }\n return $ret;\n}", "static function move($path, $handler)\r\n {\r\n Route::route(\"MOVE\", $path, $handler);\r\n }", "protected function onMove(){\n\t\tif (empty($this->post['directory']) || empty($this->post['file'])) return;\n\t\t\n\t\t$rename = empty($this->post['newDirectory']) && !empty($this->post['name']);\n\t\t$dir = $this->getDir($this->post['directory']);\n\t\t$file = realpath($dir . '/' . $this->post['file']);\n\t\t\n\t\t$is_dir = is_dir($file);\n\t\tif (!$this->checkFile($file) || (!$rename && $is_dir))\n\t\t\treturn;\n\t\t\n\t\tif ($rename || $is_dir){\n\t\t\tif (empty($this->post['name'])) return;\n\t\t\t$newname = $this->getName($this->post['name'], $dir);\n\t\t\t$fn = 'rename';\n\t\t}else{\n\t\t\t$newname = $this->getName(pathinfo($file, PATHINFO_FILENAME), $this->getDir($this->post['newDirectory']));\n\t\t\t$fn = !empty($this->post['copy']) ? 'copy' : 'rename';\n\t\t}\n\t\t\n\t\tif (!$newname) return;\n\t\t\n\t\t$ext = pathinfo($file, PATHINFO_EXTENSION);\n\t\tif ($ext) $newname .= '.' . $ext;\n\t\t$fn($file, $newname);\n\t\t\n\t\techo json_encode(array(\n\t\t\t'name' => pathinfo($this->normalize($newname), PATHINFO_BASENAME),\n\t\t));\n\t}", "private function copiarExistenciaDir($directorio = null, $nombre = null) {\n\t\t\tif(is_dir($directorio) == true):\n\t\t\t\t$nombre = (is_string($nombre) == true) ? $nombre : $this->raw['nombre'];\n\t\t\t\treturn move_uploaded_file($this->raw['temporal'], implode(DIRECTORY_SEPARATOR, array($directorio, $nombre)));\n\t\t\telse:\n\t\t\t\treturn null;\n\t\t\tendif;\n\t\t}", "public function moveOrCopy\n (\n $target_directory,\n $target_name = '',\n $replace = false,\n $target_filesystem_type,\n $move_or_copy = 'copy'\n ) {\n\n /** Defaults */\n if ($target_directory == '') {\n $target_directory = $this->parent;\n }\n\n if ($target_name == '' && $this->is_file) {\n if ($target_directory == $this->parent) {\n throw new FilesystemException\n ('Ftp Filesystem ' . $move_or_copy\n . ': Must specify new file name when using the same target path: '\n . $this->path);\n }\n $target_name = $this->name;\n }\n\n if ($this->is_file === true) {\n $base_folder = $this->parent;\n } else {\n $base_folder = $this->path;\n }\n\n /** Edits */\n if (file_exists($this->path)) {\n } else {\n throw new FilesystemException\n ('Ftp Filesystem moveOrCopy: failed. This path does not exist: '\n . $this->path . ' Specified as source for ' . $move_or_copy\n . ' operation to ' . $target_directory);\n }\n\n if (file_exists($target_directory)) {\n } else {\n throw new FilesystemException\n ('Ftp Filesystem moveOrCopy: failed. This path does not exist: '\n . $this->path . ' Specified as destination for ' . $move_or_copy\n . ' to ' . $target_directory);\n }\n\n if (is_writeable($target_directory) === false) {\n throw new FilesystemException\n ('Ftp Filesystem Delete: No write access to file/path: ' . $target_directory);\n }\n\n if ($move_or_copy == 'move') {\n if (is_writeable($this->path) === false) {\n throw new FilesystemException\n ('Ftp Filesystem Delete: No write access for moving source file/path: '\n . $move_or_copy);\n }\n }\n\n if ($this->is_file === true || $target_name == '') {\n\n } else {\n if (is_dir($target_directory . '/' . $target_name)) {\n\n } else {\n\n new fsAdapter('write', $target_directory, $target_filesystem_type,\n $this->options = array('file' => $target_name)\n );\n }\n $target_directory = $target_directory . '/' . $target_name;\n $target_name = '';\n }\n\n /** Create new target directories from source directories list */\n if (count($this->directories) > 0) {\n\n asort($this->directories);\n\n $parent = '';\n $new_node = '';\n $new_path = '';\n\n foreach ($this->directories as $directory) {\n\n $new_path = $this->build_new_path($directory, $target_directory, $base_folder);\n\n if (is_dir($new_path)) {\n\n } else {\n\n $parent = dirname($new_path);\n $new_node = basename($new_path);\n\n new fsAdapter('write', $parent, $target_filesystem_type,\n $this->options = array('file' => $new_node)\n );\n }\n\n $parent = '';\n $new_node = '';\n $new_path = '';\n }\n }\n\n /** Copy files now that directories are in place */\n if (count($this->files) > 0) {\n\n $path_name = '';\n $file_name = '';\n\n foreach ($this->files as $file) {\n\n $new_path = $this->build_new_path($file, $target_directory, $base_folder);\n\n /** Single file copy or move */\n if ($this->is_file === true) {\n $file_name = $target_name;\n } else {\n $file_name = basename($file);\n }\n\n /** Source */\n $adapter = new fsAdapter('Read', $file);\n $data = $adapter->fs->data;\n\n /** Write Target */\n new fsAdapter('Write', $new_path, $target_filesystem_type,\n $this->options = array(\n 'file' => $file_name,\n 'replace' => $replace,\n 'data' => $data,\n )\n );\n\n $path_name = '';\n $file_name = '';\n }\n }\n\n /** For move, remove the files and folders just copied */\n if ($move_or_copy == 'move') {\n $this->_deleteDiscoveryFilesArray();\n $this->_deleteDiscoveryDirectoriesArray();\n }\n\n return true;\n }", "public function move($folder)\r\n\t{\r\n\t\tif (!$folder || !$folder->id && $this->getValue(\"name\") != \"/\")\r\n\t\t\treturn false;\r\n\t\t$this->setValue(\"parent_id\", $folder->id);\r\n\t\treturn $this->save();\r\n\t}", "function moveFolder($user_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}", "public function move(sfAssetFolder $new_parent)\n {\n // controls\n if($this->getNode()->isRoot())\n {\n throw new sfAssetException('The root folder cannot be moved');\n }\n else if($new_parent->hasSubFolder($this->getName()))\n {\n throw new sfAssetException('The target folder \"%folder%\" already contains a folder named \"%name%\". The folder has not been moved.', array('%folder%' => $new_parent, '%name%' => $this->getName()));\n }\n else if($new_parent->getNode()->isDescendantOf($this))\n {\n throw new sfAssetException('The target folder cannot be a subfolder of moved folder. The folder has not been moved.');\n }\n else if ($this->getId() == $new_parent->getId())\n {\n return;\n }\n \n $old_path = $this->getFullPath();\n \n $this->getNode()->moveAsLastChildOf($new_parent);\n $this->save();\n \n $descendants = $this->getNode()->getChildren();\n $descendants = $descendants ? $descendants : array();\n \n // move its assets\n self::movePhysically($old_path, $this->getFullPath());\n \n foreach ($descendants as $descendant)\n {\n // Update relative path\n $descendant->save();\n }\n \n // else: nothing to do\n }", "public static function move($path, $target)\n {\n return rename($path, $target);\n }", "function move_uploaded_file_to_temp_directory($file, $destination_sufix_name) {\n do {\n $temp_destination = WORK_PATH.'/'.make_string(10).'_'.$destination_sufix_name;\n } while (is_file($temp_destination));\n \n if (move_uploaded_file($file, $temp_destination)) {\n return $temp_destination;\n } // if\n\n return false;\n }", "function move_file($name)\n{\n $old_file = __DIR__ . '/xml_schemas/' . $name . '.xml';\n $new_file = Path::get_repository_path() . 'lib/content_object/' . $name . '/install/' . $name . '.xml';\n Filesystem::copy_file($old_file, $new_file);\n return $new_file;\n}", "protected function moveFolderRequest(Requests\\MoveFolderRequest $request)\n {\n // verify the required parameter 'src_path' is set\n if ($request->srcPath === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $srcPath when calling moveFolder');\n }\n // verify the required parameter 'dest_path' is set\n if ($request->destPath === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $destPath when calling moveFolder');\n }\n\n $resourcePath = '/slides/storage/folder/move/{srcPath}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->destPath !== null) {\n $queryParams['destPath'] = ObjectSerializer::toQueryValue($request->destPath);\n }\n // query params\n if ($request->srcStorageName !== null) {\n $queryParams['srcStorageName'] = ObjectSerializer::toQueryValue($request->srcStorageName);\n }\n // query params\n if ($request->destStorageName !== null) {\n $queryParams['destStorageName'] = ObjectSerializer::toQueryValue($request->destStorageName);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"srcPath\", $request->srcPath);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'PUT');\n }", "public function should_throw_if_trying_to_build_on_non_existing_directory(): void\n {\n $this->expectException(\\InvalidArgumentException::class);\n new DirectorySnapshot(__DIR__ . '/not-existing');\n }", "function FilesMoveToFolder()\r\n{\r\n global $PH;\r\n\r\n $file_ids= getPassedIds('file','files_*');\r\n\r\n if(!$file_ids) {\r\n $PH->abortWarning(__(\"Select some files to move\"));\r\n exit();\r\n }\r\n\r\n\r\n\r\n /**\r\n * by default render list of folders...\r\n */\r\n $target_id=-1;\r\n\r\n /**\r\n * ...but, if folder was given, directly move files...\r\n */\r\n $folder_ids= getPassedIds('folder','folders_*');\r\n if(count($folder_ids) == 1) {\r\n if($folder_task= Task::getVisibleById($folder_ids[0])) {\r\n $target_id= $folder_task->id;\r\n }\r\n }\r\n\r\n /**\r\n * if no folders was selected, move files to project root\r\n */\r\n else if(get('from_selection')) {\r\n $target_id= 0;\r\n }\r\n\r\n\r\n if($target_id != -1) {\r\n\r\n\r\n if($target_id != 0){\r\n if(!$target_task= Task::getEditableById($target_id)) {\r\n $PH->abortWarning(__(\"insufficient rights\"));\r\n\r\n }\r\n ### get path of target to check for cycles ###\r\n $parent_tasks= $target_task->getFolder();\r\n $parent_tasks[]= $target_task;\r\n }\r\n else {\r\n $parent_tasks=array();\r\n }\r\n\r\n\r\n $count=0;\r\n foreach($file_ids as $id) {\r\n if($file= File::getEditableById($id)) {\r\n\r\n $file->parent_item= $target_id;\r\n $file->update();\r\n }\r\n else {\r\n $PH->messages[]= sprintf(__(\"Can not edit file %s\"), $file->name);\r\n }\r\n }\r\n\r\n ### return to from-page? ###\r\n if(!$PH->showFromPage()) {\r\n $PH->show('home');\r\n }\r\n exit();\r\n }\r\n #else if($target_id != -1) {\r\n # $PH->abortWarning(__(\"insufficient rights to edit any of the selected items\"));\r\n #}\r\n\r\n\r\n\r\n\r\n /**\r\n * build page folder lists...\r\n */\r\n\r\n ### get project ####\r\n if(!$file= File::getVisibleById($file_ids[0])) {\r\n $PH->abortWarning(\"could not get file\", ERROR_BUG);\r\n }\r\n\r\n if(!$project= Project::getVisibleById($file->project)) {\r\n $PH->abortWarning(\"file without project?\", ERROR_BUG);\r\n }\r\n\r\n\r\n ### set up page and write header ####\r\n {\r\n $page= new Page(array('use_jscalendar'=>false, 'autofocus_field'=>'company_name'));\r\n $page->cur_tab='projects';\r\n $page->type= __(\"Edit files\");\r\n $page->title=\"$project->name\";\r\n $page->title_minor=__(\"Select folder to move files into\");\r\n\r\n $page->crumbs= build_project_crumbs($project);\r\n\r\n $page->options[]= new NaviOption(array(\r\n 'target_id' =>'filesMoveToFolder',\r\n ));\r\n\r\n echo(new PageHeader);\r\n }\r\n echo (new PageContentOpen);\r\n\r\n\r\n ### write form #####\r\n {\r\n ### write files as hidden entry ###\r\n foreach($file_ids as $id) {\r\n if($file= File::getEditableById($id)) {\r\n echo \"<input type=hidden name='files_{$id}_chk' value='1'>\";\r\n }\r\n }\r\n\r\n\r\n ### write list of folders ###\r\n {\r\n require_once(confGet('DIR_STREBER') . 'lists/list_tasks.inc.php');\r\n $list= new ListBlock_tasks();\r\n $list->reduced_header= true;\r\n $list->query_options['show_folders']= true;\r\n #$list->query_options['folders_only']= true;\r\n $list->query_options['project']= $project->id;\r\n $list->groupings= NULL;\r\n $list->block_functions= NULL;\r\n $list->id= 'folders';\r\n $list->no_items_html= __('No folders available');\r\n unset($list->columns['status']);\r\n unset($list->columns['date_start']);\r\n unset($list->columns['days_left']);\r\n unset($list->columns['created_by']);\r\n unset($list->columns['label']);\r\n unset($list->columns['project']);\r\n\r\n $list->functions= array();\r\n\r\n $list->active_block_function = 'tree';\r\n\r\n\r\n $list->print_automatic($project,NULL);\r\n }\r\n\r\n echo __(\"(or select nothing to move to project root)\"). \"<br> \";\r\n\r\n echo \"<input type=hidden name='from_selection' value='1'>\"; # keep flag to ungroup files\r\n echo \"<input type=hidden name='project' value='$project->id'>\";\r\n $button_name=__(\"Move items\");\r\n echo \"<input class=button2 type=submit value='$button_name'>\";\r\n\r\n $PH->go_submit='filesMoveToFolder';\r\n\r\n }\r\n echo (new PageContentClose);\r\n echo (new PageHtmlEnd());\r\n\r\n}", "public function moveFile($filename, $key);", "public function testCannotMoveWhenMove()\r\n {\r\n $this->myTestcar = new Car(new moveCarState());\r\n $this->myTestcar->move();\r\n }", "public static function assertExists($path) {\n if (self::pathExists($path)) {\n return;\n }\n\n // Before we claim that the path doesn't exist, try to find a parent we\n // don't have \"+x\" on. If we find one, tailor the error message so we don't\n // say \"does not exist\" in cases where the path does exist, we just don't\n // have permission to test its existence.\n foreach (self::walkToRoot($path) as $parent) {\n if (!self::pathExists($parent)) {\n continue;\n }\n\n if (!is_dir($parent)) {\n continue;\n }\n\n if (phutil_is_windows()) {\n // Do nothing. On Windows, there's no obvious equivalent to the\n // check below because \"is_executable(...)\" always appears to return\n // \"false\" for any directory.\n } else if (!is_executable($parent)) {\n // On Linux, note that we don't need read permission (\"+r\") on parent\n // directories to determine that a path exists, only execute (\"+x\").\n throw new FilesystemException(\n $path,\n pht(\n 'Filesystem path \"%s\" can not be accessed because a parent '.\n 'directory (\"%s\") is not executable (the current process does '.\n 'not have \"+x\" permission).',\n $path,\n $parent));\n }\n }\n\n throw new FilesystemException(\n $path,\n pht(\n 'Filesystem path \"%s\" does not exist.',\n $path));\n }", "protected function _moveToImageDir()\n\t{\n\t\t$path = $this->getFilePath();\n\t\t$this->_uploadedFile->moveTo($path);\n\t\tchmod($path, 0644);\n\t}", "public function moveFile($oldPath, $newPath, $filename)\n {\n // TODO: Implement moveFile() method.\n }", "public function move($from, $to)\n\t{\n\t\trename($from, $this->base_location . \"/\" . $to);\n\t}", "public function testOnDeletedDirectoryWithIllegalArgumentException() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n try {\n\n $obj->onDeletedDirectory($this->doc1);\n } catch (Exception $ex) {\n\n $this->assertInstanceOf(IllegalArgumentException::class, $ex);\n $this->assertEquals(\"The document must be a directory\", $ex->getMessage());\n }\n }", "function move($msg_index, $folder='INBOX.Processed') {\n\n // move on server\n\n imap_mail_move($this->conn, $msg_index, $folder);\n\n imap_expunge($this->conn);\n // re-read the inbox\n $this->inbox();\n}", "public function assertIsDirectory($path);", "public function moveTo($targetPath): void\n {\n $this->ensureUploadedFileIsValid();\n\n if (empty($targetPath) || !is_string($targetPath)) {\n throw new InvalidArgumentException('Invalid path provided.');\n }\n\n if ($this->file !== null) {\n if (PHP_SAPI === 'cli') {\n $this->hasMoveTo = rename($this->file, $targetPath);\n } else {\n $this->hasMoveTo = move_uploaded_file($this->file, $targetPath);\n }\n } elseif ($this->stream !== null) {\n if ($this->stream->isSeekable()) {\n $this->stream->rewind();\n }\n\n try {\n $dst = new Stream($targetPath, 'w');\n } catch (Throwable $e) {\n throw new RuntimeException(\"Target path cannot be opened: \" . $e->getMessage(), $e->getCode(), $e);\n }\n\n while (!$this->stream->eof()) {\n if ($dst->write($this->stream->read(1024000)) === 0) {\n throw new RuntimeException(\"Error occurred while writing stream to target.\");\n }\n }\n\n $this->hasMoveTo = true;\n }\n\n if ($this->hasMoveTo === false) {\n throw new RuntimeException('Unable to move uploaded file to ' . $targetPath);\n }\n }", "public function moveUploadedFile($filename, $key);" ]
[ "0.77261436", "0.7507489", "0.7113042", "0.6941977", "0.6908604", "0.67369854", "0.6474342", "0.6204443", "0.6170524", "0.6140496", "0.6086301", "0.6080597", "0.6074179", "0.60411793", "0.5988749", "0.5920087", "0.59006655", "0.58893067", "0.58556426", "0.58260906", "0.5819664", "0.578769", "0.57804203", "0.57619363", "0.574939", "0.57319474", "0.5708597", "0.56621516", "0.565725", "0.56099707", "0.55860454", "0.5584399", "0.55822706", "0.5580288", "0.55784625", "0.55720085", "0.5565581", "0.5561645", "0.55565953", "0.5526652", "0.5513373", "0.5511826", "0.54961574", "0.5490764", "0.5468887", "0.5461961", "0.5456894", "0.545455", "0.54537386", "0.5427242", "0.5425641", "0.53852683", "0.5381955", "0.5346349", "0.53321636", "0.533045", "0.53239566", "0.53137994", "0.5287292", "0.52694285", "0.5247322", "0.5244004", "0.5236897", "0.52365625", "0.5233679", "0.52302235", "0.5227634", "0.52211505", "0.52089095", "0.5195739", "0.51926893", "0.51835275", "0.5172847", "0.5168531", "0.51675326", "0.51485133", "0.5139957", "0.51226074", "0.5121921", "0.50894904", "0.5088841", "0.5083169", "0.507344", "0.5064381", "0.50631815", "0.50594085", "0.5054211", "0.5053126", "0.505038", "0.5046313", "0.5043456", "0.5039755", "0.50097007", "0.50054437", "0.5005274", "0.50016356", "0.49987283", "0.4982849", "0.49820513", "0.49804944" ]
0.798785
0
Test for Directory::remove() Create and remove [ROOT]/test_dir
public function test_remove() { $path = ROOT.DS.'test_dir'; $object = Directory::create($path); $object->remove($path); $this->assertFalse(is_dir($path)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "public function test_mkdir_and_rmdir() {\n /**\n * Test creating a single directory\n */\n $dir = 'dir1';\n $uri = 'test://'.$dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri);\n $this->assertFileExists($path);\n rmdir($uri);\n $this->assertFileNotExists($path);\n\n /**\n * Test creating multiple directories recursively as needed\n */\n $dir = 'dir2/dir3/dir4';\n $uri = 'test://' . $dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri, 0777, true);\n\n $error_tripped = false;\n $this->assertFileExists($path);\n try {\n $return = rmdir('test://dir2');\n }\n catch (PHPUnit_Framework_Error $e) {\n $error_tripped = true;\n }\n\n $this->assertTrue($error_tripped, \"rmdir() on a non-empty directory should trigger an error.\");\n $this->assertTrue(wp_rmdir_recursive('test://dir2'));\n $this->assertFileNotExists($this->test_dir.'/dir2');\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function testDeleteDirectory()\n {\n $this->createTestDirectories(\n array(\n '/artifacts/foo/12345',\n '/artifacts/foo/67890',\n )\n );\n\n $this->createTestFile( '/artifacts/foo/12345/bar.txt' );\n $this->createTestFile( '/artifacts/foo/67890/bar.txt' );\n $this->createTestFile( '/artifacts/foo/bar.txt' );\n $this->createTestFile( '/artifacts/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/artifacts' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/artifacts' );\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "protected function tearDown()\n {\n $test_dirs = array(\n ROOT.DS.'test_dir',\n ROOT.DS.'test_new_dir',\n SYSTEM.DS.'test_dir',\n );\n foreach($test_dirs as $f){\n is_dir($f) and rmdir($f);\n }\n }", "protected function removeTestFilePath()\n {\n $path = $this->getTestFilePath();\n FileHelper::removeDirectory($path);\n }", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function testDeleteDirectoryWithLinksAndSymlinks()\n {\n if ( !function_exists( 'link' ) || !function_exists( 'symlink' ) )\n {\n $this->markTestSkipped( 'Missing \"link\" or \"symlink\" function.' );\n return;\n }\n\n $this->createTestDirectories( array( '/logs/foo/12345' ) );\n $this->createTestFile( '/logs/foo/12345/bar.txt' );\n\n $file = PHPUC_TEST_DIR . '/logs/foo/12345/bar.txt';\n\n link( $file, PHPUC_TEST_DIR . '/logs/bar.txt' );\n symlink( $file, PHPUC_TEST_DIR . '/logs/foo/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/logs' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/logs' );\n }", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }", "public function remove_dir() {\n\n $path = $this->get_upload_pres_path();\n\n //append_debug_msg($path);\n\n if(!$path || !file_exists($path)){ return; }\n delete_dir($path);\n }", "function remove_dir($path) {\n\t\tif (file_exists($path) && is_dir($path))\n\t\t\trmdir($path);\n\t}", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "protected function tearDown()\n {\n if (file_exists(\"{$this->dir}/file1.mock\")) unlink(\"{$this->dir}/file1.mock\");\n if (file_exists(\"{$this->dir}/file2.mock\")) unlink(\"{$this->dir}/file2.mock\");\n if (file_exists(\"{$this->dir}/dir1/file3.mock\")) unlink(\"{$this->dir}/dir1/file3.mock\");\n if (file_exists(\"{$this->dir}/dir1/file4.mock\")) unlink(\"{$this->dir}/dir1/file4.mock\");\n if (file_exists(\"{$this->dir}/dir1\")) rmdir(\"{$this->dir}/dir1\");\n\n if (file_exists(sys_get_temp_dir().'/def/xyz.mock')) unlink(sys_get_temp_dir().'/def/xyz.mock'); \n if (file_exists(sys_get_temp_dir().'/def')) rmdir(sys_get_temp_dir().'/def'); \n\n if (file_exists($this->dir.\"/abc.mock\")) unlink($this->dir.\"/abc.mock\");\n if (file_exists($this->dir.\"/def.mock\")) unlink($this->dir.\"/def.mock\");\n\n if (file_exists(sys_get_temp_dir().'/abc/def/xy/abc.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/abc.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy/dd.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/dd.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy')) rmdir(sys_get_temp_dir().'/abc/def/xy'); \n if (file_exists(sys_get_temp_dir().'/abc/def')) rmdir(sys_get_temp_dir().'/abc/def'); \n if (file_exists(sys_get_temp_dir().'/abc')) rmdir(sys_get_temp_dir().'/abc'); \n \n if (file_exists(\"{$this->dir}/dir2\")) rmdir(\"{$this->dir}/dir2\");\n if (file_exists($this->dir)) rmdir($this->dir);\n \n Config_Mock_Unserialize:$created = array();\n unset(Q\\Transform::$drivers['from-mock']);\n }", "function cleanUpTmpFiles($target){\n if (is_dir($target)) {\n $files = glob($target . '*', GLOB_MARK); //GLOB_MARK adds a slash to directories returned\n\n foreach ($files as $file) {\n cleanUpTmpFiles($file);\n }\n\n // Checks if dir is empty\n if (!(new FilesystemIterator($target))->valid()) {\n rmdir($target);\n }\n } elseif (is_file($target)) {\n unlink($target);\n }\n}", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "public function testRemoveDummyTestFileAfterDoneTest()\n {\n unlink(TESTING_STORE);\n\n // boolean result must be === false\n $this->assertFalse(file_exists(TESTING_STORE));\n }", "public function tearDown(): void\n {\n if (is_dir($this->tmpPath)) {\n if (file_exists($this->oldFile)) {\n unlink($this->oldFile);\n }\n if (file_exists($this->origFile)) {\n unlink($this->origFile);\n }\n if (file_exists($this->newFile)) {\n unlink($this->newFile);\n }\n if (is_dir($this->newDir)) {\n if (file_exists($this->newDirFile)) {\n unlink($this->newDirFile);\n }\n rmdir($this->newDir);\n }\n rmdir($this->tmpPath);\n }\n }", "public function tearDown() {\n\t\tif(is_dir('/tmp/clara')) {\n\t\t\t$this->rrmdir('/tmp/clara');\n\t\t}\n\t}", "public function testOnDeletedDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $this->dir3->setParent($this->dir1); // This directory was moved.\n\n $obj->onDeletedDirectory($this->dir3);\n $this->assertFileNotExists($this->directory . \"/1/3\");\n\n $obj->onDeletedDirectory($this->dir2);\n $this->assertFileNotExists($this->directory . \"/1/2\");\n\n $obj->onDeletedDirectory($this->dir1);\n $this->assertFileNotExists($this->directory . \"/1\");\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "abstract function delete_dir($filepath);", "function remove_client_dir(){\n\t\t$cmd=\"rm -rf $this->client_dir\";\n\t\t`$cmd`;\n\t}", "protected function tearDown()\n {\n \\RPI\\Foundation\\Helpers\\FileUtils::delTree(__DIR__.\"/LESSPHPTest/ROOT\");\n }", "public static function removeTempDir()\n {\n $tmpDir = self::getTempDir();\n\n array_map('unlink', glob(\"$tmpDir/*.*\"));\n array_map('unlink', glob(\"$tmpDir/*/*.*\"));\n array_map('unlink', glob(\"$tmpDir/*/*/*.*\"));\n array_map('unlink', glob(\"$tmpDir/*/*/*/*.*\"));\n array_map('unlink', glob(\"$tmpDir/*/*/*/*/*.*\"));\n array_map('rmdir', glob(\"$tmpDir/*/*/*/*\", GLOB_ONLYDIR));\n array_map('rmdir', glob(\"$tmpDir/*/*/*\", GLOB_ONLYDIR));\n array_map('rmdir', glob(\"$tmpDir/*/*\", GLOB_ONLYDIR));\n array_map('rmdir', glob(\"$tmpDir/*\", GLOB_ONLYDIR));\n is_dir($tmpDir) and rmdir($tmpDir);\n }", "private function cleanTmp()\n {\n // cleanup files in tmp\n $dir = ELAB_ROOT . '/uploads/tmp';\n $di = new \\RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\n $ri = new \\RecursiveIteratorIterator($di, \\RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($ri as $file) {\n $file->isDir() ? rmdir($file) : unlink($file);\n }\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "function eraseTempDir() {\n FileSystem::removeDirectory($this->getTestDir(), true);\n $this->testDir = null;\n }", "public function tearDown()\n {\n if (file_exists($this->__testFilePath)) {\n unlink($this->__testFilePath);\n }\n if (is_dir($this->__testFileDir)) {\n rmdir($this->__testFileDir);\n }\n }", "protected function createRealTestdir() {}", "function rrmdir($path)\n{\n exec(\"rm -rf {$path}\");\n}", "public function test_remove_files() \n {\n $mockedModel = $this->getMock('TestModel', ['path', 'get_offset', 'empty_directory']);\n $mockedModel->expects($this->once())\n ->method('path')\n ->will($this->returnValue('foo/bar'));\n\n $mockedModel->expects($this->once())\n ->method('get_offset')\n ->will($this->returnValue(3));\n\n $mockedModel->expects($this->once())\n ->method('empty_directory')\n ->with('foo', true);\n\n $this->testModel->remove_files($mockedModel);\n }", "public function testDeleteFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new DeleteFolderRequest();\n $request->setPath( \"OutResult/Create\");\n $request->setStorageName( \"\");\n $request->setRecursive( 'true');\n $this->instance->deleteFolder($request);\n }", "function clear_local($dir){\n \n$di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\n$ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST);\nforeach ( $ri as $file ) {\n $file->isDir() ? rmdir($file) : unlink($file);\n}\n\n\n\n}", "protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }", "function tearDown() {\n\t\t$this->wfRecursiveRemoveDir( $this->tmpName );\n\t}", "function wpdev_rm_dir($dir) {\r\n\r\n if (DIRECTORY_SEPARATOR == '/')\r\n $dir=str_replace('\\\\','/',$dir);\r\n else\r\n $dir=str_replace('/','\\\\',$dir);\r\n\r\n $files = glob( $dir . '*', GLOB_MARK );\r\n debuge($files);\r\n foreach( $files as $file ){\r\n if( is_dir( $file ) )\r\n $this->wpdev_rm_dir( $file );\r\n else\r\n unlink( $file );\r\n }\r\n rmdir( $dir );\r\n }", "public function delete_with_dir() {\n if(!empty($this->username && $this->id)) {\n if($this->delete()) {\n $target = SITE_PATH . DS . 'admin' . DS . $this->image_path . DS . $this->username;\n if(is_dir($target)){\n $this->delete_files_in_dir($target);\n return rmdir($target) ? true : false;\n echo \"yes\";\n }\n }else{\n return true;\n }\n }else{\n return false;\n }\n }", "function delete_user_dir($userId) {\n\t$userDir=get_user_dir($userId);\t\n\tif($userDir) {\t\t\n\t\t//File destination\n\t\t$userPath=FS_PATH.$userDir;\"some/dir/*.txt\";\n\t\tarray_map('unlink', glob(FS_PATH.$userDir.\"/*.*\"));\n\t\tif(rmdir($userPath)) { \n\t\t\treturn true;\n\t\t} else return false;\t\t\n\t} else {\n\t\terror_log(\"delete_user_dir: user_dir could not be found.\",0);\n\t\treturn false;\n\t}\n}", "public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }", "function fud_rmdir($dir, $deleteRootToo=false)\n{\n\tif(!$dh = @opendir($dir)) {\n\t\treturn;\n\t}\n\twhile (false !== ($obj = readdir($dh))) {\n\t\tif($obj == '.' || $obj == '..') {\n\t\t\tcontinue;\n\t\t}\n\t\tif (!@unlink($dir .'/'. $obj)) {\n\t\t\tfud_rmdir($dir .'/'. $obj, true);\n\t\t}\n\t}\n\tclosedir($dh);\n\tif ($deleteRootToo) {\n\t\t@rmdir($dir);\n\t}\n\treturn;\n}", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "function delete_dir_with_file($target)\n{\n if (is_dir($target)) {\n $files = glob($target . '*', GLOB_MARK); //GLOB_MARK adds a slash to directories returned\n\n foreach ($files as $file) {\n delete_dir_with_file($file);\n }\n\n if (file_exists($target)) {\n rmdir($target);\n }\n } elseif (is_file($target)) {\n unlink($target);\n }\n}", "function cleanTemporaryDirectory($tmpTopdir, $tmpdir, $tmpfile)\n{\n global $tmpCreated;\n $deletedir = NULL;\n\n /* if this script created tmp directory, delete tmp directory */\n if ($tmpCreated) {\n $deleteDir = $tmpTopdir;\n } else {\n $deleteDir = $tmpdir;\n unlink($tmpfile);\n }\n\n deleteDirectory($deleteDir);\n}", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "function rrmdir($path) {\n // Open the source directory to read in files\n $i = new DirectoryIterator($path);\n foreach($i as $f) {\n if($f->isFile()) {\n unlink($f->getRealPath());\n } else if(!$f->isDot() && $f->isDir()) {\n rrmdir($f->getRealPath());\n }\n }\n rmdir($path);\n}", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function testDeleteFile()\n {\n\n }", "public function delete()\n {\n $filesystem = $this->localFilesystem(dirname($this->path));\n\n method_exists($filesystem, 'deleteDir')\n ? $filesystem->deleteDir(basename($this->path))\n : $filesystem->deleteDirectory(basename($this->path));\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "public function testEmptyDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory]);\n \n $this->assertFalse($this->mockFileUploadDir->hasChild('bar'));\n $this->assertFileExists(vfsStream::url('foo'));\n }", "function deleteFolder();", "public static function cleanUp()\n {\n foreach (glob(static::getYamlRoot() . '*') as $file) {\n is_file($file) and unlink($file);\n }\n foreach (glob('{' . static::getEntitiesRoot() . '*,' . static::getProxiesRoot() . '*' . '}', GLOB_BRACE) as $file) {\n is_file($file) and unlink($file);\n is_dir(basename($file)) and rmdir(basename($file));\n is_dir($file) and rmdir($file);\n }\n !is_dir(static::getYamlRoot()) and mkdir(static::getYamlRoot(), 0777, true);\n !is_dir(static::getEntitiesRoot()) and mkdir(static::getEntitiesRoot(), 0777, true);\n !is_dir(static::getProxiesRoot()) and mkdir(static::getProxiesRoot(), 0777, true);\n }", "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "protected function tearDown()\n {\n unlink(__DIR__.'/foo.graphql');\n unlink(__DIR__.'/schema/bar.graphql');\n unlink(__DIR__.'/schema/baz.graphql');\n\n if (is_dir(__DIR__.'/schema')) {\n rmdir(__DIR__.'/schema');\n }\n }", "function ftp_rm_dir($rmt_dir, $isRecursive=false, $useWhiteList=true) {\n\t\t$rmt_dir = rtrim($rmt_dir, '/');\n\t\tprv_ftp_rm_dir($rmt_dir, $isRecursive, $useWhiteList);\n\t}", "protected function cleanDirectories()\n {\n $filesystem = new Filesystem();\n\n $filesystem->cleanDirectory($this->getSeedFilePath());\n\n $filesystem->cleanDirectory(database_path('factories'));\n }", "function remove_directory($src)\n{\n $dir = opendir($src);\n while(false !== ( $file = readdir($dir)) )\n\t{\n if (( $file != '.' ) && ( $file != '..' ))\n\t\t{\n $full = $src . '/' . $file;\n\t\t\t\n if ( is_dir($full) )\n\t\t\t{\n remove_directory($full);\n }\n else\n\t\t\t{\n unlink($full);\n }\n }\n }\n closedir($dir);\n rmdir($src);\n}", "public function clean()\n {\n if ( is_dir( $this->_strDirectory ) ) {\n $h = opendir($this->_strDirectory);\n while ($h && $f = readdir($h)) { \n if ( $f != '.' && $f != '..') {\n $fn = $this->_strDirectory . '/' . $f;\n if ( is_dir($fn) ) {\n $dir = new Sys_Dir($fn);\n $dir->delete();\n } else {\n $file = new Sys_File( $fn );\n $file->delete();\n }\n }\n }\n\t if ( $h ) { closedir( $h ); }\n \n }\n }", "public function on_delete() {\n $this->remove_dir();\n }", "function delete_directory($dirname) {\n if (is_dir($dirname))\n $dir_handle = opendir($dirname);\nif (!$dir_handle)\n return false;\nwhile($myfile = readdir($dir_handle)) {\n if ($myfile != \".\" && $myfile != \"..\") {\n if (!is_dir($dirname.\"/\".$myfile))\n unlink($dirname.\"/\".$myfile);\n else\n delete_directory($dirname.'/'.$myfile);\n }\n}\nclosedir($dir_handle);\nrmdir($dirname);\nreturn true;\n}", "public function _after(UnitTester $I)\n {\n if (file_exists($this->fileWithDir)) {\n unlink($this->fileWithDir);\n }\n }", "function eliminarDirectorio($directorio){\n foreach(glob($directorio . \"/*\") as $archivos_carpeta){\n if (is_dir($archivos_carpeta)){\n eliminarDirectorio($archivos_carpeta);\n }\n else{\n unlink($archivos_carpeta);\n }\n }\n rmdir($directorio);\n}", "function remove_dir_rec($dirtodelete)\n{\n if ( strpos($dirtodelete,\"../\") !== false )\n die(_NONPUOI);\n if ( false !== ($objs = glob($dirtodelete . \"/*\")) )\n {\n foreach ( $objs as $obj )\n {\n is_dir($obj) ? remove_dir_rec($obj) : unlink($obj);\n }\n }\n rmdir($dirtodelete);\n}", "public function removeAction() {\n $result = array('status' => 'failed');\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('remove') == 'true') {\n $dirName = Mage::getBaseDir('code').'/local/Balticode/Postoffice';\n if (is_dir($dirName) && file_exists($dirName.'/etc/config.xml')) {\n $directory = new Varien_Io_File();\n $deleteResult = $directory->rmdir($dirName, true);\n if ($deleteResult) {\n $result['status'] = 'success';\n }\n }\n \n }\n $this->getResponse()->setRawHeader('Content-type: application/json');\n $this->getResponse()->setBody(json_encode($result));\n return;\n }", "function deletedirectory($path)\n{\n $files = glob($path . '*', GLOB_MARK);\n foreach ($files as $file)\n {\n unlink($file);\n }\n rmdir($path);\n}", "function cleanDir($path) {\n if(file_exists($path) && is_dir($path)){\n\t\t$dirHandle = opendir($path);\n\t\twhile(false!==($file = readdir($dirHandle))){\n\t\t\tif($file!='.' && $file!='..' && $file!='db_upload.php'){\n\t\t\t\t$tmpPath = $path.'/'.$file;\n\t\t\t\tchmod($tmpPath, 0777);\n\t\t\t\tif(is_dir($tmpPath)){\n\t\t\t\t\tcleanDir($tmpPath);\n\t\t\t\t} else {\n\t\t\t\t\tif(!unlink($tmpPath)){\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\tclosedir($dirHandle);\n \n\t} else {\n\t\treturn false;\n\t}\n}", "public function testGetRoot() {\n\t\t$max_size = 32;\n\t\t$ttl = 60;\n\n\t\t$cache_dir = Utils\\get_temp_dir() . uniqid( 'wp-cli-test-file-cache', true );\n\n\t\t$cache = new FileCache( $cache_dir, $ttl, $max_size );\n\t\t$this->assertSame( $cache_dir . '/', $cache->get_root() );\n\t\tunset( $cache );\n\n\t\t$cache = new FileCache( $cache_dir . '/', $ttl, $max_size );\n\t\t$this->assertSame( $cache_dir . '/', $cache->get_root() );\n\t\tunset( $cache );\n\n\t\t$cache = new FileCache( $cache_dir . '\\\\', $ttl, $max_size );\n\t\t$this->assertSame( $cache_dir . '/', $cache->get_root() );\n\t\tunset( $cache );\n\n\t\trmdir( $cache_dir );\n\t}", "public function tearDown(): void\n {\n File::deleteDirectory($this->rootDir, true);\n\n parent::tearDown();\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "function delete_tmp_folder_content()\n{\n\t$baseDir = '../backups/tmp/';\n\t$files = scandir($baseDir);\n\tforeach ($files as $file) \n\t{\n\t\tif ( ($file != '.') && ($file != '..') && ($file != '.htaccess') ) \n\t\t{\n\t\t\tif ( is_dir($baseDir . $file) ) recursive_deletion($baseDir.$file.'/');\n\t\t\telse unlink('../backups/tmp/' . $file);\n\t\t}\n\t}\n}", "function recursive_deletion($baseDir)\n{\n\t$files = scandir($baseDir);\n\tforeach ($files as $file) \n\t{\n\t\tif ( ($file != '.') && ($file != '..') ) \n\t\t{\n\t\t\tif ( is_dir($baseDir . $file) ) recursive_deletion($baseDir.$file.'/');\n\t\t\telse unlink($baseDir . $file);\n\t\t}\n\t}\n\trmdir($baseDir);\n}", "protected function cleanup()\n {\n $cleanupDirNames = ['Repository', 'Voter', 'Entity', 'Form', '../templates'];\n foreach ($cleanupDirNames as $cleanupDirName) {\n if (is_dir($dir = __DIR__ . '/App/src/' . $cleanupDirName)) {\n $this->rrmdir($dir);\n }\n }\n // Entity-dir must exist or locators for entity will fail (doctrine functionality; cannot be changed)\n mkdir(__DIR__.'/App/src/Entity');\n }", "function delete_files($target) { \n if(is_dir($target)){\n $files = glob( $target . '*', GLOB_MARK ); //GLOB_MARK adds a slash to directories returned\n \n foreach( $files as $file )\n {\n delete_files( $file ); \n }\n \n rmdir( $target );\n } elseif(is_file($target)) {\n unlink( $target ); \n }\n}", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function test_create_exists()\n {\n Directory::create(ROOT.DS.'application');\n }", "function delTree($dir) { \n\t $files = array_diff(scandir($dir), array('.','..')); \n\t foreach ($files as $file) { \n\t (is_dir(\"$dir/$file\")) ? delTree(\"$dir/$file\") : unlink(\"$dir/$file\"); \n\t } \n\t return rmdir($dir); \n\t}", "function delete_files($target) {\n if(is_dir($target)){\n $files = glob( $target . '*', GLOB_MARK ); //GLOB_MARK adds a slash to directories returned\n\n foreach( $files as $file ){\n delete_files( $file ); \n }\n\n rmdir( $target );\n } elseif(is_file($target)) {\n unlink( $target ); \n }\n}", "function delete() {\n global $USER;\n if($this->Dir !== 0 && $this->mayI(DELETE)) {\n $this->loadStructure();\n foreach($this->files as $file) {\n $file->delete();\n }\n foreach($this->folders as $folder) {\n $folder->delete();\n }\n rmdir($this->path);\n parent::delete();\n }\n }", "private function deleteOldTempdirs(){\n $dirname = FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH;\n $dircontents = scandir($dirname);\n foreach($dircontents as $file){\n if ( substr($file, 0,5) == 'temp_' &&\n is_dir($dirname.$file) &&\n filemtime( $dirname.$file ) < strtotime('now -2 days')) {\n $this->destroyDir($dirname.$file);\n }\n }\n }", "public function testUnlinkFile777(): void\n {\n $dirName = 'unlink';\n $basePath = $this->testFilePath . '/' . $dirName . '/';\n $filePath = $basePath . 'file.txt';\n\n $this->createFileStructure([\n $dirName => [\n 'file.txt' => 'test',\n ],\n ]);\n chmod($filePath, 777);\n\n FileHelper::unlink($filePath);\n\n $this->assertFileDoesNotExist($filePath);\n }", "function rrmdir($dir) {\nif (is_dir($dir)) {\n $objects = scandir($dir);\n foreach ($objects as $object) {\n if ($object != \".\" && $object != \"..\") {\n if (filetype($dir.\"/\".$object) == \"dir\") rrmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object);\n }\n }\n reset($objects);\n rmdir($dir);\n}\n}", "public static function tearDownAfterClass()\n {\n $fileSystemHelper = new FileSystemHelper(__DIR__ . '/cache');\n\n if (is_dir(__DIR__ . '/cache/builder') === true) {\n $fileSystemHelper->deleteFolderRecursively(__DIR__ . '/cache/builder');\n }\n }", "public function testDeleteRemovesStorages()\n {\n file_put_contents(self::$temp.DS.'file1.txt', 'Hello World');\n\n Storage::delete(self::$temp.DS.'file1.txt');\n $this->assertTrue(! is_file(self::$temp.DS.'file1.txt'));\n }", "function emptyDir($dir)\n{\n foreach (scandir($dir) as $basename) {\n $path = $dir . '/' . $basename;\n\n if (is_file($path)) {\n unlink($path);\n }\n }\n}", "function fn_rm($source, $delete_root = true, $pattern = '')\n{\n // Simple copy for a file\n if (is_file($source)) {\n $res = true;\n if (empty($pattern) || (!empty($pattern) && preg_match('/' . $pattern . '/', fn_basename($source)))) {\n $res = @unlink($source);\n }\n\n return $res;\n }\n\n // Loop through the folder\n if (is_dir($source) && $dir = dir($source)) {\n while (false !== $entry = $dir->read()) {\n // Skip pointers\n if ($entry == '.' || $entry == '..') {\n continue;\n }\n if (fn_rm($source . '/' . $entry, true, $pattern) == false) {\n return false;\n }\n }\n // Clean up\n $dir->close();\n\n return ($delete_root == true && empty($pattern)) ? @rmdir($source) : true;\n } else {\n return false;\n }\n}", "function clearDirUpload($dossier) {\r\n\t\t$ouverture=@opendir($dossier);\r\n\t\tif (!$ouverture) return false;\r\n\t\twhile($fichier=readdir($ouverture)) {\r\n\t\t\tif ($fichier == '.' || $fichier == '..' || $fichier == \".htaccess\") continue;\r\n\t\t\t\tif (is_dir($dossier.\"/\".$fichier)) {\r\n\t\t\t\t\t$r=clearDirUpload($dossier.\"/\".$fichier);\r\n\t\t\t\t\tif (!$r) return false;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$r=@unlink($dossier.\"/\".$fichier);\r\n\t\t\t\t\tif (!$r) return false;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\tclosedir($ouverture);\r\n\t\t$r=@rmdir($dossier);\r\n\t\tif (!$r) return false;\r\n\t\treturn true;\r\n\t}", "public function test_factory_not_exist()\n {\n Directory::factory(ROOT.DS.'test_dir');\n }", "function delete_folder($main_folder)\r\n{\r\n \r\n\t$dir = $main_folder;\r\n \tchmod($dir, 0755);\r\n \t$di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\r\n \t$ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST);\r\n \tforeach ( $ri as $file ) \r\n \t{\r\n \t $file->isDir() ? rmdir($file) : unlink($file);\r\n \t}\r\n \trmdir($dir);\r\n\r\n}", "function clean_temp_dir($dir='') {\n // that a mess may be piling up in $CFG->dataroot/temp/webworkquiz_import\n return true;\n \n if ($dir == '') {\n $dir = $this->temp_dir; \n }\n $slash = \"/\";\n\n // Create arrays to store files and directories\n $dir_files = array();\n $dir_subdirs = array();\n\n // Make sure we can delete it\n chmod($dir, 0777);\n\n if ((($handle = opendir($dir))) == FALSE) {\n // The directory could not be opened\n return false;\n }\n\n // Loop through all directory entries, and construct two temporary arrays containing files and sub directories\n while($entry = readdir($handle)) {\n if (is_dir($dir. $slash .$entry) && $entry != \"..\" && $entry != \".\") {\n $dir_subdirs[] = $dir. $slash .$entry;\n }\n else if ($entry != \"..\" && $entry != \".\") {\n $dir_files[] = $dir. $slash .$entry;\n }\n }\n\n // Delete all files in the curent directory return false and halt if a file cannot be removed\n for($i=0; $i<count($dir_files); $i++) {\n chmod($dir_files[$i], 0777);\n if (((unlink($dir_files[$i]))) == FALSE) {\n return false;\n }\n }\n\n // Empty sub directories and then remove the directory\n for($i=0; $i<count($dir_subdirs); $i++) {\n chmod($dir_subdirs[$i], 0777);\n if ($this->clean_temp_dir($dir_subdirs[$i]) == FALSE) {\n return false;\n }\n else {\n if (rmdir($dir_subdirs[$i]) == FALSE) {\n return false;\n }\n }\n }\n\n // Close directory\n closedir($handle);\n if (rmdir($this->temp_dir) == FALSE) {\n return false; \n }\n // Success, every thing is gone return true\n return true;\n }", "function gttn_tpps_rmdir($dir) {\n if (is_dir($dir)) {\n $children = scandir($dir);\n foreach ($children as $child) {\n if ($child != '.' and $child != '..') {\n if (is_dir($dir . '/' . $child) and !is_link($dir . '/' . $child)) {\n gttn_tpps_rmdir($dir . '/' . $child);\n }\n else {\n unlink($dir . '/' . $child);\n }\n }\n }\n rmdir($dir);\n }\n}", "function _removeDir($dir) {\r\n\t\tif(file_exists($dir)) {\r\n\t\t\tif($objs = glob($dir.\"/*\"))\r\n\t\t\t\tforeach($objs as $obj) {\r\n\t\t\t\t\tis_dir($obj) ? rmdir($obj) : unlink($obj);\r\n\t\t\t\t}\r\n\t\t\trmdir($dir);\r\n\t\t}\r\n\t}", "public function testDelete()\n {\n $sampleIndexDir = dirname(__FILE__) . '/_indexSample/_files';\n $tempIndexDir = dirname(__FILE__) . '/_files';\n if (!is_dir($tempIndexDir)) {\n mkdir($tempIndexDir);\n }\n\n $this->_clearDirectory($tempIndexDir);\n\n $indexDir = opendir($sampleIndexDir);\n while (($file = readdir($indexDir)) !== false) {\n if (!is_dir($sampleIndexDir . '/' . $file)) {\n copy($sampleIndexDir . '/' . $file, $tempIndexDir . '/' . $file);\n }\n }\n closedir($indexDir);\n\n\n $index = Zend_Search_Lucene::open($tempIndexDir);\n\n $this->assertFalse($index->isDeleted(2));\n $index->delete(2);\n $this->assertTrue($index->isDeleted(2));\n\n $index->commit();\n\n unset($index);\n\n $index1 = Zend_Search_Lucene::open($tempIndexDir);\n $this->assertTrue($index1->isDeleted(2));\n unset($index1);\n\n $this->_clearDirectory($tempIndexDir);\n }" ]
[ "0.7788672", "0.76651603", "0.7491406", "0.73429984", "0.73013794", "0.71828717", "0.715201", "0.6991792", "0.69013095", "0.6786815", "0.6779039", "0.6778822", "0.66575205", "0.66531", "0.65665174", "0.65494186", "0.6527012", "0.6483709", "0.6471884", "0.6419089", "0.6408338", "0.64025337", "0.6372909", "0.6368823", "0.63438916", "0.6334712", "0.63229966", "0.6289897", "0.6289009", "0.62825686", "0.6254813", "0.62541395", "0.6234262", "0.6226908", "0.6215088", "0.6209409", "0.61897206", "0.61865014", "0.61829394", "0.61633724", "0.6158894", "0.61496305", "0.6148944", "0.614789", "0.6144912", "0.6138055", "0.6129777", "0.61272043", "0.61152136", "0.6098247", "0.60969424", "0.60906756", "0.6084482", "0.60837156", "0.60818994", "0.60818994", "0.60396653", "0.60379845", "0.60353434", "0.6035312", "0.60211915", "0.6018004", "0.6004106", "0.6000951", "0.5995073", "0.59743226", "0.59593284", "0.59584755", "0.5948605", "0.59391654", "0.5929531", "0.59225684", "0.5913362", "0.58968085", "0.5894447", "0.58910775", "0.58817333", "0.5881146", "0.5878702", "0.5874233", "0.58707803", "0.5870314", "0.58666116", "0.58654463", "0.58654225", "0.58628565", "0.5860351", "0.58599573", "0.5857342", "0.58460844", "0.5838327", "0.5826785", "0.5825533", "0.58246964", "0.58237284", "0.58227843", "0.5822548", "0.5817999", "0.58167154", "0.58136153" ]
0.8669114
0
Test for Directory::scan() Scan the content of ROOT directory
public function test_scan() { $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_ASC); $output = array(); foreach($res as $f) $output[] = $f->get_base_name(); $this->assertEquals($content, $output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "function scan(SplFileInfo $fileInfo, $repository)\n{\n $baseName = $fileInfo->getBasename();\n if ($baseName === '.' || $baseName === '..') {\n return;\n }\n\n $file = new File($fileInfo);\n $repository->save($file);\n if ($fileInfo->isDir()) {\n foreach (new RecursiveDirectoryIterator($fileInfo) as $child) {\n scan($child, $repository);\n }\n }\n}", "function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}", "function scan_directory_recursively($directory, $filter=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\treturn FALSE;\n\t}elseif(is_readable($directory))\n\t{\n\t\t$directory_list = opendir($directory);\n\t\twhile($file = readdir($directory_list))\n\t\t{\n\t\t\tif($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn')\n\t\t\t{\n\t\t\t\t$path = $directory.'/'.$file;\n\t\t\t\tif(is_readable($path))\n\t\t\t\t{\n\t\t\t\t\t$subdirectories = explode('/',$path);\n\t\t\t\t\tif(is_dir($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => end($subdirectories),\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'kind' => 'directory',\n\t\t\t\t\t\t\t'content' => scan_directory_recursively($path, $filter));\n\t\t\t\t\t}elseif(is_file($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = end(explode('.',end($subdirectories)));\n\t\t\t\t\t\tif($filter === FALSE || $filter == $extension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get metadata and image dimensions\n\t\t\t\t\t\t\t$size = getimagesize($path, $info);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get containing directory of file\n\t\t\t\t\t\t\t$directory_array = explode('/', $path);\n\t\t\t\t\t\t\t$parent_folder = min($directory_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset title, caption, tags\n\t\t\t\t\t\t\t$title = $caption = $taglist = $tags = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path'\t\t=> dirname($path),\n\t\t\t\t\t\t\t'group'\t\t=> $parent_folder,\n\t\t\t\t\t\t\t'file'\t\t=> end($subdirectories),\n\t\t\t\t\t\t\t'extension' => $extension,\n\t\t\t\t\t\t\t'size'\t\t=> filesize($path),\n\t\t\t\t\t\t\t'width'\t\t=> $size[0],\n\t\t\t\t\t\t\t'height'\t=> $size[1],\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t\t\t\t'caption'\t=> $caption,\n\t\t\t\t\t\t\t'tags'\t\t=> $tags,\n\t\t\t\t\t\t\t'kind'\t\t=> 'file');\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\tclosedir($directory_list); \n\t\treturn $directory_tree;\n\t}else{\n\t\treturn FALSE;\t\n\t}\n}", "public function scan($filename){ }", "function scan_dir($dir, $type=array(),$only=FALSE, $allFiles=FALSE, $recursive=TRUE, $onlyDir=\"\", &$files){\n\t$handle = @opendir($dir);\n\tif(!$handle)\n\t\treturn false;\n\twhile ($file = @readdir ($handle))\n\t{\n\t\tif (eregi(\"^\\.{1,2}$\",$file) || $file == 'index.html')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif(!$recursive && $dir != $dir.$file.\"/\")\n\t\t{\n\t\t\tif(is_dir($dir.$file))\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(is_dir($dir.$file))\n\t\t{\n\t\t\tscan_dir($dir.$file.\"/\", $type, $only, $allFiles, $recursive, $file, $files);\n\t\t}\n\t\telse\n\t\t{\n if($only)\n\t\t\t\t$onlyDir = $dir;\n\n\t\t\t$files = buildArray($dir,$file,$onlyDir,$type,$allFiles,$files);\n\t\t}\n\t}\n\t@closedir($handle);\n\treturn $files;\n}", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "function dirscan_files($rootFolder){\n $fileNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (!is_dir($rootFolder.\"/\".$name)) $fileNames[]=$name;\n }\n sort($fileNames);\n return $fileNames;\n}", "public function dir_readdir() {}", "function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}", "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function backgroundScan() {\n\t\t$lastPath = null;\n\t\twhile (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) {\n\t\t\t$this->scan($path, self::SCAN_RECURSIVE, self::REUSE_ETAG);\n\t\t\t$this->cache->correctFolderSize($path);\n\t\t\t$lastPath = $path;\n\t\t}\n\t}", "protected static function _scanForPlugins(){\n\t\t$directory = __DIR__ . Config::$pluginsDirectory;\n\t\t$handle = opendir( $directory );\n\n\t\t// check to make sure we could open the directory handle\n\t\tif( !$handle )\n\t\t\treturn;\n\n\t\t// now begin looping through all of the contents of the plugin directory\n\t\twhile( ( $dir = readdir( $handle ) ) !== false ){\n\t\t\tif( $dir === '.' || $dir === '..' )\n\t\t\t\tcontinue;\n\n\t\t\t// now we need to verify that the current \"file\" is a directory before continuing\n\t\t\tif( !is_dir( $directory . $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// expect a class file to exist in the format \"class-<DirectoryName>.php\"\n\t\t\t$classFile = $directory . $dir . '/' . $dir . '.php';\n\t\t\tif( !file_exists( $classFile ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now actually include the code\n\t\t\trequire_once( $classFile );\n\n\t\t\t// now expect the class name to match whatever the $dir name was\n\t\t\tif( !class_exists( $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now we can instantiate the class name and store it now\n\t\t\tself::$_plugins[] = new $dir();\n\t\t}\n\t}", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "function l10n_drupal_files_scan($source = NULL, $automated = FALSE) {\n\n // We look for projects in the working directory.\n $workdir = variable_get('l10n_server_connector_l10n_drupal_files_directory', '');\n\n if (!is_dir($workdir)) {\n drupal_set_message(t('The configured directory (%workdir) cannot be found. <a href=\"@configure\">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/connectors/config/l10n_drupal/files'))));\n }\n else {\n // define a list of allowed extensions, we will use it later on file_scan_directory\n // and further regular expression buildung processing. Thanks to EugenMayer\n $allowed_file_extensions = array('.tar.gz', '.tgz');\n // build the regular expression\n foreach($allowed_file_extensions as $key => $extension) {\n // escape the file extensions for later regular expression usage\n $allowed_file_extensions[$key] = preg_quote($extension);\n }\n $file_extension_pattern = '(' . implode('|', $allowed_file_extensions) . ')$';\n\n // Packages are always .tar.gz files.\n $files = file_scan_directory($workdir, $file_extension_pattern);\n if (count($files)) {\n foreach ($files as $path => $file) {\n\n if (!l10n_drupal_is_supported_version($path)) {\n // Skip files for unsupported versions.\n continue;\n }\n\n // Get rid of $workdir prefix on file names, eg.\n // drupal-6.x-6.19.tar.gz\n // Drupal/drupal-4.6.7.tar.gz or\n // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.\n $path = $package = trim(preg_replace('!(^' . preg_quote($workdir, '!') . ')(.+)\\.tar\\.gz!', '\\2', $path), '/');\n\n // split the filename into parts to $filename_splitted\n // [0] = the full string\n // [1] = the subdirectory and filename with extension\n // [1] = the subdirectory and filename without extension\n // [2] = the extension .tar.gz or .tgz\n $file_splitted = array(); // ensure to be a array....\n // the regular expression pattern (i put it in a var because i can better handle it with dpm for debugging, move if you want...)\n $file_split_pattern = '!^'. preg_quote($workdir, '!') .'((.+)'. $file_extension_pattern .')!';\n preg_match( $file_split_pattern, $path, $file_splitted );\n // put the result in vars for better handling\n list($file_fullpath, $file_subpath_ext, $file_subpath, $file_extension) = $file_splitted;\n\n // redefine the path to subpath without slash at beginning\n $path = trim($file_subpath, '/');\n // same on package\n $package = trim($file_subpath, '/');\n $project_title = '';\n if (strpos($path, '/')) {\n // We have a slash, so this package is in a subfolder.\n // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.\n // Grab the directory name as project title.\n list($project_title, $package) = explode('/', $path);\n }\n if (strpos($package, '-')) {\n // Only remaining are the project uri and release,\n // eg. drupal-4.6.7 or ubercart-5.x-1.0-alpha8.\n list($project_uri, $release_version) = explode('-', $package, 2);\n\n l10n_drupal_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, trim($file_subpath_ext, '/'), filemtime($file->filename));\n }\n else {\n // File name not formatted properly.\n $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');\n }\n }\n }\n }\n\n $user_feedback = FALSE;\n $results = db_query_range(\"SELECT * FROM {l10n_server_release} WHERE pid IN (SELECT pid FROM {l10n_server_project} WHERE connector_module = 'l10n_drupal_files' AND status = 1) ORDER BY last_parsed ASC\", 0, variable_get('l10n_server_connector_l10n_drupal_files_limit', 1));\n while ($release = db_fetch_object($results)) {\n\n // Only parse file if something changed since we last parsed it.\n $file_name = $workdir . '/' . $release->download_link;\n\n if (file_exists($file_name)) {\n if (filemtime($file_name) > $release->last_parsed) {\n $result = l10n_drupal_parse_package($file_name, $release);\n\n // User feedback, if not automated. Log messages are already done.\n if (isset($result['error']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['error'], 'error');\n }\n elseif (isset($result['message']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['message']);\n }\n }\n else {\n if (!$automated) {\n $user_feedback = TRUE;\n drupal_set_message(t('@release was already parsed, no need to scan again.', array('@release' => $release->download_link)));\n }\n }\n }\n // Hackish update of last parsed time so other tarballs will get into the queue too.\n // @todo: work on something better for this.\n db_query(\"UPDATE {l10n_server_release} SET last_parsed = %d WHERE rid = %d\", time(), $release->rid);\n }\n if (!$automated && !$user_feedback) {\n drupal_set_message(t('No (new) local Drupal files found to scan in %workdir.', array('%workdir' => $workdir)));\n }\n\n // Ensure that a Drupal page will be displayed with the messages.\n return '';\n}", "function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }", "public function scanSourceFolders() {\n $this->addons = [];\n foreach ($this->sources as $sourceDir) {\n $this->scanSource($sourceDir);\n }\n }", "function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}", "static private function scan_dir( $dir ) {\n\t\t$ignored = array( '.', '..', '.svn', '.htaccess', 'test-log.log' );\n\n\t\t$files = array();\n\t\tforeach ( scandir( $dir ) as $file ) {\n\t\t\tif ( in_array( $file, $ignored ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$files[ $file ] = filemtime( $dir . '/' . $file );\n\t\t}\n\t\tarsort( $files );\n\t\t$files = array_keys( $files );\n\n\t\treturn ( $files ) ? $files : false;\n\t}", "function RecursiveScanDir($dir, $prefix = '') {\n\t$dir = rtrim($dir, '\\\\/');\n\t$result = array();\n\tforeach (scandir($dir) as $f) {\n if (\n preg_match('`/tmp/`', \"$dir/$f\")\n || preg_match('`/fpdf.php$`', \"$dir/$f\")\n || preg_match('`/libs/pi_barcode.php$`', \"$dir/$f\")\n || preg_match('`/libs/phpmailer/`', \"$dir/$f\")\n || preg_match('`/libs/securimage/`', \"$dir/$f\")\n || preg_match('`/libs/Smarty/`', \"$dir/$f\")\n )\n continue;\n\t\tif ($f !== '.' and $f !== '..') {\n\t\t\tif (is_dir(\"$dir/$f\")) {\n\t\t\t\t$result = array_merge($result, RecursiveScanDir(\"$dir/$f\", \"$prefix$f/\"));\n\t\t\t} else {\n\t\t\t\tif ( strtolower(substr(pathinfo($f,PATHINFO_EXTENSION),0,3)) == \"php\" && pathinfo(__FILE__,PATHINFO_BASENAME ) != pathinfo($f,PATHINFO_BASENAME ) )\n\t\t\t\t\t$result[] = $prefix.$f;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "public function scan($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = array_diff(scandir($this->directory), array('.', '..'));\n\t\t$objects = array();\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\t$file = $this->directory . $file;\n\t\t\t\n\t\t\tif ($regex_filter) {\n\t\t\t\t$test_path = (is_dir($file)) ? $file . '/' : $file;\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$objects[] = fFilesystem::createObject($file);\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function scan_dir($dir){\n\tif( !is_dir( $dir ) )\n\t\treturn false;\n\n\t$files=scandir($dir);\n\n\t$dirs=array();\n\tforeach($files as $file){\n\t\tif($file=='.'||$file=='..'||substr($file,0,1)=='.')\n\t\t\tcontinue;\n\t\tif(is_dir($dir.'/'.$file))\n\t\t\tarray_push($dirs,$file);\n\t}\n\n\treturn $dirs;\n}", "private static function __fordeepscan($dir, $file)\n {\n $path = \"\";\n $scan = glob($dir.'/*');\n $q = preg_quote($file, '\\\\');\n\n if (is_array($scan))\n {\n foreach ($scan as $d => $f)\n {\n if ($f != '.' && $f != '..')\n {\n $f = preg_replace(\"/[\\/]{1,}/\", '/', $f);\n\n if (!is_dir($f))\n {\n $base = basename($f);\n\n if (($base == $file) && strrpos($f, $file) !== false)\n {\n $path = $f;\n }\n\n $base = null;\n }\n\n if ($path == \"\")\n {\n $path = self::__fordeepscan($f, $file);\n if ($path !== \"\"){\n if (strrpos($path, $file) !== false){\n break;\n }\n }\n }\n\n $f = null;\n }\n }\n\n $scan = null;\n }\n\n return $path;\n }", "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "function check_dir($dir)\n {\n global $docdir, $lang;\n \n // Collect files and diretcories in these arrays\n $directories = array();\n $files = array();\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n if (preg_match(\"/^\\.{1,2}/\",$file) || $file == 'CVS')\n continue;\n\n // Collect files and directories\n if (is_dir($dir.$file)) { $directories[] = $file; }\n else { $files[] = $file; }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n $file_cnt = 0;\n foreach ($files as $file) {\n if (check_file($dir.$file, $file_cnt)) { $file_cnt++; }\n }\n\n // than the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\");\n }\n }", "public function scanSrc($dir, $total = array())\n {\n if ($handle = opendir($dir)) {\n while (($file = readdir($handle)) !== false) {\n if ($file != \"..\" && $file != \".\") {\n if (is_dir($dir . \"/\" . $file))\n // Do DFS\n $total += $this->scanSrc($dir . \"/\" . $file, $total);\n else\n array_push($total, $dir . '/' . $file);\n }\n }\n closedir($handle);\n return $total;\n }\n }", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "function lscan($scat, $param)\n{\n if(isset($param[1][0]) == FALSE)\n {\n $scat[1][0] = '.';\n }\n $c = 0;\n if (file_exists($scat[1][0]) == TRUE && is_dir($scat[1][0]) == TRUE && is_readable($scat[1][0]) == TRUE && is_executable($scat[1][0]) == TRUE && $fh = fopen($scat[1][0], 'r'))\n {\n while(isset(scandir($scat[1][0])[$c]))\n {\n $tab[$c] = scandir($scat[1][0])[$c];\n $c++;\n }\n $c = 0;\n sort($tab);\n while(isset($tab[$c]))\n {\n if (is_dir($tab[$c]))\n {\n echo(\"\\033[34m{$tab[$c]}\");\n echo (\"/\");\n }\n else if(is_executable($tab[$c]) && is_dir($tab[$c]) == FALSE)\n {\n echo(\"\\033[32m{$tab[$c]}\");\n echo (\"*\");\n }\n else if(is_link($tab[$c]))\n {\n echo($tab[$c]);\n echo (\"@\");\n }\n else\n echo($tab[$c]);\n echo (\" \");\n $c++;\n }\n echo (\"\\n\");\n }\n else if (is_file($scat[1][0]) == TRUE)\n echo (\"Is a file\\n\");\n else if (file_exists($scat[1][0]) == TRUE && (is_readable($scat[1][0]) == FALSE || is_executable($scat[1][0]) == FALSE))\n echo (\"Permission denied\\n\");\n else if (file_exists($scat[1][0]) == FALSE && is_dir($scat[1][0]) == FALSE)\n echo (\"No such file or directory\\n\");\n else\n echo (\"Cannot open folder\\n\");\n}", "public function test_scan_sort_desc()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_DESC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals(array_reverse($content), $output);\n }", "function scan_students()\n {\n $current_students = [];\n $di = new RecursiveDirectoryIterator('students/');\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n $path_info = pathinfo($filename);\n if($path_info['extension']=='json'){\n array_push($current_students,$path_info['filename']);\n }\n }\n // echo print_r($current_students);\n return $current_students;\n }", "function dirscan_folders($rootFolder){\n $folderNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (is_dir($rootFolder.\"/\".$name)) \n $folderNames[]=$name;\n }\n sort($folderNames);\n return $folderNames;\n}", "public function scanPath(Path $path)\n\t{\n\t\treturn @scandir($path->getPath());\n\t}", "function bob_scandir($root_path, $bad_path, $recursive) {\n $output = array();\n if (file_exists($root_path)){\n $paths = scandir($root_path);\n if ($paths === False)\n return False;\n foreach ($paths as $path) {\n $potential_path = \"${root_path}/${path}\";\n\n // Ignore any files in the bad (admin) path or files that begin with a period.\n if ($potential_path == $bad_path or $path[0] == '.')\n continue;\n\n $output[] = $potential_path;\n $bad_folder = ''; // not sure what this is for\n if ($recursive and is_dir($potential_path)) // Recursively descend and print out files.\n $output = array_merge($output, bob_scandir($potential_path, $bad_folder, $recursive));\n }\n }\n return $output;\n}", "function dynamik_skins_folder_scan( $skin_check = false )\n{\n\tif( dynamik_dir_check( dynamik_get_skins_folder_path() ) )\n\t{\n\t\t$skin_folder_names = scandir( dynamik_get_skins_folder_path() );\n\t\tif( false != $skin_check )\n\t\t{\n\t\t\tif( in_array( $skin_check, $skin_folder_names ) )\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn;\n\t}\t\n}", "private function scan_registry_dir($directory, &$message = '') {\n \tglobal $dbKITregistryFiles;\n \tglobal $dbKITregistryCfg;\n\n \t$sub_dirs = $dbKITregistryCfg->getValue(dbKITregistryCfg::cfgRegistryListTabs);\n\n $handle = opendir($directory);\n while ($file = readdir($handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (is_dir($directory.$file)) {\n // Erneuter Funktionsaufruf, um das aktuelle Verzeichnis auszulesen\n $this->scan_registry_dir($directory.$file.'/');\n }\n else {\n // Wenn Verzeichnis-Eintrag eine Datei ist, diese ausgeben\n $actual_file = page_filename(utf8_encode($file));\n $actual_file = $directory.$actual_file;\n $where = array(dbKITregistryFiles::field_filepath_registry => $actual_file);\n $data = array();\n if (!$dbKITregistryFiles->sqlSelectRecord($where, $data)) {\n \t$this->setError($dbKITregistryFiles->getError());\n \treturn false;\n }\n if (count($data) > 0) {\n \t// Datensatz existiert\n \t$data = $data[0];\n \t$update = array();\n \t// Vergleichen, ob sich etwas veraendert hat\n \tif (filemtime($actual_file) != $data[dbKITregistryFiles::field_filemtime]) {\n \t\t$update[dbKITregistryFiles::field_filemtime] = filemtime($actual_file);\n \t}\n \tif (filesize($actual_file) != $data[dbKITregistryFiles::field_filesize]) {\n \t\t$update[dbKITregistryFiles::field_filesize] = filesize($actual_file);\n \t}\n \tif ($data[dbKITregistryFiles::field_status] == dbKITregistryFiles::status_deleted) {\n \t\t$update[dbKITregistryFiles::field_status] = dbKITregistryFiles::status_active;\n \t\t$message .= sprintf(reg_msg_registry_file_undeleted, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n \tif (count($update) > 0) {\n \t\t$where = array(dbKITregistryFiles::field_id => $data[dbKITregistryFiles::field_id]);\n \t\tif (!$dbKITregistryFiles->sqlUpdateRecord($update, $where)) {\n \t\t\t$this->setError($dbKITregistryFiles->getError());\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_updated, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n }\n else {\n \t// es existiert noch kein Eintrag\n \tif (!file_exists($actual_file)) {\n \t\t// Datei muss noch umbenannt werden\n \t\tif (!rename($directory.$file, $actual_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($directory.$file), basename($actual_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_renamed, basename($directory.$file), basename($actual_file));\n \t}\n \t$sub_dir = substr(basename($actual_file), 0, 1);\n \tif (!in_array($sub_dir, $sub_dirs)) $sub_dir = '#';\n \tif (!file_exists($this->registry_path.$sub_dir)) {\n \t\tif (!mkdir($this->registry_path.$sub_dir)) {\n \t\t\t$this->setError(sprintf(reg_error_mkdir, $this->registry_path.$sub_dir));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_mkdir, '/'.$sub_dir);\n \t}\n \t$check_file = page_filename(utf8_encode($file));\n \t$check_file = $this->registry_path.$sub_dir.'/'.$check_file;\n \t// pruefen, ob sich die Datei im richtigen Verzeichnis befindet\n \tif ($actual_file != $check_file) {\n \t\tif (!rename($actual_file, $check_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($actual_file), '/'.$sub_dir.'/'.basename($check_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_moved, basename($actual_file), $sub_dir);\n \t\t$actual_file = $check_file;\n \t}\n \t$data = array(\n \t\tdbKITregistryFiles::field_filename_original\t\t\t=> utf8_encode(basename($directory.$file)),\n \t\tdbKITregistryFiles::field_filename_registry\t\t\t=> basename($actual_file),\n \t\tdbKITregistryFiles::field_filepath_registry\t\t\t=> $actual_file,\n \t\tdbKITregistryFiles::field_filemtime\t\t\t\t\t\t\t=> filemtime($actual_file),\n \t\tdbKITregistryFiles::field_filesize\t\t\t\t\t\t\t=> filesize($actual_file),\n \t\tdbKITregistryFiles::field_filetype\t\t\t\t\t\t\t=> pathinfo($actual_file, PATHINFO_EXTENSION),\n \t\tdbKITregistryFiles::field_status\t\t\t\t\t\t\t\t=> dbKITregistryFiles::status_active,\n \t\tdbKITregistryFiles::field_sub_dir\t\t\t\t\t\t\t\t=> $sub_dir\n \t);\n \t$id = -1;\n \tif (!$dbKITregistryFiles->sqlInsertRecord($data, $id)) {\n \t\t$this->setError($dbKITregistryFiles->getError());\n \t\treturn false;\n \t}\n \t$message .= sprintf(reg_msg_registry_file_added, $data[dbKITregistryFiles::field_filename_registry]);\n }\n }\n }\n }\n closedir($handle);\n }", "function directory_scan($directory, $withfiles) {\n\t$scanned_directory = array_diff(scandir($directory), array(\"..\", \".\")); //This removes all of the unessesary results\n\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == true; $i = $i + 1) {\n\t\tif (isset($scanned_directory[$i]) && (is_dir($directory . \"/\" . $scanned_directory[$i]) == FALSE)) { // If current item is a file, make it a download link\n\t\t\techo \"<div class='fileDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/file.svg' class='foldersvg'/>\";\n\t\t\techo \"<p class='fileLink'>\" . $scanned_directory[$i] . \"</p>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='fileinfo'><b>Type</b>: \" . mime_content_type($directory. \"/\" . $scanned_directory[$i]) . \" <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 0) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\t\t\t\n\t\t\techo \"</div>\";\n\t\t} else if (isset($scanned_directory[$i]) && $directory . \"/\" . $scanned_directory[$i] != \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") { // Makes this a special dir box if a item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\"; \n\t\t}\n\t}\n\t\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == false; $i = $i + 1) { //$withfiles only outputs files when true. when false, it will output files and folders. This is for the right-side of the page\n\t\tif ($i==0 && $directory != \"uploads/\" . $_SESSION[\"username\"]) { //when $i gets to its first iteration, output the \"back a directory\" folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[../]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='../' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Info</b>: Selecting this will move your selection back a folder.</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t\t\n\t\tif (isset($scanned_directory[$i]) && is_dir($directory . \"/\" . $scanned_directory[$i])) { // Makes this a special dir box if an item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\tif ($directory . \"/\" . $scanned_directory[$i] == \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") {\n\t\t\t\techo \"<img src='Assets/SVG/bin.svg' class='foldersvg'/>\";\n\t\t\t} else {\n\t\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\t}\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t}\n\n}", "private function scanDir(string $path, array &$files, bool $recursion = false): void\n {\n $handler = opendir($path);\n\n while ($item = readdir($handler)) {\n if (in_array($item, ['.', '..'])) {\n continue;\n }\n\n $itemPath = sprintf('%s/%s', $path, $item);\n\n if (is_file($itemPath)) {\n $files[] = $itemPath;\n continue;\n }\n\n if ($recursion && is_dir($itemPath)) {\n $this->scanDir($itemPath, $files, $recursion);\n }\n }\n }", "function dir_enter($entry_dir='/', $depth=0)\r\n{\r\n\t$found = 0;\r\n\r\n\t# Remove the last trailing slash and void dual writing\r\n\t$entry_dir = preg_replace('/\\/$/i', '', $entry_dir);\r\n\r\n\t$skip_list = array(\r\n\t\t'.', # self\r\n\t\t'..', # parent\r\n\t);\r\n\r\n\tif($dir_handle = opendir($entry_dir))\r\n\t{\r\n\t\twhile(false !== ($filename = readdir($dir_handle)))\r\n\t\t{\r\n\t\t\tif(in_array($filename, $skip_list))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$full_file_path = \"{$entry_dir}/{$filename}\";\r\n\t\t\t\r\n\t\t\tif(is_dir($full_file_path))\r\n\t\t\t{\r\n\t\t\t\t# Need to loop here inside the directory\r\n\r\n\t\t\t\tfecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\tfecho(\"{$filename}\");\r\n\r\n\t\t\t\t\r\n\t\t\t\t# Recurse through the file\r\n\t\t\t\t$function = __FUNCTION__;\r\n\t\t\t\t$found += $function($full_file_path, $depth+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t#fecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\t#fecho(\"{$filename}\");\r\n\r\n\t\t\t\t++$found;\r\n\t\t\t\tprocess_file($full_file_path, $depth);\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($dir_handle);\r\n\t}\r\n\t\r\n\treturn $found;\r\n}", "protected function getFilesInDirCreateTestDirectory() {}", "function getDirContents($dir){\r\n foreach(scandir($dir) as $key => $value){\r\n print \"$value<BR>\";\r\n }\r\n\r\n\r\n }", "public function scanIniDir($dir) {\n\n //prevent ../../../ attach\n $full_data_dir = realpath($this->configuration['base_ini_dir']);\n $full_dir_unsafe = realpath($full_data_dir . '/' . $dir);\n $full_dir = $full_data_dir . str_replace($full_data_dir, '', $full_dir_unsafe);\n\n $a_out = array();\n if (!is_dir($full_dir_unsafe)) {\n die(\"pqz.class.php: Directory $dir Not Found / full dir $full_dir\");\n }\n\n $scanned_directory = array_diff(scandir($full_dir), array('..', '.'));\n $index = 0;\n foreach ($scanned_directory as $entry) {\n\n if (is_dir(\"$full_dir/$entry\")) {\n $a_out[$index]['type'] = \"dir\";\n $a_out[$index]['path'] = $dir . $entry . '/';\n $a_out[$index]['name'] = $entry;\n $index ++;\n } else {\n // is a file\n\n $filename = $full_dir . '/' . $entry;\n\n $file_parts = pathinfo($filename);\n if (strtolower($file_parts['extension']) == 'ini') {\n \n } else {\n if ($this->debug) {\n echo \"$filename NOT an ini file\";\n }\n }\n $ini_array = parse_ini_file($filename);\n\n if (isset($ini_array['title'])) {\n $a_out[$index] = $ini_array;\n $a_out[$index]['type'] = \"file\";\n $a_out[$index]['path'] = $dir . $entry;\n $a_out[$index]['name'] = $entry;\n $index ++;\n }\n }\n }\n\n // --- sort the multidimensional array ---\n // Obtain a list of columns\n foreach ($a_out as $key => $row) {\n $type[$key] = $row['type'];\n $name[$key] = $row['name'];\n $path[$key] = $row['path'];\n }\n\n// Sort the data with volume descending, edition ascending\n// Add $data as the last parameter, to sort by the common key\n array_multisort($type, SORT_ASC, $name, SORT_ASC, $path, SORT_ASC, $a_out);\n\n return $a_out;\n }", "public function crawl() {\n\t\t$sDirectories = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\tif ( $sDirectories === '' ) return $sDirectories;\n\n\t\t$aDirectories = explode( ',', $sDirectories );\n\t\tforeach ( $aDirectories as $sDirectory ) {\n\t\t\t$sDir = trim ( $sDirectory );\n\t\t\tif( !is_dir( $sDir ) ) continue;\n\t\t\t$this->readInFiles( $sDir );\n\t\t}\n\t\treturn $this->aFiles;\n\t}", "public function testScan_string() {\n $this->createExampleFile($this->fixturePath . '/modules/example.txt');\n $this->createExampleFile($this->fixturePath . '/modules/extra-1/example.txt');\n $this->createExampleFile($this->fixturePath . '/themes/extra-1/example.txt');\n $this->createExampleFile($this->fixturePath . '/sites/all/modules/extra-2/example.txt');\n $this->createExampleRepo($this->fixturePath);\n $this->createExampleRepo($this->fixturePath . '/sites/all/modules/real-1');\n $this->createExampleRepo($this->fixturePath . '/sites/default/real-2');\n\n $scanner = new GitRepoScanner();\n $gitRepos = $scanner->scan($this->fixturePath);\n\n $this->assertRepos($gitRepos, array(\n $this->fixturePath,\n $this->fixturePath . '/sites/all/modules/real-1',\n $this->fixturePath . '/sites/default/real-2',\n ));\n }", "public function findFiles();", "function m_walk_dir( $root, $callback, $recursive = true, $level = 0 ) {\r\n $dh = @opendir( $root );\r\n if( false === $dh ) {\r\n return false;\r\n }\r\n while( $file = readdir( $dh )) {\r\n if( \".\" == $file || \"..\" == $file ){\r\n continue;\r\n }\r\n //echo \"## DEBUG:$level - $file<br/>\"; \r\n\r\n //echo \"Level: $level\";\r\n call_user_func( $callback,$level, \"{$root}/{$file}\", $file );\r\n if( false !== $recursive && is_dir( \"{$root}/{$file}\" )) {\r\n m_walk_dir( \"{$root}/{$file}\", $callback, $recursive, $level+1 );\r\n }\r\n }\r\n closedir( $dh );\r\n return true;\r\n}", "abstract protected function yieldSearchPaths(): Generator;", "function scan_directory($directory) {\n $dir = scandir($directory);\n foreach ($dir as $d) {\n if ($d === '.' or $d === '..')\n continue;\n\n if (is_dir($directory . '/' . $d)) {\n //code to use if directory\n scan_directory($directory . '/' . $d);\n } else {\n //code to use if file \n $type = pathinfo($directory . '/' . $d, PATHINFO_EXTENSION);\n if ($type == \"mp4\" || $type == \"html\") {\n //do nothing \n continue;\n } else {\n if (unlink($directory . '/' . $d)) {\n echo '<strong>Deleted</strong>'.$directory . '/' . $d . '<br/><br/>';\n }\n }\n }\n }\n}", "public function scanRecursive($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = $this->scan();\n\t\t$objects = $files;\n\t\t\n\t\t$total_files = sizeof($files);\n\t\tfor ($i=0; $i < $total_files; $i++) {\n\t\t\tif ($files[$i] instanceof fDirectory) {\n\t\t\t\tarray_splice($objects, $i+1, 0, $files[$i]->scanRecursive());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($regex_filter) {\n\t\t\t$new_objects = array();\n\t\t\tforeach ($objects as $object) {\n\t\t\t\t$test_path = ($object instanceof fDirectory) ? substr($object->getPath(), 0, -1) . '/' : $object->getPath();\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\t\n\t\t\t\t$new_objects[] = $object;\n\t\t\t}\n\t\t\t$objects = $new_objects;\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function logonscreener_source_scan() {\n global $source;\n $source = str_replace('\\\\', '/', rtrim($source, '/\\\\'));\n\n if (!$files = @scandir($source)) {\n if ($GLOBALS['debug_mode'] && is_file($source)) {\n // Debug mode let us set one specific image file as a source.\n $files = array(basename($source));\n $source = dirname($source);\n }\n else {\n logonscreener_log(\"$source not found.\");\n return FALSE;\n }\n }\n\n while (!empty($files)) {\n $key = array_rand($files);\n if (logonscreener_file_change($source . '/' . $files[$key])) {\n break;\n }\n unset($files[$key]);\n }\n\n return TRUE;\n}", "public function watch() {\n\t\t\t$totalFiles = 0;\n\n\t\t\twhile(true) {\n\t\t\t\t$dir = new DirectoryIterator(realpath($this->input_dir));\n\t\t\t\t$numFiles = iterator_count($dir);\n\n\t\t\t\tif($numFiles != $totalFiles) {\n\t\t\t\t\t$totalFiles = $numFiles;\n\n\t\t\t\t\tforeach($dir as $fileinfo) {\n\t\t\t\t\t if(!$fileinfo->isDot() && $fileinfo->isFile()) {\n\t\t\t\t\t \t$filename = $fileinfo->getFilename();\n\t\t\t\t\t \t$ext = pathinfo($filename, PATHINFO_EXTENSION);\n\n\t\t\t\t\t \tif(in_array($ext, array('dat')))\n\t\t\t\t\t \t\t$this->extractInfo($filename);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsleep(3);\n\t\t\t}\n\t\t}", "public function scanDirectory($directory) {\n global $database;\n\n $check = self::getDirectoryTree($directory, array(\n 'php',\n 'lte'\n ));\n $translation = array();\n foreach ($check as $file_path) {\n $path_info = pathinfo($file_path);\n if ($path_info['extension'] == 'php') {\n if (!$this->parseSourceFile($file_path, $translation)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError()));\n return false;\n }\n }\n elseif ($path_info['extension'] == 'lte') {\n if (!$this->parseTemplateFile($file_path, $translation)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError()));\n return false;\n }\n }\n else {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__,\n $this->I18n('The file type <b>{{ file_type }}</b> is not supported!',\n array('file_type' => $path_info['extension']))));\n return false;\n }\n }\n\n foreach ($translation as $entry) {\n $key = self::sanitize($entry['key']);\n $SQL = \"SELECT `i18n_id`, `i18n_key` FROM `\".dbManufakturI18n::getTableName() .\n \"` WHERE `i18n_key`='$key' AND (`i18n_status`='ACTIVE' OR `i18n_status`='IGNORE')\";\n if (null == ($query = $database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n\n $add_only_source = false;\n if ($query->numRows() > 0) {\n $result = $query->fetchRow(MYSQL_ASSOC);\n $add_only_source = ($result['i18n_key'] == $key) ? true : false;\n }\n\n if ($add_only_source) {\n // entry already exists, keep only the source usage\n $SQL = \"INSERT INTO `\".dbManufakturI18nSources::getTableName().\n \"` (`i18n_id`, `src_path`, `src_file`, `src_line`, `src_module`) VALUES (\".\n \"'{$result[dbManufakturI18n::FIELD_ID]}','{$entry['path']}',\".\n \"'{$entry['file']}','{$entry['line']}','{$entry['module']}')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n }\n else {\n // create a new entry\n $SQL = \"INSERT INTO `\".dbManufakturI18n::getTableName().\"` \".\n \"(`i18n_description`, `i18n_key`, `i18n_last_sync`, `i18n_status`) VALUES ( \".\n \"'', '$key', '\".date(\"Y-m-d H:i:s\", time()).\"', \".\n \"'\".dbManufakturI18n::STATUS_ACTIVE.\"')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n // get the ID for the new entry\n $id = mysql_insert_id();\n // add the standard EN translation\n $author = (isset($_SESSION['DISPLAY_NAME'])) ? $_SESSION['DISPLAY_NAME'] : dbManufakturI18n::AUTHOR_UNKNOWN;\n $SQL = \"INSERT INTO `\".dbManufakturI18nTranslations::getTableName().\"` (\".\n \"`trans_author`, `i18n_id`, `trans_language`, `trans_translation`, \".\n \"`trans_usage`, `trans_type`, `trans_status`) VALUES (\".\n \"'$author','$id','EN','$key','TEXT','REGULAR','ACTIVE')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n // add source usage...\n $SQL = \"INSERT INTO `\".dbManufakturI18nSources::getTableName().\"` (\".\n \"`i18n_id`, `src_path`, `src_file`, `src_line`, `src_module`) VALUES (\".\n \"'$id', '{$entry['path']}', '{$entry['file']}', '{$entry['line']}', '{$entry['module']}')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n }\n }\n return true;\n }", "public function scanDir($dir)\n {\n $objects = scandir($dir);\n\n // unset 2 first elements\n unset($objects[0], $objects[1]);\n\n return $objects;\n }", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "public function testReadingFiles()\n {\n $dir = __DIR__;\n $f = $this->adapter->java('java.io.File', $dir);\n $paths = $f->listFiles();\n foreach ($paths as $path) {\n self::assertFileExists((string) $path);\n }\n }", "public function scanRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir|File>\n */\n return $this->scanRawRecursive(true, true, $filter, true);\n }", "public function scanDirPaths(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRaw(false, true, $filter, false);\n }", "public function discoverPlugins() {\n foreach($this->fs->roots(false) as $root) {\n $this->findAvailablePlugins($root);\n }\n }", "public function testScanFileWithMatchShouldReturnResult(): void\n {\n $processor = new Processor(self::$defaultOptions);\n $fileObject = new \\SplFileObject('vfs://match.php.dist');\n\n $scanResult = $processor->scan($fileObject);\n\n self::assertInstanceOf(ResultContainer::class, $scanResult);\n self::assertCount(1, $scanResult);\n self::assertEquals($fileObject->getPathname(), $scanResult->getPathName());\n self::assertArrayHasKey('test', $scanResult);\n\n $first = $scanResult['test'];\n\n self::assertCount(1, $scanResult);\n self::assertEquals(0, $first->lineNumber);\n self::assertEquals('Awesome {$test}', $first->lineContent);\n self::assertEquals('test', $first->name);\n }", "public function scanDirs(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRaw(false, true, $filter, true);\n }", "public function scan($directories)\n\t{\n\t\tif (!is_array($directories)) {\n\t\t\t$directories = [$directories];\n\t\t}\n\n\t\tforeach ($directories as $directory) {\n\t\t\tforeach (Finder::findFiles('*.latte', '*.php')->from($directory) as $file) {\n\t\t\t\t$this->extract($file, $directory);\n\t\t\t}\n\t\t}\n\t\treturn $this->compactMessages();\n\t}", "public function &getFolders($folder)\n\t{\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$breakflag_before_process = $registry->get('volatile.breakflag', false);\n\n\t\t// Reset break flag before continuing\n\t\t$breakflag = false;\n\n\t\t// Initialize variables\n\t\t$arr = array();\n\t\t$false = false;\n\n\t\tif(!is_dir($folder) && !is_dir($folder.'/')) return $false;\n\n\t\t$counter = 0;\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$maxCounter = $registry->get('engine.scan.smart.large_dir_threshold',100);\n\n\t\t$allowBreakflag = ($registry->get('volatile.operation_counter', 0) != 0) && !$breakflag_before_process;\n\n\t\t$handle = @opendir($folder);\n\t\t/* If opening the directory doesn't work, try adding a trailing slash. This is useful in cases\n\t\t * like this: open_basedir=/home/user/www/ and the root is /home/user/www. Trying to scan\n\t\t * /home/user/www results in error, trying to scan /home/user/www/ succeeds. Duh!\n\t\t */\n\t\tif ($handle === FALSE) {\n\t\t\t$handle = @opendir($folder.'/');\n\t\t}\n\t\t// If directory is not accessible, just return FALSE\n\t\tif ($handle === FALSE) {\n\t\t\t$this->setWarning('Unreadable directory '.$folder);\n\t\t\treturn $false;\n\t\t}\n\n\t\twhile ( (($file = @readdir($handle)) !== false) && (!$breakflag) )\n\t\t{\n\t\t\tif (($file != '.') && ($file != '..'))\n\t\t\t{\n\t\t\t\t// # Fix 2.4: Do not add DS if we are on the site's root and it's an empty string\n\t\t\t\t$ds = ($folder == '') || ($folder == '/') || (@substr($folder, -1) == '/') || (@substr($folder, -1) == DIRECTORY_SEPARATOR) ? '' : DIRECTORY_SEPARATOR;\n\t\t\t\t$dir = $folder . $ds . $file;\n\t\t\t\t$isDir = is_dir($dir);\n\t\t\t\tif ($isDir) {\n\t\t\t\t\t$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($dir) : $dir;\n\t\t\t\t\tif($data) $arr[] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$counter++;\n\t\t\tif($counter >= $maxCounter) $breakflag = $allowBreakflag;\n\t\t}\n\t\t@closedir($handle);\n\n\t\t// Save break flag status\n\t\t$registry->set('volatile.breakflag', $breakflag);\n\n\t\treturn $arr;\n\t}", "public function testListDirectory()\n {\n $temp = BASE_FOLDER . '/.dev/Tests/Data/Testcases';\n\n $this->options = array(\n 'recursive' => false,\n 'exclude_files' => false,\n 'exclude_folders' => false,\n 'extension_list' => array(),\n 'name_mask' => null\n );\n $this->path = BASE_FOLDER . '/.dev/Tests/Data/Testcases/';\n\n $adapter = new fsAdapter($this->action, $this->path, $this->filesystem_type, $this->options);\n\n $this->assertEquals(1, count($adapter->fs->data));\n\n return;\n }", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "function CheckDir($dir, $startWith = '')\n{\n global $count;\n global $pruned;\n $count++;\n \n echo \"\\r$count ($pruned): Checking $dir \";\n \n $started = false;\n if( !strlen($startWith) )\n $started = true;\n\n // see if this is a directory we need to prune\n if( $started && is_dir(\"$dir/video_2\") )\n {\n PruneDir($dir);\n }\n else\n {\n // recurse into any directories\n $f = scandir($dir);\n foreach( $f as $file )\n {\n if( !$started && $file == $startWith )\n $started = true;\n \n if( $started && is_dir(\"$dir/$file\") && $file != '.' && $file != '..' )\n CheckDir(\"$dir/$file\");\n }\n unset($f);\n }\n}", "public function scanDirsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRawRecursive(false, true, $filter, true);\n }", "static function getDirectoryListing();", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "private function listFolderFiles($dir){\n $children = false;\n $isRoot = false;\n if($dir==$this->file_storage){\n $isRoot = true;\n }\n\n $folderName = $this->getFolderName($dir);\n if(!$isRoot){\n //$this->info('Directory Name: '.$folderName['child']);\n //$this->info('Parent Name: '.$folderName['parent']);\n }\n\n //$this->info('Folder: '.$dir);\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n if ($fileInfo->isDir()) {\n $this->listFolderFiles($fileInfo->getPathname());\n }else{\n $rename = false;\n //$this->info('File: '.$fileInfo->getFilename());\n //$info = new SplFileInfo($dir.'/'.$fileInfo->getFilename());\n $ext = \".\".pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);\n //$ext = \".\"$info->getExtension();\n //$this->info('File: extension '.$ext);\n $filebreak = str_replace($ext,\"\",$fileInfo->getFilename());\n if (strpos($filebreak, '.') !== false || strpos($filebreak, \"'\") !== false || strpos($filebreak, \"#\") !== false) {\n $rename = true;\n }\n if($rename){\n $replace = array(\".\", \"'\", \"#\", \";\", \"/\", \"?\", \":\", \"@\", \"=\", \"&\", \",\");\n //“;”, “/”, “?”, “:”, “@”, “=” and “&\n $fileraw = str_replace($replace,\" \",$filebreak);\n //$this->info('File: raw '.$fileraw);\n $newfilename = $fileraw . $ext;\n //$this->info('File: new '.$newfilename);\n $prod_filename = $newfilename;\n rename($dir.'/'.$fileInfo->getFilename(),$dir.'/'.$newfilename);\n }else{\n $prod_filename = $fileInfo->getFilename();\n }\n $this->checkFileExtension($dir.'/'.$prod_filename, $prod_filename, $dir);\n }\n $children = true;\n }else{\n $children = false;\n }\n }\n //$this->info('Children: '.$children);\n\n if(!$isRoot){\n $this->folders[$this->count]['name'] \t\t\t= $folderName['child'];\n $this->folders[$this->count]['parent'] \t\t= $folderName['parent'];\n $this->folders[$this->count]['full_path']\t= $dir;\n $this->folders[$this->count]['children']\t= $children;\n $this->count++;\n }\n //$this->info('#################');\n }", "function parseDir($dir) {\r\n global $zoom;\r\n // start the scan...(open the local dir)\r\n $images = array();\r\n $handle = $zoom->platform->opendir($dir);\r\n while (($file = $zoom->platform->readdir($handle)) != false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $tag = ereg_replace(\".*\\.([^\\.]*)$\", \"\\\\1\", $file);\r\n $tag = strtolower($tag);\r\n if ($zoom->acceptableFormat($tag)) {\r\n // Tack it onto images...\r\n $images[] = $file;\r\n }\r\n }\r\n }\r\n $zoom->platform->closedir($handle);\r\n return $images;\r\n }", "public function accept()\n {\n /**\n * @var \\SplFileInfo $current\n */\n $current = parent::current();\n if (!$current->isDir()) {\n return false;\n }\n }", "static public function scan_dir($dir = '', $partial = '')\n\t\t{\n\t\t$d = dir($dir);\n\t\twhile ($file = $d->read())\n\t\t\t{\n\t\t\t$full = \"$dir/$file\";\n\t\t\tif (preg_match(\"/^\\./\", $file)) continue;\n\t\t\tif (is_dir($full)) self::scan_dir($full, $partial);\n\t\t\telse {\n\t\t\t\t$class = str_replace('.php', '', $full);\n\t\t\t\t$class = str_replace($partial, '', $class);\n\t\t\t\t$class = str_replace('/', '\\\\', $class);\n\n\t\t\t\tif ($class != \"\\\\Model\\\\Model\"\n\t\t\t\t\t&& strpos($class, 'Model') !== false\n\t\t\t\t\t&& class_exists($class)\n\t\t\t\t\t&& get_parent_class($class) == 'Model'\n\t\t\t\t\t) {\n\t\t\t\t\techo \"\\n\\nFound $class.\";\n\t\t\t\t\t$model = new $class();\n\t\t\t\t\t\\Model\\Create::create($model->my_table(), $model->my_columns());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function scan(Context $context);", "function toIterator($root) {\n $root = realpath($root);\n $iterator = new \\AppendIterator();\n\n if(!file_exists($root))\n die('The components folder could not be found');\n\n $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($root));\n //$directoryIterator->setFlags(\\RecursiveDirectoryIterator::SKIP_DOTS);\n\n return $iterator;\n }", "public function scanDirPathsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRawRecursive(false, true, $filter, false);\n }", "function get_files($instructor=False, $sources=array('class', 'lab', 'project', 'exam', 'review', 'capstone', 'continued-lab'), $file_path = '.', $access=array(), $virtual=array(), $categories=array(), $secret='really') {\n $results = array();\n $basedir = scandir($file_path);\n foreach ($sources as $i => $l0) {\n if (in_array($l0, $basedir) && is_dir($file_path . '/' . $l0)) {\n $level1 = scandir($file_path . '/' . $l0);\n sort($level1);\n foreach ($level1 as $i => $l1) {\n if (substr($l1, 0, 1) != '.' && is_dir($file_path . '/' . $l0 . '/' . $l1)) {\n // The following code allows the system recursively look through the Directory\n // structure within a class, and the system can now process RELATIVE links\n // that go into those subordinate directories\n $level2 = array();\n try {\n $Iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($file_path . '/' . $l0 . '/' . $l1),\n RecursiveIteratorIterator::LEAVES_ONLY,\n RecursiveIteratorIterator::CATCH_GET_CHILD);\n foreach($Iterator as $name => $object) {\n $name = explode(\"/\", $name);\n unset($name[2]);\n unset($name[1]);\n unset($name[0]);\n $name = implode(\"/\", $name);\n $level2[] = $name;\n }\n } catch (Exception $e) {\n // Unable to recurse, so don't bother...\n }\n //$level2 = scandir($file_path . '/' . $l0 . '/' . $l1);\n $results[$l0][$l1] = array();\n sort($level2);\n foreach ($level2 as $i => $l2) {\n $key = sha1($secret.$l0.$l1.$l2);\n if (substr($l2, 0, 1) != '.' && validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access)[0]) {\n if (is_link($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2)) {\n if (validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access)[0]) {\n $vf = validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access);\n $category = categorize_file($instructor, $l2, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2),\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n } else {\n $vf = validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access);\n $category = categorize_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n }\n # Add Virtual files, format like array('class'=>array(1 => array(array('answers.html', 'homework/answers05.html'))))\n foreach ($virtual as $l0 => $l1array) {\n if (isset($results[$l0])) {\n $classes = array_keys($results[$l0]);\n foreach ($l1array as $day => $l2array) {\n if (isset($classes[$day-1])) {\n foreach ($l2array as $i => $values) {\n $virt_file = $values[0];\n $real_file = $values[1];\n if (validate_file($instructor, $real_file, $real_file, $access)[0]) {\n $key = sha1($secret.$real_file.$virt_file);\n $vf = validate_file($instructor, $real_file, $real_file, $access);\n $category = categorize_file($instructor, $virt_file, $real_file, $vf[5], $categories);\n $results[$l0][$classes[$day-1]][$virt_file] = array('actual' => $real_file,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n #####################################################\n # Verify that the class is not blocked by security...\n $today = getdate();\n foreach ($results as $l0 => $classes) {\n $counter = 1;\n foreach ($classes as $l1 => $data) {\n foreach ($data as $filename => $fdata) {\n if ($fdata['year'] == 1 && $fdata['month'] == 1 && $fdata['day'] == 1) {\n $cate = $fdata['category'];\n if (isset($access[$l0.\"_\".$counter]) && $cate == 'title') {\n $sspec = $l0.\"_\".$counter;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$cate])) {\n $sspec = $l0.\"_\".$counter.\"/\".$cate;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$filename])) {\n $sspec = $l0.\"_\".$counter.\"/\".$filename;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/all\"])) {\n $sspec = $l0.\"_\".$counter.\"/all\";\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n }\n }\n }\n $counter++;\n }\n }\n return $results;\n }", "private function recurseThroughDirectory($baseDir, $lookingFor = \"/(.*)\\.php$/i\")\n {\n $results = array();\n $di = new RecursiveDirectoryIterator($baseDir);\n\n $this->output->writeLn(\"Scanning $baseDir...\");\n\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n if (preg_match($lookingFor, $filename)) {\n $results[] = $this->extractFrom($filename);\n }\n }\n\n return $results;\n }", "public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1) {\n\t\tif ($reuse === -1) {\n\t\t\t$reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : 0;\n\t\t}\n\t\t$this->scanFile($path, $reuse);\n\t\treturn $this->scanChildren($path, $recursive, $reuse);\n\t}", "public function test_search_by_extension()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_extension(array('php'));\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function scanDirNamesRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string>\n */\n return $this->scanRawRecursive(false, true, $filter, null);\n }", "protected function scan_directory($target) {\n $files = array();\n $target_images = $this->get_target_images();\n $target_components = explode(DIRECTORY_SEPARATOR, $target);\n $target = implode(DIRECTORY_SEPARATOR, $target_components);\n $target_length = strlen($target) + 1;\n\n $patterns = array(\n $target,\n '.xml'\n );\n $datatypes = array(\n '-01.tif',\n '-01.jpg',\n );\n\n $images = file_scan_directory($target_images, '/.*-01.*/');\n $xml = file_scan_directory($target, '/.*.xml$/');\n foreach ($xml as $uri => $value) {\n if (strpos($uri, '.xml') !== FALSE) {\n foreach ($datatypes as $datatype) {\n $replacements = array($target_images, $datatype);\n // Only process xml if there is a matching image to go with it.\n $matching_image = str_replace($patterns, $replacements, $value->uri);\n if (!empty($images[$matching_image])) {\n $files[substr($uri, $target_length)] = $value;\n }\n }\n }\n }\n return $files;\n }", "function dirtree($dir, $f, &$ret, $search=null, $directory=null)\n\t{\n\t\t\n\t\t$tree = array();\n\t\t$uri = $dir.'/'.$f;\n\t\t$uri = str_replace(\"//\", \"/\", $uri);\n\t\t$handler = @opendir($uri);\n\t\t//open all directories\n\t\twhile ($file = @readdir($handler)) \n\t\t{\n \tif ($file != '.' && $file != '..')\n \t{\n \t\t$items = $dir.'/'.$f;\n \t\tif(is_dir($items.'/'.$file))\n \t\t{\n \t\t\tif($file[0] !='.')\n \t\t\t{\n\t \t\t\tif($search == null)\n\t \t\t\t\tdirtree($items, $file, $tree);\n\t \t\t\telse\n\t \t\t\t{\n\t \t\t\t\tif($directory != '')\n\t \t\t\t\t\t$src = $directory.'/'.$file;\n\t \t\t\t\telse\n\t \t\t\t\t\t$src = $file;\n\t \t\t\t\tdirtree($items, $file, &$ret,$search, $src);\n\t \t\t\t}\n \t\t\t}\n \t\t}\n \t\telse if($search != null) // If search mode true\n \t\t{\n \t\t\t$file_parts = pathinfo($file);\n\t \t\tif(strstr(strtolower($file),strtolower($search))) // If search string is in file name\n\t \t\t{\n\t \t\t\tif($directory != '') // If root dir\n \t\t\t\t\t$src = $directory.'/'.$file;\n \t\t\t\telse\n \t\t\t\t\t$src = $file;\n\t \t\t\t$item = array( 'src' => $src, 'file' => $file); \n\t \t\t\tif(isset($param))\n\t \t\t\t$param=\"\";\n\t \t\t\tif( @!is_dir($param.$file)) // If not dir and is picture file.\n\t \t\t\t{\n\t \t\t\t\t\n\t \t\t\t\tif(strtolower($file_parts['extension']) == 'jpeg' || strtolower($file_parts['extension']) == 'jpg' || strtolower($file_parts['extension']) == 'png' || strtolower($file_parts['extension']) == 'gif' || strtolower($file_parts['extension']) == 'bmp')\n\t \t\t\t\t{\t\n\t \t\t\t\t\t$uri = $dir.'/'.$f.'/'.$file;\n\t\t\t\t\t\t\t\t$uri = str_replace(\"//\", \"/\", $uri);\n\t \t\t\t\t\t@$size = getimagesize($uri);\n\t \t\t\t\t\t@$item['x'] = $size[0];\n\t \t\t\t\t\t@$item['y'] = $size[1];\n\t \t\t\t\t\tarray_push($ret, $item);\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n \t\t}\n \t}\n \t}\n \tif($search === null) // Add dir to aray\n \t{\n \t\t$it = array('name' => $f,'items' => $tree);\n \t\tarray_push($ret,$it);\n \t}\n\t}", "function processDir($dir, $link) {\n\t\tif(is_dir($dir)) {\n\t\t\t$currentDir = scandir($dir);\n\t\t\tforeach ($currentDir as $key => $value)\t{\n\t\t\t\tif (!in_array($value,array(\".\", \"..\", \".DS_Store\")))\t{\n\t\t\t\t\tif (is_dir($dir . \"/\" . $value)) {\n\t\t\t\t\t\t$this->processDir($dir . \"/\" . $value, $link);//Recursive\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$metaFileNameFound = \"\";\n\t\t\t//Search the link in the meta files\n\t\t\tforeach (glob($dir.\"/*.meta.xml\") as $file) {\n\t\t\t\t$content = file_get_contents($file);\n\t\t\t\tif (strpos($content, $link) !== false) {\n\t\t\t\t\t//TODO: Optimisation: Memorize the link and the file path together For reusablilty.\n\t\t\t\t\treturn $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "function buscar($dir,&$archivo_buscar) \n{ // Funcion Recursiva \n // Autor DeeRme \n // http://deerme.org \n if ( is_dir($dir) ) \n { \n // Recorremos Directorio \n $d=opendir($dir); \n while( $archivo = readdir($d) ) \n { \n if ( $archivo!=\".\" AND $archivo!=\"..\" ) \n { \n \n if ( is_file($dir.'/'.$archivo) ) \n { \n // Es Archivo \n if ( $archivo == $archivo_buscar ) \n { \n return ($dir.'/'.$archivo); \n } \n \n } \n \n if ( is_dir($dir.'/'.$archivo) ) \n { \n // Es Directorio \n // Volvemos a llamar \n $r=buscar($dir.'/'.$archivo,$archivo_buscar); \n if ( basename($r) == $archivo_buscar ) \n { \n return $r; \n } \n \n \n } \n \n \n \n \n \n } \n \n } \n \n } \n return FALSE; \n}", "public function test_scan_document()\n {\n $ocr = new \\App\\Modules\\OCR\\OCR();\n\n $location = $ocr->image(__DIR__ . '/test.png')->process('test.txt');\n\n PHPUnit::assertEquals(\n \"/Users/mark.fluehmann/Documents/60.Technik/Code/cerbo/storage/app/ocr/test.txt\",\n $location,\n );\n\n $content = file_get_contents($location);\n\n PHPUnit::assertTrue(\n strpos($content, 'Bundesrat') > 0\n );\n\n }", "private function recSearchFiles($dir)\n {\n $ffs = scandir($dir);\n\n foreach ($ffs as $ff) {\n\n if ($ff != '.' && $ff != '..') {\n\n if (is_dir($dir . '/' . $ff)) {\n $this->recSearchFiles($dir . $ff . '/');\n } else if (strlen($ff) >= 5) {\n $this->searchedFiles[] = $dir . $ff;\n }\n }\n }\n }", "static private function find_contents($dir)\n {\n $result = array();\n $root = scandir($dir);\n foreach ($root as $value) {\n if ($value === '.' || $value === '..') {\n continue;\n }\n if (is_file($dir . DIRECTORY_SEPARATOR . $value)) {\n if (! self::$ext_filter || in_array(strtolower(pathinfo($dir . DIRECTORY_SEPARATOR . $value, PATHINFO_EXTENSION)), self::$ext_filter)) {\n self::$files[] = $result[] = $dir . DIRECTORY_SEPARATOR . $value;\n }\n continue;\n }\n if (self::$recursive) {\n foreach (self::find_contents($dir . DIRECTORY_SEPARATOR . $value) as $value) {\n self::$files[] = $result[] = $value;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }" ]
[ "0.7979879", "0.77180135", "0.7239821", "0.71102506", "0.68057096", "0.676981", "0.65207386", "0.64884", "0.6479395", "0.639054", "0.6378024", "0.6366621", "0.63291353", "0.62446964", "0.61983824", "0.61747074", "0.6162355", "0.6128189", "0.6079859", "0.6079535", "0.6075999", "0.6058093", "0.60260195", "0.60008717", "0.59994924", "0.5991255", "0.59684193", "0.59668815", "0.5936124", "0.5917058", "0.5896349", "0.5878318", "0.5870553", "0.5830011", "0.5826411", "0.5818301", "0.5785676", "0.5785122", "0.5768685", "0.5766073", "0.5763065", "0.5754492", "0.5753943", "0.57364917", "0.5734635", "0.5701144", "0.56872267", "0.56670177", "0.564201", "0.56160676", "0.5607403", "0.55691326", "0.55031574", "0.54869455", "0.54824877", "0.54781014", "0.5471294", "0.54683334", "0.54626954", "0.5444092", "0.5438938", "0.54094726", "0.5408548", "0.5408071", "0.5394411", "0.5394271", "0.5369407", "0.53654283", "0.5360352", "0.53588223", "0.5356523", "0.53506756", "0.5345445", "0.53342855", "0.53291863", "0.53284246", "0.53276336", "0.5320366", "0.53109795", "0.53107804", "0.53085136", "0.53069144", "0.52990305", "0.52935886", "0.52637327", "0.5263339", "0.52570695", "0.52493036", "0.5236209", "0.52283305", "0.52249384", "0.5215173", "0.5208341", "0.51961946", "0.5195224", "0.51857895", "0.5182123", "0.51817554", "0.51800835", "0.51743543" ]
0.77456445
1
Test for Directory::scan() Scan the content of ROOT directory in descending order
public function test_scan_sort_desc() { $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_DESC); $output = array(); foreach($res as $f) $output[] = $f->get_base_name(); $this->assertEquals(array_reverse($content), $output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "function dirscan_files($rootFolder){\n $fileNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (!is_dir($rootFolder.\"/\".$name)) $fileNames[]=$name;\n }\n sort($fileNames);\n return $fileNames;\n}", "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }", "private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function dirscan_folders($rootFolder){\n $folderNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (is_dir($rootFolder.\"/\".$name)) \n $folderNames[]=$name;\n }\n sort($folderNames);\n return $folderNames;\n}", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "public function dir_readdir() {}", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "public function backgroundScan() {\n\t\t$lastPath = null;\n\t\twhile (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) {\n\t\t\t$this->scan($path, self::SCAN_RECURSIVE, self::REUSE_ETAG);\n\t\t\t$this->cache->correctFolderSize($path);\n\t\t\t$lastPath = $path;\n\t\t}\n\t}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "function scan_directory_recursively($directory, $filter=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\treturn FALSE;\n\t}elseif(is_readable($directory))\n\t{\n\t\t$directory_list = opendir($directory);\n\t\twhile($file = readdir($directory_list))\n\t\t{\n\t\t\tif($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn')\n\t\t\t{\n\t\t\t\t$path = $directory.'/'.$file;\n\t\t\t\tif(is_readable($path))\n\t\t\t\t{\n\t\t\t\t\t$subdirectories = explode('/',$path);\n\t\t\t\t\tif(is_dir($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => end($subdirectories),\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'kind' => 'directory',\n\t\t\t\t\t\t\t'content' => scan_directory_recursively($path, $filter));\n\t\t\t\t\t}elseif(is_file($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = end(explode('.',end($subdirectories)));\n\t\t\t\t\t\tif($filter === FALSE || $filter == $extension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get metadata and image dimensions\n\t\t\t\t\t\t\t$size = getimagesize($path, $info);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get containing directory of file\n\t\t\t\t\t\t\t$directory_array = explode('/', $path);\n\t\t\t\t\t\t\t$parent_folder = min($directory_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset title, caption, tags\n\t\t\t\t\t\t\t$title = $caption = $taglist = $tags = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path'\t\t=> dirname($path),\n\t\t\t\t\t\t\t'group'\t\t=> $parent_folder,\n\t\t\t\t\t\t\t'file'\t\t=> end($subdirectories),\n\t\t\t\t\t\t\t'extension' => $extension,\n\t\t\t\t\t\t\t'size'\t\t=> filesize($path),\n\t\t\t\t\t\t\t'width'\t\t=> $size[0],\n\t\t\t\t\t\t\t'height'\t=> $size[1],\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t\t\t\t'caption'\t=> $caption,\n\t\t\t\t\t\t\t'tags'\t\t=> $tags,\n\t\t\t\t\t\t\t'kind'\t\t=> 'file');\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\tclosedir($directory_list); \n\t\treturn $directory_tree;\n\t}else{\n\t\treturn FALSE;\t\n\t}\n}", "function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "static private function scan_dir( $dir ) {\n\t\t$ignored = array( '.', '..', '.svn', '.htaccess', 'test-log.log' );\n\n\t\t$files = array();\n\t\tforeach ( scandir( $dir ) as $file ) {\n\t\t\tif ( in_array( $file, $ignored ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$files[ $file ] = filemtime( $dir . '/' . $file );\n\t\t}\n\t\tarsort( $files );\n\t\t$files = array_keys( $files );\n\n\t\treturn ( $files ) ? $files : false;\n\t}", "function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}", "function scan_dir($dir, $type=array(),$only=FALSE, $allFiles=FALSE, $recursive=TRUE, $onlyDir=\"\", &$files){\n\t$handle = @opendir($dir);\n\tif(!$handle)\n\t\treturn false;\n\twhile ($file = @readdir ($handle))\n\t{\n\t\tif (eregi(\"^\\.{1,2}$\",$file) || $file == 'index.html')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif(!$recursive && $dir != $dir.$file.\"/\")\n\t\t{\n\t\t\tif(is_dir($dir.$file))\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(is_dir($dir.$file))\n\t\t{\n\t\t\tscan_dir($dir.$file.\"/\", $type, $only, $allFiles, $recursive, $file, $files);\n\t\t}\n\t\telse\n\t\t{\n if($only)\n\t\t\t\t$onlyDir = $dir;\n\n\t\t\t$files = buildArray($dir,$file,$onlyDir,$type,$allFiles,$files);\n\t\t}\n\t}\n\t@closedir($handle);\n\treturn $files;\n}", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "function check_dir($dir)\n {\n global $docdir, $lang;\n \n // Collect files and diretcories in these arrays\n $directories = array();\n $files = array();\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n if (preg_match(\"/^\\.{1,2}/\",$file) || $file == 'CVS')\n continue;\n\n // Collect files and directories\n if (is_dir($dir.$file)) { $directories[] = $file; }\n else { $files[] = $file; }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n $file_cnt = 0;\n foreach ($files as $file) {\n if (check_file($dir.$file, $file_cnt)) { $file_cnt++; }\n }\n\n // than the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\");\n }\n }", "function lscan($scat, $param)\n{\n if(isset($param[1][0]) == FALSE)\n {\n $scat[1][0] = '.';\n }\n $c = 0;\n if (file_exists($scat[1][0]) == TRUE && is_dir($scat[1][0]) == TRUE && is_readable($scat[1][0]) == TRUE && is_executable($scat[1][0]) == TRUE && $fh = fopen($scat[1][0], 'r'))\n {\n while(isset(scandir($scat[1][0])[$c]))\n {\n $tab[$c] = scandir($scat[1][0])[$c];\n $c++;\n }\n $c = 0;\n sort($tab);\n while(isset($tab[$c]))\n {\n if (is_dir($tab[$c]))\n {\n echo(\"\\033[34m{$tab[$c]}\");\n echo (\"/\");\n }\n else if(is_executable($tab[$c]) && is_dir($tab[$c]) == FALSE)\n {\n echo(\"\\033[32m{$tab[$c]}\");\n echo (\"*\");\n }\n else if(is_link($tab[$c]))\n {\n echo($tab[$c]);\n echo (\"@\");\n }\n else\n echo($tab[$c]);\n echo (\" \");\n $c++;\n }\n echo (\"\\n\");\n }\n else if (is_file($scat[1][0]) == TRUE)\n echo (\"Is a file\\n\");\n else if (file_exists($scat[1][0]) == TRUE && (is_readable($scat[1][0]) == FALSE || is_executable($scat[1][0]) == FALSE))\n echo (\"Permission denied\\n\");\n else if (file_exists($scat[1][0]) == FALSE && is_dir($scat[1][0]) == FALSE)\n echo (\"No such file or directory\\n\");\n else\n echo (\"Cannot open folder\\n\");\n}", "public function scanIniDir($dir) {\n\n //prevent ../../../ attach\n $full_data_dir = realpath($this->configuration['base_ini_dir']);\n $full_dir_unsafe = realpath($full_data_dir . '/' . $dir);\n $full_dir = $full_data_dir . str_replace($full_data_dir, '', $full_dir_unsafe);\n\n $a_out = array();\n if (!is_dir($full_dir_unsafe)) {\n die(\"pqz.class.php: Directory $dir Not Found / full dir $full_dir\");\n }\n\n $scanned_directory = array_diff(scandir($full_dir), array('..', '.'));\n $index = 0;\n foreach ($scanned_directory as $entry) {\n\n if (is_dir(\"$full_dir/$entry\")) {\n $a_out[$index]['type'] = \"dir\";\n $a_out[$index]['path'] = $dir . $entry . '/';\n $a_out[$index]['name'] = $entry;\n $index ++;\n } else {\n // is a file\n\n $filename = $full_dir . '/' . $entry;\n\n $file_parts = pathinfo($filename);\n if (strtolower($file_parts['extension']) == 'ini') {\n \n } else {\n if ($this->debug) {\n echo \"$filename NOT an ini file\";\n }\n }\n $ini_array = parse_ini_file($filename);\n\n if (isset($ini_array['title'])) {\n $a_out[$index] = $ini_array;\n $a_out[$index]['type'] = \"file\";\n $a_out[$index]['path'] = $dir . $entry;\n $a_out[$index]['name'] = $entry;\n $index ++;\n }\n }\n }\n\n // --- sort the multidimensional array ---\n // Obtain a list of columns\n foreach ($a_out as $key => $row) {\n $type[$key] = $row['type'];\n $name[$key] = $row['name'];\n $path[$key] = $row['path'];\n }\n\n// Sort the data with volume descending, edition ascending\n// Add $data as the last parameter, to sort by the common key\n array_multisort($type, SORT_ASC, $name, SORT_ASC, $path, SORT_ASC, $a_out);\n\n return $a_out;\n }", "public function scanSrc($dir, $total = array())\n {\n if ($handle = opendir($dir)) {\n while (($file = readdir($handle)) !== false) {\n if ($file != \"..\" && $file != \".\") {\n if (is_dir($dir . \"/\" . $file))\n // Do DFS\n $total += $this->scanSrc($dir . \"/\" . $file, $total);\n else\n array_push($total, $dir . '/' . $file);\n }\n }\n closedir($handle);\n return $total;\n }\n }", "function scan_dir($dir){\n\tif( !is_dir( $dir ) )\n\t\treturn false;\n\n\t$files=scandir($dir);\n\n\t$dirs=array();\n\tforeach($files as $file){\n\t\tif($file=='.'||$file=='..'||substr($file,0,1)=='.')\n\t\t\tcontinue;\n\t\tif(is_dir($dir.'/'.$file))\n\t\t\tarray_push($dirs,$file);\n\t}\n\n\treturn $dirs;\n}", "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "private static function __fordeepscan($dir, $file)\n {\n $path = \"\";\n $scan = glob($dir.'/*');\n $q = preg_quote($file, '\\\\');\n\n if (is_array($scan))\n {\n foreach ($scan as $d => $f)\n {\n if ($f != '.' && $f != '..')\n {\n $f = preg_replace(\"/[\\/]{1,}/\", '/', $f);\n\n if (!is_dir($f))\n {\n $base = basename($f);\n\n if (($base == $file) && strrpos($f, $file) !== false)\n {\n $path = $f;\n }\n\n $base = null;\n }\n\n if ($path == \"\")\n {\n $path = self::__fordeepscan($f, $file);\n if ($path !== \"\"){\n if (strrpos($path, $file) !== false){\n break;\n }\n }\n }\n\n $f = null;\n }\n }\n\n $scan = null;\n }\n\n return $path;\n }", "function dir_enter($entry_dir='/', $depth=0)\r\n{\r\n\t$found = 0;\r\n\r\n\t# Remove the last trailing slash and void dual writing\r\n\t$entry_dir = preg_replace('/\\/$/i', '', $entry_dir);\r\n\r\n\t$skip_list = array(\r\n\t\t'.', # self\r\n\t\t'..', # parent\r\n\t);\r\n\r\n\tif($dir_handle = opendir($entry_dir))\r\n\t{\r\n\t\twhile(false !== ($filename = readdir($dir_handle)))\r\n\t\t{\r\n\t\t\tif(in_array($filename, $skip_list))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$full_file_path = \"{$entry_dir}/{$filename}\";\r\n\t\t\t\r\n\t\t\tif(is_dir($full_file_path))\r\n\t\t\t{\r\n\t\t\t\t# Need to loop here inside the directory\r\n\r\n\t\t\t\tfecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\tfecho(\"{$filename}\");\r\n\r\n\t\t\t\t\r\n\t\t\t\t# Recurse through the file\r\n\t\t\t\t$function = __FUNCTION__;\r\n\t\t\t\t$found += $function($full_file_path, $depth+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t#fecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\t#fecho(\"{$filename}\");\r\n\r\n\t\t\t\t++$found;\r\n\t\t\t\tprocess_file($full_file_path, $depth);\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($dir_handle);\r\n\t}\r\n\t\r\n\treturn $found;\r\n}", "function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }", "function l10n_drupal_files_scan($source = NULL, $automated = FALSE) {\n\n // We look for projects in the working directory.\n $workdir = variable_get('l10n_server_connector_l10n_drupal_files_directory', '');\n\n if (!is_dir($workdir)) {\n drupal_set_message(t('The configured directory (%workdir) cannot be found. <a href=\"@configure\">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/connectors/config/l10n_drupal/files'))));\n }\n else {\n // define a list of allowed extensions, we will use it later on file_scan_directory\n // and further regular expression buildung processing. Thanks to EugenMayer\n $allowed_file_extensions = array('.tar.gz', '.tgz');\n // build the regular expression\n foreach($allowed_file_extensions as $key => $extension) {\n // escape the file extensions for later regular expression usage\n $allowed_file_extensions[$key] = preg_quote($extension);\n }\n $file_extension_pattern = '(' . implode('|', $allowed_file_extensions) . ')$';\n\n // Packages are always .tar.gz files.\n $files = file_scan_directory($workdir, $file_extension_pattern);\n if (count($files)) {\n foreach ($files as $path => $file) {\n\n if (!l10n_drupal_is_supported_version($path)) {\n // Skip files for unsupported versions.\n continue;\n }\n\n // Get rid of $workdir prefix on file names, eg.\n // drupal-6.x-6.19.tar.gz\n // Drupal/drupal-4.6.7.tar.gz or\n // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.\n $path = $package = trim(preg_replace('!(^' . preg_quote($workdir, '!') . ')(.+)\\.tar\\.gz!', '\\2', $path), '/');\n\n // split the filename into parts to $filename_splitted\n // [0] = the full string\n // [1] = the subdirectory and filename with extension\n // [1] = the subdirectory and filename without extension\n // [2] = the extension .tar.gz or .tgz\n $file_splitted = array(); // ensure to be a array....\n // the regular expression pattern (i put it in a var because i can better handle it with dpm for debugging, move if you want...)\n $file_split_pattern = '!^'. preg_quote($workdir, '!') .'((.+)'. $file_extension_pattern .')!';\n preg_match( $file_split_pattern, $path, $file_splitted );\n // put the result in vars for better handling\n list($file_fullpath, $file_subpath_ext, $file_subpath, $file_extension) = $file_splitted;\n\n // redefine the path to subpath without slash at beginning\n $path = trim($file_subpath, '/');\n // same on package\n $package = trim($file_subpath, '/');\n $project_title = '';\n if (strpos($path, '/')) {\n // We have a slash, so this package is in a subfolder.\n // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.\n // Grab the directory name as project title.\n list($project_title, $package) = explode('/', $path);\n }\n if (strpos($package, '-')) {\n // Only remaining are the project uri and release,\n // eg. drupal-4.6.7 or ubercart-5.x-1.0-alpha8.\n list($project_uri, $release_version) = explode('-', $package, 2);\n\n l10n_drupal_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, trim($file_subpath_ext, '/'), filemtime($file->filename));\n }\n else {\n // File name not formatted properly.\n $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');\n }\n }\n }\n }\n\n $user_feedback = FALSE;\n $results = db_query_range(\"SELECT * FROM {l10n_server_release} WHERE pid IN (SELECT pid FROM {l10n_server_project} WHERE connector_module = 'l10n_drupal_files' AND status = 1) ORDER BY last_parsed ASC\", 0, variable_get('l10n_server_connector_l10n_drupal_files_limit', 1));\n while ($release = db_fetch_object($results)) {\n\n // Only parse file if something changed since we last parsed it.\n $file_name = $workdir . '/' . $release->download_link;\n\n if (file_exists($file_name)) {\n if (filemtime($file_name) > $release->last_parsed) {\n $result = l10n_drupal_parse_package($file_name, $release);\n\n // User feedback, if not automated. Log messages are already done.\n if (isset($result['error']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['error'], 'error');\n }\n elseif (isset($result['message']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['message']);\n }\n }\n else {\n if (!$automated) {\n $user_feedback = TRUE;\n drupal_set_message(t('@release was already parsed, no need to scan again.', array('@release' => $release->download_link)));\n }\n }\n }\n // Hackish update of last parsed time so other tarballs will get into the queue too.\n // @todo: work on something better for this.\n db_query(\"UPDATE {l10n_server_release} SET last_parsed = %d WHERE rid = %d\", time(), $release->rid);\n }\n if (!$automated && !$user_feedback) {\n drupal_set_message(t('No (new) local Drupal files found to scan in %workdir.', array('%workdir' => $workdir)));\n }\n\n // Ensure that a Drupal page will be displayed with the messages.\n return '';\n}", "function directory_scan($directory, $withfiles) {\n\t$scanned_directory = array_diff(scandir($directory), array(\"..\", \".\")); //This removes all of the unessesary results\n\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == true; $i = $i + 1) {\n\t\tif (isset($scanned_directory[$i]) && (is_dir($directory . \"/\" . $scanned_directory[$i]) == FALSE)) { // If current item is a file, make it a download link\n\t\t\techo \"<div class='fileDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/file.svg' class='foldersvg'/>\";\n\t\t\techo \"<p class='fileLink'>\" . $scanned_directory[$i] . \"</p>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='fileinfo'><b>Type</b>: \" . mime_content_type($directory. \"/\" . $scanned_directory[$i]) . \" <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 0) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\t\t\t\n\t\t\techo \"</div>\";\n\t\t} else if (isset($scanned_directory[$i]) && $directory . \"/\" . $scanned_directory[$i] != \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") { // Makes this a special dir box if a item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\"; \n\t\t}\n\t}\n\t\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == false; $i = $i + 1) { //$withfiles only outputs files when true. when false, it will output files and folders. This is for the right-side of the page\n\t\tif ($i==0 && $directory != \"uploads/\" . $_SESSION[\"username\"]) { //when $i gets to its first iteration, output the \"back a directory\" folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[../]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='../' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Info</b>: Selecting this will move your selection back a folder.</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t\t\n\t\tif (isset($scanned_directory[$i]) && is_dir($directory . \"/\" . $scanned_directory[$i])) { // Makes this a special dir box if an item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\tif ($directory . \"/\" . $scanned_directory[$i] == \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") {\n\t\t\t\techo \"<img src='Assets/SVG/bin.svg' class='foldersvg'/>\";\n\t\t\t} else {\n\t\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\t}\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t}\n\n}", "function scan(SplFileInfo $fileInfo, $repository)\n{\n $baseName = $fileInfo->getBasename();\n if ($baseName === '.' || $baseName === '..') {\n return;\n }\n\n $file = new File($fileInfo);\n $repository->save($file);\n if ($fileInfo->isDir()) {\n foreach (new RecursiveDirectoryIterator($fileInfo) as $child) {\n scan($child, $repository);\n }\n }\n}", "function RecursiveScanDir($dir, $prefix = '') {\n\t$dir = rtrim($dir, '\\\\/');\n\t$result = array();\n\tforeach (scandir($dir) as $f) {\n if (\n preg_match('`/tmp/`', \"$dir/$f\")\n || preg_match('`/fpdf.php$`', \"$dir/$f\")\n || preg_match('`/libs/pi_barcode.php$`', \"$dir/$f\")\n || preg_match('`/libs/phpmailer/`', \"$dir/$f\")\n || preg_match('`/libs/securimage/`', \"$dir/$f\")\n || preg_match('`/libs/Smarty/`', \"$dir/$f\")\n )\n continue;\n\t\tif ($f !== '.' and $f !== '..') {\n\t\t\tif (is_dir(\"$dir/$f\")) {\n\t\t\t\t$result = array_merge($result, RecursiveScanDir(\"$dir/$f\", \"$prefix$f/\"));\n\t\t\t} else {\n\t\t\t\tif ( strtolower(substr(pathinfo($f,PATHINFO_EXTENSION),0,3)) == \"php\" && pathinfo(__FILE__,PATHINFO_BASENAME ) != pathinfo($f,PATHINFO_BASENAME ) )\n\t\t\t\t\t$result[] = $prefix.$f;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "public function scanDir($dir)\n {\n $objects = scandir($dir);\n\n // unset 2 first elements\n unset($objects[0], $objects[1]);\n\n return $objects;\n }", "function getDirContents($dir){\r\n foreach(scandir($dir) as $key => $value){\r\n print \"$value<BR>\";\r\n }\r\n\r\n\r\n }", "function leer_archivos_y_directorios($ruta) {\r\n\t$total = 0;\r\n if (is_dir($ruta))\r\n {\r\n // Abrimos el directorio y comprobamos que\r\n if ($aux = opendir($ruta))\r\n {\r\n while (($archivo = readdir($aux)) !== false)\r\n {\r\n if ($archivo!=\".\" && $archivo!=\"..\")\r\n {\r\n $ruta_completa = $ruta . '/' . $archivo;\r\n if (is_dir($ruta_completa))\r\n {\r\n }\r\n else\r\n {\r\n\t\t\t\t\t\t$total;\r\n\t\t\t\t\t\t$total++;\r\n //echo '<br />' . $archivo . '<br />';\r\n }\r\n }\r\n }\r\n closedir($aux);\r\n }\r\n }\r\n else\r\n {\r\n echo $ruta;\r\n echo \"<br />No es ruta valida\";\r\n }\r\n\treturn($total);\r\n}", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "function buscar($dir,&$archivo_buscar) \n{ // Funcion Recursiva \n // Autor DeeRme \n // http://deerme.org \n if ( is_dir($dir) ) \n { \n // Recorremos Directorio \n $d=opendir($dir); \n while( $archivo = readdir($d) ) \n { \n if ( $archivo!=\".\" AND $archivo!=\"..\" ) \n { \n \n if ( is_file($dir.'/'.$archivo) ) \n { \n // Es Archivo \n if ( $archivo == $archivo_buscar ) \n { \n return ($dir.'/'.$archivo); \n } \n \n } \n \n if ( is_dir($dir.'/'.$archivo) ) \n { \n // Es Directorio \n // Volvemos a llamar \n $r=buscar($dir.'/'.$archivo,$archivo_buscar); \n if ( basename($r) == $archivo_buscar ) \n { \n return $r; \n } \n \n \n } \n \n \n \n \n \n } \n \n } \n \n } \n return FALSE; \n}", "function scan_students()\n {\n $current_students = [];\n $di = new RecursiveDirectoryIterator('students/');\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n $path_info = pathinfo($filename);\n if($path_info['extension']=='json'){\n array_push($current_students,$path_info['filename']);\n }\n }\n // echo print_r($current_students);\n return $current_students;\n }", "function scan_directory($directory) {\n $dir = scandir($directory);\n foreach ($dir as $d) {\n if ($d === '.' or $d === '..')\n continue;\n\n if (is_dir($directory . '/' . $d)) {\n //code to use if directory\n scan_directory($directory . '/' . $d);\n } else {\n //code to use if file \n $type = pathinfo($directory . '/' . $d, PATHINFO_EXTENSION);\n if ($type == \"mp4\" || $type == \"html\") {\n //do nothing \n continue;\n } else {\n if (unlink($directory . '/' . $d)) {\n echo '<strong>Deleted</strong>'.$directory . '/' . $d . '<br/><br/>';\n }\n }\n }\n }\n}", "private function scan_registry_dir($directory, &$message = '') {\n \tglobal $dbKITregistryFiles;\n \tglobal $dbKITregistryCfg;\n\n \t$sub_dirs = $dbKITregistryCfg->getValue(dbKITregistryCfg::cfgRegistryListTabs);\n\n $handle = opendir($directory);\n while ($file = readdir($handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (is_dir($directory.$file)) {\n // Erneuter Funktionsaufruf, um das aktuelle Verzeichnis auszulesen\n $this->scan_registry_dir($directory.$file.'/');\n }\n else {\n // Wenn Verzeichnis-Eintrag eine Datei ist, diese ausgeben\n $actual_file = page_filename(utf8_encode($file));\n $actual_file = $directory.$actual_file;\n $where = array(dbKITregistryFiles::field_filepath_registry => $actual_file);\n $data = array();\n if (!$dbKITregistryFiles->sqlSelectRecord($where, $data)) {\n \t$this->setError($dbKITregistryFiles->getError());\n \treturn false;\n }\n if (count($data) > 0) {\n \t// Datensatz existiert\n \t$data = $data[0];\n \t$update = array();\n \t// Vergleichen, ob sich etwas veraendert hat\n \tif (filemtime($actual_file) != $data[dbKITregistryFiles::field_filemtime]) {\n \t\t$update[dbKITregistryFiles::field_filemtime] = filemtime($actual_file);\n \t}\n \tif (filesize($actual_file) != $data[dbKITregistryFiles::field_filesize]) {\n \t\t$update[dbKITregistryFiles::field_filesize] = filesize($actual_file);\n \t}\n \tif ($data[dbKITregistryFiles::field_status] == dbKITregistryFiles::status_deleted) {\n \t\t$update[dbKITregistryFiles::field_status] = dbKITregistryFiles::status_active;\n \t\t$message .= sprintf(reg_msg_registry_file_undeleted, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n \tif (count($update) > 0) {\n \t\t$where = array(dbKITregistryFiles::field_id => $data[dbKITregistryFiles::field_id]);\n \t\tif (!$dbKITregistryFiles->sqlUpdateRecord($update, $where)) {\n \t\t\t$this->setError($dbKITregistryFiles->getError());\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_updated, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n }\n else {\n \t// es existiert noch kein Eintrag\n \tif (!file_exists($actual_file)) {\n \t\t// Datei muss noch umbenannt werden\n \t\tif (!rename($directory.$file, $actual_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($directory.$file), basename($actual_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_renamed, basename($directory.$file), basename($actual_file));\n \t}\n \t$sub_dir = substr(basename($actual_file), 0, 1);\n \tif (!in_array($sub_dir, $sub_dirs)) $sub_dir = '#';\n \tif (!file_exists($this->registry_path.$sub_dir)) {\n \t\tif (!mkdir($this->registry_path.$sub_dir)) {\n \t\t\t$this->setError(sprintf(reg_error_mkdir, $this->registry_path.$sub_dir));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_mkdir, '/'.$sub_dir);\n \t}\n \t$check_file = page_filename(utf8_encode($file));\n \t$check_file = $this->registry_path.$sub_dir.'/'.$check_file;\n \t// pruefen, ob sich die Datei im richtigen Verzeichnis befindet\n \tif ($actual_file != $check_file) {\n \t\tif (!rename($actual_file, $check_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($actual_file), '/'.$sub_dir.'/'.basename($check_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_moved, basename($actual_file), $sub_dir);\n \t\t$actual_file = $check_file;\n \t}\n \t$data = array(\n \t\tdbKITregistryFiles::field_filename_original\t\t\t=> utf8_encode(basename($directory.$file)),\n \t\tdbKITregistryFiles::field_filename_registry\t\t\t=> basename($actual_file),\n \t\tdbKITregistryFiles::field_filepath_registry\t\t\t=> $actual_file,\n \t\tdbKITregistryFiles::field_filemtime\t\t\t\t\t\t\t=> filemtime($actual_file),\n \t\tdbKITregistryFiles::field_filesize\t\t\t\t\t\t\t=> filesize($actual_file),\n \t\tdbKITregistryFiles::field_filetype\t\t\t\t\t\t\t=> pathinfo($actual_file, PATHINFO_EXTENSION),\n \t\tdbKITregistryFiles::field_status\t\t\t\t\t\t\t\t=> dbKITregistryFiles::status_active,\n \t\tdbKITregistryFiles::field_sub_dir\t\t\t\t\t\t\t\t=> $sub_dir\n \t);\n \t$id = -1;\n \tif (!$dbKITregistryFiles->sqlInsertRecord($data, $id)) {\n \t\t$this->setError($dbKITregistryFiles->getError());\n \t\treturn false;\n \t}\n \t$message .= sprintf(reg_msg_registry_file_added, $data[dbKITregistryFiles::field_filename_registry]);\n }\n }\n }\n }\n closedir($handle);\n }", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "protected static function _scanForPlugins(){\n\t\t$directory = __DIR__ . Config::$pluginsDirectory;\n\t\t$handle = opendir( $directory );\n\n\t\t// check to make sure we could open the directory handle\n\t\tif( !$handle )\n\t\t\treturn;\n\n\t\t// now begin looping through all of the contents of the plugin directory\n\t\twhile( ( $dir = readdir( $handle ) ) !== false ){\n\t\t\tif( $dir === '.' || $dir === '..' )\n\t\t\t\tcontinue;\n\n\t\t\t// now we need to verify that the current \"file\" is a directory before continuing\n\t\t\tif( !is_dir( $directory . $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// expect a class file to exist in the format \"class-<DirectoryName>.php\"\n\t\t\t$classFile = $directory . $dir . '/' . $dir . '.php';\n\t\t\tif( !file_exists( $classFile ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now actually include the code\n\t\t\trequire_once( $classFile );\n\n\t\t\t// now expect the class name to match whatever the $dir name was\n\t\t\tif( !class_exists( $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now we can instantiate the class name and store it now\n\t\t\tself::$_plugins[] = new $dir();\n\t\t}\n\t}", "function bob_scandir($root_path, $bad_path, $recursive) {\n $output = array();\n if (file_exists($root_path)){\n $paths = scandir($root_path);\n if ($paths === False)\n return False;\n foreach ($paths as $path) {\n $potential_path = \"${root_path}/${path}\";\n\n // Ignore any files in the bad (admin) path or files that begin with a period.\n if ($potential_path == $bad_path or $path[0] == '.')\n continue;\n\n $output[] = $potential_path;\n $bad_folder = ''; // not sure what this is for\n if ($recursive and is_dir($potential_path)) // Recursively descend and print out files.\n $output = array_merge($output, bob_scandir($potential_path, $bad_folder, $recursive));\n }\n }\n return $output;\n}", "function m_walk_dir( $root, $callback, $recursive = true, $level = 0 ) {\r\n $dh = @opendir( $root );\r\n if( false === $dh ) {\r\n return false;\r\n }\r\n while( $file = readdir( $dh )) {\r\n if( \".\" == $file || \"..\" == $file ){\r\n continue;\r\n }\r\n //echo \"## DEBUG:$level - $file<br/>\"; \r\n\r\n //echo \"Level: $level\";\r\n call_user_func( $callback,$level, \"{$root}/{$file}\", $file );\r\n if( false !== $recursive && is_dir( \"{$root}/{$file}\" )) {\r\n m_walk_dir( \"{$root}/{$file}\", $callback, $recursive, $level+1 );\r\n }\r\n }\r\n closedir( $dh );\r\n return true;\r\n}", "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "static function getDirectoryListing();", "public function crawl() {\n\t\t$sDirectories = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\tif ( $sDirectories === '' ) return $sDirectories;\n\n\t\t$aDirectories = explode( ',', $sDirectories );\n\t\tforeach ( $aDirectories as $sDirectory ) {\n\t\t\t$sDir = trim ( $sDirectory );\n\t\t\tif( !is_dir( $sDir ) ) continue;\n\t\t\t$this->readInFiles( $sDir );\n\t\t}\n\t\treturn $this->aFiles;\n\t}", "public function scanSourceFolders() {\n $this->addons = [];\n foreach ($this->sources as $sourceDir) {\n $this->scanSource($sourceDir);\n }\n }", "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "private function listFolderFiles($dir){\n $children = false;\n $isRoot = false;\n if($dir==$this->file_storage){\n $isRoot = true;\n }\n\n $folderName = $this->getFolderName($dir);\n if(!$isRoot){\n //$this->info('Directory Name: '.$folderName['child']);\n //$this->info('Parent Name: '.$folderName['parent']);\n }\n\n //$this->info('Folder: '.$dir);\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n if ($fileInfo->isDir()) {\n $this->listFolderFiles($fileInfo->getPathname());\n }else{\n $rename = false;\n //$this->info('File: '.$fileInfo->getFilename());\n //$info = new SplFileInfo($dir.'/'.$fileInfo->getFilename());\n $ext = \".\".pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);\n //$ext = \".\"$info->getExtension();\n //$this->info('File: extension '.$ext);\n $filebreak = str_replace($ext,\"\",$fileInfo->getFilename());\n if (strpos($filebreak, '.') !== false || strpos($filebreak, \"'\") !== false || strpos($filebreak, \"#\") !== false) {\n $rename = true;\n }\n if($rename){\n $replace = array(\".\", \"'\", \"#\", \";\", \"/\", \"?\", \":\", \"@\", \"=\", \"&\", \",\");\n //“;”, “/”, “?”, “:”, “@”, “=” and “&\n $fileraw = str_replace($replace,\" \",$filebreak);\n //$this->info('File: raw '.$fileraw);\n $newfilename = $fileraw . $ext;\n //$this->info('File: new '.$newfilename);\n $prod_filename = $newfilename;\n rename($dir.'/'.$fileInfo->getFilename(),$dir.'/'.$newfilename);\n }else{\n $prod_filename = $fileInfo->getFilename();\n }\n $this->checkFileExtension($dir.'/'.$prod_filename, $prod_filename, $dir);\n }\n $children = true;\n }else{\n $children = false;\n }\n }\n //$this->info('Children: '.$children);\n\n if(!$isRoot){\n $this->folders[$this->count]['name'] \t\t\t= $folderName['child'];\n $this->folders[$this->count]['parent'] \t\t= $folderName['parent'];\n $this->folders[$this->count]['full_path']\t= $dir;\n $this->folders[$this->count]['children']\t= $children;\n $this->count++;\n }\n //$this->info('#################');\n }", "function dirtree($dir, $f, &$ret, $search=null, $directory=null)\n\t{\n\t\t\n\t\t$tree = array();\n\t\t$uri = $dir.'/'.$f;\n\t\t$uri = str_replace(\"//\", \"/\", $uri);\n\t\t$handler = @opendir($uri);\n\t\t//open all directories\n\t\twhile ($file = @readdir($handler)) \n\t\t{\n \tif ($file != '.' && $file != '..')\n \t{\n \t\t$items = $dir.'/'.$f;\n \t\tif(is_dir($items.'/'.$file))\n \t\t{\n \t\t\tif($file[0] !='.')\n \t\t\t{\n\t \t\t\tif($search == null)\n\t \t\t\t\tdirtree($items, $file, $tree);\n\t \t\t\telse\n\t \t\t\t{\n\t \t\t\t\tif($directory != '')\n\t \t\t\t\t\t$src = $directory.'/'.$file;\n\t \t\t\t\telse\n\t \t\t\t\t\t$src = $file;\n\t \t\t\t\tdirtree($items, $file, &$ret,$search, $src);\n\t \t\t\t}\n \t\t\t}\n \t\t}\n \t\telse if($search != null) // If search mode true\n \t\t{\n \t\t\t$file_parts = pathinfo($file);\n\t \t\tif(strstr(strtolower($file),strtolower($search))) // If search string is in file name\n\t \t\t{\n\t \t\t\tif($directory != '') // If root dir\n \t\t\t\t\t$src = $directory.'/'.$file;\n \t\t\t\telse\n \t\t\t\t\t$src = $file;\n\t \t\t\t$item = array( 'src' => $src, 'file' => $file); \n\t \t\t\tif(isset($param))\n\t \t\t\t$param=\"\";\n\t \t\t\tif( @!is_dir($param.$file)) // If not dir and is picture file.\n\t \t\t\t{\n\t \t\t\t\t\n\t \t\t\t\tif(strtolower($file_parts['extension']) == 'jpeg' || strtolower($file_parts['extension']) == 'jpg' || strtolower($file_parts['extension']) == 'png' || strtolower($file_parts['extension']) == 'gif' || strtolower($file_parts['extension']) == 'bmp')\n\t \t\t\t\t{\t\n\t \t\t\t\t\t$uri = $dir.'/'.$f.'/'.$file;\n\t\t\t\t\t\t\t\t$uri = str_replace(\"//\", \"/\", $uri);\n\t \t\t\t\t\t@$size = getimagesize($uri);\n\t \t\t\t\t\t@$item['x'] = $size[0];\n\t \t\t\t\t\t@$item['y'] = $size[1];\n\t \t\t\t\t\tarray_push($ret, $item);\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n \t\t}\n \t}\n \t}\n \tif($search === null) // Add dir to aray\n \t{\n \t\t$it = array('name' => $f,'items' => $tree);\n \t\tarray_push($ret,$it);\n \t}\n\t}", "private function _readDirRecursiv( $path, $prefix = '', &$seen = array() ) {\n\t\t$struct = array();\n\t\tif ( ( $dir = opendir( $path ) ) !== false ) {\n\t\t\twhile( ( $file = readdir( $dir ) ) !== false ) {\n\t\t\t\t\n\t\t\t\t// ignore curent and upper dir and all hidden files\n\t\t\t\tif ( preg_match( '/^\\./', $file ) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t// get abs path\n\t\t\t\t$abs = $path . '/'. $file;\n\t\t\t\t/*print( \"READING '$abs'\\n\" );*/\n\t\t\t\t\n\t\t\t\t// seen ?\n\t\t\t\tif ( isset( $seen[ $abs ] ) )\n\t\t\t\t\tcontinue;\n\t\t\t\t$seen[ $abs ] = true;\n\t\t\t\t\n\t\t\t\t// ignore snippets folders and admin files\n\t\t\t\tif ( $abs == ZC_CONTENTS. '/snippets' || preg_match( '/^admin-/', $file ) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t// we will determine title later one\n\t\t\t\t$title_file = $abs;\n\t\t\t\t$title = $file;\n\t\t\t\t$struct_name = null;\n\t\t\t\t\n\t\t\t\t// found tx file\n\t\t\t\tif ( is_file( $abs ) && preg_match( '/^(.+)\\.tx$/', $file, $match ) ) {\n\t\t\t\t\t$struct_name = $prefix. $match[1];\n\t\t\t\t\t$struct_name = preg_replace( '#/index$#', '', $struct_name );\n\t\t\t\t\tif ( ! isset( $struct[ $struct_name ] ) ) {\n\t\t\t\t\t\t$title = $match[1];\n\t\t\t\t\t\t$struct[ $struct_name ] = array(\n\t\t\t\t\t\t\t'title' => $title,\n\t\t\t\t\t\t\t'file'\t=> $abs,\n\t\t\t\t\t\t\t'pos'\t=> 99999,\n\t\t\t\t\t\t\t'sub'\t=> array()\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\t// found dir -> recurse\n\t\t\t\telseif ( is_dir( $abs ) ) {\n\t\t\t\t\t$title_file = \"$abs/index.tx\";\n\t\t\t\t\t$struct_name = $prefix. $file;\n\t\t\t\t\t$struct[ $struct_name ] = array(\n\t\t\t\t\t\t'title' => $title,\n\t\t\t\t\t\t'file'\t=> $title_file,\n\t\t\t\t\t\t'pos'\t=> 99999,\n\t\t\t\t\t);\n\t\t\t\t\t$struct[ $struct_name ][ 'sub' ]\n\t\t\t\t\t\t= $this->_readDirRecursiv( $abs, $prefix. $file . '/', $seen );\n\t\t\t\t\tif ( isset( $struct[ $struct_name ][ 'sub' ][ $struct_name ] ) )\n\t\t\t\t\t\tunset( $struct[ $struct_name ][ 'sub' ][ $struct_name ] );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// determine title and index\n\t\t\t\tif ( file_exists( $title_file ) && ( $fh = fopen( $title_file, 'r' ) ) !== false ) {\n\t\t\t\t\twhile ( ( $line = fgets( $fh ) ) !== false ) {\n\t\t\t\t\t\tif ( preg_match( '/^###title\\s+(?:(\\d+):\\s*)?([^\\n\\r]+)/ms', $line, $mtitle ) ) {\n\t\t\t\t\t\t\t$struct[ $struct_name ][ 'title' ] = $mtitle[2];\n\t\t\t\t\t\t\tif ( ! @empty( $mtitle[1] ) )\n\t\t\t\t\t\t\t\t$struct[ $struct_name ][ 'pos' ] = $mtitle[1];\n\t\t\t\t\t\t\tfclose( $fh );\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}\n\t\t\t}\n\t\t\tclosedir( $dir );\n\t\t}\n\t\t\n\t\treturn $struct;\n\t}", "function fs_get_tree($dir_path) {\n #echo \"top of fs_get_tree, dir_path=$dir_path\\n\";\n { $old_cwd = getcwd();\n chdir($dir_path);\n #echo \" did chdir to '$dir_path'\\n\";\n\n {\n $fh = opendir('.');\n #echo \" opendir\\n\";\n\n $results = array();\n $n = 0;\n $dirs_to_crawl = array();\n while (true) {\n #echo \" loop\\n\";\n if ($n > 500) {\n #echo \"--- n > LIMIT (n=$n), break\\n\";\n break;\n }\n $n++;\n $file = readdir($fh);\n #echo \" file = '$file'\\n\";\n if (!$file) {\n break;\n }\n if ($file == '.'\n || $file == '..'\n || $file == '.git' #todo #fixme don't assume\n ) {\n #echo \"--- . or .., continuing\\n\";\n continue;\n }\n if (is_dir($file)) {\n #echo \"--- adding $file to dirs, n=$n\\n\";\n $dirs_to_crawl[] = $file;\n }\n $results[$file] = null;\n }\n closedir($fh);\n }\n\n #echo \"\\nnow looping thru dirs_to_crawl\\n\";\n foreach ($dirs_to_crawl as $dir) {\n #echo \" dir = $dir\\n\";\n $results[$dir] = fs_get_tree($dir);\n }\n\n chdir($old_cwd);\n }\n\n return $results;\n }", "function my_scandirNoRecursive($dir_path){\n $array = array();\n $handle = opendir($dir_path);\n while ($entry = readdir($handle)) {\n if (($entry !== \".\") && ($entry !== \"..\")){\n if(!is_dir($entry)){\n array_push($array, $dir_path.\"/\".$entry);\n $array = preg_grep(\"/^.*\\.(png)$/i\", $array);\n sort($array);\n }\n }\n }\n return $array;\n}", "public function scan($filename){ }", "function dirList ($dir) \n{\n $results = array();\n\n\tif(file_exists($dir)){\n\t\t// create a handler for the directory\n\t\t$handler = opendir($dir);\n\n\t\t// keep going until all files in directory have been read\n\t\twhile ($file = readdir($handler)) {\n\n\t\t\t// if $file isn't this directory or its parent, \n\t\t\t// add it to the results array\n\t\t\tif ($file != '.' && $file != '..')\n\t\t\t\t$results[] = $file;\n\t\t}\n\n\t\t// tidy up: close the handler\n\t\tclosedir($handler);\n\n\t\trsort($results);\n\t}\n\n // done!\n return $results;\n}", "function scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, $context = null): array\n{\n error_clear_last();\n if ($context !== null) {\n $safeResult = \\scandir($directory, $sorting_order, $context);\n } else {\n $safeResult = \\scandir($directory, $sorting_order);\n }\n if ($safeResult === false) {\n throw DirException::createFromPhpError();\n }\n return $safeResult;\n}", "public function scanPath(Path $path)\n\t{\n\t\treturn @scandir($path->getPath());\n\t}", "public function scan($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = array_diff(scandir($this->directory), array('.', '..'));\n\t\t$objects = array();\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\t$file = $this->directory . $file;\n\t\t\t\n\t\t\tif ($regex_filter) {\n\t\t\t\t$test_path = (is_dir($file)) ? $file . '/' : $file;\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$objects[] = fFilesystem::createObject($file);\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function dir_list($file)\n{\n $file_list = scandir($file);\n foreach($file_list as $item)\n {\n if($item == '.' || $item == '..')continue;\n \n $file_path = $file . '/' . $item;\n if(is_dir($file_path))\n {\n echo \"<font color='red'>$file_path</font><br/>\";\n dir_list($file_path);\n }\n else{\n echo $file_path . \"<br>\";\n }\n }\n}", "function GetContents($dir,$files=array()) \n{\n if(!($res=opendir($dir))) exit(\"$dir doesn't exist!\");\n while(($file=readdir($res))==TRUE) \n if($file!=\".\" && $file!=\"..\")\n if(is_dir(\"$dir/$file\")) $files=GetContents(\"$dir/$file\",$files);\n else array_push($files,\"$dir/$file\");\n \n closedir($res);\n return $files;\n}", "private function scanDir(string $path, array &$files, bool $recursion = false): void\n {\n $handler = opendir($path);\n\n while ($item = readdir($handler)) {\n if (in_array($item, ['.', '..'])) {\n continue;\n }\n\n $itemPath = sprintf('%s/%s', $path, $item);\n\n if (is_file($itemPath)) {\n $files[] = $itemPath;\n continue;\n }\n\n if ($recursion && is_dir($itemPath)) {\n $this->scanDir($itemPath, $files, $recursion);\n }\n }\n }", "function PMA_getDirContent($dir, $expression = '')\n{\n if (file_exists($dir) && $handle = @opendir($dir)) {\n $result = array();\n if (substr($dir, -1) != '/') {\n $dir .= '/';\n }\n while ($file = @readdir($handle)) {\n // for PHP < 5.2.4, is_file() gives a warning when using open_basedir\n // and verifying '..' or '.'\n if ('.' != $file && '..' != $file && is_file($dir . $file) && ($expression == '' || preg_match($expression, $file))) {\n $result[] = $file;\n }\n }\n @closedir($handle);\n asort($result);\n return $result;\n } else {\n return FALSE;\n }\n}", "function prev_files(){\n\tglobal $sleep;\n\t$files_list = array();\n\t$scan_dir = scandir(OUTPUT_FOLDER, 1);\n\t$prev_file = isset($scan_dir[0]) ? $scan_dir[0] : '';\n\tif(empty($prev_file) || $prev_file == '.' || $prev_file == '..'){\n\t\treturn $files_list;\n\t}\n\t$prev_file = OUTPUT_FOLDER.'/'.$prev_file;\n\tif(file_exists($prev_file)){\n\t\t$available_list = $dir_lists = array();\n\t\t$file_content = file_get_contents($prev_file);\n\t\t$json = json_decode($file_content);\n\t\tforeach($json as $file_info){\n\t\t\t$file = $file_info->file;\n\t\t\tif(!is_dir($file)){\n\t\t\t\t$dir_array = explode('/',$file);\n\t\t\t\t$dir_count = count($dir_array);\n\t\t\t\t$dir_list = '';\n\t\t\t\tfor($x = 0; $x < $dir_count - 1; $x++){\n\t\t\t\t\t$dir_list .= $dir_array[$x].'/';\n\t\t\t\t}\n\t\t\t\tif(!in_array($dir_list,$dir_lists)){\n\t\t\t\t\tarray_push($dir_lists,$dir_list);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$info = $file_info->info;\n\t\t\t$dt = array();\n\t\t\tforeach($info as $key=>$val){\n\t\t\t\t$dt[$key] = $val;\n\t\t\t}\n\t\t\t$data = array(\n\t\t\t\t'file'=>$file,\n\t\t\t\t'info'=>$dt\n\t\t\t);\n\t\t\tarray_push($files_list,$data);\n\t\t}\n\t\tif(count($dir_lists) > 0){\n\t\t\t//See if we have directories that are not listed as scanned from previous scan\n\t\t\tforeach($dir_lists as $dir){\n\t\t\t\tif(array_multi_search($files_list,'file',$dir)){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$dir_stat = stat($dir);\n\t\t\t\t$dt = array();\n\t\t\t\tforeach($dir_stat as $key=>$val){\n\t\t\t\t\t$dt[$key] = $val;\n\t\t\t\t}\n\t\t\t\t$data = array(\n\t\t\t\t\t'file'=>$dir,\n\t\t\t\t\t'info'=>$dt\n\t\t\t\t);\n\t\t\t\tarray_push($files_list,$data);\n\t\t\t}\n\t\t}\n\t}\n\treturn $files_list;\n}", "function directory_list($dir, $type = \"php\", $excl = array(), $sort = 0)\n{\n $directory_array = array();\n if (is_dir($dir)) {\n $handle = opendir($dir);\n while ($file = readdir($handle))\n {\n $file_arr = explode(\".\", $file);\n if (!is_dir($file)) {\n if (isset($file_arr[1]) && $file_arr[1] == $type && !in_array($file_arr[0], $excl)) {\n //array_push($directory_array, $file_arr[0]); //eroforras igenyesebb\n if ($sort == 0) {\n $directory_array[] = $file_arr[0];\n }\n if ($sort == 1) {\n $directory_array[$file_arr[0]] = $file_arr[0];\n }\n }\n }\n }\n closedir($handle);\n if ($sort == 0) {\n sort($directory_array);\n }\n if ($sort == 1) {\n ksort($directory_array);\n }\n }\n return $directory_array;\n}", "abstract protected function yieldSearchPaths(): Generator;", "private function _discover() {\n\n $dir = new DirectoryIterator($this->dirname);\n\n foreach ($dir as $file) {\n\n if ($file->isFile() && !$file->isDot()) {\n\n $filename = $file->getFilename();\n $pathname = $file->getPathname();\n\n if (preg_match('/^(\\d+\\W*)?(\\w+)\\.php$/', $filename, $matches)) {\n require_once($pathname);\n $class = \"{$matches[2]}_{$this->suffix}\";\n $files[$filename] = new $class();\n }\n\n }\n\n }\n\n ksort($files);\n $plugins = array_values($files);\n\n return $plugins;\n\n }", "public function scanDirsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRawRecursive(false, true, $filter, true);\n }", "function CheckDir($dir, $startWith = '')\n{\n global $count;\n global $pruned;\n $count++;\n \n echo \"\\r$count ($pruned): Checking $dir \";\n \n $started = false;\n if( !strlen($startWith) )\n $started = true;\n\n // see if this is a directory we need to prune\n if( $started && is_dir(\"$dir/video_2\") )\n {\n PruneDir($dir);\n }\n else\n {\n // recurse into any directories\n $f = scandir($dir);\n foreach( $f as $file )\n {\n if( !$started && $file == $startWith )\n $started = true;\n \n if( $started && is_dir(\"$dir/$file\") && $file != '.' && $file != '..' )\n CheckDir(\"$dir/$file\");\n }\n unset($f);\n }\n}", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "function get_all_directory_files($directory_path)\n{\n\n $scanned_directory = array_diff(scandir($directory_path), array('..', '.'));\n\n\n\n return custom_shuffle($scanned_directory);\n}", "function dir_tree($dir,$search_string=\"0000\") {\r\n global $debug_jon,$dir_to_search;\r\n if($string_to_search==\"000\") return \"NoFile\";\r\n $path = '';\r\n $stack[] = $dir;\r\n while ($stack) {\r\n $thisdir = array_pop($stack);\r\n if ($dircont = scandir($thisdir)) {\r\n $i=0;\r\n while (isset($dircont[$i])) {\r\n if ($dircont[$i] !== '.' && $dircont[$i] !== '..') {\r\n $current_file = \"{$thisdir}/{$dircont[$i]}\";\r\n\t\t\t\t \r\n if (is_file($current_file)) {\r\n\t\t\t\t\t\t//$current_file=mb_convert_encoding($current_file,\"utf8\",\"8859-1\");\r\n\t\t\t\t\t\t$current_file= iconv( \"iso-8859-7\",\"utf-8\", $current_file );\r\n\t\t\t\t\t\t$dircont[$i]= iconv( \"iso-8859-7\",\"utf-8\", $dircont[$i] );\r\n\t\t\t\t\t if (strpos($current_file,$search_string)) {\r\n\t\t\t\t\t\t\t\techo \"<h3><a href='$current_file' target=_blank >$dircont[$i]</a></h3>\";\r\n\t\t\t\t\t\t\t\t//if($debug_jon) \r\n\t\t\t\t\t\t\t\t//echo \"<h2>smartDOWNLOADFILE ONLY<a href='../$dir_to_search/download.php?f=\". urlencode(\"$current_file\").\"' target=_blank >$dircont[$i]</a></h2>\";\r\n\t\t\t\t\t\t}\t\t\t\t \r\n $path[] = \"{$thisdir}/{$dircont[$i]}\";\r\n\t\t\t\t\t \r\n } elseif (is_dir($current_file)) {\r\n $path[] = \"{$thisdir}/{$dircont[$i]}\";\r\n $stack[] = $current_file;\r\n }\r\n }\r\n $i++;\r\n }\r\n }\r\n }\r\n return $path;\r\n}", "public static function scanDir(string $path): array\n {\n $ret = [];\n if ($handle = opendir($path)) {\n while (false !== ($entry = readdir($handle))) {\n if ($entry != \".\" && $entry != \"..\") {\n $ret[] = $entry;\n }\n }\n closedir($handle);\n }\n\n asort($ret);\n\n return $ret;\n }", "public function scanDirNamesRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string>\n */\n return $this->scanRawRecursive(false, true, $filter, null);\n }", "public function scanRecursive($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = $this->scan();\n\t\t$objects = $files;\n\t\t\n\t\t$total_files = sizeof($files);\n\t\tfor ($i=0; $i < $total_files; $i++) {\n\t\t\tif ($files[$i] instanceof fDirectory) {\n\t\t\t\tarray_splice($objects, $i+1, 0, $files[$i]->scanRecursive());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($regex_filter) {\n\t\t\t$new_objects = array();\n\t\t\tforeach ($objects as $object) {\n\t\t\t\t$test_path = ($object instanceof fDirectory) ? substr($object->getPath(), 0, -1) . '/' : $object->getPath();\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\t\n\t\t\t\t$new_objects[] = $object;\n\t\t\t}\n\t\t\t$objects = $new_objects;\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function parseDir($dir) {\r\n global $zoom;\r\n // start the scan...(open the local dir)\r\n $images = array();\r\n $handle = $zoom->platform->opendir($dir);\r\n while (($file = $zoom->platform->readdir($handle)) != false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $tag = ereg_replace(\".*\\.([^\\.]*)$\", \"\\\\1\", $file);\r\n $tag = strtolower($tag);\r\n if ($zoom->acceptableFormat($tag)) {\r\n // Tack it onto images...\r\n $images[] = $file;\r\n }\r\n }\r\n }\r\n $zoom->platform->closedir($handle);\r\n return $images;\r\n }", "public function getDirectoryTreeList();", "function scandir_recursive($directory, $format = null, $excludes = array()){\n $format = ($format == null) ? 'absolute' : $format;\n $paths = array();\n $stack[] = $directory;\n while($stack){\n $this_resource = array_pop($stack);\n if ($resource = scandir($this_resource)){\n $i = 0;\n while (isset($resource[$i])){\n if ($resource[$i] != '.' && $resource[$i] != '..'){\n $current = array(\n 'absolute' => \"{$this_resource}/{$resource[$i]}\",\n 'relative' => preg_replace('/' . preg_quote($directory, '/') . '/', '', \"{$this_resource}/{$resource[$i]}\")\n );\n if (is_file($current['absolute'])){\n $paths[] = $current[$format];\n } elseif (is_dir($current['absolute'])){\n $paths[] = $current[$format];\n $stack[] = $current['absolute'];\n }\n }\n $i++;\n }\n }\n }\n if (count($excludes) > 0){\n $clean = array();\n foreach($paths as $path){\n $remove = false;\n foreach($excludes as $exclude){\n $exclude = preg_quote($exclude, '/');\n $exclude = str_replace('\\*', '.*', $exclude);\n if (preg_match('/' . $exclude . '/', $path)){\n $remove = true;\n }\n }\n if (!$remove) $clean[] = $path;\n }\n $paths = $clean;\n }\n return $paths;\n}", "public function scanDirs(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRaw(false, true, $filter, true);\n }", "function recursive($dir,$outdir)\n{\n static $deep = 0;\n static $countDirs = 0;\n static $countFiles = 0;\n \n $odir = opendir($dir);\n \n while (($file = readdir($odir)) !== FALSE)\n {\n if ($file == '.' || $file == '..')\n {\n continue;\n }\n else\n {\n\t\t if(!is_dir($dir.DIRECTORY_SEPARATOR.$file)){ \n\t\t\tUnoconv::convertToPdf($dir.DIRECTORY_SEPARATOR.$file, $outdir.DIRECTORY_SEPARATOR.$file); \n\t\t\t$countFiles++;\n\t\t}\n //echo str_repeat('---', $deep).$dir.DIRECTORY_SEPARATOR.$file.'<br>';\n echo str_repeat('---', $deep).$file.'<br>';\n }\n \n if (is_dir($dir.DIRECTORY_SEPARATOR.$file))\n {\n\t\t $countDirs++; \n $deep ++;\n $current_dir_name=$file;\n recursive($dir.DIRECTORY_SEPARATOR.$file,$outdir.DIRECTORY_SEPARATOR.$current_dir_name);\n $deep --;\n }\n }\n closedir($odir);\n return ['folders'=>$countDirs, 'files'=>$countFiles];\n}", "public abstract function dir();", "public function testListDirectory()\n {\n $temp = BASE_FOLDER . '/.dev/Tests/Data/Testcases';\n\n $this->options = array(\n 'recursive' => false,\n 'exclude_files' => false,\n 'exclude_folders' => false,\n 'extension_list' => array(),\n 'name_mask' => null\n );\n $this->path = BASE_FOLDER . '/.dev/Tests/Data/Testcases/';\n\n $adapter = new fsAdapter($this->action, $this->path, $this->filesystem_type, $this->options);\n\n $this->assertEquals(1, count($adapter->fs->data));\n\n return;\n }", "function get_files($instructor=False, $sources=array('class', 'lab', 'project', 'exam', 'review', 'capstone', 'continued-lab'), $file_path = '.', $access=array(), $virtual=array(), $categories=array(), $secret='really') {\n $results = array();\n $basedir = scandir($file_path);\n foreach ($sources as $i => $l0) {\n if (in_array($l0, $basedir) && is_dir($file_path . '/' . $l0)) {\n $level1 = scandir($file_path . '/' . $l0);\n sort($level1);\n foreach ($level1 as $i => $l1) {\n if (substr($l1, 0, 1) != '.' && is_dir($file_path . '/' . $l0 . '/' . $l1)) {\n // The following code allows the system recursively look through the Directory\n // structure within a class, and the system can now process RELATIVE links\n // that go into those subordinate directories\n $level2 = array();\n try {\n $Iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($file_path . '/' . $l0 . '/' . $l1),\n RecursiveIteratorIterator::LEAVES_ONLY,\n RecursiveIteratorIterator::CATCH_GET_CHILD);\n foreach($Iterator as $name => $object) {\n $name = explode(\"/\", $name);\n unset($name[2]);\n unset($name[1]);\n unset($name[0]);\n $name = implode(\"/\", $name);\n $level2[] = $name;\n }\n } catch (Exception $e) {\n // Unable to recurse, so don't bother...\n }\n //$level2 = scandir($file_path . '/' . $l0 . '/' . $l1);\n $results[$l0][$l1] = array();\n sort($level2);\n foreach ($level2 as $i => $l2) {\n $key = sha1($secret.$l0.$l1.$l2);\n if (substr($l2, 0, 1) != '.' && validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access)[0]) {\n if (is_link($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2)) {\n if (validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access)[0]) {\n $vf = validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access);\n $category = categorize_file($instructor, $l2, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2),\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n } else {\n $vf = validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access);\n $category = categorize_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n }\n # Add Virtual files, format like array('class'=>array(1 => array(array('answers.html', 'homework/answers05.html'))))\n foreach ($virtual as $l0 => $l1array) {\n if (isset($results[$l0])) {\n $classes = array_keys($results[$l0]);\n foreach ($l1array as $day => $l2array) {\n if (isset($classes[$day-1])) {\n foreach ($l2array as $i => $values) {\n $virt_file = $values[0];\n $real_file = $values[1];\n if (validate_file($instructor, $real_file, $real_file, $access)[0]) {\n $key = sha1($secret.$real_file.$virt_file);\n $vf = validate_file($instructor, $real_file, $real_file, $access);\n $category = categorize_file($instructor, $virt_file, $real_file, $vf[5], $categories);\n $results[$l0][$classes[$day-1]][$virt_file] = array('actual' => $real_file,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n #####################################################\n # Verify that the class is not blocked by security...\n $today = getdate();\n foreach ($results as $l0 => $classes) {\n $counter = 1;\n foreach ($classes as $l1 => $data) {\n foreach ($data as $filename => $fdata) {\n if ($fdata['year'] == 1 && $fdata['month'] == 1 && $fdata['day'] == 1) {\n $cate = $fdata['category'];\n if (isset($access[$l0.\"_\".$counter]) && $cate == 'title') {\n $sspec = $l0.\"_\".$counter;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$cate])) {\n $sspec = $l0.\"_\".$counter.\"/\".$cate;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$filename])) {\n $sspec = $l0.\"_\".$counter.\"/\".$filename;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/all\"])) {\n $sspec = $l0.\"_\".$counter.\"/all\";\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n }\n }\n }\n $counter++;\n }\n }\n return $results;\n }", "function walk_and_encode($dirs = null,$directory = null) {\n global $allowed_ext;\n if (!is_array($dirs) && $directory == null) {\n return false;\n }\n echo \"Scanning \".$directory.\"\\n\";\n foreach($dirs as $dir) {\n switch ($dir) {\n // We shall not check this\n case \".\":\n break;\n case \"..\";\n break;\n case \"encodings.php\":\n break;\n // Convert\n default:\n if (is_dir($directory.\"/\".$dir)) {\n echo \"$directory/$dir\\n\";\n walk_and_encode(scandir($directory.\"/\".$dir),$directory.\"/\".$dir);\n } elseif(is_file($directory.\"/\".$dir)) {\n $file_info = pathinfo($directory.\"/\".$dir);\n if (isset($file_info['extension']) && in_array($file_info['extension'],$allowed_ext)) {\n $item = file_get_contents($directory.\"/\".$dir);\n $item = preg_split('//', $item, -1, PREG_SPLIT_NO_EMPTY);\n $item = encoding($item);\n\n if (is_array($item)) {\n $item = implode('',$item);\n }\n if ($item != '') {\n file_put_contents($directory.\"/\".$dir,$item);\n echo \"Written \".$directory.\"/\".$dir.\"\\n\";\n } else {\n echo \"Empty content, ignore\\n\";\n }\n\n } else {\n echo \"Ignored \".$directory.\"/\".$dir.\"\\n\";\n }\n }\n break;\n }\n }\n}", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "public function scanDirectory (& $setCountTo = NULL, $sortByWhat = SORT_STRING) {\n $temporaryScandirArray = array_reverse (scandir ($this->varContainer, $sortByWhat), FALSE);\n $temporaryCount = count ($temporaryScandirArray);\n $scanArrayFiltered = array ();\n $setCountTo = 0;\n for ($i = 0; $i < $temporaryCount; ++$i) {\n if ($temporaryScandirArray[$i][0] != '.') {\n $scanArrayFiltered[] = $temporaryScandirArray[$i];\n $setCountTo++;\n }\n }\n return new A ($scanArrayFiltered);\n }", "public function scanRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir|File>\n */\n return $this->scanRawRecursive(true, true, $filter, true);\n }", "function rd_do_dir($dir)\n{\n\t$out=array();\n\t$_dir=($dir=='')?'.':$dir;\n\t$dh=@opendir($_dir);\n\tif ($dh!==false)\n\t{\n\t\twhile (($file=readdir($dh))!==false)\n\t\t{\n\t\t\tif (!in_array($file,array('.','..','git','.svn','CVS','_vti_cnf')))\n\t\t\t{\n\t\t\t\tif (is_file($_dir.'/'.$file))\n\t\t\t\t{\n\t\t\t\t\t$path=$dir.(($dir!='')?'/':'').$file;\n\t\t\t\t\t$out[]=$path;\n\t\t\t\t} elseif (is_dir($_dir.'/'.$file))\n\t\t\t\t{\n\t\t\t\t\t$out=array_merge($out,rd_do_dir($dir.(($dir!='')?'/':'').$file));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $out;\n}", "public function &getFolders($folder)\n\t{\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$breakflag_before_process = $registry->get('volatile.breakflag', false);\n\n\t\t// Reset break flag before continuing\n\t\t$breakflag = false;\n\n\t\t// Initialize variables\n\t\t$arr = array();\n\t\t$false = false;\n\n\t\tif(!is_dir($folder) && !is_dir($folder.'/')) return $false;\n\n\t\t$counter = 0;\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$maxCounter = $registry->get('engine.scan.smart.large_dir_threshold',100);\n\n\t\t$allowBreakflag = ($registry->get('volatile.operation_counter', 0) != 0) && !$breakflag_before_process;\n\n\t\t$handle = @opendir($folder);\n\t\t/* If opening the directory doesn't work, try adding a trailing slash. This is useful in cases\n\t\t * like this: open_basedir=/home/user/www/ and the root is /home/user/www. Trying to scan\n\t\t * /home/user/www results in error, trying to scan /home/user/www/ succeeds. Duh!\n\t\t */\n\t\tif ($handle === FALSE) {\n\t\t\t$handle = @opendir($folder.'/');\n\t\t}\n\t\t// If directory is not accessible, just return FALSE\n\t\tif ($handle === FALSE) {\n\t\t\t$this->setWarning('Unreadable directory '.$folder);\n\t\t\treturn $false;\n\t\t}\n\n\t\twhile ( (($file = @readdir($handle)) !== false) && (!$breakflag) )\n\t\t{\n\t\t\tif (($file != '.') && ($file != '..'))\n\t\t\t{\n\t\t\t\t// # Fix 2.4: Do not add DS if we are on the site's root and it's an empty string\n\t\t\t\t$ds = ($folder == '') || ($folder == '/') || (@substr($folder, -1) == '/') || (@substr($folder, -1) == DIRECTORY_SEPARATOR) ? '' : DIRECTORY_SEPARATOR;\n\t\t\t\t$dir = $folder . $ds . $file;\n\t\t\t\t$isDir = is_dir($dir);\n\t\t\t\tif ($isDir) {\n\t\t\t\t\t$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($dir) : $dir;\n\t\t\t\t\tif($data) $arr[] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$counter++;\n\t\t\tif($counter >= $maxCounter) $breakflag = $allowBreakflag;\n\t\t}\n\t\t@closedir($handle);\n\n\t\t// Save break flag status\n\t\t$registry->set('volatile.breakflag', $breakflag);\n\n\t\treturn $arr;\n\t}", "function directory_mapper($path)\n{\n $maxDepth = 3;\n $minDepth = 3;\n $iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),\n RecursiveIteratorIterator::SELF_FIRST,\n RecursiveIteratorIterator::CATCH_GET_CHILD// Ignore \"Permission denied\"\n );\n $iterator->setMaxDepth($maxDepth);\n\n $paths = array($path);\n foreach ($iterator as $path => $dir) {\n if ($iterator->getDepth() >= $minDepth) {\n if ($dir->isDir()) {\n if (file_exists($dir . DIRECTORY_SEPARATOR . \"meta\")) {\n $paths[] = $path;\n }\n }\n }\n }\n array_shift($paths);\n return $paths;\n}", "function get_dirs($dir) {\n\n global $DOCDIR;\n\n // Collect files and diretcories in these arrays\n $directories = array();\n $files = array();\n\n // Open the directory\n $handle = @opendir($dir);\n\n // Walk through all names in the directory\n while ($file = @readdir($handle)) {\n\n if (\n (!is_dir($dir.'/' .$file) && !in_array(substr($file, -3), array('xml','ent')) && substr($file, -13) != 'PHPEditBackup' )\n || strpos($file, 'entities.') === 0\n || $file == 'translation.xml'\n || $file == 'README'\n || $file == 'DO_NOT_TRANSLATE'\n || $file == 'rsusi.txt'\n || $file == 'missing-ids.xml'\n || $file == 'license.xml'\n || $file == 'versions.xml'\n ) {\n continue;\n }\n\n if ($file != '.' && $file != '..' && $file != '.svn' && $dir != '/functions') {\n if (is_dir($dir.'/' .$file)) {\n $directories[] = $file;\n } elseif (is_file($dir.'/' .$file)) {\n $files[] = $file;\n }\n }\n\n }\n\n // Close the directory\n @closedir($handle);\n\n // Sort files and directories\n sort($directories);\n sort($files);\n\n // Go through files first\n foreach ($files as $file) {\n change_revision($dir.$file);\n }\n\n // Then go through subdirectories\n foreach ($directories as $file) {\n get_dirs($dir.$file.'/');\n }\n\n}", "function scandir_n($dir = './', $sort = 0, $only_pics = false, $only_dirs = false)\n{\n //(originally scandir is PHP 5)\n $dir_open = @ opendir($dir);\n if (! $dir_open) {\n return false;\n }\n \n $files = array();\n while (($dir_content = readdir($dir_open)) !== false) {\n if ($dir_content != \".\" && $dir_content != \"..\" && utf8_substr($dir_content,0,1) != '.') {\n if (!$only_pics or in_array(utf8_strtolower(utf8_substr($dir_content,-4)),array('.jpg','.gif','.png','tiff')))\n if(!$only_dirs or filetype($dir.'/'.$dir_content)=='dir')\n $files[] = $dir_content;\n }\n }\n if($sort == 1) {\n rsort($files, SORT_STRING);\n } else {\n sort($files, SORT_STRING);\n }\n return $files;\n}" ]
[ "0.77819705", "0.7735031", "0.7294821", "0.7007625", "0.68574405", "0.6799736", "0.6560463", "0.65327024", "0.6521086", "0.6508652", "0.6382135", "0.63433135", "0.6287173", "0.62646174", "0.62332535", "0.6219239", "0.6212817", "0.61360383", "0.6128567", "0.6106466", "0.60982925", "0.6064746", "0.6048008", "0.60067517", "0.59840226", "0.59103197", "0.58761454", "0.58609813", "0.5846673", "0.57723606", "0.57704294", "0.5766629", "0.5761009", "0.57533574", "0.5747346", "0.574362", "0.57189745", "0.56997967", "0.5678616", "0.56740135", "0.56583804", "0.56469876", "0.56417966", "0.56401414", "0.56316495", "0.56310403", "0.56033546", "0.5582015", "0.5580192", "0.5570535", "0.5567265", "0.55662876", "0.55334735", "0.5527588", "0.55118704", "0.55043304", "0.5500162", "0.5487076", "0.5479026", "0.54636306", "0.5460688", "0.5440165", "0.543303", "0.5431263", "0.5429617", "0.54187113", "0.5414652", "0.54076076", "0.5391094", "0.5390748", "0.5375346", "0.5372597", "0.53673005", "0.5360758", "0.5356908", "0.53455424", "0.5329248", "0.5329233", "0.53186303", "0.5317893", "0.53172415", "0.53145146", "0.53129834", "0.53069407", "0.5304737", "0.529414", "0.52722794", "0.52711254", "0.52695155", "0.52681524", "0.5266256", "0.5263248", "0.52511287", "0.5236084", "0.52322006", "0.52169865", "0.521687", "0.5206028", "0.5202608", "0.52018726" ]
0.7612559
2
Test for Directory::scan() Scan only the directories inside ROOT directory
public function test_scan_directories() { $content = array('.','..','application','.git','nbproject','system'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS); $this->assertEquals(count($content), count($res)); foreach($res as $path=>$dir){ $this->assertTrue(in_array($dir->get_base_name(), $content)); $this->assertInstanceOf('\Kaili\Directory', $dir); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "function dirscan_files($rootFolder){\n $fileNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (!is_dir($rootFolder.\"/\".$name)) $fileNames[]=$name;\n }\n sort($fileNames);\n return $fileNames;\n}", "function scan_dir($dir){\n\tif( !is_dir( $dir ) )\n\t\treturn false;\n\n\t$files=scandir($dir);\n\n\t$dirs=array();\n\tforeach($files as $file){\n\t\tif($file=='.'||$file=='..'||substr($file,0,1)=='.')\n\t\t\tcontinue;\n\t\tif(is_dir($dir.'/'.$file))\n\t\t\tarray_push($dirs,$file);\n\t}\n\n\treturn $dirs;\n}", "function RecursiveScanDir($dir, $prefix = '') {\n\t$dir = rtrim($dir, '\\\\/');\n\t$result = array();\n\tforeach (scandir($dir) as $f) {\n if (\n preg_match('`/tmp/`', \"$dir/$f\")\n || preg_match('`/fpdf.php$`', \"$dir/$f\")\n || preg_match('`/libs/pi_barcode.php$`', \"$dir/$f\")\n || preg_match('`/libs/phpmailer/`', \"$dir/$f\")\n || preg_match('`/libs/securimage/`', \"$dir/$f\")\n || preg_match('`/libs/Smarty/`', \"$dir/$f\")\n )\n continue;\n\t\tif ($f !== '.' and $f !== '..') {\n\t\t\tif (is_dir(\"$dir/$f\")) {\n\t\t\t\t$result = array_merge($result, RecursiveScanDir(\"$dir/$f\", \"$prefix$f/\"));\n\t\t\t} else {\n\t\t\t\tif ( strtolower(substr(pathinfo($f,PATHINFO_EXTENSION),0,3)) == \"php\" && pathinfo(__FILE__,PATHINFO_BASENAME ) != pathinfo($f,PATHINFO_BASENAME ) )\n\t\t\t\t\t$result[] = $prefix.$f;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function bob_scandir($root_path, $bad_path, $recursive) {\n $output = array();\n if (file_exists($root_path)){\n $paths = scandir($root_path);\n if ($paths === False)\n return False;\n foreach ($paths as $path) {\n $potential_path = \"${root_path}/${path}\";\n\n // Ignore any files in the bad (admin) path or files that begin with a period.\n if ($potential_path == $bad_path or $path[0] == '.')\n continue;\n\n $output[] = $potential_path;\n $bad_folder = ''; // not sure what this is for\n if ($recursive and is_dir($potential_path)) // Recursively descend and print out files.\n $output = array_merge($output, bob_scandir($potential_path, $bad_folder, $recursive));\n }\n }\n return $output;\n}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "function scan_dir($dir, $type=array(),$only=FALSE, $allFiles=FALSE, $recursive=TRUE, $onlyDir=\"\", &$files){\n\t$handle = @opendir($dir);\n\tif(!$handle)\n\t\treturn false;\n\twhile ($file = @readdir ($handle))\n\t{\n\t\tif (eregi(\"^\\.{1,2}$\",$file) || $file == 'index.html')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif(!$recursive && $dir != $dir.$file.\"/\")\n\t\t{\n\t\t\tif(is_dir($dir.$file))\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(is_dir($dir.$file))\n\t\t{\n\t\t\tscan_dir($dir.$file.\"/\", $type, $only, $allFiles, $recursive, $file, $files);\n\t\t}\n\t\telse\n\t\t{\n if($only)\n\t\t\t\t$onlyDir = $dir;\n\n\t\t\t$files = buildArray($dir,$file,$onlyDir,$type,$allFiles,$files);\n\t\t}\n\t}\n\t@closedir($handle);\n\treturn $files;\n}", "function dirscan_folders($rootFolder){\n $folderNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (is_dir($rootFolder.\"/\".$name)) \n $folderNames[]=$name;\n }\n sort($folderNames);\n return $folderNames;\n}", "public function scanSourceFolders() {\n $this->addons = [];\n foreach ($this->sources as $sourceDir) {\n $this->scanSource($sourceDir);\n }\n }", "function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}", "public function scanDirsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRawRecursive(false, true, $filter, true);\n }", "function scan_directory_recursively($directory, $filter=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\treturn FALSE;\n\t}elseif(is_readable($directory))\n\t{\n\t\t$directory_list = opendir($directory);\n\t\twhile($file = readdir($directory_list))\n\t\t{\n\t\t\tif($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn')\n\t\t\t{\n\t\t\t\t$path = $directory.'/'.$file;\n\t\t\t\tif(is_readable($path))\n\t\t\t\t{\n\t\t\t\t\t$subdirectories = explode('/',$path);\n\t\t\t\t\tif(is_dir($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => end($subdirectories),\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'kind' => 'directory',\n\t\t\t\t\t\t\t'content' => scan_directory_recursively($path, $filter));\n\t\t\t\t\t}elseif(is_file($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = end(explode('.',end($subdirectories)));\n\t\t\t\t\t\tif($filter === FALSE || $filter == $extension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get metadata and image dimensions\n\t\t\t\t\t\t\t$size = getimagesize($path, $info);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get containing directory of file\n\t\t\t\t\t\t\t$directory_array = explode('/', $path);\n\t\t\t\t\t\t\t$parent_folder = min($directory_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset title, caption, tags\n\t\t\t\t\t\t\t$title = $caption = $taglist = $tags = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path'\t\t=> dirname($path),\n\t\t\t\t\t\t\t'group'\t\t=> $parent_folder,\n\t\t\t\t\t\t\t'file'\t\t=> end($subdirectories),\n\t\t\t\t\t\t\t'extension' => $extension,\n\t\t\t\t\t\t\t'size'\t\t=> filesize($path),\n\t\t\t\t\t\t\t'width'\t\t=> $size[0],\n\t\t\t\t\t\t\t'height'\t=> $size[1],\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t\t\t\t'caption'\t=> $caption,\n\t\t\t\t\t\t\t'tags'\t\t=> $tags,\n\t\t\t\t\t\t\t'kind'\t\t=> 'file');\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\tclosedir($directory_list); \n\t\treturn $directory_tree;\n\t}else{\n\t\treturn FALSE;\t\n\t}\n}", "function scan(SplFileInfo $fileInfo, $repository)\n{\n $baseName = $fileInfo->getBasename();\n if ($baseName === '.' || $baseName === '..') {\n return;\n }\n\n $file = new File($fileInfo);\n $repository->save($file);\n if ($fileInfo->isDir()) {\n foreach (new RecursiveDirectoryIterator($fileInfo) as $child) {\n scan($child, $repository);\n }\n }\n}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "public function scanDirs(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRaw(false, true, $filter, true);\n }", "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "public function scanDirPathsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRawRecursive(false, true, $filter, false);\n }", "function dynamik_skins_folder_scan( $skin_check = false )\n{\n\tif( dynamik_dir_check( dynamik_get_skins_folder_path() ) )\n\t{\n\t\t$skin_folder_names = scandir( dynamik_get_skins_folder_path() );\n\t\tif( false != $skin_check )\n\t\t{\n\t\t\tif( in_array( $skin_check, $skin_folder_names ) )\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn;\n\t}\t\n}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "private static function __fordeepscan($dir, $file)\n {\n $path = \"\";\n $scan = glob($dir.'/*');\n $q = preg_quote($file, '\\\\');\n\n if (is_array($scan))\n {\n foreach ($scan as $d => $f)\n {\n if ($f != '.' && $f != '..')\n {\n $f = preg_replace(\"/[\\/]{1,}/\", '/', $f);\n\n if (!is_dir($f))\n {\n $base = basename($f);\n\n if (($base == $file) && strrpos($f, $file) !== false)\n {\n $path = $f;\n }\n\n $base = null;\n }\n\n if ($path == \"\")\n {\n $path = self::__fordeepscan($f, $file);\n if ($path !== \"\"){\n if (strrpos($path, $file) !== false){\n break;\n }\n }\n }\n\n $f = null;\n }\n }\n\n $scan = null;\n }\n\n return $path;\n }", "private function scanDir(string $path, array &$files, bool $recursion = false): void\n {\n $handler = opendir($path);\n\n while ($item = readdir($handler)) {\n if (in_array($item, ['.', '..'])) {\n continue;\n }\n\n $itemPath = sprintf('%s/%s', $path, $item);\n\n if (is_file($itemPath)) {\n $files[] = $itemPath;\n continue;\n }\n\n if ($recursion && is_dir($itemPath)) {\n $this->scanDir($itemPath, $files, $recursion);\n }\n }\n }", "public function scanDirPaths(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRaw(false, true, $filter, false);\n }", "static private function scan_dir( $dir ) {\n\t\t$ignored = array( '.', '..', '.svn', '.htaccess', 'test-log.log' );\n\n\t\t$files = array();\n\t\tforeach ( scandir( $dir ) as $file ) {\n\t\t\tif ( in_array( $file, $ignored ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$files[ $file ] = filemtime( $dir . '/' . $file );\n\t\t}\n\t\tarsort( $files );\n\t\t$files = array_keys( $files );\n\n\t\treturn ( $files ) ? $files : false;\n\t}", "public function scanPath(Path $path)\n\t{\n\t\treturn @scandir($path->getPath());\n\t}", "protected static function _scanForPlugins(){\n\t\t$directory = __DIR__ . Config::$pluginsDirectory;\n\t\t$handle = opendir( $directory );\n\n\t\t// check to make sure we could open the directory handle\n\t\tif( !$handle )\n\t\t\treturn;\n\n\t\t// now begin looping through all of the contents of the plugin directory\n\t\twhile( ( $dir = readdir( $handle ) ) !== false ){\n\t\t\tif( $dir === '.' || $dir === '..' )\n\t\t\t\tcontinue;\n\n\t\t\t// now we need to verify that the current \"file\" is a directory before continuing\n\t\t\tif( !is_dir( $directory . $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// expect a class file to exist in the format \"class-<DirectoryName>.php\"\n\t\t\t$classFile = $directory . $dir . '/' . $dir . '.php';\n\t\t\tif( !file_exists( $classFile ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now actually include the code\n\t\t\trequire_once( $classFile );\n\n\t\t\t// now expect the class name to match whatever the $dir name was\n\t\t\tif( !class_exists( $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now we can instantiate the class name and store it now\n\t\t\tself::$_plugins[] = new $dir();\n\t\t}\n\t}", "function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}", "function check_dir($dir)\n {\n global $docdir, $lang;\n \n // Collect files and diretcories in these arrays\n $directories = array();\n $files = array();\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n if (preg_match(\"/^\\.{1,2}/\",$file) || $file == 'CVS')\n continue;\n\n // Collect files and directories\n if (is_dir($dir.$file)) { $directories[] = $file; }\n else { $files[] = $file; }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n $file_cnt = 0;\n foreach ($files as $file) {\n if (check_file($dir.$file, $file_cnt)) { $file_cnt++; }\n }\n\n // than the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\");\n }\n }", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "public function scanSrc($dir, $total = array())\n {\n if ($handle = opendir($dir)) {\n while (($file = readdir($handle)) !== false) {\n if ($file != \"..\" && $file != \".\") {\n if (is_dir($dir . \"/\" . $file))\n // Do DFS\n $total += $this->scanSrc($dir . \"/\" . $file, $total);\n else\n array_push($total, $dir . '/' . $file);\n }\n }\n closedir($handle);\n return $total;\n }\n }", "public function backgroundScan() {\n\t\t$lastPath = null;\n\t\twhile (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) {\n\t\t\t$this->scan($path, self::SCAN_RECURSIVE, self::REUSE_ETAG);\n\t\t\t$this->cache->correctFolderSize($path);\n\t\t\t$lastPath = $path;\n\t\t}\n\t}", "public function dir_readdir() {}", "public function scan($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = array_diff(scandir($this->directory), array('.', '..'));\n\t\t$objects = array();\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\t$file = $this->directory . $file;\n\t\t\t\n\t\t\tif ($regex_filter) {\n\t\t\t\t$test_path = (is_dir($file)) ? $file . '/' : $file;\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$objects[] = fFilesystem::createObject($file);\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}", "public function scanDirNamesRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string>\n */\n return $this->scanRawRecursive(false, true, $filter, null);\n }", "function CheckDir($dir, $startWith = '')\n{\n global $count;\n global $pruned;\n $count++;\n \n echo \"\\r$count ($pruned): Checking $dir \";\n \n $started = false;\n if( !strlen($startWith) )\n $started = true;\n\n // see if this is a directory we need to prune\n if( $started && is_dir(\"$dir/video_2\") )\n {\n PruneDir($dir);\n }\n else\n {\n // recurse into any directories\n $f = scandir($dir);\n foreach( $f as $file )\n {\n if( !$started && $file == $startWith )\n $started = true;\n \n if( $started && is_dir(\"$dir/$file\") && $file != '.' && $file != '..' )\n CheckDir(\"$dir/$file\");\n }\n unset($f);\n }\n}", "public function crawl() {\n\t\t$sDirectories = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\tif ( $sDirectories === '' ) return $sDirectories;\n\n\t\t$aDirectories = explode( ',', $sDirectories );\n\t\tforeach ( $aDirectories as $sDirectory ) {\n\t\t\t$sDir = trim ( $sDirectory );\n\t\t\tif( !is_dir( $sDir ) ) continue;\n\t\t\t$this->readInFiles( $sDir );\n\t\t}\n\t\treturn $this->aFiles;\n\t}", "abstract protected function yieldSearchPaths(): Generator;", "function m_walk_dir( $root, $callback, $recursive = true, $level = 0 ) {\r\n $dh = @opendir( $root );\r\n if( false === $dh ) {\r\n return false;\r\n }\r\n while( $file = readdir( $dh )) {\r\n if( \".\" == $file || \"..\" == $file ){\r\n continue;\r\n }\r\n //echo \"## DEBUG:$level - $file<br/>\"; \r\n\r\n //echo \"Level: $level\";\r\n call_user_func( $callback,$level, \"{$root}/{$file}\", $file );\r\n if( false !== $recursive && is_dir( \"{$root}/{$file}\" )) {\r\n m_walk_dir( \"{$root}/{$file}\", $callback, $recursive, $level+1 );\r\n }\r\n }\r\n closedir( $dh );\r\n return true;\r\n}", "function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }", "public function scanDir($dir)\n {\n $objects = scandir($dir);\n\n // unset 2 first elements\n unset($objects[0], $objects[1]);\n\n return $objects;\n }", "public function scanRecursive($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = $this->scan();\n\t\t$objects = $files;\n\t\t\n\t\t$total_files = sizeof($files);\n\t\tfor ($i=0; $i < $total_files; $i++) {\n\t\t\tif ($files[$i] instanceof fDirectory) {\n\t\t\t\tarray_splice($objects, $i+1, 0, $files[$i]->scanRecursive());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($regex_filter) {\n\t\t\t$new_objects = array();\n\t\t\tforeach ($objects as $object) {\n\t\t\t\t$test_path = ($object instanceof fDirectory) ? substr($object->getPath(), 0, -1) . '/' : $object->getPath();\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\t\n\t\t\t\t$new_objects[] = $object;\n\t\t\t}\n\t\t\t$objects = $new_objects;\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "function directory_mapper($path)\n{\n $maxDepth = 3;\n $minDepth = 3;\n $iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),\n RecursiveIteratorIterator::SELF_FIRST,\n RecursiveIteratorIterator::CATCH_GET_CHILD// Ignore \"Permission denied\"\n );\n $iterator->setMaxDepth($maxDepth);\n\n $paths = array($path);\n foreach ($iterator as $path => $dir) {\n if ($iterator->getDepth() >= $minDepth) {\n if ($dir->isDir()) {\n if (file_exists($dir . DIRECTORY_SEPARATOR . \"meta\")) {\n $paths[] = $path;\n }\n }\n }\n }\n array_shift($paths);\n return $paths;\n}", "function scan_students()\n {\n $current_students = [];\n $di = new RecursiveDirectoryIterator('students/');\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n $path_info = pathinfo($filename);\n if($path_info['extension']=='json'){\n array_push($current_students,$path_info['filename']);\n }\n }\n // echo print_r($current_students);\n return $current_students;\n }", "function scandir_recursive($directory, $format = null, $excludes = array()){\n $format = ($format == null) ? 'absolute' : $format;\n $paths = array();\n $stack[] = $directory;\n while($stack){\n $this_resource = array_pop($stack);\n if ($resource = scandir($this_resource)){\n $i = 0;\n while (isset($resource[$i])){\n if ($resource[$i] != '.' && $resource[$i] != '..'){\n $current = array(\n 'absolute' => \"{$this_resource}/{$resource[$i]}\",\n 'relative' => preg_replace('/' . preg_quote($directory, '/') . '/', '', \"{$this_resource}/{$resource[$i]}\")\n );\n if (is_file($current['absolute'])){\n $paths[] = $current[$format];\n } elseif (is_dir($current['absolute'])){\n $paths[] = $current[$format];\n $stack[] = $current['absolute'];\n }\n }\n $i++;\n }\n }\n }\n if (count($excludes) > 0){\n $clean = array();\n foreach($paths as $path){\n $remove = false;\n foreach($excludes as $exclude){\n $exclude = preg_quote($exclude, '/');\n $exclude = str_replace('\\*', '.*', $exclude);\n if (preg_match('/' . $exclude . '/', $path)){\n $remove = true;\n }\n }\n if (!$remove) $clean[] = $path;\n }\n $paths = $clean;\n }\n return $paths;\n}", "public function scanRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir|File>\n */\n return $this->scanRawRecursive(true, true, $filter, true);\n }", "function l10n_drupal_files_scan($source = NULL, $automated = FALSE) {\n\n // We look for projects in the working directory.\n $workdir = variable_get('l10n_server_connector_l10n_drupal_files_directory', '');\n\n if (!is_dir($workdir)) {\n drupal_set_message(t('The configured directory (%workdir) cannot be found. <a href=\"@configure\">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/connectors/config/l10n_drupal/files'))));\n }\n else {\n // define a list of allowed extensions, we will use it later on file_scan_directory\n // and further regular expression buildung processing. Thanks to EugenMayer\n $allowed_file_extensions = array('.tar.gz', '.tgz');\n // build the regular expression\n foreach($allowed_file_extensions as $key => $extension) {\n // escape the file extensions for later regular expression usage\n $allowed_file_extensions[$key] = preg_quote($extension);\n }\n $file_extension_pattern = '(' . implode('|', $allowed_file_extensions) . ')$';\n\n // Packages are always .tar.gz files.\n $files = file_scan_directory($workdir, $file_extension_pattern);\n if (count($files)) {\n foreach ($files as $path => $file) {\n\n if (!l10n_drupal_is_supported_version($path)) {\n // Skip files for unsupported versions.\n continue;\n }\n\n // Get rid of $workdir prefix on file names, eg.\n // drupal-6.x-6.19.tar.gz\n // Drupal/drupal-4.6.7.tar.gz or\n // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.\n $path = $package = trim(preg_replace('!(^' . preg_quote($workdir, '!') . ')(.+)\\.tar\\.gz!', '\\2', $path), '/');\n\n // split the filename into parts to $filename_splitted\n // [0] = the full string\n // [1] = the subdirectory and filename with extension\n // [1] = the subdirectory and filename without extension\n // [2] = the extension .tar.gz or .tgz\n $file_splitted = array(); // ensure to be a array....\n // the regular expression pattern (i put it in a var because i can better handle it with dpm for debugging, move if you want...)\n $file_split_pattern = '!^'. preg_quote($workdir, '!') .'((.+)'. $file_extension_pattern .')!';\n preg_match( $file_split_pattern, $path, $file_splitted );\n // put the result in vars for better handling\n list($file_fullpath, $file_subpath_ext, $file_subpath, $file_extension) = $file_splitted;\n\n // redefine the path to subpath without slash at beginning\n $path = trim($file_subpath, '/');\n // same on package\n $package = trim($file_subpath, '/');\n $project_title = '';\n if (strpos($path, '/')) {\n // We have a slash, so this package is in a subfolder.\n // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.\n // Grab the directory name as project title.\n list($project_title, $package) = explode('/', $path);\n }\n if (strpos($package, '-')) {\n // Only remaining are the project uri and release,\n // eg. drupal-4.6.7 or ubercart-5.x-1.0-alpha8.\n list($project_uri, $release_version) = explode('-', $package, 2);\n\n l10n_drupal_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, trim($file_subpath_ext, '/'), filemtime($file->filename));\n }\n else {\n // File name not formatted properly.\n $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');\n }\n }\n }\n }\n\n $user_feedback = FALSE;\n $results = db_query_range(\"SELECT * FROM {l10n_server_release} WHERE pid IN (SELECT pid FROM {l10n_server_project} WHERE connector_module = 'l10n_drupal_files' AND status = 1) ORDER BY last_parsed ASC\", 0, variable_get('l10n_server_connector_l10n_drupal_files_limit', 1));\n while ($release = db_fetch_object($results)) {\n\n // Only parse file if something changed since we last parsed it.\n $file_name = $workdir . '/' . $release->download_link;\n\n if (file_exists($file_name)) {\n if (filemtime($file_name) > $release->last_parsed) {\n $result = l10n_drupal_parse_package($file_name, $release);\n\n // User feedback, if not automated. Log messages are already done.\n if (isset($result['error']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['error'], 'error');\n }\n elseif (isset($result['message']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['message']);\n }\n }\n else {\n if (!$automated) {\n $user_feedback = TRUE;\n drupal_set_message(t('@release was already parsed, no need to scan again.', array('@release' => $release->download_link)));\n }\n }\n }\n // Hackish update of last parsed time so other tarballs will get into the queue too.\n // @todo: work on something better for this.\n db_query(\"UPDATE {l10n_server_release} SET last_parsed = %d WHERE rid = %d\", time(), $release->rid);\n }\n if (!$automated && !$user_feedback) {\n drupal_set_message(t('No (new) local Drupal files found to scan in %workdir.', array('%workdir' => $workdir)));\n }\n\n // Ensure that a Drupal page will be displayed with the messages.\n return '';\n}", "function dir_enter($entry_dir='/', $depth=0)\r\n{\r\n\t$found = 0;\r\n\r\n\t# Remove the last trailing slash and void dual writing\r\n\t$entry_dir = preg_replace('/\\/$/i', '', $entry_dir);\r\n\r\n\t$skip_list = array(\r\n\t\t'.', # self\r\n\t\t'..', # parent\r\n\t);\r\n\r\n\tif($dir_handle = opendir($entry_dir))\r\n\t{\r\n\t\twhile(false !== ($filename = readdir($dir_handle)))\r\n\t\t{\r\n\t\t\tif(in_array($filename, $skip_list))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$full_file_path = \"{$entry_dir}/{$filename}\";\r\n\t\t\t\r\n\t\t\tif(is_dir($full_file_path))\r\n\t\t\t{\r\n\t\t\t\t# Need to loop here inside the directory\r\n\r\n\t\t\t\tfecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\tfecho(\"{$filename}\");\r\n\r\n\t\t\t\t\r\n\t\t\t\t# Recurse through the file\r\n\t\t\t\t$function = __FUNCTION__;\r\n\t\t\t\t$found += $function($full_file_path, $depth+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t#fecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\t#fecho(\"{$filename}\");\r\n\r\n\t\t\t\t++$found;\r\n\t\t\t\tprocess_file($full_file_path, $depth);\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($dir_handle);\r\n\t}\r\n\t\r\n\treturn $found;\r\n}", "function toIterator($root) {\n $root = realpath($root);\n $iterator = new \\AppendIterator();\n\n if(!file_exists($root))\n die('The components folder could not be found');\n\n $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($root));\n //$directoryIterator->setFlags(\\RecursiveDirectoryIterator::SKIP_DOTS);\n\n return $iterator;\n }", "function directory_scan($directory, $withfiles) {\n\t$scanned_directory = array_diff(scandir($directory), array(\"..\", \".\")); //This removes all of the unessesary results\n\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == true; $i = $i + 1) {\n\t\tif (isset($scanned_directory[$i]) && (is_dir($directory . \"/\" . $scanned_directory[$i]) == FALSE)) { // If current item is a file, make it a download link\n\t\t\techo \"<div class='fileDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/file.svg' class='foldersvg'/>\";\n\t\t\techo \"<p class='fileLink'>\" . $scanned_directory[$i] . \"</p>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='fileinfo'><b>Type</b>: \" . mime_content_type($directory. \"/\" . $scanned_directory[$i]) . \" <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 0) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\t\t\t\n\t\t\techo \"</div>\";\n\t\t} else if (isset($scanned_directory[$i]) && $directory . \"/\" . $scanned_directory[$i] != \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") { // Makes this a special dir box if a item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\"; \n\t\t}\n\t}\n\t\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == false; $i = $i + 1) { //$withfiles only outputs files when true. when false, it will output files and folders. This is for the right-side of the page\n\t\tif ($i==0 && $directory != \"uploads/\" . $_SESSION[\"username\"]) { //when $i gets to its first iteration, output the \"back a directory\" folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[../]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='../' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Info</b>: Selecting this will move your selection back a folder.</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t\t\n\t\tif (isset($scanned_directory[$i]) && is_dir($directory . \"/\" . $scanned_directory[$i])) { // Makes this a special dir box if an item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\tif ($directory . \"/\" . $scanned_directory[$i] == \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") {\n\t\t\t\techo \"<img src='Assets/SVG/bin.svg' class='foldersvg'/>\";\n\t\t\t} else {\n\t\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\t}\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t}\n\n}", "protected function scanTarget($path,$recursive=false) {\n $newpaths = [];\n $dir = $this->cache->getDestination();\n\n $stream = new \\qio\\Directory\\Stream($dir);\n $reader = new \\qio\\Directory\\Reader($stream);\n $list = $reader->scan();\n\n foreach($list as $item) {\n $fullItemPath = $path.DIRECTORY_SEPARATOR.$item;\n if(is_file($fullItemPath)) {\n $newpaths[] = $fullItemPath;\n } elseif($recursive && \n is_dir($fullItemPath)) {\n $newpaths = array_merge($newpaths, $this->scanTarget($fullItemPath,$recursive));\n }\n }\n\n return $newpaths;\n }", "protected function getFilesInDirCreateTestDirectory() {}", "function lscan($scat, $param)\n{\n if(isset($param[1][0]) == FALSE)\n {\n $scat[1][0] = '.';\n }\n $c = 0;\n if (file_exists($scat[1][0]) == TRUE && is_dir($scat[1][0]) == TRUE && is_readable($scat[1][0]) == TRUE && is_executable($scat[1][0]) == TRUE && $fh = fopen($scat[1][0], 'r'))\n {\n while(isset(scandir($scat[1][0])[$c]))\n {\n $tab[$c] = scandir($scat[1][0])[$c];\n $c++;\n }\n $c = 0;\n sort($tab);\n while(isset($tab[$c]))\n {\n if (is_dir($tab[$c]))\n {\n echo(\"\\033[34m{$tab[$c]}\");\n echo (\"/\");\n }\n else if(is_executable($tab[$c]) && is_dir($tab[$c]) == FALSE)\n {\n echo(\"\\033[32m{$tab[$c]}\");\n echo (\"*\");\n }\n else if(is_link($tab[$c]))\n {\n echo($tab[$c]);\n echo (\"@\");\n }\n else\n echo($tab[$c]);\n echo (\" \");\n $c++;\n }\n echo (\"\\n\");\n }\n else if (is_file($scat[1][0]) == TRUE)\n echo (\"Is a file\\n\");\n else if (file_exists($scat[1][0]) == TRUE && (is_readable($scat[1][0]) == FALSE || is_executable($scat[1][0]) == FALSE))\n echo (\"Permission denied\\n\");\n else if (file_exists($scat[1][0]) == FALSE && is_dir($scat[1][0]) == FALSE)\n echo (\"No such file or directory\\n\");\n else\n echo (\"Cannot open folder\\n\");\n}", "public function discoverPlugins() {\n foreach($this->fs->roots(false) as $root) {\n $this->findAvailablePlugins($root);\n }\n }", "public function scanDirectory($base_dir = '', $attributes = array()) {\n if (!is_dir($base_dir)) {\n return array();\n }\n if (!isset($attributes['exclude_dirs'])) {\n $attributes['exclude_dirs'] = self::DIR_INACTIVE;\n }\n if (!isset($attributes['type'])) {\n $attributes['type'] = self::DIR_ALL;\n }\n\n $dirs = array_diff(scandir($base_dir), array('.', '..', '.git', 'assets', 'files'));\n\n foreach ($dirs as $k => $dir) {\n // Remove inactive if requested.\n if (substr($dir, 0, 1) == $attributes['exclude_dirs']) {\n unset ($dirs[$k]);\n }\n\n if (isset($attributes['symlinks']) && $attributes['symlinks'] == 'no' && is_link($base_dir . '/' . $dir)) {\n unset ($dirs[$k]);\n }\n else if (isset($attributes['symlinks']) && $attributes['symlinks'] == 'only' && !is_link($base_dir . '/' . $dir)) {\n unset ($dirs[$k]);\n }\n\n if ($attributes['type'] == self::DIR_DIRS && !is_dir($base_dir . '/' . $dir)) {\n unset ($dirs[$k]);\n }\n elseif ($attributes['type'] == self::DIR_FILES && !is_file($base_dir . '/' . $dir)) {\n unset ($dirs[$k]);\n }\n elseif ($attributes['type'] == self::DIR_MODULES &&\n (!is_dir($base_dir . '/' . $dir))\n ) {\n unset ($dirs[$k]);\n }\n }\n\n return $dirs;\n }", "public function &getFolders($folder)\n\t{\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$breakflag_before_process = $registry->get('volatile.breakflag', false);\n\n\t\t// Reset break flag before continuing\n\t\t$breakflag = false;\n\n\t\t// Initialize variables\n\t\t$arr = array();\n\t\t$false = false;\n\n\t\tif(!is_dir($folder) && !is_dir($folder.'/')) return $false;\n\n\t\t$counter = 0;\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$maxCounter = $registry->get('engine.scan.smart.large_dir_threshold',100);\n\n\t\t$allowBreakflag = ($registry->get('volatile.operation_counter', 0) != 0) && !$breakflag_before_process;\n\n\t\t$handle = @opendir($folder);\n\t\t/* If opening the directory doesn't work, try adding a trailing slash. This is useful in cases\n\t\t * like this: open_basedir=/home/user/www/ and the root is /home/user/www. Trying to scan\n\t\t * /home/user/www results in error, trying to scan /home/user/www/ succeeds. Duh!\n\t\t */\n\t\tif ($handle === FALSE) {\n\t\t\t$handle = @opendir($folder.'/');\n\t\t}\n\t\t// If directory is not accessible, just return FALSE\n\t\tif ($handle === FALSE) {\n\t\t\t$this->setWarning('Unreadable directory '.$folder);\n\t\t\treturn $false;\n\t\t}\n\n\t\twhile ( (($file = @readdir($handle)) !== false) && (!$breakflag) )\n\t\t{\n\t\t\tif (($file != '.') && ($file != '..'))\n\t\t\t{\n\t\t\t\t// # Fix 2.4: Do not add DS if we are on the site's root and it's an empty string\n\t\t\t\t$ds = ($folder == '') || ($folder == '/') || (@substr($folder, -1) == '/') || (@substr($folder, -1) == DIRECTORY_SEPARATOR) ? '' : DIRECTORY_SEPARATOR;\n\t\t\t\t$dir = $folder . $ds . $file;\n\t\t\t\t$isDir = is_dir($dir);\n\t\t\t\tif ($isDir) {\n\t\t\t\t\t$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($dir) : $dir;\n\t\t\t\t\tif($data) $arr[] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$counter++;\n\t\t\tif($counter >= $maxCounter) $breakflag = $allowBreakflag;\n\t\t}\n\t\t@closedir($handle);\n\n\t\t// Save break flag status\n\t\t$registry->set('volatile.breakflag', $breakflag);\n\n\t\treturn $arr;\n\t}", "function scan_directory($directory) {\n $dir = scandir($directory);\n foreach ($dir as $d) {\n if ($d === '.' or $d === '..')\n continue;\n\n if (is_dir($directory . '/' . $d)) {\n //code to use if directory\n scan_directory($directory . '/' . $d);\n } else {\n //code to use if file \n $type = pathinfo($directory . '/' . $d, PATHINFO_EXTENSION);\n if ($type == \"mp4\" || $type == \"html\") {\n //do nothing \n continue;\n } else {\n if (unlink($directory . '/' . $d)) {\n echo '<strong>Deleted</strong>'.$directory . '/' . $d . '<br/><br/>';\n }\n }\n }\n }\n}", "function searchFolder( $current_folder, $folder_to_find, &$matches )\n{\n if ( !( $handle = opendir( $current_folder ) ) ) die( \"Cannot open $current_folder.\" );\n\n while ( $entry = readdir( $handle ) ) {\n if ( is_dir( \"$current_folder/$entry\" ) ) {\n if ( $entry != \".\" && $entry != \"..\" ) {\n\n // This entry is a valid folder\n // If it matches our folder name, add it to the list of matches\n if ( $entry == $folder_to_find ) $matches[] = \"$current_folder/$entry\";\n\n // Search this folder\n searchFolder( \"$current_folder/$entry\", $folder_to_find, $matches );\n }\n }\n }\n closedir( $handle );\n}", "function find($dir, $pattern){\n // escape any character in a string that might be used to trick\n // a shell command into executing arbitrary commands\n $dir = escapeshellcmd($dir);\n // get a list of all matching files in the current directory\n $files = glob(\"$dir/$pattern\");\n // find a list of all directories in the current directory\n // directories beginning with a dot are also included\n foreach (glob(\"$dir/{.[^.]*,*}\", GLOB_BRACE|GLOB_ONLYDIR) as $sub_dir){\n $arr = find($sub_dir, $pattern); // resursive call\n $files = array_merge($files, $arr); // merge array with files from subdirectory\n }\n // return all found files\n return $files;\n}", "private function recSearchFiles($dir)\n {\n $ffs = scandir($dir);\n\n foreach ($ffs as $ff) {\n\n if ($ff != '.' && $ff != '..') {\n\n if (is_dir($dir . '/' . $ff)) {\n $this->recSearchFiles($dir . $ff . '/');\n } else if (strlen($ff) >= 5) {\n $this->searchedFiles[] = $dir . $ff;\n }\n }\n }\n }", "protected function parseDirectory($rootPath, $seperator=\"/\"){\n $fileArray=array();\n $handle = opendir($rootPath);\n while( ($file = @readdir($handle))!==false) {\n if($file !='.' && $file !='..'){\n if (is_dir($rootPath.$seperator.$file)){\n $array=$this->parseDirectory($rootPath.$seperator.$file);\n $fileArray=array_merge($array,$fileArray);\n }\n else {\n $fileArray[]=$rootPath.$seperator.$file;\n }\n }\n } \n return $fileArray;\n }", "function rd_do_dir($dir)\n{\n\t$out=array();\n\t$_dir=($dir=='')?'.':$dir;\n\t$dh=@opendir($_dir);\n\tif ($dh!==false)\n\t{\n\t\twhile (($file=readdir($dh))!==false)\n\t\t{\n\t\t\tif (!in_array($file,array('.','..','git','.svn','CVS','_vti_cnf')))\n\t\t\t{\n\t\t\t\tif (is_file($_dir.'/'.$file))\n\t\t\t\t{\n\t\t\t\t\t$path=$dir.(($dir!='')?'/':'').$file;\n\t\t\t\t\t$out[]=$path;\n\t\t\t\t} elseif (is_dir($_dir.'/'.$file))\n\t\t\t\t{\n\t\t\t\t\t$out=array_merge($out,rd_do_dir($dir.(($dir!='')?'/':'').$file));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $out;\n}", "public function scan($directories)\n\t{\n\t\tif (!is_array($directories)) {\n\t\t\t$directories = [$directories];\n\t\t}\n\n\t\tforeach ($directories as $directory) {\n\t\t\tforeach (Finder::findFiles('*.latte', '*.php')->from($directory) as $file) {\n\t\t\t\t$this->extract($file, $directory);\n\t\t\t}\n\t\t}\n\t\treturn $this->compactMessages();\n\t}", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "public function test_scan_sort_desc()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_DESC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals(array_reverse($content), $output);\n }", "function scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, $context = null): array\n{\n error_clear_last();\n if ($context !== null) {\n $safeResult = \\scandir($directory, $sorting_order, $context);\n } else {\n $safeResult = \\scandir($directory, $sorting_order);\n }\n if ($safeResult === false) {\n throw DirException::createFromPhpError();\n }\n return $safeResult;\n}", "public function recursivelyIterateDirectory()\n\t{\n\t\treturn new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->getPath()));\n\t}", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "private function listFolderFiles($dir){\n $children = false;\n $isRoot = false;\n if($dir==$this->file_storage){\n $isRoot = true;\n }\n\n $folderName = $this->getFolderName($dir);\n if(!$isRoot){\n //$this->info('Directory Name: '.$folderName['child']);\n //$this->info('Parent Name: '.$folderName['parent']);\n }\n\n //$this->info('Folder: '.$dir);\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n if ($fileInfo->isDir()) {\n $this->listFolderFiles($fileInfo->getPathname());\n }else{\n $rename = false;\n //$this->info('File: '.$fileInfo->getFilename());\n //$info = new SplFileInfo($dir.'/'.$fileInfo->getFilename());\n $ext = \".\".pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);\n //$ext = \".\"$info->getExtension();\n //$this->info('File: extension '.$ext);\n $filebreak = str_replace($ext,\"\",$fileInfo->getFilename());\n if (strpos($filebreak, '.') !== false || strpos($filebreak, \"'\") !== false || strpos($filebreak, \"#\") !== false) {\n $rename = true;\n }\n if($rename){\n $replace = array(\".\", \"'\", \"#\", \";\", \"/\", \"?\", \":\", \"@\", \"=\", \"&\", \",\");\n //“;”, “/”, “?”, “:”, “@”, “=” and “&\n $fileraw = str_replace($replace,\" \",$filebreak);\n //$this->info('File: raw '.$fileraw);\n $newfilename = $fileraw . $ext;\n //$this->info('File: new '.$newfilename);\n $prod_filename = $newfilename;\n rename($dir.'/'.$fileInfo->getFilename(),$dir.'/'.$newfilename);\n }else{\n $prod_filename = $fileInfo->getFilename();\n }\n $this->checkFileExtension($dir.'/'.$prod_filename, $prod_filename, $dir);\n }\n $children = true;\n }else{\n $children = false;\n }\n }\n //$this->info('Children: '.$children);\n\n if(!$isRoot){\n $this->folders[$this->count]['name'] \t\t\t= $folderName['child'];\n $this->folders[$this->count]['parent'] \t\t= $folderName['parent'];\n $this->folders[$this->count]['full_path']\t= $dir;\n $this->folders[$this->count]['children']\t= $children;\n $this->count++;\n }\n //$this->info('#################');\n }", "protected function scan_directory($target) {\n $files = array();\n $target_images = $this->get_target_images();\n $target_components = explode(DIRECTORY_SEPARATOR, $target);\n $target = implode(DIRECTORY_SEPARATOR, $target_components);\n $target_length = strlen($target) + 1;\n\n $patterns = array(\n $target,\n '.xml'\n );\n $datatypes = array(\n '-01.tif',\n '-01.jpg',\n );\n\n $images = file_scan_directory($target_images, '/.*-01.*/');\n $xml = file_scan_directory($target, '/.*.xml$/');\n foreach ($xml as $uri => $value) {\n if (strpos($uri, '.xml') !== FALSE) {\n foreach ($datatypes as $datatype) {\n $replacements = array($target_images, $datatype);\n // Only process xml if there is a matching image to go with it.\n $matching_image = str_replace($patterns, $replacements, $value->uri);\n if (!empty($images[$matching_image])) {\n $files[substr($uri, $target_length)] = $value;\n }\n }\n }\n }\n return $files;\n }", "function fs_get_tree($dir_path) {\n #echo \"top of fs_get_tree, dir_path=$dir_path\\n\";\n { $old_cwd = getcwd();\n chdir($dir_path);\n #echo \" did chdir to '$dir_path'\\n\";\n\n {\n $fh = opendir('.');\n #echo \" opendir\\n\";\n\n $results = array();\n $n = 0;\n $dirs_to_crawl = array();\n while (true) {\n #echo \" loop\\n\";\n if ($n > 500) {\n #echo \"--- n > LIMIT (n=$n), break\\n\";\n break;\n }\n $n++;\n $file = readdir($fh);\n #echo \" file = '$file'\\n\";\n if (!$file) {\n break;\n }\n if ($file == '.'\n || $file == '..'\n || $file == '.git' #todo #fixme don't assume\n ) {\n #echo \"--- . or .., continuing\\n\";\n continue;\n }\n if (is_dir($file)) {\n #echo \"--- adding $file to dirs, n=$n\\n\";\n $dirs_to_crawl[] = $file;\n }\n $results[$file] = null;\n }\n closedir($fh);\n }\n\n #echo \"\\nnow looping thru dirs_to_crawl\\n\";\n foreach ($dirs_to_crawl as $dir) {\n #echo \" dir = $dir\\n\";\n $results[$dir] = fs_get_tree($dir);\n }\n\n chdir($old_cwd);\n }\n\n return $results;\n }", "private function checkDir()\n {\n $this->init = $this->url[0].'/';\n\n for ($i=0; $i < $this->count; $i++) { \n if (is_dir($this->init)) {\n if ($i == 0) {\n $this->dir .= $this->init;\n } elseif (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n } else {\n if ($i == 0) {\n $this->dir .= 'views/';\n }\n \n if (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n \n }\n }\n\n $this->dir = str_replace(\"//\", \"/\", $this->dir);\n $this->checkFile();\n }", "private function recurseThroughDirectory($baseDir, $lookingFor = \"/(.*)\\.php$/i\")\n {\n $results = array();\n $di = new RecursiveDirectoryIterator($baseDir);\n\n $this->output->writeLn(\"Scanning $baseDir...\");\n\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n if (preg_match($lookingFor, $filename)) {\n $results[] = $this->extractFrom($filename);\n }\n }\n\n return $results;\n }", "public function accept()\n {\n /**\n * @var \\SplFileInfo $current\n */\n $current = parent::current();\n if (!$current->isDir()) {\n return false;\n }\n }", "static function getDirectoryListing();", "function list_directories($path) {\n\tglobal $root_directory, $gmz_directories, $ignore_folders;\n if ($handle = @opendir($path)) { \n while (false !== ($filename = readdir($handle))) { \n if ($filename != '.' && $filename != '..') {\n\t\t\t\t$file_path = substr($path.'/'.$filename, strlen($root_directory)+1, strlen($path.'/'.$filename));\n\t\t\t\t$file_folder = substr($file_path, 0, -(strlen($filename)+1));\n\t\t\t\tif(is_dir($path.'/'.$filename)) {\n\t\t\t\t\tif(!in_array($file_path, $ignore_folders)) {\n\t\t\t\t\t\t$gmz_directories[] = $file_path;\n\t\t\t\t\t}\n\t\t\t\t\tlist_directories($path.'/'.$filename);\n\t\t\t\t}\n } \n } \n closedir($handle); \n } else {\n\t\tdisplay_error('Invalid Directory');\n\t}\n}", "function getSubfolders() ;", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "public function findAvailablePlugins($root) {\n $globIter = new \\GlobIterator($root . D_S . \"Plugins\" . D_S . \"*\" . D_S . \"plugin.yml\");\n foreach($globIter as $pluginFile) {\n $pluginInfo = yaml_parse_file($pluginFile->getRealPath());\n $pluginInfo['root'] = $pluginFile->getPath();\n $this->availablePlugins[$pluginInfo['name']] = $pluginInfo;\n }\n }", "function get_files($instructor=False, $sources=array('class', 'lab', 'project', 'exam', 'review', 'capstone', 'continued-lab'), $file_path = '.', $access=array(), $virtual=array(), $categories=array(), $secret='really') {\n $results = array();\n $basedir = scandir($file_path);\n foreach ($sources as $i => $l0) {\n if (in_array($l0, $basedir) && is_dir($file_path . '/' . $l0)) {\n $level1 = scandir($file_path . '/' . $l0);\n sort($level1);\n foreach ($level1 as $i => $l1) {\n if (substr($l1, 0, 1) != '.' && is_dir($file_path . '/' . $l0 . '/' . $l1)) {\n // The following code allows the system recursively look through the Directory\n // structure within a class, and the system can now process RELATIVE links\n // that go into those subordinate directories\n $level2 = array();\n try {\n $Iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($file_path . '/' . $l0 . '/' . $l1),\n RecursiveIteratorIterator::LEAVES_ONLY,\n RecursiveIteratorIterator::CATCH_GET_CHILD);\n foreach($Iterator as $name => $object) {\n $name = explode(\"/\", $name);\n unset($name[2]);\n unset($name[1]);\n unset($name[0]);\n $name = implode(\"/\", $name);\n $level2[] = $name;\n }\n } catch (Exception $e) {\n // Unable to recurse, so don't bother...\n }\n //$level2 = scandir($file_path . '/' . $l0 . '/' . $l1);\n $results[$l0][$l1] = array();\n sort($level2);\n foreach ($level2 as $i => $l2) {\n $key = sha1($secret.$l0.$l1.$l2);\n if (substr($l2, 0, 1) != '.' && validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access)[0]) {\n if (is_link($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2)) {\n if (validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access)[0]) {\n $vf = validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access);\n $category = categorize_file($instructor, $l2, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2),\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n } else {\n $vf = validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access);\n $category = categorize_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n }\n # Add Virtual files, format like array('class'=>array(1 => array(array('answers.html', 'homework/answers05.html'))))\n foreach ($virtual as $l0 => $l1array) {\n if (isset($results[$l0])) {\n $classes = array_keys($results[$l0]);\n foreach ($l1array as $day => $l2array) {\n if (isset($classes[$day-1])) {\n foreach ($l2array as $i => $values) {\n $virt_file = $values[0];\n $real_file = $values[1];\n if (validate_file($instructor, $real_file, $real_file, $access)[0]) {\n $key = sha1($secret.$real_file.$virt_file);\n $vf = validate_file($instructor, $real_file, $real_file, $access);\n $category = categorize_file($instructor, $virt_file, $real_file, $vf[5], $categories);\n $results[$l0][$classes[$day-1]][$virt_file] = array('actual' => $real_file,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n #####################################################\n # Verify that the class is not blocked by security...\n $today = getdate();\n foreach ($results as $l0 => $classes) {\n $counter = 1;\n foreach ($classes as $l1 => $data) {\n foreach ($data as $filename => $fdata) {\n if ($fdata['year'] == 1 && $fdata['month'] == 1 && $fdata['day'] == 1) {\n $cate = $fdata['category'];\n if (isset($access[$l0.\"_\".$counter]) && $cate == 'title') {\n $sspec = $l0.\"_\".$counter;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$cate])) {\n $sspec = $l0.\"_\".$counter.\"/\".$cate;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$filename])) {\n $sspec = $l0.\"_\".$counter.\"/\".$filename;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/all\"])) {\n $sspec = $l0.\"_\".$counter.\"/all\";\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n }\n }\n }\n $counter++;\n }\n }\n return $results;\n }", "public function findFiles();", "public function scanDirNames(callable $filter = null): Generator\n {\n /**\n * @var Generator<string>\n */\n return $this->scanRaw(false, true, $filter, null);\n }", "function dir_list($file)\n{\n $file_list = scandir($file);\n foreach($file_list as $item)\n {\n if($item == '.' || $item == '..')continue;\n \n $file_path = $file . '/' . $item;\n if(is_dir($file_path))\n {\n echo \"<font color='red'>$file_path</font><br/>\";\n dir_list($file_path);\n }\n else{\n echo $file_path . \"<br>\";\n }\n }\n}", "function logonscreener_source_scan() {\n global $source;\n $source = str_replace('\\\\', '/', rtrim($source, '/\\\\'));\n\n if (!$files = @scandir($source)) {\n if ($GLOBALS['debug_mode'] && is_file($source)) {\n // Debug mode let us set one specific image file as a source.\n $files = array(basename($source));\n $source = dirname($source);\n }\n else {\n logonscreener_log(\"$source not found.\");\n return FALSE;\n }\n }\n\n while (!empty($files)) {\n $key = array_rand($files);\n if (logonscreener_file_change($source . '/' . $files[$key])) {\n break;\n }\n unset($files[$key]);\n }\n\n return TRUE;\n}", "function discoverExistingClasses($recursive = FALSE);", "public function testListDirectory()\n {\n $temp = BASE_FOLDER . '/.dev/Tests/Data/Testcases';\n\n $this->options = array(\n 'recursive' => false,\n 'exclude_files' => false,\n 'exclude_folders' => false,\n 'extension_list' => array(),\n 'name_mask' => null\n );\n $this->path = BASE_FOLDER . '/.dev/Tests/Data/Testcases/';\n\n $adapter = new fsAdapter($this->action, $this->path, $this->filesystem_type, $this->options);\n\n $this->assertEquals(1, count($adapter->fs->data));\n\n return;\n }", "function parseDir($dir) {\r\n global $zoom;\r\n // start the scan...(open the local dir)\r\n $images = array();\r\n $handle = $zoom->platform->opendir($dir);\r\n while (($file = $zoom->platform->readdir($handle)) != false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $tag = ereg_replace(\".*\\.([^\\.]*)$\", \"\\\\1\", $file);\r\n $tag = strtolower($tag);\r\n if ($zoom->acceptableFormat($tag)) {\r\n // Tack it onto images...\r\n $images[] = $file;\r\n }\r\n }\r\n }\r\n $zoom->platform->closedir($handle);\r\n return $images;\r\n }", "function buscar($dir,&$archivo_buscar) \n{ // Funcion Recursiva \n // Autor DeeRme \n // http://deerme.org \n if ( is_dir($dir) ) \n { \n // Recorremos Directorio \n $d=opendir($dir); \n while( $archivo = readdir($d) ) \n { \n if ( $archivo!=\".\" AND $archivo!=\"..\" ) \n { \n \n if ( is_file($dir.'/'.$archivo) ) \n { \n // Es Archivo \n if ( $archivo == $archivo_buscar ) \n { \n return ($dir.'/'.$archivo); \n } \n \n } \n \n if ( is_dir($dir.'/'.$archivo) ) \n { \n // Es Directorio \n // Volvemos a llamar \n $r=buscar($dir.'/'.$archivo,$archivo_buscar); \n if ( basename($r) == $archivo_buscar ) \n { \n return $r; \n } \n \n \n } \n \n \n \n \n \n } \n \n } \n \n } \n return FALSE; \n}" ]
[ "0.7312299", "0.7297761", "0.7171603", "0.71259856", "0.7107098", "0.70851773", "0.6768123", "0.65986484", "0.6514543", "0.63404167", "0.63298833", "0.63052875", "0.6296188", "0.62949747", "0.6283482", "0.6276984", "0.6272302", "0.6215177", "0.6211419", "0.61895525", "0.6150548", "0.6124031", "0.61190265", "0.6081099", "0.6054076", "0.6038476", "0.60114694", "0.5985352", "0.5979156", "0.59587705", "0.5932144", "0.5928079", "0.59242207", "0.59219456", "0.59042704", "0.5884478", "0.58809125", "0.5867759", "0.5840785", "0.5807623", "0.5796964", "0.5749939", "0.5746181", "0.57365316", "0.57328254", "0.5724502", "0.571715", "0.5699528", "0.56825715", "0.5663", "0.56619585", "0.5657845", "0.5651757", "0.562381", "0.5614439", "0.5612743", "0.560864", "0.55832374", "0.55665", "0.5543549", "0.5536948", "0.55062634", "0.5502585", "0.549989", "0.5493424", "0.5474884", "0.54715943", "0.5463822", "0.5462994", "0.54508764", "0.5442152", "0.54414666", "0.54355854", "0.54223555", "0.53773046", "0.53763986", "0.53662026", "0.5363906", "0.5359299", "0.5355201", "0.5349027", "0.5335029", "0.5320991", "0.5288279", "0.5287722", "0.5278198", "0.52703786", "0.5256006", "0.5249355", "0.5247868", "0.5244338", "0.5243392", "0.52425104", "0.5238733", "0.5230971", "0.5220683", "0.52190673", "0.5213706", "0.5213479", "0.5211324" ]
0.7933779
0
Test for Directory::scan() Scan only the files inside ROOT directory
public function test_scan_files() { $content = array('.gitignore','.htaccess','index.php','README'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES); $this->assertEquals(count($content), count($res)); foreach($res as $path=>$dir){ $this->assertTrue(in_array($dir->get_base_name(), $content)); $this->assertInstanceOf('\Kaili\File', $dir); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }", "function dirscan_files($rootFolder){\n $fileNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (!is_dir($rootFolder.\"/\".$name)) $fileNames[]=$name;\n }\n sort($fileNames);\n return $fileNames;\n}", "private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "function scan(SplFileInfo $fileInfo, $repository)\n{\n $baseName = $fileInfo->getBasename();\n if ($baseName === '.' || $baseName === '..') {\n return;\n }\n\n $file = new File($fileInfo);\n $repository->save($file);\n if ($fileInfo->isDir()) {\n foreach (new RecursiveDirectoryIterator($fileInfo) as $child) {\n scan($child, $repository);\n }\n }\n}", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function scan_dir($dir, $type=array(),$only=FALSE, $allFiles=FALSE, $recursive=TRUE, $onlyDir=\"\", &$files){\n\t$handle = @opendir($dir);\n\tif(!$handle)\n\t\treturn false;\n\twhile ($file = @readdir ($handle))\n\t{\n\t\tif (eregi(\"^\\.{1,2}$\",$file) || $file == 'index.html')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif(!$recursive && $dir != $dir.$file.\"/\")\n\t\t{\n\t\t\tif(is_dir($dir.$file))\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(is_dir($dir.$file))\n\t\t{\n\t\t\tscan_dir($dir.$file.\"/\", $type, $only, $allFiles, $recursive, $file, $files);\n\t\t}\n\t\telse\n\t\t{\n if($only)\n\t\t\t\t$onlyDir = $dir;\n\n\t\t\t$files = buildArray($dir,$file,$onlyDir,$type,$allFiles,$files);\n\t\t}\n\t}\n\t@closedir($handle);\n\treturn $files;\n}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}", "function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }", "public function scan($filename){ }", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "function RecursiveScanDir($dir, $prefix = '') {\n\t$dir = rtrim($dir, '\\\\/');\n\t$result = array();\n\tforeach (scandir($dir) as $f) {\n if (\n preg_match('`/tmp/`', \"$dir/$f\")\n || preg_match('`/fpdf.php$`', \"$dir/$f\")\n || preg_match('`/libs/pi_barcode.php$`', \"$dir/$f\")\n || preg_match('`/libs/phpmailer/`', \"$dir/$f\")\n || preg_match('`/libs/securimage/`', \"$dir/$f\")\n || preg_match('`/libs/Smarty/`', \"$dir/$f\")\n )\n continue;\n\t\tif ($f !== '.' and $f !== '..') {\n\t\t\tif (is_dir(\"$dir/$f\")) {\n\t\t\t\t$result = array_merge($result, RecursiveScanDir(\"$dir/$f\", \"$prefix$f/\"));\n\t\t\t} else {\n\t\t\t\tif ( strtolower(substr(pathinfo($f,PATHINFO_EXTENSION),0,3)) == \"php\" && pathinfo(__FILE__,PATHINFO_BASENAME ) != pathinfo($f,PATHINFO_BASENAME ) )\n\t\t\t\t\t$result[] = $prefix.$f;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "static private function scan_dir( $dir ) {\n\t\t$ignored = array( '.', '..', '.svn', '.htaccess', 'test-log.log' );\n\n\t\t$files = array();\n\t\tforeach ( scandir( $dir ) as $file ) {\n\t\t\tif ( in_array( $file, $ignored ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$files[ $file ] = filemtime( $dir . '/' . $file );\n\t\t}\n\t\tarsort( $files );\n\t\t$files = array_keys( $files );\n\n\t\treturn ( $files ) ? $files : false;\n\t}", "public function scan($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = array_diff(scandir($this->directory), array('.', '..'));\n\t\t$objects = array();\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\t$file = $this->directory . $file;\n\t\t\t\n\t\t\tif ($regex_filter) {\n\t\t\t\t$test_path = (is_dir($file)) ? $file . '/' : $file;\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$objects[] = fFilesystem::createObject($file);\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function l10n_drupal_files_scan($source = NULL, $automated = FALSE) {\n\n // We look for projects in the working directory.\n $workdir = variable_get('l10n_server_connector_l10n_drupal_files_directory', '');\n\n if (!is_dir($workdir)) {\n drupal_set_message(t('The configured directory (%workdir) cannot be found. <a href=\"@configure\">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/connectors/config/l10n_drupal/files'))));\n }\n else {\n // define a list of allowed extensions, we will use it later on file_scan_directory\n // and further regular expression buildung processing. Thanks to EugenMayer\n $allowed_file_extensions = array('.tar.gz', '.tgz');\n // build the regular expression\n foreach($allowed_file_extensions as $key => $extension) {\n // escape the file extensions for later regular expression usage\n $allowed_file_extensions[$key] = preg_quote($extension);\n }\n $file_extension_pattern = '(' . implode('|', $allowed_file_extensions) . ')$';\n\n // Packages are always .tar.gz files.\n $files = file_scan_directory($workdir, $file_extension_pattern);\n if (count($files)) {\n foreach ($files as $path => $file) {\n\n if (!l10n_drupal_is_supported_version($path)) {\n // Skip files for unsupported versions.\n continue;\n }\n\n // Get rid of $workdir prefix on file names, eg.\n // drupal-6.x-6.19.tar.gz\n // Drupal/drupal-4.6.7.tar.gz or\n // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.\n $path = $package = trim(preg_replace('!(^' . preg_quote($workdir, '!') . ')(.+)\\.tar\\.gz!', '\\2', $path), '/');\n\n // split the filename into parts to $filename_splitted\n // [0] = the full string\n // [1] = the subdirectory and filename with extension\n // [1] = the subdirectory and filename without extension\n // [2] = the extension .tar.gz or .tgz\n $file_splitted = array(); // ensure to be a array....\n // the regular expression pattern (i put it in a var because i can better handle it with dpm for debugging, move if you want...)\n $file_split_pattern = '!^'. preg_quote($workdir, '!') .'((.+)'. $file_extension_pattern .')!';\n preg_match( $file_split_pattern, $path, $file_splitted );\n // put the result in vars for better handling\n list($file_fullpath, $file_subpath_ext, $file_subpath, $file_extension) = $file_splitted;\n\n // redefine the path to subpath without slash at beginning\n $path = trim($file_subpath, '/');\n // same on package\n $package = trim($file_subpath, '/');\n $project_title = '';\n if (strpos($path, '/')) {\n // We have a slash, so this package is in a subfolder.\n // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.\n // Grab the directory name as project title.\n list($project_title, $package) = explode('/', $path);\n }\n if (strpos($package, '-')) {\n // Only remaining are the project uri and release,\n // eg. drupal-4.6.7 or ubercart-5.x-1.0-alpha8.\n list($project_uri, $release_version) = explode('-', $package, 2);\n\n l10n_drupal_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, trim($file_subpath_ext, '/'), filemtime($file->filename));\n }\n else {\n // File name not formatted properly.\n $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');\n }\n }\n }\n }\n\n $user_feedback = FALSE;\n $results = db_query_range(\"SELECT * FROM {l10n_server_release} WHERE pid IN (SELECT pid FROM {l10n_server_project} WHERE connector_module = 'l10n_drupal_files' AND status = 1) ORDER BY last_parsed ASC\", 0, variable_get('l10n_server_connector_l10n_drupal_files_limit', 1));\n while ($release = db_fetch_object($results)) {\n\n // Only parse file if something changed since we last parsed it.\n $file_name = $workdir . '/' . $release->download_link;\n\n if (file_exists($file_name)) {\n if (filemtime($file_name) > $release->last_parsed) {\n $result = l10n_drupal_parse_package($file_name, $release);\n\n // User feedback, if not automated. Log messages are already done.\n if (isset($result['error']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['error'], 'error');\n }\n elseif (isset($result['message']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['message']);\n }\n }\n else {\n if (!$automated) {\n $user_feedback = TRUE;\n drupal_set_message(t('@release was already parsed, no need to scan again.', array('@release' => $release->download_link)));\n }\n }\n }\n // Hackish update of last parsed time so other tarballs will get into the queue too.\n // @todo: work on something better for this.\n db_query(\"UPDATE {l10n_server_release} SET last_parsed = %d WHERE rid = %d\", time(), $release->rid);\n }\n if (!$automated && !$user_feedback) {\n drupal_set_message(t('No (new) local Drupal files found to scan in %workdir.', array('%workdir' => $workdir)));\n }\n\n // Ensure that a Drupal page will be displayed with the messages.\n return '';\n}", "function scan_directory_recursively($directory, $filter=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\treturn FALSE;\n\t}elseif(is_readable($directory))\n\t{\n\t\t$directory_list = opendir($directory);\n\t\twhile($file = readdir($directory_list))\n\t\t{\n\t\t\tif($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn')\n\t\t\t{\n\t\t\t\t$path = $directory.'/'.$file;\n\t\t\t\tif(is_readable($path))\n\t\t\t\t{\n\t\t\t\t\t$subdirectories = explode('/',$path);\n\t\t\t\t\tif(is_dir($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => end($subdirectories),\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'kind' => 'directory',\n\t\t\t\t\t\t\t'content' => scan_directory_recursively($path, $filter));\n\t\t\t\t\t}elseif(is_file($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = end(explode('.',end($subdirectories)));\n\t\t\t\t\t\tif($filter === FALSE || $filter == $extension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get metadata and image dimensions\n\t\t\t\t\t\t\t$size = getimagesize($path, $info);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get containing directory of file\n\t\t\t\t\t\t\t$directory_array = explode('/', $path);\n\t\t\t\t\t\t\t$parent_folder = min($directory_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset title, caption, tags\n\t\t\t\t\t\t\t$title = $caption = $taglist = $tags = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path'\t\t=> dirname($path),\n\t\t\t\t\t\t\t'group'\t\t=> $parent_folder,\n\t\t\t\t\t\t\t'file'\t\t=> end($subdirectories),\n\t\t\t\t\t\t\t'extension' => $extension,\n\t\t\t\t\t\t\t'size'\t\t=> filesize($path),\n\t\t\t\t\t\t\t'width'\t\t=> $size[0],\n\t\t\t\t\t\t\t'height'\t=> $size[1],\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t\t\t\t'caption'\t=> $caption,\n\t\t\t\t\t\t\t'tags'\t\t=> $tags,\n\t\t\t\t\t\t\t'kind'\t\t=> 'file');\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\tclosedir($directory_list); \n\t\treturn $directory_tree;\n\t}else{\n\t\treturn FALSE;\t\n\t}\n}", "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "public function findFiles();", "private static function __fordeepscan($dir, $file)\n {\n $path = \"\";\n $scan = glob($dir.'/*');\n $q = preg_quote($file, '\\\\');\n\n if (is_array($scan))\n {\n foreach ($scan as $d => $f)\n {\n if ($f != '.' && $f != '..')\n {\n $f = preg_replace(\"/[\\/]{1,}/\", '/', $f);\n\n if (!is_dir($f))\n {\n $base = basename($f);\n\n if (($base == $file) && strrpos($f, $file) !== false)\n {\n $path = $f;\n }\n\n $base = null;\n }\n\n if ($path == \"\")\n {\n $path = self::__fordeepscan($f, $file);\n if ($path !== \"\"){\n if (strrpos($path, $file) !== false){\n break;\n }\n }\n }\n\n $f = null;\n }\n }\n\n $scan = null;\n }\n\n return $path;\n }", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "function bob_scandir($root_path, $bad_path, $recursive) {\n $output = array();\n if (file_exists($root_path)){\n $paths = scandir($root_path);\n if ($paths === False)\n return False;\n foreach ($paths as $path) {\n $potential_path = \"${root_path}/${path}\";\n\n // Ignore any files in the bad (admin) path or files that begin with a period.\n if ($potential_path == $bad_path or $path[0] == '.')\n continue;\n\n $output[] = $potential_path;\n $bad_folder = ''; // not sure what this is for\n if ($recursive and is_dir($potential_path)) // Recursively descend and print out files.\n $output = array_merge($output, bob_scandir($potential_path, $bad_folder, $recursive));\n }\n }\n return $output;\n}", "public function scanSourceFolders() {\n $this->addons = [];\n foreach ($this->sources as $sourceDir) {\n $this->scanSource($sourceDir);\n }\n }", "public function backgroundScan() {\n\t\t$lastPath = null;\n\t\twhile (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) {\n\t\t\t$this->scan($path, self::SCAN_RECURSIVE, self::REUSE_ETAG);\n\t\t\t$this->cache->correctFolderSize($path);\n\t\t\t$lastPath = $path;\n\t\t}\n\t}", "public function scanSrc($dir, $total = array())\n {\n if ($handle = opendir($dir)) {\n while (($file = readdir($handle)) !== false) {\n if ($file != \"..\" && $file != \".\") {\n if (is_dir($dir . \"/\" . $file))\n // Do DFS\n $total += $this->scanSrc($dir . \"/\" . $file, $total);\n else\n array_push($total, $dir . '/' . $file);\n }\n }\n closedir($handle);\n return $total;\n }\n }", "function scan_dir($dir){\n\tif( !is_dir( $dir ) )\n\t\treturn false;\n\n\t$files=scandir($dir);\n\n\t$dirs=array();\n\tforeach($files as $file){\n\t\tif($file=='.'||$file=='..'||substr($file,0,1)=='.')\n\t\t\tcontinue;\n\t\tif(is_dir($dir.'/'.$file))\n\t\t\tarray_push($dirs,$file);\n\t}\n\n\treturn $dirs;\n}", "public function dir_readdir() {}", "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "function scan_students()\n {\n $current_students = [];\n $di = new RecursiveDirectoryIterator('students/');\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n $path_info = pathinfo($filename);\n if($path_info['extension']=='json'){\n array_push($current_students,$path_info['filename']);\n }\n }\n // echo print_r($current_students);\n return $current_students;\n }", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "protected static function _scanForPlugins(){\n\t\t$directory = __DIR__ . Config::$pluginsDirectory;\n\t\t$handle = opendir( $directory );\n\n\t\t// check to make sure we could open the directory handle\n\t\tif( !$handle )\n\t\t\treturn;\n\n\t\t// now begin looping through all of the contents of the plugin directory\n\t\twhile( ( $dir = readdir( $handle ) ) !== false ){\n\t\t\tif( $dir === '.' || $dir === '..' )\n\t\t\t\tcontinue;\n\n\t\t\t// now we need to verify that the current \"file\" is a directory before continuing\n\t\t\tif( !is_dir( $directory . $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// expect a class file to exist in the format \"class-<DirectoryName>.php\"\n\t\t\t$classFile = $directory . $dir . '/' . $dir . '.php';\n\t\t\tif( !file_exists( $classFile ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now actually include the code\n\t\t\trequire_once( $classFile );\n\n\t\t\t// now expect the class name to match whatever the $dir name was\n\t\t\tif( !class_exists( $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now we can instantiate the class name and store it now\n\t\t\tself::$_plugins[] = new $dir();\n\t\t}\n\t}", "private function scanDir(string $path, array &$files, bool $recursion = false): void\n {\n $handler = opendir($path);\n\n while ($item = readdir($handler)) {\n if (in_array($item, ['.', '..'])) {\n continue;\n }\n\n $itemPath = sprintf('%s/%s', $path, $item);\n\n if (is_file($itemPath)) {\n $files[] = $itemPath;\n continue;\n }\n\n if ($recursion && is_dir($itemPath)) {\n $this->scanDir($itemPath, $files, $recursion);\n }\n }\n }", "private function recSearchFiles($dir)\n {\n $ffs = scandir($dir);\n\n foreach ($ffs as $ff) {\n\n if ($ff != '.' && $ff != '..') {\n\n if (is_dir($dir . '/' . $ff)) {\n $this->recSearchFiles($dir . $ff . '/');\n } else if (strlen($ff) >= 5) {\n $this->searchedFiles[] = $dir . $ff;\n }\n }\n }\n }", "public function scanPath(Path $path)\n\t{\n\t\treturn @scandir($path->getPath());\n\t}", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "function dirscan_folders($rootFolder){\n $folderNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (is_dir($rootFolder.\"/\".$name)) \n $folderNames[]=$name;\n }\n sort($folderNames);\n return $folderNames;\n}", "function dynamik_skins_folder_scan( $skin_check = false )\n{\n\tif( dynamik_dir_check( dynamik_get_skins_folder_path() ) )\n\t{\n\t\t$skin_folder_names = scandir( dynamik_get_skins_folder_path() );\n\t\tif( false != $skin_check )\n\t\t{\n\t\t\tif( in_array( $skin_check, $skin_folder_names ) )\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn;\n\t}\t\n}", "function check_dir($dir)\n {\n global $docdir, $lang;\n \n // Collect files and diretcories in these arrays\n $directories = array();\n $files = array();\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n if (preg_match(\"/^\\.{1,2}/\",$file) || $file == 'CVS')\n continue;\n\n // Collect files and directories\n if (is_dir($dir.$file)) { $directories[] = $file; }\n else { $files[] = $file; }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n $file_cnt = 0;\n foreach ($files as $file) {\n if (check_file($dir.$file, $file_cnt)) { $file_cnt++; }\n }\n\n // than the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\");\n }\n }", "protected function getFilesInDirCreateTestDirectory() {}", "function directory_scan($directory, $withfiles) {\n\t$scanned_directory = array_diff(scandir($directory), array(\"..\", \".\")); //This removes all of the unessesary results\n\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == true; $i = $i + 1) {\n\t\tif (isset($scanned_directory[$i]) && (is_dir($directory . \"/\" . $scanned_directory[$i]) == FALSE)) { // If current item is a file, make it a download link\n\t\t\techo \"<div class='fileDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/file.svg' class='foldersvg'/>\";\n\t\t\techo \"<p class='fileLink'>\" . $scanned_directory[$i] . \"</p>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='fileinfo'><b>Type</b>: \" . mime_content_type($directory. \"/\" . $scanned_directory[$i]) . \" <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 0) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\t\t\t\n\t\t\techo \"</div>\";\n\t\t} else if (isset($scanned_directory[$i]) && $directory . \"/\" . $scanned_directory[$i] != \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") { // Makes this a special dir box if a item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\"; \n\t\t}\n\t}\n\t\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == false; $i = $i + 1) { //$withfiles only outputs files when true. when false, it will output files and folders. This is for the right-side of the page\n\t\tif ($i==0 && $directory != \"uploads/\" . $_SESSION[\"username\"]) { //when $i gets to its first iteration, output the \"back a directory\" folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[../]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='../' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Info</b>: Selecting this will move your selection back a folder.</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t\t\n\t\tif (isset($scanned_directory[$i]) && is_dir($directory . \"/\" . $scanned_directory[$i])) { // Makes this a special dir box if an item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\tif ($directory . \"/\" . $scanned_directory[$i] == \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") {\n\t\t\t\techo \"<img src='Assets/SVG/bin.svg' class='foldersvg'/>\";\n\t\t\t} else {\n\t\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\t}\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t}\n\n}", "public function scanRecursive($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = $this->scan();\n\t\t$objects = $files;\n\t\t\n\t\t$total_files = sizeof($files);\n\t\tfor ($i=0; $i < $total_files; $i++) {\n\t\t\tif ($files[$i] instanceof fDirectory) {\n\t\t\t\tarray_splice($objects, $i+1, 0, $files[$i]->scanRecursive());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($regex_filter) {\n\t\t\t$new_objects = array();\n\t\t\tforeach ($objects as $object) {\n\t\t\t\t$test_path = ($object instanceof fDirectory) ? substr($object->getPath(), 0, -1) . '/' : $object->getPath();\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\t\n\t\t\t\t$new_objects[] = $object;\n\t\t\t}\n\t\t\t$objects = $new_objects;\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "function logonscreener_source_scan() {\n global $source;\n $source = str_replace('\\\\', '/', rtrim($source, '/\\\\'));\n\n if (!$files = @scandir($source)) {\n if ($GLOBALS['debug_mode'] && is_file($source)) {\n // Debug mode let us set one specific image file as a source.\n $files = array(basename($source));\n $source = dirname($source);\n }\n else {\n logonscreener_log(\"$source not found.\");\n return FALSE;\n }\n }\n\n while (!empty($files)) {\n $key = array_rand($files);\n if (logonscreener_file_change($source . '/' . $files[$key])) {\n break;\n }\n unset($files[$key]);\n }\n\n return TRUE;\n}", "public function scanFilesRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, File>\n */\n return $this->scanRawRecursive(true, false, $filter, true);\n }", "public function scanDirPaths(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRaw(false, true, $filter, false);\n }", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "public function scanRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir|File>\n */\n return $this->scanRawRecursive(true, true, $filter, true);\n }", "protected function scan_directory($target) {\n $files = array();\n $target_images = $this->get_target_images();\n $target_components = explode(DIRECTORY_SEPARATOR, $target);\n $target = implode(DIRECTORY_SEPARATOR, $target_components);\n $target_length = strlen($target) + 1;\n\n $patterns = array(\n $target,\n '.xml'\n );\n $datatypes = array(\n '-01.tif',\n '-01.jpg',\n );\n\n $images = file_scan_directory($target_images, '/.*-01.*/');\n $xml = file_scan_directory($target, '/.*.xml$/');\n foreach ($xml as $uri => $value) {\n if (strpos($uri, '.xml') !== FALSE) {\n foreach ($datatypes as $datatype) {\n $replacements = array($target_images, $datatype);\n // Only process xml if there is a matching image to go with it.\n $matching_image = str_replace($patterns, $replacements, $value->uri);\n if (!empty($images[$matching_image])) {\n $files[substr($uri, $target_length)] = $value;\n }\n }\n }\n }\n return $files;\n }", "public function crawl() {\n\t\t$sDirectories = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\tif ( $sDirectories === '' ) return $sDirectories;\n\n\t\t$aDirectories = explode( ',', $sDirectories );\n\t\tforeach ( $aDirectories as $sDirectory ) {\n\t\t\t$sDir = trim ( $sDirectory );\n\t\t\tif( !is_dir( $sDir ) ) continue;\n\t\t\t$this->readInFiles( $sDir );\n\t\t}\n\t\treturn $this->aFiles;\n\t}", "function m_walk_dir( $root, $callback, $recursive = true, $level = 0 ) {\r\n $dh = @opendir( $root );\r\n if( false === $dh ) {\r\n return false;\r\n }\r\n while( $file = readdir( $dh )) {\r\n if( \".\" == $file || \"..\" == $file ){\r\n continue;\r\n }\r\n //echo \"## DEBUG:$level - $file<br/>\"; \r\n\r\n //echo \"Level: $level\";\r\n call_user_func( $callback,$level, \"{$root}/{$file}\", $file );\r\n if( false !== $recursive && is_dir( \"{$root}/{$file}\" )) {\r\n m_walk_dir( \"{$root}/{$file}\", $callback, $recursive, $level+1 );\r\n }\r\n }\r\n closedir( $dh );\r\n return true;\r\n}", "public function scanDirPathsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRawRecursive(false, true, $filter, false);\n }", "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function testReadingFiles()\n {\n $dir = __DIR__;\n $f = $this->adapter->java('java.io.File', $dir);\n $paths = $f->listFiles();\n foreach ($paths as $path) {\n self::assertFileExists((string) $path);\n }\n }", "function enumerateFiles($callback) { if (!$this->isInitialized()) { // NO: Initialize before use...\n throw new \\Exception('File System has not been initialize');\n }\n\n if (!isset($callback) || !is_callable($callback)) {\n throw new \\Exception('Missing or Invalid Callback Function');\n }\n\n // Create an Iterator for the Input Path\n $iterator = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->inputPath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n\n // Iterate Files in Directory\n $break = false;\n $inputPathLength = strlen($this->inputPath) + 1;\n foreach ($iterator as $name => $element) {\n if ($element->isFile() && $element->isReadable()) {\n // Return Relative Path Only\n $name = substr($name, $inputPathLength);\n $break = !$callback($name);\n if ($break) {\n break;\n }\n }\n }\n }", "function scan_directory($directory) {\n $dir = scandir($directory);\n foreach ($dir as $d) {\n if ($d === '.' or $d === '..')\n continue;\n\n if (is_dir($directory . '/' . $d)) {\n //code to use if directory\n scan_directory($directory . '/' . $d);\n } else {\n //code to use if file \n $type = pathinfo($directory . '/' . $d, PATHINFO_EXTENSION);\n if ($type == \"mp4\" || $type == \"html\") {\n //do nothing \n continue;\n } else {\n if (unlink($directory . '/' . $d)) {\n echo '<strong>Deleted</strong>'.$directory . '/' . $d . '<br/><br/>';\n }\n }\n }\n }\n}", "public function scanFilePathsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRawRecursive(true, false, $filter, false);\n }", "private function fileSearchAux($dir, $pattern, &$files) {\n $handle = opendir($dir);\n if ($handle) {\n while (($file = readdir($handle)) !== false) {\n\n if ($file == '.' || $file == '..') {\n continue;\n }\n\n $filePath = $dir == '.' ? $file : $dir . '/' . $file;\n\n if (is_link($filePath)) {\n continue;\n }\n\n if (is_file($filePath)) {\n if (preg_match($pattern, $filePath)) {\n $files[] = $filePath;\n }\n }\n\n if (is_dir($filePath) && !$this->isBlacklisted($file)) {\n $this->fileSearchAux($filePath, $pattern, $files);\n }\n }\n closedir($handle);\n }\n }", "public function watch() {\n\t\t\t$totalFiles = 0;\n\n\t\t\twhile(true) {\n\t\t\t\t$dir = new DirectoryIterator(realpath($this->input_dir));\n\t\t\t\t$numFiles = iterator_count($dir);\n\n\t\t\t\tif($numFiles != $totalFiles) {\n\t\t\t\t\t$totalFiles = $numFiles;\n\n\t\t\t\t\tforeach($dir as $fileinfo) {\n\t\t\t\t\t if(!$fileinfo->isDot() && $fileinfo->isFile()) {\n\t\t\t\t\t \t$filename = $fileinfo->getFilename();\n\t\t\t\t\t \t$ext = pathinfo($filename, PATHINFO_EXTENSION);\n\n\t\t\t\t\t \tif(in_array($ext, array('dat')))\n\t\t\t\t\t \t\t$this->extractInfo($filename);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsleep(3);\n\t\t\t}\n\t\t}", "public function scanDir($dir)\n {\n $objects = scandir($dir);\n\n // unset 2 first elements\n unset($objects[0], $objects[1]);\n\n return $objects;\n }", "function find_all_files($dir) \n{ \n $files = array();\n foreach (glob($dir) as $file) {\n $files[] = $file;\n }\n return $files;\n}", "public function scanDirsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRawRecursive(false, true, $filter, true);\n }", "function find($dir, $pattern){\n // escape any character in a string that might be used to trick\n // a shell command into executing arbitrary commands\n $dir = escapeshellcmd($dir);\n // get a list of all matching files in the current directory\n $files = glob(\"$dir/$pattern\");\n // find a list of all directories in the current directory\n // directories beginning with a dot are also included\n foreach (glob(\"$dir/{.[^.]*,*}\", GLOB_BRACE|GLOB_ONLYDIR) as $sub_dir){\n $arr = find($sub_dir, $pattern); // resursive call\n $files = array_merge($files, $arr); // merge array with files from subdirectory\n }\n // return all found files\n return $files;\n}", "private function listFolderFiles($dir){\n $children = false;\n $isRoot = false;\n if($dir==$this->file_storage){\n $isRoot = true;\n }\n\n $folderName = $this->getFolderName($dir);\n if(!$isRoot){\n //$this->info('Directory Name: '.$folderName['child']);\n //$this->info('Parent Name: '.$folderName['parent']);\n }\n\n //$this->info('Folder: '.$dir);\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n if ($fileInfo->isDir()) {\n $this->listFolderFiles($fileInfo->getPathname());\n }else{\n $rename = false;\n //$this->info('File: '.$fileInfo->getFilename());\n //$info = new SplFileInfo($dir.'/'.$fileInfo->getFilename());\n $ext = \".\".pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);\n //$ext = \".\"$info->getExtension();\n //$this->info('File: extension '.$ext);\n $filebreak = str_replace($ext,\"\",$fileInfo->getFilename());\n if (strpos($filebreak, '.') !== false || strpos($filebreak, \"'\") !== false || strpos($filebreak, \"#\") !== false) {\n $rename = true;\n }\n if($rename){\n $replace = array(\".\", \"'\", \"#\", \";\", \"/\", \"?\", \":\", \"@\", \"=\", \"&\", \",\");\n //“;”, “/”, “?”, “:”, “@”, “=” and “&\n $fileraw = str_replace($replace,\" \",$filebreak);\n //$this->info('File: raw '.$fileraw);\n $newfilename = $fileraw . $ext;\n //$this->info('File: new '.$newfilename);\n $prod_filename = $newfilename;\n rename($dir.'/'.$fileInfo->getFilename(),$dir.'/'.$newfilename);\n }else{\n $prod_filename = $fileInfo->getFilename();\n }\n $this->checkFileExtension($dir.'/'.$prod_filename, $prod_filename, $dir);\n }\n $children = true;\n }else{\n $children = false;\n }\n }\n //$this->info('Children: '.$children);\n\n if(!$isRoot){\n $this->folders[$this->count]['name'] \t\t\t= $folderName['child'];\n $this->folders[$this->count]['parent'] \t\t= $folderName['parent'];\n $this->folders[$this->count]['full_path']\t= $dir;\n $this->folders[$this->count]['children']\t= $children;\n $this->count++;\n }\n //$this->info('#################');\n }", "function lscan($scat, $param)\n{\n if(isset($param[1][0]) == FALSE)\n {\n $scat[1][0] = '.';\n }\n $c = 0;\n if (file_exists($scat[1][0]) == TRUE && is_dir($scat[1][0]) == TRUE && is_readable($scat[1][0]) == TRUE && is_executable($scat[1][0]) == TRUE && $fh = fopen($scat[1][0], 'r'))\n {\n while(isset(scandir($scat[1][0])[$c]))\n {\n $tab[$c] = scandir($scat[1][0])[$c];\n $c++;\n }\n $c = 0;\n sort($tab);\n while(isset($tab[$c]))\n {\n if (is_dir($tab[$c]))\n {\n echo(\"\\033[34m{$tab[$c]}\");\n echo (\"/\");\n }\n else if(is_executable($tab[$c]) && is_dir($tab[$c]) == FALSE)\n {\n echo(\"\\033[32m{$tab[$c]}\");\n echo (\"*\");\n }\n else if(is_link($tab[$c]))\n {\n echo($tab[$c]);\n echo (\"@\");\n }\n else\n echo($tab[$c]);\n echo (\" \");\n $c++;\n }\n echo (\"\\n\");\n }\n else if (is_file($scat[1][0]) == TRUE)\n echo (\"Is a file\\n\");\n else if (file_exists($scat[1][0]) == TRUE && (is_readable($scat[1][0]) == FALSE || is_executable($scat[1][0]) == FALSE))\n echo (\"Permission denied\\n\");\n else if (file_exists($scat[1][0]) == FALSE && is_dir($scat[1][0]) == FALSE)\n echo (\"No such file or directory\\n\");\n else\n echo (\"Cannot open folder\\n\");\n}", "abstract protected function yieldSearchPaths(): Generator;", "function dir_enter($entry_dir='/', $depth=0)\r\n{\r\n\t$found = 0;\r\n\r\n\t# Remove the last trailing slash and void dual writing\r\n\t$entry_dir = preg_replace('/\\/$/i', '', $entry_dir);\r\n\r\n\t$skip_list = array(\r\n\t\t'.', # self\r\n\t\t'..', # parent\r\n\t);\r\n\r\n\tif($dir_handle = opendir($entry_dir))\r\n\t{\r\n\t\twhile(false !== ($filename = readdir($dir_handle)))\r\n\t\t{\r\n\t\t\tif(in_array($filename, $skip_list))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$full_file_path = \"{$entry_dir}/{$filename}\";\r\n\t\t\t\r\n\t\t\tif(is_dir($full_file_path))\r\n\t\t\t{\r\n\t\t\t\t# Need to loop here inside the directory\r\n\r\n\t\t\t\tfecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\tfecho(\"{$filename}\");\r\n\r\n\t\t\t\t\r\n\t\t\t\t# Recurse through the file\r\n\t\t\t\t$function = __FUNCTION__;\r\n\t\t\t\t$found += $function($full_file_path, $depth+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t#fecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\t#fecho(\"{$filename}\");\r\n\r\n\t\t\t\t++$found;\r\n\t\t\t\tprocess_file($full_file_path, $depth);\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($dir_handle);\r\n\t}\r\n\t\r\n\treturn $found;\r\n}", "protected function scanTarget($path,$recursive=false) {\n $newpaths = [];\n $dir = $this->cache->getDestination();\n\n $stream = new \\qio\\Directory\\Stream($dir);\n $reader = new \\qio\\Directory\\Reader($stream);\n $list = $reader->scan();\n\n foreach($list as $item) {\n $fullItemPath = $path.DIRECTORY_SEPARATOR.$item;\n if(is_file($fullItemPath)) {\n $newpaths[] = $fullItemPath;\n } elseif($recursive && \n is_dir($fullItemPath)) {\n $newpaths = array_merge($newpaths, $this->scanTarget($fullItemPath,$recursive));\n }\n }\n\n return $newpaths;\n }", "function get_files($instructor=False, $sources=array('class', 'lab', 'project', 'exam', 'review', 'capstone', 'continued-lab'), $file_path = '.', $access=array(), $virtual=array(), $categories=array(), $secret='really') {\n $results = array();\n $basedir = scandir($file_path);\n foreach ($sources as $i => $l0) {\n if (in_array($l0, $basedir) && is_dir($file_path . '/' . $l0)) {\n $level1 = scandir($file_path . '/' . $l0);\n sort($level1);\n foreach ($level1 as $i => $l1) {\n if (substr($l1, 0, 1) != '.' && is_dir($file_path . '/' . $l0 . '/' . $l1)) {\n // The following code allows the system recursively look through the Directory\n // structure within a class, and the system can now process RELATIVE links\n // that go into those subordinate directories\n $level2 = array();\n try {\n $Iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($file_path . '/' . $l0 . '/' . $l1),\n RecursiveIteratorIterator::LEAVES_ONLY,\n RecursiveIteratorIterator::CATCH_GET_CHILD);\n foreach($Iterator as $name => $object) {\n $name = explode(\"/\", $name);\n unset($name[2]);\n unset($name[1]);\n unset($name[0]);\n $name = implode(\"/\", $name);\n $level2[] = $name;\n }\n } catch (Exception $e) {\n // Unable to recurse, so don't bother...\n }\n //$level2 = scandir($file_path . '/' . $l0 . '/' . $l1);\n $results[$l0][$l1] = array();\n sort($level2);\n foreach ($level2 as $i => $l2) {\n $key = sha1($secret.$l0.$l1.$l2);\n if (substr($l2, 0, 1) != '.' && validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access)[0]) {\n if (is_link($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2)) {\n if (validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access)[0]) {\n $vf = validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access);\n $category = categorize_file($instructor, $l2, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2),\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n } else {\n $vf = validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access);\n $category = categorize_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n }\n # Add Virtual files, format like array('class'=>array(1 => array(array('answers.html', 'homework/answers05.html'))))\n foreach ($virtual as $l0 => $l1array) {\n if (isset($results[$l0])) {\n $classes = array_keys($results[$l0]);\n foreach ($l1array as $day => $l2array) {\n if (isset($classes[$day-1])) {\n foreach ($l2array as $i => $values) {\n $virt_file = $values[0];\n $real_file = $values[1];\n if (validate_file($instructor, $real_file, $real_file, $access)[0]) {\n $key = sha1($secret.$real_file.$virt_file);\n $vf = validate_file($instructor, $real_file, $real_file, $access);\n $category = categorize_file($instructor, $virt_file, $real_file, $vf[5], $categories);\n $results[$l0][$classes[$day-1]][$virt_file] = array('actual' => $real_file,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n #####################################################\n # Verify that the class is not blocked by security...\n $today = getdate();\n foreach ($results as $l0 => $classes) {\n $counter = 1;\n foreach ($classes as $l1 => $data) {\n foreach ($data as $filename => $fdata) {\n if ($fdata['year'] == 1 && $fdata['month'] == 1 && $fdata['day'] == 1) {\n $cate = $fdata['category'];\n if (isset($access[$l0.\"_\".$counter]) && $cate == 'title') {\n $sspec = $l0.\"_\".$counter;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$cate])) {\n $sspec = $l0.\"_\".$counter.\"/\".$cate;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$filename])) {\n $sspec = $l0.\"_\".$counter.\"/\".$filename;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/all\"])) {\n $sspec = $l0.\"_\".$counter.\"/all\";\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n }\n }\n }\n $counter++;\n }\n }\n return $results;\n }", "function CheckDir($dir, $startWith = '')\n{\n global $count;\n global $pruned;\n $count++;\n \n echo \"\\r$count ($pruned): Checking $dir \";\n \n $started = false;\n if( !strlen($startWith) )\n $started = true;\n\n // see if this is a directory we need to prune\n if( $started && is_dir(\"$dir/video_2\") )\n {\n PruneDir($dir);\n }\n else\n {\n // recurse into any directories\n $f = scandir($dir);\n foreach( $f as $file )\n {\n if( !$started && $file == $startWith )\n $started = true;\n \n if( $started && is_dir(\"$dir/$file\") && $file != '.' && $file != '..' )\n CheckDir(\"$dir/$file\");\n }\n unset($f);\n }\n}", "public function scanDirs(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRaw(false, true, $filter, true);\n }", "function parseDir($dir) {\r\n global $zoom;\r\n // start the scan...(open the local dir)\r\n $images = array();\r\n $handle = $zoom->platform->opendir($dir);\r\n while (($file = $zoom->platform->readdir($handle)) != false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $tag = ereg_replace(\".*\\.([^\\.]*)$\", \"\\\\1\", $file);\r\n $tag = strtolower($tag);\r\n if ($zoom->acceptableFormat($tag)) {\r\n // Tack it onto images...\r\n $images[] = $file;\r\n }\r\n }\r\n }\r\n $zoom->platform->closedir($handle);\r\n return $images;\r\n }", "protected function auto_register_files()\r\n\t\t{\r\n\t\t\t// initialize variables\r\n\t\t\t$level = 0;\r\n\t\t\t\r\n\t\t\t// look through each director\r\n\t\t\tforeach( $this->paths as $i => $path )\r\n\t\t\t{\r\n\t\t\t\t// initialize variables\r\n\t\t\t\t$j \t\t= $level + 1001;\r\n\t\t\t\t$files \t= glob( \"{$path}*\" . self::REAL_EXT );\r\n\t\t\t\t$len \t= strlen( self::REAL_EXT );\r\n\t\t\t\t\r\n\t\t\t\tforeach( $files as $f )\r\n\t\t\t\t{\r\n\t\t\t\t\t// determine handle\r\n\t\t\t\t\t$file_name \t= substr( $f, 0, strlen( $f ) - $len );\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( strpos( $file_name, $this->local ) !== false )\r\n\t\t\t\t\t\t$file_name = substr( $file_name, strlen( $this->local ) );\r\n\t\t\t\t\t\r\n\t\t\t\t\t$handle \t= $i == self::ROOT_PATH ? strtoupper( self::ROOT_PATH ) . \"_\" : \"\";\r\n\t\t\t\t\t$handle \t.= preg_replace( \"/[^\\w]/\", \"_\", strtoupper( $file_name ) );\r\n\t\t\t\t\tdefine( $handle, $handle );\r\n\t\t\t\t\t/* The old page id number define( $handle . '_PAGEID', $j );*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t// get rid of system directories\r\n\t\t\t\t\tif ( strpos( $file_name, $this->local ) !== false )\r\n\t\t\t\t\t\t$file_name = substr( $file_name, strlen( $this->local ) );\r\n\t\t\t\t\t\r\n\t\t\t\t\t// define properties\r\n\t\t\t\t\t$this->files[ $handle ] = $file_name;\r\n\t\t\t\t\t$this->urls[ $handle ] = $this->url . str_replace( \"\\\\\", \"/\", $file_name );\r\n\t\t\t\t\t$j++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// increment for next path\r\n\t\t\t\t$level += 1000;\r\n\t\t\t\t$j = 1;\r\n\t\t\t}\r\n\t\t}", "function toIterator($root) {\n $root = realpath($root);\n $iterator = new \\AppendIterator();\n\n if(!file_exists($root))\n die('The components folder could not be found');\n\n $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($root));\n //$directoryIterator->setFlags(\\RecursiveDirectoryIterator::SKIP_DOTS);\n\n return $iterator;\n }", "static private function find_contents($dir)\n {\n $result = array();\n $root = scandir($dir);\n foreach ($root as $value) {\n if ($value === '.' || $value === '..') {\n continue;\n }\n if (is_file($dir . DIRECTORY_SEPARATOR . $value)) {\n if (! self::$ext_filter || in_array(strtolower(pathinfo($dir . DIRECTORY_SEPARATOR . $value, PATHINFO_EXTENSION)), self::$ext_filter)) {\n self::$files[] = $result[] = $dir . DIRECTORY_SEPARATOR . $value;\n }\n continue;\n }\n if (self::$recursive) {\n foreach (self::find_contents($dir . DIRECTORY_SEPARATOR . $value) as $value) {\n self::$files[] = $result[] = $value;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }", "function get_all_image_codes($base_path, $search_under, $recurse = true)\n{\n $out = array();\n\n require_code('images');\n require_code('files');\n\n if (!file_exists($base_path . '/' . $search_under)) {\n return array();\n }\n $handle = @opendir($base_path . '/' . $search_under);\n if ($handle !== false) {\n while (false !== ($file = readdir($handle))) {\n if (!should_ignore_file($file, IGNORE_ACCESS_CONTROLLERS)) {\n $full_path = $base_path . '/' . $search_under . '/' . $file;\n if (is_file($full_path)) {\n if (is_image($file)) {\n $dot_pos = strrpos($file, '.');\n if ($dot_pos === false) {\n $dot_pos = strlen($file);\n }\n $_file = substr($file, 0, $dot_pos);\n $short_path = ($search_under == '') ? $_file : ($search_under . '/' . $_file);\n $out[$short_path] = 1;\n }\n } elseif ((strlen($file) != 2) || (strtoupper($file) != $file)) {\n if ($recurse) {\n $out += get_all_image_codes($base_path, $search_under . '/' . $file);\n }\n }\n }\n }\n closedir($handle);\n }\n\n return $out;\n}", "private function scan_registry_dir($directory, &$message = '') {\n \tglobal $dbKITregistryFiles;\n \tglobal $dbKITregistryCfg;\n\n \t$sub_dirs = $dbKITregistryCfg->getValue(dbKITregistryCfg::cfgRegistryListTabs);\n\n $handle = opendir($directory);\n while ($file = readdir($handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (is_dir($directory.$file)) {\n // Erneuter Funktionsaufruf, um das aktuelle Verzeichnis auszulesen\n $this->scan_registry_dir($directory.$file.'/');\n }\n else {\n // Wenn Verzeichnis-Eintrag eine Datei ist, diese ausgeben\n $actual_file = page_filename(utf8_encode($file));\n $actual_file = $directory.$actual_file;\n $where = array(dbKITregistryFiles::field_filepath_registry => $actual_file);\n $data = array();\n if (!$dbKITregistryFiles->sqlSelectRecord($where, $data)) {\n \t$this->setError($dbKITregistryFiles->getError());\n \treturn false;\n }\n if (count($data) > 0) {\n \t// Datensatz existiert\n \t$data = $data[0];\n \t$update = array();\n \t// Vergleichen, ob sich etwas veraendert hat\n \tif (filemtime($actual_file) != $data[dbKITregistryFiles::field_filemtime]) {\n \t\t$update[dbKITregistryFiles::field_filemtime] = filemtime($actual_file);\n \t}\n \tif (filesize($actual_file) != $data[dbKITregistryFiles::field_filesize]) {\n \t\t$update[dbKITregistryFiles::field_filesize] = filesize($actual_file);\n \t}\n \tif ($data[dbKITregistryFiles::field_status] == dbKITregistryFiles::status_deleted) {\n \t\t$update[dbKITregistryFiles::field_status] = dbKITregistryFiles::status_active;\n \t\t$message .= sprintf(reg_msg_registry_file_undeleted, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n \tif (count($update) > 0) {\n \t\t$where = array(dbKITregistryFiles::field_id => $data[dbKITregistryFiles::field_id]);\n \t\tif (!$dbKITregistryFiles->sqlUpdateRecord($update, $where)) {\n \t\t\t$this->setError($dbKITregistryFiles->getError());\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_updated, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n }\n else {\n \t// es existiert noch kein Eintrag\n \tif (!file_exists($actual_file)) {\n \t\t// Datei muss noch umbenannt werden\n \t\tif (!rename($directory.$file, $actual_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($directory.$file), basename($actual_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_renamed, basename($directory.$file), basename($actual_file));\n \t}\n \t$sub_dir = substr(basename($actual_file), 0, 1);\n \tif (!in_array($sub_dir, $sub_dirs)) $sub_dir = '#';\n \tif (!file_exists($this->registry_path.$sub_dir)) {\n \t\tif (!mkdir($this->registry_path.$sub_dir)) {\n \t\t\t$this->setError(sprintf(reg_error_mkdir, $this->registry_path.$sub_dir));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_mkdir, '/'.$sub_dir);\n \t}\n \t$check_file = page_filename(utf8_encode($file));\n \t$check_file = $this->registry_path.$sub_dir.'/'.$check_file;\n \t// pruefen, ob sich die Datei im richtigen Verzeichnis befindet\n \tif ($actual_file != $check_file) {\n \t\tif (!rename($actual_file, $check_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($actual_file), '/'.$sub_dir.'/'.basename($check_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_moved, basename($actual_file), $sub_dir);\n \t\t$actual_file = $check_file;\n \t}\n \t$data = array(\n \t\tdbKITregistryFiles::field_filename_original\t\t\t=> utf8_encode(basename($directory.$file)),\n \t\tdbKITregistryFiles::field_filename_registry\t\t\t=> basename($actual_file),\n \t\tdbKITregistryFiles::field_filepath_registry\t\t\t=> $actual_file,\n \t\tdbKITregistryFiles::field_filemtime\t\t\t\t\t\t\t=> filemtime($actual_file),\n \t\tdbKITregistryFiles::field_filesize\t\t\t\t\t\t\t=> filesize($actual_file),\n \t\tdbKITregistryFiles::field_filetype\t\t\t\t\t\t\t=> pathinfo($actual_file, PATHINFO_EXTENSION),\n \t\tdbKITregistryFiles::field_status\t\t\t\t\t\t\t\t=> dbKITregistryFiles::status_active,\n \t\tdbKITregistryFiles::field_sub_dir\t\t\t\t\t\t\t\t=> $sub_dir\n \t);\n \t$id = -1;\n \tif (!$dbKITregistryFiles->sqlInsertRecord($data, $id)) {\n \t\t$this->setError($dbKITregistryFiles->getError());\n \t\treturn false;\n \t}\n \t$message .= sprintf(reg_msg_registry_file_added, $data[dbKITregistryFiles::field_filename_registry]);\n }\n }\n }\n }\n closedir($handle);\n }", "public function test_scan_sort_desc()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_DESC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals(array_reverse($content), $output);\n }", "public function discoverPlugins() {\n foreach($this->fs->roots(false) as $root) {\n $this->findAvailablePlugins($root);\n }\n }", "private function recurseThroughDirectory($baseDir, $lookingFor = \"/(.*)\\.php$/i\")\n {\n $results = array();\n $di = new RecursiveDirectoryIterator($baseDir);\n\n $this->output->writeLn(\"Scanning $baseDir...\");\n\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n if (preg_match($lookingFor, $filename)) {\n $results[] = $this->extractFrom($filename);\n }\n }\n\n return $results;\n }", "function scandir_recursive($directory, $format = null, $excludes = array()){\n $format = ($format == null) ? 'absolute' : $format;\n $paths = array();\n $stack[] = $directory;\n while($stack){\n $this_resource = array_pop($stack);\n if ($resource = scandir($this_resource)){\n $i = 0;\n while (isset($resource[$i])){\n if ($resource[$i] != '.' && $resource[$i] != '..'){\n $current = array(\n 'absolute' => \"{$this_resource}/{$resource[$i]}\",\n 'relative' => preg_replace('/' . preg_quote($directory, '/') . '/', '', \"{$this_resource}/{$resource[$i]}\")\n );\n if (is_file($current['absolute'])){\n $paths[] = $current[$format];\n } elseif (is_dir($current['absolute'])){\n $paths[] = $current[$format];\n $stack[] = $current['absolute'];\n }\n }\n $i++;\n }\n }\n }\n if (count($excludes) > 0){\n $clean = array();\n foreach($paths as $path){\n $remove = false;\n foreach($excludes as $exclude){\n $exclude = preg_quote($exclude, '/');\n $exclude = str_replace('\\*', '.*', $exclude);\n if (preg_match('/' . $exclude . '/', $path)){\n $remove = true;\n }\n }\n if (!$remove) $clean[] = $path;\n }\n $paths = $clean;\n }\n return $paths;\n}", "public function browse_files()\n {\n // Scan file directory, render the images.\n if (is_dir($this->file_path)) {\n $files = preg_grep('/^([^.])/', scandir($this->file_path));\n return $files;\n }\n \n }", "public function scan(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir|File>\n */\n return $this->scanRaw(true, true, $filter, true);\n }", "function directory_mapper($path)\n{\n $maxDepth = 3;\n $minDepth = 3;\n $iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),\n RecursiveIteratorIterator::SELF_FIRST,\n RecursiveIteratorIterator::CATCH_GET_CHILD// Ignore \"Permission denied\"\n );\n $iterator->setMaxDepth($maxDepth);\n\n $paths = array($path);\n foreach ($iterator as $path => $dir) {\n if ($iterator->getDepth() >= $minDepth) {\n if ($dir->isDir()) {\n if (file_exists($dir . DIRECTORY_SEPARATOR . \"meta\")) {\n $paths[] = $path;\n }\n }\n }\n }\n array_shift($paths);\n return $paths;\n}", "public function scanIniDir($dir) {\n\n //prevent ../../../ attach\n $full_data_dir = realpath($this->configuration['base_ini_dir']);\n $full_dir_unsafe = realpath($full_data_dir . '/' . $dir);\n $full_dir = $full_data_dir . str_replace($full_data_dir, '', $full_dir_unsafe);\n\n $a_out = array();\n if (!is_dir($full_dir_unsafe)) {\n die(\"pqz.class.php: Directory $dir Not Found / full dir $full_dir\");\n }\n\n $scanned_directory = array_diff(scandir($full_dir), array('..', '.'));\n $index = 0;\n foreach ($scanned_directory as $entry) {\n\n if (is_dir(\"$full_dir/$entry\")) {\n $a_out[$index]['type'] = \"dir\";\n $a_out[$index]['path'] = $dir . $entry . '/';\n $a_out[$index]['name'] = $entry;\n $index ++;\n } else {\n // is a file\n\n $filename = $full_dir . '/' . $entry;\n\n $file_parts = pathinfo($filename);\n if (strtolower($file_parts['extension']) == 'ini') {\n \n } else {\n if ($this->debug) {\n echo \"$filename NOT an ini file\";\n }\n }\n $ini_array = parse_ini_file($filename);\n\n if (isset($ini_array['title'])) {\n $a_out[$index] = $ini_array;\n $a_out[$index]['type'] = \"file\";\n $a_out[$index]['path'] = $dir . $entry;\n $a_out[$index]['name'] = $entry;\n $index ++;\n }\n }\n }\n\n // --- sort the multidimensional array ---\n // Obtain a list of columns\n foreach ($a_out as $key => $row) {\n $type[$key] = $row['type'];\n $name[$key] = $row['name'];\n $path[$key] = $row['path'];\n }\n\n// Sort the data with volume descending, edition ascending\n// Add $data as the last parameter, to sort by the common key\n array_multisort($type, SORT_ASC, $name, SORT_ASC, $path, SORT_ASC, $a_out);\n\n return $a_out;\n }", "protected function _scan_files()\n\t{\n\t\t$terms = array();\n\n\t\t$parser = new PHPParser_Parser(new PHPParser_Lexer);\n\n\t\tforeach ($this->_list_files(array('views', 'classes')) as $file)\n\t\t{\n\t\t\t$statements = $parser->parse(file_get_contents($file));\n\n\t\t\t$terms = Arr::merge($terms, $this->_get_terms_from_statements($statements));\n\t\t}\n\n\t\treturn $terms;\n\t}", "public function scanDirNamesRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string>\n */\n return $this->scanRawRecursive(false, true, $filter, null);\n }", "public function accept()\n {\n /**\n * @var \\SplFileInfo $current\n */\n $current = parent::current();\n if (!$current->isDir()) {\n return false;\n }\n }", "public function scanDirectory($directory) {\n global $database;\n\n $check = self::getDirectoryTree($directory, array(\n 'php',\n 'lte'\n ));\n $translation = array();\n foreach ($check as $file_path) {\n $path_info = pathinfo($file_path);\n if ($path_info['extension'] == 'php') {\n if (!$this->parseSourceFile($file_path, $translation)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError()));\n return false;\n }\n }\n elseif ($path_info['extension'] == 'lte') {\n if (!$this->parseTemplateFile($file_path, $translation)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError()));\n return false;\n }\n }\n else {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__,\n $this->I18n('The file type <b>{{ file_type }}</b> is not supported!',\n array('file_type' => $path_info['extension']))));\n return false;\n }\n }\n\n foreach ($translation as $entry) {\n $key = self::sanitize($entry['key']);\n $SQL = \"SELECT `i18n_id`, `i18n_key` FROM `\".dbManufakturI18n::getTableName() .\n \"` WHERE `i18n_key`='$key' AND (`i18n_status`='ACTIVE' OR `i18n_status`='IGNORE')\";\n if (null == ($query = $database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n\n $add_only_source = false;\n if ($query->numRows() > 0) {\n $result = $query->fetchRow(MYSQL_ASSOC);\n $add_only_source = ($result['i18n_key'] == $key) ? true : false;\n }\n\n if ($add_only_source) {\n // entry already exists, keep only the source usage\n $SQL = \"INSERT INTO `\".dbManufakturI18nSources::getTableName().\n \"` (`i18n_id`, `src_path`, `src_file`, `src_line`, `src_module`) VALUES (\".\n \"'{$result[dbManufakturI18n::FIELD_ID]}','{$entry['path']}',\".\n \"'{$entry['file']}','{$entry['line']}','{$entry['module']}')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n }\n else {\n // create a new entry\n $SQL = \"INSERT INTO `\".dbManufakturI18n::getTableName().\"` \".\n \"(`i18n_description`, `i18n_key`, `i18n_last_sync`, `i18n_status`) VALUES ( \".\n \"'', '$key', '\".date(\"Y-m-d H:i:s\", time()).\"', \".\n \"'\".dbManufakturI18n::STATUS_ACTIVE.\"')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n // get the ID for the new entry\n $id = mysql_insert_id();\n // add the standard EN translation\n $author = (isset($_SESSION['DISPLAY_NAME'])) ? $_SESSION['DISPLAY_NAME'] : dbManufakturI18n::AUTHOR_UNKNOWN;\n $SQL = \"INSERT INTO `\".dbManufakturI18nTranslations::getTableName().\"` (\".\n \"`trans_author`, `i18n_id`, `trans_language`, `trans_translation`, \".\n \"`trans_usage`, `trans_type`, `trans_status`) VALUES (\".\n \"'$author','$id','EN','$key','TEXT','REGULAR','ACTIVE')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n // add source usage...\n $SQL = \"INSERT INTO `\".dbManufakturI18nSources::getTableName().\"` (\".\n \"`i18n_id`, `src_path`, `src_file`, `src_line`, `src_module`) VALUES (\".\n \"'$id', '{$entry['path']}', '{$entry['file']}', '{$entry['line']}', '{$entry['module']}')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n }\n }\n return true;\n }" ]
[ "0.7491994", "0.7418604", "0.7250043", "0.71842724", "0.7012226", "0.688901", "0.6712443", "0.66900235", "0.6572419", "0.65611196", "0.6556684", "0.6530685", "0.65249497", "0.64954686", "0.6491414", "0.64674044", "0.64471996", "0.6423127", "0.64098424", "0.6407863", "0.63425076", "0.63254446", "0.63068134", "0.62684846", "0.62645704", "0.6242374", "0.62012523", "0.61859655", "0.6183164", "0.6182636", "0.61544687", "0.6125214", "0.61195093", "0.60808647", "0.60739344", "0.6052474", "0.6049237", "0.60448027", "0.60307676", "0.5994695", "0.5986685", "0.594655", "0.5932649", "0.5926633", "0.5906375", "0.5904675", "0.58696854", "0.58676755", "0.5865345", "0.586406", "0.5862259", "0.5838986", "0.58232176", "0.5796079", "0.5766722", "0.5730146", "0.57218903", "0.5719166", "0.57155037", "0.57032275", "0.5699769", "0.5693498", "0.5689411", "0.56783915", "0.56553394", "0.5653359", "0.5647607", "0.5645989", "0.56299514", "0.5620454", "0.56146276", "0.56144124", "0.5601091", "0.5594189", "0.55926573", "0.55917454", "0.5588802", "0.5576779", "0.5575044", "0.55505025", "0.55466133", "0.5525539", "0.5524566", "0.5509517", "0.5481452", "0.54728067", "0.5469863", "0.5459185", "0.54591405", "0.5452974", "0.5450035", "0.5446679", "0.5429731", "0.54216176", "0.5418222", "0.5416231", "0.5409062", "0.5396358", "0.5391819", "0.53903013" ]
0.7820266
0
Test for Directory::search() Search file 'index.php' inside the ROOT directory
public function test_search() { $object = Directory::factory(ROOT); $res = $object->search('/(index.php|.htaccess)/'); $this->assertArrayHasKey(ROOT.DS.'index.php', $res); $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function test_search_by_extension()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_extension(array('php'));\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "public function hasIndexDirectoryPath();", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "protected function getSearchPaths() {}", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "public function testFind()\n {\n $stack = Solar::factory('Solar_Path_Stack');\n \n // now reset the include_path\n $old_path = set_include_path($this->_support_path);\n \n // use the testing directory to look for files\n $path = array(\n \"a\",\n \"b\",\n \"c\",\n );\n \n $stack->add($path[0]);\n $stack->add($path[1]);\n $stack->add($path[2]);\n \n // should find it at a\n $actual = $stack->find('target1');\n $expect = Solar_Dir::fix($path[0]) . 'target1';\n $this->assertSame($expect, $actual);\n \n // should find it at b\n $actual = $stack->find('target2');\n $expect = Solar_Dir::fix($path[1]) . 'target2';\n $this->assertSame($expect, $actual);\n \n // should find it at c\n $actual = $stack->find('target3');\n $expect = Solar_Dir::fix($path[2]) . 'target3';\n $this->assertSame($expect, $actual);\n \n // should not find it at all\n $actual = $stack->find('no_such_file');\n $this->assertFalse($actual);\n \n // put the include_path back\n set_include_path($old_path);\n }", "abstract public function search($files, array $includedFiles);", "public function testFindFiles()\n {\n\n }", "public function findFiles();", "public function getSearchDir() {\r\n\t\treturn $this->searchDir;\r\n\t}", "function search() {}", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "function hasIndex($path, $filename)\n {\n $abs = $path.'\\\\'.$filename;\n\n if(file_exists($abs))\n {\n $info = pathinfo($abs);\n\n if (is_dir($abs)) {\n $dir = new DirectoryIterator($abs);\n foreach ($dir as $file) {\n if (!$file->isDot()) {\n $info = pathinfo($file);\n if ( strtolower($info['filename']) == 'index' && !$file->isDir()) { return true; } \n }\n }\n }\n else { if (strtolower($info['filename']) == 'index') { return true; } }\n }\n return false;\n }", "public function hasDefaultIndexDirectoryPath();", "public function testSearchMods()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function find($file);", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "function searchFolder( $current_folder, $folder_to_find, &$matches )\n{\n if ( !( $handle = opendir( $current_folder ) ) ) die( \"Cannot open $current_folder.\" );\n\n while ( $entry = readdir( $handle ) ) {\n if ( is_dir( \"$current_folder/$entry\" ) ) {\n if ( $entry != \".\" && $entry != \"..\" ) {\n\n // This entry is a valid folder\n // If it matches our folder name, add it to the list of matches\n if ( $entry == $folder_to_find ) $matches[] = \"$current_folder/$entry\";\n\n // Search this folder\n searchFolder( \"$current_folder/$entry\", $folder_to_find, $matches );\n }\n }\n }\n closedir( $handle );\n}", "private static function search()\r\n\t{\r\n\t\t$dir = 'plugins';\r\n\t\t// search for plugin modules in the plugins directory\t\t \r\n\t\t$modules = model_Utils_ModuleHelper::searchDirectoryForModules($dir);\r\n\t\tforeach ($modules as $module)\r\n\t\t{\r\n\t\t\t// save found module paths to the db so we can auto-load them in the future\r\n\t\t\tmodel_Utils_ModuleHelper::saveModule($module);\r\n\t\t\t// add matching paths to Kohana's module paths\t\t\r\n\t\t\tmodel_Utils_ModuleHelper::addModulePath($module);\r\n\t\t}\r\n\t\treturn Model_Admin_EventsAdmin::searchForListeners($dir,'Interface_iPCPPlugin');\t\r\n\t}", "public function requires_search() {\n\t\treturn false;\n\t}", "public function getIndexDirectoryPath();", "function search()\n\t{}", "function search()\n\t{}", "static public function searchFirst($dirList)\n {\n if (!is_array($dirList))\n {\n $dirList = array($dirList);\n }\n\n // this is what we'll be adding to the search path when we're done\n $searchPathList = array();\n\n // iterate through the list of folders\n foreach ($dirList as $dir)\n {\n // get the absolute path\n $dir = realpath($dir);\n\n // remove the folder if it is already in the search list\n static::dontSearchIn($dir);\n\n // add it to the end of the new list\n $searchPathList[] = $dir;\n }\n\n // add the new list to the front of the path\n set_include_path(implode(PATH_SEPARATOR, $searchPathList) . PATH_SEPARATOR . get_include_path());\n }", "public function func_search() {}", "public function search();", "public function search();", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "public function run()\r\r\n\t{\r\r\n\t\t$arrPages = array();\r\r\n\t\t$strCache = md5('search_index' . session_id());\r\r\n\r\r\n\t\t// Get cache file\r\r\n\t\tif (file_exists(TL_ROOT . '/system/tmp/' . $strCache))\r\r\n\t\t{\r\r\n\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\r\r\n\t\t\tif ($objFile->mtime < time() + 3600)\r\r\n\t\t\t{\r\r\n\t\t\t\t$arrPages = deserialize($objFile->getContent());\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\r\r\n\t\t// Get all searchable pages\r\r\n\t\tif (count($arrPages) < 1)\r\r\n\t\t{\r\r\n\t\t\t$arrPages = $this->getSearchablePages();\r\r\n\r\r\n\t\t\t// HOOK: take additional pages\r\r\n\t\t\tif (array_key_exists('getSearchablePages', $GLOBALS['TL_HOOKS']) && is_array($GLOBALS['TL_HOOKS']['getSearchablePages']))\r\r\n\t\t\t{\r\r\n\t\t\t\tforeach ($GLOBALS['TL_HOOKS']['getSearchablePages'] as $callback)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->import($callback[0]);\r\r\n\t\t\t\t\t$arrPages = $this->$callback[0]->$callback[1]($arrPages);\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\t\t\t$objFile->write(serialize($arrPages));\r\r\n\t\t\t$objFile->close();\r\r\n\t\t}\r\r\n\r\r\n\t\t$intStart = $this->Input->get('start') ? $this->Input->get('start') : 0;\r\r\n\t\t$intPages = $this->Input->get('ppc') ? $this->Input->get('ppc') : 10;\r\r\n\r\r\n\t\t// Rebuild search index\r\r\n\t\tif ($intPages && count($arrPages))\r\r\n\t\t{\r\r\n\t\t\t$this->import('Search');\r\r\n\r\r\n\t\t\tif ($intStart < 1)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_search\");\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_search_index\");\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_cache\");\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '<div style=\"font-family:Verdana, sans-serif; font-size:11px; line-height:16px; margin-bottom:12px;\">';\r\r\n\r\r\n\t\t\tfor ($i=$intStart; $i<$intStart+$intPages && $i<count($arrPages); $i++)\r\r\n\t\t\t{\r\r\n\t\t\t\techo 'File <strong>' . $arrPages[$i] . '</strong> has been indexed<br />';\r\r\n\r\r\n\t\t\t\t$objRequest = new Request();\r\r\n\t\t\t\t$objRequest->send($this->Environment->base . $arrPages[$i]);\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '<div style=\"margin-top:12px;\">';\r\r\n\r\r\n\t\t\t// Redirect to the next cycle\r\r\n\t\t\tif ($i < (count($arrPages) - 1))\r\r\n\t\t\t{\r\r\n\t\t\t\t$url = $this->Environment->base . 'typolight/indexer.php?start=' . ($intStart + $intPages) . '&ppc=' . $intPages;\r\r\n\r\r\n\t\t\t\techo '<script type=\"text/javascript\">setTimeout(\\'window.location=\"' . $url . '\"\\', 1000);</script>';\r\r\n\t\t\t\techo '<a href=\"' . $url . '\">Please click here to proceed if you are not using JavaScript</a>';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t// Redirect back home\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$url = $this->Environment->base . 'typolight/main.php?do=maintenance';\r\r\n\r\r\n\t\t\t\t// Delete temporary file\r\r\n\t\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\t\t\t\t$objFile->delete();\r\r\n\t\t\t\t$objFile->close();\r\r\n\r\r\n\t\t\t\techo '<script type=\"text/javascript\">setTimeout(\\'window.location=\"' . $url . '\"\\', 1000);</script>';\r\r\n\t\t\t\techo '<a href=\"' . $url . '\">Please click here to proceed if you are not using JavaScript</a>';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '</div></div>';\r\r\n\t\t}\r\r\n\t}", "public function search($key)\n {\n return $this->root->search($key);\n }", "public function test_admin_search_keyword()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/SearchResult', 'index']);\n $this->assertResponseCode(404);\n }", "public function testRequestRootIsAndIndex() {\n\n\t\t$r1 = new Nether\\Avenue\\Router(static::$RequestData['Root']);\n\t\t$r2 = new Nether\\Avenue\\Router(static::$RequestData['Index']);\n\n\t\t(new Verify(\n\t\t\t'path / request runs as /index',\n\t\t\t$r1->GetPath()\n\t\t))->equals('/index');\n\n\t\t(new Verify(\n\t\t\t'path /index runs as /index',\n\t\t\t$r2->GetPath()\n\t\t))->equals('/index');\n\n\n\t\treturn;\n\t}", "protected function search()\n\t{\n\t\treturn Phpfox::getLib('search');\t\n\t}", "function is_search()\n {\n }", "public function searchAction()\n {\n $user_id = $this->getSecurityContext()->getUser()->getId();\n $drive = $this->_driveHelper->getRepository()->getDriveByUserId($user_id);\n\n $q = $this->getScalarParam('q');\n // $hits = $this->getResource('drive.file_indexer')->searchInDrive($q, $drive->drive_id);\n $hits = $this->getResource('drive.file_indexer')->search($q);\n\n echo '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n echo '<strong>', $hits->hitCount, '</strong> hits<br/>';\n foreach ($hits->hits as $hit) {\n $file = $this->_driveHelper->getRepository()->getFile($hit->document->file_id);\n if (empty($file)) {\n echo 'Invalid file ID: ', $hit->document->file_id;\n }\n if ($file && $this->_driveHelper->isFileReadable($file)) {\n echo '<div>', '<strong>', $file->name, '</strong> ', $this->view->fileSize($file->size), '</div>';\n }\n }\n exit;\n }", "public function search()\n\t{\n\t\t\n\t}", "public function testMediaFilesSearchGet()\n {\n $client = static::createClient();\n\n $path = '/media/files/search';\n\n $crawler = $client->request('GET', $path);\n }", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "function includedByAdminScript() {\n global $path_to_root_dir;\n if((eregi('index\\.php', $_SERVER['SCRIPT_NAME']) and $path_to_root_dir == \"..\")\n or(eregi('edit\\.php', $_SERVER['SCRIPT_NAME']))) \n return true;\n else {\n return false;\n }\n}", "public function getTestDirectory();", "private function includeAll( $path, $search ){\n\n \tforeach ( glob( $path . $search ) as $file ) {\n\t\t \n\t\t \tinclude_once $file;\n\n\t\t \t$fileParts = pathinfo($file);\n\n\t\t \t$fileFolder = $fileParts[\"filename\"];\n\n\t\t \tif(is_dir($path . $fileFolder) && is_readable($path . $fileFolder)){\n\n\t\t \t\tforeach ( glob( $path . $fileFolder . \"/\" . $search ) as $otherFile ) { \n\n\t\t \t\t\t\tinclude_once $otherFile;\n\t\t \t\t}\n\n\t\t \t}\n\n\t\t \n\t\t}\n }", "public function runOnDirectories(): bool;", "public static function search($dir, $file, $ext = 'php', $multiple = false, $cache = true)\n\t{\n\t\t$finder = static::forge(array($dir), trim($ext, '.'));\n\n\t\tif (($result = $finder->findCached($multiple?'all':'one', $file)) === null)\n\t\t{\n\t\t\t$result = $multiple ? $finder->findAll($file, false, false, 'file') : $finder->find($file, false, false, 'file');\n\t\t}\n\n\t\tif ($cache and $result)\n\t\t{\n\t\t\t$finder->cache($multiple?'all':'one', $file, false, $result, array($dir));\n\t\t}\n\n\t\treturn $result;\n\t}", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "public function search(){}", "abstract protected function yieldSearchPaths(): Generator;", "public function test_admin_search_keyword_b()\n {\n $this->request('GET', ['pages/SearchResult', 'index']);\n $this->assertResponseCode(404);\n }", "function startedIndexPhp() {return true; }", "public static function searchDirectory($path, $file = '')\n {\n $incpath = explode(PATH_SEPARATOR, get_include_path());\n\n for ($i = 0; $i < count($incpath); $i++)\n {\n if (is_dir($incpath[$i] . '/' . $path)) {\n set_include_path(get_include_path() . PATH_SEPARATOR . $incpath[$i] . '/' . $path. '/');\n return true;\n }\n\n // also try plurals\n if (is_dir($incpath[$i] . '/' . $path . 's/')) {\n set_include_path(get_include_path() . PATH_SEPARATOR . $incpath[$i] . '/' . $path. 's/');\n return true;\n }\n }\n\n return false;\n }", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "private function createFolderIndex(){\n //Just testing the command\n //$this->info('Starting to search the folder: '.$this->file_storage);\n $this->folders = array();\n $this->invalid_files = array();\n $this->count = 0;\n\n //Tagging all files to be able to find removed files at the end\n $SQL = \"UPDATE files SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n $SQL = \"UPDATE folders SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n\n //Checking if cache file exist, if not just create all the index on ES\n $this->checkCacheFolder();\n //Loop through the directories to get files ad folders\n $this->listFolderFiles($this->file_storage);//$_ENV['EBT_FILE_STORAGE']);\n //Check if any folder is missing from cache and try to create on ES\n $this->compareCacheFolders();\n\n //Remove files/folders that hasn't been found\n //if ($this->confirm('Do you wish to remove missing files? [y|N]')) {\n $this->removeMissingFiles();\n //}\n }", "function index($dir = '.') {\n\t\t$index = array();\n\t\tif ($handle = opendir($dir)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\tif (isAllowedFile($dir.'/'.$file)) $index[preg_replace(\"/^\\.\\//i\",\"\",$dir.'/'.$file)] = filemtime($dir.'/'.$file);\n\t\t\t\t\telseif (is_dir($dir.'/'.$file)) $index = array_merge($index, index($dir.'/'.$file));\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\treturn $index;\n\t}", "function search($expression) {\n $this->set_error('search is not implemented');\n return false;\n }", "public function action_search_internal()\n\t{\n\t\tglobal $context, $txt;\n\n\t\t// Try to get some more memory.\n\t\tdetectServer()->setMemoryLimit('128M');\n\n\t\t// Load a lot of language files.\n\t\t$language_files = array(\n\t\t\t'Help', 'ManageMail', 'ManageSettings', 'ManageBoards', 'ManagePaid', 'ManagePermissions', 'Search',\n\t\t\t'Login', 'ManageSmileys', 'Maillist', 'Mentions'\n\t\t);\n\n\t\t// All the files we need to include to search for settings\n\t\t$include_files = array();\n\n\t\t// This is a special array of functions that contain setting data\n\t\t// - we query all these to simply pull all setting bits!\n\t\t$settings_search = array(\n\t\t\tarray('settings_search', 'area=logs;sa=pruning', '\\\\ElkArte\\\\AdminController\\\\AdminLog'),\n\t\t\tarray('config_vars', 'area=corefeatures', '\\\\ElkArte\\\\AdminController\\\\CoreFeatures'),\n\t\t\tarray('basicSettings_search', 'area=featuresettings;sa=basic', '\\\\ElkArte\\\\AdminController\\\\ManageFeatures'),\n\t\t\tarray('layoutSettings_search', 'area=featuresettings;sa=layout', '\\\\ElkArte\\\\AdminController\\\\ManageFeatures'),\n\t\t\tarray('karmaSettings_search', 'area=featuresettings;sa=karma', '\\\\ElkArte\\\\AdminController\\\\ManageFeatures'),\n\t\t\tarray('likesSettings_search', 'area=featuresettings;sa=likes', '\\\\ElkArte\\\\AdminController\\\\ManageFeatures'),\n\t\t\tarray('mentionSettings_search', 'area=featuresettings;sa=mention', '\\\\ElkArte\\\\AdminController\\\\ManageFeatures'),\n\t\t\tarray('signatureSettings_search', 'area=featuresettings;sa=sig', '\\\\ElkArte\\\\AdminController\\\\ManageFeatures'),\n\t\t\tarray('settings_search', 'area=addonsettings;sa=general', '\\\\ElkArte\\\\AdminController\\\\AddonSettings'),\n\t\t\tarray('settings_search', 'area=manageattachments;sa=attachments', '\\\\ElkArte\\\\AdminController\\\\ManageAttachments'),\n\t\t\tarray('settings_search', 'area=manageattachments;sa=avatars', '\\\\ElkArte\\\\AdminController\\\\ManageAvatars'),\n\t\t\tarray('settings_search', 'area=postsettings;sa=bbc', '\\\\ElkArte\\\\AdminController\\\\ManageEditor'),\n\t\t\tarray('settings_search', 'area=manageboards;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageBoards'),\n\t\t\tarray('settings_search', 'area=languages;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageLanguages'),\n\t\t\tarray('settings_search', 'area=mailqueue;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageMail'),\n\t\t\tarray('settings_search', 'area=maillist;sa=emailsettings', '\\\\ElkArte\\\\AdminController\\\\ManageMaillist'),\n\t\t\tarray('settings_search', 'area=membergroups;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageMembergroups'),\n\t\t\tarray('settings_search', 'area=news;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageNews'),\n\t\t\tarray('settings_search', 'area=paidsubscribe;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManagePaid'),\n\t\t\tarray('settings_search', 'area=permissions;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManagePermissions'),\n\t\t\tarray('settings_search', 'area=postsettings;sa=posts', '\\\\ElkArte\\\\AdminController\\\\ManagePosts'),\n\t\t\tarray('settings_search', 'area=regcenter;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageRegistration'),\n\t\t\tarray('settings_search', 'area=managesearch;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageSearch'),\n\t\t\tarray('settings_search', 'area=sengines;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageSearchEngines'),\n\t\t\tarray('securitySettings_search', 'area=securitysettings;sa=general', '\\\\ElkArte\\\\AdminController\\\\ManageSecurity'),\n\t\t\tarray('spamSettings_search', 'area=securitysettings;sa=spam', '\\\\ElkArte\\\\AdminController\\\\ManageSecurity'),\n\t\t\tarray('moderationSettings_search', 'area=securitysettings;sa=moderation', '\\\\ElkArte\\\\AdminController\\\\ManageSecurity'),\n\t\t\tarray('generalSettings_search', 'area=serversettings;sa=general', '\\\\ElkArte\\\\AdminController\\\\ManageServer'),\n\t\t\tarray('databaseSettings_search', 'area=serversettings;sa=database', '\\\\ElkArte\\\\AdminController\\\\ManageServer'),\n\t\t\tarray('cookieSettings_search', 'area=serversettings;sa=cookie', '\\\\ElkArte\\\\AdminController\\\\ManageServer'),\n\t\t\tarray('cacheSettings_search', 'area=serversettings;sa=cache', '\\\\ElkArte\\\\AdminController\\\\ManageServer'),\n\t\t\tarray('balancingSettings_search', 'area=serversettings;sa=loads', '\\\\ElkArte\\\\AdminController\\\\ManageServer'),\n\t\t\tarray('settings_search', 'area=smileys;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageSmileys'),\n\t\t\tarray('settings_search', 'area=postsettings;sa=topics', '\\\\ElkArte\\\\AdminController\\\\ManageTopics'),\n\t\t);\n\n\t\t// Allow integration to add settings to search\n\t\tcall_integration_hook('integrate_admin_search', array(&$language_files, &$include_files, &$settings_search));\n\n\t\t// Allow active modules to add settings for internal search\n\t\t$this->_events->trigger('search', array('language_files' => &$language_files, 'include_files' => &$include_files, 'settings_search' => &$settings_search));\n\n\t\t// Go through all the search data trying to find this text!\n\t\t$search_term = strtolower(un_htmlspecialchars($context['search_term']));\n\t\t$search = new AdminSettingsSearch($language_files, $include_files, $settings_search);\n\t\t$search->initSearch($context['admin_menu_name'], array(\n\t\t\tarray('COPPA', 'area=regcenter;sa=settings'),\n\t\t\tarray('CAPTCHA', 'area=securitysettings;sa=spam'),\n\t\t));\n\n\t\t$context['page_title'] = $txt['admin_search_results'];\n\t\t$context['search_results'] = $search->doSearch($search_term);\n\t}", "public function searchDir($dir) {\r\n\t\t$pages = array();\r\n\t\t// array to hold directories to recurse into\r\n\t\t$dirs = array();\r\n\t\t// mark this directory as seen so we don't look in it again\r\n\t\t$this->seen[realpath($dir)] = true;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tforeach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir)) as $file) {\r\n\t\t\t\tif($file->isFile() && $file->isReadable() && (!isset($this->seen[$file->getPathname()]))) {\r\n\t\t\t\t\t/*mark this as seen so we skip it if we come to it again*/\r\n\t\t\t\t\t$this->seen[$file->getPathname()] = true;\r\n\t\t\t\t\t// load the contents of the file into $text\r\n\t\t\t\t\t$text = file_get_contents($file->getPathname());\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if the search term is inside the body delimiters\r\n\t\t\t\t\tif(preg_match($this->bodyRegex, $text)) {\r\n\t\t\t\t\t\t/*construct the relative URI of the file by removing\r\n\t\t\t\t\t\tthe document root from the full path*/\r\n\t\t\t\t\t\t$uri = substr_replace($file->getPathname(), '', 0, strlen($_SERVER['DOCUMENT_ROOT']));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if the page has a title, find it\r\n\t\t\t\t\tif(preg_match('#<title>(.*?)</title>#Sis', $text, $match)) {\r\n\t\t\t\t\t\t// and add the title and URI to $pages\r\n\t\t\t\t\t\tarray_push($pages, array($uri, $match[1]));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarray_push($pages, array($uri, $uri));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception $e) {\r\n\t\t\t// There was a problem opening the directory\r\n\t\t}\r\n\t\t\r\n\t\treturn $pages;\r\n\t}", "public function crawl() {\n\t\t$sDirectories = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\tif ( $sDirectories === '' ) return $sDirectories;\n\n\t\t$aDirectories = explode( ',', $sDirectories );\n\t\tforeach ( $aDirectories as $sDirectory ) {\n\t\t\t$sDir = trim ( $sDirectory );\n\t\t\tif( !is_dir( $sDir ) ) continue;\n\t\t\t$this->readInFiles( $sDir );\n\t\t}\n\t\treturn $this->aFiles;\n\t}", "public function test_default_search_dir_is_config()\n {\n $reader = new Bootphp_Config_File_Reader;\n\n $this->assertAttributeSame('config', '_directory', $reader);\n }", "public function testIndex()\n {\n $this->getBrowser()->\n getAndCheck('partenaire', 'index', '/partenaire/index', 404)\n ;\n }", "function swpf_plugin_search($path) {\n\n\t$swpf_plugins = array();\n\n\t$dir = opendir ($path);\n\n\twhile ($file = readdir ($dir))\n\t{\n\t\tif (($file == \".\") or ($file == \"..\"))\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (filetype (\"$path/$file\") == \"dir\")\n\t\t{\n\t\t\t$swpf_file = \"$path/$file/swpf.php\";\n\n\t\t\tif (is_file($swpf_file)) {\n\t\t\t\trequire($swpf_file);\n\t\t\t\tif ($options) $swpf_plugins[] = $options;\n\t\t\t}\n\t\t}\n\n\t} //End of while\n\n\tclosedir($dir);\n\n\treturn $swpf_plugins;\n\n}", "abstract public function directoryLocation();", "function testPackageIndex() {\n\t\t$result = $this->ApiPackage->getPackageIndex();\n\n\t\t$this->assertFalse(isset($result[0]['ApiClass']), 'ApiClass has snuck in, big queries are happening %s');\n\t\t$this->assertTrue(isset($result[0]['children']), 'No children, might not be a tree %s');\n\t}", "public function executeIndex ()\n {\n// $loader->load();\n $tree = array();\n /*$added_tests = array();\n foreach ($this->_getTests($loader->suite()) as $test) {\n $reflection = new ReflectionClass($test);\n $test = $reflection->getFileName();\n $test = substr($test, strpos($test, 'phpunit/') + 8, strlen($test));\n $path = dirname($reflection->getFileName());\n $path = substr($path, strpos($path, 'phpunit/') + 8, strlen($path));\n $path = implode('\"][\"', explode('/', $path));\n if (! in_array($test, $added_tests)) {\n eval(\"\\$tree[\\\"{$path}\\\"][] = \\$test;\");\n $added_tests[] = $test;\n }\n }*/\n $this->tree = $tree;\n \n \n $this->fixtureslist = $this->_getFixturesList();\n }", "public function testSearch()\n\t{\n\t\t$this->call('GET', '/api/posts/search');\n\t}", "public function is_search()\n {\n }", "public function getAdditionalSearchPath() {}", "public static function search()\n {\n return new DIndexSearch(get_called_class());\n }", "public static function getIndexPage() {\n chdir(ROOTDIR);\n\n //FIXME: move to Request class\n $queryString = $_SERVER['REQUEST_URI'];\n $filePath = realpath(ROOTDIR . parse_url($queryString)['path']);\n\n $res = [];\n if ($filePath && is_dir($filePath)){\n // attempt to find an index file\n// function getRendererName($rendererName) { return \"index.$rendererName\";};\n $availableRenderers = array_values(array_intersect(\n Renderer::getRenderersPriority(),\n Renderer::getRenderersNames()\n ));\n// $renderers = array_map(function($rendererName) { return \"index.$rendererName\";}, $availableRenderers);\n foreach ($availableRenderers as $rname){\n if ($indexFilePath = realpath($filePath . DIRECTORY_SEPARATOR . \"index.\" . $rname)){\n $res['renderer'] = $rname;\n $res['path'] = $indexFilePath;\n break;\n }\n }\n }\n return $res;\n }", "public function check_conditions() \n\t{\n\t\t$ok = true;\n\t\tif( !is_writable( $this->_root_path ) ) {\n\t\t\tSession::error( 'Init failed, Search index directory is not writeable. Please update configuration with a writeable directiory.', 'Multi Search' );\n\t\t\t$ok = false;\n\t\t}\n\t\tif( !class_exists(\"Zend_Search_Lucene\") ) {\n\t\t\tSession::error( 'Init failed, Zend Framework or Zend Search Lucene not installed.', 'Multi Search' );\n\t\t\t$ok = false;\n\t\t}\n\n\t\treturn $ok;\n\t}", "public function testSearch()\n {\n $manager = new Manager($this->minimal, $this->driver);\n\n // Exception handling\n $this->assertBindingFirst($manager, 'search');\n $manager->connect();\n $this->assertBindingFirst($manager, 'search');\n $manager->bind();\n\n $this->driver->getConnection()->setFailure(Connection::ERR_MALFORMED_FILTER);\n try {\n $res = $manager->search();\n $this->fail('Filter malformed, query shall fail');\n } catch (MalformedFilterException $e) {\n $this->assertRegExp('/Malformed filter/', $e->getMessage());\n }\n\n // Basic search\n $set = array(new Entry('a'), new Entry('b'), new Entry('c'));\n $this->driver->getConnection()->stackResults($set);\n $result = $manager->search();\n\n $this->assertSearchLog(\n $this->driver->getConnection()->shiftLog(),\n 'dc=example,dc=com',\n '(objectclass=*)',\n SearchInterface::SCOPE_ALL,\n null,\n $set\n );\n\n $this->assertInstanceOf('Toyota\\Component\\Ldap\\Core\\SearchResult', $result);\n\n $data = array();\n foreach ($result as $key => $value) {\n $this->assertInstanceOf('Toyota\\Component\\Ldap\\Core\\Node', $value);\n $data[$key] = $value->getAttributes();\n }\n\n $this->assertArrayHasKey('a', $data);\n $this->assertArrayHasKey('b', $data);\n $this->assertArrayHasKey('c', $data);\n $this->assertEquals(\n 3,\n count($data),\n 'The right search result got retrieved'\n );\n\n // Empty result set search\n $this->driver->getConnection()->setFailure(Connection::ERR_NO_RESULT);\n $this->driver->getConnection()->stackResults($set);\n $result = $manager->search();\n $this->assertInstanceOf(\n 'Toyota\\Component\\Ldap\\Core\\SearchResult',\n $result,\n 'Query did not fail - Exception got handled'\n );\n\n $data = array();\n foreach ($result as $key => $value) {\n $data[$key] = $value->getAttributes();\n }\n $this->assertEquals(\n 0,\n count($data),\n 'The exception got handled and the search result set has not been set in the query'\n );\n\n // Alternative parameters search\n $result = $manager->search(\n 'ou=other,dc=example,dc=com',\n '(objectclass=test)',\n false,\n array('attr1', 'attr2')\n );\n $this->assertSearchLog(\n $this->driver->getConnection()->shiftLog(),\n 'ou=other,dc=example,dc=com',\n '(objectclass=test)',\n SearchInterface::SCOPE_ONE,\n array('attr1', 'attr2'),\n $set\n );\n $this->assertInstanceOf('Toyota\\Component\\Ldap\\Core\\SearchResult', $result);\n }", "public function actionIndexFiles()\n {\n $manager = new Manager(['module' => $this->module]);\n $manager->indexAll();\n }", "function filewalk($file, $search, $counter, $webpath) {\n if (strtolower(substr($file, stripos($file, \".htm\"))) == \".htm\"\n || strtolower(substr($file, stripos($file, \".html\"))) == \".html\"\n || strtolower(substr($file, stripos($file, \".asp\"))) == \".asp\"\n || strtolower(substr($file, stripos($file, \".php\"))) == \".php\") {\n $all = file_get_contents($file);\n $body = substr($all, stripos($all,\"<body\"),stripos($all,\"</body>\") - stripos($all,\"<body\"));\n $body = preg_replace('/<br \\/>/i', ' ', $body);\n $body = preg_replace('/<br>/i', ' ', $body);\n $body = compress($body,\"<noscript\",\"</noscript>\");\n $body = compress($body,\"<script\",\"</script>\");\n $body = compress($body,\"<iframe\",\"</iframe>\");\n $body = compress($body,\"<noframe\",\"</noframe>\");\n $body = strip_tags($body);\n $body = html_entity_decode($body, ENT_QUOTES);\n $body = preg_replace('/\\s+/', ' ', $body);\n // Scans and displays the results\n if (stripos($body, $search)) {\n $title = substr($all, stripos($all,\"<title>\") + 7,stripos($all,\"</title>\") - stripos($all,\"<title>\") - 7);\n $title = html_entity_decode($title, ENT_QUOTES);\n $title = preg_replace('/\\s+/', ' ', $title); \n echo '<p><a style=\"color:#202073;\" href=\"' . $file . '\">' . $title . '</a></br>';\n echo '<span id=\"webpath\">' . $webpath . substr($file, stripos($file, \"/\")) . '</span><br />';\n // echo textpart($body, $search) .. '</p>';\n $counter = $counter + 1;\n }\n }\n return $counter;\n}", "function grep($path, $pattern, &$results)\n{\n // find all files in the path (incl folders)\n $items = glob($path . '/*'); // */\n\n for ($i = 0; $i < count($items); $i++)\n {\n if (is_dir($items[$i]))\n {\n $add = glob($items[$i] . '/*'); // */\n $items = array_merge($items, $add);\n }\n }\n\n // search through the files.\n $results = array();\n foreach($items as $f)\n {\n if (filetype($f) == 'file')\n {\n if (preg_match($pattern, file_get_contents($f), $matches))\n $results = array_merge($results, $matches);\n }\n }\n\n return (count($results) > 0);\n}", "function getsearch($site,$n,$from,$auth) {\n $this->auth=$auth;\n $this->sitenumber=$site;\n $this->n=$n;\n $this->home=getenv(\"DOCUMENT_ROOT\");\n $this->from=$from;\n $this->path=substr($this->from,1,4);\n if ($this->sitenumber==1) {$this->path='';}\n if ($this->sitenumber==2) {$this->path='eng/';}\n if ($this->sitenumber==3) {$this->path='cons/';}\n if ($this->sitenumber==4) {$this->path='cons/eng/';}\n }", "public function findFirstWebFolder() {}", "function search_index_search($search_for, $type, $user, $page = 1, $per_page = 30) {\n \treturn call_user_func_array(array(SEARCH_ENGINE, 'search'), array($search_for, $type, $user, $page, $per_page));\n }", "function search_theme_directories($force = \\false)\n {\n }", "protected function getFilesInDirCreateTestDirectory() {}", "public function directory();", "function searchForAny($source,$search)(\n if(strpos($source,$search) !== FALSE){\n return true;\n }", "public function getSearchIndex();", "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "private function recSearchFiles($dir)\n {\n $ffs = scandir($dir);\n\n foreach ($ffs as $ff) {\n\n if ($ff != '.' && $ff != '..') {\n\n if (is_dir($dir . '/' . $ff)) {\n $this->recSearchFiles($dir . $ff . '/');\n } else if (strlen($ff) >= 5) {\n $this->searchedFiles[] = $dir . $ff;\n }\n }\n }\n }", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "public function indexCrawledDocuments() {\n\t\tforeach ( $this->aFiles as $sFile ) {\n\t\t\t$oRepoFile = new SplFileInfo( $sFile );\n\t\t\tif ( !$oRepoFile->isFile() ) continue;\n\n\t\t\t$sFileName = $oRepoFile->getFilename();\n\t\t\t$sDocType = $this->mimeDecoding( $oRepoFile->getExtension() );\n\t\t\tif ( !$this->checkDocType( $sDocType, $sFileName ) ) continue;\n\n\t\t\tif ( !$this->oMainControl->bCommandLineMode ) set_time_limit( $this->iTimeLimit );\n\n\t\t\tif ( $this->sizeExceedsMaxDocSize( $oRepoFile->getSize(), $sFileName ) ) continue;\n\n\t\t\t//Insert URL to Filename\n\t\t\t$rURL = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\t\t$sURL = BsConfig::get( 'MW::ExtendedSearch::ExternalRepoUrl' );\n\t\t\t//Replace realpath with webserver url only if $sUrl is set, otherwise work as before\n\t\t\tif($sURL == \"\"){\n\t\t\t $sRepoFileRealPath = \"file:///\" . $oRepoFile->getRealPath();\n\t\t\t}else{\n\t\t\t $sRepoFileRealPath = $this->getFilePath( $rURL, $sURL, $oRepoFile );\n\t\t\t}\n\n\t\t\t$timestampImage = wfTimestamp( TS_ISO_8601, $oRepoFile->getMTime() );\n\n\t\t\tif ( $this->checkExistence( $oRepoFile->getRealPath(), 'external', $timestampImage, $sFileName ) ) continue;\n\n\t\t\t$text = $this->getFileText( $oRepoFile->getRealPath(), $sFileName );\n\n\t\t\t$doc = $this->makeRepoDocument( $sDocType, utf8_encode( $sFileName ), $text, utf8_encode( $sRepoFileRealPath ), $timestampImage );\n\t\t\t$this->writeLog( $sFileName );\n\n\t\t\twfRunHooks( 'BSExtendedSearchBeforeAddExternalFile', array( $this, $oRepoFile, &$doc ) );\n\n\t\t\tif ( $doc ) {\n\t\t\t\t// mode and ERROR_MSG_KEY are only passed for the case when addsFile fails\n\t\t\t\t$this->oMainControl->addDocument( $doc, $this->mode, self::S_ERROR_MSG_KEY );\n\t\t\t}\n\t\t}\n\t}", "function Search()\n{\n\tglobal $txt, $settings, $context;\n\n\t// Search may be disabled if they're softly banned.\n\tsoft_ban('search');\n\n\t// Is the load average too high to allow searching just now?\n\tif (!empty($context['load_average']) && !empty($settings['loadavg_search']) && $context['load_average'] >= $settings['loadavg_search'])\n\t\tfatal_lang_error('loadavg_search_disabled', false);\n\n\tloadLanguage('Search');\n\tloadTemplate('Search');\n\n\t// Popup mode?\n\tif (AJAX)\n\t{\n\t\twetem::load('search_ajax');\n\t\treturn;\n\t}\n\n\t// Check the user's permissions.\n\tisAllowedTo('search_posts');\n\n\t// Link tree....\n\t// !!! If we've come back here because of an error, we're going to have: Site > Search > Search Results > Search in the linktree. Is this what we want?\n\tadd_linktree($txt['search'], '<URL>?action=search');\n\n\t// This is hard coded maximum string length.\n\t$context['search_string_limit'] = 100;\n\n\t$context['require_verification'] = we::$is_guest && !empty($settings['search_enable_captcha']) && empty($_SESSION['ss_vv_passed']);\n\tif ($context['require_verification'])\n\t{\n\t\tloadSource('Subs-Editor');\n\t\t$verificationOptions = array(\n\t\t\t'id' => 'search',\n\t\t);\n\t\t$context['require_verification'] = create_control_verification($verificationOptions);\n\t\t$context['visual_verification_id'] = $verificationOptions['id'];\n\t}\n\n\t// If you got back from search2 by using the linktree, you get your original search parameters back.\n\tif (isset($_REQUEST['params']))\n\t{\n\t\t// Due to IE's 2083 character limit, we have to compress long search strings\n\t\t$temp_params = base64_decode(str_replace(array('-', '_', '.'), array('+', '/', '='), $_REQUEST['params']));\n\t\t// Test for gzuncompress failing\n\t\t$temp_params2 = @gzuncompress($temp_params);\n\t\t$temp_params = explode('|\"|', !empty($temp_params2) ? $temp_params2 : $temp_params);\n\n\t\t$context['search_params'] = array();\n\t\tforeach ($temp_params as $i => $data)\n\t\t{\n\t\t\t@list ($k, $v) = explode('|\\'|', $data);\n\t\t\t$context['search_params'][$k] = $v;\n\t\t}\n\t\tif (!empty($context['search_params']['brd']))\n\t\t\tloadSource('Search2');\n\t\t$context['search_params']['brd'] = empty($context['search_params']['brd']) ? array() : wedge_ranged_explode(',', $context['search_params']['brd']);\n\t}\n\n\tif (isset($_REQUEST['search']))\n\t\t$context['search_params']['search'] = un_htmlspecialchars($_REQUEST['search']);\n\n\tif (isset($context['search_params']['search']))\n\t\t$context['search_params']['search'] = westr::htmlspecialchars($context['search_params']['search']);\n\tif (isset($context['search_params']['userspec']))\n\t\t$context['search_params']['userspec'] = htmlspecialchars($context['search_params']['userspec']);\n\tif (!empty($context['search_params']['searchtype']))\n\t\t$context['search_params']['searchtype'] = 2;\n\tif (!empty($context['search_params']['minage']))\n\t\t$context['search_params']['minage'] = (int) $context['search_params']['minage'];\n\tif (!empty($context['search_params']['maxage']))\n\t\t$context['search_params']['maxage'] = (int) $context['search_params']['maxage'];\n\n\t$context['search_params']['show_complete'] = !empty($context['search_params']['show_complete']);\n\t$context['search_params']['subject_only'] = !empty($context['search_params']['subject_only']);\n\n\t// Load the error text strings if there were errors in the search.\n\tif (!empty($context['search_errors']))\n\t{\n\t\tloadLanguage('Errors');\n\t\t$context['search_errors']['messages'] = array();\n\t\tforeach ($context['search_errors'] as $search_error => $dummy)\n\t\t{\n\t\t\tif ($search_error === 'messages')\n\t\t\t\tcontinue;\n\n\t\t\t$context['search_errors']['messages'][] = $txt['error_' . $search_error];\n\t\t}\n\t}\n\n\t// Find all the boards this user is allowed to see.\n\t$request = wesql::query('\n\t\tSELECT b.id_cat, c.name AS cat_name, b.id_board, b.name, b.child_level\n\t\tFROM {db_prefix}boards AS b\n\t\t\tLEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)\n\t\tWHERE {query_see_board}\n\t\t\tAND redirect = {string:empty_string}\n\t\tORDER BY b.board_order',\n\t\tarray(\n\t\t\t'empty_string' => '',\n\t\t)\n\t);\n\t$context['num_boards'] = wesql::num_rows($request);\n\t$context['boards_check_all'] = true;\n\t$context['categories'] = array();\n\twhile ($row = wesql::fetch_assoc($request))\n\t{\n\t\t// This category hasn't been set up yet...\n\t\tif (!isset($context['categories'][$row['id_cat']]))\n\t\t\t$context['categories'][$row['id_cat']] = array(\n\t\t\t\t'id' => $row['id_cat'],\n\t\t\t\t'name' => $row['cat_name'],\n\t\t\t\t'boards' => array()\n\t\t\t);\n\n\t\t// Set this board up, and let the template know when it's a child, so it can indent them.\n\t\t$context['categories'][$row['id_cat']]['boards'][$row['id_board']] = array(\n\t\t\t'id' => $row['id_board'],\n\t\t\t'name' => $row['name'],\n\t\t\t'child_level' => $row['child_level'],\n\t\t\t'selected' => (empty($context['search_params']['brd']) && (empty($settings['recycle_enable']) || $row['id_board'] != $settings['recycle_board']) && !in_array($row['id_board'], we::$user['ignoreboards'])) || (!empty($context['search_params']['brd']) && in_array($row['id_board'], $context['search_params']['brd']))\n\t\t);\n\n\t\t// If a board wasn't checked that probably should have been, ensure the board selection is selected!\n\t\tif (!$context['categories'][$row['id_cat']]['boards'][$row['id_board']]['selected'] && (empty($settings['recycle_enable']) || $row['id_board'] != $settings['recycle_board']))\n\t\t\t$context['boards_check_all'] = false;\n\t}\n\twesql::free_result($request);\n\n\t// Now, let's sort the list of categories into the boards for templates that like that.\n\t$temp_boards = array();\n\tforeach ($context['categories'] as $category)\n\t{\n\t\t$temp_boards[] = array(\n\t\t\t'name' => $category['name'],\n\t\t\t'child_ids' => array_keys($category['boards'])\n\t\t);\n\t\t$temp_boards = array_merge($temp_boards, array_values($category['boards']));\n\n\t\t// Include a list of boards per category for easy toggling.\n\t\t$context['categories'][$category['id']]['child_ids'] = array_keys($category['boards']);\n\t}\n\n\t$max_boards = ceil(count($temp_boards) / 2);\n\tif ($max_boards == 1)\n\t\t$max_boards = 2;\n\n\t// Now, alternate them so they can be shown left and right ;).\n\t$context['board_columns'] = array();\n\tfor ($i = 0; $i < $max_boards; $i++)\n\t{\n\t\t$context['board_columns'][] = $temp_boards[$i];\n\t\tif (isset($temp_boards[$i + $max_boards]))\n\t\t\t$context['board_columns'][] = $temp_boards[$i + $max_boards];\n\t\telse\n\t\t\t$context['board_columns'][] = array();\n\t}\n\n\tif (!empty($_REQUEST['topic']))\n\t{\n\t\t$context['search_params']['topic'] = (int) $_REQUEST['topic'];\n\t\t$context['search_params']['show_complete'] = true;\n\t}\n\tif (!empty($context['search_params']['topic']))\n\t{\n\t\t$context['search_params']['topic'] = (int) $context['search_params']['topic'];\n\n\t\t$context['search_topic'] = array(\n\t\t\t'id' => $context['search_params']['topic'],\n\t\t\t'href' => '<URL>?topic=' . $context['search_params']['topic'] . '.0',\n\t\t);\n\n\t\t$request = wesql::query('\n\t\t\tSELECT ms.subject\n\t\t\tFROM {db_prefix}topics AS t\n\t\t\t\tINNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)\n\t\t\t\tINNER JOIN {db_prefix}messages AS ms ON (ms.id_msg = t.id_first_msg)\n\t\t\tWHERE t.id_topic = {int:search_topic_id}\n\t\t\t\tAND {query_see_board}\n\t\t\t\tAND {query_see_topic}\n\t\t\tLIMIT 1',\n\t\t\tarray(\n\t\t\t\t'search_topic_id' => $context['search_params']['topic'],\n\t\t\t)\n\t\t);\n\n\t\tif (wesql::num_rows($request) == 0)\n\t\t\tfatal_lang_error('topic_gone', false);\n\n\t\tlist ($context['search_topic']['subject']) = wesql::fetch_row($request);\n\t\twesql::free_result($request);\n\n\t\t$context['search_topic']['link'] = '<a href=\"' . $context['search_topic']['href'] . '\">' . $context['search_topic']['subject'] . '</a>';\n\t}\n\n\t$context['page_title'] = $txt['search'];\n}", "function getSearchResults($mediaSourcePath, $relPath, $query, $recurse)\n{\n\t$relPath = normalisePath($relPath);\n\t$path = $mediaSourcePath.\"/\".$relPath.\"/\";\n\n\tif(!is_dir($path))\n\t{\t\n\t\treportError(\"path is not a directory: \".$path, 400);\n\t\treturn false;\n\t}\n\t\n\t$fileResults = array();\n\t$dirResults = array();\n\t\n\t$dirHandle = opendir($path);\n\t\n\t//loop through all \"files\" in the dir\n\twhile($dirHandle && ($FSObj = readdir($dirHandle)) !== false)\n\t{\n\t\t$filepath = $path.$FSObj;\n\t\t\n\t\t//handle directories in current dir\n\t\tif(is_dir($filepath) && $FSObj != \".\" && $FSObj != \"..\") \n\t\t{\n\t\t\tif($recurse)// recurse into subdirs\n\t\t\t{\n\t\t\t\t$subResults = getSearchResults($mediaSourcePath, $relPath.\"/\".$FSObj, $query, $recurse); // do subdir search\n\t\t\t\t\n\t\t\t\t// merge sub-file and sub-directory results into our local results array\n\t\t\t\t$dirResults = array_merge($dirResults, $subResults[\"dirs\"]);\n\t\t\t\t$fileResults = array_merge($fileResults, $subResults[\"files\"]);\n\t\t\t}\n\t\t\t// after recursing, check the dir name for match against query\n\t\t\tif(stristr($FSObj, $query) !== false)\n\t\t\t{\n\t\t\t\t//add it to results if it matched\n\t\t\t\t$dirResults[] = array( \n\t\t\t\t\t\"path\"\t=> $relPath,\n\t\t\t\t\t\"name\"\t=> $FSObj,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t//handle files in current dir\n\t\telseif(is_file($filepath)) \n\t\t{\t//match filename against query\n\t\t\tif(stristr($FSObj, $query) !== false)\n\t\t\t{\n\t\t\t\t//add to result set\n\t\t\t\t$fileResults[] = array(\n\t\t\t\t\t\"path\" \t=> $relPath,\n\t\t\t\t\t\"fileObject\" => getFileObject($filepath),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t$dirHandle && closedir($dirHandle);\t\n\treturn array(\"dirs\" => $dirResults, \"files\" => $fileResults);\n}", "function testFindSearchcontentSco() {\n\t}", "function run_search_maintain($fromIndexer = false) {\r\n\tif(SERIA_COMPATIBILITY >= 3) return;\r\n\ttry\r\n\t{\r\n\t\tif(start_maintain(\"search_maintain\", SERIA_INSTALL||SERIA_DEBUG?1:60))\r\n\t\t{\r\n\t\t\tinclude_once(dirname(__FILE__).\"/maintain/search_maintain.php\");\r\n\t\t\tSERIA_Base::debug(\"Search maintain: \".search_maintain($fromIndexer));\r\n\t\t\tstop_maintain(\"search_maintain\");\r\n\t\t}\r\n\t}\r\n\tcatch (Exception $e)\r\n\t{\r\n\t\tSERIA_Base::debug(\"Error: \".$e->getMessage());\r\n\t\tstop_maintain(\"search_maintain\");\r\n\t\tthrow $e;\r\n\t}\r\n}", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "public function getDefaultIndexDirectoryPath();" ]
[ "0.7856435", "0.7526942", "0.6122159", "0.61114746", "0.60262454", "0.59891254", "0.58569324", "0.5847987", "0.582122", "0.58177185", "0.58087236", "0.5745908", "0.57202494", "0.5702491", "0.5669456", "0.5634786", "0.56143713", "0.5592482", "0.55711865", "0.5551054", "0.5540601", "0.54777735", "0.54679066", "0.5465722", "0.54523486", "0.54522336", "0.545068", "0.5450039", "0.5450039", "0.5443696", "0.54075855", "0.5386398", "0.5386398", "0.5378917", "0.536304", "0.5356087", "0.5339754", "0.5329766", "0.5324381", "0.5318922", "0.5314151", "0.5313711", "0.5299859", "0.5273109", "0.52721506", "0.5223148", "0.5192722", "0.5183534", "0.51781136", "0.5173183", "0.5164216", "0.5155431", "0.5126271", "0.51214105", "0.5119218", "0.5112971", "0.5112971", "0.51117325", "0.51117325", "0.51117325", "0.5111688", "0.5099847", "0.507939", "0.5072502", "0.5072207", "0.506749", "0.5060909", "0.50439084", "0.50406545", "0.50376195", "0.5031618", "0.5026476", "0.50246644", "0.50226617", "0.5001214", "0.49984446", "0.49830672", "0.49794552", "0.49729884", "0.49708146", "0.49610335", "0.49604362", "0.4955277", "0.49455458", "0.49431124", "0.4940284", "0.49364877", "0.49354556", "0.49334976", "0.4926271", "0.49174", "0.49167418", "0.491111", "0.49096945", "0.49060497", "0.49026063", "0.4885073", "0.48820928", "0.48756877", "0.4863771" ]
0.8318728
0
Test for Directory::search_by_name() Search file 'index.php' inside the ROOT directory
public function test_search_by_name() { $object = Directory::factory(ROOT); $res = $object->search_by_name('index.php'); $this->assertArrayHasKey(ROOT.DS.'index.php', $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "public function test_search_by_extension()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_extension(array('php'));\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function hasIndexDirectoryPath();", "function hasIndex($path, $filename)\n {\n $abs = $path.'\\\\'.$filename;\n\n if(file_exists($abs))\n {\n $info = pathinfo($abs);\n\n if (is_dir($abs)) {\n $dir = new DirectoryIterator($abs);\n foreach ($dir as $file) {\n if (!$file->isDot()) {\n $info = pathinfo($file);\n if ( strtolower($info['filename']) == 'index' && !$file->isDir()) { return true; } \n }\n }\n }\n else { if (strtolower($info['filename']) == 'index') { return true; } }\n }\n return false;\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "public function testFind()\n {\n $stack = Solar::factory('Solar_Path_Stack');\n \n // now reset the include_path\n $old_path = set_include_path($this->_support_path);\n \n // use the testing directory to look for files\n $path = array(\n \"a\",\n \"b\",\n \"c\",\n );\n \n $stack->add($path[0]);\n $stack->add($path[1]);\n $stack->add($path[2]);\n \n // should find it at a\n $actual = $stack->find('target1');\n $expect = Solar_Dir::fix($path[0]) . 'target1';\n $this->assertSame($expect, $actual);\n \n // should find it at b\n $actual = $stack->find('target2');\n $expect = Solar_Dir::fix($path[1]) . 'target2';\n $this->assertSame($expect, $actual);\n \n // should find it at c\n $actual = $stack->find('target3');\n $expect = Solar_Dir::fix($path[2]) . 'target3';\n $this->assertSame($expect, $actual);\n \n // should not find it at all\n $actual = $stack->find('no_such_file');\n $this->assertFalse($actual);\n \n // put the include_path back\n set_include_path($old_path);\n }", "public function hasDefaultIndexDirectoryPath();", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "public function getIndexDirectoryPath();", "public function testFindFiles()\n {\n\n }", "public function findFiles();", "abstract public function search($files, array $includedFiles);", "public function find($file);", "function searchFolder( $current_folder, $folder_to_find, &$matches )\n{\n if ( !( $handle = opendir( $current_folder ) ) ) die( \"Cannot open $current_folder.\" );\n\n while ( $entry = readdir( $handle ) ) {\n if ( is_dir( \"$current_folder/$entry\" ) ) {\n if ( $entry != \".\" && $entry != \"..\" ) {\n\n // This entry is a valid folder\n // If it matches our folder name, add it to the list of matches\n if ( $entry == $folder_to_find ) $matches[] = \"$current_folder/$entry\";\n\n // Search this folder\n searchFolder( \"$current_folder/$entry\", $folder_to_find, $matches );\n }\n }\n }\n closedir( $handle );\n}", "function search() {}", "function includedByAdminScript() {\n global $path_to_root_dir;\n if((eregi('index\\.php', $_SERVER['SCRIPT_NAME']) and $path_to_root_dir == \"..\")\n or(eregi('edit\\.php', $_SERVER['SCRIPT_NAME']))) \n return true;\n else {\n return false;\n }\n}", "function find_file($file) {\n if($results = glob($file)) {\n if($file = array_shift($results)) {\n return $file;\n } else {\n return false;\n }\n } else {\n return false;\n }\n}", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "private function searchFile( $fileName )\r\n\t{\r\n\t\t$index = -1;\r\n\t\tfor($fileIndex = 0; $fileIndex < $this->filesCollection->size(); $fileIndex++)\r\n\t\t{\r\n\t\t\tif( strcasecmp( $fileName, $this->filesCollection->get( $fileIndex )->getName( ) ) == 0 )\r\n\t\t\t{\r\n\t\t\t\t$index = $fileIndex;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $index;\r\n\t}", "static public function searchFirst($dirList)\n {\n if (!is_array($dirList))\n {\n $dirList = array($dirList);\n }\n\n // this is what we'll be adding to the search path when we're done\n $searchPathList = array();\n\n // iterate through the list of folders\n foreach ($dirList as $dir)\n {\n // get the absolute path\n $dir = realpath($dir);\n\n // remove the folder if it is already in the search list\n static::dontSearchIn($dir);\n\n // add it to the end of the new list\n $searchPathList[] = $dir;\n }\n\n // add the new list to the front of the path\n set_include_path(implode(PATH_SEPARATOR, $searchPathList) . PATH_SEPARATOR . get_include_path());\n }", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "protected function getSearchPaths() {}", "public static function find($file) {\n foreach(self::$directories as $path) {\n if(file_exists($path . $file . '.php')) {\n return $path . $file . '.php';\n }\n }\n\n return false;\n }", "public function test_admin_search_keyword()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/SearchResult', 'index']);\n $this->assertResponseCode(404);\n }", "function startedIndexPhp() {return true; }", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "function swpf_plugin_search($path) {\n\n\t$swpf_plugins = array();\n\n\t$dir = opendir ($path);\n\n\twhile ($file = readdir ($dir))\n\t{\n\t\tif (($file == \".\") or ($file == \"..\"))\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (filetype (\"$path/$file\") == \"dir\")\n\t\t{\n\t\t\t$swpf_file = \"$path/$file/swpf.php\";\n\n\t\t\tif (is_file($swpf_file)) {\n\t\t\t\trequire($swpf_file);\n\t\t\t\tif ($options) $swpf_plugins[] = $options;\n\t\t\t}\n\t\t}\n\n\t} //End of while\n\n\tclosedir($dir);\n\n\treturn $swpf_plugins;\n\n}", "function index($dir = '.') {\n\t\t$index = array();\n\t\tif ($handle = opendir($dir)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\tif (isAllowedFile($dir.'/'.$file)) $index[preg_replace(\"/^\\.\\//i\",\"\",$dir.'/'.$file)] = filemtime($dir.'/'.$file);\n\t\t\t\t\telseif (is_dir($dir.'/'.$file)) $index = array_merge($index, index($dir.'/'.$file));\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\treturn $index;\n\t}", "public function testRequestRootIsAndIndex() {\n\n\t\t$r1 = new Nether\\Avenue\\Router(static::$RequestData['Root']);\n\t\t$r2 = new Nether\\Avenue\\Router(static::$RequestData['Index']);\n\n\t\t(new Verify(\n\t\t\t'path / request runs as /index',\n\t\t\t$r1->GetPath()\n\t\t))->equals('/index');\n\n\t\t(new Verify(\n\t\t\t'path /index runs as /index',\n\t\t\t$r2->GetPath()\n\t\t))->equals('/index');\n\n\n\t\treturn;\n\t}", "private static function search()\r\n\t{\r\n\t\t$dir = 'plugins';\r\n\t\t// search for plugin modules in the plugins directory\t\t \r\n\t\t$modules = model_Utils_ModuleHelper::searchDirectoryForModules($dir);\r\n\t\tforeach ($modules as $module)\r\n\t\t{\r\n\t\t\t// save found module paths to the db so we can auto-load them in the future\r\n\t\t\tmodel_Utils_ModuleHelper::saveModule($module);\r\n\t\t\t// add matching paths to Kohana's module paths\t\t\r\n\t\t\tmodel_Utils_ModuleHelper::addModulePath($module);\r\n\t\t}\r\n\t\treturn Model_Admin_EventsAdmin::searchForListeners($dir,'Interface_iPCPPlugin');\t\r\n\t}", "function search()\n\t{}", "function search()\n\t{}", "public function testIndexAssetSearchByName()\n {\n // 1. Mock data\n $admin = $this->admin;\n // 2. Hit Api Endpoint\n $response = $this->actingAs($admin)->get(route('asset.index', ['name' => 'zoom']));\n // 3. Verify and Assertion\n $response->assertStatus(Response::HTTP_OK);\n }", "public function runOnDirectories(): bool;", "public function findFirstWebFolder() {}", "public function searchAction()\n {\n $user_id = $this->getSecurityContext()->getUser()->getId();\n $drive = $this->_driveHelper->getRepository()->getDriveByUserId($user_id);\n\n $q = $this->getScalarParam('q');\n // $hits = $this->getResource('drive.file_indexer')->searchInDrive($q, $drive->drive_id);\n $hits = $this->getResource('drive.file_indexer')->search($q);\n\n echo '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n echo '<strong>', $hits->hitCount, '</strong> hits<br/>';\n foreach ($hits->hits as $hit) {\n $file = $this->_driveHelper->getRepository()->getFile($hit->document->file_id);\n if (empty($file)) {\n echo 'Invalid file ID: ', $hit->document->file_id;\n }\n if ($file && $this->_driveHelper->isFileReadable($file)) {\n echo '<div>', '<strong>', $file->name, '</strong> ', $this->view->fileSize($file->size), '</div>';\n }\n }\n exit;\n }", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "public function executeIndex ()\n {\n// $loader->load();\n $tree = array();\n /*$added_tests = array();\n foreach ($this->_getTests($loader->suite()) as $test) {\n $reflection = new ReflectionClass($test);\n $test = $reflection->getFileName();\n $test = substr($test, strpos($test, 'phpunit/') + 8, strlen($test));\n $path = dirname($reflection->getFileName());\n $path = substr($path, strpos($path, 'phpunit/') + 8, strlen($path));\n $path = implode('\"][\"', explode('/', $path));\n if (! in_array($test, $added_tests)) {\n eval(\"\\$tree[\\\"{$path}\\\"][] = \\$test;\");\n $added_tests[] = $test;\n }\n }*/\n $this->tree = $tree;\n \n \n $this->fixtureslist = $this->_getFixturesList();\n }", "public static function getIndexPage() {\n chdir(ROOTDIR);\n\n //FIXME: move to Request class\n $queryString = $_SERVER['REQUEST_URI'];\n $filePath = realpath(ROOTDIR . parse_url($queryString)['path']);\n\n $res = [];\n if ($filePath && is_dir($filePath)){\n // attempt to find an index file\n// function getRendererName($rendererName) { return \"index.$rendererName\";};\n $availableRenderers = array_values(array_intersect(\n Renderer::getRenderersPriority(),\n Renderer::getRenderersNames()\n ));\n// $renderers = array_map(function($rendererName) { return \"index.$rendererName\";}, $availableRenderers);\n foreach ($availableRenderers as $rname){\n if ($indexFilePath = realpath($filePath . DIRECTORY_SEPARATOR . \"index.\" . $rname)){\n $res['renderer'] = $rname;\n $res['path'] = $indexFilePath;\n break;\n }\n }\n }\n return $res;\n }", "function filewalk($file, $search, $counter, $webpath) {\n if (strtolower(substr($file, stripos($file, \".htm\"))) == \".htm\"\n || strtolower(substr($file, stripos($file, \".html\"))) == \".html\"\n || strtolower(substr($file, stripos($file, \".asp\"))) == \".asp\"\n || strtolower(substr($file, stripos($file, \".php\"))) == \".php\") {\n $all = file_get_contents($file);\n $body = substr($all, stripos($all,\"<body\"),stripos($all,\"</body>\") - stripos($all,\"<body\"));\n $body = preg_replace('/<br \\/>/i', ' ', $body);\n $body = preg_replace('/<br>/i', ' ', $body);\n $body = compress($body,\"<noscript\",\"</noscript>\");\n $body = compress($body,\"<script\",\"</script>\");\n $body = compress($body,\"<iframe\",\"</iframe>\");\n $body = compress($body,\"<noframe\",\"</noframe>\");\n $body = strip_tags($body);\n $body = html_entity_decode($body, ENT_QUOTES);\n $body = preg_replace('/\\s+/', ' ', $body);\n // Scans and displays the results\n if (stripos($body, $search)) {\n $title = substr($all, stripos($all,\"<title>\") + 7,stripos($all,\"</title>\") - stripos($all,\"<title>\") - 7);\n $title = html_entity_decode($title, ENT_QUOTES);\n $title = preg_replace('/\\s+/', ' ', $title); \n echo '<p><a style=\"color:#202073;\" href=\"' . $file . '\">' . $title . '</a></br>';\n echo '<span id=\"webpath\">' . $webpath . substr($file, stripos($file, \"/\")) . '</span><br />';\n // echo textpart($body, $search) .. '</p>';\n $counter = $counter + 1;\n }\n }\n return $counter;\n}", "public function resolve ($file, $exactMatch = false)\n {\n foreach ($this->languages as $lang)\n {\n $filename = \"$lang/$file\";\n\n // if $file is a directory, we try find an index file inside\n if (!$exactMatch && $this->directoryExists ($filename) && $this->fileExists ($filename.'/index'))\n return $filename.'/index';\n\n // if $file is a file we've got what we were searching for !\n else if ($this->fileExists ($filename))\n return $filename;\n }\n\n // If we want an exact match there is no need to continue\n if ($exactMatch)\n return null;\n\n // if we reached the documentation root dir it means that there is no documentation\n if (in_array (dirname ($file), array('.','/')) && basename ($file) == 'index')\n return null;\n\n // if we are here we didn't find a file in the current directory, let's go up !\n return $this->resolve (dirname ($this->getParentDirectory ($file)).'/index');\n }", "public function func_search() {}", "private function _htmlDir($path = '') {\n\t\tif (!$path) $path = g($this->conf, 'type');\n\t\t\n\t\t$rpath = $this->_path($path);\n\t\tif (!file_exists($rpath) || !is_dir($rpath)) return '';\n\t\t\n\t\t//AUUTO CREATE [index.html]\n\t\t$findex = $this->_sanitize($rpath.'/index.html');\n\t\tif (!file_exists($findex)) {\n\t\t\t$hnd = fopen($findex, 'w');\n\t\t\tfwrite($hnd, 'No direct access allowed');\n\t\t\tfclose($hnd);\n\t\t}\t\n\t\t\n\t\t$html = '<ul>';\n\t\t\n\t\t$hnd = opendir($rpath);\n\t\twhile ($read = readdir($hnd)) {\n\t\t\tif ($read == '.' || $read == '..') continue;\n\t\t\t\n\t\t\t$mypath = $this->_sanitize($path.'/'.$read);\n\t\t\t\n\t\t\tif (!is_dir($this->_path($mypath))) {\n\t\t\t\t\n\t\t\t\t//AUTO REMOVE UN-EXPECTED FILES\n\t\t\t\t$ext = pathinfo($mypath, PATHINFO_EXTENSION);\n\t\t\t\tif (!in_array(strtolower($ext), (array) g($this->conf, 'ext')) && $read != 'index.html') {\n\t\t\t\t\t$this->quarantine($this->_path($mypath));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//try searching for match (file type)\n\t\t\t\tif ($this->is_search && $this->_match($this->is_search, $read)) {\n\t\t\t\t\tarray_push($this->founds, [\n\t\t\t\t\t\t\t\t'type' => 'file',\n\t\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t\t'name' => $read\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//try searching for match (folder type)\n\t\t\tif ($this->is_search && $this->_match($this->is_search, $read)) {\n\t\t\t\tarray_push($this->founds, [\n\t\t\t\t\t\t\t'type' => 'folder',\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => $read\n\t\t\t\t\t\t\t]);\n\t\t\t}\n\t\t\t\n\t\t\t$spath = g($this->conf, 'path'); //original path (by request)\n\t\t\t\n\t\t\t$html .= '<li '.((substr($spath.'/', 0, strlen($mypath.'/')) == $mypath.'/') ? 'class=\"active\"' : '').'>\n\t\t\t\t\t\t<a href=\"'.$this->_url(array('path' => $mypath)).'\">'.htmlspecialchars(strtolower($read)).'</a>';\n\t\t\t\n\t\t\t$html .= $this->_htmlDir($mypath);\n\t\t\t$html .= '</li>';\n\t\t}\n\t\tclosedir($hnd);\n\t\t\n\t\t$html .= '</ul>';\n\t\t\n\t\treturn (string) $html;\n\t}", "function grep($path, $pattern, &$results)\n{\n // find all files in the path (incl folders)\n $items = glob($path . '/*'); // */\n\n for ($i = 0; $i < count($items); $i++)\n {\n if (is_dir($items[$i]))\n {\n $add = glob($items[$i] . '/*'); // */\n $items = array_merge($items, $add);\n }\n }\n\n // search through the files.\n $results = array();\n foreach($items as $f)\n {\n if (filetype($f) == 'file')\n {\n if (preg_match($pattern, file_get_contents($f), $matches))\n $results = array_merge($results, $matches);\n }\n }\n\n return (count($results) > 0);\n}", "public static function find($file) {\n\t\tforeach(static::$directories as $path) {\n\t\t\tif(is_readable($path . $file . '.php')) {\n\t\t\t\treturn $path . $file . '.php';\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function search($key)\n {\n return $this->root->search($key);\n }", "public function actionIndexFiles()\n {\n $manager = new Manager(['module' => $this->module]);\n $manager->indexAll();\n }", "public function getTestDirectory();", "public function searchDir($dir) {\r\n\t\t$pages = array();\r\n\t\t// array to hold directories to recurse into\r\n\t\t$dirs = array();\r\n\t\t// mark this directory as seen so we don't look in it again\r\n\t\t$this->seen[realpath($dir)] = true;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tforeach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir)) as $file) {\r\n\t\t\t\tif($file->isFile() && $file->isReadable() && (!isset($this->seen[$file->getPathname()]))) {\r\n\t\t\t\t\t/*mark this as seen so we skip it if we come to it again*/\r\n\t\t\t\t\t$this->seen[$file->getPathname()] = true;\r\n\t\t\t\t\t// load the contents of the file into $text\r\n\t\t\t\t\t$text = file_get_contents($file->getPathname());\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if the search term is inside the body delimiters\r\n\t\t\t\t\tif(preg_match($this->bodyRegex, $text)) {\r\n\t\t\t\t\t\t/*construct the relative URI of the file by removing\r\n\t\t\t\t\t\tthe document root from the full path*/\r\n\t\t\t\t\t\t$uri = substr_replace($file->getPathname(), '', 0, strlen($_SERVER['DOCUMENT_ROOT']));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if the page has a title, find it\r\n\t\t\t\t\tif(preg_match('#<title>(.*?)</title>#Sis', $text, $match)) {\r\n\t\t\t\t\t\t// and add the title and URI to $pages\r\n\t\t\t\t\t\tarray_push($pages, array($uri, $match[1]));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarray_push($pages, array($uri, $uri));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception $e) {\r\n\t\t\t// There was a problem opening the directory\r\n\t\t}\r\n\t\t\r\n\t\treturn $pages;\r\n\t}", "public function search();", "public function search();", "public static function searchDirectory($path, $file = '')\n {\n $incpath = explode(PATH_SEPARATOR, get_include_path());\n\n for ($i = 0; $i < count($incpath); $i++)\n {\n if (is_dir($incpath[$i] . '/' . $path)) {\n set_include_path(get_include_path() . PATH_SEPARATOR . $incpath[$i] . '/' . $path. '/');\n return true;\n }\n\n // also try plurals\n if (is_dir($incpath[$i] . '/' . $path . 's/')) {\n set_include_path(get_include_path() . PATH_SEPARATOR . $incpath[$i] . '/' . $path. 's/');\n return true;\n }\n }\n\n return false;\n }", "public static function search($dir, $file, $ext = 'php', $multiple = false, $cache = true)\n\t{\n\t\t$finder = static::forge(array($dir), trim($ext, '.'));\n\n\t\tif (($result = $finder->findCached($multiple?'all':'one', $file)) === null)\n\t\t{\n\t\t\t$result = $multiple ? $finder->findAll($file, false, false, 'file') : $finder->find($file, false, false, 'file');\n\t\t}\n\n\t\tif ($cache and $result)\n\t\t{\n\t\t\t$finder->cache($multiple?'all':'one', $file, false, $result, array($dir));\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getSearchDir() {\r\n\t\treturn $this->searchDir;\r\n\t}", "public function test_admin_search_keyword_b()\n {\n $this->request('GET', ['pages/SearchResult', 'index']);\n $this->assertResponseCode(404);\n }", "public function testIndex()\n {\n $this->getBrowser()->\n getAndCheck('partenaire', 'index', '/partenaire/index', 404)\n ;\n }", "public function run()\r\r\n\t{\r\r\n\t\t$arrPages = array();\r\r\n\t\t$strCache = md5('search_index' . session_id());\r\r\n\r\r\n\t\t// Get cache file\r\r\n\t\tif (file_exists(TL_ROOT . '/system/tmp/' . $strCache))\r\r\n\t\t{\r\r\n\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\r\r\n\t\t\tif ($objFile->mtime < time() + 3600)\r\r\n\t\t\t{\r\r\n\t\t\t\t$arrPages = deserialize($objFile->getContent());\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\r\r\n\t\t// Get all searchable pages\r\r\n\t\tif (count($arrPages) < 1)\r\r\n\t\t{\r\r\n\t\t\t$arrPages = $this->getSearchablePages();\r\r\n\r\r\n\t\t\t// HOOK: take additional pages\r\r\n\t\t\tif (array_key_exists('getSearchablePages', $GLOBALS['TL_HOOKS']) && is_array($GLOBALS['TL_HOOKS']['getSearchablePages']))\r\r\n\t\t\t{\r\r\n\t\t\t\tforeach ($GLOBALS['TL_HOOKS']['getSearchablePages'] as $callback)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->import($callback[0]);\r\r\n\t\t\t\t\t$arrPages = $this->$callback[0]->$callback[1]($arrPages);\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\t\t\t$objFile->write(serialize($arrPages));\r\r\n\t\t\t$objFile->close();\r\r\n\t\t}\r\r\n\r\r\n\t\t$intStart = $this->Input->get('start') ? $this->Input->get('start') : 0;\r\r\n\t\t$intPages = $this->Input->get('ppc') ? $this->Input->get('ppc') : 10;\r\r\n\r\r\n\t\t// Rebuild search index\r\r\n\t\tif ($intPages && count($arrPages))\r\r\n\t\t{\r\r\n\t\t\t$this->import('Search');\r\r\n\r\r\n\t\t\tif ($intStart < 1)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_search\");\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_search_index\");\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_cache\");\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '<div style=\"font-family:Verdana, sans-serif; font-size:11px; line-height:16px; margin-bottom:12px;\">';\r\r\n\r\r\n\t\t\tfor ($i=$intStart; $i<$intStart+$intPages && $i<count($arrPages); $i++)\r\r\n\t\t\t{\r\r\n\t\t\t\techo 'File <strong>' . $arrPages[$i] . '</strong> has been indexed<br />';\r\r\n\r\r\n\t\t\t\t$objRequest = new Request();\r\r\n\t\t\t\t$objRequest->send($this->Environment->base . $arrPages[$i]);\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '<div style=\"margin-top:12px;\">';\r\r\n\r\r\n\t\t\t// Redirect to the next cycle\r\r\n\t\t\tif ($i < (count($arrPages) - 1))\r\r\n\t\t\t{\r\r\n\t\t\t\t$url = $this->Environment->base . 'typolight/indexer.php?start=' . ($intStart + $intPages) . '&ppc=' . $intPages;\r\r\n\r\r\n\t\t\t\techo '<script type=\"text/javascript\">setTimeout(\\'window.location=\"' . $url . '\"\\', 1000);</script>';\r\r\n\t\t\t\techo '<a href=\"' . $url . '\">Please click here to proceed if you are not using JavaScript</a>';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t// Redirect back home\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$url = $this->Environment->base . 'typolight/main.php?do=maintenance';\r\r\n\r\r\n\t\t\t\t// Delete temporary file\r\r\n\t\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\t\t\t\t$objFile->delete();\r\r\n\t\t\t\t$objFile->close();\r\r\n\r\r\n\t\t\t\techo '<script type=\"text/javascript\">setTimeout(\\'window.location=\"' . $url . '\"\\', 1000);</script>';\r\r\n\t\t\t\techo '<a href=\"' . $url . '\">Please click here to proceed if you are not using JavaScript</a>';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '</div></div>';\r\r\n\t\t}\r\r\n\t}", "function on_page($page,$partial_match = false) {\n if(!is_array($page)) {\n $page = array($page);\n }\n $current_page = substr($_SERVER['SCRIPT_FILENAME'],\n strpos($_SERVER['SCRIPT_FILENAME'], PMDROOT) + strlen(PMDROOT)\n );\n foreach($page AS $name) {\n if($partial_match) {\n if(strstr($current_page,$name)) {\n return true;\n }\n } elseif(ltrim($name,'/') == ltrim($current_page,'/')) {\n return true;\n }\n }\n return false;\n}", "public static function find($name);", "public static function find($name);", "public function esiste($file){\n\t\tif($file[0]!=='/') $file='/'.$file;\n\t\tif(file_exists($_SERVER['DOCUMENT_ROOT'].$file)){\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function addIndexPhp ($sCurrentFolder = null) {\n $iCount = 0;\n if ($sCurrentFolder === null) {\n $sCurrentFolder = $this->getPath('staging').'/__plugin';\n }\n if (!file_exists($sCurrentFolder.'/index.php')) {\n $iCount ++;\n MLHelper::getFilesystemInstance()->write(\n $sCurrentFolder.'/index.php', \n \"<?php\\n\" .\n \"header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\\n\".\n \"header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');\\n\" .\n \"header('Cache-Control: no-store, no-cache, must-revalidate');\\n\" .\n \"header('Cache-Control: post-check=0, pre-check=0', false);\\n\" .\n \"header('Pragma: no-cache');\\n\" .\n \"header('Location: ../');\\n\" .\n \"exit;\\n\"\n );\n }\n foreach (MLFilesystem::gi()->glob($sCurrentFolder.'/*', GLOB_ONLYDIR) as $sSubFolder) {\n $iCount += $this->addIndexPhp($sSubFolder);\n }\n return $iCount;\n }", "public function getDefaultIndexDirectoryPath();", "public function testSearchMods()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "function findWebloc($path) {\n\t$retval = false;\n\n\t$dir = opendir($path);\n\tif ($dir === FALSE) {\n\t\tdie('Unable to opendir(): ' . htmlspecialchars($path) . \"\\n\");\n\t}\n\twhile (false !== ($name = readdir($dir))) {\n\n\t\t# Skip junk\n\t\tif (isJunk($name)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t# We only care about *.webloc files\n\t\tif (!preg_match('/\\.webloc$/', $name)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t# The file must be readable to be useful\n\t\t$file = $path . '/' . $name;\n\t\tif (is_readable($file)) {\n\t\t\t$retval = $file;\n\t\t\tlast;\n\t\t}\n\t}\n\tclosedir($dir);\n\n\treturn $retval;\n}", "public function find($name)\n {\n if (isset($this->fileNames[$name])) {\n return $this->fileNames[$name];\n }\n\n $result = self::hasNamespace($name = trim($name))\n ? $this->findInNamespace($name)\n : $this->findInPaths($name, $this->paths);\n\n // No exceptions, so we found the file. Cache the filename and return it.\n return $this->fileNames[$name] = $result;\n }", "function is_search()\n {\n }", "public function test_default_search_dir_is_config()\n {\n $reader = new Bootphp_Config_File_Reader;\n\n $this->assertAttributeSame('config', '_directory', $reader);\n }", "function get_subj_index($data_dir) {\n $filename = SUBJ_IDX_INDEX_NAME . '.idx';\n if (is_dir($data_dir)) {\n $index_file = $data_dir . '/' . $filename;\n } else {\n $index_file = SUBJ_IDX_DEFAULT_DIR . $filename;\n }\n // create if missing\n if ( ! is_file($index_file)) {\n fclose(fopen($index_file, 'w'));\n }\n return $index_file;\n}", "public function run() {\r\n\t\t$i = 1;\r\n\t\twhile ($i < self::NBR_OF_FILES) {\r\n\t\t\t$this->explore_path[0] = $this->get_path(0, $i);\r\n\t\t\t$j = 0;\r\n\t\t\twhile ($j < self::NBR_OF_FILES) {\r\n\t\t\t\t$this->explore_path[1] = $this->get_path(1, $j);\r\n\t\t\t\t$k = 0;\r\n\t\t\t\twhile ($k < self::NBR_OF_FILES) {\r\n\t\t\t\t\t$this->explore_path[2] = $this->get_path(2, $k);\r\n\t\t\t\t\tif (is_numeric(file_get_contents(self::FULL_URL.implode(\"\", $this->explore_path).'README')[0])) {\r\n\t\t\t\t\t\techo \"flag : \".file_get_contents(self::FULL_URL.implode(\"\", $this->explore_path).'README'). \"was found at path \".self::FULL_URL.implode(\"\", $this->explore_path);\r\n\t\t\t\t\t\treturn (0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$k++;\r\n\t\t\t\t}\r\n\t\t\t\t$j++;\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\t}", "private function checkFile()\n {\n $absDir = DIRREQ.$this->dir;\n if (file_exists($absDir.$this->file.'.php')) {\n $this->page = $absDir.$this->file.'.php';\n } elseif (file_exists($absDir.'index.php')) {\n $this->page = $absDir.'index.php';\n } else {\n $this->page = DIRREQ.'views/404.php'; \n }\n }", "abstract public function directoryLocation();", "public function testReadingFiles()\n {\n $dir = __DIR__;\n $f = $this->adapter->java('java.io.File', $dir);\n $paths = $f->listFiles();\n foreach ($paths as $path) {\n self::assertFileExists((string) $path);\n }\n }", "public function testMediaFilesSearchGet()\n {\n $client = static::createClient();\n\n $path = '/media/files/search';\n\n $crawler = $client->request('GET', $path);\n }", "public function search()\n\t{\n\t\t\n\t}", "public function testMatchesFilesWithEngineOnRegistry()\n {\n $filePrefix = '/foo/Namespace/Representation/FooResource.POST.xml';\n $foundFiles = array($filePrefix . '.php', $filePrefix . '.foo');\n $engine = $this->quickMock('Asar\\Template\\Engine\\EngineInterface');\n\n $this->registry->register('foo', $engine);\n\n $assembly = $this->commonFindingTemplate(array(\n 'resourceName' => $this->resourceName,\n 'options' => array('type' => 'xml', 'method' => 'POST', 'status' => 200),\n 'foundFiles' => $foundFiles\n ));\n $this->assertEquals($engine, $assembly->getEngine());\n }", "function find_file($filename, $required = true)\n\t{\n\t\t$file_locations = array($filename);\n\t\t\n\t\t// check system folder first\n\t\t\n\t\tforeach($file_locations as $file) {\n\t\t\t$file .= '.php';\n\t\t\tif (file_exists(APP_PATH . $file))\n\t\t\t\treturn APP_PATH . $file;\n\t\t}\n\t\t\n\t\t// then check app folder\n\t\t\n\t\tforeach($file_locations as $file) {\n\t\t\t$file .= '.php';\n\t\t\tif (file_exists(SYS_PATH . $file))\n\t\t\t\treturn SYS_PATH . $file;\n\t\t}\n\t\t\n\t\tif ($required)\n\t\t\tthrow new Exception(\"File ($file) does not exist\");\n\t\treturn false;\n\t}", "public function locate();", "function dir_tree($dir,$search_string=\"0000\") {\r\n global $debug_jon,$dir_to_search;\r\n if($string_to_search==\"000\") return \"NoFile\";\r\n $path = '';\r\n $stack[] = $dir;\r\n while ($stack) {\r\n $thisdir = array_pop($stack);\r\n if ($dircont = scandir($thisdir)) {\r\n $i=0;\r\n while (isset($dircont[$i])) {\r\n if ($dircont[$i] !== '.' && $dircont[$i] !== '..') {\r\n $current_file = \"{$thisdir}/{$dircont[$i]}\";\r\n\t\t\t\t \r\n if (is_file($current_file)) {\r\n\t\t\t\t\t\t//$current_file=mb_convert_encoding($current_file,\"utf8\",\"8859-1\");\r\n\t\t\t\t\t\t$current_file= iconv( \"iso-8859-7\",\"utf-8\", $current_file );\r\n\t\t\t\t\t\t$dircont[$i]= iconv( \"iso-8859-7\",\"utf-8\", $dircont[$i] );\r\n\t\t\t\t\t if (strpos($current_file,$search_string)) {\r\n\t\t\t\t\t\t\t\techo \"<h3><a href='$current_file' target=_blank >$dircont[$i]</a></h3>\";\r\n\t\t\t\t\t\t\t\t//if($debug_jon) \r\n\t\t\t\t\t\t\t\t//echo \"<h2>smartDOWNLOADFILE ONLY<a href='../$dir_to_search/download.php?f=\". urlencode(\"$current_file\").\"' target=_blank >$dircont[$i]</a></h2>\";\r\n\t\t\t\t\t\t}\t\t\t\t \r\n $path[] = \"{$thisdir}/{$dircont[$i]}\";\r\n\t\t\t\t\t \r\n } elseif (is_dir($current_file)) {\r\n $path[] = \"{$thisdir}/{$dircont[$i]}\";\r\n $stack[] = $current_file;\r\n }\r\n }\r\n $i++;\r\n }\r\n }\r\n }\r\n return $path;\r\n}", "function find($dir, $pattern){\n // escape any character in a string that might be used to trick\n // a shell command into executing arbitrary commands\n $dir = escapeshellcmd($dir);\n // get a list of all matching files in the current directory\n $files = glob(\"$dir/$pattern\");\n // find a list of all directories in the current directory\n // directories beginning with a dot are also included\n foreach (glob(\"$dir/{.[^.]*,*}\", GLOB_BRACE|GLOB_ONLYDIR) as $sub_dir){\n $arr = find($sub_dir, $pattern); // resursive call\n $files = array_merge($files, $arr); // merge array with files from subdirectory\n }\n // return all found files\n return $files;\n}", "public function uses_file_indexing() {\n return true;\n }", "function _load($name, $_page=[]){\n if(strpos($name, '.php') === false)\n\t include_once(ROOT.\"/html/$name/.index.php\");\n else\n include_once(ROOT.\"/html/$name\");\n}", "function searchForAny($source,$search)(\n if(strpos($source,$search) !== FALSE){\n return true;\n }", "private function recSearchFiles($dir)\n {\n $ffs = scandir($dir);\n\n foreach ($ffs as $ff) {\n\n if ($ff != '.' && $ff != '..') {\n\n if (is_dir($dir . '/' . $ff)) {\n $this->recSearchFiles($dir . $ff . '/');\n } else if (strlen($ff) >= 5) {\n $this->searchedFiles[] = $dir . $ff;\n }\n }\n }\n }", "public function locate($file, $first = true);", "private function includeAll( $path, $search ){\n\n \tforeach ( glob( $path . $search ) as $file ) {\n\t\t \n\t\t \tinclude_once $file;\n\n\t\t \t$fileParts = pathinfo($file);\n\n\t\t \t$fileFolder = $fileParts[\"filename\"];\n\n\t\t \tif(is_dir($path . $fileFolder) && is_readable($path . $fileFolder)){\n\n\t\t \t\tforeach ( glob( $path . $fileFolder . \"/\" . $search ) as $otherFile ) { \n\n\t\t \t\t\t\tinclude_once $otherFile;\n\t\t \t\t}\n\n\t\t \t}\n\n\t\t \n\t\t}\n }", "public function testFind() {\n\t\t$this->assertEquals('3.txt', $this->_object->find()->getFilename());\n\t}", "function wsod_detect_drupal_path(&$output, $start_dir = __FILE__) {\n $drupal_path = FALSE; // set init variable\n $path_arr = wsod_pathposall(dirname($start_dir));\n $bootstrap_file = '/includes/bootstrap.inc';\n $buff_output = '';\n foreach ($path_arr as $path) {\n if (file_exists($path.$bootstrap_file)) {\n $drupal_path = $path;\n return $drupal_path;\n } else {\n $buff_output .= \"Couldn't find $path$bootstrap_file!<br>\\n\";\n }\n // FIXME: file_exists() [function.file-exists]: open_basedir restriction in effect. File(//includes/bootstrap.inc) is not within the allowed path(s)\n }\n $output .= $buff_output;\n return NULL;\n}", "function testPackageIndex() {\n\t\t$result = $this->ApiPackage->getPackageIndex();\n\n\t\t$this->assertFalse(isset($result[0]['ApiClass']), 'ApiClass has snuck in, big queries are happening %s');\n\t\t$this->assertTrue(isset($result[0]['children']), 'No children, might not be a tree %s');\n\t}" ]
[ "0.7803914", "0.74054193", "0.6096329", "0.59778947", "0.59626746", "0.5898367", "0.58588976", "0.5772092", "0.57219416", "0.56567097", "0.56024987", "0.55696607", "0.5523678", "0.55153424", "0.54849744", "0.5467967", "0.5423201", "0.5414956", "0.53814286", "0.5311357", "0.5280912", "0.5272394", "0.5249707", "0.52242994", "0.51921105", "0.5186701", "0.5185987", "0.5172958", "0.51714766", "0.5167635", "0.5087272", "0.50854886", "0.5084022", "0.50565434", "0.50532657", "0.50507236", "0.50504214", "0.50504214", "0.504479", "0.50277525", "0.5018499", "0.5007424", "0.50064117", "0.50016224", "0.49939823", "0.49845394", "0.49837652", "0.49819773", "0.49769664", "0.49735433", "0.4964994", "0.49586537", "0.49424663", "0.4924515", "0.49141452", "0.490651", "0.490651", "0.49012545", "0.48916537", "0.48867452", "0.48817155", "0.48781228", "0.48770925", "0.48706478", "0.4868394", "0.4868394", "0.48654026", "0.48638743", "0.48624426", "0.4857496", "0.48514947", "0.48514947", "0.48502338", "0.48502338", "0.48502338", "0.48489234", "0.48356178", "0.48342437", "0.4832856", "0.48288974", "0.48232678", "0.48180765", "0.48115063", "0.47978356", "0.47957173", "0.47914854", "0.47898835", "0.47881967", "0.47827002", "0.47725734", "0.47691163", "0.4766129", "0.47624817", "0.4760177", "0.4759259", "0.47519475", "0.47453842", "0.47399533", "0.47301444", "0.47291973" ]
0.8326893
0
Test for Directory::search_by_extension() Search files with 'php' extension inside the ROOT directory
public function test_search_by_extension() { $object = Directory::factory(ROOT); $res = $object->search_by_extension(array('php')); $this->assertArrayHasKey(ROOT.DS.'index.php', $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _findExtensionFiles() {\r\n\t\r\n\t\t\tif (empty($this->_extensionsPath)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\t//make sure we only get the package files in that directory\r\n\t\t\t$zipFiles = JFolder::files($this->_extensionsPath, '\\.zip$', false, false);\r\n\t\t\t$gzFiles = JFolder::files($this->_extensionsPath, '\\.gz$', false, false);\r\n\t\t\t$bz2Fies = JFolder::files($this->_extensionsPath, '\\.bz2$', false, false);\r\n\t\t\t$files = array_merge($zipFiles, $gzFiles, $bz2Fies);\r\n\t\r\n\t\t\tif (count($files) > 0) {\r\n\t\t\t\t$this->_packageFiles = $files;\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}", "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "public function getFilesInDirDoesNotFindDotfiles() {}", "public function get_test_php_extensions()\n {\n }", "public function checkExtensions()\n {\n $extensions = array(\n 'fileinfo',\n 'pdo',\n 'mbstring',\n 'tokenizer',\n 'openssl',\n 'json',\n 'curl',\n 'xml'\n );\n\n $results = array();\n\n foreach ($extensions as $extension) {\n $results[$extension] = extension_loaded($extension);\n }\n\n return $results;\n }", "function list_php_files($path){\n\t\t\t// to remove any (.) and (..) from the directory list\n\t\t\t$files = array_diff(scandir($path), array('.', '..'));\n\t\t\treturn $files;\n\t\t}", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "public function findFiles();", "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "protected function _findFiles($extensions = '') {\n\t\t$this->_files = [];\n\t\tforeach ($this->_paths as $path) {\n\t\t\tif (!is_dir($path)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$Iterator = new RegexIterator(\n\t\t\t\tnew RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)),\n\t\t\t\t'/^.+\\.(' . $extensions . ')$/i',\n\t\t\t\tRegexIterator::MATCH\n\t\t\t);\n\t\t\tforeach ($Iterator as $file) {\n\t\t\t\t$excludes = ['Config'];\n\t\t\t\t//Iterator processes plugins even if not asked to\n\t\t\t\tif (empty($this->params['plugin'])) {\n\t\t\t\t\t$excludes = array_merge($excludes, ['Plugin', 'plugins']);\n\t\t\t\t}\n\t\t\t\tif (empty($this->params['vendor'])) {\n\t\t\t\t\t$excludes = array_merge($excludes, ['Vendor', 'vendors']);\n\t\t\t\t}\n\t\t\t\tif (!empty($excludes)) {\n\t\t\t\t\t$isIllegalPluginPath = false;\n\t\t\t\t\tforeach ($excludes as $exclude) {\n\t\t\t\t\t\tif (strpos($file, $path . $exclude . DS) === 0) {\n\t\t\t\t\t\t\t$isIllegalPluginPath = 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\tif ($isIllegalPluginPath) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($file->isFile()) {\n\t\t\t\t\t$this->_files[] = $file->getPathname();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "public function testPhpExtensionsAreValid()\n {\n $this->assert->php->extensions\n ->isLoaded('simplexml')\n ->isLoaded('fileinfo')\n ->isLoaded('xsl');\n // validate that fileinfo is loaded and configured properly\n $this->assert->php->extensions->fileinfo->isAlive();\n }", "function swpf_plugin_search($path) {\n\n\t$swpf_plugins = array();\n\n\t$dir = opendir ($path);\n\n\twhile ($file = readdir ($dir))\n\t{\n\t\tif (($file == \".\") or ($file == \"..\"))\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (filetype (\"$path/$file\") == \"dir\")\n\t\t{\n\t\t\t$swpf_file = \"$path/$file/swpf.php\";\n\n\t\t\tif (is_file($swpf_file)) {\n\t\t\t\trequire($swpf_file);\n\t\t\t\tif ($options) $swpf_plugins[] = $options;\n\t\t\t}\n\t\t}\n\n\t} //End of while\n\n\tclosedir($dir);\n\n\treturn $swpf_plugins;\n\n}", "public function findAllClassFiles($extension = NULL) {\n $classmap = [];\n $namespaces = $this->registerTestNamespaces();\n if (isset($extension)) {\n // Include tests in the \\Drupal\\Tests\\{$extension} namespace.\n $pattern = \"/Drupal\\\\\\(Tests\\\\\\)?$extension\\\\\\/\";\n $namespaces = array_intersect_key($namespaces, array_flip(preg_grep($pattern, array_keys($namespaces))));\n }\n foreach ($namespaces as $namespace => $paths) {\n foreach ($paths as $path) {\n if (!is_dir($path)) {\n continue;\n }\n $classmap += static::scanDirectory($namespace, $path);\n }\n }\n return $classmap;\n }", "function get_php_files(string $path)\n{\n $matches = [];\n $folders = [rtrim($path, DIRECTORY_SEPARATOR)];\n\n while( $folder = array_shift($folders) )\n {\n $matches = array_merge($matches, glob($folder . DIRECTORY_SEPARATOR . '*.php', GLOB_MARK));\n $childFolders = glob($folder . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR);\n $folders = array_merge($folders, $childFolders);\n }\n return $matches;\n}", "protected function extensions() \n {\n return ['php'];\n }", "public function hasExtension($name);", "public function checkExtension($fileName){\n \t\t$extName = explode(\".\", $fileName);\n \t\t$extension = end($extName);\n \t\tif ($extension == \"java\"){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "public function getExtensionsFromSingleInstance($file) {\n\t\tif($file{strlen($file)-1} != DIRECTORY_SEPARATOR ) $file .= DIRECTORY_SEPARATOR;\n\t\treturn glob($file.'typo3conf'.DIRECTORY_SEPARATOR.'ext'.DIRECTORY_SEPARATOR.'*', GLOB_ONLYDIR);\n\t}\n\n}", "public function fileDenyPatternMatchesPhpExtensionDataProvider() {}", "public function extension($filePath);", "protected function findExtension($ext)\n {\n $ext = strtolower(trim($ext, ' .'));\n if (isset($this->extensions[$ext])) {\n return '.' . $this->extensions[$ext];\n }\n\n return '.html';\n }", "public function phpExt(): array\n {\n return \\get_loaded_extensions();\n }", "public function phpExt(): array\n {\n return \\get_loaded_extensions();\n }", "public function testGetPhpFiles()\n {\n // Files arrays\n $files = [];\n $phpFiles = [];\n\n // For every specified folder\n foreach ($this->phpFolders as $folder) {\n\n // Get files from directory\n $files = array_merge($files, FileHelper::directoryFiles($folder));\n }\n\n // Select php only files\n foreach ($files as $file) {\n if (substr($file, -4) === '.php') {\n $phpFiles[] = $file;\n }\n }\n\n // Check that we have at least 10 php files across all collected\n $count = count($phpFiles);\n $this->assertTrue($count > 10, json_encode([\n 'count' => $count,\n 'expected' => 'total number of php files must exceed 10 files',\n ], JSON_UNESCAPED_SLASHES));\n\n // Return end point data\n return $phpFiles;\n }", "public function find_extension_file($slug)\n\t{\n\t\t// We'll search the root dir first\n\t\t$files = glob(path('extensions').$slug.DS.'extension'.EXT);\n\n\t\tif (empty($files))\n\t\t{\n\t\t\t// We couldn't find the extension file in the first path, so we'll try the 2nd\n\t\t\t$files = glob(path('extensions').'*'.DS.$slug.DS.'extension'.EXT);\n\t\t}\n\n\t\treturn ( ! empty($files)) ? $files[0] : false;\n\t}", "public function getFiles()\n {\n $dir = $this->getDir();\n\n return array_filter(array_map(function ($file) use ($dir) {\n if (is_file($dir.$file) && pathinfo($file, PATHINFO_EXTENSION) == 'php') {\n return $dir.$file;\n }\n }, scandir($dir)));\n }", "abstract protected function getFileExtension();", "private function _get_files($ext=false)\n\t{\n\t\t\n\t\t$files = PerchUtil::get_dir_contents(PERCH_RESFILEPATH);\n\n\t\t$returnfiles = array();\n\t\tif(PerchUtil::count($files) > 0) {\n\t\t\tforeach($files as $file) {\n\t\t\t\t// if a file extension has been provided only add files with that extension\n\t\t\t\tif($ext) {\n\t\t\t\t\tif(strtolower(trim($ext)) == strtolower(PerchUtil::file_extension($file))) {\n\t\t\t\t\t\t$returnfiles[] = array('label'=>$file, 'value'=>$file);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// prepare all files for display\n\t\t\t\t\t$returnfiles[] = array('label'=>$file, 'value'=>$file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(PerchUtil::count($returnfiles) > 0) {\n\t\t\treturn $returnfiles;\n\t\t} else {\t\n\t\t\treturn false;\n\t\t}\n\t}", "public function testFindFiles()\n {\n\n }", "function getextension($path)\n{\n\t$extension = null;\n if (preg_match('/\\.([a-z0-9]+)$/', $path, $found)){\n\t\t$extension = $found[1];\n\t}\n\treturn $extension;\n}", "public function scan($type, $include_tests = NULL) {\n\n // Search the legacy sites/all directory.\n $searchdirs[static::PDB_SITES_ALL] = 'modules/pdb';\n\n $files = array();\n foreach ($searchdirs as $dir) {\n // Discover all extensions in the directory, unless we did already.\n if (!isset(static::$files[$dir][$include_tests])) {\n static::$files[$dir][$include_tests] = $this->scanDirectory($dir, $include_tests);\n }\n // Only return extensions of the requested type.\n if (isset(static::$files[$dir][$include_tests][$type])) {\n $files += static::$files[$dir][$include_tests][$type];\n }\n }\n\n // Sort the discovered extensions by their originating directories.\n $origin_weights = array_flip($searchdirs);\n $files = $this->sort($files, $origin_weights);\n\n // Process and return the list of extensions keyed by extension name.\n return $this->process($files);\n }", "private function findFiles($directory, $extensions = array())\r\n {\r\n $directory = ROOT_DIR_NAME;\r\n\r\n if($this->check_search_directory($directory))\r\n {\r\n $search = $this->filter_search_str($this->search);\r\n $directories = array();//\"\";\r\n function glob_recursive($directory, &$directories = array(), $search)\r\n {\r\n foreach(glob($directory, GLOB_ONLYDIR | GLOB_NOSORT) as $folder)\r\n {\r\n $directories[] = $folder;\r\n glob_recursive(\"{$folder}/*\", $directories, $search);\r\n }\r\n }\r\n @glob_recursive($directory, $directories, $search);\r\n $files = array ();\r\n foreach($directories as $directory)\r\n {\r\n $slashes = \"../\";\r\n if(strpos($directory, \"..//\") !== FALSE)\r\n {\r\n $slashes = \"..//\";\r\n }\r\n if (in_array(str_replace($slashes, \"\", $directory), $this->ignored)) continue;\r\n $this->find_all_files($directory, $extensions, $search);\r\n /*foreach($extensions as $extension)\r\n {\r\n foreach(glob(\"{$directory}/{$search}.{$extension}\") as $file)\r\n {\r\n $files[$extension][] = $file;\r\n $filename = str_replace(\"..//\", \"\", $file);\r\n $this->root_files_folders[$filename] = filemtime($file);\r\n }\r\n }*/\r\n }\r\n @arsort($this->root_files_folders);\r\n if($this->sort != 'date')\r\n {\r\n @$this->root_files_folders = $this->sort_with_name($this->root_files_folders);\r\n }\r\n }\r\n @$this->root_files_folders = array_keys($this->root_files_folders);\r\n }", "public function checkExt($f) {\r\n $ext = pathinfo($f, PATHINFO_EXTENSION);\r\n return $ext;\r\n }", "protected function php_grep($q, $path){\n\t\t$fp = opendir($path);\n\t\t$ret = '';\n\t\twhile($f = readdir($fp)){\n\t\t\tif($this->ignoreFile($f)) continue;\n\t\t\tif( preg_match('#^\\.+$#', $f) ) continue; // ignore symbolic links\n\t\t\t$file_full_path = $path.DIRECTORY_SEPARATOR.$f;\n\t\t\tif(is_dir($file_full_path)) {\n\t\t\t\t$ret .= $this->php_grep($q, $file_full_path);\n\t\t\t} else if( stristr(file_get_contents($file_full_path), $q) ) {\n\t\t\t\t$ret .= $file_full_path.PHP_EOL;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "function grep($path, $pattern, &$results)\n{\n // find all files in the path (incl folders)\n $items = glob($path . '/*'); // */\n\n for ($i = 0; $i < count($items); $i++)\n {\n if (is_dir($items[$i]))\n {\n $add = glob($items[$i] . '/*'); // */\n $items = array_merge($items, $add);\n }\n }\n\n // search through the files.\n $results = array();\n foreach($items as $f)\n {\n if (filetype($f) == 'file')\n {\n if (preg_match($pattern, file_get_contents($f), $matches))\n $results = array_merge($results, $matches);\n }\n }\n\n return (count($results) > 0);\n}", "function get_files($images_dir,$exts = array('jpg')) {\n $files = array();\n if($handle = opendir($images_dir)) {\n while(false !== ($file = readdir($handle))) {\n $extension = strtolower(get_file_extension($file));\n if($extension && in_array($extension,$exts)) {\n $files[] = $file;\n }\n }\n closedir($handle);\n } else { echo \"Unable to read $images_dir directory!\"; }\n return $files;\n}", "function getAllFiles($dir, $ext)\n {\n $dirIterator = new RecursiveDirectoryIterator($dir);\n $fileIterator = new RecursiveIteratorIterator($dirIterator);\n $files = array();\n foreach ($fileIterator as $file) {\n if ($file->isFile() && strrpos($file->getPathname(), \".{$ext}\")) {\n $filename = str_replace('\\\\', '/', $file->getPathname());\n $files[] = str_replace(\"{$dir}/\", '', $filename);\n }\n }\n return $files;\n }", "protected function getExtensions() {\n $listing = new ExtensionDiscovery($this->root);\n // Ensure that tests in all profiles are discovered.\n $listing->setProfileDirectories([]);\n $extensions = $listing->scan('module', TRUE);\n $extensions += $listing->scan('profile', TRUE);\n $extensions += $listing->scan('theme', TRUE);\n return $extensions;\n }", "abstract public function search($files, array $includedFiles);", "public static function getPHPExtensionRequired(){\n\t\treturn 'java';\n\t}", "public function extens(){\n $this->typefl = pathinfo($this->filename, PATHINFO_EXTENSION);\n\n if(!in_array($this->typefl, $this->type)){\n echo \"Wrong extension!!!\";\n return false;\n }\n else{\n return true;\n }\n }", "public static function find_file($dir, $file, $ext = NULL)\n\t{\n\t\tif (self::$profile === TRUE AND class_exists('Profiler', FALSE))\n\t\t{\n\t\t\t// Start a new benchmark\n\t\t\t$benchmark = Profiler::start(__CLASS__, __FUNCTION__);\n\t\t}\n\n\t\t// Use the defined extension by default\n\t\t$ext = ($ext === NULL) ? EXT : '.'.$ext;\n\n\t\t// Create a partial path of the filename\n\t\t$path = $dir.'/'.$file.$ext;\n\n\t\tif ($dir === 'config' OR $dir === 'i18n')\n\t\t{\n\t\t\t// Include paths must be searched in reverse\n\t\t\t$paths = array_reverse(self::$_paths);\n\n\t\t\t// Array of files that have been found\n\t\t\t$found = array();\n\n\t\t\tforeach ($paths as $dir)\n\t\t\t{\n\t\t\t\tif (is_file($dir.$path))\n\t\t\t\t{\n\t\t\t\t\t// This path has a file, add it to the list\n\t\t\t\t\t$found[] = $dir.$path;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// The file has not been found yet\n\t\t\t$found = FALSE;\n\n\t\t\tforeach (self::$_paths as $dir)\n\t\t\t{\n\t\t\t\tif (is_file($dir.$path))\n\t\t\t\t{\n\t\t\t\t\t// A path has been found\n\t\t\t\t\t$found = $dir.$path;\n\n\t\t\t\t\t// Stop searching\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isset($benchmark))\n\t\t{\n\t\t\t// Stop the benchmark\n\t\t\tProfiler::stop($benchmark);\n\t\t}\n\n\t\treturn $found;\n\t}", "function findImageTypeInDir( $dir, $fileTypes )\n{\n\t// If the directory is not there, throw exception.\n\tif ( !file_exists( $dir ) ) {\n\t\tthrow new Exception(\" $dir does not exist.\");\n\t}\n\t\n\t// Find a file extension in this directory. There may be more than one, \n\t// but let's at least start with a type that we know exists\n\t$foundtype = False;\n\t$files = scandir($dir);\n\tforeach ( $files as $file ) {\n\t\tforeach ( $fileTypes as $type ) {\n\t\t\tif ( substr($file, -strlen($type)) == $type ) {\n\t\t\t\t$foundtype = $type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $foundtype;\n}", "protected function getMissingPhpModulesOfExtensions() {}", "public function collectFile($dir, $ext)\n {\n if (false !== ($dir = opendir(plugins_path('/samubra/training/classes/'.$dir)))) {\n $files = array();\n while (false !== ($file = readdir($dir))) {\n if (preg_match(\"/\\\\.$ext\\$/i\", $file)) {\n $files[] = $file;\n }\n }\n return $files;\n }\n return false;\n }", "function rex_com_mediaaccess_getExtensionsSendfile()\n{\n global $REX;\n\n $classes = array();\n\n foreach($REX['ADDON']['community']['plugin_mediaaccess']['extension_sendfile_dir'] as $path)\n {\n if($dir = opendir($path))\n {\n while($file = readdir($dir))\n {\n if(!is_dir($file))\n {\n $classname = explode(\".\", $file);\n $class = $classname[1];\n\n if(file_exists($path.$file))\n {\n include_once($path.$file);\n $classes[] = $class;\n }\n }\n }\n closedir($dir);\n }\n }\n\n return $classes;\n}", "function PMA_getDirContent($dir, $expression = '')\n{\n if (file_exists($dir) && $handle = @opendir($dir)) {\n $result = array();\n if (substr($dir, -1) != '/') {\n $dir .= '/';\n }\n while ($file = @readdir($handle)) {\n // for PHP < 5.2.4, is_file() gives a warning when using open_basedir\n // and verifying '..' or '.'\n if ('.' != $file && '..' != $file && is_file($dir . $file) && ($expression == '' || preg_match($expression, $file))) {\n $result[] = $file;\n }\n }\n @closedir($handle);\n asort($result);\n return $result;\n } else {\n return FALSE;\n }\n}", "public function getFileExtension();", "function getExtension() ;", "function getextension($path){\n return strtolower(pathinfo($path, PATHINFO_EXTENSION)); // extension only, no period\n}", "public function getSupportedFileExtensions() {}", "function resolve_extension_dir() {\n\t\t// proper extension_dir is available in php.ini or passed via\n\t\t// cmd-line, explicitly or automagically inside run-tests.php\n\t\t$extension_dir = ini_get(\"extension_dir\");\n\n\t\t// may make life easier while testing at development stage for php\n\t\t// built from sources, but rather not on end-user machines\n\t\tif (!strlen($extension_dir)) {\n\t\t\t// while building for win modules (like php_mysql_xdevapi.dll) are\n\t\t\t// located in the same dir as php binary\n\t\t\t$extension_dir = pathinfo(PHP_BINARY, PATHINFO_DIRNAME);\n\t\t\tif (!is_running_on_windows()) {\n\t\t\t\t// for Linux\n\t\t\t\t// php binary located in\n\t\t\t\t//\t\tconnector-php/sapi/cli or connector-php/sapi/cgi\n\t\t\t\t// while mysql_xdevapi.so in\n\t\t\t\t//\t\tconnector-php/modules\n\t\t\t\t$extension_dir .= \"/../../modules\";\n\t\t\t}\n\t\t}\n\n\t\treturn $extension_dir;\n\t}", "protected function determineTargetFileExtension() {}", "protected function findExtensionDirectories($root) {\n $extension_roots = \\drupal_phpunit_contrib_extension_directory_roots($root);\n\n $extension_directories = array_map('drupal_phpunit_find_extension_directories', $extension_roots);\n return array_reduce($extension_directories, 'array_merge', []);\n }", "function setupExtensionsInstall() {\r\n\t\t\t// We need to find the files to install\r\n\t\t\tif (!$this->_findExtensionFiles()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}", "function extension_path($extension = '')\n\t{ \n\t\treturn base_path(\"extensions\").($extension ? DS.$extension : $extension);\n\t}", "function getExtension($filePath){\n\t\t$lastDot = strrpos($filePath, '.');\n\t\tif($lastDot === false)\n\t\t\treturn false;\n\t\treturn substr($filePath, $lastDot+1);\n\t}", "function getInstalledExtensions()\r\n\t{\r\n\t\tglobal $sourcedir, $smcFunc, $modSettings;\r\n\t\r\n\t\t$extensions = array();\r\n\t\tif ($dh = opendir($sourcedir . '/ProjectTools/'))\r\n\t\t{\r\n\t\t\twhile (($file = readdir($dh)) !== false)\r\n\t\t\t{\r\n\t\t\t\tif ($file[0] == '.')\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t\tif (is_dir($sourcedir . '/ProjectTools/' . $file . '/') && file_exists($sourcedir . '/ProjectTools/' . $file . '/Extension.php'))\r\n\t\t\t\t{\r\n\t\t\t\t\t$extension = self::loadExtension($file, false);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$extInfo = $extension->getExtensionInfo();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$extensions[$file] = array(\r\n\t\t\t\t\t\t'id' => $file,\r\n\t\t\t\t\t\t'name' => $extInfo['title'],\r\n\t\t\t\t\t\t'version' => $extInfo['version'],\r\n\t\t\t\t\t\t'api_version' => $extInfo['api_version'],\r\n\t\t\t\t\t\t'filename' => $file,\r\n\t\t\t\t\t\t'enabled' => in_array($file, $modSettings['projectExtensions']),\r\n\t\t\t\t\t\t'can_enable' => $extInfo['api_version'] === 2,\r\n\t\t\t\t\t\t'can_disable' => true, // Todo: check if it's in use\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($dh);\r\n\t\t\r\n\t\treturn $extensions;\r\n\t}", "public function findFile($class);", "function getTargetFileExtension() ;", "static private function find_contents($dir)\n {\n $result = array();\n $root = scandir($dir);\n foreach ($root as $value) {\n if ($value === '.' || $value === '..') {\n continue;\n }\n if (is_file($dir . DIRECTORY_SEPARATOR . $value)) {\n if (! self::$ext_filter || in_array(strtolower(pathinfo($dir . DIRECTORY_SEPARATOR . $value, PATHINFO_EXTENSION)), self::$ext_filter)) {\n self::$files[] = $result[] = $dir . DIRECTORY_SEPARATOR . $value;\n }\n continue;\n }\n if (self::$recursive) {\n foreach (self::find_contents($dir . DIRECTORY_SEPARATOR . $value) as $value) {\n self::$files[] = $result[] = $value;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }", "function fileExtension($nameFile) {\n\t$format = substr($nameFile, -4);\n\treturn ($format == \".pat\");\n}", "function find($dir, $pattern){\n // escape any character in a string that might be used to trick\n // a shell command into executing arbitrary commands\n $dir = escapeshellcmd($dir);\n // get a list of all matching files in the current directory\n $files = glob(\"$dir/$pattern\");\n // find a list of all directories in the current directory\n // directories beginning with a dot are also included\n foreach (glob(\"$dir/{.[^.]*,*}\", GLOB_BRACE|GLOB_ONLYDIR) as $sub_dir){\n $arr = find($sub_dir, $pattern); // resursive call\n $files = array_merge($files, $arr); // merge array with files from subdirectory\n }\n // return all found files\n return $files;\n}", "abstract function list_files($path = '.');", "function findexts ($filename) \n{ \n\t$filename = strtolower($filename) ; \n\t$exts = split(\"[/\\\\.]\", $filename) ; \n\t$n = count($exts)-1; \n\n\t// Write any scripts that check for unwanted extensions here!\n\tif ($n > 1) // Check for evil double-barreled extensions like \"yourfile.php.jpg\" or \"yourfile.exe.jpg\" and eliminate extensions you don't allow.\n\t{\n\t\techo \"Double-Barreled file extension(s) are not allowed.<br>\";\n\t\t$ok=0;\n\t}\n\t$exts = $exts[$n]; \n\treturn $exts; \n}", "protected function checkPhpExtensions()\n\t{\n\t\tif (!extension_loaded('pcntl'))\n\t\t{\n\t\t\techo \"Extension pcntl not loaded\";\n\t\t\texit(1);\n\t\t}\n\n\t\t// This is used to kill processes\n\t\tif (!extension_loaded('posix'))\n\t\t{\n\t\t\techo \"Extension posix not loaded\";\n\t\t\texit(1);\n\t\t}\n\t}", "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "function include_all_php($folder)\n{\n foreach (glob(\"{$folder}/*.php\") as $filename)\n {\n require_once $filename;\n }\n\n foreach (glob(\"{$folder}/*\") as $foldername)\n {\n \tif(is_dir($foldername))\n \t{\n\t\t\tinclude_all_php($foldername);\n \t}\n }\n}", "public static function search($dir, $file, $ext = 'php', $multiple = false, $cache = true)\n\t{\n\t\t$finder = static::forge(array($dir), trim($ext, '.'));\n\n\t\tif (($result = $finder->findCached($multiple?'all':'one', $file)) === null)\n\t\t{\n\t\t\t$result = $multiple ? $finder->findAll($file, false, false, 'file') : $finder->find($file, false, false, 'file');\n\t\t}\n\n\t\tif ($cache and $result)\n\t\t{\n\t\t\t$finder->cache($multiple?'all':'one', $file, false, $result, array($dir));\n\t\t}\n\n\t\treturn $result;\n\t}", "public function extensions_directories()\n\t{\n\t\t$grouped_extensions = (array) glob(path('extensions').'*'.DS.'*'.DS.'extension'.EXT, GLOB_NOSORT);\n\t\t$top_level_extensions = (array) glob(path('extensions').'*'.DS.'extension'.EXT, GLOB_NOSORT);\n\n\t\treturn $this->cascade_extensions_directories($top_level_extensions, $grouped_extensions);\n\t}", "function get_files($route) {\n\tif (is_dir($route)) {\n\t\t$array_files = array();\n\t\t$files = opendir($route);\n\t\twhile ($file = readdir($files)) {\n\t\t\tif ($file != '.' && $file != '..' && !is_dir($route . '/' . $file)) {\n\t\t\t\t$extention = substr($file, -4);\n\t\t\t\t$file = substr($file, 0, -4);\n\t\t\t\tif ($file != 'index' && $extention == '.php') {\n\t\t\t\t\t$array_files[] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($files);\n\t\treturn $array_files;\n\t} else {\n\t\treturn false;\n\t}\n}", "protected static function checkFileinfoExtension()\n {\n // Make sure that the \"fileinfo\" extension is loaded/enabled\n if (!extension_loaded('fileinfo')) {\n throw new RuntimeException('Required \"fileinfo\" extension not loaded');\n }\n }", "private function _has_extension($filename) {\n\t\t$exploded = explode(\".\", $filename);\n\t\tif(sizeof($exploded) > 1)\n\t\t\treturn $exploded;\n\t\telse\n\t\t\treturn false;\n\t}", "public static function hasExtension($path)\r\n\t{\r\n\t\t$file=self::getFilename($path);\r\n\t\t$posDot=strrpos($file, \".\");\r\n\t\tif ($posDot===false) return false;\r\n\t\telse return true;\r\n\t}", "public function testGettingExtensionsFromConfigurationFile(): void\n {\n $mock = m::mock(\n sprintf('%s[%s]', ServiceProvider::class, $what = 'getConfigExtensionsClassesNames'),\n [$this->app]\n );\n\n $mock->shouldReceive($what)->once()->andReturn([ExtensionStub::class])->getMock();\n\n /* @var ServiceProvider $mock */\n $this->assertContains(ExtensionStub::class, $mock->getExtensionsClassesNames());\n }", "public function all_available()\n\t{\n\t\t$available = array();\n\t\tif (!is_dir($this->phpbb_root_path . 'ext/'))\n\t\t{\n\t\t\treturn $available;\n\t\t}\n\n\t\t$iterator = new \\RecursiveIteratorIterator(\n\t\t\tnew \\phpbb\\recursive_dot_prefix_filter_iterator(\n\t\t\t\tnew \\RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', \\FilesystemIterator::NEW_CURRENT_AND_KEY | \\FilesystemIterator::FOLLOW_SYMLINKS)\n\t\t\t),\n\t\t\t\\RecursiveIteratorIterator::SELF_FIRST\n\t\t);\n\t\t$iterator->setMaxDepth(2);\n\n\t\tforeach ($iterator as $file_info)\n\t\t{\n\t\t\tif ($file_info->isFile() && $file_info->getFilename() == 'composer.json')\n\t\t\t{\n\t\t\t\t$ext_name = $iterator->getInnerIterator()->getSubPath();\n\t\t\t\t$ext_name = str_replace(DIRECTORY_SEPARATOR, '/', $ext_name);\n\t\t\t\tif ($this->is_available($ext_name))\n\t\t\t\t{\n\t\t\t\t\t$available[$ext_name] = $this->get_extension_path($ext_name, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tksort($available);\n\t\treturn $available;\n\t}", "public function testReadingFiles()\n {\n $dir = __DIR__;\n $f = $this->adapter->java('java.io.File', $dir);\n $paths = $f->listFiles();\n foreach ($paths as $path) {\n self::assertFileExists((string) $path);\n }\n }", "function get_extension($file)\n{\n return substr(strrchr($file, '.'), 1);\n}", "protected function findFilesWithExtension(string $dir, string $extension)\n {\n if(! Str::startsWith($extension, '.')) $extension = \".$extension\";\n\n return array_filter($this->findFiles($dir), function($file) use($extension){\n return Str::endsWith($file, $extension);\n });\n }", "function gttn_tpps_get_path_extension($path) {\n preg_match('/\\.([a-zA-Z0-9]*)$/', $path, $matches);\n return $matches[1];\n}", "public static function isHaveExtension($path)\n {\n if (!is_string($path)) {\n return false;\n }\n $parts = pathinfo($path);\n return array_key_exists('extension', $parts);\n }", "function getPhpExecutable()\r\n{\r\n\tglobal $isWindowsServer;\r\n\t// Set filename of actual php executable file\r\n\t$phpexe = \"php\" . ($isWindowsServer ? \".exe\" : \"\");\r\n\t// LINUX ONLY (use \"exec\")\r\n\tif (!$isWindowsServer) \r\n\t{\r\n\t\t// Use \"which php\"\r\n\t\t$php_executable = @exec(\"which php\");\r\n\t\tif (isFile($php_executable)) return $php_executable;\r\n\t\t// Gets the PID of the current executable\r\n\t\tif (function_exists('posix_getpid')) {\r\n\t\t\t$pid = @posix_getpid();\r\n\t\t\t$php_executable = @exec(\"readlink -f /proc/$pid/exe\");\r\n\t\t\tif (isFile($php_executable)) return $php_executable;\r\n\t\t}\r\n\t}\r\n\t// Try paths found in PATH\r\n\tforeach (explode(PATH_SEPARATOR, getenv('PATH')) as $path) {\r\n\t\t$path = trim($path);\r\n\t\tif (substr($path, -1) == DS) $path = substr($path, 0, -1);\r\n\t\t$php_executable = $path . DS . $phpexe;\r\n\t\tif (isFile($php_executable)) return $php_executable;\r\n\t}\r\n\t// Use extension directory location to find it\r\n\t$php_executable = str_replace(DS . 'ext', '', ini_get('extension_dir')) . DS . $phpexe;\r\n\tif (isFile($php_executable)) return $php_executable;\r\n\t// Search directory containing PHP.INI (use \"loaded config file\" location from phpinfo()) \r\n\t$phpinfo_array = phpinfo_array();\r\n\tif (isset($phpinfo_array['General']['Loaded Configuration File'])) {\r\n\t\t// First try in this same directory\r\n\t\t$php_executable = dirname($phpinfo_array['General']['Loaded Configuration File']) . DS . $phpexe;\r\n\t\tif (isFile($php_executable)) return $php_executable;\r\n\t\t// Now try all subdirectories\r\n\t\t$php_ini_dir = dirname($phpinfo_array['General']['Loaded Configuration File']);\r\n\t\t$php_executable = searchForFile($php_ini_dir, $phpexe) . $phpexe;\r\n\t\tif ($php_executable !== false && $php_executable !== null && isFile($php_executable)) return $php_executable;\r\n\t}\r\n\t// Try ALL paths listed in phpinfo that contain \"/php\"\r\n\t$pathsPhpInfo = array();\r\n\tforeach ($phpinfo_array as $array) {\r\n\t\tforeach ($array as $val) {\r\n\t\t\t// If we found a match for \"/php\"\r\n\t\t\tif (!is_array($val) && strpos($val, DS.\"php\") !== false) {\r\n\t\t\t\t// Trim the value\r\n\t\t\t\t$val = trim(label_decode($val));\r\n\t\t\t\t// Check if value is a file\r\n\t\t\t\tif (isFile($val)) {\r\n\t\t\t\t\t$pathsPhpInfo[] = dirname($val);\r\n\t\t\t\t} \r\n\t\t\t\t// Check if a directory\r\n\t\t\t\telseif (is_dir($val)) {\r\n\t\t\t\t\t$pathsPhpInfo[] = $val;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Loop through all directories collected that are listed in phpinfo that contain \"/php\" and search ALL their subdirectories for PHP executable file\r\n\t$pathsParentPhpInfo = array();\r\n\tforeach (array_unique($pathsPhpInfo) as $path) \r\n\t{\r\n\t\t$php_executable = searchForFile($path, $phpexe) . $phpexe;\r\n\t\tif ($php_executable !== false && $php_executable !== null && isFile($php_executable)) return $php_executable;\r\n\t\t$pathsParentPhpInfo[] = dirname($path);\r\n\t}\r\n\t// If didn't find it in $pathsPhpInfo, now try parent folders of each in $pathsPhpInfo\r\n\tforeach (array_unique($pathsParentPhpInfo) as $path) \r\n\t{\r\n\t\t$php_executable = searchForFile($path, $phpexe) . $phpexe;\r\n\t\tif ($php_executable !== false && $php_executable !== null && isFile($php_executable)) return $php_executable;\r\n\t}\r\n\t// Couldn't find it\r\n\treturn false;\r\n}", "function frame_load_files($folder, $include = false, $extension = true)\n{\n $path = locate_template($folder);\n $files = array();\n\n if (is_dir($path))\n {\n $path_items = new DirectoryIterator($path);\n\n foreach ($path_items as $item)\n {\n if (!$item->isDot() && $item->isFile())\n {\n if (substr($item->getFilename(), 0, 1) !== '.' &&\n substr($item->getFilename(), 0, 1) !== '_')\n {\n if ($include === true) include($item->getPathname());\n $files[] = ($extension === true) ? $item->getFilename() : $item->getBasename('.'.$item->getExtension());\n }\n }\n // Recursive\n else if (!$item->isDot() && $item->isDir())\n {\n if (substr($item->getBasename(), 0, 1) !== '.' &&\n substr($item->getBasename(), 0, 1) !== '_')\n {\n $files = frame_load_files($folder.'/'.$item->getBasename(), $include, $extension);\n }\n }\n }\n }\n\n return $files;\n}", "public function checkExtensions()\r\n\t{\r\n\t\treturn (strcasecmp(pathinfo($this->targetFile, PATHINFO_EXTENSION), pathinfo($this->referenceFile, PATHINFO_EXTENSION)) === 0);\r\n\t}", "function dir_include($dir, $listen = false, $path = null)\n{\n /**\n * This is some pretty narly code but so far the fastest I have been able \n * to get this to run.\n */\n $iterator = new \\RegexIterator(\n new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($dir)\n ), '/^.+\\.php$/i', \\RecursiveRegexIterator::GET_MATCH\n );\n foreach ($iterator as $_file) {\n array_map(function($i) use ($path, $listen){\n include $i;\n if (!$listen) {\n return false;\n }\n if (WINDOWS) {\n $x = '\\\\';\n } else {\n $x = '/';\n }\n $data = explode($x, str_replace([$path, '.php'], '', $i));\n $class = array_pop($data);\n $namespace = implode('\\\\', $data);\n $process = $namespace.'\\\\'.ucfirst($class);\n if (class_exists($process, false) && \n is_subclass_of($process, '\\XPSPL\\Listener')) {\n listen(new $process());\n }\n }, $_file);\n }\n}", "function checkLanguage($lang) {\n global $DIR_LANG;\n # important note that '\\' must be matched with '\\\\\\\\' in preg* expressions\n\n return file_exists($DIR_LANG . remove_all_directory_separator($lang) . '.php');\n}", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "function findexts ($filename) \n { \n $filename = strtolower($filename) ; \n $exts = split(\"[/\\\\.]\", $filename) ; \n $n = count($exts)-1; \n $exts = $exts[$n]; \n return $exts; \n }", "public static function find_json_php_file($path, $key, $search)\n\t{\n\t\t$files = self::read_dir_contents($path, 'files');\n\t\tif (empty($files)) return;\n\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\t// do pre search to speed things up\n\t\t\tif (stripos(self::read_file_contents(\"{$path}/{$file}\", 'string'), $search) === false) continue;\n\n\t\t\t// we have some kind of match, so find it\n\t\t\t$data = self::read_file_contents(\"{$path}/{$file}\", 'json.php');\n\n\t\t\tif (isset($data->$key) && $data->$key === $search) return $data;\n\t\t}\n\t}", "function is_valid_file_extension($value, $set){\n if (in_array($value, $set)) {\n return true;\n }\n}", "function findexts ($filename){\n $filename = strtolower($filename) ;\n $exts = split(\"[/\\\\.]\", $filename) ;\n $n = count($exts)-1;\n $exts = $exts[$n];\n return $exts;\n }", "function loadFiles($folder){\n $files = scandir($folder);\n foreach ($files as $filename)\n {\n if($filename != \".\" && $filename != \"..\") {\n if (is_dir($filename)) {\n //handle nesting\n loadFiles($filename);\n } else {\n if (strpos($filename, '.php') !== false) {\n require $folder.\"/\".$filename;\n }\n }\n }\n\n }\n}", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "protected function _getFiles($path) {\n\t\tif (!$path = realpath($path)) {\n\t\t\t$this->error('Not a valid path.');\n\t\t\treturn false;\n\t\t}\n\t\tif (is_file($path)) {\n\t\t\treturn array(array($path));\n\t\t}\n\t\t$iterator = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($path));\n\t\treturn new \\RegexIterator($iterator, '/^.+\\.php$/i', \\RecursiveRegexIterator::GET_MATCH);\n\t}", "private function fileTest($file) {\n $test_result = strripos($file, USER_FILE_EXT);\n return $test_result;\n }", "public function guessExtension();" ]
[ "0.6378908", "0.62099826", "0.61495525", "0.6130767", "0.6104926", "0.6008885", "0.59576637", "0.5952251", "0.593186", "0.59039265", "0.58814347", "0.58732206", "0.5866185", "0.5841527", "0.584152", "0.58406514", "0.57603306", "0.5739005", "0.57352954", "0.572393", "0.5692", "0.5666368", "0.56465465", "0.56244814", "0.561077", "0.5556108", "0.5556108", "0.55429935", "0.5534276", "0.55272704", "0.55266476", "0.55185014", "0.5518301", "0.5492787", "0.54859436", "0.5469135", "0.5468554", "0.5444711", "0.5442208", "0.5395075", "0.5381218", "0.53709215", "0.53634715", "0.5360786", "0.5356698", "0.53523874", "0.5343189", "0.53377223", "0.5334597", "0.5331389", "0.53235006", "0.53078467", "0.5297038", "0.52919954", "0.52842873", "0.5281901", "0.5261235", "0.525926", "0.52508026", "0.5249299", "0.52403134", "0.52272135", "0.5211944", "0.5203711", "0.51922005", "0.5184537", "0.51838386", "0.51785713", "0.517762", "0.5176928", "0.51766187", "0.51761985", "0.51742345", "0.516971", "0.51583004", "0.5145612", "0.5145242", "0.5144576", "0.514379", "0.514163", "0.5140255", "0.51386917", "0.51330054", "0.5120946", "0.5120173", "0.511334", "0.51066333", "0.51055443", "0.510546", "0.5104425", "0.5101519", "0.50978774", "0.50953", "0.50913084", "0.50828576", "0.50794894", "0.5072404", "0.5064763", "0.50587916", "0.50562483" ]
0.84767115
0
Caso seja able_type deve ser ignorado
public function isToIgnoreColumn(): bool { if ($this->entity->code['name'] === 'deleted_at') { return true; } if (ArraySearcher::arraySearchByAttribute( $this->entity->code['name'], $this->parentEntity->system->relations, 'morph_type' ) ) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllowedTypes() {\n return array('container', 'baseonly', 'substition','protected','disabled','formatting','paragraphs');\n }", "public function isAllowedDefault()\n {\n return !$this->crud->request['crud'];\n }", "public function getExplicitlyAllowAndDeny() {}", "public function getAllowedTypes()\n {\n return ['substition', 'protected', 'disabled', 'formatting'];\n }", "public function getEntityTypeAllowableValues()\n {\n return [\n self::ENTITY_TYPE_NATURAL_PERSON,\n self::ENTITY_TYPE_COMPANY,\n ];\n }", "function isOmitted()\n\t{\n\t\treturn TRUE;\n\t}", "public function getAllowSpecific();", "public function isModerador(){ return false; }", "protected function _isAllowed()\n {\n \treturn true;\n }", "public function forbiddenAction() {\n }", "function isAccessibleWithoutCode()\n\t{\n\t\treturn ($this->getAnonymize() == self::ANONYMIZE_OFF || \n\t\t\t$this->getAnonymize() == self::ANONYMIZE_FREEACCESS);\t\t\n\t}", "public function cant($ability, $arguments = []);", "public function cannot($ability, $arguments = []);", "public function isForbidden();", "public function non_null($type)\n {\n }", "protected function allow() {\n\t\t\n\t\treturn true;\n\t}", "static function allowed()\n {\n\n }", "public function isAdministrador(){ return false; }", "function setTypeAsHidden() {\n\t\t$this->type = \"hidden\";\n\t}", "public function getAllowedTypes();", "public function getAllowMissing()\n {\n return $this->allow_missing;\n }", "function is_hidden() {\n trigger_error('Admin class does not implement method <strong>is_hidden()</strong>', E_USER_WARNING);\n return;\n }", "public function getCanPublishAttribute()\n {\n return false;\n }", "public function canAddUnknownPerson();", "public function disableTypeChecks() {\n $this->doTypeChecks = false;\n }", "public function checkInlineFileTypeAccessForFieldForFieldNoFiletypesReturnsTrue() {}", "public function isNotAccessible()\n {\n return ! $this->isAccessible();\n }", "public function getLegalPersonTypeAllowableValues()\n {\n return [\n self::LEGAL_PERSON_TYPE_BUSINESS,\n self::LEGAL_PERSON_TYPE_ORGANIZATION,\n self::LEGAL_PERSON_TYPE_SOLETRADER,\n ];\n }", "public function getAllowedTypes()\n {\n return ['VI', 'MC', 'AE', 'DI', 'JCB', 'UN', 'MI', 'DN', 'BCMC', 'HIPERCARD','ELO', 'TROY', 'DANKORT'];\n }", "public function canSetCreatable();", "public function authorize()\r\n {\r\n return false;\r\n }", "public function getAllowedType()\n {\n return $this->_type;\n }", "abstract protected function getValidType(): string;", "public function getAllowedForcedTypes()\n {\n return $this->_allowedForcedTypes;\n }", "public function authorize() {\n\t\treturn false;\n }", "public function denyAccess(): AccessResultInterface;", "public function IsViewable() {\r\n return false;\r\n }", "function can_expose() {\n return FALSE;\n }", "public function isAllow() {\n return !$this->isEnabled();\n }", "public function viewableByOwnerOnly();", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public function authorize()\n {\n return false;\n }", "public static function allowed_types()\n {\n return self::$allowed_types;\n }", "public function testResourceTypeDisabling() {\n $this->assertFalse($this->resourceTypeRepository->getByTypeName('node--article')->isInternal());\n $this->assertFalse($this->resourceTypeRepository->getByTypeName('node--page')->isInternal());\n $this->assertFalse($this->resourceTypeRepository->getByTypeName('user--user')->isInternal());\n $disabled_resource_types = [\n 'node--page',\n 'user--user',\n ];\n \\Drupal::state()->set('jsonapi_test_resource_type_builder.disabled_resource_types', $disabled_resource_types);\n Cache::invalidateTags(['jsonapi_resource_types']);\n $this->assertFalse($this->resourceTypeRepository->getByTypeName('node--article')->isInternal());\n $this->assertTrue($this->resourceTypeRepository->getByTypeName('node--page')->isInternal());\n $this->assertTrue($this->resourceTypeRepository->getByTypeName('user--user')->isInternal());\n }", "public function getObjectAllowableValues()\n {\n return [\n self::OBJECT_CAMPAIGN,\n ];\n }", "public function canBeEdited()\n {\n return false;\n }", "public function testResourceTypeFieldDisabling() {\n $this->assertTrue($this->resourceTypeRepository->getByTypeName('node--article')->isFieldEnabled('uid'));\n $this->assertTrue($this->resourceTypeRepository->getByTypeName('node--page')->isFieldEnabled('uid'));\n $disabled_resource_type_fields = [\n 'node--article' => [\n 'uid' => TRUE,\n ],\n 'node--page' => [\n 'uid' => FALSE,\n ],\n ];\n \\Drupal::state()->set('jsonapi_test_resource_type_builder.disabled_resource_type_fields', $disabled_resource_type_fields);\n Cache::invalidateTags(['jsonapi_resource_types']);\n $this->assertFalse($this->resourceTypeRepository->getByTypeName('node--article')->isFieldEnabled('uid'));\n $this->assertTrue($this->resourceTypeRepository->getByTypeName('node--page')->isFieldEnabled('uid'));\n }", "public function isAllow()\n {\n return $this->allow;\n }", "public function testAccessDeniedNoSupportAttribute()\n {\n $this->attributes = ['NOT_IMAGE_EDIT'];\n\n $this->assertVoter(VoterInterface::ACCESS_DENIED);\n }", "public function getXsiTypeName() {\n return \"NotWhitelistedError\";\n }", "public function denyLink()\n {\n }", "public function throwNotAcceptable()\n {\n throw new Exception\\NotAcceptableException('Not Acceptable', 1449131015);\n }", "function permissions() {\r\n\t\treturn false;\r\n\t}", "public static function right_public(){return false;}", "static function denied()\n {\n\n }", "public function fillable();", "public function action_allowed_fields() {\n return array();\n }", "public static function set_inaccessible() {\n\t\tset_transient( self::transient_name(), self::INACCESSBILE, HOUR_IN_SECONDS );\n\t}", "public function isVisitante(){ return false; }", "function IsReadOnlyDataType($dataType) {\r\n\t return false;\r\n }", "public function canSetControllablePolicy();", "public static function getAllowedTypes();", "protected function getAllowedItems() {}", "protected function getAllowedItems() {}" ]
[ "0.6004903", "0.58311194", "0.58087206", "0.5798528", "0.57860863", "0.5763848", "0.5757639", "0.57420623", "0.57327193", "0.57321405", "0.57233804", "0.57055664", "0.5692895", "0.56898797", "0.56890625", "0.56840825", "0.56392884", "0.5582349", "0.5565974", "0.55518657", "0.5539888", "0.5507701", "0.5506183", "0.55012286", "0.5479367", "0.54540014", "0.5436726", "0.5427727", "0.54155403", "0.54128426", "0.5394677", "0.5386407", "0.53780967", "0.53491724", "0.5345764", "0.53388065", "0.5334781", "0.53334904", "0.5331097", "0.53262085", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.5320349", "0.53179395", "0.5307457", "0.53018874", "0.5289751", "0.5288952", "0.52731353", "0.526979", "0.5268039", "0.5265905", "0.5264914", "0.52580065", "0.525053", "0.5244437", "0.52362716", "0.52348185", "0.5222157", "0.5222027", "0.52214617", "0.5221203", "0.52208555", "0.5210309", "0.5210309" ]
0.0
-1
'details' => [ 'slugify' => [ 'origin' => 'title', ], 'validation' => [ 'rule' => 'unique:pages,slug', ], ], [ 'default' => '', 'null' => '', 'options' => [ '' => ' None ', ], 'relationship' => [ 'key' => 'id', 'label' => 'name', ], ] Image 'details' => [ 'resize' => [ 'width' => '1000', 'height' => 'null', ], 'quality' => '70%',isBelongTo 'width' => '300', 'height' => '250', ], ], ], ],
public function mountDetails() { $haveDetails = false; $array = []; // $array['options'] = [ // '' => '-- None --', // ]; if ($relation = $this->isBelongTo()) { $relationData = $relation->toArray(); if (!isset($this->parentEntity->system->mapperTableToClasses[$relationData['name']])) { return null; //@todo tratar erro de tabela que nao existe } // name, key, label $haveDetails = true; if (is_array($relationClassName = $this->parentEntity->system->mapperTableToClasses[$relationData['name']])) { $relationClassName = $relationClassName[0]; } $array['model'] = $relationClassName; $array['table'] = $relationData['name']; $array['method'] = $relationData['name']; $array['type'] = 'belongsTo'; $array['column'] = $this->getColumnName(); $array['key'] = $relation->returnPrimaryKeyFromIndexes(); $array['label'] = $relation->getDisplayName(); $array['pivot_table'] = $relationData['name']; $array['pivot'] = 0; }else if ($relation = $this->isMorphTo()) { // Filtra o Primeiro // @todo Ajeitar aqu dps // if (!isset($relation['table_target']) || !isset($this->parentEntity->system->mapperTableToClasses[$relation['table_target']])) { // dd( // 'deu ruim aqui mountcolumn', // $relation // ); // return null; //@todo tratar erro de tabela que nao existe // } // name, key, label $haveDetails = true; // Get Relation Data $relationData = $relation['relations'][0]; // Aqui invez do modelo fica a coluna que armazena o modelo $array['model'] = $relationData['morph_type']; $array['table'] = $relation['name']; $array['method'] = $relation['name']; $array['type'] = 'morphTo'; $array['column'] = $this->getColumnName(); $array['key'] = $relationData['ownerKey']; // id, code $array['label'] = 'name'; $array['pivot'] = 0; if ($relationData['pivot']) { $array['pivot'] = 1; $array['pivot_table'] = $relationData['pivot']; dd( 'fazer pivon', $relation, $array ); } } // Belongs to many // if ($relation = $this->isBelongTo()) { // // name, key, label // $haveDetails = true; // $array['model'] = $relationClassName; // $array['table'] = $relation['roles']; // $array['type'] = 'belongsToMany'; // $array['column'] = $relation['id']; // $array['key'] = $relation['key']; // $array['label'] = $relation['ladisplayNamebel']; // $array['pivot_table'] = $relation['user_roles']; // $array['pivot'] = 1; // @todo // $array['taggable'] = 0; // @todo // } if (in_array($this->getColumnType(), ['date', 'datetime', 'timestamp'])) { $haveDetails = true; // $array['format'] = '%A %d %B %Y'; //formatLocalized for Carbon // $array['format'] = 'Y-m-d G:i:s'; } if (in_array($this->getColumnType(), ['checkbox'])) { $haveDetails = true; $array['on'] = true; $array['off'] = true; } if (in_array($this->getColumnType(), ['select_dropdown', 'select_multiple'])) { $haveDetails = true; $array['options'] = true; } if (in_array($this->getColumnType(), ['media_picker'])) { $haveDetails = true; $array['show_as_images'] = true; } if (!$haveDetails) { return null; } return $array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function beforeValidate()\n\t\t\t\t{\n if (!$this->exists && !$this->slug)\n $this->slug = Str::slug($this->firstname.\" \".$this->middlename.\" \".$this->lastname);\n\t\t\t\t}", "public function rules()\n {\n $page = $this->route('page');\n return [\n 'title' => 'required|max:255',\n 'slug' => 'max:255|unique:pages'. (isset($page) ? ',slug,'. $page->id : null),\n 'imageThumbnail[]' => 'image|max:2048'\n ];\n }", "public function sluggable()\n {\n return 'title';\n }", "public function slugTarget(){\n\t\treturn 'title';\n\t}", "public function prepareForValidation()\n {\n if($this->slug) {\n $this->merge(['slug' => make_slug($this->slug)]);\n }else{\n $this->merge(['slug'=>make_slug($this->title)]);\n }\n}", "protected function slugField()\n {\n return 'slug';\n }", "public function getSlugKey()\n {\n return 'slug';\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'name',\n 'maxLength' => 90\n ]\n ];\n }", "public static function getSlugField()\n {\n return 'slug';\n }", "public function createSlug()\n {\n $slug = new Slugify();\n $this->slug = $slug->slugify($this->title);\n }", "public function rules()\n {\n return [\n 'title' => 'required|string|max:255',\n 'slug' => 'required|max:255|unique:pages,slug,' . $this->page->id,\n 'description' => 'max:300',\n 'content' => 'required',\n 'external_url' => 'nullable|url',\n 'section_id' => 'required|integer',\n ];\n }", "public function rules()\n {\n return [\n 'icon' => 'required',\n 'key' => 'required|string|unique:pages,key,' . request()->id,\n 'slug' => 'unique:pages,slug,' . request()->id,\n 'title' => 'required|min:3|string',\n 'short_description' => 'required|min:10|string',\n 'body' => 'required|min:40',\n ];\n }", "public function getName() {\n return 'Slug';\n }", "public function getRouteKeyName(){\n return 'slug';\n }", "public function getRouteKeyName(){\n return 'slug';\n }", "public function getRouteKeyName(){\n return 'slug';\n }", "public function sluggable()\n {\n return [\n 'page_slug' => [\n 'source' => 'page_title',\n 'maxLength' => null,\n 'maxLengthKeepWords' => true,\n 'method' => null,\n 'separator' => '-',\n 'unique' => true,\n 'uniqueSuffix' => null,\n 'includeTrashed' => false,\n 'reserved' => null,\n 'onUpdate' => false\n ]\n ];\n }", "public function rules()\n {\n $pageId = $this->getPageIdFromRouteParameter();\n $pageTable = config('pages.table.name.page', 'page');\n\n return [\n 'slug' => \"max:255|unique:$pageTable,slug,$pageId\",\n 'name' => 'max:255|required',\n 'title' => 'max:255',\n ];\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "function _acf_apply_unique_field_slug($slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug)\n{\n}", "public function rules()\n {\n return [\n 'img'=>'image',\n 'title'=>'unique:thepost_cats,title',\n 'title_en'=>'unique:thepost_cats,title_en', \n 'slug'=>'unique:thepost_cats,slug', \n 'meta_title'=>'unique:thepost_cats,meta_title,',\n 'meta_description'=>'unique:thepost_cats,meta_description,',\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function rules()\n {\n return [\n 'title' => 'required|max:100',\n 'slug' => 'nullable|max:100|unique:tags,slug',\n 'image' => 'nullable|image',\n 'banner_image' => 'nullable|image'\n ];\n }", "public function rules()\n {\n return [\n //\n 'descricao' => 'required',\n 'titulo' => array('max:20', 'required'),\n 'slug' => 'unique',\n \n ];\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n// 'title' => 'required' ,\n// 'page_slug' => 'required' ,\n// 'image' =>'mimes:jpg,jpeg,png,bmp',\n// 'image2' =>'mimes:jpg,jpeg,png,bmp',\n// 'image3' =>'mimes:jpg,jpeg,png,bmp',\n// 'image4' =>'mimes:jpg,jpeg,png,bmp',\n// 'cannonical_link'=> 'required',\n// 'seo_title'=> 'required',\n// 'seo_keyword'=> 'required',\n// 'seo_description'=> 'required',\n// 'status'=> 'required',\n ]);\n $image = $request -> file('image');\n $slug = str_slug($request->title);\n if(isset($image)) {\n $current_date = Carbon::now()->todatestring();\n $image_name = $slug . '-' . $current_date . '-' . uniqid() . '.' . $image->getClientOriginalExtension();\n if (!file_exists('upload/pages')) {\n mkdir('upload/pages', 0777, true);\n }\n $image->move('upload/pages', $image_name);\n }\n else{\n $image_name='default.png';\n }\n $image2 = $request -> file('image2');\n $slug = str_slug($request->title);\n if(isset($image2)) {\n $current_date2 = Carbon::now()->todatestring();\n $image_name2 = $slug . '-' . $current_date2 . '-' . uniqid() . '.' . $image2->getClientOriginalExtension();\n if (!file_exists('upload/pages')) {\n mkdir('upload/pages', 0777, true);\n }\n $image2->move('upload/pages', $image_name2);\n }\n else{\n $image_name2='default.png';\n }\n $image3 = $request -> file('image3');\n $slug = str_slug($request->title);\n if(isset($image3)) {\n $current_date3 = Carbon::now()->todatestring();\n $image_name3 = $slug . '-' . $current_date3 . '-' . uniqid() . '.' . $image3->getClientOriginalExtension();\n if (!file_exists('upload/pages')) {\n mkdir('upload/pages', 0777, true);\n }\n $image3->move('upload/pages', $image_name3);\n }\n else{\n $image_name3='default.png';\n }\n $image4 = $request -> file('image4');\n $slug = str_slug($request->title);\n if(isset($image4)) {\n $current_date4 = Carbon::now()->todatestring();\n $image_name4 = $slug . '-' . $current_date4 . '-' . uniqid() . '.' . $image4->getClientOriginalExtension();\n if (!file_exists('upload/pages')) {\n mkdir('upload/pages', 0777, true);\n }\n $image4->move('upload/pages', $image_name4);\n }\n else{\n $image_name4='default.png';\n }\n $pages = new Pages();\n $pages->title= $request->title;\n $pages->page_slug= $request->page_slug;\n $pages->body=$request->froala;\n $pages->image=$image_name;\n $pages->image2=$image_name2;\n $pages->image3=$image_name3;\n $pages->image4=$image_name4;\n $pages->cannonical_link=$request->cannonical_link;\n $pages->seo_title=$request->seo_title;\n $pages->seo_keyword=$request->seo_keyword;\n $pages->seo_description=$request->seo_description;\n $pages->status=$request->status;\n $pages->created_by=auth()->user()->name;\n $pages->save();\n return json_encode([\"response\" => \"Done\"]); }", "public function rules()\n {\n $rules= [\n 'title' => 'required|max:200',\n 'slug' => 'unique:articles,slug',\n 'body' => 'required',\n 'category' => 'required|max:30',\n 'cover' => 'sometimes|mimes:jpg,jpeg,png,bmp',\n ];\n\n if ($this->is('admin/articles/update/*')) {\n $rules['slug'] = 'unique:articles,slug,' . $this->input('id');\n }\n \n return $rules;\n }", "public function rules()\n {\n $id = Request::segment(count(Request::segments())); //Current model ID\n\n return [\n 'title' => 'required',\n 'excerpt' => 'required|max:555',\n 'slug' => 'required|unique:blogs,slug,'.$id,\n 'content' => 'required',\n 'status' => 'required',\n 'image' => 'mimes:jpg,jpeg,png,gif',\n ];\n }", "public function initializeSlug(){\n if(empty($this->slug)){\n $slugify = Slugify::create();\n $this->slug = $slugify->slugify($this->title);\n }\n }", "public function sluggable(): array\n {\n return ['slug' => ['source' => 'title']];\n }", "public function getFieldSlug();", "public function sluggable() {\n return [\n 'slug_curso' => [\n 'source' => 'titulo'\n ]\n ];\n }", "public function slug();", "public function slug();", "public function sluggable(): array\n {\n return [\n 'slug' => [\n 'source' => 'title',\n ],\n ];\n }", "public function sluggable()\n {\n return [\n 'slug'=>[\n 'source' => 'name'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'description'\n ]\n ];\n }", "public function sluggable()\n {\n return ['slug' =>\n ['source' => 'name',],\n ];\n }", "public function sluggable(): array\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable(): array\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable(): array\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable(): array\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable(): array\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable(): array\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable(): array\n {\n return [\n 'slug' => [\n 'source' => 'judul'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'titre'\n ]\n ];\n }", "public function getSlugKeyName(): string;", "function _acf_apply_unique_field_group_slug($slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug)\n{\n}", "public function rules() : array\n {\n return [\n 'id'=> 'required|string',\n 'title' => 'string|min:3|unique:service_pages,title',\n 'content' => 'string|min:10',\n //'slug' => 'string|min:2|max:30',\n 'order' => 'integer|min:0',\n 'status' => 'boolean',\n ];\n }", "public function rules()\n {\n return [\n 'name' => 'required',\n 'slug' => 'max:200|unique:categories',\n 'description' => 'string|max:1000',\n// 'category_id' => 'required|integer|exists:blog_categories,id'\n ];\n }", "public function sluggable() : array\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function getRouteKeyName()\n {\n \treturn 'slug';\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title',\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title',\n ],\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title',\n ],\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'slug_or_title',\n ],\n ];\n }", "public function rules()\n {\n return [\n 'title' => 'required|max:255',\n 'slug' => 'required|max:255|unique:sections,slug' . $this->idOrEmpty,\n 'order' => 'required|integer|between:1,999',\n 'image_id' => 'integer|exists:images,id',\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title'\n ]\n ];\n }", "public function setSlugAttribute()\n {\n $title = $this->attributes['title'];\n $this->attributes['slug'] = Str::slug($title, '-');\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => ['title']\n ]\n ];\n }", "public function getRouteKeyName()\n {\n return \"slug\";\n }", "public function sluggable()\n\t{\n\t\treturn [\n\t\t\t'slug' => [\n\t\t\t\t'source' => 'name'\n\t\t\t]\n\t\t];\n\t}", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'name'\n ]\n ];\n }", "public function sluggable()\n\t{\n\t\treturn [\n\t\t\t'slug' => [\n\t\t\t\t'source' => 'slug_or_title',\n\t\t\t],\n\t\t];\n\t}", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'judul'\n ]\n ];\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'title' => 'required|max:255',\n 'sub_title' => 'required|max:255',\n 'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n\n\n $data = new Section();\n $data->title = $request->title;\n $data->sub_title = $request->sub_title;\n $slug = $data->sub_title;\n $data->content = $request->content;\n if($request->file('image')){\n $image = $request->file('image');\n $filename = str_slug($slug) . '.' . $image->getClientOriginalExtension();\n $location = public_path('/image/' .$filename);\n Image::make($image)->resize(500, 300)->save($location);\n // $data->image = '/image/upload/'.str_slug($data->title).'.'.$request->image->getClienOriginalExtension();\n // $request->image->move(public_path('/image/upload'), $data->image);\n $data->image = $filename;\n }\n\n $data->save();\n\n return redirect()->back();\n }", "public function getSluggableFields()\n {\n return [ 'title' ];\n }", "public function get_slug(){ return $this->slug; }", "public function slug(): string;", "public function store(Request $request)\n {\n $this->validate($request,[\n 'image' => 'mimes:jpeg,jpg,png,pdf|max:2048|dimensions:max_width=510,max_height=382|nullable'\n \n ]);\n $image = $request->file('image');\n // $slug = str_slug($request->title);\n if(null!==($image)){\n $currentDate = Carbon::now()->toDateString();\n $imageName = '-'. $currentDate .'-'. uniqid() .'.'. $image->getClientOriginalExtension();\n if(!file_exists('uploads/photogallary')){\n mkdir('uploads/photogallary',0777,true);\n }\n $image->move('uploads/photogallary',$imageName);\n } else {\n $imageName = ('no');\n }\n\n $item = new PhotoGallary();\n $item->image = $imageName;\n $item->save();\n return redirect()->route('photoGallary.index')->with('message','Photo Successfully Added');\n\n }", "public function sluggable(): array\n {\n return [\n 'slug' => [\n 'source' => 'name'\n ]\n ];\n }", "public function sluggable(): array\n {\n return [\n 'slug' => [\n 'source' => 'name'\n ]\n ];\n }", "public function sluggable(): array\n {\n return [\n 'slug' => [\n 'source' => 'name'\n ]\n ];\n }", "public function sluggable(): array\n {\n return [\n 'slug' => [\n 'source' => 'name'\n ]\n ];\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title',\n 'onUpdate' => true\n ]\n ];\n }", "function wp_unique_post_slug($slug, $post_id, $post_status, $post_type, $post_parent)\n {\n }", "public function store(Request $request) {\n $file = $request->url;\n $name = $request->name;\n $bio = $request->bio;\n $validator = Validator::make($request->all(), [\n 'name' =>'required|unique:artists|max:255', \n 'url' => 'required_with:name|image', \n ]);\n if($validator->fails()){ \n Session::flash('flash_message', 'Something went wrong!');\n Session::flash('flash_class', 'alert-danger');\n }else{\n $extension = $file->getClientOriginalExtension(); \n $filename = rand(11111,99999).'.'.$extension; // renameing image\n $tmp_path = public_path('artists/thumbnail/');\n $letmovefiles = $file->move($tmp_path, $filename);\n $full = $tmp_path.$filename;\n $destinationPath = public_path('artists/');\n if ($_FILES['url']) {\n $image = Image::make($full);\n $image->resize(300, 300)->save();\n $new_path = $destinationPath;\n rename($destinationPath,$new_path); \n }\n $getlnik = url('artists/thumbnail').'/'.$filename;\n $data = array(\n 'name' => $name,\n 'bio' => $bio,\n 'url' => $getlnik,\n );\n $save = DB::table('artists')->insert($data);\n Session::flash('flash_message', 'Artist added!');\n Session::flash('flash_class', 'alert-success');\n }\n return redirect('admin/artists');\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'title',\n 'onUpdate' => true,\n ]\n ];\n }", "public function behaviors(){\n\t return array(\n\t 'sluggable' => array(\n\t\t 'class'=>'frontend.extensions.behaviors.SluggableBehavior',\n\t\t 'columns' => array('page_slug'),\n\t\t 'slugColumn' => 'page_slug',\n\t\t 'unique' => true,\n\t\t 'update' => true,\n\t ),\n\t );\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'ofi_direccion'\n ]\n ];\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function sluggable(): array\n\t{\n\t\treturn [\n\t\t\t'slug' => [\n\t\t\t\t'source' => 'name',\n\t\t\t],\n\t\t];\n\t}" ]
[ "0.62904805", "0.6211641", "0.6108396", "0.6044133", "0.6008199", "0.6007775", "0.5972313", "0.5932869", "0.59323895", "0.5920545", "0.5894382", "0.5887603", "0.5870198", "0.58572423", "0.58572423", "0.58572423", "0.58567053", "0.5840874", "0.5831277", "0.5822237", "0.58134896", "0.5788839", "0.577567", "0.5772253", "0.5764775", "0.5742545", "0.5738875", "0.57192814", "0.57167983", "0.5679874", "0.5660121", "0.565894", "0.565894", "0.5658443", "0.5658238", "0.56524134", "0.56519634", "0.5636273", "0.5636273", "0.5636273", "0.5636273", "0.5636273", "0.5636273", "0.56279236", "0.5625243", "0.561871", "0.5614231", "0.56111944", "0.56056523", "0.55993414", "0.55841166", "0.55798733", "0.5576285", "0.5576285", "0.5564694", "0.55533975", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5552299", "0.5549468", "0.554807", "0.55468047", "0.5543166", "0.554284", "0.5538828", "0.55334955", "0.5525842", "0.5509712", "0.5484568", "0.54841626", "0.54838246", "0.54808", "0.54808", "0.54808", "0.54808", "0.5476568", "0.54754776", "0.5472227", "0.54572725", "0.5450044", "0.54473287", "0.54464984", "0.54460716" ]
0.0
-1
name" => "gasto_MorphMany_person" "table_origin" => "gastos" "table_target" => "persons" "pivot" => 0 "type" => "MorphMany" "relations" => array:1 [ 0 => array:12 [ "origin_table_class" => "Telefonica\Models\Actors\Person" "origin_foreignKey" => "gastoable_id" "related_table_class" => "Casa\Models\Economic\Gasto" "is_inverse" => false "pivot" => false "name" => "gastos" "type" => "MorphMany" "model" => "Casa\Models\Economic\Gasto" "ownerKey" => "code" "foreignKey" => "gastoable_id" "morph_type" => "gastoable_type" "related_foreignKey" => "code" ]
protected function isMorphTo() { // if (isset($this->parentEntity->system->relationsMorphs[$this->getColumnName()])) { // return $this->parentEntity->system->relationsMorphs[$this->getColumnName()]; // } /** * Old Verifica pelo Atributo */ // if ($this->className==\Population\Models\Market\Abouts\Info::class // && $this->entity->code['name']!=='id'&& $this->entity->code['name']!=='text' // ) { if ($searchForeachKey = ArraySearcher::arraySearchByAttribute( $this->entity->code['name'], // $this->parentEntity->system->tables, $this->parentEntity->system->relations, 'foreignKey' ) ) { $isMorph = false; $found = []; foreach ($searchForeachKey as $valorFound) { if (in_array($this->parentEntity->system->relations[$valorFound]['type'], ['MorphMany', 'MorphTo'])) { $isMorph = true; $found[] = $this->parentEntity->system->relations[$valorFound]; } } // dd($found); if ($isMorph) { return $found[count($found)-1]; } } // dd( // $this->className, // $this->entity->code, // $this->renderDatabaseData // ); // } if (strpos($this->getColumnName(), 'able') !== false) { Log::channel('sitec-support')->warning( 'Problema no morph para coluna '.$this->getColumnName() ); // dd( // $this->getColumnName(), // 'debug1' // ); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function personas(){\n\n return $this->morphedByMany(Persona::class, 'cargoable'); //relacion muchos a muchos \"una persona tiene muchos cargos y un cargo tiene muchas personas\"\n }", "protected static function _relations() {\n\n\t}", "protected function relationships(): array\n {\n return [];\n }", "public function morphologys1()\n {\n return $this->belongsToMany('App\\SkeletalElement', 'se_morphology', 'se_id', 'morphology_id')\n ->withoutGlobalScope(ProjectScope::class)\n ->withPivot('se_id', 'morphology_id', 'org_id', 'project_id', 'created_by', 'updated_by')\n ->withTimestamps();\n }", "public function morphologys()\n {\n return $this->belongsToMany('App\\SkeletalElement', 'se_morphology', 'morphology_id', 'se_id')\n ->withoutGlobalScope(ProjectScope::class)\n ->withPivot('se_id', 'morphology_id', 'org_id', 'project_id', 'created_by', 'updated_by')\n ->withTimestamps();\n }", "public static function relations()\n {\n return [\n// 'gender' => ['Gender', 'gender'],\n// 'gender' => 'Gender',\n ];\n }", "public function getRelations();", "public function getRelations();", "protected function getRelations()\n {\n return array();\n }", "public function relations()\n {\n // class name for the relations automatically generated below.\n return array(\n \n );\n }", "public function morphologys2()\n {\n return $this->belongsToMany('App\\SkeletalElement', 'se_morphology', 'morphology_id', 'se_id')\n ->withoutGlobalScope(ProjectScope::class)\n ->withPivot('se_id', 'morphology_id', 'org_id', 'project_id', 'created_by', 'updated_by')\n ->withTimestamps();\n }", "public function related(): ?array;", "public function getTypeRelations(): array\n {\n $fields = [];\n foreach ($this->fieldsArray(true, false) as $relation) {\n $model = $this->modelRelflection();\n $relationType = $model->getMethod($relation)->getReturnType()->getName();\n $type = '';\n\n // The return of a relation is always a list of the defined type for\n // related relation. We have explicitly defined the available\n // supported relation by Laravel to prune any future bug.\n if (in_array($relationType, [\n BelongsTo::class,\n BelongsToMany::class,\n HasMany::class,\n HasManyThrough::class,\n HasOne::class,\n HasOneOrMany::class,\n HasOneThrough::class,\n MorphMany::class,\n MorphOne::class,\n MorphOneOrMany::class,\n MorphPivot::class,\n MorphTo::class,\n MorphToMany::class,\n ])) {\n $type = Type::listOf(GraphQL::type($this->getRelatedType($relation)));\n }\n\n $fields[$relation] = [\n 'name' => $relation,\n 'type' => $type,\n 'args' => $this->getQueryArgs(),\n 'resolve' => function ($root, $args, $context, ResolveInfo $resolveInfo) use ($relation) {\n return $this->getQueryResolve($root->$relation(), $args, $context, $resolveInfo, function () {\n })->get();\n },\n ];\n }\n\n return $fields;\n }", "public function persons()\n {\n return $this->morphedByMany(\\Illuminate\\Support\\Facades\\Config::get('sitec.core.models.person', \\Telefonica\\Models\\Actors\\Person::class), 'skillable');\n }", "public function getWithRelations();", "abstract public static function relations() : ? array;", "public function relationNames()\n {\n return [\n 'pegawais'\n ];\n }", "private static function getsRelationsHasOne(array $relationMap) : ? array {\n $relations = static::relations();\n\n foreach ($relations as $key => $value) {\n if ($value['has'] == 'one') {\n $relationMap[$key] = $value;\n\n $classNamespace = '\\\\' . $value['model'];\n //$childRelations = $classNamespace::relations();\n\n\n\n }\n }\n var_dump($relationMap);die;\n return $relationMap;\n }", "public function setRelations() {}", "public function relationNames()\n {\n return [];\n }", "public static function workflowRelations();", "abstract function relations();", "public function buildRelations()\n\t{\n $this->addRelation('Tbnecesespecial', 'Tbnecesespecial', RelationMap::MANY_TO_ONE, array('id_neces_especial' => 'id_neces_especial', ), null, null);\n $this->addRelation('Tbcidade', 'Tbcidade', RelationMap::MANY_TO_ONE, array('naturalidade' => 'id_cidade', ), null, null);\n $this->addRelation('Tbpais', 'Tbpais', RelationMap::MANY_TO_ONE, array('nacionalidade' => 'id_pais', ), null, null);\n $this->addRelation('TblogradouroRelatedByCep', 'Tblogradouro', RelationMap::MANY_TO_ONE, array('cep' => 'cep', ), null, null);\n $this->addRelation('Tbcursoversao', 'Tbcursoversao', RelationMap::MANY_TO_ONE, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbtipoingresso', 'Tbtipoingresso', RelationMap::MANY_TO_ONE, array('id_tipo_ingresso' => 'id_tipo_ingresso', ), null, null);\n $this->addRelation('Tbalunosituacao', 'Tbalunosituacao', RelationMap::MANY_TO_ONE, array('id_situacao' => 'id_situacao', ), null, null);\n $this->addRelation('TbinstexternaRelatedByIdDestino', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_destino' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedById2grau', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_2grau' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedById3grau', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_3grau' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedByIdTrabalho', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_trabalho' => 'id_inst_externa', ), null, null);\n $this->addRelation('TblogradouroRelatedByCepTrabalho', 'Tblogradouro', RelationMap::MANY_TO_ONE, array('cep_trabalho' => 'cep', ), null, null);\n $this->addRelation('Tbpolos', 'Tbpolos', RelationMap::MANY_TO_ONE, array('id_polo' => 'id_polo', ), null, null);\n $this->addRelation('Tbalunoracacor', 'Tbalunoracacor', RelationMap::MANY_TO_ONE, array('id_raca' => 'id_raca', ), null, null);\n $this->addRelation('Tbpendencia', 'Tbpendencia', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunodiploma', 'Tbalunodiploma', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunosenha', 'Tbalunosenha', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunosolicitacao', 'Tbalunosolicitacao', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbbanca', 'Tbbanca', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbfila', 'Tbfila', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbhistorico', 'Tbhistorico', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('TbturmaAluno', 'TbturmaAluno', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n\t}", "private function _set_relationships()\n {\n if(empty($this->_relationships))\n {\n $options = array('has_one','has_many','has_many_pivot');\n foreach($options as $option)\n {\n if(isset($this->{$option}) && !empty($this->{$option}))\n {\n foreach($this->{$option} as $key => $relation)\n {\n $foreign_model = (is_array($relation)) ? $relation[0] : $relation;\n $foreign_model_name = strtolower($foreign_model);\n $this->load->model($foreign_model_name);\n $foreign_table = $this->{$foreign_model_name}->table;\n if($option=='has_many_pivot')\n {\n $tables = array($this->table, $foreign_table);\n sort($tables);\n $pivot_table = $tables[0].'_'.$tables[1];\n $foreign_key = (is_array($relation)) ? $relation[1] : $this->{$foreign_model_name}->primary;\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n else\n {\n $foreign_key = (is_array($relation)) ? $relation[1] : singular($this->table) . '_id';\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n $this->_relationships[$key] = array('relation' => $option, 'relation_key' => $key, 'foreign_model' => $foreign_model_name, 'foreign_table' => $foreign_table, 'foreign_key' => $foreign_key, 'local_key' => $local_key);\n ($option == 'has_many_pivot') ? ($this->_relationships[$key]['pivot_table'] = $pivot_table) : FALSE;\n\n }\n }\n }\n }\n }", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function objects() {\n \t// return call_user_func_array($this->belongsToMany('Object')->withPivot, static::$pivotColumns);\n return $this->belongsToMany('Object')\n ->withPivot('subdivision', 'time', 'place', 'form');\n }", "public function peliculas(){\n //retornar tipo de relacion\n return $this->belongsToMany('App\\Pelicula','pelicula_director');\n }", "public function getRelationships(): ?array;", "public function buildRelations()\n {\n $this->addRelation('CiOptionsRelatedByIdOptionTipoAsociado', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_option_tipo_asociado',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('CiOptionsRelatedByIdOptionNivelAsociado', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_option_nivel_asociado',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('CiUsuariosRelatedByInvitadoPor', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':invitado_por',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('CiOptionsRelatedByIdOpcionRole', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_opcion_role',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('HbfTurnosRelatedByIdTurno', '\\\\HbfTurnos', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_turno',\n 1 => ':id_turno',\n ),\n), null, null, null, false);\n $this->addRelation('HbfSesionesRelatedByIdSesion', '\\\\HbfSesiones', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_sesion',\n 1 => ':id_sesion',\n ),\n), null, null, null, false);\n $this->addRelation('CiOptionsRelatedByIdTipoUsuario', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_tipo_usuario',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('HbfClubsRelatedByIdClub', '\\\\HbfClubs', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_club',\n 1 => ':id_club',\n ),\n), null, null, null, false);\n $this->addRelation('CiModulosRelatedByIdUserCreated', '\\\\CiModulos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiModulossRelatedByIdUserCreated', false);\n $this->addRelation('CiModulosRelatedByIdUserModified', '\\\\CiModulos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiModulossRelatedByIdUserModified', false);\n $this->addRelation('CiOptionsRelatedByIdUserCreated', '\\\\CiOptions', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiOptionssRelatedByIdUserCreated', false);\n $this->addRelation('CiOptionsRelatedByIdUserModified', '\\\\CiOptions', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiOptionssRelatedByIdUserModified', false);\n $this->addRelation('CiSessions', '\\\\CiSessions', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_usuario',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiSessionss', false);\n $this->addRelation('CiSettingsRelatedByIdUserCreated', '\\\\CiSettings', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiSettingssRelatedByIdUserCreated', false);\n $this->addRelation('CiSettingsRelatedByIdUserModified', '\\\\CiSettings', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiSettingssRelatedByIdUserModified', false);\n $this->addRelation('CiUsuariosRelatedByIdUsuario', '\\\\CiUsuarios', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':invitado_por',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiUsuariossRelatedByIdUsuario', false);\n $this->addRelation('HbfClubsRelatedByIdUserCreated', '\\\\HbfClubs', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfClubssRelatedByIdUserCreated', false);\n $this->addRelation('HbfClubsRelatedByIdUserModified', '\\\\HbfClubs', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfClubssRelatedByIdUserModified', false);\n $this->addRelation('HbfComandasRelatedByIdUserCreated', '\\\\HbfComandas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfComandassRelatedByIdUserCreated', false);\n $this->addRelation('HbfComandasRelatedByIdUserModified', '\\\\HbfComandas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfComandassRelatedByIdUserModified', false);\n $this->addRelation('HbfComandasRelatedByIdCliente', '\\\\HbfComandas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfComandassRelatedByIdCliente', false);\n $this->addRelation('HbfDetallesPedidosRelatedByIdUserCreated', '\\\\HbfDetallesPedidos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfDetallesPedidossRelatedByIdUserCreated', false);\n $this->addRelation('HbfDetallesPedidosRelatedByIdUserModified', '\\\\HbfDetallesPedidos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfDetallesPedidossRelatedByIdUserModified', false);\n $this->addRelation('HbfEgresosRelatedByIdUserCreated', '\\\\HbfEgresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfEgresossRelatedByIdUserCreated', false);\n $this->addRelation('HbfEgresosRelatedByIdUserModified', '\\\\HbfEgresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfEgresossRelatedByIdUserModified', false);\n $this->addRelation('HbfEgresosRelatedByIdCliente', '\\\\HbfEgresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfEgresossRelatedByIdCliente', false);\n $this->addRelation('HbfIngresosRelatedByIdUserCreated', '\\\\HbfIngresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfIngresossRelatedByIdUserCreated', false);\n $this->addRelation('HbfIngresosRelatedByIdUserModified', '\\\\HbfIngresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfIngresossRelatedByIdUserModified', false);\n $this->addRelation('HbfIngresosRelatedByIdCliente', '\\\\HbfIngresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfIngresossRelatedByIdCliente', false);\n $this->addRelation('HbfPorcionesRelatedByIdUserCreated', '\\\\HbfPorciones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPorcionessRelatedByIdUserCreated', false);\n $this->addRelation('HbfPorcionesRelatedByIdUserModified', '\\\\HbfPorciones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPorcionessRelatedByIdUserModified', false);\n $this->addRelation('HbfPrepagosRelatedByIdCliente', '\\\\HbfPrepagos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPrepagossRelatedByIdCliente', false);\n $this->addRelation('HbfPrepagosRelatedByIdUserCreated', '\\\\HbfPrepagos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPrepagossRelatedByIdUserCreated', false);\n $this->addRelation('HbfPrepagosRelatedByIdUserModified', '\\\\HbfPrepagos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPrepagossRelatedByIdUserModified', false);\n $this->addRelation('HbfProductosRelatedByIdUserCreated', '\\\\HbfProductos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfProductossRelatedByIdUserCreated', false);\n $this->addRelation('HbfProductosRelatedByIdUserModified', '\\\\HbfProductos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfProductossRelatedByIdUserModified', false);\n $this->addRelation('HbfSesionesRelatedByIdUserCreated', '\\\\HbfSesiones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfSesionessRelatedByIdUserCreated', false);\n $this->addRelation('HbfSesionesRelatedByIdUserModified', '\\\\HbfSesiones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfSesionessRelatedByIdUserModified', false);\n $this->addRelation('HbfSesionesRelatedByIdAsociado', '\\\\HbfSesiones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_asociado',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfSesionessRelatedByIdAsociado', false);\n $this->addRelation('HbfTurnosRelatedByIdUserCreated', '\\\\HbfTurnos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfTurnossRelatedByIdUserCreated', false);\n $this->addRelation('HbfTurnosRelatedByIdUserModified', '\\\\HbfTurnos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfTurnossRelatedByIdUserModified', false);\n $this->addRelation('HbfTurnosRelatedByIdAsociado', '\\\\HbfTurnos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_asociado',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfTurnossRelatedByIdAsociado', false);\n $this->addRelation('HbfVasosRelatedByIdUserModified', '\\\\HbfVasos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), 'CASCADE', 'CASCADE', 'HbfVasossRelatedByIdUserModified', false);\n $this->addRelation('HbfVasosRelatedByIdUserCreated', '\\\\HbfVasos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), 'CASCADE', 'CASCADE', 'HbfVasossRelatedByIdUserCreated', false);\n $this->addRelation('HbfVentasRelatedByIdUserCreated', '\\\\HbfVentas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfVentassRelatedByIdUserCreated', false);\n $this->addRelation('HbfVentasRelatedByIdUserModified', '\\\\HbfVentas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfVentassRelatedByIdUserModified', false);\n $this->addRelation('HbfVentasRelatedByIdCliente', '\\\\HbfVentas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfVentassRelatedByIdCliente', false);\n }", "private function hasMany($array){\n\t\t$result = $this->parseRelation($array);\n\t\t$model = $result['model'];\n\t\t$forKey = $result['forKey'];\n\t\t$table = $result['table'];\n\t\t$priKey = $result['priKey'];\n\t\t$this->_db()->select($priKey)->from($table)->where($forKey,$this->id)->get();\n\t\t$results = $this->_db()->results();\n\t\t$entities = array();\n\t\tforeach($results as $k => $v){\n\t\t\t$entities[] = new $model($v[$priKey]);\t\n\t\t}\n\t\treturn $entities;\n\t}", "public function correspondences(){\n return $this ->hasMany('App\\Correspondence');\n }", "public function people()\n\t{\treturn $this->hasMany('App\\Person');\n\t}", "public function metas()\n {\n return $this->morphMany('App\\Meta','metable');\n }", "private function parseRelations()\n {\n if ($this->parentRelations === null) {\n $this->parentRelations = [];\n $this->parentEntities = [];\n $this->childEntities = [];\n $this->childRelations = [];\n $this->siblingEntities = [];\n $this->siblingRelations = [];\n foreach ($this->getModule()->getRelations() as $relation) {\n if ($relation->getEntityOneInstance() === $this) {\n if ($relation->getType() === Relation::TYPE_ONE_TO_MANY) {\n $this->childRelations[] = $relation;\n $childEntity = $relation->getRelatedEntity($this);\n $this->childEntities[$childEntity->getNameSingular()] = $childEntity;\n } elseif ($relation->getType() === Relation::TYPE_MANY_TO_MANY) {\n $siblingEntity = $relation->getRelatedEntity($this);\n $this->siblingRelations[] = $relation;\n $this->siblingEntities[$siblingEntity->getNameSingular()] = $siblingEntity;\n }\n }\n if ($relation->getEntityTwoInstance() === $this) {\n if ($relation->getType() === Relation::TYPE_ONE_TO_MANY) {\n $this->parentRelations[] = $relation;\n $parentEntity = $relation->getRelatedEntity($this);\n $this->parentEntities[$parentEntity->getNameSingular()] = $parentEntity;\n } elseif ($relation->getType() === Relation::TYPE_MANY_TO_MANY) {\n $siblingEntity = $relation->getRelatedEntity($this);\n $this->siblingRelations[] = $relation;\n $this->siblingEntities[$siblingEntity->getNameSingular()] = $siblingEntity;\n }\n }\n }\n }\n }", "public function relations()\r\n {\r\n return $this->relations;\r\n }", "public function getRelations()\n {\n $out = array();\n foreach($this->_map as $bind => $field)\n {\n if(is_array($field) && isset($field[self::MAP_TYPE]) && in_array($field[self::MAP_TYPE],\n self::$_relationTypes))\n {\n $out[$bind] = $field;\n }\n }\n return $out;\n }", "public function buildRelations()\n\t{\n $this->addRelation('Genero', 'Genero', RelationMap::MANY_TO_ONE, array('id_genero' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tematica', 'Tematica', RelationMap::MANY_TO_ONE, array('id_tematica' => 'id', ), null, 'CASCADE');\n $this->addRelation('Autor', 'Autor', RelationMap::MANY_TO_ONE, array('id_autor' => 'id', ), null, 'CASCADE');\n $this->addRelation('Materia', 'Materia', RelationMap::MANY_TO_ONE, array('id_materia' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tipopublicacion', 'Tipopublicacion', RelationMap::MANY_TO_ONE, array('id_tipopublicacion' => 'id', ), null, 'CASCADE');\n\t}", "public function buildRelations()\n\t{\n $this->addRelation('Tbformacao', 'Tbformacao', RelationMap::MANY_TO_ONE, array('id_formacao' => 'id_formacao', ), null, null);\n $this->addRelation('Tbcurso', 'Tbcurso', RelationMap::MANY_TO_ONE, array('cod_curso' => 'cod_curso', ), null, null);\n $this->addRelation('Tbturno', 'Tbturno', RelationMap::MANY_TO_ONE, array('id_turno' => 'id_turno', ), null, null);\n $this->addRelation('Tbcampus', 'Tbcampus', RelationMap::MANY_TO_ONE, array('id_campus' => 'id_campus', ), null, null);\n $this->addRelation('Tbsetor', 'Tbsetor', RelationMap::MANY_TO_ONE, array('id_setor' => 'id_setor', ), null, null);\n $this->addRelation('Tbalunomatricula', 'Tbalunomatricula', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbalunobackup', 'Tbalunobackup', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbfilacalouros', 'Tbfilacalouros', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbvagas', 'Tbvagas', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbloadaluno', 'Tbloadaluno', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbaluno', 'Tbaluno', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbcurriculodisciplinas', 'Tbcurriculodisciplinas', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbdisciplinarequisitos', 'Tbdisciplinarequisitos', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbdisciplinacorequisitos', 'Tbdisciplinacorequisitos', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbcoordenadorcurso', 'Tbcoordenadorcurso', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n\t}", "public function person()\n {\n return $this->belongsTo(PersonProxy::modelClass());\n }", "public function person()\n {\n return $this->belongsTo(PersonProxy::modelClass());\n }", "public function docentes(){\n return $this->belongsToMany('App\\Docente', 'asignatura_docente_grupo')\n ->withPivot('asignatura_id', 'responsable');\n }", "public function relationNames()\n {\n return [\n 'siswa'\n ];\n }", "public function getPersonaPivots()\n {\n return $this->Personas_->merge($this->Parents_);\n }", "public function relationNames()\n {\n return [\n 'akumulasiPoint',\n 'sanksi',\n 'siswa'\n ];\n }", "public function get_relations_for_js() {\n\n\t\t\t$relations = $this->get_active_relations();\n\t\t\t$result = array();\n\n\t\t\tif ( ! empty( $relations ) ) {\n\t\t\t\tforeach ( $relations as $key => $relation ) {\n\t\t\t\t\t$result[] = array(\n\t\t\t\t\t\t'value' => $key,\n\t\t\t\t\t\t'label' => $relation['name'],\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $result;\n\n\t\t}", "public function photos(){\n return $this->morphMany('App\\Models\\Photo','image');\n \n }", "abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null);", "public function relationNames()\n {\n return [\n 'immobilien',\n 'kunde'\n ];\n }", "public function getRelations()\n\t{\n\t\t$relations = $this->resource->relations;\n\n\t\t$results = array();\n\t\tforeach($relations as $relation)\n\t\t{\n\t\t\t$other = $relation->other;\n\t\t\t$name = $relation->name;\n\n\t\t\t$otherClass = null;\n\t\t\tif( ! is_null($other))\n\t\t\t{\n\t\t\t\t$otherClass = $other->getNamespaceFor('model').'\\\\'.$other->name;\n\t\t\t}\n\n\t\t\t$stub = layla_module_stubs_path().'model/'.strtolower($relation->type).'.stub';\n\t\t\t$data = compact('name', 'otherClass');\n\n\t\t\t$content = eval_blade($stub, $data);\n\n\t\t\t$results[] = $this->increaseTabs($content);\n\t\t}\n\n\t\treturn $results;\n\t}", "public function genres()\n {\n return $this->belongsToMany('App/Genre', 'eventmanager_genre', 'genres_id', 'genres_id');\n }", "public function getMorphByUserRelation($relationship);", "public function galleries(): MorphMany\n {\n return $this->morphMany(Gallery::class, 'gallery');\n }", "public function associationData()\n {\n return [\n 'many-to-one' => [\n ClassMetadata::MANY_TO_ONE,\n 'orm_many_to_one',\n ],\n 'one-to-many' => [\n ClassMetadata::ONE_TO_MANY,\n 'orm_one_to_many',\n ],\n 'one-to-one' => [\n ClassMetadata::ONE_TO_ONE,\n 'orm_one_to_one',\n ],\n 'many-to-many' => [\n ClassMetadata::MANY_TO_MANY,\n 'orm_many_to_many',\n ],\n ];\n }", "public function getRelations()\n {\n return $this->relations;\n }", "public function getRelations()\n {\n return $this->relations;\n }", "public function relationNames()\r\n {\r\n return [\r\n 'kelas',\r\n 'siswa'\r\n ];\r\n }", "private function manyToMany($array){\n\t\t$result = $this->parseRelation($array);\n\t\t$model = $result['model'];\n\t\t$table = $result['table'];\n\t\t$priKey = $result['priKey'];\n\t\t$forKey = $result['forKey'];\n\t\t$this->_db()->select($forKey)->from($table)->where($priKey,$this->id)->get();\n\t\t$results = $this->_db()->results();\n\t\t$entities = array();\n\t\tforeach ($results as $k => $v){\n\t\t\t$entities[] = new $model($v[$forKey]);\n\t\t}\n\t\treturn $entities;\n\t}", "public function relationNames()\r\n {\r\n return [\n 'vendas'\n ];\r\n }", "public function getPersonas()\n {\n $pivot = $this->Personas_->filter(function ($persona) {\n return $persona->approved;\n })->pluckNamed('User');\n $parents = $this->Parents_->filter(function ($persona) {\n return $persona->approved;\n })->pluckNamed('Parent');\n return $pivot->merge($parents);\n }", "public function relationNames()\r\n {\r\n return [\n 'especie',\n 'lance'\n ];\r\n }", "public function objectives()\n {\n return $this->belongsToMany('App\\Objective','objective_organization','organization_id','objective_id');\n }", "public function relationNames()\n {\n return [\n 'siswas'\n ];\n }", "public function palmares() {\n $relation = $this->hasOne(\"Palmares\");\n return $relation;\n }", "public function getLazyRelationshipsAttribute()\n {\n return ['photo', 'user'];\n }", "public function relationNames()\n {\n return [\n 'detailbeasiswas'\n ];\n }", "public function relations()\n {\n $hasOne = $this->hasOne();\n $hasMany = $this->hasMany();\n $belongsTo = $this->belongsTo();\n $objects = new stdClass();\n\n if ($hasOne && !empty($hasOne)) {\n foreach ($hasOne as $id => $value) {\n\n $objects->$id = Relationships::hasOne(isset($value[0]) ? $value[0] : null, isset($value[1]) ? $value[1] : null, isset($value[2]) ? $value[2] : array());\n }\n }\n if ($hasMany && !empty($hasMany)) {\n foreach ($hasMany as $id => $value) {\n $objects->$id = Relationships::hasMany(isset($value[0]) ? $value[0] : null, isset($value[1]) ? $value[1] : null, isset($value[2]) ? $value[2] : array());\n }\n\n }\n if ($belongsTo && !empty($belongsTo)) {\n foreach ($belongsTo as $id => $value) {\n $objects->$id = Relationships::belongsTo(isset($value[0]) ? $value[0] : null, isset($value[1]) ? $value[1] : null, isset($value[2]) ? $value[2] : array());\n }\n }\n return $objects;\n }", "public function relationsToArray()\n {\n $attributes = [];\n\n foreach ($this->getArrayableRelations() as $key => $value) {\n // If the values use the Arrayable trait we can just call this\n // toArray method on the instances which will convert both models and\n // collections to their proper array form and we'll set the values.\n if (array_key_exists('Habil\\Bcoin\\Arrayable', class_uses($value))) {\n $relation = $value->toArray();\n }\n\n // If the value is null, we'll still go ahead and set it in this list of\n // attributes since null is used to represent empty relationships if\n // if it a has one or belongs to type relationships on the models.\n elseif (is_null($value)) {\n $relation = $value;\n }\n\n // we will snake case this key so that the relation attribute is snake cased in this returned\n // array to the developers, making this consistent with attributes.\n $key = Str::snake($key);\n\n // If the relation value has been set, we will set it on this attributes\n // list for returning. If it was not arrayable or null, we'll not set\n // the value on the array because it is some type of invalid value.\n if (isset($relation) || is_null($value)) {\n $attributes[$key] = $relation;\n }\n\n unset($relation);\n }\n\n return $attributes;\n }", "public function grados2()\n {\n return $this->belongsToMany('DSIproject\\Grado', 'grado_materia')\n ->withPivot('materia_id')\n ->withTimestamps();\n }", "protected function getArrayableRelations()\n {\n return $this->relations;\n }", "public function buildRelations()\n\t{\n $this->addRelation('SftOrganismo', 'SftOrganismo', RelationMap::ONE_TO_MANY, array('id' => 'id_pais', ), 'SET NULL', 'CASCADE');\n $this->addRelation('SftPersona', 'SftPersona', RelationMap::ONE_TO_MANY, array('id' => 'id_paisdocidentificacion', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('GenPaisI18n', 'GenPaisI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', 'CASCADE');\n\t}", "public function buildRelations()\n\t{\n $this->addRelation('CuadreCaja', 'CuadreCaja', RelationMap::MANY_TO_ONE, array('id_cuadre_caja' => 'id_cuadre_caja', ), 'RESTRICT', null);\n $this->addRelation('PersonaRelatedByIdPersona', 'Persona', RelationMap::MANY_TO_ONE, array('id_persona' => 'id_persona', ), 'RESTRICT', null);\n $this->addRelation('PersonaRelatedByIdAutoriza', 'Persona', RelationMap::MANY_TO_ONE, array('id_autoriza' => 'id_persona', ), 'RESTRICT', null);\n\t}", "public function getRelationList();", "public function agresores () \n {\n // \"agresor_denuncia\" pero se llama denuncia_agresor por lo que se debe indicar el nombre de la tabla pivot\n return $this->belongsToMany(Agresor::class, 'denuncia_agresor')->whereNull('denuncia_agresor.deleted_at')->withPivot('tblparentesco_id'); \n // withPivot -> agregar la colunma adicional de la tabla pivot en una relacion muchos a muchos.\n }", "public function buildRelations()\n\t{\n\t\t$this->addRelation('AmistadRelatedById_usuario', 'Amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'AmistadsRelatedById_usuario');\n\t\t$this->addRelation('AmistadRelatedByid_usuarioamigo', 'Amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuarioamigo', ), null, null, 'AmistadsRelatedByid_usuarioamigo');\n\t\t$this->addRelation('Calificacion', 'Calificacion', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Calificacions');\n\t\t$this->addRelation('Comentario', 'Comentario', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Comentarios');\n\t\t$this->addRelation('LibroRelatedByUsuario_ult_acc', 'Libro', RelationMap::ONE_TO_MANY, array('id' => 'usuario_ult_acc', ), null, null, 'LibrosRelatedByUsuario_ult_acc');\n\t\t$this->addRelation('LibroRelatedById_usuario', 'Libro', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'LibrosRelatedById_usuario');\n\t\t$this->addRelation('Usuario_intereses', 'Usuario_intereses', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Usuario_interesess');\n\t\t$this->addRelation('Lista', 'Lista', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Listas');\n\t\t$this->addRelation('Libro_colaborador', 'Libro_colaborador', RelationMap::ONE_TO_MANY, array('id' => 'idusuario', ), null, null, 'Libro_colaboradors');\n\t\t$this->addRelation('Libro_version', 'Libro_version', RelationMap::ONE_TO_MANY, array('id' => 'idusuario', ), null, null, 'Libro_versions');\n\t\t$this->addRelation('MensajeRelatedById_usuario_destinatario', 'Mensaje', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_destinatario', ), null, null, 'MensajesRelatedById_usuario_destinatario');\n\t\t$this->addRelation('MensajeRelatedById_usuario_remitente', 'Mensaje', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_remitente', ), null, null, 'MensajesRelatedById_usuario_remitente');\n\t\t$this->addRelation('NotificacionRelatedById_emisor', 'Notificacion', RelationMap::ONE_TO_MANY, array('id' => 'id_emisor', ), null, null, 'NotificacionsRelatedById_emisor');\n\t\t$this->addRelation('NotificacionRelatedById_receptor', 'Notificacion', RelationMap::ONE_TO_MANY, array('id' => 'id_receptor', ), null, null, 'NotificacionsRelatedById_receptor');\n\t\t$this->addRelation('Solicitud_amistadRelatedById_usuario_solicitado', 'Solicitud_amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_solicitado', ), null, null, 'Solicitud_amistadsRelatedById_usuario_solicitado');\n\t\t$this->addRelation('Solicitud_amistadRelatedById_usuario_solicitante', 'Solicitud_amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_solicitante', ), null, null, 'Solicitud_amistadsRelatedById_usuario_solicitante');\n\t\t$this->addRelation('Solicitud', 'Solicitud', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_solicitante', ), null, null, 'Solicituds');\n\t\t$this->addRelation('Postulantes', 'Postulantes', RelationMap::ONE_TO_MANY, array('id' => 'id_postulante', ), null, null, 'Postulantess');\n\t}", "public function defineRelations()\n\t{\n\t\treturn array();\n\t}", "public function buildRelations()\n\t{\n $this->addRelation('Organisatie', 'Organisatie', RelationMap::MANY_TO_ONE, array('organisatie_id' => 'id', ), null, null);\n $this->addRelation('Contact', 'Contact', RelationMap::ONE_TO_MANY, array('id' => 'persoon_id', ), null, null);\n\t}", "public function products(): MorphToMany;", "public function relations() {\n // class name for the relations automatically generated below.\n return array(\n //NEW\n 'bookings' => array(self::MANY_MANY, 'Booking', 'tbl_booking_service_user(id_service_user, id_booking)'),\n 'clientServiceUsers' => array(self::HAS_MANY, 'ClientServiceUser', 'id_service_user'),\n 'missions' => array(self::MANY_MANY, 'Mission', 'tbl_mission_service_user(id_service_user, id_mission)'),\n 'conditions' => array(self::MANY_MANY, 'Condition', 'tbl_service_user_condition(id_service_user, id_condition)'),\n //OLD\n 'bookingServiceUsers' => array(self::HAS_MANY, 'BookingServiceUser', 'id_service_user'),\n //'clientServiceUsers' => array(self::HAS_MANY, 'ClientServiceUser', 'id_service_user'),\n 'missionServiceUsers' => array(self::HAS_MANY, 'MissionServiceUser', 'id_service_user'),\n //'serviceUserConditions' => array(self::MANY_MANY, 'Condition', 'tbl_service_user_condition(id_service_user, id_condition)'),\n 'serviceUserConditions' => array(self::HAS_MANY, 'ServiceUserCondition', 'id_service_user'),\n );\n }", "public function buildRelations()\n\t{\n $this->addRelation('Provincie', 'Provincie', RelationMap::MANY_TO_ONE, array('provincie_id' => 'id', ), null, null);\n $this->addRelation('OrganisatieType', 'OrganisatieType', RelationMap::MANY_TO_ONE, array('type_id' => 'id', ), null, null);\n $this->addRelation('Persoon', 'Persoon', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Contact', 'Contact', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Vervolgactie', 'Vervolgactie', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Kans', 'Kans', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n\t}", "public function genero(){\n return $this->belongsTo('App\\Models\\Genero');\n }", "public static function morphs()\n {\n return static::contractables()->map(function($resource) {\n return $resource::$model;\n })->all();\n }", "public function genres()\n {\n return $this->belongsToMany('App\\Genre');\n }", "public function candidatos(): HasMany\n {\n return $this->hasMany(VotosModel::class, 'votacao_id', 'id')\n ->select('votos.candidato_id', 'votos.id as voto_id', 'votos.votacao_id', 'users.id as user_id', 'users.name')\n ->join('users', function($j) {\n return $j->on('votos.candidato_id', '=', 'users.id');\n })->orderBy('users.name', 'ASC');\n }", "public function genres()\n {\n return $this->belongsToMany('App/Genre', 'bookingagency_genre', 'genres_id', 'genres_id');\n }" ]
[ "0.62810236", "0.62060964", "0.60583663", "0.5997038", "0.59445035", "0.59334034", "0.59182596", "0.59182596", "0.59177744", "0.59103364", "0.5897822", "0.5849077", "0.5845754", "0.5835123", "0.58214724", "0.58202934", "0.582007", "0.5818979", "0.5802637", "0.5800293", "0.57918", "0.57760155", "0.5755238", "0.5742577", "0.57077837", "0.57077837", "0.57077837", "0.57077837", "0.57077837", "0.57077837", "0.57077837", "0.57077837", "0.5683048", "0.5683048", "0.5683048", "0.5683048", "0.5683048", "0.5683048", "0.5683048", "0.5683048", "0.5683048", "0.5678629", "0.56678325", "0.5665211", "0.5619027", "0.56147444", "0.5597212", "0.5588944", "0.55781615", "0.55646366", "0.55516857", "0.55503774", "0.5544376", "0.5539531", "0.55316347", "0.55316347", "0.5516052", "0.5497017", "0.549218", "0.54595625", "0.545894", "0.54542756", "0.5442252", "0.5434928", "0.5417557", "0.54175544", "0.5415568", "0.5409289", "0.53982824", "0.5385861", "0.5385861", "0.5385506", "0.5380177", "0.5380127", "0.53701276", "0.53678626", "0.536456", "0.5361664", "0.536119", "0.535896", "0.5355633", "0.5350707", "0.5346866", "0.53426415", "0.5341776", "0.53393847", "0.5338546", "0.53316706", "0.5323644", "0.5320675", "0.5320431", "0.53202224", "0.53183067", "0.5310227", "0.530839", "0.5299488", "0.5296087", "0.5292271", "0.5291923", "0.529049" ]
0.56968004
32
Form render function Construct and output the form we have gathered info about.
public function render($buffer=false) { //-------------------------------------------------------- // Inset Value Buffer //-------------------------------------------------------- ob_start(); //-------------------------------------------------------- // Data Output Buffer //-------------------------------------------------------- ob_start(); //-------------------------------------------------------- // Form Label //-------------------------------------------------------- if (isset($this->form_label)) { print new GenElement('form_label', $this->form_label); } //-------------------------------------------------------- // Headers //-------------------------------------------------------- $headers_arr = array(); for ($x = 0; $x < $this->cols; $x++) { if (isset($this->headers[$x])) { $headers_arr[] = $this->headers[$x]; } } print Format::array2xml('headers', $headers_arr); //-------------------------------------------------------- // Button Cell Attributes //-------------------------------------------------------- print Format::array2xml('button_cell_attrs', $this->button_cell_attrs); //-------------------------------------------------------- // Button(s) //-------------------------------------------------------- if (gettype($this->button) == 'array') { $buttons = array(); foreach ($this->button as $key => $value) { if (gettype($key) == 'integer') { $key = 'button_' . $key; } $buttons[$key] = array('name' => $key, 'value' => $this->xml_escape($value)); } print Format::array2xml('buttons', $buttons); } else { if ($this->button !== NULL) { print new GenElement('button', $this->xml_escape($this->button)); } } print new GenElement('columns', $this->cols); //-------------------------------------------------------- // Form content //-------------------------------------------------------- $curr_cols = 0; $colspan = 0; $row_begin = false; $row_end = false; //-------------------------------------------------------- // Hidden Form Elements //-------------------------------------------------------- $hid_elems = array(); foreach ($this->hidden_elements as $he_key => $hid_element) { ob_start(); $this->process_element($hid_element); $hid_elems[] = (!empty($this->xsl_template)) ? ($this->xml_escape(ob_get_clean())) : (ob_get_clean()); } print Format::array2xml('hidden_elements', $hid_elems); //-------------------------------------------------------- // Visible Form Elements //-------------------------------------------------------- ob_start(); $rows = 0; foreach ($this->form_elements as $element) { //-------------------------------------------------------- // Process the element: // -> object -> render, // -> text -> print, // -> array -> process elements //-------------------------------------------------------- ob_start(); $this->process_element($element[0]); $tmp_element = ob_get_clean(); if ($element[2] == 'cell') { //-------------------------------------------------------- // Start ROW //-------------------------------------------------------- if ($curr_cols == 0) { ob_start(); if ($rows % 2 == 1 && $this->alt_rows) { $this->set_row_attr($rows, 'class', 'alt'); } $row_attrs = (isset($this->row_attrs[$rows])) ? ($this->row_attrs[$rows]) : (array()); $row_begin = true; $row_end = false; $rows++; } //-------------------------------------------------------- // Build Form Element //-------------------------------------------------------- $colspan = $element[1] + 0; $fe_attrs = array('colspan' => $element[1]); foreach ($element[3] as $fe_attr_key => $fe_attr_val) { $fe_attrs[$fe_attr_key] = $fe_attr_val; } $fe_content = (!empty($this->xsl_template)) ? ($this->xml_escape($tmp_element)) : ($tmp_element); print new GenElement('form_element', $fe_content, $fe_attrs); //-------------------------------------------------------- // End ROW //-------------------------------------------------------- if ($curr_cols + $colspan >= $this->cols) { print new GenElement('row', ob_get_clean(), $row_attrs); $row_begin = false; $row_end = true; $curr_cols = 0; } else { $curr_cols += $colspan; } } else { print (!empty($this->xsl_template) && $element[2] != 'fieldset') ? ($this->xml_escape($tmp_element)) : ($tmp_element); } } //-------------------------------------------------------- // End ROW if not already terminated //-------------------------------------------------------- if (!$row_end && $row_begin && count($this->form_elements) > 0) { print new GenElement('row', ob_get_clean(), $row_attrs); } print new GenElement('elements', ob_get_clean()); print new GenElement('data', ob_get_clean()); $this->inset_val .= ob_get_clean(); return parent::render($buffer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render(Form $form);", "public function buildForm() {\n\t\techo \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>$this->title</title>\n\t\t</head>\n\t\t<body>\n\t\t<form method=\\\"$this->method\\\">\";\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\techo \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\techo \" required\";\n\t\t\t}\n\n\t\t\techo \"><br></form>\";\n\t\t}\n\t}", "public function displayForm() {\n\t\t$output = $this->getOutput();\n\n\t\t$form_class = $this->adapter->getFormClass();\n\t\t// TODO: use interface. static ctor.\n\t\tif ( $form_class && class_exists( $form_class ) ){\n\t\t\t$form_obj = new $form_class();\n\t\t\t$form_obj->setGateway( $this->adapter );\n\t\t\t$form_obj->setGatewayPage( $this );\n\t\t\t$form = $form_obj->getForm();\n\t\t\t$output->addModules( $form_obj->getResources() );\n\t\t\t$output->addModuleStyles( $form_obj->getStyleModules() );\n\t\t\t$output->addHTML( $form );\n\t\t} else {\n\t\t\t$this->logger->error( \"Displaying fail page for bad form class '$form_class'\" );\n\t\t\t$this->displayFailPage( false );\n\t\t}\n\t}", "public function displayForm() {\n\t\t$output = $this->getOutput();\n\n\t\t$form_class = $this->adapter->getFormClass();\n\t\t// TODO: use interface. static ctor.\n\t\tif ( $form_class && class_exists( $form_class ) ) {\n\t\t\t$form_obj = new $form_class();\n\t\t\t$form_obj->setGateway( $this->adapter );\n\t\t\t$form_obj->setGatewayPage( $this );\n\t\t\t$form = $form_obj->getForm();\n\t\t\t$output->addModules( $form_obj->getResources() );\n\t\t\t$output->addModuleStyles( $form_obj->getStyleModules() );\n\t\t\t$output->addHTML( $form );\n\t\t} else {\n\t\t\t$this->logger->error( \"Displaying fail page for bad form class '$form_class'\" );\n\t\t\t$this->displayFailPage( false );\n\t\t}\n\t}", "public function renderForm() {\n $enctype = $this->_enctype ? \"enctype=\\\"multipart/form-data\\\"\" : \"\";\n $formAttributes = $this->_renderAttributes($this->_formAttributes);\n $html = \"<form action=\\\"{$this->getAction()}\\\" method=\\\"{$this->_method}\\\" {$enctype} $formAttributes>\";\n $currentFieldset = NULL;\n\n if (count($this->_inputElements)) {\n foreach ($this->_inputElements as $element) {\n if ($element[1] !== NULL) {\n if ($element[1] !== $currentFieldset) {\n if ($currentFieldset !== NULL)\n $html .= \"</fieldset>\";\n $fieldset = $this->_fieldsets[$element[1]];\n $fieldsetAttributes = $this->_renderAttributes($fieldset[1]);\n $html .= \"<fieldset {$fieldsetAttributes}><legend>{$fieldset[0]}</legend>\";\n $currentFieldset = $element[1];\n }\n } else {\n if ($currentFieldset !== NULL)\n $html .= \"</fieldset>\";\n }\n $html .= $this->renderElement($element[0]->getName());\n $currentFieldset = $element[1];\n }\n }\n if (count($this->_hiddenElements)) {\n foreach ($this->_hiddenElements as $element) {\n $html .= $this->renderElement($element->getName());\n }\n }\n $html .= \"</form>\";\n return $html;\n }", "public function renderForm()\n {\n $formUnit = $this->interActor->formUnit($this->inputHandler->getArrayMap());\n\n $view = new \\View\\Model(\n \\View\\Customer::form($formUnit),\n $this->inputHandler->routeArrayMap()\n );\n return $view->render();\n }", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "public function render() {\n $formContainsRequiredFields = FALSE;\n $htmlElements = array();\n\n foreach($this->elements as $element) {\n if(!$this->getMarkRequiredFields()) {\n $element['object']->markIfRequired(FALSE);\n }\n\n if($element['object']->isRequired()) $formContainsRequiredFields = TRUE;\n $element['object']->render();\n if($element['object']->errorOccured()) $this->setError(TRUE);\n\n $htmlElements[] = $element['object']->fetch();\n $this->javascripts .= $element['object']->getJavaScripts();\n }\n\n $this->html = implode(\"\\n<span class=\\\"element_separator\\\">&nbsp;</span>\", $htmlElements);\n $preForm = (bool)$this->headline ? FORMWIZARD_PRE_FORM_HEADLINE : FORMWIZARD_PRE_FORM;\n\n $html = NULL;\n\n $html .= '<style type=\"text/css\">@import url('.FORMWIZARD_CSS_URL.\");</style>\\n\";\n $html .= str_replace('{headline}', $this->headline, $preForm);\n $html .= \"\\n\".'<form name=\"'.$this->name.'\" method=\"'.$this->method.'\" action=\"'.$this->action.'\" enctype=\"multipart/form-data\">';\n $html .= \"\\n\".'<input type=\"hidden\" name=\"__'.$this->name.'_submitted\" value=\"1\" />';\n $html .= \"\\n\".$this->html;\n $html .= \"\\n\".'</form>';\n $html .= \"\\n\".'<script type=\"text/javascript\">'.$this->javascripts.'</script>';\n\n if($formContainsRequiredFields && $this->markRequiredFields) {\n $html .= \"\\n\".FORMWIZARD_LEGEND_REQUIRED_FIELD;\n }\n\n $this->html = $html.\"\\n\".FORMWIZARD_POST_FORM;\n\n $this->isRendered = TRUE;\n }", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "function toString()\n\t{\n\t\t// Start main form attributes\n\t\t$formAttributes = array();\n\t\t$formAttributes['method'] = 'POST';\t\n\t\t\n\t\t// Use custom action attribute?\n\t\tif ($this->actionURL) {\n\t\t\t$formAttributes['action'] = $this->actionURL;\n\t\t} else {\n\t\t\t// Current page\n\t\t\t$formAttributes['action'] = str_replace( '%7E', '~', $_SERVER['REQUEST_URI']);\n\t\t}\n\t\t\n\t\t// Add the form name if specified\n\t\t$namestring = \"\";\n\t\tif ($this->formName) {\n\t\t\t$formAttributes['name'] = $this->formName;\t\n\t\t\t$formAttributes['id'] = $this->formName;\n\t\t}\n\t\t\n\t\t// Need extra attribute if there's a upload field\n\t\tif ($this->haveFileUploadField()) {\n\t\t\t$formAttributes['enctype'] = 'multipart/form-data';\n\t\t}\n\t\t\n\t\t// Render form with all attributes\n\t\t$attributeString = false;\n\t\tforeach($formAttributes as $name => $value) {\n\t\t\t$attributeString .= sprintf('%s=\"%s\" ', $name, $value);\n\t\t}\n\t\t\n\t\t// Start form\n\t\t$resultString = \"\\n<form $attributeString>\\n\";\n\t\t\n\t\t// Is first item a break? If so, render it.\n\t\tif (isset($this->breakList[FORM_BUILDER_START_OF_FORM])) {\n\t\t\t$resultString .= $this->createTableHeader(array('id' => $this->breakList[FORM_BUILDER_START_OF_FORM]['sectionid']), $this->breakList[FORM_BUILDER_START_OF_FORM]['prefixHTML']);\n\t\t} else {\n\t\t\t$resultString .= $this->createTableHeader();\n\t\t}\t\t\n\t\t\n\t\t// Now add all form elements\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Hidden elements are added later\n\t\t\tif ($element->type == 'hidden') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Render form element\t\t\t\t\n\t\t\t$resultString .= $element->toString($this->showRequiredLabels);\n\n\t\t\t// Add section breaks if this element is in the break list.\n\t\t\t// Add break after element HTML\n\t\t\tif (in_array($element->name, array_keys($this->breakList)))\n\t\t\t{\n\t\t\t\t$resultString .= $this->createTableFooter();\n\t\t\t\t$resultString .= $this->createTableHeader(array('id' => $this->breakList[$element->name]['sectionid']), $this->breakList[$element->name]['prefixHTML']);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$resultString .= $this->createTableFooter();\n\t\t\n\t\t// Button area\n\t\t$resultString .= '<p class=\"submit\">'.\"\\n\";\n\t\t\n\t\t// Add submit button\n\t\t$resultString .= \"\\t\".'<input class=\"button-primary\" type=\"submit\" name=\"Submit\" value=\"'.$this->submitlabel.'\" />'.\"\\n\";\n\t\t\n\t\t// Add remaining buttons\n\t\tforeach ($this->buttonList as $buttonName => $buttonLabel) {\n\t\t\t$resultString .= \"\\t<input type=\\\"submit\\\" class=\\\"button-secondary\\\" name=\\\"$buttonName\\\" value=\\\"$buttonLabel\\\" />\\n\";\t\t\n\t\t}\n\t\t\t\t\n\t\t// Hidden field to indicate update is happening\n\t\t$resultString .= sprintf(\"\\t\".'<input type=\"hidden\" name=\"update\" value=\"%s\" />'.\"\\n\", $this->formName);\n\t\t\t\t\n\t\t// Add any extra hidden elements\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Leave all hidden elements until the end.\n\t\t\tif ($element->type == 'hidden') {\t\n\t\t\t\t$resultString .= \"\\t\".'<input type=\"hidden\" name=\"'.$element->name.'\" value=\"'.$element->value.'\" />'.\"\\n\";\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t$resultString .= '</p>'.\"\\n\";\n\t\t\t\t\t\t\t\n\t\t// End form\n\t\t$resultString .= \"\\n</form>\\n\";\n\t\t\n\t\treturn $resultString;\n\t}", "public function renderForm()\n {\n\n $table = \"luda_resource_has_tag\";\n $identifier = \"Light_Kit_Admin_UserData.generated/luda_resource_has_tag\";\n $parentLayout = \"Light_Kit_Admin/kit/zeroadmin/dev/mainlayout_base\";\n $vars = [\n \"title\" => \"Resource has tag form\",\n ];\n if (array_key_exists(\"solo\", $_GET)) {\n $parentLayout = \"Light_Kit_Admin/kit/zeroadmin/dev/mainlayout_solo\";\n $vars['related_links'] = []; // cancel any existing related links\n $this->setOnSuccessIframeSignal(\"done\");\n }\n\n $form = $this->processForm($identifier, $table);\n\n\n\n //--------------------------------------------\n // RENDERING\n //--------------------------------------------\n return $this->renderAdminPage('Light_Kit_Admin_UserData/kit/zeroadmin/generated/luda_resource_has_tag_form', [\n \"parent_layout\" => $parentLayout,\n \"form\" => $form,\n ], PageConfUpdator::create()->updateWidget(\"body.lka_chloroform\", [\n 'vars' => $vars,\n ]));\n }", "public function render(): String\n {\n\n $this->view = \"<form action='$this->action' method='$this->method' name='$this->name' id='$this->id'\";\n\n // Add all other attributes like class, id, required etc.\n foreach ($this->attr as $key => $value) {\n $this->view .= \" $key=$value \";\n }\n $this->view .= \"/>\";\n\n // Add field's HTML code\n $fieldsView = $this->renderFields();\n $this->view .= \" <br> $fieldsView\";\n\n // Add submit button HTML code\n $submitButtonView = $this->buildSubmitButton();\n $this->view .= \" <br> $submitButtonView\";\n\n // Close the form tag\n $this->view .= \" <br> </form>\";\n\n return $this->view;\n }", "public function cs_generate_form() {\n global $post;\n }", "public function buildForm()\n {\n }", "public function render()\n {\n echo htmlspecialcharsbx($this->getPrefix());\n $action = $this->getAction();\n $id = $this->getId();\n $class = $this->getClass();\n $name = $this->getName();\n $dataAttributes = $this->getDataAttributes();\n $dataAttributesString = '';\n foreach ($dataAttributes as $key => $value) {\n $dataAttributesString .= ' data-' . $key . '=\"' . $value . '\" ';\n }\n\n $formArguments = 'action=\"' . (($action !== null) ? $action : '#') . '\" ';\n $formArguments .= ($id !== null) ? 'id=\"' . $id . '\" ' : '';\n $formArguments .= !empty($class) ? 'class=\"' . implode(' ', $class) . '\" ' : '';\n $formArguments .= ($name !== null) ? 'name=\"' . $name . '\" ' : '';\n $formArguments .= $dataAttributesString;\n echo '<form ' . $formArguments . '>';\n\n $fields = $this->getFields();\n foreach ($fields as $key => $field) {\n $field->render();\n }\n\n echo '</form>';\n\n echo htmlspecialcharsbx($this->getPostfix());\n }", "function _renderForm($data) {\n\t\t$user = JFactory::getUser ();\n\t\t\n\t\t$vars = new JObject ();\n\t\t\n\t\t$html = $this->_getLayout ( 'form', $vars );\n\t\t\n\t\treturn $html;\n\t}", "function _renderForm($data) {\n\t\t$user = JFactory::getUser ();\n\t\t\n\t\t$vars = new JObject ();\n\t\t\n\t\t$html = $this->_getLayout ( 'form', $vars );\n\t\t\n\t\treturn $html;\n\t}", "protected function renderForm()\n {\n $this->addAttribute(\"method\",$this->getMethod());\n \n if($this->getHasFile()) $this->addAttribute(\"enctype\",\"multipart/form-data\");\n\n $ret = '<form '.$this->getAttributes().'>';\n if($this->getHasFile())\n {\n $ret .= \"<input type='hidden' name='MAX_FILE_SIZE' value='10485760' />\";\n }\n if($this->error)\n {\n $ret .= \"<div class='fapi-error'><ul>\";\n foreach($this->errors as $error)\n {\n $ret .= \"<li>$error</li>\";\n }\n $ret .= \"</ul></div>\";\n }\n $ret .= $this->renderElements();\n\n $onclickFunction = \"fapi_ajax_submit_\".$this->getId().\"()\";\n $onclickFunction = str_replace(\"-\",\"_\",$onclickFunction);\n \n if($this->getShowClear())\n {\n $clearButton = '<input class=\"fapi-submit\" type=\"reset\" value=\"Clear\"/>';\n }\n\n if($this->getShowSubmit())\n {\n $ret .= '<div id=\"fapi-submit-area\">';\n $submitValue = $this->submitValue?('value=\"'.$this->submitValue.'\"'):\"\";\n if($this->ajaxSubmit)\n {\n $ret .= sprintf('<input class=\"fapi-submit\" type=\"button\" %s onclick=\"%s\" /> %s',$submitValue,$onclickFunction,$clearButton);\n }\n else\n {\n $ret .= sprintf('<input class=\"fapi-submit\" type=\"submit\" %s /> %s',$submitValue,$clearButton);\n }\n $ret .= '</div>';\n }\n $id = $this->getId();\n \n if($id != '')\n {\n $ret .= \"<input type='hidden' name='is_form_{$id}_sent' value='yes' />\";\n }\n \n $ret .= '<input type=\"hidden\" name=\"is_form_sent\" value=\"yes\" />';\n $ret .= '</form>';\n\n if($this->ajaxSubmit)\n {\n $elements = $this->getFields();\n $ajaxData = array();\n foreach($elements as $element)\n {\n $id = $element->getId();\n if($element->getStorable())\n {\n $ajaxData[] = \"'\".urlencode($id).\"='+document.getElementById('$id').\".($element->getType()==\"Field\"?\"value\":\"checked\");\n }\n $validations = $element->getJsValidations();\n $validators .= \"if(!fapiValidate('$id',$validations)) error = true;\\n\";\n }\n $ajaxData[] = \"'fapi_dt=\".urlencode($this->getDatabaseTable()).\"'\";\n $ajaxData = addcslashes(implode(\"+'&'+\", $ajaxData),\"\\\\\");\n\n $ret .=\n \"<script type='text/javascript'>\n function $onclickFunction\n {\n var error = false;\n $validators\n if(error == false)\n {\n \\$.ajax({\n type : 'POST',\n url : '{$this->ajaxAction}',\n data : $ajaxData\n });\n }\n }\n </script>\";\n }\n return $ret;\n }", "function render(Form $form): string;", "public function renderForm()\n\t{\n\t\t$this->beginForm();\n\t\t$this->renderMessageInput();\n\t\techo Html::beginTag('div', array('class' => 'chat-from-actions'));\n\t\t$this->renderSubmit();\n\t\techo Html::endTag('div');\n\t\t$this->endForm();\n\t}", "function Form()\n\t{\n\t\tprint '<form name=\"myform\" action=\"' . THIS_PAGE . '\" method=\"post\">';\n\t\tforeach($this->aQuestion as $question)\n\t\t{//print data for each\n\t\t\t$this->createInput($question);\n\t\t}\n\t\tprint '<input type=\"hidden\" name=\"SurveyID\" value=\"' . $this->SurveyID . '\" />';\t\n\t\tprint '<input type=\"submit\" value=\"Submit!\" />';\t\n\t\tprint '</form>';\n\t}", "public function buildFormTemplate() {\n\t\t$formTemplatepath = \"src/Templates/\".$this->stateName.\"_\".$this->stateType.\".php\";\n\t\t$formTemplate = fopen($formTemplatepath, \"w\") or die (\"Unable to create html template for \\\"\".$this->stateName.\"_\".$this->stateType.\"\\\" state.\");\n\t\t$formHtml = \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>\".$this->title.\"</title>\n\t\t</head>\n\t\t<body>\";\n\t\tif ($this->stateType == \"generation\") {\n\t\t\t$formHtml .= \"<form method=\\\"\".$this->method.\"\\\" action=\\\"../Scripts/generationHandleRequest.php\\\" >\";\n\t\t}\n\t\t\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Skip the Database elements.\n\t\t\tif ($input['inputType'] == \"DATABASE\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\t$formHtml .= \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\t$formHtml .= \" required\";\n\t\t\t}\n\t\t\t// Makes the html page more readable, i.e. appending with a new line.\n\t\t\t$formHtml .= \">\n\t\t\t<br>\";\n\t\t}\n\n\t\t$formHtml .= \"</form>\n\t\t</body>\n\t\t</html>\";\n\n\t\tfwrite($formTemplate, $formHtml);\n\t\tfclose($formTemplate);\n\t}", "public function render()\n {\n $content = \"Ext.create('Ext.form.Panel', {\";\n \n $content .= \"frame: true\";\n \n if ($this->getAction()) {\n $content .= \", url: '\" . $this->getAction() . \"'\";\n }\n \n foreach ($this->getAttribs() as $name => $value) {\n $content .= \", \";\n \n switch ($name) {\n case 'renderTo':\n $content .= \"renderTo: Ext.get('\" . (string)$value . \"')\";\n break;\n case 'height':\n case 'width':\n $content .= $name . \": \" . (int)$value;\n break;\n case 'standardSubmit':\n case 'hidden':\n $content .= $name . \": \" . ((boolean)$value === true ? 'true' : 'false');\n break;\n case 'onEnter':\n $content .= \"listeners: {\n afterRender: function(form, options){\n this.keyNav = Ext.create('Ext.util.KeyNav', this.el, {\n enter: function() {\" . $value . \"},\n scope: this\n });\n }\n }\";\n break;\n case 'defaults':\n $content .= \"defaults: \" . (string)$value;\n break;\n default:\n $content .= $name . \": '\" . htmlspecialchars((string)$value, ENT_QUOTES) . \"'\";\n break;\n }\n }\n \n if (!$this->getAttrib('renderTo')) {\n $content .= \", renderTo: Ext.getBody()\";\n }\n \n $content .= \", items: [\";\n \n if ($this->hasSubForms()) {\n $iterator = new ArrayIterator($this->getSubForms());\n while($iterator->valid()) {\n $subForm = $iterator->current();\n $content .= \"{\";\n \n if ($subForm->getAttrib('width')) {\n $content .= \"width: \" . (int)$subForm->getAttrib('width') . \",\";\n }\n \n $content .= $subForm->render();\n \n $content .= \"}\";\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n } \n }\n }\n \n if ($this->hasElements()) {\n $iterator = new ArrayIterator($this->getElements());\n while ($iterator->valid()) {\n $element = $iterator->current();\n $content .= $element->render();\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n }\n }\n }\n\n $content .= \"],\";\n \n $content .= \"buttons: [\";\n \n $iterator = new ArrayIterator($this->getButtons());\n while ($iterator->valid()) {\n $button = $iterator->current();\n \n $content .= $button->render();\n \n $iterator->next();\n \n if ($iterator->valid()) {\n $content .= \",\";\n }\n \n }\n \n $content .= \"]\";\n \n $content .= '});';\n \n return $content;\n }", "function renderWholeForm() {\n\t\t$output = $this->renderCurrentStep();\n\t\t$output .= $this->renderSubmitButtons();\n\n\t\treturn $this->wrapWithForm ($output);\n\t}", "function printForm() {\n $this->printDebugMessage('printForm', 'Begin', 1);\n $stypeStr = $this->paramDetailToStr('stype');\n $programStr = $this->paramDetailToStr('program');\n $databaseStr = $this->paramDetailToStr('database', TRUE);\n $scoresStr = $this->paramDetailToStr('scores');\n $alignmentsStr = $this->paramDetailToStr('alignments');\n $expStr = $this->paramDetailToStr('exp');\n \n print <<<EOF\n<form method=\"POST\">\n<p>E-mail: <input type=\"text\" name=\"email\" />&nbsp;\nJob title: <input type=\"text\" name=\"title\" /></p>\n\n<p>$stypeStr<br />\n<a href=\"?paramDetail=sequence\">Sequence</a>:<br />\n<textarea name=\"sequence\" rows=\"5\" cols=\"80\">\n</textarea></p>\n\n<p>$programStr $databaseStr</p>\n\n<p>$scoresStr $alignmentsStr $expStr</p>\n\n<p align=\"right\">\n<input type=\"submit\" value=\"Submit\" />\n<input type=\"reset\" value=\"Reset\" />\n</p>\n</form>\nEOF\n ;\n $this->printDebugMessage('printForm', 'End', 1);\n }", "public function render() {\n\n\t\tif(!$this->commentsField) return \"Unable to determine comments field\";\n\t\t$options = $this->options; \t\n\t\t$labels = $options['labels'];\n\t\t$attrs = $options['attrs'];\n\t\t$id = $attrs['id'];\n\t\t$submitKey = $id . \"_submit\";\n\t\t$honeypot = $options['requireHoneypotField'];\n\t\t$inputValues = array('cite' => '', 'email' => '', 'website' => '', 'stars' => '', 'text' => '', 'notify' => '');\n\t\tif($honeypot) $inputValues[$honeypot] = '';\n\t\t\n\t\t$user = $this->wire('user'); \n\n\t\tif($user->isLoggedin()) {\n\t\t\t$inputValues['cite'] = $user->name; \n\t\t\t$inputValues['email'] = $user->email;\n\t\t}\n\t\t\n\t\t$input = $this->wire('input'); \n\t\t$divClass = 'new';\n\t\t$class = trim(\"CommentForm \" . $attrs['class']); \n\t\t$note = '';\n\n\t\t/*\n\t\t * Removed because this is not cache safe! Converted to JS cookie. \n\t\t * \n\t\tif(is_array($this->session->CommentForm)) {\n\t\t\t// submission data available in the session\n\t\t\t$sessionValues = $this->session->CommentForm;\n\t\t\tforeach($inputValues as $key => $value) {\n\t\t\t\tif($key == 'text') continue; \n\t\t\t\tif(!isset($sessionValues[$key])) $sessionValues[$key] = '';\n\t\t\t\t$inputValues[$key] = htmlentities($sessionValues[$key], ENT_QUOTES, $this->options['encoding']); \n\t\t\t}\n\t\t\tunset($sessionValues);\n\t\t}\n\t\t*/\n\n\t\tforeach($options['presets'] as $key => $value) {\n\t\t\tif(!is_null($value)) $inputValues[$key] = $value; \n\t\t}\n\n\t\t$out = '';\n\t\t$showForm = true; \n\t\t\n\t\tif($options['processInput'] && $input->post->$submitKey == 1) {\n\t\t\t$comment = $this->processInput(); \n\t\t\tif($comment) { \n\t\t\t\t$out .= $this->renderSuccess($comment); // success, return\n\t\t\t} else {\n\t\t\t\t$inputValues = array_merge($inputValues, $this->inputValues);\n\t\t\t\tforeach($inputValues as $key => $value) {\n\t\t\t\t\t$inputValues[$key] = htmlentities($value, ENT_QUOTES, $this->options['encoding']);\n\t\t\t\t}\n\t\t\t\t$note = \"\\n\\t$options[errorMessage]\";\n\t\t\t\t$divClass = 'error';\n\t\t\t}\n\n\t\t} else if($this->options['redirectAfterPost'] && $input->get('comment_success') === \"1\") {\n\t\t\t$note = $this->renderSuccess();\n\t\t}\n\n\t\t$form = '';\n\t\tif($showForm) {\n\t\t\tif($this->options['depth'] > 0) {\n\t\t\t\t$form = $this->renderFormThread($id, $class, $attrs, $labels, $inputValues);\n\t\t\t} else {\n\t\t\t\t$form = $this->renderFormNormal($id, $class, $attrs, $labels, $inputValues); \n\t\t\t}\n\t\t\tif(!$options['presetsEditable']) {\n\t\t\t\tforeach($options['presets'] as $key => $value) {\n\t\t\t\t\tif(!is_null($value)) $form = str_replace(\" name='$key'\", \" name='$key' disabled='disabled'\", $form); \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$out .= \n\t\t\t\"\\n<div id='{$id}' class='{$id}_$divClass'>\" . \t\n\t\t\t\"\\n\" . $this->options['headline'] . $note . $form . \n\t\t\t\"\\n</div><!--/$id-->\";\n\n\n\t\treturn $out; \n\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "public function render() {\n /* verify all fields except checkbox */\n if($this->required\n && $this->form->isSubmitted()\n && !$this->checkValue()) {\n $this->error = TRUE;\n $this->cssClass = 'error';\n }\n\n /* verify checkbox */\n $tempName = str_replace('[]', NULL, $this->name);\n\n if($this->required\n && $this->form->isSubmitted()\n && $this->type == 'checkbox'\n && !isset($_REQUEST[$tempName])) {\n $this->error = TRUE;\n $this->cssClass = 'error';\n }\n\n $html = NULL;\n $this->value = htmlspecialchars($this->value);\n\n $html .= '<input type=\"'.$this->type.'\" id=\"'.$this->id.'\" name=\"'.$this->name.'\" value=\"'.$this->value.'\"';\n $html .= (bool)$this->size ? ' size= \"'.$this->size.'\"' : NULL;\n $html .= (bool)$this->maxlength ? ' maxlength= \"'.$this->maxlength.'\"' : NULL;\n $html .= (bool)$this->size ? ' size=\"'.$this->size.'\"' : NULL;\n $html .= ($this->type == 'text' || $this->type == 'password') ? ' class=\"' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'submit') ? ' class=\"submit ' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'checkbox') ? ' class=\"checkbox ' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'radio') ? ' class=\"radio ' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'image') ? ' source=\"'.$this->source.'\"' : NULL;\n $html .= ($this->type == 'image' && (bool)$this->width && (bool)$this->height) ? ' style=\"width:'.$this->width.'px; height:'.$this->height.'px;\"' : NULL;\n $html .= (bool)$this->checked ? ' checked' : NULL;\n $html .= ' />';\n\n if (isset($this->label)) {\n $html .= '<span class=\"label\">' . $this->label . '</span>';\n }\n\n $this->html = ($this->type == 'hidden') ? $html : $this->wrap($html);\n }", "public function makeOutput()\n\t{\n\t\t$formId = $this->name;\n\t\t$enctype = 'application/x-www-form-urlencoded';\n\n\t\t$formHtml = new HtmlObject('form');\n\t\t$formHtml->property('method', $this->form->getMethod())->\n\t\t\t\t\tproperty('id', $formId)->\n\t\t\t\t\tproperty('action', $this->form->getAction());\n\n\t\t$jsStartup = array();\n\n\t\tforeach($this->inputs as $inputs) {\n\t\t\tforeach($inputs as $input) {\n\t\t\t\tif(($input->type == 'checkbox' || $input->type == 'radio') && isset($input->properties['value'])) {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name . '_' . $input->properties['value'];\n\t\t\t\t} else {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name;\n\t\t\t\t}\n\t\t\t\t$input->property('id', $inputId);\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->inputs as $section => $inputs)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('fieldset');\n\t\t\t$sectionHtml->property('id', $formId . \"_section_\" . $section);\n\n\t\t\tif(isset($this->sectionClasses[$section])) {\n\t\t\t\tforeach($this->sectionClasses[$section] as $class) {\n\t\t\t\t\t$sectionHtml->addClass($class);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->sectionClasses[$section] = array();\n\t\t\t}\n\n\t\t\tif(!in_array('mf-toggle-hide', $this->sectionClasses[$section]) && \n\t\t\t !in_array('mf-toggle-none', $this->sectionClasses[$section])) {\n\t\t\t\t$sectionHtml->addClass('mf-toggle-show');\n\t\t\t}\n\n\n\t\t\tif(isset($this->sectionLegends[$section]))\n\t\t\t\t$sectionHtml->insertNewHtmlObject('legend')->\n\t\t\t\t\twrapAround($this->sectionLegends[$section]);\n\n\t\t\t$sectionDiv = new HtmlObject('div');\n\t\t\t$sectionDiv->addClass('fieldset_contents')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_contents');\n\n\t\t\tif(isset($this->sectionIntro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionIntro[$section])->\n\t\t\t\t\taddClass('fieldset_intro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_intro');\n\n\t\t\t$sectionHtml->wrapAround($sectionDiv);\n\n\t\t\t$hasInputs = false;\n\n\t\t\t$controlsDiv = new HtmlObject('div');\n\t\t\t$controlsDiv->addClass('fieldset_controls')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_controls');\n\n\t\t\t$sectionDiv->wrapAround($controlsDiv);\n\n\t\t\tforeach($inputs as $input)\n\t\t\t{\n\t\t\t\t$inputId = $input->property('id');\n\n\t\t\t\tif($input->type === 'submit' && !$this->includeSubmit)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif($input->type === 'richtext') {\n\t\t\t\t\t$input->property($this->form->getMarkup(), 'true');\n\t\t\t\t\t$input->type = 'textarea';\n\t\t\t\t\t$input->addClass('fulltext');\n\t\t\t\t}\n\n\t\t\t\t$plugins = new Hook();\n\t\t\t\t$plugins->enforceInterface('FormToHtmlHook');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', 'Base');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', $input->type);\n\t\t\t\t$plugins->setInput($input);\n\n\t\t\t\t$jsStartup = array_merge_recursive($jsStartup,\n\t\t\t\t\t\t\t\tHook::mergeResults($plugins->getCustomJavaScript()));\n\n\t\t\t\tif(in_array(true, Hook::mergeResults($plugins->overrideHtml())))\n\t\t\t\t{\n\t\t\t\t\t$plugins->createOverriddingHtml($sectionHtml);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\tif($inputStartupJs = $this->getInputJavascript($input))\n\t\t\t\t\t$jsStartup = array_merge_recursive($jsStartup, $inputStartupJs);\n\n\t\t\t\t$inputHtml = $this->getInputHtmlByType($input);\n\t\t\t\t$plugins->setCustomHtml($inputHtml);\n\n\t\t\t\tif($inputOptions = $this->getInputMetaData($input) ) //count($inputOptions > 0))\n\t\t\t\t{\n\t\t\t\t\t$metaDataClass = json_encode($inputOptions);\n\t\t\t\t\t$inputHtml->addClass($metaDataClass);\n\t\t\t\t}\n\n\t\t\t\tif($input->type == 'file')\n\t\t\t\t\t$enctype = 'multipart/form-data';\n\n\t\t\t\tif($input->type == 'hidden') {\n\t\t\t\t\t$inputHtml->close(false);\n\t\t\t\t\t$formHtml->wrapAround($inputHtml);\n\t\t\t\t} else {\n\t\t\t\t\t$inputHtml->wrapAround($input->property('contents'));\n\n\t\t\t\t\t$labelHtml = new HtmlObject('label');\n\n\t\t\t\t\t$labelHtml->property('for', $inputId)->\n\t\t\t\t\t\tproperty('id', $inputId . '_label');\n\n\t\t\t\t\tif(isset($input->pretext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->pretext);\n\n\t\t\t\t\tif(isset($input->label))\n\t\t\t\t\t{\n\t\t\t\t\t\t$labelHtml->wrapAround($input->label);\n\t\t\t\t\t\tif(isset($input->description))\n\t\t\t\t\t\t\t$labelHtml->property('title', $input->description);\n\t\t\t\t\t}\n\n\t\t\t\t\tif($input->type == 'radio' || $input->type == 'checkbox')\n\t\t\t\t\t\t$inputHtml->addClass('small_input');\n\n\t\t\t\t\tif(isset($input->labelAfter) && $input->labelAfter) {\n\t\t\t\t\t\t$labelHtml->addClass('label_after');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_after');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($inputHtml)->\n\t\t\t\t\t\t\twrapAround($labelHtml);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$labelHtml->addClass('label_before');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_before');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($labelHtml)->\n\t\t\t\t\t\t\twrapAround($inputHtml);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($this->errors[$input->name])) {\n\t\t\t\t\t\t$errorLabel = new HtmlObject('label');\n\t\t\t\t\t\t$errorLabel->addClass('error')->\n\t\t\t\t\t\t\tproperty('for', $inputId)->\n\t\t\t\t\t\t\tproperty('generated', true);\n\t\t\t\t\t\t$errorVal = '';\n\n\t\t\t\t\t\tforeach($this->errors[$input->name] as $error)\n\t\t\t\t\t\t\t$errorVal .= $error . ' ';\n\n\t\t\t\t\t\t$errorLabel->wrapAround(trim($errorVal));\n\t\t\t\t\t\t$controlsDiv->wrapAround($errorLabel);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($input->posttext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->posttext);\n\n\t\t\t\t\tif(!isset($input->noBreak) || $input->noBreak === false)\n\t\t\t\t\t\t$controlsDiv->insertNewHtmlObject('br');\n\n\t\t\t\t\t$hasInputs = true;\n\t\t\t\t}\n\t\t\t}//foreach($this->inputs as $section => $inputs)\n\n\t\t\tif(isset($this->sectionOutro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionOutro[$section])->\n\t\t\t\t\taddClass('fieldset_outro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_outro');\n\n\t\t\tif($hasInputs)\n\t\t\t\t$formHtml->wrapAround($sectionHtml);\n\n\t\t\t$formHtml->property('enctype', $enctype);\n\t\t}\n\n\t\tif(!$this->submitButton && $this->includeSubmit)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('div');\n\t\t\t$sectionHtml->property('id', $this->name . \"_section_\" . 'control');\n\t\t\t$inputHtml = new HtmlObject('input');\n\t\t\t$inputHtml->name = $input->name;\n\t\t\t$inputHtml->property('name', 'Submit')->property('type', 'Submit')->property('value', 'Submit');\n\n\t\t\t$labelHtml = new HtmlObject('label');\n\t\t\t$sectionHtml->wrapAround($labelHtml)->wrapAround($inputHtml)->wrapAround('<br>');\n\t\t\t$formHtml->wrapAround($sectionHtml);\n\t\t}\n\n\t\t$formHtml = (string) $formHtml;\n\n\t\t$output = $this->fullForm\n\t\t\t? (string) $formHtml\n\t\t\t: (string) $sectionHtml;\n\n\t\t$formJsOptions = array();\n\t\t$formJsOptions['validateOnLoad'] = $this->form->wasSubmitted();\n\t\t$jsStartup[] = '$(\"#' . $this->name . '\").MortarForm(' . json_encode($formJsOptions) . ');';\n\n\t\tif(class_exists('ActivePage', false))\n\t\t{\n\t\t\t$page = ActivePage::getInstance();\n\t\t\t$page->addStartupScript($jsStartup);\n\t\t}\n\t\treturn $output;\n\t}", "private function renderTherapyForm(){\n\t\t$default_values=array();\n\t\t$id=(int)$this->site->printGetVariable('id');\n\t\tif($id){\n\t\t\t$model_person=$this->loader->getModel('person');\n\t\t\t$person_data=$model_person->printPerson($id);\n\t\t\t$default_values=array(\n\t\t\t\t\t'person:id'=>$person_data->id,\n\t\t\t\t\t'person:name'=>$person_data->name,\n\t\t\t\t\t'person:surname'=>$person_data->surname,\n\t\t\t\t\t'person:birth_date'=>$person_data->birth_date,\n\t\t\t\t\t'person:personal_identification_number'=>$person_data->personal_identification_number,\n\t\t\t\t\t'person:insurance'=>$person_data->insurance,\n\t\t\t\t\t'bigarea'=>'lorem ipsum dolor sit amet... SUPER!!!',\n\t\t\t);\n\t\t}\n\t\t$this->site->data['content']=$this->loader->getController('Form')\n\t\t\t\t\t\t->setSnippetName('therapy_form')\n\t\t\t\t\t\t->process()\n\t\t\t\t\t\t->setValues($default_values)\n\t\t\t\t\t\t->render();\n\t\treturn $this;\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submit_apisfact_prestashop';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "abstract function form();", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitWi_weatherModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitCaptureleadsxavierModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "abstract public function createForm();", "abstract public function createForm();", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitKushkipagosModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n if(Currency::getDefaultCurrency()->iso_code=='COP'){\n return $helper->generateForm(array($this->getConfigFormCOP()));\n }else{\n return $helper->generateForm(array($this->getConfigForm()));\n }\n\n }", "public function render()\n {\n return $this->getFormCreator()->render();\n }", "public function render(){\n\t\t$fhp; // form_helper_params\n\t\t$value = $this->_data['value'];\n\t\t$form_helper = 'input';\n\t\t$attributes = Arr::extract($this->_data,['id','required','maxlength','title','pattern','readonly','class','size','placeholder','multiple','accept','options']);\n\t\tif(!in_array($this->_data['type'],['radio'])) unset($attributes['options']);\n\t\tif($attributes['required']!==true) unset($attributes['required']);\n\t\tif($attributes['readonly']!==true) unset($attributes['readonly']);\n\t\tif(!$attributes['maxlength']) unset($attributes['maxlength']);\n\t\tif(!$attributes['size']) unset($attributes['size']);\n\t\t$fhp = [$this->_data['name'],$value,$attributes];\n\t\t//$name = $this->_data['name'];\n\t\t//open,close,input,button,checkbox,file,hidden,image,label,password,radio,select,submit,textarea,\n\t\t//$attr\n\t\tswitch($this->_data['type']){\n\t\t\tcase'form':\n\t\t\t\t$form_helper = $this->_data['data_type']; $fhp=[];\n\t\t\t\tbreak;\n\t\t\tcase'select':\n\t\t\t\t//unset\n\t\t\t\t$form_helper='select'; $fhp=[$this->_data['name'],$this->_data['options'],$value,$attributes];\n\t\t\t\tbreak;\n\t\t\tcase'checkbox':\n\t\t\t\t$fhp = [$this->_data['name'],1,!!($value),$attributes];\n\t\t\t\t$form_helper='checkbox';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//if($this->_data['type'] == 'radio') $fhp[2]['options'] = Arr::get($this->_data,'options');\n\t\t\t\tif(in_array($this->_data['type'],['file','select','checkbox','radio','hidden'])) $this->_data['inputtype'] = $this->_data['type'];\n\t\t\t\t//if()\n\t\t\t\tswitch($this->_data['data_type']){\n\t\t\t\t\tcase'int':\n\t\t\t\t\t\t$fhp[2]['type']='number';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase'text':\n\t\t\t\t\t\t$form_helper='textarea';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\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\tbreak;\n\t\t\t}\n\t\t\t\n\t\tif($form_helper=='input') $fhp[2]['type']=$this->_data['inputtype'];\n\t\t/*switch($this->_data['data_type']){\n\t\t\tcase'form':\n\t\t\t\t\n\t\t\t\t\n\t\t\t}*/\n\t\treturn call_user_func_array([$this,$form_helper],$fhp);\n\t\t//->($this->_data['name']);\n\t\t//return json_encode($this->_datations);\n\t\t//return \n\t\t}", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "function printForm(){\n\n\t\tif( $this->returnOutput ){\n\n\t\t\tob_start();\n\t\t\techo $this->openForm();\n\t\t\tfor ($n=0; $n < $this->columns; $n++) $this->_outputField($n);\n\t\t\techo $this->closeForm();\n\t\t\t$html_block = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\treturn $html_block;\n\n\t\t} else {\n\n\t\t\t$this->openForm();\n\t\t\tfor ($n=0; $n < $this->columns; $n++) $this->_outputField($n);\n\t\t\t$this->closeForm();\n\n\t\t}\n\n\t}", "function _renderForm( $data )\n {\n $user = JFactory::getUser();\n $vars = new JObject();\n\n $html = $this->_getLayout('form', $vars);\n\n return $html;\n }", "public static function display_create_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=save' method='post'>\";\n echo \"Name: <input type='text' name='name' /><br />\";\n echo \"Description: <textarea name='description'></textarea><br />\";\n echo \"<input type='submit' value='Save' />\";\n echo \"</form>\";\n }", "public function form()\n\t{\n\t\tglobal $L;\n\n\t\t$html = '<div class=\"mb-3\">';\n\t\t$html .= '<label class=\"form-label\" for=\"label\">' . $L->get('Label') . '</label>';\n\t\t$html .= '<input class=\"form-control\" id=\"label\" name=\"label\" type=\"text\" value=\"' . $this->getValue('label') . '\">';\n\t\t$html .= '<div class=\"form-text\">' . $L->get('This title is almost always used in the sidebar of the site') . '</div>';\n\t\t$html .= '</div>';\n\n\t\tif (defined('BLUDIT_PRO')) {\n\t\t\t$html .= '<div class=\"mb-3\">';\n\t\t\t$html .= '<label class=\"form-label\" for=\"excludeAdmins\">' . $L->get('Exclude administrators users') . '</label>';\n\t\t\t$html .= '<select class=\"form-select\" id=\"excludeAdmins\" name=\"excludeAdmins\">';\n\t\t\t$html .= '<option value=\"true\" ' . ($this->getValue('excludeAdmins') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';\n\t\t\t$html .= '<option value=\"false\" ' . ($this->getValue('excludeAdmins') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';\n\t\t\t$html .= '</select>';\n\t\t\t$html .= '</div>';\n\t\t}\n\n\t\treturn $html;\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submit'.$this->name;\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFieldsValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitMyeticketsModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function output() {\n $form_div = new div();\n $form_div->setId('form_' . $this->_fname);\n $form_div->setClass('form_elements');\n\n $form_div->add(implode(\"\\n\",$this->_output));\n\n if (!empty($this->_output_submit)) {\n $submitWrapper = new div();\n $submitWrapper->setId('form_submit_' .$this->_fname);\n $submitWrapper->setClass('form_submit_elements');\n $form_div->add($submitWrapper->add(implode(\"\\n\",$this->_output_submit)));\n }\n\n return $form_div->html();\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitOrderrefModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function renderForm() {\n\n $id_default_lang = $this->context->language->id;\n $id_shop = $this->context->shop->id;\n\n /* Render Form */\n $carousel_types = array(\n array(\n 'value' => 'featured',\n 'name' => $this->l('Featured products')\n ),\n array(\n 'value' => 'new',\n 'name' => $this->l('New products')\n ),\n array(\n 'value' => 'special',\n 'name' => $this->l('Special products')\n ),\n array(\n 'value' => 'category',\n 'name' => $this->l('All products from certain category')\n ),\n array(\n 'value' => 'custom',\n 'name' => $this->l('Custom products')\n )\n );\n\n // Get Categories\n $root_category = Category::getRootCategory($id_default_lang);\n $this->_getCategories($root_category->id_category, $id_shop);\n\n // Init Fields form array\n $this->fields_form = array(\n 'legend' => array(\n 'title' => $this->l('Carousel'),\n 'icon' => 'icon-cogs'\n ),\n // Inputs\n 'input' => array(\n array(\n 'type' => 'text',\n 'label' => $this->l('Carousel Title'),\n 'name' => 'title',\n 'desc' => $this->l('Must be less than 250 characters.'),\n 'size' => 50,\n 'required' => true,\n 'lang' => true\n ),\n array(\n 'type' => 'select',\n 'name' => 'carousel_type',\n 'label' => $this->l('Carousel Content'),\n 'required' => false,\n 'lang' => false,\n 'options' => array(\n 'query' => $carousel_types,\n 'id' => 'value',\n 'name' => 'name'\n )\n ),\n array(\n 'type' => 'select',\n 'name' => 'select_category',\n 'label' => $this->l('Select a category'),\n 'required' => false,\n 'lang' => false,\n 'options' => array(\n 'query' => $this->_categorySelect,\n 'id' => 'value',\n 'name' => 'name'\n )\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Add a product'),\n 'name' => 'product_autocomplete',\n 'size' => 50,\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Carousel Content'),\n 'name' => 'carousel_content',\n 'size' => 50\n ),\n ),\n // Submit Button\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'name' => 'saveProductCarousel'\n )\n );\n\n if (Shop::isFeatureActive()){\n $this->fields_form['input'][] = array(\n 'type' => 'shop',\n 'label' => $this->l('Shop association'),\n 'name' => 'checkBoxShopAsso',\n );\n }\n\n if (!($obj = $this->loadObject(true)))\n return;\n\n if ($obj && $obj->carousel_type == 'custom'){\n $carousel_content_products = array();\n $carousel_content = explode(',', $obj->carousel_content);\n\n foreach ($carousel_content as $pid) {\n $product = new Product($pid, false, $id_default_lang);\n $carousel_content_products[] = array(\n 'id' => $pid,\n 'name' => $product->name,\n 'ref' => $product->reference\n );\n }\n\n $this->tpl_form_vars['carousel_content_products'] = $carousel_content_products;\n }\n\n return parent::renderForm();\n }", "public static function outputForm()\n {\n $out = <<<EOD\n <form method=\"post\" action=\"../webroot/rm-movies.php\" onsubmit=\"\">\n <input type=hidden name=search value='simple-search'/>\n <input type='text' name='title-simple' placeholder='Sök Filmtitel' />\n </form>\nEOD;\n return $out;\n }", "function process_form()\n {\n }", "function create() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->createElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitWi_spentModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function get_form( $atts = array() ) {\r\n\t\t\r\n\t\t\tob_start();\r\n\t\t\t$this->output( $atts );\r\n\t\t\treturn ob_get_clean();\r\n\t\t\r\n\t}", "protected function renderForm()\n {\n $helper = PrestashopFactory::buildHelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitIfthenpayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function renderForm()\n {\n $default_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n $this->renderConfigurationForm();\n\n $helper = new HelperForm();\n $helper->module = $this;\n $helper->name_controller = $this->name;\n $helper->identifier = $this->identifier;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n foreach (Language::getLanguages(false) as $lang) {\n $helper->languages[] = array(\n 'id_lang' => $lang['id_lang'],\n 'iso_code' => $lang['iso_code'],\n 'name' => $lang['name'],\n 'is_default' => ($default_lang == $lang['id_lang'] ? 1 : 0)\n );\n }\n\n $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;\n $helper->default_form_language = $default_lang;\n $helper->allow_employee_form_lang = $default_lang;\n $helper->toolbar_scroll = true;\n $helper->title = $this->displayName;\n $helper->submit_action = 'save'.$this->name;\n $helper->toolbar_btn = array(\n 'save' =>\n array(\n 'desc' => $this->l('Save'),\n 'href' => AdminController::$currentIndex.'&configure='.$this->name.'&save'.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules'),\n )\n );\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFieldsValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n\n return $helper->generateForm($this->fields_form);\n }", "function _renderForm($data)\n {\n $vars = new JObject();\n\n $html = $this->_getLayout('form', $vars);\n\n return $html;\n }", "private function _displayForm(){\n\t $moneda = Tools::getValue('moneda', $this->moneda);\n\t $iseuro = ($moneda == '978') ? ' selected=\"selected\" ' : '';\n\t $isdollar = ($moneda == '840') ? ' selected=\"selected\" ' : '';\n \t // Opciones para activar/desactivar SSL\n\t $ssl = Tools::getValue('ssl', $this->ssl);\n\t $ssl_si = ($ssl == 'si') ? ' checked=\"checked\" ' : '';\n\t $ssl_no = ($ssl == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para el comportamiento en error en el pago\n\t $error_pago = Tools::getValue('error_pago', $this->error_pago);\n\t $error_pago_si = ($error_pago == 'si') ? ' checked=\"checked\" ' : '';\n\t $error_pago_no = ($error_pago == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para activar los idiomas\n\t $idiomas_estado = Tools::getValue('idiomas_estado', $this->idiomas_estado);\n\t $idiomas_estado_si = ($idiomas_estado == 'si') ? ' checked=\"checked\" ' : '';\n\t $idiomas_estado_no = ($idiomas_estado == 'no') ? ' checked=\"checked\" ' : '';\n\t \n\t \n\t // Mostar formulario\n\t\t$this->_html .=\n\t\t'<form action=\"'.$_SERVER['REQUEST_URI'].'\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/admin/contact.gif\" />'.$this->l('Configuraci&oacute;n del TPV').'</legend>\n\t\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t\t\t\t<tr><td colspan=\"2\">'.$this->l('Por favor completa la informaci&oacute;n requerida que te proporcionar&aacute; tu banco Servired.').'.<br /><br /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('URL de llamada del entorno').'</td><td><input type=\"text\" name=\"urltpv\" value=\"'.Tools::getValue('urltpv', $this->urltpv).'\" style=\"width: 330px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Clave secreta de encriptaci&oacute;n').'</td><td><input type=\"password\" name=\"clave\" value=\"'.Tools::getValue('clave', $this->clave).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Nombre del comercio').'</td><td><input type=\"text\" name=\"nombre\" value=\"'.htmlentities(Tools::getValue('nombre', $this->nombre), ENT_COMPAT, 'UTF-8').'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de comercio (FUC)').'</td><td><input type=\"text\" name=\"codigo\" value=\"'.Tools::getValue('codigo', $this->codigo).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de terminal').'</td><td><input type=\"text\" name=\"terminal\" value=\"'.Tools::getValue('terminal', $this->terminal).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de moneda').'</td><td>\n\t\t\t\t\t<select name=\"moneda\" style=\"width: 80px;\"><option value=\"\"></option><option value=\"978\"'.$iseuro.'>EURO</option><option value=\"840\"'.$isdollar.'>DOLLAR</option></select></td></tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de transacci&oacute;n').'</td><td><input type=\"text\" name=\"trans\" value=\"'.Tools::getValue('trans', $this->trans).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t<br>\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/t/9.gif\" />'.$this->l('Personalizaci&oacute;n').'</legend>\n\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t<tr>\n\t\t\t<td colspan=\"2\">'.$this->l('Por favor completa los datos adicionales.').'.<br /><br /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('SSL en URL de validaci&oacute;n').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_1\" value=\"si\" '.$ssl_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_0\" value=\"no\" '.$ssl_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('En caso de error, permitir elegir otro medio de pago').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_1\" value=\"si\" '.$error_pago_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_0\" value=\"no\" '.$error_pago_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('Activar los idiomas en el TPV').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_si\" value=\"si\" '.$idiomas_estado_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_no\" value=\"no\" '.$idiomas_estado_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t\t</fieldset>\t\n\t\t\t<br>\n\t\t<input class=\"button\" name=\"btnSubmit\" value=\"'.$this->l('Guardar configuraci&oacute;n').'\" type=\"submit\" />\n\t\t\t\t\t\n\t\t\t\n\t\t</form>';\n\t}", "public function renderForm()\n {\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Configuration'),\n 'icon' => 'icon-gears'\n ),\n 'input' => array(\n array(),\n array(\n 'type' => 'text',\n 'label' => $this->l('API Key'),\n 'name' => 'SEND_SMS_API',\n 'desc' => $this->l('The API Key is used to authenticate in order to send SMS.'),\n 'required' => true\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Admin Mobile Number'),\n 'name' => 'ADMIN_MOBILE',\n 'required' => true\n )\n ),\n 'submit' => array(\n 'title' => $this->l('Save')\n )\n )\n );\n $fields_form = $this->setDefaultInput($fields_form);\n $helper = new HelperForm();\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));\n $helper->default_form_language = $lang->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG')\n ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;\n $this->fields_form = array();\n $helper->id = (int) Tools::getValue('id_carrier');\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'btnSubmit';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false);\n $helper->currentIndex .= '&configure=' . $this->name . '&tab_module=' . $this->tab;\n $helper->currentIndex .= '&module_name=' . $this->name;\n $helper->currentIndex .= '&configuration=yes';\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFieldsValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n \n return $helper->generateForm(array(\n $fields_form\n ));\n }", "public function outputSetupForm()\n {\n $this->_directFormHtml('iContact');\n }", "public function draw (\n\t)\t\t\t\t\t// RETURNS <void>\n\t\n\t// $contentForm->draw();\n\t{\n\t\t// Draw the appropriate form block\n\t\techo '\n\t\t<form class=\"uniform\" action=\"' . $this->baseURL . '?id=' . $this->contentID . '\" enctype=\"multipart/form-data\" method=\"post\">' . Form::prepare(SITE_HANDLE . \"-content-\" . $this->contentID);\n\t\t\n\t\t$this->drawSettings();\n\t\t$this->drawBlocks();\n\t\t$this->drawFooter();\n\t\t\n\t\techo '\n\t\t</form>';\n\t}", "function _renderForm( $data )\r\n {\r\n \t$user = JFactory::getUser();\r\n $vars = new JObject();\r\n $vars->onselection_text = $this->params->get('onselection', '');\r\n $html = $this->_getLayout('form', $vars);\r\n return $html;\r\n }", "function renderConfigForm() {\n\t}", "public function Render($form)\r\n\t{\r\n\t\t$this->form = $form;\r\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitMClModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function _Render() {\n $form_instance = $this->form_instance;\n // Return the contents\n return '3/15 Questions Answered';\n }", "function _onRenderForm($tmp) {\n\t\t\n\t\t/* Show Page title */\n\t\tif ($this->_FORM_CONFIG ['showtitle'] == 1) {\n\t\t\t$tmp->assign ( 'SHOW_PAGE_TITLE', TRUE );\n\t\t}\n\t\t\n\t\t/* Show Reset Button */\n\t\tif ($this->_FORM_CONFIG ['showresetbutton'] == 1) {\n\t\t\t$tmp->assign ( 'SHOW_RESET_BUTTON', TRUE );\n\t\t}\n\t\t\n\t\t$tmp->assign ( 'RESETBUTTONTEXT', $this->_FORM_CONFIG ['resetbuttontext'] );\n\t\t$tmp->assign ( 'SUBMITBUTTONTEXT', $this->_FORM_CONFIG ['submitbuttontext'] );\n\t\t\n\t\treturn $tmp;\n\t}", "function render() {\n\t\tglobal $current_user, $user_identity;\n\n\t\t$r = '';\n\n\t\t$field_id = $this->get_attribute( 'id' );\n\t\t$field_type = $this->get_attribute( 'type' );\n\t\t$field_label = $this->get_attribute( 'label' );\n\t\t$field_required = $this->get_attribute( 'required' );\n\t\t$placeholder = $this->get_attribute( 'placeholder' );\n\t\t$field_placeholder = ( ! empty( $placeholder ) ) ? \"placeholder='\" . esc_attr( $placeholder ) . \"'\" : '';\n\n\t\tif ( isset( $_POST[$field_id] ) ) {\n\t\t\t$this->value = stripslashes( (string) $_POST[$field_id] );\n\t\t} elseif (\n\t\t\tis_user_logged_in()\n\t\t\t&& ( ( defined( 'IS_WPCOM' ) && IS_WPCOM )\n\t\t\t || true === apply_filters( 'jetpack_auto_fill_logged_in_user', false )\n\t\t\t)\n\t\t) {\n\t\t\t// Special defaults for logged-in users\n\t\t\tswitch ( $this->get_attribute( 'type' ) ) {\n\t\t\tcase 'email';\n\t\t\t\t$this->value = $current_user->data->user_email;\n\t\t\t\tbreak;\n\t\t\tcase 'name' :\n\t\t\t\t$this->value = $user_identity;\n\t\t\t\tbreak;\n\t\t\tcase 'url' :\n\t\t\t\t$this->value = $current_user->data->user_url;\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t$this->value = $this->get_attribute( 'default' );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->value = $this->get_attribute( 'default' );\n\t\t}\n\n\t\t$field_value = Grunion_Contact_Form_Plugin::strip_tags( $this->value );\n\t\t$field_label = Grunion_Contact_Form_Plugin::strip_tags( $field_label );\n\n\t\tswitch ( $field_type ) {\n\t\tcase 'email' :\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='\" . esc_attr( $field_id ) . \"' class='grunion-field-label email\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='email' name='\" . esc_attr( $field_id ) . \"' id='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr( $field_value ) . \"' class='email' \" . $field_placeholder . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'textarea' :\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='contact-form-comment-\" . esc_attr( $field_id ) . \"' class='grunion-field-label textarea\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<textarea name='\" . esc_attr( $field_id ) . \"' id='contact-form-comment-\" . esc_attr( $field_id ) . \"' rows='20' \" . $field_placeholder . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \">\" . esc_textarea( $field_value ) . \"</textarea>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'radio' :\n\t\t\t$r .= \"\\t<div><label class='grunion-field-label\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\tforeach ( $this->get_attribute( 'options' ) as $option ) {\n\t\t\t\t$option = Grunion_Contact_Form_Plugin::strip_tags( $option );\n\t\t\t\t$r .= \"\\t\\t<label class='grunion-radio-label radio\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\";\n\t\t\t\t$r .= \"<input type='radio' name='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr( $option ) . \"' class='radio' \" . checked( $option, $field_value, false ) . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/> \";\n\t\t\t\t$r .= esc_html( $option ) . \"</label>\\n\";\n\t\t\t\t$r .= \"\\t\\t<div class='clear-form'></div>\\n\";\n\t\t\t}\n\t\t\t$r .= \"\\t\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'checkbox' :\n\t\t\t$r .= \"\\t<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label class='grunion-field-label checkbox\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='checkbox' name='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr__( 'Yes', 'jetpack' ) . \"' class='checkbox' \" . checked( (bool) $field_value, true, false ) . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/> \\n\";\n\t\t\t$r .= \"\\t\\t\" . esc_html( $field_label ) . ( $field_required ? '<span>'. __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<div class='clear-form'></div>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'select' :\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='\" . esc_attr( $field_id ) . \"' class='grunion-field-label select\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>'. __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t<select name='\" . esc_attr( $field_id ) . \"' id='\" . esc_attr( $field_id ) . \"' class='select' \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \">\\n\";\n\t\t\tforeach ( $this->get_attribute( 'options' ) as $option ) {\n\t\t\t\t$option = Grunion_Contact_Form_Plugin::strip_tags( $option );\n\t\t\t\t$r .= \"\\t\\t<option\" . selected( $option, $field_value, false ) . \">\" . esc_html( $option ) . \"</option>\\n\";\n\t\t\t}\n\t\t\t$r .= \"\\t</select>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'date' :\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='\" . esc_attr( $field_id ) . \"' class='grunion-field-label \" . esc_attr( $field_type ) . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='date' name='\" . esc_attr( $field_id ) . \"' id='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr( $field_value ) . \"' class='\" . esc_attr( $field_type ) . \"' \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\n\t\t\twp_enqueue_script( 'grunion-frontend', plugins_url( 'js/grunion-frontend.js', __FILE__ ), array( 'jquery', 'jquery-ui-datepicker' ) );\n\t\t\tbreak;\n\t\tdefault : // text field\n\t\t\t// note that any unknown types will produce a text input, so we can use arbitrary type names to handle\n\t\t\t// input fields like name, email, url that require special validation or handling at POST\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='\" . esc_attr( $field_id ) . \"' class='grunion-field-label \" . esc_attr( $field_type ) . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='text' name='\" . esc_attr( $field_id ) . \"' id='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr( $field_value ) . \"' class='\" . esc_attr( $field_type ) . \"' \" . $field_placeholder . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t}\n\n\t\treturn apply_filters( 'grunion_contact_form_field_html', $r, $field_label, ( in_the_loop() ? get_the_ID() : null ) );\n\t}", "protected function form()\n {\n $form = new Form(new BackPeopleInfo());\n\n $form->text('name', __('姓名'));\n $form->text('id_num', __('身份证号码'));\n $form->mobile('phone', __('手机号码'));\n $form->text('address', __('楼栋房号'));\n $form->text('originatin', __('始发地'));\n $form->date('back_date', __('返回日期'))->default(date('Y-m-d'));\n $form->date('isolate_date', __('隔离日期'))->default(date('Y-m-d'));\n $form->text('isolate_flag', __('解除隔离'))->default('否');\n $form->text('isolate_level', __('隔离等级'))->default('普通');\n $form->text('qrcode_flag', __('网格化管理'))->default('否');\n $form->text('vehicle_info', __('交通工具'));\n $form->text('remarks', __('备注'));\n\n return $form;\n }", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitStatsProfitMarginModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "abstract public function forms();", "private function displayForm()\n {\n // Preparation des paramètres du mail.\n $data['headerTitle'] = 'Contact';\n $data['headerDescription'] = 'Page de contact';\n $data['title'] = 'Contact';\n\n // Affichage du formulaire.\n $this->load->view('templates/header', $data);\n $this->load->view('templates/alert', $data);\n $this->load->view('contact/index', $data);\n $this->load->view('templates/footer', $data);\n }", "public function outputSetupForm() {\n\t\t$this->_directFormHtml( 'webinarjamstudio' );\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitTwispayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitB2binpayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function form()\n {\n $form = new Form(new Member);\n\n $form->text('open_id', 'Open id');\n $form->text('wx_open_id', 'Wx open id');\n $form->text('access_token', 'Access token');\n $form->number('expires', 'Expires');\n $form->text('refresh_token', 'Refresh token');\n $form->text('unionid', 'Unionid');\n $form->text('nickname', 'Nickname');\n $form->switch('subscribe', 'Subscribe');\n $form->switch('sex', 'Sex');\n $form->text('headimgurl', 'Headimgurl');\n $form->switch('disablle', 'Disablle');\n $form->number('time', 'Time');\n $form->mobile('phone', 'Phone');\n\n return $form;\n }", "abstract protected function getForm();", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitPromoModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n // Ligne de code pour afficher le formulaire de base du module\n // return $helper->generateForm(array($this->getConfigForm()));\n return $helper->generateForm(array());\n }", "public function buildForm()\n {\n $this\n ->add('group_name', 'text')\n ->add(\n 'organizations',\n 'choice',\n [\n 'choices' => $this->getOrganizationName(),\n 'attr' => ['style' => 'height:100px'],\n 'multiple' => true\n ]\n )\n ->add(\n 'group_identifier',\n 'text',\n [\n 'attr' => [\n 'id' => 'group_identifier'\n ],\n 'help_block' => [\n 'text' => \"Your group identifier will be used as a prefix for your organisation group. We recommend that you use a short abbreviation that uniquely identifies your organisation group. If your group identifier is 'abc' the username for the group created with this registration will be 'abc_group'.\",\n 'tag' => 'p',\n 'attr' => ['class' => 'help-block']\n ],\n 'label' => 'Group Identifier'\n ]\n );\n }", "public function Render()\n\t{\n\t // when in NEW mode or when parent form in NEW mode, do nothing\n\t global $g_BizSystem;\n\t $prtMode = \"\";\n\t if ($this->m_ParentFormName) {\n $prtForm = $g_BizSystem->GetObjectFactory()->GetObject($this->m_ParentFormName);\n $prtMode = $prtForm->GetDisplayMode()->GetMode();\n\t }\n\t if ($this->m_Mode != MODE_N && $prtMode != MODE_N)\n\t {\n \t // get view history\n \t if (!$this->m_NoHistoryInfo)\n\t $this->SetHistoryInfo($g_BizSystem->GetSessionContext()->GetViewHistory($this->m_Name));\n\t }\n\t if ($this->m_Mode == MODE_N)\n $this->UpdateActiveRecord($this->GetDataObj()->NewRecord());\n\n //Moved the renderHTML function infront of declaring subforms\n $renderedHTML = $this->RenderHTML();\n\n\t global $g_BizSystem;\n\t // prepare the subforms' dataobjs, since the subform relates to parent form by dataobj association\n\t if ($this->m_SubForms) {\n \t foreach($this->m_SubForms as $subForm) {\n $formObj = $g_BizSystem->GetObjectFactory()->GetObject($subForm);\n $dataObj = $this->GetDataObj()->GetRefObject($formObj->m_DataObjName);\n if ($dataObj)\n $formObj->SetDataObj($dataObj);\n }\n\t }\n\t $this->SetClientScripts();\n\n return $renderedHTML;\n\t}", "abstract function setupform();", "public function getTemplateExample()\n\t{\n\t\t// start form\n\t\t$value = \"\\n\";\n\t\t$value .= '{form:' . $this->getName() . \"}\\n\";\n\n\t\t/**\n\t\t * At first all the hidden fields need to be added to this form, since\n\t\t * they're not shown and are best to be put right beneath the start of the form tag.\n\t\t */\n\t\tforeach($this->getFields() as $object)\n\t\t{\n\t\t\t// is a hidden field\n\t\t\tif(($object instanceof SpoonFormHidden) && $object->getName() != 'form')\n\t\t\t{\n\t\t\t\t$value .= \"\\t\" . '{$hid' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . \"}\\n\";\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Add all the objects that are NOT hidden fields. Based on the existance of some methods\n\t\t * errors will or will not be shown.\n\t\t */\n\t\tforeach($this->getFields() as $object)\n\t\t{\n\t\t\t// NOT a hidden field\n\t\t\tif(!($object instanceof SpoonFormHidden))\n\t\t\t{\n\t\t\t\t// buttons\n\t\t\t\tif($object instanceof SpoonFormButton)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$btn' . SpoonFilter::toCamelCase($object->getName()) . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// single checkboxes\n\t\t\t\telseif($object instanceof SpoonFormCheckbox)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$chk' . SpoonFilter::toCamelCase($object->getName()) . '} {$chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// multi checkboxes\n\t\t\t\telseif($object instanceof SpoonFormMultiCheckbox)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<div{option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<p class=\"label\">' . SpoonFilter::toCamelCase($object->getName()) . '</p>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<ul class=\"inputList\">' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\\t\" . '<li><label for=\"{$' . $object->getName() . '.id}\">{$' . $object->getName() . '.chk' . SpoonFilter::toCamelCase($object->getName()) . '} {$' . $object->getName() . '.label}</label></li>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{/iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '</ul>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</div>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// dropdowns\n\t\t\t\telseif($object instanceof SpoonFormDropdown)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . 'Error} class=\"errorArea\"{/option:ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . '} {$ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// imagefields\n\t\t\t\telseif($object instanceof SpoonFormImage)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$file' . SpoonFilter::toCamelCase($object->getName()) . '} <span class=\"helpTxt\">{$msgHelpImageField}</span> {$file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// filefields\n\t\t\t\telseif($object instanceof SpoonFormFile)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$file' . SpoonFilter::toCamelCase($object->getName()) . '} {$file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// radiobuttons\n\t\t\t\telseif($object instanceof SpoonFormRadiobutton)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<div{option:rbt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:rbt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<p class=\"label\">' . SpoonFilter::toCamelCase($object->getName()) . '</p>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$rbt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<ul class=\"inputList\">' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\\t\" . '<li><label for=\"{$' . $object->getName() . '.id}\">{$' . $object->getName() . '.rbt' . SpoonFilter::toCamelCase($object->getName()) . '} {$' . $object->getName() . '.label}</label></li>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{/iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '</ul>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</div>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// datefields\n\t\t\t\telseif($object instanceof SpoonFormDate)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$txt' . SpoonFilter::toCamelCase($object->getName()) . '} <span class=\"helpTxt\">{$msgHelpDateField}</span> {$txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// timefields\n\t\t\t\telseif($object instanceof SpoonFormTime)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$txt' . SpoonFilter::toCamelCase($object->getName()) . '} <span class=\"helpTxt\">{$msgHelpTimeField}</span> {$txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// textfields\n\t\t\t\telseif(($object instanceof SpoonFormPassword) || ($object instanceof SpoonFormTextarea) || ($object instanceof SpoonFormText))\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$txt' . SpoonFilter::toCamelCase($object->getName()) . '} {$txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $value . '{/form:' . $this->getName() . '}';\n\t}", "function show_form()\n\t\t{\n\t\t\t//set a global template for interactive activities\n\t\t\t$this->t->set_file('run_activity','run_activity.tpl');\n\t\t\t\n\t\t\t//set the css style files links\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'run_activity_css_link'\t=> $this->get_css_link('run_activity', $this->print_mode),\n\t\t\t\t'run_activity_print_css_link'\t=> $this->get_css_link('run_activity', true),\n\t\t\t));\n\t\t\t\n\t\t\t\n\t\t\t// draw the activity's title zone\n\t\t\t$this->parse_title($this->activity_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_name to the requested one or the stored name\n\t\t\t// the requested one handle the looping in activity form\n\n\t\t\t$wf_name = get_var('wf_name','post',$this->instance->getName());\n\t\t\t$this->parse_instance_name($wf_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_set_owner to the requested one or the stored owner\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$wf_set_owner = get_var('wf_set_owner','post',$this->instance->getOwner());\n\t\t\t$this->parse_instance_owner($wf_set_owner);\n\t\t\t\n\t\t\t// draw the activity central user form\n\t\t\t$this->t->set_var(array('activity_template' => $this->wf_template->parse('output', 'template')));\n\t\t\t\n\t\t\t//draw the select priority box\n\t\t\t// init priority to the requested one or the stored priority\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$priority = get_var('wf_priority','post',$this->instance->getPriority());\n\t\t\t$this->parse_priority($priority);\n\t\t\t\n\t\t\t//draw the select next_user box\n\t\t\t// init next_user to the requested one or the stored one\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$next_user = get_var('wf_next_user','POST',$this->instance->getNextUser());\n\t\t\t$this->parse_next_user($next_user);\n\t\t\t\n\t\t\t//draw print_mode buttons\n\t\t\t$this->parse_print_mode_buttons();\n\t\t\t\n\t\t\t//draw the activity submit buttons\t\n\t\t\t$this->parse_submit();\n\t\t\t\n\t\t\t//draw the info zone\n\t\t\t$this->parse_info_zone();\n\t\t\t\n\t\t\t//draw the history zone if user wanted it\n\t\t\t$this->parse_history_zone();\n\t\t\t\n\t\t\t$this->translate_template('run_activity');\n\t\t\t$this->t->pparse('output', 'run_activity');\n\t\t\t$GLOBALS['egw']->common->egw_footer();\n\t\t}", "public function renderUploadForm() {}", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "function getFormHTML()\n\t{\n\t\tstatic $id_num = 1000;\n\n\t\t$type = $this->type;\n\t\t$name = $this->name;\n\t\t$value = $this->_getTypeValue($this->type, $this->value);\n\t\t$default = $this->_getTypeValue($this->type, $this->default);\n\t\t$column_name = 'extra_vars' . $this->idx;\n\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t$buff = array();\n\t\tswitch($type)\n\t\t{\n\t\t\t// Homepage\n\t\t\tcase 'homepage' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"homepage\" />';\n\t\t\t\tbreak;\n\t\t\t// Email Address\n\t\t\tcase 'email_address' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"email_address\" />';\n\t\t\t\tbreak;\n\t\t\t// Phone Number\n\t\t\tcase 'tel' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[0] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[1] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[2] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\tbreak;\n\t\t\t// textarea\n\t\t\tcase 'textarea' :\n\t\t\t\t$buff[] = '<textarea name=\"' . $column_name . '\" rows=\"8\" cols=\"42\">' . $value . '</textarea>';\n\t\t\t\tbreak;\n\t\t\t// multiple choice\n\t\t\tcase 'checkbox' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] =' <li><input type=\"checkbox\" name=\"' . $column_name . '[]\" id=\"' . $tmp_id . '\" value=\"' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '\" ' . $checked . ' /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// single choice\n\t\t\tcase 'select' :\n\t\t\t\t$buff[] = '<select name=\"' . $column_name . '\" class=\"select\">';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$selected = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = ' selected=\"selected\"';\n\t\t\t\t\t}\n\t\t\t\t\t$buff[] = ' <option value=\"' . $v . '\" ' . $selected . '>' . $v . '</option>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</select>';\n\t\t\t\tbreak;\n\t\t\t// radio\n\t\t\tcase 'radio' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] = '<li><input type=\"radio\" name=\"' . $column_name . '\" id=\"' . $tmp_id . '\" ' . $checked . ' value=\"' . $v . '\" class=\"radio\" /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// date\n\t\t\tcase 'date' :\n\t\t\t\t// datepicker javascript plugin load\n\t\t\t\tContext::loadJavascriptPlugin('ui.datepicker');\n\n\t\t\t\t$buff[] = '<input type=\"hidden\" name=\"' . $column_name . '\" value=\"' . $value . '\" />'; \n\t\t\t\t$buff[] =\t'<input type=\"text\" id=\"date_' . $column_name . '\" value=\"' . zdate($value, 'Y-m-d') . '\" class=\"date\" />';\n\t\t\t\t$buff[] =\t'<input type=\"button\" value=\"' . Context::getLang('cmd_delete') . '\" class=\"btn\" id=\"dateRemover_' . $column_name . '\" />';\n\t\t\t\t$buff[] =\t'<script type=\"text/javascript\">';\n\t\t\t\t$buff[] = '//<![CDATA[';\n\t\t\t\t$buff[] =\t'(function($){';\n\t\t\t\t$buff[] =\t'$(function(){';\n\t\t\t\t$buff[] =\t' var option = { dateFormat: \"yy-mm-dd\", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\\'-100:+10\\', onSelect:function(){';\n\t\t\t\t$buff[] =\t' $(this).prev(\\'input[type=\"hidden\"]\\').val(this.value.replace(/-/g,\"\"))}';\n\t\t\t\t$buff[] =\t' };';\n\t\t\t\t$buff[] =\t' $.extend(option,$.datepicker.regional[\\'' . Context::getLangType() . '\\']);';\n\t\t\t\t$buff[] =\t' $(\"#date_' . $column_name . '\").datepicker(option);';\n\t\t\t\t$buff[] =\t' $(\"#dateRemover_' . $column_name . '\").click(function(){';\n\t\t\t\t$buff[] =\t' $(this).siblings(\"input\").val(\"\");';\n\t\t\t\t$buff[] =\t' return false;';\n\t\t\t\t$buff[] =\t' })';\n\t\t\t\t$buff[] =\t'});';\n\t\t\t\t$buff[] =\t'})(jQuery);';\n\t\t\t\t$buff[] = '//]]>';\n\t\t\t\t$buff[] = '</script>';\n\t\t\t\tbreak;\n\t\t\t// address\n\t\t\tcase \"kr_zip\" :\n\t\t\t\tif(($oKrzipModel = getModel('krzip')) && method_exists($oKrzipModel , 'getKrzipCodeSearchHtml' ))\n\t\t\t\t{\n\t\t\t\t\t$buff[] = $oKrzipModel->getKrzipCodeSearchHtml($column_name, $value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t// General text\n\t\t\tdefault :\n\t\t\t\t$buff[] =' <input type=\"text\" name=\"' . $column_name . '\" value=\"' . ($value ? $value : $default) . '\" class=\"text\" />';\n\t\t}\n\t\tif($this->desc)\n\t\t{\n\t\t\t$oModuleController = getController('module');\n\t\t\t$oModuleController->replaceDefinedLangCode($this->desc);\n\t\t\t$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';\n\t\t}\n\t\t\n\t\treturn join(PHP_EOL, $buff);\n\t}", "public function start()\n\t{\n\t\t$attrs = \"\";\n\t\tforeach($this->_attributes as $key => $val)\n\t\t\t$attrs .= \"$key=\\\"$val\\\" \";\n\n\t\t$attrs = trim($attrs);\n\t\techo \"<form $attrs>\\n\";\n\t}", "public function render() {\n\t\t$this -> post = front()->registry()->get('post')-> getArray();\n\t\t$this -> request = front()->registry()->get('request', 'variables', '0');\n\t\t$this -> variables = front() -> registry() -> get('request', 'variables') -> getArray();\n\t\t$this -> get = front() -> registry() -> get('get') -> getArray();\n\t\t$this->dept = $this->Dept()-> getAll();\n\t\t$this->staff = $this->Staff()-> getAll();\n\t\t$this->article = $this->Article()-> getAll();\n\t\t\n\t\tif (isset($this -> post)) {\n\t\t\t$this -> _setErrors();\n\t\t\t//-> post validation\n\n\t\t\tif (empty($this -> _errors)) {\n\t\t\t\t$this -> _process();\n\t\t\t\t//-> post processing\n\t\t\t}\n\t\t}\n\n\t\t$this -> _body['depts'] = $this->dept;\n\t\t$this -> _body['staffs'] = $this->staff;\n\t\t$this -> _body['articles'] = $this->article;\n\t\t$this -> _body['error'] = $this -> _errors;\n\t\treturn $this -> _page();\n\t}", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "function smarty_compiler_display_form($tag_attrs, &$compiler)\n{\n\t$_params = $compiler->_parse_attrs($tag_attrs);\n\t\n\tif (!isset($_params['name'])) {\n\t\t$compiler->_syntax_error(\"display_form: missing 'name' parameter\", E_USER_WARNING);\n\t\treturn;\n\t}\n\n\t// whats this meant to be?\n\t$_params['name'] = str_replace('\\'', '', $_params['name']);\n\n\t$output = 'global $xnyo_parent, $forms; '.\"\\n\";\n\t$output .= 'if (!is_object($forms) && !$xnyo_parent->load_plugin(\\'forms\\')) {'.\"\\n\";\n\t$output .= \"\\t\".'$xnyo_parent->trigger_error(\\'Unable to load forms plugin, cant display form.\\', WARNING);'.\"\\n\";\n\t$output .= '} else {'.\"\\n\";\n\t$output .= \"\\t\".'$forms->display(\\''.$_params['name'].'\\', $this);'.\"\\n\";\n\t$output .= \"\\t\".'require_once($forms->get_compiled_filename());'.\"\\n\";\n\t$output .= '}'.\"\\n\";\n\treturn $output;\n}", "function InputForm()\n\t{\t\n\t\t$form = new Form($_SERVER[\"SCRIPT_NAME\"] . \"?id=\" . $this->id, \"crewcvForm\");\n\t\t$form->AddTextInput(\"City name\", \"cityname\", $this->InputSafeString($this->details[\"cityname\"]), \"\", 100);\n\t\t$form->AddSelect(\"Country\", \"country\", $this->id ? $this->details[\"country\"] : $_GET[\"ctry\"], \"\", $this->CountriesList(), true, true, \"onchange='GetFromEmail(\\\"country\\\", \\\"country\\\")';\");\n\t\t$form->AddTextInput(\"\\\"From\\\" email address\", \"emailfrom\", $this->InputSafeString($this->details[\"emailfrom\"]), \"long\", 255);\n\t\tif ($this->details[\"country\"])\n\t\t{\t$country = new Country($this->details[\"country\"]);\n\t\t\t$defemail = $country->EmailFrom();\n\t\t} else\n\t\t{\t$defemail = $this->GetParameter(\"emailfrom\");\n\t\t}\n\t\t$form->AddRawText(\"<label>Default \\\"From\\\" if not defined here</label><label id='ad_ak_emailfrom' class='content_label'>$defemail</label><br />\\n\");\n\t\t$form->AddSubmitButton(\"\", $this->id ? \"Save Changes\" : \"Create New City\", \"submit\");\n\t\tif ($histlink = $this->DisplayHistoryLink(\"cities\", $this->id))\n\t\t{\techo \"<p>\", $histlink, \"</p>\";\n\t\t}\n\t\tif ($this->CanDelete())\n\t\t{\techo \"<p><a href='\", $_SERVER[\"SCRIPT_NAME\"], \"?id=\", $this->id, \"&delete=1\", \n\t\t\t\t\t$_GET[\"delete\"] ? \"&confirm=1\" : \"\", \"'>\", $_GET[\"delete\"] ? \"please confirm you really want to \" : \"\", \n\t\t\t\t\t\"delete this city</a></p>\\n\";\n\t\t}\n\t\t$form->Output();\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "function renderForm( $step ) {\n\t\t$langObj = t3lib_div::makeInstance('tx_golanguage');\n\n\t\t// load template and substitute the markers\n\t\t$this->prepareTemplate( $step );\n\n\t\t$this->addMarker('HEADER', $this->cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['lib.']['stdheader'], $GLOBALS['TSFE']->tmpl->setup['lib.']['stdheader.']));\n\t\t$this->addMarker('FORM_LOGIC_FIELDS', $this->createHiddenField('submitted', 1) . $this->createHiddenField('step', $step) . $this->createHiddenField('uid', $this->data['uid']));\n\t\t$this->addMarker('PROTOCOL', t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https' : 'http');\n\t\t$this->addMarker('LANG', $langObj->getLanguageIso($GLOBALS['TSFE']->sys_language_uid));\n\t\t\t// hide captcha if already verified, or if spam protection has been disabled\n\t\t$this->addMarker('SPAMPROTECT', ($this->conf['useSpamProtection'] && !$this->captchaVerified()) ? $this->parseTemplate('CAPTCHA_TEMPLATE') : '');\n\t\tif ( !$this->newsletterRegEnabled ) {\n\t\t\t$this->addSMarker('NEWSLETTER', '');\n\t\t}\n\n\t\tif ( method_exists($this, $methodName = 'renderStep' . $step) ) {\n\t\t\tcall_user_func( array(&$this, $methodName) );\n\t\t}\n\t\treturn $this->parseTemplate($this->subpartName);\n\t}", "public function populateForm() {}", "function renderFilterCreationForm() {\n\t\t$this->pi_loadLL();\n\t\t$markerArray = array();\n\t\t$content = tslib_CObj::getSubpart($this->fileContent, '###NEWFILTER###');\n\n\t\t$markerList = array('SAVE', 'CANCEL', 'FILTER_TITLE_LABEL', 'FILTER_DESCRIPTION_LABEL');\n\t\tforeach ($markerList as $marker) {\n\t\t\t$markerArray[$marker] = $this->cObj->stdWrap($this->pi_getLL($marker, $marker, false), $this->conf['newfilter.'][strtolower($marker) . '.']);\n\t\t}\n\n\t\t// FORM URL\n\t\tif (!isset($this->conf['newfilter.']['form_url.']['parameter'])) {\n\t\t\t$this->conf['newfilter.']['form_url.']['parameter'] = $GLOBALS['TSFE']->id;\n\t\t}\n\t\t$this->conf['newfilter.']['form_url.']['returnLast'] = 'url';\n\t\t$markerArray['FORM_URL'] = $this->cObj->typolink('', $this->conf['newfilter.']['form_url.']);\n\n\t\t$content = tslib_CObj::substituteMarkerArray($content, $markerArray, '###|###');\n\n\t\treturn $content;\n\t}", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }" ]
[ "0.7521628", "0.75035536", "0.74701256", "0.7464486", "0.7251352", "0.72444326", "0.7197968", "0.7149646", "0.70878905", "0.70858693", "0.70759845", "0.7073373", "0.7055793", "0.7042068", "0.69897294", "0.6944643", "0.6944643", "0.6938831", "0.6911143", "0.69069535", "0.6865808", "0.68605566", "0.6851627", "0.6816474", "0.6805579", "0.68004644", "0.6766644", "0.6760055", "0.67456895", "0.6732453", "0.6730597", "0.6716682", "0.67118835", "0.67099625", "0.67011774", "0.67011774", "0.6699032", "0.6698743", "0.6695059", "0.66897166", "0.6689595", "0.66745734", "0.6668658", "0.6656288", "0.6642648", "0.663787", "0.6632922", "0.66302323", "0.66235495", "0.66179514", "0.6608384", "0.66083384", "0.66060036", "0.65971726", "0.6595457", "0.6588179", "0.65846586", "0.65806377", "0.65782005", "0.65767395", "0.656631", "0.65622467", "0.65607214", "0.65579", "0.65483993", "0.653728", "0.6536116", "0.6532567", "0.6529905", "0.65293914", "0.6526928", "0.6525877", "0.65219873", "0.65104383", "0.6509869", "0.65075445", "0.64878774", "0.648154", "0.6479539", "0.64701366", "0.646582", "0.64646566", "0.6462084", "0.6461545", "0.6444354", "0.64410764", "0.64358604", "0.643504", "0.6430607", "0.6428933", "0.6427027", "0.64215124", "0.6410098", "0.64099824", "0.64036894", "0.6400742", "0.63967025", "0.6396141", "0.63871217", "0.6386266", "0.63709795" ]
0.0
-1
Variable Setting Functions Set the number of columns in the form
public function set_columns($cols) { $this->cols = $cols + 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NumCols() {}", "function twentytwelve_store_store_columns( $columns ) {\n return $columns = 3;\n}", "public function setColumnCount( $count )\n {\n $this->columnsCount = (int) $count;\n }", "function setColumnsCount($columnsCount) {\t \r\n\t \t$this->columnsCount = $columnsCount;\r\n\t \tunSet($this->columnsWidths);\r\n\t}", "function updateSize(){\n $this->cols = exec(\"tput cols\");\n }", "function RGC_dashboard_columns() {\n add_screen_option(\n 'layout_columns',\n array(\n 'max' => 1,\n 'default' => 1\n )\n );\n}", "public function setColumnCount($value)\n {\n return $this->set('ColumnCount', $value);\n }", "public function setColumnCount($value)\n {\n return $this->set('ColumnCount', $value);\n }", "function ReInitTableColumns()\n {\n if ($this->debug_mode)\n echo $this->ClassName . \"::ReInitTableColumns();\" . \"<HR>\";\n foreach ($this->form_fields as $prefix => $form) {\n foreach ($form as $i => $field) {\n foreach ($field as $param => $value) {\n //if found database parameters\n if (strpos($param, \"dbfield_\") !== false) {\n $columnparam = substr($param, strlen(\"dbfield_\"), strlen($param));\n $this->Storage->setColumnParameter($field[\"field_name\"], trim($columnparam), $value);\n }\n }\n }\n }\n }", "function loop_columns() {\r\n return 3; // 3 products per row\r\n }", "public function form_columns($form_id){\n $columns = 0;\n \treturn $columns;\n\n }", "function set_dashboard_columns() {\n\t// how many panels in dashboard\n\t$num = 2;\n\t$user_id = get_current_user_id();\n\tupdate_user_meta( $user_id, 'screen_layout_dashboard', $num );\n}", "function gssettings_settings_layout_columns( $columns, $screen ) {\n global $_gssettings_settings_pagehook;\n if ( $screen == $_gssettings_settings_pagehook ) {\n $columns[$_gssettings_settings_pagehook] = 1;\n }\n return $columns;\n }", "public function numberOfColumns(): int\n {\n return $this->nCols;\n }", "function db2_field_display_size($stmt, $column)\n{\n}", "abstract public function getColumnsCount();", "Function TableSize($length) {\r\n\r\n //if-else block to determine number of rows/columns\r\n if ($length == 3 || $length == 4) {\r\n $numCols = 3;\r\n $numRows = 1;\r\n } else if ($length == 5 || $length == 6) {\r\n $numCols = 2;\r\n $numRows = 2;\r\n } else if ($length > 6 && $length < 11) {\r\n $numCols = 3;\r\n $numRows = 2;\r\n } else if ($length > 10 && $length < 15) {\r\n $numCols = 4;\r\n $numRows = 2;\r\n } else if ($length == 15 || $length == 16) {\r\n $numCols = 3;\r\n $numRows = 3;\r\n } else if ($length == 17 || $length == 18) {\r\n $numCols = 5;\r\n $numRows = 2;\r\n } else if ($length > 18 && $length < 23) {\r\n $numCols = 4;\r\n $numRows = 3;\r\n } else if ($length > 22 && $length < 29) {\r\n $numCols = 5;\r\n $numRows = 3;\r\n } else if ($length == 29 || $length == 30) {\r\n $numCols = 4;\r\n $numRows = 4;\r\n } else if ($length > 30 && $length < 35) {\r\n $numCols = 6;\r\n $numRows = 3;\r\n } else if ($length > 34 && $length < 39) {\r\n $numCols = 5;\r\n $numRows = 4;\r\n } else if ($length > 38 && $length < 47) {\r\n $numCols = 6;\r\n $numRows = 4;\r\n } else if ($length == 47 || $length == 48) {\r\n $numCols = 5;\r\n $numRows = 5;\r\n } else if ($length > 48 && $length < 59) {\r\n $numCols = 6;\r\n $numRows = 5;\r\n } else {\r\n $numCols = 6;\r\n $numRows = 6;\r\n }\r\n \r\n\t$numValues[0] = $numCols;\r\n\t$numValues[1] = $numRows;\r\n return $numValues;\r\n}", "abstract protected function columns();", "public function setNumberOfColumns($nCols): void\n {\n $this->nCols = $this->checkNcolsRange($nCols);\n $this->childNodes = [];\n $this->append($this->makeTableRows());\n }", "function get_amount_of_cols_by_template()\r\n\t{\r\n\t\tglobal $xoouserultra;\r\n\t\t\r\n\t\t$current_template = $this->get_default_profile_template();\r\n\t\t\r\n\t\tif($current_template==1 || $current_template==\"\") // 3 columns\r\n\t\t{\r\n\t\t\t$cols = 3;\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif($current_template==3) //two cols\r\n\t\t{\r\n\t\t\t$cols = 2;\r\n\t\t}\r\n\t\t\r\n\t\tif($current_template==4) //one column\r\n\t\t{\r\n\t\t\t$cols = 1;\r\n\t\t}\r\n\t\t\r\n\t\treturn $cols;\t\r\n\t}", "public function fieldWidths();", "function settings( $form, $id ) {\n\tif ( 'rich-text' !== $id ) {\n\t\treturn $form;\n\t}\n\t$form['general']['sections']['columns'] = [\n\t\t'title' => __( 'Columns', 'hnf' ),\n\t\t'fields' => [\n\t\t\t'columns' => [\n\t\t\t\t'type' => 'unit',\n\t\t\t\t'label' => __( 'Column Count', 'hnf' ),\n\t\t\t\t'maxlength' => '2',\n\t\t\t\t'size' => '3',\n\t\t\t\t'responsive' => [\n\t\t\t\t\t'default' => [\n\t\t\t\t\t\t'default' => '1',\n\t\t\t\t\t\t'medium' => '1',\n\t\t\t\t\t\t'responsive' => '1'\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'preview' => [\n\t\t\t\t\t'type' => 'css',\n\t\t\t\t\t'selector' => '.fl-rich-text',\n\t\t\t\t\t'property' => 'column-count',\n\t\t\t\t\t'unit' => ''\n\t\t\t\t]\n\t\t\t],\n\t\t\t'column_gap' => [\n\t\t\t\t'type' => 'unit',\n\t\t\t\t'label' => __( 'Column Gap', 'hnf' ),\n\t\t\t\t'maxlength' => '2',\n\t\t\t\t'size' => '3',\n\t\t\t\t'description' => 'px',\n\t\t\t\t'responsive' => [\n\t\t\t\t\t'default' => [\n\t\t\t\t\t\t'default' => '10',\n\t\t\t\t\t\t'medium' => '10',\n\t\t\t\t\t\t'responsive' => '10'\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'preview' => [\n\t\t\t\t\t'type' => 'css',\n\t\t\t\t\t'selector' => '.fl-rich-text',\n\t\t\t\t\t'property' => 'column-gap',\n\t\t\t\t\t'unit' => 'px'\n\t\t\t\t]\n\t\t\t],\n\t\t\t'column_rule_width' => [\n\t\t\t\t'type' => 'unit',\n\t\t\t\t'label' => __( 'Column Rule Width', 'hnf' ),\n\t\t\t\t'maxlength' => '2',\n\t\t\t\t'size' => '3',\n\t\t\t\t'description' => 'px',\n\t\t\t\t'responsive' => [\n\t\t\t\t\t'default' => [\n\t\t\t\t\t\t'default' => '0',\n\t\t\t\t\t\t'medium' => '0',\n\t\t\t\t\t\t'responsive' => '0'\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'preview' => [\n\t\t\t\t\t'type' => 'css',\n\t\t\t\t\t'selector' => '.fl-rich-text',\n\t\t\t\t\t'property' => 'column-rule-width',\n\t\t\t\t\t'unit' => 'px'\n\t\t\t\t]\n\t\t\t],\n\t\t\t'column_rule_type' => [\n\t\t\t\t'type' => 'select',\n\t\t\t\t'label' => __( 'Column Rule Style', 'hnf' ),\n\t\t\t\t'default' => 'solid',\n\t\t\t\t'options' => [\n\t\t\t\t\t'none' => __( 'None', 'hnf' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'hnf' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'hnf' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'hnf' ),\n\t\t\t\t\t'double' => __( 'Double', 'hnf' ),\n\t\t\t\t\t'groove' => __( 'Groove', 'hnf' ),\n\t\t\t\t\t'ridge' => __( 'Ridge', 'hnf' ),\n\t\t\t\t\t'inset' => __( 'Inset', 'hnf' ),\n\t\t\t\t\t'outset' => __( 'Outset', 'hnf' )\n\t\t\t\t],\n\t\t\t\t'preview' => [\n\t\t\t\t\t'type' => 'css',\n\t\t\t\t\t'selector' => '.fl-rich-text',\n\t\t\t\t\t'property' => 'column-rule-style',\n\t\t\t\t\t'unit' => ''\n\t\t\t\t]\n\t\t\t],\n\t\t\t'column_rule_color' => [\n\t\t\t\t'type' => 'color',\n\t\t\t\t'label' => __( 'Column Rule Color', 'hnf' ),\n\t\t\t\t'default' => '#58595B',\n\t\t\t\t'preview' => [\n\t\t\t\t\t'type' => 'css',\n\t\t\t\t\t'selector' => '.fl-rich-text',\n\t\t\t\t\t'property' => 'column-rule-color'\n\t\t\t\t]\n\t\t\t]\n\t\t]\n\t];\n\treturn $form;\n}", "function SetWidths($w){\r\n \t//Set the array of column widths\r\n \t$this->widths=$w;\r\n }", "public function previewColumns();", "public function columnCount();", "public function setColumnsWidth($array) { \r\n foreach ($array as $elem) {\r\n if ($elem != \"\")\r\n $this->columnsWidth[] = \"style=\\\"width:$elem\\\"\";\r\n else\r\n $this->columnsWidth[] = \"\";\r\n }\r\n }", "function module_widths(){\r\n}", "abstract protected function doCols();", "public function init(){\n parent::init();\n\t\t$this->_gridParam['width'] = 870;\n }", "public function columnCount()\n {\n }", "public function setColumnsWidth($array) { \n foreach ($array as $elem) {\n if ($elem != \"\")\n $this->columnsWidth[] = \"style=\\\"width:$elem\\\"\";\n else\n $this->columnsWidth[] = \"\";\n }\n }", "public function setColumna($col){\n if($col>3 ){\n $this->columna = 3;\n }\n elseif ($col<0) {\n $this->columna = 0;\n }\n else{\n $this->columna = $col;\n }\n }", "function AddCol($field=-1,$width=-1,$align='L')\r\n{\r\n\tif($field==-1)\r\n\t{\r\n\t\t$field=count($this->columnProp);\r\n\t}\r\n\r\n\t$this->columnProp[$field]=array('f'=>$field,'w'=>$width,'a'=>$align);\r\n\t#$this->Write(5, \"Ajout de colonne : \".$field.\"/\".$width.\"/\".$align); $this->Ln();\r\n}", "function bt_new_loop_shop_per_page( $cols ) {\n // $cols contains the current number of products per page based on the value stored on Options -> Reading\n // Return the number of products you wanna show per page.\n $cols = 12;\n return $cols;\n}", "function SetWidths($w)\r\n{\r\n $this->widths=$w;\r\n}", "function gen_dashboardcolumns_field(&$section, $value) {\n\n\tif (((int) $value < 1) || ((int) $value > 6)) {\n\t\t$value = 2;\n\t}\n\n\t$section->addInput(new Form_Input(\n\t\t'dashboardcolumns',\n\t\t'Dashboard Columns',\n\t\t'number',\n\t\t$value,\n\t\t['min' => 1, 'max' => 6]\n\t));\n}", "function setMargemEsquerda($iNumCol = 4) {\n\n $sComando = chr(27) . chr(108) . \" $iNumCol\";\n parent::addComando($sComando);\n }", "function new_loop_shop_per_page( $cols ) {\n // Return the number of products you wanna show per page.\n $cols = 9;\n return $cols;\n}", "function woocommerce_edit_loop_shop_per_page( $cols ) {\n\tglobal $sh_option;\n\tif ( $sh_option['number-products-cate'] ) {\n\t\t$cols = $sh_option['number-products-cate'];\n\t} else {\n\t\t$cols = get_option( 'posts_per_page' );\n\t}\n\treturn $cols;\n}", "function new_loop_shop_per_page( $cols ) {\n // Return the number of products you wanna show per page.\n $cols = 12;\n return $cols;\n}", "function mgl_instagram_cols($inverse = false)\n{\n $column_options = array();\n // Generate options for 12 columns\n for ($i = 1; $i <= 12; $i++) {\n // Set option title, return singular or plural depending on columns number\n $option_title = _n('%d column', '%d columns', $i, MGL_INSTAGRAM_GALLERY_DOMAIN);\n // Add the number of columns on the string\n $column_options[$i] = sprintf($option_title, $i);\n }\n\n if ($inverse) {\n // Reverse options\n $column_options = array_flip($column_options);\n }\n\n return $column_options;\n}", "public function numFields();", "public function buttonWidths();", "public function numOfFields();", "function new_loop_shop_per_page( $cols ) {\r\n // Return the number of products you wanna show per page.\r\n $cols = 12;\r\n\r\n return $cols;\r\n\r\n}", "public function setColspan($num)\n {\n parent::setAttr(\"colspan\", $num);\n }", "public function addColumns( $value){\n return $this->_add(3, $value);\n }", "public function numberOfFields();", "function SetWidths($w)\n{\n $this->widths=$w;\n}", "function SetWidths($w)\n{\n $this->widths=$w;\n}", "function SetWidths($w)\n{\n $this->widths=$w;\n}", "function medigroup_mikado_blog_lists_number_of_chars() {\n\n $number_of_chars = array();\n\n if(medigroup_mikado_options()->getOptionValue('standard_number_of_chars')) {\n $number_of_chars['standard'] = medigroup_mikado_options()->getOptionValue('standard_number_of_chars');\n }\n if(medigroup_mikado_options()->getOptionValue('masonry_number_of_chars')) {\n $number_of_chars['masonry'] = medigroup_mikado_options()->getOptionValue('masonry_number_of_chars');\n }\n if(medigroup_mikado_options()->getOptionValue('masonry_number_of_chars')) {\n $number_of_chars['masonry-full-width'] = medigroup_mikado_options()->getOptionValue('masonry_number_of_chars');\n }\n if(medigroup_mikado_options()->getOptionValue('split_column_number_of_chars')) {\n $number_of_chars['split-column'] = medigroup_mikado_options()->getOptionValue('split_column_number_of_chars');\n }\n\n return $number_of_chars;\n\n }", "public function setGridSize($girdSize);", "function new_loop_shop_per_page( $cols ) {\n // Return the number of products you wanna show per page.\n $cols = 18;\n return $cols;\n}", "public function get_column_count()\n {\n }", "public static function getColsSetting(){\n\t\t$colGrid = array('1', '2', '3', '4', '5', '6');\n\t\tforeach($colGrid as $value){\n\t\t\t$data[$value] = $value;\n\t\t}\n\t\treturn $data;\n\t}", "function voyage_mikado_blog_lists_number_of_chars() {\n\n $number_of_chars = array();\n\n if(voyage_mikado_options()->getOptionValue('standard_number_of_chars')) {\n $number_of_chars['standard'] = voyage_mikado_options()->getOptionValue('standard_number_of_chars');\n }\n if(voyage_mikado_options()->getOptionValue('masonry_number_of_chars')) {\n $number_of_chars['masonry'] = voyage_mikado_options()->getOptionValue('masonry_number_of_chars');\n }\n if(voyage_mikado_options()->getOptionValue('masonry_number_of_chars')) {\n $number_of_chars['masonry-full-width'] = voyage_mikado_options()->getOptionValue('masonry_number_of_chars');\n }\n if(voyage_mikado_options()->getOptionValue('split_column_number_of_chars')) {\n $number_of_chars['split-column'] = voyage_mikado_options()->getOptionValue('split_column_number_of_chars');\n }\n\n return $number_of_chars;\n\n }", "protected function applyWidth()\n {\n }", "function AddCol($field=-1,$width=-1,$caption='',$align='')\r\n{\r\n if($field==-1)\r\n $field=count($this->aCols);\r\n $this->aCols[]=array('f'=>$field,'c'=>$caption,'w'=>$width,'a'=>$align);\r\n}", "public static function setFieldsInRow(int $count = 4): void\n {\n self::$fieldsInRow = in_array($count, [4, 6]) ? $count : 4;\n }", "function SetWidths($w)\r\n{\r\n\t$this->widths=$w;\r\n}", "function SetWidths($w)\r\n{\r\n\t$this->widths=$w;\r\n}", "public function set(array $cols) : void;", "function NumRows() {}", "function get_main_column_width($n_columns, $n_hidden=0)\n{\n global $row_labels_both_sides, $first_last_width, $column_hidden_width;\n \n // Calculate the percentage width of each of the main columns. We use number_format\n // because in some locales you would get a comma for the decimal point which\n // would break the CSS\n $column_width = 100 - $first_last_width;\n if (!empty($row_labels_both_sides))\n {\n $column_width = $column_width - $first_last_width;\n }\n // Subtract the hidden columns (unless they are all hidden)\n if ($n_hidden < $n_columns)\n {\n $column_width = $column_width - ($n_hidden * $column_hidden_width);\n $column_width = number_format($column_width/($n_columns - $n_hidden), 6);\n }\n \n return $column_width;\n}", "function on_screen_layout_columns($columns, $screen) { \r\n if ($screen == $this->hook) {\r\n $columns[$this->hook] = 2;\r\n }\r\n return $columns;\r\n }", "function setSpaceBetweenColumns($spaceBetweenColumns) {\t\t\r\n\t\t$this->spaceBetweenColumns = $spaceBetweenColumns;\r\n\t}", "function SeteoCampos(){\n\t\t// Campos que van en en detalle, deben empezar su nombre con 'C'\n\t\t$this->addField('C1', 99999,\t0, 15);\n $this->addField('C2', 99999,\t0, 15);\n $this->addField('C3', 99999,\t0, 40);\t\t\n $this->addField('C4', 99999,\t0, 65);\t\t\n $this->addField('C5', 99999,\t0, 40);\n $this->addField('C6', 99999,\t0, 25);\t\t\n $this->addField('C7', 99999,\t0, 65);\t\t\n\t\t\n\t\t$this->addField('HG1', 0,\t0,\t160);\n\t\t\t\t\n\t}", "public function getNumColumns() {\n\t\treturn $this->_num_cols;\n\t}", "function getFixedColumns() { return $this->_fixedcolumns; }", "public function setWidth($width) {}", "public function setWidth($width) {}", "public function setWidth($width) {}", "function set_num_items($num){\n $this -> num_of_items = $num;\n }", "function extamus_screen_layout_columns($columns) {\n $columns['dashboard'] = 1;\n return $columns;\n }", "function fix_import_form_size($size)\n {\n }", "public function loop_columns() {\n\t\treturn apply_filters( 'setwood_loop_columns', 3 ); // 3 products per row\n\t}", "private function _setColumns()\n {\n $this->columns = new Pike_Grid_DataSource_Columns();\n\n foreach ($this->_query->getFields() as $field) {\n $this->columns->add($field, null, $field);\n }\n }", "public function setPrintRepeatCols($column_start, $column_end) {\n\t}", "function filepro_fieldwidth($field_number)\n{\n}", "function setLineBetweenColumns() {\t \r\n\t \t$this->lineBetweenColumns = true;\t\r\n\t}", "function SetCol($col)\n{\n $this->col=$col;\n $x=10+$col*65;\n $this->SetLeftMargin($x);\n $this->SetX($x);\n}", "protected function updateColumns($value)\r\n {\r\n if ($this->_orientation == orVertical) \r\n { \r\n if ($value > 0)\r\n $this->_columns = $value;\r\n else\r\n $this->_columns = 1;\r\n }\r\n else\r\n {\r\n $columns = count($this->_items);\r\n \r\n if ($columns > 0)\r\n $this->_columns = $columns;\r\n else\r\n $this->_columns = 1;\r\n }\r\n \r\n }", "public function setColumnCount($var)\n {\n GPBUtil::checkInt32($var);\n $this->column_count = $var;\n\n return $this;\n }", "function setColumnSpacing($spacing = 25)\n {\n $spacing = intval($spacing);\n\n $this->column_spacing = $spacing;\n }", "public function colWidth($column) {\n\t}", "function SetWidths($w)\n{\n\t$this->widths=$w;\n}", "function SetWidths($w)\n{\n\t$this->widths=$w;\n}", "function SetWidths($w)\n{\n\t$this->widths=$w;\n}", "public function GetColumnCount() : INT\r\n {\r\n return($this->preparedStatement->columnCount());\r\n }", "public static function setColumnsAutowidth(Worksheet $sheet, int $columncount) {\n\t\tfor ($i = 0; $i < ($columncount); $i++) {\n\t\t\t$index = Coordinate::stringFromColumnIndex($i);\n\t\t\t$sheet->getColumnDimension($index)->setAutoSize(true);\n\t\t}\n\t}", "public function set_spacing_sizes()\n {\n }", "function plugin_layout_columns($columns, $screen) {\r\n\t\tif ($screen == $this->page) {\r\n\t\t\t$columns[$this->page] = 2;\r\n\t\t}\r\n\t\treturn $columns;\r\n\t}", "function getNCols() \n {\n if($this->rsQry)\n {\n return true;\n }\n else\n {\n\t\t\t return mysql_num_fields($this->rsQry);\n }\n\t\t}", "function SetWidths($w) {\n\t$this->widths=$w;\n}", "public function getGridSize();", "protected function afterConstruct() {\n\t\tif(count($this->defaultColumns) == 0) {\n\t\t\t$this->defaultColumns[] = array(\n\t\t\t\t'header' => 'No',\n\t\t\t\t'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'\n\t\t\t);\n\t\t\t$this->defaultColumns[] = 'name';\n\t\t}\n\t\tparent::afterConstruct();\n\t}", "function reset_user_columns() {\n\t\techo $this->factory->settingPage( $this->model )->cftp_popular_activate();\n\t}", "public function set_cols($cols)\n {\n $this->m_numCols = $cols;\n }", "public function numRows();" ]
[ "0.6823111", "0.6318066", "0.63089025", "0.6251698", "0.60738176", "0.60009116", "0.59822005", "0.59822005", "0.59553087", "0.5951465", "0.5948436", "0.5909743", "0.58963764", "0.5889294", "0.5876958", "0.5833276", "0.5818485", "0.58072865", "0.5806525", "0.58016354", "0.57887673", "0.5779346", "0.5691116", "0.56831163", "0.5668976", "0.56643665", "0.5635103", "0.56189805", "0.56130356", "0.5597503", "0.55863607", "0.55788344", "0.5552075", "0.55509615", "0.55408126", "0.5537207", "0.55338216", "0.5530776", "0.55201566", "0.55173725", "0.55121243", "0.5505854", "0.5502658", "0.5502035", "0.55002165", "0.54941326", "0.5481339", "0.54758686", "0.54697216", "0.54697216", "0.54697216", "0.5447909", "0.5439666", "0.5439403", "0.54376704", "0.54295874", "0.54274184", "0.5418443", "0.54072446", "0.54010195", "0.5397264", "0.5397264", "0.53869873", "0.53643435", "0.53640354", "0.53383505", "0.53382856", "0.5333892", "0.53319967", "0.5327913", "0.5323028", "0.5323028", "0.5322588", "0.53224343", "0.5322158", "0.5310571", "0.53082615", "0.53018385", "0.53013986", "0.5301018", "0.5299384", "0.52919215", "0.5278142", "0.52753645", "0.52711564", "0.52690333", "0.5259417", "0.5259417", "0.5259417", "0.52548164", "0.5248348", "0.52469206", "0.5246359", "0.52385485", "0.523842", "0.5232524", "0.52182764", "0.5215486", "0.52100116", "0.5206449" ]
0.61721516
4
Set the submit button description at the bottom of the page
public function set_button($button) { $this->button = $button; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function printFoot (){\n\t?>\t\t\n\t\t\t\t<p class='submit'>\n\t\t\t\t\t<input type='submit' name='Submit' value=\"<?php _e('Save changes') ?>\" class='button-primary' />\n\t\t\t\t</p>\t\t\t\t\n\t\t\t\t\n\t\t\t</form>\n\t\t</div>\n\t\t\n\t<?php\n\t}", "function common_footer($button = \"Submit Changes\")\r\n\t{\r\n\r\n\t\tglobal $IN, $INFO, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;\r\n\t\t$ibforums = Ibf::app();\r\n\r\n\t\t$ADMIN->html .= $SKIN->end_form($button);\r\n\r\n\t\t$ADMIN->html .= $SKIN->end_table();\r\n\r\n\t\t$ADMIN->output();\r\n\r\n\t}", "public function submitButton(){\n\t\t\n\t\t$this->addElement('button', 'bttnsubmit', array (\n\t\t\t\t'class' => 'btn blue ',\n\t\t\t\t'ignore'=>true,\n\t\t\t\t'type'=>'submit',\n \t\t\t\t'label'=>'<i class=\"fa fa-check\"></i> Save',\n\t\t\t\t'escape'=>false\n\t\t));\n\t\t$this->bttnsubmit->setDecorators(array('ViewHelper',array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' =>'form-actions text-right'))\t));\n\t\t\n\t}", "function edit_form_after_title()\n {\n }", "function edit_form_after_title()\n {\n }", "function shortcode_insert_button()\n\t\t{\n\t\t\t$this->config['name']\t\t= __('Job Submit Form', 'avia_framework' );\n\t\t\t$this->config['tab']\t\t= __('Plugin Additions', 'avia_framework' );\n\t\t\t$this->config['icon']\t\t= AviaBuilder::$path['imagesURL'].\"sc-comments.png\";\n\t\t\t$this->config['order']\t\t= 2;\n\t\t\t$this->config['target']\t\t= 'avia-target-insert';\n\t\t\t$this->config['shortcode'] \t= 'av_jobs_submit_form';\n\t\t\t$this->config['tooltip'] \t= __('Display the job submission form for WP Job Manager', 'avia_framework' );\n\t\t\t$this->config['drag-level'] = 3;\n\t\t}", "private function addEditFormAfterContent() {\n\t\t// this div is opened when encapsulating the default editor in addEditFormBeforeContent.\n\t\treturn '</div><div style=\"clear: both\"></div>';\n\t}", "public function setModifyMode() {\n $this->getElement('submit')->setLabel('Edit Test');\n }", "public function endForm()\r\n {\r\n echo '<div class=\"panel-footer\">\r\n <input type=\"submit\" class=\"btn btn-primary btn-sm\" value=\"Vote\" />\r\n </div>\r\n </form>';\r\n }", "function PKG_OptionPageTail($layout)\n{\nPKG_OptionPageSaveAlsParameters($layout);\n\nPKG_OptionPageRender($layout);\n\necho(\"\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\\\"2\\\">\n\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t<input type=\\\"submit\\\" name=\\\"BUT_save\\\" value=\\\"Save\\\">\n\t\t\t\t\t\t</center>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t</td>\n<tr>\n</table>\n</form>\n</body>\n</html>\");\n}", "protected function setFormContent()\n {\n\t\t$content = $this->getTitle();\n\t\t\n\t\t$content .= '<p>Your meditation time on <b>';\n\t\t$content .= $this->data['long_date'];\n\t\t$content .= '</b> has been deleted. Would you like to restore it?</p>';\n\t\t\n\t\t$this->Form = new Form;\n\t\t$this->buildForm();\n\t\t$content .= $this->Form->getHtml();\n\t\t\n\t\t// Add the cancel link\n\t\t$content .= $this->cancelLink();\n\t\t\n\t\t$this->content = $content;\n }", "public function drawFooter (\n\t)\t\t\t\t\t// RETURNS <void>\n\t\n\t// $contentForm->drawFooter();\n\t{\n\t\t// Show Segment-Creation Modules\n\t\tforeach($this->segments as $module => $bool)\n\t\t{\n\t\t\tswitch($module)\n\t\t\t{\n\t\t\t\tcase \"Text\":\n\t\t\t\t\t$icon = \"newspaper\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Image\":\n\t\t\t\t\t$icon = \"image\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Video\":\n\t\t\t\t\t$icon = \"video\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t$icon = \"circle-exclaim\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t\t<div class=\"newsegment-wrap\">\n\t\t\t\t<div class=\"newsegment\"><span class=\"newsegment-text\">Add<br /><span class=\"icon-' . $icon . '\" style=\"font-size:32px;\"></span><br />' . $module . ' Block</span></div>\n\t\t\t\t<input class=\"newsegment-sub\" type=\"submit\" name=\"add_module[' . $module . ']\" value=\"\" style=\"background:none;\" />\n\t\t\t</div>';\n\t\t}\n\t\t\n\t\techo '\n\t\t<hr class=\"separate-div\"/>';\n\t\t\n\t\t// Display Submission Options\n\t\techo '\n\t\t<p>';\n\t\t\n\t\t// Make official post\n\t\tif($this->contentData['status'] < Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_official\" value=\"Save and Make Official Post\" style=\"background-color:#56ccc8;\" />';\n\t\t}\n\t\t\n\t\t// Save and Publish option\n\t\tif($this->contentData['status'] < Content::STATUS_GUEST)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_publish\" value=\"Save and Publish\" style=\"background-color:#56ccc8;\" />';\n\t\t}\n\t\t\n\t\t// Official Post Option\n\t\tif($this->contentData['status'] >= Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_standard\" value=\"Live Update\" style=\"background-color:#56ccc8;\" />\n\t\t\t<input type=\"submit\" name=\"save_guest\" value=\"Set as Guest Post\" style=\"background-color:#aa2222;\" />';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Save / Update Option\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_standard\" value=\"Save and Update\" />';\n\t\t}\n\t\t\n\t\t// Display the Submit Button\n\t\techo '\n\t\t\t<input type=\"submit\" name=\"deletePost\" value=\"Delete Post\" onclick=\"return confirm(\\'Are you sure you want to delete this post?\\');\" />\n\t\t</p>';\n\t}", "function submit_button($text = \\null, $type = 'primary', $name = 'submit', $wrap = \\true, $other_attributes = \\null)\n {\n }", "protected function add_footer()\n {\n // separated uplaod and check behaviour into independent javascript files\n $this->addElement(\n 'html',\n ResourceManager::getInstance()->get_resource_html(\n Path::getInstance()->getJavascriptPath('Chamilo\\Core\\Repository', true) . 'ContentObjectFormUpload.js'\n )\n );\n // added platform option 'omit_content_object_title_check'\n // when NULL (platform option not set) or FALSE (platform option set to false)\n // check title duplicates of content objects; when it is both set and true,\n // omit this check. (this way, the platform setting is unobtrusive).\n\n $omitContentObjectTitleCheck = Configuration::getInstance()->get_setting(\n array('Chamilo\\Core\\Repository', 'omit_content_object_title_check')\n );\n\n if ($omitContentObjectTitleCheck != 1)\n {\n $this->addElement(\n 'html',\n ResourceManager::getInstance()->get_resource_html(\n Path::getInstance()->getJavascriptPath('Chamilo\\Core\\Repository', true) .\n 'ContentObjectFormCheck.js'\n )\n );\n }\n\n $this->addElement(\n 'html',\n ResourceManager::getInstance()->get_resource_html(\n Path::getInstance()->getJavascriptPath('Chamilo\\Libraries', true) . 'HeartBeat.js'\n )\n );\n\n $buttons = array();\n\n // should not call your button submit as it is a function on the\n // javascrip file\n switch ($this->form_type)\n {\n case self::TYPE_COMPARE :\n $buttons[] = $this->createElement(\n 'style_submit_button',\n 'submit_button',\n Translation::get('Compare', null, Utilities::COMMON_LIBRARIES),\n null,\n null,\n 'transfer'\n );\n break;\n case self::TYPE_CREATE :\n $buttons[] = $this->createElement(\n 'style_submit_button',\n 'submit_button',\n Translation::get('Create', null, Utilities::COMMON_LIBRARIES)\n );\n break;\n case self::TYPE_EDIT :\n $buttons[] = $this->createElement(\n 'style_submit_button',\n 'submit_button',\n Translation::get('Update', null, Utilities::COMMON_LIBRARIES),\n null,\n null,\n 'arrow-right'\n );\n break;\n case self::TYPE_REPLY :\n $buttons[] = $this->createElement(\n 'style_submit_button',\n 'submit_button',\n Translation::get('Reply', null, Utilities::COMMON_LIBRARIES),\n null,\n null,\n 'envelope'\n );\n break;\n default :\n $buttons[] = $this->createElement(\n 'style_submit_button',\n 'submit_button',\n Translation::get('Create', null, Utilities::COMMON_LIBRARIES)\n );\n break;\n }\n\n $buttons[] = $this->createElement(\n 'style_reset_button',\n 'reset',\n Translation::get('Reset', null, Utilities::COMMON_LIBRARIES)\n );\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "function voyage_mikado_comment_form_submit_button() {\n\n $comment_form_button = voyage_mikado_get_button_html(array(\n 'html_type' => 'input',\n 'type' => 'solid',\n 'text' => esc_html__('Submit', 'voyage'),\n 'input_name' => 'submit'\n ));\n\n return $comment_form_button;\n\n }", "public function form_top_content() {\n\t\tif(!empty($this->copy_event)) {\n\t\t\tglobal $post;\n\t\t\t$post->post_title = $this->copy_event->title;\n\t\t\t$post->post_content = $this->copy_event->content;\n\t\t}\n\t\t// show label for event title\n\t\techo '\n\t\t\t<label class=\"event-option\">'.__('Event Title','event-list').':</label>';\n\t}", "public function display_page_actions() {\n\t\tprintf(\n\t\t\t'<form action=\"%s\" method=\"post\">',\n\t\t\tesc_url( admin_url( 'admin-post.php?action=' . self::POST_ACTION_ID ) )\n\t\t);\n\n\t\techo '<input type=\"hidden\" name=\"page\" value=\"custom-table\"/>';\n\t\twp_nonce_field( self::POST_ACTION_ID );\n\n\t\techo '<p class=\"submit\">';\n\t\tsubmit_button(\n\t\t\tesc_html__( 'Add Entry', 'autowpdb-example-plugin' ),\n\t\t\t'primary',\n\t\t\t'add_entry',\n\t\t\tfalse\n\t\t);\n\t\tif ( ! empty( $this->table_contents ) ) {\n\t\t\techo ' ';\n\t\t\tsubmit_button(\n\t\t\t\tesc_html__( 'Delete Oldest Entry', 'autowpdb-example-plugin' ),\n\t\t\t\t'',\n\t\t\t\t'delete_entry',\n\t\t\t\tfalse\n\t\t\t);\n\t\t}\n\t\techo '</p>';\n\t\techo '</form>';\n\t}", "function medigroup_mikado_comment_form_submit_button() {\n\n $comment_form_button = medigroup_mikado_get_button_html(array(\n 'html_type' => 'input',\n 'type' => 'solid',\n 'text' => esc_html__('Submit', 'medigroup'),\n 'input_name' => 'submit'\n ));\n\n return $comment_form_button;\n\n }", "function setUpdateConfirmElementToolbar()\n\t{\n\t JToolBarHelper::title(JText::_('UPDATEFIELDSTRUCTURE') , 'fabrik-element.png');\n\t JToolBarHelper::save('elementUpdate');\n\t\tJToolBarHelper::cancel('elementRevert');\n\t}", "function __tinypass_save_buttons( TPPaySettings $ps, $edit = false ) {\n\t?>\n\n\t<p>\n\t\t<input type=\"submit\" name=\"_Submit\" value=\"Save Changes\" tabindex=\"4\" class=\"button-primary\" />\n\t</p>\n\n<?php }", "public function viewNext_Add_Requirements($T_title, $T_desc){\r\n $this->template->setPageName(\"Adding Requirements Page\");\r\n $this->template->setContent(\"Next_Add_Requirements.tpl\"); \r\n \r\n \r\n }", "function show()\r\n\t{\r\n\t\t?>\r\n\r\n\t\t<button class='textlayout' type=\"submit\" name=\"itemtoedit\" value=\"<?php echo $this->orderno ?>\" >\r\n\t\t\t<p>\r\n\t\t\t<span style='font-weight:bold'><?php echo $this->orderno . \". \" . $this->question ; ?></span>\r\n\t\t\t<span style='font-weight:normal'>(<?php echo $this->typeshort; ?>)</span><br>\r\n\t\t\t<span><?php $n = 1; foreach($this->answers as $answerobject){if ($n > 1){echo \", \";}$n ++;echo $answerobject->answer;}?></span>\r\n\t\t\t</p>\r\n\t\t</button><br>\r\n\t\t\r\n\t\t<?php \r\n\t}", "function get_submit_button($text = '', $type = 'primary large', $name = 'submit', $wrap = \\true, $other_attributes = '')\n {\n }", "function print_footer(){\n\t\techo '</div></div><div class=\"clear\"></div><div id=\"hana-footer\"><input type=\"hidden\" name=\"action\" value=\"save\" />\n\t\t\t <input type=\"submit\" value=\"Save Changes\" class=\"save-button\" />\n\t\t\t </div>\t\n\t\t\t</form></div>';\n\t}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "public function makeHelpButton() {}", "function renderSubmitButtons() {\n\t\t$output = '';\n\n\t\tif ($this->currentStep < count($this->steps) && count($this->steps) > 1 && $this->showNextButton) {\n\t\t\t$output .= '<input style=\"display:none;\" type=\"submit\" name=\"'.$this->prefixId.'[submitproceed]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_proceed'])).'\" tabindex=\"1000\" />';\n\t\t\t$output .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[currentstep]\" value=\"'.$this->currentStep.'\" />';\n\t\t}\n\t\tif ($this->showCancelButton) {\n\t\t\t$output .= '<input style=\"float:left;\" type=\"submit\" name=\"'.$this->prefixId.'[submitcancel]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_cancel'])).'\" tabindex=\"1030\" />';\n\t\t}\n\t\tif ($this->currentStep > 1 && $this->showPreviousButton) {\n\t\t\t$output .= '<input style=\"float:left;\" type=\"submit\" name=\"'.$this->prefixId.'[submitback]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_back'])).'\" tabindex=\"1020\" />';\n\t\t\t$output .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[currentstep]\" value=\"'.$this->currentStep.'\" />';\n\t\t}\n\t\tif ($this->currentStep == count($this->steps) && $this->showNextButton) {\n\t\t\t$output .= '<input style=\"float:left;\" type=\"submit\" name=\"'.$this->prefixId.'[submitsubmit]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_submit'])).'\" tabindex=\"1000\" />';\n\t\t}\n\t\tif ($this->currentStep < count($this->steps) && count($this->steps) > 1 && $this->showNextButton) {\n\t\t\t$output .= '<input style=\"float:left;\" type=\"submit\" name=\"'.$this->prefixId.'[submitproceed]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_proceed'])).'\" tabindex=\"1010\" />';\n\t\t}\n\t\treturn '<div class=\"tx-frontendformslib-submitbuttons\">'.$output.'</div>';\n\t}", "public function it_can_change_the_submit_button_text()\n {\n // configure\n config(['app_settings.submit_btn_text' => 'Submit']);\n\n // assert\n $this->get('/settings')\n ->assertStatus(200)\n ->assertSee('Submit');\n }", "function minorite_form_element_help($variables) {\n drupal_add_library('system', 'ui.tooltip', TRUE);\n\n return '<button class=\"ico-help\" title=\"' . check_plain($variables['element']['#description']) . '\"><i></i></button>';\n}", "public function init(){\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this->_html .= $this->get_label();\n\t\t\n\t\t$this->_html .= '<input type=\"submit\" ';\n\t\t\n\t\tif(isset($this->_options['id'])){\n\t\t\t$this->_html .= 'id=\"'.$this->_options['id'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['class'])){\n\t\t\t$this->_html .= 'class=\"'.$this->_options['class'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['value'])){\n\t\t\t$this->_html .= 'value=\"'.$this->_options['value'].'\" ';\n\t\t}\t\n\t\t\n\t\tif(isset($this->_options['name'])){\n\t\t\t$this->_html .= 'name=\"'.esc_attr($this->_options['name']).'\" ';\n\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\n\t\t$this->_html .= ' />';\n\t}", "public function postSetupForm() {\r\n\r\n $l = $this->bootstrap->getLocalization();\r\n // ugyanaz submitnak mint title-nek\r\n $this->form->submit =\r\n $this->controller->toSmarty['title'] = $l('users', 'login_title');\r\n if ( $this->application->getParameter('nolayout') )\r\n $this->controller->toSmarty['nolayout'] = true;\r\n\r\n $this->controller->toSmarty['formclass'] = 'halfbox centerformwrap';\r\n $this->controller->toSmarty['titleclass'] = 'center';\r\n parent::postSetupForm();\r\n\r\n }", "public function showItemBody() {\n echo \"<form method=\\\"post\\\" enctype=\\\"multipart/form-data\\\">\";\n $resource_provider = $this->resource_provider;\n echo $this->item_body->execute();\n echo \"<input type=\\\"submit\\\" value=\\\"Submit response\\\"/>\";\n echo \"</form>\";\n }", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "function initialize () {\n $this->set_openingtag ( \"<INPUT TYPE=\\\"submit\\\" value=\\\"\" );\n\t$this->set_closingtag ( \"\\\"[attributes]>\" );\n\t$this->set_type (\"button\");\n }", "public final function definition() {\n $mform = $this->_form;\n $editoroptions = $this->_customdata['editoroptions'];\n\n $mform->addElement('header', 'qtypeheading', get_string('addaquestionpage', 'languagelesson',\n get_string($this->qtypestring, 'languagelesson')));\n\n if ($this->standard === true) {\n $mform->addElement('hidden', 'qtype');\n $mform->setType('qtype', PARAM_INT);\n\n $mform->addElement('text', 'title', get_string('pagetitle', 'languagelesson'), array('size'=>70));\n $mform->setType('title', PARAM_TEXT);\n $mform->addRule('title', get_string('required'), 'required', null, 'client');\n\n $this->editoroptions = array('noclean'=>true, 'maxfiles'=>EDITOR_UNLIMITED_FILES, 'maxbytes'=>$this->_customdata['maxbytes']);\n $mform->addElement('editor', 'contents_editor', get_string('pagecontents', 'languagelesson'), null, $this->editoroptions);\n $mform->setType('contents_editor', PARAM_RAW);\n $mform->addRule('contents_editor', get_string('required'), 'required', null, 'client');\n }\n\n $mform->addElement('hidden', 'id');\n $mform->setType('id', PARAM_INT);\n\n $mform->addElement('hidden', 'pageid');\n $mform->setType('pageid', PARAM_INT);\n\n\n\n $this->custom_definition();\n\n if ($this->_customdata['edit'] === true) {\n $mform->addElement('hidden', 'edit', 1);\n $this->add_action_buttons(get_string('cancel'), get_string('savepage', 'languagelesson'));\n } else if ($this->qtype === 'questiontype') {\n $this->add_action_buttons(get_string('cancel'), get_string('addaquestionpage', 'languagelesson'));\n } else {\n $this->add_action_buttons(get_string('cancel'), get_string('savepage', 'languagelesson'));\n }\n }", "function edit_insert_button($caption, $js_onclick, $title = '')\t{\n\t?>\n\tif (toolbar) {\n\t\tvar theButton = document.createElement('input');\n\t\ttheButton.type = 'button';\n\t\ttheButton.value = '<?php echo $caption; ?>';\n\t\ttheButton.onclick = <?php echo $js_onclick; ?>;\n\t\ttheButton.className = 'ed_button';\n\t\ttheButton.title = \"<?php echo $title; ?>\";\n\t\ttheButton.id = \"<?php echo \"ed_{$caption}\"; ?>\";\n\t\ttoolbar.appendChild(theButton);\n\t}\n\t\n<?php }", "function lbcb_print_option_buttons(){\n?>\n\t<input class=\"button-primary\" type=\"submit\" name=\"lbcb_options[save]\" id=\"lbcb_options[save]\" value=\"<?php _e( 'Save Options', 'lbcb_textdomain' ); ?>\"/>\n\t<input class=\"button-secondary\" type=\"submit\" name=\"lbcb_options[reset]\" id=\"lbcb_options[reset]\" value=\"<?php _e( 'Reset To Defaults', 'lbcb_textdomain' ); ?>\"/>\n\n<?php\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function composeL1EditForm_buttonsDiv() {\n\n\n return;\n}", "function post_submitbox_misc_actions()\n {\n }", "function getDescription() {\n\t\treturn 'Creates the Crossmark button in the article ';\n\t}", "function shortcode_insert_button()\n {\n $this->config['self_closing'] = 'yes';\n\n $this->config['name'] = __('Download Button', 'avia_framework');\n $this->config['tab'] = __('Content Elements', 'avia_framework');\n $this->config['icon'] = AviaBuilder::$path['imagesURL'] . \"sc-button.png\";\n $this->config['order'] = 1;\n $this->config['target'] = 'avia-target-insert';\n $this->config['shortcode'] = 'avia_download_button';\n $this->config['tooltip'] = __('Creates a download button', 'avia_framework');\n $this->config['tinyMCE'] = ['tiny_always' => true];\n $this->config['preview'] = true;\n }", "public function changeSubmitBox()\n {\n $post = WordPress::getPost();\n\n if ($post->post_type == 'lbwp-nl') {\n // Check if the newsletters sent flag needs to be reset\n $this->checkSendReset($post);\n\n // Check if the hourly cron must be executed immediately\n $this->checkSendImmediately($post);\n\n // Get the newsletter (whose data ight be altered previously)\n $newsletter = $this->getNewsletter($post->ID);\n\n // If the newsletter is already sent, add some css/js do alter the box\n if ($newsletter->sent == 1) {\n echo '\n <script type=\"text/javascript\">\n jQuery(function() {\n jQuery(\"#submitpost a\").remove();\n jQuery(\"#major-publishing-actions\").remove();\n // Create info\n var info = jQuery(\"<div/>\");\n info.addClass(\"misc-pub-section\");\n info.css(\"font-weight\", \"bold\");\n info.text(\"Der Newsletter wurde bereits an den Dienst gesendet und eingeplant.\");\n var link = jQuery(\"<div/>\");\n link.addClass(\"misc-pub-section\");\n link.html(\\'<a href=\"\\' + document.location.href + \\'&resetSent\">Zurücksetzen und erneut einplanen</a>\\');\n jQuery(\"#misc-publishing-actions\").after(link).after(info);\n });\n </script>\n ';\n }\n }\n }", "function shortcode_insert_button()\n\t\t\t{\n\t\t\t\t$this->config['self_closing']\t=\t'no';\n\t\t\t\t\n\t\t\t\t$this->config['name']\t\t= __('Notification', 'avia_framework' );\n\t\t\t\t$this->config['tab']\t\t= __('Content Elements', 'avia_framework' );\n\t\t\t\t$this->config['icon']\t\t= AviaBuilder::$path['imagesURL'].\"sc-notification.png\";\n\t\t\t\t$this->config['order']\t\t= 80;\n\t\t\t\t$this->config['target']\t\t= 'avia-target-insert';\n\t\t\t\t$this->config['shortcode'] \t= 'av_notification';\n\t\t\t\t$this->config['tooltip'] \t= __('Creates a notification box to inform visitors', 'avia_framework' );\n\t\t\t\t$this->config['tinyMCE'] = array('tiny_always'=>true);\t\n\t\t\t\t$this->config['preview'] \t= true;\n\t\t\t}", "public function saveButton(){\n\n\t\t//get the properties of this column:\n\t\tif( !isset( $this->properties['buttonText'] ) )\n\t\t\t$this->getProperties();\n\n\t\techo '<a class=\"lightbox-modal-close\" href=\"#\">';\n\t\t\techo '<span class=\"media-modal-icon\"></span>';\n\t\techo '</a>';\n\n\t\techo '<div class=\"save-btn-container\">';\n\n\t\t\techo '<span class=\"spinner\"></span>';\n\n\t\t\techo '<button id=\"save-column\" class=\"save-btn section-btn\">';\n\t\t\t\techo esc_html( $this->properties['buttonText'] );\n\t\t\techo '</button>';\n\n\t\techo '</div>';\n\n\t}", "function save_button()\n\t\t{\n\t\t\t$output = '<span class=\"ace_style_wrap\"><a href=\"#\" class=\"ace_button ace_button_inactive ace_submit\">Save all changes</a></span>';\n\t\t\treturn $output;\n\t\t}", "public function BuildEndForm($action) {\n echo \"<INPUT TYPE='hidden' NAME='action' VALUE='$action'>\"; // this is coded in \n echo \"<p class='submit'> <input type='submit' value='Submit' /></p>\"; \n echo \"</fieldset>\"; \n echo \"</FORM>\"; \n }", "protected function display_form_body ($action)\n\t{\n\t\t//Project Title\n\t\tInput::display_input\n\t\t(\n\t\t\t\"text\",\n\t\t\t\"Title\",\n\t\t\t$this->fields['Title'],\n\t\t\t\"Title\",\n\t\t\t$this->msgs\n\t\t);\n\n\t\t//Category\n\t\t$categories = Input::get_dropdown_options\n\t\t(\n\t\t\t$this->connection,\n\t\t\t\"select CategoryID as ID, CategoryName as Name from Category\"\n\t\t);\n\n\t\tInput::display_dropdown\n\t\t(\n\t\t\t\"CategoryID\",\n\t\t\t$this->fields['CategoryID'],\n\t\t\t\"Category\",\n\t\t\t$categories,\n\t\t\t$this->msgs\n\t\t);\n\n\t\t//ProjectNum\n\t\tInput::display_input\n\t\t(\n\t\t\t\"number\",\n\t\t\t\"ProjectNum\",\n\t\t\t$this->fields['ProjectNum'],\n\t\t\t\"Project Number\",\n\t\t\t$this->msgs\n\t\t);\n\t\tprint (\"Leave this field blank to auto-generate a new project number.<br>\");\n\n\t\t//Booth\n\t\t$booth_msg = \"\";\n\t\t$booth_query =\n\t\t\"\n\t\t\tselect\n\t\t\t\tBoothID as ID,\n\t\t\t\tconcat ('Booth ', BoothNum) as Name\n\t\t\tfrom Booth\n\t\t\";\n\n\t\tif ($action == \"edit\")\n\t\t{\n\t\t\t$booth_msg = \n\t\t\t\t\"Selecting a booth already in use will cause the project using it \" .\n\t\t\t\t\"to swap booths with this project.<br>\"\n\t\t\t;\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\t$booth_query .= \"where BoothID not in (select BoothID from Project)\";\n\t\t\t$booth_msg = \"If there are no booths left, you may need to add more.\";\n\t\t}\n\n\t\t$booths = Input::get_dropdown_options\n\t\t(\n\t\t\t$this->connection,\n\t\t\t$booth_query\n\t\t);\n\n\t\tInput::display_dropdown\n\t\t(\n\t\t\t\"BoothID\",\n\t\t\t$this->fields['BoothID'],\n\t\t\t\"Booth\",\n\t\t\t$booths,\n\t\t\t$this->msgs\n\t\t);\n\n\t\tprint ($booth_msg);\n\n\n\t\t//Abstract\n\t\tprint\n\t\t('\n\t\t\t<label for=\"Abstract\">Abstract:</label>\n\t\t\t<textarea\n\t\t\t\tplaceholder=\"Enter project description\"\n\t\t\t\tname=\"Abstract\"\n\t\t\t\tclass=\"p-desc\">' . $this->fields['Abstract'] .\n\t\t\t'</textarea>\n\t\t');\n\n\t}", "function onGetFormHead($output = false) {\n\t\t\n\t\t$html = '<div id=\"bf_previewform_div_' . $this->_FORM_CONFIG ['id'] . '\"></div>';\n\t\t//$html .= '<div id=\"bf_pleasewait_preview\"><h2>' . bfText::_ ( 'Please wait a moment, while we validate your submission...' ) . '</h2><br/><img src=\"' . bfCompat::getLiveSite () . '/' . bfCompat::mambotsfoldername () . '/system/blueflame/view/images/check_throbber.gif\" alt=\"throbber\" /></div>';\n\t\t//$html .= '<div id=\"bf_pleasewait_submit\"><h2>' . bfText::_ ( 'Please wait a moment, while we validate &amp; submit your submission...' ) . '</h2><br/><img src=\"' . bfCompat::getLiveSite () . '/' . bfCompat::mambotsfoldername () . '/system/blueflame/view/images/check_throbber.gif\" alt=\"throbber\" /></div>';\n\t\t$html .= \"\\n\\n\" . '<form %s>';\n\t\t\n\t\t$JMenu = JMenu::getInstance ( 'site' );\n\t\t$activeMenu = $JMenu->getActive ();\n\t\t$activeMenu === null ? $Itemid = 1 : $Itemid = $activeMenu->id;\n\t\t\n\t\t$attributes = array ();\n\t\t$attributes ['method'] = 'method=\"' . strtolower ( $this->_FORM_CONFIG ['method'] ) . '\"';\n\t\t$attributes ['action'] = 'action=\"' . ($this->_FORM_CONFIG ['processorurl'] ? $this->_FORM_CONFIG ['processorurl'] : bfCompat::getLiveSite () . '/index.php?Itemid=' . ($Itemid ? $Itemid : '1')) . '\"';\n\t\t$attributes ['name'] = 'name=\"' . 'BF_FORM_' . $this->_FORM_CONFIG ['id'] . '\"';\n\t\t$attributes ['id'] = 'id=\"' . 'BF_FORM_' . $this->_FORM_CONFIG ['id'] . '\"';\n\t\t$attributes ['enctype'] = 'enctype=\"' . $this->_FORM_CONFIG ['enctype'] . '\"';\n\t\t$attributes ['class'] = ' class=\"bfform ' . $this->_FORM_CONFIG ['layout'] . 'form\"';\n\t\t$attributes ['target'] = ' target=\"' . ($this->_FORM_CONFIG ['target'] ? $this->_FORM_CONFIG ['target'] : '_self') . '\"';\n\t\t\n\t\tksort ( $attributes );\n\t\t\n\t\t$attributes = implode ( ' ', $attributes );\n\t\t\n\t\t$html = sprintf ( $html, $attributes );\n\t\t\n\t\tswitch ($output) {\n\t\t\tcase true :\n\t\t\t\techo $html;\n\t\t\t\tbreak;\n\t\t\tcase false :\n\t\t\t\treturn $html;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn true;\n\t}", "public function getSaveButtonHtml()\n {\n return $this->getChildHtml('save_button');\n }", "public function output_setup_form() {\n\t\t$this->output_controls_html( 'klicktipp' );\n\t}", "protected function getSubmitButtonLabel()\n {\n return $GLOBALS['LANG']->getLL('generalMailForm_sendButton');\n }", "function cfc_edd_purchase_form_before_submit() { ?>\n\t<p><?php _e('Click on the button below to make your donation', 'cfctranslation'); ?>\t</p>\n<?php }", "public function fetchSubmitAdditionnalInfo() {\n return '';\n }", "protected function init() {\n $this->appendToClass(self::CLASS_SUBMIT);\n }", "public function get_form_editor_button() {\n\t\treturn [\n\t\t\t'group' => 'nu_fields',\n\t\t\t'text' => $this->get_form_editor_field_title(),\n\t\t];\n\t}", "function krnEmit_button_editSubmit($caption, $value) {\n // used twice in set security\n // submit for editing - so all are consistent - (design choices:Edit button - caption - caption button that looks like link)\n //?????????? if report should not be coded as button ??????????????????????\n //$cellClass = empty($cellClass) ? '' : ' class=\"'.$class.'\"';\n return '<button type=\"submit\" class=\"kcmKrn-button-editLink\" name=\"submit\" value=\"'.$value.'\">' . $caption . '</button>';\n}", "abstract public function getFormDesc();", "function pms_add_hidden_submit_button_loading_placeholder_text() {\r\n\r\n echo '<span id=\"pms-submit-button-loading-placeholder-text\" style=\"display: none;\">' . apply_filters( 'pms_submit_button_loading_placeholder_text', __( 'Processing. Please wait...', 'paid-member-subscriptions' ) ) . '</span>';\r\n\r\n }", "public final function definition() {\n $mform = $this->_form;\n\n $mform->addElement('header', 'alternatesheading', get_string(\"alternatives\", constants::M_COMPONENT));\n\n //The alternatives declaration\n $mform->addElement('textarea', 'alternatives', get_string(\"alternatives\", constants::M_COMPONENT),\n 'wrap=\"virtual\" rows=\"20\" cols=\"50\"');\n $mform->setDefault('alternatives', '');\n $mform->setType('alternatives', PARAM_RAW);\n $mform->addElement('static', 'alternativesdescr', '',\n get_string('alternatives_descr', constants::M_COMPONENT));\n //('n'=>$moduleinstance->id, 'action'=>'machineregradeall'\n\n $mform->addElement('hidden', 'n');\n $mform->setType('n', PARAM_INT);\n\n //add the action buttons\n $this->add_action_buttons(get_string('cancel'), get_string('machineregradeall', constants::M_COMPONENT));\n\n }", "function addSubmitButton($name,$display=null,$value=null, $disabled=null, $class=null, $id=null){\r\n\t\t\t$this->formFields[$name] = array(\r\n\t\t\t\t\"name\" => $name,\r\n\t\t\t\t\"type\" => \"submit\", //defines the type of the input\r\n\t\t\t\t\"label\" => $display,\r\n\t\t\t\t\"value\" => $value,\r\n\t\t\t\t\"disabled\" => $disabled,\r\n\t\t\t\t\"class\" => $class,\r\n\t\t\t\t\"id\" => $id\r\n\t\t\t);\t\t\r\n\t\t\t\r\n\t\t\t//add class if null\r\n\t\t\tif($class == null){\r\n\t\t\t\t$this->formFields[$name][\"class\"] = \"c\" . $name;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add id\r\n\t\t\tif($id == null){\r\n\t\t\t\t$this->formFields[$name][\"id\"] = \"i\" . $name;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add display\r\n\t\t\tif($display == null){\r\n\t\t\t\t$this->formFields[$name][\"label\"] = \"\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public function get_form_editor_button() {\n\t\treturn array(\n\t\t\t'group' => 'advanced_fields',\n\t\t\t'text' => $this->get_form_editor_field_title(),\n\t\t);\n\t}", "protected function buildBottomControls(){\n\t\techo '<div class=\"btn-row\">';\n\n\t\t\t$class = 'edit-btn section-btn';\n\t\t\tif( !$this->hasLightbox )\n\t\t\t\t$class .= ' no-lightbox';\n\n\t\t\techo '<button class=\"'.esc_attr( $class ).'\" id=\"lightbox-btn\">';\n\t\t\t\techo '<span class=\"dashicons dashicons-edit\"></span>';\n\t\t\t\t_e( 'Edit', 'chefsections' );\n\t\t\techo '</button>';\n\n\t\t\t$this->buildTemplateSnitch();\n\n\t\techo '</div>';\n\t}", "public function question_content() {\r\n $this->check_permission(19);\r\n $content_data['add'] = $this->check_page_action(19, 'add');\r\n\r\n $this->quick_page_setup(Settings_model::$db_config['adminpanel_theme'], 'adminpanel', $this->lang->line('question_content'), 'operation/question_content', 'header', 'footer', '', $content_data);\r\n }", "public function getSubmitButton()\n {\n return $this->submitButton;\n }", "function mft_form_comment_form_alter(&$form, &$form_state) {\n $form['author']['homepage']['#access'] = FALSE;\n $form['actions']['submit']['#value'] = t('Post');\n}", "function BuildStartForm($legend) {\n $fv = new filterVars;\n $phpSelf = $fv->phpSelf(); \n echo \"<fieldset>\";\n echo \"<legend>\";\n echo $this->homeButton(); \n echo \" $legend\"; \n echo \"</legend>\";\n echo \"<form action='$phpSelf?' method='get' enctype='text/plain' target='_parent'>\\n\"; \n }", "protected function afterSave()\n\t{\n\t\tparent::afterSave();\n\t\tif(!$this->status == 1){\n\t\t$title = $this->howtoTitle($this->id);\n\t\t$tags = $this->tagLinks();\n\t\t$title = CHtml::link('Created '.$title , array('/howto/' . $this->id . '/' . $title ) );\n\t\t$shortText = substr($this->content,0,160);\n\t\t$content = $shortText.\"...<br/>Tags:\";\n\t\tforeach($tags as $tag){\n\t\t\t$content .=\" \".$tag.\",\";\n\t\t}\n\t\tAction::newAction($content,$title);\n\t\t}\n\t\t\n\t}", "public function stepEnd($data, $form)\n {\n $btnPrev = $this->compileButtons($data['settings']);\n ?>\n <div class=\"ff-t-container ff-inner_submit_container ff-column-container ff_columns_total_2\">\n <div class=\"ff-t-cell ff-t-column-1\"><?php echo $btnPrev; ?></div>\n <div class=\"ff-t-cell ff-t-column-2\"><?php do_action('fluentform_render_item_submit_button', $form->fields['submitButton'], $form); ?></div>\n </div>\n </div></div></div>\n <?php\n }", "function form_content_buttons()\r\n {\r\n return $this->form_content_buttons_Confirm_Cancel() ;\r\n }", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "protected function _addEditFormBlock()\n {\n $this->setChild('form', $this->_createEditFormBlock());\n\n if ($this->_getUrlRewrite()->getId()) {\n $this->_addResetButton();\n $this->_addDeleteButton();\n }\n\n $this->_addSaveButton();\n }", "function displayCreateButton() {\r\n\t \t\r\n\t \techo \"<a href='create.php' class='btn btn-success'>Create a New Question!!</a><br />\";\r\n\t \t\r\n\t }", "public function action_edit_form_after_title() {\n\n if ( 'pedestal_story' == get_current_screen()->post_type ) {\n $this->pedestal_headline_context->render_meta_box( get_post( get_the_ID() ) );\n }\n\n }", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function pt_options_page()\n\t\t{ \n\t\t\t?>\n\t\t\t<form action='options.php' method='post'>\n\t\t\t\t<h2>Pretty block Testimonials</h2>\n\t\t\t\t<?php\n\t\t\t\tsettings_fields( 'ptblock' );\n\t\t\t\tdo_settings_sections( 'ptblock' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t\t<?php\n\t\t}", "public function after_editor() {\n echo '</div>';\n $this->render_builder();\n }", "function thankyou_page() {\n\t\t\tif ( $description = $this->get_description() ) {\n\t\t\t\techo wpautop( wptexturize( wp_kses_post( $description ) ) );\n\t\t\t}\n\t\t}", "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "function form_element_submit( $name, $buttonlabel )\n{\n\treturn sprintf(\"<input type=\\\"submit\\\" name=\\\"%s\\\" value=\\\"%s\\\" />\\n\", $name, $buttonlabel );\n}", "public function onRsformBackendAfterShowFormEditTabsTab(): void\n\t{\n\t\t?>\n\t\t<li>\n\t\t\t<?php\n\t\t\techo HTMLHelper::_(\n\t\t\t\t'link',\n\t\t\t\t'javascript: void(0);',\n\t\t\t\t'<span class=\"rsficon jdicon-jdideal\"></span><span class=\"inner-text\">'\n\t\t\t\t. Text::_(\n\t\t\t\t\t'PLG_RSFP_JDIDEAL_LABEL'\n\t\t\t\t) . '</span>'\n\t\t\t);\n\t\t\t?>\n\t\t</li>\n\t\t<?php\n\t}", "public function moreQuoteAdmin(){\n\t\t\t$this->addElement('text', 'more_quote_admin_allowed', array (\n\t\t\t\t\"required\" => TRUE,\n\t\t\t\t'class' => 'form-control required',\n\t\t\t\t\"label\" => \"How many more quote do you allow?\" ,\n\t\t\t\t\"maxlength\"=>\"2\",\n\t\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\"),\n\t\t\t\t\"validators\" => array(\n\t\t\t\t\t\t\t\t\tarray(\"NotEmpty\",true,array(\"messages\"=>\"more quote number is required \")),\n\t\t\t\t\t\t\t\t),\n\t\t\t));\n\t\t\t\n\t\t\t$this->submitButton();\n\t\t\t$this->bttnsubmit->setLabel(\"Allow\");\n\t\t\t$this->bttnsubmit->setAttrib(\"class\",\"site_button\");\n\t\t}", "public function definition() {\n global $CFG;\n $mform = $this->_form;\n // Define hidden element for id.\n $id = $this->_customdata['id'];\n $mform->addElement('hidden', 'id', $id);\n $mform->setType('id', PARAM_INT);\n\n // Define hidden element for course id.\n $courseid = $this->_customdata['courseid'];\n $mform->addElement('hidden', 'courseid', $courseid);\n $mform->setType('courseid', PARAM_INT);\n // Text element to hold name data.\n $mform->addElement('text', 'name', get_string('name', 'tool_sumitnegi'));\n $mform->setType('name', PARAM_NOTAGS);\n // Checkbox to set completion for the record.\n $mform->addElement('checkbox', 'completed', get_string('completed', 'tool_sumitnegi'));\n $mform->addElement('editor', 'description_editor', get_string('description', 'tool_sumitnegi'),\n null, tool_sumitnegi\\api::editor_options());\n $mform->setType('description', PARAM_RAW);\n $this->add_action_buttons();\n }", "function closeForm($submitValue=\"Submit\",$attr=\"\",$resetValue=\"Reset Form\",$printReset=true){\n\n\t\tif( $this->returnOutput ){ ob_start(); }\n\n\t\t//output hidden pkey field for update opertaions\n\t\tif( isset($this->pkeyID) ){\n\t\t\tif( isset($this->rc4key) ){\n\t\t\t\t$pkeyVal = $this->rc4->_encrypt( $this->rc4key, $this->rc4key.$this->pkeyID );\n\t\t\t} else $pkeyVal = $this->pkeyID;\n\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"pkey\\\" value=\\\"$pkeyVal\\\"/>\\n\";\n\t\t}\n\t\t//output hidden signature field for security check\n\t\tif( isset($this->rc4key) ){\n\t\t\t$sigVal = $this->rc4->_encrypt( $this->rc4key, implode(\",\",$this->signature) );\n\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"formitable_signature\\\" value=\\\"$sigVal\\\"/>\\n\";\n\t\t}\n\n\t\tif( isset($this->multiPageSubmitValue) ) $submitValue=$this->multiPageSubmitValue;\n\t\techo \"<div class=\\\"button\\\">\".($printReset?\"<input type=\\\"reset\\\" value=\\\"$resetValue\\\" class=\\\"reset\\\"/>\":\"\");\n\t\tif(strstr($submitValue,\"image:\"))\n\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"submit\\\"><input type=\\\"image\\\" src=\\\"\".str_replace(\"image:\",\"\",$submitValue).\"\\\" class=\\\"img\\\"\".($attr!=\"\"?\" \".$attr:\"\").\"/>\";\n\t\telse echo \"<input type=\\\"submit\\\" name=\\\"submit\\\" value=\\\"$submitValue\\\" class=\\\"submit\\\"\".($attr!=\"\"?\" \".$attr:\"\").\"/>\";\n\t\techo \"</div></form>\\n\";\n\n\t\tif( $this->returnOutput ){\n\t\t\t$html_block = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\treturn $html_block;\n\t\t}\n\n\t}", "public function edit_form_after_title() {\n\t\twp_nonce_field( 'papi_save_data', 'papi_meta_nonce' );\n\n\t\tif ( $value = esc_attr( papi_get_entry_type_id() ) ) {\n\t\t\tpapi_render_html_tag( 'input', [\n\t\t\t\t'data-papi-page-type-key' => true,\n\t\t\t\t'name' => esc_attr( papi_get_page_type_key() ),\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'value' => $value\n\t\t\t] );\n\t\t}\n\t}", "private function _createSubmitButton()\n {\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setLabel('saveAction');\n\n return $submit;\n }", "public function getPaymentSubmitButtonText()\n\t{\n\t\treturn \"Proceed to 2checkout.com to pay\";\n\t}", "function wizardFooter() {\n global $LANG;\n $strOutput = '\n\t\t\t</table>\n\t\t\t<div id=\"c-saveButtonPanel\">\n <input type=\"image\" class=\"c-inputButton\" name=\"'.$this->strExtKey.'[savedok]\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/savedok.gif').BackendUtility::titleAltAttrib($LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc')).'\" />\n <input type=\"image\" class=\"c-inputButton\" name=\"'.$this->strExtKey.'[saveandclosedok]\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/saveandclosedok.gif').BackendUtility::titleAltAttrib($LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc')).'\" />\n <a href=\"#\" onclick=\"'.htmlspecialchars('jumpToUrl(unescape(\\''.rawurlencode($this->arrWizardParameters['returnUrl']).'\\')); return false;').'\"><img class=\"c-inputButton\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/closedok.gif').BackendUtility::titleAltAttrib($LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc')).'\" /></a>\n <input type=\"image\" class=\"c-inputButton\" name=\"_refresh\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/refresh_n.gif').BackendUtility::titleAltAttrib($LANG->getLL('forms_refresh',1)).'\" />\n\t\t\t</div>';\n return $strOutput;\n }", "public function optionsdemo_settings_content() { ?>\n <div class=\"wrap\">\n <div id=\"icon-themes\" class=\"icon32\"><br/></div>\n <h1>Options Demo</h1>\n <form action=\"options.php\" method=\"POST\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tsettings_fields( \"optionsdemo_general\" );\n\t\t\t\t\t\tdo_settings_sections( \"optionsdemo_general\" );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tsubmit_button( esc_html__( 'Save Setting', 'optionsdemo' ) )\n\t\t\t\t\t?>\n </form>\n </div>\n\t\t<?php }", "function tac_form_submit_button( $button, $form ) {\n\treturn \"<button id='gform_submit_button_{$form['id']}'>Submit form</button>\";\n}", "function theme_options_do_page() {\n\tglobal $select_options, $radio_options;\n\n\tif ( ! isset( $_REQUEST['settings-updated'] ) )\n\t\t$_REQUEST['settings-updated'] = false;\n\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); echo \"<h2>Site Description</h2>\"; ?>\n\n\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields( 'sample_options' ); ?>\n\t\t\t<?php $options = get_option( 'site_description' ); ?>\n\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Enter a site description', 'psnc' ); ?></th>\n\t\t\t\t\t<td>\n\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t$args = array(\n\t\t\t\t\t\t 'textarea_rows' => 15,\n\t\t\t\t\t\t 'teeny' => true,\n\t\t\t\t\t\t 'quicktags' => true,\n\t\t\t\t\t\t 'media_buttons' => false\n\t\t\t\t\t\t);\n\t\t\t\t\t\t $saved_vals = $options['sometextarea'];\n\t\t\t\t\t\twp_editor( stripslashes($saved_vals), 'site_description[sometextarea]', $args );\n\t\t\t\t\t\tsubmit_button( 'Save description' );\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<label class=\"description\" for=\"site_description[sometextarea]\"><?php _e( 'This will appear on your home page and also help with SEO (HTML allowed).', 'psnc' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\n\t\t</form>\n\t</div>\n\t<?php\n\t\n}", "public function after_main_content() {\n\t?>\n\n\t\t\t</div><!-- #bbp-content -->\n\t\t</div><!-- #bbp-container -->\n\n\t<?php\n\t}", "public function insert_form_tinymce_buttons( $context ) {\n global $pagenow;\n\n if ( 'post.php' != $pagenow ) {\n return $context;\n }\n $html = '<style>\n span.nf-insert-form {\n color:#888;\n font: 400 18px/1 dashicons;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n display: inline-block;\n width: 18px;\n height: 18px;\n vertical-align: text-top;\n margin: 0 2px 0 0;\n }\n </style>';\n $html .= '<a href=\"#\" class=\"button-secondary nf-insert-form\"><span class=\"nf-insert-form dashicons dashicons-feedback\"></span> ' . __( 'Add Form', 'ninja-forms' ) . '</a>';\n\n wp_enqueue_script( 'nf-combobox',\n NF_PLUGIN_URL . 'assets/js/min/combobox.min.js',\n array( 'jquery', 'jquery-ui-core', 'jquery-ui-button', 'jquery-ui-autocomplete', 'nf-admin-modal' ) );\n\n wp_enqueue_style( 'nf-combobox',\n NF_PLUGIN_URL . 'assets/css/combobox.css' );\n\n wp_enqueue_style( 'nf-admin-modal',\n NF_PLUGIN_URL . 'assets/css/admin-modal.css' );\n\n wp_enqueue_style( 'jquery-smoothness', NINJA_FORMS_URL .'css/smoothness/jquery-smoothness.css' );\n\n add_action( 'admin_footer', array( $this, 'output_tinymce_button_js' ) );\n return $context . ' ' . $html;\n }", "function learn_press_single_quiz_description() {\n\t\tlearn_press_get_template( 'content-quiz/description.php' );\n\t}", "public static function postHelpTab () {\n $screen = get_current_screen();\n\n if ( 'travelcard' != $screen->post_type )\n return;\n\n $args = [\n 'id' => 'travelcard',\n 'title' => 'Travel Cards Help',\n 'content' => file_get_contents(__DIR__ . '/templates/help.php'),\n ];\n\n $screen->add_help_tab( $args );\n }", "function showPostIconOptions(){\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php echo get_admin_page_title() ?></h2>\n\t\t\t<form action=\"options.php\" method=\"POST\">\n\t\t\t<?php\n\t\t\t\tsettings_fields( 'post_icon_options_main' );\n\t\t\t\tdo_settings_sections( 'post_icon_options_page' );\n\t\t\t\t$all_posts = $this -> getAllPostsData();\n\t\t\t?>\n\t\t\t\t\n\t\t\t<div class =\"pi_icons\"></div>\n\t\t\t<?php\n\t\t\t\tsubmit_button( 'Save', 'primary', 'pi_save_button' );\n\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "function submitted_events_create_about_page() {\n\techo '\n\t<div class=\"wrap\">\n\t\t<h2>How to use the Submitted Events plugin</h2>\n\t\t<p>Plugin created by Graham S. Horn ([email protected]) in November 2016.</p>\n\t\t<p>(Optional: If you click on <strong>Submitted Events</strong> you can see how many pending submissions there are.)</p>\n\t\t<p>Click on <strong>Auto Generate</strong> and Events will be automatically added for all pending submissions. These will have <code>draft</code> status. When you have finished editing the event you should click on the <strong>publish</strong> button to make the event visible (Previewing your changes is a good idea). You may want to switch to the visual editor if the generated HTML is hard to read.</p>\n\t\t<p>This plugin was written specifically for the Brunel <strong>Walk Submit Form</strong> in the Form Maker plugin (form version as of 5 November 2016); if this form is changed in any way then this plugin is likely to break. Contact the author for support.</p>\n\t</div>\t\n\t';\n}", "function ds_block_edit_form($form, &$form_submit)\n{\n\n switch ($form_submit['build_info']['args'][0]) {\n case 'ds_social':\n $form += _social_block_form();\n $form_title = 'Block Widget - Social';\n break;\n case 'ds_about':\n $form += _about_block_form();\n $form_title = 'Block Widget - About';\n break;\n case 'ds_about_teaser':\n $form += _about_block_teaser_form();\n $form_title = 'Block Widget - About Teaser';\n break;\n case 'ds_copy_rights':\n $form += _copy_rights_block_form();\n $form_title = 'Block Widget - Copy Rights';\n break;\n case 'ds_contact_info':\n $form += _contact_info_block_form();\n $form_title = 'Block Widget - Contact Info';\n break;\n case 'ds_announcement':\n $form += _announcement_block_form();\n $form_title = 'Block Widget - Announcement';\n break;\n case 'ds_recent_tweets':\n $form += _recent_tweets_block_form();\n $form_title = 'Block Widget - Recent Tweets';\n break;\n case 'ds_blog_categories':\n $form += _blog_categories_block_form();\n $form_title = 'Block Widget - Categories';\n break;\n case 'ds_blog_archive':\n $form += _blog_archive_block_form();\n $form_title = 'Block Widget - Archive';\n break;\n case 'ds_blog_recent_posts_sidebar':\n $form += _blog_recent_posts_block_form();\n $form_title = 'Block Widget - Recent Posts';\n break;\n case 'ds_testimonial':\n $form += _testimonial_block_form();\n $form_title = 'Block Widget - Testimonial';\n break;\n }\n\n $form['form_header'] = array(\n '#markup' => '<h2>' . $form_title . '</h2>',\n '#weight' => -15,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => 'Submit',\n );\n return $form;\n}", "public static function renderSubmit();", "function learn_press_course_lesson_complete_button() {\n\t\tlearn_press_get_template( 'content-lesson/complete-button.php' );\n\t}", "function form_submit_confirm_edit() {\r\n /* echoed before enterim form, inside <script>, define form_submit_confirm javascript function behaviour in your code\r\n */\r\n return <<<__END__\r\n function form_submit_confirm(myform) {\r\n //action = myform.elements['act'].value;\r\n //myform.submit();\r\n }\r\n__END__;\r\n }" ]
[ "0.7199268", "0.64905614", "0.6385173", "0.63238215", "0.63238215", "0.6237064", "0.61968434", "0.6146864", "0.6102555", "0.604184", "0.5992402", "0.59829915", "0.5968829", "0.59575856", "0.5909116", "0.5895505", "0.5882845", "0.5858683", "0.5856468", "0.5847951", "0.58426243", "0.5809221", "0.5796486", "0.57877004", "0.57739234", "0.5755208", "0.5754798", "0.5732307", "0.57085073", "0.5705872", "0.5679088", "0.567099", "0.56477153", "0.56417924", "0.5628457", "0.5627768", "0.5622879", "0.5621129", "0.5618833", "0.56153035", "0.5612794", "0.5606086", "0.56045085", "0.55852926", "0.5582935", "0.5578133", "0.5563608", "0.5563049", "0.5553722", "0.5553076", "0.55308086", "0.552504", "0.5523384", "0.5519596", "0.5517786", "0.5517774", "0.5515626", "0.5511735", "0.550847", "0.5500871", "0.5491319", "0.5489634", "0.54813874", "0.54788715", "0.5478147", "0.54734045", "0.5469885", "0.54679954", "0.54665303", "0.5464686", "0.54629266", "0.5459319", "0.5456954", "0.54566175", "0.544509", "0.5440841", "0.5440177", "0.5438032", "0.54328966", "0.5429252", "0.54283494", "0.5427273", "0.54091936", "0.5403773", "0.5399483", "0.53914773", "0.53735125", "0.53733927", "0.53727853", "0.5372137", "0.53714925", "0.5370418", "0.5363638", "0.53622353", "0.536115", "0.5357377", "0.5349826", "0.53480256", "0.53479093", "0.5347559", "0.5346041" ]
0.0
-1
Turn off the submit button from showing
public function no_button() { $this->button = NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ShowForm()\n {\n return false;\n }", "static function pmpro_checkout_default_submit_button($show)\n\t\t{\n\t\t\tglobal $gateway, $pmpro_requirebilling;\n\t\t\t\n\t\t\t//show our submit buttons\n\t\t?>\n\t\t\n\t\t<span id=\"pmpro_fondy_checkout\" <?php if(($gateway != \"fondy\") || !$pmpro_requirebilling) { ?>style=\"display: none;\"<?php } ?>>\n\t\t\t\t<input type=\"hidden\" name=\"submit-checkout\" value=\"1\" />\t\t\n\t\t\t\t<input type=\"submit\" class=\"pmpro_btn pmpro_btn-submit-checkout\" value=\"<?php if($pmpro_requirebilling) { _e('Submit and Check Out', 'pmpro'); } else { _e('Submit and Confirm', 'pmpro');}?> &raquo;\" />\t\n\t\t</span>\n\t\t\t<?php\n\t\t\n\t\t\t//don't show the default\n\t\t\treturn false;\n\t\t}", "public function has_submit() {\n\t\treturn false;\n\t}", "public static function optionsframework_before_action() {\n\t\t\t?>\n <style type=\"text/css\">\n #optionsframework-submit .reset-button {\n display: none;\n }\n </style>\n\t\t\t<?php\n\t\t}", "static function pmpro_checkout_default_submit_button($show)\n\t\t{\n\t\t\tglobal $gateway, $pmpro_requirebilling;\n\n\t\t\t//show our submit buttons\n\t\t\t?>\n\t\t\t<span id=\"pmpro_paypalexpress_checkout\" <?php if(($gateway != \"paypalexpress\" && $gateway != \"paypalstandard\") || !$pmpro_requirebilling) { ?>style=\"display: none;\"<?php } ?>>\n\t\t\t\t<input type=\"hidden\" name=\"submit-checkout\" value=\"1\" />\n\t\t\t\t<input type=\"image\" id=\"pmpro_btn-submit-paypalexpress\" class=\"pmpro_btn-submit-checkout\" value=\"<?php _e('Check Out with PayPal', 'paid-memberships-pro' );?> &raquo;\" src=\"<?php echo apply_filters(\"pmpro_paypal_button_image\", \"https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif\");?>\" />\n\t\t\t</span>\n\n\t\t\t<span id=\"pmpro_submit_span\" <?php if(($gateway == \"paypalexpress\" || $gateway == \"paypalstandard\") && $pmpro_requirebilling) { ?>style=\"display: none;\"<?php } ?>>\n\t\t\t\t<input type=\"hidden\" name=\"submit-checkout\" value=\"1\" />\n\t\t\t\t<input type=\"submit\" id=\"pmpro_btn-submit\" class=\"pmpro_btn pmpro_btn-submit-checkout\" value=\"<?php if($pmpro_requirebilling) { _e('Submit and Check Out', 'paid-memberships-pro' ); } else { _e('Submit and Confirm', 'paid-memberships-pro' );}?> &raquo;\" />\n\t\t\t</span>\n\t\t\t<?php\n\n\t\t\t//don't show the default\n\t\t\treturn false;\n\t\t}", "function instructor_buttons(){\r\n$disabled=\"\";\r\n$myform=\"<form action=\\\"?\".$_SERVER['QUERY_STRING'].\"\\\" method=\\\"post\\\">\\n\";\r\n\t$myform .= \"\\n\";\r\nif(!ipal_check_active_question()){$disabled= \"disabled=\\\"disabled\\\"\";}\r\n\r\n$myform .= \"<input type=\\\"submit\\\" value=\\\"Stop Polling\\\" name=\\\"clearQuestion\\\" \".$disabled.\"/>\\n</form>\\n\";\r\n\t\r\nreturn($myform);\r\n\t\r\n}", "public function editFormCancelled(\\Nette\\Forms\\SubmitButton $btn) {\n $this->redirect('default');\n }", "public function formForget()\n {\n $this->view->addForget();\n }", "function layout_builder_post_update_cancel_link_to_discard_changes_form() {\n // Empty post-update hook.\n}", "public function disableButtons()\n\t{\n\t}", "function on_submit_button($button, $form) {\n\t\tif ($form['id'] != $this->form_id) {\n\t\t\treturn $button;\n\t\t}\n\t\treturn '';\n\t}", "protected function toggleDisableAction() {}", "public function getShowSubmit()\n {\n return $this->showSubmit;\n }", "function post_form_autocomplete_off()\n {\n }", "public function metabox_hide_backend_settings() {\n\n\t\techo '<p>' . __( 'Hides the login page (wp-login.php, wp-admin, admin and login) making it harder to find by automated attacks and making it easier for users unfamiliar with the WordPress platform.', 'it-l10n-ithemes-security-pro' ) . '</p>';\n\n\t\t$this->core->do_settings_section( 'security_page_toplevel_page_itsec_settings', 'hide_backend-enabled', false );\n\t\t$this->core->do_settings_section( 'security_page_toplevel_page_itsec_settings', 'hide_backend-settings', false );\n\n\t\techo '<p>' . PHP_EOL;\n\n\t\tsettings_fields( 'security_page_toplevel_page_itsec_settings' );\n\n\t\techo '<input class=\"button-primary\" name=\"submit\" type=\"submit\" value=\"' . __( 'Save All Changes', 'it-l10n-ithemes-security-pro' ) . '\" />' . PHP_EOL;\n\n\t\techo '</p>' . PHP_EOL;\n\n\t}", "public function show_in_panel() {\n\t\treturn false;\n\t}", "public function ShowFormOutsideEditableOrderTable()\n {\n return false;\n }", "public function hideMoveToTechPanel()\n\t{\n\t\t$this->ConfirmMoveToTechWindow->Display = \"None\";\n\t}", "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "public function hide() {\n\t\treturn true;\n\t}", "public function hide() {\n\t\treturn true;\n\t}", "function script_on_submit()\n\t{\n\t\treturn '';\n\t}", "public function disableFormKey()\r\n {\r\n Mage::getSingleton('core/session')->setData('_form_key', 'disabled');\r\n }", "public function submitButton(){\n\t\t\n\t\t$this->addElement('button', 'bttnsubmit', array (\n\t\t\t\t'class' => 'btn blue ',\n\t\t\t\t'ignore'=>true,\n\t\t\t\t'type'=>'submit',\n \t\t\t\t'label'=>'<i class=\"fa fa-check\"></i> Save',\n\t\t\t\t'escape'=>false\n\t\t));\n\t\t$this->bttnsubmit->setDecorators(array('ViewHelper',array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' =>'form-actions text-right'))\t));\n\t\t\n\t}", "public static function renderSubmit();", "public function isSubmit() {\n return Tools::isSubmit($this->key());\n }", "public function endForm()\r\n {\r\n echo '<div class=\"panel-footer\">\r\n <input type=\"submit\" class=\"btn btn-primary btn-sm\" value=\"Vote\" />\r\n </div>\r\n </form>';\r\n }", "function hide()\n {\n $this->_hidden = true;\n }", "function useForm()\n {\n if ( eZSys::isShellExecution() )\n return false;\n else \n return true; \n }", "public function changeSubmitBox()\n {\n $post = WordPress::getPost();\n\n if ($post->post_type == 'lbwp-nl') {\n // Check if the newsletters sent flag needs to be reset\n $this->checkSendReset($post);\n\n // Check if the hourly cron must be executed immediately\n $this->checkSendImmediately($post);\n\n // Get the newsletter (whose data ight be altered previously)\n $newsletter = $this->getNewsletter($post->ID);\n\n // If the newsletter is already sent, add some css/js do alter the box\n if ($newsletter->sent == 1) {\n echo '\n <script type=\"text/javascript\">\n jQuery(function() {\n jQuery(\"#submitpost a\").remove();\n jQuery(\"#major-publishing-actions\").remove();\n // Create info\n var info = jQuery(\"<div/>\");\n info.addClass(\"misc-pub-section\");\n info.css(\"font-weight\", \"bold\");\n info.text(\"Der Newsletter wurde bereits an den Dienst gesendet und eingeplant.\");\n var link = jQuery(\"<div/>\");\n link.addClass(\"misc-pub-section\");\n link.html(\\'<a href=\"\\' + document.location.href + \\'&resetSent\">Zurücksetzen und erneut einplanen</a>\\');\n jQuery(\"#misc-publishing-actions\").after(link).after(info);\n });\n </script>\n ';\n }\n }\n }", "public function getSubmitButton()\n {\n return $this->submitButton;\n }", "public function turnOffWaitingChecks()\n {\n $this->isModal = true;\n return;\n }", "public function user_manager_pre_submit_button($h)\n {\n echo \"&nbsp;&nbsp;&nbsp;&nbsp; <input type='checkbox' name='stopspam'> \";\n echo $h->lang['stop_spam_add_database'] . \"<br />\";\n }", "public function ShowFormInEditableOrderTable()\n {\n return false;\n }", "public function toggleEditor()\n {\n $content = $this->_rootElement->find($this->contentForm, Locator::SELECTOR_CSS);\n $toggleButton = $this->_rootElement->find($this->toggleButton, Locator::SELECTOR_CSS);\n if (!$content->isVisible()) {\n $toggleButton->click();\n }\n }", "private function free_button( $config ) {\n\t\t$install_api = add_query_arg( [ 'install_api_plugin' => $config['api'] ], $this->action );\n\t\tif ( \\is_plugin_active( $config['slug'] ) ) {\n\t\t\tsubmit_button( esc_html__( 'Install & Activate', 'git-updater' ), 'disabled' );\n\t\t} else {\n\t\t\t?>\n\t\t\t<form class=\"settings no-sub-tabs\" method=\"post\" action=\"<?php echo esc_attr( $install_api ); ?>\">\n\t\t\t\t<?php submit_button( esc_html__( 'Install & Activate', 'git-updater' ) ); ?>\n\t\t\t</form>\n\t\t\t<?php\n\t\t}\n\t}", "public function getForceButtonDisplay()\r\n {\r\n return (isset($this->_options['force_button_display'])) ? $this->_options['force_button_display'] : false;\r\n }", "function set_submit_normal()\n\t{\n\t\t$this->_submit_type = \"application/x-www-form-urlencoded\";\n\t}", "function book_settings_form_submit($form, &$form_state) {\n\n $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';\n if ($form_state['ahah_submission'] == TRUE) {\n $form_state['rebuild'] = TRUE;\n return;\n }\n if ($form_state['clicked_button']['#id'] != 'edit-submit' && $op != t('Reset to defaults')) {\n $form_state['rebuild'] = TRUE;\n return;\n }\n\n\n // Exclude unnecessary elements.\n unset($form_state['values']['submit'], $form_state['values']['reset'], $form_state['values']['form_id'], $form_state['values']['op'], $form_state['values']['form_token'], $form_state['values']['form_build_id']);\n\n foreach ($form_state['values'] as $key => $value) {\n if ($op == t('Reset to defaults')) {\n variable_del($key);\n }\n else {\n if (is_array($value) && isset($form_state['values']['array_filter'])) {\n $value = array_keys(array_filter($value));\n }\n variable_set($key, $value);\n }\n }\n if ($op == t('Reset to defaults')) {\n drupal_set_message(t('The configuration options have been reset to their default values.'));\n }\n else {\n drupal_set_message(t('The Islandora Book configuration options have been saved.'));\n }\n\n cache_clear_all();\n drupal_rebuild_theme_registry();\n}", "public function cancel()\n {\n $this->resetInput();\n $this->updateMode = false;\n }", "function wppb_hide_rf_publishing_actions(){\r\n\tglobal $post;\r\n\r\n\tif ( $post->post_type == 'wppb-rf-cpt' ){\r\n\t\techo '<style type=\"text/css\">#misc-publishing-actions, #minor-publishing-actions{display:none;}</style>';\r\n\t\t\r\n\t\t$rf = get_posts( array( 'posts_per_page' => -1, 'post_status' => apply_filters ( 'wppb_check_singular_rf_form_publishing_options', array( 'publish' ) ) , 'post_type' => 'wppb-rf-cpt' ) );\r\n\t\tif ( count( $rf ) == 1 )\r\n\t\t\techo '<style type=\"text/css\">#major-publishing-actions #delete-action{display:none;}</style>';\r\n\t}\r\n}", "function pms_add_hidden_submit_button_loading_placeholder_text() {\r\n\r\n echo '<span id=\"pms-submit-button-loading-placeholder-text\" style=\"display: none;\">' . apply_filters( 'pms_submit_button_loading_placeholder_text', __( 'Processing. Please wait...', 'paid-member-subscriptions' ) ) . '</span>';\r\n\r\n }", "public function disableHideMetaboxes()\n\t\t{\n\t\t\techo \"<style type='text/css'>label[for='\" . $this->_id . \"-hide'] { display: none; }</style>\";\n\t\t}", "protected function skipForeignFormProcessing() {}", "public function display() {\n return false;\n }", "public function display() {\n return false;\n }", "public function showOnLoginForm(): bool {\n\t\treturn $this->show_on_login_form !== 0;\n\t}", "function renderSubmitButtons() {\n\t\t$output = '';\n\n\t\tif ($this->currentStep < count($this->steps) && count($this->steps) > 1 && $this->showNextButton) {\n\t\t\t$output .= '<input style=\"display:none;\" type=\"submit\" name=\"'.$this->prefixId.'[submitproceed]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_proceed'])).'\" tabindex=\"1000\" />';\n\t\t\t$output .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[currentstep]\" value=\"'.$this->currentStep.'\" />';\n\t\t}\n\t\tif ($this->showCancelButton) {\n\t\t\t$output .= '<input style=\"float:left;\" type=\"submit\" name=\"'.$this->prefixId.'[submitcancel]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_cancel'])).'\" tabindex=\"1030\" />';\n\t\t}\n\t\tif ($this->currentStep > 1 && $this->showPreviousButton) {\n\t\t\t$output .= '<input style=\"float:left;\" type=\"submit\" name=\"'.$this->prefixId.'[submitback]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_back'])).'\" tabindex=\"1020\" />';\n\t\t\t$output .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[currentstep]\" value=\"'.$this->currentStep.'\" />';\n\t\t}\n\t\tif ($this->currentStep == count($this->steps) && $this->showNextButton) {\n\t\t\t$output .= '<input style=\"float:left;\" type=\"submit\" name=\"'.$this->prefixId.'[submitsubmit]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_submit'])).'\" tabindex=\"1000\" />';\n\t\t}\n\t\tif ($this->currentStep < count($this->steps) && count($this->steps) > 1 && $this->showNextButton) {\n\t\t\t$output .= '<input style=\"float:left;\" type=\"submit\" name=\"'.$this->prefixId.'[submitproceed]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_proceed'])).'\" tabindex=\"1010\" />';\n\t\t}\n\t\treturn '<div class=\"tx-frontendformslib-submitbuttons\">'.$output.'</div>';\n\t}", "public function resetBooleans()\n {\n $this->setShowSize(false);\n $this->setShowDescription(false);\n $this->setShowExtension(false);\n $this->setShowLastUpdate(false);\n }", "public function form_callback() {\n\t\tif ( isset( $this->btnc ) ) {\n\t\t\treturn $this->btnc;\n\t\t}\n\n\t\t$cmb_config = $this->get_cmb_config();\n\t\t$this->btnc = empty( $cmb_config ) ? $this->args['form_display_callback'] : false;\n\n\t\treturn $this->btnc;\n\t}", "public function pressButtonWithoutFieldset($button)\n {\n $this->pressButton($button);\n //workaround for page load\n $this->waitForSeconds(3);\n }", "public function is_form_submit() {\n\n\t if (isset($_POST['foodbakery_restaurant_title'])) {\n\t\treturn true;\n\t }\n\t return false;\n\t}", "public function renderFormClose()\n {\n if ( !empty( $this->viewState ) )\n $this->renderInput( 'hidden', '__viewState', $this->saveViewState() );\n echo \"</div></form>\\n\";\n }", "function voyage_mikado_comment_form_submit_button() {\n\n $comment_form_button = voyage_mikado_get_button_html(array(\n 'html_type' => 'input',\n 'type' => 'solid',\n 'text' => esc_html__('Submit', 'voyage'),\n 'input_name' => 'submit'\n ));\n\n return $comment_form_button;\n\n }", "function show_add_button(){\n if($this->session->system_admin){\n return true;\n }\n \n }", "function closeForm($submitValue=\"Submit\",$attr=\"\",$resetValue=\"Reset Form\",$printReset=true){\n\n\t\tif( $this->returnOutput ){ ob_start(); }\n\n\t\t//output hidden pkey field for update opertaions\n\t\tif( isset($this->pkeyID) ){\n\t\t\tif( isset($this->rc4key) ){\n\t\t\t\t$pkeyVal = $this->rc4->_encrypt( $this->rc4key, $this->rc4key.$this->pkeyID );\n\t\t\t} else $pkeyVal = $this->pkeyID;\n\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"pkey\\\" value=\\\"$pkeyVal\\\"/>\\n\";\n\t\t}\n\t\t//output hidden signature field for security check\n\t\tif( isset($this->rc4key) ){\n\t\t\t$sigVal = $this->rc4->_encrypt( $this->rc4key, implode(\",\",$this->signature) );\n\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"formitable_signature\\\" value=\\\"$sigVal\\\"/>\\n\";\n\t\t}\n\n\t\tif( isset($this->multiPageSubmitValue) ) $submitValue=$this->multiPageSubmitValue;\n\t\techo \"<div class=\\\"button\\\">\".($printReset?\"<input type=\\\"reset\\\" value=\\\"$resetValue\\\" class=\\\"reset\\\"/>\":\"\");\n\t\tif(strstr($submitValue,\"image:\"))\n\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"submit\\\"><input type=\\\"image\\\" src=\\\"\".str_replace(\"image:\",\"\",$submitValue).\"\\\" class=\\\"img\\\"\".($attr!=\"\"?\" \".$attr:\"\").\"/>\";\n\t\telse echo \"<input type=\\\"submit\\\" name=\\\"submit\\\" value=\\\"$submitValue\\\" class=\\\"submit\\\"\".($attr!=\"\"?\" \".$attr:\"\").\"/>\";\n\t\techo \"</div></form>\\n\";\n\n\t\tif( $this->returnOutput ){\n\t\t\t$html_block = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\treturn $html_block;\n\t\t}\n\n\t}", "public function hide_backend_enabled() {\n\n\t\tif ( ( get_option( 'permalink_structure' ) == '' || get_option( 'permalink_structure' ) == false ) && ! is_multisite() ) {\n\n\t\t\t$adminurl = is_multisite() ? admin_url() . 'network/' : admin_url();\n\n\t\t\t$content = sprintf( '<p class=\"noPermalinks\">%s <a href=\"%soptions-permalink.php\">%s</a> %s</p>', __( 'You must turn on', 'it-l10n-ithemes-security-pro' ), $adminurl, __( 'WordPress permalinks', 'it-l10n-ithemes-security-pro' ), __( 'to use this feature.', 'it-l10n-ithemes-security-pro' ) );\n\n\t\t} else {\n\n\t\t\tif ( isset( $this->settings['enabled'] ) && $this->settings['enabled'] === true ) {\n\t\t\t\t$enabled = 1;\n\t\t\t} else {\n\t\t\t\t$enabled = 0;\n\t\t\t}\n\n\t\t\t$content = '<input type=\"checkbox\" id=\"itsec_hide_backend_enabled\" name=\"itsec_hide_backend[enabled]\" value=\"1\" ' . checked( 1, $enabled, false ) . '/>';\n\t\t\t$content .= '<label for=\"itsec_hide_backend_enabled\"> ' . __( 'Enable the hide backend feature.', 'it-l10n-ithemes-security-pro' ) . '</label>';\n\n\t\t}\n\n\t\techo $content;\n\n\t}", "public function showOnForm(): bool\n {\n return $this->showOnForm;\n }", "function krnEmit_button_editSubmit($caption, $value) {\n // used twice in set security\n // submit for editing - so all are consistent - (design choices:Edit button - caption - caption button that looks like link)\n //?????????? if report should not be coded as button ??????????????????????\n //$cellClass = empty($cellClass) ? '' : ' class=\"'.$class.'\"';\n return '<button type=\"submit\" class=\"kcmKrn-button-editLink\" name=\"submit\" value=\"'.$value.'\">' . $caption . '</button>';\n}", "public function hideExtraField()\n {\n $this->houses=false;\n $this->jobs_training=false;\n $this->motorcycles =false;\n $this->cars = false;\n $this->offices=false;\n $this->lands_plots=false;\n return;\n }", "public function setActionNothing()\n\t{\n\t\t$this->setAction( \"javascription:void(0)\" );\n\t}", "public function disableStaticPreview()\n {\n $this->staticPreview = false;\n }", "public function isHidden() {\n return false;\n }", "public function is_submit()\r\n {\r\n if( $this->taintedInputs->isAutogenerated()){\r\n return false;\r\n }\r\n else{\r\n return true;\r\n }\r\n }", "function hidden()\n{\n if(last(request()->segments()) === 'show')\n {\n // if yes, add the style to hide the control\n return \"style=\\\"display:none\\\"\";\n }\n}", "function wppb_rf_epf_edit_field_disable_saving() {\r\n echo \"<script type=\\\"text/javascript\\\">wppb_check_update_field_options_disabled();</script>\";\r\n}", "protected function setIsAjaxResponse()\r\n {\r\n $this->setLayoutTemplate(NULL);\r\n $this->setPageTemplate(NULL);\r\n }", "function showNoticeForm() {\n // nop\n }", "public function preventDefault() {\n\t\t$this->runDefault = false;\n\t}", "public function isHidden() {\r\n return false;\r\n }", "public function isHidden() {\r\n return false;\r\n }", "public function HideInAjaxUpdate()\n {\n //we check if the parent wants to hide it...\n //we need to do this first in case it is being removed.\n if (parent::HideInAjaxUpdate()) {\n return true;\n }\n // we do NOT hide it if values have been entered\n if ($this->Name) {\n return false;\n }\n return true;\n }", "public function setHidden(){\n $this->_hidden = true;\n }", "function medigroup_mikado_comment_form_submit_button() {\n\n $comment_form_button = medigroup_mikado_get_button_html(array(\n 'html_type' => 'input',\n 'type' => 'solid',\n 'text' => esc_html__('Submit', 'medigroup'),\n 'input_name' => 'submit'\n ));\n\n return $comment_form_button;\n\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "function post_submitbox_misc_actions()\n {\n }", "public function isHidden()\n {\n return false;\n }", "public function be_hide_editor() {\n // Get the Post ID\n if (isset($_GET['post']))\n $post_id = $_GET['post'];\n elseif (isset($_POST['post_ID']))\n $post_id = $_POST['post_ID'];\n\n if (!isset($post_id))\n return;\n\n // Get the Page Template\n $template_file = get_post_meta($post_id, '_wp_page_template', TRUE);\n\n //if ('template-photos.php' == $template_file)\n //echo '<style>#postdivrich{display: none;}</style>';\n remove_post_type_support('post', 'editor');\n }", "#[BeforeReRender]\n public function submitFormOnRender(): void\n {\n if (!$this->getFormInstance()->isSubmitted()) {\n $this->submitForm(false);\n }\n }" ]
[ "0.67879474", "0.6736748", "0.6539108", "0.65021646", "0.6208563", "0.5987679", "0.58708537", "0.58625036", "0.5789363", "0.5782342", "0.5776321", "0.5755307", "0.5745507", "0.57309175", "0.5729202", "0.57260907", "0.57199514", "0.5675215", "0.56619215", "0.56619215", "0.5634355", "0.5634355", "0.5610653", "0.5572847", "0.55708504", "0.5562839", "0.55497795", "0.55344605", "0.5504913", "0.5499456", "0.54953104", "0.54946196", "0.54798716", "0.5473899", "0.5471916", "0.5465221", "0.5462757", "0.5455788", "0.5419435", "0.5418243", "0.54170525", "0.5415022", "0.5411703", "0.54107803", "0.5410666", "0.5401501", "0.5401501", "0.53838044", "0.53726006", "0.53718805", "0.5367973", "0.5362007", "0.5361703", "0.53563946", "0.5353376", "0.53522843", "0.53511554", "0.5350086", "0.5344665", "0.5334981", "0.533104", "0.5317183", "0.53169924", "0.5316625", "0.53112936", "0.53073335", "0.5303169", "0.53003854", "0.5295199", "0.52858895", "0.52836823", "0.52836823", "0.5281019", "0.5279929", "0.52793837", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52779347", "0.52666193", "0.52666193", "0.52666193", "0.5266283", "0.5260555", "0.52590215", "0.5258637" ]
0.6482295
4
Set the attributes for the table cell containing the form button(s)
public function set_button_attrs($button_attrs) { if (is_array($button_attrs)) { $this->button_cell_attrs = $button_attrs; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function inputAttributes()\n {\n $this->input_attributes['name'] = $this->name;\n $this->input_attributes['type'] = 'submit';\n $this->input_attributes['value'] = $this->params['title'];\n }", "function formProperties() {\n\t\tglobal $l_we_class;\n\n\t\t// Create table\n\t\t$_content = new we_htmlTable(array(\"border\" => 0, \"cellpadding\" => 0, \"cellspacing\" => 0), 12, 5);\n\n\t\t// Row 1\n\t\t$_content->setCol(0, 0, null, $this->formInput2(155, \"width\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(0, 2, null, $this->formInput2(155, \"height\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(0, 4, null, $this->formInput2(155, \"border\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(0, 1, null, getPixel(18, 1));\n\t\t$_content->setCol(0, 3, null, getPixel(18, 1));\n\n\t\t// Row 2\n\t\t$_content->setCol(1, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t// Row 3\n\t\t$_content->setCol(2, 0, null, $this->formInput2(155, \"align\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(2, 2, null, $this->formInput2(155, \"hspace\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(2, 4, null, $this->formInput2(155, \"vspace\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(2, 1, null, getPixel(18, 1));\n\t\t$_content->setCol(2, 3, null, getPixel(18, 1));\n\n\t\t// Row 4\n\t\t$_content->setCol(3, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t// Row 5\n\t\t$_content->setCol(4, 0, array(\"colspan\" => 3), $this->formInput2(328, \"alt\", 23, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(4, 3, null, getPixel(18, 1));\n\t\t$_content->setCol(4, 4, null, $this->formInput2(155, \"name\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t// Row 6\n\t\t$_content->setCol(5, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t//\tRow 7\n\t\t$_content->setCol(6, 0, array(\"colspan\" => 3), $this->formInput2(328, \"title\", 23, \"attrib\", ($this->getElement(\"useMetaTitle\") == 1 ? \"readonly='readonly'\" : \"\") . '\" onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(6, 3, null, getPixel(18, 1));\n\t\t\t$_titleField = \"we_\".$this->Name.\"_attrib[title]\";\n\t\t\t$_metaTitleField = \"we_\".$this->Name.\"_txt[Title]\";\n\t\t\t$useMetaTitle = \"we_\".$this->Name.\"_txt[useMetaTitle]\";\n\t\t//\tdisable field 'title' when checked or not.\n\t\t$_content->setCol(6, 4, array(\"valign\" => \"bottom\"), we_forms::checkboxWithHidden($this->getElement(\"useMetaTitle\"), $useMetaTitle, $l_we_class[\"use_meta_title\"], false, \"defaultfont\", \"if(this.checked){ document.forms[0]['$_titleField'].setAttribute('readonly', 'readonly', 'false'); document.forms[0]['$_titleField'].value = ''; }else{ document.forms[0]['$_titleField'].removeAttribute('readonly', 'false');}_EditorFrame.setEditorIsHot(true);\"));\n\n\t\t// longdesc should be available in images.\n\t\t// check if longdesc is set and get path\n\t\t$longdesc_id_name = \"we_\".$this->Name.\"_attrib[longdescid]\";\n\t\t$longdesc_text_name = 'tmp_longdesc';\n\t\t$longdesc_id = $this->getElement('longdescid');\n\t\tif($longdesc_id){\n $longdescPath = id_to_path($longdesc_id);\n\t\t} else {\n $longdescPath = '';\n\t\t}\n\n\t\t$we_button = new we_button();\n\n\t\t$yuiSuggest =& weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId(\"LonDesc\");\n\t\t$yuiSuggest->setContentType(\"folder,text/webEdition,text/html\");\n\t\t$yuiSuggest->setInput($longdesc_text_name,$longdescPath);\n\t\t$yuiSuggest->setLabel($l_we_class[\"longdesc_text\"]);\n\t\t$yuiSuggest->setMaxResults(20);\n\t\t$yuiSuggest->setMayBeEmpty(1);\n\t\t$yuiSuggest->setResult($longdesc_id_name, $longdesc_id);\n\t\t$yuiSuggest->setSelector(\"Docselector\");\n\t\t$yuiSuggest->setWidth(328);\n\t\t$yuiSuggest->setSelectButton($we_button->create_button(\"select\", \"javascript:we_cmd('openDocselector',document.we_form.elements['$longdesc_id_name'].value,'\" . FILE_TABLE . \"','document.we_form.elements[\\\\'$longdesc_id_name\\\\'].value','document.we_form.elements[\\\\'$longdesc_text_name\\\\'].value','opener._EditorFrame.setEditorIsHot(true);opener.top.we_cmd(\\'reload_editpage\\');','\".session_id().\"','','text/webedition,text/plain,text/html',1)\"));\n\t\t$yuiSuggest->setTrashButton($we_button->create_button('image:btn_function_trash',\"javascript:document.we_form.elements['$longdesc_id_name'].value='-1';document.we_form.elements['$longdesc_text_name'].value='';_EditorFrame.setEditorIsHot(true); YAHOO.autocoml.setValidById('\".$yuiSuggest->getInputId().\"')\"));\n\t\t$_content->setCol(7, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\t\t$_content->setCol(8, 0, array(\"valign\" => \"bottom\", 'colspan' => 5), $yuiSuggest->getYuiFiles() . $yuiSuggest->getHTML() . $yuiSuggest->getYuiCode());\n\n\t\t// Return HTML\n\t\treturn $_content->getHtmlCode();\n \t}", "protected function classes()\n {\n $this->label_attributes['class'] = ['columns'];\n $this->label_attributes['style']['float'] = 'left';\n $this->input_attributes['class'] = ['btn'];\n parent::classes();\n }", "protected function prepareButtons()\n\t{\n\t\tparent::prepareButtons();\n\t\t$this->xt->assign(\"save_button\", false);\n\t\t$this->xt->assign(\"view_page_button\", false );\n\t\t\n\t\t$this->xt->assign(\"updsel_button\", true);\n\t\t$this->xt->assign(\"updselbutton_attrs\", \"id=\\\"saveButton\".$this->id.\"\\\"\" );\n\t\t\n\t\t$label = str_replace( \"%n%\", $this->nSelected, \"Update %n% records\" );\n\t\t$this->xt->assign(\"update_selected\", $label );\n\t}", "public function setAttributes();", "function bindActionButtonObject()\r\n\t{\r\n JTable::addIncludePath( JPATH_ADMINISTRATOR . '/components/com_calendar/tables' );\r\n\t\t$table = JTable::getInstance( 'ActionButtons', 'CalendarTable' );\r\n\t\t\r\n\t if (!empty($this->actionbutton_id))\r\n\t {\r\n\t $table->load( $this->actionbutton_id );\r\n\t }\r\n\t \r\n\t\t$table->trimProperties();\r\n\t\t\r\n\t\t$properties = $this->getProperties();\r\n\t\t$table_properties = $table->getProperties();\r\n\r\n\t\tforeach ($table_properties as $prop=>$value)\r\n\t\t{\r\n\t\t $key_name = $prop;\r\n\t\t if (!array_key_exists($key_name, $properties))\r\n\t\t {\r\n\t\t $this->$key_name = $table->$prop;\r\n\t\t }\r\n\t\t}\r\n\t}", "private function addAtrributesToCRUD() {\r\n if (!empty($this->__attributes)) {\r\n $this->myCRUD()->setAtributes($this->__attributes);\r\n }\r\n }", "function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}", "function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}", "public function getFormAttribs() \n\t {\n return [\n 'EMP_ID'=>['type'=>Form::INPUT_TEXT, 'options'=>['placeholder'=>'Enter ...']],\n 'EMP_NM'=>['type'=>Form::INPUT_TEXT, 'options'=>['placeholder'=>'Enter ...']],\n 'EMP_IMG'=>['type'=>Form::INPUT_TEXT],\n // 'actions'=>['type'=>Form::INPUT_RAW, 'value'=>Html::submitButton('Submit', ['class'=>'btn btn-primary'])];\n ];\n }", "public function getAttributeButton($row, $href, $label, $title, $icon, $attributes)\n\t{\n\t\treturn '<a href=\"'.$this->addToUrl($href.'&amp;id='.$row['attr_id']).'\" title=\"'.specialchars($title).'\"'.$attributes.'>'.\\Image::getHtml($icon, $label).'</a> ';\n\t}", "function getCellAttributes()\n\t{\n\t\treturn $this->attrs;\n\t}", "function getCellAttributes()\n\t{\n\t\treturn $this->attrs;\n\t}", "public function set_button($button) { $this->button = $button; }", "public function get_attributes()\n {\n // Initialize the attributes array with the return value of\n // the parent method\n $attributes = parent::get_attributes();\n\n // Add the form-actions class\n $attributes['class'] = trim(\n 'row'.' '.(\n isset($attributes['class']) ? $attributes['class'] : ''\n )\n );\n\n // Return the completed set of attributes\n return $attributes;\n }", "function krnEmit_button_editSubmit($caption, $value) {\n // used twice in set security\n // submit for editing - so all are consistent - (design choices:Edit button - caption - caption button that looks like link)\n //?????????? if report should not be coded as button ??????????????????????\n //$cellClass = empty($cellClass) ? '' : ' class=\"'.$class.'\"';\n return '<button type=\"submit\" class=\"kcmKrn-button-editLink\" name=\"submit\" value=\"'.$value.'\">' . $caption . '</button>';\n}", "function initialize () {\n $this->set_openingtag ( \"<INPUT TYPE=\\\"submit\\\" value=\\\"\" );\n\t$this->set_closingtag ( \"\\\"[attributes]>\" );\n\t$this->set_type (\"button\");\n }", "public function setButtonAttributes(array $button_attributes = [])\n {\n if($attributes = $button_attributes) {\n foreach($attributes as $key_attribute => $val_attribute) {\n if($key_attribute == 'value') {\n $this->button_attributes['value'] = $val_attribute;\n } else {\n $this->button_attributes[] = $key_attribute.'=\"'.$val_attribute.'\"';\n }\n }\n }\n\n return $this;\n }", "public function addsButtons() {}", "protected function _addButtons()\r\n\t{\r\n\t\t$model = $this->getModel();\r\n\t\t$params\t= $model->getParams();\r\n\t\t$this->showEmail = $params->get('email', 0);\r\n\t\t$this->emailLink = '';\r\n\t\t$this->printLink = '';\r\n\t\t$this->pdfLink = '';\r\n\t\t$this->showPrint = $params->get('print', 0);\r\n\r\n\t\tif ($this->showPrint) {\r\n\t\t\t$text = JHTML::_('image.site', 'printButton.png', '/images/', NULL, NULL, JText::_('Print'));\r\n\t\t\t$this->printLink = '<a href=\"#\" onclick=\"window.print();return false;\">'.$text.'</a>';\r\n\t\t}\r\n\r\n\t\tif (JRequest::getVar('tmpl') != 'component') {\r\n\t\t\tif ($this->showEmail) {\r\n\t\t\t\t$this->emailLink = FabrikHelperHTML::emailIcon($model, $params);\r\n\t\t\t}\r\n\r\n\t\t\tif ($this->showPrint) {\r\n\t\t\t\t$this->printLink = FabrikHelperHTML::printIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\r\n\t\t\t$this->showPDF = $params->get('pdf', 0);\r\n\t\t\tif ($this->showPDF) {\r\n\t\t\t\t$this->pdfLink = FabrikHelperHTML::pdfIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->showPDF = false;\r\n\t\t}\r\n\t}", "public function actionUpdateFields() {\n\t\t$xlsAttributes = json_decode($_POST['xlsAttributes']);\n\t\tif(isset($_POST)) {\n\t\t\t$model_fields = new $_POST['table'];\n\t\t\techo \"<p class=\\\"note\\\">\".Yii::t('excel','Attach the columns to table fields').\"</p>\";\n\t\t\tforeach($model_fields->attributeNames() as $attribute)\n\t\t\t{\n\t\t\t\techo \"<div class=\\\"jFormComponent\\\">\";\n\t\t\t\techo CHtml::label($attribute, 'label_'.$attribute);\n\t\t\t\t$selected = null;\n\t\t\t\tfor ($col = 0; $col <= count($xlsAttributes)-1; ++$col) {\n\t\t\t\t\tif($xlsAttributes[$col] == $attribute)\n\t\t\t\t\t\t$selected = $col;\n\t\t\t\t}\n\t\t\t\techo CHtml::dropDownList('attr_'.$attribute, $selected, $xlsAttributes, array('empty'=>Yii::t('excel','--select field--')));\n\t\t\t\techo \"</div>\";\n\t\t\t}\n\t\t}\n\t}", "function formProperties(){\n\t\t// Create table\n\t\t$_content = new we_html_table(array('class' => 'default propertydualtable'), 5, 3);\n\t\t$row = 0;\n\t\t// Row 1\n\t\t$_content->setCol($row, 0, null, $this->formInputInfo2(155, 'width', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"', \"origwidth\"));\n\t\t$_content->setCol($row, 1, null, $this->formInputInfo2(155, 'height', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"', \"origheight\"));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'border', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t// Row 2\n\t\t$_content->setCol($row, 0, null, $this->formInput2(155, 'align', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row, 1, null, $this->formInput2(155, 'hspace', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'vspace', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t// Row 3\n\t\t$_content->setCol($row, 0, array('colspan' => 3), $this->formInput2(328, 'alt', 23, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'name', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t//\tRow 4\n\t\t$_content->setCol($row, 0, array('colspan' => 3), $this->formInput2(328, 'title', 23, 'attrib', ($this->getElement('useMetaTitle') == 1 ? \"readonly='readonly'\" : \"\") . '\" onchange=\"_EditorFrame.setEditorIsHot(true);\"', 'Title'));\n\n\t\t$_titleField = 'we_' . $this->Name . '_attrib[title]';\n\t\t$_metaTitleField = 'we_' . $this->Name . '_txt[Title]';\n\t\t$useMetaTitle = 'we_' . $this->Name . '_attrib[useMetaTitle]';\n\t\t//\tdisable field 'title' when checked or not. on checked true: document.forms[0]['$_titleField'].value='$this->getElement('Title')' and onchecked false: document.forms[0]['$_titleField'].value='' added to fix bug #5814\n\t\t$_content->setCol($row++, 2, array('style' => 'vertical-align:bottom'), we_html_forms::checkboxWithHidden($this->getElement('useMetaTitle'), $useMetaTitle, g_l('weClass', '[use_meta_title]'), false, 'defaultfont', \"if(this.checked){ document.forms[0]['\" . $_titleField . \"'].setAttribute('readonly', 'readonly', 'false'); document.forms[0]['\" . $_titleField . \"'].value = '\" . $this->getElement('Title') . \"'; }else{ document.forms[0]['\" . $_titleField . \"'].removeAttribute('readonly', 'false'); document.forms[0]['\" . $_titleField . \"'].value='';}_EditorFrame.setEditorIsHot(true);\"));\n\n\t\t// longdesc should be available in images.\n\t\t// check if longdesc is set and get path\n\t\t$longdesc_id_name = 'we_' . $this->Name . '_attrib[longdescid]';\n\t\t$longdesc_text_name = 'tmp_longdesc';\n\t\t$longdesc_id = $this->getElement('longdescid');\n\t\t$longdescPath = ($longdesc_id ? id_to_path($longdesc_id) : '');\n\n\t\t$yuiSuggest = & weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId('LonDesc');\n\t\t$yuiSuggest->setContentType('folder,' . we_base_ContentTypes::WEDOCUMENT . ',' . we_base_ContentTypes::HTML);\n\t\t$yuiSuggest->setInput($longdesc_text_name, $longdescPath);\n\t\t$yuiSuggest->setLabel(g_l('weClass', '[longdesc_text]'));\n\t\t$yuiSuggest->setMaxResults(20);\n\t\t$yuiSuggest->setMayBeEmpty(1);\n\t\t$yuiSuggest->setResult($longdesc_id_name, $longdesc_id);\n\t\t$yuiSuggest->setSelector(weSuggest::DocSelector);\n\t\t$yuiSuggest->setWidth(328);\n\t\t$cmd1 = \"document.we_form.elements['\" . $longdesc_id_name . \"'].value\";\n\n\t\t$yuiSuggest->setSelectButton(we_html_button::create_button(we_html_button::SELECT, \"javascript:we_cmd('we_selector_image',\" . $cmd1 . \",'\" . FILE_TABLE . \"','\" . we_base_request::encCmd($cmd1) . \"','\" . we_base_request::encCmd(\"document.we_form.elements['\" . $longdesc_text_name . \"'].value\") . \"','\" . we_base_request::encCmd(\"opener._EditorFrame.setEditorIsHot(true);opener.top.we_cmd('reload_editpage');\") . \"','','','\" . we_base_ContentTypes::WEDOCUMENT . \",\" . we_base_ContentTypes::TEXT . \",\" . we_base_ContentTypes::HTML . \"',1)\"));\n\t\t$yuiSuggest->setTrashButton(we_html_button::create_button(we_html_button::TRASH, \"javascript:document.we_form.elements['\" . $longdesc_id_name . \"'].value='-1';document.we_form.elements['\" . $longdesc_text_name . \"'].value='';_EditorFrame.setEditorIsHot(true); YAHOO.autocoml.setValidById('\" . $yuiSuggest->getInputId() . \"')\"));\n\t\t$_content->setCol($row, 0, array('style' => 'vertical-align:bottom', 'colspan' => 5), $yuiSuggest->getHTML() . $yuiSuggest->getYuiJs());\n\n\t\t// Return HTML\n\t\treturn $_content->getHtml();\n\t}", "function initialize () {\n $this->set_openingtag ( \"<INPUT TYPE=\\\"button\\\" value=\\\"\" );\n\t$this->set_closingtag ( \"\\\"[attributes]>\" );\n\t$this->set_type (\"button\");\n }", "public function getActionButtonsAttribute()\n {\n return '<div class=\"btn-group action-btn\">\n '.$this->getEditButtonAttribute(\"edit-image\", \"admin.images.edit\").'\n '.$this->getDeleteButtonAttribute(\"delete-image\", \"admin.images.destroy\").'\n </div>';\n }", "public function getButtonAttributes()\n {\n unset($this->button_attributes['value']);\n\n return $this->button_attributes;\n }", "function button_attr(string $button_id, array $button): string\n{\n $attributes = [\n 'name' => 'action',\n 'value' => $button_id,\n ];\n $attributes += $button['extra']['attr'] ?? [];\n return html_attr($attributes);\n}", "public function getActionButtonsAttribute()\n {\n return '<div class=\"btn-group action-btn\">\n '.$this->getEditButtonAttribute(\"edit-blogmodel\", \"admin.blogmodels.edit\").'\n '.$this->getDeleteButtonAttribute(\"delete-blogmodel\", \"admin.blogmodels.destroy\").'\n </div>';\n }", "protected function generateButtons() {}", "public function setTrTdAttr ($attr, $row=null) {\n if (is_numeric ($row))\n $this->_setAttr ($attr, $this->trtdAttr[$row]);\n else\n $this->_setAttr ($attr, $this->trtdAttr[]);\n }", "public function onEditHeaderButtonCallback(array $row, string $href, string $label, string $title, string $icon, string $attributes): string\n {\n return $this->generateButton($row, $href, $label, $title, $icon, $attributes, $this->permissionChecker->hasUserPermission(PermissionChecker::PERMISSION_EDIT));\n }", "protected function buttons()\r\n\t{\r\n\t\t$this->buttons = new stdClass();\r\n\t\t$buttonProperties = array('class' => 'fabrikTip', 'opts' => \"{notice:true}\", 'title' => '<span>'.JText::_('COM_FABRIK_EXPORT_TO_CSV').'</span>');\r\n\t\t$this->buttons->csvexport = FabrikHelperHTML::image('csv-export.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_IMPORT_FROM_CSV').'</span>';\r\n\t\t$this->buttons->csvimport = FabrikHelperHTML::image('csv-import.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_SUBSCRIBE_RSS').'</span>';\r\n\t\t$this->buttons->feed = FabrikHelperHTML::image('feed.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_EMPTY').'</span>';\r\n\t\t$this->buttons->empty = FabrikHelperHTML::image('trash.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_GROUP_BY').'</span>';\r\n\t\t$this->buttons->groupby = FabrikHelperHTML::image('group_by.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_FILTER').'</span>';\r\n\t\t$this->buttons->filter = FabrikHelperHTML::image('filter.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_ADD').'</span>';\r\n\t\t$this->buttons->add = FabrikHelperHTML::image('add.png', 'list', $this->tmpl, $buttonProperties);\r\n\t}", "protected function addAttributesToRender($writer)\n\t{\n\t\tparent::addAttributesToRender($writer);\n\t\tif(($butt=$this->getDefaultButton())!=='')\n\t\t\t$writer->addAttribute('id',$this->getClientID());\n\t}", "public function SetBtnAttr($type = 1, $set = '▼', $style = '')\r\n {\r\n $this->BtnType = $type;\r\n $this->BtnStyleStr = $style;\r\n switch ($type)\r\n {\r\n case 1 :\r\n $this->BtnText = $set;\r\n break;\r\n case 2 :\r\n $this->BtnImgSrc = $set;\r\n break;\r\n }\r\n }", "function initialize () {\n $this->set_openingtag ( \"<TD[attributes]>\" );\n\t$this->set_closingtag ( \"</TD>\" );\n }", "public function renderEditRow()\n\t{\n\t\tglobal $Security, $CurrentLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// id\n\t\t$this->id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->id->EditCustomAttributes = \"\";\n\t\t$this->id->EditValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// fecha\n\t\t$this->fecha->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fecha->EditCustomAttributes = \"\";\n\t\t$this->fecha->EditValue = FormatDateTime($this->fecha->CurrentValue, 8);\n\t\t$this->fecha->PlaceHolder = RemoveHtml($this->fecha->caption());\n\n\t\t// hora\n\t\t$this->hora->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->hora->EditCustomAttributes = \"\";\n\t\t$this->hora->EditValue = $this->hora->CurrentValue;\n\t\t$this->hora->PlaceHolder = RemoveHtml($this->hora->caption());\n\n\t\t// audio\n\t\t$this->audio->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->audio->EditCustomAttributes = \"\";\n\t\tif (!$this->audio->Raw)\n\t\t\t$this->audio->CurrentValue = HtmlDecode($this->audio->CurrentValue);\n\t\t$this->audio->EditValue = $this->audio->CurrentValue;\n\t\t$this->audio->PlaceHolder = RemoveHtml($this->audio->caption());\n\n\t\t// st\n\t\t$this->st->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->st->EditCustomAttributes = \"\";\n\t\tif (!$this->st->Raw)\n\t\t\t$this->st->CurrentValue = HtmlDecode($this->st->CurrentValue);\n\t\t$this->st->EditValue = $this->st->CurrentValue;\n\t\t$this->st->PlaceHolder = RemoveHtml($this->st->caption());\n\n\t\t// fechaHoraIni\n\t\t$this->fechaHoraIni->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fechaHoraIni->EditCustomAttributes = \"\";\n\t\t$this->fechaHoraIni->EditValue = FormatDateTime($this->fechaHoraIni->CurrentValue, 8);\n\t\t$this->fechaHoraIni->PlaceHolder = RemoveHtml($this->fechaHoraIni->caption());\n\n\t\t// fechaHoraFin\n\t\t$this->fechaHoraFin->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fechaHoraFin->EditCustomAttributes = \"\";\n\t\t$this->fechaHoraFin->EditValue = FormatDateTime($this->fechaHoraFin->CurrentValue, 8);\n\t\t$this->fechaHoraFin->PlaceHolder = RemoveHtml($this->fechaHoraFin->caption());\n\n\t\t// telefono\n\t\t$this->telefono->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->telefono->EditCustomAttributes = \"\";\n\t\tif (!$this->telefono->Raw)\n\t\t\t$this->telefono->CurrentValue = HtmlDecode($this->telefono->CurrentValue);\n\t\t$this->telefono->EditValue = $this->telefono->CurrentValue;\n\t\t$this->telefono->PlaceHolder = RemoveHtml($this->telefono->caption());\n\n\t\t// agente\n\t\t$this->agente->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->agente->EditCustomAttributes = \"\";\n\t\t$this->agente->EditValue = $this->agente->CurrentValue;\n\t\t$this->agente->PlaceHolder = RemoveHtml($this->agente->caption());\n\n\t\t// fechabo\n\t\t$this->fechabo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fechabo->EditCustomAttributes = \"\";\n\t\t$this->fechabo->EditValue = FormatDateTime($this->fechabo->CurrentValue, 8);\n\t\t$this->fechabo->PlaceHolder = RemoveHtml($this->fechabo->caption());\n\n\t\t// agentebo\n\t\t$this->agentebo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->agentebo->EditCustomAttributes = \"\";\n\t\t$this->agentebo->EditValue = $this->agentebo->CurrentValue;\n\t\t$this->agentebo->PlaceHolder = RemoveHtml($this->agentebo->caption());\n\n\t\t// comentariosbo\n\t\t$this->comentariosbo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->comentariosbo->EditCustomAttributes = \"\";\n\t\t$this->comentariosbo->EditValue = $this->comentariosbo->CurrentValue;\n\t\t$this->comentariosbo->PlaceHolder = RemoveHtml($this->comentariosbo->caption());\n\n\t\t// IP\n\t\t$this->IP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IP->EditCustomAttributes = \"\";\n\t\tif (!$this->IP->Raw)\n\t\t\t$this->IP->CurrentValue = HtmlDecode($this->IP->CurrentValue);\n\t\t$this->IP->EditValue = $this->IP->CurrentValue;\n\t\t$this->IP->PlaceHolder = RemoveHtml($this->IP->caption());\n\n\t\t// actual\n\t\t$this->actual->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->actual->EditCustomAttributes = \"\";\n\t\tif (!$this->actual->Raw)\n\t\t\t$this->actual->CurrentValue = HtmlDecode($this->actual->CurrentValue);\n\t\t$this->actual->EditValue = $this->actual->CurrentValue;\n\t\t$this->actual->PlaceHolder = RemoveHtml($this->actual->caption());\n\n\t\t// completado\n\t\t$this->completado->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->completado->EditCustomAttributes = \"\";\n\t\tif (!$this->completado->Raw)\n\t\t\t$this->completado->CurrentValue = HtmlDecode($this->completado->CurrentValue);\n\t\t$this->completado->EditValue = $this->completado->CurrentValue;\n\t\t$this->completado->PlaceHolder = RemoveHtml($this->completado->caption());\n\n\t\t// 2_1_R\n\t\t$this->_2_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_2_1_R->EditCustomAttributes = \"\";\n\t\t$this->_2_1_R->EditValue = $this->_2_1_R->CurrentValue;\n\t\t$this->_2_1_R->PlaceHolder = RemoveHtml($this->_2_1_R->caption());\n\n\t\t// 2_2_R\n\t\t$this->_2_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_2_2_R->EditCustomAttributes = \"\";\n\t\t$this->_2_2_R->EditValue = $this->_2_2_R->CurrentValue;\n\t\t$this->_2_2_R->PlaceHolder = RemoveHtml($this->_2_2_R->caption());\n\n\t\t// 2_3_R\n\t\t$this->_2_3_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_2_3_R->EditCustomAttributes = \"\";\n\t\t$this->_2_3_R->EditValue = $this->_2_3_R->CurrentValue;\n\t\t$this->_2_3_R->PlaceHolder = RemoveHtml($this->_2_3_R->caption());\n\n\t\t// 3_4_R\n\t\t$this->_3_4_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_3_4_R->EditCustomAttributes = \"\";\n\t\t$this->_3_4_R->EditValue = $this->_3_4_R->CurrentValue;\n\t\t$this->_3_4_R->PlaceHolder = RemoveHtml($this->_3_4_R->caption());\n\n\t\t// 4_5_R\n\t\t$this->_4_5_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_5_R->EditCustomAttributes = \"\";\n\t\t$this->_4_5_R->EditValue = $this->_4_5_R->CurrentValue;\n\t\t$this->_4_5_R->PlaceHolder = RemoveHtml($this->_4_5_R->caption());\n\n\t\t// 4_6_R\n\t\t$this->_4_6_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_6_R->EditCustomAttributes = \"\";\n\t\t$this->_4_6_R->EditValue = $this->_4_6_R->CurrentValue;\n\t\t$this->_4_6_R->PlaceHolder = RemoveHtml($this->_4_6_R->caption());\n\n\t\t// 4_7_R\n\t\t$this->_4_7_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_7_R->EditCustomAttributes = \"\";\n\t\t$this->_4_7_R->EditValue = $this->_4_7_R->CurrentValue;\n\t\t$this->_4_7_R->PlaceHolder = RemoveHtml($this->_4_7_R->caption());\n\n\t\t// 4_8_R\n\t\t$this->_4_8_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_8_R->EditCustomAttributes = \"\";\n\t\t$this->_4_8_R->EditValue = $this->_4_8_R->CurrentValue;\n\t\t$this->_4_8_R->PlaceHolder = RemoveHtml($this->_4_8_R->caption());\n\n\t\t// 5_9_R\n\t\t$this->_5_9_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_9_R->EditCustomAttributes = \"\";\n\t\t$this->_5_9_R->EditValue = $this->_5_9_R->CurrentValue;\n\t\t$this->_5_9_R->PlaceHolder = RemoveHtml($this->_5_9_R->caption());\n\n\t\t// 5_10_R\n\t\t$this->_5_10_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_10_R->EditCustomAttributes = \"\";\n\t\t$this->_5_10_R->EditValue = $this->_5_10_R->CurrentValue;\n\t\t$this->_5_10_R->PlaceHolder = RemoveHtml($this->_5_10_R->caption());\n\n\t\t// 5_11_R\n\t\t$this->_5_11_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_11_R->EditCustomAttributes = \"\";\n\t\t$this->_5_11_R->EditValue = $this->_5_11_R->CurrentValue;\n\t\t$this->_5_11_R->PlaceHolder = RemoveHtml($this->_5_11_R->caption());\n\n\t\t// 5_12_R\n\t\t$this->_5_12_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_12_R->EditCustomAttributes = \"\";\n\t\t$this->_5_12_R->EditValue = $this->_5_12_R->CurrentValue;\n\t\t$this->_5_12_R->PlaceHolder = RemoveHtml($this->_5_12_R->caption());\n\n\t\t// 5_13_R\n\t\t$this->_5_13_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_13_R->EditCustomAttributes = \"\";\n\t\t$this->_5_13_R->EditValue = $this->_5_13_R->CurrentValue;\n\t\t$this->_5_13_R->PlaceHolder = RemoveHtml($this->_5_13_R->caption());\n\n\t\t// 5_14_R\n\t\t$this->_5_14_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_14_R->EditCustomAttributes = \"\";\n\t\t$this->_5_14_R->EditValue = $this->_5_14_R->CurrentValue;\n\t\t$this->_5_14_R->PlaceHolder = RemoveHtml($this->_5_14_R->caption());\n\n\t\t// 5_51_R\n\t\t$this->_5_51_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_51_R->EditCustomAttributes = \"\";\n\t\t$this->_5_51_R->EditValue = $this->_5_51_R->CurrentValue;\n\t\t$this->_5_51_R->PlaceHolder = RemoveHtml($this->_5_51_R->caption());\n\n\t\t// 6_15_R\n\t\t$this->_6_15_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_15_R->EditCustomAttributes = \"\";\n\t\t$this->_6_15_R->EditValue = $this->_6_15_R->CurrentValue;\n\t\t$this->_6_15_R->PlaceHolder = RemoveHtml($this->_6_15_R->caption());\n\n\t\t// 6_16_R\n\t\t$this->_6_16_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_16_R->EditCustomAttributes = \"\";\n\t\t$this->_6_16_R->EditValue = $this->_6_16_R->CurrentValue;\n\t\t$this->_6_16_R->PlaceHolder = RemoveHtml($this->_6_16_R->caption());\n\n\t\t// 6_17_R\n\t\t$this->_6_17_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_17_R->EditCustomAttributes = \"\";\n\t\t$this->_6_17_R->EditValue = $this->_6_17_R->CurrentValue;\n\t\t$this->_6_17_R->PlaceHolder = RemoveHtml($this->_6_17_R->caption());\n\n\t\t// 6_18_R\n\t\t$this->_6_18_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_18_R->EditCustomAttributes = \"\";\n\t\t$this->_6_18_R->EditValue = $this->_6_18_R->CurrentValue;\n\t\t$this->_6_18_R->PlaceHolder = RemoveHtml($this->_6_18_R->caption());\n\n\t\t// 6_19_R\n\t\t$this->_6_19_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_19_R->EditCustomAttributes = \"\";\n\t\t$this->_6_19_R->EditValue = $this->_6_19_R->CurrentValue;\n\t\t$this->_6_19_R->PlaceHolder = RemoveHtml($this->_6_19_R->caption());\n\n\t\t// 6_20_R\n\t\t$this->_6_20_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_20_R->EditCustomAttributes = \"\";\n\t\t$this->_6_20_R->EditValue = $this->_6_20_R->CurrentValue;\n\t\t$this->_6_20_R->PlaceHolder = RemoveHtml($this->_6_20_R->caption());\n\n\t\t// 6_52_R\n\t\t$this->_6_52_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_52_R->EditCustomAttributes = \"\";\n\t\t$this->_6_52_R->EditValue = $this->_6_52_R->CurrentValue;\n\t\t$this->_6_52_R->PlaceHolder = RemoveHtml($this->_6_52_R->caption());\n\n\t\t// 7_21_R\n\t\t$this->_7_21_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_7_21_R->EditCustomAttributes = \"\";\n\t\t$this->_7_21_R->EditValue = $this->_7_21_R->CurrentValue;\n\t\t$this->_7_21_R->PlaceHolder = RemoveHtml($this->_7_21_R->caption());\n\n\t\t// 8_22_R\n\t\t$this->_8_22_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_22_R->EditCustomAttributes = \"\";\n\t\t$this->_8_22_R->EditValue = $this->_8_22_R->CurrentValue;\n\t\t$this->_8_22_R->PlaceHolder = RemoveHtml($this->_8_22_R->caption());\n\n\t\t// 8_23_R\n\t\t$this->_8_23_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_23_R->EditCustomAttributes = \"\";\n\t\t$this->_8_23_R->EditValue = $this->_8_23_R->CurrentValue;\n\t\t$this->_8_23_R->PlaceHolder = RemoveHtml($this->_8_23_R->caption());\n\n\t\t// 8_24_R\n\t\t$this->_8_24_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_24_R->EditCustomAttributes = \"\";\n\t\t$this->_8_24_R->EditValue = $this->_8_24_R->CurrentValue;\n\t\t$this->_8_24_R->PlaceHolder = RemoveHtml($this->_8_24_R->caption());\n\n\t\t// 8_25_R\n\t\t$this->_8_25_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_25_R->EditCustomAttributes = \"\";\n\t\t$this->_8_25_R->EditValue = $this->_8_25_R->CurrentValue;\n\t\t$this->_8_25_R->PlaceHolder = RemoveHtml($this->_8_25_R->caption());\n\n\t\t// 9_26_R\n\t\t$this->_9_26_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_26_R->EditCustomAttributes = \"\";\n\t\t$this->_9_26_R->EditValue = $this->_9_26_R->CurrentValue;\n\t\t$this->_9_26_R->PlaceHolder = RemoveHtml($this->_9_26_R->caption());\n\n\t\t// 9_27_R\n\t\t$this->_9_27_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_27_R->EditCustomAttributes = \"\";\n\t\t$this->_9_27_R->EditValue = $this->_9_27_R->CurrentValue;\n\t\t$this->_9_27_R->PlaceHolder = RemoveHtml($this->_9_27_R->caption());\n\n\t\t// 9_28_R\n\t\t$this->_9_28_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_28_R->EditCustomAttributes = \"\";\n\t\t$this->_9_28_R->EditValue = $this->_9_28_R->CurrentValue;\n\t\t$this->_9_28_R->PlaceHolder = RemoveHtml($this->_9_28_R->caption());\n\n\t\t// 9_29_R\n\t\t$this->_9_29_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_29_R->EditCustomAttributes = \"\";\n\t\t$this->_9_29_R->EditValue = $this->_9_29_R->CurrentValue;\n\t\t$this->_9_29_R->PlaceHolder = RemoveHtml($this->_9_29_R->caption());\n\n\t\t// 9_30_R\n\t\t$this->_9_30_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_30_R->EditCustomAttributes = \"\";\n\t\t$this->_9_30_R->EditValue = $this->_9_30_R->CurrentValue;\n\t\t$this->_9_30_R->PlaceHolder = RemoveHtml($this->_9_30_R->caption());\n\n\t\t// 9_31_R\n\t\t$this->_9_31_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_31_R->EditCustomAttributes = \"\";\n\t\t$this->_9_31_R->EditValue = $this->_9_31_R->CurrentValue;\n\t\t$this->_9_31_R->PlaceHolder = RemoveHtml($this->_9_31_R->caption());\n\n\t\t// 9_32_R\n\t\t$this->_9_32_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_32_R->EditCustomAttributes = \"\";\n\t\t$this->_9_32_R->EditValue = $this->_9_32_R->CurrentValue;\n\t\t$this->_9_32_R->PlaceHolder = RemoveHtml($this->_9_32_R->caption());\n\n\t\t// 9_33_R\n\t\t$this->_9_33_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_33_R->EditCustomAttributes = \"\";\n\t\t$this->_9_33_R->EditValue = $this->_9_33_R->CurrentValue;\n\t\t$this->_9_33_R->PlaceHolder = RemoveHtml($this->_9_33_R->caption());\n\n\t\t// 9_34_R\n\t\t$this->_9_34_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_34_R->EditCustomAttributes = \"\";\n\t\t$this->_9_34_R->EditValue = $this->_9_34_R->CurrentValue;\n\t\t$this->_9_34_R->PlaceHolder = RemoveHtml($this->_9_34_R->caption());\n\n\t\t// 9_35_R\n\t\t$this->_9_35_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_35_R->EditCustomAttributes = \"\";\n\t\t$this->_9_35_R->EditValue = $this->_9_35_R->CurrentValue;\n\t\t$this->_9_35_R->PlaceHolder = RemoveHtml($this->_9_35_R->caption());\n\n\t\t// 9_36_R\n\t\t$this->_9_36_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_36_R->EditCustomAttributes = \"\";\n\t\t$this->_9_36_R->EditValue = $this->_9_36_R->CurrentValue;\n\t\t$this->_9_36_R->PlaceHolder = RemoveHtml($this->_9_36_R->caption());\n\n\t\t// 9_37_R\n\t\t$this->_9_37_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_37_R->EditCustomAttributes = \"\";\n\t\t$this->_9_37_R->EditValue = $this->_9_37_R->CurrentValue;\n\t\t$this->_9_37_R->PlaceHolder = RemoveHtml($this->_9_37_R->caption());\n\n\t\t// 9_38_R\n\t\t$this->_9_38_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_38_R->EditCustomAttributes = \"\";\n\t\t$this->_9_38_R->EditValue = $this->_9_38_R->CurrentValue;\n\t\t$this->_9_38_R->PlaceHolder = RemoveHtml($this->_9_38_R->caption());\n\n\t\t// 9_39_R\n\t\t$this->_9_39_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_39_R->EditCustomAttributes = \"\";\n\t\t$this->_9_39_R->EditValue = $this->_9_39_R->CurrentValue;\n\t\t$this->_9_39_R->PlaceHolder = RemoveHtml($this->_9_39_R->caption());\n\n\t\t// 10_40_R\n\t\t$this->_10_40_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_10_40_R->EditCustomAttributes = \"\";\n\t\t$this->_10_40_R->EditValue = $this->_10_40_R->CurrentValue;\n\t\t$this->_10_40_R->PlaceHolder = RemoveHtml($this->_10_40_R->caption());\n\n\t\t// 10_41_R\n\t\t$this->_10_41_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_10_41_R->EditCustomAttributes = \"\";\n\t\t$this->_10_41_R->EditValue = $this->_10_41_R->CurrentValue;\n\t\t$this->_10_41_R->PlaceHolder = RemoveHtml($this->_10_41_R->caption());\n\n\t\t// 11_42_R\n\t\t$this->_11_42_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_11_42_R->EditCustomAttributes = \"\";\n\t\t$this->_11_42_R->EditValue = $this->_11_42_R->CurrentValue;\n\t\t$this->_11_42_R->PlaceHolder = RemoveHtml($this->_11_42_R->caption());\n\n\t\t// 11_43_R\n\t\t$this->_11_43_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_11_43_R->EditCustomAttributes = \"\";\n\t\t$this->_11_43_R->EditValue = $this->_11_43_R->CurrentValue;\n\t\t$this->_11_43_R->PlaceHolder = RemoveHtml($this->_11_43_R->caption());\n\n\t\t// 12_44_R\n\t\t$this->_12_44_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_44_R->EditCustomAttributes = \"\";\n\t\t$this->_12_44_R->EditValue = $this->_12_44_R->CurrentValue;\n\t\t$this->_12_44_R->PlaceHolder = RemoveHtml($this->_12_44_R->caption());\n\n\t\t// 12_45_R\n\t\t$this->_12_45_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_45_R->EditCustomAttributes = \"\";\n\t\t$this->_12_45_R->EditValue = $this->_12_45_R->CurrentValue;\n\t\t$this->_12_45_R->PlaceHolder = RemoveHtml($this->_12_45_R->caption());\n\n\t\t// 12_46_R\n\t\t$this->_12_46_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_46_R->EditCustomAttributes = \"\";\n\t\t$this->_12_46_R->EditValue = $this->_12_46_R->CurrentValue;\n\t\t$this->_12_46_R->PlaceHolder = RemoveHtml($this->_12_46_R->caption());\n\n\t\t// 12_47_R\n\t\t$this->_12_47_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_47_R->EditCustomAttributes = \"\";\n\t\t$this->_12_47_R->EditValue = $this->_12_47_R->CurrentValue;\n\t\t$this->_12_47_R->PlaceHolder = RemoveHtml($this->_12_47_R->caption());\n\n\t\t// 12_48_R\n\t\t$this->_12_48_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_48_R->EditCustomAttributes = \"\";\n\t\t$this->_12_48_R->EditValue = $this->_12_48_R->CurrentValue;\n\t\t$this->_12_48_R->PlaceHolder = RemoveHtml($this->_12_48_R->caption());\n\n\t\t// 12_49_R\n\t\t$this->_12_49_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_49_R->EditCustomAttributes = \"\";\n\t\t$this->_12_49_R->EditValue = $this->_12_49_R->CurrentValue;\n\t\t$this->_12_49_R->PlaceHolder = RemoveHtml($this->_12_49_R->caption());\n\n\t\t// 12_50_R\n\t\t$this->_12_50_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_50_R->EditCustomAttributes = \"\";\n\t\t$this->_12_50_R->EditValue = $this->_12_50_R->CurrentValue;\n\t\t$this->_12_50_R->PlaceHolder = RemoveHtml($this->_12_50_R->caption());\n\n\t\t// 1__R\n\t\t$this->_1__R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_1__R->EditCustomAttributes = \"\";\n\t\t$this->_1__R->EditValue = $this->_1__R->CurrentValue;\n\t\t$this->_1__R->PlaceHolder = RemoveHtml($this->_1__R->caption());\n\n\t\t// 13_54_R\n\t\t$this->_13_54_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_54_R->EditCustomAttributes = \"\";\n\t\t$this->_13_54_R->EditValue = $this->_13_54_R->CurrentValue;\n\t\t$this->_13_54_R->PlaceHolder = RemoveHtml($this->_13_54_R->caption());\n\n\t\t// 13_54_1_R\n\t\t$this->_13_54_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_54_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_54_1_R->EditValue = $this->_13_54_1_R->CurrentValue;\n\t\t$this->_13_54_1_R->PlaceHolder = RemoveHtml($this->_13_54_1_R->caption());\n\n\t\t// 13_54_2_R\n\t\t$this->_13_54_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_54_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_54_2_R->EditValue = $this->_13_54_2_R->CurrentValue;\n\t\t$this->_13_54_2_R->PlaceHolder = RemoveHtml($this->_13_54_2_R->caption());\n\n\t\t// 13_55_R\n\t\t$this->_13_55_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_55_R->EditCustomAttributes = \"\";\n\t\t$this->_13_55_R->EditValue = $this->_13_55_R->CurrentValue;\n\t\t$this->_13_55_R->PlaceHolder = RemoveHtml($this->_13_55_R->caption());\n\n\t\t// 13_55_1_R\n\t\t$this->_13_55_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_55_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_55_1_R->EditValue = $this->_13_55_1_R->CurrentValue;\n\t\t$this->_13_55_1_R->PlaceHolder = RemoveHtml($this->_13_55_1_R->caption());\n\n\t\t// 13_55_2_R\n\t\t$this->_13_55_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_55_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_55_2_R->EditValue = $this->_13_55_2_R->CurrentValue;\n\t\t$this->_13_55_2_R->PlaceHolder = RemoveHtml($this->_13_55_2_R->caption());\n\n\t\t// 13_56_R\n\t\t$this->_13_56_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_56_R->EditCustomAttributes = \"\";\n\t\t$this->_13_56_R->EditValue = $this->_13_56_R->CurrentValue;\n\t\t$this->_13_56_R->PlaceHolder = RemoveHtml($this->_13_56_R->caption());\n\n\t\t// 13_56_1_R\n\t\t$this->_13_56_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_56_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_56_1_R->EditValue = $this->_13_56_1_R->CurrentValue;\n\t\t$this->_13_56_1_R->PlaceHolder = RemoveHtml($this->_13_56_1_R->caption());\n\n\t\t// 13_56_2_R\n\t\t$this->_13_56_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_56_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_56_2_R->EditValue = $this->_13_56_2_R->CurrentValue;\n\t\t$this->_13_56_2_R->PlaceHolder = RemoveHtml($this->_13_56_2_R->caption());\n\n\t\t// 12_53_R\n\t\t$this->_12_53_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_R->EditValue = $this->_12_53_R->CurrentValue;\n\t\t$this->_12_53_R->PlaceHolder = RemoveHtml($this->_12_53_R->caption());\n\n\t\t// 12_53_1_R\n\t\t$this->_12_53_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_1_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_1_R->EditValue = $this->_12_53_1_R->CurrentValue;\n\t\t$this->_12_53_1_R->PlaceHolder = RemoveHtml($this->_12_53_1_R->caption());\n\n\t\t// 12_53_2_R\n\t\t$this->_12_53_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_2_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_2_R->EditValue = $this->_12_53_2_R->CurrentValue;\n\t\t$this->_12_53_2_R->PlaceHolder = RemoveHtml($this->_12_53_2_R->caption());\n\n\t\t// 12_53_3_R\n\t\t$this->_12_53_3_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_3_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_3_R->EditValue = $this->_12_53_3_R->CurrentValue;\n\t\t$this->_12_53_3_R->PlaceHolder = RemoveHtml($this->_12_53_3_R->caption());\n\n\t\t// 12_53_4_R\n\t\t$this->_12_53_4_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_4_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_4_R->EditValue = $this->_12_53_4_R->CurrentValue;\n\t\t$this->_12_53_4_R->PlaceHolder = RemoveHtml($this->_12_53_4_R->caption());\n\n\t\t// 12_53_5_R\n\t\t$this->_12_53_5_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_5_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_5_R->EditValue = $this->_12_53_5_R->CurrentValue;\n\t\t$this->_12_53_5_R->PlaceHolder = RemoveHtml($this->_12_53_5_R->caption());\n\n\t\t// 12_53_6_R\n\t\t$this->_12_53_6_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_6_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_6_R->EditValue = $this->_12_53_6_R->CurrentValue;\n\t\t$this->_12_53_6_R->PlaceHolder = RemoveHtml($this->_12_53_6_R->caption());\n\n\t\t// 13_57_R\n\t\t$this->_13_57_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_57_R->EditCustomAttributes = \"\";\n\t\t$this->_13_57_R->EditValue = $this->_13_57_R->CurrentValue;\n\t\t$this->_13_57_R->PlaceHolder = RemoveHtml($this->_13_57_R->caption());\n\n\t\t// 13_57_1_R\n\t\t$this->_13_57_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_57_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_57_1_R->EditValue = $this->_13_57_1_R->CurrentValue;\n\t\t$this->_13_57_1_R->PlaceHolder = RemoveHtml($this->_13_57_1_R->caption());\n\n\t\t// 13_57_2_R\n\t\t$this->_13_57_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_57_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_57_2_R->EditValue = $this->_13_57_2_R->CurrentValue;\n\t\t$this->_13_57_2_R->PlaceHolder = RemoveHtml($this->_13_57_2_R->caption());\n\n\t\t// 13_58_R\n\t\t$this->_13_58_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_58_R->EditCustomAttributes = \"\";\n\t\t$this->_13_58_R->EditValue = $this->_13_58_R->CurrentValue;\n\t\t$this->_13_58_R->PlaceHolder = RemoveHtml($this->_13_58_R->caption());\n\n\t\t// 13_58_1_R\n\t\t$this->_13_58_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_58_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_58_1_R->EditValue = $this->_13_58_1_R->CurrentValue;\n\t\t$this->_13_58_1_R->PlaceHolder = RemoveHtml($this->_13_58_1_R->caption());\n\n\t\t// 13_58_2_R\n\t\t$this->_13_58_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_58_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_58_2_R->EditValue = $this->_13_58_2_R->CurrentValue;\n\t\t$this->_13_58_2_R->PlaceHolder = RemoveHtml($this->_13_58_2_R->caption());\n\n\t\t// 13_59_R\n\t\t$this->_13_59_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_59_R->EditCustomAttributes = \"\";\n\t\t$this->_13_59_R->EditValue = $this->_13_59_R->CurrentValue;\n\t\t$this->_13_59_R->PlaceHolder = RemoveHtml($this->_13_59_R->caption());\n\n\t\t// 13_59_1_R\n\t\t$this->_13_59_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_59_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_59_1_R->EditValue = $this->_13_59_1_R->CurrentValue;\n\t\t$this->_13_59_1_R->PlaceHolder = RemoveHtml($this->_13_59_1_R->caption());\n\n\t\t// 13_59_2_R\n\t\t$this->_13_59_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_59_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_59_2_R->EditValue = $this->_13_59_2_R->CurrentValue;\n\t\t$this->_13_59_2_R->PlaceHolder = RemoveHtml($this->_13_59_2_R->caption());\n\n\t\t// 13_60_R\n\t\t$this->_13_60_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_60_R->EditCustomAttributes = \"\";\n\t\t$this->_13_60_R->EditValue = $this->_13_60_R->CurrentValue;\n\t\t$this->_13_60_R->PlaceHolder = RemoveHtml($this->_13_60_R->caption());\n\n\t\t// 12_53_7_R\n\t\t$this->_12_53_7_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_7_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_7_R->EditValue = $this->_12_53_7_R->CurrentValue;\n\t\t$this->_12_53_7_R->PlaceHolder = RemoveHtml($this->_12_53_7_R->caption());\n\n\t\t// 12_53_8_R\n\t\t$this->_12_53_8_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_8_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_8_R->EditValue = $this->_12_53_8_R->CurrentValue;\n\t\t$this->_12_53_8_R->PlaceHolder = RemoveHtml($this->_12_53_8_R->caption());\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "public function html()\n {\n\n\n return $this->builder()\n ->setTableId('admindatatable-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->dom('Blfrtip')\n ->orderBy(1)\n ->parameters([\n 'dom' => 'Blfrtip',\n 'buttons' => [\n\n\n [ 'extend' => 'reload', 'className' => 'btn btn-primary' , 'text' => '<i class=\"fa fa-retweet\">' ],\n\n\n ],\n\n\n\n ]);\n }", "public function addButton($value, $attr = array()){\n $field = new Form_Field_Button(\"\");\n $field->setDefaultValue($value);\n foreach($attr as $key => $value) $field->attr->add($key, $value);\n $this->buttons[] = $field;\n return $field;\n }", "public function saveButton(){\n\n\t\t//get the properties of this column:\n\t\tif( !isset( $this->properties['buttonText'] ) )\n\t\t\t$this->getProperties();\n\n\t\techo '<a class=\"lightbox-modal-close\" href=\"#\">';\n\t\t\techo '<span class=\"media-modal-icon\"></span>';\n\t\techo '</a>';\n\n\t\techo '<div class=\"save-btn-container\">';\n\n\t\t\techo '<span class=\"spinner\"></span>';\n\n\t\t\techo '<button id=\"save-column\" class=\"save-btn section-btn\">';\n\t\t\t\techo esc_html( $this->properties['buttonText'] );\n\t\t\techo '</button>';\n\n\t\techo '</div>';\n\n\t}", "function manipulate_update_button($buttons, $rowData){\r\n\t\t//print_r($rowData);exit();\r\n\t\tif ($this->input->get('action') == 'view') {unset($buttons['update']);}\r\n\t\t{\r\n\t\t$this->db_plc0->where('iupb_id', $rowData['iupb_id']);\t\t\r\n\t\t$j2 = $this->db_plc0->count_all_results('plc2.coa_pilot_lab');\r\n\t\t$icoa_id=0;\r\n\t\tif($j2> 0){\r\n\t\t\t$sql=\"select * from plc2.coa_pilot_lab where iupb_id=\".$rowData['iupb_id'].\" LIMIT 1\";\r\n\t\t\t$dt=$this->db_plc0->query($sql)->row_array();\r\n\t\t\t$icoa_id=$dt['icoa_id'];\r\n\t\t}\r\n\r\n\t\tunset($buttons['update']);\r\n\t\t//$js=$this->load->view('misc_util',array('className'=> 'coa_pilot_lab'), true);\r\n\t\t$js =$this->load->view('coa_pilot_lab_js');\r\n\t\t$js .= $this->load->view('uploadjs');\r\n\r\n\t\t$cNip=$this->user->gNIP;\r\n\t\t$sql= \"select * from plc2.plc2_upb up where up.iupb_id=\".$rowData['iupb_id'];\r\n\t\t$dt=$this->dbset->query($sql)->row_array();\r\n\t\t$setuju = '<button onclick=\"javascript:setuju(\\'coa_pilot_lab\\', \\''.base_url().'processor/plc/coa/pilot/lab?action=confirm&last_id='.$this->input->get('id').'&icoa_id='.$icoa_id.'&foreign_key='.$this->input->get('foreign_key').'&company_id='.$this->input->get('company_id').'&group_id='.$this->input->get('group_id').'&modul_id='.$this->input->get('modul_id').'\\', this, '.$dt['iupb_id'].', \\''.$dt['vupb_nomor'].'\\')\" class=\"ui-button-text icon-save\" id=\"button_save_soi_fg\">Confirm</button>';\r\n\t\t\r\n\t\t$approve = '<button onclick=\"javascript:load_popup(\\''.base_url().'processor/plc/coa/pilot/lab?action=approve&iupb_id='.$rowData['iupb_id'].'&icoa_id='.$icoa_id.'&cNip='.$cNip.'&status=1&group_id='.$this->input->get('group_id').'&modul_id='.$this->input->get('modul_id').'\\')\" class=\"ui-button-text icon-save\" id=\"button_approve_coa_pilot_lab\">Approve</button>';\r\n\t\t$reject = '<button onclick=\"javascript:load_popup(\\''.base_url().'processor/plc/coa/pilot/lab?action=reject&iupb_id='.$rowData['iupb_id'].'&icoa_id='.$icoa_id.'&cNip='.$cNip.'&status=2&group_id='.$this->input->get('group_id').'&modul_id='.$this->input->get('modul_id').'\\')\" class=\"ui-button-text icon-save\" id=\"button_approve_coa_pilot_lab\">Reject</button>';\r\n\r\n\t\t$update = '<button onclick=\"javascript:update_btn_back(\\'coa_pilot_lab\\', \\''.base_url().'processor/plc/coa/pilot/lab?company_id='.$this->input->get('company_id').'&group_id='.$this->input->get('group_id').'&modul_id='.$this->input->get('modul_id').'\\', this)\" class=\"ui-button-text icon-save\" id=\"button_save_coa_pilot_lab\">Update & Submit</button>';\r\n\t\t$updatedraft = '<button onclick=\"javascript:update_draft_btn(\\'coa_pilot_lab\\', \\''.base_url().'processor/plc/coa/pilot/lab?company_id='.$this->input->get('company_id').'&draft=true&group_id='.$this->input->get('group_id').'&modul_id='.$this->input->get('modul_id').'\\', this, true)\" class=\"ui-button-text icon-save\" id=\"button_save_coa_pilot_lab\">Update as Draft</button>';\r\n\t\tif($this->auth_localnon->is_manager()){\r\n\t\t\t$x=$this->auth_localnon->dept();\r\n\t\t\t$manager=$x['manager'];\r\n\t\t\tif(in_array('QA', $manager)){\r\n\t\t\t\tif($j2> 0){\r\n\t\t\t\t\t$sql=\"select * from plc2.coa_pilot_lab where icoa_id=\".$icoa_id.\" LIMIT 1\";\r\n\t\t\t\t\t$dt=$this->db_plc0->query($sql)->row_array();\r\n\t\t\t\t\tif($dt['isubmit']==0){\r\n\t\t\t\t\t\t$buttons['update']=$updatedraft.$update.$js;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif(($dt['isubmit']<>0)&&($dt['iappqa']==0)){\r\n\t\t\t\t\t\t$buttons['update']=$setuju.$js;\r\n\t\t\t\t\t}else{}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$buttons['update']=$updatedraft.$update.$js;\r\n\t\t\t\t}\r\n\t\t\t\t$type='QA';\r\n\t\t\t}else{\r\n\r\n\t\t\t\t$type='';\r\n\t\t\t}\r\n\t\t}else{\r\n\r\n\t\t\t$x=$this->auth_localnon->dept();\r\n\t\t\t$team=$x['team'];\r\n\t\t\tif(in_array('QA', $team)){\r\n\t\t\t\t$type='QA';\r\n\t\t\t\tif($j2> 0){\r\n\t\t\t\t\t$sql=\"select * from plc2.coa_pilot_lab where icoa_id=\".$icoa_id.\" LIMIT 1\";\r\n\t\t\t\t\t$dt=$this->db_plc0->query($sql)->row_array();\r\n\t\t\t\t\tif($dt['isubmit']==0){\r\n\t\t\t\t\t\t$buttons['update']=$updatedraft.$update.$js;\r\n\t\t\t\t\t}else{}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$buttons['update']=$updatedraft.$update.$js;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$type='';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\treturn $buttons;\r\n\t}", "public function setAttributes()\n\t{\n\t\t$this->title \t\t= Input::get( 'title' );\n\t\t$this->description \t= Input::get( 'description' );\n\t\t$this->color \t\t= Input::get( 'color' );\n\t\t$this->type \t\t= Input::get( 'type' );\n\t\t$this->canvas_id\t= Input::get( 'canvas_id', Input::get( 'canvasId' ) );\n\t}", "function minorite_button($variables) {\n $element = $variables['element'];\n element_set_attributes($element, array('id', 'name', 'title', 'value'));\n\n if ($element['#type'] == 'submit') {\n $element['#attributes']['type'] = 'submit';\n }\n\n // Adds CSS selector on icon button.\n if (isset($element['#icon'])) {\n $element['#value'] = '<i></i>' . $element['#value'];\n $element['#attributes']['class'][] = $element['#icon'];\n }\n\n return '<button' . drupal_attributes($element['#attributes']) . '>' . $element['#value'] . '</button>';\n}", "protected function attributeTableHTML($field)\r\n\t{\r\n\t\t$attributes = json_decode($field->attributes);\r\n\t\t\r\n\t\tif(empty($attributes))\r\n\t\t\t$attributes = array(\"\" => \"\");\r\n\t\t\r\n\t\t?>\r\n\t\t<input name=\"attributes[]\" type=\"hidden\"/>\r\n\t\t<table class=\"attributes\">\r\n\t\t\t<tbody>\r\n\t\t\t\t<?php\r\n\t\t\t\tforeach($attributes as $key => $value)\r\n\t\t\t\t{\r\n\t\t\t\t?>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\tplaceholder=\"<?php _e('Name', 'wp-google-maps'); ?>\"\r\n\t\t\t\t\t\t\t\tclass=\"attribute-name\"\r\n\t\t\t\t\t\t\t\tvalue=\"<?php echo $key; ?>\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input \r\n\t\t\t\t\t\t\t\tplaceholder=\"<?php _e('Value', 'wp-google-maps'); ?>\"\r\n\t\t\t\t\t\t\t\tclass=\"attribute-value\"\r\n\t\t\t\t\t\t\t\tvalue=\"<?php echo $value; ?>\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t<?php\r\n\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t</tbody>\r\n\t\t</table>\r\n\t\t<?php\r\n\t}", "function PDFTable($attrs) \n\t{\n\t\tglobal $DC,$DG;\n\n\t\t// recupera ogni proprietà passata dall'XML\n\t\tforeach($attrs as $key=>$value){\n\t\t\teval('$this->'.$key.' = \"$value\";');\n\t\t}\n\n\t\t// dichiara i valori di default...\n\t\t$default['COLS'][] = 1; // numero di ripetizioni orrizzontali dell'area di disegno\n\n\t\t// ... e li imposta\n\t\tforeach($default as $key=>$value){\n\t\t\tforeach ($value as $local){ eval('if ($local and !$this->'.$key.') { $this->'.$key.' = \"'.$local.'\"; }'); \t}\n\t\t}\n\t\t\n\t\t// dichiara la lista degli attributi obbligatori...\n\t\t$reqiured[] = \"GEOMETRY\";\n\t\t$reqiured[] = \"ROWS\";\n\t\t$reqiured[] = \"DSN\";\n\t\t\n\t\t// ... e li verifica\n\t\tforeach($reqiured as $value){\n\t\t\teval('if(!isset($this->'.$value.')){die (\"The property \".$value.\" in PDFTable ID -> \".$this->ID.\" is required.\");}');\n\t\t}\n\n\t\t$this->GEOMETRY = explode(',',$this->GEOMETRY);\n\n\t\t$this->LEFT = $this->GEOMETRY[0];\n\t\t$this->TOP = $this->GEOMETRY[1];\n\t\t$this->WIDTH = $this->GEOMETRY[2];\n\t\t$this->HEIGHT = $this->GEOMETRY[3];\n\t}", "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 getFormButtons() : array\n {\n $result = parent::getFormButtons();\n\n $result['submit'] = new Submit(\n [\n AButton::PARAM_LABEL => 'Sign up',\n AButton::PARAM_BTN_TYPE => 'btn regular-main-button submit',\n ]\n );\n\n return $result;\n }", "function box_build_attributes($properties, $i, $showtrunc = true, $showfont = true, $showborder = true, $showfill = true, $pre = '', $title = '') {\n global $kFonts, $kFontSizes, $kFontAlign, $kFontColors, $kLineSizes;\n $fields = array('font', 'size', 'align', 'color', 'bordershow', 'bordersize', 'bordercolor', 'fillshow', 'fillcolor');\n\tforeach ($fields as $value) {\n $temp = $pre . $value;\n\t $$value = $properties->$temp;\n\t}\n $output = NULL;\n $output .= '<table class=\"ui-widget\" style=\"border-collapse:collapse;margin-left:auto;margin-right:auto;\">' . nl;\n $output .= ' <thead class=\"ui-widget-header\">' . nl;\n $output .= ' <tr><th colspan=\"5\">' . ($title ? $title : TEXT_ATTRIBUTES) . '</th></tr>' . nl;\n $output .= ' </thead>' . nl;\n $output .= ' <tbody class=\"ui-widget-content\">' . nl;\n if ($showtrunc) {\n $output .= ' <tr>' . nl;\n $output .= ' <td colspan=\"2\">' . TEXT_TRUNCATE . html_radio_field($pre.'box_trun_' . $i, '0', (!$properties->truncate) ? true : false) . TEXT_NO . html_radio_field($pre.'box_trun_' . $i, '1', ($properties->truncate) ? true : false) . TEXT_YES . '</td>' . nl;\n $output .= ' <td colspan=\"3\">' . TEXT_DISPLAY_ON . html_radio_field($pre.'box_last_' . $i, '0', (!$properties->display || $properties->display == '0') ? true : false) . TEXT_ALL_PAGES . html_radio_field($pre.'box_last_' . $i, '1', ($properties->display == '1') ? true : false) . TEXT_FIRST_PAGE . html_radio_field($pre.'box_last_' . $i, '2', ($properties->display == '2') ? true : false) . TEXT_LAST_PAGE . '</td>' . nl;\n $output .= ' </tr>' . nl;\n }\n if ($showfont) {\n $output .= ' <tr class=\"ui-widget-header\">' . nl;\n $output .= ' <th>' . '&nbsp;' . '</th>' . nl;\n $output .= ' <th>' . TEXT_STYLE . '</th>' . nl;\n $output .= ' <th>' . TEXT_SIZE . '</th>' . nl;\n $output .= ' <th>' . TEXT_ALIGN . '</th>' . nl;\n $output .= ' <th>' . TEXT_COLOR . '</th>' . nl;\n $output .= ' </tr>' . nl;\n $output .= ' <tr>' . nl;\n $output .= ' <td>' . TEXT_FONT .'</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_fnt_' . $i, $kFonts, $font) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_size_'. $i, $kFontSizes, $size) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_aln_' . $i, $kFontAlign, $align) . '</td>' . nl;\n $output .= ' <td id=\"' . $pre.'box_td_' . $i . '\" style=\"background-color:#' . convertPfColor($color) . '\">' . nl;\n $output .= ' <div id=\"' . $pre.'box_whl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'box_td_' . $i . '\\', \\''.$pre.'box_clr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'sel_clr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_clr_' . $i, $color ? $color : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_clr_' . $i, $kFontColors, $color ? $color : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_clr_' . $i . '\\', \\''.$pre.'box_td_' . $i . '\\', \\''.$pre.'box_clr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'sel_clr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= ' </tr>' . nl;\n }\n if ($showborder) {\n $output .= ' <tr>' . nl;\n $output .= ' <td>' . TEXT_BORDER_AREA . '</td>' . nl;\n $output .= ' <td>' . html_checkbox_field($pre.'box_bdr_' . $i, '1', ($bordershow) ? true : false) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_bsz_' . $i, $kLineSizes, $bordersize) . TEXT_POINTS . '</td>' . nl;\n $output .= ' <td>' . '&nbsp;' . '</td>' . nl;\n $output .= ' <td id=\"'.$pre.'box_btd_' . $i . '\" style=\"background-color:#' . convertPfColor($bordercolor) . '\">' . nl;\n $output .= ' <div id=\"'.$pre.'box_bwhl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'box_btd_' . $i . '\\', \\''.$pre.'box_bclr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'sel_bclr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_bclr_' . $i, $bordercolor ? $bordercolor : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_bclr_' . $i, $kFontColors, $bordercolor ? $bordercolor : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_bclr_' . $i . '\\', \\''.$pre.'box_btd_' . $i . '\\', \\''.$pre.'box_bclr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'sel_bclr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= '</tr>' . nl;\n }\n if ($showfill) {\n $output .= '<tr>' . nl;\n $output .= ' <td>'. TEXT_FILL_AREA . '</td>' . nl;\n $output .= ' <td>'. html_checkbox_field($pre.'box_fill_' . $i, '1', ($fillshow) ? true : false) . '</td>' . nl;\n $output .= ' <td>'. '&nbsp;' . '</td>' . nl;\n $output .= ' <td>'. '&nbsp;' . '</td>' . nl;\n $output .= ' <td id=\"'.$pre.'box_ftd_' . $i .'\" style=\"background-color:#' . convertPfColor($fillcolor) .'\">' . nl;\n $output .= ' <div id=\"'.$pre.'box_fwhl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'box_ftd_' . $i . '\\', \\''.$pre.'box_fclr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'sel_fclr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_fclr_' . $i, $fillcolor ? $fillcolor : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_fclr_' . $i, $kFontColors, $fillcolor ? $fillcolor : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_fclr_' . $i . '\\', \\''.$pre.'box_ftd_' . $i . '\\', \\''.$pre.'box_fclr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'sel_fclr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= '</tr>' . nl;\n }\n $output .= '</tbody></table>' . nl;\n return $output;\n}", "function genSubmitRow(){\n\t\t$row = array();\n\t\tarray_pad($row, sizeof($this->table[0]), '');\n\n\t\tif($this->state->isNewEntry()){\n\t\t\t$textField = 'text';\n\t\t\t$row[0] = $this->translator->markupAttributes('input', '',array('type'=>'text', 'name'=>'user'));\n\t\t\t$row[1] = $this->translator->markupAttributes('input','',array('type'=>'submit', 'name'=>'submit', 'value'=>'Submit'));\n\n\n\t\t\tfor($count = 2; $count < sizeof($this->table[0]); $count++) $row[$count] = $this->translator->markupAttributes('input', '',array('type'=>'checkbox', 'name'=>$count));\n\t\t\n\t\t}\n\t\telse{\n\t\t\t$row[0] = '';\n\t\t\t$row[1] = $this->translator->markupAttributes('input','',array('type'=>'submit', 'name'=>'new', 'value'=>'New'));\n\n\t\t\tfor($count = 2; $count < sizeof($this->table[0]); $count++) $row[$count] = '';\n\t\t}\n\n\t\treturn $row;\n\t}", "public function getAttributes()\n {\n $userId = $this->getDataRow()->getCellValue('id');\n // Prepare your attributes\n $newAttributes = [\n 'data-href' => route('admin.userdetail', [$userId]),\n 'class' => 'my-class table-row',\n ];\n return array_merge(parent::getAttributes(), $newAttributes);\n }", "protected function initDefaultButtons()\n\t{\n\t\tif($this->inputFieldName===null)\n\t\t\t$this->inputFieldName='priority[]';\n\t\tif($this->upButtonLabel===null)\n\t\t\t$this->upButtonLabel=Yii::t('zii','Up');\n\t\tif($this->downButtonLabel===null)\n\t\t\t$this->downButtonLabel=Yii::t('zii','Down');\n\t\tif($this->upButtonImageUrl===null)\n\t\t\t$this->upButtonImageUrl=$this->grid->enhancedScriptUrl.'/up.png';\n\t\tif($this->downButtonImageUrl===null)\n\t\t\t$this->downButtonImageUrl=$this->grid->enhancedScriptUrl.'/down.png';\n\t\t\n\t\t// input text\n\t\tforeach(array('input') as $id)\n\t\t{\n\t\t\t$button=array(\n\t\t\t\t'name'=>$this->{$id.'FieldName'},\n\t\t\t\t'options'=>$this->{$id.'FieldOptions'},\n\t\t\t);\n\t\t\tif(isset($this->buttons[$id]))\n\t\t\t\t$this->buttons[$id]=array_merge($button,$this->buttons[$id]);\n\t\t\telse\n\t\t\t\t$this->buttons[$id]=$button;\n\t\t}\n\t\t// image button\n\t\tforeach(array('up','down') as $id)\n\t\t{\n\t\t\t$button=array(\n\t\t\t\t'label'=>$this->{$id.'ButtonLabel'},\n\t\t\t\t'url'=>$this->{$id.'ButtonUrl'},\n\t\t\t\t'imageUrl'=>$this->{$id.'ButtonImageUrl'},\n\t\t\t\t'options'=>$this->{$id.'ButtonOptions'},\n\t\t\t);\n\t\t\tif(isset($this->buttons[$id]))\n\t\t\t\t$this->buttons[$id]=array_merge($button,$this->buttons[$id]);\n\t\t\telse\n\t\t\t\t$this->buttons[$id]=$button;\n\t\t}\n\t}", "function form_button($buttons = \"\") {\n\t\tif ($this->block == true)\n\t\t\t$buttons = \"fehler\";\n\n\t\t$btn['submit'] = \"<input accesskey='8' value=\\\"OK, Speichern\\\" class=\\\"submitbutton buttons\\\" type=\\\"submit\\\" />\";\n\t\t$btn['reset'] = \"<input accesskey='9' value=\\\"Eingaben l&ouml;schen\\\" class=\\\"resetbutton buttons\\\" type=\\\"reset\\\" />\";\n\t\t$btn['ex'] = \"<input accesskey='7' value=\\\"Beispiel..\\\" type=\\\"button\\\" class=\\\"examplebutton buttons\\\" onClick=\\\"set_examples();\\\" />\";\n\n\t\tswitch ($buttons) {\n\t\t\tdefault :\n\t\t\tcase 'ok_reset' :\n\t\t\t\t$r = \"<td colspan=\\\"3\\\" align=\\\"right\\\">\".$btn['submit'].\"&nbsp;\".$btn['reset'].\"</td>\";\n\t\t\t\tbreak;\n\t\t\tcase 'ex__ok_reset' :\n\t\t\t\t$r = \"<td>\".$btn['ex'].\"</td><td colspan=\\\"2\\\" align=\\\"right\\\">\".$btn['submit'].\"&nbsp;\".$btn['reset'].\"</td>\";\n\t\t\t\t$this->add_hidden_field(\"hiddenexample\", 0); // for examplebutton\n\t\t\t\t$this->special_form = \"onChange=\\\"document.myform.hiddenexample.value=0\\\"\";\n\t\t\t\tbreak;\n\t\t\tcase 'fehler' :\n\t\t\t\t$r = \"<td colspan=\\\"3\\\" align=\\\"center\\\" class=\\\"error\\\">Ich konnte notwendige Daten f&uuml;r dieses Formular nicht laden. <br />L&ouml;sung: \".$this->block.\"</td>\";\n\t\t\t\tbreak;\n\t\t}\n\t\treturn \"<tr>\".$r.\"</tr>\";\n\t}", "public function setModifyMode() {\n $this->getElement('submit')->setLabel('Edit Test');\n }", "function successTableData()\n{\n global $html;\n\n $td = $html->createElement(\"td\",\"OK\");\n $tdStyle = $html->createAttribute(\"style\");\n $tdStyle->value = \"background-color: #00ff00\";\n $td->appendChild($tdStyle);\n\n return $td;\n}", "private function loadButtons()\n {\n $objAdd = $this->addButtonNew(_FEST);\n $objAdd->setInline();\n }", "protected function setEditButtons()\n {\n global $APPLICATION;\n\n if (!$APPLICATION->GetShowIncludeAreas() || $this->showEditButtons === false)\n {\n return false;\n }\n\n $buttons = \\CIBlock::GetPanelButtons(\n $this->arParams['IBLOCK_ID'],\n $this->arResult['ID'],\n $this->arParams['SECTION_ID'],\n []\n );\n\n $this->addIncludeAreaIcons(\\CIBlock::GetComponentMenu($APPLICATION->GetPublicShowMode(), $buttons));\n\n if (is_array($buttons['intranet']))\n {\n Asset::getInstance()->addJs(BX_ROOT.'/js/main/utils.js');\n\n foreach ($buttons['intranet'] as $button)\n {\n $this->addEditButton($button);\n }\n }\n }", "function posts_link_attributes(){\n\treturn ' class=\"btn btn-primary float-right\" ';\n}", "protected function elementLinks($table, $row)\n {\n // \"Info\": (All records)\n $onClick = 'top.launchView(' . GeneralUtility::quoteJSvalue($table) . ', ' . (int)$row['uid'] .\n '); return false;';\n $cells[] = '<a class=\"btn btn-default\" href=\"#\" onclick=\"' . htmlspecialchars($onClick) . '\"\n title=\"' . $this->getLanguageService()->getLL('LLL:EXT:lang/locallang_common.xml:showInfo', true) . '\">'\n . $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL)->render() . '</a>';\n\n // Edit:\n $params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';\n $iconIdentifier = 'actions-open';\n $cells[] = '<a class=\"btn btn-default\" href=\"#\" onclick=\"'\n . htmlspecialchars(BackendUtility::editOnClick($params, '', -1))\n . '\" title=\"' . $this->getLanguageService()->getLL('LLL:EXT:lang/locallang_common.xml:edit', true) . '\">'\n . $this->iconFactory->getIcon($iconIdentifier, Icon::SIZE_SMALL)->render() . '</a>';\n\n // Hide:\n $hiddenField = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'];\n if ($row[$hiddenField]) {\n $params = '&data[' . $table . '][' . $row['uid'] . '][' . $hiddenField . ']=0';\n $icon = 'unhide';\n } else {\n $params = '&data[' . $table . '][' . $row['uid'] . '][' . $hiddenField . ']=1';\n $icon = 'hide';\n }\n $hideTitle = $this->getLanguageService()->getLL('hide', true);\n $unhideTitle = $this->getLanguageService()->getLL('unHide', true);\n $cells[] = '<a class=\"btn btn-default t3js-record-hide\" data-state=\"hidden\" href=\"#\"'\n . ' data-params=\"' . htmlspecialchars($params) . '\"'\n . ' title=\"' . $unhideTitle . '\"'\n . ' data-toggle-title=\"' . $hideTitle . '\">'\n . $this->iconFactory->getIcon('actions-edit-' . $icon, Icon::SIZE_SMALL)->render() . '</a>';\n\n // Delete\n $refCountMsg = BackendUtility::referenceCount(\n $table,\n $row['uid'],\n ' ' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.referencesToRecord'),\n $this->getReferenceCount($table, $row['uid'])) . BackendUtility::translationCount($table, $row['uid'],\n ' ' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.translationsOfRecord')\n );\n\n $actionName = 'delete';\n $titleOrig = BackendUtility::getRecordTitle($table, $row, false, true);\n $title = GeneralUtility::slashJS(GeneralUtility::fixed_lgd_cs($titleOrig, $this->fixedL), true);\n $warningText = $this->getLanguageService()->getLL($actionName . 'Warning') . ' \"' . $title . '\" ' . '['\n . $table . ':' . $row['uid'] . ']' . $refCountMsg;\n\n $params = 'cmd[' . $table . '][' . $row['uid'] . '][delete]=1';\n $icon = $this->iconFactory->getIcon('actions-edit-' . $actionName, Icon::SIZE_SMALL)->render();\n $linkTitle = $this->getLanguageService()->getLL($actionName, true);\n $cells[] = '<a class=\"btn btn-default t3js-record-delete\" href=\"#\" '\n . ' data-l10parent=\"' . htmlspecialchars($row['l10n_parent']) . '\"'\n . ' data-params=\"' . htmlspecialchars($params) . '\" data-title=\"' . htmlspecialchars($titleOrig) . '\"'\n . ' data-message=\"' . htmlspecialchars($warningText) . '\" title=\"' . $linkTitle . '\"'\n . '>' . $icon . '</a>';\n\n return implode('', $cells);\n }", "function stdTableButtons($table, $prototypes = array())\n{\n $stdBtnGroup = array();\n foreach($prototypes AS $prototype => $settings) {\n if(isset($table['prototype'][$prototype])) {\n $stdBtnGroup[$prototype] = array(\n 'icon' => (isset($settings['icon']) ? $settings['icon'] : DefaultIcon($prototype)),\n 'iconalign' => 'left',\n 'caption' => $settings['caption'],\n 'tooltip' => (!empty($settings['tooltip']) ? $settings['tooltip'] : null),\n 'script' => dlgPrototype($table, 'edit', array()),\n );\n }\n }\n return $stdBtnGroup; \n}", "public function elementButtons($row, $href, $label, $title, $icon, $attributes)\r\n\t{\r\n\t\tswitch ($row['type'])\r\n\t\t{\r\n\t\t\tcase 'group':\r\n\t\t\t\treturn '';\r\n\t\t\t\r\n\t\t\tcase 'element':\r\n\t\t\t\treturn '<a href=\"'.$this->addToUrl($href.'&amp;id='.$row['id']).'\" title=\"'.specialchars($title).'\"'.$attributes.'>'.Image::getHtml($icon, $label).'</a> ';\r\n\t\t}\r\n\t\t\r\n\t}", "function RenderEditRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// gjd_id\n\t\t$this->gjd_id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->gjd_id->EditCustomAttributes = \"\";\n\t\t$this->gjd_id->EditValue = $this->gjd_id->CurrentValue;\n\t\t$this->gjd_id->ViewCustomAttributes = \"\";\n\n\t\t// gjm_id\n\t\t$this->gjm_id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->gjm_id->EditCustomAttributes = \"\";\n\t\tif ($this->gjm_id->getSessionValue() <> \"\") {\n\t\t\t$this->gjm_id->CurrentValue = $this->gjm_id->getSessionValue();\n\t\t$this->gjm_id->ViewValue = $this->gjm_id->CurrentValue;\n\t\t$this->gjm_id->ViewCustomAttributes = \"\";\n\t\t} else {\n\t\t$this->gjm_id->EditValue = $this->gjm_id->CurrentValue;\n\t\t$this->gjm_id->PlaceHolder = ew_RemoveHtml($this->gjm_id->FldCaption());\n\t\t}\n\n\t\t// peg_id\n\t\t$this->peg_id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->peg_id->EditCustomAttributes = \"\";\n\n\t\t// b_mn\n\t\t$this->b_mn->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_mn->EditCustomAttributes = \"\";\n\t\t$this->b_mn->EditValue = $this->b_mn->CurrentValue;\n\t\t$this->b_mn->PlaceHolder = ew_RemoveHtml($this->b_mn->FldCaption());\n\n\t\t// b_sn\n\t\t$this->b_sn->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_sn->EditCustomAttributes = \"\";\n\t\t$this->b_sn->EditValue = $this->b_sn->CurrentValue;\n\t\t$this->b_sn->PlaceHolder = ew_RemoveHtml($this->b_sn->FldCaption());\n\n\t\t// b_sl\n\t\t$this->b_sl->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_sl->EditCustomAttributes = \"\";\n\t\t$this->b_sl->EditValue = $this->b_sl->CurrentValue;\n\t\t$this->b_sl->PlaceHolder = ew_RemoveHtml($this->b_sl->FldCaption());\n\n\t\t// b_rb\n\t\t$this->b_rb->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_rb->EditCustomAttributes = \"\";\n\t\t$this->b_rb->EditValue = $this->b_rb->CurrentValue;\n\t\t$this->b_rb->PlaceHolder = ew_RemoveHtml($this->b_rb->FldCaption());\n\n\t\t// b_km\n\t\t$this->b_km->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_km->EditCustomAttributes = \"\";\n\t\t$this->b_km->EditValue = $this->b_km->CurrentValue;\n\t\t$this->b_km->PlaceHolder = ew_RemoveHtml($this->b_km->FldCaption());\n\n\t\t// b_jm\n\t\t$this->b_jm->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_jm->EditCustomAttributes = \"\";\n\t\t$this->b_jm->EditValue = $this->b_jm->CurrentValue;\n\t\t$this->b_jm->PlaceHolder = ew_RemoveHtml($this->b_jm->FldCaption());\n\n\t\t// b_sb\n\t\t$this->b_sb->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->b_sb->EditCustomAttributes = \"\";\n\t\t$this->b_sb->EditValue = $this->b_sb->CurrentValue;\n\t\t$this->b_sb->PlaceHolder = ew_RemoveHtml($this->b_sb->FldCaption());\n\n\t\t// l_mn\n\t\t$this->l_mn->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_mn->EditCustomAttributes = \"\";\n\t\t$this->l_mn->EditValue = $this->l_mn->CurrentValue;\n\t\t$this->l_mn->PlaceHolder = ew_RemoveHtml($this->l_mn->FldCaption());\n\n\t\t// l_sn\n\t\t$this->l_sn->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_sn->EditCustomAttributes = \"\";\n\t\t$this->l_sn->EditValue = $this->l_sn->CurrentValue;\n\t\t$this->l_sn->PlaceHolder = ew_RemoveHtml($this->l_sn->FldCaption());\n\n\t\t// l_sl\n\t\t$this->l_sl->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_sl->EditCustomAttributes = \"\";\n\t\t$this->l_sl->EditValue = $this->l_sl->CurrentValue;\n\t\t$this->l_sl->PlaceHolder = ew_RemoveHtml($this->l_sl->FldCaption());\n\n\t\t// l_rb\n\t\t$this->l_rb->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_rb->EditCustomAttributes = \"\";\n\t\t$this->l_rb->EditValue = $this->l_rb->CurrentValue;\n\t\t$this->l_rb->PlaceHolder = ew_RemoveHtml($this->l_rb->FldCaption());\n\n\t\t// l_km\n\t\t$this->l_km->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_km->EditCustomAttributes = \"\";\n\t\t$this->l_km->EditValue = $this->l_km->CurrentValue;\n\t\t$this->l_km->PlaceHolder = ew_RemoveHtml($this->l_km->FldCaption());\n\n\t\t// l_jm\n\t\t$this->l_jm->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_jm->EditCustomAttributes = \"\";\n\t\t$this->l_jm->EditValue = $this->l_jm->CurrentValue;\n\t\t$this->l_jm->PlaceHolder = ew_RemoveHtml($this->l_jm->FldCaption());\n\n\t\t// l_sb\n\t\t$this->l_sb->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->l_sb->EditCustomAttributes = \"\";\n\t\t$this->l_sb->EditValue = $this->l_sb->CurrentValue;\n\t\t$this->l_sb->PlaceHolder = ew_RemoveHtml($this->l_sb->FldCaption());\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function setCellAttribute($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t\treturn $this;\n\t}", "function setCellAttribute($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t\treturn $this;\n\t}", "private function setButtons()\n {\n $this->createFolderButton = config('godesk.filemanager.buttons.create_folder', true);\n $this->uploadButton = config('godesk.filemanager.buttons.upload_button', true);\n $this->dragAndDropUpload = config('godesk.filemanager.buttons.upload_drag', true);\n $this->renameFolderButton = config('godesk.filemanager.buttons.rename_folder', true);\n $this->deleteFolderButton = config('godesk.filemanager.buttons.delete_folder', true);\n $this->renameFileButton = config('godesk.filemanager.buttons.rename_file', true);\n $this->deleteFileButton = config('godesk.filemanager.buttons.delete_file', true);\n $this->downloadFileButton = config('godesk.filemanager.buttons.download_file', true);\n }", "public function setAttrs($attrs);", "public function getActionButtonsAttribute()\n {\n return $this->getEditButtonAttribute(\"business_settings\", \"biller.transactioncategories.edit\").'\n '.$this->getDeleteButtonAttribute(\"business_settings\", \"biller.transactioncategories.destroy\").'\n ';\n }", "public function preRenderForm(array $form) {\n foreach (Element::children($form['buttons']) as $child) {\n // The 1 is the cell number where we insert the button.\n $form['table']['#rows'][$child][1] = [\n 'data' => $form['buttons'][$child]\n ];\n unset($form['buttons'][$child]);\n }\n\n return $form;\n }", "public static function createEdTablebutton($table='no_table_provided',$id=0){\n\t\tif(empty($id)) return \"<span>xEdx</span>\";\n\t\treturn \"<button type='button' class='btn_edit' onclick='btnEditTableItem(\\\"{$table}\\\",{$id});'>edit</button>\";\n\t}", "function posts_link_attributes() {\n return 'class=\"btn btn-primary\"';\n}", "public function setup_table($table)\n\t{\n\t\t$table->add_column('title', array('head' => 'Title', 'class' => 'col-lg-4'));\n\t\t$table->add_column('stock_type', array('head' => 'Stock', 'class' => 'col-lg-2'));\n\t\t$table->add_column('stock_cap', array('head' => 'Stock cap', 'class' => 'col-lg-2'));\n\t\t$table->add_column('status', array('head' => 'Status', 'class' => 'col-lg-2'), true, false);\n\t\t$table->add_button('stock-item', 'fa fa-lemon-o', 'primary', 'after', 'edit');\n\n\t\treturn $table;\n\t}", "public function submitButton(){\n\t\t\n\t\t$this->addElement('button', 'bttnsubmit', array (\n\t\t\t\t'class' => 'btn blue ',\n\t\t\t\t'ignore'=>true,\n\t\t\t\t'type'=>'submit',\n \t\t\t\t'label'=>'<i class=\"fa fa-check\"></i> Save',\n\t\t\t\t'escape'=>false\n\t\t));\n\t\t$this->bttnsubmit->setDecorators(array('ViewHelper',array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' =>'form-actions text-right'))\t));\n\t\t\n\t}", "public function setAtributos($atributos)\n {\n $this->atributos = collect($atributos)->map(function ($item) {\n return [\"atributo_id\" => $item];\n });\n }", "private function _getFormattedSelectButtonAttributes( $sInputID, array $aButtonAttributes, $_bIsLabelSet ) {\r\n \r\n $_aAttributes = array(\r\n 'id' => \"select_path_{$sInputID}\",\r\n 'href' => \"#TB_inline?width=600&height=550&inlineId=path_selector_{$sInputID}\",\r\n ) \r\n + $aButtonAttributes\r\n + array(\r\n 'title' => $_bIsLabelSet \r\n ? $aButtonAttributes[ 'data-label' ]\r\n : __( 'Select Path', 'fen-field-type-pack' ),\r\n 'data-label' => null,\r\n );\r\n $_aAttributes['class'] = $this->getClassAttribute( \r\n 'thickbox select_path button button-small ',\r\n $this->getAOrB(\r\n trim( $aButtonAttributes['class'] ),\r\n $aButtonAttributes['class'],\r\n $this->getAOrB( \r\n ! $_bIsLabelSet && version_compare( $GLOBALS[ 'wp_version' ], '3.8', '>=' ),\r\n 'dashicons dashicons-portfolio',\r\n ''\r\n )\r\n )\r\n ); \r\n return $_aAttributes;\r\n \r\n }", "protected function _setAddButton()\n {\n $this->setChild('add_button',\n $this->getLayout()->createBlock('adminhtml/widget_button')\n ->setData(array('id' => \"add_tax_\" . $this->getElement()->getHtmlId(),\n 'label' => Mage::helper('catalog')->__('Add Tax'),\n 'onclick' => \"weeeTaxControl.addItem('\" . $this->getElement()->getHtmlId() . \"')\",\n 'class' => 'add'\n )));\n }", "private function ToolButton($image, $text, $url, $attributes, $td_attributes = null)\r\n\t\t{\r\n\t\t\tglobal $current_controller;\r\n\t\t\techo \"<td class = '$this->toolButtonCellCssClass' $td_attributes>\";\r\n\t\t\tif ((!isset($url))&&(empty($url)))\r\n\t\t\t\techo \"<a onmouseover='this.style.cursor=\\\"pointer\\\"' $attributes class = '$this->toolButtonLinkCssClass' style = 'background-image: url(/./app/themes/\".$current_controller->theme.\"/images/\".$image.\");background-repeat: no-repeat; background-position:left top;'>$text</a>\";\r\n\t\t\telse echo $this->link($url, $text, \"$attributes class = '$this->toolButtonLinkCssClass' style = 'background-image: url(/./app/themes/\".$current_controller->theme.\"/images/\".$image.\");background-repeat: no-repeat; background-position:left top;'\");\r\n\t\t\techo \"</td>\";\r\n\t\t}", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "public function setTagTableData($open, $close) {\n\t\t$this->td['open'] = $open;\n\t\t$this->td['close'] = $close;\n\t}", "protected function _getSettingsButtonHtmlWithValue(\\Magento\\Framework\\DataObject $row, $value)\n {\n $buttonLabel = __(\"Settings\");\n\n $html = \"<button id='attribute_settings' data-bind='click: function(){ openSettings({$row->getGridIndex()}); }' data-action='open-attribute-settings' class='primary add'>{$buttonLabel}</button>\";\n return $html;\n }", "function initialize () {\n $this->set_openingtag ( \"<TR[attributes]>\" );\n\t$this->set_closingtag ( \"</TR>\" );\n }", "public function attr() {\n\t\t\t\t$attr = [\n\t\t\t\t\t'class' => 'fusion-content-tb fusion-content-tb-' . $this->counter,\n\t\t\t\t\t'style' => '',\n\t\t\t\t];\n\n\t\t\t\t$attr = fusion_builder_visibility_atts( $this->args['hide_on_mobile'], $attr );\n\n\t\t\t\tif ( $this->args['animation_type'] ) {\n\t\t\t\t\t$attr = Fusion_Builder_Animation_Helper::add_animation_attributes( $this->args, $attr );\n\t\t\t\t}\n\n\t\t\t\t$attr['style'] .= Fusion_Builder_Margin_Helper::get_margins_style( $this->args );\n\n\t\t\t\tif ( $this->args['class'] ) {\n\t\t\t\t\t$attr['class'] .= ' ' . $this->args['class'];\n\t\t\t\t}\n\n\t\t\t\tif ( $this->args['id'] ) {\n\t\t\t\t\t$attr['id'] = $this->args['id'];\n\t\t\t\t}\n\n\t\t\t\treturn $attr;\n\t\t\t}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "function clients_addAttribute($table_identifier,$attributeid=null) {\n\tglobal $Auth,$gSession;\n\n\t## get the template for now\n\t$select_template = new Template('interface/');\n\t$select_template->set_templatefile(array(\"header\" => \"add_attribute.tpl\",\"body\" => \"add_attribute.tpl\",\"footer\" => \"add_attribute.tpl\"));\n\n\t## first check if we got a attribute-id\n\tif(isset($attributeid)) {\n\t\t## okay we need to edit the supplied attribute\n\t\t$db_connection = new DB_Sql();\n\t\t$query = \"SELECT text FROM \".DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].\"_\".$table_identifier.\" WHERE id='\".$attributeid.\"'\";\n\t\t$result_pointer = $db_connection->query($query);\n\t\t$db_connection->next_record();\n\t\t\n\t\t$attribute_value = $db_connection->Record[\"text\"];\n\t\t$select_template->set_var('value',$attribute_value);\n\t}\n\n\t## this is for storing and deleting a new value\n\t$actionURL = \"editor.php\";\n\t$actionURL = $gSession->url($actionURL);\n\t$select_template->set_var('actionURL',$actionURL);\n\t\n\t## prepare the language stuff\n\t$select_template->set_var(\"backIMG\",\"lang/\".$Auth->auth[\"language\"].\"_button_cancel.gif\");\n\t$select_template->set_var(\"saveIMG\",\"lang/\".$Auth->auth[\"language\"].\"_button_save.gif\");\n\t$select_template->set_var('language_header',LANG_MODULE_CLIENTS_AttributeTitle);\n\t$select_template->set_var('language_description',LANG_MODULE_CLIENTS_AttributeDesc);\n\t$select_template->set_var('NewEntry',LANG_MODULE_CLIENTS_AttributeNewEntry);\n\t\n\t## output the lang\n\t$select_template->set_var('LANG',$Auth->auth[\"language\"]);\n\t\t\t\n\t## here we initialize the hiddenfields\t\n\t$output = '<input type=\"hidden\" name=\"op\" value=\"save\">';\n\t$output .= '<input type=\"hidden\" name=\"attribute\" value=\"'.$table_identifier.'\">';\n\t$output .= '<input type=\"hidden\" name=\"attribute_id\" value=\"'.$attributeid.'\">';\n\t$output .= '<input type=\"hidden\" name=\"Session\" value=\"'.$gSession->id.'\">';\n\t$output .= \t'<input type=\"hidden\" name=\"source\" value=\"'.$GLOBALS['_MODULE_DATAOBJECTS_NAME'].'\">';\n\t$select_template->set_var(\"hiddenfields\",$output);\n\t\n\t## and finally flush the footer\n\t$select_template->pfill_block(\"header\");\n\t$select_template->pfill_block(\"body\");\n\t$select_template->pfill_block(\"footer\");\n\n\t\n\t## finally we return the positive value\n\treturn $return_value;\n}", "public function setViaTableAttributesValue($value);", "function _field_button($fval)\n {\n $res = \"\";\n if (isset($this->attribs['disable_self_onclick'])) {\n $this->extra_attribs .= 'onclick=\"this.disabled=true; this.value=\\'please wait...\\'\"';\n }\n\n $res .= sprintf(\"<input type=\\\"button\\\" name=\\\"%s\\\" id=\\\"%s\\\" value=\\\"%s\\\" class=\\\"%s\\\" %s />\\n\",\n $this->fname,\n $this->fname,\n $this->_htmlentities($this->descrip),\n (isset($this->attribs['class']))? $this->attribs['class'] : $this->element_class,\n $this->extra_attribs);\n return $res;\n }", "public function html() {\n $table = $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '250px'])\n ->parameters([\n 'dom' => 'Bfrtip',\n 'buttons' => [\n ['extend' => 'create', 'className' => 'btn btn-success', 'text' => 'Create User', 'init' => 'function(api, node, config) {\n $(node).removeClass(\"dt-button buttons-create btn-default\")\n }']\n ],\n 'select' => true,\n 'initComplete' => 'function () {\n var r = $(\"#datatable-buttons tfoot tr\");\n $(\"#datatable-buttons thead\") . append(r);\n this.api().columns([0,1,2,3]).every(function () {\n var column = this; \n var input = document . createElement(\"input\");\n $(input).addClass(\"form-control input-lg col-xs-12\");\n $(input).appendTo($(column.footer()).empty())\n .on(\"change\", function () {\n\n column.search($(this).val(), false, false, true).draw();\n });\n });\n }',\n ]);\n return $table;\n }", "function backend_ctr_button($caption, $button_class, $attributes = array(), $ajaxHandler=null, $ajaxParams = null, $formElement = null)\n\t{\n\t\treturn Backend_Html::ctr_button($caption, $button_class, $attributes, $ajaxHandler, $ajaxParams, $formElement);\n\t}" ]
[ "0.5834517", "0.5720483", "0.57074565", "0.55786395", "0.5570131", "0.5531497", "0.5462197", "0.5442811", "0.5442811", "0.5427319", "0.53662515", "0.5363505", "0.5363505", "0.53543967", "0.5331065", "0.52888775", "0.527464", "0.5266644", "0.52394706", "0.52268016", "0.5225646", "0.5214467", "0.52063215", "0.51902235", "0.5173941", "0.5169089", "0.5138877", "0.51346755", "0.5103903", "0.5087047", "0.5083692", "0.5064278", "0.5051381", "0.5011275", "0.5010027", "0.49958944", "0.4956913", "0.4949785", "0.49465755", "0.49396253", "0.49273825", "0.4925366", "0.4918849", "0.49057323", "0.48951578", "0.48923364", "0.48820734", "0.48779532", "0.48765153", "0.4873561", "0.48684418", "0.48638836", "0.48615548", "0.48603296", "0.48592734", "0.48514065", "0.48484612", "0.484427", "0.4837252", "0.48288184", "0.48288184", "0.48274842", "0.48252425", "0.4815167", "0.48100212", "0.4799146", "0.47937024", "0.4780244", "0.47753033", "0.47679606", "0.47665069", "0.47625452", "0.4762164", "0.47582218", "0.4756543", "0.47565386", "0.47549617", "0.47512075", "0.47470155", "0.47470155", "0.47470155", "0.47470155", "0.47470155", "0.47470155", "0.47470155", "0.47470155", "0.47469336", "0.47469336", "0.47469336", "0.47469336", "0.47469336", "0.47452238", "0.47452238", "0.47452238", "0.47452238", "0.47378886", "0.47326487", "0.47291207", "0.47274864", "0.47272614" ]
0.64959556
0
Set the form table headers
public function set_headers($headers) { if (is_array($headers)) { $this->headers = $headers; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getHeaders(){\n\t\t$thead=\"\";\n\t\tif(!empty($this->headers)){\n\t\t\t$thead=\"<thead>\";\n\t\t\t$thead.=\"<tr>\";\n\t\t\t$headerNumber=0;\n\t\t\t$fieldNumber=0;\n\t\t\t$count=count($this->headers)-1;\n\t\t\t\n\t\t\t//Busca si hay columnas anteriores a agregar\n\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Busca las columnas declaradas\n\t\t\tforeach($this->headers as $name){\n\t\t\t\tif($this->headerSortable){\n\t\t\t\t\tif($this->order!==\"\"&&!empty($this->order)){\n\t\t\t\t\t\t$order=explode('|',$this->order);\n\t\t\t\t\t\tif(is_array($order)&&$fieldNumber==$order[0]){\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-\".$order[1];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header class=\\\"$classSortable\\\" onclick=\\\"javascript:{$this->id}Reorder($fieldNumber);\\\" {$this->id}_field_number=\\\"$fieldNumber\\\">$name</th>\";\n\t\t\t\t}else{\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header>$name</th>\";\n\t\t\t\t}\n\t\t\t\t$fieldNumber++;\n\t\t\t\t$headerNumber++;\n\t\t\t}\n\t\t\t\n\t\t\t//Busca si hay columnas posteriores a agregar\n\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"</tr>\";\n\t\t\t\n\t\t\t//Guardamos el numero total de columnas\n\t\t\t$this->cols=$headerNumber;\n\t\t\t\n\t\t\t\n\t\t\t$tfilter=\"\";\n\t\t\t$type=\"\";\n\t\t\tif($this->headerFilterable){\n\t\t\t\t$cols=count($this->fields)-1;\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<=$cols;$i++){\n\t\t\t\t\t$meClass=velkan::$config[\"datagrid\"][\"filters\"][\"inputClass\"];\n\t\t\t\t\t\n\t\t\t\t\t$type=\"\";\n\t\t\t\t\tif(!empty($this->types)){\n\t\t\t\t\t\t$type=$this->types[$i];\n\t\t\t\t\t}\n\t\t\t\t\t$value=\"\";\n\t\t\t\t\tif(!empty($this->filters)){\n\t\t\t\t\t\tforeach($this->filters as $filter){\n\t\t\t\t\t\t\tif($filter[0]==$i){\n\t\t\t\t\t\t\t\t$value=$filter[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tfilter.=\"<th class='velkan-grid-column-filter'>\";\n\t\t\t\t\t\n\t\t\t\t\tswitch($type){\n\t\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATE));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"datetime\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATETIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"time\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_TIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$tfilter.=\"<input type='search' name='grid{$this->id}Filter[]' $type value=\\\"$value\\\">\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$tfilter.=\"</th>\";\n\t\t\t\t}\n\t\t\t\t$display=($this->ShowFilters?\"\":\"style='display:none'\");\n\t\t\t\t\n\t\t\t\t$filterPrepend=\"\";\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$filterPrepend.=\"<th>&nbsp;</th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filterAppend=\"\";\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$filterAppend.=\"<th>&nbsp;</th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tfilter=\"<tr id='grid{$this->id}Filters' $display>{$filterPrepend}{$tfilter}{$filterAppend}</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($type!=\"\"){\n\t\t\t\t$jss=new generalJavaScriptFunction();\n\t\t\t\t$jss->registerFunction(\"applyFormats\");\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"$tfilter</thead>\";\n\t\t}\n\t\t\n\t\treturn $thead;\n\t}", "function headers()\n {\n // Maintain URL params for pagination\n if (empty($this->params['pass'])) {\n $this->params['pass'] = array();\n }\n $options = array(\n 'url' => array_merge($this->tableOptions['url'], $this->params['named'], $this->params['pass']),\n //'model' => $this->defaultModel\n );\n if (!empty($this->tableOptions['ajax'])) {\n $options['update'] = $this->tableOptions['ajax']['mh-update'];\n $options['indicator'] = $this->tableOptions['ajax']['mh-indicator'];\n $options['before'] = $this->Js->get($options['indicator'])->effect('fadeIn', array('buffer' => false));\n $options['complete'] = $this->Js->get($options['indicator'])->effect('fadeOut', array('buffer' => false));\n }\n\n\n $this->Paginator->options($options);\n\n $lines = array();\n foreach ($this->Columns as $field => $Column) {\n $lines[] = $headerHTML[] = $Column->header();\n }\n\n $row = $this->Html->tag('tr', implode(chr(10), $lines));\n\n return $this->Html->tag('thead', $row);\n }", "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 }", "private function setTableHeader($row){\n\t\t$header_data=false;\n\t\tif($this->header){\n\t\t\t$header_data=$this->header;\n\t\t}\n\t\telse{\n\t\t\tif(!empty($row) && is_array($row) && count($row)){\n\t\t\t\tforeach($row as $i => $v){\n\t\t\t\t\t$header_data[$i]=$i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!empty($header_data)){\n\t\t\t$this->table_header.=_N_T.'<tr>';\n\t\t\t$this->table_header.=_N_T_T.'<th class=\"th.LineNum\">#</th>';\n\t\t\tforeach($header_data as $name => $value){\n\t\t\t\t$this->table_header.=_N_T_T.'<th nowrap=\"nowrap\">'.$value.$this->getOrderBy($name).'</th>';\n\t\t\t}\n\t\t\t$this->table_header.=_N_T.'</tr>';\n\t\t}\n\t\treturn $this;\n\t}", "private function buildHeader()\n\t{\n\t\tif ($this->hide_header)\n\t\t\treturn;\n\n\t\techo '<thead><tr>';\n\n\t\t// Get field names of result\n\t\t$headers = $this->_db->fieldNameArray($this->result);\n\t\t$this->column_count = count($headers);\n\n\t\t// Add a blank column if the row number is to be shown\n\t\tif ($this->show_row_number)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\">&nbsp;</td>';\n\t\t}\n\n\t\t// Show checkboxes\n\t\tif ($this->show_checkboxes)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header tbl-checkall\"><input type=\"checkbox\" name=\"checkall\" onclick=\"tblToggleCheckAll'.$this->_clsnumber.'()\"></td>';\n\t\t}\n\n\t\t// Loop through each header and output it\n\t\tforeach ($headers as $t)\n\t\t{\n\t\t\t// Skip column if hidden\n\t\t\tif (in_array($t, $this->hidden))\n\t\t\t{\n\t\t\t\t$this->column_count--;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check for header caption overrides\n\t\t\tif (array_key_exists($t, $this->header))\n\t\t\t\t$header = $this->header[$t];\n\t\t\telse\n\t\t\t\t$header = $t;\n\n\t\t\tif ($this->hide_order)\n\t\t\t\techo '<td class=\"tbl-header\">' . $header; // Prevent the user from changing order\n\t\t\telse {\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\t$order = ($this->order['Order'] == self::ORDER_ASC)\n\t\t\t\t\t? self::ORDER_DESC\n\t\t\t\t\t: self::ORDER_ASC;\n\t\t\t\telse\n\t\t\t\t\t$order = self::ORDER_ASC;\n\n\t\t\t\techo '<td class=\"tbl-header\"><a href=\"javascript:;\" onclick=\"tblSetOrder'.$this->_clsnumber.'(\\'' . $t . '\\', \\'' . $order . '\\')\">' . $header . \"</a>\";\n\n\t\t\t\t// Show the user the order image if set\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\techo '&nbsp;<img src=\"images/sort_' . strtolower($this->order['Order']) . '.gif\" class=\"tbl-order\">';\n\t\t\t}\n\n\t\t\t// Add filters if allowed and only if the column type is not \"special\"\n\t\t\tif ($this->allow_filters and !empty($t)){\n\t\t\t\t\t\n\t\t\t\tif (!in_array($this->type[$t][0], array(\n\t\t\t\t\t\tself::TYPE_ARRAY,\n\t\t\t\t\t\tself::TYPE_IMAGE,\n\t\t\t\t\t\tself::TYPE_FUNCTION,\n\t\t\t\t\t\tself::TYPE_DATE,\n\t\t\t\t\t\tself::TYPE_CHECK,\n\t\t\t\t\t\tself::TYPE_CUSTOM,\n\t\t\t\t\t\tself::TYPE_PERCENT\n\t\t\t\t)))\n\t\t\t\t{\n\t\t\t\t\tif ($this->filter['Column'] == $t and !empty($this->filter['Value']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter_display = 'block';\n\t\t\t\t\t\t$filter_value = $this->filter['Value'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$filter_display = 'none';\n\t\t\t\t\t\t$filter_value = '';\n\t\t\t\t\t}\n\t\t\t\t\techo '<a href=\"javascript:;\" onclick=\"tblShowHideFilter'. $this->_clsnumber .'(\\'' . $t . '\\')\"> filter </a>\n\t\t\t\t\t<br><div class=\"tbl-filter-box\" id=\"'.$this->_clsnumber.'filter-' . $t . '\" style=\"display:' . $filter_display . '\">\n\t\t\t\t\t<input type=\"text\" size=\"6\" id=\"'.$this->_clsnumber.'filter-value-' . $t . '\" value=\"'.$filter_value.'\">&nbsp;\n\t\t\t\t\t<a href=\"javascript:;\" onclick=\"tblSetFilter'.$this->_clsnumber.'(\\'' . $t . '\\')\">filter</a></div>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\techo '</td>';\n\t\t}\n\n\t\t// If we have controls, add a blank column\n\t\tif (count($this->controls) > 0)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\">&nbsp;</td>';\n\t\t}\n\n\t\techo '</tr></thead>';\n\t}", "function Table_Headers($header,$w)\r\n{\r\n //Colors, line width and bold font\r\n $this->SetFillColor(153,153,153);\r\n $this->SetTextColor(0);\r\n $this->SetDrawColor(128,0,0);\r\n $this->SetLineWidth(.3);\r\n $this->SetFont('Arial','B','7');\r\n\t\r\n //Header\r\n\t\r\n\t//Output table header\r\n for($i=0;$i<count($header);$i++)\r\n $this->Cell($w[$i],5,$header[$i],1,0,'C',1);\r\n $this->Ln();\r\n}", "public function auto_build_list_thead(){\r\n\t\t$list_thead = \"<thead>\".\r\n\t\t\t\"<tr>\" .\r\n\t\t\t\"<th>#</th>\";\r\n\r\n\t\tforeach ($this->model->table_fields as $list_field)\r\n\t\t\tif ($list_field->get_visible_grid())\r\n\t\t\t\t$list_thead .= \"<th class='th-sm' >\" . ($list_field->get_label()) . \"</th>\";\r\n\r\n\t\treturn $list_thead . \"<th class='text-center'>Accion</th>\" .\r\n\t\t\t\"</tr>\" .\r\n\t\t\t\"</thead>\";\r\n\t}", "function tablethead_open() {\n $this->doc .= DOKU_TAB.'<thead>'.DOKU_LF;\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}", "protected function getTableHeader() {\n /** @var \\Drupal\\webform\\WebformInterface $webform */\n $webform = $this->getEntity();\n $header = [];\n $header['title'] = $this->t('Title');\n\n $header['key'] = [\n 'data' => $this->t('Key'),\n 'class' => [RESPONSIVE_PRIORITY_LOW],\n ];\n $header['type'] = [\n 'data' => $this->t('Type'),\n 'class' => [RESPONSIVE_PRIORITY_LOW],\n ];\n $header['correct_answer'] = $this->t('Answer');\n $header['weight'] = $this->t('Weight');\n $header['operations'] = $this->t('Operations');\n// $header['answer'] = [\n// 'data' => $this->t('Answer'),\n// 'class' => [RESPONSIVE_PRIORITY_LOW],\n// ];\n//\n// $header['required'] = [\n// 'data' => $this->t('Required'),\n// 'class' => ['webform-ui-element-required', RESPONSIVE_PRIORITY_LOW],\n// ];\n// $header['parent'] = $this->t('Parent');\n// $header['operations'] = [\n// 'data' => $this->t('Operations'),\n// 'class' => ['webform-ui-element-operations'],\n// ];\n return $header;\n }", "private function setHeader($data)\n {\n $this->headers = array_map('self::formatString', $data[0]);\n array_unshift($this->headers, 'row');\n }", "public function getTableHeaders()\n {\n return ['#', 'Fatura','Ordem Servico'];\n }", "function Header()\r\n{\r\n if($this->ProcessingTable)\r\n $this->TableHeader();\r\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}", "public function __Header(){\n $this->Ln(5);\n $this->SetDrawColor(160,160,160);\n $this->SetFillColor(230,230,230);\n $this->SetTextColor(100);\n $this->SetFont('Arial','B',7);\n $this->SetX(($this->w - $this->_tWidth)/2);\n foreach($this->_fields as $field)\n $this->Cell($field[\"size\"],5,$field[\"header\"],1,0,\"C\",true);\n $this->Ln();\n }", "public function setColumnsHeadData()\n\t{\n\t\tFileStorage::getInstance()->store([], 'league_table_columns_head');\n\t}", "private function makeTableHeader($type,$header,$colspan=2): void {\r\n\t\tif(!$this->bInitialized) {\r\n\t\t\t$header = ' (' . $header . ') ';\r\n\t\t\t$this->bInitialized = true;\r\n\t\t}\r\n\t\t$str_i = ($this->bCollapsed) ? 'style=\"font-style:italic\" ' : '';\r\n\t\t\r\n\t\techo '<table class=\"dBug_table dBug_'.$type.'\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th '.$str_i.' class=\"dBug_clickable_table dBug_' . $type . 'Header\" colspan=\"' . $colspan . '\">' . $header . '</th>\r\n\t\t\t\t</tr>';\r\n\t}", "protected function setHeaders(): void\n {\n if (empty($this->headers) === false || empty($this->data) === true) {\n return;\n }\n\n $headers = array_keys(reset($this->data));\n\n array_walk($headers, fn(&$header) => $header = ucwords(str_replace(\"_\", \" \", $header)));\n\n $this->headers = $headers;\n }", "public function getTableHeaders()\n {\n return ['#', 'Autor', 'Título', 'Subtítulo', 'Preço', 'Categorias'];\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}", "function setHeadings($headings){\n\t\t\tglobal $tableHeadings;\n\t\t\t\n\t\t\t$tableHeadings = $headings;\n\t\t\t\n\t\t}", "function setHeadings($headings){\n\t\t\tglobal $tableHeadings;\n\t\t\t\n\t\t\t$tableHeadings = $headings;\n\t\t\t\n\t\t}", "public function getInputHeaders()\n {\n }", "public static function formhead(){\n\n $forms = \"<div class='limiter'>\";\n $forms .= \"<div class='container-table100'>\" ;\n $forms .= \"<div class='wrap-table100'>\";\n $forms .= \"<div class='table100 ver1 m-b-110'> \";\n $forms .= \"<div class='table100-head'> \";\n $forms .= \"<table><thead>\\n<tr class='row100 head'>\\n\";\n return $forms;\n\n }", "private function buildHeader()\n {\n $month_name = $this->monthLabels[$this->month - 1] . ' ' . $this->year;\n $vclass = strtolower($this->view);\n $h = \"<table class='\" . $this->tableClass . \" \" . $vclass . \"'>\";\n $h .= \"<thead>\";\n $h .= \"<tr class='\" . $this->headClass . \"'>\";\n $cs = 5;\n if ($this->view == 'week' || $this->view == 'day') {\n $h .= \"<th>&nbsp;</th>\";\n }\n if ($this->view == 'day') {\n $cs = 1;\n }\n\n if ($this->nav) {\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->prevClass . \"' href='\" . $this->prevLink() . \"'>\" . $this->prevIco . \"</a>\";\n $h .= \"</th>\";\n $h .= \"<th colspan='$cs'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->nextClass . \"' href='\" . $this->nextLink() . \"'>\" . $this->nextIco . \"</a>\";\n $h .= \"</th>\";\n } else {\n $h .= \"<th colspan='7'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n }\n $h .= \"</tr>\";\n $h .= \"</thead>\";\n\n $h .= \"<tbody>\";\n if ($this->view != 'day' && $this->view != 'week') {\n $h .= \"<tr class='\" . $this->labelsClass . \"'>\";\n\n for ($i = 0; $i <= 6; $i++) {\n $h .= \"<td>\";\n $h .= $this->dayLabels[$i];\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n }\n if ($this->view == 'day' || $this->view == 'week') {\n $h .= self::getWeekDays();\n }\n\n $this->html .= $h;\n }", "function drawHeader(){\n switch ($this->doing){\n case 'budget_byProjects':\n case 'myguests':\n if (!(@$this->t instanceof b_table)){\n\t$this->dbg('CANCEL header');\n\t$this->t = new b_table_dummy();\n }\n break;\n\n default:\n parent::drawHeader();\n break;\n }\n }", "public function setHeader($array) {\n $this->colName= $array;\n $this->headerWritten= FALSE;\n }", "public function setTableHead($tableHead)\n {\n $i = 0;\n foreach ($tableHead as $head) {\n $this->tableHead[$i] = $head;\n $i++;\n }\n $rows = $i;\n $this->setTableColumns($rows);\n\n }", "function Header()\n\t{\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','C');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->MultiCell(190,5,tipo_serv(),'0','C');\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->MultiCell(190,7,strtoupper(_('listado de clientes para cortes')),'0','C');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(133);\n\t\t$this->Cell(12,5,strtoupper(_('fecha')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,strtoupper(_('hora')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t$this->Ln();\t\t\n\t}", "function constructTableHead() {\n\n $header = '<tr><th>Country</th>';\n if (isset($_GET['pop'])) {\n $header .= '<th>Total Population</th>';\n }\n if (isset($_GET['birth'])) {\n $header .= '<th>Birth Rate</th>';\n }\n if (isset($_GET['death'])) {\n $header .= '<th>Death Rate</th>';\n }\n\n $header .= '</tr>';\n return $header;\n }", "function reOrderColumnHeaders() {\n\n }", "public static function get_edit_table_headers() {\n\n $headerdata = array();\n $headerdata[] = get_string('sequence', 'mod_simplelesson');\n $headerdata[] = get_string('pagetitle', 'mod_simplelesson');\n $headerdata[] = get_string('prevpage', 'mod_simplelesson');\n $headerdata[] = get_string('nextpage', 'mod_simplelesson');\n $headerdata[] = get_string('hasquestion', 'mod_simplelesson');\n $headerdata[] = get_string('actions', 'mod_simplelesson');\n\n return $headerdata;\n }", "protected function getTableHeader() {\n $newDirection = ($this->sortDirection == 'asc') ? 'desc' : 'asc';\n\n $tableHeaderData = array(\n 'title' => array(\n 'link' => $this->getLink('title', ($this->sortField == 'title') ? $newDirection : $this->sortDirection),\n 'name' => 'Title',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n 'document_type' => array(\n 'link' => $this->getLink('type', $this->sortField == 'document_type' ? $newDirection : $this->sortDirection),\n 'name' => 'Type',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n 'date' => array(\n 'link' => $this->getLink('date', $this->sortField == 'date' ? $newDirection : $this->sortDirection),\n 'name' => 'Date',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n );\n\t\t\n // insert institution field in 3rd column, if this is search results\n if($this->uri == 'search') {\n $tableHeaderData = array_slice($tableHeaderData, 0, 2, true) +\n array('institution' => array(\n 'link' => $this->getLink('institution', $this->sortField == 'institution' ? $newDirection : $this->sortDirection),\n 'name' => 'Institution',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n )) +\n array_slice($tableHeaderData, 2, count($tableHeaderData)-2, true);\n }\n\t\t\n return $tableHeaderData;\n }", "private function generate_columns_header($p_edit,&$p_resultat,&$p_result_header)\r\n\t\t{\r\n\t\t\t// Create a new line\r\n\t\t\t$html = '<tr id=\"tr_header_title_'.$this->c_id.'\">';\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Create the first column (checkbox and edit button)\r\n\t\t\t ====================================================================*/\t\r\n\t\t\t$html .= '<td align=\"left\" id=\"header_th_0__'.$this->c_id.'\" class=\"__'.$this->c_theme.'__cell_opt_h\"><div id=\"th0_'.$this->c_id.'\"></div></td>';\r\n\t\t\t$html .= '<td></td>';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t// Quantify of order clause\r\n\t\t\t$qtt_order = $this->get_nbr_order();\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Display the resize cursor or not\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tif($this->c_mode != __CMOD__)\r\n\t\t\t{\r\n\t\t\t\t$cursor = ' cur_resize';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$cursor = '';\r\n\t\t\t}\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Browse all columns\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t{\r\n\t\t\t\tif($val_col['display'])\r\n\t\t\t\t{\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Define order icon\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($this->c_columns[$key_col]['order_by'] != false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// An order clause is defined\r\n\t\t\t\t\t\tif($this->c_columns[$key_col]['order_by'] == __ASC__)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// ASC icon\r\n\t\t\t\t\t\t\t$class_order = ' __'.$this->c_theme.'_ico_sort-ascend __'.$this->c_theme.'_ico';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// DESC icon\r\n\t\t\t\t\t\t\t$class_order = ' __'.$this->c_theme.'_ico_sort-descend __'.$this->c_theme.'_ico';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Display the number of order only if there is more than one order clause\r\n\t\t\t\t\t\t($qtt_order > 1) ? $order_prio = $this->c_columns[$key_col]['order_priority'] : $order_prio = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// No order clause defined\r\n\t\t\t\t\t\t$class_order = '';\r\n\t\t\t\t\t\t$order_prio = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Order column\r\n\t\t\t\t\t$html .= '<td class=\"__'.$this->c_theme.'_bloc_empty'.$class_order.'\"><span class=\"__vimofy_txt_mini_ vimofy_txt_top\">'.$order_prio.'</span></td>';\r\n\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Define order icon\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($this->c_mode != __CMOD__)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$onmousedown = 'onmousedown=\"vimofy_resize_column_start('.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t\t$ondblclick = 'ondblclick=\"vimofy_mini_size_column('.$key_col.',\\''.$this->c_id.'\\');\" ';\r\n\t\t\t\t\t\t$lib_redim = $this->hover_out_lib(17,17);\r\n\t\t\t\t\t\t$event = $this->hover_out_lib(40,40).' onmousedown=\"vimofy_move_column_start(event,'.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$onmousedown = '';\r\n\t\t\t\t\t\t$ondblclick = '';\r\n\t\t\t\t\t\t$lib_redim = '';\r\n\t\t\t\t\t\t$event = $this->hover_out_lib(40,40).' onmousedown=\"click_column_order(\\''.$this->c_id.'\\','.$key_col.');\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*===================================================================*/\r\n\r\n\t\t\t\t\t// Column title\r\n\t\t\t\t\t$html .= '<td align=\"left\" class=\"__'.$this->c_theme.'__cell_h nowrap\" id=\"header_th_'.$key_col.'__'.$this->c_id.'\"><div '.$event.' class=\"align_'.$this->c_columns[$key_col]['alignment'].' __'.$this->c_theme.'_column_title\" id=\"th'.$key_col.'_'.$this->c_id.'\"><span id=\"span_'.$key_col.'_'.$this->c_id.'\">'.$this->c_columns[$key_col]['name'].'</span></div></td>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Display other column\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($p_edit != false) $html .= '<td style=\"padding:0;margin:0;\"></td>';\r\n\r\n\t\t\t\t\t$html .= '<td '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t$html .= '<td '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__sep_h'.$cursor.'\"></td>';\r\n\t\t\t\t\t$html .= '<td id=\"right_mark_'.$key_col.'_'.$this->c_id.'\" '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$html .= '</tr>';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Input for search on the column\r\n\t\t\t ====================================================================*/\t\r\n\t\t\t// Create a new line\r\n\t\t\t$html .= '<tr id=\"tr_header_input_'.$this->c_id.'\">';\r\n\t\t\t\r\n\t\t\t// Create the first column (checkbox and edit button)\r\n\t\t\t$html .= '<td align=\"left\" class=\"__'.$this->c_theme.'__cell_opt_h\"><div id=\"thf0_'.$this->c_id.'\" class=\"__'.$this->c_theme.'__vimofy_version\" onclick=\"window.open(\\'vimofy_bugs\\');\">v'.$this->c_software_version.'</div></td>';\r\n\t\t\t\r\n\t\t\t// Id column display counter\r\n\t\t\t$id_col_display = 0;\r\n\t\t\t\r\n\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Browse all columns\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t{\r\n\t\t\t\tif($val_col['display'])\r\n\t\t\t\t{\r\n\t\t\t\t\tif($id_col_display == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<td id=\"th_0_c'.$key_col.'_'.$this->c_id.'\"></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<td id=\"th_0_c'.($key_col).'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*if(isset($this->c_columns[$key_col]))\r\n\t\t\t\t\t{*/\r\n\t\t\t\t\t\t$onmousedown = 'onmousedown=\"vimofy_resize_column_start('.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t\t$ondblclick = 'ondblclick=\"vimofy_mini_size_column('.$key_col.',\\''.$this->c_id.'\\');\" ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t\t * Define the filter value\r\n\t\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\t\t$filter_input_value = '';\r\n\t\t\t\t\t\t$state_filter_input = '';\r\n\t\t\t\t\t\tif(isset($val_col['filter']['input']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// A filter was defined by the user\r\n\t\t\t\t\t\t\t$filter_input_value = $val_col['filter']['input']['filter'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// No filter was defined by the user\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Check if vimofy was in edit mode\r\n\t\t\t\t\t\t\tif($p_edit != false && !isset($val_col['rw_flag']) || ($p_edit != false && isset($val_col['rw_flag']) && $val_col['rw_flag'] != __FORBIDEN__))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// The vimofy was in edit mode, search all same value in the column\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Place the cursor on the first row of the recordset\r\n\t\t\t\t\t\t\t\tif($this->c_obj_bdd->rds_num_rows($p_result_header) > 0)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$this->c_obj_bdd->rds_data_seek($p_result_header,0);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// TODO Use a DISTINCT QUERY - Vimofy 1.0\r\n\t\t\t\t\t\t\t\t$key_cold_line = 0;\r\n\t\t\t\t\t\t\t\t$last_value = '';\r\n\t\t\t\t\t\t\t\t$flag_same = false;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\twhile($row = $this->c_obj_bdd->rds_fetch_array($p_result_header))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif($key_cold_line > 0)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif($last_value == $row[$val_col['sql_as']])\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$flag_same = true;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$flag_same = false;\r\n\t\t\t\t\t\t\t\t\t\t\t// The value is not the same of the previous, stop browsing data \r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$flag_same = true;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t$last_value = $row[$val_col['sql_as']];\r\n\t\t\t\t\t\t\t\t\t$key_cold_line = $key_cold_line + 1;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif($flag_same)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$filter_input_value = $last_value;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$filter_input_value = '';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif($p_edit != false && isset($val_col['rw_flag']) && $val_col['rw_flag'] == __FORBIDEN__)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$state_filter_input = 'disabled';\t\t\t\t\t\t\t\t\t// Disable the input because the edition of column is forbiden\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(isset($val_col['filter']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_on __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(isset($val_col['lov']) && isset($val_col['is_lovable']) && $val_col['is_lovable'] == true)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_lovable __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(isset($val_col['lov']))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_no_icon __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t\t * Menu button oncontextmenu\r\n\t\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\t\tif($this->c_type_internal_vimofy == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Principal vimofy, diplay internal vimofy\r\n\t\t\t\t\t\t\t$oncontextmenu = 'vimofy_display_internal_vim(\\''.$this->c_id.'\\',__POSSIBLE_VALUES__,'.$key_col.');return false;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Internal vimofy, doesn't display other internal vimofy\r\n\t\t\t\t\t\t\t$oncontextmenu = 'return false;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '<td id=\"th_1_c'.$key_col.'_'.$this->c_id.'\" class=\"__vimofy_unselectable\" style=\"width:20px;\"><div style=\"width:20px;margin:0;\" '.$this->hover_out_lib(21,21).' oncontextmenu=\"'.$oncontextmenu.'\" class=\"'.$class_btn_menu.'\" onclick=\"vimofy_toggle_header_menu(\\''.$this->c_id.'\\','.$key_col.');\" id=\"th_menu_'.$key_col.'__'.$this->c_id.'\"></div></td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_2_c'.$key_col.'_'.$this->c_id.'\" align=\"left\" class=\"__'.$this->c_theme.'__cell_h\">';\r\n\t\t\t\t\t\t$html .= '<div style=\"margin:0 3px;\"><input value=\"'.str_replace('\"','&quot;',$filter_input_value).'\" class=\"__'.$this->c_theme.'__input_h full_width\" '.$state_filter_input.' id=\"th_input_'.$key_col.'__'.$this->c_id.'\" type=\"text\" style=\"margin: 2px 0;\" size=1 onkeyup=\"if(document.getElementById(\\'chk_edit_c'.$key_col.'_'.$this->c_id.'\\'))document.getElementById(\\'chk_edit_c'.$key_col.'_'.$this->c_id.'\\').checked=true;vimofy_input_keydown(event,this,\\''.$this->c_id.'\\','.$key_col.');\" onchange=\"vimofy_col_input_change(\\''.$this->c_id.'\\','.$key_col.');\"/></div>';\r\n\t\t\t\t\t\tif($p_edit != false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif($state_filter_input == '')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '<td style=\"width:10px;padding:0;margin:0;\"><input '.$this->hover_out_lib(76,76).' type=\"checkbox\" id=\"chk_edit_c'.$key_col.'_'.$this->c_id.'\" style=\"height:11px;width:11px;margin: 0 5px 0 2px;display:block;\"/></td>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '<td style=\"width:0;padding:0;margin:0;\"></td>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '</td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_3_c'.$key_col.'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_4_c'.$key_col.'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__sep_h'.$cursor.'\"></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$id_col_display = $id_col_display + 1;\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t$html .= '<td id=\"th_0_c'.($key_col+1).'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t$html.= '<td><div style=\"width:200px\"></div></td>';\r\n\t\t\t$html .= '</tr>';\r\n\t\t\t/*===================================================================*/\r\n\r\n\t\t\t// Place the cursor on the first row of the recordset\r\n\t\t\tif($this->c_obj_bdd->rds_num_rows($p_resultat) > 0)\r\n\t\t\t{\r\n\t\t\t\t$this->c_obj_bdd->rds_data_seek($p_resultat,0);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn $html;\r\n\t\t}", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }", "public function setHeaders()\n {\n }", "public function tableHeaderRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($cols as $k){\n $out .= '<td>'.$k.'</td>';\n }\n return('<tr>'.$out.'</tr>');\n }", "public function setHeader($rowHeader){\n array_unshift($this->data,$rowHeader);\n return $this;\n }", "function wppb_multiple_forms_header( $list_header ){\r\n $delete_all_nonce = wp_create_nonce( 'wppb-delete-all-entries' );\r\n\r\n return '<thead><tr><th class=\"wck-number\">#</th><th class=\"wck-content\">'. __( '<pre>Title (Type)</pre>', 'profile-builder' ) .'</th><th class=\"wck-edit\">'. __( 'Edit', 'profile-builder' ) .'</th><th class=\"wck-delete\"><a id=\"wppb-delete-all-fields\" class=\"wppb-delete-all-fields\" onclick=\"wppb_rf_epf_delete_all_fields(event, this.id, \\'' . esc_js($delete_all_nonce) . '\\')\" title=\"' . __('Delete all items', 'profile-builder') . '\" href=\"#\">'. __( 'Delete all', 'profile-builder' ) .'</a></th></tr></thead>';\r\n}", "private function createFileHeadings() {\n\t\t// Allow other plugins to add their own column headers\n\t\t$headings = elgg_trigger_plugin_hook('row:headers', 'userexport', array(), $this->fields);\n\n\t\t// Attempt to translate the fields\n\t\tforeach ($headings as $key => $field) {\n\t\t\t$lang_string = \"profile:{$field}\";\n\t\t\t$heading = elgg_echo($lang_string);\n\n\t\t\t// No translation was found, fall back to the original string\n\t\t\tif ($heading === $lang_string) {\n\t\t\t\t$heading = elgg_echo($field);\n\t\t\t}\n\n\t\t\t$headings[$key] = $heading;\n\t\t}\n\n\t\t$this->writeToCSV($headings);\n\t}", "public function buildHeaderFields() {}", "public function getTableHeaders()\n {\n return ['ID', 'Ponto', 'Endereço', 'Cidade'];\n }", "function os2forms_nemid_webform_csv_headers_component($component, $export_options) {\n $header = array();\n $header[0] = '';\n $header[1] = '';\n $header[2] = $export_options['header_keys'] ? $component['form_key'] : $component['name'];\n return $header;\n}", "function DisplayTableHeader()\n{\n\t$pdf = $GLOBALS['pdf'];\n\t$width_col_no = $GLOBALS['width_col_no'];\n\t$sync_name_index = $GLOBALS['sync_name_index'];\n\t$collectionWidth = $GLOBALS['collectionWidth'];\n\t$totalWidth = $GLOBALS['totalWidth'];\n\n\t//setkan font jadi bold untuk header\n\t$pdf->SetFont('helvetica','B',9);\n\n\t//koleksi tinggi column header\n\t$header_cols_height = array();\n\n\t//tinggi untuk column 'No'\n\t$header_cols_height[] = $pdf->getNumLines('No',$width_col_no);\n\n\t//dapatkan tinggi untuk setiap column\n\tforeach ($sync_name_index as $key => $value)\n\t{\n\t\t$width_converted = GetAndConvertColumnWidth($value, $sync_name_index, $collectionWidth, $totalWidth, $pdf);\n\t\t$header_cols_height[] = $pdf->getNumLines($value,$width_converted);\n\t}\n\n\t//cari siapa paling tinggi\n\t$max_height = max($header_cols_height);\n\n\t//display\n\t$pdf->SetFillColor(211,211,211);\n\n\t$pdf->MultiCell($w=$width_col_no, $h=5*$max_height+3, $txt='No', $border=1, $align='L', $fill=1, $ln=0, $x='', $y='', $reseth=true, $stretch=0, $ishtml=true, $autopadding=true, $maxh=$h, $v='M');\n\tforeach ($sync_name_index as $key => $value)\n\t{\n\t\t$width_converted = GetAndConvertColumnWidth($value, $sync_name_index, $collectionWidth, $totalWidth, $pdf);\n\t\t$pdf->MultiCell($w=$width_converted, $h=5*$max_height+3, $txt=$value, $border=1, $align='C', $fill=1, $ln=0, $x='', $y='', $reseth=true, $stretch=0, $ishtml=true, $autopadding=true, $maxh=$h, $v='M');\n\t}\n\n\t//reset font\n\t$pdf->SetFont('helvetica','',9);\n\t$pdf->Ln();\n}", "public function renderTableHeader()\n {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = Html::tag('tr', implode('', $cells), $this->headerRowOptions);\n if ($this->filterPosition === self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition === self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }", "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}", "private function setHeader()\r\n {\r\n rewind($this->handle);\r\n $this->headers = fgetcsv($this->handle, $this->length, $this->delimiter);\r\n }", "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 table_begin($p_headrow, $p_class = '', $p_tr_attr = '', $p_th_attr = array()){\n\techo '<table class=\"table ' . $p_class . '\">';\n\techo '<thead>';\n\techo '<tr ' . $p_tr_attr . '>';\n\t\n\tfor($t_i=0; $t_i<count($p_headrow); $t_i++)\n\t\techo '<th ' . (isset($p_th_attr[$t_i]) ? $p_th_attr[$t_i] : '') . '>' . $p_headrow[$t_i] . '</th>';\n\n\techo '</tr>';\n\techo '</thead>';\n}", "private function createHeaders($headers) {\r\n $html = '<tr class=\"ctable-headertag\">';\r\n foreach ($headers as $index => $header) {\r\n $html .= '<th>' . $header . '</th>';\r\n }\r\n $html .= '</tr>';\r\n return $html;\r\n\r\n }", "public function setPrintHeaders($value) {\n\t}", "public function set_heading($heading) {\n $this->heading=$heading;\n if (!isset($this->form_name) or $this->form_name=='') {\n $this->form_name=$heading;\n error_log(\"BasicForm: Had to revert form name to form heading\");\n }\n }", "function showHeader(){\n\t\t$header = \"\";\n\t\t// print the header row\n\t\t$header .= \"\t<tr>\\n\";\n\t\t// loop the fields\n\t\tforeach ($this->fields as $field) {\n\t\t\t// print each field\n\t\t\t$header .= \"\t\t<th>\".$field.\"</th>\\n\";\n\t\t}\n\t\t// end the header row\n\t\t$header .= \"\t</tr>\\n\";\n\t\treturn $header;\n\t}", "function setHeaders() {\r\n global $CONFIGURATION;\r\n $this->charset = $CONFIGURATION['charset'];\r\n $this->headerType();\r\n\r\n if (!empty($this->cc))\r\n $this->headers.= \"Cc: {$this->cc}\\r\\n\";\r\n if (!empty($this->bcc))\r\n $this->headers.= \"Bcc: {$this->bcc}\\r\\n\";\r\n $this->headerType();\r\n }", "protected function tableHead($header, $border) {\n $width = 15;\n $height = 12;\n \n foreach($header as $col) {\n $this->Cell($width, $height, $col, $border);\n }\n $this->Ln();\n }", "public function makeReportUnusableToBeAbleToSeeAllColumnHeaders()\n {\n $javascript = <<<JS\n $('thead th').css('display', 'inline');\nJS;\n\n $this->getSession()->executeScript($javascript);\n }", "private function makeTDHeader($type,$header): void {\r\n\t\t$str_d = ($this->bCollapsed) ? ' style=\"display:none\"' : '';\r\n\t\techo '<tr'.$str_d.'>\r\n\t\t\t\t<td class=\"dBug_clickable_row dBug_'.$type.'Key\">' . $header . '</td>\r\n\t\t\t\t<td>';\r\n\t}", "protected function setHeaders()\n {\n $row = 1; \n $this->objPHPExcel->getActiveSheet()->getColumnDimension('A')->setAutoSize(true);\n \n $mergeCells = 'A' . $row . ':' . 'E' . $row;\n $this->setCellValue('A' . $row, \"Differences between files.\");\n $this->objPHPExcel->getActiveSheet()->getStyle($mergeCells)->getFont()->setBold(true);\n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n $this->objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(25);\n $this->objPHPExcel->getActiveSheet()->getStyle($mergeCells)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n \n $row++;\n $cell = 'A' . $row;\n $this->setCellValue($cell, \"Comparing by: \");\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n \n $mergeCells = 'B' . $row . ':' . 'C' . $row;\n $this->setCellValue('B' . $row, $this->getCompareTypeLabel()); \n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n \n \n $row++;\n $cell = 'A' . $row;\n $this->setCellValue($cell, \"Configuration: \");\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n \n $mergeCells = 'B' . $row . ':' . 'M' . $row;\n $this->setCellValue('B' . $row, $this->settings['configuration']); \n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n \n $row += 5;\n $columns = $this->getColumns(); \n foreach ($columns as $columnName => $column) {\n $cell = $columnName . $row;\n $this->setCellValue($cell, $column['title']);\n $this->objPHPExcel->getActiveSheet()->getColumnDimension($columnName)->setAutoSize(true);\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n }\n \n return $row;\n }", "function register_column_headers( $screen, $columns ) {\n\tnew Backend\\List_Table_Compat( $screen, $columns );\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 renderTableHeader() {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = $this->html()->tag('table-row', array('content' => implode('', $cells)), $this->headerRowOptions);\n\n if ($this->filterPosition == self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition == self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }", "function createEditForm_getItemHead()\t{\n\t\tGLOBAL $LANG;\n\t\tif ($this->MOD_SETTINGS['editLang'])\t{\n\n\t\t\t\t// Width of each label column is set by a clear-gif:\n\t\t\t$clearGif = '<br/><img src=\"clear.gif\" width=\"250\" height=\"1\" alt=\"\" />';\n\n\t\t\t$tCells = array();\n\t\t\t$tCells[] = '<th>'.$LANG->getLL('form_key').'</th>';\n\t\t\t$tCells[] = '<th style=\"width:50%\">'.$LANG->getLL('form_default').$clearGif.'</th>';\n\t\t\t$tCells[] = '<th>'.$this->MOD_SETTINGS['editLang'].'</th>';\n\t\t\t$tCells[] = '<th>'.$LANG->getLL('form_status').'</th>';\n\n\t\t\tforeach($this->langKeys as $langK)\t{\n\t\t\t\tif ($this->MOD_SETTINGS['addLang_'.$langK])\t{\n\t\t\t\t\t$tCells[] = '<td>'.$langK.$clearGif.'</td>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\t// Return row:\n\t\t\treturn '\n\t\t\t<tr class=\"bgColor5\" style=\"font-weight: bold;\">\n\t\t\t\t'.implode('\n\t\t\t\t',$tCells).'\n\t\t\t</tr>';\n\t\t}\n\t}", "public static function set_headers()\n {\n }", "function tableheader_close() {\n $this->doc .= '</th>';\n }", "function tablethead_close() {\n $this->doc .= DOKU_TAB.'</thead>'.DOKU_LF;\n }", "function\ttableHead() {\n\t\t//\n\t\t//\t\tfpdf_set_active_font( $this->myfpdf, $this->fontId, mmToPt(3), false, false );\n\t\t//\t\tfpdf_set_fill_color( $this->myfpdf, ul_color_from_rgb( 0.1, 0.1, 0.1 ) );\n\t\t$frm\t=\t$this->myDoc->currMasterPage->getFrameByFlowName( \"Auto\") ;\n\t\t$frm->currVerPos\t+=\t3.5 ;\t\t// now add some additional room for readability\n\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTHeaderPS) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\tif ( $actRow->isEnabled()) {\n\t\t\t\t$this->punchTableRow( $actRow) ;\n\t\t\t}\n\t\t}\n//\t\t$this->frmContent->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\t\tif ( $this->inTable) {\n\t\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTHeaderCF) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t\tif ( $actRow->isEnabled()) {\n\t\t\t\t\t$this->punchTableRow( $actRow) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\t\t}\n\t}", "function setHeaders($headers){\n\t\tforeach($headers as $name => $value){\n\t\t\t$this->setHeader($name,$value);\n\t\t}\n\t}", "public function setTagTableHeader($open, $close) {\n\t\t$this->th['open'] = $open;\n\t\t$this->th['close'] = $close;\n\t}", "function render_table_header_footer($orderBy, $order) {\n?>\n\t\t<tr>\n<?php\n\t\t\t$this->render_th('title', 'Title', $orderBy, $order); \n\t\t\t$this->render_th('date', 'Date', $orderBy, $order); \n\t\t\t$this->render_th('facilitators', 'Facilitators', $orderBy, $order); \n\t\t\t$this->render_th('categories', 'Categories', $orderBy, $order); \n?>\n\t\t</tr>\n<?php\n\t}", "public function printTableHeader($open)\n {\n\n print \"<tr>\\n\";\n print \"<th>&nbsp;\";\n print \" Admin Email\";\n print \"&nbsp;</th>\";\n print \"<th>&nbsp;\";\n print \" Level\";\n print \"&nbsp;</th>\";\n if (!$open)\n print \"</tr>\\n\";\n }", "function clsThead($aConfiguration=array())\r\n\t{\r\n\t\tclsTableRowContainer::clsTableRowContainer('thead', $aConfiguration);\r\n\t}", "public function setHeader() {\n $dt = date('j M, Y');\n $name_header = '';\n $ao = new Application_Model_DbTable_AuditOwner();\n if ($this->usertype != '') {\n $name_header = \"&nbsp {$this->userfullname}\";\n }\n $complete_user = array('ADMIN','USER','APPROVER');\n $complete_audit = '';\n $audit_id = $this->audit['audit_id'];\n logit(\"audit: \" . print_r($this->audit, true));\n $complete_audit .= <<<\"END\"\n<li class=\"divider\"></li>\n<li class=\"tri\"><span style=\"color:black;padding-left: 15px;\"> With Selected Audit:</span></li>\nEND;\n\n # incomplete and owned audit OR not incomplete audit can be viewed\n if (($this->audit['status'] == 'INCOMPLETE' && $this->audit['owner']) || $this->audit['status'] != 'INCOMPLETE') {\n $complete_audit .= <<<\"END\"\n<!li class=\"divider\"></li-->\n<li><a href=\"{$this->baseurl}/audit/view\"><span title=\".icon .icon-color .icon-book \" class=\"icon icon-color icon-book\"></span> View Audit</a></li>\nEND;\n }\n # only incomplete and owned audit can be edited\n if ($this->audit['status'] == 'INCOMPLETE' && $this->audit['owner']) {\n $complete_audit .= <<<\"END\"\n<!--li class=\"divider\"></li-->\n<li><a href=\"{$this->baseurl}/audit/edit/\"><span title=\".icon .icon-color .icon-edit \" class=\"icon icon-color icon-edit\"></span> Edit Audit</a></li>\nEND;\n }\n if (in_array($this->usertype, $complete_user)) {\n $complete_audit .= <<<\"END\"\n<!--li class=\"divider\"></li-->\n<li><a href=\"{$this->baseurl}/audit/exportdata\"><span title=\".icon .icon-color .icon-extlink \" class=\"icon icon-color icon-extlink\"></span> Export Audit Data</a></li>\nEND;\n if ($this->audit['owner']) {\n # $ao->isOwned($audit_id, $this->userid)) {\n $complete_audit .= <<<\"END\"\n<li><a href=\"{$this->baseurl}/audit/delete\"\n onclick=\" return confirm('Do you want to delete Selected Audit?');\">\n <span title=\".icon .icon-color .icon-trash \" class=\"icon icon-color icon-trash\"></span>\n Delete Audit</a></li>\nEND;\n }\n $complete_audit .= <<<\"END\"\n<li class=\"divider\"></li>\n<li class=\"tri\"><span style=\"color:black;padding-left: 15px;\"> Change Audit State:</span></li>\nEND;\n if ($this->audit['status'] == 'INCOMPLETE' && $ao->isOwned($audit_id, $this->userid)) {\n $complete_audit .= <<<\"END\"\n<li><a href=\"{$this->baseurl}/audit/complete\">\n<span title=\".icon .icon-color .icon-locked \" class=\"icon icon-color icon-locked\"></span> Mark Audit Complete</a></li>\nEND;\n }\n if ($this->audit['status'] == 'COMPLETE' && $ao->isOwned($audit_id, $this->userid)) {\n $complete_audit .= <<<\"END\"\n<li><a href=\"{$this->baseurl}/audit/incomplete\">\n<span title=\".icon .icon-color .icon-unlocked \" class=\"icon icon-color icon-unlocked\"></span> Mark Audit Incomplete</a></li>\nEND;\n }\n if ($this->audit['status'] == 'COMPLETE' && $this->usertype == 'APPROVER') {\n $complete_audit .= <<<\"END\"\n<li><a href=\"{$this->baseurl}/audit/finalize\"\nonclick=\" return confirm('Do you want to finalize Audit (#{$this->audit['audit_id']}-{$this->audit['tag']})?');\"><span title=\".icon .icon-color .icon-sent \" class=\"icon icon-color icon-sent\"></span> Mark Audit Finalized</a></li>\n<li><a href=\"{$this->baseurl}/audit/reject\"\n onclick=\" return confirm('Do you want to reject Audit (#{$this->audit['audit_id']}-{$this->audit['tag']})?');\"><span title=\".icon .icon-color .icon-cross \" class=\"icon icon-color icon-cross\"></span> Mark Audit Rejected</a></li>\nEND;\n }\n }\n $this->header = <<<\"END\"\n<div class=\"navbar\">\n <div class=\"navbar-inner\">\n <div class=\"container-fluid\">\n <a class=\"brand\" href=\"{$this->baseurl}{$this->mainpage}\">\n <span title=\".icon .icon-black .icon-check \" class=\"icon icon-black icon-check\"></span> <span>eChecklist</span>\n </a>\nEND;\n $newuser = '';\n if ($this->usertype != '') {\n if ($this->usertype == 'ADMIN') {\n $newuser = <<<\"END\"\n<li><a href=\"{$this->baseurl}/user/create\">\n<span title=\".icon .icon-green .icon-user \" class=\"icon icon-green icon-user\"></span> New User</a></li>\nEND;\n }\n\n $this->header = $this->header . <<<\"END\"\n<div class=\"btn-group pull-left\" style=\"margin-left:100px;\">\n<a class=\"btn dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">\n <span title=\".icon .icon-blue .icon-clipboard \" class=\"icon icon-blue icon-clipboard\"></span>\n <span class=\"hidden-phone\">Audit</span>\n <span class=\"caret\"></span></a>\n<ul class=\"dropdown-menu\">\nEND;\n if (in_array($this->usertype, $complete_user)) {\n $this->header .= <<<\"END\"\n <li><a href=\"{$this->baseurl}/audit/create\"><span title=\".icon .icon-green .icon-clipboard \" class=\"icon icon-green icon-clipboard\"></span> New Audit</a></li>\nEND;\n }\n $this->header .= <<<\"END\"\n <li><a href=\"{$this->baseurl}/audit/search\"><span title=\".icon .icon-blue .icon-search \" class=\"icon icon-blue icon-search\"></span> Search for Audit</a></li>\n{$complete_audit}\n <li class=\"divider\"></li>\n <li><a href=\"{$this->baseurl}/audit/runreports\"><span title=\".icon .icon-color .icon-newwin \" class=\"icon icon-color icon-newwin\"></span> Run Reports</a></li>\nEND;\n\n if (in_array($this->usertype, $complete_user)) {\n $this->header .= <<<\"END\"\n <li class=\"divider\"></li>\n <li><a href=\"{$this->baseurl}/audit/import\"><span title=\".icon .icon-blue .icon-import \" class=\"icon icon-blue icon-archive\"></span> Import Audit</a></li>\nEND;\n }\n $this->header .= <<<\"END\"\n</ul>\n</div>\n\n<div class=\"btn-group pull-left\">\n<a class=\"btn dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">\n <span title=\".icon .icon-blue .icon-tag \" class=\"icon icon-blue icon-tag\"></span>\n <span class=\"hidden-phone\">Lab</span>\n <span class=\"caret\"></span></a>\n<ul class=\"dropdown-menu\">\n <li><a href=\"{$this->baseurl}/lab/create\"><span title=\".icon .icon-green .icon-tag \" class=\"icon icon-green icon-tag\"></span> New Lab</a></li>\n <li><a href=\"{$this->baseurl}/lab/select\"><span title=\".icon .icon-blue .icon-search \" class=\"icon icon-blue icon-search\"></span> Select a Lab</a></li>\n <li class=\"divider\"></li>\n <li><a href=\"{$this->baseurl}/lab/edit\"><span title=\".icon .icon-blue .icon-search \" class=\"icon icon-blue icon-search\"></span> Edit Selected Lab</a></li>\n</ul>\n</div>\n\n<div class=\"btn-group pull-left\">\n<a class=\"btn dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">\n<span title=\".icon .icon-blue .icon-user \" class=\"icon icon-blue icon-user\"></span>\n<span class=\"hidden-phone\">User</span>\n<span class=\"caret\"></span></a>\n<ul class=\"dropdown-menu\">\n {$newuser}\n <li><a href=\"{$this->baseurl}/user/find\"><span title=\".icon .icon-blue .icon-search \" class=\"icon icon-blue icon-search\"></span>Find User</a></li>\n</ul>\n</div>\n\n<!--div class=\"btn-group pull-left\">\n<a class=\"btn dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">\n<span title=\".icon .icon-blue .icon-flag \" class=\"icon icon-blue icon-flag\"></span>\n<span class=\"hidden-phone\">Language</span>\n<span class=\"caret\"></span></a>\n<ul class=\"dropdown-menu\">\n <li><a href=\"{$this->baseurl}/language/switch/EN\"><span title=\".icon .icon-green .icon-flag \" class=\"icon icon-green icon-flag\"></span> English</a></li>\n <li><a href=\"{$this->baseurl}/language/switch/FR\"><span title=\".icon .icon-green .icon-flag \" class=\"icon icon-green icon-flag\"></span> French</a></li>\n <li><a href=\"{$this->baseurl}/language/switch/VI\"><span title=\".icon .icon-green .icon-flag \" class=\"icon icon-green icon-flag\"></span> Vietnamese</a></li>\n</ul>\n</div-->\n\n<!-- user dropdown starts -->\n<div class=\"btn-group pull-right\">\n <a class=\"btn dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">\n <span title=\".icon .icon-orange .icon-user \" class=\"icon icon-orange icon-user\"></span>\n <span class=\"hidden-phone\"> {$name_header}</span>\n\t<span class=\"caret\"></span>\n </a>\n <ul class=\"dropdown-menu\">\n <li><a href=\"{$this->baseurl}/user/profile\"><span title=\".icon .icon-blue .icon-contacts \" class=\"icon icon-blue icon-contacts\"></span> Profile</a></li>\n <li><a href=\"{$this->baseurl}/user/changepw\"><span title=\".icon .icon-blue .icon-contacts \" class=\"icon icon-blue icon-contacts\"></span> Change Password</a></li>\n <li class=\"divider\"></li>\n\t<li><a href=\"{$this->baseurl}/user/logout\">Logout</a></li>\n </ul>\n</div>\n<!-- user dropdown ends -->\nEND;\n $auditinfo = '';\n //if ($this->dialog_name == 'audit/edit') {\n $auditinfo = \"<div style=\\\"margin:6px 0 6px 20px;padding-right:5px;\\\">Selected Audit: {$this->showaudit}</div>\";\n //}\n $this->header .= <<<\"END\"\n<div style=\"display:inline-block;\">\n <div style=\"margin:6px 0px 6px 20px;padding-right:5px;\">Selected Lab: {$this->showlab}</div>\n {$auditinfo}\n <div style=\"clear:both;\"></div></div>\nEND;\n } else {\n $this->header = $this->header . <<<\"END\"\n<div class=\"btn-group pull-left\" style=\"margin-left:100px;\">\n<a class=\"btn\" href=\"{$this->baseurl}/user/login\"><span title=\".icon .icon-blue .icon-contacts \" class=\"icon icon-blue icon-contacts\"></span> Login</a></div>\nEND;\n }\n $this->header = $this->header . <<<\"END\"\n </div>\n </div> <!-- style=\"clear:both;\"></div -->\n</div>\nEND;\n\n $this->view->header = $this->header;\n }", "function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}", "public function getTableHeader()\n {\n $tableHead = null;\n $tableHead .= \"<thead>\";\n $tableHead .= \"<tr>\";\n $tableHead .= \"<th>Vecka</th>\";\n $tableHead .= \"<th>Måndag</th>\";\n $tableHead .= \"<th>Tisdag</th>\";\n $tableHead .= \"<th>Onsdag</th>\";\n $tableHead .= \"<th>Torsdag</th>\";\n $tableHead .= \"<th>Fredag</th>\";\n $tableHead .= \"<th>Lördag</th>\";\n $tableHead .= \"<th>Söndag</th>\";\n $tableHead .= \"</tr>\";\n $tableHead .= \"</thead>\";\n\n return $tableHead;\n }", "public function setHeadings($headings);", "function setHeaders(&$headers) {\n\t\t$this->setData('headers', $headers);\n\t}", "function wv_commission_table_heading_list($type = \"thead\") {\n $output = \"\";\n\n //verify the header and footer of the table list\n $type = ($type == \"thead\") ? \"thead\" : \"tfoot\";\n\n $output .=\"<$type>\";\n $output .=\" <tr>\n <th>#OrderId</th>\n <th>Order Date</th>\n <th>ProductName</th>\n <th>Vendor</th>\n <th>Commission</th>\n <th>Status</th>\n <th>Commission Date</th>\n </tr>\";\n\n $output .=\"</$type>\";\n return $output;\n }", "public function doMetaHeaders(&$headers)\r\n {\r\n $headers = array(\r\n 'title' => 'Title',\r\n 'description' => 'Description',\r\n 'author' => 'Author',\r\n 'date' => 'Date',\r\n 'robots' => 'Robots',\r\n 'template' => 'Template'\r\n );\r\n }", "static function generateTableHeaderHTML($a_div)\n\t{\n\t\techo \"<tr class='inTableRow'>\\n\";\n//\t\techo \"<th class='inTableColTaskID'>Task ID</th>\\n\";\n\t\techo \"<th class='inTableColTaskName'>{$a_div}</th>\\n\";\n\t\techo \"<th>Subcontractor</th>\\n\";\n\t\techo \"<th class='chTableColAmount'>Amount</th>\\n\";\n\t\techo \"<th>Notes</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "public static function table_top_label () \n {\n $html = null;\n\n $html .= '<thead>\n <tr>\n <td id=\"cb\" class=\"manage-column column-cb check-column\">\n <label class=\"screen-reader-text\" for=\"cb-select-all-1\">\n Select All\n </label>\n <input id=\"cb-select-all-1\" type=\"checkbox\">\n </td>\n <th scope=\"col\" id=\"title\" class=\"manage-column column-title\">\n Name\n </th>\n <th scope=\"col\" id=\"tags\" class=\"manage-column column-tags column-primary\">\n Excerpt\n </th>\n <th scope=\"col\" id=\"author\" class=\"manage-column column-author\">\n Author\n </th>\n <th scope=\"col\" id=\"comments\" class=\"manage-column column-comments\">\n <span class=\"vers comment-grey-bubble\" title=\"Comments\">\n <span class=\"screen-reader-text\">\n Comments\n </span>\n </span>\n </th>\n <th scope=\"col\" id=\"date\" class=\"manage-column column-date\">\n Date\n </th> \n </tr>\n </thead>';\n\n return $html; \n }", "function draw_header(){\r\n\t\t$out_multiple_search='';\r\n\r\n\t\t$arr_width=explode(',',$this->width);\r\n\t\t$out='<thead><tr id=\"'.$this->id.'_sort\">';\r\n\r\n\t\t$arr_sort=explode('_',$this->sort);\r\n\t\t$arr_header=explode(',',$this->header);\r\n\r\n\t\t$column=1;\r\n\t\tfor($i=0; $i<count($arr_header);$i++){\r\n\r\n\t\t\tif($this->sort_init!==false and $this->sort_init[$i]!='f'){\r\n\t\t\t\t\t$out.='<th'.(($this->width!='' and $arr_width[$i]>0) ? ' width=\"'.$arr_width[$i].'\"' : '').' onclick=\"'.$this->change_tags($this->get_url($i+1)).'\"><span'.($arr_sort[$i]=='f' ? ' class=\"no_sort' : ' class=\"sort').(substr($arr_sort[$i],-1)=='a' ? '_asc' : (substr($arr_sort[$i],-1)=='d' ? '_desc' : '')).'\"></span>'.$arr_header[$i].'</th>';\r\n\t\t\t}else{\r\n\t\t\t\t$out.='<th'.(($this->width!='' and $arr_width[$i]>0) ? ' width=\"'.$arr_width[$i].'\"' : '').'><span></span>'.$arr_header[$i].'</th>';\r\n\t\t\t}\r\n\r\n\t\t\tif($this->multiple_search_init===true or $this->multiple_search_init=='hide' or (strpos($this->multiple_search_init,'hide')!==false and $this->multiple_search_init[$i]=='t') or $this->multiple_search_init[$i]=='t')\r\n\t\t\t\t$out_multiple_search.='<th><input type=\"text\" id=\"'.$this->id.'_multiple_search'.($i+1).'\" name=\"'.$this->id.'_multiple_search[]'.'\" value=\"'.$this->multiple_search[$i].'\" onkeyup=\"ctMultiSearch(\\''.$this->id.'\\');\" /></a></th>';\r\n\t\t\telse\r\n\t\t\t\t$out_multiple_search.='<th></th>';\r\n\t\t}\r\n\r\n\r\n\t\t$out.='</tr>';\r\n\r\n\t\tif($this->multiple_search_init===true or strpos($this->multiple_search_init,'hide')!==false or strpos($this->multiple_search_init,'t')!==false)\r\n\t\t\t$out.='<tr id=\"'.$this->id.'_multiple_search\"'.(($this->multiple_search_init!==true and strpos($this->multiple_search_init,'hide')!==false) ? ' style=\"display: none;\"' : '').'>'.$out_multiple_search.'</tr>';\r\n\r\n\t\t$out.'</thead>';\r\n\r\n\t\treturn $out;\r\n\t}", "function get_subscribersTableHeader(){\n $table_head = array();\n $table_head[0] = \"Id\";\n $table_head[1] = \"Email\";\n $table_head[2] = \"Date\";\n return $table_head;\n}", "function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }", "private function headings() {\n\t\t$this->section_data['general_h_tags'] = array(\n\t\t\t'name' \t\t\t\t\t=> 'general_h_tags',\n\t\t\t'label' \t\t\t\t=> __( 'Headings', 'fixedtoc' ),\n\t\t\t'default' \t\t\t=> array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ),\n\t\t\t'type' \t\t\t\t\t=> 'multi_checkbox',\n\t\t\t'choices'\t\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h1' => 'Heading 1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h2' => 'Heading 2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h3' => 'Heading 3',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h4' => 'Heading 4',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h5' => 'Heading 5',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h6' => 'Heading 6',\n\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t'des'\t\t\t\t\t\t=> __( 'Check which HTML headings automatically generated table of contents.', 'fixedtoc' )\n\t\t);\n\t}", "public function buildHeader() {\n $header['label'] = $this->t('Label');\n $header['workflow'] = $this->t('Workflow');\n $header['status'] = $this->t('Status');\n $header['transition'] = $this->t('Transitions');\n $header['roles'] = $this->t('Email Roles');\n $header['author'] = $this->t('Email Author');\n $header['emails'] = $this->t('Adhoc Emails');\n return $header + parent::buildHeader();\n }", "function get_userTableHeader(){\n $table_head = array();\n $table_head[0] = \"Id\";\n $table_head[1] = \"Username\";\n $table_head[2] = \"Password\";\n $table_head[3] = \"Email\";\n $table_head[4] = \"Group\";\n return $table_head;\n}", "function write_table_head()//scrie capul de tabel pentru perioadele de vacanta\r\n{\r\n\t$output = \"\";\r\n\tadd($output,'<table width=\"500px\" cellpadding=\"1\" cellspacing=\"1\" class=\"special\">');\r\n\tadd($output,'<tr class=\"tr_head\"><td>Nr</td><td>Data inceput</td><td>Data sfarsit</td></tr>');\r\n\t\r\n\treturn $output;\r\n}", "public function makeTable($header, $data) {\n $this->SetFillColor(255, 0, 0);\n $this->SetTextColor(255);\n $this->SetDrawColor(128, 0, 0);\n $this->SetLineWidth(.3);\n $this->SetFont('', 'B');\n // Header\n $w = array(10, 25, 40, 10, 25, 15, 60, 10, 10, 10, 10, 10, 10, 10, 10, 10);\n for ($i = 0; $i < count($header); $i++)\n if ($i == 0) {\n $this->Cell($w[$i], 7, $header[$i], 1, 0, 'C', true);\n } else {\n $this->Cell($w[$i], 7, $header[$i], 1, 0, 'L', true);\n }\n $this->Ln();\n // Color and font restoration\n $this->SetFillColor(224, 235, 255);\n $this->SetTextColor(0);\n $this->SetFont('');\n // Data\n $fill = false;\n\n foreach ($data as $row) {\n $this->nr++;\n $this->Cell($w[0], 6, $this->nr, 'LR', 0, 'C', $fill);\n $this->Cell($w[1], 6, $row['article'], 'LR', 0, 'L', $fill);\n $this->Cell($w[2], 6, $row['brand'], 'LR', 0, 'L', $fill);\n $this->Cell($w[3], 6, $row['inch'], 'LR', 0, 'L', $fill);\n $this->Cell($w[4], 6, $row['size'], 'LR', 0, 'L', $fill);\n $this->Cell($w[5], 6, $row['lisi'], 'LR', 0, 'L', $fill);\n $this->Cell($w[6], 6, $row['design'], 'LR', 0, 'L', $fill);\n $this->Cell($w[7], 6, $row['onhand'], 'LR', 0, 'C', $fill);\n $this->Cell($w[8], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[9], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[10], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[11], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[12], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[13], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[14], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[15], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Ln();\n $fill = !$fill;\n }\n // Closing line\n $this->Cell(array_sum($w), 0, '', 'T');\n }", "public function setHeaders() {\r\n\t\t$this->resource->setHeaders();\r\n\t}", "function _webform_csv_headers_file($component) {\r\n $header = array();\r\n // Two columns in header.\r\n $header[0] = array('', '');\r\n $header[1] = array($component['name'], '');\r\n $header[2] = array(t('Name'), t('Filesize (KB)'));\r\n return $header;\r\n}", "function tableheader_open($colspan = 1, $align = null, $rowspan = 1, $classes = null) {\n $class = 'class=\"col'.$this->_counter['cell_counter']++;\n if(!is_null($align)) {\n $class .= ' '.$align.'align';\n }\n if($classes !== null) {\n if(is_array($classes)) $classes = join(' ', $classes);\n $class .= ' ' . $classes;\n }\n $class .= '\"';\n $this->doc .= '<th '.$class;\n if($colspan > 1) {\n $this->_counter['cell_counter'] += $colspan - 1;\n $this->doc .= ' colspan=\"'.$colspan.'\"';\n }\n if($rowspan > 1) {\n $this->doc .= ' rowspan=\"'.$rowspan.'\"';\n }\n $this->doc .= '>';\n }", "protected function setHeader(){\n $this->header = [\n 'Auth-id' => $this->username,\n 'Auth-token' => $this->generateToken(),\n 'Timestamp' => time()\n ];\n }", "public function buildHeader() {\n return [\n ['data' => t('Teaching format'), 'class' => ['align-middle']],\n ['data' => t('Event'), 'class' => ['align-middle']],\n ['data' => t('Tutor'), 'class' => ['align-middle']],\n ['data' => t('Location'), 'class' => ['align-middle']],\n ['data' => t('Room'), 'class' => ['align-middle']],\n [\n 'data' => t('Date/time'),\n 'field' => 'time.field_event_time_value',\n 'sort' => 'desc',\n 'class' => ['align-middle'],\n ],\n ['data' => t('Registration status'), 'class' => ['align-middle']],\n ];\n }", "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 25);\n\t\t$worksheet->set_column(2, 2, 30);\n\t\t$worksheet->set_column(3, 3, 20);\n\t\t$worksheet->set_column(4, 4, 30);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 20);\n\t\t$worksheet->set_column(7, 7, 30);\n\t\t$worksheet->set_column(8, 8, 30);\n\t\t$worksheet->set_column(9, 9, 20);\n\t\t$worksheet->set_column(10, 10, 10);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"สาขาวิชา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"ระดับการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"สถานศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"ประเทศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ชื่อทุน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"ระยะเวลา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"จำนวนวัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t}", "public static function getTableHeaders() {\r\n\t\t$array = self::getHeadersArray();\r\n\r\n\t\tif( $array == null ) {\r\n\t\t\t$headers = [];\r\n\t\t\treturn $headers;\r\n\t\t}\r\n\r\n\t\t$headers = self::getTableHeaderTitles( $array );\r\n\t\treturn $headers;\r\n\t}", "private function createTableHeader($attributeList = false, $prefixHTML = false)\n\t{\n\t\t// Render table with all specified attributes\n\t\t$attributeString = false;\n\t\tif ($attributeList)\n\t\t{\n\t\t\tforeach($attributeList as $name => $value) {\n\t\t\t\t$attributeString .= sprintf('%s=\"%s\" ', $name, $value);\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\treturn \"$prefixHTML\\n\\n<table class=\\\"form-table\\\" $attributeString>\\n\";\n\t}", "function outputHeader()\n {\n global $application;\n\n $output = '';\n if (!is_array($this -> _attrs))\n return $output;\n\n // output error column\n if (is_array($this -> _Errors) && !empty($this -> _Errors))\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-error.tpl.html',\n array()\n );\n\n foreach($this -> _attrs as $k => $v)\n {\n if ($v != 'YES')\n continue;\n\n $template_contents = array(\n 'HeaderName' => getMsg('SYS', @$this -> _headermap[$k])\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-cell.tpl.html',\n array()\n );\n }\n\n return $output;\n }", "public function getTableRowNames()\n \t{\n \t\treturn array('title', 'author', 'date', 'email', 'website', 'comment', 'relevantSection', 'relevantItemId', 'isApproved', 'isPrivate', 'isAdminComment');\n \t}", "function Header()\n\t{\n\t\t// Police Arial gras 24\n\t\t$this->SetTextColor(255,10,22);\n\t\t$this->SetFont('Arial','B',14);\n\t\t// Décalage à droite\n\t\t$this->Cell(10);\n\t\t// Titre (ligne,titre)\n\t\t$this->Cell('',10,'Liste des employes',0,0,'C');\n\t\t// Saut de ligne\n\t\t$this->Ln(20);\n\t}", "function set_heading()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->heading = $this->_prep_args($args);\n\t}", "public function csvHeaders()\n\t{\n\t\t$headers = array();\n\t\tforeach ($this->Columns as $field => $Column) {\n\t\t\t$headers[] = $Column->label();\n\t\t}\n\t\treturn $headers;\n\t}" ]
[ "0.70498425", "0.69664925", "0.68424946", "0.6802195", "0.6706529", "0.6661331", "0.658277", "0.6551673", "0.652902", "0.652844", "0.65116954", "0.6508501", "0.6476392", "0.64637625", "0.644055", "0.64275247", "0.6393936", "0.6389936", "0.636085", "0.63553476", "0.6351412", "0.6351412", "0.63468087", "0.6346537", "0.63426095", "0.6291687", "0.6275716", "0.62606907", "0.6258315", "0.62426686", "0.623382", "0.623244", "0.62245154", "0.6194321", "0.61902535", "0.6182707", "0.61568964", "0.61474216", "0.61354524", "0.6130813", "0.6113659", "0.610037", "0.60869217", "0.6086267", "0.6083298", "0.6072468", "0.6065863", "0.6048959", "0.60385215", "0.6026741", "0.60194993", "0.60110694", "0.60033274", "0.6002401", "0.5996228", "0.5995873", "0.5992297", "0.5978452", "0.59755343", "0.5963111", "0.595672", "0.5917735", "0.59159356", "0.5900811", "0.5889162", "0.58756053", "0.58723086", "0.586681", "0.58651143", "0.585696", "0.5854642", "0.5850406", "0.5846314", "0.5839743", "0.58384943", "0.58338946", "0.5832026", "0.5823649", "0.58103055", "0.5809292", "0.5807231", "0.58057106", "0.57935053", "0.5789752", "0.57735103", "0.5773011", "0.5763467", "0.5751422", "0.57451886", "0.57435876", "0.57387996", "0.5735445", "0.5730916", "0.5722596", "0.57223284", "0.5719063", "0.5718872", "0.57136035", "0.57116914", "0.5707844", "0.57062435" ]
0.0
-1
Set a row attribute
public function set_row_attr($row, $attr_name, $attr_val) { $row = (int)$row; $attr_name = (string)$attr_name; $attr_val = (string)$attr_val; if ($attr_name == '' || $attr_val == '') { return false; } if (isset($this->row_attrs[$row][$attr_name])) { $this->row_attrs[$row][$attr_name] .= ' ' . $attr_val; } else { $this->row_attrs[$row][$attr_name] = $attr_val; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTrTdAttr ($attr, $row=null) {\n if (is_numeric ($row))\n $this->_setAttr ($attr, $this->trtdAttr[$row]);\n else\n $this->_setAttr ($attr, $this->trtdAttr[]);\n }", "public function setRow($row)\n {\n $this->row = $row;\n }", "public function setViaTableAttributesValue($value);", "protected function setRow($name, Common $element, $attribute = '')\n {\n $prop = empty($attribute) ? $element->$name : $element->$attribute;\n $this->setData($name, empty($prop) ? '' : $prop);\n }", "function setRowDatas(&$row) {\r\n\t\t\r\n }", "public function setAttribute($attribute, $value) {\n\t\tif (!$this->attributes) {\n\t\t\t$this->attributes = tx_newspaper::selectOneRow(\n\t\t\t\t\t'*', tx_newspaper::getTable($this), $this->condition\n\t\t\t);\n\t\t}\n\t\t\n\t\t$this->attributes[$attribute] = $value;\n\t}", "public function setRow(int $row): void\n {\n $this->row = $row;\n }", "abstract protected function updateSpecificProperties($row);", "public function setRow($row)\n\t{\n\t\t$this->cells[] = new Hypertable_ThriftGen_Cell(array('key' => new Hypertable_ThriftGen_Key( array('row'=> $row, 'flag' => 0))));\n\t\treturn $this;\n\t}", "function setRowDatas(&$row) {\r\n\t\t/* for optimization reason, do not save row. save just needed parameters */\r\n\r\n\t\t//$this->_specific_data\t= isset($row->specific) ? $row->specific : '';\r\n\t}", "public function set($rowData)\n {\n $this->rawRowData = $rowData;\n }", "function setCellAttribute($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t\treturn $this;\n\t}", "function setCellAttribute($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t\treturn $this;\n\t}", "public function __SET($attr, $value){ //Establece valor y atributo\n\n\t\t\t$this->$attr=$value;\n\t\t}", "public function setRow($row)\n {\n $this->row = $row;\n return $this;\n }", "function setAttribute ($attribute, $value) {\n return $this->dbH->setAttribute($attribute, $value);\n }", "function setRowDatas(&$row) {\r\n\t\t/* for optimization reason, do not save row. save just needed parameters */\r\n\t}", "public function setAttributes();", "function set_attr($attr=array()) {\n $this->other_attr = $attr;\n }", "public function set($column,$value);", "public function setRow($Row) \n \t{\n \t\treturn false;\n \t\t//parent::setRow($Row);\n \t}", "public function changeRowData(&$row){}", "function set($attr, $value)\r\n\t{\r\n\t\t$this->$attr = $value;\r\n\t}", "function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}", "function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}", "public function updateRow($row);", "public function setAttribute($attribute, $value)\n {\n }", "public function setAttribute($attribute, $value)\r\n\t{\r\n\t\t\r\n\t}", "public static function updateAttributes($bill, $row){\n $bill->setId($row['id']);\n $bill->setDate($row['date']);\n $bill->setUser($row['user']);\n $bill->setPayment($row['payment']);\n $bill->setPaid($row['paid']);\n }", "function setRowPrototype($row) {\n\t\t$this->row = $row;\n\t\treturn $this;\n\t}", "public function __set($atrib, $value){\n\t\t$this->$atrib = $value;\n\t}", "function diy_table_row_attr($str_value, $attributes) {\n\t\t$attr = $attributes;\n\t\tif (is_array($attributes)) {\n\t\t\t$attribute = [];\n\t\t\tforeach ($attributes as $key => $value) {\n\t\t\t\t$attribute[] = \"{$key}=\\\"{$value}\\\"\";\n\t\t\t}\n\t\t\t$attr = implode(' ', $attribute);\n\t\t}\n\t\t\n\t\treturn \"{$str_value}{:}$attr\";\n\t}", "abstract public function setAttribute($key, $value);", "public static function populateRecord($record, $row)\n {\n $columns = array_flip($record->attributes());\n foreach ($row as $name => $type_value) {\n $value=current($type_value);\n if (isset($columns[$name])) {\n $record->setAttribute($name, $value);\n $record->setOldAttribute($name,$value);\n } elseif ($record->canSetProperty($name)) {\n $record->$name = $value;\n }\n }\n\n\n }", "public function setAttr($attr) {\n\t\t$this->attr = $attr;\n\t\treturn $this;\n\t}", "public function setTd ($text, $attr='', $row=null, $col=null) {\n if (is_numeric ($row)) {\n if (is_numeric ($col))\n $this->_setTextAndAttr ($text, $attr, $this->tdData[(int)$row][(int)$col]);\n else\n $this->_setTextAndAttr ($text, $attr, $this->tdData[(int)$row][]);\n }\n else {\n if (is_numeric ($col))\n $this->_setTextAndAttr ($text, $attr, $this->tdData[][(int)$row]);\n else\n $this->_setTextAndAttr ($text, $attr, $this->tdData[][]);\n }\n }", "public function setAttr($attribute, $value) {\n $this->attributes[$attribute] = $value;\n }", "public function __SET($att, $valor){\r\n $this->$att = $valor;\r\n}", "function __construct($row, AttributeGroup $grp){\n\n\t\t\n\t\t$this->Group = $grp;\n\t\t\n\t\tif($grp->UseRealTable){\n\t\t\t$this->fieldName = $row['name'];\n\t\t\t$this->tableName = $grp->RealTableName;\n\t\t\t$this->AsTableName = $grp->RealTableName;\n\t\t} else {\n\t\t\t$this->fieldName = 'value';\n\t\t\t$this->tableName = $GLOBALS['attribute_type_tables'][$row['type']];\n\t\t\t$this->AsTableName = 'tbl'.$grp->Id.'_'.$row['id'];\n\t\t}\n\t\tif($row['php_data']){\n\t\t\t$row['php_data']=unserialize($row['php_data']);\n\t\t}\n\t\t\n\t\t$this->Id = $row['id'];\n\t\t$this->Name = $row['name'];\n\t\t$this->Type = $row['type'];\n\t\t$this->LabelPrefix = $row['prefix'];\n\t\t$this->LabelSuffix = $row['suffix'];\n\t\t$this->PHPData = $row['php_data'];\n\t\t\n\t\t\n\t\t//$row['value'] = '';\n\t\t//$row['orig_value'] = '';\n\t\t/*\n\t\tIMPORTANT FEAttribute extends ArrayObject\n\t\t\nMnogo neiasen bug. Kogato dobavih v getBeValue na ManagedImages da vrashta i $this[\"value\"][\"sizes\"]=$this->ImageSizes;\nVsichko se pochupi, vsichki FEAttr instancii poluciha i te taia stoinost. Tova e pri situacia che predi tova ne im e izvikano izrichno $this['value'] = neshtosi.\nNe se izvikva, ako ne sme zaredili danni prez loadData.\nIzglezda niakade copy on write mehanizma se pochupva pri naslediavane na ArrayObject\n\t\t\n\t\t*/\n\t\t\n//\t\tparent::__construct($row);\n\t}", "public function setAttribute(string $attribute, string $value);", "public function __set($attri, $value) {\n if (in_array($attri, self::DYN_ATTRIBUTES)) {\n $this->{$attri} = $value;\n }\n }", "public function __set($attr, $value)\n\t{\n\t\t$this->$attr = $value;\n\t}", "public function setAttribute($key, $value);", "public function setAttribute($key, $value);", "public function __set($attribute, $value){\n\t\t$this->$attribute = $value;\n\t}", "public function __set($attribute, $param) {\n $this->$attribute = $param;\n }", "private function setTaxAttributes($row, $element, $value)\n {\n (array_key_exists('dan2', $row) && $row['dan2'] != 0) ? $element->setAttribute('dan2', str_replace(',', '', $row['dan2']) * $value) : '';\n (array_key_exists('zakl_dane2', $row) && $row['zakl_dane2'] != 0) ? $element->setAttribute('zakl_dane2', str_replace(',', '', $row['zakl_dane2']) * $value) : '';\n (array_key_exists('dan3', $row) && $row['dan3'] != 0) ? $element->setAttribute('dan3', str_replace(',', '', $row['dan3']) * $value) : '';\n (array_key_exists('zakl_dane3', $row) && $row['zakl_dane3'] != 0) ? $element->setAttribute('zakl_dane3', str_replace(',', '', $row['zakl_dane3']) * $value) : '';\n }", "function initRow( $row ) {\r\n\t\t$this->oid = $row['id'];\n\t\t$this->uid = $row['uid'];\n\t\t$this->name = $row['name'];\n\t\t$this->description = $row['description'];\n\t\t\r\n\t}", "public function setRow($value)\n {\n return $this->set('Row', $value);\n }", "public function setRow($value)\n {\n return $this->set('Row', $value);\n }", "public function setHeader($attribute, $value);", "public function populate($row){\n foreach ($row as $key => $value){\n $this->$key = $value;\n }\n }", "function addRow($row, $attributes = null)\n {\n $key = sizeof($this->_rows);\n $this->_rows[$key] = $row;\n\n //if updateValue has been called make sure to update the values of each added element\n foreach (array_keys($this->_rows[$key]) as $key2) {\n if (isset($this->_form)) {\n $this->_rows[$key][$key2]->onQuickFormEvent('updateValue', null, $this->_form);\n }\n if ($this->isFrozen()) {\n $this->_rows[$key][$key2]->freeze();\n }\n }\n \n if (isset($attributes)) $this->_rowAttributes[$key] = $attributes;\n }", "protected function setAttribute($dataArray, $attribute)\n {\n if (isset($dataArray[$attribute])) {\n if (in_array($attribute, self::$validAttributes)) {\n $this->$attribute = $dataArray[$attribute];\n }\n }\n }", "public function set_dataAttributes($inputObject, $row)\n {\n $this->id = $row[\"id\"];\n $this->rewrite = $row[\"Process_Rewrite\"];\n $this->extension = $row[\"Process_Extension\"];\n $this->stranglerPattern = $row[\"Process_StranglerPattern\"];\n $this->continuousEvolution = $row[\"Process_ContinuousEvolution\"];\n $this->split = $row[\"Process_Split\"];\n $this->processStrategyOthers = $row[\"Process_Others\"];\n $this->ddd = $row[\"Decomposition_DDD\"];\n $this->functionalDecomposition = $row[\"Decomposition_FunctionalDecomposition\"];\n $this->existingStructure = $row[\"Decomposition_ExistingStructure\"];\n $this->decompositionStrategyOthers = $row[\"Decomposition_Others\"];\n $this->SCA = $row[\"Technique_SCA\"];\n $this->MDA = $row[\"Technique_MDA\"];\n $this->WDA = $row[\"Technique_WDA\"];\n $this->DMC = $row[\"Technique_DMC\"];\n $this->techniqueOthers = $row[\"Technique_Others\"];\n $this->GR = $row[\"Applicability_GR\"];\n $this->MO = $row[\"Applicability_MO\"];\n $this->sourceCode = $row[\"Input_SourceCode\"];\n $this->useCase = $row[\"Input_UseCase\"];\n $this->systemSpecification = $row[\"Input_SystemSpecification\"];\n $this->API = $row[\"Input_API\"];\n $this->inputOthers = $row[\"Input_Others\"];\n $this->list = $row[\"Output_List\"];\n $this->archi = $row[\"Output_Archi\"];\n $this->outputOthers = $row[\"Output_Others\"];\n $this->experiment = $row[\"Validation_Experiment\"];\n $this->example = $row[\"Validation_Example\"];\n $this->caseStudy = $row[\"Validation_CaseStudy\"];\n $this->noValidation = $row[\"Validation_NoValidation\"];\n $this->maintainability = $row[\"Quality_Maintainability\"];\n $this->performance = $row[\"Quality_Performance\"];\n $this->reliability = $row[\"Quality_Reliability\"];\n $this->scalability = $row[\"Quality_Scalability\"];\n $this->security = $row[\"Quality_Security\"];\n $this->qualityOthers = $row[\"Quality_Others\"];\n $this->score = $row[\"Score\"];\n $this->matchScore = set_matchScore($inputObject, $row);\n $this->misMatch = set_misMatch($inputObject, $row);\n }", "public function setAttribute($name, $value);", "public function setData($data)\n {\n $this->rowData = $data;\n }", "public function set_attribute($name, $value)\n {\n }", "public function getRowAttributes(RenderWalker $walker, int $index, array $row): array;", "public function setRowAlt($rowAlt)\n {\n $this->rowAlt = $this->checkRowAltRange($rowAlt);\n $this->childNodes = [];\n $this->append($this->makeTableRows());\n }", "public function __set($atributo, $valor) {\n\t\t\t// $this->modelo = $valor;\n\t\t\t$this->$atributo = $valor;\n\t\t}", "public function setAttrs($attrs);", "public function setCell($row, $column)\n\t{\n\t\t$this->cells[] = new Hypertable_ThriftGen_Cell(array('key' => new Hypertable_ThriftGen_Key( array('row'=> $row, 'column_family'=> $column, 'flag' => 1))));\n\t\treturn $this;\n\t}", "public function setIdentifier($record){\n\t\t$record->writeAttribute($this->_identityColumn, $this->generateUUID());\n\t}", "public function __set($attribute, $value) {\n $this->setAttribute($attribute, $value);\n }", "function editRow($table_name, $key_column_name, $key_value, $row)\n {\n foreach($row as $column_name=>$column_value)\n {\n $this->editValue(\n $table_name,\n $key_column_name,\n $key_value,\n $column_name,\n $column_value);\n }\n }", "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 }", "public function setAttributes($attributes){ }", "public function setRowspan($num)\n {\n parent::setAttr(\"rowspan\", $num);\n }", "private function set($row, $column, $value) {\n if (!$this->invalid($row, $column)) {\n $this->matrix[$row][$column] = $value;\n }\n }", "protected function _set_row_id($id) {\r\n $this->row_id = $id;\r\n }", "public function setRow($key, $value = null)\n {\n // We cache the row data for subsequent uses\n if (! is_array($this->rowData)) {\n $this->rowData = $this->getRowArray();\n }\n\n if (is_array($key)) {\n foreach ($key as $k => $v) {\n $this->rowData[$k] = $v;\n }\n\n return;\n }\n\n if ($key !== '' && $value !== null) {\n $this->rowData[$key] = $value;\n }\n }", "private function addAtrributesToCRUD() {\r\n if (!empty($this->__attributes)) {\r\n $this->myCRUD()->setAtributes($this->__attributes);\r\n }\r\n }", "function setRowClasses($field, $map)\n\t{\n\t\t$this->table->rowclasses['field'] = $field;\n\t\t$this->table->rowclasses['classes'] = $map;\n\t}", "function load_db_values($row)\n\t{\n\t\tforeach($row as $prop => $val)\n\t\t\t$this->{$prop} = $val;\n\t}", "public function __set($variable, $value)\n {\n $this->rowData[$variable] = $value;\n if ($this->persisted) {\n $this->persisted = false;\n }\n }", "public function setRowId($val) {\n if ($val === null || is_integer($val)) {\n $this->_row_id = $val;\n } else {\n require_once 'Scenario/Exception.php';\n throw new Scenario_Exception('Row ID must be an integer or null.');\n }\n }", "public function setTrasient($attribute){\n\t\tEntityManager::addTrasientAttribute(get_class($this), $attribute);\n\t}", "public function setColumn($set, $val)\n\t{\n\t\t//ignore bogus data\n\t\tif (!array_key_exists($set, $this->row))\n\t\t\tthrow new InternalException(\"row $set doesn't exist\");\n\t\t$this->isChanged[$set] = true;\n\t\t$this->row[$set] = $val;\n\t}", "public function getRow($row){\n\t\t\t$this->groupId = $row['groupId'];\n\t\t\t$this->name = $row['name'];\n\t\t\t$this->description = $row['description'];\n\t\t\t\n\t\t\t$this->isLoaded = true;\n\t\t}", "public function __set($attribute, $value) {\n\t\tif (strpos($attribute, '_') === 0) {\n\t\t\t$this->{$attribute} = $value;\n\t\t\treturn;\n\t\t}\n\n\t\t$this->setData($attribute, $value);\n\t}", "public function __set($attribute, $value)\n {\n array_set($this->attributes, $attribute, $value);\n }", "public function setHeader($rowHeader){\n array_unshift($this->data,$rowHeader);\n return $this;\n }", "public function setEntity( $entity )\n {\n\n $this->entity = $entity;\n $this->rowid = $entity->getId();\n \n }", "public function setAttribute($name, $value)\n\t{\n\t\t// If value is valid timestamp and the underlying column type is datetime, convert to datetime object\n\t\tif (DateTimeHelper::isValidTimeStamp($value))\n\t\t{\n\t\t\t$table = blx()->db->schema->getTable(\"{{{$this->getTableName()}}}\");\n\t\t\t$column = $table->getColumn($name);\n\t\t\tif ($column->dbType == ColumnType::DateTime)\n\t\t\t{\n\t\t\t\t$dt = new DateTime('@'.$value);\n\t\t\t\t$value = $dt;\n\t\t\t}\n\t\t}\n\n\t\tif (property_exists($this, $name))\n\t\t{\n\t\t\t$this->$name = $value;\n\t\t}\n\t\telse if (isset($this->getMetaData()->columns[$name]))\n\t\t{\n\t\t\t$this->_attributes[$name] = $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function setRow(string $data, $value): DataTablesResponseInterface;", "public function setAttributes($attributes);", "public function setAttributeMetadata($attributeName, $definition){\n\t\tActiveRecordMetaData::setAttributeMetadata($this->_source, $this->_schema, $attributeName, $definition);\n\t}", "protected function _cacheSet($id, $row) {\n//SERIA_Base::db()->dbLog(\"_cacheSet(\".$this->table.\", $id)\");\n\t\t\treturn $this->_cache()->set($this->_cache->get('generation').'_'.$id, $row, 10);\n\t\t}", "public function setFromRow( $rec ){\r\n \r\n if (isset($rec['badge_categories_id']))\r\n $this->id = $rec['badge_categories_id'];\r\n \r\n if (isset($rec['badge_categories_name']))\r\n $this->name = $rec['badge_categories_name'];\r\n }", "public function setTh ($text , $attr='', $col=null) {\n if (is_numeric ($col))\n $this->_setTextAndAttr ($text, $attr, $this->thData[$col]);\n else\n $this->_setTextAndAttr ($text, $attr, $this->thData[]);\n }", "public function setRow($index, array $row)\n {\n if (null === $this->nbColumns) {\n $this->nbColumns = count($row);\n } elseif (count($row) !== $this->nbColumns) {\n throw new LogicException(sprintf(\n 'Expected the row to contain %s cells, but got %s.',\n $this->nbColumns,\n count($row)\n ));\n }\n\n $this->rows[$index] = array_values($row);\n\n return $this;\n }", "function __construct($row = null) {\n $this->_data = array();\n $this->_extra = array();\n if (!isset(self::$_defaults[$this->getObjectName()])) {\n // maintain the default data (column values) separately\n self::$_defaults[$this->getObjectName()] = array();\n $this->loadDefaults();\n }\n\n // clone from the default data. much faster than reloading the column values every time\n $def =& self::$_defaults[$this->getObjectName()];\n foreach ($def as $k => &$d) {\n $this->_data[$k] = clone $d;\n }\n\n if (is_array($row)) {\n $this->loadFromRow($row);\n } else if (is_int($row)) {\n $this->setValue('id', $row);\n }\n }", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function setAttribute($key, $value = null);", "public function __set($name, $value)\n {\n // does table have such row?\n if (!array_key_exists($name, $this->_fields)) {\n throw new Cms_Model_Exception(\n get_class($this) . \" doesn't have the '{$name}' field\"\n );\n }\n\n // we should parse the name of arg to get function\n $func = 'set' . @preg_replace('~_([a-z])~e', 'ucfirst(\"$1\")', ucfirst($name));\n if (!is_callable(array($this, $func))) {\n throw new Cms_Model_Exception(\"The '{$func}' method not found\");\n }\n\n // updating marker of changed fields\n if ($this->_isVirgin) {\n $this->_fields[$name] = $value;\n } else {\n $this->_changedFields[$name] = $value;\n }\n }", "public function set($column, $value)\n {\n $this->initialize();\n if (array_key_exists($column, $this->columns)) {\n $mutator = '__set' . str_replace(' ', '', ucwords(str_replace(array('-', '_'), ' ', $column)));\n if (method_exists($this, $mutator)) {\n $this->{$mutator}($value);\n } else {\n $this->data[$column] = $value;\n }\n return;\n }\n throw new Exception\\InvalidArgumentException('Not a valid column in this row: ' . $column);\n }", "public function update(){\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $fieldsList = \" SET \";\n foreach ($this->attributes as $column => $value) {\n $fieldsList.=$column.\"=\".'\\''.$value.'\\''.\", \";\n }\n $fieldsList = str_last_replace(\", \", \"\", $fieldsList);\n $sqlQuery = \"UPDATE \".$this->table.$fieldsList.\" WHERE \".$this->idName.\"=\".$this->attributes[$this->idName];\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n }\n }", "protected function _setAttributeValue($object, $valueRow)\n {\n $attribute = $this->getAttribute($valueRow['attribute_id']);\n if ($attribute) {\n $attributeCode = $attribute->getAttributeCode();\n $isDefaultStore = $valueRow['store_id'] == $this->getDefaultStoreId();\n if (isset($this->_attributes[$valueRow['attribute_id']])) {\n if ($isDefaultStore) {\n $object->setAttributeDefaultValue($attributeCode, $valueRow['value']);\n } else {\n $object->setAttributeDefaultValue(\n $attributeCode,\n $this->_attributes[$valueRow['attribute_id']]['value']\n );\n }\n } else {\n $this->_attributes[$valueRow['attribute_id']] = $valueRow;\n }\n\n $value = $valueRow['value'];\n $valueId = $valueRow['value_id'];\n\n $object->setData($attributeCode, $value);\n if (!$isDefaultStore) {\n $object->setExistsStoreValueFlag($attributeCode);\n }\n $attribute->getBackend()->setEntityValueId($object, $valueId);\n }\n\n return $this;\n }", "public function set()\n {\n $args = func_get_args();\n\n if ( count($args) == 2 )\n {\n $this->attributes[$args[0]] = $args[1];\n }\n elseif ( count($args) == 1 && is_array($args[0]) ) \n {\n $this->attributes = ( array_merge($this->attributes, $args[0]) );\n }\n\n return $this;\n }" ]
[ "0.7184818", "0.69530857", "0.6781479", "0.67430913", "0.65449625", "0.6439724", "0.64035505", "0.6400028", "0.6385595", "0.6361818", "0.6347521", "0.63459355", "0.63459355", "0.634324", "0.6320215", "0.6309764", "0.62964934", "0.6223196", "0.6202105", "0.6145299", "0.61203045", "0.60466707", "0.5993699", "0.5934689", "0.5934689", "0.59293437", "0.5921092", "0.5912191", "0.59064496", "0.588355", "0.58738035", "0.58373564", "0.5832105", "0.5831291", "0.58083105", "0.5805045", "0.5800787", "0.5793569", "0.57914436", "0.57834333", "0.5776747", "0.57728064", "0.5769495", "0.5769495", "0.57621115", "0.57551634", "0.5754459", "0.57423645", "0.57237524", "0.57223487", "0.57030404", "0.5701949", "0.5667969", "0.5650234", "0.5642859", "0.5596685", "0.5593988", "0.55934846", "0.557135", "0.5566251", "0.55510306", "0.55361366", "0.5522793", "0.55159646", "0.5499802", "0.5487595", "0.54603714", "0.5450252", "0.5443582", "0.5442586", "0.54408705", "0.5424501", "0.5417506", "0.5406075", "0.5406057", "0.5402152", "0.54002714", "0.5400169", "0.53978974", "0.53777057", "0.5366746", "0.5365693", "0.5362192", "0.535996", "0.5355047", "0.5349031", "0.5347711", "0.5343784", "0.5339654", "0.53286266", "0.5320371", "0.5317915", "0.53121436", "0.53110623", "0.5300198", "0.5292945", "0.52904457", "0.5288603", "0.5278796", "0.5271086" ]
0.71445227
1
Add a field to the form
public function add_element($form_element, $num_cols=1, $attrs=false) { if (!is_array($attrs)) { $attrs = array(); } array_push($this->form_elements, array($form_element, $num_cols, 'cell', $attrs)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addToField(\\Foundation\\Form\\Field $field);", "public function addField();", "function add_form_field($field, $error = \"\", $prefill = \"\"){\n\t\t$this->form_row($field, $error , $prefill );\n\t}", "public function add_field(form_item $field) {\n $this->_fields[] = $field;\n }", "public function addField(Field $field);", "public function addField(Field $field);", "public function add(IField $field): IFormBuilder;", "function addFieldToForm($field, $bAddToMap = true){\r\n\t\treturn $this->fields->addFieldToForm($field, $bAddToMap);\r\n\t}", "public function actionAdd()\n\t{\n\t\t$formId = $this->_input->filterSingle('form_id', XenForo_Input::UINT);\n\t\t$type = $this->_input->filterSingle('type', XenForo_Input::STRING);\n\t\t\n\t\t$fieldModel = $this->_getFieldModel();\n\t\t$fieldTypes = $fieldModel->getCountByType();\n\t\t\n\t\t$options = array();\n\t\t$options[] = array(\n\t\t 'value' => 'user',\n\t\t 'label' => new XenForo_Phrase('field'),\n\t\t 'selected' => true\n\t\t);\n\t\t\n\t\t// if global fields exist, include in the types\n\t\tif (array_key_exists('global', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'global',\n\t\t\t 'label' => new XenForo_Phrase('global_field')\n\t\t\t);\n\t\t}\n\t\t\n\t\t// if template fields exist, include in the types\n\t\tif (array_key_exists('template', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'template',\n\t\t\t 'label' => new XenForo_Phrase('template_field') \n\t\t\t);\n\t\t}\n\t\t\n\t\t// if there are no options other than user, just send them to the add field page\n\t\tif (!$type && count($options) == 1)\n\t\t{\n\t\t\t$type = 'user';\n\t\t}\n\t\t\n\t\t// association a field to a form\n\t\tif ($formId && $type)\n\t\t{\n\t\t\t$default = array(\n\t\t\t\t'field_id' => null,\n\t\t\t\t'form_id' => $this->_input->filterSingle('form_id', XenForo_Input::UINT),\n\t\t\t\t'display_order' => $this->_getFieldModel()->getGreatestDisplayOrderByFormId($formId) + 10,\n\t\t\t\t'field_type' => 'textbox',\n\t\t\t\t'field_choices' => '',\n\t\t\t\t'match_type' => 'none',\n\t\t\t\t'match_regex' => '',\n\t\t\t\t'match_callback_class' => '',\n\t\t\t\t'match_callback_method' => '',\n\t\t\t\t'max_length' => 0,\n\t\t\t\t'min_length' => 0,\n\t\t\t\t'required' => 0,\n\t\t\t\t'type' => $type,\n\t\t\t\t'active' => 1,\n\t\t\t\t'pre_text' => '',\n\t\t\t\t'post_text' => ''\n\t\t\t);\n\t\t\t\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t case 'global':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-global-field');\n\t\t }\n\t\t\t case 'template':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-template-field');\n\t\t }\n\t\t\t default:\n\t\t {\n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// adding a global/template field\n\t\telse if (!$formId && $type)\n\t\t{\n\t\t $default = array(\n\t 'field_id' => null,\n\t 'field_type' => 'textbox',\n\t 'field_choices' => '',\n\t 'match_type' => 'none',\n\t 'match_regex' => '',\n\t 'match_callback_class' => '',\n\t 'match_callback_method' => '',\n\t 'max_length' => 0,\n\t\t \t'min_length' => 0,\n\t 'type' => $type,\n\t\t \t'pre_text' => '',\n\t\t \t'post_text' => ''\n\t\t );\n\t\t \n\t\t if ($type != 'global')\n\t\t {\n\t\t \t$default['display_order'] = 1;\n\t\t \t$default['required'] = 0;\n\t\t \t$default['active'] = 1;\n\t\t }\n\t\t \n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t}\n\t\t\n\t\t// association type\n\t\telse\n\t\t{\n\t\t\t$viewParams = array(\n\t\t\t\t'formId' => $formId,\n\t\t\t\t'options' => $options\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->responseView('KomuKu_SimpleForms_ViewAdmin_Field_AddType', 'kmkform__field_add_type', $viewParams);\n\t\t}\n\t}", "public function add(Field $field)\n\t{\n\t\t$this->addItem($field);\n\t}", "public function add(Field $field)\n\t{\n\t\t$this->addItem($field);\n\t}", "public function onAddField()\n {\n return $this->makePartial('create_field_form');\n }", "public function addField($field) {\n\t\t$this->fields[] = $field;\n\t}", "protected function addField() {\n foreach(func_get_args() as $argument) {\n if ( (!is_null($argument)) && (is_array($argument)) ) {\n $this->form_fields[$argument['name']] = new UIFormField($argument);\n }\n }\n return $this;\n }", "public function addField($field_name){\n\t\t$this->Fields[$field_name] = new Field($field_name);\n\t}", "public function addField(Field $field) {\n\t\t$this->fields[] = $field;\n\t}", "public function add_field( $name, $field ) {\n\n\t\t$this->custom_fields[ $name ] = $field;\n\n\t}", "public function addSettingField( $asField ) {\n $this->oForm->addField( $asField ); \n }", "private function addField ( $type, \\r8\\iface\\Form\\Field $field )\n {\n if ( !$field->isHidden() ) {\n $tpl = clone $this->fieldTpl;\n $tpl->set( \"type\", $type );\n $tpl->set( \"field\", $field->__toString() );\n $tpl->set( \"label\", $field->getLabelTag()->__toString() );\n $tpl->set( \"errors\", $this->getErrorTpl( $field->validate() ) );\n $tpl->set( \"showErrors\", $this->showErrors );\n $this->fields->add( $tpl );\n }\n }", "function add_field($field, $value) {\n // sent to paypal as POST variables. If the value is already in the\n // array, it will be overwritten.\n\n $this->fields[\"$field\"] = $value;\n }", "function add_field($field, $value) {\n // sent to paypal as POST variables. If the value is already in the \n // array, it will be overwritten.\n \n $this->fields[\"$field\"] = $value;\n }", "public function register_field()\n {\n }", "function add_field($field, $value) \n {\n // sent to paypal as POST variables. If the value is already in the \n // array, it will be overwritten.\n \n $this->fields[\"$field\"] = $value;\n }", "function add(){\n global $wpdb;\n global $DOPBSP;\n \n $field_id = $_POST['field_id'];\n $position = $_POST['position'];\n $language = $_POST['language'];\n \n $wpdb->insert($DOPBSP->tables->forms_fields_options, array('field_id' => $field_id,\n 'position' => $position,\n 'translation' => $DOPBSP->classes->translation->encodeJSON('FORMS_FORM_FIELD_SELECT_ADD_OPTION_LABEL')));\n $id = $wpdb->insert_id;\n $select_option = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->forms_fields_options.' WHERE id=%d',\n $id));\n \n $DOPBSP->views->backend_form_field_select_option->template(array('select_option' => $select_option,\n 'language' => $language));\n \n die();\n }", "public function edit_field_add($mform) {\n // Create the form field.\n $mform->addElement('editor', $this->inputname, format_string($this->field->name), null, null);\n $mform->setType($this->inputname, PARAM_RAW); // We MUST clean this before display!\n }", "public function addMetaFieldsToAddForm()\n\t{\n\t\t$interval = $this->getMetaFields('interval');\n\t\t$animation = $this->getMetaFields('animation');\n\n\t\t?>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"interval\">Tijd tussen slides</label>\n\t\t\t\t<input name=\"interval\" id=\"interval\" type=\"text\" value=\"<?php echo $interval;?>\" size=\"40\">\n\t\t\t\t<p class=\"description\">De tijd tussen slides in milliseconden (1000ms = 1s).</p>\n\t\t\t</div>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"animation\">Animatie</label>\n\t\t\t\t<select name=\"animation\" id=\"animation\">\n\t\t\t\t\t<option <?php selected($animation, 'slide'); ?> value=\"slide\">Slide</option>\n\t\t\t\t\t<option <?php selected($animation, 'fade'); ?> value=\"fade\">Fade</option>\n\t\t\t\t</select>\n\t\t\t\t<p class=\"description\">Selecteer de animatie die gebruikt wordt door de slideshow.</p>\n\t\t\t</div>\n\t\t<?php\n\t}", "function display_add_field($recordid = 0, $formdata = NULL) {\n return $this->display_browse_field($recordid, 'addtemplate');\n }", "function addField($f, $as=null) {\n\t\tif ($f != \"*\") {\n\t\t\t$f = \"`\".$f.\"`\";\n\t\t}\n\t\t$this->fields[] = array($this->getTable().\".\".$this->db->escape_string($f), $this->db->escape_string($as));\n\t\treturn $this;\n\t}", "public function AddField()\n {\n echo 'Создалась VirtualCategory - метод Field <hr>';\n }", "public function addField($field, $value=null) {\n $this->fields[] = $field;\n if ($value != null) $this->set($field, $value);\n }", "public function xadmin_createfield() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$field_title = $args [1];\n\t\t$field_type = $args [2];\n\t\t\n\t\t/* Load Model */\n\t\t$field = $this->getModel ( 'field' );\n\t\t$this->session->returnto ( 'fields' );\n\t\t\n\t\t/* create the form */\n\t\t$field->createNewField ( $field_title, $field_type );\n\t\t\n\t\t$this->loadPluginModel ( 'fields' );\n\t\t$plug = Plugins_Fields::getInstance ();\n\t\t\n\t\t/* allow changes to be made by plugin */\n\t\t$plug->trigger ( 'onAfterCreateField', $field );\n\t\t\n\t\t/* allow changes to be made by plugin - extend schema of data table */\n\t\t$plug->trigger ( 'onAfterCreateField_ExtendDataTable', $field );\n\t\t\n\t\t$plug->trigger ( 'onAfterSaveNewField', $field );\n\t\t\n\t\t$this->setArguments ( array ($field->id ) );\n\t\t\n\t\t$this->_registry->setValue ( 'usedTabs', 1 );\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( '_editField' );\n\t}", "public function addExtraField($field,$value){\n $this->extraFields[$field] = $value;\n }", "public function addField($data) {\n $field = $data['field'];\n $class = 'AetherORM' . ucfirst($data['type']) . 'Field';\n $this->fields[$field] = new $class($data['default'], $data['null']);\n }", "public function setField($form_field) {\n $new_form_field = new UIFormField($form_field);\n $this->form_fields[$new_form_field->name] = $new_form_field;\n }", "function ic_add_register_field() {\n\t?>\n\t<p>\n\t\t<label for=\"invite_code\"><?php echo esc_html( 'Invite Code' ); ?></label>\n\t\t<input type=\"text\" name=\"invite_code\" id=\"invite_code\" class=\"input\" size=\"25\" />\n\t</p>\n\t<?php\n}", "public function addField( $table, $field, $type, $default=NULL );", "protected function & createField() {\n\t\t# Initialize\n\t\t$linker =& $this->getLinker();\n\t\t# Create Form FIELD!\n\t\t$linker->create($this);\n\t\t# Chain\n\t\treturn $this;\n\t}", "public function addCustomField()\r\n {\r\n $data['field'] = array('custom_field_id' => '', 'label' => '', 'value' => '');\r\n echo $this->load->view('admin/jobs/custom-field', $data, TRUE);\r\n }", "function add_field( $args = array() ) {\n\t\t$args['section'] = $this->slug;\n\t\t$args['settings_page'] = $this->settings_page;\n\t\t$fields[$args['slug']] = new WP_Settings_Field( $args );\n\t\treturn $this;\n\t}", "public function onCreateField()\n {\n $post = post();\n $flags = FieldManager::makeFlags(\n in_array('enabled', $post['flags']),\n in_array('registerable', $post['flags']),\n in_array('editable', $post['flags']),\n in_array('encrypt', $post['flags'])\n );\n\n $validation = $this->makeValidationArray($post);\n\n $data = $this->makeDataArray($post);\n\n $feedback = FieldManager::createField(\n $post['name'],\n $post['code'],\n $post['description'],\n $validation,\n $post['type'],\n $flags,\n $data\n );\n\n FieldFeedback::with($feedback, true)->flash();\n\n return Redirect::to(Backend::url('clake/userextended/fields/manage'));\n }", "protected function createFormFields() {\n\t}", "public function add_field( $section_id, $field ) {\n\t\t$this->sections[$section_id]->add_field( $field );\r\n\t\r\n\t\treturn $this;\r\n\t}", "function external_url_taxonomy_add_new_meta_field() {\n ?>\n <div class=\"form-field\">\n <label for=\"term_meta[custom_term_meta]\"><?php _e( 'External URL:', 'external_url' ); ?></label>\n <input type=\"text\" name=\"term_meta[custom_term_meta]\" id=\"term_meta[custom_term_meta]\" value=\"\">\n <p class=\"description\"><?php _e( 'Enter a value for this field','external_url' ); ?></p>\n </div>\n<?php\n}", "public function addField(Field $field){\n $getter = 'get' . ucfirst($field->getName());\n $field->setValue($this->getEntity()->$getter());\n $this->fields[] = $field;\n return $this;\n }", "public function addField(Element &$field)\n {\n $this->fields[] = $field;\n }", "public function createField($field, $value) {\n // render normal\n }", "public function addField( $field=null )\n {\n if( is_string( $field ) )\n $field = new WebLab_Data_Field( $field );\n\n if( empty( $field ) )\n \treturn null;\n \n $field->setTable( $this );\n $name = $field->getAlias();\n if( empty( $name ) ) {\n $name = $field->getName();\n }\n $this->_fields[ $name ] = $field;\n\n return $field;\n }", "public function create_field() {\n\n return sprintf(\n '<input type=\"hidden\" id=\"%s\" name=\"%s\" value=\"%s\" />',\n esc_attr( $this->action ),\n esc_attr( $this->action ),\n esc_attr( (string) wp_create_nonce( $this->action ) )\n );\n\n }", "public function addField(FieldDescriptor $field)\n {\n $this->_fields[] = $field;\n }", "function ting_admin_boost_add_field_ahah() {\n $form_state = array('submitted' => FALSE);\n $form_build_id = $_POST['form_build_id'];\n\n // Drupal is not aware of this new elements existence and will not\n // process it. We retreive the cached form, add the element, and resave.\n $form = form_get_cache($form_build_id, $form_state);\n\n // Add one to the current highest delta value to get the next one.\n $delta = max(element_children($form['ting_boost_fields']['fields'])) + 1;\n\n // Added field and update form cache\n $form['ting_boost_fields']['fields'][$delta] = array(\n '#type' => 'ting_boost_field',\n '#default_value' => array(),\n );\n form_set_cache($form_build_id, $form, $form_state);\n\n // Reset form vars\n $form += array(\n '#post' => $_POST,\n '#programmed' => FALSE,\n );\n\n // Rebuild the form.\n $form = form_builder($_POST['form_id'], $form, $form_state);\n\n // Render and return the new field.\n drupal_json(array(\n 'data' => drupal_render($form['ting_boost_fields']['fields'][$delta]),\n 'status' => TRUE));\n exit();\n}", "public function addField($field, $xpath) {\n $this->extraFields[$field] = $xpath;\n }", "function add($data){\n if(array_key_exists($data['id'], $this->fields)){\n exit(\"Field with ID: '\".$data['id'].\"' already exists.\");\n }\n if(!isset($data['validate'])){\n $data['validate'] = false;\n }\n if(!isset($data['inline'])){\n $data['inline'] = null;\n }\n if(!isset($data['value'])){\n $data['value'] = null;\n }\n if(!isset($data['readonly'])){\n $data['readonly'] = false;\n }\n\n $this->fields[$data['id']] = $data;\n }", "public function getAddForm();", "protected function addField(SharpFormField $field)\n {\n $this->fields[] = $field;\n\n return $this;\n }", "public static function create() {\n\t\tFrmAppHelper::permission_check('frm_edit_forms');\n check_ajax_referer( 'frm_ajax', 'nonce' );\n\n\t\t$field_type = FrmAppHelper::get_post_param( 'field_type', '', 'sanitize_text_field' );\n\t\t$form_id = FrmAppHelper::get_post_param( 'form_id', 0, 'absint' );\n\n\t\t$field = self::include_new_field( $field_type, $form_id );\n\n // this hook will allow for multiple fields to be added at once\n do_action('frm_after_field_created', $field, $form_id);\n\n wp_die();\n }", "public function addField($table_alias, $field, $alias = NULL);", "public function insertFormLabel()\r\n {\r\n\r\n $formfield = new FormFields();\r\n $formfield->setName('name');\r\n $formfield->setLabel('name');\r\n $formfield1 = new FormFields();\r\n $formfield1->setName('surname');\r\n $formfield1->setLabel('surname');\r\n $formfield2 = new FormFields();\r\n $formfield2->setName('email');\r\n $formfield2->setLabel('email');\r\n $formfield3 = new FormFields();\r\n $formfield3->setName('telephone');\r\n $formfield3->setLabel('telephone');\r\n\r\n $this->entityManage->persist($formfield);\r\n $this->entityManage->persist($formfield1);\r\n $this->entityManage->persist($formfield2);\r\n $this->entityManage->persist($formfield3);\r\n $this->entityManage->flush();\r\n\r\n }", "public function addField( $field, $config = array() ) {\r\n return $this->addFields($field, $config);\r\n\r\n }", "public function createfield(){\n \treturn view('field.create');\n }", "public function add_field( $read = false, $sel = false ) {\n\t\t$this->read_only = $read;\n\t\t$this->selectable = $sel;\n\t\tparent::add_field();\n\t}", "public function addField($field)\n {\n $this->fields[] = $field;\n\n return $this;\n }", "public function addField(DataField $field)\r\n\t{\r\n\t\t$this->fields[] = $field;\r\n\t\tif ($field instanceOf TableField && $field->isPrimaryKey)\r\n\t\t{\r\n\t\t\t$this->primaryKey = $field->name;\r\n\t\t}\r\n\t}", "public function addField(string $field)\n {\n // verify if it exists\n if (!in_array($field, $this->fields, true)) {\n $this->fields[] = $field;\n }\n }", "function create_field($field)\n\t{\n\t\techo '<input type=\"text\" value=\"' . $field['value'] . '\" id=\"' . $field['name'] . '\" class=\"' . $field['class'] . '\" name=\"' . $field['name'] . '\" />';\n\t\techo '<div id=\"map\"></div>';\n\t}", "public function add() {\r\n $this->api->loadView('contact-form',\r\n array(\r\n 'row' => $this->model\r\n ));\r\n }", "function addLevel()\n\t{\n\t\tglobal $tpl;\n\n\t\t$this->initLevelForm(\"create\");\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "function acf_add_local_field($field, $prepared = \\false)\n{\n}", "function t_add_texonomy_field() {\n echo '<div class=\"form-field\">\n\t\t<label for=\"taxonomy_displayorder\">' . __('Display Order', 'zci') . '</label>\n\t\t<input type=\"text\" name=\"taxonomy_displayorder\" id=\"taxonomy_displayorder\" value=\"1\" />\n\t</div>';\n}", "function render_field( $field ) { ?>\n <input type=\"text\" value=\"<?php echo esc_attr( $field[ 'value' ] ); ?>\" id=\"<?php echo esc_attr( $field[ 'id' ] ); ?>\" name=\"<?php echo esc_attr( $field[ 'name' ] ); ?>\" class=\"rhicomoon-select-field <?php echo esc_attr( $field[ 'class' ] ); ?>\" data-json-url=\"<?php echo esc_attr( $field[ 'json_url' ] ); ?>\"/>\n <?php }", "public function addForm() {\n $this->view->displayForm();\n }", "public function add_field($name, $type)\n {\n $this->fields[$name] = $type;\n }", "public function addField(string $name): Field\n {\n return $this->validator->addField($name);\n }", "public function setUserfield($value);", "public function add(string $fieldName): static;", "function create_field($field)\n{\n}", "function field($name, $value='') {\n\t\t$str = '<div class=\"field is-size-6\"><label class=\"label\" for=\"'.$name.'-input\">'.$name.'</label>';\n\t\t$str .= '<div class=\"control\"><input class=\"input\" name=\"'.$name.'\" id=\"'.$name.'-input\" type=\"text\" value=\"'.$value.'\"></div></div>'.\"\\n\";\n\t\treturn $str;\n\t}", "public function addField( $key, $value = null )\n {\n $this->page->$key = $value;\n $this->fields[ $key ] = null;\n $this->fields[ $key ] =& $this->page->$key;\n }", "function addText($name,$display=null,$value=null, $disabled=null, $maxlength=null, $class=null, $id=null){\r\n\t\t\t$this->formFields[$name] = array(\r\n\t\t\t\t\t\"name\" => $name,\r\n\t\t\t\t\t\"type\" => \"text\", //defines the type of the input\r\n\t\t\t\t\t\"label\" => $display,\r\n\t\t\t\t\t\"value\" => $value,\r\n\t\t\t\t\t\"disabled\" => $disabled,\r\n\t\t\t\t\t\"maxlength\" => $maxlength,\r\n\t\t\t\t\t\"class\" => $class,\r\n\t\t\t\t\t\"id\" => $id\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t//add class if null\r\n\t\t\tif($class == null){\r\n\t\t\t\t$this->formFields[$name][\"class\"] = \"c\" . $name;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add id\r\n\t\t\tif($id == null){\r\n\t\t\t\t$this->formFields[$name][\"id\"] = \"i\" . $name;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add display\r\n\t\t\tif($display == null){\r\n\t\t\t\t$this->formFields[$name][\"label\"] = ucfirst($name) . \":\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public function addField(FieldDataProvider $provider)\n {\n $this->fields[] = $provider;\n return $this;\n }", "public function addMetaFieldsToEditForm()\n\t{\n\t\t$interval = $this->getMetaFields('interval');\n\t\t$animation = $this->getMetaFields('animation');\n\n\t\t?>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t<label for=\"interval\">Tijd tussen slides</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input name=\"interval\" id=\"interval\" type=\"text\" value=\"<?php echo $interval;?>\" size=\"40\">\n\t\t\t\t\t<p class=\"description\">De tijd tussen slides in milliseconden (1000ms = 1s).</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t<label for=\"animation\">Animatie</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<select name=\"animation\" id=\"animation\">\n\t\t\t\t\t\t<option <?php selected($animation, 'slide'); ?> value=\"slide\">Slide</option>\n\t\t\t\t\t\t<option <?php selected($animation, 'fade'); ?> value=\"fade\">Fade</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<p class=\"description\">Selecteer de animatie die gebruikt wordt door de slideshow.</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php\n\t}", "public function add($field)\n {\n if (!($field instanceof Base)) {\n $field = $this->convertToField($field);\n }\n\n if ($field->getKey()) {\n $this->fields[$field->getKey()] = $field;\n } else {\n $this->fields[] = $field;\n }\n $field->setForm($this);\n return $this;\n }", "public function addFormField(FieldType $field)\n {\n $this->form->addField($field);\n\n return $this;\n }", "private\n\t\tfunction add_field(\n\t\t\t$key, $title, $description, $type, $section, $required = true\n\t\t) {\n\t\t\tadd_settings_field(\n\t\t\t\t$key,\n\t\t\t\t$title,\n\t\t\t\tarray( $this, 'render_' . $type ),\n\t\t\t\tself::LINKID_SETTINGS_PAGE_ID,\n\t\t\t\t$section,\n\t\t\t\tarray(\n\t\t\t\t\t'key' => $key,\n\t\t\t\t\t'description' => $description,\n\t\t\t\t\t'required' => $required\n\t\t\t\t)\n\t\t\t);\n\n\t\t}", "public function addForm()\n {\n $this->getState()->template = 'displaygroup-form-add';\n $this->getState()->setData([\n 'help' => $this->getHelp()->link('DisplayGroup', 'Add')\n ]);\n }", "private function add_field($field_name, $field_description = '', $field_default_value = '', $field_type = 'text')\n\t{\n\t\tif(!is_array($this->fields))\n\t\t\t$this->fields = array();\n\n\t\t$this->fields[$field_name] = array('name' => $field_name, 'description' => $field_description, 'default_value' => $field_default_value, 'type' => $field_type);\n\t}", "public function renderAdd()\r\n\t{\r\n\t\t$this['tarifForm']['save']->caption = 'Přidat';\r\n\t}", "function add_additional_field($details) {\r\n\t\t$sql = \"INSERT INTO sys_man_additional_fields (field_name, field_type, field_placement, group_id) VALUES (?, ?, ?, ?)\";\r\n\t\t$data=array(\"$details->field_name\", \"$details->field_type\", \"$details->field_placement\", \"$details->group_id\");\r\n\t\t$query = $this->db->query($sql, $data);\r\n\t\treturn;\r\n\t}", "function addExtraCategoryFields_editForm($tag) {\n\t\t$this->addExtraCategoryFields($tag, true);\n\t}", "function ting_admin_ranking_add_field_ahah() {\n $form_state = array('submitted' => FALSE);\n $form_build_id = $_POST['form_build_id'];\n\n // Drupal is not aware of this new elements existence and will not\n // process it. We retreive the cached form, add the element, and resave.\n $form = form_get_cache($form_build_id, $form_state);\n\n // Add one to the current highest delta value to get the next one.\n $delta = max(element_children($form['ting_ranking_fields'])) + 1;\n\n // Added field and update form cache\n $form['ting_ranking_fields'][$delta] = array(\n '#type' => 'ting_ranking_field',\n '#default_value' => array(),\n );\n form_set_cache($form_build_id, $form, $form_state);\n\n // Reset form vars\n $form += array(\n '#post' => $_POST,\n '#programmed' => FALSE,\n );\n\n // Rebuild the form.\n $form = form_builder($_POST['form_id'], $form, $form_state);\n\n // Render and return the new field.\n drupal_json(array(\n 'data' => drupal_render($form['ting_ranking_fields'][$delta]),\n 'status' => TRUE));\n exit();\n}", "public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {}", "public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {}", "public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {}", "public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {}", "public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {}", "public function field($field)\n {\n $this->fields[] = $field;\n\n return $this;\n }", "public function addField($field, array $data)\n {\n $this->fields[$field] = $this->prepareField($data);\n }", "public function addform()\n\t{\n\t\t\t$this->setMethod('post');\n\n\t\t\t\n\t\t\t$this->addElement('radio', 'status', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'multiOptions' => array(\n\t\t\t\t\t'1' => IN_PROGRESS,\n\t\t\t\t\t'2' => 'Closed'\n\t\t\t\t\t\n\t\t\t\t),\n\t\t\t\t'value' => '1' //key of multiOption\n\t\t\t));\n\t\t\n\t\t\n\n\t\t\t$this->addElement('textarea', 'Comment', array( \n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'maxlength' =>'50',\n\t\t\t\t\t\n\t\t\t\t\t'class' => 'validate[required] text-input',\n\t\t\t\t\t'decorators'=>Array(\n\t\t\t\t\t\t'ViewHelper','Errors'\n\t\t\t\t\t),\t\t \n\t\t\t));\n\n\t\t\t\n\n\t\t\t\n\n\n\t\n\t\t\t\t\n\t\t\t$this->addElement('submit', 'submit', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t\t\t'label' => 'Submit',\n\t\t\t));\n\t\t\t\n\t\t\t// And finally add some CSRF protection\n\t\t\t$this->addElement('hash', 'csrf', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t));\t\n\t}", "public function add_loop_field( $args, $assoc_args ) {\n\n\t\tlist( $id ) = $args;\n\n\t\t$defaults = array(\n\t\t\t\"field\" => ''\n\t\t);\n\n\t\t$loop_args = wp_parse_args( $assoc_args, $defaults );\n\n\t\ttry {\n\n\t\t\t$view = WPV_View::get_instance( (int) $id );\n\n\t\t\t$view->begin_modifying_view_settings();\n\t\t\t$view->begin_modifying_loop_settings();\n\n\t\t\t$view->loop_meta_html = str_replace( \"</wpv-loop>\", sprintf( \" %s </wpv-loop>\", $loop_args['field'] ), $view->loop_meta_html );\n\n\t\t\t$view->finish_modifying_loop_settings();\n\t\t\t$view->finish_modifying_view_settings();\n\n\t\t\t\\WP_CLI::success( __( 'Added a new field to the loop', 'toolset-cli' ) );\n\n\t\t} catch ( \\Exception $e ) {\n\t\t\t\\WP_CLI::error( __( 'There was an error while creating new Views instance.', 'toolset-cli' ) );\n\t\t}\n\t}", "public function addfieldsubmit(array &$form, FormStateInterface &$form_state) {\n $max = $form_state->get('fields_count') + 1;\n $form_state->set('fields_count',$max);\n $form_state->setRebuild(TRUE);\n }", "public function add() {\n\t\t$user_id = $this->UserAuth->getUserId();\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->request->data[\"Contact\"][\"user_id\"] = $user_id;\n\t\t\t$this->Contact->saveAssociated($this->request->data, array(\"deep\" => true));\n\t\t}\n\t\t\n\t\t$this->render('form');\n\t}", "public function add(UpdateFieldInterface $field)\n {\n $this->add[] = $field;\n }" ]
[ "0.8481527", "0.8202712", "0.7757113", "0.7730563", "0.7713683", "0.7713683", "0.7540773", "0.7109803", "0.70277035", "0.6947579", "0.6947579", "0.69466215", "0.690043", "0.6864778", "0.6852245", "0.6815211", "0.67548513", "0.6719937", "0.67175573", "0.6715191", "0.6665339", "0.66323787", "0.6628252", "0.6573591", "0.6519956", "0.6464017", "0.6426375", "0.6390972", "0.6356949", "0.6352406", "0.6348075", "0.63419634", "0.63056284", "0.63039106", "0.6266566", "0.62632895", "0.62552905", "0.623842", "0.6223502", "0.6213658", "0.6212599", "0.6212184", "0.6188457", "0.61418384", "0.6137746", "0.61374575", "0.61285174", "0.6125164", "0.61139566", "0.6102489", "0.6100963", "0.6086377", "0.60841656", "0.6075821", "0.6068407", "0.60634756", "0.60598063", "0.6057044", "0.6054269", "0.60538805", "0.60512716", "0.6049988", "0.6035359", "0.60333437", "0.60243016", "0.60193485", "0.6005964", "0.6005069", "0.6001432", "0.5998362", "0.5997378", "0.5990797", "0.59785366", "0.5976726", "0.5975925", "0.59612", "0.59578645", "0.5954311", "0.59420013", "0.5935379", "0.59342307", "0.5922395", "0.5922346", "0.5918729", "0.5918667", "0.59040326", "0.5902823", "0.58754367", "0.5869503", "0.58570886", "0.58570886", "0.58570886", "0.58570886", "0.58570886", "0.58476096", "0.58474165", "0.5839433", "0.5830948", "0.5825607", "0.58241373", "0.58213884" ]
0.0
-1
Add a hidden field to the form
public function add_hidden($hidden_element) { array_push($this->hidden_elements, $hidden_element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addHiddenField($name,$value) {\n $this->formLines[] = '<input type=\"hidden\" name=\"'.$name.'\" value=\"'.$value.'\">';\n }", "function form_element_hidden( $name, $value )\n{\n\treturn sprintf( \"<input type=\\\"hidden\\\" name=\\\"%s\\\" value=\\\"%s\\\" />\\n\",\n\t\t$name, $value );\n}", "protected function addHiddenField(Form $form, $name, $value)\n {\n $form->add(\n array(\n 'name' => $name,\n 'type' => 'Zend\\Form\\Element\\Hidden',\n 'attributes' => array(\n 'value' => $value\n )\n )\n );\n }", "function form_hidden($field, $options) {\n $defaults = array(\n 'class' => array('input', 'hidden'),\n );\n\n $options = array_merge($defaults, $options);\n\n $field = strtolower($field);\n\n $output = '<input type=\"hidden\" name=\"' . $field . '\" id=\"' . form__field_id($field) . '\"';\n\n if(!empty($_POST[$field])) {\n $output .= ' value=\"'. $_POST[$field] . '\"';\n }\n\n $output .= ' />';\n\n return html__output($output);\n}", "function _field_hidden($fval) \n {\n\n $myval = (empty($fval) && !empty($this->opts))? $this->opts : $fval;\n\n return sprintf(\"<input type=\\\"hidden\\\" name=\\\"%s\\\" id=\\\"%s\\\" class=\\\"%s\\\" value=\\\"%s\\\" />\",\n $this->fname,\n $this->fname,\n (!empty($this->attribs['class']))? $this->attribs['class'] : '',\n $this->_htmlentities($myval)\n ) ;\n }", "function hidden_field($object, $field, $options = array()) {\n $form = new FormHelper($object, $field);\n return $form->to_input_field_tag(\"hidden\", $options);\n}", "function addHiddenField( &$editpage, &$output ) {\r\n\t\t\r\n\t\t$output->addHTML(\tHtml::input( 'egHidden', '', 'hidden', array(\r\n\t\t\t\t\t\t\t\t'id' => 'egHidden'\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public function addHidden() {\n parent::createHiddenWithValidator(\"id\");\n }", "public function addHidden() {\n parent::createHiddenWithValidator(\"id\");\n }", "protected function printHiddenFormField($nameField, $value){\n ?>\n <input type=\"hidden\" name=\"<?php echo $nameField ?>\" value=\"<?php echo $value ?>\" />\n <?php\n }", "function _getHiddenField( $name, $value, $id )\r\n\t{\r\n\t\treturn \"<input class='fabrikinput inputbox' type='hidden' name='$name' value='$value' id='$id' />\\n\";\r\n\t}", "function createHiddenField( $name, $value = '' ) {\n\t\t$nameAttr = $this->makePiVar(htmlspecialchars($name));\n\t\treturn '<input type=\"hidden\" name=\"' . $nameAttr . '\" value=\"' . $value . '\" />';\n\t}", "public static function hiddenField($name,$value='',$option=array()) {\n\t\t$option['name']=$name;\n\t\t$option['type']='hidden';\n\t\t$option['value']=$value;\n\t return self::htmltag('input',$option);\n\t}", "public function hidden ( \\r8\\Form\\Hidden $field )\n {\n $this->addField( \"hidden\", $field );\n }", "function barnelli_wp_hidden_input( $field ) {\n\tglobal $thepostid, $post;\n\n\t$thepostid = empty( $thepostid ) ? $post->ID : $thepostid;\n\t$field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );\n\t$field['class'] = isset( $field['class'] ) ? $field['class'] : '';\n\n\techo '<input type=\"hidden\" class=\"' . esc_attr( $field['class'] ) . '\" name=\"' . esc_attr( $field['id'] ) . '\" id=\"' . esc_attr( $field['id'] ) . '\" value=\"' . esc_attr( $field['value'] ) . '\" /> ';\n}", "public function hidden(string $name, string $value): FormHelper\n {\n $this->html .= \"<input type=\\\"hidden\\\" name=\\\"${name}\\\" value=\\\"${value}\\\">\";\n return $this;\n }", "private static function _fetchHiddenField($value, $name){\r\n return '<input type=\"hidden\" id=\"'.$name.'\" name=\"'.$name.'\" value=\"'.$value.'\" />';\r\n }", "public static function form_field_hidden( $field, $key, $args, $value ) {\n\t\t$field .= '<input type=\"hidden\" class=\"input-text ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '\" name=\"' . esc_attr( $key ) . '\" id=\"' . esc_attr( $args['id'] ) . '\" placeholder=\"' . esc_attr( $args['placeholder'] ) . '\" value=\"' . esc_attr( $value ) . '\" />';\n\n\t\treturn $field;\n\t}", "public function coconutHidden($name,$value) {\necho \"<input type=hidden name='$name' value='$value'>\";\n}", "function mihidden($name, $value = null) {\n\tif ($value === null) {\n\t\treturn \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"[{\" . $name . \"}]\\\" />\";\n\t} else {\n\t\treturn \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"$value\\\" />\";\n\t}\n}", "public function addHidden($name, $value = NULL)\n\t{\n\t\treturn $this[$name] = new HiddenField($value);\n\t}", "public function ov_hidden($name, $value = '', $id = null){\n $hidden = new fe_hidden(array('name' => $name, 'value' => $value));\n $hidden->setId($id);\n \n if( isset($this->openForm) && is_array($this->openForm) )\n $this->openForm['fields'][] = $hidden;\n \n if( !$this->echoOff ) echo $hidden;\n return $hidden;\n }", "public function getHiddenInputField(){\n return $this->_hiddenInputField;\n }", "function input_hidden($element_name, $value){\r\n\tprint '<input type=\"hidden\" name=\"'.$element_name.'\" value=\"'.htmlentities($value, ENT_NOQUOTES, 'UTF-8').'\">';\r\n}", "function format_input_hidden($p_id, $p_value){\n\treturn '<input type=\"hidden\" id=\"' . $p_id . '\" name=\"' . $p_id . '\" value=\"' . $p_value . '\"/>';\n}", "function form_hidden($name, $value='', $arrayto='', $override = NULL) {\n\n\tif ($arrayto) {\n\t\t$name = $arrayto . \"[\" . $name . \"]\";\n\t}\n\n\t$value = html_form_escape($value, $override);\n\n\treturn \"<input type=\\\"hidden\\\" name=\\\"$name\\\" id=\\\"$name\\\" value=\\\"$value\\\" />\\n\";\n}", "function render_element_hidden() {\n\t\t\t$inputString = '<INPUT ';\n\t\t\t$inputString .= 'TYPE=\"hidden\" ';\n\t\t\t$inputString .= 'NAME=\"' . $this->name . '\" ';\n\t\t\t$inputString .= 'VALUE=\"' . $this->currentValue . '\" ';\n\t\t\t$inputString .= $this->internalExtra;\n\t\t\t$inputString .= '>';\n\t\t\t\n\t\t\treturn $this->returnSwitch($inputString);\n\t\t}", "function INPUThid($champs,$valeur)\n{ // Gestion des INPUT HIDDEN\n html('<input type=\"hidden\" name=\"'.$champs.'\" value=\"'.$valeur.'\">');\n}", "function zen_draw_hidden_field($name, $value = '', $parameters = '') {\n $field = '<input type=\"hidden\" name=\"' . zen_sanitize_string(zen_output_string($name)) . '\"';\n\n if (zen_not_null($value)) {\n $field .= ' value=\"' . zen_output_string($value) . '\"';\n } elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {\n $field .= ' value=\"' . zen_output_string(stripslashes($GLOBALS[$name])) . '\"';\n }\n\n if (zen_not_null($parameters)) $field .= ' ' . $parameters;\n\n $field .= ' />';\n\n return $field;\n }", "function add_hidden_field()\n{\n // Register the script like this for a plugin:\n wp_register_script( 'add_hidden_field', plugins_url( '/add_hidden_field.js', __FILE__ ), array( 'jquery' ) );\n // or\n // Register the script like this for a theme:\n wp_register_script( 'add_hidden_field', get_template_directory_uri() . '/add_hidden_field.js', array( 'jquery' ) );\n \n // For either a plugin or a theme, you can then enqueue the script:\n wp_enqueue_script( 'add_hidden_field' );\n}", "function acf_get_hidden_input($attrs = array())\n{\n}", "static function renderHiddenField($name, $value = null, $attributes = null)\n {\n if (!is_array($attributes)) $attributes = array();\n if (!isset($attributes['id'])) $attributes['id'] = $name;\n $attributes['type'] = 'hidden';\n $attributes['name'] = $name;\n $attributes['value'] = $value;\n self::renderSingleTag('input', $attributes);\n }", "private function _createHiddenIdField()\n {\n $idField = new Zend_Form_Element_Hidden('id');\n $idField->removeDecorator('DtDdWrapper')\n ->removeDecorator('HtmlTag')\n ->removeDecorator('Label');\n\n return $idField;\n }", "public function create_field() {\n\n return sprintf(\n '<input type=\"hidden\" id=\"%s\" name=\"%s\" value=\"%s\" />',\n esc_attr( $this->action ),\n esc_attr( $this->action ),\n esc_attr( (string) wp_create_nonce( $this->action ) )\n );\n\n }", "public function setHidden($value = TRUE);", "static public function hidden($name, $value = \"\", $attrib = \"\")\n {\n return \"<input type='hidden' name='$name' id='$name' value='$value' $attrib />\\n\";\n }", "protected function addSecuredHiddenFieldsRenderedToViewHelperVariableContainer() {}", "public function hiddenField($name)\n {\n return new HiddenField($this, $name);\n }", "public static function convert_hidden_field() {\n\n\t\t// Create a new Hidden field.\n\t\tself::$field = new GF_Field_Hidden();\n\n\t\t// Add standard properties.\n\t\tself::add_standard_properties();\n\n\t}", "public function createHiddenToken() {\n return '<input type=\"hidden\" name=\"access_token\" value=\"' . $this->getToken() . '\" />';\n }", "function give_is_form_grid_page_hidden_field( $id, $args, $form ) {\n\techo '<input type=\"hidden\" name=\"is-form-grid\" value=\"true\" />';\n}", "public function withHidden($hidden=true);", "public function hidden($element) {\n $element['#type'] = 'hidden';\n $element = $this->_setRender($element);\n $output = '<input type=\"hidden\" id=\"' . $element['#id'] . '\" name=\"'\n . $element['#name'] . '\" value=\"';\n $output .= isset($element['#value']) ? $element['#value'] : 1;\n $output .= '\"' . $element['_attributes_string'] . $this->_getDataWptId($element) . ' />';\n return $output;\n }", "function jabHtmlHidden($name, $value)\n{\n\t$value=htmlspecialchars($value);\n\techo \"<input type=\\\"hidden\\\" id=\\\"$name\\\" name=\\\"$name\\\" value=\\\"$value\\\">\\n\";\n}", "function hidden() {\n\t\t$args = func_get_args();\n\n\t\twhile (list($name,$val) = each($args[0]))\n\t\t\t$this->buffer .= \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"$val\\\" id=\\\"$name\\\" />\";\n\n\t\treturn $this->output();\n\t}", "function add_checkbox_hidden_field( $fields, $section ) {\n $fields['general'][] = [\n 'default' => 'save_email_enable_or_disable',\n 'type' => 'hidden',\n 'id' => 'save_email_enable_or_disable',\n\n ];\n return $fields;\n}", "function MakeInputRowHidden($id, $name, $title, $value)\n{\n echo <<<EOT\n<div class=\"form-group\" hidden>\n <label for=\"$id\">$title</label>\n <input id=\"$id\" type=\"text\" name=\"$name\" class=\"form-control\" value=\"$value\" novalidate>\n</div>\nEOT;\n}", "function addCSRFFormField(string $formName, string $fieldName = \"csrf_token\")\n{\n $token = setCSRFToken($formName);\n echo '<input type=\"hidden\" name=\"' . $fieldName . '\" value=\"' . $token . '\">';\n}", "public function transactionFormGetHiddenFields ();", "function __give_form_add_donation_hidden_field( $form_id, $args, $form ) {\n\t$id_prefix = ! empty( $args['id_prefix'] ) ? $args['id_prefix'] : '';\n\t?>\n\t<input type=\"hidden\" name=\"give-form-id-prefix\" value=\"<?php echo $id_prefix; ?>\"/>\n\t<input type=\"hidden\" name=\"give-form-id\" value=\"<?php echo intval( $form_id ); ?>\"/>\n\t<input type=\"hidden\" name=\"give-form-title\" value=\"<?php echo esc_html( $form->post_title ); ?>\"/>\n\t<input type=\"hidden\" name=\"give-current-url\" value=\"<?php echo esc_url( give_get_current_page_url() ); ?>\"/>\n\t<input type=\"hidden\" name=\"give-form-url\" value=\"<?php echo esc_url( give_get_current_page_url() ); ?>\"/>\n\t<?php\n\t// Get the custom option amount.\n\t$custom_amount = give_get_meta( $form_id, '_give_custom_amount', true );\n\n\t// If custom amount enabled.\n\tif ( give_is_setting_enabled( $custom_amount ) ) {\n\t\t?>\n\t\t<input type=\"hidden\" name=\"give-form-minimum\"\n\t\t value=\"<?php echo give_maybe_sanitize_amount( give_get_form_minimum_price( $form_id ) ); ?>\"/>\n\t\t<input type=\"hidden\" name=\"give-form-maximum\"\n\t\t value=\"<?php echo give_maybe_sanitize_amount( give_get_form_maximum_price( $form_id ) ); ?>\"/>\n\t\t<?php\n\t}\n\n\t$data_attr = sprintf(\n\t\t'data-time=\"%1$s\" data-nonce-life=\"%2$s\" data-donor-session=\"%3$s\"',\n\t\ttime(),\n\t\tgive_get_nonce_life(),\n\t\tabsint( Give()->session->has_session() )\n\t);\n\n\t// WP nonce field.\n\techo str_replace(\n\t\t'/>',\n\t\t\"{$data_attr}/>\",\n\t\tgive_get_nonce_field( \"give_donation_form_nonce_{$form_id}\", 'give-form-hash', false )\n\t);\n\n\t// Price ID hidden field for variable (multi-level) donation forms.\n\tif ( give_has_variable_prices( $form_id ) ) {\n\t\t// Get the default price ID.\n\t\t$default_price = give_form_get_default_level( $form_id );\n\t\t$price_id = isset( $default_price['_give_id']['level_id'] ) ? $default_price['_give_id']['level_id'] : 0;\n\n\t\techo sprintf(\n\t\t\t'<input type=\"hidden\" name=\"give-price-id\" value=\"%s\"/>',\n\t\t\t$price_id\n\t\t);\n\t}\n}", "public function hidden($name, $value = NULL, array $attributes = NULL) {\n $this->load_values($name, $value, $attributes);\n\t\treturn Kohana_Form::hidden($name, $value, $attributes);\n\t}", "function object_input_hidden_tag($object, $method, $options = array(), $default_value = null)\r\n{\r\n $options = _parse_attributes($options);\r\n\r\n $value = _get_object_value($object, $method, $default_value);\r\n\r\n return input_hidden_tag(_convert_method_to_name($method, $options), $value, $options);\r\n}", "protected function renderHiddenFieldForEmptyValue() {}", "protected function renderHiddenInput()\n {\n $options = $this->hiddenInputOptions;\n if (!isset($options['name'])) {\n $options['name'] = Html::getInputName($this->model, $this->attribute);\n }\n if (!isset($options['value'])) {\n $options['value'] = $this->_context()->postParamStoragePrefix . $this->_file()->getData();\n }\n return Html::activeHiddenInput($this->model, $this->attribute, $options);\n }", "public function hidden($name, $value = null, $options = array())\n {\n return $this->form->input('hidden', $name, $value, $options);\n }", "function set_hidden_post_id_value($value, $post_id, $field) {\n return $post_id;\n}", "public static function hidden($name, $value = NULL, array $attributes = NULL)\n\t{\n\t\t$attributes['type'] = 'hidden';\n\n\t\treturn Form::input($name, $value, $attributes);\n\t}", "function block_editor_meta_box_hidden_fields()\n {\n }", "function um_add_form_identifier( $args ) {\r\n\t?>\r\n\t\t<input type=\"hidden\" name=\"form_id\" id=\"form_id_<?php echo $args['form_id']; ?>\" value=\"<?php echo $args['form_id']; ?>\" />\r\n\t<?php\r\n}", "function the_block_editor_meta_box_post_form_hidden_fields($post)\n {\n }", "public function hiddenTag($name = NULL, $value = NULL, $options = NULL)\n {\n return '<input type=\"hidden\" name=\"' . $name . '\" value=\"' . $value . '\" ' . $this->options2str($options) . '/>';\n }", "function form_init_elements()\r\n {\r\n $this->add_hidden_element(\"swimmeetid\") ;\r\n\r\n // This is used to remember the action\r\n // which originated from the GUIDataList.\r\n \r\n $this->add_hidden_element(\"_action\") ;\r\n }", "public function RenderHidden() {\n\n $List= $this->Hidden;\n $List['_FormName']= $this->Name;\n $Result= array();\n foreach($List as $k=>$v) {\n $Result[]= $this->RenderTag('input', array(\n 'type'=> 'hidden',\n 'name'=> $k,\n 'value'=> $v\n ));\n }\n return implode('', $Result);\n }", "public function hidden($name, $value = NULL, $attr = array())\n\t{\n\t\t$attr['type'] = 'hidden';\n\t\t\n\t\treturn $this->input($name, $value, $attr);\n\t}", "public function print_value_input(){\n return false;\n ?>\n <input\n class=\"<?php echo RB_Field_Factory::get_input_class_link(); ?>\"\n rb-control-final-value\n name=\"<?php echo $this->id; ?>\"\n value=\"<?php echo $this->value; ?>\"\n type=\"hidden\"></input>\n <?php\n }", "function dumpFormItems()\r\n {\r\n if($this->_onclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n }", "function dumpFormItems()\r\n {\r\n if($this->_onclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n }", "public function setHiddenFlag($hidden = true) {}", "function ffw_port_hidden_callback( $args ) {\n global $ffw_port_settings;\n\n $hidden = isset($args['hidden']) ? $args['hidden'] : false;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) )\n $value = $ffw_port_settings[ $args['id'] ];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';\n $html = '<input type=\"hidden\" class=\"' . $size . '-text\" id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" value=\"' . esc_attr( stripslashes( $value ) ) . '\"/>';\n $html .= '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['std'] . '</label>';\n\n echo $html;\n}", "public function setHidden(){\n $this->_hidden = true;\n }", "function prepare() {\n $this->addChild(new fapitng_FormHidden('form_build_id', array(\n 'value' => $this->build_id,\n )));\n $this->addChild(new fapitng_FormHidden('form_id', array(\n 'value' => $this->id,\n )));\n if ($this->token) {\n $this->addChild(new fapitng_FormHidden('form_token', array(\n 'value' => $this->token,\n )));\n }\n }", "function give_checkout_hidden_fields( $form_id ) {\n\n\t/**\n\t * Fires while rendering hidden checkout fields, before the fields.\n\t *\n\t * @param int $form_id The form ID.\n\t *\n\t * @since 1.0\n\t *\n\t */\n\tdo_action( 'give_hidden_fields_before', $form_id );\n\n\tif ( is_user_logged_in() ) {\n\t\t?>\n\t\t<input type=\"hidden\" name=\"give-user-id\" value=\"<?php echo get_current_user_id(); ?>\"/>\n\t<?php } ?>\n\t<input type=\"hidden\" name=\"give_action\" value=\"purchase\"/>\n\t<input type=\"hidden\" name=\"give-gateway\" value=\"<?php echo give_get_chosen_gateway( $form_id ); ?>\"/>\n\t<?php\n\t/**\n\t * Fires while rendering hidden checkout fields, after the fields.\n\t *\n\t * @param int $form_id The form ID.\n\t *\n\t * @since 1.0\n\t *\n\t */\n\tdo_action( 'give_hidden_fields_after', $form_id );\n\n}", "public static function hidden_field_tag($name, $value = null, $html_attributes = array())\n {\n return self::text_field_tag($name, $value, array_merge(array('type' => 'hidden'), $html_attributes));\n }", "function wyz_ajax_business_form_builder_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\tupdate_option( 'wyz_business_form_builder_data', $form_data );\n\twp_die();\n}", "public static function wizard_mode_hidden_fields_action() {\n\t\t\techo '<input type=\"hidden\" name=\"pcor_wizard_mode\" value=\"from_scratch\" />';\n\t\t}", "function hidden ($nomes = '') {\n\tglobal $resultado;\n\t$nomes = explode(', ', $nomes);\n\t\n\tforeach ($nomes as $valor) {\n\t\tif (isset($resultado['variables'][$valor])) {\n\t\t\t$hidden .= '<input type=\"hidden\" name=\"'.$valor.'\" value=\"'.$resultado['variables'][$valor].'\" />';\n\t\t}\n\t}\n\treturn $hidden;\n}", "function wyz_ajax_registration_form_builder_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\tupdate_option( 'wyz_registration_form_data', $form_data );\n\twp_die();\n}", "function ocita_form_alter(&$form, &$form_state, $form_id) {\n if ($form_id == 'views-exposed-form-vejledninger-page-1') {\n // HTML5 placeholder attribute\n $form['views-exposed-form-vejledninger-page-1']['#attributes']['placeholder'] = t('Find svar i dokumentationen');\n }\n}", "public function testInputFieldHidden()\n {\n $this->assertEquals(\n '<input type=\"hidden\" name=\"name\" value=\"val\" id=\"id\">',\n $this->fixture->inputFieldHidden('name', 'val', 'id')\n );\n $this->assertEquals(\n '<input type=\"hidden\" name=\"name\" value=\"val\">',\n $this->fixture->inputFieldHidden('name', 'val')\n );\n $this->assertEquals(\n '<input type=\"hidden\" name=\"name\" value=\"\">',\n $this->fixture->inputFieldHidden('name')\n );\n }", "function InputHiddenBox($VariableName,$default)\t{\n\t\t\t$res=\"\";\n\t\t\t$res.=\"<input type=\\\"hidden\\\" name=\\\"$VariableName\\\" id=\\\"$VariableName\\\" value=\\\"$default\\\">\";\n\t\t\treturn $res;\n\t}", "public function hidden ($name, $value, $opts=[])\n {\n $input = new \\SimpleXMLElement('<input/>');\n $input->addAttribute('type', 'hidden');\n $input->addAttribute('id', $name);\n $input->addAttribute('name', $name);\n $input->addAttribute('value', $value);\n return $this->return_value($input, $opts);\n }", "function hidden( $element )\n\t\t{\t\t\t\n\t\t\t$output = '<div class=\"ace_section ace_hidden\"><input type=\"hidden\" value=\"'.$element['std'].'\" id=\"'.$element['id'].'\" name=\"'.$element['id'].'\"/></div>';\n\t\t\treturn $output;\n\t\t}", "protected function addFormObjectToViewHelperVariableContainer() {}", "function wyz_ajax_custom_business_fields_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\n\tupdate_option( 'wyz_business_custom_form_data', $form_data );\n\trequire_once( WYZI_PLUGIN_DIR . 'templates-and-shortcodes/business-filters/init-business-filters.php' );\n\twp_die();\n}", "public function test_getHidden_wrongElementType()\n {\n $form = $this->createForm();\n \n $form->addText('foo', 'Foo');\n \n $this->assertNull($form->getHidden('foo'));\n }", "function wyz_ajax_claim_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\n\tupdate_option( 'wyz_claim_registration_form_data', $form_data );\n\twp_die();\n}", "function hideField($fieldName){\n\n\t\t$this->hidden[$fieldName] = \"hide\";\n\n\t}", "public static function HiddenField($data, $col) {\n\t\treturn \"<input type='hidden' name='\".$data->getUniqueIdentifier().\"_{$col}' value='{$data->$col}' />\";\n\t}", "function setTypeAsHidden() {\n\t\t$this->type = \"hidden\";\n\t}", "function wyz_ajax_business_sidebar_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\tupdate_option( 'wyz_business_sidebar_order_data', $form_data ); \n\twp_die();\n}", "function AttribHidden( $id, $value, $name, $site )\n\t{\n\t\tswitch ($site) \n\t\t{\n\t\t\tcase \"frontend\":\n\t\t\t\t$success = '<input type=\"hidden\" value=\"'.$value.'\" name=\"'.$name.'\" />';\n\t\t\t break;\n\t\t\tcase \"admin\": \n\t\t\tdefault:\t\n\t\t\t\t$success = '<input type=\"text\" value=\"'.$value.'\" name=\"'.$name.'\" />';\n\t\t\t break;\t\n\t\t}\n\t\t\t\n\t\treturn $success;\n\t}", "public function add_edit_form_fields() {\r\n\r\n\t\t?>\r\n\r\n\t\t<input type=\"hidden\" name=\"yz_edit_activity_nonce\" value=\"<?php echo wp_create_nonce( 'youzer-edit-activity' ); ?>\">\r\n\r\n\t\t<?php\r\n\r\n\t}", "public function renderHidden()\n {\n $fields = array();\n foreach ($this->fields as $name => $field) {\n if ($field instanceof Field\\Hidden) {\n $fields[] = $field->getField($this->name);\n }\n }\n $fields[] = $this->fields[self::CSRF_FIELD_NAME]->getField($this->name);\n\n return implode(\"\\n\", $fields);\n }", "public function setHidden($hidden) {\n\t\t$this->hidden = $hidden;\n\t}", "public function setHidden($hidden) {\n\t\t$this->hidden = $hidden;\n\t}", "public static function inputHidden($model,$attribute,$properties=array()) {\n return self::inputTag('hidden', $model, $attribute,$properties); \n }", "function marco_comment_form_hidden_fields()\n {\n comment_id_fields();\n if ( current_user_can( 'unfiltered_html' ) )\n {\n wp_nonce_field( 'unfiltered-html-comment_' . get_the_ID(), '_wp_unfiltered_html_comment', false );\n }\n }", "protected function getForm_Type_HiddenService()\n {\n @trigger_error('The \"form.type.hidden\" service is deprecated since Symfony 3.1 and will be removed in 4.0.', E_USER_DEPRECATED);\n\n return $this->services['form.type.hidden'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType();\n }", "public function extend(Nette\\Forms\\Form $form) {\n\t\treturn $form->addHidden($this->getName())\n\t\t\t->setDefaultValue($this->getValue());\n\t}", "public function hidden($options = []){\n\t\t$this->elements['label'] = false;\n\t\t$this->elements['error'] = false;\n\t\t$this->elements['wrap'] = false;\n\t\t// Set default attributes.\n\t\tHtml::setAttribute($options, ['id' => $this->name]);\n\t\t// Create and store the element.\n\t\t$this->elements['control'] = Html::input(\n\t\t\t'hidden',\n\t\t\t$this->name,\n\t\t\tHtml::selectAttribute('value', $options, $this->model->{$this->name}),\n\t\t\t$options\n\t\t);\n\t\t// Return object to method chain.\n\t\treturn $this;\n\t}" ]
[ "0.81896937", "0.7471088", "0.73945504", "0.73820883", "0.7339564", "0.7285233", "0.72694016", "0.7255144", "0.7255144", "0.7136787", "0.7118489", "0.7048892", "0.7025444", "0.6974492", "0.69108635", "0.6904579", "0.68311906", "0.6816565", "0.6770386", "0.6768842", "0.6761963", "0.6760425", "0.6725768", "0.67143726", "0.6682794", "0.6613785", "0.65991265", "0.6478571", "0.6469152", "0.6446849", "0.64433146", "0.63983315", "0.6369577", "0.63498455", "0.6328201", "0.62777066", "0.6273844", "0.627301", "0.6253505", "0.6248231", "0.62302893", "0.6202852", "0.62014794", "0.6178806", "0.61578196", "0.61546814", "0.6144936", "0.6144502", "0.6143133", "0.6139991", "0.61177456", "0.60719085", "0.60549694", "0.6051805", "0.6030604", "0.6028148", "0.60265034", "0.6018653", "0.6008744", "0.5988201", "0.59789085", "0.5978072", "0.59527314", "0.5951573", "0.59507066", "0.59473526", "0.59473526", "0.59356135", "0.59248424", "0.59146786", "0.591214", "0.5898967", "0.5889582", "0.5884866", "0.58732754", "0.584807", "0.58468354", "0.5845254", "0.58442926", "0.58425087", "0.581116", "0.58085805", "0.5787634", "0.5766385", "0.5758586", "0.5748218", "0.57456356", "0.57413954", "0.5740466", "0.57041883", "0.5681401", "0.56757617", "0.5650914", "0.5648033", "0.5648033", "0.5647498", "0.56250906", "0.56210095", "0.5596491", "0.557903" ]
0.6277479
36
Add a text/html/markup to the form
public function add_text($content) { array_push($this->form_elements, array($content, 0, 'text')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insert() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm(TRUE);\n\t\t$tpl->setContent($form->getHTML());\n\t}", "function form($config)\r\n\t{\r\n\t\t$html_text = $config['html_text'];\r\n\t?>\r\n\t\t<label for=\"<?php echo $this->get_field_id(\"html_text\"); ?>\">\r\n\t\t<p>HTML Text: \r\n\t\t\t<textarea rows=\"5\" cols=\"50\" name=\"<?php echo $this->get_field_name(\"html_text\"); ?>\" id=\"<?php echo $this->get_field_id(\"html_text\") ?>\">\r\n\t\t\t\t<?php echo $html_text; ?>\r\n\t\t\t</textarea>\r\n\t\t</p>\r\n\t\t</label>\r\n\t<?php \r\n\t}", "public function render() {\n $html = str_replace('{text}', $this->text, FORMWIZARD_SEPARATOR);\n $this->html = $html;\n }", "static function newform()\n\t{\n\t\treturn '\n\t\t<h2>Neue Wette eintragen</h2>\n\t\t<small>Eine Wette wird erst gestartet wenn der Wetter (das bist DU wenn du eine Wette einträgst) die offene Wette startet.</small>\n\t\t<form action=\"'.getURL(false,false).'\" method=\"post\">\n\t\t<table class=\"border\">\n\t\t<tr><td>\n\t\t<b>Wett Titel:<b> <br />\n\t\t<input type=\"text\" name=\"titel\" class=\"text\" size=\"40\">\n\t\t</td></tr><tr><td>\n\t\t<b>Wette: </b><br />\n\t\t<textarea name=\"wette\" cols=\"40\" rows=\"5\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b>Wetteinsatz: </b><br />\n\t\t<textarea name=\"einsatz\" cols=\"40\" rows=\"3\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b><small>Gültigkeit (in Tagen ab Wettstart, 0 steht für unbegrenzt):</small></b>\n\t\t<br />\n\t\t<input type=\"text\" name=\"dauer\" class=\"text\" size=\"4\">\n\t\t</td></tr><tr><td>\n\t\t<br />\n\t\t<small>\n\t\tEine Wette ist beendet wenn, <b>beide Parteien</b> <br />\n\t\tsich auf einen <b>Sieg oder eine Niederlage einigen</b> können.<br />\n\t\t</small>\n\t\t<br />\n\t\t<input type=\"submit\" value=\"Wette eintragen\" class=\"button\">\n\t\t</td></tr>\n\t\t</table>\n\t\t</form>';\n\t}", "public function renderAdd()\r\n\t{\r\n\t\t$this['itemForm']['save']->caption = 'Přidat';\r\n $this->template->titul = self::TITUL_ADD;\r\n\t\t$this->template->is_addon = TRUE;\r\n\r\n\t}", "protected function html()\r\n\t{\r\n\r\n\t\t$data = $this->form;\r\n\t\t$f = $data['form'];\r\n\r\n\t\tif($f == 'select'){\r\n\t\t\t$this->selectLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'file'){\r\n\t\t\t$this->fileLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'textarea'){\r\n\t\t\t$this->success = $this->textarea();\r\n\t\t}\r\n\r\n\t\tif($f == 'radio' || $f=='checkbox'){\r\n\t\t\t$this->chooseLink();\r\n\t\t}\r\n\t\tif($f == 'hidden'|| $f =='password'|| $f =='text'|| $f =='number'|| $f =='date'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($f == 'editor'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif(strpos($f,'extend')!==false){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($this->continue){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->replace();\r\n\t}", "protected function setFormContent()\n {\n\t\t$content = $this->getTitle();\n\t\t\n\t\t$content .= '<p>Your meditation time on <b>';\n\t\t$content .= $this->data['long_date'];\n\t\t$content .= '</b> has been deleted. Would you like to restore it?</p>';\n\t\t\n\t\t$this->Form = new Form;\n\t\t$this->buildForm();\n\t\t$content .= $this->Form->getHtml();\n\t\t\n\t\t// Add the cancel link\n\t\t$content .= $this->cancelLink();\n\t\t\n\t\t$this->content = $content;\n }", "function form ( $text, $args = null ) {\r\n\t\treturn $this->form_start($args) . $text . $this->form_end();\r\n\t}", "public function setAsStaticForm() {\n\t\treturn $this->form_tag(implode('<br />', $this->_elements));\n\t}", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "function wrapWithForm($content) {\n\t\t$output = '\n\t\t\t<form action=\"'.$this->formAction.'\" method=\"'.$this->formMethod.'\" enctype=\"multipart/form-data\" class=\"tx-frontendformslib-form\">\n\t\t\t\t'.$content.'\n\t\t\t\t'.$this->additionalHiddenFields.'\n\t\t\t</form>\n\t\t';\n\n\t\treturn $output;\n\t}", "public function renderAdd()\r\n\t{\r\n\t\t$this['tarifForm']['save']->caption = 'Přidat';\r\n\t}", "function training_security_form($form, &$form_state) {\n $form['markup_security'] = array(\n '#prefix' => '<div id = \"training-security-text\">',\n '#suffix' => '</div>',\n '#markup' => '',\n '#tree' => TRUE,\n );\n $form['markup_security']['text_security'] = array(\n '#type' => 'textarea',\n '#title' => t('Secure text'),\n );\n $form['markup_security']['submit_security'] = array(\n '#type' => 'submit',\n '#value' => t('Submit'),\n '#ajax' => array(\n 'callback' => 'training_security_display_text',\n 'wrapper' => 'training-security-text',\n 'method' => 'replace',\n 'effect' => 'fade',\n ),\n );\n\n return $form;\n}", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "function gtags_add_tags_form() {\n\tglobal $show_group_add_form;\n\tif ($show_group_add_form) return;\n\t$show_group_add_form = true;\n\t?>\n\t<p class=\"editfield\">\n\t\t<label for=\"group-tags\">Mots-clés</label>\n\t\t<input type=\"text\" name=\"group-tags\" id=\"group-tags\" value=\"<?php gtags_group_tags() ?>\" />\n\t\tSéparez les mots-clés par des virgules\n\t\t<?php gtags_show_tags_chooser(); ?>\n\t\t\n\t</p>\n\t<?php\n}", "public function addElementForm($add_options = NULL)\n {\n\t\t$fields = array(\"name\",\"last_name\", \"country\", \"web_url\", \"description\");\n\t\t$fields_types = array(\"text\", \"text\", \"text\", \"url\", \"texteditor\");\n\t\t$options = ($add_options != NULL )? $add_options : array(NULL, NULL, NULL, NULL, NULL);\n\t\t$items['entity'] = \"\\writer\";\n\t\t$items['fields'] = $fields;\n\t\t$items['options'] = $options;\n\t\t$items['fields_types'] = $fields_types;\n\t\treturn $items;\n\t}", "function newFormBookmark()\n\t{\n\t\t$form = $this->initFormBookmark();\n\t\t$html1 = $form->getHTML();\n\t\t$html2 = '';\n\t\tif (!$_REQUEST[\"bm_link\"])\n\t\t{\n\t\t\t$form2 = $this->initImportBookmarksForm();\n\t\t\t$html2 = \"<br />\" . $form2->getHTML();\n\t\t}\n\t\t$this->tpl->setVariable(\"ADM_CONTENT\", $html1.$html2);\n\t}", "function setNoteText(){\n $html = \"\";\n \n $this->aFields[\"note\"]->editable = true;\n $this->aFields[\"note\"]->value = $html;\n }", "public function add_html( $html = '' ) {\n\t\t\n\t\tarray_push( $this->fields, $html );\n\t\t\n\t\tif ( true === $this->progressive_render ) echo $html;\n\t\t\n\t}", "public function form()\n\t{\n\t\tglobal $L;\n\n\t\t$html = '<div class=\"mb-3\">';\n\t\t$html .= '<label class=\"form-label\" for=\"label\">' . $L->get('Label') . '</label>';\n\t\t$html .= '<input class=\"form-control\" id=\"label\" name=\"label\" type=\"text\" value=\"' . $this->getValue('label') . '\">';\n\t\t$html .= '<div class=\"form-text\">' . $L->get('This title is almost always used in the sidebar of the site') . '</div>';\n\t\t$html .= '</div>';\n\n\t\tif (defined('BLUDIT_PRO')) {\n\t\t\t$html .= '<div class=\"mb-3\">';\n\t\t\t$html .= '<label class=\"form-label\" for=\"excludeAdmins\">' . $L->get('Exclude administrators users') . '</label>';\n\t\t\t$html .= '<select class=\"form-select\" id=\"excludeAdmins\" name=\"excludeAdmins\">';\n\t\t\t$html .= '<option value=\"true\" ' . ($this->getValue('excludeAdmins') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';\n\t\t\t$html .= '<option value=\"false\" ' . ($this->getValue('excludeAdmins') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';\n\t\t\t$html .= '</select>';\n\t\t\t$html .= '</div>';\n\t\t}\n\n\t\treturn $html;\n\t}", "public function addform()\n\t{\n\t\t\t$this->setMethod('post');\n\n\t\t\t\n\t\t\t$this->addElement('radio', 'status', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'multiOptions' => array(\n\t\t\t\t\t'1' => IN_PROGRESS,\n\t\t\t\t\t'2' => 'Closed'\n\t\t\t\t\t\n\t\t\t\t),\n\t\t\t\t'value' => '1' //key of multiOption\n\t\t\t));\n\t\t\n\t\t\n\n\t\t\t$this->addElement('textarea', 'Comment', array( \n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'maxlength' =>'50',\n\t\t\t\t\t\n\t\t\t\t\t'class' => 'validate[required] text-input',\n\t\t\t\t\t'decorators'=>Array(\n\t\t\t\t\t\t'ViewHelper','Errors'\n\t\t\t\t\t),\t\t \n\t\t\t));\n\n\t\t\t\n\n\t\t\t\n\n\n\t\n\t\t\t\t\n\t\t\t$this->addElement('submit', 'submit', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t\t\t'label' => 'Submit',\n\t\t\t));\n\t\t\t\n\t\t\t// And finally add some CSRF protection\n\t\t\t$this->addElement('hash', 'csrf', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t));\t\n\t}", "public function addHtml($str_name)\n {\n return $this->addField($str_name, self::FIELD_HTML);\n }", "function content() {\n echo \"\n <form action='http://{$_SERVER['SERVER_NAME']}/mailmaid/subscriber/add' method='post'>\n <input name='token' type='hidden' value='{$this->params['token']}'>\n <label for='username'>Name</label>\n <input name='name' placeholder='Name' id='name' type='text' required>\n <label for='description'>Description</label>\n <input name='description' placeholder='Description (Optional)' id='description' type='text'>\n <input type='submit' value='Create List'>\n </form>\n \";\n }", "function addText($name,$display=null,$value=null, $disabled=null, $maxlength=null, $class=null, $id=null){\r\n\t\t\t$this->formFields[$name] = array(\r\n\t\t\t\t\t\"name\" => $name,\r\n\t\t\t\t\t\"type\" => \"text\", //defines the type of the input\r\n\t\t\t\t\t\"label\" => $display,\r\n\t\t\t\t\t\"value\" => $value,\r\n\t\t\t\t\t\"disabled\" => $disabled,\r\n\t\t\t\t\t\"maxlength\" => $maxlength,\r\n\t\t\t\t\t\"class\" => $class,\r\n\t\t\t\t\t\"id\" => $id\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t//add class if null\r\n\t\t\tif($class == null){\r\n\t\t\t\t$this->formFields[$name][\"class\"] = \"c\" . $name;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add id\r\n\t\t\tif($id == null){\r\n\t\t\t\t$this->formFields[$name][\"id\"] = \"i\" . $name;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add display\r\n\t\t\tif($display == null){\r\n\t\t\t\t$this->formFields[$name][\"label\"] = ucfirst($name) . \":\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "function text($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<input type='text' size='57' style='\" . $this->width($args['width']) . \"' \" . $this->placeholder($args['placeholder']) . \" name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\t\r\n\t\t\t$this->description($args['description']);\r\n\t\t}", "public function render_field_add( $taxonomy ) {\n\t\t$editor_settings = $this->get_editor_settings();\n\t\tif ( empty( $editor_settings ) || ! is_array( $editor_settings ) ) {\n\t\t\treturn;\n\t\t}\n\t?>\n\t\t<div>\n\t\t\t<label for=\"tag-description\"><?php _e( 'Description', APP_TD ); ?></label>\n\t\t\t<?php wp_editor( '', 'html-tag-description', $editor_settings ); ?>\n\t\t\t<p class=\"description\"><?php _e( 'The description is not prominent by default, however some themes may show it.', APP_TD ); ?></p>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\t// Remove the non-html field\n\t\t\t\tjQuery( 'textarea#tag-description' ).closest( '.form-field' ).remove();\n\t\t\t\tjQuery(function() {\n\t\t\t\t\t// Trigger save\n\t\t\t\t\tjQuery( '#addtag #submit' ).click( function() {\n\t\t\t\t\t\ttinyMCE.triggerSave();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t</script>\n\t\t</div>\n\t\t<?php\n\t}", "function uultra_get_addlink_html_form($meta, $content)\r\n\t{\r\n\t\tob_start();\r\n\t\t\r\n\t\t$editor_id = $meta;\t\t\t\t\r\n\t\t$editor_settings = array('media_buttons' => false , 'textarea_rows' => 40 , 'teeny' =>true, 'tinymce' => array( 'height' => 300 ), 'quicktags' => false); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\twp_editor( $content, $editor_id , $editor_settings);\r\n\t\t\r\n\t\t// Store the contents of the buffer in a variable\r\n\t\t$editor_contents = ob_get_clean();\r\n\t\t\r\n\t\t// Return the content you want to the calling function\r\n\t\treturn $editor_contents;\r\n\t\t\t\r\n\t}", "function render_text() {\n\t\t?><input type=\"text\" id=\"<?php echo $this->slug ?>\" name=\"<?php echo $this->settings_page ?>[<?php echo $this->slug ?>]\" value=\"<?php echo $this->value ?>\" ><?php\n\t}", "public function add( $text ) {\n\t\t$this->page->append( $text );\n\t}", "function form($instance){\r\n\t\t?>\r\n\t\t<?php\r\n\t\t\t$defaults = array( 'title'=> __( 'Share This Article' , 'crumble' ), 'code' => '<!-- AddThis Button BEGIN -->\r\n<div class=\"addthis_toolbox addthis_default_style \">\r\n<a class=\"addthis_button_preferred_1\"></a>\r\n<a class=\"addthis_button_preferred_2\"></a>\r\n<a class=\"addthis_button_preferred_3\"></a>\r\n<a class=\"addthis_button_preferred_4\"></a>\r\n<a class=\"addthis_button_compact\"></a>\r\n<a class=\"addthis_counter addthis_bubble_style\"></a>\r\n</div>\r\n<script type=\"text/javascript\" src=\"http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-500144fc331f9af5\"></script>\r\n<!-- AddThis Button END -->' \r\n\t\t\t);\r\n\t\t\t$instance = wp_parse_args((array) $instance, $defaults); \r\n\t\t?>\r\n\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id('title'); ?>\"><?php _e( 'Title:' , 'crumble' ); ?></label>\r\n\t\t\t<input class=\"widefat\" style=\"width: 210px;\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" value=\"<?php echo $instance['title']; ?>\" />\r\n\t\t</p>\r\n\t\t\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id('code'); ?>\"><?php _e( 'Paste Your Code From https://www.addthis.com:' , 'crumble' ); ?></label>\r\n\t\t\t<textarea class=\"widefat\" style=\"width: 220px; height: 350px\" id=\"<?php echo $this->get_field_id('code'); ?>\" name=\"<?php echo $this->get_field_name('code'); ?>\"><?php echo $instance['code']; ?></textarea>\r\n\t\t</p>\r\n\t\t\r\n\t\t<?php\r\n\r\n\t}", "public function addform()\n\t{\n \n\t\t$this->setMethod('post');\n\t\t $this->setAttrib('enctype', 'multipart/form-data');\n\n\t\t$this->addElement('file', 'upload_image', array( \n\t\t\t'label' => '',\n 'required' => false\n ));\n\n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Submit',\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hash', 'csrf', array(\n 'ignore' => true,\n ));\n\n\n\t}", "public function addMetaFieldsToAddForm()\n\t{\n\t\t$interval = $this->getMetaFields('interval');\n\t\t$animation = $this->getMetaFields('animation');\n\n\t\t?>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"interval\">Tijd tussen slides</label>\n\t\t\t\t<input name=\"interval\" id=\"interval\" type=\"text\" value=\"<?php echo $interval;?>\" size=\"40\">\n\t\t\t\t<p class=\"description\">De tijd tussen slides in milliseconden (1000ms = 1s).</p>\n\t\t\t</div>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"animation\">Animatie</label>\n\t\t\t\t<select name=\"animation\" id=\"animation\">\n\t\t\t\t\t<option <?php selected($animation, 'slide'); ?> value=\"slide\">Slide</option>\n\t\t\t\t\t<option <?php selected($animation, 'fade'); ?> value=\"fade\">Fade</option>\n\t\t\t\t</select>\n\t\t\t\t<p class=\"description\">Selecteer de animatie die gebruikt wordt door de slideshow.</p>\n\t\t\t</div>\n\t\t<?php\n\t}", "public function getTemplateExample()\n\t{\n\t\t// start form\n\t\t$value = \"\\n\";\n\t\t$value .= '{form:' . $this->getName() . \"}\\n\";\n\n\t\t/**\n\t\t * At first all the hidden fields need to be added to this form, since\n\t\t * they're not shown and are best to be put right beneath the start of the form tag.\n\t\t */\n\t\tforeach($this->getFields() as $object)\n\t\t{\n\t\t\t// is a hidden field\n\t\t\tif(($object instanceof SpoonFormHidden) && $object->getName() != 'form')\n\t\t\t{\n\t\t\t\t$value .= \"\\t\" . '{$hid' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . \"}\\n\";\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Add all the objects that are NOT hidden fields. Based on the existance of some methods\n\t\t * errors will or will not be shown.\n\t\t */\n\t\tforeach($this->getFields() as $object)\n\t\t{\n\t\t\t// NOT a hidden field\n\t\t\tif(!($object instanceof SpoonFormHidden))\n\t\t\t{\n\t\t\t\t// buttons\n\t\t\t\tif($object instanceof SpoonFormButton)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$btn' . SpoonFilter::toCamelCase($object->getName()) . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// single checkboxes\n\t\t\t\telseif($object instanceof SpoonFormCheckbox)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$chk' . SpoonFilter::toCamelCase($object->getName()) . '} {$chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// multi checkboxes\n\t\t\t\telseif($object instanceof SpoonFormMultiCheckbox)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<div{option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<p class=\"label\">' . SpoonFilter::toCamelCase($object->getName()) . '</p>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<ul class=\"inputList\">' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\\t\" . '<li><label for=\"{$' . $object->getName() . '.id}\">{$' . $object->getName() . '.chk' . SpoonFilter::toCamelCase($object->getName()) . '} {$' . $object->getName() . '.label}</label></li>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{/iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '</ul>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</div>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// dropdowns\n\t\t\t\telseif($object instanceof SpoonFormDropdown)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . 'Error} class=\"errorArea\"{/option:ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . '} {$ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// imagefields\n\t\t\t\telseif($object instanceof SpoonFormImage)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$file' . SpoonFilter::toCamelCase($object->getName()) . '} <span class=\"helpTxt\">{$msgHelpImageField}</span> {$file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// filefields\n\t\t\t\telseif($object instanceof SpoonFormFile)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$file' . SpoonFilter::toCamelCase($object->getName()) . '} {$file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// radiobuttons\n\t\t\t\telseif($object instanceof SpoonFormRadiobutton)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<div{option:rbt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:rbt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<p class=\"label\">' . SpoonFilter::toCamelCase($object->getName()) . '</p>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$rbt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<ul class=\"inputList\">' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\\t\" . '<li><label for=\"{$' . $object->getName() . '.id}\">{$' . $object->getName() . '.rbt' . SpoonFilter::toCamelCase($object->getName()) . '} {$' . $object->getName() . '.label}</label></li>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{/iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '</ul>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</div>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// datefields\n\t\t\t\telseif($object instanceof SpoonFormDate)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$txt' . SpoonFilter::toCamelCase($object->getName()) . '} <span class=\"helpTxt\">{$msgHelpDateField}</span> {$txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// timefields\n\t\t\t\telseif($object instanceof SpoonFormTime)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$txt' . SpoonFilter::toCamelCase($object->getName()) . '} <span class=\"helpTxt\">{$msgHelpTimeField}</span> {$txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// textfields\n\t\t\t\telseif(($object instanceof SpoonFormPassword) || ($object instanceof SpoonFormTextarea) || ($object instanceof SpoonFormText))\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$txt' . SpoonFilter::toCamelCase($object->getName()) . '} {$txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $value . '{/form:' . $this->getName() . '}';\n\t}", "function form_textarea($input_name, $label = '', $input_value = '', array $options = []) {\n\n $locale = fusion_get_locale('', [\n LOCALE.LOCALESET.\"admin/html_buttons.php\",\n LOCALE.LOCALESET.\"error.php\"\n ]);\n\n require_once INCLUDES.\"bbcode_include.php\";\n require_once INCLUDES.\"html_buttons_include.php\";\n\n $title = $label ? stripinput($label) : ucfirst(strtolower(str_replace(\"_\", \" \", $input_name)));\n\n $input_name = (isset($input_name) && (!empty($input_name))) ? stripinput($input_name) : \"\";\n\n if (!empty($options['bbcode'])) {\n $options['type'] = \"bbcode\";\n } else if (!empty($options['html'])) {\n $options['type'] = \"html\";\n }\n\n $default_options = [\n 'input_id' => $input_name,\n 'type' => '',\n 'inline_editing' => FALSE,\n 'required' => FALSE,\n 'tinymce_forced_root' => TRUE,\n 'placeholder' => '',\n 'deactivate' => FALSE,\n 'width' => '',\n 'inner_width' => '100%',\n 'height' => '200px',\n 'class' => '',\n 'inner_class' => '',\n 'inline' => FALSE,\n 'length' => 200,\n 'error_text' => $locale['error_input_default'],\n 'safemode' => FALSE,\n 'form_name' => 'input_form',\n 'tinymce' => 'simple',\n 'tinymce_css' => '',\n 'tinymce_image' => FALSE, // Turns on or off the image selection feature in TinyMCE\n 'no_resize' => FALSE,\n 'autosize' => FALSE,\n 'bbcode' => FALSE,\n 'html' => FALSE,\n 'preview' => FALSE,\n 'path' => IMAGES,\n 'maxlength' => '',\n 'tip' => '',\n 'ext_tip' => '',\n 'input_bbcode' => '',\n 'wordcount' => FALSE,\n 'file_filter' => ['.png', '.PNG', '.svg', '.SVG', '.bmp', '.BMP', '.jpg', '.JPG', '.jpeg', '.gif', '.GIF', '.tiff', '.TIFF'],\n 'tinymce_theme' => 'modern',\n 'tinymce_skin' => 'lightgray',\n 'tinymce_spellcheck' => TRUE,\n 'rows' => 5,\n 'censor_words' => TRUE,\n ];\n\n $options += $default_options;\n\n if ($options['type'] == \"tinymce\") {\n\n $options['tinymce'] = !empty($options['tinymce']) && in_array($options['tinymce'], [TRUE, 'simple', 'advanced']) ? $options['tinymce'] : \"simple\";\n\n $default_tinymce_css = (defined(\"ADMIN_PANEL\") && file_exists(THEMES.\"admin_themes/\".fusion_get_settings(\"admin_theme\").\"/tinymce.css\") ? THEMES.\"admin_themes/\".fusion_get_settings(\"admin_theme\").\"/tinymce.css\" : THEMES.\"templates/tinymce.css\");\n\n $options['tinymce_css'] = (!empty($options['tinymce_css']) && file_exists($options['tinymce_css']) ? $options['tinymce_css'] : $default_tinymce_css);\n\n $options['tinymce_spellcheck'] = $options['tinymce_spellcheck'] == TRUE ? 'true' : 'false';\n\n $tinymce_list = [];\n if (!empty($options['path']) && $options['tinymce_image'] == TRUE) {\n $image_list = [];\n if (is_array($options['path'])) {\n foreach ($options['path'] as $dir) {\n if (file_exists($dir) && is_dir($dir)) {\n $image_list[$dir] = makefilelist($dir, \".|..|\");\n }\n }\n } else {\n if (file_exists($options['path']) && is_dir($options['path'])) {\n $image_list[$options['path']] = makefilelist($options['path'], '.|..|');\n }\n }\n foreach ($image_list as $key => $images) {\n foreach ($images as $keys => $image_name) {\n $image_1 = explode('.', $image_name);\n $last_str = count($image_1) - 1;\n if (in_array(\".\".$image_1[$last_str], $options['file_filter'])) {\n $tinymce_list[] = ['title' => $image_name, 'value' => $key.$image_name];\n }\n }\n }\n }\n\n $tinymce_list = json_encode($tinymce_list);\n $tinymce_smiley_vars = \"\";\n if (!defined('tinymce')) {\n add_to_footer(\"<script type='text/javascript' src='\".INCLUDES.\"jscripts/tinymce/tinymce.min.js'></script>\");\n define('tinymce', TRUE);\n // PHP-Fusion Parse Cache Smileys\n $smileys = cache_smileys();\n $tinymce_smiley_vars = \"\";\n if (!empty($smileys)) {\n $tinymce_smiley_vars = \"var shortcuts = {\\n\";\n foreach ($smileys as $params) {\n $tinymce_smiley_vars .= \"'\".strtolower($params['smiley_code']).\"' : '<img alt=\\\"\".$params['smiley_text'].\"\\\" src=\\\"\".fusion_get_settings('siteurl').\"images/smiley/\".$params['smiley_image'].\"\\\"/>',\\n\";\n }\n $tinymce_smiley_vars .= \"};\\n\";\n $tinymce_smiley_vars .= \"\n ed.on('keyup', function(e){\n var marker = tinymce.activeEditor.selection.getBookmark();\n // Store editor contents\n var content = tinymce.activeEditor.getContent({'format':'raw'});\n // Loop through all shortcuts\n for(var key in shortcuts){\n // Check if the editor html contains the looped shortcut\n if(content.toLowerCase().indexOf(key) != -1) {\n // Escaping special characters to be able to use the shortcuts in regular expression\n var k = key.replace(/[<>*()?']/ig, \\\"\\\\$&\\\");\n tinymce.activeEditor.setContent(content.replace(k, shortcuts[key]));\n }\n }\n // Now put cursor back where it was\n tinymce.activeEditor.selection.moveToBookmark(marker);\n });\n \";\n }\n }\n // Mode switching for TinyMCE\n switch ($options['tinymce']) {\n case 'advanced':\n add_to_jquery(\"\n tinymce.init({\n selector: '#\".$options['input_id'].\"',\n inline: \".($options['inline_editing'] == TRUE ? \"true\" : \"false\").\",\n theme: '\".$options['tinymce_theme'].\"',\n skin: '\".(defined('TINYMCE_SKIN') ? TINYMCE_SKIN : $options['tinymce_skin']).\"',\n \".(defined('TINYMCE_SKIN_PATH') ? \"skin_url: '\".TINYMCE_SKIN_PATH.\"', \" : '').\"\n browser_spellcheck: \".$options['tinymce_spellcheck'].\",\n entity_encoding: 'raw',\n language:'\".$locale['tinymce'].\"',\n directionality : '\".$locale['text-direction'].\"',\n \".($options['tinymce_forced_root'] ? \"forced_root_block: '',\" : '').\"\n width: '100%',\n height: 300,\n plugins: [\n 'advlist autolink \".($options['autosize'] ? \" autoresize \" : \"\").\" link image lists charmap print preview hr anchor pagebreak spellchecker',\n 'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',\n 'save table contextmenu directionality template paste textcolor \".($options['inline_editing'] ? \" save \" : \"\").\"'\n ],\n image_list: $tinymce_list,\n content_css: '\".$options['tinymce_css'].\"',\n toolbar1: '\".($options['inline_editing'] ? \" save \" : \"\").\" insertfile undo redo | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | newdocument fullscreen preview cut copy paste pastetext spellchecker searchreplace code',\n toolbar2: 'styleselect formatselect removeformat | fontselect fontsizeselect bold italic underline strikethrough subscript superscript blockquote | forecolor backcolor',\n toolbar3: 'hr pagebreak insertdatetime | link unlink anchor | image media | table charmap visualchars visualblocks emoticons',\n image_advtab: true,\n style_formats: [\n {title: 'Bold text', inline: 'b'},\n {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},\n {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},\n {title: 'Example 1', inline: 'span', classes: 'example1'},\n {title: 'Example 2', inline: 'span', classes: 'example2'},\n {title: 'Table styles'},\n {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}\n ],\n setup: function(ed) {\n // add tabkey listener\n ed.on('keydown', function(event) {\n if (event.keyCode == 9) { // tab pressed\n if (event.shiftKey) { ed.execCommand('Outdent'); } else { ed.execCommand('Indent'); }\n event.preventDefault();\n return false;\n }\n });\n // auto smileys parsing\n \".$tinymce_smiley_vars.\"\n }\n });\n \");\n break;\n case 'simple':\n add_to_jquery(\"\n tinymce.init({\n selector: '#\".$options['input_id'].\"',\n inline: \".($options['inline_editing'] == TRUE ? \"true\" : \"false\").\",\n theme: '\".$options['tinymce_theme'].\"',\n skin: '\".(defined('TINYMCE_SKIN') ? TINYMCE_SKIN : $options['tinymce_skin']).\"',\n \".(defined('TINYMCE_SKIN_PATH') ? \"skin_url: '\".TINYMCE_SKIN_PATH.\"', \" : '').\"\n browser_spellcheck: \".$options['tinymce_spellcheck'].\",\n entity_encoding: 'raw',\n menubar: false,\n statusbar: false,\n content_css: '\".$options['tinymce_css'].\"',\n image_list: $tinymce_list,\n plugins: [\n 'advlist autolink \".($options['autosize'] ? \" autoresize \" : \"\").\" link image lists charmap print preview hr anchor pagebreak spellchecker',\n 'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',\n 'contextmenu directionality template paste\".($options['bbcode'] ? \" bbcode \" : \"\").($options['autosize'] ? \" autoresize \" : \"\").($options['inline_editing'] ? \" save \" : \"\").\"'\n ],\n width: '100%',\n height: 100,\n image_advtab: true,\n toolbar1: 'undo redo | bold italic underline | emoticons | visualblocks | bullist numlist blockquote | hr \".($options['tinymce_image'] ? \" image \" : \"\").\" media | fullscreen \".($options['inline_editing'] ? \" save \" : \"\").\" | code',\n language: '\".$locale['tinymce'].\"',\n directionality : '\".$locale['text-direction'].\"',\n \".($options['tinymce_forced_root'] ? \"forced_root_block: '',\" : '').\"\n object_resizing: \".($options['autosize'] ? \"false\" : \"true\").\",\n resize: \".($options['autosize'] ? \"false\" : \"true\").\",\n relative_urls: false,\n setup: function(ed) {\n // add tabkey listener\n ed.on('keydown', function(event) {\n if (event.keyCode == 9) { // tab pressed\n if (event.shiftKey) { ed.execCommand('Outdent'); } else { ed.execCommand('Indent'); }\n event.preventDefault();\n return false;\n }\n });\n // auto smileys parsing\n \".$tinymce_smiley_vars.\"\n }\n });\n\n $('#inject').bind('click', function () {\n tinyMCE.activeEditor.execCommand(\\\"mceInsertContent\\\", true, '[b]I am injecting in stuff..[/b]');\n });\n \");\n break;\n case 'default':\n add_to_jquery(\"\n tinymce.init({\n selector: '#\".$options['input_id'].\"',\n inline: \".($options['inline_editing'] == TRUE ? \"true\" : \"false\").\",\n content_css: '\".$options['tinymce_css'].\"',\n theme: '\".$options['tinymce_theme'].\"',\n skin: '\".(defined('TINYMCE_SKIN') ? TINYMCE_SKIN : $options['tinymce_skin']).\"',\n \".(defined('TINYMCE_SKIN_PATH') ? \"skin_url: '\".TINYMCE_SKIN_PATH.\"', \" : '').\"\n browser_spellcheck: \".$options['tinymce_spellcheck'].\",\n entity_encoding: 'raw',\n language:'\".$locale['tinymce'].\"',\n directionality : '\".$locale['text-direction'].\"',\n \".($options['tinymce_forced_root'] ? \"forced_root_block: '',\" : '').\"\n setup: function(ed) {\n // add tabkey listener\n ed.on('keydown', function(event) {\n if (event.keyCode == 9) { // tab pressed\n if (event.shiftKey) { ed.execCommand('Outdent'); } else { ed.execCommand('Indent'); }\n event.preventDefault();\n return false;\n }\n });\n // auto smileys parsing\n \".$tinymce_smiley_vars.\"\n }\n });\n \");\n break;\n }\n } else {\n\n if ($options['bbcode']) {\n $options['type'] = 'bbcode';\n } else if ($options['html']) {\n $options['type'] = 'html';\n }\n\n if ($options['autosize'] || defined('AUTOSIZE')) {\n add_to_footer(\"<script src='\".DYNAMICS.\"assets/autosize/autosize.min.js'></script>\");\n add_to_jquery(\"autosize($('#\".$options['input_id'].\"'));\");\n }\n }\n\n if ($input_value) {\n\n $input_value = html_entity_decode(stripslashes($input_value), ENT_QUOTES, $locale['charset']);\n $input_value = htmlspecialchars_decode($input_value);\n\n if ($options['type'] !== \"tinymce\") {\n $input_value = str_replace(\"<br />\", \"\", $input_value);\n }\n }\n\n $error_class = \"\";\n if (\\defender::inputHasError($input_name)) {\n $error_class = \" has-error\";\n if (!empty($options['error_text'])) {\n $new_error_text = \\defender::getErrorText($input_name);\n if (!empty($new_error_text)) {\n $options['error_text'] = $new_error_text;\n }\n addNotice(\"danger\", \"<strong>$title</strong> - \".$options['error_text']);\n }\n }\n\n $html = \"<div id='\".$options['input_id'].\"-field' class='form-group \".($options['inline'] ? 'display-block overflow-hide' : '').$error_class.$options['class'].\"'\".($options['width'] ? \" style='width: \".$options['width'].\" !important;'\" : '').\">\\n\";\n $html .= ($label) ? \"<label class='control-label \".($options['inline'] ? \"col-xs-12 col-sm-3 col-md-3 col-lg-3\" : '').\"' for='\".$options['input_id'].\"'>\".$label.($options['required'] == 1 ? \"<span class='required'>&nbsp;*</span>\" : '').\" \".($options['tip'] ? \"<i class='pointer fa fa-question-circle' title='\".$options['tip'].\"'></i>\" : '').\"</label>\\n\" : '';\n $html .= ($options['inline']) ? \"<div class='clearfix\".($label ? ' col-xs-12 col-sm-9 col-md-9 col-lg-9' : '').\"'>\\n\" : '';\n $tab_active = 0;\n $tab_title = [];\n if ($options['preview'] && ($options['type'] == \"html\" || $options['type'] == \"bbcode\")) {\n $tab_title['title'][] = $locale['preview'];\n $tab_title['id'][] = \"prw-\".$options['input_id'];\n $tab_title['icon'][] = '';\n $tab_title['title'][] = $locale['texts'];\n $tab_title['id'][] = \"txt-\".$options['input_id'];\n $tab_title['icon'][] = '';\n $tab_active = tab_active($tab_title, 1);\n }\n\n $html .= ($options['type'] == \"html\" || $options['type'] == \"bbcode\") ? \"<div class='panel panel-default panel-txtarea m-b-0' \".($options['preview'] ? \"style='border-radius:0;'\" : '').\">\\n\n <div class='panel-heading clearfix'>\\n\" : '';\n\n if ($options['preview'] && ($options['type'] == \"bbcode\" || $options['type'] == \"html\")) {\n $html .= openeditortab($tab_title, $tab_active, $options['input_id'].\"-link\", \"\", \"editor-wrapper\");\n }\n\n if ($options['type'] == \"bbcode\" && $options['form_name']) {\n $html .= \"<div class='bbcode_input'>\\n\";\n $html .= display_bbcodes('100%', $options['input_id'], $options['form_name'], $options['input_bbcode']);\n $html .= $options['preview'] ? \"</div>\\n\" : \"\";\n } else if ($options['type'] == \"html\" && $options['form_name']) {\n $html .= \"<div class='m-t-10 m-b-10'>\\n\";\n $html .= display_html($options['form_name'], $options['input_id'], TRUE, TRUE, TRUE, $options['path']); // @todo: image_path to be turned off by default\n $html .= $options['preview'] ? \"</div>\\n\" : \"\";\n }\n\n $html .= ($options['type'] == \"html\" || $options['type'] == \"bbcode\") ? \"</div>\\n</div>\\n<div class='panel-body p-0'>\\n\" : '';\n\n if ($options['preview'] && ($options['type'] == \"bbcode\" || $options['type'] == \"html\")) {\n $html .= \"<div id='tab-content-\".$options['input_id'].\"-link' class='tab-content p-0'>\\n\";\n $html .= opentabbody($tab_title['title'][1], \"txt-\".$options['input_id'], $tab_active);\n }\n\n if ($options['inline_editing'] == TRUE) {\n $html .= \"<div id='\".$options['input_id'].\"' \".($options['width'] ? \"style='display:block; width: \".$options['width'].\";'\" : '').\">\".$input_value.\"</div>\\n\";\n } else {\n $html .= \"<textarea name='$input_name' style='display:block; width: \".$options['inner_width'].\"; height:\".$options['height'].\";\".($options['no_resize'] ? ' resize: none;' : '').\"' rows='\".$options['rows'].\"' cols='' class='form-control m-0 \".($options['inner_class'] ? \" \".$options['inner_class'].\" \" : '').($options['autosize'] ? 'animated-height' : '').\" \".(($options['type'] == \"html\" || $options['type'] == \"bbcode\") ? \"no-shadow no-border\" : '').\" textbox'\".($options['placeholder'] ? \" placeholder='\".$options['placeholder'].\"' \" : '').\" id='\".$options['input_id'].\"'\".($options['deactivate'] ? ' readonly' : '').\" \".($options['required'] ? 'required=\"required\"' : '').($options['maxlength'] ? \" maxlength='\".$options['maxlength'].\"'\" : '').\">\".$input_value.\"</textarea>\\n\";\n }\n\n if ($options['preview'] && ($options['type'] == \"bbcode\" || $options['type'] == \"html\")) {\n $html .= closetabbody();\n $html .= opentabbody($tab_title['title'][0], \"prw-\".$options['input_id'].\"\", $tab_active);\n $html .= $locale['global_003'];\n $html .= closetabbody();\n $html .= \"</div>\\n\";\n add_to_jquery(\"\n // preview syntax\n var form = $('#\".$options['form_name'].\"');\n $('#tab-prw-\".$options['input_id'].\"').bind('click',function(){\n var text = $('#\".$options['input_id'].\"').val();\n var format = '\".($options['type'] == \"bbcode\" ? 'bbcode' : 'html').\"';\n var data = {\n \".(defined('ADMIN_PANEL') ? \"'mode': 'admin', \" : \"\").\"\n 'text' : text,\n 'editor' : format,\n 'url' : '\".$_SERVER['REQUEST_URI'].\"',\n 'form_id' : 'prw-\".$options['form_name'].\"',\n 'fusion_token' : '\".fusion_get_token( \"prw-\".$options['form_name'], 30 ).\"'\n };\n var sendData = form.serialize() + '&' + $.param(data);\n $.ajax({\n url: '\".FUSION_ROOT.INCLUDES.\"dynamics/assets/preview/preview.ajax.php',\n type: 'POST',\n dataType: 'html',\n data : sendData,\n success: function(result) {\n //console.log(result);\n $('#prw-\".$options['input_id'].\"').html(result);\n },\n error: function(result) {\n alert('\".$locale['error_preview'].\"' + '\\\\n\".$locale['error_preview_text'].\"');\n }\n });\n });\n \");\n }\n\n if (($options['type'] == \"html\" || $options['type'] == \"bbcode\") && $options['wordcount'] === TRUE) {\n $html .= \"</div>\\n<div class='panel-footer clearfix'>\\n\";\n $html .= \"<div class='overflow-hide'><i><small>\".$locale['word_count'].\": <span id='\".$options['input_id'].\"-wordcount'></span></small></i></div>\";\n add_to_jquery(\"\n if ($('#\".$options['input_id'].\"').length) {\n var init_str = $('#\".$options['input_id'].\"').val().replace(/<[^>]+>/ig, '').replace(/\\\\n/g,'').replace(/ /g, '').length;\n $('#\".$options['input_id'].\"-wordcount').text(init_str);\n }\n $('#\".$options['input_id'].\"').on('input propertychange paste', function() {\n var str = $(this).val().replace(/<[^>]+>/ig, '').replace(/\\\\n/g,'').replace(/ /g, '').length;\n $('#\".$options['input_id'].\"-wordcount').text(str);\n });\n \");\n $html .= \"</div>\\n<!---panel-footer-->\";\n }\n if ((!$options['type'] == \"bbcode\" && !$options['type'] == \"html\")) {\n $html .= $options['ext_tip'] ? \"<span class='tip'><i>\".$options['ext_tip'].\"</i></span>\" : \"\";\n }\n $html .= $options['inline'] ? \"</div>\\n\" : '';\n if (($options['type'] == \"bbcode\" || $options['type'] == \"html\")) {\n if ($options['wordcount']) {\n $html .= \"</div>\\n\";\n $html .= $options['ext_tip'] ? \"<br/>\\n<span class='tip'><i>\".$options['ext_tip'].\"</i></span>\" : \"\";\n\n } else {\n $html .= \"</div>\\n\";\n $html .= \"</div>\\n\";\n $html .= $options['ext_tip'] ? \"<br/>\\n<span class='tip'><i>\".$options['ext_tip'].\"</i></span>\" : \"\";\n\n }\n }\n\n $html .= (($options['required'] == 1 && \\defender::inputHasError($input_name)) || \\defender::inputHasError($input_name)) ? \"<div id='\".$options['input_id'].\"-help' class='label label-danger text-white p-5 display-inline-block'>\".$options['error_text'].\"</div>\" : \"\";\n $html .= \"</div>\\n\";\n\n \\defender::add_field_session([\n 'input_name' => $input_name,\n 'type' => 'textarea',\n 'title' => $label,\n 'id' => $options['input_id'],\n 'required' => $options['required'],\n 'safemode' => $options['safemode'],\n 'error_text' => $options['error_text'],\n 'censor_words' => $options['censor_words'],\n ]);\n\n return $html;\n}", "function addForm()\n {\n $content = '';\n $template['job_bank_add'] = $this->cObj->getSubpart($this->__getTemplateCode(),\"###ADD_JOB_PLACEHOLDER###\"); \n\n $subPartArray['###CAREERLEVEL###'] = $this->createDropDown($this->job_careerlevel);\n $subPartArray['###FORMNAMEEXTENSIONJOB###'] = $this->prefixId;\n $subPartArray['###FORMNAMEEXTENSION###'] = $this->prefixId;\n $subPartArray[\"###HELP_IMAGE###\"] = t3lib_extMgm::siteRelPath($this->extKey).'images/help.gif';\n $subPartArray['###JOB_BANK_LOCATION###'] = $this->getCountryZone();\n $subPartArray['###QUALIFICATION###'] = $this->createDropDown($this->job_qualifiacation);\n $subPartArray['###SCRIPTNAME_POPUP_HELP_JS###'] = t3lib_extMgm::siteRelPath($this->extKey).'styles/overlib.js';\n $subPartArray[\"###SPONSOR_ID###\"] = $this->sponsorId;\n $subPartArray['###STATUS###'] = $this->createDropDown($this->job_status);\n\n $content .= $this->cObj->substituteMarkerArrayCached($template['job_bank_add'],$subPartArray,array(),array());\n \n return $this->pi_wrapInBaseClass($content);\n\n }", "function addText($text);", "public function html(){\n\t\treturn '<div class=\"form-group\">'.$this->label.$this->input.'</div>';\n\t}", "public function onAddField()\n {\n return $this->makePartial('create_field_form');\n }", "public function form()\n {\n $this->text('code', '基金代码');\n }", "public function getHTML() {\t\n\t\t$html = '';\n\t\tif ($this->type != 'title') $html.= '<p>'.\"\\n\";\n\t\tif ($this->type != 'info' && $this->type != 'system' && $this->type != 'title') \n\t\t\t{\t\t\t\n\t\t\t$html.= '<label id=\"label_for_'. $this->name . '\" name=\"label_for_'. $this->name . '\" for=\"'. $this->name . '\">';\n\t\t\t// special check for files item\n\t\t\tif ($this->type == 'file')\n\t\t\t\t{\n\t\t\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $this->name))\n\t\t\t\t\t{\n\t\t\t\t\t$html.= '<a href = \"/uploads/'. $this->name .'\">'.$this->label.'</a> \n\t\t\t\t\t\t(<a href=\"javascript:void Messi.ask(\\''.DELETE.' ' .$this->name.' ?\\', \n\t\t\t\t\t\tfunction(val) { if(val==\\'Y\\') formSubmit(\\'delete\\',\\'' . $this->name . '\\');});\">'.DELETE.'</a>)';\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t$html.= $this->label.' ('.NONE.')';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t$html.= $this->label;\n\t\t\t\t}\n\t\t\t$html.= '</label>'.\"\\n\";\n\t\t\t}\n\t\t// add dependence of the item for js managing in user interface\n\t\tif ($this->depend != 'none' or $this->depend != '') {\n\t\t\t$html.= '<input type=\"hidden\" id=\"dependance_for_'. $this->name . '\" value=\"'. $this->depend . '\" />'.\"\\n\";\n\t\t}\t\n\t\t$html.= '<input type=\"hidden\" id=\"title_for_'. $this->name . '\" value=\"'. $this->title . '\" />'.\"\\n\";\n\t\tswitch ($this->type)\n\t\t\t{\n\t\t\tcase 'text' : \n\t\t\t\t$html.= '<input id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'password' : \n\t\t\t\t$html.= '<input type=\"password\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'checkbox' : \n\t\t\t\t$html.= '<input type=\"checkbox\" id=\"'. $this->name . '\" name=\"'. $this->name . '\"' . ( ($this->value == 'on') ? \" \n\t\t\t\t\tchecked \" : \"\") . ' onchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'file' : \n\t\t\t\t$html.= '<input type=\"file\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'select' :\n\t\t\t\t$html.= '<select id=\"'. $this->name . '\" name=\"'. $this->name . '\" onchange=\"display_dependance();\" >'.\"\\n\";\n\t\t\t\t$valuesPossible = explode(',',$this->values);\n\t\t\t\tforeach ($valuesPossible as $valuePossible){\n\t\t\t\t\t$html.= '<option value=\"'. $valuePossible . '\" ' . (($valuePossible == $this->value) ? \" selected \" : \"\") . '>'.\n\t\t\t\t\t(($valuePossible == \"none\") ? NONE : $valuePossible) . '</option>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t$html.= '</select><div style=\"clear:both\"></div>'.\"\\n\";\n\t\t\t\tbreak; \n\n\t\t\tcase 'title' : \n\t\t\t\t$html.= \"\\n\". '<h2>'.$this->label.'</h2><hr />'.\"\\n\\n\";\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t// system action items\n\t\t\tcase 'system' : \n\t\t\t\t// a system item will render a button that submit the form with the configured action name in the config-map.php\n\t\t\t\t$html.= '<label></label><input class=\"button\" type=\"button\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'.$this->label.'\" \n\t\t\t\tonclick=\"new Messi(\\''.addslashes($this->help).'\\', {\n\t\t\t\t\ttitle: \\''.addslashes($this->label).'?\\', \n\t\t\t\t\tmodal: true, buttons: [{id: 0, label: \\''.YES.'\\', val: \\'Y\\'}, {id: 1, label: \\''.NO.'\\', val: \\'N\\'}], \n\t\t\t\t\tcallback: function(val) { if(val==\\'Y\\') {openTerminal();formSubmit(\\''.$this->values.'\\');}}});\" />';\n\t\t\t\tbreak;\n\n\t\t\tcase 'html' : \n\t\t\t\t// this is only arbitrary html code to display\n\t\t\t\t$html.= $this->value;\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * HERE YOU CAN ADD THE TYPE RENDERER YOU NEED\n\t\t\t *\n\t\t\t * case 'YOUR_TYPE' : \n\t\t\t *\t$html.= 'ANY_HTML_CODE_TO_RENDER';\n\t\t\t *\tbreak;\n\t\t\t */\n\n\t\t\tdefault : \n\t\t\t\t$html.= '<b>'.NO_METHOD_TO_RENDER_THIS_ITEM .'</b><br />Item : '.$this->name. '<br />Type : '.$this->type. '<br />'.\"\\n\"; \n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\tif ($this->type != 'title') $html.= '</p>'.\"\\n\"; \t\t\n\t\treturn $html;\n\t}", "function form( $instance, $fields = Array() ) {\n parent::form( $instance );\n\n $text = empty( $instance['text'] ) ? '' : $instance['text'];\n ?>\n <p><label for=\"<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>\"><?php _e( 'Text:', 'dh' ); ?></label>\n <textarea id=\"<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'text' ) ); ?>\" rows=\"8\"><?php echo esc_textarea( $text ); ?></textarea>\n <br/>(Top optimally embed an iframe, make sure to have width = 320px for 1 column, 670px for 2 columns and 1020px for 3 columns)</p>\n <?php\n }", "function addLevel()\n\t{\n\t\tglobal $tpl;\n\n\t\t$this->initLevelForm(\"create\");\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "private function addEmailText(){\n\t\t$element = 'body';\n\t\t$opts = array('label'=>'emailMessage','required'=>true,'validators' => array( array('stringLength', false, array(1, 1000) )\t));\n\t\t$this->addElement('textarea',$element,$opts);\n\t\t$this->getElement($element)->setAttribs(array('rows'=>20,'cols'=>30));\n\t\t//$prefix = array();\n\t\t//$decorator = array('DivForm');\n\t\t//$this->addCustomDecorator($prefix,$decorator,$element);\n\t\t$this->applyDecorator($element,false);\n\t\t$this->addToGroup($element);\n\t}", "public function admin_form($data) {\n\t\t\t$ret = 'To enter content into this WYSIWYG:<br/>\n\t\t\t\t\t1. Give this module a name <input onchange=\"cfct_module_wysiwyg_change();\" type=\"text\" name=\"'.$this->get_field_name('title').'\" id=\"'.$this->get_field_id('title').'\" value=\"'.(!empty($data[$this->get_field_name('title')]) ? esc_html($data[$this->get_field_name('title')]) : '').'\" style=\"width: 150px;\" /><br/>\n\t\t\t\t\t2. Click Save<br/>\n\t\t\t\t\t3. Update this page<br/>\n\t\t\t\t\t4. Edit module content via WYSIWYG tab named <span style=\"font-weight:bold;\" id=\"cfct-module-wysiwyg-name\">'.(!empty($data[$this->get_field_name('title')]) ? esc_html($data[$this->get_field_name('title')]) : '').'</span>';\n\t\t\treturn $ret;\n\t\t}", "function ctools_export_form($form, &$form_state, $code, $title = '') {\r\n $lines = substr_count($code, \"\\n\");\r\n $form['code'] = array(\r\n '#type' => 'textarea',\r\n '#title' => $title,\r\n '#default_value' => $code,\r\n '#rows' => $lines,\r\n );\r\n\r\n return $form;\r\n}", "public function uultra_load_wdiget_addition_form()\r\n\t{\r\n\t\t$html = '';\r\n\t\t$html .= '<div class=\"uultra-adm-widget-cont-add-new\" >';\r\n \r\n\t\t$html .= '<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=\"50%\"> '.__(\"Name: \",'xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\"><input name=\"uultra_add_mod_widget_title\" type=\"text\" id=\"uultra_add_mod_widget_title\" style=\"width:120px\" /> \r\n\t\t </td>\r\n\t\t </tr>\r\n\t\t <tr>\r\n\t\t\t\t<td width=\"50%\"> '.__('Type:','xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\">\r\n\t\t\t\t<select name=\"uultra_add_mod_widget_type\" id=\"uultra_add_mod_widget_type\" size=\"1\">\r\n\t\t\t\t <option value=\"\" selected=\"selected\">'.__(\"Select Type: \",'xoousers').'</option>\r\n\t\t\t\t <option value=\"1\">'.__(\"Text: \",'xoousers').'</option>\r\n\t\t\t\t <option value=\"2\">Shortcode</option>\r\n\t\t\t\t</select>\r\n\r\n\t\t </td>\r\n\t\t\t </tr>\r\n\t\t<tr>\r\n\t\t\t\t<td width=\"50%\"> '.__('Editable by user:','xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\">\r\n\t\t\t\t<select name=\"uultra_add_mod_widget_editable\" id=\"uultra_add_mod_widget_editable\" size=\"1\">\r\n\t\t\t\t \r\n\t\t\t\t <option value=\"0\" selected=\"selected\">'.__(\"NO \",'xoousers').'</option>\r\n\t\t\t\t <option value=\"1\">'.__(\"YES\",'xoousers').'</option>\r\n\t\t\t\t</select>\r\n\r\n\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t \r\n\t\t\t <tr>\r\n\t\t\t\t<td>'.__('Content:','xoousers').'</td>\r\n\t\t\t\t<td>&nbsp;</textarea> \r\n\t\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t \r\n\t\t\t <tr>\r\n\t\t\t\t\r\n\t\t\t\t<td colspan=\"2\"><textarea name=\"uultra_add_mod_widget_content\" id=\"uultra_add_mod_widget_content\" style=\"width:98%;\" rows=\"5\"></textarea> \r\n\t\t\t </td>\r\n\t\t\t </tr> \r\n\t\t\t \r\n\t\t\t \r\n\t\t\t</table> '; \t\t\t\r\n\t\t\t \r\n\t\t\t$html .= ' <p class=\"submit\">\r\n\t\t\t\t\t<input type=\"button\" name=\"submit\" class=\"button uultra-widgets-add-new-close\" value=\"'.__('Close','xoousers').'\" /> <input type=\"button\" name=\"submit\" class=\"button button-primary uultra-widgets-add-new-confirm\" value=\"'.__('Submit','xoousers').'\" /> <span id=\"uultra-add-new-widget-m-w\" ></span>\r\n\t\t\t\t</p> ';\r\n\t\t\t\t\r\n\t\t\t$html .= '</div>';\r\n\t\t\t\t\r\n\t\t\techo $html;\r\n\t\t\tdie();\r\n\t\r\n\t}", "function create() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->createElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "function showPreview() {\r\n $tpl = new tpl('gbook');\r\n $tpl->set(\"TEXT\", BBcode(escape($_POST[\"txt\"], \"textarea\")));\r\n $tpl->out('preview');\r\n}", "function add_email_form( $slp_html ) {\n\t\t if ( $this->addon->options['email_link_format'] !== 'popup_form' ) {\n\t\t \treturn $slp_html;\n\t\t }\n\n\t\t $form_html =\n\t\t\t '<div id=\"email_form\">' .\n\t\t\t '<form id=\"the_email_form\"><fieldset>' .\n\t\t\t wp_nonce_field( 'email_form', 'email_nonce' ) .\n\t\t\t '<input type=\"hidden\" name=\"sl_id\" value=\"\" /> ' .\n\t\t\t \"<input type='text' name='email_from' \t \" .\n\t\t\t \"placeholder='{$this->addon->options['popup_email_from_placeholder']}' />\" .\n\t\t\t \"<input type='text' name='email_subject' \" .\n\t\t\t \"placeholder='{$this->addon->options['popup_email_subject_placeholder']}' />\" .\n\t\t\t \"<textarea name='email_message' \" .\n\t\t\t \"placeholder='{$this->addon->options['popup_email_message_placeholder']}' ></textarea> \" .\n\t\t\t '</fieldset></form>' .\n\t\t\t '</div>';\n\n\t\t return $slp_html . $form_html;\n\t }", "function form( $instance ) {\n\t\t$instance = wp_parse_args(\n\t\t\t(array) $instance,\n\t\t\tarray(\n\n\t\t\t\t'text' => esc_html__( 'We create web products for the help and growth of your business.', 'bauhaus' ),\n\t\t\t\t'title' => esc_attr( 'Bauhaus.', 'bauhaus' ),\n\n\n\t\t\t)\n\t\t);\n\t\textract( $instance );\n\n\n\t\t?>\n\t\t<p>\n\t\t\t<label\n\t\t\t\tfor=\"<?php echo esc_attr( esc_attr( $this->get_field_id( 'title' ) ) ); ?>\"> <?php esc_html_e( ' Insert title',\n\t\t\t\t\t'bauhaus' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( esc_attr( $this->get_field_id( 'title' ) ) ); ?>\"\n\t\t\t name=\"<?php echo esc_attr( esc_attr( $this->get_field_name( 'title' ) ) ); ?>\" type=\"text\"\n\t\t\t value=\"<?php if ( isset( $title ) ) {\n\t\t\t\t echo esc_attr( $title );\n\t\t\t } ?>\">\n\t\t</p>\n\t\t<p>\n\t\t\t<label\n\t\t\t\tfor=\"<?php echo esc_attr( esc_attr( $this->get_field_id( 'text' ) ) ); ?>\"> <?php esc_html_e( ' Insert text:',\n\t\t\t\t\t'bauhaus' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( esc_attr( $this->get_field_id( 'text' ) ) ); ?>\"\n\t\t\t name=\"<?php echo esc_attr( esc_attr( $this->get_field_name( 'text' ) ) ); ?>\" type=\"text\"\n\t\t\t value=\"<?php if ( isset( $text ) ) {\n\t\t\t\t echo esc_attr( $text );\n\t\t\t } ?>\">\n\t\t</p>\n\n\n\t\t<?php\n\t}", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $msg = html_div(\"ft_form_msg\") ;\r\n $msg->add(html_p(html_b(\"Processing the SDIF Queue requires\r\n processing swimmers, swim meets, and/or swim teams which are\r\n not currently stored in the database. Specify how unknown\r\n data should be processed.\"), html_br())) ;\r\n\r\n $td = html_td(null, null, $msg) ;\r\n $td->set_tag_attribute(\"colspan\", \"2\") ;\r\n $table->add_row($td) ;\r\n $table->add_row($this->element_label(\"Swimmers\"), $this->element_form(\"Swimmers\")) ;\r\n $table->add_row($this->element_label(\"Swim Meets\"), $this->element_form(\"Swim Meets\")) ;\r\n $table->add_row($this->element_label(\"Swim Teams\"), $this->element_form(\"Swim Teams\")) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "public function render() {\n if($this->required\n && $this->form->isSubmitted()\n && !$this->checkValue()) {\n $this->error = TRUE;\n $this->cssClass = 'error';\n }\n\n $this->value = htmlspecialchars($this->value);\n\n $html = '<textarea id=\"'.$this->id.'\" name=\"'.$this->name.'\"';\n $html .= (bool)$this->cols ? ' cols=\"'.$this->cols.'\"' : NULL;\n $html .= (bool)$this->rows ? ' rows=\"'.$this->rows.'\"' : NULL;\n $html .= (bool)$this->cssClass ? ' class=\"'.$this->cssClass.'\"' : NULL;\n $html .= '>'.$this->value.'</textarea>';\n\n $this->html = $this->wrap($html);\n }", "public function render(): String\n {\n\n $this->view = \"<form action='$this->action' method='$this->method' name='$this->name' id='$this->id'\";\n\n // Add all other attributes like class, id, required etc.\n foreach ($this->attr as $key => $value) {\n $this->view .= \" $key=$value \";\n }\n $this->view .= \"/>\";\n\n // Add field's HTML code\n $fieldsView = $this->renderFields();\n $this->view .= \" <br> $fieldsView\";\n\n // Add submit button HTML code\n $submitButtonView = $this->buildSubmitButton();\n $this->view .= \" <br> $submitButtonView\";\n\n // Close the form tag\n $this->view .= \" <br> </form>\";\n\n return $this->view;\n }", "function form($instance) {\n\t\t$cta_text = ! empty( $instance['cta_text'] ) ? $instance['cta_text'] : 'Example cta text';\n\t\t?>\n\t\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id( 'cta_text' ); ?>\"><?php echo 'CTA Text'; ?></label> \n\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'cta_text' ); ?>\" name=\"<?php echo $this->get_field_name( 'cta_text' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $cta_text ); ?>\">\n\t\t</p>\n\t\t<?php \t\n\n\t\t//Input for button text\n\t\t$button_text = ! empty( $instance['button_text'] ) ? $instance['button_text'] : 'Example button text';\n\t\t?>\n\t\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id( 'button_text' ); ?>\"><?php echo 'Button Text'; ?></label> \n\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'button_text' ); ?>\" name=\"<?php echo $this->get_field_name( 'button_text' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $button_text ); ?>\">\n\t\t</p>\n\t\t<?php \n\t}", "public function add_text($text)\n {\n }", "public function addForm() {\n $this->view->displayForm();\n }", "public function create_textfield( $args=array() ) {\n $settings = get_option( 'bii_instagram' );\n $classes = ( isset( $args['code'] ) && $args['code'] ? 'regular-text code' : '' );\n $type = ( isset( $args['type'] ) && $args['type'] ? $args['type'] : 'text' );\n $default = ( isset( $args['default'] ) ? $args['default'] : '' );\n printf( '<input name=\"bii_instagram[%s]\" type=\"%s\" value=\"%s\" class=\"%s\" />', $args['name'], $type, ( isset( $settings[ $args['name'] ] ) ? $settings[ $args['name'] ] : $default ), $classes );\n }", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "function training_security_display_text($form, &$form_state) {\n $output = check_plain($form_state['values']['markup_security']['text_security']);\n $form['markup_security']['#markup'] = $output;\n\n return $form['markup_security'];\n}", "public function addText($text)\n {\n if (!$text instanceof HtmlStringable) {\n $text = \\htmlspecialchars((string) $text, \\ENT_NOQUOTES, 'UTF-8');\n }\n return $this->insert(null, $text);\n }", "public function getForm(): string\n {\n return $this->html;\n }", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "function insert_post($advanced = FALSE){\r\n $new_post = new form('new_post');\r\n $new_post->add(new form_text('title', 'Title'));\r\n $new_post->title->set_validators('is_safe_text', 'is_required');\r\n $new_post->title->set_attributes(array('length' => 255, 'size' => 80));\r\n\r\n // run query to get all the navigation items that can have content sent to\r\n $result = $this->reg->db->GetAll('SELECT id, name\r\n FROM system__navigation\r\n WHERE navigation_type != ?', array('direct'));\r\n\r\n // populate pages array for form object\r\n $pages_array = array('' => 'Choose a Page');\r\n foreach($result as $pages){\r\n $pages_array[$pages['id']] = ucwords($pages['name']);\r\n }\r\n\r\n $new_post->add(new form_select('pages', 'Submit to', $pages_array));\r\n $new_post->pages->set_multiplier(1, 'Add Another');\r\n\r\n // show advanced options if enabled\r\n if($advanced){\r\n $new_post->add(new form_hidden('advanced', TRUE));\r\n\r\n // get default option values\r\n $default_options = array();\r\n if($this->reg->config->is_set('post_show_title') && $this->reg->config->get('post_show_title'))\r\n $default_options[] = 'show_title';\r\n if($this->reg->config->is_set('post_show_date') && $this->reg->config->get('post_show_date'))\r\n $default_options[] = 'show_date';\r\n\r\n // create options check boxes\r\n $new_post->add(new form_checkbox('options', 'Options', array('show_title' => 'Show Title', 'show_date' => 'Show Date')));\r\n $new_post->options->set_default($default_options);\r\n\r\n // create rich text editor\r\n $new_post->add(new form_editor_ace('head', 'Hook Into HTML Head', 'html'));\r\n $new_post->head->set_attributes(array('style' => 'height:10em;'));\r\n $new_post->head->set_li_attributes(array('class' => 'form-richtextarea'));\r\n\r\n // create rich text editor\r\n $new_post->add(new form_editor_ace('content', 'Content'));\r\n $new_post->content->set_validators('is_required');\r\n $new_post->content->set_attributes(array('style' => 'height:30em;'));\r\n $new_post->content->set_li_attributes(array('class' => 'form-richtextarea'));\r\n }else{\r\n // create rich text editor\r\n $new_post->add(new form_editor_ckeditor('content', 'Content'));\r\n $new_post->content->set_validators('is_required');\r\n $new_post->content->set_li_attributes(array('class' => 'form-richtextarea'));\r\n }\r\n\r\n $new_post->add(new form_submit('save', 'Save'));\r\n $new_post->add(new form_submit('state', 'Publish'))->set_attributes(array('value' => 1));\r\n\r\n // return the form html\r\n return $new_post->run();\r\n }", "public function add() {\n\t\t\n\t\t$this->template->content = View::instance(\"v_posts_add\");\n\t\t\n\t\t$client_files_body = Array(\n\t\t\t'/js/jquery.form.js',\n\t\t\t'/js/posts_add.js'\n\t\t);\n\t\t\n\t\t$this->template->client_files_body = Utils::load_client_files($client_files_body);\n\n\t\techo $this->template;\n\t\t\n\t}", "function html_form_code() {\n $form = \"\";\n $form.=\"<form action='\" . esc_url($_SERVER['REQUEST_URI']) . \"' method='post'>\";\n $form.=\"<input type='text' name='ms-name' value='\" . ( isset($_POST[\"ms-name\"]) ? esc_attr($_POST[\"ms-name\"]) : '' ) . \"' placeholder='Ваше Имя'/>\";\n $form.=\"<input type='email' name='ms-email' value='\" . ( isset($_POST[\"ms-email\"]) ? esc_attr($_POST[\"ms-email\"]) : '' ) . \"' placeholder='Ваш E-mail'/>\";\n $form.=\"<input name='ms-submit' type='submit' id='add-share-btn' value='Получить доступ'/>\";\n $form.=\"</form>\";\n echo $form;\n}", "public function renderCreateModalHTML()\n {\n $input_form = \"<div class=\\\"form-group\\\">\n <label for=\\\"{{label}}\\\">{{label}}</label>\n <input type=\\\"{{type}}\\\" class=\\\"form-control\\\" id=\\\"create_input_{{label}}\\\">\n </div>\";\n $break_line = \"\\n\";\n\n $form_result = \"\";\n $columns = $this->getShowColumnCreateModal();\n foreach ($columns as $name => $type) {\n $input_type = 'text';\n\n if ($type == \"bigint\" OR $type == \"integer\"){\n $input_type = 'number';\n }elseif ($type == \"string\"){\n $input_type = 'text';\n }elseif ($type == \"datetime\"){\n $input_type = 'datetime-local';\n }\n\n $one_form = str_replace(\n [\n '{{label}}','{{type}}'\n ],\n [\n $name, $input_type\n ],\n $input_form\n );\n $form_result = $form_result.$one_form.$break_line;\n }\n\n return $form_result;\n }", "function areatext($text,$type)\n {\n\tif($text!=null)\n\t{\n\t\tif($type='edit')\n\t\t{\n\t\t\t$valeur = htmlspecialchars(bbcodereverse(remplacer($text)));\n\t\t}\n\t\t\n\t\tif($type ='quote')\n\t\t{\n\t\t\t$valeur =\"[quote]\";\n\t\t\t$valeur .=htmlspecialchars(bbcodereverse(remplacer($text)));\n\t\t\t$valeur .=\"[/quote]\";\n\t\t}\n\t}\n\t\t\t\t\t$textarea .='<tr class=\"title2\">';\n\t\t\t\t\t$textarea .='<td colspan=\"2\" height=\"25px\">';\n\t\t\t\t\t$textarea .='<ul class=\"balise\">';\n\t\t\t\t\t//\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[b]cry[/b]')\\\"><b>G</b></div></li>\";\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[u]cry[/u]')\\\"><span style=\\\"text-decoration:underline;\\\">S</span></div></li>\";\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[s]cry[/s]')\\\"><span style=\\\"text-decoration: line-through;\\\">S</span></div></li>\";\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[i]cry[/i]')\\\"><i>I</i></div></li>\";\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[url]adresse de l url[/url]')\\\">insérer une adresse url</div></li>\";\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[image]adresse de l image[/image]')\\\">insérer une image</div></li>\";\n\t\t\t\t\t//les couleurs\n\t\t\t\t\t$textarea .=\"<li>\";\n\t\t\t\t\t$textarea .=\"<select>\";\n\t\t\t\t\t$textarea .=\"<OPTION VALUE=\\\"rouge\\\" onClick=\\\"addForum('[color=red]cry[/color]')\\\"><span style=\\\"color:red;\\\">rouge</span></OPTION>\n\t\t\t\t\t\t\t\t\t<OPTION VALUE=\\\"bleu\\\" onClick=\\\"addForum('[color=blue]cry[/color]')\\\"><span style=\\\"color:blue;\\\">bleu</span></OPTION>\n\t\t\t\t\t\t\t\t\t<OPTION VALUE=\\\"vert\\\" onClick=\\\"addForum('[color=green]cry[/color]')\\\"><span style=\\\"color:green;\\\">vert</span></OPTION>\n\t\t\t\t\t\t\t\t\t<OPTION VALUE=\\\"lime\\\" onClick=\\\"addForum('[color=lime]cry[/color]')\\\"><span style=\\\"color:lime;\\\">lime</span></OPTION>\n\t\t\t\t\t\t\t\t\t<OPTION VALUE=\\\"jaune\\\" onClick=\\\"addForum('[color=jaune]cry[/color]')\\\"><span style=\\\"color:yellow;\\\">jaune</span></OPTION>\n\t\t\t\t\t\t\t\t\t<OPTION VALUE=\\\"orange\\\" onClick=\\\"addForum('[color=orange]cry[/color]')\\\"><span style=\\\"color:orange;\\\">orange</span></OPTION>\n\t\t\t\t\t\t\t\t\t<OPTION VALUE=\\\"autres\\\" onClick=\\\"addForum('[color=#]cry[/color]')\\\">Autres</OPTION>\";\n\t\t\t\t\t// $textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[color]votre texte[/color]')\\\">couleur</div></li>\";\n\t\t\t\t\t$textarea .=\"</select>\";\n\t\t\t\t\t$textarea .=\"</li>\";\n\t\t\t\t\t//fin des couleurs\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[list][*][*][*][/list]')\\\">insérer une list</div></li>\";\n\t\t\t\t\t//\n\t\t\t\t\t$textarea .='</ul>';\n\t\t\t\t\t$textarea .='</td>';\n\t\t\t\t\t$textarea .='</tr>';\n\t\t\t\t\t$textarea .= $error2;\n\t\t\t\t\t$textarea .='<tr>';\n\t\t\t\t\t$textarea .='<td>';\n\t\t\t\t\t$textarea .='<h2>Smiley</h2>';\n\t\t\t\t\t$textarea .=\"<p><table>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/cry.png\\\" alt=\\\"pleuré\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]cry[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/dangerous.png\\\" alt=\\\"Dangereux\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]dangerous[/smiley]')\\\"/></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/evil.png\\\" alt=\\\"demon\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]evil[/smiley]')\\\"/></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>cry</td>\n\t\t\t\t\t\t\t\t\t\t<td>dangerous</td>\n\t\t\t\t\t\t\t\t\t\t<td>evil</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/gomennasai.png\\\" alt=\\\"gomennasai\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]gomennasai[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/hoho.png\\\" alt=\\\"hoho\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]hoho[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/nyu.png\\\" alt=\\\"nyu\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]nyu[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>gomennasai</td>\n\t\t\t\t\t\t\t\t\t\t<td>hoho</td>\n\t\t\t\t\t\t\t\t\t\t<td>nyu</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/reallyangry.png\\\" alt=\\\"en colere\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]reallyangry[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/shamed.png\\\" alt=\\\"géné\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]shamed[/smiley]')\\\" /></td>\t\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/socute.png\\\" alt=\\\"adoré\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]socute[/smiley]')\\\"/></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>reallyangry</td>\n\t\t\t\t\t\t\t\t\t\t<td>shamed</td>\t\n\t\t\t\t\t\t\t\t\t\t<td>socute</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/sorry.png\\\" alt=\\\"désolé\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]sorry[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/what.png\\\" alt=\\\"quoi\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]what[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/xd.png\\\" alt=\\\"xd\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]xd[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>sorry</td>\n\t\t\t\t\t\t\t\t\t\t<td>what</td>\n\t\t\t\t\t\t\t\t\t\t<td>xd</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</table></p>\";\n\t\t\t\t\t$textarea .='</td>';\n\t\t\t\t\t$textarea .='<td>';\n\t\t\t\t\t$textarea .='<h2>message</h2>';\n\t\t\t\t\t$textarea .='<p><TEXTAREA name=\"messages\" id=\"messages\" rows=20 COLS=80>'.$valeur.'</TEXTAREA></p>';\n\t\t\t\t\t$textarea .='</td>';\n\t\t\t\t\t$textarea .='</tr>';\n\t\t\t\t\t\n\treturn $textarea;\n}", "public function render()\r\n { \r\n $val = \"\";\r\n\t\tif(isset($_POST[$this->get_name()])) \r\n\t\t\t$val = htmlspecialchars($this->get_value());\r\n\t\telse $val = '';\r\n\t\t$html = array();\r\n \t$html[] = sprintf(\r\n '<textarea name=\"%s\" id=\"%1$s\" %s>'. $val .'</textarea>',\r\n $this->name,\r\n $this->attributestorage->get_attributes()\r\n );\r\n return implode('\\n', $html);\r\n }", "function show_form()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$raw_post = \"\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Unconvert the saved post if required\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! isset($_POST['Post']) )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// If we're using RTE, then just clean up html\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $this->han_editor->method == 'rte' )\n\t\t\t{\n\t\t\t\t$raw_post = $this->parser->convert_ipb_html_to_html( $this->orig_post['post'] );\n\n\t\t\t\tif( intval($this->orig_post['post_htmlstate']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] )\n\t\t\t\t{\n\t\t\t\t\t# Make EMO_DIR safe so the ^> regex works\n\t\t\t\t\t$raw_post = str_replace( \"<#EMO_DIR#>\", \"&lt;#EMO_DIR&gt;\", $raw_post );\n\t\t\t\t\t\n\t\t\t\t\t# New emo\n\t\t\t\t\t$raw_post = preg_replace( \"#(\\s)?<([^>]+?)emoid=\\\"(.+?)\\\"([^>]*?)\".\">(\\s)?#is\", \"\\\\1\\\\3\\\\5\", $raw_post );\n\t\t\t\t\t\n\t\t\t\t\t# And convert it back again...\n\t\t\t\t\t$raw_post = str_replace( \"&lt;#EMO_DIR&gt;\", \"<#EMO_DIR#>\", $raw_post );\n\n\t\t\t\t\t$raw_post = $this->parser->convert_std_to_rte( $raw_post );\n\t\t\t\t}\n\n\t\t\t\tif( isset($this->orig_post['post_htmlstate']) AND $this->orig_post['post_htmlstate'] == 2 )\n\t\t\t\t{\n\t\t\t\t\t$raw_post = str_replace( '&lt;br&gt;', \"<br />\", $raw_post );\n\t\t\t\t\t$raw_post = str_replace( '&lt;br /&gt;', \"<br />\", $raw_post );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->orig_post['post_htmlstate'] = isset($this->orig_post['post_htmlstate']) ? $this->orig_post['post_htmlstate'] : 0;\n\t\t\t\t$this->parser->parse_html = intval($this->orig_post['post_htmlstate']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] ? 1 : 0;\n\t\t\t\t$this->parser->parse_nl2br = (isset($this->orig_post['post_htmlstate']) AND $this->orig_post['post_htmlstate'] == 2) ? 1 : 0;\n\t\t\t\t$this->parser->parse_smilies = intval($this->orig_post['use_emo']);\n\t\t\t\t$this->parser->parse_bbcode = $this->forum['use_ibc'];\n\n\t\t\t\tif( $this->parser->parse_html )\n\t\t\t\t{\n\t\t\t\t\t# Make EMO_DIR safe so the ^> regex works\n\t\t\t\t\t$this->orig_post['post'] = str_replace( \"<#EMO_DIR#>\", \"&lt;#EMO_DIR&gt;\", $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t# New emo\n\t\t\t\t\t$this->orig_post['post'] = preg_replace( \"#(\\s)?<([^>]+?)emoid=\\\"(.+?)\\\"([^>]*?)\".\">(\\s)?#is\", \"\\\\1\\\\3\\\\5\", $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t# And convert it back again...\n\t\t\t\t\t$this->orig_post['post'] = str_replace( \"&lt;#EMO_DIR&gt;\", \"<#EMO_DIR#>\", $this->orig_post['post'] );\n\t\t\t\t\n\t\t\t\t\t$this->orig_post['post'] = $this->parser->convert_ipb_html_to_html( $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t$this->orig_post['post'] = htmlspecialchars( $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\tif( $this->parser->parse_nl2br )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->orig_post['post'] = str_replace( '&lt;br&gt;', \"\\n\", $this->orig_post['post'] );\n\t\t\t\t\t\t$this->orig_post['post'] = str_replace( '&lt;br /&gt;', \"\\n\", $this->orig_post['post'] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$raw_post = $this->parser->pre_edit_parse( $this->orig_post['post'] );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( $this->han_editor->method != 'rte' )\n\t\t\t{\n\t\t\t\t$_POST['Post'] = str_replace( '&', '&amp;', $_POST['Post'] );\n\t\t\t}\n\n\t\t\tif ( $this->ipsclass->input['_from'] == 'quickedit' )\n\t\t\t{\n\t\t\t\t$this->orig_post['post_htmlstatus'] = isset($this->orig_post['post_htmlstatus']) ? $this->orig_post['post_htmlstatus'] : 0;\n\t\t\t\t$this->parser->parse_html = intval($this->orig_post['post_htmlstatus']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] ? 1 : 0;\n\t\t\t\t$this->parser->parse_nl2br = (isset($this->ipsclass->input['post_htmlstatus']) AND $this->ipsclass->input['post_htmlstatus'] == 2) ? 1 : 0;\n\t\t\t\t$this->parser->parse_smilies = intval($this->orig_post['use_emo']);\n\t\t\t\t$this->parser->parse_bbcode = $this->forum['use_ibc'];\n\n\t\t\t\tif ( $this->han_editor->method == 'rte' )\n\t\t\t\t{\n\t\t\t\t\t$raw_post = $this->parser->convert_std_to_rte( $this->ipsclass->txt_stripslashes( $_POST['Post'] ) );\n\t\t\t\t\t\n\t\t\t\t\tforeach( $this->ipsclass->skin['_macros'] as $row )\n\t\t\t \t{\n\t\t\t\t\t\tif ( $row['macro_value'] != \"\" )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$raw_post = str_replace( \"<{\".$row['macro_value'].\"}>\", $row['macro_replace'], $raw_post );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$raw_post = str_replace( \"<#IMG_DIR#>\", $this->ipsclass->skin['_imagedir'], $raw_post );\n\t\t\t\t\t$raw_post = str_replace( \"<#EMO_DIR#>\", $this->ipsclass->skin['_emodir'] , $raw_post );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$raw_post = $this->ipsclass->txt_stripslashes( $_POST['Post'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$raw_post = $this->ipsclass->txt_stripslashes( $_POST['Post'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Is this the first post in the topic?\n\t\t//-----------------------------------------\n\t\t\n\t\t$topic_title = \"\";\n\t\t$topic_desc = \"\";\n\t\t\n\t\tif ( $this->edit_title == 1 )\n\t\t{\n\t\t\t$topic_title = isset($_POST['TopicTitle']) ? $this->ipsclass->input['TopicTitle'] : $this->topic['title'];\n\t\t\t$topic_desc = isset($_POST['TopicDesc']) ? $this->ipsclass->input['TopicDesc'] : $this->topic['description'];\n\t\t\t\n\t\t\t$topic_title = $this->ipsclass->compiled_templates['skin_post']->topictitle_fields( array( 'TITLE' => $topic_title, 'DESC' => $topic_desc ) );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Do we have any posting errors?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( isset($this->obj['post_errors']) AND $this->obj['post_errors'] )\n\t\t{\n\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->errors( $this->ipsclass->lang[ $this->obj['post_errors'] ]);\n\t\t}\n\t\t\n\t\tif ( isset($this->obj['preview_post']) AND $this->obj['preview_post'] )\n\t\t{\n\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->preview( $this->show_post_preview( $this->post['post'], $this->post_key ) );\n\t\t}\n\t\t\n\t\t$this->output .= $this->html_start_form( array( 1 => array( 'CODE' , '09' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t2 => array( 't' , $this->topic['tid']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t3 => array( 'p' , $this->ipsclass->input['p'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t4 => array( 'st' , $this->ipsclass->input['st'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t5 => array( 'attach_post_key', $this->post_key )\n\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\n\t\t//-----------------------------------------\n\t\t// START TABLE\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->table_structure();\n\t\t\n\t\t$start_table = $this->ipsclass->compiled_templates['skin_post']->table_top( \"{$this->ipsclass->lang['top_txt_edit']} {$this->topic['title']}\");\n\t\t\n\t\t$name_fields = $this->html_name_field();\n\t\t\n\t\t$post_box = $this->html_post_body( $raw_post );\n\t\t\t\n\t\t$mod_options = $this->edit_title == 1 ? $this->mod_options('edit') : '';\n\t\t\n\t\t$end_form = $this->ipsclass->compiled_templates['skin_post']->EndForm( $this->ipsclass->lang['submit_edit'] );\n\t\t\n\t\t$post_icons = $this->html_post_icons($this->orig_post['icon_id']);\n\t\t\n\t\t$upload_field = $this->can_upload ? $this->html_build_uploads($this->post_key,'edit',$this->orig_post['pid']) : '';\n\t\t\n\t\t//-----------------------------------------\n\t\t// Still here?\n\t\t//-----------------------------------------\n\t\t\n\t\t$poll_box = \"\";\n\t\t\n\t\tif ( $this->can_add_poll )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Did someone hit preview / do we have\n\t\t\t// post info?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$poll_questions = \"\";\n\t\t\t$poll_choices = \"\";\n\t\t\t$poll_votes = \"\";\n\t\t\t$show_open = 0;\n\t\t\t$is_mod = 0;\n\t\t\t$poll_only\t\t= \"\";\n\t\t\t$poll_multi\t\t= \"\";\t\t\t\n\t\t\t\n\t\t\tif ( isset($_POST['question']) AND is_array( $_POST['question'] ) and count( $_POST['question'] ) )\n\t\t\t{\n\t\t\t\tforeach( $_POST['question'] as $id => $question )\n\t\t\t\t{\n\t\t\t\t\t$poll_questions .= \"\\t{$id} : '\".str_replace( \"'\", '&#39;', $question ).\"',\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_question = $this->ipsclass->input['poll_question'];\n\t\t\t\t$show_open = 1;\n\t\t\t\t\n\t\t\t\tif ( is_array( $_POST['choice'] ) and count( $_POST['choice'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['choice'] as $id => $choice )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_choices .= \"\\t'{$id}' : '\".str_replace( \"'\", '&#39;', $choice ).\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( isset($_POST['multi']) AND is_array( $_POST['multi'] ) and count( $_POST['multi'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['multi'] as $id => $checked )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_multi .= \"\\t{$id} : '{$checked}',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( is_array( $_POST['votes'] ) and count( $_POST['votes'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['votes'] as $id => $vote )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_votes .= \"\\t'{$id}' : '\".$vote.\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_only = 0;\n\t\t\t\t\n\t\t\t\tif( $this->ipsclass->vars['ipb_poll_only'] AND $this->ipsclass->input['poll_only'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$poll_only = \"checked='checked'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_questions = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_questions );\n\t\t\t\t$poll_choices = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_choices );\n\t\t\t\t$poll_multi \t= preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_multi );\n\t\t\t\t$poll_votes = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_votes );\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Load the poll from the DB\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'polls', 'where' => \"tid=\".$this->topic['tid'] ) );\n\t\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t \t\t$this->poll_data = $this->ipsclass->DB->fetch_row();\n\t \t\t\n\t \t\t$this->poll_answers = $this->poll_data['choices'] ? unserialize(stripslashes($this->poll_data['choices'])) : array();\n\n \t\t//-----------------------------------------\n \t\t// Lezz go\n \t\t//-----------------------------------------\n \t\t\n \t\tforeach( $this->poll_answers as $question_id => $data )\n \t\t{\n \t\t\t$poll_questions .= \"\\t{$question_id} : '\".str_replace( \"'\", '&#39;', $data['question'] ).\"',\\n\";\n \t\t\t\n \t\t\t$data['multi']\t = isset($data['multi']) ? intval($data['multi']) : 0;\n \t\t\t$poll_multi \t.= \"\\t{$question_id} : '\".$data['multi'].\"',\\n\";\n \t\t\t\n \t\t\tforeach( $data['choice'] as $choice_id => $text )\n\t\t\t\t\t{\n\t\t\t\t\t\t$choice = $text;\n\t\t\t\t\t\t$votes = intval($data['votes'][ $choice_id ]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$poll_choices .= \"\\t'{$question_id}_{$choice_id}' : '\".str_replace( \"'\", '&#39;', $choice ).\"',\\n\";\n\t\t\t\t\t\t$poll_votes .= \"\\t'{$question_id}_{$choice_id}' : '\".$votes.\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_only = 0;\n\t\t\t\t\n\t\t\t\tif ( $this->ipsclass->vars['ipb_poll_only'] AND $this->poll_data['poll_only'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$poll_only = \"checked='checked'\";\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Trim off trailing commas (Safari hates it)\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$poll_questions = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_questions );\n\t\t\t\t$poll_choices = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_choices );\n\t\t\t\t$poll_multi \t= preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_multi );\n\t\t\t\t$poll_votes = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_votes );\n\t\t\t\t\n\t\t\t\t$poll_question = $this->poll_data['poll_question'];\n\t\t\t\t$show_open = $this->poll_data['choices'] ? 1 : 0;\n\t\t\t\t$is_mod = $this->can_add_poll_mod;\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Print poll box\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$poll_box = $this->ipsclass->compiled_templates['skin_post']->poll_box( $this->max_poll_questions, $this->max_poll_choices_per_question, $poll_questions, $poll_choices, $poll_votes, $show_open, $poll_question, $is_mod, $poll_multi, $poll_only );\n\t\t}\n\t\t\n\t\t$edit_option = \"\";\n\t\t\n\t\tif ($this->ipsclass->member['g_append_edit'])\n\t\t{\n\t\t\t$checked = \"\";\n\t\t\t$show_reason = 0;\n\t\t\t\n\t\t\tif ($this->orig_post['append_edit'])\n\t\t\t{\n\t\t\t\t$checked = \"checked\";\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->moderator['edit_post'] OR $this->ipsclass->member['g_is_supmod'] )\n\t\t\t{\n\t\t\t\t$show_reason = 1;\n\t\t\t}\n\t\t\t\n\t\t\t$edit_option = $this->ipsclass->compiled_templates['skin_post']->add_edit_box( $checked, $show_reason, $this->ipsclass->input['post_edit_reason'] ? $this->ipsclass->input['post_edit_reason'] : $this->orig_post['post_edit_reason'] );\n\t\t}\n\t\t\n\t\t$this->output = str_replace( \"<!--START TABLE-->\" , $start_table , $this->output );\n\t\t$this->output = str_replace( \"<!--NAME FIELDS-->\" , $name_fields , $this->output );\n\t\t$this->output = str_replace( \"<!--POST BOX-->\" , $post_box , $this->output );\n\t\t$this->output = str_replace( \"<!--POLL BOX-->\" , $poll_box , $this->output );\n\t\t$this->output = str_replace( \"<!--POST ICONS-->\" , $post_icons , $this->output );\n\t\t$this->output = str_replace( \"<!--END TABLE-->\" , $end_form , $this->output );\n\t\t$this->output = str_replace( \"<!--UPLOAD FIELD-->\", $upload_field , $this->output );\n\t\t$this->output = str_replace( \"<!--MOD OPTIONS-->\" , $edit_option . $mod_options , $this->output );\n\t\t$this->output = str_replace( \"<!--FORUM RULES-->\" , $this->ipsclass->print_forum_rules($this->forum), $this->output );\n\t\t$this->output = str_replace( \"<!--TOPIC TITLE-->\" , $topic_title , $this->output );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Add in siggy buttons and such\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->input['post_htmlstatus'] = $this->orig_post['post_htmlstate'];\n\t\t$this->ipsclass->input['enablesig']\t\t = $this->orig_post['use_sig'];\n\t\t$this->ipsclass->input['enableemo']\t\t = $this->orig_post['use_emo'];\n\t\t\n\t\t$this->html_checkboxes('edit', $this->topic['tid'], $this->forum['id']);\n\t\t\n\t\t$this->html_topic_summary( $this->topic['tid'] );\n\t\t\n\t\t$this->show_post_navigation();\n\t\t\t\t\t\t \n\t\t$this->title = $this->ipsclass->lang['editing_post'].' '.$this->topic['title'];\n\t\t\n\t\t$this->ipsclass->print->add_output( $this->output );\n\t\t\n $this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->vars['board_name'].\" -> \".$this->title,\n \t\t\t\t\t \t 'JS' => 1,\n \t\t\t\t\t \t 'NAV' => $this->nav,\n \t\t\t\t\t ) );\n\t}", "public function addInput($LableText = null, $NewLine = false , $InputPrams = array(), $InputValue = array()) \n{\n $this->showElment($this->processInput($LableText, $NewLine, $InputPrams, $InputValue ));\n}", "public function uultra_load_links_addition_form()\r\n\t{\r\n\t\t$html = '';\r\n\t\t$html .= '<div class=\"uultra-adm-links-cont-add-new\" >';\r\n \r\n\t\t$html .= '<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=\"50%\"> '.__(\"Name: \",'xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\"><input name=\"uultra_add_mod_link_title\" type=\"text\" id=\"uultra_add_mod_link_title\" style=\"width:120px\" /> \r\n\t\t </td>\r\n\t\t </tr>\r\n\t\t <tr>\r\n\t\t\t\t<td width=\"50%\"> '.__('Type:','xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\">\r\n\t\t\t\t<select name=\"uultra_add_mod_link_type\" id=\"uultra_add_mod_link_type\" size=\"1\">\r\n\t\t\t\t <option value=\"\" selected=\"selected\">'.__(\"Select Type: \",'xoousers').'</option>\r\n\t\t\t\t <option value=\"1\">'.__(\"Text: \",'xoousers').'</option>\r\n\t\t\t\t <option value=\"2\">Shortcode</option>\r\n\t\t\t\t</select>\r\n\r\n\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t\t\t \r\n\t\t\t <tr>\r\n\t\t\t\t<td>'.__('Content:','xoousers').'</td>\r\n\t\t\t\t<td>&nbsp;</textarea> \r\n\t\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t \r\n\t\t\t <tr>\r\n\t\t\t\t\r\n\t\t\t\t<td colspan=\"2\"><textarea name=\"uultra_add_mod_links_content\" id=\"uultra_add_mod_links_content\" style=\"width:98%;\" rows=\"5\"></textarea> \r\n\t\t\t </td>\r\n\t\t\t </tr> \r\n\t\t\t \r\n\t\t\t \r\n\t\t\t</table> '; \t\t\t\r\n\t\t\t \r\n\t\t\t$html .= ' <p class=\"submit\">\r\n\t\t\t\t\t<input type=\"button\" name=\"submit\" class=\"button uultra-links-add-new-close\" value=\"'.__('Close','xoousers').'\" /> <input type=\"button\" name=\"submit\" class=\"button button-primary uultra-links-add-new-confirm\" value=\"'.__('Submit','xoousers').'\" /> <span id=\"uultra-add-new-links-m-w\" ></span>\r\n\t\t\t\t</p> ';\r\n\t\t\t\t\r\n\t\t\t$html .= '</div>';\r\n\t\t\t\t\r\n\t\t\techo $html;\r\n\t\t\tdie();\r\n\t\r\n\t}", "function getFormHTML()\n\t{\n\t\tstatic $id_num = 1000;\n\n\t\t$type = $this->type;\n\t\t$name = $this->name;\n\t\t$value = $this->_getTypeValue($this->type, $this->value);\n\t\t$default = $this->_getTypeValue($this->type, $this->default);\n\t\t$column_name = 'extra_vars' . $this->idx;\n\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t$buff = array();\n\t\tswitch($type)\n\t\t{\n\t\t\t// Homepage\n\t\t\tcase 'homepage' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"homepage\" />';\n\t\t\t\tbreak;\n\t\t\t// Email Address\n\t\t\tcase 'email_address' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"email_address\" />';\n\t\t\t\tbreak;\n\t\t\t// Phone Number\n\t\t\tcase 'tel' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[0] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[1] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[2] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\tbreak;\n\t\t\t// textarea\n\t\t\tcase 'textarea' :\n\t\t\t\t$buff[] = '<textarea name=\"' . $column_name . '\" rows=\"8\" cols=\"42\">' . $value . '</textarea>';\n\t\t\t\tbreak;\n\t\t\t// multiple choice\n\t\t\tcase 'checkbox' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] =' <li><input type=\"checkbox\" name=\"' . $column_name . '[]\" id=\"' . $tmp_id . '\" value=\"' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '\" ' . $checked . ' /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// single choice\n\t\t\tcase 'select' :\n\t\t\t\t$buff[] = '<select name=\"' . $column_name . '\" class=\"select\">';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$selected = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = ' selected=\"selected\"';\n\t\t\t\t\t}\n\t\t\t\t\t$buff[] = ' <option value=\"' . $v . '\" ' . $selected . '>' . $v . '</option>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</select>';\n\t\t\t\tbreak;\n\t\t\t// radio\n\t\t\tcase 'radio' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] = '<li><input type=\"radio\" name=\"' . $column_name . '\" id=\"' . $tmp_id . '\" ' . $checked . ' value=\"' . $v . '\" class=\"radio\" /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// date\n\t\t\tcase 'date' :\n\t\t\t\t// datepicker javascript plugin load\n\t\t\t\tContext::loadJavascriptPlugin('ui.datepicker');\n\n\t\t\t\t$buff[] = '<input type=\"hidden\" name=\"' . $column_name . '\" value=\"' . $value . '\" />'; \n\t\t\t\t$buff[] =\t'<input type=\"text\" id=\"date_' . $column_name . '\" value=\"' . zdate($value, 'Y-m-d') . '\" class=\"date\" />';\n\t\t\t\t$buff[] =\t'<input type=\"button\" value=\"' . Context::getLang('cmd_delete') . '\" class=\"btn\" id=\"dateRemover_' . $column_name . '\" />';\n\t\t\t\t$buff[] =\t'<script type=\"text/javascript\">';\n\t\t\t\t$buff[] = '//<![CDATA[';\n\t\t\t\t$buff[] =\t'(function($){';\n\t\t\t\t$buff[] =\t'$(function(){';\n\t\t\t\t$buff[] =\t' var option = { dateFormat: \"yy-mm-dd\", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\\'-100:+10\\', onSelect:function(){';\n\t\t\t\t$buff[] =\t' $(this).prev(\\'input[type=\"hidden\"]\\').val(this.value.replace(/-/g,\"\"))}';\n\t\t\t\t$buff[] =\t' };';\n\t\t\t\t$buff[] =\t' $.extend(option,$.datepicker.regional[\\'' . Context::getLangType() . '\\']);';\n\t\t\t\t$buff[] =\t' $(\"#date_' . $column_name . '\").datepicker(option);';\n\t\t\t\t$buff[] =\t' $(\"#dateRemover_' . $column_name . '\").click(function(){';\n\t\t\t\t$buff[] =\t' $(this).siblings(\"input\").val(\"\");';\n\t\t\t\t$buff[] =\t' return false;';\n\t\t\t\t$buff[] =\t' })';\n\t\t\t\t$buff[] =\t'});';\n\t\t\t\t$buff[] =\t'})(jQuery);';\n\t\t\t\t$buff[] = '//]]>';\n\t\t\t\t$buff[] = '</script>';\n\t\t\t\tbreak;\n\t\t\t// address\n\t\t\tcase \"kr_zip\" :\n\t\t\t\tif(($oKrzipModel = getModel('krzip')) && method_exists($oKrzipModel , 'getKrzipCodeSearchHtml' ))\n\t\t\t\t{\n\t\t\t\t\t$buff[] = $oKrzipModel->getKrzipCodeSearchHtml($column_name, $value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t// General text\n\t\t\tdefault :\n\t\t\t\t$buff[] =' <input type=\"text\" name=\"' . $column_name . '\" value=\"' . ($value ? $value : $default) . '\" class=\"text\" />';\n\t\t}\n\t\tif($this->desc)\n\t\t{\n\t\t\t$oModuleController = getController('module');\n\t\t\t$oModuleController->replaceDefinedLangCode($this->desc);\n\t\t\t$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';\n\t\t}\n\t\t\n\t\treturn join(PHP_EOL, $buff);\n\t}", "public function addForm()\n {\n $this->getState()->template = 'displaygroup-form-add';\n $this->getState()->setData([\n 'help' => $this->getHelp()->link('DisplayGroup', 'Add')\n ]);\n }", "public function auto_build_form($form_content, $data){\r\n\t\treturn \"<form method='post' enctype='multipart/form-data' action='#' \" . (isset($data['onsubmit']) ? \" onsubmit='\" . $data['onsubmit'] . \"' \" : \"onsubmit=\\\"return validateFields()\\\"\") .\r\n\t\t\t\" >\" .\r\n\t\t\t$form_content .\r\n\t\t\t\"</form>\";\r\n\t}", "function do_form(){\n\t\tob_start();\n\t\t\n\t\t$op = ($this->id_base == $this->id)? __('Add', JCF_TEXTDOMAIN) : __('Edit', JCF_TEXTDOMAIN);\n\t\t?>\n\t\t<div class=\"jcf_edit_field\">\n\t\t\t<h3 class=\"header\"><?php echo $op . ' ' . $this->title; ?></h3>\n\t\t\t<div class=\"jcf_inner_content\">\n\t\t\t\t<form action=\"#\" method=\"post\" id=\"jcform_edit_field\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id\" value=\"<?php echo $this->id; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_number\" value=\"<?php echo $this->number; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id_base\" value=\"<?php echo $this->id_base; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"fieldset_id\" value=\"<?php echo $this->fieldset_id; ?>\" />\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->form( $this->instance );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// need to add slug field too\n\t\t\t\t\t\t\t$slug = esc_attr($this->slug);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('slug'); ?>\"><?php _e('Slug:', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('slug'); ?>\" name=\"<?php echo $this->get_field_name('slug'); ?>\" type=\"text\" value=\"<?php echo $slug; ?>\" />\n\t\t\t\t\t\t\t<br/><small><?php _e('Machine name, will be used for postmeta field name.', JCF_TEXTDOMAIN); ?></small>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t// enabled field\n\t\t\t\t\t\t\tif( $this->is_new ){\n\t\t\t\t\t\t\t\t$this->instance['enabled'] = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('enabled'); ?>\">\n\t\t\t\t\t\t\t\t<input class=\"checkbox\" type=\"checkbox\" \n\t\t\t\t\t\t\t\t\t\tid=\"<?php echo $this->get_field_id('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tname=\"<?php echo $this->get_field_name('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tvalue=\"1\" <?php checked(true, @$this->instance['enabled']); ?> />\n\t\t\t\t\t\t\t\t<?php _e('Enabled', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"field-control-actions\">\n\t\t\t\t\t\t\t<div class=\"alignleft\">\n\t\t\t\t\t\t\t\t<?php if( $op != __('Add', JCF_TEXTDOMAIN) ) : ?>\n\t\t\t\t\t\t\t\t<a href=\"#remove\" class=\"field-control-remove\"><?php _e('Delete', JCF_TEXTDOMAIN); ?></a> |\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t<a href=\"#close\" class=\"field-control-close\"><?php _e('Close', JCF_TEXTDOMAIN); ?></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"alignright\">\n\t\t\t\t\t\t\t\t<?php echo print_loader_img(); ?>\n\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"<?php _e('Save', JCF_TEXTDOMAIN); ?>\" class=\"button-primary\" name=\"savefield\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<br class=\"clear\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\t\t\n\t\t$html = ob_get_clean();\n\t\treturn $html;\n\t}", "public function setup_form() {\n\t\t?>\n\t\t<tr>\n\t\t\t<td colspan=\"2\">\n\t\t\t\t<p>\n\t\t\t\t\t<label for=\"wpsc-manual-gateway-setup\"><?php _e( 'Instructions', 'wpsc' ); ?></label><br />\n\t\t\t\t\t<textarea id=\"wpsc-manual-gateway-setup\" cols='' rows='10' name='<?php echo esc_attr( $this->setting->get_field_name( 'payment_instructions' ) ); ?>'><?php echo esc_textarea( wp_unslash( $this->setting->get( 'payment_instructions' ) ) ); ?></textarea><br />\n\t\t\t\t\t<small><?php _e('Enter the payment instructions that you wish to display to your customers when they make a purchase.', 'wpsc'); ?></small><br />\n\t\t\t\t\t<small><?php _e('For example, this is where you the Shop Owner might enter your bank account details or address so that your customer can make their manual payment.', 'wpsc'); ?></small>\n\t\t\t\t</p>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php\n\t}", "public function tag(string $type, string $content): FormHelper\n {\n $allowedTags = [\n 'p', 'b', 'i', 'strong', 'em', 'small'\n ];\n $this->html .= \"<{$type}>{$content}</{$type}>\";\n\n return $this;\n }", "function render_text_question($label, $input, $additionaltext=\"\", $numeric=false, $extra=\"\", $current=\"\")\n {\n\t?>\n\t<div class=\"Question\" id = \"pixelwidth\">\n\t\t<label><?php echo $label; ?></label>\n\t\t<div>\n\t\t<?php\n\t\techo \"<input name=\\\"\" . $input . \"\\\" type=\\\"text\\\" \". ($numeric?\"numericinput\":\"\") . \"\\\" value=\\\"\" . $current . \"\\\"\" . $extra . \"/>\\n\";\n\t\t\t\n\t\techo $additionaltext;\n\t\t?>\n\t\t</div>\n\t</div>\n\t<div class=\"clearerleft\"> </div>\n\t<?php\n\t}", "function uultra_new_links_add_form()\r\n\t{\r\n\t\t\r\n\t\t$meta = 'uultra_link_content';\r\n\t\t$html = '<div id=\"#uultra-add-links-box\" class=\"uultra-links-content-edition-box \" title=\"Add New Link\">';\r\n\t\t\r\n\t\t$html .= '<input name=\"uultra-current-selected-widget-to-edit\" id=\"uultra-current-selected-widget-to-edit\" type=\"hidden\" />';\r\n\t\t\r\n\t\t\r\n\t\t$html .= '<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=\"50%\"> '.__(\"Name: \",'xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\"><input name=\"uultra_link_title\" type=\"text\" id=\"uultra_link_title\" /> \r\n\t\t </td>\r\n\t\t </tr>\r\n\t\t <tr>\r\n\t\t\t\t<td width=\"50%\"> '.__(\"Slug: \",'xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\"><input name=\"uultra_link_slug\" type=\"text\" id=\"uultra_link_slug\" /> \r\n\t\t </td>\r\n\t\t </tr>\r\n\t\t <tr>\r\n\t\t\t\t<td width=\"50%\"> '.__('Type:','xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\">\r\n\t\t\t\t<select name=\"uultra_link_type\" id=\"uultra_link_type\" size=\"1\">\r\n\t\t\t\t <option value=\"\" selected=\"selected\">'.__(\"Select Type: \",'xoousers').'</option>\r\n\t\t\t\t <option value=\"1\">'.__(\"Text: \",'xoousers').'</option>\r\n\t\t\t\t <option value=\"2\">Shortcode</option>\r\n\t\t\t\t</select>\r\n\r\n\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t\t\t \r\n\t\t\t <tr>\r\n\t\t\t\t<td>'.__('Content:','xoousers').'</td>\r\n\t\t\t\t<td>&nbsp;</textarea> \r\n\t\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t\r\n\t\t\t \r\n\t\t\t</table> '; \t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$html .= '<div class=\"uultra-field-msbox-div-history\" id=\"uultra-msg-history-list\">';\r\n\t\t\r\n\t\t$html .= $this->uultra_get_addlink_html_form($meta, $content);\r\n\t\t\r\n\t\t$html .= '</div>';\t\r\n\t\t\r\n\t\t\r\n\t\t\t \r\n\t\t$html .= ' <p class=\"submit\">\r\n\t\t\t\t\t<input type=\"button\" name=\"submit\" class=\"button uultra-links-add-new-close\" value=\"'.__('Close','xoousers').'\" /> <input type=\"button\" name=\"submit\" class=\"button button-primary uultra-links-add-new-confirm\" value=\"'.__('Submit','xoousers').'\" /> <span id=\"uultra-add-new-links-m-w\" ></span>\r\n\t\t\t\t</p> ';\t\t\r\n\t\t$html .= '</div>';\t\t\r\n\t\t\t\r\n\t\treturn $html;\r\n\t}", "function add_html () {\n //Adds a html block\n return '<div class=\"black\">Lorem ipsum dolor</div>';\n }", "public function render()\n {\n $content = \"Ext.create('Ext.form.Panel', {\";\n \n $content .= \"frame: true\";\n \n if ($this->getAction()) {\n $content .= \", url: '\" . $this->getAction() . \"'\";\n }\n \n foreach ($this->getAttribs() as $name => $value) {\n $content .= \", \";\n \n switch ($name) {\n case 'renderTo':\n $content .= \"renderTo: Ext.get('\" . (string)$value . \"')\";\n break;\n case 'height':\n case 'width':\n $content .= $name . \": \" . (int)$value;\n break;\n case 'standardSubmit':\n case 'hidden':\n $content .= $name . \": \" . ((boolean)$value === true ? 'true' : 'false');\n break;\n case 'onEnter':\n $content .= \"listeners: {\n afterRender: function(form, options){\n this.keyNav = Ext.create('Ext.util.KeyNav', this.el, {\n enter: function() {\" . $value . \"},\n scope: this\n });\n }\n }\";\n break;\n case 'defaults':\n $content .= \"defaults: \" . (string)$value;\n break;\n default:\n $content .= $name . \": '\" . htmlspecialchars((string)$value, ENT_QUOTES) . \"'\";\n break;\n }\n }\n \n if (!$this->getAttrib('renderTo')) {\n $content .= \", renderTo: Ext.getBody()\";\n }\n \n $content .= \", items: [\";\n \n if ($this->hasSubForms()) {\n $iterator = new ArrayIterator($this->getSubForms());\n while($iterator->valid()) {\n $subForm = $iterator->current();\n $content .= \"{\";\n \n if ($subForm->getAttrib('width')) {\n $content .= \"width: \" . (int)$subForm->getAttrib('width') . \",\";\n }\n \n $content .= $subForm->render();\n \n $content .= \"}\";\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n } \n }\n }\n \n if ($this->hasElements()) {\n $iterator = new ArrayIterator($this->getElements());\n while ($iterator->valid()) {\n $element = $iterator->current();\n $content .= $element->render();\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n }\n }\n }\n\n $content .= \"],\";\n \n $content .= \"buttons: [\";\n \n $iterator = new ArrayIterator($this->getButtons());\n while ($iterator->valid()) {\n $button = $iterator->current();\n \n $content .= $button->render();\n \n $iterator->next();\n \n if ($iterator->valid()) {\n $content .= \",\";\n }\n \n }\n \n $content .= \"]\";\n \n $content .= '});';\n \n return $content;\n }", "function abook_create_form($form_url, $name, $title, $button,\n $backend, $defdata=array()) {\n\n global $oTemplate;\n\n $output = addForm($form_url, 'post', 'f_add', '', '', array(), TRUE);\n\n if ($button == _(\"Update address\")) {\n $edit = true;\n $backends = NULL;\n } else {\n $edit = false;\n $backends = getWritableBackends();\n }\n \n $fields = array (\n 'nickname' => 'NickName',\n 'firstname' => 'FirstName',\n 'lastname' => 'LastName',\n 'email' => 'Email',\n 'label' => 'Info',\n );\n $values = array();\n foreach ($fields as $sqm=>$template) {\n $values[$template] = isset($defdata[$sqm]) ? $defdata[$sqm] : '';\n }\n \n $oTemplate->assign('writable_backends', $backends);\n $oTemplate->assign('values', $values);\n $oTemplate->assign('edit', $edit);\n $oTemplate->assign('current_backend', $backend);\n \n $output .= $oTemplate->fetch('addrbook_addedit.tpl');\n\n return $output;\n}", "protected function _content_template() {\n ?>\n <form method=post style=\"color:black;\">\n <label>Uw naam*</label><input style=\"border-radius:10px;\" type=text name=naam /> <br>\n <label>Uw e-mailadres*</label><input style=\"border-radius:10px;\" type=email name=email /> <br>\n <label>Uw bericht*</label><textarea style=\"border-radius:10px;\" style=\"width:100%; border-radius:10xpx;\" name=bericht> </textarea><br>\n <input type=submit name=add style=\"border-radius:10px; color:white; background-color:#004020;\" value=\"Reactie plaatsen\"/>\n </form>\n <?php\n require('dbconnect.php');\n \n\t}", "public function init(){\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this->_html .= $this->get_label();\n\t\t\n\t\t$this->_html .= '<input type=\"submit\" ';\n\t\t\n\t\tif(isset($this->_options['id'])){\n\t\t\t$this->_html .= 'id=\"'.$this->_options['id'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['class'])){\n\t\t\t$this->_html .= 'class=\"'.$this->_options['class'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['value'])){\n\t\t\t$this->_html .= 'value=\"'.$this->_options['value'].'\" ';\n\t\t}\t\n\t\t\n\t\tif(isset($this->_options['name'])){\n\t\t\t$this->_html .= 'name=\"'.esc_attr($this->_options['name']).'\" ';\n\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\n\t\t$this->_html .= ' />';\n\t}", "function edit($record=\"\", $fieldprefix=\"\") \n { \n global $config_atkroot; \n\n $id = $fieldprefix.$this->fieldName(); \n $this->registerKeyListener($id, KB_CTRLCURSOR); \n\n $result= '<textarea id=\"'.$id.'\" name=\"'.$id.'\" style=\"width: '.$this->m_size_array[0].'px; height: '.$this->m_size_array[1].'px;\" '. \n '>'.htmlspecialchars($record[$this->fieldName()]).'</textarea>'; \n\n $this->registerMce(); \n\n if(is_array($this->m_templates)) \n { \n $page = &atkPage::getInstance(); \n\n $js .= \"\\n\\nvar templates_{$this->m_name} = new Array(\"; \n $ui = &$this->m_ownerInstance->getUi(); \n foreach($this->m_templates as $template_key => $template_value) \n { \n $html_template = ereg_replace(\"[\\r\\t]\", '', $ui->render($template_value)); \n $html_template = ereg_replace(\"[\\n]\", '\\n', $html_template); \n $html_template = str_replace(\"'\", \"\\'\", $html_template); \n $html_template = str_replace(\" \", \" \", $html_template); \n $js .= \"'$html_template',\\n\"; \n } \n $js .= \"'a');\"; \n $js .= \"\\n\\nfunction AppendContent_{$this->m_name}(){\\n\"; \n $js .= \" var index = document.forms[0].template_choice_{$this->m_name}.selectedIndex;\\n\"; \n $js .= \" tinyMCE.execInstanceCommand('{$this->m_name}', 'mceInsertContent',false, templates_{$this->m_name}[index]);\\n\"; \n $js .= \"}\\n\"; \n $page->register_scriptcode($js); \n\n $result .= \"<br><select name=\\\"template_choice_{$this->m_name}\\\">\"; \n foreach($this->m_templates as $template_key => $template_value) \n { \n $result .= '<option value=\"'.$template_key.'\">'.$template_key.'</option>'; \n } \n $result .= '</select>'; \n $result .= \"<input type=\\\"button\\\" name=\\\"template_append\\\" value=\\\"\".text('mce_template_apply').\"\\\" onClick=\\\"AppendContent_{$this->m_name}()\\\">\"; \n } \n\n return $result; \n }", "public function build() {\n\t\t$this->add($this->Html->A(array('href' => 'http://cakephp.org', 'target' => '_blank', 'text' => 'CakePHP')));\n\t\t$this->add($this->Html->Abbr(array('text' => __('This is an abrreviation'))));\n\t\t$this->add($this->Html->Address(array('text' => __('This is an address'))));\n\t\t$this->add($this->Html->B(array('text' => __('This is bold text'))));\n\t\t$this->add($this->Html->Bdo(array('name' => 'value')));\n\t\t$this->add($this->Html->Blockquote(array('text' => __('This is a block quote'))));\n\t\t$this->add($this->Html->Br());\n\t\t$this->add($this->Html->Button(array('value' => __('This is a button'))));\n\t\t$this->add($this->Html->Cite(array('text' => __('This is a citation'))));\n\t\t$this->add($this->Html->Code(array('text' => __('This is a code block'))));\n\t\t$this->add($this->Html->Comment(array('text' => __('This is a comment'))));\n\t\t$this->add($this->Html->Del(array('text' => __('This is deleted text'))));\n\t\t$this->add($this->Html->Dfn(array('text' => __('This is a definition'))));\n\t\t$this->add($this->Html->Div(array('text' => __('This is a division'))));\n\t\t$dl = $this->Html->Dl(array('text' => __('This is a defined list')));\n\t\t$dl->add($this->Html->Dt(array('text' => __('This is a definition title'))));\n\t\t$dl->add($this->Html->Dd(array('text' => __('This is a definition data'))));\n\t\t$this->add($dl);\n\t\t$this->add($this->Html->Em(array('text' => __('This is text with emphasis'))));\n\t\t$form = $this->Html->Form(array('name' => 'example'));\n\t\t\t$fieldset = $this->Html->Fieldset();\n\t\t\t$fieldset->add($this->Html->Legend(array('text' => __('This is a legend of a fieldset'))));\n\t\t\t$fieldset->add($this->Html->Label(array('text' => __('This is a label'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'text', 'type' => 'text', 'value' => __('This is a text input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'password', 'type' => 'password', 'value' => __('This is a password input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'radio', 'type' => 'radio', 'value' => 'radio')));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'checkbox', 'type' => 'checkbox', 'value' => 'checkbox')));\n\t\t\t$fieldset->add($this->Html->Textarea(array('name' => 'textarea', 'text' => __('This is a textarea'))));\n\t\t\t\t$select = $this->Html->Select(array('name' => 'select'));\n\t\t\t\t\t$optgroup = $this->Html->Optgroup(array('label' => __('This is an option group')));\n\t\t\t\t\t$optgroup->add($this->Html->Option(array('value' => 123, 'text' => __('This is an option'))));\n\t\t\t\t$select->add($optgroup);\n\t\t\t$fieldset->add($select);\n\t\t$form->add($fieldset);\n\t\t$this->add($form);\n\t\t$this->add($this->Html->Hr());\n\t\t$this->add($this->Html->I(array('text' => __('This is text in italics'))));\n\t\t$this->add($this->Html->Iframe(array('name' => 'ctk', 'src' => 'https://github.com/jameswatts/cake-toolkit')));\n\t\t$this->add($this->Html->Img(array('src' => 'http://cakephp.org/img/cake-logo.png', 'alt' => 'CakePHP')));\n\t\t$this->add($this->Html->Ins(array('text' => __('This is inserted text'))));\n\t\t$this->add($this->Html->Kbd(array('text' => __('This is keyboard text'))));\n\t\t$map = $this->Html->Map();\n\t\t$map->add($this->Html->Area());\n\t\t$this->add($map);\n\t\t$this->add($this->Html->Noscript(array('text' => __('This is displayed if you do not have JavaScript enabled'))));\n\t\t$object = $this->Html->Object();\n\t\t$object->add($this->Html->Param(array('name' => 'example', 'value' => 123)));\n\t\t$this->add($object);\n\t\t$this->add($this->Html->P(array('text' => __('This is a paragraph of text'))));\n\t\t$this->add($this->Html->Pre(array('text' => __('This is preformatted text'))));\n\t\t$this->add($this->Html->Q(array('text' => __('This is a quotation'))));\n\t\t$this->add($this->Html->S(array('text' => __('This is a strike-through text'))));\n\t\t$this->add($this->Html->Samp(array('text' => __('This is a sample text'))));\n\t\t$this->add($this->Html->Small(array('text' => __('This is small text'))));\n\t\t$this->add($this->Html->Span(array('text' => __('This is a span'))));\n\t\t$this->add($this->Html->Strong(array('text' => __('This is a strong text'))));\n\t\t$this->add($this->Html->Style(array('name' => 'value')));\n\t\t$this->add($this->Html->Sub(array('text' => __('This is a sub-text'))));\n\t\t$this->add($this->Html->Sup(array('text' => __('This is a super-text'))));\n\t\t$table = $this->Html->Table(array('border' => 1));\n\t\t$table->add($this->Html->Caption(array('text' => __('This is a table caption'))));\n\t\t\t$colgroup = $this->Html->Colgroup();\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$tbody = $this->Html->Tbody();\n\t\t\t\t$tr = $this->Html->Tr();\n\t\t\t\t$tr->add($this->Html->Th(array('text' => __('This is a table header'))));\n\t\t\t\t$tr->add($this->Html->Td(array('text' => __('This is a table data'))));\n\t\t\t$tbody->add($tr);\n\t\t$table->add($colgroup);\n\t\t$table->add($tbody);\n\t\t$this->add($table);\n\t\t$ol = $this->Html->Ol();\n\t\t$ol->add($this->Html->Li(array('text' => __('This is an ordered list item'))));\n\t\t$this->add($ol);\n\t\t$ul = $this->Html->Ul();\n\t\t$ul->add($this->Html->Li(array('text' => __('This is an unordered list item'))));\n\t\t$this->add($ul);\n\t\t$this->add($this->Html->Var(array('text' => __('This is a variable'))));\n\t}", "private function addEditFormAfterContent() {\n\t\t// this div is opened when encapsulating the default editor in addEditFormBeforeContent.\n\t\treturn '</div><div style=\"clear: both\"></div>';\n\t}", "function do_ajax_edit_impr_text($textid, $wordlc) \n{\n chdir('..');\n\n list($html_content, $js_content) = make_form($textid, $wordlc);\n if ($wordlc == '') {\n echo \"$('#editimprtextdata').html(\" . prepare_textdata_js($html_content) . \");\"; \n } else {\n echo $js_content; \n }\n}", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "abstract protected function getInputHtml();", "public function setHtml();", "function meta_html($post)\n {\n $view = new Xby2BaseView(get_post_meta($post->ID));\n $view->addInput('text', 'link-label', 'Label: ', 'label', 'regular-text');\n $view->addInput('text', 'link-link', 'Link: ', 'link', 'large-text');\n $view->addInput('text', 'link-priority', 'Priority: ', 'priority', 'regular-text');\n $view->displayForm();\n }", "function buildForm(){\n\t\t# menampilkan form\n\t}", "public function render() : string\r\n {\r\n return '<input type=\"text\" />';\r\n }", "function display_add() {\n $this->_addform->display();\n }", "public function frmPostObject()\n\t{\t\t\t\t\t\t\t\n\t\t$form = $this->initTagsForm(\"frm_post\", \"saveFrmPostSettings\",\n\t\t\t\"advanced_editing_frm_post_settings\");\n\t\t\n\t\t$this->tpl->setContent($form->getHTML());\n\t}", "public function add(){\n\t\t\t$formAction = \"index.php?area=backend&controller=news&action=do_add\";\n\t\t\t//xuat du lieu ra view qua ham renderHTML\n\t\t\t$this->renderHTML(\"views/backend/add_edit_news.php\",array(\"formAction\"=>$formAction));\n\t\t}", "public function addRichText($name, $label) {\n\t\t$this->form->addTextArea($name, $label);\n\t\t$this->richTexts[] = $name;\n\t}", "function oa_widgets_add_content_edit_form($form, &$form_state) {\n $conf = $form_state['conf'];\n\n $nodes = oa_core_list_content_types();\n\n $options = array();\n foreach ($nodes as $node) {\n $options[$node->type] = check_plain($node->name);\n }\n $form['settings']['oa_widgets_types'] = array(\n '#title' => t('Enable content types'),\n '#type' => 'checkboxes',\n '#options' => $options,\n '#default_value' => isset($conf['oa_widgets_types']) ? $conf['oa_widgets_types'] : array_values($options),\n '#description' => t('Select which content types you would like to enable for this widget.'),\n );\n $form['button_class'] = array(\n '#title' => t('CSS class for links'),\n '#type' => 'textfield',\n '#default_value' => $conf['button_class'],\n '#description' => 'Enter CSS class for links, such as btn.'\n );\n $form['title_prefix'] = array(\n '#title' => t('Title Prefix'),\n '#type' => 'textfield',\n '#default_value' => $conf['title_prefix'],\n '#description' => 'Enter prefix text for link titles.'\n );\n\n return $form;\n}", "function form_text($field, $options) {\n $defaults = array(\n 'wrap' => true,\n 'label' => true,\n 'class' => array('input', 'text')\n );\n\n $options = array_merge($defaults, $options);\n\n $field = strtolower($field);\n\n $output = '<input type=\"text\" name=\"' . $field . '\" id=\"' . form__field_id($field) . '\"';\n\n if(!empty($_POST[$field])) {\n $output .= ' value=\"'. $_POST[$field] . '\"';\n }\n\n $output .= ' />';\n\n if($options['wrap']) {\n $options['field'] = $field;\n $output = form__wrap($output, $options);\n }\n\n $error = form_error_message($field);\n if(!empty($error)) {\n $output .= $error;\n }\n\n return html__output($output);\n}" ]
[ "0.68467826", "0.67169696", "0.6457358", "0.6275944", "0.6216518", "0.6159618", "0.61416394", "0.6109516", "0.60992604", "0.60989577", "0.60791516", "0.6074994", "0.6073958", "0.6073849", "0.60473025", "0.60404676", "0.6038483", "0.6034244", "0.6021038", "0.6013311", "0.6005076", "0.5981827", "0.5980823", "0.5964252", "0.5939358", "0.59334207", "0.59118474", "0.5893631", "0.58826536", "0.58820474", "0.58814174", "0.5862196", "0.58603907", "0.5843221", "0.58355534", "0.5831485", "0.5804304", "0.5801387", "0.57927436", "0.57764536", "0.5774569", "0.577284", "0.57696754", "0.5766345", "0.57619065", "0.57604903", "0.5737982", "0.57220626", "0.57156646", "0.5707905", "0.57077664", "0.5688762", "0.56856835", "0.56811816", "0.56743413", "0.5673643", "0.5666723", "0.5655458", "0.5653667", "0.5648569", "0.5626466", "0.56201565", "0.5614039", "0.56131727", "0.5610017", "0.5599379", "0.5593277", "0.55927384", "0.55850846", "0.55823666", "0.557691", "0.5576858", "0.55768555", "0.5574192", "0.5562158", "0.5556313", "0.5555408", "0.55511105", "0.5548002", "0.5547406", "0.5545358", "0.55447763", "0.5544733", "0.5539345", "0.55380744", "0.55296445", "0.55271596", "0.5524411", "0.5522592", "0.5519303", "0.5517384", "0.5517274", "0.5514699", "0.5513006", "0.55098563", "0.55067044", "0.55066264", "0.5493024", "0.549301", "0.54912865" ]
0.66501206
2
Add a label field to the form
public function add_label($caption, $num_cols=1, $attrs=false, $attrs2=false) { if (!is_array($attrs)) { $attrs = array(); } if (!is_array($attrs2)) { $attrs2 = array(); } $obj_label = new GenElement('label', $caption, $attrs); $label = $obj_label->render(1); array_push($this->form_elements, array($label, $num_cols, 'cell', $attrs2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLabelField() \n {\n return \"label_label\";\n }", "public function label(){\n\t\treturn '<label class=\"control-label\" for=\"'.$this->name.'\">'.$this->label.'</label>';\n\t}", "abstract function add_label();", "public function getLabelField() {}", "public function insertFormLabel()\r\n {\r\n\r\n $formfield = new FormFields();\r\n $formfield->setName('name');\r\n $formfield->setLabel('name');\r\n $formfield1 = new FormFields();\r\n $formfield1->setName('surname');\r\n $formfield1->setLabel('surname');\r\n $formfield2 = new FormFields();\r\n $formfield2->setName('email');\r\n $formfield2->setLabel('email');\r\n $formfield3 = new FormFields();\r\n $formfield3->setName('telephone');\r\n $formfield3->setLabel('telephone');\r\n\r\n $this->entityManage->persist($formfield);\r\n $this->entityManage->persist($formfield1);\r\n $this->entityManage->persist($formfield2);\r\n $this->entityManage->persist($formfield3);\r\n $this->entityManage->flush();\r\n\r\n }", "function labelField($fieldName,$fieldLabel){\n\n\t\t$this->labels[$fieldName] = $fieldLabel;\n\n\t}", "public function setLabel($label);", "public function setLabel($label);", "public function setLabel($label);", "public function setLabel($label);", "function setLabel( $label ) \n {\n return $this->setValueByFieldName( 'label_label', $label );\n }", "public function add($label);", "protected function setLabel($field,$label)\r\n {\r\n $this->labels[$field]=$label;\r\n }", "function acf_render_field_label($field)\n{\n}", "public function setLabel($label) {\n return $this->setAttribute('label', $label);\n }", "function _putLabel($fieldName, $fieldLabel, $css=\"text\", $focus=true, $fieldSet=false){\n\n\t\tif($focus && $this->jsLabels) $onclick = \" onClick=\\\"forms['$this->formName']['$fieldName'].select();\\\"\";\n\t\telse $onclick = \"\";\n\n\t\tif( !$this->NS4 && !strstr($fieldName,\" \") ){\n\t\t\techo \"<label class=\\\"\".$css.\"label\\\" for=\\\"\".$fieldName.\"\\\"$onclick>\".$fieldLabel.\"</label>\";\n\t\t\tif(!$fieldSet) echo $this->labelBreak; else echo $this->optionBreak;\n\t\t} else {\n\t\t\techo \"<label class=\\\"\".$css.\"label\\\" for=\\\"\".$fieldName.\"\\\">\".$fieldLabel.\"</label>\";\n\t\t\tif(!$fieldSet) echo $this->labelBreak; else echo $this->optionBreak;\n\t\t}\n\n\t}", "function form__label($field, $text = '') {\n if(empty($text)) {\n $text = ucfirst(str_replace('_', ' ', $field));\n }\n\n return '<label for=\"' . form__field_id($field) . '\">' . $text . '</label>';\n}", "protected function addNamesLabelsValues() {\n foreach ($this->__fields() as $field) {\n $this->$field->__name = $field;\n if (!$this->$field->label && $this->$field->label !== '') $this->$field->label = strtoupper($field[0]) . substr ($field, 1);\n $this->setFieldValue($field);\n $this->$field->setForm($this);\n }\n }", "function addLabel ($for, $label, $attributes = array ())\n\t{\n\t\t$html = \"<label for=\\\"$for\\\"\";\n\t\tif ($attributes) {\n\t\t\t$html .= $this -> addAttributes($attributes);\n\t\t}\n\t\t$html .= \">$label</label>\";\n\n\t\treturn $html;\n\t}", "public function setLabel($newLabel);", "function getLabelField() \n {\n return \"No Field Label Marked\";\n }", "function getLabelField() \n {\n return \"No Field Label Marked\";\n }", "function getLabelField() \n {\n return \"No Field Label Marked\";\n }", "function getLabelField() \n {\n return \"No Field Label Marked\";\n }", "function getLabelField() \n {\n return \"No Field Label Marked\";\n }", "function getLabelField() \n {\n return \"No Field Label Marked\";\n }", "function acf_render_field_wrap_label($field)\n{\n}", "function ninja_forms_display_field_label( $field_id, $data ){\n\tglobal $ninja_forms_fields, $ninja_forms_loading, $ninja_forms_processing;\n\n $field = ninja_forms_get_field_by_id( $field_id );\n $form_id = $field['form_id'];\n\n\t$plugin_settings = nf_get_settings();\n\n\tif ( isset ( $ninja_forms_loading ) && $ninja_forms_loading->get_form_ID() == $form_id ) {\n\t\t$field_row = $ninja_forms_loading->get_field_settings( $field_id );\n\t} else if ( isset ( $ninja_forms_processing ) && $ninja_forms_processing->get_form_ID() == $form_id ) {\n\t\t$field_row = $ninja_forms_processing->get_field_settings( $field_id );\n\t}\n\t\n\t$field_type = $field_row['type'];\n\n\tif( isset ( $data['label'] ) ) {\n\t\t$label = stripslashes($data['label']);\n\t} else if ( isset ( $ninja_forms_fields[$field_type]['default_label'] ) ) {\n\t\t$label = $ninja_forms_fields[$field_type]['default_label'];\n\t} else {\n\t\t$label = '';\n\t}\n\n\tif( isset ( $data['label_pos'] ) ) {\n\t\t$label_pos = stripslashes($data['label_pos']);\n\t} else {\n\t\t$label_pos = '';\n\t}\n\n\tif ( isset( $plugin_settings['req_field_symbol'] ) ) {\n\t\t$req_symbol = $plugin_settings['req_field_symbol'];\n\t} else {\n\t\t$req_symbol = '';\n\t}\n\n\tif ( isset ( $data['req'] ) ) {\n\t\t$req = $data['req'];\n\t} else {\n\t\t$req = '';\n\t}\n\n\tif ( isset ( $data['display_label'] ) ) {\n\t\t$display_label = $data['display_label'];\n\t} else {\n\t\t$display_label = true;\n\t}\n\n\t$label_class = '';\n\n\t$label_class = apply_filters( 'ninja_forms_label_class', $label_class, $field_id );\n\n\tif ( $display_label ) {\n\t\tif ( $req == 1 && $req_symbol != '' && $label_pos != 'inside' ) {\n\t\t\t$req_span = \"<span class='ninja-forms-req-symbol'>$req_symbol</span>\";\n\t\t} else {\n\t\t\t$req_span = '';\n\t\t}\n\t\t?>\n\t\t<label for=\"ninja_forms_field_<?php echo $field_id;?>\" id=\"ninja_forms_field_<?php echo $field_id;?>_label\" class=\"<?php echo $label_class;?>\"><?php echo $label;?> <?php echo $req_span;?>\n\t\t<?php\n\t\tif ( $label_pos != 'left' ) {\n\t\t\tdo_action( 'ninja_forms_display_field_help', $field_id, $data );\n\t\t}\n\t\t?>\n\t\t</label>\n\t\t<?php\n\t}\n}", "public function setLabel($label) {\n $this->label = $label;\n }", "public function label(string $label): self\n {\n return $this->withOptions(compact('label'));\n }", "function label() {\n return \"<label>\".$this->label.\": </label>\";\n }", "public function label($label){\n $this->_label = $label;\n return $this;\n }", "public function ajax_edit_label($new_label) { \n }", "public function addLabel($text){\n $name=\"label\".$this->labelID;\n $this->labelID++;\n $this->items[$name]['type']=\"label\";\n $this->items[$name]['text']=$text;\n }", "function Field() {\n\t\t$attributes = array(\n\t\t\t'class' => $this->extraClass(),\n\t\t\t'id' => $this->id()\n\t\t);\n\t\treturn $this->createTag(\n\t\t\t'label',\n\t\t\t$attributes,\n\t\t\t($this->getAllowHTML() ? $this->title : Convert::raw2xml($this->title))\n\t\t);\n\t}", "public function setLabel($text) {\n $this->label = '<label for=\"'.$this->id.'\">'.$text.'</label>';\n }", "public function setLabel($text) {\n $this->label = '<label for=\"'.$this->id.'\">'.$text.'</label>';\n }", "function render_label() {\n return xFormTemplate::apply($this->template_label, $this->options);\n }", "public function setLabel($label){\n\t\t$this->label = $label;\n\t}", "function label( $field_name, $label ) {\n// okay, the reason this is failing, is that I think it is being called before the array is being created. The fields array does not have any contents until validate() method is invoked. So during form setup, it has no content.\n// what I did was adde a labels list so the calling program can create the labels as an assoc. array before validate is invoked.\n\n// debug\n//print \"Setting Label: $label on Field: $field_name\";\n$this->fields[$field_name][label] = $label;\n//print \"Label Set To: \". $this->fields[$field_name][label];\n\t\t\n}", "function setLabel($value){\r\n\t\t$this->label = $value;\r\n\t}", "public function create_label_for_input($id, $name, $labeltext='', $addttext='', $html_id = '')\n\t{\n\t\t$this->load_form_methods();\n\t\treturn cms_module_CreateLabelForInput($this, $id, $name, $labeltext, $addttext, $html_id);\n\t}", "public function setLabel($name, $label);", "public function setLabel() {\n }", "function testFieldWithLabel(){\n #mdx:FieldWithLabel\n $form = new HtForm();\n $form->textin('email')->label('E-mail: ');\n $form->button('Submit');\n #/mdx echo $form\n $this->assertContains(\"form\",\"$form\");\n $this->assertContains(\"input\",\"$form\");\n $this->assertContains(\"email\",\"$form\");\n $this->assertContains(\"button\",\"$form\");\n $this->assertContains(\"E-mail:\",\"$form\");\n }", "public function get_label_input()\n\t{\n\t\t$s = $this->get_html();\n\t\tif ( !empty($s) ){\n\t\t\tif ( BBN_IS_DEV ){\n\t\t\t\t$title = str_replace('\"','',print_r($this->cfg,true));\n\t\t\t}\n\t\t\telse if ( isset($this->options['title']) ){\n\t\t\t\t$title = $this->options['title'];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$title = '';\n\t\t\t}\n\t\t\t$s = '<label class=\"appui-form-label\" title=\"'.$title.'\">'.$this->label.'</label><div class=\"appui-form-field\">'.$s.'</div>';\n\t\t}\n\t\treturn $s;\n\t}", "function getLabelField()\n {\n return 'person_fname';\n }", "public function setLabel($label) {\n $this->label = $label;\n }", "public function setLabel($label)\n {\n $this->label = $label;\n }", "public function setLabel($label)\n {\n $this->label = $label;\n }", "public function setLabel($label)\n {\n $this->label = $label;\n }", "public function setLabel($label)\n {\n $this->label = $label;\n }", "public function setLabel($label)\n {\n $this->label = $label;\n }", "function getLabel($label, $id, $required=false, $style='float:left;width:250px;') {\r\n if($required) $star = \"*\";\r\n return \"<label for='\".$id.\"' id='\".$id.\"_label' style='\".$style.\"'>\".$label.$star.\"</label>\";\r\n }", "protected function accessibility_label() {\n global $OUTPUT;\n $label = html_writer::span($this->field->name, 'accesshide');\n if ($this->field->required) {\n $icon = $OUTPUT->pix_icon('req', get_string('requiredelement', 'form'));\n $label .= html_writer::div($icon, 'inline-req');\n }\n return html_writer::tag('label', $label, array('for' => 'field_'.$this->field->id));\n }", "public function label() { }", "public function setLabel();", "public function get_label(){ return $this->label; }", "public function setLabel($label) {\n\t\t$this->label = $label;\n\t}", "public function setLabel($label) {\n\t\t$this->label = $label;\n\t}", "public function label($field, $label = NULL)\n\t{\n\t\tif ($label === NULL AND ($field !== TRUE OR $field !== '*') AND ! isset($this->labels[$field]))\n\t\t{\n\t\t\t// Set the field label to the field name\n\t\t\t$this->labels[$field] = ucfirst(preg_replace('/[^\\pL]+/u', ' ', $field));\n\t\t}\n\t\telseif ($label !== NULL)\n\t\t{\n\t\t\t// Set the label for this field\n\t\t\t$this->labels[$field] = $label;\n\t\t}\n\n\t\treturn $this;\n\t}", "function custom_field_label_tag($name, $custom_value) {\n $out = sprintf('<label for=\"%s\" class=\"%s\">%s', \n $name.'_custom_field_values_'.$custom_value['CustomField']['id'],\n empty($this->validationErrors[Inflector::camelize($name)]['custom_field_values'][$custom_value['CustomField']['id']]) ? \"\" : \"error\",\n $custom_value['CustomField']['name']\n );\n if($custom_value['CustomField']['is_required']) {\n $out .= \" <span class=\\\"required\\\">*</span>\";\n }\n $out .= \"</label>\";\n return $out;\n }", "public function label($label, $id = null, array $attrs = array())\n\t{\n\t\tif ($this->line_opened === true)\n\t\t{\n\t\t\tstatic::$helper->add_template($attrs);\n\t\t\tstatic::$helper->merge_classes($attrs, array('control-label'));\n\t\t}\n\t\t\n\t\treturn parent::label($label, $id, $attrs);\n\t}", "public function label(string $label): self\r\n {\r\n $this->label = Sanitization::input($label)->sanitize();\r\n return $this;\r\n }", "public function setLabel($label)\n {\n $this->_label = $label;\n }", "function addLabelFor($forID, $text, $attr_ar = array() ) { \n $str = \"<label for=\\\"$forID\\\"\"; \n if ($attr_ar) { \n $str .= addAttributes( $attr_ar ); \n } \n $str .= \">$text</label>\"; \n return $str; \n }", "private function build_label_field($_meta, $_ptype, $_class = \"\", $_index, $_cloneable = \"\" ) {\r\n $_meta[\"message\"] = isset($_meta[\"message\"]) ? $_meta[\"message\"] : \"\";\r\n $_meta[\"message_type\"] = isset($_meta[\"message_type\"]) ? $_meta[\"message_type\"] : \"info\";\r\n \r\n /* Is init field show or hide */\r\n $onload_field = (isset($_meta[\"initial_show\"]) && $_meta[\"initial_show\"] == \"no\" ) ? \"display: none;\" : \"\";\r\n if ($_meta[\"message\"] != \"\") {\r\n $html = '<div style=\"'.$onload_field.'\" data-labelfield=\"'.$_meta[\"key\"].'\" data-fkey=\"'. $_meta[\"key\"] .'\" class=\"wcff-label wccpf_fields_table' . $_class . ' wcff-label-' . $_meta[\"message_type\"] . '\" '.$_cloneable.'>' . html_entity_decode($_meta[\"message\"]) . '<input type=\"hidden\" name=\"' . esc_attr($_meta[\"key\"] . $_index) . '\"></div>';\r\n if($_ptype == \"wcccf\"){\r\n $html = $this->built_field_wrapper($html, $_meta, $_ptype, $_index);\r\n }\r\n return $html;\r\n }\r\n return \"\";\r\n }", "public function label($input, $text = NULL, array $attributes = NULL) {\n\t\treturn Kohana_Form::label($input, $text, $attributes);\n\t}", "public function labelTag($args) {\n $name = $this->orEq($args,'name');\n $content = $this->orEq($args,'label');\n $classes = $this->orEq($args,'classes','');\n return \"<label for='\" . esc_attr( $name ) . \"' for='\" . esc_attr( $classes ) . \"'>\" . esc_html( $content ) . \"</label>\";\n }", "public function labelTag($args) {\n $name = $this->orEq($args,'name');\n $content = $this->orEq($args,'label');\n $classes = $this->orEq($args,'classes','');\n return \"<label for='\" . esc_attr( $name ) . \"' for='\" . esc_attr( $classes ) . \"'>\" . esc_html( $content ) . \"</label>\";\n }", "function minorite_form_element_label($variables) {\n $element = $variables['element'];\n\n // If title and required marker are both empty, output no label.\n if ((!isset($element['#title']) || $element['#title'] === '')) {\n return '';\n }\n\n // If the element is required, a required marker is appended to the label.\n $required = !empty($element['#required']) ? theme('form_required_marker', array('element' => $element)) : '';\n\n $title = !empty($element['#title']) ? filter_xss_admin($element['#title']) : '';\n\n $attributes = array();\n if (!empty($element['#id'])) {\n $attributes['for'] = $element['#id'];\n }\n // Add a class for required elements to facilitate cross-browser styling.\n if (!empty($element['#required'])) {\n $attributes['class'] = array('form-required');\n }\n\n return '<label' . drupal_attributes($attributes) . '>' . $title . $required . '</label>';\n}", "public function label_to_field($label) {\n\t\t\treturn preg_replace ( \"/[^a-zA-Z0-9_]/\" , \"_\" , $label);\n\t\t}", "public function getLabel()\n {\n }", "public function getLabel()\n {\n }", "public function addLabel(Label $label): void\n {\n if (is_null($this->labels)) {\n $this->labels = collect();\n }\n $this->labels->put($label->Text, $label);\n }", "public function getLabel() {}", "public function getLabel() {}", "function custom_field_tag_with_label($name, $custom_value) {\n return $this->custom_field_label_tag($name, $custom_value).$this->custom_field_tag($name, $custom_value);\n }", "public function setLabel($label) {\r\n\t\t$node = new Larc_Html_Element($this->labelTag, $label, array('class' => $this->labelClass), $this);\r\n\t\tif(!$this->labelNode) {\r\n\t\t\t$this->labelNode = $this->insertFirst($node);\r\n\t\t} else {\r\n\t\t\t$this->labelNode->nodeValue = $label;\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->labelNode;\r\n\t}", "function acf_get_field_label($field, $context = '')\n{\n}", "public function smtp_name_field( $args ) {\n $field_id = $args['label_for'];\n $value = get_option( $field_id, $args['default'] );\n\n printf( \"<input type='text' name=%s id=%s value=%s />\", $field_id, $field_id, $value );\n }", "public function setLabel($label)\n {\n $this->label = $label;\n \n return $this;\n }", "public function addLabelF ($label, $id = NULL, array $attributes = array ())\n\t{\n\t\tif (is_array($label)) {\n\t\t\t$attributes = $label;\n\t\t\t$label = $attributes['label'];\n\t\t\tisset($attributes['id']) and $id = $attributes['id'];\n\t\t}\n\n\t\t$attributes['for'] = $id;\n\n\t\tunset($attributes['label']);\n\n\t\treturn html_tag('label', $this -> attr_to_string($attributes), $label);\n\t}", "public function get_label();", "public function get_label();", "function getLabel()\n\t{\n\t\treturn '';\n\t}", "public function getLabel() {\n\t}", "public function getLabel()\n\t{\n\t\t$label = parent::getLabel();\n\t\t$label->for = $this->getId();\n\t\treturn $label;\n\t}", "public function setLabel(Label $label) {\n\t\t$this->label = $label;\n\t}", "public function setLabel($var)\n {\n GPBUtil::checkString($var, True);\n $this->label = $var;\n\n return $this;\n }", "public function onInitMetaBoxFields(MetaFieldInterface $ctrl)\n {\n $ctrl->addField('label', new WpInput(['label' => 'Extra label for this post:']), '_atksample_label');\n }", "function renderField($label, $type, $name) {\n\n\t\tswitch($type) {\n\t\n\t\t\tcase 'divider':\n\t\t\t\t$field = \"<tr><td colspan='2'><b>\" . $label . \"</b></td></tr>\";\n\t\t\tbreak;\n\t\n\t\t\tdefault:\n\t\t\t\t$field = \"<input type='\" . $type . \"' name='\" . $name . \"' value='\" . t3lib_div::_GP($name) . \"'>\";\n\t\t\t\t$field = \"<tr><td>\" . $label . \"</td><td>\" . $field . \"</td></tr>\";\n\t\t}\n\n\t\treturn $field;\n\t}", "function testFieldWithLabelInline(){\n #mdx:FieldWithLabelInline\n $form = new HtForm();\n $form->textin('email')->label(['text'=>'E-mail:','inline'=>true]);\n $form->button('Submit');\n #/mdx echo $form\n $this->assertContains(\"E-mail:\",\"$form\");\n $this->assertContains(\"inline-block\",\"$form\");\n }", "function get_field_label($field_instance) {\n return $field_instance['label'];\n }", "public function setLabel($label) {\n $this->label = $label;\n return $this;\n }", "public function render()\n {\n return view('components.forms.label');\n }", "protected function createLabel($config)\n {\n $tmpl = $this->getOptionalTemplate(\n $config,\n ARCH_PATH.'/theme/form/label.php'\n );\n $config['label'] = empty($config['label']) ? '' : $config['label'];\n return new \\Arch\\Registry\\View($tmpl, $config);\n }", "function label_text_combo($label, $value) {\n\n// function \\k1lib\\html\\input_label_combo(&$field_name, &$value, &$table_config_array, &$error_msg = \"\") {\n// $label_object = new html_classes\\label($label, \"\", \"right inline\");\n\n $html_template = load_html_template(\"label-input-combo\");\n $html_code = sprintf($html_template, $label, $value);\n\n return $html_code;\n}", "public function init()\n {\n parent::init();\n\n // Retrieving a field from the controller container and layout into this view.\n $this->add($this->fieldCtrl->getField('label'));\n }", "private function _getLabel( $label, $id = '' )\n {\n\n if ( $label->getText() ) {\n if ( ! $label->getAttributes() ) {\n $attributes = $this->view->formatUtil()->addItemToAttributes( $label->getAttributes(array()), 'class' , 'control-label' );\n } else {\n $attributes = $label->getAttributes( array() );\n }\n return $this->view->htmlElement()->getLabel( $label->getText(), $id, $attributes ).' ';\n } else {\n return '';\n }\n }" ]
[ "0.7381184", "0.7369457", "0.72620726", "0.7213327", "0.7045663", "0.7036932", "0.7014325", "0.7014325", "0.7014325", "0.7014325", "0.699512", "0.698019", "0.69418037", "0.692387", "0.69060093", "0.6892339", "0.6871649", "0.68227684", "0.6796143", "0.679102", "0.6782588", "0.6782588", "0.6782588", "0.6782588", "0.6782588", "0.6782588", "0.6762245", "0.67585313", "0.6724109", "0.6709006", "0.6691146", "0.66625375", "0.66525275", "0.6647592", "0.66298527", "0.662774", "0.662774", "0.6602149", "0.6601945", "0.6596888", "0.6573924", "0.65671366", "0.6564539", "0.65553224", "0.6553681", "0.6547234", "0.65419126", "0.6530994", "0.6530409", "0.6530409", "0.6530409", "0.6530409", "0.6530409", "0.6523305", "0.65034455", "0.648932", "0.64794034", "0.64776015", "0.6473625", "0.6473625", "0.6437952", "0.64364177", "0.64110667", "0.63868296", "0.63794214", "0.63743716", "0.6371247", "0.63596344", "0.6344192", "0.6344192", "0.6343061", "0.6330196", "0.6324415", "0.6324415", "0.63170207", "0.63031125", "0.63031125", "0.62858975", "0.62790895", "0.6274168", "0.6258765", "0.6253784", "0.62515265", "0.624464", "0.624464", "0.6244306", "0.62403786", "0.62396777", "0.62358063", "0.62320435", "0.6223845", "0.62130296", "0.6212031", "0.6208259", "0.62030214", "0.6190229", "0.6180862", "0.6177453", "0.61729777", "0.61574215" ]
0.622009
91
Process the current form element passed (string, object, array)
protected function process_element($element) { switch (gettype($element)) { case 'object': $element->render(); break; case 'array': foreach ($element as $sub_element) { $this->process_element($sub_element); } break; default: print "$element\n"; break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function element_form($element, $record, $options = array())\n{\n $html = '';\n // If we have an array of Elements, loop through the form to display them.\n if (is_array($element)) {\n foreach ($element as $key => $e) {\n $html .= get_view()->elementForm($e, $record, $options);\n }\n } else {\n $html = get_view()->elementForm($element, $record, $options);\n }\n return $html;\n}", "public function process()\n\t{\n\t\tif(isset($_POST[$this->input_name()])) {\n\t\t\t$this->value = $_POST[$this->input_name()];\n\t\t}\n\t\telse {\n\t\t\t$this->value = false;\n\t\t}\n\t}", "function process_form()\n {\n }", "public function valiteForm();", "protected abstract function printFormElements();", "public function manipulateForm(&$aForm) {\n }", "function xml_form_by_obj($xml) {\r\n\t\t$this->xml_form_by_vals ( $xml->vals );\r\n\t}", "function funcs_processForm($text,$fields){\n\t//do not scan the text if the fields are empty\n\tif (empty($fields)){\n\t\treturn $text;\n\t}\n\t$pos = 0;\n\t$element = '<';\n\t//iterate through each element\n\twhile (($pos = strpos($text,$element,$pos)) !== false){\n\t\tif (preg_match('/^<input$/i',substr($text,$pos,6))){\n\t\t\t$tag_type = 1;\n\t\t\t$element2 = '>';\n\t\t}elseif (preg_match('/^<select$/i',substr($text,$pos,7))){\n\t\t\t$tag_type = 2;\n\t\t\t$element2 = '</select>';\n\t\t}elseif (preg_match('/^<textarea$/i',substr($text,$pos,9))){\n\t\t\t$tag_type = 3;\n\t\t\t$element2 = '</textarea>';\n\t\t}else{\n\t\t\t$pos += 1;\n\t\t\tcontinue;\n\t\t}\n\t\t//keep grabing pieces with bigger size while not full element object\n\t\t$size = 50;\n\t\tdo{\n\t\t\t$grabed_string =& substr($text,$pos,$size);\n\t\t\t$size += 10;\n\t\t}while(($secPos = strpos($grabed_string,$element2)) === false);\n\t\t$grabed_string = substr($grabed_string,0,$secPos+strlen($element2));\n\t\tif ($tag_type == 1){\n\t\t\t//get element's properties\n\t\t\t$type = preg_replace('/^.*type=[\\'\"]?([^\"\\'> ]+).*$/is','\\\\1',$grabed_string);\n\t\t\t$name = preg_replace('/^.*name=[\\'\"]?([^\"\\'> ]+).*$/is','\\\\1',$grabed_string);\n\t\t\tif (preg_match('/^.*value=[\\'\"]?([^\"\\'> ]+).*$/i',$grabed_string)){\n\t\t\t\t$value = preg_replace('/^.*value=[\\'\"]?([^\"\\'> ]+).*$/is','\\\\1',$grabed_string);\n\t\t\t}else{\n\t\t\t\t$value = null;\n\t\t\t}\n\t\t\tif (($type == 'checkbox' || $type == 'radio')\n\t\t\t\t\t&& isset($fields[$name]) && $fields[$name] == $value ){\n\t\t\t\t//need to select this value\n\t\t\t\t$replacement = ' checked>';\n\t\t\t\t$new_string = str_replace('>',$replacement,$grabed_string);\n\t\t\t\t$text =& substr_replace($text,$new_string,$pos,strlen($grabed_string));\n\t\t\t}elseif(($type == 'text' || $type == 'hidden') && isset($fields[$name])){\n\t\t\t\t$replacement = ' value=\"'.$fields[$name].'\">';\n\t\t\t\t$new_string = preg_replace('/value=[^ >]+/','',$grabed_string);\n\t\t\t\t$new_string = str_replace('>',$replacement,$new_string);\n\t\t\t\t$text =& substr_replace($text,$new_string,$pos,strlen($grabed_string));\n\t\t\t}\n\t\t}elseif($tag_type == 2){\n\t\t\t//select tag\n\t\t\t$names = array();\n\t\t\tpreg_match('/name=[\\'\"]?([^\"\\'\\> ]+)/i',$grabed_string,$names);\n\t\t\t$name = preg_replace('/^.*=[\\'\"]?(.+)$/i','\\\\1',$names[0]);\n\t\t\tif (isset($fields[$name])){\n\t\t\t\tif ($fields[$name] !== ''){\n\t\t\t\t\t$new_string = preg_replace('/(<option[^>]+value=[\\'\"]?'.$fields[$name].'\\b[\\'\"]?[^\\/>]*)([\\/]?)>/i','\\\\1 selected\\\\2>',$grabed_string);\n\t\t\t\t}else{\n\t\t\t\t\t$new_string = preg_replace('/(<option[^>]+value=[\\'\"][\\'\"][^\\/>]*)([\\/]?)>/i','\\\\1 selected\\\\2>',$grabed_string);\n\t\t\t\t}\n\t\t\t\t$text = substr_replace($text,$new_string,$pos,strlen($grabed_string));\n\t\t\t}\n\t\t}elseif($tag_type == 3){\n\t\t\t//textarea tag\n\t\t\t$names = array();\n\t\t\tpreg_match('/name=[\\'\"]?([^\"\\'\\> ]+)/i',$grabed_string,$names);\n\t\t\t$name = preg_replace('/^.*=[\\'\"]?(.+)$/i','\\\\1',$names[0]);\n\t\t\tif (isset($fields[$name])){\n\t\t\t\t$pos1st = strpos($grabed_string,'>');\n\t\t\t\t$replacement = $fields[$name];\n\t\t\t\t$length = strlen($grabed_string)-($pos1st+1);\n\t\t\t\t$new_string = substr_replace($grabed_string,\n\t\t\t\t\t$replacement.'</textarea>',$pos1st+1,\n\t\t\t\t\t$length);\n\t\t\t\t$text =& substr_replace($text,$new_string,$pos,strlen($grabed_string));\n\t\t\t}\n\t\t}\n\t\t$pos += $secPos;\n\t}\n\treturn $text;\n}", "function render($element, $form)\n {\n }", "abstract function repopulate(Form $arg0);", "function handle_post($indata) {\n// showDebug('form_class POST:');\n// showArray($indata); \n return;\n }", "static function get_form_field($aff, $params , $current_value=''){\n\t \t\tswitch ($params['type']){\n\t\t\t\tcase \"checkbox\":\n\t\t\t\t\t$checked = $current_value == 1 ? \"checked\" : \"\";\n\t\t\t\t\treturn '<input type=\"checkbox\" id=\"'.$aff. '['.$params['name'].']' .'\" name=\"'.$aff. '['.$params['name'].']' .'\" value=\"1\" '.$checked.' > <label for=\"'.$aff. '['.$params['name'].']' .'\"> '.$params['description'].' </label> ';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"text\":\n\t\t\t\t\treturn '<input type=\"text\" id=\"'.$aff. '['.$params['name'].']' .'\" name=\"'.$aff. '['.$params['name'].']' .'\" value=\"'.$current_value.'\" /> <label for=\"'.$aff. '['.$params['name'].']' .'\"> '.$params['description'].' </label> ';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"select\":\n\t\t\t\t\treturn self::form_field_select($aff, $params , $current_value);\n\t\t\t\t\tbreak;\n\t \t\t}\n\t }", "protected function addFormObjectToViewHelperVariableContainer() {}", "abstract protected function getForm();", "public function accessForm(): IFormElement;", "function onProcess($formID, $formStruct, $formData, $flagHTML, &$tVars) {\n\n\t}", "public function handle_form_data($file, $index) {\n }", "protected function handle_form_data($file, $index) {\n }", "abstract function form();", "public function getSubmittedData($element) {\n $name = $element['#name'];\n if (strpos($name, '[') === false) {\n if ($element['#type'] == 'file') {\n return $_FILES[$name]['tmp_name'];\n }\n return isset($_REQUEST[$name]) ? $_REQUEST[$name] : in_array($element['#type'], array('textfield', 'textarea')) ? '' : 0;\n }\n\n $parts = explode('[', $name);\n //https://icanlocalize.basecamphq.com/projects/7393061-toolset/todo_items/196173458/comments\n //Security Fixing\n //$parts = array_map(create function('&$a', 'return trim($a, \\']\\');'), $parts);\n $parts = array_map(\"cred_mytrimfunction\", $parts);\n if (!isset($_REQUEST[$parts[0]])) {\n return in_array($element['#type'], array('textfield', 'textarea')) ? '' : 0;\n }\n $search = $_REQUEST[$parts[0]];\n for ($index = 0; $index < count($parts); $index++) {\n $key = $parts[$index];\n // We're at the end but no data retrieved\n if (!isset($parts[$index + 1])) {\n return in_array($element['#type'], array('textfield', 'textarea')) ? '' : 0;\n }\n $key_next = $parts[$index + 1];\n if ($index > 0) {\n if (!isset($search[$key])) {\n return in_array($element['#type'], array('textfield', 'textarea')) ? '' : 0;\n } else {\n $search = $search[$key];\n }\n }\n if (is_array($search) && array_key_exists($key_next, $search)) {\n if (!is_array($search[$key_next])) {\n return $search[$key_next];\n }\n }\n }\n return 0;\n }", "public function populateForm() {}", "public function process_post() {\n\t\t$name = $this->node->attr('name');\n\n\n\t\tif (!empty($_POST) && $this->get_post_value($name)) {\n//\t\t\t$this->value = $this->get_post_value($name);\n\t\t\t$this->value($this->get_post_value($name));\n\t\t}\n\t}", "abstract function getForm();", "function element_set_form($record, $elementSetName)\n{\n $recordType = get_class($record);\n if ($recordType == 'Item' && $elementSetName == 'Item Type Metadata') {\n $elements = $record->getItemTypeElements();\n } else {\n $elements = get_db()->getTable('Element')->findBySet($elementSetName);\n }\n $filterName = array('ElementSetForm', $recordType, $elementSetName);\n $elements = apply_filters(\n $filterName,\n $elements,\n array('record_type' => $recordType, 'record' => $record, 'element_set_name' => $elementSetName)\n );\n $html = element_form($elements, $record);\n return $html;\n}", "static function process_element( $element, &$values, &$input ) {\n\t\t$values_root = &$values;\n\t\t$input_root = &$input;\n\n\t\t// Process button value by simple presence of #key\n\t\tif( self::is_button( $element ) ) {\n\t\t\t$element['#value'] = isset( $input[$element['#key']] ) && $input[$element['#key']];\n\t\t}\n\t\t// Process checkbox by presence of #key, using the #checked value\n\t\t// If not key is not set or is empty, set value to false\n\t\telse if ( $element['#type'] === 'checkbox' ) {\n\t\t\tif ( !empty( $input[$element['#key']] ) ) {\n\t\t\t\t$element['#value'] = $element['#checked'];\n\t\t\t} else {\n\t\t\t\t$element['#value'] = false;\n\t\t\t}\n\t\t}\n\t\t// Munge composite elements\n\t\telse if( $element['#type'] == 'composite' ) {\n\t\t\t$values_root = &$values[$element['#key']];\n\t\t\t$input_root = &$input[$element['#key']];\n\t\t}\n\t\t// Munge multi-select elements\n\t\telse if( $element['#type'] == 'select' && $element['#multiple'] ) {\n\t\t\t$element['#value'] = isset( $input[$element['#key']] ) ? (array) $input[$element['#key']] : array();\n\t\t}\n\t\t// Munge multiple elements\n\t\telse if( $element['#type'] == 'multiple' ) {\n\t\t\t$values[$element['#key']] = array();\n\n\t\t\tif( isset( $input[$element['#key']] ) && is_array( $input[$element['#key']] ) ) {\n\t\t\t\tforeach( $input[$element['#key']] as $item ) {\n\t\t\t\t\tself::process_form( $element['#multiple'], $value, $item );\n\t\t\t\t\t$values[$element['#key']][] = $value;\n\n\t\t\t\t\t// Unset $value so it does not keep data from a previous iteration\n\t\t\t\t\t// this caused all unchecked checkboxes following a checked input\n\t\t\t\t\t// in a multiple field to store as checked on save.\n\t\t\t\t\tunset( $value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Or just pull the value from the input\n\t\telse if( isset( $input[$element['#key']] ) ) {\n\t\t\t$element['#value'] = $input[$element['#key']];\n\n\t\t\t// Sanitization of fields that allow html\n\t\t\tif( ( isset( $element['#allow_html'] ) && $element['#allow_html'] ) || $element['#type'] == 'mce' ) {\n\t\t\t\t$element['#value'] = wp_kses_post( $element['#value'] );\n\t\t\t}\n\t\t\t// Simple sanitization of most values\n\t\t\telse if( isset( $element['#type'] ) && $element['#type'] != 'composite' ) {\n\t\t\t\t$element['#value'] = sanitize_text_field( $element['#value'] );\n\t\t\t}\n\t\t}\n\n\t\t// If there's a value, use it. May have been fed in as part of the form\n\t\t// structure\n\t\tif( isset( $element['#value'] ) ) {\n\t\t\t$values[$element['#key']] = $element['#value'];\n\t\t}\n\n\t\t$element = apply_filters_ref_array( 'wp_form_process_element', array( &$element, &$values, &$input ) );\n\n\t\tself::process_form( $element, $values_root, $input_root );\n\t}", "function formelement($form,$lable,$name,$value,$type,$cattype=0,$tables=0,$opt=0,$mult=0){\n\tswitch ($type){\n\t\tcase 'hidden':\n\t\t\t$form->hiddenfield($name,$value);\n\t\tbreak;\n\t\tcase 'image':\n\t\t\tfor($i=0; $i<sizeof($tables); $i++){\n\t\t\t\tif($tables[$i]['table'] == $cattype) $n = $i;\n\t\t\t}\n\t\t\tif(isset($tables[$n]['imageproperties'])){\n\t\t\t\t$form->hiddenfield(\"imageproperties[$name][width]\",$tables[$n]['imageproperties'][\"$name\"]['width']);\n\t\t\t\t$form->hiddenfield(\"imageproperties[$name][height]\",$tables[$n]['imageproperties'][\"$name\"]['height']);\n\t\t\t\t$form->hiddenfield(\"imageproperties[$name][frame]\",$tables[$n]['imageproperties'][\"$name\"]['frame']);\n\t\t\t\t$note = \"Image will be cropped and resized to \".$tables[$n]['imageproperties'][\"$name\"]['width'].\" x \".$tables[$n]['imageproperties'][\"$name\"]['height'].\"\";\n\t\t\t}\n\t\t\t$form->hiddenfield('filelocation',$cattype);\n\t\t\t$imagename = $_GET['pg'].\"_\".$_GET['id'].\"_lg.jpg\";\n\t\t\t$form->filefield($lable,$name,'',$_GET['pg'],$_GET['id'],'image',$note);\n\t\t\tbreak;\n\t\tcase 'file':\n\t\t\tfor($i=0; $i<sizeof($tables); $i++){\n\t\t\t\tif($tables[$i]['table'] == $cattype) $n = $i;\n\t\t\t}\n\t\t\tif($opt && trim($opt) != '') $note = $opt;\n\t\t\telse $note = \"Upload .jpg, .pdf or .doc (Word document) file\";\n\t\t\t$form->hiddenfield('filelocation',$cattype);\n\t\t\t$form->filefield($lable,$name,$value,$_GET['pg'],$_GET['id'],'file',$note);\n\t\t\tbreak;\n\t\tcase 'textfield':\n\t\t\t$form->textfield($lable,$name,$value,$opt);\n\t\tbreak;\n\t\tcase 'textarea':\n\t\t\t$n = getKey($tables, $cattype);\n\t\t\tfor($i=0; $i<sizeof($tables[$n]['field']); $i++){\n\t\t\t\tif($tables[$n]['field'][$i] == $name) $x = $i;\n\t\t\t}\n\t\t\tif($tables[$n]['note'][$x] && $tables[$n]['note'][$x]!=\"\") $note = $tables[$n]['note'][$x];\n\t\t\telse $note = 0;\n\t\t\tif($name == 'description') $s = '250'; else $s = '60';\n\t\t\t$form->textarea($lable,$name,$value,$s,$note);\n\t\tbreak;\n\t\tcase 'selectbox':\n\t\t\t// **************************************************************\n\t\t\t// NOTE FOR JK: TRY TO MAKE THIS CONDITIONAL DATA WITHIN THE CONFIG FILE\n\t\t\t// **************************************************************\n\t\t\tif($name == 'category'){\n\t\t\t\t// GET ALL CATEGORIES FOR THIS PARTICULAR TYPE\n\t\t\t\t$x = mysql_query(\"SELECT * FROM `category` WHERE `type`='$cattype' AND `parent`='0'\");\n\t\t\t\twhile($xd = mysql_fetch_assoc($x)){\n\t\t\t\t\t$nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t\t\t$xdid = $xd['id'];\n\t\t\t\t\t$sx = mysql_query(\"SELECT * FROM `category` WHERE `type`='$cattype' AND `parent`='$xdid'\");\n\t\t\t\t\tif(mysql_num_rows($sx) > 0){\n\t\t\t\t\t\twhile($sxd = mysql_fetch_assoc($sx)) $nmvals .= $sxd['id'].',&nbsp;&middot;'.$sxd['title'].'|';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if($name == 'sub'){\n\t\t\t\tif($_GET['pg'] == 'bb_categories'){\n\t\t\t\t\t// GET ALL FORUM CATEGORIES\n\t\t\t\t\t$x = mysql_query(\"SELECT * FROM `bb_categories` WHERE `sub`='0'\");\n\t\t\t\t\twhile($xd = mysql_fetch_assoc($x)) $nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t\t} else {\n\t\t\t\t\t// GET ALL TOP LEVEL CATEGORIES\n\t\t\t\t\t$x = mysql_query(\"SELECT * FROM `category` WHERE `sub`=''\");\n\t\t\t\t\twhile($xd = mysql_fetch_assoc($x)) $nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t\t}\n\t\t\t} else if($name == 'products'){\n\t\t\t\t// GET ALL CATEGORIES FOR THIS PARTICULAR TYPE\n\t\t\t\t$x = mysql_query(\"SELECT * FROM `category` WHERE `type`='products' AND `subof`='0'\");\n\t\t\t\twhile($xd = mysql_fetch_assoc($x)){\n\t\t\t\t\t$nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t\t\t$xdid = $xd['id'];\n\t\t\t\t\t$sx = mysql_query(\"SELECT * FROM `products` WHERE `category`='$xdid' AND `active`='0' ORDER BY `title` ASC\");\n\t\t\t\t\tif(mysql_num_rows($sx) > 0){\n\t\t\t\t\t\twhile($sxd = mysql_fetch_assoc($sx)) $nmvals .= $sxd['id'].',&nbsp;&middot;'.$sxd['title'].'|';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if($name == 'options'){\n\t\t\t\t$x = mysql_query(\"SELECT * FROM `options` WHERE `active`='0' ORDER BY `title` ASC\");\n\t\t\t\twhile($xd = mysql_fetch_assoc($x)) $nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t\t\n\t\t\t} else if(TableExists($name, $default_dbname)){\n\t\t\t\t// IF THERE'S A DATABASE BY IT'S NAME, LIST ALL\n\t\t\t\t$x = mysql_query(\"SELECT * FROM `$name` ORDER BY `title`\");\n\t\t\t\tif(mysql_num_rows($x) > 0){\n\t\t\t\t\twhile($xd = mysql_fetch_assoc($x)) $nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t\t}\n\t\t\t\n\t\t\t} else {\n\t\t\t\t// **************************************************************\n\t\t\t\t// NOTE FOR JK: FOR THE MOST PART, THIS IS ALL THE CONDITIONAL YOU NEED\n\t\t\t\t// (FOR EVERYTHING OTHER THAN TYPE... as long as names are kept consistent)\n\t\t\t\t// **************************************************************\n\t\t\t\t$n = getKey($tables, $cattype);\n\t\t\t\tif( $tables[$n]['select'][\"$name\"] && eregi(\"\\|\",$tables[$n]['select'][\"$name\"]) ){\n\t\t\t\t\t$nmvals = $tables[$n]['select'][\"$name\"];\n\t\t\t\t} else if($tables[$n]['select'][\"$name\"]) {\n\t\t\t\t\t$db = $tables[$n]['select'][\"$name\"];\n\t\t\t\t\t$key = getKey($tables, $name);\n\t\t\t\t\t$listme = $tables[$key]['listme'];\n\t\t\t\t\t$x = mysql_query(\"SELECT * FROM `$db`\");\n\t\t\t\t\twhile($xd = mysql_fetch_assoc($x)){\n\t\t\t\t\t\tif(!is_array($listme) && $xd[\"$listme\"]){\n\t\t\t\t\t\t\t\t$title = stripslashes($qd[\"$listme\"]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tforeach($listme AS $k => $v){\n\t\t\t\t\t\t\t\tif($xd[$v]) $title .= $xd[$v];\n\t\t\t\t\t\t\t\telse $title .= $v;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$nmvals .= $xd['id'].','.$title.'|';\n\t\t\t\t\t\tunset($title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\tif(!isset($nmvals)) $form->errorfield($lable,$name,\"\".strtoupper($name).\" NEED TO BE ADDED\");\n\t\t\telse $form->selectbox($lable,$name,$nmvals,$value,$mult);\n\t\tbreak;\n\t\tcase 'selectmult':\n\t\t\tif(TableExists($name, $default_dbname)){\n\t\t\t\t// IF THERE'S A DATABASE BY IT'S NAME, LIST ALL\n\t\t\t\t$x = mysql_query(\"SELECT * FROM `$name` ORDER BY `title`\");\n\t\t\t\twhile($xd = mysql_fetch_assoc($x)) $nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t} else {\n\t\t\t\t// **************************************************************\n\t\t\t\t// NOTE FOR JK: FOR THE MOST PART, THIS IS ALL THE CONDITIONAL YOU NEED\n\t\t\t\t// (FOR EVERYTHING OTHER THAN TYPE... as long as names are kept consistent)\n\t\t\t\t// **************************************************************\n\t\t\t\t$n = getKey($tables, $cattype);\n\t\t\t\tif( $tables[$n]['select'][\"$name\"] && eregi(\"\\|\",$tables[$n]['select'][\"$name\"]) ){\n\t\t\t\t\t$nmvals = $tables[$n]['select'][\"$name\"];\n\t\t\t\t} else if($tables[$n]['select'][\"$name\"]) {\n\t\t\t\t\t$db = $tables[$n]['select'][\"$name\"];\n\t\t\t\t\t$key = getKey($tables, $name);\n\t\t\t\t\t$listme = $tables[$key]['listme'];\n\t\t\t\t\t$x = mysql_query(\"SELECT * FROM `$db`\");\n\t\t\t\t\twhile($xd = mysql_fetch_assoc($x)){\n\t\t\t\t\t\tif(!is_array($listme) && $xd[\"$listme\"]){\n\t\t\t\t\t\t\t\t$title = stripslashes($qd[\"$listme\"]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tforeach($listme AS $k => $v){\n\t\t\t\t\t\t\t\tif($xd[$v]) $title .= $xd[$v];\n\t\t\t\t\t\t\t\telse $title .= $v;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$nmvals .= $xd['id'].','.$title.'|';\n\t\t\t\t\t\tunset($title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($nmvals)) $form->errorfield($lable,$name,\"\".strtoupper($name).\" NEED TO BE ADDED (mult)\");\n\t\t\telse $form->selectmult($lable,$name,$nmvals,$value);\n\t\tbreak;\n\t\tcase 'radiobuttonlist':\n\t\t\t// **************************************************************\n\t\t\t// NOTE FOR JK: TRY TO MAKE THIS CONDITIONAL DATA WITHIN THE CONFIG FILE\n\t\t\t// **************************************************************\n\t\t\tif($name == 'active'){\n\t\t\t\t$nmvals = '0,Yes|1,No';\n\t\t\t\tif($value == \"\") $value = '1';\n\t\t\t} else if($name == 'featured' && $nmvals == \"\"){\n\t\t\t\t$nmvals = '0,Featured|1,Not featured';\n\t\t\t\tif($value == \"\") $value = '1';\n\t\t\t}\n\t\t\t$form->radiobuttonlist($lable,$name,$nmvals,$value);\n\t\tbreak;\n\t\tcase 'checkbox':\n\t\t\t$form->checkbox($lable,$name,$value);\n\t\tbreak;\n\t\tcase 'textlist':\n\t\t\t$form->textlist($lable,$name,$value);\n\t\tbreak;\n\t\tcase 'text':\n\t\t\t$form->text($lable,$name,$value);\n\t\tbreak;\n\t}\n}", "public function OnParseFormData(&$data)\n\t{\n\t\t$data['file']->vt_submit = False;\n\t\tif (isset($_REQUEST['files_data'])) \n\t\t{\n\t\t\t$data_files = json_decode($_REQUEST['files_data']);\n\t\t\tif ($data_files && is_array($data_files)) \n\t\t\t{\n\t\t\t\tforeach($data_files as $data_file) \n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tif (property_exists($data_file, 'index') && $data_file->index == $data['index']) {\n\t\t\t\t\t\tif (property_exists($data_file, 'vtsubmit') && $data_file->vtsubmit == True) $data['file']->vt_submit = True;\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function formElement(\n FieldItemListInterface $items,\n $delta, \n Array $element, \n Array &$form, \n FormStateInterface $formState\n ) { \n $element = array(\n '#type' => 'fieldset',\n '#title' => SafeMarkup::format('@label', array('@label' => 'Location Info')),\n '#tree' => TRUE,\n );\n // Location\n $element['location'] = [\n '#type' => 'hidden',\n '#title' => t('Location'),\n\n // Set here the current value for this field, or a default value (or \n // null) if there is no a value\n '#default_value' => isset($items[$delta]->location) ? \n $items[$delta]->location : null,\n\n '#empty_value' => '',\n '#placeholder' => t('Location'),\n '#attributes' => array('class' => array('baidumap-location')),\n ];\n\n $element['address'] = [\n '#type' => 'textarea',\n '#title' => t('Address'),\n\n // Set here the current value for this field, or a default value (or \n // null) if there is no a value\n '#default_value' => isset($items[$delta]->address) ? \n $items[$delta]->address : null,\n\n '#empty_value' => '',\n '#placeholder' => t('Address'),\n '#attributes' => array('class' => array('baidumap-address')),\n ];\n\n\n $element['phone'] = [\n '#type' => 'textfield',\n '#title' => t('Phone'),\n\n // Set here the current value for this field, or a default value (or \n // null) if there is no a value\n '#default_value' => isset($items[$delta]->phone) ? \n $items[$delta]->phone : null,\n\n '#empty_value' => '',\n '#placeholder' => t('Phone'),\n '#attributes' => array('class' => array('baidumap-phone')),\n ];\n\n $element['profile'] = [\n '#type' => 'textarea',\n '#title' => t('Profile'),\n\n // Set here the current value for this field, or a default value (or \n // null) if there is no a value\n '#default_value' => isset($items[$delta]->profile) ? \n $items[$delta]->profile : null,\n\n '#empty_value' => '',\n '#placeholder' => t('Profile'),\n '#attributes' => array('class' => array('baidumap-profile')),\n ];\n\n // Map\n $element['map'] = [\n '#theme' => 'baidumap_fieldtype_widget', \n '#attached' => [\n 'library' => [\n 'baidumap_fieldtype/baidumap',\n 'baidumap_fieldtype/baidumap.widget_widget',\n 'baidumap_fieldtype/baidumap.api',\n 'baidumap_fieldtype/baidumap.SearchInfoWindow'\n ],\n 'drupalSettings' => [\n 'baidumap' =>[\n 'address' => isset($items[$delta]->address) ? \n $items[$delta]->address : null,\n 'phone' => isset($items[$delta]->phone) ? \n $items[$delta]->phone : null,\n 'profile' => isset($items[$delta]->profile) ? \n $items[$delta]->profile : null,\n ]\n ]\n ]\n ];\n\n return $element;\n }", "function __call($method,$arg)\n {\n $node = $arg[0];\n // include errors\n if ($node->getError() !== false) {\n $this->errors[] = $node;\n }\n // some elements need to be recompleted\n if ( ($node instanceof T_Form_Upload) ||\n ( ($node instanceof T_Form_Element) && !$node->isRedisplayValid() )\n ) {\n if ($node->isPresent() && $node->isValid()) $this->recomplete[] = $node;\n }\n }", "function form_data($args)\n {\n }", "abstract public function getForm() : void;", "function update() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->updateElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "protected function _readFormFields() {}", "protected function _handle_forms()\n\t{\n\t\tif (!strlen($this->_form_posted)) return;\n\t\t$method = 'on_'.$this->_form_posted.'_submit';\n\n\t\tif (method_exists($this, $method))\n\t\t{\n\t\t\tcall_user_func(array($this, $method), $this->_form_action);\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($this->controls as $k=>$v)\n\t\t{\n\t\t\t$ctl = $this->controls[$k];\n\n\t\t\tif (method_exists($ctl, $method))\n\t\t\t{\n\t\t\t\t$ctl->page = $this;\n\t\t\t\tcall_user_func(array($ctl, $method), $this->_form_action);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (DEBUG) dwrite(\"Method '$method' not defined\");\n\t}", "abstract public function forms();", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "public function populate(array $data) {\n if (!empty($this->_elements)) {\n foreach ($this->_elements as $k => $e) {\n if (!is_object($e))\n continue;\n else {\n if (isset($data[$k])) {\n $value = $data[$k];\n\n switch (true) {\n case ($e instanceof form_input):\n switch ($e->type) {\n case 'file':\n //do nothing\n break;\n case 'checkbox':\n //TODO: Add code to check if a value and if the checkbox is just to be set the value or also to be checked\n /*\n if (is_array($value)) {\n if ($value['checked'] != false)\n $e->checked();\n\n }\n */\n break;\n\n //TODO: The radios are in a group. I must check the value to know witch one is selected\n case 'radio':\n break;\n default:\n $e->setValue($value);\n }\n break;\n\n case ($e instanceof form_textarea):\n $e->text($value);\n break;\n case ($e instanceof form_select):\n $e->select($value);\n break;\n }\n }\n }\n }\n }\n }", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n // All keys are srings in array, merge it with defaults to override\r\r\n $this->e_data = array_merge($this->default_options, $this->e_data);\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "public function getForm();", "public function render(){\n\t\t$fhp; // form_helper_params\n\t\t$value = $this->_data['value'];\n\t\t$form_helper = 'input';\n\t\t$attributes = Arr::extract($this->_data,['id','required','maxlength','title','pattern','readonly','class','size','placeholder','multiple','accept','options']);\n\t\tif(!in_array($this->_data['type'],['radio'])) unset($attributes['options']);\n\t\tif($attributes['required']!==true) unset($attributes['required']);\n\t\tif($attributes['readonly']!==true) unset($attributes['readonly']);\n\t\tif(!$attributes['maxlength']) unset($attributes['maxlength']);\n\t\tif(!$attributes['size']) unset($attributes['size']);\n\t\t$fhp = [$this->_data['name'],$value,$attributes];\n\t\t//$name = $this->_data['name'];\n\t\t//open,close,input,button,checkbox,file,hidden,image,label,password,radio,select,submit,textarea,\n\t\t//$attr\n\t\tswitch($this->_data['type']){\n\t\t\tcase'form':\n\t\t\t\t$form_helper = $this->_data['data_type']; $fhp=[];\n\t\t\t\tbreak;\n\t\t\tcase'select':\n\t\t\t\t//unset\n\t\t\t\t$form_helper='select'; $fhp=[$this->_data['name'],$this->_data['options'],$value,$attributes];\n\t\t\t\tbreak;\n\t\t\tcase'checkbox':\n\t\t\t\t$fhp = [$this->_data['name'],1,!!($value),$attributes];\n\t\t\t\t$form_helper='checkbox';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//if($this->_data['type'] == 'radio') $fhp[2]['options'] = Arr::get($this->_data,'options');\n\t\t\t\tif(in_array($this->_data['type'],['file','select','checkbox','radio','hidden'])) $this->_data['inputtype'] = $this->_data['type'];\n\t\t\t\t//if()\n\t\t\t\tswitch($this->_data['data_type']){\n\t\t\t\t\tcase'int':\n\t\t\t\t\t\t$fhp[2]['type']='number';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase'text':\n\t\t\t\t\t\t$form_helper='textarea';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\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\tbreak;\n\t\t\t}\n\t\t\t\n\t\tif($form_helper=='input') $fhp[2]['type']=$this->_data['inputtype'];\n\t\t/*switch($this->_data['data_type']){\n\t\t\tcase'form':\n\t\t\t\t\n\t\t\t\t\n\t\t\t}*/\n\t\treturn call_user_func_array([$this,$form_helper],$fhp);\n\t\t//->($this->_data['name']);\n\t\t//return json_encode($this->_datations);\n\t\t//return \n\t\t}", "public function actForm($title, $icon, $text, $hasInput = true)\n {\n $inputType =($hasInput) ? 'text' : 'hidden';\n ?>\n<style type=\"text/css\">\nbody {\n background-color: #eee;\n}\n</style>\n<h3 class=\"img icon16-<?php echo $icon; ?>\">\n <?php echo $title ?>\n</h3>\n<div\n style=\"background-color: #ffff99; border: 1px solid gray; padding: 0.5em;\">\n <div id=\"displ_folder\" style=\"display: inline;\"></div>\n <input type=\"<?php echo $inputType; ?>\" id=\"act_name\" />\n</div>\n<br />\n<div style=\"text-align: center;\">\n <span class=\"btn\" onclick=\"processForm();\">\n <i class=\"img icon16-<?php echo $icon; ?>\"></i>\n <?php echo $text ?>\n </span>\n</div>\n<div id=\"log\"></div>\n<input type=\"hidden\" id=\"act_folder\" />\n\n<?php\n }", "private function _handleFormPost()\n {\n // see submit.php\n // 'FILE_OBJECTS' => 'handle_file_post',\n // 'BASE64_ENCODED_FILE_OBJECTS' => 'handle_base64_encoded_file_post',\n // 'TRANSFER_IDS' => 'handle_transfer_ids_post'\n }", "public function getFormInObject()\n {\n $sExKey = null;\n\n if ($this->_iIdEntity > 0 && $this->_sSynchronizeEntity !== null && count($_POST) < 1) {\n\n $sModelName = str_replace('Entity', 'Model', $this->_sSynchronizeEntity);\n $oModel = new $sModelName;\n\n $oEntity = new $this->_sSynchronizeEntity;\n $sPrimaryKey = LibEntity::getPrimaryKeyNameWithoutMapping($oEntity);\n $sMethodName = 'findOneBy'.$sPrimaryKey;\n $oCompleteEntity = call_user_func_array(array(&$oModel, $sMethodName), array($this->_iIdEntity));\n\n if (is_object($oCompleteEntity)) {\n\n foreach ($this->_aElement as $sKey => $sValue) {\n\n\t\t\t\t\tif ($sValue instanceof \\Venus\\lib\\Form\\Input && $sValue->getType() == 'submit') {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n if ($sValue instanceof \\Venus\\lib\\Form\\Radio) {\n\n $sExKey = $sKey;\n $sKey = substr($sKey, 0, -6);\n }\n\n if ($sValue instanceof Form) {\n\n ;\n } else {\n\n $sMethodNameInEntity = 'get_'.$sKey;\n\t\t\t\t\t\tif (method_exists($oCompleteEntity, $sMethodNameInEntity)) {\n\t\t\t\t\t\t\t$mValue = $oCompleteEntity->$sMethodNameInEntity();\n\t\t\t\t\t\t}\n\n if ($sValue instanceof \\Venus\\lib\\Form\\Radio && method_exists($this->_aElement[$sExKey], 'setValueChecked')) {\n\n $this->_aElement[$sExKey]->setValueChecked($mValue);\n } else if (isset($mValue) && method_exists($this->_aElement[$sKey], 'setValue')) {\n\n $this->_aElement[$sKey]->setValue($mValue);\n }\n }\n }\n }\n }\n\n $oForm = new \\StdClass();\n $oForm->start = '<form name=\"form'.$this->_iFormNumber.'\" method=\"post\" enctype=\"multipart/form-data\"><input type=\"hidden\" value=\"1\" name=\"validform'.$this->_iFormNumber.'\">';\n $oForm->form = array();\n\n foreach ($this->_aElement as $sKey => $sValue) {\n\n if ($sValue instanceof Container) {\n\n $oForm->form[$sKey] = $sValue;\n } else {\n\n $oForm->form[$sKey] = $sValue->fetch();\n }\n }\n\n $oForm->end = '</form>';\n\n return $oForm;\n }", "private function _processPageForm($csrf)\r\n {\r\n\t\t$oldValues = $this->_getAllValuesDatabaseIndex();\r\n if ($this->getRequest()->isPost()) { // if the user is submitting the form\r\n\t\t\t$values = $_POST['Elements'];\r\n\t\t\tif ($this->_autoCsrfProtection && !$csrf->isValid($_POST)) {\r\n $this->_helper->_flashMessenger(__('There was an error on the form. Please try again.'), 'error');\r\n return;\r\n }\r\n\t\t\tif (!(\"\" == $_POST['item_type_id']) ) { // if the user assigned an item type, save it with the element id of 0. this will force an update if there is already a saved item type.\r\n\t\t\t\t$value = new DefaultMetadataValue;\r\n\t\t\t\t$value->element_id = 0;\r\n\t\t\t\t$value->input_order = 0;\r\n\t\t\t\t$value->text = $_POST['item_type_id'];\r\n\t\t\t\t$value->html = 0;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\t$value->setPostData($_POST);\r\n\t\t\t\t\t$value->save();\r\n\t\t\t\t// Catch validation errors.\r\n\t\t\t\t} catch (Omeka_Validate_Exception $e) {\r\n\t\t\t\t\t$this->_helper->flashMessenger($e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tforeach($values as $id => $texts) { //iterate over each textbox on the form and save them to the database\r\n\t\t\t\t\r\n\t\t\t\t$order = 0;\r\n\t\t\t\tforeach($texts as $text) {\r\n\t\t\t\t\tif (!(\"\" == trim($text['text']))) { // if the input has a value\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$value = new DefaultMetadataValue;\r\n\t\t\t\t\t\t$value->element_id = $id;\r\n\t\t\t\t\t\t$value->input_order = $order;\r\n\t\t\t\t\t\t$value->text = $text['text'];\r\n\t\t\t\t\t\t$value->html = intval($text['html']);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$oldValue = $this->_oldValue($value, $oldValues); // check for the corresponding old value\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!$oldValue) { // if the value's element does not have a value already in the database, save it\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t$value->setPostData($_POST);\r\n\t\t\t\t\t\t\t\t$value->save();\r\n\t\t\t\t\t\t\t// Catch validation errors.\r\n\t\t\t\t\t\t\t} catch (Omeka_Validate_Exception $e) {\r\n\t\t\t\t\t\t\t\t$this->_helper->flashMessenger($e);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (($value->text != $oldValue['text']) || ($value->html != $oldValue['html'])) { //if the value already in the database was changed or if the html boolean is different, update the database record.\r\n\t\t\t\t\t\t\t$value->id = $oldValue['id']; // having the id of an existing database record forces UPDATE instead of INSERT\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t$value->setPostData($_POST);\r\n\t\t\t\t\t\t\t\t$value->save();\r\n\t\t\t\t\t\t\t// Catch validation errors.\r\n\t\t\t\t\t\t\t} catch (Omeka_Validate_Exception $e) {\r\n\t\t\t\t\t\t\t\t$this->_helper->flashMessenger($e);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tunset($oldValues[$oldValue['id']]); // remove the old value from the array, so we don't delete it later\r\n\t\t\t\t\t\t} else { // otherwise, the value is unchanged and do not save it to the database\r\n\t\t\t\t\t\t\tunset($oldValues[$oldValue['id']]); // remove the old value from the array, so we don't delete it later\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t$order++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// delete old values not found in the form\r\n\t\t\tforeach($oldValues as $oldValue) {\r\n\t\t\t\t$oldValue->delete();\r\n\t\t\t}\r\n\t\t\t$this->_helper->flashMessenger(__('Default metadata have been saved.'), 'success');\r\n }\r\n }", "public function renderElement($element) {\n $method = $element['#type'];\n if (!isset($element['#name']) && !in_array($element['#type'], array('markup', 'checkboxes'))) {\n if (!isset($element['#attributes']['name'])) {\n return '#name or #attributes[\\'name\\'] required!';\n } else {\n $element['#name'] = $element['#attributes']['name'];\n }\n }\n if (is_callable(array($this, $method))) {\n $custom_field_title = '';\n if (isset($element['#title']) && !empty($element['#title'])) {\n $custom_field_title = $element['#title'];\n }\n\n if (empty($custom_field_title) && isset($element['#name']) && !empty($element['#name'])) {\n $custom_field_title = $element['#name'];\n }\n if (!isset($element['#id'])) {\n if (isset($element['#attributes']['id'])) {\n $element['#id'] = $element['#attributes']['id'];\n } else {\n $_id = isset($this->_id) ? $this->_id . '-' : '';\n $element['#id'] = \"{$_id}{$element['#type']}-\"\n . $this->_count($element['#type']) . '-' . time();\n }\n }\n\n if (isset($this->_errors[$element['#id']])) {\n $element['#error'] = $this->_errors[$element['#id']];\n }\n // Add JS validation\n if (!empty($element['#validate'])) {\n if (isset($element['#validate']['required']) && !empty($element['#title'])) {\n // Asterisk\n $element['#title'] .= '&#42;';\n }\n $element['#attributes']['data-wpt-validate'] = esc_html(self::json_encode(apply_filters('wptoolset_forms_field_js_validation_data_' . $this->_id, $element['#validate'])));\n $element['#attributes']['data-wpt-field-title'] = esc_js($custom_field_title);\n }\n if ($element['#type'] == 'radios' && !empty($element['#options'])) {\n foreach ($element['#options'] as &$option) {\n if (!empty($option['#validate'])) {\n $option['#attributes']['data-wpt-validate'] = esc_html(self::json_encode(apply_filters('wptoolset_forms_field_js_validation_data_' . $this->_id, $option['#validate'])));\n $option['#attributes']['data-wpt-field-title'] = esc_js($custom_field_title);\n }\n }\n }\n /**\n * WPML - lock CF is has option \"copy from original\".\n */\n if (is_admin() && function_exists('wpcf_wpml_field_is_copied') && wpcf_wpml_field_is_copied($element)) {\n $element['#title'] .= sprintf(\n '<img src=\"%s/images/locked.png\" alt=\"%s\" title=\"%s\" style=\"position:relative;left:2px;top:2px;\" />', WPCF_EMBEDDED_RES_RELPATH, __('This field is locked for editing because WPML will copy its value from the original language.', 'wpcf'), __('This field is locked for editing because WPML will copy its value from the original language.', 'wpcf')\n );\n $element['#attributes']['readonly'] = true;\n $element['#attributes']['disabled'] = true;\n }\n return $this->{$method}($element);\n }\n }", "function process(){\n if(isset($this->displayParams['collection_field_list'])){\n if($this->action_type == 'editview'){\n $this->viewtype = 'EditView';\n }else {\n if($this->action_type == 'detailview'){\n $this->viewtype = 'DetailView';\n }\n }\n $relatedObject = BeanFactory::getObjectName($this->related_module);\n vardefmanager::loadVardef($this->related_module, $relatedObject);\n foreach($this->value_name as $key_value=>$field_value){\n $this->count_values[$key_value] = $key_value;\n $this->process_form($relatedObject,$key_value,$field_value);\n }\n $this->process_label($relatedObject);\n }else{\n die(\"the array collection_field_list isn't set\");\n }\n }", "function getFormField($arr)\n{\n\t$name = '';\n\t$parms = '';\n\t$val = '';\n\t$type = '';\n\n\textract($arr);\n\n\tif(!$parms)\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'textarea':\n\t\t\t\t$parms = 'rows=\"15\" cols=\"35\" wrap=\"virtual\"';\n\t\t\t\tbreak;\n\t\t\tcase 'file':\n\t\t\tcase 'text':\n\t\t\tcase 'password':\n\t\t\t\t$parms = 'size=\"35\"';\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tswitch($type)\n\t{\n\t\tcase 'textarea':\n\t\t\t$str = '<textarea name=\"' . $name . '\" ' . $parms . '>' . $val . '</textarea>';\n\t\t\tbreak;\n\t\tcase 'select':\n\t\t\t$str = '<select name=\"' . $name . '\" ' . $parms . '>' . $val . '</select>';\n\t\t\tbreak;\n\t\tcase 'disptext':\n\t\t\t$str = $val;\n\t\t\tbreak;\n\t\tcase 'checkbox':\n\t\t\t$str = '<input type=\"checkbox\" name=\"' .$name . '\" ' . $val . ' />';\n\t\t\tbreak;\n\t\tcase 'null':\n\t\t\t$str = '';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$str = '<input type=\"' . $type . '\" name=\"' . $name . '\" ' . $parms . ' value=\"' . $val . '\" />';\n\t\t\tbreak;\n\t}\n\treturn $str;\n}", "function ConvertToForm($data) {\n $outdata = array();\n foreach($data as $field){\n if($field[0]==\"select\") {\n $nextfield = '<select name=\"'.$field[1].'\">';\n $endtag = '</select>';\n } else {\n $nextfield = '<input type=\"'.$field[0].'\" name=\"'.$field[1].'\" ';\n $endtag = '/>';\n }\n\n if(!empty($field[2])){\n switch($field[0]){\n case \"select\":\n for ($i=0;$i<count($field[2]);$i++){\n $nextfield .= '<option value=\"'.$field[2][$i].'\">'.$field[2][$i].'</option>';\n }\n break;\n case \"radio\":\n case \"checkbox\":\n if($field[3]) $nextfield .= 'checked=\"checked\" ';\n case \"text\":\n default:\n $nextfield .= 'value=\"'.$field[2].'\" ';\n }\n }\n\n $nextfield .= $endtag;\n $outdata[]=$nextfield;\n }\n return $outdata;\n }", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->data = $this->data['value'];\r\r\n }\r\r\n }", "public function loadForm() {\n foreach ($this->Fields as $key => $item) {\n if($item['function'] && $this->FormMode == \"add\") {\n $fn = str_replace('$1', $_POST[$key], $item['function']);\n $this->$key = eval($fn);\n } else\n if($_POST[$key] !== null) {\n $this->$key = $_POST[$key];\n }\n }\n }", "function process() {\n // We always call the parent's method\n parent::process();\n $d = $this->getDocument();\n \n // We pass the form our request object and the location of us so the form\n // will make us handle the input (as actually we take care of processing\n // this form) - it could link to any other action as long as it is aware\n // of the form\n $form = new Form($this->getRequest(), new Location($this), Request::METHOD_POST);\n \n // This is how you prepare values for the radio buttons\n $radios = array('visa', 'master');\n \n // This is how we prepare the fields\n $form->addField('text1', new TextInputField('Your name here please', \n new RegexValidator('^[[:alpha:]]+[[:space:]][[:alpha:]]+$')));\n $form->addField('pass1', \n new TextInputField('', new RegexValidator('^[[:digit:]]{16}$'), TextInputField::PASSWORD));\n $form->addField('text2', new TextInputField('', null, TextInputField::TEXTAREA));\n $form->addField('check1', new CheckBoxInputField());\n $form->addField('payment', new RadioButtonInputField('visa', $radios));\n \n // Here we test if the form was correctly submitted\n if($form->isValidSubmission()) {\n // Normally, we would do something useful here and redirect to another page\n // since this form uses the POST method\n $d->setVariable('success', true);\n }\n \n // Here we place the form into the document variable so it can process it\n $d->setVariable('form', $form);\n }", "abstract function performUpdate(Form $arg0);", "public function render(ElementInterface $element) {\n /**\n * Ser for input hidden nao gera as divs\n */\n if ($element instanceof \\Zend\\Form\\Element\\Hidden ||\n $element instanceof \\Zend\\Form\\Element\\Csrf) {\n return $this->getView()->formInput($element);\n } elseif ($element instanceof \\Zend\\Form\\Element\\Image) {\n $html = '<div class=\"form-group\">';\n $html .= $this->getView()->formImage($element);\n $html .= '</div>';\n return $html;\n return $this->getView()->formImage($element);\n } elseif ($element instanceof \\MySDK\\Form\\Element\\Code) {\n return $element->getValue();\n }elseif($element instanceof \\Zend\\Form\\Element\\Submit){\n //@todo melhorar renderzação do field ubmite\n return '<label for=\"\"></label><input name=\"' . $element->getName() . '\" placeholder=\"\" class=\"' . $element->getAttributes()['class'] . '\" value=\"' . $element->getValue() . '\" type=\"' . $element->getAttributes()['type'] . '\">';\n\n } else {\n $gridFieldClassPrefix = 'col-xs-';\n $gridFieldSizeDefault = 2;\n\n $size = $element->getOption('size') ? $element->getOption('size') : $gridFieldSizeDefault;\n $classError = $this->getView()->formElementErrors($element) ? \"has-error\" : '';\n $inputSize = $element->getOption('inputSize') ? $element->getOption('inputSize') : '';\n $classGrid = $element->getOption('classGrid') ? $element->getOption('classGrid') : '';\n $classFormGroup = $element->getOption('classFormGroup') ? $element->getOption('classFormGroup') : '';\n $getLabal = $element->getLabel();\n $getType = $element->getAttributes()['type'];\n $getName = $element->getAttributes()['name'];\n $getPlaceholder = $element->getAttributes()['placeholder']?$element->getAttributes()['placeholder']:'';\n $getClass = $element->getAttributes()['class'];\n $mask = $element->getOption('mask') ? $element->getOption('mask') : false;\n\n\n\n $html = '';\n // $html .= ' <div class=\"' . $gridFieldClassPrefix . $size . ' ' . $classGrid . '\">';\n $html .='<div class=\"row\">';\n $html .='<div class=\"' . $gridFieldClassPrefix . $size . '\">';\n\n $html .= ' <div class=\"form-group ' . ' ' . $classFormGroup . ' ' . $inputSize . ' ' . $classError . '\">';\n\n $html .= '<label for=\"' . $getName . '\">'.$getLabal.'</label>';\n $html .= '<input type=\"' . $getType . '\" name=\"' . $getName . '\" placeholder=\"' . $getPlaceholder . '\" class=\"' . $getClass . '\" value=\"\">';\n\n $html .= $this->getView()->formElementErrors()\n ->setMessageOpenFormat('<span class=\"help-block\">')\n ->setMessageSeparatorString('<br/>')\n ->setMessageCloseString('</span>')\n ->render($element);\n\n $html .= ' </div>';\n $html .= ' </div>';\n $html .= ' </div>';\n// $html .= ' </div>';\n\n if (false != $mask) {\n $html .= \"<script>\";\n $html .= \"$(document).ready(function(){ $('input[name=\\\"\" . $getName . \"\\\"]').mask('\" . $mask . \"') });\";\n $html .= \"</script>\";\n }\n\n return $html;\n }\n }", "public function processForm(ServerData $server);", "static function process_form( $form, &$values, &$input = null ) {\n\t\t$form += self::$element_defaults;\n\n\t\tif( !isset( $form['#form'] ) ) {\n\t\t\t$form['#form'] = $form;\n\t\t\t$form['#values'] = &$values;\n\t\t\t$form['#input'] = &$input;\n\t\t}\n\n\t\tif( !isset( $input ) ) {\n\t\t\t$input = &$_POST;\n\t\t}\n\n\t\t// avoid double slashing\n\t\t$input = stripslashes_deep( $input );\n\n\t\t$form = apply_filters_ref_array( 'wp_form_process', array( &$form, &$values, &$input ) );\n\n\t\tforeach( self::get_elements( $form ) as $key => $element ) {\n\t\t\t$element['#form'] = $form;\n\n\t\t\tself::process_element( $element, $values, $input );\n\t\t}\n\t}", "public function input($ref, $params = null) {\n if($this->Fields[$ref]) {\n //atributo principal\n $i['name'] = $ref;\n $i['id'] = strtolower(get_called_class().\"-\".$ref);\n \n //atributos setados sem a necessidade de tratamento ex.: id=\"id\"\n $commonAttrs = \"autocomplete|checked|class|disabled|id|name|maxlength|placeholder|size|style|type|value\";\n $validateAttrs = \"required|email|integer|onlyLetterNumber\";\n\n //verifica quais atributos ja foram setados anteriormente na classe\n foreach (explode(\"|\", $commonAttrs) as $attr) {\n if(isset($this->Fields[$ref][$attr])) $i[$attr] = $this->Fields[$ref][$attr];\n }\n \n //processa os campos de validacao passados pela classe\n foreach (explode(\"|\", $validateAttrs) as $attr) {\n if(isset($this->Fields[$ref][$attr])) $v[$attr] = $this->Fields[$ref][$attr];\n if($this->Fields[$ref][$attr] === true) $v[$attr] = true;\n }\n \n // se FormMode == \"add\" e houverem dados no $_POST do navegador, printa os dados no value do input\n // isso evita que o usuario tenha de redigitar todos os dados em caso de erro ao processar o formulario\n // semelhante como os formularios ja estao preenchidos ao disparar o evento javascript:history.back();\n // do navegador\n if($this->FormMode === \"add\" && !is_null($_POST[$ref])) $i['value'] = $_POST[$ref];\n \n // se FormMode == \"edit\" e houverem dados no objeto da class, printa os dados no value do input\n if($this->FormMode === \"edit\" && !is_null($this->$ref)) $i['value'] = $this->$ref;\n\n //processa todos os paramentos passados pela funcao\n if(is_array($params)) {\n foreach($params as $attr => $value) {\n if(preg_match(\"/^($commonAttrs)/i\", $attr)) {\n //atributos globais\n $i[$attr] = $value;\n } else\n if(preg_match(\"/^($validateAttrs)/i\", $attr)) {\n //atributos para validacao\n if($value === true) {\n $v[$attr] = true;\n } else {\n unset($v[$attr]);\n }\n } else {\n //atributos de html5 data-* sao passados diretamente\n if(preg_match(\"/^data-/i\", $attr)) $i[$attr] = $value;\n }\n }\n }\n\n //Se $v[$attr] => true transforma para class=\"validate[$attr]\"; sera validado com js posteriormente\n if(is_array($v) && count($v) > 0) {\n $i['class'] .= \" validate[\";\n $first = true;\n foreach($v as $attr => $val) {\n if($first === false) $i['class'] .= \",\";\n switch ($attr) {\n case \"email\":\n $i['class'] .= \"custom[email]\";\n break;\n case \"onlyLetterNumber\":\n $i['class'] .= \"custom[onlyLetterNumber]\";\n break;\n default:\n $i['class'] .= $attr;\n break;\n }\n $first = false;\n }\n $i['class'] .= \"]\";\n }\n\n //Se os campos forem type=radio|checkbox, o formulario seja 'edit' e o valor do campo $this->$ref corresponder, seta checked=\"checked\"\n if($this->FormMode === \"edit\" && ($this->$ref === $i['value'] || $_POST[$ref] == $i['value']) && ($i['type'] === \"radio\" || $i['type'] === \"checkbox\")) $i['checked'] = \"checked\";\n \n if($this->FormMode === \"add\" && ($_POST[$ref] == $i['value']) && ($i['type'] === \"radio\" || $i['type'] === \"checkbox\")) $i['checked'] = \"checked\";\n \n \n // remove os espacos no final e no comeco do atributo classe\n $i['class'] = trim($i['class']);\n \n if(!$i['type']) $i['type'] = \"text\";\n \n //monta o input com parametros mais relevantes primeiro\n if($i['type'] === \"textarea\") {\n $input = '<textarea name=\"'.$i['name'].'\" ';\n\n //remove os parametros relevantes para evitar repeticao\n unset($i['type']);\n unset($i['name']);\n\n //monta o input\n foreach ($i as $attr => $value) {\n if($attr !== \"value\") $input .= $attr.'=\"'.$value.'\" ';\n }\n \n $input .= \">\".$i['value'].\"</textarea>\\n\";\n } else {\n $input = '<input type=\"'.$i['type'].'\" name=\"'.$i['name'].'\" ';\n\n //remove os parametros relevantes para evitar repeticao\n unset($i['type']);\n unset($i['name']);\n\n //monta o input\n foreach ($i as $attr => $value) {\n $input .= $attr.'=\"'.$value.'\" ';\n }\n\n $input .= \" />\\n\";\n }\n \n //FUS-RO-DA!\n echo $input;\n } else {\n echo \"<!-- error input $ref -->\";\n }\n }", "function formValid()\n\t{\n\t\t// Not submitted, so can't be valid.\n\t\tif (!$this->formSubmitted())\n\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t// Empty error list\n\t\t$this->errorList = array();\n\t\t\t\t\t\t\n\t\t// Check each field is valid.\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Elements with lots of selected values, so copy list of values across.\n\t\t\tif ($element->type == 'checkboxlist') \n\t\t\t{\t\n\t\t\t\t// Dynamic function to retrieve all fields that start with the element name\n\t\t\t\t// for multi-item lists.\t\t\t\n\t\t\t\t$filterFunc = create_function('$v', '$filterStr = \"'.$element->name.'_\"; return (substr($v, 0, strlen($filterStr)) == $filterStr);');\n\t\t\t\t\n\t\t\t\t// Extract all values for this multi-item list.\n\t\t\t\t$itemList = array_filter(array_keys($_POST), $filterFunc);\n\t\t\t\t\n\t\t\t\t// If we've got some values, extract just the values of the list\t\t\t\t\n\t\t\t\tif (count($itemList) > 0) \n\t\t\t\t{\n\t\t\t\t\t$element->value = array();\n\t\t\t\t\t$regexp = sprintf('/%s_(.*)/', $element->name);\n\t\t\t\t\t\n\t\t\t\t\tforeach ($itemList as $fieldname)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Extract the actual field name from the list, and then assign it \n\t\t\t\t\t\t// to the internal list of values for this particular multi-item field.\n\t\t\t\t\t\tif (preg_match($regexp, $fieldname, $matches)) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Proper value is still held in $_POST, so retrieve it using\n\t\t\t\t\t\t\t// full name of field (field name plus sub-item name)\n\t\t\t\t\t\t\t$element->value[$matches[1]] = $this->getArrayValue($_POST, $fieldname); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Merged elements, so extract each of their values\n\t\t\telse if ($element->type == 'merged') \n\t\t\t{\n\t\t\t\t$mergedValueList = array();\n\t\t\t\tif (!empty($element->subElementList))\n\t\t\t\t{\n\t\t\t\t\tforeach ($element->subElementList as $subElem)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Extract the value from the POST array, and add to array for this element\n\t\t\t\t\t\t$mergedValueList[$subElem->name] = $this->getArrayValue($_POST, $subElem->name);\n\t\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\t$element->setValue($mergedValueList);\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Single value element - just copy standard post value\n\t\t\telse {\n\t\t\t\tif (isset($_POST[$element->name])) {\n\t\t\t\t\t$element->value = $this->getArrayValue($_POST, $element->name);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Validate the element\n\t\t\tif (!$element->isValid())\n\t\t\t{\n\t\t\t\t// Add error to internal list of errors for this form.\n\t\t\t\t$this->errorList[] = $element->getErrorMessage();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If we have errors, clearly the form is not valid\n\t\treturn (count($this->errorList) == 0); \n\t}", "function pickup_submit()\n\t{\n\t\t$name = '_f_'.$this->name;\n\t\t$this->value = $GLOBALS[$name];\n\t}", "public static function processWebformVariant(&$element, FormStateInterface $form_state, &$complete_form) {\n $form_object = $form_state->getFormObject();\n if ($element['#value']) {\n $element['#children'] = $element['#value'];\n if ($form_object instanceof WebformSubmissionForm) {\n // Display variant label.\n /** @var \\Drupal\\webform\\WebformInterface $webform */\n $webform = $form_object->getWebform();\n if ($webform->hasVariant($element['#value'])) {\n $variant_plugin = $webform->getVariant($element['#value']);\n $element['#children'] = $variant_plugin->label();\n }\n }\n }\n return $element;\n }", "function process($data, $form) {\n\t\t// submitted form object\n\t\t$submittedForm = new SubmittedForm();\n\t\t$submittedForm->SubmittedByID = ($id = Member::currentUserID()) ? $id : 0;\n\t\t$submittedForm->ParentID = $this->ID;\n\t\t$submittedForm->Recipient = $this->EmailTo;\n\t\tif(!$this->DisableSaveSubmissions) $submittedForm->write();\n\t\t\n\t\t// email values\n\t\t$values = array();\n\t\t$recipientAddresses = array();\n\t\t$sendCopy = false;\n $attachments = array();\n\n\t\t$submittedFields = new DataObjectSet();\n\t\t\n\t\tforeach($this->Fields() as $field) {\n\t\t\t// don't show fields that shouldn't be shown\n\t\t\tif(!$field->showInReports()) continue;\n\t\t\t\n\t\t\t$submittedField = $field->getSubmittedFormField();\n\t\t\t$submittedField->ParentID = $submittedForm->ID;\n\t\t\t$submittedField->Name = $field->Name;\n\t\t\t$submittedField->Title = $field->Title;\n\t\t\t\t\t\n\t\t\tif($field->hasMethod('getValueFromData')) {\n\t\t\t\t$submittedField->Value = $field->getValueFromData($data);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(isset($data[$field->Name])) $submittedField->Value = $data[$field->Name];\n\t\t\t}\n\n\t\t\tif(!empty($data[$field->Name])){\n\t\t\t\tif(in_array(\"EditableFileField\", $field->getClassAncestry())) {\n\t\t\t\t\tif(isset($_FILES[$field->Name])) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// create the file from post data\n\t\t\t\t\t\t$upload = new Upload();\n\t\t\t\t\t\t$file = new File();\n\t\t\t\t\t\t$upload->loadIntoFile($_FILES[$field->Name], $file);\n\n\t\t\t\t\t\t// write file to form field\n\t\t\t\t\t\t$submittedField->UploadedFileID = $file->ID;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Attach the file if its less than 1MB, provide a link if its over.\n\t\t\t\t\t\tif($file->getAbsoluteSize() < 1024*1024*1){\n\t\t\t\t\t\t\t$attachments[] = $file;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!$this->DisableSaveSubmissions) $submittedField->write();\n\t\t\t\n\t\t\t$submittedFields->push($submittedField);\n\t\t}\t\n\t\t$emailData = array(\n\t\t\t\"Sender\" => Member::currentUser(),\n\t\t\t\"Fields\" => $submittedFields\n\t\t);\n\n\t\t// email users on submit. All have their own custom options. \n\t\tif($this->EmailRecipients()) {\n\t\t\t$email = new UserDefinedForm_SubmittedFormEmail($submittedFields); \n\t\t\t$email->populateTemplate($emailData);\n\t\t\tif($attachments){\n\t\t\t\tforeach($attachments as $file){\n\t\t\t\t\t// bug with double decorated fields, valid ones should have an ID.\n\t\t\t\t\tif($file->ID != 0) {\n\t\t\t\t\t\t$email->attachFile($file->Filename,$file->Filename, $file->getFileType());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach($this->EmailRecipients() as $recipient) {\n\t\t\t\t$email->populateTemplate($recipient);\n\t\t\t\t$email->populateTemplate($emailData);\n\t\t\t\t$email->setFrom($recipient->EmailFrom);\n\t\t\t\t$email->setBody($recipient->EmailBody);\n\t\t\t\t$email->setSubject($recipient->EmailSubject);\n\t\t\t\t$email->setTo($recipient->EmailAddress);\n\t\t\t\t\n\t\t\t\t// check to see if they are a dynamic sender. eg based on a email field a user selected\n\t\t\t\tif($recipient->SendEmailFromField()) {\n\t\t\t\t\t$submittedFormField = $submittedFields->find('Name', $recipient->SendEmailFromField()->Name);\n\t\t\t\t\tif($submittedFormField) {\n\t\t\t\t\t\t$email->setFrom($submittedFormField->Value);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// check to see if they are a dynamic reciever eg based on a dropdown field a user selected\n\t\t\t\tif($recipient->SendEmailToField()) {\n\t\t\t\t\t$submittedFormField = $submittedFields->find('Name', $recipient->SendEmailToField()->Name);\n\t\t\t\t\t\n\t\t\t\t\tif($submittedFormField) {\n\t\t\t\t\t\t$email->setTo($submittedFormField->Value);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($recipient->SendPlain) {\n\t\t\t\t\t$body = strip_tags($recipient->EmailBody) . \"\\n \";\n\t\t\t\t\tif(isset($emailData['Fields']) && !$recipient->HideFormData) {\n\t\t\t\t\t\tforeach($emailData['Fields'] as $Field) {\n\t\t\t\t\t\t\t$body .= $Field->Title .' - '. $Field->Value .' \\n';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$email->setBody($body);\n\t\t\t\t\t$email->sendPlain();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$email->send();\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn Director::redirect($this->Link() . 'finished?referrer=' . urlencode($data['Referrer']));\n\t}", "function onQuickFormEvent($event, $arg, &$caller)\n {\n switch ($event) {\n case 'createElement':\n $caller->setType($arg[0], PARAM_TAGLIST);\n break;\n }\n return parent::onQuickFormEvent($event, $arg, $caller);\n }", "protected function addFormObjectNameToViewHelperVariableContainer() {}", "function NormalizeFormVars()\r\n {\r\n //the element means false. Explicitely setting this false here\r\n //to help in later form value processing\r\n $arr_elements = \r\n $this->config->element_info->GetElements($this->GetCurrentPageNum());\r\n \r\n foreach($arr_elements as $ename => $e)\r\n {\r\n $preparsed_var = $this->config->GetPreParsedVar($ename);\r\n if(isset($this->formvars[$preparsed_var]))\r\n {\r\n $disp_var = $this->config->GetDispVar($ename);\r\n $this->formvars[$disp_var] = $this->formvars[$ename];\r\n $this->formvars[$ename] = $this->formvars[$preparsed_var];\r\n }\r\n if(isset($this->formvars[$ename])){continue;}\r\n \r\n switch($e['type'])\r\n {\r\n case 'single_chk':\r\n {\r\n $this->formvars[$ename] = false;\r\n break;\r\n }\r\n case 'chk_group':\r\n case 'multiselect':\r\n {\r\n $this->formvars[$ename] = array();\r\n break;\r\n }\r\n default:\r\n {\r\n $this->formvars[$ename]='';\r\n }\r\n }\r\n }\r\n }", "public function processForm( Form $form )\n\t{\n\t\t$button = $form->isSubmitted();\n\t\tif ( $button ) {\n\t\t\t$submit = $button->getName();\n\t\t\t$data = $form->getValues( TRUE );\n\n\t\t\tif ( $submit == 'setFilter' || $submit == 'resetFilter' ) $this->setFilter( $submit, $data[ 'filter' ] );\n\t\t\tif ( $submit == 'saveRecord' || $submit == 'cancelRecord' ) $this->saveRecord( $submit, $data[ 'edit' ] );\n\t\t}\n\t}", "private function _getInputFieldNClassObject($element)\r\n {\r\n $array = array();\r\n $array = explode('/', $element);\r\n if(count($array) > 1)\r\n $array = array('object' => $array[0], 'input' => $array[1]);\r\n else\r\n $array = array('input' => $array[0]); \r\n return $array;\r\n }", "public function form( &$form )\n\t{\n\t}", "abstract protected function fieldValidation($submittedData);", "public function afterSubmit() {\n\t\t$this->setValue($this->serializeData($this->getValue()));\n\t}", "function dumpFormItems()\r\n {\r\n // Overriden to avoid printing a hidden field to get the value of the component.\r\n }", "function parseSubmit($data) {\n\tglobal $results;\n\tglobal $recordAdds;\n\tforeach ($data as $name=>$value) {\n\t\t$nameData = explode(\",\",$name);\n\t\tswitch ($nameData[0]) {\n\t\t\tcase 'update': //DBID, RID, FID, ORIGINAL VALUE\n\t\t\t\tif (is_array($value)) { $value = implode('',$value); }\n\t\t\t\t$results[] = qbUpdate($nameData[1], $nameData[2], $nameData[3], $value);\n\t\t\t\tbreak;\n\t\t\tcase 'add': //(1)DBID, (2)NEW_RECORD_TEMP_ID, (3)FID FOR FIELD VALUE, key=value for related record\n\t\t\t\tif (isset($value) && !empty($value)) {\n\t\t\t\t\tif (is_array($value)) { $value = implode('',$value); }\n\t\t\t\t\t$recordAdds[$nameData[2]]['dbid'] = $nameData[1];\n\t\t\t\t\t$recordAdds[$nameData[2]][$nameData[3]] = $value;\n\t\t\t\t\t//$recordAdds = parseAssoc($recordAdds, $nameData[2], $nameData[4]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'addSelect': //add based on Select:Option, information in the option value\n\t\t\t\tif (!empty($value)) {\n\t\t\t\t\t$values = explode(\",\",$value); //(0)DBID, (1)NEW_RECORD_TEMP_ID, (2)Associations\n\t\t\t\t\t$recordAdds[$values[1]]['dbid'] = $values[0];\n\t\t\t\t\t//$recordAdds = parseAssoc($recordAdds, $values[1], $values[2]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n}", "function processForm(){\n /*Admin page content goes here */\n if( isset($_POST['rssMultiUpdate']) ){\n require \"classes/RssUpdateSingle.php\";\n \n $RssUpdateSingle = new RssUpdateSingle;\n $RssUpdateSingle->updateBlog();\n }\n }", "public function postProcess() {\n\t\t//\t\t$this->setSubmittedValue(strtoupper($this->getSubmittedValue()));\n\t}", "public function beforeHtml() {\n $form_name = $this->getAttribute('id');\n\n if ($this->getAttribute('method') == 'post') {\n\n $uni = session::getInstance()->createToken($form_name);\n\n $this->addHidden('token')->setValue($uni)->setId('token_' . $form_name);\n $this->addHidden('token_name')->setId('token_name' . $form_name)->setValue($form_name);\n }\n\n $classe = 'form';\n\n if ($this->getAttribute('class'))\n $classe = $this->getAttribute('class') . ' ' . $classe;\n\n $this->setAttribute('class',$classe);\n\n\t\treturn parent::beforeHtml(array(), 'form_' . $form_name);\n //return $this->processElementsWrap();\n\n\n //Old process code!!\n\n $hidden = array();\n\n $wrap_class = 'form_output_handler_' . $this->_wrapper;\n $wrapper = new $wrap_class($form_name);\n\n foreach ($this->_elements as $element) {\n if (!is_object($element))\n $wrapper->wrap($element,true);\n else {\n switch ($element->type) {\n case 'hidden':\n if ($element->getAttribute('name') == 'MAX_FILE_SIZE')\n $wrapper->wrap($element,true);\n else\n $hidden[] = $element->html();\n break;\n case 'submit':\n case 'reset':\n $wrapper->wrapSubmit($element);\n break;\n default:\n $wrapper->wrap($element);\n }\n }\n }\n\n return array(\n 'elements' => $wrapper->output($form_name) .\n implode(\"\\n\",$hidden)\n );\n }", "public function validate(array $element, array &$form_state, \\PaymentMethod $method) {\n $cd = drupal_array_get_nested_value($form_state['values'], $element['#parents']);\n $method->controller_data = $cd;\n }", "public function populateFromDOMNode(\\DOMElement $formNode) {\r\n foreach (array('name', 'id', 'class', 'action', 'enctype') as $attr) {\r\n $this->$attr = $formNode->hasAttribute($attr) ? $formNode->getAttribute($attr) : null;\r\n }\r\n $this->method = strtolower($formNode->getAttribute('method'));\r\n\r\n foreach ($this->search('.//input', $formNode) as $input) {\r\n $n = $this->getAttribute($input, 'name');\r\n //if ($n == '') continue;\r\n $v = $this->getAttribute($input, 'value');\r\n $typeAttr = $this->getAttribute($input, 'type');\r\n $type = ($typeAttr == null || $typeAttr == 'input') ? 'text' :\r\n preg_replace('/[^a-z]/', '', strtolower($this->getAttribute($input, 'type')));\r\n if (!in_array($type, self::supportedInputTypes())) {\r\n $this->warn(\"Found input field with unrecognized type, '$type'\");\r\n }\r\n if ($type == 'radio') {\r\n $value = $v === null ? \"on\" : $v; # Default value of \"on\" is used by web browsers\r\n if (empty($this->fields[$n])) {\r\n $field = $this->addField($n, new HtmlRadioButtonField());\r\n }\r\n $field->options[$value] = $value;\r\n $subField = new HtmlFormField(null, $value, $input);\r\n $field->optionLabels[$value] = $this->getLabel(null, $subField);\r\n $field->textAfter[$value] = $input->nextSibling ?\r\n trim($this->normalizeSpace($input->nextSibling->textContent)) : null;\r\n if ($this->getAttribute($input, 'checked')) {\r\n $field->value = $value;\r\n }\r\n $field->xmlNode = $input;\r\n } else if ($type == 'checkbox') {\r\n if ($v === null) $v = 'on'; // Default value of \"on\" is used by web browsers\r\n $isChecked = $this->getAttribute($input, 'checked') ? true : false;\r\n $this->addField($n, new HtmlCheckboxField($isChecked, $v, $input));\r\n } else if ($type == 'submit') {\r\n $field = $this->addField($n, new HtmlButtonField('submit', $v, $input));\r\n $field->buttonText = $v;\r\n } else if ($type == 'image') {\r\n $field = $this->addField($n, new HtmlButtonField('image', $v, $input));\r\n $field->buttonText = null;\r\n } else if ($type == 'button') {\r\n // XXX: How should <input type=\"button\" ... /> fields be dealt with ???\r\n } else {\r\n $this->addField($n, new HtmlTextField($type, $v === null ? '' : $v, $input));\r\n }\r\n }\r\n\r\n foreach ($this->search('.//select', $formNode) as $select) {\r\n $name = $select->getAttribute('name');\r\n if ($name == '') continue;\r\n $options = array();\r\n $defaultValue = null;\r\n foreach ($this->search('.//option', $select) as $option) {\r\n $innerContent = trim($this->normalizeSpace($option->textContent));\r\n $thisOptionValue = $this->getAttribute($option, 'value');\r\n if ($thisOptionValue === null) { $thisOptionValue = $innerContent; }\r\n if ($option->getAttribute('selected')) {\r\n $defaultValue = $thisOptionValue;\r\n } else if ($defaultValue === null) {\r\n $defaultValue = $thisOptionValue;\r\n }\r\n $options[$thisOptionValue] = $innerContent;\r\n }\r\n //if ($defaultValue === null) { $defaultValue = keys($options)[0]; }\r\n $this->addField($name, new HtmlSelectField($options, $defaultValue, $select));\r\n //$this->fields[$name]->xmlNode = $select;\r\n }\r\n\r\n foreach ($this->search('.//textarea', $formNode) as $textarea) {\r\n $name = $textarea->getAttribute('name');\r\n if ($name == '') continue;\r\n $this->addField($name, new HtmlFormField('textarea', $textarea->textContent, $textarea));\r\n //$this->fields[$name]->xmlNode = $textarea;\r\n }\r\n\r\n foreach ($this->search('.//button', $formNode) as $button) {\r\n $n = $this->getAttribute($button, 'name');\r\n //if ($n == '') continue;\r\n $v = $this->getAttribute($button, 'value');\r\n $t = $this->getAttribute($button, 'type');\r\n $type = $t ? $t : 'submit';\r\n $f = new HtmlButtonField($type, $v, $button);\r\n $f->buttonText = $button->textContent;\r\n $this->addField($n, $f);\r\n }\r\n\r\n foreach ($this->fields as $n => $f) {\r\n $this->fields[$n]->label = $this->getLabel($n, $f);\r\n }\r\n }", "public abstract function validateFormInput($FORM_array);", "function cleanseInput(&$data)\r\n{\r\n if (is_array($data))\r\n {\r\n foreach ($data as &$subItem)\r\n {\r\n $subItem = cleanseInput($subItem);\r\n }\r\n }\r\n \r\n else\r\n { \r\n $data = trim($data, \"';#\");\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n }\r\n \r\n return $data;\r\n}", "function onQuickFormEvent($event, $arg, &$caller)\n {\n switch ($event) {\n case 'updateValue':\n // constant values override both default and submitted ones\n // default values are overriden by submitted\n $value = $this->_findValue($caller->_constantValues);\n if (null === $value) {\n $value = $this->_findValue($caller->_submitValues);\n if (null === $value) {\n $value = $this->_findValue($caller->_defaultValues);\n }\n }\n if (!is_array($value)) {\n $value = array('value' => $value);\n }\n if (null !== $value) {\n $this->setValue($value);\n }\n return true;\n break;\n }\n return parent::onQuickFormEvent($event, $arg, $caller);\n\n }", "abstract protected function getFormTypeParams();", "function dirtag_cms_form_action (&$this, $args)\n{\n $ui =& $app->ui;\n\n return $ui->url (new event ('form_parser'));\n}", "public function ParsePostData() {\n\t\t\tif (array_key_exists($this->strControlId, $_POST)) {\n //$this->blnModified = true;\n\t\t\t\t// It was -- update this Control's value with the new value passed in via the POST arguments\n\t\t\t\t$strValue = $_POST[$this->strControlId];\n\n foreach($this->arrListItems as $objListItem){\n if($objListItem->Value == $strValue){\n $objListItem->Selected = true;\n }else{\n $objListItem->Selected = false;\n }\n }\n }\n }", "public function run()\n {\n $langPrefix = '';\n if( isset( $this->elements[ 'prefix' ] ) )\n {\n $this->langPrefix = $langPrefix = $this->elements[ 'prefix' ];\n unset( $this->elements[ 'prefix' ] );\n }\n\n $typesWName = [\n 'tab',\n 'header',\n 'sidebar',\n 'helper',\n 'dummy',\n 'matrix',\n 'hidden',\n ];\n\n foreach( $this->elements as $el )\n {\n if( !is_array( $el ) or !count( $el ) )\n {\n continue;\n }\n\n if( isset( $el[ 'type' ] ) )\n {\n $type = $el[ 'type' ];\n }\n else\n {\n $type = 'helper';\n }\n\n if( in_array( $type, $typesWName ) )\n {\n if( isset( $el[ 'name' ] ) )\n {\n $name = $langPrefix . $el[ 'name' ];\n }\n else\n {\n throw new \\InvalidArgumentException( var_dump( $el ) );\n }\n }\n\n $this->setExtra( $el );\n\n switch( $type )\n {\n case 'tab':\n $this->form->addTab( $langPrefix . $name . '_tab' );\n break;\n case 'header':\n $this->form->addHeader( $langPrefix . $name . '_header' );\n break;\n case 'sidebar':\n if( \\IPS\\Member::loggedIn()->language()->checkKeyExists( $name ) )\n {\n $element = \\IPS\\Member::loggedIn()->language()->addToStack( $name );\n }\n\n $this->form->addSidebar( $element );\n break;\n case 'separator':\n $this->form->addSeparator();\n break;\n case 'message':\n if( isset( $el[ 'msg' ] ) )\n {\n $lang = $el[ 'msg' ];\n }\n else\n {\n throw new \\InvalidArgumentException;\n }\n\n $css = '';\n if( isset( $el[ 'css' ] ) )\n {\n $css = $el[ 'css' ];\n }\n\n $parse = true;\n if( isset( $el[ 'parse' ] ) )\n {\n $parse = $el[ 'parse' ] ? true : false;\n }\n\n $id = null;\n if( isset( $el[ 'id' ] ) )\n {\n $id = $el[ 'id' ];\n }\n\n $this->form->addMessage( $lang, $css, $parse, $id );\n break;\n case 'helper':\n if( !isset( $el[ 'customClass' ] ) )\n {\n if( isset( $el[ 'class' ] ) )\n {\n $class = $el[ 'class' ];\n\n if( isset( $this->classMap[ $class ] ) )\n {\n $class = $this->classMap[ $class ];\n }\n\n $class = '\\\\IPS\\\\Helpers\\\\Form\\\\' . $class;\n }\n else\n {\n $class = '\\\\IPS\\\\Helpers\\\\Form\\\\Text';\n }\n }\n else\n {\n $class = $el[ 'customClass' ];\n }\n\n if( !class_exists( $class, true ) )\n {\n throw new \\InvalidArgumentException( json_encode( $el ) );\n }\n $default = null;\n\n if( is_object( $this->obj ) )\n {\n $obj = $this->obj;\n $prop = $el[ 'name' ];\n if( $obj->{$prop} )\n {\n $default = $obj->{$prop};\n }\n else\n {\n $prop = $langPrefix . $prop;\n if( $obj->{$prop} )\n {\n $default = $obj->{$prop};\n }\n }\n\n if( $default == null )\n {\n if( isset( $el[ 'default' ] ) or isset( $el[ 'def' ] ) )\n {\n $default = isset( $el[ 'default' ] ) ? $el[ 'default' ] : $el[ 'def' ];\n }\n }\n }\n else\n {\n if( isset( $el[ 'default' ] ) or isset( $el[ 'def' ] ) )\n {\n $default = isset( $el[ 'default' ] ) ? $el[ 'default' ] : $el[ 'def' ];\n }\n }\n\n $required = false;\n if( isset( $el[ 'required' ] ) )\n {\n $required = $el[ 'required' ];\n }\n\n $options = [];\n if( isset( $el[ 'options' ] ) )\n {\n $options = $el[ 'options' ];\n }\n else if( isset( $el[ 'ops' ] ) )\n {\n $options = $el[ 'ops' ];\n }\n\n if( \\is_array( $options ) and \\count( $options ) )\n {\n if( isset( $options[ 'toggles' ] ) )\n {\n foreach( $options[ 'toggles' ] as $key => $val )\n {\n foreach( $val as $k => $v )\n {\n $options[ 'toggles' ][ $key ][ $k ] = 'js_' . $langPrefix . $v;\n }\n }\n }\n\n if( isset( $options[ 'togglesOn' ] ) )\n {\n foreach( $options[ 'togglesOn' ] as $key => $val )\n {\n $options[ 'togglesOn' ][] = 'js_' . $langPrefix . $val;\n }\n }\n\n if( isset( $options[ 'togglesOff' ] ) )\n {\n foreach( $options[ 'togglesOff' ] as $key => $val )\n {\n $options[ 'togglesOff' ][] = 'js_' . $langPrefix . $val;\n }\n }\n }\n\n $validation = null;\n if( isset( $el[ 'validation' ] ) )\n {\n $validation = $el[ 'validation' ];\n }\n else if( isset( $el[ 'v' ] ) )\n {\n $validation = $el[ 'v' ];\n }\n\n $prefix = null;\n if( isset( $el[ 'prefix' ] ) )\n {\n $prefix = $el[ 'prefix' ];\n }\n\n $suffix = null;\n if( isset( $el[ 'suffix' ] ) )\n {\n $suffix = $el[ 'suffix' ];\n }\n\n $id = null;\n if( isset( $el[ 'id' ] ) )\n {\n $id = $el[ 'id' ];\n }\n else\n {\n if( !isset( $el[ 'skip_id' ] ) )\n {\n $id = \"js_\" . $name;\n }\n }\n\n $element = new $class( $name, $default, $required, $options, $validation, $prefix, $suffix, $id );\n\n if( isset( $el[ 'appearRequired' ] ) or isset( $el[ 'ap' ] ) )\n {\n $element->appearRequired = true;\n }\n\n if( isset( $el[ 'label' ] ) )\n {\n $element->label = $el[ 'label' ];\n }\n\n if( isset( $el[ 'description' ] ) )\n {\n $desc = $el[ 'description' ];\n if( \\IPS\\Member::loggedIn()->language()->checkKeyExists( $desc ) )\n {\n if( isset( $el[ 'desc_sprintf' ] ) )\n {\n $sprintf = $el[ 'desc_sprintf' ];\n if( !is_array( $sprintf ) )\n {\n $sprintf = [ $sprintf ];\n }\n $desc = \\IPS\\Member::loggedIn()\n ->language()\n ->addToStack( $desc, false, [ 'sprintf' => $sprintf ] );\n }\n else\n {\n $desc = \\IPS\\Member::loggedIn()->language()->addToStack( $desc );\n }\n }\n\n \\IPS\\Member::loggedIn()->language()->words[ $name . '_desc' ] = $desc;\n }\n\n $tab = null;\n $after = null;\n\n if( isset( $el[ 'tab' ] ) )\n {\n $tab = $langPrefix . $el[ 'tab' ] . '_tab';\n }\n\n if( isset( $el[ 'after' ] ) )\n {\n $after = $langPrefix . $el[ 'after' ];\n }\n\n $this->form->add( $element, $after, $tab );\n break;\n case 'dummy':\n $default = null;\n if( isset( $el[ 'default' ] ) )\n {\n $default = $el[ 'default' ];\n }\n\n $desc = '';\n if( isset( $el[ 'desc' ] ) )\n {\n if( \\IPS\\Member::loggedIn()->language()->checkKeyExists( $el[ 'desc' ] ) )\n {\n $desc = \\IPS\\Member::loggedIn()->language()->addToStack( $el[ 'desc' ] );\n }\n else\n {\n $desc = $el[ 'desc' ];\n }\n }\n\n $warning = '';\n\n if( isset( $el[ 'warning' ] ) )\n {\n if( \\IPS\\Member::loggedIn()->language()->checkKeyExists( $el[ 'warning' ] ) )\n {\n $warning = \\IPS\\Member::loggedIn()->language()->addToStack( $el[ 'warning' ] );\n }\n else\n {\n $warning = $el[ 'warning' ];\n }\n }\n\n if( isset( $el[ 'id' ] ) )\n {\n $id = $el[ 'id' ];\n }\n else\n {\n $id = $name . \"_js\";\n }\n\n $this->form->addDummy( $name, $default, $desc, $warning, $id );\n break;\n case 'html':\n if( !isset( $el[ 'html' ] ) )\n {\n throw new \\InvalidArgumentException;\n }\n $this->form->addHtml( $el[ 'html' ] );\n break;\n case 'matrix':\n if( isset( $el[ 'matrix' ] ) )\n {\n if( !( $el[ 'matrix' ] instanceof \\IPS\\Helpers\\Form\\Matrix ) )\n {\n throw new \\InvalidArgumentException;\n }\n }\n\n $this->form->addMatrix( $name, $el[ 'matrix' ] );\n break;\n case 'hidden':\n $this->form->hiddenValues[ $name ] = $el[ 'default' ];\n break;\n }\n }\n\n return $this->form;\n }", "function AjaxForm ( $object )\r\n \t{\r\n \t\t$this->form_id = uniqid();\r\n \t\tif ( is_subclass_of($object, 'StoredObjectDB') )\r\n \t\t{\r\n \t\t\t$this->object = $object;\r\n \t\t\t$this->action = CO_ACTION_CREATE;\r\n \t\t}\r\n \t\telseif ( is_subclass_of($object, 'IteratorBase') )\r\n \t\t{\r\n \t\t\t$this->object_it = $object;\r\n \t\t\t$this->object = $this->object_it->object;\r\n \t\t\t$this->action = CO_ACTION_MODIFY;\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\t$this->action = CO_ACTION_CREATE;\r\n \t\t} \t\t\t\r\n \t\t\r\n \t\t$this->setRedirectUrl( SanitizeUrl::parseSystemUrl($_REQUEST['redirect']) );\r\n \t}", "function we_parse_tag_checkForm($attribs, $content, array $arr){\n\tif(($foo = attributFehltError($arr, array('match' => false, 'type' => false), __FUNCTION__))){\n\t\treturn $foo;\n\t}\n\n\treturn '<?php ob_start();?>' . $content . '<?php printElement(' . we_tag_tagParser::printTag('checkForm', $attribs, 'ob_get_clean()', false, true) . '); ?>';\n}", "protected function processSpecialInputFields(MortarFormInput $input)\n\t{\n\n\t}", "function populate() {\n // @todo We inject client input directly into the form. What about\n // security issues?\n if (isset($this->form->request['raw_input'][$this->attributes['name']])) {\n // Disabled input elements do not accept new input.\n if (!$this->disabled) {\n $this->value = $this->form->request['raw_input'][$this->attributes['name']];\n }\n }\n }", "public function fillForm(array $data, SimpleElement $element = null)\n {\n $mapping = $this->dataMapping($data);\n $this->_fill($mapping, $element);\n }", "public function generate_form_field( $element, $instance ) {\n\n\t\t//process generic items here\n\t\t$classes = ( isset( $element['classes'] ) && ! empty( $element['classes'] ) ) ? $element['classes'] : '';\n\n\t\tob_start();\n\t\tswitch ( $element['type'] ) {\n\t\t\tcase 'text':\n\t\t\t\t$value = isset( $instance[ $element['name'] ] ) ? $instance[ $element['name'] ] : '';\n\t\t\t\t?>\n\t\t\t\t<input type=\"text\"\n\t\t\t\t class=\"widefat <?php echo esc_attr( $classes );?>\"\n\t\t\t\t id=\"<?php echo esc_attr( $this->get_field_id( $element['name'] ) ); ?>\"\n\t\t\t\t name=\"<?php echo esc_attr( $this->get_field_name( $element['name'] ) ); ?>\"\n\t\t\t\t value=\"<?php echo esc_attr( $value ) ?>\" />\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\t\tcase 'textarea':\n\t\t\t\t$value = isset( $instance[ $element['name'] ] ) ? $instance[ $element['name'] ] : '';\n\t\t\t\t?><br/>\n\t\t\t\t<textarea\n\t\t\t\t\tclass=\"widefat <?php echo esc_attr( $classes );?>\"\n\t\t\t\t\trows=\"16\"\n\t\t\t\t\tcols=\"20\"\n\t\t\t\t\tid=\"<?php echo esc_attr( $this->get_field_id( $element['name'] ) ); ?>\"\n\t\t\t\t\tname=\"<?php echo esc_attr( $this->get_field_name( $element['name'] ) ); ?>\"><?php echo esc_textarea( $value ); ?></textarea>\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\t\tcase 'checkbox':\n\t\t\t\t$value = isset( $instance[ $element['name'] ] ) ? (bool) $instance[ $element['name'] ] : false;\n\t\t\t\t?>\n\t\t\t\t<input type=\"checkbox\"\n\t\t\t\t class=\"checkbox <?php echo esc_attr( $classes );?>\"\n\t\t\t\t id=\"<?php echo esc_attr( $this->get_field_id( $element['name'] ) ); ?>\"\n\t\t\t\t name=\"<?php echo esc_attr( $this->get_field_name( $element['name'] ) ); ?>\"\n\t\t\t\t\t<?php checked( $value ); ?> />\n\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\t\tcase 'select':\n\t\t\t\tif ( isset( $element['options'] ) && is_array( $element['options'] ) ) :\n\t\t\t\t\t$saved_value = isset( $instance[ $element['name'] ] ) ? $instance[ $element['name'] ] : '';\n\t\t\t\t\t?>\n\t\t\t\t\t<select\n\t\t\t\t\t\tclass=\"widefat <?php echo esc_attr( $classes );?>\"\n\t\t\t\t\t\tname=\"<?php echo esc_attr( $this->get_field_name( $element['name'] ) ); ?>\"\n\t\t\t\t\t\tid=\"<?php echo esc_attr( $this->get_field_id( $element['name'] ) ); ?>\">\n\t\t\t\t\t\t<?php foreach ( $element['options'] as $value => $name ) : ?>\n\t\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $value );?>\"<?php selected( $saved_value , $value ); ?>><?php echo esc_html( $name ) ?></option>\n\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t</select>\n\t\t\t\t<?php endif;\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\treturn ob_get_clean();\n\t}", "protected function removeFormObjectFromViewHelperVariableContainer() {}", "function AjaxSetForm(&$objResponse)\n\t\t{\n\t\t\t// Kiem tra neu khong dung class thi bo qua\n\t\t\t$sClassName = strtolower(get_class($objResponse));\n\t\t\tif( $sClassName != 'xajaxresponse')\n\t\t\t{\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t\t// Ham gan gia tri cho cac o nhap trong form, du lieu lay tu database\n\t\t\t$arrFields = $this->getAttributeNames();\n\t\t\t// Kien sua :: Fix loi khong lay duoc danh sach field\n\t\t\tif(!is_array($arrFields))\n\t\t\t{\n\t\t\t\t$arrFields = array();\n\t\t\t}\n\t\t\tforeach($arrFields as $key=>$value)\n\t\t\t{\n\t\t\t\tif (in_array($value, $this->arrInputFields))\n\t\t\t\t{\n\t\t\t\t\t$sInputName = (isset($this->arrFieldsMap[$value])) ? $this->arrFieldsMap[$value] : $value;\n\t\t\t\t\t$sInputValue = $this->$value;\n\t\t\t\t\t$objResponse->addAssign($sInputName, 'value', $sInputValue);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}", "public static function getForm();", "protected function Form_Run() {}", "public function add($element) {\n $type = strtolower(current(array_reverse(explode(\"\\\\\", get_class($element)))));\n parent::add($element);\n if ($type == \"hidden\")\n $this->_hiddenElements[] = $element;\n else\n $this->_inputElements[] = [$element, $this->_currentFieldset];\n }", "public function getSubmittedValue();", "public function getSubmittedValue();", "public function processPrivateForm($data)\n {\n return;\n }", "function definition_after_data($newmsform) {\n $mform = $newmsform->_form;\n\t\t\n if ($mform->isSubmitted()) {\n $someelem = $mform->getElement('salt');\n $value = $someelem->getValue();\n\t\t\techo $value & 'Hello world';\n // Do whatever checking you need\n //$someelem->setValue($someothervalue);\n // etc.\n // add some new elements...\n }\n\t\n\t}", "function acf_get_form_data($name = '')\n{\n}", "private function processFormData(\\stdClass $data)\n {\n if (property_exists($data, 'workshop') &&\n $data->workshop !== null &&\n !($data->workshop instanceof WorkshopEntity)\n ) {\n $data->workshop = $this->workshopService->getReference(\n is_object($data->workshop) ? $data->workshop->id : $data->workshop\n );\n }\n }", "protected function getWebformElement() {\n $element = $this->getElement();\n return ($element) ? $this->elementManager->getElementInstance($element) : NULL;\n }" ]
[ "0.63590515", "0.58913165", "0.5772871", "0.5769119", "0.57338846", "0.5717434", "0.57105756", "0.56900483", "0.5642878", "0.56369543", "0.56261456", "0.5625934", "0.5571237", "0.5541327", "0.54879814", "0.5478652", "0.5417847", "0.5416506", "0.5415478", "0.5411728", "0.5401296", "0.53961265", "0.53685904", "0.53655255", "0.5321572", "0.53120965", "0.53098595", "0.52910453", "0.5283485", "0.52834326", "0.52760625", "0.52456516", "0.5242683", "0.52164674", "0.5208389", "0.5203607", "0.51764095", "0.5167489", "0.5155605", "0.51122993", "0.51043236", "0.51041585", "0.5102382", "0.5101047", "0.5096497", "0.50903434", "0.5050097", "0.5039395", "0.503342", "0.5029529", "0.50197375", "0.5017211", "0.5017024", "0.5015794", "0.5009754", "0.50024235", "0.5000481", "0.49958405", "0.49904752", "0.49894455", "0.4988255", "0.4985543", "0.49843654", "0.49799335", "0.49741912", "0.49711332", "0.49671817", "0.49559438", "0.4954173", "0.49538174", "0.494248", "0.49412656", "0.49305052", "0.49147552", "0.49141088", "0.490777", "0.4900029", "0.48949543", "0.4888277", "0.48882368", "0.48817316", "0.4878555", "0.48775068", "0.4867907", "0.48656353", "0.48624367", "0.4859708", "0.4855816", "0.48552388", "0.48510262", "0.48414782", "0.48398334", "0.48353437", "0.48290697", "0.48290697", "0.4825449", "0.4823613", "0.4822262", "0.4821663", "0.48174408" ]
0.5677752
8
Start a fieldset in the form
public function start_fieldset($content='', $id='', $class='') { $fs_content = ''; $fs_attrs = array('marker' => 'start'); if (!empty($id)) { $fs_attrs['id'] = $id; } if (!empty($class)) { $fs_attrs['class'] = $class; } if (!empty($content)) { $obj_legend = new GenElement('legend', $this->xml_escape($content)); $fs_content = $obj_legend->render(1); } $fieldset = new GenElement('fieldset', $fs_content, $fs_attrs); array_push($this->form_elements, array($fieldset->render(1), 0, 'fieldset')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fieldset_start($name = '', $extra = [])\n {\n if (is_array($name)) {\n $extra = (array) $extra + $name;\n $name = '';\n }\n $extra['name'] = ($extra['name'] ?? null) ?: $name;\n $func = function ($extra, $r, $form) {\n if ($form->_fieldset_mode_on) {\n $body = '</fieldset>' . PHP_EOL;\n } else {\n $form->_fieldset_mode_on = true;\n }\n $body .= '<fieldset' . _attrs($extra, ['class', 'style', 'id', 'name']) . '>';\n if ($extra['legend']) {\n $body .= PHP_EOL . '<legend>' . _htmlchars(t($extra['legend'])) . '</legend>' . PHP_EOL;\n }\n return $body;\n };\n if ($this->_chained_mode || $extra['chained_mode']) {\n $this->_body[] = ['func' => $func, 'extra' => $extra, 'replace' => $replace, 'name' => __FUNCTION__];\n return $this;\n }\n return $func((array) $extra + (array) $this->_extra, (array) $replace + (array) $this->_replace, $this);\n }", "public function end_fieldset()\n\t{\n\t\t$fs_attrs = array('marker' => 'end');\n\t\t$fieldset = new GenElement('fieldset', '', $fs_attrs);\n\t\tarray_push($this->form_elements, array($fieldset->render(1), 0, 'fieldset'));\n\t}", "public function create_fieldset_start($id, $name, $legend_text='', $addtext='', $addtext_legend='')\n\t{\n\t\t$this->load_form_methods();\n\t\treturn cms_module_CreateFieldsetStart($this, $id, $name, $legend_text, $addtext, $addtext_legend);\n\t}", "public function set_fieldset_tag($tag) {\n\t\t$this->fieldset_tag = $tag;\n\t\t\n\t\treturn $this;\n\t}", "function _field_grouped_fieldset ($fval) {\n\n $res = '';\n $setName = $this->name;\n\n // how many sets to show to begin w/?\n if (!empty($fval) and is_array($fval))\n $numsets = count($fval);\n\t\telse\n\t\t\t$numsets = (isset($this->attribs['numsets']))? $this->attribs['numsets'] : 1;\n\n $hiddens = '';\n $res .= \"<div id=\\\"proto_{$setName}\\\" data-numsets=\\\"{$numsets}\\\" data-setname=\\\"{$setName}\\\" class=\\\"formex_group\\\" style=\\\"display: none; margin:0; padding: 0\\\">\n <fieldset class=\\\"formex_grouped_fieldset {$this->element_class}\\\"><ul>\";\n\t\t\t\t\t\n\n foreach ($this->opts as $name => $parms) {\n\t\t\t$newelem = new formex_field($this->fex, $name, $parms);\n\n\t\t\t$res .= '<li>';\n\t\t\tif ($newelem->type != 'hidden') {\n\t\t\t\t$res .= $this->fex->field_label($newelem);\n\t\t\t\t$res .= $newelem->get_html('');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$hiddens = $newelem->get_html('');\n\t\t\t}\n\t\t\t$res .= '</li>';\n }\n\n $res .= \"</ul>$hiddens</fieldset></div>\";\n\n $labelclass = (!empty($this->attribs['enable_showhide']))? 'enable_showhide' : '';\n\n /* \"+\" and \"-\" controls for adding and removing sets */\n $res .= \"<span id=\\\"fieldsetControl$setName\\\" data-setname=\\\"$setName\\\" class=\\\"controls {$this->element_class}\\\">\";\n\t\t$res .= \"<label class=\\\"$labelclass\\\">{$this->descrip}</label>\";\n\t\t$res .= '<a href=\"#\" class=\"add\">+</a> <a href=\"#\" class=\"sub\">&ndash;</a></span>';\n\n\t\t$res .= \"<script type=\\\"text/javascript\\\">\n\t\t\t\t\t\tvar formex_groupvalues = formex_groupvalues || [];\n\t\t\t\t\t\tformex_groupvalues['{$setName}'] = \".json_encode($fval).\";\n\t\t\t\t</script>\";\n return $res;\n }", "public function addFieldSet($fieldset) {\n\t\t$this->fieldsets[] = $fieldset;\n\t}", "static function openFieldset($legend = null, $attributes = null)\n {\n self::renderOpenTag('fieldset', $attributes);\n if ($legend)\n {\n echo '<legend>' . $legend.'</legend>'.PHP_EOL;\n }\n echo '<ul>';\n }", "public function init()\r\n\t{\r\n\t\t$cssClass = $this->stacked ? 'form-stacked' : '';\r\n\r\n\t\tif (!isset($this->htmlOptions['class']))\r\n\t\t\t$this->htmlOptions['class'] = $cssClass;\r\n\t\telse\r\n\t\t\t$this->htmlOptions['class'] .= ' '.$cssClass;\r\n\r\n\t\tif ($this->errorMessageType === 'inline')\r\n\t\t\t$this->errorMessageCssClass = 'help-inline';\r\n\t\telse\r\n\t\t\t$this->errorMessageCssClass = 'help-block';\r\n\r\n\t\tparent::init();\r\n\t\techo BootHtml::openTag('fieldset');\r\n\r\n\t\tif ($this->legend !== null)\r\n\t\t{\r\n\t\t\techo BootHtml::openTag('legend');\r\n\t\t\techo BootHtml::encode($this->legend);\r\n\t\t\techo BootHtml::closeTag('legend');\r\n\t\t}\r\n\t}", "public function end_fieldset()\n\t{\n\t\tif( $this->has_fieldset )\n\t\t\t$this->buffer.= '</fieldset>';\n\t\t$this->has_fieldset = false;\n\t}", "function set_fieldset( $fieldset_id ){\n\t\t$this->fieldset_id = $fieldset_id;\n\t}", "function BuildStartForm($legend) {\n $fv = new filterVars;\n $phpSelf = $fv->phpSelf(); \n echo \"<fieldset>\";\n echo \"<legend>\";\n echo $this->homeButton(); \n echo \" $legend\"; \n echo \"</legend>\";\n echo \"<form action='$phpSelf?' method='get' enctype='text/plain' target='_parent'>\\n\"; \n }", "function admin_fieldset( $fieldset, $legend = '' )\n{\n\t$eol = \"\\n\";\n\t$html = '<fieldset class=\"admin_fieldset\">'.$eol;\n\n\tif ($legend != '')\n\t{\n\t\t$html .= \"<legend>$legend</legend>$eol\";\n\t}\n\t$html .= $fieldset;\n\n\t$html .= '</fieldset>'.$eol;\n\n\treturn $html;\n}", "public function addMetaFieldsToAddForm()\n\t{\n\t\t$interval = $this->getMetaFields('interval');\n\t\t$animation = $this->getMetaFields('animation');\n\n\t\t?>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"interval\">Tijd tussen slides</label>\n\t\t\t\t<input name=\"interval\" id=\"interval\" type=\"text\" value=\"<?php echo $interval;?>\" size=\"40\">\n\t\t\t\t<p class=\"description\">De tijd tussen slides in milliseconden (1000ms = 1s).</p>\n\t\t\t</div>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"animation\">Animatie</label>\n\t\t\t\t<select name=\"animation\" id=\"animation\">\n\t\t\t\t\t<option <?php selected($animation, 'slide'); ?> value=\"slide\">Slide</option>\n\t\t\t\t\t<option <?php selected($animation, 'fade'); ?> value=\"fade\">Fade</option>\n\t\t\t\t</select>\n\t\t\t\t<p class=\"description\">Selecteer de animatie die gebruikt wordt door de slideshow.</p>\n\t\t\t</div>\n\t\t<?php\n\t}", "function _prepareForm() {\n\t\t\t$this->getFieldset( );\n\t\t\t$fieldset = parent::_prepareForm( );\n\n\t\t\tif ($fieldset) {\n\t\t\t\t$this->getTextHelper( );\n\t\t\t\t$model = $helper = $this->getModel( );\n\t\t\t\t$isElementDisabled = !$this->isSaveAllowed( );\n\t\t\t\t$fieldset->addField( 'country_id', 'select', array( 'name' => 'country_id', 'label' => $helper->__( 'Country' ), 'title' => $helper->__( 'Country' ), 'required' => false, 'value' => $model->getCountryId( ), 'default' => '0', 'values' => $this->getCountryValues( ), 'disabled' => $isElementDisabled ) );\n\t\t\t\t$fieldset->addField( 'region_id', 'select', array( 'name' => 'region_id', 'label' => $helper->__( 'Region/State' ), 'title' => $helper->__( 'Region/State' ), 'required' => false, 'value' => $model->getRegionId( ), 'default' => '0', 'values' => $this->getRegionValues( ), 'disabled' => $isElementDisabled ) );\n\t\t\t\t$fieldset->addField( 'zip', 'text', array( 'name' => 'zip', 'label' => $helper->__( 'Zip/Postal Code' ), 'title' => $helper->__( 'Zip/Postal Code' ), 'note' => $helper->__( '* or blank - matches any' ), 'required' => false, 'value' => $this->getZipValue( ), 'default' => '', 'disabled' => $isElementDisabled ) );\n\t\t\t}\n\n\t\t\treturn $this;\n\t\t}", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'add_form',\n 'action' => $this->getUrl('*/faq/save', array(\n 'ret' => Mage::registry('ret'),\n 'id' => $this->getRequest()->getParam('id')\n )\n ),\n 'method' => 'post'\n ));\n\n $fieldset = $form->addFieldset('faq_new_question', array(\n 'legend' => $this->__('New Question'),\n 'class' => 'fieldset-wide'\n ));\n\n $fieldset->addField('new_question', 'text', array(\n 'label' => Mage::helper('inchoo_faq')->__('New Question'),\n 'required' => true,\n 'name' => 'question'\n ));\n\n $fieldset->addField('new_answer', 'textarea', array(\n 'label' => Mage::helper('inchoo_faq')->__('Answer'),\n 'required' => false,\n 'name' => 'answer',\n 'style' => 'height:12em;',\n ));\n\n $form->setUseContainer(true);\n// $form->setValues();\n $this->setForm($form);\n\n// echo \"_prepareForm()\";\n\n return parent::_prepareForm();\n\n\n }", "public function setFieldsetsAndFields() {\n\t\t$Dataset = new FormularFieldset(__('Your Dataset'));\n\t\t$Dataset->setHtmlCode($this->getCode());\n\t\t$Dataset->addInfo( __('You can specify which values show up in the overview of your activities.').'<br>'.\n\t\t\t\t\t\t\t__('This does not influence the detailed activity view, the form or any plugin.') );\n\n\t\t$this->Formular->addFieldset($Dataset);\n\t}", "public function create_fieldset_end()\n\t{\n\t\treturn '</fieldset>'.\"\\n\";\n\t}", "function fieldset ( $arguments = \"\" ) {\n $arguments = func_get_args();\n $rc = new ReflectionClass('tfieldset');\n return $rc->newInstanceArgs( $arguments ); \n}", "abstract function setupform();", "function fieldset(array $fields = [])\n {\n return new \\Grogu\\Acf\\Entities\\FieldSet($fields);\n }", "protected function _addFieldset(\n TDProject_Core_Interfaces_Block_Widget_Fieldset $fieldset) {\n \t$this->addBlock($fieldset);\n \treturn $fieldset;\n }", "function _renderBeginActive($name)\n {\n echo '<fieldset class=\"horde-form\" id=\"fieldset_' . htmlspecialchars($this->_name) . '\">'.\"\\n\";\n if ($this->_showHeader) {\n $this->_renderSectionHeader($name);\n }\n if ($this->_requiredLegend) {\n echo '<div class=\"form-error-example\">' . $this->_requiredMarker\n . ' &#61; ' . Horde_Model_Translation::t(\"Required Field\") . '</div>'.\"\\n\";\n }\n }", "public function fieldset_open($attrs = array(), $legend = null)\n\t{\n\t\t$attrs = $this->control_fieldset_open($attrs);\n\t\t\n\t\treturn parent::fieldset_open($attrs, $legend);\n\t}", "public function get_fieldset() {\n\t\treturn $this->fieldset;\n\t}", "public function create()\n {\n $fieldset = factory(Fieldset::class)->create();\n\n if (! $this->sections) {\n $this->sections = SectionFactory::times(3)->create();\n }\n\n $fieldset->sections()->saveMany($this->sections);\n\n return $fieldset;\n }", "public static function fieldset($data, $options = array()) {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $data, $options);\n\n\t\t$filtered = self::_applyFilter(get_class(), __FUNCTION__, array(\n\t\t\t'data' => $data,\n\t\t\t'options' => $options\n\t\t), array('event' => 'args'));\n\t\t\n\t\t$data = $filtered['data'];\n\t\t$options = $filtered['options'];\n\n\t\t$tag = Html::generateHtmlTag('fieldset', $data, $options);\n\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $tag, $data, $options);\n\t\t$tag = self::_applyFilter(get_class(), __FUNCTION__, $tag, array('event' => 'return'));\n\n\t\treturn $tag;\n\t}", "public function addForm()\n {\n $this->getState()->template = 'displaygroup-form-add';\n $this->getState()->setData([\n 'help' => $this->getHelp()->link('DisplayGroup', 'Add')\n ]);\n }", "public function renderBeginTag($writer)\n\t{\n\t\tparent::renderBeginTag($writer);\n\t\tif(($text=$this->getGroupingText())!=='')\n\t\t{\n\t\t\t$writer->renderBeginTag('fieldset');\n\t\t\t$writer->renderBeginTag('legend');\n\t\t\t$writer->write($text);\n\t\t\t$writer->renderEndTag();\n\t\t}\n\t}", "public function getFieldSet() {\n\t\treturn $this->fieldset;\n\t}", "private function createFormsTab()\n {\n $tab = $this->createTab(\n 'forms_tab',\n '__responsive_tab_forms__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 90]);\n $fieldSetLabels = $this->createFieldSet(\n 'labels_fieldset',\n '__responsive_tab_forms_fieldset_labels__',\n ['attributes' => $attributes]\n );\n\n $fieldSetLabels->addElement(\n $this->createTextField(\n 'label-font-size',\n '@label-font-size',\n $this->themeFontDefaults['label-font-size']\n )\n );\n $fieldSetLabels->addElement(\n $this->createColorPickerField(\n 'label-color',\n '@label-color',\n $this->themeColorDefaults['label-color']\n )\n );\n\n $tab->addElement($fieldSetLabels);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 160]);\n $fieldSetFormBase = $this->createFieldSet(\n 'form_base_fieldset',\n '__responsive_tab_forms_fieldset_global__',\n ['attributes' => $attributes]\n );\n\n $fieldSetFormBase->addElement(\n $this->createTextField(\n 'input-font-size',\n '@input-font-size',\n $this->themeFontDefaults['input-font-size']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-bg',\n '@input-bg',\n $this->themeColorDefaults['input-bg']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-color',\n '@input-color',\n $this->themeColorDefaults['input-color']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-placeholder-color',\n '@input-placeholder-color',\n $this->themeColorDefaults['input-placeholder-color']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-border',\n '@input-border',\n $this->themeColorDefaults['input-border']\n )\n );\n\n $tab->addElement($fieldSetFormBase);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 240]);\n $fieldSetFormStates = $this->createFieldSet(\n 'form_states_fieldset',\n '__responsive_tab_forms_fieldset_states__',\n ['attributes' => $attributes]\n );\n\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-bg',\n '@input-focus-bg',\n $this->themeColorDefaults['input-focus-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-border',\n '@input-focus-border',\n $this->themeColorDefaults['input-focus-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-color',\n '@input-focus-color',\n $this->themeColorDefaults['input-focus-color']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-bg',\n '@input-error-bg',\n $this->themeColorDefaults['input-error-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-border',\n '@input-error-border',\n $this->themeColorDefaults['input-error-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-color',\n '@input-error-color',\n $this->themeColorDefaults['input-error-color']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-bg',\n '@input-success-bg',\n $this->themeColorDefaults['input-success-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-border',\n '@input-success-border',\n $this->themeColorDefaults['input-success-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-color',\n '@input-success-color',\n $this->themeColorDefaults['input-success-color']\n )\n );\n\n $tab->addElement($fieldSetFormStates);\n\n return $tab;\n }", "protected function add_child(Fieldset $fieldset) {\n\t\tif (is_null ( $fieldset->fieldset_tag )) {\n\t\t\t$fieldset->fieldset_tag = 'fieldset';\n\t\t}\n\t\t\n\t\t$this->fieldset_children [$fieldset->name] = $fieldset;\n\t\treturn $this;\n\t}", "public function setForm() {\n\t\t$translator = Zend_Registry::get('Zend_Translate');\n\t\t$this->setMethod('post');\n\t\t \n\t\t$this->addEnabled();\n\t\t$this->addRentDueDay();\n\t\t$this->addProrationType();\n\t\t$this->addProrationApplyMonth();\n\t\t$this->addSecondMonthDue();\n\t\t$this->addSubmitButton();\n\n\t\t$this->addDisplayGroup( $this->displayGroupArray, 'updateRentProrationSetting',array('legend' => 'rentProrationSettings'));\n\t\t$this->getDisplayGroup('updateRentProrationSetting')->setDecorators(array(\n 'FormElements',\n 'Fieldset', \n\t\t));\n\t}", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "public function buildQuickForm() {\n $this->addElement('text', 'newGroupName', ts('Name for new group'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Group', 'title'));\n $this->addElement('text', 'newGroupDesc', ts('Description of new group'));\n $groupTypes = CRM_Core_OptionGroup::values('group_type', TRUE);\n if (!empty($groupTypes)) {\n $this->addCheckBox('newGroupType',\n ts('Group Type'),\n $groupTypes,\n NULL, NULL, NULL, NULL, '&nbsp;&nbsp;&nbsp;'\n );\n }\n\n $groups = CRM_Core_PseudoConstant::nestedGroup();;\n\n if (!empty($groups)) {\n $this->addElement('select', 'groups', ts('Add imported records to existing group(s)'), $groups, [\n 'multiple' => \"multiple\",\n 'class' => 'crm-select2',\n ]);\n }\n\n //display new tag\n $this->addElement('text', 'newTagName', ts('Tag'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Tag', 'name'));\n $this->addElement('text', 'newTagDesc', ts('Description'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Tag', 'description'));\n\n $tag = CRM_Core_PseudoConstant::get('CRM_Core_DAO_EntityTag', 'tag_id', ['onlyActive' => FALSE]);\n if (!empty($tag)) {\n $this->addElement('select', 'tag', ts(' Tag imported records'), $tag, [\n 'multiple' => 'multiple',\n 'class' => 'crm-select2',\n ]);\n }\n\n $this->addFormRule(['CRM_Contact_Import_Form_Preview', 'formRule'], $this);\n\n parent::buildQuickForm();\n }", "public static function fieldset_open($legend_text='', $attributes='') {\n\t\t\t$output = '<fieldset';\n\t\t\t$output .= HtmlHelper::_attributes_to_string($attributes);\n\t\t\t$output .= '>';\n\t\t\tif ($legend_text != '') {\n\t\t\t\t$output .= '<legend>' . $legend_text . '</legend>';\n\t\t\t}\n\t\t\treturn $output;\n\t\t}", "public function startFieldset($label, $attributes = []) {\n $this->_fieldsets[] = [\n $label,\n $attributes\n ];\n $this->_currentFieldset = count($this->_fieldsets) - 1;\n }", "public function fieldset($element, $action = 'open', $wrap_content = '') {\n $collapsible_open = '<div class=\"fieldset-wrapper\">';\n $collapsible_close = '</div>';\n $legend_class = '';\n if (!isset($element['#id'])) {\n $element['#id'] = 'fieldset-' . $this->_count('fieldset');\n }\n if (!isset($element['_attributes_string'])) {\n $element['_attributes_string'] = $this->_setElementAttributes($element);\n }\n if ((isset($element['#collapsible']) && $element['#collapsible']) || (isset($element['#collapsed']) && $element['#collapsed'])) {\n $collapsible_open = '<div class=\"collapsible fieldset-wrapper\">';\n $collapsible_close = '</div>';\n $legend_class = ' class=\"legend-expanded\"';\n }\n if (isset($element['#collapsed']) && $element['#collapsed']) {\n $collapsible_open = str_replace('class=\"', 'class=\"collapsed ', $collapsible_open);\n $legend_class = ' class=\"legend-collapsed\"';\n }\n $output = '';\n switch ($action) {\n case 'close':\n $output .= $collapsible_close . \"</fieldset>\\r\\n\";\n $output .= isset($element['#suffix']) ? $element['#suffix']\n . \"\\r\\n\" : '';\n $output .= \"\\n\\r\";\n break;\n\n case 'open':\n $output .= $collapsible_open;\n $output .= isset($element['#prefix']) ? $element['#prefix']\n . \"\\r\\n\" : '';\n $output .= '<fieldset' . $element['_attributes_string']\n . ' id=\"' . $element['#id'] . '\">' . \"\\r\\n\";\n $output .= isset($element['#title']) ? '<legend'\n . $legend_class . '>'\n . stripslashes($element['#title'])\n . \"</legend>\\r\\n\" : '';\n $output .=\n isset($element['#description']) ? $this->_setElementDescription($element) : '';\n $output .= \"\\n\\r\";\n break;\n\n case 'wrap':\n if (!empty($wrap_content)) {\n $output .= isset($element['#prefix']) ? $element['#prefix'] : '';\n $output .= '<fieldset' . $element['_attributes_string']\n . ' id=\"' . $element['#id'] . '\">' . \"\\r\\n\";\n $output .= '<legend' . $legend_class . '>'\n . stripslashes($element['#title'])\n . \"</legend>\\r\\n\"\n . $collapsible_open;\n $output .= isset($element['#description']) ? $this->_setElementDescription($element) : '';\n $output .= $wrap_content . $collapsible_close\n . \"</fieldset>\\r\\n\";\n $output .=\n isset($element['#suffix']) ? $element['#suffix'] : '';\n $output .= \"\\n\\r\";\n }\n break;\n }\n return $output;\n }", "public function beforeSetForm($subject, $form)\n {\n $infoFieldset = $form->getElement('information_fieldset');\n $infoFieldset\n ->setLegend(__('Generate Coupon Codes'))\n ->setClass('fieldset-small')\n ;\n }", "abstract protected function _setNewForm();", "protected function _prepareForm()\n {\n\n $form = new Varien_Data_Form();\n $this->setForm($form);\n $fieldset = $form->addFieldset('cron_form', array(\n 'legend' =>Mage::helper('aoe_scheduler')->__('Settings')\n ));\n\n $fieldset->addField('model', 'select', array(\n 'label' => Mage::helper('aoe_scheduler')->__('Model'),\n 'title' => Mage::helper('aoe_scheduler')->__('Model'),\n 'class' \t=> 'input-select',\n 'required' => true,\n 'name' => 'model',\n 'options' => Mage::helper('aoe_scheduler')->getModelOptions(),\n ));\n $continueButton = $this->getLayout()\n ->createBlock('adminhtml/widget_button')\n ->setData(array(\n 'label' => Mage::helper('aoe_scheduler')->__('Continue'),\n 'onclick' => \"setSettings('\".$this->getContinueUrl().\"', 'model')\",\n 'class' => 'save'\n ));\n $fieldset->addField('continue_button', 'note', array(\n 'text' => $continueButton->toHtml(),\n ));\n \n return parent::_prepareForm();\n }", "protected function _prepareForm()\n {\n $model = $this->_coreRegistry->registry('current_amasty_finder_finder');\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('finder_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('General')]);\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id']);\n }\n $fieldset->addField(\n 'name',\n 'text',\n ['name' => 'name', 'label' => __('Title'), 'title' => __('Title'), 'required' => true]\n );\n\n if (!$model->getId()) {\n $fieldset->addField(\n 'cnt',\n 'text',\n [\n 'name' => 'cnt',\n 'label' => __('Number of Dropdowns'),\n 'title' => __('Number of Dropdowns'),\n 'class' => 'validate-greater-than-zero',\n 'required' => true\n ]\n );\n }\n\n $fieldset->addField(\n 'template',\n 'select',\n [\n 'name' => 'template',\n 'label' => __('Template'),\n 'title' => __('Template'),\n 'required' => false,\n 'values' => [\n ['value' => 'horizontal', 'label' => __('Horizontal')],\n ['value' => 'vertical', 'label' => __('Vertical')]\n ],\n 'note' => __('The `horizontal` option is responsive and set by default')\n ]\n );\n\n $fieldset->addField(\n 'custom_url',\n 'text',\n [\n 'name' => 'custom_url',\n 'label' => __('Custom Destination URL'),\n 'title' => __('Custom Destination URL'),\n 'required' => false,\n 'note' =>\n __(\n 'It determines the page the Finder will redirect customers to when the Find button is pressed. \n Enter category URL, e.g. special-category.html to redirect search results to one category.'\n )\n ]\n );\n\n $fieldset->addField(\n 'default_category',\n 'select',\n [\n 'name' => 'default_category',\n 'label' => __('Add Finder to the Default Category'),\n 'title' => __('Add Finder to the Default Category'),\n 'required' => false,\n 'values' => $this->yesno->toOptionArray(),\n 'note' =>\n __(\n 'Keep \\'Yes\\' to get the Finder working properly at the home and cms pages.'\n )\n ]\n );\n\n $fieldset->addField(\n 'hide_finder',\n 'select',\n [\n 'name' => 'hide_finder',\n 'label' => __('Finder block visibility on the Default Category'),\n 'title' => __('Finder block visibility on the Default Category'),\n 'required' => false,\n 'values' => [\n ['value' => 0, 'label' => __('Hide')],\n ['value' => 1, 'label' => __('Show')]\n ],\n 'note' =>\n __(\n 'Keep \\'Hide\\' to not display this finder block on the default category on the frontend. \n It is useful when there are several finders added to the default category but you need to \n display only one of them at the frontend.'\n )\n ]\n );\n\n $fieldset->addField(\n 'search_page',\n 'select',\n [\n 'name' => 'search_page',\n 'label' => __('Add Finder to the Search Page'),\n 'title' => __('Add Finder to the Search Page'),\n 'required' => false,\n 'values' => $this->yesno->toOptionArray()\n ]\n );\n\n $fieldset->addField(\n 'position',\n 'text',\n [\n 'name' => 'position',\n 'label' => __('Add the finder block in'),\n 'title' => __('Add the finder block in'),\n 'required' => false,\n 'note' =>\n __(\n 'Place the product finder in particular themes, categories, and other locations.\n Possible options: sidebar.main, content, content.top, footer.'\n )\n ]\n );\n\n $fieldset->addField(\n 'categories',\n 'multiselect',\n [\n 'name' => 'categories',\n 'label' => __('Categories'),\n 'title' => __('Categories'),\n 'style' => 'height: 500px; width: 300px;',\n 'values' => $this->categorySource->toOptionArray(),\n ]\n );\n\n if ($model->getId()) {\n $fieldset->addField(\n 'code_for_inserting',\n 'textarea',\n [\n 'label' => __('Code for inserting'),\n 'title' => __('Code for inserting'),\n 'disabled' => 1,\n 'note' =>\n 'Use this code if you want to put product finder in any CMS page or block.'\n ]\n );\n $fieldSettings = [\n 'label' => __('Code for inserting in Layout Update XML'),\n 'title' => __('Code for inserting in Layout Update XML'),\n 'disabled' => 1,\n ];\n\n if (version_compare($this->magentoVersion->get(), '2.3.4', '<')) {\n $fieldSettings['note'] = 'To add a product finder to a category manually, navigate to \n Catalog > Categories > Select your category (i.e. Wheels). \n In the Design section find Layout Update XML field and paste the code there.';\n }\n\n $fieldset->addField(\n 'code_for_inserting_in_layout',\n 'textarea',\n $fieldSettings\n );\n }\n\n if (!$model->getId()) {\n $form->addValues(\n [\n 'default_category' => 1,\n 'hide_finder' => 0\n ]\n );\n }\n\n $htmlIdPrefix = $form->getHtmlIdPrefix();\n\n $this->setChild(\n 'form_after',\n $this->getLayout()->createBlock(\\Magento\\Backend\\Block\\Widget\\Form\\Element\\Dependence::class)\n ->addFieldMap($htmlIdPrefix . 'default_category', 'default_category')\n ->addFieldMap($htmlIdPrefix . 'hide_finder', 'hide_finder')\n ->addFieldDependence('hide_finder', 'default_category', 1)\n );\n\n $form->setValues($model->getData());\n $form->addValues(\n [\n 'id' => $model->getId(),\n 'code_for_inserting' =>\n '{{block class=\"Amasty\\\\Finder\\\\Block\\\\Form\" block_id=\"finder_form\" '\n . 'location=\"cms\" id=\"' . $model->getId() . '\"}}',\n 'code_for_inserting_in_layout' => $model->getFinderXmlCode()\n ]\n );\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "function getSetupForm($options = array()){\n $form = parent::getSetupForm($options);\n $form->setLegend('Category Options');\n \n $set = $form->createElement('select', 'set');\n $set->setLabel('Set: ');\n $set->setRequired('true');\n \n $service = new Content_Model_CategorySet_Service();\n $results = $service->getObjects();\n\n $options = array();\n foreach($results as $value){\n $options[$value->id] = $value->title;\n }\n\n //$template->addMultiOption('None','');\n $set->setMultiOptions($options);\n $form->addElement($set);\n \n return $form;\n }", "function start_form($tabs = 0, $extra = '')\n{\n /**\n * Starting Form section in the HTML file.\n *\n * Args:\n * $tabs (int): number of tabs for indentation, default is 0\n * $extra (str): extra data in the tag - used for adding class / ID etc.\n */\n start_tag('form', Tab($tabs), true, $extra) ;\n}", "public function setAsStaticForm() {\n\t\treturn $this->form_tag(implode('<br />', $this->_elements));\n\t}", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n // 'action' => $this->getUrl('*/*/courseOrder'),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n )\n );\n\n\n\n $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('adminhtml')->__('设置订单价格')));\n\n $fieldset->addField('money', 'text', array(\n 'name' => 'money',\n 'label' => Mage::helper('adminhtml')->__('设置价格'),\n 'value' => Mage::registry('current_order')->getFinancialMoney(),\n\n\n\n ));\n\n /* $fieldset->addField('startDate', 'text', array(\n 'name' => 'startDate',\n 'label' => Mage::helper('adminhtml')->__('开始日期'),\n 'title' => Mage::helper('adminhtml')->__('开始日期'),\n //'style' => 'width:600px;height:350px;',\n 'required' => true,\n 'after_element_html' => '<br/>请选择一个开始日期',\n )\n );\n\n $fieldset->addField('endtDate', 'text', array(\n 'name' => 'endtDate',\n 'label' => Mage::helper('adminhtml')->__('结束日期'),\n 'title' => Mage::helper('adminhtml')->__('结束日期'),\n //'style' => 'width:600px;height:350px;',\n 'required' => true,\n 'after_element_html' => '<br/>请选择一个开结束日期',\n )\n );*/\n /* $fieldset->addField('psubmit', 'submit', array(\n 'name' => 'psubmit',\n 'label' => '',\n 'value' => '检查数据',\n 'after_element_html' => '',\n )\n );*/\n // $form->setMethod('post');\n\n $form->setUseContainer(true);\n // $form->setAction(true);\n // $form->setEnctype('multipart/form-data');\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n\n }", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('item_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Select order')]);\n $fieldset->addField(\n 'direction',\n 'select',\n [\n 'name' => 'direction',\n 'label' => __('Direction'),\n 'title' => __('Direction'),\n 'required' => true,\n 'options' => ['shipment' => 'Store -> Customer', 'invert' => 'Customer -> Store', 'refund' => 'RMA (return)']\n ]\n );\n $fieldset->addField(\n 'order_id',\n 'text',\n [\n 'name' => 'order_id',\n 'label' => __('Order #'),\n 'title' => __('Order #'),\n 'required' => true\n ]\n );\n $this->setForm($form);\n return parent::_prepareForm();\n }", "protected function _prepareForm()\n {\n $model = $this->_coreRegistry->registry('current_dcs_faq_items');\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('item_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('FAQ Information')]);\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id']);\n }\n $fieldset->addField(\n 'question',\n 'text',\n ['name' => 'question', 'label' => __('Question'), 'title' => __('Question'), 'required' => true]\n );\n \n $wysiwygConfig = $this->_wysiwygConfig->getConfig();\n $fieldset->addField(\n 'answer',\n 'editor',\n [\n 'name' => 'answer',\n 'label' => __('Answer'), \n 'title' => __('Answer'), \n 'required' => true ,\n 'config' => $wysiwygConfig \n ]\n );\n\n $fieldset->addField(\n 'category',\n 'select',\n ['name' => 'category',\n 'label' => __('Select Category'),\n 'title' => __('Select Category'),\n 'required' => false ,\n 'options' => $this->_catData->getLoadedFaqCategoryCollection()\n ]\n );\n \n /*$fieldset->addField(\n 'Answer',\n 'editor',\n ['name' => 'answer', 'label' => __('Answer'), 'title' => __('Answer'), 'required' => true, 'style' => 'height:36em',\n 'required' => true]\n );*/\n \n $fieldset->addField(\n 'rank',\n 'text',\n ['name' => 'rank', 'label' => __('Rank'), 'title' => __('Rank'), 'required' => true, 'class' => 'required-entry validate-number validate-greater-than-zero']\n );\n $fieldset->addField(\n 'status',\n 'select',\n ['name' => 'status', 'label' => __('Publish'), 'title' => __('Publish'), 'required' => true, 'options' => $this->_options->getOptionArray()]\n );\n $form->setValues($model->getData());\n $this->setForm($form);\n return parent::_prepareForm();\n }", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n // 'action' => $this->getUrl('*/*/courseOrder'),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n )\n );\n\n\n\n $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('adminhtml')->__('导出报表')));\n $dateFormatIso = 'yyyy-MM-dd';\n $fieldset->addField('begin_time', 'date', array(\n 'name' => 'begin_time',\n 'label' => Mage::helper('adminhtml')->__('订单开始时间'),\n 'time' => true,\n 'image' => $this->getSkinUrl('images/grid-cal.gif'),\n 'format' => $dateFormatIso,\n 'note' => '格式(0000-00-00)'\n ));\n\n $fieldset->addField('end_time', 'date', array(\n 'name' => 'end_time',\n 'label' =>Mage::helper('adminhtml')->__('订单结束时间'),\n 'time' => true,\n 'image' => $this->getSkinUrl('images/grid-cal.gif'),\n 'format' => $dateFormatIso,\n 'note' => '格式(0000-00-00)'\n ));\n /* $fieldset->addField('startDate', 'text', array(\n 'name' => 'startDate',\n 'label' => Mage::helper('adminhtml')->__('开始日期'),\n 'title' => Mage::helper('adminhtml')->__('开始日期'),\n //'style' => 'width:600px;height:350px;',\n 'required' => true,\n 'after_element_html' => '<br/>请选择一个开始日期',\n )\n );\n\n $fieldset->addField('endtDate', 'text', array(\n 'name' => 'endtDate',\n 'label' => Mage::helper('adminhtml')->__('结束日期'),\n 'title' => Mage::helper('adminhtml')->__('结束日期'),\n //'style' => 'width:600px;height:350px;',\n 'required' => true,\n 'after_element_html' => '<br/>请选择一个开结束日期',\n )\n );*/\n /* $fieldset->addField('psubmit', 'submit', array(\n 'name' => 'psubmit',\n 'label' => '',\n 'value' => '检查数据',\n 'after_element_html' => '',\n )\n );*/\n // $form->setMethod('post');\n\n $form->setUseContainer(true);\n // $form->setAction(true);\n // $form->setEnctype('multipart/form-data');\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n\n }", "protected function _prepareForm() {\r\n $model = Mage::getModel('attributeSplash/rule');\r\n $form = new Varien_Data_Form();\r\n\r\n $form->setHtmlIdPrefix('rule_');\r\n $form->setFieldNameSuffix('splash');\r\n\r\n $renderer = Mage::getBlockSingleton('adminhtml/widget_form_renderer_fieldset')\r\n ->setTemplate('promo/fieldset.phtml')\r\n ->setNewChildUrl($this->getUrl('*/promo_catalog/newConditionHtml/form/rule_conditions_fieldset'));\r\n\r\n $fieldset = $form->addFieldset('conditions_fieldset', array(\r\n 'legend'=>Mage::helper('catalogrule')->__('Conditions (leave blank for all products)'))\r\n )->setRenderer($renderer);\r\n\r\n $fieldset->addField('conditions', 'text', array(\r\n 'name' => 'conditions',\r\n 'label' => Mage::helper('catalogrule')->__('Conditions'),\r\n 'title' => Mage::helper('catalogrule')->__('Conditions'),\r\n 'required' => true,\r\n ))->setRule($model)->setRenderer(Mage::getBlockSingleton('rule/conditions'));\r\n \r\n $form->setValues($this->_getFormData());\r\n\r\n $this->setForm($form);\r\n\r\n return $this;\r\n }", "public function begin ( \\r8\\Form $form )\n {\n $this->fields = new \\r8\\Template\\Collection;\n }", "public function output_setup_form() {\n\t\t$this->output_controls_html( 'klicktipp' );\n\t}", "abstract public function openFieldset($legend, $class = '', $id = '');", "public function init()\n {\n\n $this->setMethod('post');\n\n // Add the name element\n $this->addElement('text','name', array(\n 'label' => 'Sub-Section Name'\n , 'size' => 50\n , 'required' => true\n , 'filters' => array('StringTrim')\n ));\n\n My_Plugin_Form::setDefaultLayout($this->getElement('name'));\n\n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Save Changes',\n 'disableLoadDefaultDecorators' => true,\n ));\n\n $label = $this->getElement('submit');\n $label->addDecorators(array(\n array('ViewHelper'),\n array('HtmlTag')\n ));\n\n // Add a hidden field to handle the application id\n $this->addElement('hidden','application_id');\n\n // Add a hidden field to handle the sub-section id\n $this->addElement('hidden','id');\n\n // And finally, add some CSRF protection\n $this->addElement('hash','csrf', array(\n 'ignore' => 'true',\n ));\n\n }", "public static function easyFormStart()\n {\n echo '<!-- EasyCreator START -->'.NL;\n\n echo '<div id=\"ecr_box\">'.NL;\n\n echo '<form action=\"index.php?option=com_easycreator\" method=\"post\" '\n .'name=\"adminForm\" id=\"adminForm\">'.NL;\n }", "function init()\n {\n\n $elements = array(\n 'page_id' => array('hidden')\n , 'name' => array('text', array('label' => 'Name', 'options' => array('StringLength' => array(false, array(1, 50)),), 'filters' => array('StringTrim'), 'required' => true))\n , 'title' => array('text', array('label' => 'Title', 'options' => array('StringLength' => array(false, array(4, 255)),),'filters' => array('StringTrim'), 'required' => true))\n , 'meta' => array('text', array('label' => 'meta', 'options' => array('StringLength' => array(false, array(4, 255))), 'filters' => array('StringTrim'),))\n , 'description' => array('textarea',array('label' => 'description', 'attribs' => array('rows' => 2), 'filters' => array('StringTrim'), 'required' => true))\n , 'body' => array('textarea',array('label' => 'body', 'attribs' => array('rows' => 7), 'filters' => array('StringTrim'), 'required' => true))\n );\n $this->addElements($elements);\n\n // --- Groups ----------------------------------------------\n $this->addDisplayGroup(array('name','title', 'meta'), 'display-head', array('legend'=>'display-head'));\n $this->addDisplayGroup(array('description', 'body'), 'display-body', array('legend'=>'display-body'));\n parent::init();\n }", "protected function control_fieldset_open($attrs)\n\t{\n\t\t// String can be passed\n\t\tis_string($attrs) and $attrs = array('state' => $attrs);\n\t\t\n\t\tstatic::$helper->add_template($attrs);\n\t\t\n\t\t// generate classes\n\t\t$class = array('control-group');\n\t\t\n\t\tif (array_key_exists('state', $attrs))\n\t\t{\n\t\t\t$class[] = $attrs['state'];\n\t\t\n\t\t}\n\t\tstatic::$helper\n\t\t\t->merge_classes($attrs, $class)\n\t\t\t->clean_attrs('fieldset_line_open', $attrs);\n\t\t\n\t\treturn $attrs;\n\t}", "protected function _prepareForm()\r\n {\r\n /* @var $model Amasty_Xlanding_Model_Page */\r\n $model = Mage::registry('amlanding_page');\r\n\r\n /* @var $helper Amasty_Xlanding_Helper_Data */\r\n $helper = Mage::helper('amlanding');\r\n $attributeSets = $helper->getAvailableAttributeSets();\r\n $form = new Varien_Data_Form();\r\n\r\n $form->setHtmlIdPrefix('page_');\r\n\r\n $fieldset = $form->addFieldset('base_fieldset', array('legend' => $helper->__('Page Information')));\r\n\r\n if ($model->getPageId()) {\r\n $fieldset->addField('page_id', 'hidden', array(\r\n 'name' => 'page_id',\r\n ));\r\n }\r\n\r\n $fieldset->addField('title', 'text', array(\r\n 'name' => 'title',\r\n 'label' => $helper->__('Page Name'),\r\n 'title' => $helper->__('Page Name'),\r\n 'required' => true,\r\n ));\r\n\r\n $fieldset->addField('identifier', 'text', array(\r\n 'name' => 'identifier',\r\n 'label' => $helper->__('URL Key'),\r\n 'title' => $helper->__('URL Key'),\r\n 'required' => true,\r\n 'class' => 'validate-identifier',\r\n 'note' => $helper->__('Relative to Website Base URL'),\r\n ));\r\n\r\n /**\r\n * Check is single store mode\r\n */\r\n if (!Mage::app()->isSingleStoreMode()) {\r\n\r\n $fieldset->addField('store_id', 'multiselect', array(\r\n 'label' => $helper->__('Stores'),\r\n 'name' => 'stores[]',\r\n 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm()\r\n ));\r\n } else {\r\n $fieldset->addField('store_id', 'hidden', array(\r\n 'name' => 'stores[]',\r\n 'value' => Mage::app()->getStore(true)->getId()\r\n ));\r\n $model->setStoreId(Mage::app()->getStore(true)->getId());\r\n }\r\n\r\n $fieldset->addField('is_active', 'select', array(\r\n 'label' => $helper->__('Status'),\r\n 'title' => $helper->__('Page Status'),\r\n 'name' => 'is_active',\r\n 'required' => true,\r\n 'options' => $helper->getAvailableStatuses()\r\n ));\r\n\r\n /**\r\n * Adding field in the form to select the default attribute store used for optimization purposes\r\n */\r\n $fieldset->addField('default_attribute_set', 'select', array(\r\n 'label' => $helper->__('Default Attribute Set'),\r\n 'title' => $helper->__('Default Attribute Set'),\r\n 'name' => 'default_attribute_set',\r\n 'options' => $attributeSets,\r\n 'required' => true\r\n ));\r\n $form->setValues($model->getData());\r\n $this->setForm($form);\r\n\r\n }", "protected function _prepareForm() {\r\n\t $form = new Varien_Data_Form();\r\n\t $this->setForm($form);\r\n\t $fieldset = $form->addFieldset(\"reason_form\", array(\"legend\" => Mage::helper(\"mprmasystem\")->__(\"RMA Reason\")));\r\n\r\n\t\t\t$fieldset->addField(\"reason\", \"textarea\", array(\r\n\t\t\t\t\"label\" => Mage::helper(\"mprmasystem\")->__(\"Reason Provided\"),\r\n\t\t\t\t\"name\" => \"reason\",\r\n\t\t\t\t\"class\" => \"required-entry\",\r\n\t\t\t\t\"required\" => true\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\t$fieldset->addField(\"status\", \"select\", array(\r\n\t\t\t\t\"label\" => Mage::helper(\"mprmasystem\")->__(\"Status\"),\r\n\t\t\t\t\"name\" \t\t=> \"status\",\r\n\t\t\t\t\"class\" => \"required-entry\",\r\n\t\t\t\t\"required\" => true,\r\n\t\t\t\t\"values\"\t=> array(\r\n\t\t\t\t\t\t\t\t\tarray(\"value\" => \"\",\"label\" => Mage::helper(\"mprmasystem\")->__(\"Please Select\")),\r\n\t\t\t\t\t\t\t\t\tarray(\"value\" => \"1\",\"label\" => Mage::helper(\"mprmasystem\")->__(\"Enable\")),\r\n\t\t\t\t\t\t\t\t\tarray(\"value\" => \"0\",\"label\" => Mage::helper(\"mprmasystem\")->__(\"Disable\"))\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t));\r\n\t\t\t\r\n\t if(Mage::registry(\"mprmareason_data\"))\r\n\t $form->setValues(Mage::registry(\"mprmareason_data\")->getData());\t\t\t\r\n\t return parent::_prepareForm();\r\n\t }", "public function start()\n\t{\n\t\t$attrs = \"\";\n\t\tforeach($this->_attributes as $key => $val)\n\t\t\t$attrs .= \"$key=\\\"$val\\\" \";\n\n\t\t$attrs = trim($attrs);\n\t\techo \"<form $attrs>\\n\";\n\t}", "function vistaportal_education_form($form, &$form_state) {\n include_once ('vistaportal.fields.inc');\n include_once ('vistaportal_functions.inc');\n drupal_add_library('system', 'drupal.ajax');\n drupal_add_library('system', 'jquery.form');\n //Set this to tree so we can access all dynamic form values\n $form['#tree'] = TRUE;\n $form['#attributes'] = array('enctype' => array(\"multipart/form-data\"));\n $date = date('Y-m-d H:m:s');\n $format = 'Y-m';\n $format1 = 'Y-m-d';\n //This is the pre-med education form\n $form['premed'] = array(\n '#type' => 'fieldset',\n '#title' => t('PRE-MEDICAL EDUCATION (OPTIONAL)'),\n '#collapsible' => FALSE,\n '#prefix' => '<div id=\"premed-fieldset-wrapper\">',\n '#suffix' => '</div>',\n );\n\n //This counter will be used to determine how many premed sections to add\n if (empty($form_state['p_num_schools'])) {\n $form_state['p_num_schools'] = 1;\n }\n\n for ($i = 0; $i < $form_state['p_num_schools']; $i++) {\n if ($i > 0) {\n $form['premed'][$i]['title-txt' . $i]['#prefix'] = '<div class=\"line-solid\"></div><h2> Pre-Medical Education ' . ($i + 1) . '</h2><br/>';\n }\n $form['premed'][$i]['school' . $i] = textfield('School of Graduation');\n $form['premed'][$i]['school' . $i]['#maxlength'] = 40;\n $form['premed'][$i]['school' . $i]['#prefix'] = '<div class = \"premed-school\">';\n $form['premed'][$i]['school' . $i]['#suffix'] = '</div>';\n $form['premed'][$i]['school' . $i]['#required'] = FALSE;\n $form['premed'][$i]['country' . $i] = country('Country');\n $form['premed'][$i]['country' . $i]['#prefix'] = '<div class = \"premed-country\">';\n $form['premed'][$i]['country' . $i]['#suffix'] = '</div>';\n $form['premed'][$i]['country' . $i]['#required'] = FALSE;\n $form['premed'][$i]['state' . $i] = state('State');\n $form['premed'][$i]['state' . $i]['#prefix'] = '<div class = \"premed-state\">';\n $form['premed'][$i]['state' . $i]['#suffix'] = '</div>';\n $form['premed'][$i]['state' . $i]['#required'] = FALSE;\n $form['premed'][$i]['city' . $i] = textfield('City');\n $form['premed'][$i]['city' . $i]['#maxlength'] = 20;\n $form['premed'][$i]['city' . $i]['#required'] = FALSE;\n $form['premed'][$i]['city' . $i]['#prefix'] = '<div class = \"premed-city\">';\n $form['premed'][$i]['city' . $i]['#suffix'] = '</div>';\n //This is the date\n $form['premed'][$i]['date' . $i] = array(\n '#prefix' => '<div class=\"premed-date\">',\n '#markup' => 'Dates Attended',\n '#suffix' => '</div>',\n );\n $form['premed'][$i]['date_from' . $i] = date_my('From');\n $form['premed'][$i]['date_from' . $i]['#required'] = FALSE;\n $form['premed'][$i]['date_from' . $i]['#prefix'] = '<div class = \"premed-date-from\">';\n $form['premed'][$i]['date_from' . $i]['#suffix'] = '</div>';\n $form['premed'][$i]['date_to' . $i] = date_my('To');\n $form['premed'][$i]['date_to' . $i]['#required'] = FALSE;\n $form['premed'][$i]['date_to' . $i]['#prefix'] = '<div class = \"premed-date-to\">';\n $form['premed'][$i]['date_to' . $i]['#suffix'] = '</div>';\n $form['premed'][$i]['degree' . $i] = edu('Degree');\n $form['premed'][$i]['degree' . $i]['#required'] = FALSE;\n $form['premed'][$i]['degree' . $i]['#prefix'] = '<div class = \"premed-degree\">';\n $form['premed'][$i]['degree' . $i]['#suffix'] = '</div>';\n }\n\n //Only allow 3 schools for the premed form\n if ($form_state['p_num_schools'] < 3) {\n $form['premed']['add_another'] = array(\n //'#prefix' => '<div class=\"edu-btn\">',\n '#type' => 'submit',\n '#value' => t('+ Add Pre-Medical Institution'),\n '#submit' => array('vistaportal_form_premed_add'),\n '#limit_validation_errors' => array(),\n '#ajax' => array(\n 'callback' => 'vistaportal_premed_form_add_school_callback',\n 'wrapper' => 'premed-fieldset-wrapper',\n 'method' => 'replaceWith',\n 'speed' => 'fast',\n ),\n );\n }\n\n //First school is mandatory\n if ($form_state['p_num_schools'] > 1) {\n $form['premed']['remove_school'] = array(\n '#type' => 'submit',\n '#value' => t('- Remove Pre-medical Institution'),\n '#submit' => array('vistaportal_form_premed_remove'),\n '#limit_validation_errors' => array(),\n '#ajax' => array(\n 'callback' => 'vistaportal_premed_form_add_school_callback',\n 'wrapper' => 'premed-fieldset-wrapper',\n ),\n );\n }\n\n //This is the line separator\n $form['p']['line3'] = array(\n '#prefix' => '<div class=\"line-solid\">',\n //'#markup' => '<hr>',\n '#attributes' => array('class' => array('line-solid')),\n '#suffix' => '</div>',\n );\n\n //This is the medical school form\n $form['med'] = array(\n '#type' => 'fieldset',\n '#title' => t('MEDICAL EDUCATION'),\n '#collapsible' => FALSE,\n '#prefix' => '<div id=\"med-fieldset-wrapper\">',\n '#suffix' => '</div>',\n );\n\n //This counter will be used to determine how many medical school sections to add\n if (empty($form_state['m_num_schools'])) {\n $form_state['m_num_schools'] = 1;\n }\n\n for ($i = 0; $i < $form_state['m_num_schools']; $i++) {\n if ($i > 0) {\n $form['med'][$i]['title-txt' . $i]['#prefix'] = '<div class=\"line-solid2\"></div><h2> Medical Education ' . ($i + 1) . '</h2><br/>';\n }\n $form['med'][$i]['school' . $i] = textfield('School of Graduation');\n $form['med'][$i]['school' . $i]['#maxlength'] = 40;\n $form['med'][$i]['school' . $i]['#prefix'] = '<div class = \"med-school\">';\n $form['med'][$i]['school' . $i]['#suffix'] = '</div>';\n $form['med'][$i]['country' . $i] = country('Country');\n $form['med'][$i]['country' . $i]['#prefix'] = '<div class = \"med-country\">';\n $form['med'][$i]['country' . $i]['#suffix'] = '</div>';\n $form['med'][$i]['state' . $i] = state('State');\n $form['med'][$i]['state' . $i]['#prefix'] = '<div class = \"med-state\">';\n $form['med'][$i]['state' . $i]['#suffix'] = '</div>';\n $form['med'][$i]['city' . $i] = textfield('City');\n $form['med'][$i]['city' . $i]['#maxlength'] = 20;\n $form['med'][$i]['city' . $i]['#prefix'] = '<div class = \"med-city\">';\n $form['med'][$i]['city' . $i]['#suffix'] = '</div>';\n\n //This is the date\n $form['med'][$i]['date' . $i] = array(\n '#prefix' => '<div class=\"med-date\">',\n '#markup' => 'Dates Attended',\n '#suffix' => '</div>',\n );\n $form['med'][$i]['date_from' . $i] = date_my('From');\n $form['med'][$i]['date_from' . $i]['#prefix'] = '<div class = \"med-date-from\">';\n $form['med'][$i]['date_from' . $i]['#suffix'] = '</div>';\n $form['med'][$i]['date_to' . $i] = date_my('To');\n $form['med'][$i]['date_to' . $i]['#prefix'] = '<div class = \"med-date-to\">';\n $form['med'][$i]['date_to' . $i]['#suffix'] = '</div>';\n $form['med'][$i]['degree' . $i] = edu('Degree');\n $form['med'][$i]['degree' . $i]['#prefix'] = '<div class = \"med-degree\">';\n $form['med'][$i]['degree' . $i]['#suffix'] = '</div>';\n /* $form['med'][$i]['ecfmg' . $i] = textfield('ECFMG CERTIFICATE #');\n $form['med'][$i]['ecfmg' . $i]['#maxlength'] = 20;\n $form['med'][$i]['ecfmg' . $i]['#attributes'] = array('class' => array('textfield-license'));\n $form['med'][$i]['ecfmg' . $i]['#prefix'] = '<div class = \"med-ecfmg\">';\n $form['med'][$i]['ecfmg' . $i]['#suffix'] = '</div>';*/\n\n //added fields\n $form['med'][$i]['valid' . $i] = array(\n '#prefix' => '<div class=\"var_label\">',\n '#markup' => t('Valid Indefinitely'),\n '#required' => TRUE,\n '#suffix' => '</div>',\n );\n $form['med'][$i]['valid-indef' . $i] = radios_yesno();\n $form['med'][$i]['valid-indef' . $i]['#prefix'] = '<div class = \"med-yes-no\">';\n $form['med'][$i]['valid-indef' . $i]['#suffix'] = '</div>';\n $form['med'][$i]['exp_date' . $i] = date_my('If no, state expiration date');\n $form['med'][$i]['exp_date' . $i]['#prefix'] = '<div class = \"med-exp-date\">';\n $form['med'][$i]['exp_date' . $i]['#suffix'] = '</div>';\n\n }\n\n //Only allow 3 schools for the med form\n if ($form_state['m_num_schools'] < 3) {\n $form['med']['add_another'] = array(\n '#type' => 'submit',\n '#value' => t('+ Add Medical Institution'),\n '#submit' => array('vistaportal_form_med_add'),\n '#limit_validation_errors' => array(),\n '#ajax' => array(\n 'callback' => 'vistaportal_med_form_add_school_callback',\n 'wrapper' => 'med-fieldset-wrapper',\n 'method' => 'replaceWith',\n ),\n );\n }\n\n //First school is mandatory\n if ($form_state['m_num_schools'] > 1) {\n $form['med']['remove_school'] = array(\n '#type' => 'submit',\n '#value' => t('- Remove Medical Institution'),\n '#submit' => array('vistaportal_form_med_remove'),\n '#limit_validation_errors' => array(),\n '#ajax' => array(\n 'callback' => 'vistaportal_med_form_add_school_callback',\n 'wrapper' => 'med-fieldset-wrapper',\n ),\n );\n }\n\n //this is a line at the bottom\n $form['last']['line'] = array(\n '#prefix' => '<div class=\"line_left\">',\n //'#markup' => '<hr>',\n '#suffix' => '</div>',\n );\n\n $form['last']['required_field'] = array(\n '#prefix' => '<div class=\"required_field2\">',\n '#markup' => 'Required Field',\n '#required' => TRUE,\n '#suffix' => '</div>',\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Submit'),\n '#name' => 'next',\n '#submit' => array('vistaportal_education_form_submit'),\n '#attributes' => array('class' => array('education-submit')),\n );\n\t\t\n\t\t$form['next'] = array(\n '#type' => 'submit',\n '#value' => t('Next'),\n '#limit_validation_errors' => array(),\n '#attributes' => array('class' => array('button')),\n '#submit' => array('vistaportal_next'),\n );\n\t\t$form['next']['#attributes'] = array('class' => array('next'));\n\t\t\n $form['save_logout'] = array(\n '#type' => 'submit',\n '#value' => t('Save & Logout'),\n '#limit_validation_errors' => array(),\n '#attributes' => array('class' => array('button')),\n '#submit' => array('vistaportal_save_logout'),\n );\n\n $form['prev'] = array(\n '#type' => 'submit',\n '#value' => t('Previous'),\n '#limit_validation_errors' => array(),\n '#attributes' => array('class' => array('button prev')),\n '#submit' => array('vistaportal_education_previous'),\n );\n\n $form['prev']['#attributes'] = array('class' => array('prev'));\n\n $form['#after_build'][] = 'vistaportal_education_form_afterbuild';\n return $form;\n }", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'view_form',\n 'action' => $this->getUrl(\n 'incentivize/submitted/send',\n array(\n '_current' => true,\n )\n ),\n 'method' => 'post',\n )); // The above code creates the action for the fieldset\n\n $form->setUseContainer(true);\n $this->setForm($form);\n\n // Define a new fieldset, only one is necassary\n $fieldset = $form->addFieldset(\n 'general',\n array(\n 'legend' => $this->__('Coupon Selection')\n )\n );\n\n // Pull available coupon data to populate option list\n $rulesCollection = Mage::getModel('salesrule/rule')->getCollection();\n $counter = 1;\n\n // Iterate through each shopping cart rule\n foreach($rulesCollection as $rule) {\n $coupon = $rule->getCoupons();\n // Iterate through each coupon in the current iterated shopping cart rule\n foreach ($coupon as $coupons) {\n $options[] = array(\n 'label' => $coupon[$counter]['code'],\n 'value' => $coupon[$counter]['code'],\n );\n $counter++;\n }\n /* GET THE FUCK OUTTA HERE I FUCKIN SOLVED IT! HOLY FUCKIN SHIT */\n\n /**\n * So its better to use '$arr[] = value' to append values to an array then\n * array_push() because it won't make a function call to your code. $arr[]\n * is more performant\n */\n };\n\n // Add the fields we want to be editable\n $fieldset->addField('couponselect', 'multiselect', array(\n 'label' => Mage::helper('bricks_incentivize')->__('Coupons'),\n 'class' => 'required-entry',\n 'required' => true,\n 'name' => 'couponselect',\n 'values' => $options,\n 'disabled' => false,\n 'readonly' => true,\n 'after_element_html' => '<small>Choose one or more coupons to send to the user</small>',\n 'tabindex' => 1\n ));\n $fieldset->addField('sendcoupon', 'submit', array(\n 'label' => Mage::helper('bricks_incentivize')->__('Send Coupon'),\n 'required' => false,\n 'value' => 'Send Coupon',\n 'after_element_html' => '<small>Send coupon to the current users email</small>',\n 'tabindex' => 2\n ));\n\n //var_dump($this->getRequest()->getParam(\"couponselect\")); // So couponselects data is in $_POST, you just can't see it without dumping the data\n\n $couponSelectParam = $this->getRequest()->getParam(\"couponselect\");\n\n // Pull user and store data\n $idParam = $this->getRequest()->getParam('id'); // Get ID param value\n $incentivizeCustomer = Mage::getModel('incentivize/users')->load($idParam);\n\n $customerFirstname = $incentivizeCustomer->getFirstname(); // Pull customer firstname\n $customerLastname = $incentivizeCustomer->getLastname(); // Pull customer lastname\n $customerEmail = $incentivizeCustomer->getEmail(); // Pull user email address\n $store = Mage::app()->getStore(); // Why do I have to pull the store name in two steps?\n $storeName = $store->getName(); // Pull store name\n $storeEmail = Mage::getStoreConfig('trans_email/ident_general/email'); // Pull store general email\n\n // Now check if couponselect param has a value, if it does send an email\n if (isset($couponSelectParam)) {\n // Use a try and catch block for error checking\n try {\n // Load email template\n $emailTemplate = Mage::getModel('core/email_template')->loadDefault('incentivize_email_template');\n // Create variables to use inside the email template\n $emailTemplateVar = array(); // Declare the variable as an array first\n $emailTemplateVar['storeName'] = $storeName;\n $emailTemplateVar['firstName'] = $customerFirstname;\n $emailTemplateVar['lastName'] = $customerLastname;\n $emailTemplateVar['couponCodes'] = implode(\"<br/>\", $couponSelectParam); // Use implode to separate the elements of the array, convert to string, and add line breaks to the output\n // Now inject the variables into the template, and it will return the parsed content to be used in the email\n $processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVar);\n\n // Set $mail object settings (More in depth way of doing it - Keeping it for referential purposes)\n /*$mail = Mage::getModel('core/email')\n ->setName('bilaa')\n ->setToEmail('[email protected]')\n ->setBody($processedTemplate)\n ->setSubject('Subject :')\n ->setFromEmail('[email protected]')\n ->setFromName('bilaa')\n ->setType('html');*/\n // Send email\n // $mail->send();\n\n $emailTemplate->setSenderName($storeName);\n $emailTemplate->setSenderEmail($storeEmail); // This line MUST be included!\n $emailTemplate->setTemplateSubject($storeName . ' - You received a free coupon');\n // Send the email - Note: getProcessedTemplate is executed within send()\n $emailTemplate->send($customerEmail, $customerFirstname . \" \" . $customerLastname, $emailTemplateVar);\n\n // Output successful message\n Mage::getSingleton('core/session')->addSuccess('Coupon successfully emailed to user!');\n\n return true;\n\n } catch(Exception $error) {\n // If theres an error, output the error\n Mage::getSingleton('core/session')->addError($error->getMessage());\n return false;\n }\n }\n\n // Return the form\n return $this;\n }", "function _addMetadataFields()\n {\n $config =& NDB_Config::singleton();\n $this->dateOptions = array(\n 'language' => 'en',\n 'format' => 'YMd',\n 'minYear' => $config->getSetting('startYear'),\n 'maxYear' => $config->getSetting('endYear'),\n 'addEmptyOption' => true,\n 'emptyOptionValue' => null\n );\n\n $this->form->addElement('date', 'Date_taken', 'Date of Administration', $this->dateOptions);\n\n $examiners = $this->_getExaminerNames();\n $this->form->addElement('select', 'Examiner', 'Radiologist', $examiners);\n\n \t$this->form->addGroupRule('Date_taken', 'Date of Administration is required', 'required');\n\n $this->form->registerRule('checkdate', 'callback', '_checkDate');\n $this->form->addRule('Date_taken', 'Date of Administration is invalid', 'checkdate');\n\n $this->form->addRule('Examiner', 'Examiner is required', 'required');\n }", "function _voicemail_fieldset_group_definition() {\n return array (\n 'label' => 'Voice Mail Settings',\n 'group_type' => 'standard',\n 'settings' =>\n array (\n 'form' =>\n array (\n 'style' => 'fieldset_collapsible',\n 'description' => '',\n ),\n 'display' =>\n array (\n 'description' => '',\n 'teaser' =>\n array (\n 'format' => 'fieldset',\n 'exclude' => 0,\n ),\n 'full' =>\n array (\n 'format' => 'fieldset',\n 'exclude' => 0,\n ),\n 4 =>\n array (\n 'format' => 'fieldset',\n 'exclude' => 0,\n ),\n 'token' =>\n array (\n 'format' => 'fieldset',\n 'exclude' => 0,\n ),\n 'label' => 'above',\n ),\n ),\n 'weight' => '3',\n 'group_name' => VOICEMAIL_GROUP_FIELD_NAME,\n );\n}", "function form_init_elements()\r\n {\r\n // Swimmer handling\r\n $swimmer = new FERadioGroup(\"Swimmers\",\r\n array(\r\n ucfirst(FT_CREATE) => FT_CREATE\r\n ,ucfirst(FT_IGNORE) => FT_IGNORE)) ;\r\n $swimmer->set_br_flag(false) ;\r\n $this->add_element($swimmer) ;\r\n\r\n // Swim Meets handling\r\n $swimmeets = new FERadioGroup(\"Swim Meets\",\r\n array(\r\n ucfirst(FT_CREATE) => FT_CREATE\r\n ,ucfirst(FT_IGNORE) => FT_IGNORE)) ;\r\n $swimmeets->set_br_flag(false) ;\r\n $this->add_element($swimmeets) ;\r\n\r\n // Swim Teams handling\r\n $swimteams = new FERadioGroup(\"Swim Teams\",\r\n array(\r\n ucfirst(FT_CREATE) => FT_CREATE\r\n ,ucfirst(FT_IGNORE) => FT_IGNORE)) ;\r\n $swimteams->set_br_flag(false) ;\r\n $this->add_element($swimteams) ;\r\n }", "public function addForm() {\n $this->view->displayForm();\n }", "protected function createFormFields() {\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "public function buildFormLayout()\n {\n $this->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('title');\n })->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('cover');\n $column->withSingleField('description');\n $column->withSingleField('price');\n $column->withSingleField('tags');\n });\n }", "public function init()\n {\n\r\n $this->setAttrib('horizontal', true);\r\n $this->setName('frm_termbill');\r\n\n\n $CurrentTerm = Content_Model_School::getCurrentTermYear(false);\n\r\n //must be the first element in all forms\r\n $this->addElement('hidden', 'isValid', array(\"value\"=>\"false\"));\r\n $this->addElement('hidden', 'cl_id');\n\n\n $this->addElement('text','description',array(\n 'label' => 'Description',\n 'required' => true,\n \t\t'autocomplete' => 'off',\n 'filters' => array(new Zend_Filter_StringTrim()),\n 'validators' => array(new Zend_Validate_NotEmpty())\n ));\n\n\n //entry fees are paid only on admission\n //Term fees are paid termly,\n //Monthly fees are paid monthly\n //Yearly fees are paid every 1st Term.\n $this->addElement('select','type', array(\r\n 'label' => 'Type of Fee',\r\n 'required' => true,\r\n 'multioptions' => array(0 => 'Entry Fee', 1 => 'Term Fee', 2 => 'Monthly Fee', 3=> 'Yearly Fee' ),\r\n 'validators' => array(new Zend_Validate_NotEmpty())\r\n ));\n\n $this->addElement('select','feegroup',array(\r\n 'label' => 'Fees Group',\r\n 'required' => true,\n \t\t'onchange' => '$.fn.loadBills2($(\"#feegroup option:selected\").val(),-100);$(\"#feegroupv option[value=\"+$(\"#feegroup option:selected\").val()+\"]\").attr(\"selected\",\"selected\");',\n 'multioptions' => array(null=>'--- Select an option ---',-1=>'Apply to All Classes', -2=>'No Category Bill') + Content_Model_FeeGroups::getFeeGroupsArray(),\r\n 'filters' => array(new Zend_Filter_StringTrim()),\r\n 'validators' => array(new Zend_Validate_NotEmpty())\r\n ));\n\n $this->addElement('select','specificgrades',array(\r\n 'label' => 'Specific Class ',\r\n 'required' => true,\r\n 'multioptions' => array(-1 => 'Not Applicable') + Content_Model_GradeLevels::gradelevels(),\r\n 'filters' => array(new Zend_Filter_StringTrim()),\r\n 'validators' => array(new Zend_Validate_NotEmpty())\r\n ));\n\n $this->addElement('select','stream', array(\n \t\t 'label' => 'Qualifying Stream',\n 'required' => true,\n //'multioptions' => array(-1 => 'Not Applicable', '0' => 'Non-Res./Day Student', '1' => 'Resident/Boarder', 2=> 'Part-Time', 3=> 'Evening Programme', 4=> 'Weekend Programme') ,\n 'multioptions' => array(-1 => 'All Streams', '0' => 'Non-Res./Day Student', '1' => 'Resident/Boarder') ,\n \t\t'filters' => array(new Zend_Filter_StringTrim()),\n 'validators' => array(new Zend_Validate_NotEmpty())\n ));\n\n $this->addElement('text','amount',array(\n 'label' => 'Amount',\n 'required' => true,\n 'data-mask' => \"9999\",\n 'data-placeholder' => '0',\n 'filters' => array(new Zend_Filter_StringTrim()),\n 'validators' => array(new Zend_Validate_NotEmpty(),\n new Zend_Validate_Digits(),\n new Zend_Validate_GreaterThan(000)\n )\n ));\n\n $this->addElement('select','mandatory', array(\n 'label' => 'Mandatory',\n 'required' => true,\n 'multioptions' => array(1 => 'Mandatory', 0 => 'Optional' ),\n 'validators' => array(new Zend_Validate_NotEmpty())\n ));\n\n\r\n $this->addElement('select','term', array(\r\n 'label' => 'Applicable Term',\r\n 'required' => true,\r\n 'multioptions' => array(1 => '1st Term', 2 => '2nd Term', 3 => '3rd Term' ),\r\n 'validators' => array(new Zend_Validate_NotEmpty()),\n \t\t'value' => $CurrentTerm->term\r\n ));\r\n\n\n $this->addElement('text', 'year', array(\n 'label' => 'Applicable Year',\n 'required' => true,\n 'data-mask' => \"2099/2099\",\n 'validators' => array(new Zend_Validate_NotEmpty()),\n 'filters' => array(new Zend_Filter_StringTrim()),\n \t\t'value' => $CurrentTerm->year\n ));\n\r\n $this->addElement(\"button\", \"return\",\r\n array(\"label\" => \"Cancel\",\r\n \"class\" => \"btn btn-small btn-danger\",\r\n \"onclick\" => \"$('a[href=\\\"#termbill\\\"]').click();\"));\r\n\r\n\n $this->addElement(\"submit\", \"register\",\n \t\t\t\t\tarray(\"label\" => \"Add Bill\",\n \t\t\t\t\t\t\t\"class\" => \"btn btn-success\",\n \t\t\t\t\t\t\t\"disabled\" => true\n \t\t\t\t\t));\n\n }", "abstract function setupForm(&$mform);", "public function makeOutput()\n\t{\n\t\t$formId = $this->name;\n\t\t$enctype = 'application/x-www-form-urlencoded';\n\n\t\t$formHtml = new HtmlObject('form');\n\t\t$formHtml->property('method', $this->form->getMethod())->\n\t\t\t\t\tproperty('id', $formId)->\n\t\t\t\t\tproperty('action', $this->form->getAction());\n\n\t\t$jsStartup = array();\n\n\t\tforeach($this->inputs as $inputs) {\n\t\t\tforeach($inputs as $input) {\n\t\t\t\tif(($input->type == 'checkbox' || $input->type == 'radio') && isset($input->properties['value'])) {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name . '_' . $input->properties['value'];\n\t\t\t\t} else {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name;\n\t\t\t\t}\n\t\t\t\t$input->property('id', $inputId);\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->inputs as $section => $inputs)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('fieldset');\n\t\t\t$sectionHtml->property('id', $formId . \"_section_\" . $section);\n\n\t\t\tif(isset($this->sectionClasses[$section])) {\n\t\t\t\tforeach($this->sectionClasses[$section] as $class) {\n\t\t\t\t\t$sectionHtml->addClass($class);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->sectionClasses[$section] = array();\n\t\t\t}\n\n\t\t\tif(!in_array('mf-toggle-hide', $this->sectionClasses[$section]) && \n\t\t\t !in_array('mf-toggle-none', $this->sectionClasses[$section])) {\n\t\t\t\t$sectionHtml->addClass('mf-toggle-show');\n\t\t\t}\n\n\n\t\t\tif(isset($this->sectionLegends[$section]))\n\t\t\t\t$sectionHtml->insertNewHtmlObject('legend')->\n\t\t\t\t\twrapAround($this->sectionLegends[$section]);\n\n\t\t\t$sectionDiv = new HtmlObject('div');\n\t\t\t$sectionDiv->addClass('fieldset_contents')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_contents');\n\n\t\t\tif(isset($this->sectionIntro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionIntro[$section])->\n\t\t\t\t\taddClass('fieldset_intro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_intro');\n\n\t\t\t$sectionHtml->wrapAround($sectionDiv);\n\n\t\t\t$hasInputs = false;\n\n\t\t\t$controlsDiv = new HtmlObject('div');\n\t\t\t$controlsDiv->addClass('fieldset_controls')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_controls');\n\n\t\t\t$sectionDiv->wrapAround($controlsDiv);\n\n\t\t\tforeach($inputs as $input)\n\t\t\t{\n\t\t\t\t$inputId = $input->property('id');\n\n\t\t\t\tif($input->type === 'submit' && !$this->includeSubmit)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif($input->type === 'richtext') {\n\t\t\t\t\t$input->property($this->form->getMarkup(), 'true');\n\t\t\t\t\t$input->type = 'textarea';\n\t\t\t\t\t$input->addClass('fulltext');\n\t\t\t\t}\n\n\t\t\t\t$plugins = new Hook();\n\t\t\t\t$plugins->enforceInterface('FormToHtmlHook');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', 'Base');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', $input->type);\n\t\t\t\t$plugins->setInput($input);\n\n\t\t\t\t$jsStartup = array_merge_recursive($jsStartup,\n\t\t\t\t\t\t\t\tHook::mergeResults($plugins->getCustomJavaScript()));\n\n\t\t\t\tif(in_array(true, Hook::mergeResults($plugins->overrideHtml())))\n\t\t\t\t{\n\t\t\t\t\t$plugins->createOverriddingHtml($sectionHtml);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\tif($inputStartupJs = $this->getInputJavascript($input))\n\t\t\t\t\t$jsStartup = array_merge_recursive($jsStartup, $inputStartupJs);\n\n\t\t\t\t$inputHtml = $this->getInputHtmlByType($input);\n\t\t\t\t$plugins->setCustomHtml($inputHtml);\n\n\t\t\t\tif($inputOptions = $this->getInputMetaData($input) ) //count($inputOptions > 0))\n\t\t\t\t{\n\t\t\t\t\t$metaDataClass = json_encode($inputOptions);\n\t\t\t\t\t$inputHtml->addClass($metaDataClass);\n\t\t\t\t}\n\n\t\t\t\tif($input->type == 'file')\n\t\t\t\t\t$enctype = 'multipart/form-data';\n\n\t\t\t\tif($input->type == 'hidden') {\n\t\t\t\t\t$inputHtml->close(false);\n\t\t\t\t\t$formHtml->wrapAround($inputHtml);\n\t\t\t\t} else {\n\t\t\t\t\t$inputHtml->wrapAround($input->property('contents'));\n\n\t\t\t\t\t$labelHtml = new HtmlObject('label');\n\n\t\t\t\t\t$labelHtml->property('for', $inputId)->\n\t\t\t\t\t\tproperty('id', $inputId . '_label');\n\n\t\t\t\t\tif(isset($input->pretext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->pretext);\n\n\t\t\t\t\tif(isset($input->label))\n\t\t\t\t\t{\n\t\t\t\t\t\t$labelHtml->wrapAround($input->label);\n\t\t\t\t\t\tif(isset($input->description))\n\t\t\t\t\t\t\t$labelHtml->property('title', $input->description);\n\t\t\t\t\t}\n\n\t\t\t\t\tif($input->type == 'radio' || $input->type == 'checkbox')\n\t\t\t\t\t\t$inputHtml->addClass('small_input');\n\n\t\t\t\t\tif(isset($input->labelAfter) && $input->labelAfter) {\n\t\t\t\t\t\t$labelHtml->addClass('label_after');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_after');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($inputHtml)->\n\t\t\t\t\t\t\twrapAround($labelHtml);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$labelHtml->addClass('label_before');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_before');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($labelHtml)->\n\t\t\t\t\t\t\twrapAround($inputHtml);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($this->errors[$input->name])) {\n\t\t\t\t\t\t$errorLabel = new HtmlObject('label');\n\t\t\t\t\t\t$errorLabel->addClass('error')->\n\t\t\t\t\t\t\tproperty('for', $inputId)->\n\t\t\t\t\t\t\tproperty('generated', true);\n\t\t\t\t\t\t$errorVal = '';\n\n\t\t\t\t\t\tforeach($this->errors[$input->name] as $error)\n\t\t\t\t\t\t\t$errorVal .= $error . ' ';\n\n\t\t\t\t\t\t$errorLabel->wrapAround(trim($errorVal));\n\t\t\t\t\t\t$controlsDiv->wrapAround($errorLabel);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($input->posttext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->posttext);\n\n\t\t\t\t\tif(!isset($input->noBreak) || $input->noBreak === false)\n\t\t\t\t\t\t$controlsDiv->insertNewHtmlObject('br');\n\n\t\t\t\t\t$hasInputs = true;\n\t\t\t\t}\n\t\t\t}//foreach($this->inputs as $section => $inputs)\n\n\t\t\tif(isset($this->sectionOutro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionOutro[$section])->\n\t\t\t\t\taddClass('fieldset_outro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_outro');\n\n\t\t\tif($hasInputs)\n\t\t\t\t$formHtml->wrapAround($sectionHtml);\n\n\t\t\t$formHtml->property('enctype', $enctype);\n\t\t}\n\n\t\tif(!$this->submitButton && $this->includeSubmit)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('div');\n\t\t\t$sectionHtml->property('id', $this->name . \"_section_\" . 'control');\n\t\t\t$inputHtml = new HtmlObject('input');\n\t\t\t$inputHtml->name = $input->name;\n\t\t\t$inputHtml->property('name', 'Submit')->property('type', 'Submit')->property('value', 'Submit');\n\n\t\t\t$labelHtml = new HtmlObject('label');\n\t\t\t$sectionHtml->wrapAround($labelHtml)->wrapAround($inputHtml)->wrapAround('<br>');\n\t\t\t$formHtml->wrapAround($sectionHtml);\n\t\t}\n\n\t\t$formHtml = (string) $formHtml;\n\n\t\t$output = $this->fullForm\n\t\t\t? (string) $formHtml\n\t\t\t: (string) $sectionHtml;\n\n\t\t$formJsOptions = array();\n\t\t$formJsOptions['validateOnLoad'] = $this->form->wasSubmitted();\n\t\t$jsStartup[] = '$(\"#' . $this->name . '\").MortarForm(' . json_encode($formJsOptions) . ');';\n\n\t\tif(class_exists('ActivePage', false))\n\t\t{\n\t\t\t$page = ActivePage::getInstance();\n\t\t\t$page->addStartupScript($jsStartup);\n\t\t}\n\t\treturn $output;\n\t}", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "protected function _prepareForm()\n {\n // @codingStandardsIgnoreEnd\n $locatorId = $this->getLocator()->getId();\n\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n ['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']]\n );\n\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Settings')]);\n\n $fieldset->addField(\n 'description',\n 'textarea',\n [\n 'name' => 'description',\n 'label' => __('Description'),\n 'title' => __('Description'),\n 'required' => false,\n ]\n );\n\n $fieldset->addField(\n 'extra_info',\n 'textarea',\n [\n 'name' => 'extra_info',\n 'label' => __('Extra Information'),\n 'title' => __('Extra Information'),\n 'required' => false,\n ]\n );\n\n $fieldset->addField(\n 'email',\n 'text',\n [\n 'name' => 'email',\n 'label' => __('Email'),\n 'title' => __('Email')\n ]\n );\n\n $fieldset->addField(\n 'visiting_hours',\n 'text',\n [\n 'name' => 'visiting_hours',\n 'label' => __('Visiting Hours'),\n 'title' => __('Visiting Hours')\n ]\n );\n\n $fieldset->addField(\n 'website',\n 'text',\n [\n 'name' => 'website',\n 'label' => __('Website'),\n 'title' => __('Website')\n ]\n );\n\n $fieldset->addField(\n 'banner',\n 'hidden',\n [\n 'name' => 'banner'\n ]\n );\n\n $locatorId = $this->getLocator()->getId();\n $value = '';\n if ($locatorId) {\n $value = $this->getLocator()->getBanner();\n }\n $fieldset->addField(\n 'banner_locator',\n 'image',\n [\n 'name' => 'banner_locator',\n 'label' => __('Banner'),\n 'title' => __('Banner'),\n 'value' => $value,\n 'note' => __('Allowed image types: jpg, jpeg, gif, png.')\n ]\n );\n\n if ($locatorId) {\n $form->addValues($this->getLocator()->getData());\n }\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "public function init()\n {\n \n \n \n \n $this->setName('Add Pysiciangroup');\n\n\n $this->addElement(\"text\",\"id\",array('label'=>'Physician id :','required'=>true));\n \n $this->addElement(\"text\",\"name\",array('label'=>'physician name:','required'=>TRUE));\n \n \n #$physiciangroupName = new Zend_Form_Element_Text('physiciangroup');\n #$physiciangroupName->setLabel('Physiciangroup Name :')->setAttrib(\"placeholder\", \"Type Name\")\n #->setRequired(true)->addPhysiciangroup('NotEmpty');\n\n # $submit = new Zend_Form_Element_Submit('submit');\n # $submit->setLabel('Add');\n\n \n $this->addElement(\"submit\",\"id\",array('label'=>'Add'));\n \n \n $this->addElements(array($physiciangroupName, $submit));\n \n \n \n \n }", "static function openCollapsableFieldset($legend = null, $attributes = null)\n {\n self::renderOpenTag('fieldset', $attributes);\n if ($legend)\n {\n echo '<legend class=\"collapsable\" onclick=\"this.siblings().shift().toggle();\">';\n echo $legend.'</legend>'.PHP_EOL;\n }\n echo '<ul>';\n }", "public function init() {\n $this->setMethod('post');\n $this->setAction($this->getView()->url());\n $this->_view->headScript()->appendFile($this->_view->baseUrl('media/js/collapsiblefields.js', 'text/javascript'));\n $this->_view->headScript()->appendFile($this->_view->baseUrl('media/js/toggledetails.js', 'text/javascript'));\n $this->_view->headScript()->appendFile($this->_view->baseUrl('media/js/erga/paketaergasias/paradotea.js', 'text/javascript'));\n\n $subform = new Dnna_Form_SubFormBase();\n $subform->setLegend('Στοιχεία Παραδοτέου');\n // Recordid\n $subform->addElement('hidden', 'recordid', array());\n // Κωδικός Παραδοτέου\n $subform->addElement('text', 'codename', array(\n 'label' => 'Κωδικός Παραδοτέου:',\n 'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 15))\n ),\n 'required' => true,\n 'placeholder' => 'πχ. Π.1.1',\n )\n );\n // Τίτλος Παραδοτέου\n $subform->addElement('textarea', 'title', array(\n 'label' => 'Τίτλος Παραδοτέου:',\n 'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, $this->_textareaMaxLength))\n ),\n 'rows' => 1,\n 'cols' => $this->_textareaCols,\n 'required' => true,\n )\n );\n // Ποσό\n $subform->addElement('text', 'amount', array(\n 'label' => 'Ποσό:',\n 'validators' => array(\n array('validator' => 'Float')\n ),\n 'class' => 'formatFloat',\n 'required' => true,\n ));\n // Όρια ανα Κατηγορία Προσωπικού\n $project = $this->_view->getProject();\n if(isset($project) && $project->get_personnelcategories()->count() > 0) {\n $limitsform = new Dnna_Form_SubFormBase($this->_view);\n $i = 1;\n foreach($project->get_personnelcategories() as $curCategory) {\n $curlimitform = new Dnna_Form_SubFormBase($this->_view);\n // Recordid\n $curlimitform->addElement('hidden', 'recordid', array());\n // Id κατηγορίας\n $curlimitcategoryform = new Dnna_Form_SubFormBase($this->_view);\n $curlimitcategoryform->addElement('hidden', 'recordid', array(\n 'value' => $curCategory->get_recordid(),\n ));\n $curlimitform->addSubForm($curlimitcategoryform, 'personnelcategory', false);\n // Limit\n $curlimitform->addElement('text', 'limit', array(\n 'label' => 'Όριο ωρών για '.$curCategory->get_name().':',\n 'validators' => array(\n array('validator' => 'Float')\n ),\n 'required' => false,\n ));\n $curlimitform->set_empty(false);\n $limitsform->addSubForm($curlimitform, $i, false, 'default-limits');\n $i++;\n }\n $subform->addSubForm($limitsform, 'limits', false);\n }\n // Έναρξη\n $subform->addElement('text', 'startdate', array(\n 'label' => 'Ημερομηνία Έναρξης:',\n 'validators' => array(\n array('validator' => 'Date')\n ),\n 'class' => 'usedatepicker',\n 'required' => false,\n ));\n // Λήξη\n $subform->addElement('text', 'enddate', array(\n 'label' => 'Ημερομηνία Λήξης:',\n 'validators' => array(\n array('validator' => 'Date')\n ),\n 'class' => 'usedatepicker',\n 'required' => false,\n ));\n // Εγκριση αναθεσης απο επιτροπη ερευνων\n $subform->addElement('text', 'assignmentapprovaldate', array(\n 'label' => 'Έγκριση Ανάθεσης από Επιτροπή Ερευνών:',\n 'validators' => array(\n array('validator' => 'Date')\n ),\n 'class' => 'usedatepicker',\n ));\n // Εγκριση ολοκλήρωσης απο Επιτροπή Ερευνών\n $subform->addElement('text', 'completionapprovaldate', array(\n 'label' => 'Εγκριση Ολοκλήρωσης απο Επιτροπή Ερευνών:',\n 'validators' => array(\n array('validator' => 'Date')\n ),\n 'class' => 'usedatepicker',\n ));\n\n // Σχόλια\n $subform->addElement('textarea', 'comments', array(\n 'label' => 'Γενικές Πληροφορίες:',\n 'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, $this->_textareaMaxLength))\n ),\n 'rows' => $this->_textareaRows,\n 'cols' => $this->_textareaCols,\n ));\n\n $subsubform = new Dnna_Form_SubFormBase();\n if($this->_view->getSubProject()->get_subprojectdirectlabor() == \"1\") {\n $subsubform->setLegend('Συντάκτες');\n if(($this->_view->getSubProject()->get_employees() != null && count($this->_view->getSubProject()->get_employees()) > 0) ||\n ($this->_view->getProject() != null && $this->_view->getProject()->get_thisprojectemployees() != null && count($this->_view->getProject()->get_thisprojectemployees()) > 0)) {\n $this->addAuthorFields($subsubform, false);\n } else {\n $element = new Application_Form_Element_Note('noauthorsnote', array(\n 'value' => 'Δεν έχουν οριστεί απασχολούμενοι'\n ));\n $subsubform->addElement($element);\n }\n $subform->addSubForm($subsubform, 'authors');\n } else {\n $subsubform->setLegend('Ανάδοχος');\n if($this->_view->getSubProject()->get_contractors() != null && $this->_view->getSubProject()->get_contractors()->count() > 0) {\n $this->addContractorFields($subsubform, false);\n } else {\n $element = new Application_Form_Element_Note('noauthorsnote', array(\n 'value' => 'Δεν έχουν οριστεί ανάδοχοι'\n ));\n $subsubform->addElement($element);\n }\n $subform->addSubForm($subsubform, 'contractor');\n }\n $this->addSubForm($subform, 'default');\n $this->addSubmitFields();\n }", "public function __construct($legend = null, $content = null) {\n parent::__construct('fieldset', $content);\n $this->legend = $legend;\n if ($legend !== null) {\n $this->setLegend($legend);\n }\n }", "public function init()\n {\n $this->addAttribs(array(\"class\" => \"form-horizontal\"))\n ->setDecorators(array(\n 'FormElements',\n 'Form'\n )); \n $this->addElement('hidden','idarticles'); \n \n $article_title = $this->createElement('text','article_title');\n $article_title->setLabel(\"Họ tên :\")\n ->setRequired()\n ->setAttribs(array(\"class\"=>\"large\"))\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($article_title); \n \n $article_alias = $this->createElement('text','article_alias');\n $article_alias->setLabel(\"Yahoo :\")\n ->setRequired()\n ->setAttribs(array(\"class\"=>\"large\"))\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($article_alias); \n\t\t\n\t\t\n $article_detail = $this->createElement('text','article_detail');\n $article_detail->setLabel(\"Skype :\")\n ->setRequired()\n ->setAttribs(array(\"class\"=>\"large\"))\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($article_detail); \n\t\t\n $article_description = $this->createElement('text','article_description');\n $article_description->setLabel(\"Số điện thoại :\")\n ->setRequired()\n ->setAttribs(array(\"class\"=>\"large\"))\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($article_description); \n \n $submit = $this->createElement(\"submit\",\"submit\");\n $submit->setLabel(\"Thêm\"); \n $this->addElement($submit); \n }", "public function modify(Fieldset $fieldset);", "public static function fieldset_close() {\n\t\t\treturn '</fieldset>';\n\t\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "private function createFieldset(Form $form)\n {\n $fieldset = $form->addFieldset(\n 'elasticsuite_cms_attribute_fieldset',\n [\n 'legend' => __('Search Configuration'),\n ],\n 'content_fieldset'\n );\n\n return $fieldset;\n }", "function visual_group_start( $element )\n\t\t{\t\n\t\t\t$required = $extraclass = $data= \"\";\n\t\t\t\n\t\t\tif(isset($element['required'])) \n\t\t\t{ \n\t\t\t\t$required = '<input type=\"hidden\" value=\"'.$element['required'][0].'::'.$element['required'][1].'\" class=\"ace_required\" />'; \n\t\t\t\t$extraclass = ' ace_hidden ace_required_container';\n\t\t\t} \n\t\t\t\n\t\t\tif(isset($element['name'])) $data = \"data-group-name='\".$element['name'].\"'\";\n\t\t\tif(isset($element['inactive'])) { $data .= \" data-group-inactive='\".$element['inactive'].\"'\"; $extraclass .= \" inactive_visible\";}\n\n\t\t\n\t\t\t$output = '<div class=\"ace_visual_set ace_'.$element['type'].$extraclass.' '.$element['class'].'\" id=\"'.$element['id'].'\" '.$data.'>';\n\t\t\t$output .= $required;\n\t\t\t\t\n\t\t\treturn $output;\n\t\t}", "protected function createComponentAddGroupForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$tar = new Tarif;\r\n\t\t$id_set_tarifu = $this->getParam('id');\r\n\t\t$data = $tar->getTypesTarif($id_set_tarifu)->fetchAll();\r\n\t\t$container = $form->addContainer('mpole');\r\n\t\t$i = 0;\r\n\t\tforeach($data as $k => $v){\r\n\t\t\t$i++;\r\n\t\t\t$container->addText('tarif_'.$i, 'Tarifní sazba:')->setValue($v['tarif'])\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype\r\n\t\t\t\t\t\t->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\t\t\t$container->addText('hodnota_'.$i, 'Kalk. hodnota:')->setValue($v['hodnota'])\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype\r\n\t\t\t\t\t\t->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\t\t\t\r\n\t\t\t$container->addHidden('tarf_'.$i)->setValue($v['tarif']);\r\n\t\t\t$container->addHidden('hodn_'.$i)->setValue($v['hodnota']);\r\n\t\t\t$container->addHidden('idto_'.$i)->setValue($v['idto']);\r\n\t\t\t$container->addHidden('idso_'.$i)->setValue($v['idso']);\r\n\t\t}\r\n\t\t$form->addHidden('id_set_tarifu')->setValue($id_set_tarifu);\r\n\t\t$form->addSubmit('save', 'Uložit')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('saveas', 'Uložit jako kopii');\r\n\t\t$form->addSubmit('cancel', 'Storno')->setValidationScope(FALSE);\r\n\t\t$form->onSuccess[] = callback($this, 'groupoFormSubmitted');\r\n\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "public function definition() {\n\t\t\tglobal $CFG, $DB;\t\n\t\t\n\t\t$mform = $this->_form; // Don't forget the underscore!\n\t\n\t\t$result= $DB->get_records_sql(\"SELECT DISTINCT `intensidad` FROM `mdl_ejercicios`\");\n\t\t$result_tren= $DB->get_records_sql(\"SELECT DISTINCT `categoria` FROM `mdl_ejercicios`\");\n\t\t$options= array();\n\t\tforeach($result as $rs)\n\t\t\t\t$options[$rs->intensidad] = $rs->intensidad;\n\t\t\n\t\t$options_tren= array();\n\t\tforeach ($result_tren as $rst)\n\t\t\t$options_tren[$rst->categoria]= $rst->categoria;\n\t\t$mform->addElement('header', 'header', 'Para crear una rutina aleatoria');\n\t\t\n\t\t$mform->addElement('select', 'intensidad', '¿Qué intensidad quieres?:',$options);\n\n\t\t//$mform->addElement('select', 'categoria', '¿Qué tren de tu cuerpo quieres trabajar?:',$options_tren);\n\t\t\n\t\t\n\t\t$buttonarray=array();\n\t\t$buttonarray[] = &$mform->createElement('submit', 'submitbutton', 'Buscar rutina');\n\t\t$buttonarray[] = &$mform->createElement('reset', 'resetbutton', 'Resetear');\n\t\t$buttonarray[] = &$mform->createElement('cancel', 'cancel', 'Cancelar');\n\t\t$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);\n\t\t$mform->addElement('hidden', 'end');\n\t\t$mform->setType('end', PARAM_NOTAGS);\n\t\t$mform->closeHeaderBefore('end');\n\t}", "private function addElements(): void\n {\n // Add additional form fields\n $this->add([\n 'name' => 'masterFile',\n 'type' => Checkbox::class,\n 'attributes' => [\n 'id' => 'masterFile',\n 'class' => 'form-check-input',\n ],\n 'options' => [\n 'label' => 'Create master export file',\n 'label_attributes' => [\n 'class' => 'form-check-label',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'debugTranslations',\n 'type' => Checkbox::class,\n 'attributes' => [\n 'id' => 'debugTranslations',\n 'class' => 'form-check-input',\n ],\n 'options' => [\n 'label' => 'Create debug translations',\n 'label_attributes' => [\n 'class' => 'form-check-label',\n ],\n ],\n ]);\n }", "public function addform()\n\t{\n\t\t\t$this->setMethod('post');\n\n\t\t\t\n\t\t\t$this->addElement('radio', 'status', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'multiOptions' => array(\n\t\t\t\t\t'1' => IN_PROGRESS,\n\t\t\t\t\t'2' => 'Closed'\n\t\t\t\t\t\n\t\t\t\t),\n\t\t\t\t'value' => '1' //key of multiOption\n\t\t\t));\n\t\t\n\t\t\n\n\t\t\t$this->addElement('textarea', 'Comment', array( \n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'maxlength' =>'50',\n\t\t\t\t\t\n\t\t\t\t\t'class' => 'validate[required] text-input',\n\t\t\t\t\t'decorators'=>Array(\n\t\t\t\t\t\t'ViewHelper','Errors'\n\t\t\t\t\t),\t\t \n\t\t\t));\n\n\t\t\t\n\n\t\t\t\n\n\n\t\n\t\t\t\t\n\t\t\t$this->addElement('submit', 'submit', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t\t\t'label' => 'Submit',\n\t\t\t));\n\t\t\t\n\t\t\t// And finally add some CSRF protection\n\t\t\t$this->addElement('hash', 'csrf', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t));\t\n\t}", "public function initSetPageLayoutForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\t\t\n\t\tif (is_array($_POST[\"id\"]))\n\t\t{\n\t\t\tforeach ($_POST[\"id\"] as $id)\n\t\t\t{\n\t\t\t\t$hi = new ilHiddenInputGUI(\"id[]\");\n\t\t\t\t$hi->setValue($id);\n\t\t\t\t$this->form->addItem($hi);\n\t\t\t}\n\t\t}\n\t\t$layout = ilObjContentObjectGUI::getLayoutOption($lng->txt(\"cont_layout\"), \"layout\",\n\t\t\t$this->content_object->getLayout());\n\n\t\t$this->form->addItem($layout);\n\t\n\t\t$this->form->addCommandButton(\"savePageLayout\", $lng->txt(\"save\"));\n\t\t$this->form->addCommandButton(\"showHierarchy\", $lng->txt(\"cancel\"));\n\t\t\n\t\t$this->form->setTitle($lng->txt(\"cont_set_layout\"));\n\t\t$this->form->setFormAction($ilCtrl->getFormAction($this));\n\t \n\t}", "public function addMetaFieldsToEditForm()\n\t{\n\t\t$interval = $this->getMetaFields('interval');\n\t\t$animation = $this->getMetaFields('animation');\n\n\t\t?>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t<label for=\"interval\">Tijd tussen slides</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input name=\"interval\" id=\"interval\" type=\"text\" value=\"<?php echo $interval;?>\" size=\"40\">\n\t\t\t\t\t<p class=\"description\">De tijd tussen slides in milliseconden (1000ms = 1s).</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t<label for=\"animation\">Animatie</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<select name=\"animation\" id=\"animation\">\n\t\t\t\t\t\t<option <?php selected($animation, 'slide'); ?> value=\"slide\">Slide</option>\n\t\t\t\t\t\t<option <?php selected($animation, 'fade'); ?> value=\"fade\">Fade</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<p class=\"description\">Selecteer de animatie die gebruikt wordt door de slideshow.</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php\n\t}", "function _renderBeginInactive($name)\n {\n echo '<fieldset class=\"horde-form\" id=\"fieldset_' . htmlspecialchars($this->_name) . '\">';\n if ($this->_showHeader) {\n $this->_renderSectionHeader($name);\n }\n }", "public function addform()\n\t{\n\t\t\t$this->setMethod('get');\n\n\t\t\t//echo \"<pre>\";\n\t\t\t//print_r($_GET);\n\t\t\t//echo \"</pre>\";\n\t\t\t$this->addElement('radio', 'Status', array(\n\t\t\t\t'required' => true,\n 'separator' => '&nbsp;',\n\t\t\t\t'multiOptions' => array(\n\t\t\t\t\t'1' => IN_PROGRESS,\n\t\t\t\t\t'2' => 'Closed'\n\t\t\t\t\t\n\t\t\t\t),\n\t\t\t\t\t'separator' => '',\n\t\t\t\t'value' => '1' //key of multiOption\n\t\t\t));\n\n\t\t\n\t\t\n\t\t$this->addElement ( \n 'multiCheckbox', 'Functional_type', \n array (\n \n\t\t//'setrequired' => true,\n 'multiOptions' => array(\n '1' => 'Pre Installation',\n '2' => 'Installation',\n '3' => 'Post Installation'\n \n ),\n 'separator' => '',\n\t\t\t\t\t//'value' => '2' // select these 2 values\n )\n);\n\t\n\t\t\t\t\n\t\t\t$this->addElement('submit', 'submit', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t\t\t'label' => 'Submit',\n\t\t\t));\n\t\t\t\n\t\t\t// And finally add some CSRF protection\n\t\t\t$this->addElement('hash', 'csrf', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t));\t\n\t}", "public function addElementAtStart(IElement $element): IFormBuilder;", "public function createForm();", "public function createForm();", "function _setFormElements() {\n\t\t$jobCategories = $this->Job->JobCategory->find('list');\n\t\t$jobLocations = $this->Job->JobLocation->find('list');\n\t\t$this->set(compact('jobCategories', 'jobLocations'));\n\t}", "static function closeFieldset()\n {\n echo '</ul>';\n echo '</fieldset>'.PHP_EOL;\n }", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 1px solid\") ;\r\n\r\n $table->add_row($this->element_label(\"Organization\"),\r\n $this->element_form(\"Organization\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Name\"),\r\n $this->element_form(\"Meet Name\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Address 1\"),\r\n $this->element_form(\"Meet Address 1\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Address 2\"),\r\n $this->element_form(\"Meet Address 2\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet State\"),\r\n $this->element_form(\"Meet State\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Postal Code\"),\r\n $this->element_form(\"Meet Postal Code\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Country\"),\r\n $this->element_form(\"Meet Country\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Code\"),\r\n $this->element_form(\"Meet Code\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Start\"),\r\n $this->element_form(\"Meet Start\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet End\"),\r\n $this->element_form(\"Meet End\")) ;\r\n\r\n $table->add_row($this->element_label(\"Pool Altitude\"),\r\n $this->element_form(\"Pool Altitude\")) ;\r\n\r\n $table->add_row($this->element_label(\"Course Code\"),\r\n $this->element_form(\"Course Code\")) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "public function definition()\n {\n $mform = $this->_form;\n $data = $this->_customdata;\n if (isset($data['subjects']) && !empty($data['subjects']) && is_array($data['subjects'])) {\n foreach ($data['subjects'] as $subject) {\n $mform->addElement('text', $subject->name, ucfirst($subject->name));\n $mform->setType($subject->name, PARAM_INT);\n $mform->setDefault($subject->name, $subject->mark);\n $mform->addRule($subject->name, get_string('error_validate', 'block_subject') , 'rangelength', array(0, 10), true);\n $mform->addRule($subject->name, get_string('error_validate', 'block_subject') , 'required', null, true);\n $mform->addRule($subject->name, get_string('error_validate', 'block_subject') , 'numeric', null, true);\n }\n }\n $this->add_action_buttons();\n }", "public function Form() {\n\t\t$fields = new FieldSet();\n\t\t$fieldValidation = array();\n\t\t$fieldValidationRules = array();\n\t\t$CustomDisplayRules = \"\";\n\t\t$defaults = \"\";\n\t\t$this->SubmitButtonText = ($this->SubmitButtonText) ? $this->SubmitButtonText : _t('UserDefinedForm.SUBMITBUTTON', 'Submit');\n\t\tif($this->Fields()) {\n\t\t\tforeach($this->Fields() as $field) {\n\t\t\t\n\t\t\t\t$fieldToAdd = $field->getFormField();\n\t\t\t\t\n\t\t\t\tif(!$fieldToAdd) break;\n\t\t\t\t\n\t\t\t\t$fieldValidationOptions = array();\n\t\t\t\t\n\t\t\t\t// Set the Error Messages\n\t\t\t\t$errorMessage = sprintf(_t('Form.FIELDISREQUIRED').'.', strip_tags(\"'\". ($field->Title ? $field->Title : $field->Name) . \"'\"));\n\t\t\t\t$errorMessage = ($field->CustomErrorMessage) ? $field->CustomErrorMessage : $errorMessage;\n\t\t\t\t$fieldToAdd->setCustomValidationMessage($errorMessage);\n\t\t\t\t\n\t\t\t\t// Is this field required\n\t\t\t\tif($field->Required) {\n\t\t\t\t\t$fieldValidation[$field->Name] = $errorMessage;\n\t\t\t\t\t$fieldValidationOptions['required'] = true;\n\t\t\t\t\t$fieldToAdd->addExtraClass('requiredField');\n\t\t\t\t\tif(UserDefinedForm::$required_identifier) {\n\t\t\t\t\t\t$title = $fieldToAdd->Title() .\" <span class='requiredIdentifier'>\". UserDefinedForm::$required_identifier . \"</span>\";\n\t\t\t\t\t\t$fieldToAdd->setTitle($title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Add field to the form\n\t\t\t\t$fields->push($fieldToAdd);\n\t\t\t\t\n\t\t\t\t// Ask our form field for some more information on hour it should be validated\n\t\t\t\t$fieldValidationOptions = array_merge($fieldValidationOptions, $field->getValidation());\n\t\t\t\t\n\t\t\t\t// Check if we have need to update the global validation\n\t\t\t\tif($fieldValidationOptions) {\n\t\t\t\t\t$fieldValidationRules[$field->Name] = $fieldValidationOptions;\n\t\t\t\t}\n\t\t\t\t$fieldId = $field->Name;\n\t\t\t\t\n\t\t\t\tif($field->ClassName == 'EditableFormHeading') { \n\t\t\t\t\t$fieldId = 'Form_Form_'.$field->Name;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Is this Field Show by Default\n\t\t\t\tif(!$field->ShowOnLoad) {\n\t\t\t\t\t$defaults .= \"$(\\\"#\" . $fieldId . \"\\\").hide();\\n\";\n\t\t\t\t}\n\n\t\t\t\t// Check for field dependencies / default\n\t\t\t\tif($field->Dependencies()) {\n\t\t\t\t\tforeach($field->Dependencies() as $dependency) {\n\t\t\t\t\t\tif(is_array($dependency) && isset($dependency['ConditionField']) && $dependency['ConditionField'] != \"\") {\n\t\t\t\t\t\t\t// get the field which is effected\n\t\t\t\t\t\t\t$formName = Convert::raw2sql($dependency['ConditionField']);\n\t\t\t\t\t\t\t$formFieldWatch = DataObject::get_one(\"EditableFormField\", \"\\\"Name\\\" = '$formName'\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!$formFieldWatch) break;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// watch out for multiselect options - radios and check boxes\n\t\t\t\t\t\t\tif(is_a($formFieldWatch, 'EditableDropdown')) {\n\t\t\t\t\t\t\t\t$fieldToWatch = \"$(\\\"select[name='\".$dependency['ConditionField'].\"']\\\")\";\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// watch out for checkboxs as the inputs don't have values but are 'checked\n\t\t\t\t\t\t\telse if(is_a($formFieldWatch, 'EditableCheckboxGroupField')) {\n\t\t\t\t\t\t\t\t$fieldToWatch = \"$(\\\"input[name='\".$dependency['ConditionField'].\"[\".$dependency['Value'].\"]']\\\")\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$fieldToWatch = \"$(\\\"input[name='\".$dependency['ConditionField'].\"']\\\")\";\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// show or hide?\n\t\t\t\t\t\t\t$view = (isset($dependency['Display']) && $dependency['Display'] == \"Hide\") ? \"hide\" : \"show\";\n\t\t\t\t\t\t\t$opposite = ($view == \"show\") ? \"hide\" : \"show\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// what action do we need to keep track of. Something nicer here maybe?\n\t\t\t\t\t\t\t// @todo encapulsation\n\t\t\t\t\t\t\t$action = \"change\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($formFieldWatch->ClassName == \"EditableTextField\" || $formFieldWatch->ClassName == \"EditableDateField\") {\n\t\t\t\t\t\t\t\t$action = \"keyup\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// is this field a special option field\n\t\t\t\t\t\t\t$checkboxField = false;\n\t\t\t\t\t\t\tif(in_array($formFieldWatch->ClassName, array('EditableCheckboxGroupField', 'EditableCheckbox'))) {\n\t\t\t\t\t\t\t\t$action = \"click\";\n\t\t\t\t\t\t\t\t$checkboxField = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// and what should we evaluate\n\t\t\t\t\t\t\tswitch($dependency['ConditionOption']) {\n\t\t\t\t\t\t\t\tcase 'IsNotBlank':\n\t\t\t\t\t\t\t\t\t$expression = ($checkboxField) ? '$(this).attr(\"checked\")' :'$(this).val() != \"\"';\n\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'IsBlank':\n\t\t\t\t\t\t\t\t\t$expression = ($checkboxField) ? '!($(this).attr(\"checked\"))' : '$(this).val() == \"\"';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'HasValue':\n\t\t\t\t\t\t\t\t\t$expression = ($checkboxField) ? '$(this).attr(\"checked\")' : '$(this).val() == \"'. $dependency['Value'] .'\"';\n\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'ValueLessThan':\n\t\t\t\t\t\t\t\t\t$expression = '$(this).val() < parseFloat(\"'. $dependency['Value'] .'\")';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'ValueLessThanEqual':\n\t\t\t\t\t\t\t\t\t$expression = '$(this).val() <= parseFloat(\"'. $dependency['Value'] .'\")';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'ValueGreaterThan':\n\t\t\t\t\t\t\t\t\t$expression = '$(this).val() > parseFloat(\"'. $dependency['Value'] .'\")';\n\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'ValueGreaterThanEqual':\n\t\t\t\t\t\t\t\t\t$expression = '$(this).val() >= parseFloat(\"'. $dependency['Value'] .'\")';\n\n\t\t\t\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t$expression = ($checkboxField) ? '!($(this).attr(\"checked\"))' : '$(this).val() != \"'. $dependency['Value'] .'\"';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// put it all together\n\t\t\t\t\t\t\t$CustomDisplayRules .= $fieldToWatch.\".$action(function() {\n\t\t\t\t\t\t\t\tif(\". $expression .\" ) {\n\t\t\t\t\t\t\t\t\t$(\\\"#\". $fieldId .\"\\\").\".$view.\"();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t$(\\\"#\". $fieldId .\"\\\").\".$opposite.\"();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';\n\t\t\n\t\t// Keep track of the referer\n\t\t$fields->push( new HiddenField( \"Referrer\", \"\", $referer ) );\n\t\t\t\t\n\t\t// Build actions\n\t\t$actions = new FieldSet(\n\t\t\tnew FormAction(\"process\", $this->SubmitButtonText)\n\t\t);\n\t\t\n\t\t// Do we want to add a clear form.\n\t\tif($this->ShowClearButton) {\n\t\t\t$actions->push(new ResetFormAction(\"clearForm\"));\n\t\t}\n\t\t\n\t\t// return the form\n\t\t$form = new Form($this, \"Form\", $fields, $actions, new RequiredFields(array_keys($fieldValidation)));\n\t\t$form->loadDataFrom($this->failover);\n\t\t\n\t\t$FormName = $form->FormName();\n\n\t\t// Set the Form Name\n\t\t$rules = $this->array2json($fieldValidationRules);\n\t\t$messages = $this->array2json($fieldValidation);\n\t\t\n\n\t\t// set the custom script for this form\n\t\tRequirements::customScript(<<<JS\n\t\t\t(function($) {\n\t\t\t\t$(document).ready(function() {\n\t\t\t\t\t$defaults\n\t\t\t\t\t$(\"#$FormName\").validate({\n\t\t\t\t\t\terrorClass: \"required\",\t\n\t\t\t\t\t\tmessages:\n\t\t\t\t\t\t\t$messages\n\t\t\t\t\t\t,\n\t\t\t\t\t\t\n\t\t\t\t\t\trules: \n\t\t\t\t\t\t \t$rules\n\t\t\t\t\t});\n\t\t\t\t\t$CustomDisplayRules\n\t\t\t\t});\n\t\t\t})(jQuery);\nJS\n);\n\n\t\treturn $form;\n\t}" ]
[ "0.72612387", "0.70918363", "0.67148805", "0.6539373", "0.6515504", "0.65149856", "0.64871615", "0.64215577", "0.64053863", "0.6384635", "0.63710517", "0.6319396", "0.6310746", "0.6280865", "0.6271539", "0.62677824", "0.6244518", "0.6211821", "0.6207928", "0.6198854", "0.6196508", "0.6195861", "0.61845386", "0.6166934", "0.61446655", "0.6140341", "0.61317366", "0.61229086", "0.61134696", "0.6096228", "0.6091428", "0.6067354", "0.6057207", "0.605168", "0.6034811", "0.60257787", "0.5993401", "0.59824115", "0.59500825", "0.5909758", "0.58915186", "0.584518", "0.5842915", "0.58321506", "0.58292073", "0.58211243", "0.58170754", "0.5806219", "0.5789575", "0.57853055", "0.57824874", "0.5781627", "0.5778192", "0.57748574", "0.5757437", "0.5754311", "0.574355", "0.5739642", "0.5736601", "0.5731132", "0.5728131", "0.5702035", "0.5696401", "0.5695065", "0.56908774", "0.56878203", "0.5669635", "0.5648811", "0.5646866", "0.5646132", "0.5643998", "0.56422067", "0.56420016", "0.5641541", "0.56385285", "0.56378937", "0.56309867", "0.56249726", "0.56179106", "0.56083554", "0.56003886", "0.55968994", "0.55961084", "0.55931574", "0.5580569", "0.5577484", "0.55727696", "0.5565145", "0.5559363", "0.555761", "0.5554517", "0.5549255", "0.55414027", "0.5540304", "0.5540304", "0.5539153", "0.5534705", "0.5522741", "0.5520269", "0.5519499" ]
0.7040626
2
End a fieldset in the form
public function end_fieldset() { $fs_attrs = array('marker' => 'end'); $fieldset = new GenElement('fieldset', '', $fs_attrs); array_push($this->form_elements, array($fieldset->render(1), 0, 'fieldset')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function end_fieldset()\n\t{\n\t\tif( $this->has_fieldset )\n\t\t\t$this->buffer.= '</fieldset>';\n\t\t$this->has_fieldset = false;\n\t}", "public static function fieldset_close() {\n\t\t\treturn '</fieldset>';\n\t\t}", "static function closeFieldset()\n {\n echo '</ul>';\n echo '</fieldset>'.PHP_EOL;\n }", "public function create_fieldset_end()\n\t{\n\t\treturn '</fieldset>'.\"\\n\";\n\t}", "public function endFieldset() {\n $this->_currentFieldset = NULL;\n }", "public static function renderCloseFieldset();", "public static function endForm(){\n\t\treturn '</form>';\n\t}", "public function RenderFormEnd() {\n\n return '</form>';\n }", "abstract public function closeFieldset();", "public function end()\n {\n $this->associatedEntity = null;\n\n return \"</form>\";\n }", "public function close()\n {\n $this->form = null;\n $this->fields = null;\n\n return '</form>';\n }", "public static function form_close() {\n\t\t\treturn '</form>';\n\t\t}", "static function closeForm()\n {\n echo '</form>'.PHP_EOL;\n }", "abstract public function closeEmptyFieldset();", "public static function end_form_tag()\n {\n return '</form>';\n }", "public static function close(){\n\t\t\treturn '</form>';\n\t\t}", "public function close()\n {\n return '</form>';\n }", "public function close()\n {\n return '</form>';\n }", "public function closeForm()\n {\n return \"</form>\";\n }", "public function close()\n\t{\n\t\treturn '</form>';\n\t}", "function formFooter(){\r\n\r\n\t\t$ret = '</form>';\r\n\r\n\t\treturn $ret;\r\n\t}", "public function divEnd(): FormHelper\n {\n $this->html .= \"</div>\";\n\n return $this;\n }", "function field_close() {\n\t\t\t\n\t\t\treturn $this->form['markup'] === 'xhtml' ? ' />' : '>';\n\t\t\t\n\t}", "public static function close()\n\t{\n\t\treturn '</form>';\n\t}", "public static function easyFormEnd($closeDiv = true)\n {\n echo '<input type=\"hidden\" name=\"task\" value=\"\" />'.NL;\n echo '<input type=\"hidden\" name=\"controller\" '\n .'value=\"'.JRequest::getCmd('controller').'\" />'.NL;\n echo '<input type=\"hidden\" name=\"view\" '\n .'value=\"'.JRequest::getCmd('view').'\" />'.NL;\n echo '<input type=\"hidden\" name=\"file_name\" id=\"file_name\" '\n .'value=\"'.JRequest::getVar('file_name').'\" />'.NL;\n echo '<input type=\"hidden\" name=\"file_path\" id=\"file_path\" '\n . 'value=\"'.JRequest::getVar('file_path').'\" />'.NL;\n echo '</form>'.NL;\n\t echo($closeDiv) ? '</div>'.NL : '';\n echo '<div style=\"clear: both\"></div>'.NL;\n }", "function closeForm()\r\n\t\t{\r\n\t\t\t# Open form and configure\r\n\t\t\techo \"</form>\";\r\n\t\t}", "public function closeTag()\n {\n return '</form> </div></div>';\n }", "function form_end($text = '') {\n $output = '';\n if(!empty($text)) {\n $output .= form_submit($text);\n }\n\n $output .= '</form>';\n\n return html__output($output);\n}", "function formEnd(){\n \n $form = '</form>';\n\n echo $form;\n}", "public function endForm()\r\n {\r\n echo '<div class=\"panel-footer\">\r\n <input type=\"submit\" class=\"btn btn-primary btn-sm\" value=\"Vote\" />\r\n </div>\r\n </form>';\r\n }", "public function addElementAtEnd(IElement $element): IFormBuilder;", "function ninja_forms_display_close_fields_wrap( $form_id ){\n\t?>\n\t</div>\n\t<?php\n}", "public static function formEnd($options = array()) {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $options);\n\n\t\t$options = self::_applyFilter(get_class(), __FUNCTION__, $options, array('event' => 'args'));\n\n\t\t$input = '</form>';\n\n\t\treturn $input;\n\t}", "function finish_form($force_stage = false)\n\t{\n\t\tglobal $e_forms;\n\t\tif($this->previous_steps)\n\t\t{\n\t\t\t$e_forms->add_hidden_data(\"previous_steps\", base64_encode(serialize($this->previous_steps)));\n\t\t}\n\t\t$e_forms->add_hidden_data(\"stage\", ($force_stage ? $force_stage : ($this->stage + 1)));\n\t}", "function close_form($tabs = 0)\n{\n close_tag('form', Tab($tabs), true) ;\n}", "private function addEditFormAfterContent() {\n\t\t// this div is opened when encapsulating the default editor in addEditFormBeforeContent.\n\t\treturn '</div><div style=\"clear: both\"></div>';\n\t}", "public function finForm(): self\n {\n $this->formCode .= '</form>';\n return $this;\n }", "public function renderFormClose()\n {\n if ( !empty( $this->viewState ) )\n $this->renderInput( 'hidden', '__viewState', $this->saveViewState() );\n echo \"</div></form>\\n\";\n }", "public function blockEnd() {\n $this->outputEditmode('</div>');\n }", "public function generateFormClose() {\n\t\t$form = '';\n\t\t// add hidden fields\n\t\t$hidden_fields = $this->getHiddenFields();\n\t\tforeach ( $hidden_fields as $field => $value ) {\n\t\t\t$form .= Html::hidden( $field, $value );\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'form' ); // close form 'payment'\n\t\t$form .= $this->generateDonationFooter();\n\t\t$form .= Xml::closeElement( 'td' );\n\t\t$form .= Xml::closeElement( 'tr' );\n\t\t$form .= Xml::closeElement( 'table' );\n\t\treturn $form;\n\t}", "function section_close() {\n $this->doc .= DOKU_LF.'</div>'.DOKU_LF;\n }", "public function end()\n {\n $name = 'contentFor' . Horde_String::ucfirst($this->_name);\n $this->_view->$name = parent::end();\n }", "function section_end()\n\t\t{\n\t\t\t$output = '</div>'; // <!--end ace_control-->\n\t\t\t$output .= '<div class=\"ace_clear\"></div>';\n\t\t\t$output .= '</div>'; //<!--end ace_control_container-->\n\t\t\t$output .= '</div>'; //<!--end ace_section-->\n\t\t\treturn $output;\n\t\t}", "public function end ( \\r8\\Form $form )\n {\n $formTpl = clone $this->formTpl;\n\n $formTpl->set( \"form\", $form->__toString() );\n $formTpl->set( \"hidden\", $form->getHiddenHTML() );\n $formTpl->set( \"fields\", $this->fields );\n $formTpl->set( \"isValid\", $form->isValid() );\n $formTpl->set( \"isFormValid\", $form->isFormValid() );\n $formTpl->set( \"showErrors\", $this->showErrors );\n $formTpl->set( \"errors\", $this->getErrorTpl( $form->validateForm() ) );\n\n return $formTpl;\n }", "function do_delete(){\n\t\t// remove from fieldset:\n\t\t$fieldset = jcf_fieldsets_get( $this->fieldset_id );\n\t\tif( isset($fieldset['fields'][$this->id]) )\n\t\t\tunset($fieldset['fields'][$this->id]);\n\t\tjcf_fieldsets_update( $this->fieldset_id, $fieldset );\n\t\t\n\t\t// remove from fields array\n\t\tjcf_field_settings_update($this->id, NULL);\n\t}", "public function control_close()\n\t{\n\t\t$this->controls_opened = $this->line_opened = false;\n\t\treturn \"</div>\\n</div>\"; // close .controls div\n\t}", "public function stepEnd($data, $form)\n {\n $btnPrev = $this->compileButtons($data['settings']);\n ?>\n <div class=\"ff-t-container ff-inner_submit_container ff-column-container ff_columns_total_2\">\n <div class=\"ff-t-cell ff-t-column-1\"><?php echo $btnPrev; ?></div>\n <div class=\"ff-t-cell ff-t-column-2\"><?php do_action('fluentform_render_item_submit_button', $form->fields['submitButton'], $form); ?></div>\n </div>\n </div></div></div>\n <?php\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 }", "function close_form($no_link_back=false, $equery=false) {\r\n\t\tparent::close_form($no_link_back,$equery);\r\n\t\tglobal $percorso;\r\n\t\t$percorso.=$this->percorso_agg;\r\n\t}", "public function BuildEndForm($action) {\n echo \"<INPUT TYPE='hidden' NAME='action' VALUE='$action'>\"; // this is coded in \n echo \"<p class='submit'> <input type='submit' value='Submit' /></p>\"; \n echo \"</fieldset>\"; \n echo \"</FORM>\"; \n }", "public function break(): FormHelper\n {\n $this->html .= \"<br>\";\n return $this;\n }", "public function finishSectionEdit($end = null) {\n list($id, $start, $type, $title) = array_pop($this->sectionedits);\n if(!is_null($end) && $end <= $start) {\n return;\n }\n $this->doc .= \"<!-- EDIT$id \".strtoupper($type).' ';\n if(!is_null($title)) {\n $this->doc .= '\"'.str_replace('\"', '', $title).'\" ';\n }\n $this->doc .= \"[$start-\".(is_null($end) ? '' : $end).'] -->';\n }", "function visual_group_end()\n\t\t{\t\t\t\n\t\t\t$output = '</div>';\n\t\t\treturn $output;\n\t\t}", "public function close() {\n\t\treturn Kohana_Form::close();\n\t}", "static function end_html( $html, $meta, $field )\r\n\t\t{\r\n\t\t\t$html = '';\r\n\r\n\t\t\treturn $html;\r\n\t\t}", "static function end_html( $html, $meta, $field )\r\n\t\t{\r\n\t\t\t$html = '';\r\n\r\n\t\t\treturn $html;\r\n\t\t}", "function _field_grouped_fieldset ($fval) {\n\n $res = '';\n $setName = $this->name;\n\n // how many sets to show to begin w/?\n if (!empty($fval) and is_array($fval))\n $numsets = count($fval);\n\t\telse\n\t\t\t$numsets = (isset($this->attribs['numsets']))? $this->attribs['numsets'] : 1;\n\n $hiddens = '';\n $res .= \"<div id=\\\"proto_{$setName}\\\" data-numsets=\\\"{$numsets}\\\" data-setname=\\\"{$setName}\\\" class=\\\"formex_group\\\" style=\\\"display: none; margin:0; padding: 0\\\">\n <fieldset class=\\\"formex_grouped_fieldset {$this->element_class}\\\"><ul>\";\n\t\t\t\t\t\n\n foreach ($this->opts as $name => $parms) {\n\t\t\t$newelem = new formex_field($this->fex, $name, $parms);\n\n\t\t\t$res .= '<li>';\n\t\t\tif ($newelem->type != 'hidden') {\n\t\t\t\t$res .= $this->fex->field_label($newelem);\n\t\t\t\t$res .= $newelem->get_html('');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$hiddens = $newelem->get_html('');\n\t\t\t}\n\t\t\t$res .= '</li>';\n }\n\n $res .= \"</ul>$hiddens</fieldset></div>\";\n\n $labelclass = (!empty($this->attribs['enable_showhide']))? 'enable_showhide' : '';\n\n /* \"+\" and \"-\" controls for adding and removing sets */\n $res .= \"<span id=\\\"fieldsetControl$setName\\\" data-setname=\\\"$setName\\\" class=\\\"controls {$this->element_class}\\\">\";\n\t\t$res .= \"<label class=\\\"$labelclass\\\">{$this->descrip}</label>\";\n\t\t$res .= '<a href=\"#\" class=\"add\">+</a> <a href=\"#\" class=\"sub\">&ndash;</a></span>';\n\n\t\t$res .= \"<script type=\\\"text/javascript\\\">\n\t\t\t\t\t\tvar formex_groupvalues = formex_groupvalues || [];\n\t\t\t\t\t\tformex_groupvalues['{$setName}'] = \".json_encode($fval).\";\n\t\t\t\t</script>\";\n return $res;\n }", "static function end_html( $meta, $field )\n\t\t{\n\t\t\treturn '';\n\t\t}", "public function _end_block()\n\t{\n\t\t//echo '</table>';\n\t}", "function structure()\n {\n $form = new Apeform(0, 0, false);\n $form->hidden(\"structure\", \"method\");\n $form->hidden($this->table->tablename(), \"table\");\n $field = &$form->hidden($this->GET('method') == \"structure\" ? $this->GET('field') : \"\");\n $newField = &$form->text(\"<u>F</u>ield name\", \"\", $field);\n\n foreach ($this->table->fields as $key)\n $positions[$key] = \"After \" . $key;\n $keys = array_keys($positions);\n $defaultValue = ($field && in_array($field, $keys)) ? $keys[array_search($field, $keys) - 1] : \"\";\n if ($field)\n unset($positions[$field]);\n array_pop($positions);\n $positions[''] = \"At end of table\";\n $label = $field ? \"Move to <u>p</u>osition\" : \"Add at <u>p</u>osition\";\n $afterField = $form->select($label, \"\", $positions, $defaultValue);\n\n $button = $field ? \"Rename/move field\" : \"Add new field\";\n $form->submit($button);\n\n if ($form->isValid()) {\n if (! $field) {\n if ($this->table->add_field($newField, $afterField))\n $this->table->write();\n else\n $form->error(\"Invalid field name\", 3);\n } else {\n while ($row = $this->table->each()) {\n // Copy all the moved values to their new field name.\n $this->table->data[$row['id']][$newField] = $row[$field];\n }\n $newFields = array();\n foreach ($this->table->fields as $oldField) {\n // Copy any unchanged field to the new fields array.\n if ($oldField != $field)\n $newFields[] = $oldField;\n if ($oldField == $afterField)\n $newFields[] = $newField;\n }\n // Add field if position '' (\"At end of table\") was selected.\n if (! $afterField)\n $newFields[] = $newField;\n $this->table->fields = $newFields;\n $this->table->write();\n }\n $field = \"\";\n $newField = \"\";\n }\n\n $formOrder = new Apeform(0, 0, \"order\", false);\n $formOrder->hidden(\"structure\", \"method\");\n $formOrder->hidden($this->table->tablename(), \"table\");\n $order = $formOrder->select(\"Permanently <u>o</u>rder table by\", \"\", $this->table->fields);\n $formOrder->submit(\"Order\");\n\n if ($formOrder->isValid()) {\n $this->table->sort($this->table->fields[$order]);\n $this->table->write();\n }\n\n $this->displayHead();\n\n echo '<table>';\n echo '<tr><th>Field</th><th><small>Guessed type</small></th><th colspan=\"2\">Action</th></tr>';\n foreach ($this->table->fields as $i => $f) {\n echo '<tr><td';\n if (! $i)\n echo ' class=\"primary\" title=\"Row identifier\"';\n echo '>' . $f . '</td>';\n echo '<td><small>' . (isset($this->types[$f]) ? $this->types[$f] : \"\") . '</small></td>';\n echo '<td>';\n if ($i && $this->priv & PRIV_ALTER)\n echo '<a href=\"' . $this->SELF . '?method=structure&table=' . $this->table->tablename() . '&field=' . $f . '\">Change</a>';\n echo '</td><td>';\n if ($i && $this->priv & PRIV_ALTER)\n echo '<a class=\"danger\" href=\"' . $this->SELF . '?method=drop&table=' . $this->table->tablename() . '&field=' . $f . '\">Drop</a>';\n echo '</td></tr>';\n }\n echo '</table>';\n\n if ($this->priv & PRIV_ALTER)\n $form->display();\n if ($this->priv & PRIV_UPDATE)\n $formOrder->display();\n\n echo '<p><table>';\n echo '<tr><th>Statement</th><th>Value</th></tr>';\n echo '<tr><td>Rows</td><td align=\"right\">' . $this->table->num_rows() . '</td></tr>';\n echo '<tr><td>Next autoindex</td><td align=\"right\">' . ($this->table->num_rows() ? max($this->table->ids()) + 1 : 1) . '</td></tr>';\n $filesize = $this->table->exists() ? filesize($this->table->filename) : 0;\n $filemtime = $this->table->exists() ? date(\"Y-m-d H:i\", filemtime($this->table->filename)) : \"\";\n echo '<tr><td>File size</td><td align=\"right\">' . number_format($filesize) . ' Bytes</td></tr>';\n $size = $this->table->num_rows() ? (int) round(($filesize - strlen(implode(\",\", $this->table->fields)) - 2) / $this->table->num_rows()) : 0;\n echo '<tr><td>Average row size</td><td align=\"right\">' . $size . ' Bytes</td></tr>';\n echo '<tr><td>Delimiter</td><td align=\"right\">' . $this->table->delimiter . '</td></tr>';\n echo '<tr><td>Last update</td><td align=\"right\">' . $filemtime . '</td></tr>';\n echo '</table>';\n }", "public function removeFieldSet($index) {\n\t\t$this->fieldsets[$index] = null;\n\t}", "public function finish()\n {\n parent::finish();\n \n $form_entry_list_method = sprintf( 'get_%s_entry_list', $this->get_subject() );\n $session = lib::create( 'business\\session' );\n $db_user = $session->get_user();\n $db_role = $session->get_role();\n\n foreach( $this->get_record_list() as $record )\n {\n // determine who has worked on the form\n $typist_1 = 'n/a';\n $typist_1_submitted = false;\n $typist_2 = 'n/a';\n $typist_2_submitted = false;\n\n $form_entry_list = $record->$form_entry_list_method();\n $db_form_entry = current( $form_entry_list );\n if( $db_form_entry )\n {\n $typist_1 = $db_form_entry->get_user()->name;\n $typist_1_submitted = !$db_form_entry->deferred;\n }\n $db_form_entry = next( $form_entry_list );\n if( $db_form_entry )\n {\n $typist_2 = $db_form_entry->get_user()->name;\n $typist_2_submitted = !$db_form_entry->deferred;\n }\n\n // if both typists have submitted and this form is still in the list then there is a conflict\n $conflict = $typist_1_submitted && $typist_2_submitted;\n\n $this->add_row( $record->id,\n array( 'id' => $record->id,\n 'date' => $record->date,\n 'typist_1' => $typist_1,\n 'typist_1_submitted' => $typist_1_submitted,\n 'typist_2' => $typist_2,\n 'typist_2_submitted' => $typist_2_submitted,\n 'conflict' => $conflict ) );\n }\n\n $this->finish_setting_rows();\n }", "function section_end(){\n\techo '</div>';\n\techo '</div>';\n}", "public function drawEndOptionsPanel()\r\n {\r\n echo ' </ul>\r\n </div>';\r\n }", "function accordion_end($label = '', $section = 'themify_options') {\n\t\t\treturn array();\n\t\t}", "function close()\n\t{\n\t echo <<< FORMCLOSE\n\t \n\t </form>\nFORMCLOSE;\n\t}", "function endForm($send){\n $out = '';\n if ($send) $out .= '<input type=\"submit\" value=\"'.$send.'\" name=\"submit\" >';\n $out .= \"</form>\";\n return $out;\n }", "function end ($options=NULL) {\n $this->set_options($options);\n print $this->bottom_html();\n if ($this->notes_area)\n print $this->notes_area_html();\n }", "public function end()\n\t{\n\t\t$this->show('</ul>' . LF);\n\t}", "public function endContent()\n\t{\n\t\t$this->endWidget('CContentDecorator');\n\t}", "public function drawFooter (\n\t)\t\t\t\t\t// RETURNS <void>\n\t\n\t// $contentForm->drawFooter();\n\t{\n\t\t// Show Segment-Creation Modules\n\t\tforeach($this->segments as $module => $bool)\n\t\t{\n\t\t\tswitch($module)\n\t\t\t{\n\t\t\t\tcase \"Text\":\n\t\t\t\t\t$icon = \"newspaper\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Image\":\n\t\t\t\t\t$icon = \"image\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Video\":\n\t\t\t\t\t$icon = \"video\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t$icon = \"circle-exclaim\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t\t<div class=\"newsegment-wrap\">\n\t\t\t\t<div class=\"newsegment\"><span class=\"newsegment-text\">Add<br /><span class=\"icon-' . $icon . '\" style=\"font-size:32px;\"></span><br />' . $module . ' Block</span></div>\n\t\t\t\t<input class=\"newsegment-sub\" type=\"submit\" name=\"add_module[' . $module . ']\" value=\"\" style=\"background:none;\" />\n\t\t\t</div>';\n\t\t}\n\t\t\n\t\techo '\n\t\t<hr class=\"separate-div\"/>';\n\t\t\n\t\t// Display Submission Options\n\t\techo '\n\t\t<p>';\n\t\t\n\t\t// Make official post\n\t\tif($this->contentData['status'] < Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_official\" value=\"Save and Make Official Post\" style=\"background-color:#56ccc8;\" />';\n\t\t}\n\t\t\n\t\t// Save and Publish option\n\t\tif($this->contentData['status'] < Content::STATUS_GUEST)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_publish\" value=\"Save and Publish\" style=\"background-color:#56ccc8;\" />';\n\t\t}\n\t\t\n\t\t// Official Post Option\n\t\tif($this->contentData['status'] >= Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_standard\" value=\"Live Update\" style=\"background-color:#56ccc8;\" />\n\t\t\t<input type=\"submit\" name=\"save_guest\" value=\"Set as Guest Post\" style=\"background-color:#aa2222;\" />';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Save / Update Option\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_standard\" value=\"Save and Update\" />';\n\t\t}\n\t\t\n\t\t// Display the Submit Button\n\t\techo '\n\t\t\t<input type=\"submit\" name=\"deletePost\" value=\"Delete Post\" onclick=\"return confirm(\\'Are you sure you want to delete this post?\\');\" />\n\t\t</p>';\n\t}", "public function sectionEnd() {}", "public function sectionEnd() {}", "public static function close()\n {\n\n echo \"<input type=\\\"hidden\\\" name=\\\"csrf\\\" value=\\\"\" . \\Jet\\App\\Engine\\Tools\\Utils::generateToken() . \"\\\">\";\n\n if (self::$name) {\n\n echo \"<input type=\\\"hidden\\\" name=\\\"\" . self::$name . \"\\\" value=\\\"\" . self::$check . \"\\\">\";\n }\n\n echo \"<input type=\\\"hidden\\\" name=\\\"check\\\" value=\\\"\" . self::$check . \"\\\">\";\n\n echo \"</form>\";\n\n self::$check = null;\n self::$name = null;\n }", "function definition_after_data() {\n global $CFG, $COURSE;\n $mform =& $this->_form;\n\n if ($id = $mform->getElementValue('update')) {\n $modulename = $mform->getElementValue('modulename');\n $instance = $mform->getElementValue('instance');\n\n if ($this->_features->gradecat) {\n $gradecat = false;\n if (!empty($CFG->enableoutcomes) and $this->_features->outcomes) {\n if ($outcomes = grade_outcome::fetch_all_available($COURSE->id)) {\n $gradecat = true;\n }\n }\n if ($items = grade_item::fetch_all(array('itemtype'=>'mod', 'itemmodule'=>$modulename,\n 'iteminstance'=>$instance, 'courseid'=>$COURSE->id))) {\n foreach ($items as $item) {\n if (!empty($item->outcomeid)) {\n $elname = 'outcome_'.$item->outcomeid;\n if ($mform->elementExists($elname)) {\n $mform->hardFreeze($elname); // prevent removing of existing outcomes\n }\n }\n }\n foreach ($items as $item) {\n if (is_bool($gradecat)) {\n $gradecat = $item->categoryid;\n continue;\n }\n if ($gradecat != $item->categoryid) {\n //mixed categories\n $gradecat = false;\n break;\n }\n }\n }\n\n if ($gradecat === false) {\n // items and outcomes in different categories - remove the option\n // TODO: it might be better to add a \"Mixed categories\" text instead\n if ($mform->elementExists('gradecat')) {\n $mform->removeElement('gradecat');\n }\n }\n }\n }\n\n if ($COURSE->groupmodeforce) {\n if ($mform->elementExists('groupmode')) {\n $mform->hardFreeze('groupmode'); // groupmode can not be changed if forced from course settings\n }\n }\n\n if ($mform->elementExists('groupmode') and !$mform->elementExists('groupmembersonly') and empty($COURSE->groupmodeforce)) {\n $mform->disabledIf('groupingid', 'groupmode', 'eq', NOGROUPS);\n\n } else if (!$mform->elementExists('groupmode') and $mform->elementExists('groupmembersonly')) {\n $mform->disabledIf('groupingid', 'groupmembersonly', 'notchecked');\n\n } else if (!$mform->elementExists('groupmode') and !$mform->elementExists('groupmembersonly')) {\n // groupings have no use without groupmode or groupmembersonly\n if ($mform->elementExists('groupingid')) {\n $mform->removeElement('groupingid');\n }\n }\n }", "public function formClose()\n {\n return $this->renderHtmlForm('CloseStub');\n }", "public function definition_after_data() {\n parent::definition_after_data();\n $this->_form->freeze(['type']);\n $this->tool->form_definition_after_data($this->_form);\n }", "public function finish()\n {\n parent::finish();\n\n // set the view's items\n $this->set_item( 'first_name', $this->get_record()->first_name );\n $this->set_item( 'last_name', $this->get_record()->last_name );\n $this->set_item( 'association', $this->get_record()->association );\n $this->set_item( 'alternate', $this->get_record()->alternate );\n $this->set_item( 'informant', $this->get_record()->informant );\n $this->set_item( 'proxy', $this->get_record()->proxy );\n\n $this->finish_setting_items();\n\n if( !is_null( $this->address_list ) )\n {\n $this->address_list->finish();\n $this->set_variable( 'address_list', $this->address_list->get_variables() );\n }\n\n if( !is_null( $this->phone_list ) )\n {\n $this->phone_list->finish();\n $this->set_variable( 'phone_list', $this->phone_list->get_variables() );\n }\n }", "public function endTabs() {\n\t\t\treturn \"\"; \n\t\t}", "static public function endTag(Field $field)\n {\n\t\tif ($field instanceof Field\\Submit) {\n\t\t\treturn '';\n\t\t}\n\n return '\t\t\t\t\t</div>\n\t\t\t</div>';\n }", "function rd_do_footer()\n{\n\techo <<<END\n\t\t</form>\n\t</div></body>\n</html>\nEND;\n}", "public function end_field_resolver_trace()\n {\n }", "public function createFinaliseRepairFields()\r\n {\r\n echo \"\r\n <fieldset>\r\n <legend> Finalise Repair </legend>\r\n <div class=\\\"input-wrapper\\\">\r\n <div class=\\\"left-wrapper\\\">\r\n <label>Repair Cost: </label>\r\n <input type=\\\"text\\\" class=\\\"input-text-fifty\\\" name=\\\"repair-cost-input\\\" id=\\\"repair-cost-input\\\"\r\n value=\\\"\".$this->checkRepairCost().\"\\\">\r\n </div>\r\n\r\n <div class=\\\"right-wrapper\\\">\r\n <label>Authorised By: </label>\r\n <input type=\\\"text\\\" class=\\\"input-text-fifty\\\" name=\\\"return-authorized-name-input\\\" id=\\\"return-authorized-name-input\\\"\r\n value=\\\"\".$this->queryResult[\"ReturnAuthorizedName\"].\"\\\">\r\n </div>\r\n </div>\r\n\r\n <div class=\\\"input-wrapper\\\">\r\n <div class=\\\"left-wrapper\\\" style=\\\"width:330px\\\">\r\n <input type=\\\"checkbox\\\" name=\\\"print-checkbox\\\" value=\\\"print-checkbox\\\"\r\n \".$this->checkPrintCondition().\">\r\n <label>Print Repair Order Form/s </label>\r\n\r\n </div>\r\n </div>\r\n\r\n <div class=\\\"input-wrapper\\\">\r\n <div class=\\\"left-wrapper\\\" style=\\\"width:100%\\\">\r\n <input type=\\\"checkbox\\\" name=\\\"ra-checkbox\\\" value=\\\"ra-checkbox\\\" id=\\\"ra-checkbox\\\" \".$this->checkRACondition().\">\r\n <label> Send request for \\\"Return Authorisation Number\\\" now (recommended) </label>\r\n </div>\r\n </div>\r\n </fieldset> \";\r\n }", "function end_table() {\n if ($this->_cellopen) {\n $this->end_cell();\n }\n // Close any open table rows\n if ($this->_rowopen) {\n $this->end_row();\n }\n ?></table><?php\n echo \"\\n\";\n\n $this->reset_table();\n }", "public function addForm()\n {\n $this->getState()->template = 'displaygroup-form-add';\n $this->getState()->setData([\n 'help' => $this->getHelp()->link('DisplayGroup', 'Add')\n ]);\n }", "function admin_fieldset( $fieldset, $legend = '' )\n{\n\t$eol = \"\\n\";\n\t$html = '<fieldset class=\"admin_fieldset\">'.$eol;\n\n\tif ($legend != '')\n\t{\n\t\t$html .= \"<legend>$legend</legend>$eol\";\n\t}\n\t$html .= $fieldset;\n\n\t$html .= '</fieldset>'.$eol;\n\n\treturn $html;\n}", "private function endBlock()\n {\n end($this->_blocks);\n\n // grab key of that last element and fill it with rendered data\n $this->_blocks[key($this->_blocks)] = ob_get_clean();\n }", "function nc__dlg__end(){\n\n\t\t//output function name\n\t\tnc__util__func('class', 'nc__dlg__end');\n\n\t\t\t\t\t\t//end dialog for content body (starts in another function)\n\t\t\t\t\t\techo \"</div>\" .\n\n\t\t\t\t\t//end dialog content window (starts in another function)\n\t\t\t\t\t\"</div>\" .\n\n\t\t\t\t//end dialog body (starts in another function)\n\t\t\t\t\"</div>\" .\n\n\t\t\t//end end dialog bounding DIV (starts in another function)\n\t\t\t\"</div>\";\n\n\t}", "public function modify(Fieldset $fieldset);", "function endMainBlock() {\n $bte =& $this->blockTab[0];\n $bte['tPosContentsEnd'] = strlen($this->template);\n $bte['tPosEnd'] = strlen($this->template);\n $bte['definitionIsOpen'] = false;\n $this->currentNestingLevel -= 1; }", "public function after_editor() {\n echo '</div>';\n $this->render_builder();\n }", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n // 'action' => $this->getUrl('*/*/courseOrder'),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n )\n );\n\n\n\n $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('adminhtml')->__('导出报表')));\n $dateFormatIso = 'yyyy-MM-dd';\n $fieldset->addField('begin_time', 'date', array(\n 'name' => 'begin_time',\n 'label' => Mage::helper('adminhtml')->__('订单开始时间'),\n 'time' => true,\n 'image' => $this->getSkinUrl('images/grid-cal.gif'),\n 'format' => $dateFormatIso,\n 'note' => '格式(0000-00-00)'\n ));\n\n $fieldset->addField('end_time', 'date', array(\n 'name' => 'end_time',\n 'label' =>Mage::helper('adminhtml')->__('订单结束时间'),\n 'time' => true,\n 'image' => $this->getSkinUrl('images/grid-cal.gif'),\n 'format' => $dateFormatIso,\n 'note' => '格式(0000-00-00)'\n ));\n /* $fieldset->addField('startDate', 'text', array(\n 'name' => 'startDate',\n 'label' => Mage::helper('adminhtml')->__('开始日期'),\n 'title' => Mage::helper('adminhtml')->__('开始日期'),\n //'style' => 'width:600px;height:350px;',\n 'required' => true,\n 'after_element_html' => '<br/>请选择一个开始日期',\n )\n );\n\n $fieldset->addField('endtDate', 'text', array(\n 'name' => 'endtDate',\n 'label' => Mage::helper('adminhtml')->__('结束日期'),\n 'title' => Mage::helper('adminhtml')->__('结束日期'),\n //'style' => 'width:600px;height:350px;',\n 'required' => true,\n 'after_element_html' => '<br/>请选择一个开结束日期',\n )\n );*/\n /* $fieldset->addField('psubmit', 'submit', array(\n 'name' => 'psubmit',\n 'label' => '',\n 'value' => '检查数据',\n 'after_element_html' => '',\n )\n );*/\n // $form->setMethod('post');\n\n $form->setUseContainer(true);\n // $form->setAction(true);\n // $form->setEnctype('multipart/form-data');\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n\n }", "public function close() {\n\t\t\n\t\t// Render close tag\n\t\t\n\t\t$this->_post_render();\n\t\t\n\t\techo true === $this->options['render_tag'] ? $this->_render_tag( true ) : '';\n\t\t\n\t\techo $this->options['after'];\n\t\t\n\t}", "public function setEndFieldName($fieldName) {\n $this->endFieldName = $fieldName;\n $this->id = md5($this->id . $fieldName);\n }", "abstract protected function _setNewForm();", "function _prepareForm() {\n\t\t\t$this->getFieldset( );\n\t\t\t$fieldset = parent::_prepareForm( );\n\n\t\t\tif ($fieldset) {\n\t\t\t\t$this->getTextHelper( );\n\t\t\t\t$model = $helper = $this->getModel( );\n\t\t\t\t$isElementDisabled = !$this->isSaveAllowed( );\n\t\t\t\t$fieldset->addField( 'country_id', 'select', array( 'name' => 'country_id', 'label' => $helper->__( 'Country' ), 'title' => $helper->__( 'Country' ), 'required' => false, 'value' => $model->getCountryId( ), 'default' => '0', 'values' => $this->getCountryValues( ), 'disabled' => $isElementDisabled ) );\n\t\t\t\t$fieldset->addField( 'region_id', 'select', array( 'name' => 'region_id', 'label' => $helper->__( 'Region/State' ), 'title' => $helper->__( 'Region/State' ), 'required' => false, 'value' => $model->getRegionId( ), 'default' => '0', 'values' => $this->getRegionValues( ), 'disabled' => $isElementDisabled ) );\n\t\t\t\t$fieldset->addField( 'zip', 'text', array( 'name' => 'zip', 'label' => $helper->__( 'Zip/Postal Code' ), 'title' => $helper->__( 'Zip/Postal Code' ), 'note' => $helper->__( '* or blank - matches any' ), 'required' => false, 'value' => $this->getZipValue( ), 'default' => '', 'disabled' => $isElementDisabled ) );\n\t\t\t}\n\n\t\t\treturn $this;\n\t\t}", "static public function endTag(Filter $filter)\n {\n\t\treturn '\n\t\t</form>\n\t\t<!-- /. grid filter form -->\n\t</div>';\n }", "public function GoToEnd()\n {\n $this->setItemPointer(($this->Length() - 1));\n }", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'add_form',\n 'action' => $this->getUrl('*/faq/save', array(\n 'ret' => Mage::registry('ret'),\n 'id' => $this->getRequest()->getParam('id')\n )\n ),\n 'method' => 'post'\n ));\n\n $fieldset = $form->addFieldset('faq_new_question', array(\n 'legend' => $this->__('New Question'),\n 'class' => 'fieldset-wide'\n ));\n\n $fieldset->addField('new_question', 'text', array(\n 'label' => Mage::helper('inchoo_faq')->__('New Question'),\n 'required' => true,\n 'name' => 'question'\n ));\n\n $fieldset->addField('new_answer', 'textarea', array(\n 'label' => Mage::helper('inchoo_faq')->__('Answer'),\n 'required' => false,\n 'name' => 'answer',\n 'style' => 'height:12em;',\n ));\n\n $form->setUseContainer(true);\n// $form->setValues();\n $this->setForm($form);\n\n// echo \"_prepareForm()\";\n\n return parent::_prepareForm();\n\n\n }", "public static function end_block()\n\t{\n\t\tself::$nivel_cabecalho -= 1;\n\t}" ]
[ "0.8683747", "0.7981708", "0.79485416", "0.7723414", "0.72680134", "0.7240373", "0.7168367", "0.7066881", "0.6913539", "0.6906262", "0.66773194", "0.66431904", "0.66132414", "0.65945315", "0.65435416", "0.651934", "0.6514329", "0.6514329", "0.65118724", "0.6454397", "0.6404884", "0.63327813", "0.62775", "0.62706536", "0.62546194", "0.6173254", "0.61599535", "0.60949916", "0.6075579", "0.6025077", "0.6003873", "0.5948766", "0.5883096", "0.5868224", "0.5846247", "0.5834369", "0.5820444", "0.57566315", "0.5743426", "0.5728728", "0.57125366", "0.5711984", "0.5664361", "0.5652172", "0.5629305", "0.56156963", "0.5613551", "0.560257", "0.5602348", "0.5581814", "0.5580095", "0.5565587", "0.54975", "0.5479923", "0.54789793", "0.54789793", "0.54620445", "0.5457568", "0.5447837", "0.54411566", "0.5435768", "0.54005176", "0.5398854", "0.539617", "0.53721666", "0.5370341", "0.53585035", "0.53467107", "0.5345964", "0.5340607", "0.53243446", "0.5322774", "0.5322774", "0.532062", "0.5288075", "0.5277151", "0.5257229", "0.5252275", "0.5251519", "0.5250264", "0.5247999", "0.52152956", "0.52107435", "0.5205592", "0.5204703", "0.52028656", "0.51967096", "0.51915765", "0.51911783", "0.5189899", "0.5178399", "0.5177741", "0.51742506", "0.51512253", "0.5143835", "0.5141952", "0.5131968", "0.51303244", "0.51279145", "0.5098389" ]
0.88671374
0
Set alternating row class "alt"
public function set_alt_rows() { $this->alt_rows = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fancy_altrows($rows) {\r\n\tif(is_array($rows)) {\r\n\t\t$i = 0;\r\n\t\tforeach($rows as $text) { $i++; ?>\r\n\t\t\t\t\t<li class=\"<?php tablealt($i); ?>\"><?php echo $text; ?></li>\r\n<?php\r\n\t\t}\r\n\t}\r\n}", "function boxGetAltRowStyle($i, $classonly = false) {\n\t\tif ($i % 2 == 0)\n\t\t\t$ret = 'bgcolor-white';\n\t\telse\n\t\t\t$ret = 'bgcolor-grey';\n\t\tif ($classonly)\n\t\t\treturn $ret;\n\t\telse\n\t\t\treturn 'class=\"'.$ret.'\"';\n\t}", "public function setRowAlt($rowAlt)\n {\n $this->rowAlt = $this->checkRowAltRange($rowAlt);\n $this->childNodes = [];\n $this->append($this->makeTableRows());\n }", "function alternate_color($count)\n\t{\n\t\tif(($count%2) == 1)\n\t\t\techo 'class=\"row1\"';\n\t\telse\n\t\t\techo 'class=\"row2\"';\n\t}", "function tablealt($i) {\r\n\techo ($i%2 == 0) ? \" alt\" : \"\";\r\n}", "function rowcolor()\n {\n static $rowclass;\n\n if (empty($rowclass)) {\n $rowclass = 1;\n }\n\n if ($rowclass == 2) {\n $rowclass = 1;\n return \"row2\";\n } else {\n $rowclass = 2;\n return \"row1\";\n }\n }", "public function setElementRowClass(string $class)\n {\n $this->rowClass = $class;\n return $this;\n }", "function single_row( $item ) {\r\n\t\tstatic $row_class = '';\r\n\r\n\t\t// WP 4.2+ uses \"striped\" CSS styles to implement \"alternate\"\r\n\t\tif ( version_compare( get_bloginfo( 'version' ), '4.2', '<' ) ) {\r\n\t\t\t$row_class = ( $row_class == '' ? ' class=\"alternate\"' : '' );\r\n\t\t}\r\n\r\n\t\techo '<tr id=\"attachment-' . $item->ID . '\"' . $row_class . '>';\r\n\t\techo parent::single_row_columns( $item );\r\n\t\techo '</tr>';\r\n\t}", "public function setRowClasses($arrClasses){\n\t\t$this->arrClasses = $arrClasses;\n\t}", "public function setAlt($alt)\n {\n $this->alt = $alt;\n $this->setAttributes(\"Alt\");\n }", "public static function row_classes($classes, $row, $builder_id) {\n return !empty($row['styling'])?self::get_classes($row['styling'], $classes, 'row'):$classes;\n }", "function addRow($klass = '', $attr_ar = array())\n {\n $this->cur_section['rows'][] = array(\n 'klass' => $klass,\n 'atts' => $attr_ar,\n 'cells' => array()\n );\n\n }", "public function laratablesRowClass()\n\t\t{\n\t\t\t// $coa = Coa::find($this->id);\n\t\t\t//\tStorage::download('coapath/' . $this->coa_name);\n\n\t\t\treturn $this->active ? 'text-success' : '';\n\t\t}", "public function setAlternates(array $alternates = []): void\n {\n $this->writeAlternates($alternates, false);\n }", "private function checkRowAltRange($rowAlt)\n {\n return ($rowAlt > 0) ? $rowAlt : $this->rowAlt;\n }", "function SetClassesForDisplay( $class_4_odd, $class_4_even )\r\n\t\t{\r\n\t\t\t$this->class_display_odd = $class_4_odd;\r\n\t\t\t$this->class_display_even = $class_4_even;\r\n\t\t}", "public function get_row_class($series) {\n if ($series->finished) {\n return 'dimmed_text';\n }\n }", "function kdw_row_img($i){ \r\n \r\n if ($i == 'intro'){\r\n $options = get_field('kdw_page_intro_img_options'); \r\n $imgID = get_field('kdw_page_intro_img'); \r\n } else {\r\n $options = get_sub_field('options');\r\n $imgID = get_sub_field('img');\r\n }\r\n \r\n if ($options == 'large' ){\r\n $wrapper_class = 'row-inline-image-large';\r\n $size = 'wrapper-large';\r\n $img_size = 'large';\r\n \r\n } else if ( $options == 'medium'){\r\n $wrapper_class = 'row-inline-image-content';\r\n $size = 'wrapper-content';\r\n $img_size = 'medium';\r\n } else {\r\n // default = small\r\n $wrapper_class = 'row-inline-image-small';\r\n $size = 'wrapper-small';\r\n $img_size = 'medium';\r\n }\r\n \r\n if( $imgID && $options == 'bg1' || $options == 'bg2'){\r\n \r\n $bg_img = wp_get_attachment_image_src( $imgID , 'large' );\r\n \r\n // css styles for .row'$i'\r\n \r\n echo '<div class=\"row-bg-image row-bg-image-'.$options.' wrapper-outer row-margin row'.$i.' clearfix\" style=\"background-image: url('.$bg_img[0].');\">';\r\n echo '<div></div>';\r\n echo '</div>';\r\n \r\n } else if ($imgID){\r\n echo '<div class=\"row-inline-image wrapper-outer '.$wrapper_class.' row'.$i.' clearfix row-padding\">';\r\n echo '<div class=\"'.$wrapper_class.'\">';\r\n echo wp_get_attachment_image($imgID, $img_size);\r\n echo '</div>';\r\n echo '</div>';\r\n }\r\n}", "public function setRowsClasses($class1, $class2){\n\t\t$this->_class1 = $class1;\n\t\t$this->_class2 = $class2;\n\t}", "public function setRowsetClass($rowsetClass)\n {\n $this->_rowsetClass = (string)$rowsetClass;\n\n return $this;\n }", "function multiTableRow($row_attrs, $cell_data, $istitle = false) {\n\t\t$ap = html_ap();\n\t\t(isset($row_attrs['class'])) ? $row_attrs['class'] .= ' ff' : $row_attrs['class'] = 'ff';\n\t\tif ( $istitle ) {\n\t\t\t$row_attrs['class'] .= ' align-center';\n\t\t}\n\t\t$return = html_ao('tr', $row_attrs);\n\t\tfor ( $c = 0; $c < count($cell_data); $c++ ) {\n\t\t\t$locAp = html_ap();\n\t\t\t$cellAttrs = array();\n\t\t\tforeach (array_slice($cell_data[$c],1) as $k => $v) {\n\t\t\t\t$cellAttrs[$k] = $v;\n\t\t\t}\n\t\t\t(isset($cellAttrs['class'])) ? $cellAttrs['class'] .= ' ff' : $cellAttrs['class'] = 'ff';\n\t\t\t$return .= html_ao('td', $cellAttrs);\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ao('strong');\n\t\t\t}\n\t\t\t$return .= $cell_data[$c][0];\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ac(html_ap() -1);\n\t\t\t}\n\t\t\t$return .= html_ac($locAp);\n\t\t}\n\t\t$return .= html_ac($ap);\n\t\treturn $return;\n\t}", "function setRowClasses($field, $map)\n\t{\n\t\t$this->table->rowclasses['field'] = $field;\n\t\t$this->table->rowclasses['classes'] = $map;\n\t}", "function changeRowColor($pos)\n{\n\t\n\tif($pos % 2 == 1)\n\t{\n\t\techo \"#FFFFFF\";\n\t}\n\telse\n\t{\n\t\techo \"#D6E6F3\";\n\t}\n\n}", "public function setRowspan($num)\n {\n parent::setAttr(\"rowspan\", $num);\n }", "function RenderRow() {\r\r\tglobal $conn, $Security, $ratings;\r\r\r\r\t// Call Row Rendering event\r\r\t$ratings->Row_Rendering();\r\r\r\r\t// Common render codes for all row types\r\r\t// id\r\r\r\r\t$ratings->id->CellCssStyle = \"\";\r\r\t$ratings->id->CellCssClass = \"\";\r\r\r\r\t// rating\r\r\t$ratings->rating->CellCssStyle = \"\";\r\r\t$ratings->rating->CellCssClass = \"\";\r\r\r\r\t// domain\r\r\t$ratings->domain->CellCssStyle = \"\";\r\r\t$ratings->domain->CellCssClass = \"\";\r\r\tif ($ratings->RowType == EW_ROWTYPE_VIEW) { // View row\r\r\t} elseif ($ratings->RowType == EW_ROWTYPE_ADD) { // Add row\r\r\r\r\t\t// id\r\r\t\t$ratings->id->EditCustomAttributes = \"\";\r\r\t\t$ratings->id->EditValue = ew_HtmlEncode($ratings->id->CurrentValue);\r\r\r\r\t\t// rating\r\r\t\t$ratings->rating->EditCustomAttributes = \"\";\r\r\t\t$ratings->rating->EditValue = ew_HtmlEncode($ratings->rating->CurrentValue);\r\r\r\r\t\t// domain\r\r\t\t$ratings->domain->EditCustomAttributes = \"\";\r\r\t\t$ratings->domain->EditValue = ew_HtmlEncode($ratings->domain->CurrentValue);\r\r\t} elseif ($ratings->RowType == EW_ROWTYPE_EDIT) { // Edit row\r\r\t} elseif ($ratings->RowType == EW_ROWTYPE_SEARCH) { // Search row\r\r\t}\r\r\r\r\t// Call Row Rendered event\r\r\t$ratings->Row_Rendered();\r\r}", "public function getRowClass()\n {\n return ( $this->_end_date != $this->_begin_date && $this->_is_cotis) ?\n 'cotis-normal' :\n 'cotis-give';\n }", "public function addAlternates(array $alternates = []): void\n {\n $this->writeAlternates($alternates, true);\n }", "public function setAltText($alt)\n {\n $this->_alt = $alt;\n }", "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}", "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}", "public function setRowClass($rowClass)\n {\n $this->_rowClass = (string)$rowClass;\n\n return $this;\n }", "public function equalizeByRow(bool $flag = true) {\n if ($flag) {\n $this->getComponent()->attributes()->setAttribute('data-equalize-by-row', 'true');\n } else {\n $this->getComponent()->attributes()->remove('data-equalize-by-row');\n }\n return $this;\n }", "function update_row($selector, $i = 1, $row = \\false, $post_id = \\false)\n{\n}", "function startrow_func( $atts ){\n // Check if row name was provided\n if(!empty($atts['class'])){\n\n\treturn '<div class=\"X-row '.$atts['class'].'\">'; \n }\n else {\n\treturn '<div class=\"X-row\">';\n }\n\n}", "function oddeven_post_class ( $classes ) {\n global $current_class;\n $classes[] = $current_class;\n $current_class = ($current_class == 'odd') ? 'even' : 'odd';\n return $classes;\n}", "public function calculateRowClass($row)\n {\n return \"\";\n }", "public function getRowsetClass()\n {\n return $this->_rowsetClass;\n }", "public function getRowsetClass()\n {\n return $this->_rowsetClass;\n }", "public function getAlt()\n {\n return $this->alt;\n }", "function Event_Config_Cell_Rows($group,$text,$class)\n {\n return\n array\n (\n array\n (\n $this->Event_Config_Cell($group,$text,$class),\n \"\"\n ),\n );\n }", "public function rowWrapperClasses($classes)\n {\n $this->rowWrapperClasses = $classes;\n\n return $this;\n }", "public function storagemethod_row_multi($classes, $header, $contents) {\n\t\t?>\n\t\t\t<tr class=\"<?php echo $classes;?>\">\n\t\t\t\t<th><?php echo $header;?></th>\n\t\t\t\t<td><?php echo $contents;?></td>\n\t\t\t</tr>\n\t\t<?php\n\t}", "function table_highlight($counter)\r\n{\r\n if (($counter % 2) == 0) return TABLE_LIGHT;\r\n else return TABLE_DARK;\r\n}", "function give_linked_images_class($html, $id, $caption, $title, $align, $url, $size, $alt = '' ){\n\t\t$classes = '';\n\t\tif (has_term('','att_tax',$id)) {\n\t\t\t$terms = wp_get_post_terms($id, 'att_tax');\n\t\t\tif ($terms) {\n\t\t\t\tforeach ($terms as $term) {\n\t\t\t\t\t$classes .= $term->slug.' '; // separated by spaces, e.g. 'img image-link'\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check if there are already classes assigned to the anchor\n\t\tif ( preg_match('/<a.*? class=\".*?\">/', $html) ) {\n\t\t$html = preg_replace('/(<a.*? class=\".*?)(\".*?>)/', '$1 ' . $classes . '$2', $html);\n\t\t} else {\n\t\t\t$html = preg_replace('/(<a.*?)>/', '$1 class=\"' . $classes . '\" >', $html);\n\t\t}\n\t\treturn $html;\n\t}", "function shortcode_row( $atts, $content = null ) {\n\t\textract( shortcode_atts( array(\n\t\t\t'class' => ''\n\t\t), $atts ) );\n\n\t\t$class = empty( $class )?'':( ' ' . $class );\n\t\t$result = '<div class=\"row' . esc_attr( $class ) . '\">';\n\t\t$result .= do_shortcode( $content );\n\t\t$result .= '</div>';\n\t\treturn $result;\n\t}", "function column_alt_text( $item ) {\r\n\t\tif ( isset( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\tif ( is_array( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt[0];\r\n\t\t\t} else {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt;\r\n\t\t\t}\r\n\r\n\t\t\treturn sprintf( '<a href=\"%1$s\" title=\"' . __( 'Filter by', 'media-library-assistant' ) . ' &#8220;%2$s&#8221;\">%3$s</a>', esc_url( add_query_arg( array_merge( array(\r\n\t\t\t\t'page' => MLACore::ADMIN_PAGE_SLUG,\r\n\t\t\t\t'mla-metakey' => '_wp_attachment_image_alt',\r\n\t\t\t\t'mla-metavalue' => urlencode( $alt_text ),\r\n\t\t\t\t'heading_suffix' => urlencode( __( 'ALT Text', 'media-library-assistant' ) . ': ' . $alt_text ) \r\n\t\t\t), self::mla_submenu_arguments( false ) ), 'upload.php' ) ), esc_html( $alt_text ), esc_html( $alt_text ) );\r\n\t\t}\r\n\r\n\t\treturn '';\r\n\t}", "public function setTrTdAttr ($attr, $row=null) {\n if (is_numeric ($row))\n $this->_setAttr ($attr, $this->trtdAttr[$row]);\n else\n $this->_setAttr ($attr, $this->trtdAttr[]);\n }", "function presscore_tpl_masonry_item_wrap_class( $class = array() ) {\n\t\tif ( ! is_array( $class ) ) {\n\t\t\t$class = explode( ' ', $class );\n\t\t}\n\n\t\t$class[] = 'wf-cell';\n\n\t\t$config = presscore_config();\n\t\t// wide posts\n\t\tif ( ! $config->get( 'all_the_same_width' ) && 'wide' == $config->get( 'post.preview.width' ) ) {\n\t\t\t$class[] = 'double-width';\n\t\t}\n\n\t\t// masonry layout\n\t\tif ( 'masonry' == $config->get( 'layout' ) ) {\n\t\t\t$class[] = 'iso-item';\n\t\t}\n\n\t\t// if filter enabled\n\t\tif (\n\t\t\t$config->get( 'template.posts_filter.terms.enabled' ) ||\n\t\t\t$config->get( 'template.posts_filter.orderby.enabled' ) ||\n\t\t\t$config->get( 'template.posts_filter.order.enabled' )\n\t\t)\n\t\t{\n\t\t\t// add terms to class\n\t\t\t$taxonomy = apply_filters( 'presscore_before_post_masonry-filter_taxonomy', 'category', get_post_type() );\n\t\t\t$terms = get_the_terms( get_the_ID(), $taxonomy );\n\t\t\tif ( $terms && ! is_wp_error( $terms ) ) {\n\n\t\t\t\tforeach ( $terms as $term ) {\n\t\t\t\t\t$class[] = 'category-' . $term->term_id;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$class[] = 'category-0';\n\t\t\t}\n\t\t}\n\n\t\t$class = apply_filters( 'presscore_before_post_masonry-wrap_class', $class );\n\n\t\treturn 'class=\"' . presscore_esc_implode( ' ', $class ) . '\" ';\n\t}", "public function new_row($css = '', $extras='') {\n\n if ($this->_cellopen) {\n $this->end_cell();\n }\n\n if ($this->_rowopen) {\n $this->end_row();\n }\n\n if ($this->_newid != '') {\n $extras .= ' id=\"'.$this->_newid.'\"';\n\n $this->_newid = '';\n }\n\n echo '<tr'.($css != '' ? ' class=\"'.$css.'\"' : '').($extras != '' ? ' '.$extras : '').'>';\n $this->_rowopen = true;\n }", "function skin_sets_overview_row( $r, $forums, $hidden, $default, $menulist, $i_sets, $no_sets, $folder_icon, $line_image, $css_extra ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<tr>\n <td class='tablerow1'>\n <!--$i_sets,$no_sets-->{$line_image}<!--ID:{$r['set_skin_set_id']}--><img src='{$this->ipsclass->skin_acp_url}/images/{$folder_icon}' border='0' alt='Стиль' style='vertical-align:middle' />\n <strong style='{$css_extra}'>{$r['set_name']}</strong>\n </td>\n <td class='tablerow1' width='5%' nowrap='nowrap' align='center'>{$forums} {$hidden} {$default}</td>\n <td class='tablerow1' width='5%'><img id=\"menu{$r['set_skin_set_id']}\" src='{$this->ipsclass->skin_acp_url}/images/filebrowser_action.gif' border='0' alt='Опции' class='ipd' /></td>\n</tr>\n<script type=\"text/javascript\">\n menu_build_menu(\n \"menu{$r['set_skin_set_id']}\",\n new Array(\n\t\t\t$menulist\n \t\t ) );\n </script>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "private function makeTableRows($rowAttr = [])\n {\n // Reshape array $this->tableData such that each array entry contains\n // $this->nCols nodes. => Each array entry corresponds to one\n // row of table elements.\n $tableData = array_chunk(\n $this->makeTableData($this->inputData),\n $this->nCols\n );\n // Set up table content\n $rowCount = 0;\n $altRowCount = 0;\n $tr = new HtmlNode(kind: 'tr');\n foreach ($tableData as $nodesPerRow) {\n $tr_tmp = clone $tr;\n // Set (imported) row attributes\n if (isset($rowAttr[$rowCount])) {\n $tr_tmp->setAttributes($rowAttr[$rowCount]);\n }\n // Label alternative rows\n if (($rowCount >= $this->rowOffset)) {\n if (($altRowCount % $this->rowAlt) === 0) {\n $tr_tmp->setAttributes(['class' => 'alt'], 'add');\n }\n ++$altRowCount;\n }\n ++$rowCount;\n $tr_tmp->append($nodesPerRow);\n $tableRows[] = $tr_tmp;\n }\n return $tableRows;\n }", "public function setPrintRepeatRows($row_start, $row_end) {\n\t}", "function be_display_post_class( $classes, $post, $listing, $atts ) {\r\n\tif( !isset( $atts['columns'] ) )\r\n\t\treturn $classes;\r\n\t\t\r\n\t$columns = array( '', '', 'one-half', 'one-third', 'one-fourth', 'one-fifth', 'one-sixth' );\r\n\t$classes[] = $columns[$atts['columns']];\r\n\tif( 0 == $listing->current_post || 0 == $listing->current_post % $atts['columns'] )\r\n\t\t$classes[] = 'first';\r\n\treturn $classes;\r\n}", "function latto_preprocess_views_view_unformatted(&$vars) {\n \n // Class names for overwriting\n $row_first = \"first\";\n $row_last = \"last\";\n\n $view = $vars['view'];\n $rows = $vars['rows'];\n \n // Set arrays\n $vars['classes_array'] = array();\n $vars['classes'] = array();\n\n // Variables\n $count = 0;\n $max = count($rows);\n \n // Loop through the rows and overwrite the classes\n foreach ($rows as $id => $row) {\n $count++; \n \n $vars['classes'][$id][] = $count % 2 ? 'odd' : 'even';\n \n if ($count == 1) {\n $vars['classes'][$id][] = $row_first;\n }\n if ($count == $max) {\n $vars['classes'][$id][] = $row_last;\n }\n\n if ($row_class = $view->style_plugin->get_row_class($id)) {\n $vars['classes'][$id][] = $row_class;\n }\n\n if ( $vars['classes'] && $vars['classes'][$id] ){\n $vars['classes_array'][$id] = implode(' ', $vars['classes'][$id]);\n } else {\n $vars['classes_array'][$id] = '';\n }\n }\n}", "public function addRow() {\n if ($this->linesCount >= 0)\n $this->addContent('</div>');\n $this->linesCount ++;\n $this->colunsCount = 0;\n $this->addContent('<div class=\"row\" >');\n }", "function CalculateDisplayClass()\r\n\t\t{\r\n\t\t\t$this->class_for_display = \"\";\r\n\t\t\t\r\n\t\t\tif( $this->class_display_even != \"\" )\r\n\t\t\t{\r\n\t\t\t\t $this->class_for_display = $this->class_display_odd;\r\n\t\t\t\t \r\n\t\t\t\t if( $this->numRows % 2 == 1 )\r\n\t\t\t\t\t$this->class_for_display = $this->class_display_even;\r\n\t\t\t}\r\n\t\t}", "public function getRowClass()\n {\n return $this->_rowClass;\n }", "function setclass($row, $column, $value){\n\t$class='';\n\tif($row==4||$row==7){\n\t\t$class='top';\n\t}\n\tif($column==4||$column==7){\n\t\t$class.=' left';\n\t}\n\tif(strlen($value)<=1){\n\t\t$class.=' single';\n\t}\n\treturn $class;\n}", "public function RenderThumbs_forRow(array $arImRow) {\n\t$rcImg = $this->ImageInfoQuery()->SpawnRecordset();\n\t$htImg = NULL;\n\t$sTitle = $this->RenderSummary_text();\n\tforeach ($arImRow as $idImg => $arImg) {\n\t $rcImg->SetFieldValues($arImg);\n\t $htImg .= $rcImg->RenderInline_row($sTitle,vctImages::SIZE_THUMB);\n\t}\n\t$htHref = $this->TitleHREF();\n\treturn $htHref.$htImg.'</a>';\n }", "function class_odd_or_even( $num ) {\n echo ($num%2) ? ' item-odd' : ' item-even';\n}", "public function renderListRow($table, $row, $cc, $titleCol, $thumbsCol, $indent = 0)\n { \n if (!is_array($row)) {\n return '';\n } \n \n $this->fieldArray[] = '_CONTROL_';\n $this->fieldArray[] = '_CLIPBOARD_';\n $rowOutput = '';\n $id_orig = null;\n // If in search mode, make sure the preview will show the correct page\n if ((string)$this->searchString !== '') {\n $id_orig = $this->id;\n $this->id = $row['pid'];\n }\n \n $tagAttributes = [\n 'class' => ['t3js-entity'],\n 'data-table' => $table,\n 'title' => 'id=' . $row['uid'],\n ];\n \n // Add special classes for first and last row\n if ($cc == 1 && $indent == 0) {\n $tagAttributes['class'][] = 'firstcol';\n }\n if ($cc == $this->totalRowCount || $cc == $this->iLimit) {\n $tagAttributes['class'][] = 'lastcol';\n }\n // Overriding with versions background color if any:\n if (!empty($row['_CSSCLASS'])) {\n $tagAttributes['class'] = [$row['_CSSCLASS']];\n }\n // Incr. counter.\n $this->counter++;\n // The icon with link\n $toolTip = BackendUtility::getRecordToolTip($row, $table);\n\n \n\n $additionalStyle = $indent ? ' style=\"margin-left: ' . $indent . 'px;\"' : '';\n $iconImg = '<span ' . $toolTip . ' ' . $additionalStyle . '>'\n . $this->iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render()\n . '</span>'; \n $theIcon = $this->clickMenuEnabled ? BackendUtility::wrapClickMenuOnIcon($iconImg, $table, $row['uid']) : $iconImg;\n // Preparing and getting the data-array\n $theData = [];\n $localizationMarkerClass = '';\n foreach ($this->fieldArray as $fCol) {\n \n if ($fCol == $titleCol) {\n $recTitle = BackendUtility::getRecordTitle($table, $row, false, true);\n $warning = '';\n // If the record is edit-locked\tby another user, we will show a little warning sign:\n $lockInfo = BackendUtility::isRecordLocked($table, $row['uid']);\n if ($lockInfo) {\n $warning = '<span data-toggle=\"tooltip\" data-placement=\"right\" data-title=\"' . htmlspecialchars($lockInfo['msg']) . '\">'\n . $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</span>';\n }\n $theData[$fCol] = $theData['__label'] = $warning . $this->linkWrapItems($table, $row['uid'], $recTitle, $row);\n // Render thumbnails, if:\n // - a thumbnail column exists\n // - there is content in it\n // - the thumbnail column is visible for the current type\n $type = 0;\n if (isset($GLOBALS['TCA'][$table]['ctrl']['type'])) {\n $typeColumn = $GLOBALS['TCA'][$table]['ctrl']['type'];\n $type = $row[$typeColumn];\n }\n // If current type doesn't exist, set it to 0 (or to 1 for historical reasons,\n // if 0 doesn't exist)\n if (!isset($GLOBALS['TCA'][$table]['types'][$type])) {\n $type = isset($GLOBALS['TCA'][$table]['types'][0]) ? 0 : 1;\n }\n $visibleColumns = $GLOBALS['TCA'][$table]['types'][$type]['showitem'];\n \n if ($this->thumbs &&\n trim($row[$thumbsCol]) &&\n preg_match('/(^|(.*(;|,)?))' . $thumbsCol . '(((;|,).*)|$)/', $visibleColumns) === 1\n ) {\n $thumbCode = '<br />' . $this->thumbCode($row, $table, $thumbsCol);\n $theData[$fCol] .= $thumbCode;\n $theData['__label'] .= $thumbCode;\n }\n if (isset($GLOBALS['TCA'][$table]['ctrl']['languageField'])\n && $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] != 0\n && $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] != 0\n ) {\n // It's a translated record with a language parent\n $localizationMarkerClass = ' localization';\n }\n } elseif ($fCol === 'pid') {\n $theData[$fCol] = $row[$fCol];\n } elseif ($fCol === '_PATH_') {\n $theData[$fCol] = $this->recPath($row['pid']);\n } elseif ($fCol === '_REF_') {\n $theData[$fCol] = $this->createReferenceHtml($table, $row['uid']);\n } elseif ($fCol === '_CONTROL_') {\n $theData[$fCol] = $this->makeControl($table, $row);\n } elseif ($fCol === '_CLIPBOARD_') {\n $theData[$fCol] = $this->makeClip($table, $row);\n } elseif ($fCol === '_LOCALIZATION_') {\n list($lC1, $lC2) = $this->makeLocalizationPanel($table, $row);\n $theData[$fCol] = $lC1;\n $theData[$fCol . 'b'] = '<div class=\"btn-group\">' . $lC2 . '</div>';\n } elseif ($fCol === '_LOCALIZATION_b') {\n // deliberately empty\n } else {\n $pageId = $table === 'pages' ? $row['uid'] : $row['pid'];\n $tmpProc = BackendUtility::getProcessedValueExtra($table, $fCol, $row[$fCol], 100, $row['uid'], true, $pageId);\n $theData[$fCol] = $this->linkUrlMail(htmlspecialchars($tmpProc), $row[$fCol]);\n if ($this->csvOutput) {\n $row[$fCol] = BackendUtility::getProcessedValueExtra($table, $fCol, $row[$fCol], 0, $row['uid']);\n }\n }\n }\n // Reset the ID if it was overwritten\n if ((string)$this->searchString !== '') {\n $this->id = $id_orig;\n }\n // Add row to CSV list:\n if ($this->csvOutput) {\n $this->addToCSV($row);\n }\n // Add classes to table cells\n $this->addElement_tdCssClass[$titleCol] = 'col-title col-responsive' . $localizationMarkerClass;\n $this->addElement_tdCssClass['__label'] = $this->addElement_tdCssClass[$titleCol];\n $this->addElement_tdCssClass['_CONTROL_'] = 'col-control';\n if ($this->getModule()->MOD_SETTINGS['clipBoard']) {\n $this->addElement_tdCssClass['_CLIPBOARD_'] = 'col-clipboard';\n }\n $this->addElement_tdCssClass['_PATH_'] = 'col-path';\n $this->addElement_tdCssClass['_LOCALIZATION_'] = 'col-localizationa';\n $this->addElement_tdCssClass['_LOCALIZATION_b'] = 'col-localizationb';\n // Create element in table cells:\n $theData['uid'] = $row['uid'];\n if (isset($GLOBALS['TCA'][$table]['ctrl']['languageField'])\n && isset($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'])\n && $table !== 'pages_language_overlay'\n ) {\n $theData['_l10nparent_'] = $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']];\n }\n \n $tagAttributes = array_map(\n function ($attributeValue) {\n if (is_array($attributeValue)) {\n return implode(' ', $attributeValue);\n }\n return $attributeValue;\n },\n $tagAttributes\n );\n \n $rowOutput .= $this->addElement(1, $theIcon, $theData, GeneralUtility::implodeAttributes($tagAttributes, true));\n // Finally, return table row element:\n return $rowOutput;\n }", "public function addRowButtonClasses($classes)\n {\n $this->addRowButtonClasses = $classes;\n\n return $this;\n }", "public function addRowClass($field, $map) {\n\t\t$js = '';\n\t\tforeach($map as $v => $c) {$js .= sprintf('case \"%s\" : jQuery(r).addClass(\"%s\");break;',$v, $c);}\n\t\t$js = sprintf('function(r,d,i) {switch(d[%d]) {%s}}', $this->getColumnIdByLabel($field), $js);\n\t\t$this->setJqueryParam('fnRowCallback', new Zend_Json_Expr($js));\n\t}", "function add_class_to_image($html, $id, $alt, $title, $align, $url, $size) {\n\t$border = true;\n\t$border = get_field('border', $id);\n\tif (!$border) {\n\t\treturn str_replace('class=\"', 'class=\"no-border ', $html);\n\t} else {\n\t\treturn $html;\n\t}\n}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language, $fs_multijoin_v;\r\n\r\n\t\t// Initialize URLs\r\n\t\t$this->ViewUrl = $fs_multijoin_v->ViewUrl();\r\n\t\t$this->EditUrl = $fs_multijoin_v->EditUrl();\r\n\t\t$this->InlineEditUrl = $fs_multijoin_v->InlineEditUrl();\r\n\t\t$this->CopyUrl = $fs_multijoin_v->CopyUrl();\r\n\t\t$this->InlineCopyUrl = $fs_multijoin_v->InlineCopyUrl();\r\n\t\t$this->DeleteUrl = $fs_multijoin_v->DeleteUrl();\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$fs_multijoin_v->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// id\r\n\r\n\t\t$fs_multijoin_v->id->CellCssStyle = \"\"; $fs_multijoin_v->id->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->id->CellAttrs = array(); $fs_multijoin_v->id->ViewAttrs = array(); $fs_multijoin_v->id->EditAttrs = array();\r\n\r\n\t\t// mount\r\n\t\t$fs_multijoin_v->mount->CellCssStyle = \"\"; $fs_multijoin_v->mount->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->mount->CellAttrs = array(); $fs_multijoin_v->mount->ViewAttrs = array(); $fs_multijoin_v->mount->EditAttrs = array();\r\n\r\n\t\t// path\r\n\t\t$fs_multijoin_v->path->CellCssStyle = \"\"; $fs_multijoin_v->path->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->path->CellAttrs = array(); $fs_multijoin_v->path->ViewAttrs = array(); $fs_multijoin_v->path->EditAttrs = array();\r\n\r\n\t\t// parent\r\n\t\t$fs_multijoin_v->parent->CellCssStyle = \"\"; $fs_multijoin_v->parent->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->parent->CellAttrs = array(); $fs_multijoin_v->parent->ViewAttrs = array(); $fs_multijoin_v->parent->EditAttrs = array();\r\n\r\n\t\t// deprecated\r\n\t\t$fs_multijoin_v->deprecated->CellCssStyle = \"\"; $fs_multijoin_v->deprecated->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->deprecated->CellAttrs = array(); $fs_multijoin_v->deprecated->ViewAttrs = array(); $fs_multijoin_v->deprecated->EditAttrs = array();\r\n\r\n\t\t// name\r\n\t\t$fs_multijoin_v->name->CellCssStyle = \"\"; $fs_multijoin_v->name->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->name->CellAttrs = array(); $fs_multijoin_v->name->ViewAttrs = array(); $fs_multijoin_v->name->EditAttrs = array();\r\n\r\n\t\t// snapshot\r\n\t\t$fs_multijoin_v->snapshot->CellCssStyle = \"\"; $fs_multijoin_v->snapshot->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->snapshot->CellAttrs = array(); $fs_multijoin_v->snapshot->ViewAttrs = array(); $fs_multijoin_v->snapshot->EditAttrs = array();\r\n\r\n\t\t// tapebackup\r\n\t\t$fs_multijoin_v->tapebackup->CellCssStyle = \"\"; $fs_multijoin_v->tapebackup->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->tapebackup->CellAttrs = array(); $fs_multijoin_v->tapebackup->ViewAttrs = array(); $fs_multijoin_v->tapebackup->EditAttrs = array();\r\n\r\n\t\t// diskbackup\r\n\t\t$fs_multijoin_v->diskbackup->CellCssStyle = \"\"; $fs_multijoin_v->diskbackup->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->diskbackup->CellAttrs = array(); $fs_multijoin_v->diskbackup->ViewAttrs = array(); $fs_multijoin_v->diskbackup->EditAttrs = array();\r\n\r\n\t\t// type\r\n\t\t$fs_multijoin_v->type->CellCssStyle = \"\"; $fs_multijoin_v->type->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->type->CellAttrs = array(); $fs_multijoin_v->type->ViewAttrs = array(); $fs_multijoin_v->type->EditAttrs = array();\r\n\r\n\t\t// CONTACT\r\n\t\t$fs_multijoin_v->CONTACT->CellCssStyle = \"\"; $fs_multijoin_v->CONTACT->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->CONTACT->CellAttrs = array(); $fs_multijoin_v->CONTACT->ViewAttrs = array(); $fs_multijoin_v->CONTACT->EditAttrs = array();\r\n\r\n\t\t// CONTACT2\r\n\t\t$fs_multijoin_v->CONTACT2->CellCssStyle = \"\"; $fs_multijoin_v->CONTACT2->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->CONTACT2->CellAttrs = array(); $fs_multijoin_v->CONTACT2->ViewAttrs = array(); $fs_multijoin_v->CONTACT2->EditAttrs = array();\r\n\r\n\t\t// RESCOMP\r\n\t\t$fs_multijoin_v->RESCOMP->CellCssStyle = \"\"; $fs_multijoin_v->RESCOMP->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->RESCOMP->CellAttrs = array(); $fs_multijoin_v->RESCOMP->ViewAttrs = array(); $fs_multijoin_v->RESCOMP->EditAttrs = array();\r\n\t\tif ($fs_multijoin_v->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// id\r\n\t\t\t$fs_multijoin_v->id->ViewValue = $fs_multijoin_v->id->CurrentValue;\r\n\t\t\t$fs_multijoin_v->id->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->id->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// mount\r\n\t\t\t$fs_multijoin_v->mount->ViewValue = $fs_multijoin_v->mount->CurrentValue;\r\n\t\t\t$fs_multijoin_v->mount->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->mount->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->mount->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// path\r\n\t\t\t$fs_multijoin_v->path->ViewValue = $fs_multijoin_v->path->CurrentValue;\r\n\t\t\t$fs_multijoin_v->path->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->path->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->path->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// parent\r\n\t\t\t$fs_multijoin_v->parent->ViewValue = $fs_multijoin_v->parent->CurrentValue;\r\n\t\t\t$fs_multijoin_v->parent->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->parent->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->parent->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// deprecated\r\n\t\t\t$fs_multijoin_v->deprecated->ViewValue = $fs_multijoin_v->deprecated->CurrentValue;\r\n\t\t\t$fs_multijoin_v->deprecated->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->deprecated->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->deprecated->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// name\r\n\t\t\t$fs_multijoin_v->name->ViewValue = $fs_multijoin_v->name->CurrentValue;\r\n\t\t\t$fs_multijoin_v->name->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->name->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->name->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// snapshot\r\n\t\t\t$fs_multijoin_v->snapshot->ViewValue = $fs_multijoin_v->snapshot->CurrentValue;\r\n\t\t\t$fs_multijoin_v->snapshot->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->snapshot->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->snapshot->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// tapebackup\r\n\t\t\t$fs_multijoin_v->tapebackup->ViewValue = $fs_multijoin_v->tapebackup->CurrentValue;\r\n\t\t\t$fs_multijoin_v->tapebackup->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->tapebackup->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->tapebackup->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// diskbackup\r\n\t\t\t$fs_multijoin_v->diskbackup->ViewValue = $fs_multijoin_v->diskbackup->CurrentValue;\r\n\t\t\t$fs_multijoin_v->diskbackup->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->diskbackup->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->diskbackup->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$fs_multijoin_v->type->ViewValue = $fs_multijoin_v->type->CurrentValue;\r\n\t\t\t$fs_multijoin_v->type->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->type->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->type->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CONTACT\r\n\t\t\t$fs_multijoin_v->CONTACT->ViewValue = $fs_multijoin_v->CONTACT->CurrentValue;\r\n\t\t\t$fs_multijoin_v->CONTACT->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CONTACT2\r\n\t\t\t$fs_multijoin_v->CONTACT2->ViewValue = $fs_multijoin_v->CONTACT2->CurrentValue;\r\n\t\t\t$fs_multijoin_v->CONTACT2->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT2->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT2->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// RESCOMP\r\n\t\t\t$fs_multijoin_v->RESCOMP->ViewValue = $fs_multijoin_v->RESCOMP->CurrentValue;\r\n\t\t\t$fs_multijoin_v->RESCOMP->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->RESCOMP->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->RESCOMP->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// id\r\n\t\t\t$fs_multijoin_v->id->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->id->TooltipValue = \"\";\r\n\r\n\t\t\t// mount\r\n\t\t\t$fs_multijoin_v->mount->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->mount->TooltipValue = \"\";\r\n\r\n\t\t\t// path\r\n\t\t\t$fs_multijoin_v->path->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->path->TooltipValue = \"\";\r\n\r\n\t\t\t// parent\r\n\t\t\t$fs_multijoin_v->parent->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->parent->TooltipValue = \"\";\r\n\r\n\t\t\t// deprecated\r\n\t\t\t$fs_multijoin_v->deprecated->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->deprecated->TooltipValue = \"\";\r\n\r\n\t\t\t// name\r\n\t\t\t$fs_multijoin_v->name->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->name->TooltipValue = \"\";\r\n\r\n\t\t\t// snapshot\r\n\t\t\t$fs_multijoin_v->snapshot->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->snapshot->TooltipValue = \"\";\r\n\r\n\t\t\t// tapebackup\r\n\t\t\t$fs_multijoin_v->tapebackup->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->tapebackup->TooltipValue = \"\";\r\n\r\n\t\t\t// diskbackup\r\n\t\t\t$fs_multijoin_v->diskbackup->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->diskbackup->TooltipValue = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$fs_multijoin_v->type->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->type->TooltipValue = \"\";\r\n\r\n\t\t\t// CONTACT\r\n\t\t\t$fs_multijoin_v->CONTACT->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT->TooltipValue = \"\";\r\n\r\n\t\t\t// CONTACT2\r\n\t\t\t$fs_multijoin_v->CONTACT2->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT2->TooltipValue = \"\";\r\n\r\n\t\t\t// RESCOMP\r\n\t\t\t$fs_multijoin_v->RESCOMP->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->RESCOMP->TooltipValue = \"\";\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($fs_multijoin_v->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$fs_multijoin_v->Row_Rendered();\r\n\t}", "function tfuse_row($atts, $content = null)\n{\n extract(shortcode_atts(array('class' => ''), $atts));\n if($class) $class = ' ' . $class;else $class = '';\n\n return '<div class=\"row clearfix ' . $class . '\">' . do_shortcode($content) . '</div>';\n}", "function addRow($rowData, $options = array()) {\r\n\r\n\t $this->rowCount++;\r\n\r\n\t $rowalign = _get_option($options, \"align\", false);\r\n\r\n\t // Start the row, indicate even/oneven\r\n\t $html = \" <tr class=\\\"\";\r\n\t if ( _get_option($options, \"static\", false)) {\r\n\t\t\t$html .= \"static\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$html .= (($this->rowCount % 2) == 0) ? \"even\" : \"oneven\";\r\n\t\t}\r\n\r\n\t\t$html .= \" \" . _get_option($options, \"rowClass\", \"\");\r\n\r\n\t\t$html .= \"\\\"\";\r\n\r\n\t\t$style = _get_option($options, \"style\", \"\");\r\n\r\n\t if ( $style != \"\") {\r\n\t $html .= \" style=\\\"$style\\\"\";\r\n\t }\r\n\r\n // Insert user defined attributes for the tr tag\r\n foreach(_get_option($options, \"trAttributes\", array()) as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\r\n\t\t$html .= \">\\n\";\r\n\r\n\t // Draw each cell in the row\r\n\t\tfor($i = 0; $i < $this->colCount; $i++) {\r\n\r\n\t\t // Opening td tag with options\r\n \t\t$html .= \" <td\";\r\n\r\n\t\t\t$html .= \" id='cell_\" . $this->rowCount . \"_$i'\";\r\n\r\n \t\tif ($rowalign) {\r\n\t\t\t $html .= \" align=\\\"$rowalign\\\"\";\r\n\t\t\t}\r\n\t\t else if ( isset($this->columnInfo[$i][\"align\"])) {\r\n\t\t\t $html .= \" align=\\\"\" . $this->columnInfo[$i][\"align\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n\t\t\tif ( is_array($rowData[$i]) && isset($rowData[$i][\"style\"]) ) {\r\n \t\t\t $html .= \" style=\\\"\" . $rowData[$i][\"style\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['tdAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['tdAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\r\n\t\t\t$cellContent = '';\r\n\r\n\t\t\t$html .=\"<div style='overflow:hidden' \";\r\n\r\n\t\t\t// Cell content or empty\r\n\t\t\tif ( ! is_array($rowData[$i]) ){\r\n\t\t\t $cellContent = $rowData[$i];\r\n\r\n if (is_object($cellContent) && method_exists($cellContent, '__toString'))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags((string) $cellContent)));\r\n }\r\n elseif (! is_object($cellContent))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse if ( is_array($rowData[$i]) && isset($rowData[$i][\"content\"]) ) {\r\n\t\t\t\t$cellContent = $rowData[$i][\"content\"];\r\n if (! isset($rowData[$i]['divAttributes']['title']))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t $cellContent = \"&nbsp;\";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['divAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['divAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\t\t\t$html .= $cellContent;\r\n\r\n\t\t\t// End of cell\r\n\t\t\t$html .= \"</div>\";\r\n\t\t\t$html .= \" </td>\\n\";\r\n\t\t}\r\n\r\n\t\t// End of row\r\n\t\t$html .= \" </tr>\\n\";\r\n\t\t$this->rowDataHtml .= $html;\r\n\t}", "function naked_before_row( $data, $grid_attributes = null) {\n if ( isset($grid_attributes['style']['class']) ) {\n $id_html = \"id='\" . $grid_attributes['style']['class'] . \"'\";\n } else {\n $id_html = '';\n }\n $html = '<div class=\"offset section about\"' . $id_html . '><div class=\"container\">';\n\n return $html;\n }", "function row_shortcode( $atts, $content = null ) {\n\n\t$attribute = shortcode_atts( array(\n\t\t'align_items' => '',\n\t\t'align_content' => '',\n\t\t'justify_content' => '',\n\t\t'class' => '',\n\t\t'style' => ''\n\t), $atts );\n\n\t$attribute['style'] = $attribute['style'] ? 'style=\"'.$attribute['style'].'\"' : '';\n\t$attribute['class'] = $attribute['class'] ? ' '.$attribute['class'] : '';\n\t$attribute['align_items'] = $attribute['align_items'] ? ' align-items-'.$attribute['align_items'] : '';\n\t$attribute['align_content'] = $attribute['align-content'] ? ' align-content-'.$attribute['align_content'] : '';\n\t$attribute['justify_content'] = $attribute['justify_content'] ? ' justify-content-'.$attribute['justify_content'] : '';\n\n\treturn '<div '.$attribute['style']\n\t\t .' class=\"row'.$attribute['class']\n\t\t .$attribute['align_items']\n\t\t .$attribute['align_content']\n\t\t .$attribute['justify_content'].'\">'\n\t\t . do_shortcode($content) . '</div>';\n}", "protected function evaluateRowCssClass($row, $data)\n {\n $classes = array();\n\n $classes[] = $row % 2 ? 'even' : 'odd';\n $classes[] = 'daemon' . ($data->daemon->id % 8 + 1);\n\n return implode(' ', $classes);\n }", "function setZebra($zebra) {\n\t if($zebra == 'odd' || $zebra == 'even') $this->zebra = $zebra;\n\t else user_error(\"setZebra passed '$zebra'. It should be passed 'odd' or 'even'\", E_USER_WARNING);\n \t}", "public function resetExpandedRows()\n\t{\n\t\t$this->setExpandedRows();\n\t}", "function SetRowAlignment()\n\t{\n\t\tif ((!func_num_args()) || (!isset($this->_intCurrentRow)))\n\t\t{\n\t\t\t// no parameters were passed or there is no current row\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// retrieve the alignment values\n\t\t$arrRowAlignments = func_get_args();\n\t\t\n\t\t$this->_arrRows[$this->_intCurrentRow]['Alignments'] = $arrRowAlignments;\n\n\t\treturn $this->_intCurrentRow;\n\t}", "protected function rowStyleOptions() {\n // Get all available row plugins by default.\n $options = Views::fetchPluginNames('row', 'normal', [$this->base_table]);\n return $options;\n }", "public function updateClassNames(&$classes)\n {\n if ($this->owner->isNoGutters()) {\n $classes[] = $this->style('row.no-gutters');\n }\n }", "function Row($data)\r\n{\r\n\t$nb=0;\r\n\tfor($i=0;$i<count($data);$i++)\r\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n\t$h=5*$nb;\r\n\t//Issue a page break first if needed\r\n\t$this->CheckPageBreak($h);\r\n\t//Draw the cells of the row\r\n\tfor($i=0;$i<count($data);$i++)\r\n\t{\r\n\t\t$w=$this->widths[$i];\r\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n\t\t//Save the current position\r\n\t\t$x=$this->GetX();\r\n\t\t$y=$this->GetY();\r\n\t\t//Draw the border\r\n\r\n\t\t$this->Rect($x,$y,$w,$h);\r\n\r\n\t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\r\n\t\t//Put the position to the right of the cell\r\n\t\t$this->SetXY($x+$w,$y);\r\n\t}\r\n\t//Go to the next line\r\n\t$this->Ln($h);\r\n}", "function pixelgrade_blog_grid_class( $class = '', $location = '' ) {\n\t// Separates classes with a single space, collates classes\n\techo 'class=\"' . esc_attr( join( ' ', pixelgrade_get_blog_grid_class( $class, $location ) ) ) . '\"';\n}", "function getColumnClasses($count)\n {\n $itemclass = '';\n if ($count % 2 == 0) {\n $itemclass = 'even';\n } else {\n $itemclass = 'odd';\n }\n if ($count % 3 == 0) {\n $itemclass .= ' third';\n } else if (($count - 1) % 3 == 0) {\n $itemclass .= ' after-third';\n }\n if ($count % 4 == 0) {\n $itemclass .= ' fourth';\n } else if (($count - 1) % 4 == 0) {\n $itemclass .= ' after-fourth';\n }\n if ($count % 5 == 0) {\n $itemclass .= ' fifth';\n } else if (($count - 1) % 5 == 0) {\n $itemclass .= ' after-fifth';\n }\n return $itemclass;\n }", "function give_linked_images_class($html, $id, $caption, $title, $align, $url, $size, $alt = '' ){\n\t$rel = \"prettyPhoto\";\n \n\t// check if there are already rel assigned to the anchor\n\tif ( preg_match('/<a.*? rel=\".*?\">/', $html) ) {\n\t $html = preg_replace('/(<a.*? rel=\".*?)(\".*?>)/', '$1 ' . $rel . '$2', $html);\n\t} else {\n\t $html = preg_replace('/(<a.*?)>/', '$1 rel=\"' . $rel . '\" >', $html);\n\t}\n\treturn $html;\n }", "protected function getDesignAlternatingColor($methodName,$rowCounter,$type='BACKGROUND_COLOR'){\n\t\tif( !isset($this->settings['design'][$methodName]) ){\n\t\t\t$this->settings['design'][$methodName] = array($type=>array() );\n\t\t}\n\t\telseif( !isset($this->settings['design'][$methodName][$type]) ){\n\t\t\t$this->settings['design'][$methodName][$type] = array();\n\t\t}\n\n\t\t$count = count($this->settings['design'][$methodName][$type]);\n\t\t$count = $count == 0 ? 1 : $count;\n\n\t\t$mod = $rowCounter % $count;\n\t\treturn isset($this->settings['design'][$methodName][$type][$mod]) ? $this->settings['design'][$methodName][$type][$mod] : '';\n\n\t}", "public function getRowAttributes(RenderWalker $walker, int $index, array $row): array;", "private function mapHorizontal()\n {\n for ($i = $this->myRowPos; $i <= $this->totalNumCells; ($i+=$this->boardWidth)){\n $this->disabledCells[] = $i;\n }\n }", "function formatRow(){\n $this->hook('formatRow');\n }", "public function alt(){\n\t\tif( $this->alt ) {\n\t\t\treturn $this->alt;\n\t\t}//end if\n\n\t\t$this->alt = @file_get_contents( $this->base_dir.'/'.$this->dir . $this->filename . '.alt');\n\n\t\treturn $this->alt;\n\t}", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $tbl_slide;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $tbl_slide->ViewUrl();\n\t\t$this->EditUrl = $tbl_slide->EditUrl();\n\t\t$this->InlineEditUrl = $tbl_slide->InlineEditUrl();\n\t\t$this->CopyUrl = $tbl_slide->CopyUrl();\n\t\t$this->InlineCopyUrl = $tbl_slide->InlineCopyUrl();\n\t\t$this->DeleteUrl = $tbl_slide->DeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$tbl_slide->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// title\n\n\t\t$tbl_slide->title->CellCssStyle = \"\"; $tbl_slide->title->CellCssClass = \"\";\n\t\t$tbl_slide->title->CellAttrs = array(); $tbl_slide->title->ViewAttrs = array(); $tbl_slide->title->EditAttrs = array();\n\n\t\t// images\n\t\t$tbl_slide->images->CellCssStyle = \"\"; $tbl_slide->images->CellCssClass = \"\";\n\t\t$tbl_slide->images->CellAttrs = array(); $tbl_slide->images->ViewAttrs = array(); $tbl_slide->images->EditAttrs = array();\n\n\t\t// order_by\n\t\t$tbl_slide->order_by->CellCssStyle = \"\"; $tbl_slide->order_by->CellCssClass = \"\";\n\t\t$tbl_slide->order_by->CellAttrs = array(); $tbl_slide->order_by->ViewAttrs = array(); $tbl_slide->order_by->EditAttrs = array();\n\t\tif ($tbl_slide->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// banner_id\n\t\t\t$tbl_slide->banner_id->ViewValue = $tbl_slide->banner_id->CurrentValue;\n\t\t\t$tbl_slide->banner_id->CssStyle = \"\";\n\t\t\t$tbl_slide->banner_id->CssClass = \"\";\n\t\t\t$tbl_slide->banner_id->ViewCustomAttributes = \"\";\n\n\t\t\t// title\n\t\t\t$tbl_slide->title->ViewValue = $tbl_slide->title->CurrentValue;\n\t\t\t$tbl_slide->title->CssStyle = \"\";\n\t\t\t$tbl_slide->title->CssClass = \"\";\n\t\t\t$tbl_slide->title->ViewCustomAttributes = \"\";\n\n\t\t\t// images\n\t\t\tif (!ew_Empty($tbl_slide->images->Upload->DbValue)) {\n\t\t\t\t$tbl_slide->images->ViewValue = $tbl_slide->images->Upload->DbValue;\n\t\t\t\t$tbl_slide->images->ImageWidth = 300;\n\t\t\t\t$tbl_slide->images->ImageHeight = 180;\n\t\t\t\t$tbl_slide->images->ImageAlt = $tbl_slide->images->FldAlt();\n\t\t\t} else {\n\t\t\t\t$tbl_slide->images->ViewValue = \"\";\n\t\t\t}\n\t\t\t$tbl_slide->images->CssStyle = \"\";\n\t\t\t$tbl_slide->images->CssClass = \"\";\n\t\t\t$tbl_slide->images->ViewCustomAttributes = \"\";\n\n\t\t\t// order_by\n\t\t\t$tbl_slide->order_by->ViewValue = $tbl_slide->order_by->CurrentValue;\n\t\t\t$tbl_slide->order_by->CssStyle = \"\";\n\t\t\t$tbl_slide->order_by->CssClass = \"\";\n\t\t\t$tbl_slide->order_by->ViewCustomAttributes = \"\";\n\n\t\t\t// title\n\t\t\t$tbl_slide->title->HrefValue = \"\";\n\t\t\t$tbl_slide->title->TooltipValue = \"\";\n\n\t\t\t// images\n\t\t\t$tbl_slide->images->HrefValue = \"\";\n\t\t\t$tbl_slide->images->TooltipValue = \"\";\n\n\t\t\t// order_by\n\t\t\t$tbl_slide->order_by->HrefValue = \"\";\n\t\t\t$tbl_slide->order_by->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($tbl_slide->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$tbl_slide->Row_Rendered();\n\t}", "private function cssAut()\n {\n $this->active_class = explode(' ',$this->active_class);\n $this->active_class = $this->active_class[0];\n }", "public function classButtons($iterator) {\n\t\t$usedPrimary = false;\n\n\t\tif ($iterator instanceof Nette\\Application\\UI\\Form) {\n\t\t\t$iterator = $iterator->getComponents(true, '\\Nette\\Forms\\Controls\\Button');\n\t\t}\n\n\t\tforeach ($iterator as $button) {\n\t\t\t$button->setAttribute('class', empty($usedPrimary) ? 'btn btn-primary' : 'btn btn-inverse');\n\n\t\t\tif (!$button->getOption('notPrimary')) {\n\t\t\t\t$usedPrimary = TRUE;\n\t\t\t}\n\t\t}\n\t}", "protected function replacePluginForRows()\n {\n $this->newRow(new Row); // NOVA LINHA\n $col = new Col($this->currentRow); // CRIANDO COLUNA\n $this->currentRow->newCol($col); // ADICIONANDO COLUNA NA LINHA ATUAL\n $col->newPlugin($this->plugins[0]); // ADICIONANDO PLUGIN ATUAL NA COLUNA\n $this->plugins = null; // EXCLUINDO PLUGIN ANTIGO DA COLUNA\n }", "public function advanceLabelRow ()\r\n {\r\n $return = '';\r\n $this->label_column = 1;\r\n $return .= '\r\n </div>\r\n </div>';\r\n if (++$this->label_row > $this->number_of_rows)\r\n {\r\n $this->label_row =1;\r\n ++$this->label_page;\r\n $return .= '\r\n </div>\r\n <div class=\"labelpage\">';\r\n }\r\n $return .= '\r\n <div class=\"labelrow\">\r\n <div class=\"labelbody\">';\r\n return $return;\r\n }", "function tablerow_open($classes = null) {\n // initialize the cell counter used for classes\n $this->_counter['cell_counter'] = 0;\n $class = 'row'.$this->_counter['row_counter']++;\n if($classes !== null) {\n if(is_array($classes)) $classes = join(' ', $classes);\n $class .= ' ' . $classes;\n }\n $this->doc .= DOKU_TAB.'<tr class=\"'.$class.'\">'.DOKU_LF.DOKU_TAB.DOKU_TAB;\n }", "function be_portfolio_post_class( $classes ) {\n\t$columns = 3; // Set the number of columns here\n\t$column_classes = array( '', '', 'one-half', 'one-third', 'one-fourth', 'one-fifth', 'one-sixth' );\n\t$classes[] = $column_classes[$columns];\n\tglobal $wp_query;\n\tif( 0 == $wp_query->current_post || 0 == $wp_query->current_post % $columns )\n\t\t$classes[] = 'first';\n\treturn $classes;\n}", "function RenderRow() {\n\t\tglobal $conn, $Security, $planilla;\n\n\t\t// Call Row_Rendering event\n\t\t$planilla->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// idPlanilla\n\n\t\t$planilla->idPlanilla->CellCssStyle = \"\";\n\t\t$planilla->idPlanilla->CellCssClass = \"\";\n\n\t\t// Nombre\n\t\t$planilla->Nombre->CellCssStyle = \"\";\n\t\t$planilla->Nombre->CellCssClass = \"\";\n\t\tif ($planilla->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// idPlanilla\n\t\t\t$planilla->idPlanilla->ViewValue = $planilla->idPlanilla->CurrentValue;\n\t\t\t$planilla->idPlanilla->CssStyle = \"\";\n\t\t\t$planilla->idPlanilla->CssClass = \"\";\n\t\t\t$planilla->idPlanilla->ViewCustomAttributes = \"\";\n\n\t\t\t// Nombre\n\t\t\t$planilla->Nombre->ViewValue = $planilla->Nombre->CurrentValue;\n\t\t\t$planilla->Nombre->CssStyle = \"\";\n\t\t\t$planilla->Nombre->CssClass = \"\";\n\t\t\t$planilla->Nombre->ViewCustomAttributes = \"\";\n\n\t\t\t// idPlanilla\n\t\t\t$planilla->idPlanilla->HrefValue = \"\";\n\n\t\t\t// Nombre\n\t\t\t$planilla->Nombre->HrefValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\t$planilla->Row_Rendered();\n\t}", "function Row($data){\r\n \t$nb=0;\r\n \tfor($i=0;$i<count($data);$i++)\r\n \t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n \t$h=5*$nb;\r\n \t//Issue a page break first if needed\r\n \t$this->CheckPageBreak($h);\r\n \t//Draw the cells of the row\r\n \tfor($i=0;$i<count($data);$i++)\r\n \t{\r\n \t\t$w=$this->widths[$i];\r\n \t\t//$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n $a=$this->aligns[$i];\r\n \t\t//Save the current position\r\n \t\t$x=$this->GetX();\r\n \t\t$y=$this->GetY();\r\n \t\t//Draw the border\r\n \t\t\r\n \t\t$this->Rect($x,$y,$w,$h);\r\n //$this->SetLineStyle(0);\r\n //$this->SetLineWidth($dash);\r\n \t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\r\n \t\t//Put the position to the right of the cell\r\n \t\t$this->SetXY($x+$w,$y);\r\n \t}\r\n \t//Go to the next line\r\n \t$this->Ln($h);\r\n }", "private function establishOtherRows()\n {\n for ($i = 1; $i <= $this->boardWidth; $i++) {\n if ($i == $this->myRowNum) {\n continue;\n }\n\n if ($i < $this->myRowNum) {\n $this->rowsAboveMe[] = $i;\n }\n\n if ($i > $this->myRowNum) {\n $this->rowsBelowMe[] = $i;\n }\n }\n }", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $archv_finished;\n\n\t\t// Initialize URLs\n\t\t$this->ExportPrintUrl = $this->PageUrl() . \"export=print&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportHtmlUrl = $this->PageUrl() . \"export=html&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportExcelUrl = $this->PageUrl() . \"export=excel&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportWordUrl = $this->PageUrl() . \"export=word&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportXmlUrl = $this->PageUrl() . \"export=xml&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportCsvUrl = $this->PageUrl() . \"export=csv&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->AddUrl = $archv_finished->AddUrl();\n\t\t$this->EditUrl = $archv_finished->EditUrl();\n\t\t$this->CopyUrl = $archv_finished->CopyUrl();\n\t\t$this->DeleteUrl = $archv_finished->DeleteUrl();\n\t\t$this->ListUrl = $archv_finished->ListUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$archv_finished->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// ID\n\n\t\t$archv_finished->ID->CellCssStyle = \"\"; $archv_finished->ID->CellCssClass = \"\";\n\t\t$archv_finished->ID->CellAttrs = array(); $archv_finished->ID->ViewAttrs = array(); $archv_finished->ID->EditAttrs = array();\n\n\t\t// strjrfnum\n\t\t$archv_finished->strjrfnum->CellCssStyle = \"\"; $archv_finished->strjrfnum->CellCssClass = \"\";\n\t\t$archv_finished->strjrfnum->CellAttrs = array(); $archv_finished->strjrfnum->ViewAttrs = array(); $archv_finished->strjrfnum->EditAttrs = array();\n\n\t\t// strquarter\n\t\t$archv_finished->strquarter->CellCssStyle = \"\"; $archv_finished->strquarter->CellCssClass = \"\";\n\t\t$archv_finished->strquarter->CellAttrs = array(); $archv_finished->strquarter->ViewAttrs = array(); $archv_finished->strquarter->EditAttrs = array();\n\n\t\t// strmon\n\t\t$archv_finished->strmon->CellCssStyle = \"\"; $archv_finished->strmon->CellCssClass = \"\";\n\t\t$archv_finished->strmon->CellAttrs = array(); $archv_finished->strmon->ViewAttrs = array(); $archv_finished->strmon->EditAttrs = array();\n\n\t\t// stryear\n\t\t$archv_finished->stryear->CellCssStyle = \"\"; $archv_finished->stryear->CellCssClass = \"\";\n\t\t$archv_finished->stryear->CellAttrs = array(); $archv_finished->stryear->ViewAttrs = array(); $archv_finished->stryear->EditAttrs = array();\n\n\t\t// strdate\n\t\t$archv_finished->strdate->CellCssStyle = \"\"; $archv_finished->strdate->CellCssClass = \"\";\n\t\t$archv_finished->strdate->CellAttrs = array(); $archv_finished->strdate->ViewAttrs = array(); $archv_finished->strdate->EditAttrs = array();\n\n\t\t// strtime\n\t\t$archv_finished->strtime->CellCssStyle = \"\"; $archv_finished->strtime->CellCssClass = \"\";\n\t\t$archv_finished->strtime->CellAttrs = array(); $archv_finished->strtime->ViewAttrs = array(); $archv_finished->strtime->EditAttrs = array();\n\n\t\t// strusername\n\t\t$archv_finished->strusername->CellCssStyle = \"\"; $archv_finished->strusername->CellCssClass = \"\";\n\t\t$archv_finished->strusername->CellAttrs = array(); $archv_finished->strusername->ViewAttrs = array(); $archv_finished->strusername->EditAttrs = array();\n\n\t\t// strusereadd\n\t\t$archv_finished->strusereadd->CellCssStyle = \"\"; $archv_finished->strusereadd->CellCssClass = \"\";\n\t\t$archv_finished->strusereadd->CellAttrs = array(); $archv_finished->strusereadd->ViewAttrs = array(); $archv_finished->strusereadd->EditAttrs = array();\n\n\t\t// strcompany\n\t\t$archv_finished->strcompany->CellCssStyle = \"\"; $archv_finished->strcompany->CellCssClass = \"\";\n\t\t$archv_finished->strcompany->CellAttrs = array(); $archv_finished->strcompany->ViewAttrs = array(); $archv_finished->strcompany->EditAttrs = array();\n\n\t\t// strdepartment\n\t\t$archv_finished->strdepartment->CellCssStyle = \"\"; $archv_finished->strdepartment->CellCssClass = \"\";\n\t\t$archv_finished->strdepartment->CellAttrs = array(); $archv_finished->strdepartment->ViewAttrs = array(); $archv_finished->strdepartment->EditAttrs = array();\n\n\t\t// strloc\n\t\t$archv_finished->strloc->CellCssStyle = \"\"; $archv_finished->strloc->CellCssClass = \"\";\n\t\t$archv_finished->strloc->CellAttrs = array(); $archv_finished->strloc->ViewAttrs = array(); $archv_finished->strloc->EditAttrs = array();\n\n\t\t// strposition\n\t\t$archv_finished->strposition->CellCssStyle = \"\"; $archv_finished->strposition->CellCssClass = \"\";\n\t\t$archv_finished->strposition->CellAttrs = array(); $archv_finished->strposition->ViewAttrs = array(); $archv_finished->strposition->EditAttrs = array();\n\n\t\t// strtelephone\n\t\t$archv_finished->strtelephone->CellCssStyle = \"\"; $archv_finished->strtelephone->CellCssClass = \"\";\n\t\t$archv_finished->strtelephone->CellAttrs = array(); $archv_finished->strtelephone->ViewAttrs = array(); $archv_finished->strtelephone->EditAttrs = array();\n\n\t\t// strcostcent\n\t\t$archv_finished->strcostcent->CellCssStyle = \"\"; $archv_finished->strcostcent->CellCssClass = \"\";\n\t\t$archv_finished->strcostcent->CellAttrs = array(); $archv_finished->strcostcent->ViewAttrs = array(); $archv_finished->strcostcent->EditAttrs = array();\n\n\t\t// strsubject\n\t\t$archv_finished->strsubject->CellCssStyle = \"\"; $archv_finished->strsubject->CellCssClass = \"\";\n\t\t$archv_finished->strsubject->CellAttrs = array(); $archv_finished->strsubject->ViewAttrs = array(); $archv_finished->strsubject->EditAttrs = array();\n\n\t\t// strnature\n\t\t$archv_finished->strnature->CellCssStyle = \"\"; $archv_finished->strnature->CellCssClass = \"\";\n\t\t$archv_finished->strnature->CellAttrs = array(); $archv_finished->strnature->ViewAttrs = array(); $archv_finished->strnature->EditAttrs = array();\n\n\t\t// strdescript\n\t\t$archv_finished->strdescript->CellCssStyle = \"\"; $archv_finished->strdescript->CellCssClass = \"\";\n\t\t$archv_finished->strdescript->CellAttrs = array(); $archv_finished->strdescript->ViewAttrs = array(); $archv_finished->strdescript->EditAttrs = array();\n\n\t\t// strarea\n\t\t$archv_finished->strarea->CellCssStyle = \"\"; $archv_finished->strarea->CellCssClass = \"\";\n\t\t$archv_finished->strarea->CellAttrs = array(); $archv_finished->strarea->ViewAttrs = array(); $archv_finished->strarea->EditAttrs = array();\n\n\t\t// strattach\n\t\t$archv_finished->strattach->CellCssStyle = \"\"; $archv_finished->strattach->CellCssClass = \"\";\n\t\t$archv_finished->strattach->CellAttrs = array(); $archv_finished->strattach->ViewAttrs = array(); $archv_finished->strattach->EditAttrs = array();\n\n\t\t// strpriority\n\t\t$archv_finished->strpriority->CellCssStyle = \"\"; $archv_finished->strpriority->CellCssClass = \"\";\n\t\t$archv_finished->strpriority->CellAttrs = array(); $archv_finished->strpriority->ViewAttrs = array(); $archv_finished->strpriority->EditAttrs = array();\n\n\t\t// strduedate\n\t\t$archv_finished->strduedate->CellCssStyle = \"\"; $archv_finished->strduedate->CellCssClass = \"\";\n\t\t$archv_finished->strduedate->CellAttrs = array(); $archv_finished->strduedate->ViewAttrs = array(); $archv_finished->strduedate->EditAttrs = array();\n\n\t\t// strstatus\n\t\t$archv_finished->strstatus->CellCssStyle = \"\"; $archv_finished->strstatus->CellCssClass = \"\";\n\t\t$archv_finished->strstatus->CellAttrs = array(); $archv_finished->strstatus->ViewAttrs = array(); $archv_finished->strstatus->EditAttrs = array();\n\n\t\t// strlastedit\n\t\t$archv_finished->strlastedit->CellCssStyle = \"\"; $archv_finished->strlastedit->CellCssClass = \"\";\n\t\t$archv_finished->strlastedit->CellAttrs = array(); $archv_finished->strlastedit->ViewAttrs = array(); $archv_finished->strlastedit->EditAttrs = array();\n\n\t\t// strcategory\n\t\t$archv_finished->strcategory->CellCssStyle = \"\"; $archv_finished->strcategory->CellCssClass = \"\";\n\t\t$archv_finished->strcategory->CellAttrs = array(); $archv_finished->strcategory->ViewAttrs = array(); $archv_finished->strcategory->EditAttrs = array();\n\n\t\t// strassigned\n\t\t$archv_finished->strassigned->CellCssStyle = \"\"; $archv_finished->strassigned->CellCssClass = \"\";\n\t\t$archv_finished->strassigned->CellAttrs = array(); $archv_finished->strassigned->ViewAttrs = array(); $archv_finished->strassigned->EditAttrs = array();\n\n\t\t// strdatecomplete\n\t\t$archv_finished->strdatecomplete->CellCssStyle = \"\"; $archv_finished->strdatecomplete->CellCssClass = \"\";\n\t\t$archv_finished->strdatecomplete->CellAttrs = array(); $archv_finished->strdatecomplete->ViewAttrs = array(); $archv_finished->strdatecomplete->EditAttrs = array();\n\n\t\t// strwithpr\n\t\t$archv_finished->strwithpr->CellCssStyle = \"\"; $archv_finished->strwithpr->CellCssClass = \"\";\n\t\t$archv_finished->strwithpr->CellAttrs = array(); $archv_finished->strwithpr->ViewAttrs = array(); $archv_finished->strwithpr->EditAttrs = array();\n\n\t\t// strremarks\n\t\t$archv_finished->strremarks->CellCssStyle = \"\"; $archv_finished->strremarks->CellCssClass = \"\";\n\t\t$archv_finished->strremarks->CellAttrs = array(); $archv_finished->strremarks->ViewAttrs = array(); $archv_finished->strremarks->EditAttrs = array();\n\n\t\t// sap_num\n\t\t$archv_finished->sap_num->CellCssStyle = \"\"; $archv_finished->sap_num->CellCssClass = \"\";\n\t\t$archv_finished->sap_num->CellAttrs = array(); $archv_finished->sap_num->ViewAttrs = array(); $archv_finished->sap_num->EditAttrs = array();\n\n\t\t// work_days\n\t\t$archv_finished->work_days->CellCssStyle = \"\"; $archv_finished->work_days->CellCssClass = \"\";\n\t\t$archv_finished->work_days->CellAttrs = array(); $archv_finished->work_days->ViewAttrs = array(); $archv_finished->work_days->EditAttrs = array();\n\t\tif ($archv_finished->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// ID\n\t\t\t$archv_finished->ID->ViewValue = $archv_finished->ID->CurrentValue;\n\t\t\t$archv_finished->ID->CssStyle = \"\";\n\t\t\t$archv_finished->ID->CssClass = \"\";\n\t\t\t$archv_finished->ID->ViewCustomAttributes = \"\";\n\n\t\t\t// strjrfnum\n\t\t\t$archv_finished->strjrfnum->ViewValue = $archv_finished->strjrfnum->CurrentValue;\n\t\t\t$archv_finished->strjrfnum->CssStyle = \"\";\n\t\t\t$archv_finished->strjrfnum->CssClass = \"\";\n\t\t\t$archv_finished->strjrfnum->ViewCustomAttributes = \"\";\n\n\t\t\t// strquarter\n\t\t\t$archv_finished->strquarter->ViewValue = $archv_finished->strquarter->CurrentValue;\n\t\t\t$archv_finished->strquarter->CssStyle = \"\";\n\t\t\t$archv_finished->strquarter->CssClass = \"\";\n\t\t\t$archv_finished->strquarter->ViewCustomAttributes = \"\";\n\n\t\t\t// strmon\n\t\t\t$archv_finished->strmon->ViewValue = $archv_finished->strmon->CurrentValue;\n\t\t\t$archv_finished->strmon->CssStyle = \"\";\n\t\t\t$archv_finished->strmon->CssClass = \"\";\n\t\t\t$archv_finished->strmon->ViewCustomAttributes = \"\";\n\n\t\t\t// stryear\n\t\t\t$archv_finished->stryear->ViewValue = $archv_finished->stryear->CurrentValue;\n\t\t\t$archv_finished->stryear->CssStyle = \"\";\n\t\t\t$archv_finished->stryear->CssClass = \"\";\n\t\t\t$archv_finished->stryear->ViewCustomAttributes = \"\";\n\n\t\t\t// strdate\n\t\t\t$archv_finished->strdate->ViewValue = $archv_finished->strdate->CurrentValue;\n\t\t\t$archv_finished->strdate->CssStyle = \"\";\n\t\t\t$archv_finished->strdate->CssClass = \"\";\n\t\t\t$archv_finished->strdate->ViewCustomAttributes = \"\";\n\n\t\t\t// strtime\n\t\t\t$archv_finished->strtime->ViewValue = $archv_finished->strtime->CurrentValue;\n\t\t\t$archv_finished->strtime->CssStyle = \"\";\n\t\t\t$archv_finished->strtime->CssClass = \"\";\n\t\t\t$archv_finished->strtime->ViewCustomAttributes = \"\";\n\n\t\t\t// strusername\n\t\t\t$archv_finished->strusername->ViewValue = $archv_finished->strusername->CurrentValue;\n\t\t\t$archv_finished->strusername->CssStyle = \"\";\n\t\t\t$archv_finished->strusername->CssClass = \"\";\n\t\t\t$archv_finished->strusername->ViewCustomAttributes = \"\";\n\n\t\t\t// strusereadd\n\t\t\t$archv_finished->strusereadd->ViewValue = $archv_finished->strusereadd->CurrentValue;\n\t\t\t$archv_finished->strusereadd->CssStyle = \"\";\n\t\t\t$archv_finished->strusereadd->CssClass = \"\";\n\t\t\t$archv_finished->strusereadd->ViewCustomAttributes = \"\";\n\n\t\t\t// strcompany\n\t\t\t$archv_finished->strcompany->ViewValue = $archv_finished->strcompany->CurrentValue;\n\t\t\t$archv_finished->strcompany->CssStyle = \"\";\n\t\t\t$archv_finished->strcompany->CssClass = \"\";\n\t\t\t$archv_finished->strcompany->ViewCustomAttributes = \"\";\n\n\t\t\t// strdepartment\n\t\t\t$archv_finished->strdepartment->ViewValue = $archv_finished->strdepartment->CurrentValue;\n\t\t\t$archv_finished->strdepartment->CssStyle = \"\";\n\t\t\t$archv_finished->strdepartment->CssClass = \"\";\n\t\t\t$archv_finished->strdepartment->ViewCustomAttributes = \"\";\n\n\t\t\t// strloc\n\t\t\t$archv_finished->strloc->ViewValue = $archv_finished->strloc->CurrentValue;\n\t\t\t$archv_finished->strloc->CssStyle = \"\";\n\t\t\t$archv_finished->strloc->CssClass = \"\";\n\t\t\t$archv_finished->strloc->ViewCustomAttributes = \"\";\n\n\t\t\t// strposition\n\t\t\t$archv_finished->strposition->ViewValue = $archv_finished->strposition->CurrentValue;\n\t\t\t$archv_finished->strposition->CssStyle = \"\";\n\t\t\t$archv_finished->strposition->CssClass = \"\";\n\t\t\t$archv_finished->strposition->ViewCustomAttributes = \"\";\n\n\t\t\t// strtelephone\n\t\t\t$archv_finished->strtelephone->ViewValue = $archv_finished->strtelephone->CurrentValue;\n\t\t\t$archv_finished->strtelephone->CssStyle = \"\";\n\t\t\t$archv_finished->strtelephone->CssClass = \"\";\n\t\t\t$archv_finished->strtelephone->ViewCustomAttributes = \"\";\n\n\t\t\t// strcostcent\n\t\t\t$archv_finished->strcostcent->ViewValue = $archv_finished->strcostcent->CurrentValue;\n\t\t\t$archv_finished->strcostcent->CssStyle = \"\";\n\t\t\t$archv_finished->strcostcent->CssClass = \"\";\n\t\t\t$archv_finished->strcostcent->ViewCustomAttributes = \"\";\n\n\t\t\t// strsubject\n\t\t\t$archv_finished->strsubject->ViewValue = $archv_finished->strsubject->CurrentValue;\n\t\t\t$archv_finished->strsubject->CssStyle = \"\";\n\t\t\t$archv_finished->strsubject->CssClass = \"\";\n\t\t\t$archv_finished->strsubject->ViewCustomAttributes = \"\";\n\n\t\t\t// strnature\n\t\t\t$archv_finished->strnature->ViewValue = $archv_finished->strnature->CurrentValue;\n\t\t\t$archv_finished->strnature->CssStyle = \"\";\n\t\t\t$archv_finished->strnature->CssClass = \"\";\n\t\t\t$archv_finished->strnature->ViewCustomAttributes = \"\";\n\n\t\t\t// strdescript\n\t\t\t$archv_finished->strdescript->ViewValue = $archv_finished->strdescript->CurrentValue;\n\t\t\t$archv_finished->strdescript->CssStyle = \"\";\n\t\t\t$archv_finished->strdescript->CssClass = \"\";\n\t\t\t$archv_finished->strdescript->ViewCustomAttributes = \"\";\n\n\t\t\t// strarea\n\t\t\t$archv_finished->strarea->ViewValue = $archv_finished->strarea->CurrentValue;\n\t\t\t$archv_finished->strarea->CssStyle = \"\";\n\t\t\t$archv_finished->strarea->CssClass = \"\";\n\t\t\t$archv_finished->strarea->ViewCustomAttributes = \"\";\n\n\t\t\t// strattach\n\t\t\t$archv_finished->strattach->ViewValue = $archv_finished->strattach->CurrentValue;\n\t\t\t$archv_finished->strattach->CssStyle = \"\";\n\t\t\t$archv_finished->strattach->CssClass = \"\";\n\t\t\t$archv_finished->strattach->ViewCustomAttributes = \"\";\n\n\t\t\t// strpriority\n\t\t\t$archv_finished->strpriority->ViewValue = $archv_finished->strpriority->CurrentValue;\n\t\t\t$archv_finished->strpriority->CssStyle = \"\";\n\t\t\t$archv_finished->strpriority->CssClass = \"\";\n\t\t\t$archv_finished->strpriority->ViewCustomAttributes = \"\";\n\n\t\t\t// strduedate\n\t\t\t$archv_finished->strduedate->ViewValue = $archv_finished->strduedate->CurrentValue;\n\t\t\t$archv_finished->strduedate->CssStyle = \"\";\n\t\t\t$archv_finished->strduedate->CssClass = \"\";\n\t\t\t$archv_finished->strduedate->ViewCustomAttributes = \"\";\n\n\t\t\t// strstatus\n\t\t\t$archv_finished->strstatus->ViewValue = $archv_finished->strstatus->CurrentValue;\n\t\t\t$archv_finished->strstatus->CssStyle = \"\";\n\t\t\t$archv_finished->strstatus->CssClass = \"\";\n\t\t\t$archv_finished->strstatus->ViewCustomAttributes = \"\";\n\n\t\t\t// strlastedit\n\t\t\t$archv_finished->strlastedit->ViewValue = $archv_finished->strlastedit->CurrentValue;\n\t\t\t$archv_finished->strlastedit->CssStyle = \"\";\n\t\t\t$archv_finished->strlastedit->CssClass = \"\";\n\t\t\t$archv_finished->strlastedit->ViewCustomAttributes = \"\";\n\n\t\t\t// strcategory\n\t\t\t$archv_finished->strcategory->ViewValue = $archv_finished->strcategory->CurrentValue;\n\t\t\t$archv_finished->strcategory->CssStyle = \"\";\n\t\t\t$archv_finished->strcategory->CssClass = \"\";\n\t\t\t$archv_finished->strcategory->ViewCustomAttributes = \"\";\n\n\t\t\t// strassigned\n\t\t\t$archv_finished->strassigned->ViewValue = $archv_finished->strassigned->CurrentValue;\n\t\t\t$archv_finished->strassigned->CssStyle = \"\";\n\t\t\t$archv_finished->strassigned->CssClass = \"\";\n\t\t\t$archv_finished->strassigned->ViewCustomAttributes = \"\";\n\n\t\t\t// strdatecomplete\n\t\t\t$archv_finished->strdatecomplete->ViewValue = $archv_finished->strdatecomplete->CurrentValue;\n\t\t\t$archv_finished->strdatecomplete->CssStyle = \"\";\n\t\t\t$archv_finished->strdatecomplete->CssClass = \"\";\n\t\t\t$archv_finished->strdatecomplete->ViewCustomAttributes = \"\";\n\n\t\t\t// strwithpr\n\t\t\t$archv_finished->strwithpr->ViewValue = $archv_finished->strwithpr->CurrentValue;\n\t\t\t$archv_finished->strwithpr->CssStyle = \"\";\n\t\t\t$archv_finished->strwithpr->CssClass = \"\";\n\t\t\t$archv_finished->strwithpr->ViewCustomAttributes = \"\";\n\n\t\t\t// strremarks\n\t\t\t$archv_finished->strremarks->ViewValue = $archv_finished->strremarks->CurrentValue;\n\t\t\t$archv_finished->strremarks->CssStyle = \"\";\n\t\t\t$archv_finished->strremarks->CssClass = \"\";\n\t\t\t$archv_finished->strremarks->ViewCustomAttributes = \"\";\n\n\t\t\t// sap_num\n\t\t\t$archv_finished->sap_num->ViewValue = $archv_finished->sap_num->CurrentValue;\n\t\t\t$archv_finished->sap_num->CssStyle = \"\";\n\t\t\t$archv_finished->sap_num->CssClass = \"\";\n\t\t\t$archv_finished->sap_num->ViewCustomAttributes = \"\";\n\n\t\t\t// work_days\n\t\t\t$archv_finished->work_days->ViewValue = $archv_finished->work_days->CurrentValue;\n\t\t\t$archv_finished->work_days->CssStyle = \"\";\n\t\t\t$archv_finished->work_days->CssClass = \"\";\n\t\t\t$archv_finished->work_days->ViewCustomAttributes = \"\";\n\n\t\t\t// ID\n\t\t\t$archv_finished->ID->HrefValue = \"\";\n\t\t\t$archv_finished->ID->TooltipValue = \"\";\n\n\t\t\t// strjrfnum\n\t\t\t$archv_finished->strjrfnum->HrefValue = \"\";\n\t\t\t$archv_finished->strjrfnum->TooltipValue = \"\";\n\n\t\t\t// strquarter\n\t\t\t$archv_finished->strquarter->HrefValue = \"\";\n\t\t\t$archv_finished->strquarter->TooltipValue = \"\";\n\n\t\t\t// strmon\n\t\t\t$archv_finished->strmon->HrefValue = \"\";\n\t\t\t$archv_finished->strmon->TooltipValue = \"\";\n\n\t\t\t// stryear\n\t\t\t$archv_finished->stryear->HrefValue = \"\";\n\t\t\t$archv_finished->stryear->TooltipValue = \"\";\n\n\t\t\t// strdate\n\t\t\t$archv_finished->strdate->HrefValue = \"\";\n\t\t\t$archv_finished->strdate->TooltipValue = \"\";\n\n\t\t\t// strtime\n\t\t\t$archv_finished->strtime->HrefValue = \"\";\n\t\t\t$archv_finished->strtime->TooltipValue = \"\";\n\n\t\t\t// strusername\n\t\t\t$archv_finished->strusername->HrefValue = \"\";\n\t\t\t$archv_finished->strusername->TooltipValue = \"\";\n\n\t\t\t// strusereadd\n\t\t\t$archv_finished->strusereadd->HrefValue = \"\";\n\t\t\t$archv_finished->strusereadd->TooltipValue = \"\";\n\n\t\t\t// strcompany\n\t\t\t$archv_finished->strcompany->HrefValue = \"\";\n\t\t\t$archv_finished->strcompany->TooltipValue = \"\";\n\n\t\t\t// strdepartment\n\t\t\t$archv_finished->strdepartment->HrefValue = \"\";\n\t\t\t$archv_finished->strdepartment->TooltipValue = \"\";\n\n\t\t\t// strloc\n\t\t\t$archv_finished->strloc->HrefValue = \"\";\n\t\t\t$archv_finished->strloc->TooltipValue = \"\";\n\n\t\t\t// strposition\n\t\t\t$archv_finished->strposition->HrefValue = \"\";\n\t\t\t$archv_finished->strposition->TooltipValue = \"\";\n\n\t\t\t// strtelephone\n\t\t\t$archv_finished->strtelephone->HrefValue = \"\";\n\t\t\t$archv_finished->strtelephone->TooltipValue = \"\";\n\n\t\t\t// strcostcent\n\t\t\t$archv_finished->strcostcent->HrefValue = \"\";\n\t\t\t$archv_finished->strcostcent->TooltipValue = \"\";\n\n\t\t\t// strsubject\n\t\t\t$archv_finished->strsubject->HrefValue = \"\";\n\t\t\t$archv_finished->strsubject->TooltipValue = \"\";\n\n\t\t\t// strnature\n\t\t\t$archv_finished->strnature->HrefValue = \"\";\n\t\t\t$archv_finished->strnature->TooltipValue = \"\";\n\n\t\t\t// strdescript\n\t\t\t$archv_finished->strdescript->HrefValue = \"\";\n\t\t\t$archv_finished->strdescript->TooltipValue = \"\";\n\n\t\t\t// strarea\n\t\t\t$archv_finished->strarea->HrefValue = \"\";\n\t\t\t$archv_finished->strarea->TooltipValue = \"\";\n\n\t\t\t// strattach\n\t\t\t$archv_finished->strattach->HrefValue = \"\";\n\t\t\t$archv_finished->strattach->TooltipValue = \"\";\n\n\t\t\t// strpriority\n\t\t\t$archv_finished->strpriority->HrefValue = \"\";\n\t\t\t$archv_finished->strpriority->TooltipValue = \"\";\n\n\t\t\t// strduedate\n\t\t\t$archv_finished->strduedate->HrefValue = \"\";\n\t\t\t$archv_finished->strduedate->TooltipValue = \"\";\n\n\t\t\t// strstatus\n\t\t\t$archv_finished->strstatus->HrefValue = \"\";\n\t\t\t$archv_finished->strstatus->TooltipValue = \"\";\n\n\t\t\t// strlastedit\n\t\t\t$archv_finished->strlastedit->HrefValue = \"\";\n\t\t\t$archv_finished->strlastedit->TooltipValue = \"\";\n\n\t\t\t// strcategory\n\t\t\t$archv_finished->strcategory->HrefValue = \"\";\n\t\t\t$archv_finished->strcategory->TooltipValue = \"\";\n\n\t\t\t// strassigned\n\t\t\t$archv_finished->strassigned->HrefValue = \"\";\n\t\t\t$archv_finished->strassigned->TooltipValue = \"\";\n\n\t\t\t// strdatecomplete\n\t\t\t$archv_finished->strdatecomplete->HrefValue = \"\";\n\t\t\t$archv_finished->strdatecomplete->TooltipValue = \"\";\n\n\t\t\t// strwithpr\n\t\t\t$archv_finished->strwithpr->HrefValue = \"\";\n\t\t\t$archv_finished->strwithpr->TooltipValue = \"\";\n\n\t\t\t// strremarks\n\t\t\t$archv_finished->strremarks->HrefValue = \"\";\n\t\t\t$archv_finished->strremarks->TooltipValue = \"\";\n\n\t\t\t// sap_num\n\t\t\t$archv_finished->sap_num->HrefValue = \"\";\n\t\t\t$archv_finished->sap_num->TooltipValue = \"\";\n\n\t\t\t// work_days\n\t\t\t$archv_finished->work_days->HrefValue = \"\";\n\t\t\t$archv_finished->work_days->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($archv_finished->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$archv_finished->Row_Rendered();\n\t}", "function superfood_elated_woocommerce_thumbnails_per_row() {\n\t\t\n\t\t$product_single_layout = superfood_elated_get_meta_field_intersect('single_product_layout');\n\t\t$product_thumbnail_position = superfood_elated_get_meta_field_intersect('woo_set_thumb_images_position');\n\t\t\n\t\tif ($product_single_layout === 'standard' && $product_thumbnail_position === 'on-left-side') {\n\t\t\treturn 4;\n\t\t} else {\n\t\t\treturn 3;\n\t\t}\n\t}", "public function setTableClass($class) {\r\n $this->tableClass = \"class=\\\"$class\\\"\";\r\n }", "abstract public function getAdminThClass($align = 'center');", "function add_class_for_form_grid( $class, $id, $args ) {\n\t$class[] = 'give-form-grid-wrap';\n\n\tforeach ( $class as $index => $item ) {\n\t\tif ( false !== strpos( $item, 'give-display-' ) ) {\n\t\t\tunset( $class[ $index ] );\n\t\t}\n\t}\n\n\treturn $class;\n}", "public function setTableClass($class) {\n $this->tableClass = \"class=\\\"$class\\\"\";\n }" ]
[ "0.65590525", "0.64634025", "0.6176579", "0.60998696", "0.5913443", "0.591332", "0.5154975", "0.51529646", "0.514892", "0.51306105", "0.50625557", "0.49814966", "0.4877604", "0.48713368", "0.48532298", "0.48380193", "0.47815675", "0.47287244", "0.4720446", "0.46988484", "0.46727753", "0.4663638", "0.46462485", "0.4635826", "0.46277225", "0.46150765", "0.46089387", "0.4603318", "0.45942858", "0.45942858", "0.45930853", "0.45844865", "0.45835096", "0.45748445", "0.45525575", "0.45362613", "0.45125255", "0.45125255", "0.45013183", "0.44985798", "0.44897905", "0.44880638", "0.44768", "0.44684133", "0.44626236", "0.4449798", "0.4441436", "0.4440634", "0.4439706", "0.44375622", "0.44365188", "0.44317234", "0.44239813", "0.44140992", "0.4398872", "0.43971986", "0.43903813", "0.4389345", "0.43845773", "0.43836167", "0.4382446", "0.43709698", "0.436643", "0.43593237", "0.43508968", "0.4348982", "0.4331752", "0.43224585", "0.43212625", "0.4319159", "0.4315338", "0.43138286", "0.43095738", "0.4303561", "0.42913863", "0.42909625", "0.4287287", "0.42857194", "0.4273393", "0.42707044", "0.42686936", "0.426707", "0.42534375", "0.42344698", "0.4232536", "0.42282698", "0.42258167", "0.4224526", "0.4215886", "0.4210864", "0.42093825", "0.4205184", "0.42045397", "0.41938746", "0.4184583", "0.418343", "0.4180575", "0.41795093", "0.41724527", "0.4169372" ]
0.75887257
0
Turn off xsl transformation
public function no_xsl() { $this->xsl_template = ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transformToXmlReturnsTransformedXml(): void\n {\n $this->baseXsltProcessor->returns(['transformToXml' => '<foo>']);\n assertThat($this->xslProcessor->toXML(), equals('<foo>'));\n }", "public function doXHTML_cleaning() {}", "protected function transform()\n {\n // Check if the XSL file exists\n if (!file_exists($this->config['xsl'])) {\n $this->logger->debugTranslate(\n 'htmlconversion.converter.xslFileNotFoundLog'\n );\n return false;\n }\n\n $xsl = new DOMDocument;\n if (!$xsl->load($this->config['xsl'])) {\n $this->logger->debugTranslate(\n 'htmlconversion.converter.xslLoadErrorLog',\n $this->libxmlErrors()\n );\n return false;\n }\n\n $xslt = new XSLTProcessor;\n $xslt->importStylesheet($xsl);\n\n // Transform the document\n if (!($this->htmlDom = $xslt->transformToDoc($this->nlmxmlDom))) {\n $this->logger->debugTranslate(\n 'htmlconversion.converter.transformErrorLog',\n $this->libxmlErrors()\n );\n\n return false;\n };\n\n $this->logger->debugTranslate(\n 'htmlconversion.converter.transformsSuccessLog',\n $this->htmlDom->saveHTML()\n );\n\n return true;\n }", "public function transform() {\n $input = DATABASE_XML;\t// default initial input\n for ($i = 0; $i < count($this->xslt); $i++) {\n $this->xslTransform($this->xslt[$i][\"xsl\"], $this->xslt[$i][\"param\"], $input);\n $input = TRANSFORMED_XML;\t// use result of last xsl transform for all subsequent inputs\n // if debugging is turned on, display transform information & output result\n // (particularly important for debugging more than one transform in a row)\n if ($this->debug) {\n\tprint \"XSLT transform with stylesheet \" . $this->xslt[$i][\"xsl\"];\n\tif (count($this->xslt[$i][\"param\"])) {\n\t print \"<br>\\nParameters: \\n\";\n\t foreach ($this->xslt[$i][\"param\"] as $key => $val) print \"$key => $val \\n\";\n\t}\n\tprint \"<br>\\n\";\n\tprint \"Result of transformation:<br>\\n\";\n\tprint $this->displayXML(TRANSFORMED_XML);\n }\n }\n // unbind used xslts\n unset($this->xslt);\n $this->xslt = array();\n }", "public function withoutTransformer();", "public function transformToXmlReturnsTransformedXml()\n {\n $this->mockXSLTProcessor->expects($this->exactly(2))\n ->method('transformToXml')\n ->with($this->equalTo($this->document))\n ->will($this->onConsecutiveCalls('<foo>', ''));\n $this->assertEquals('<foo>', $this->xslProcessor->toXML());\n $this->assertEquals('', $this->xslProcessor->toXML());\n }", "private function parseToXhtml()\n\t{\n\t\t$this->_generic->_time_checkpoint = microtime(true);\n\t\t\n\t\t// Xml\n\t\t$xmlDoc = new DOMDocument();\n\t\ttry \n\t\t{\n\t\t\t$xmlDoc->loadXML($this->_xml); \n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tSLS_Tracing::addTrace(new Exception(\"Error during XML Parsing\"), true, \"<h2>\".$e->getMessage().\"</h2><div style=\\\"margin: 0 30px;padding: 10px;\\\"><pre name=\\\"code\\\" class=\\\"brush:xml\\\">\".htmlentities($this->_xml, ENT_QUOTES).\"</pre></div>\");\n\t\t}\n\t\t\n\t\t// Xsl\n\t\t$xslDoc = new DOMDocument();\t\t\n\t\ttry \n\t\t{\n\t\t\t$xslDoc->loadXML($this->constructGenericXsl()); \n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tSLS_Tracing::addTrace(new Exception($e->getMessage()));\n\t\t}\n\t\t\n\t\t// Parsing\n\t\t$proc = new XSLTProcessor();\n\t\t$proc->registerPHPFunctions();\n\t\ttry \n\t\t{ \n\t\t\t$proc->importStyleSheet($xslDoc); \n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tSLS_Tracing::addTrace(new Exception($e->getMessage()));\t\t\t\n\t\t}\n\t\t\n\t\t// If errors in dev\n\t\tif (!SLS_Generic::getInstance()->isProd() && SLS_Tracing::$_exceptionThrown)\n\t\t\tSLS_Tracing::displayTraces();\n\t\telse\n\t\t{\n\t\t\t// Show xml in source in dev\n\t\t\t/*if ($this->_generic->getSiteConfig(\"isProd\") == 0)\t\t\t\t\t\t\t\n\t\t\t\techo \"<!--[if lt IE 5]><!--<![CDATA[<pre style='display:none;'>\\n\".$this->_xml.\" \\n</pre>]]>--><![endif]-->\\n\";*/\n\t\t\t\n\t\t\t// Parse XML/XSL\n\t\t\t$html = $proc->transformToXML($xmlDoc);\t\t\t\n\t\t\t$this->_generic->logTime($this->_generic->monitor($this->_generic->_time_checkpoint),\"Parsing XML/XSL\",\"\",\"XML/XSL Parsing\");\n\t\t\t$this->_generic->_time_checkpoint = microtime(true);\n\t\t\t\n\t\t\t// Parse HTML with SLS_Dtd\n\t\t\t$html = $this->parseHtml($html);\n\t\t\t\n\t\t\t// Sls cached enabled and Action cache enabled ?\n\t\t\t$cacheOptions = $this->_cache->getAction();\n\t\t\t$actionCache = false;\n\t\t\tif ($this->_generic->isCache() && \n\t\t\t\t$this->_generic->getSide() == \"user\" && \n\t\t\t\t$this->_generic->getGenericControllerName() != \"Default\" &&\n\t\t\t\tis_array($cacheOptions) && \n\t\t\t\tcount($cacheOptions) == 4)\n\t\t\t{\n\t\t\t\t$actionCache\t\t\t= true; \n\t\t\t\t$actionCacheVisibility \t= $cacheOptions[0];\n\t\t\t\t$actionCacheScope \t\t= $cacheOptions[1];\n\t\t\t\t$actionCacheResponsive\t= $cacheOptions[2];\n\t\t\t\t$actionCacheExpiration \t= $cacheOptions[3];\n\t\t\t\t\n\t\t\t\t// Save Full HTML cached\n\t\t\t\tif ($actionCacheScope == \"full\")\t\t\t\t\n\t\t\t\t\t$this->_cache->saveCacheFull($html,$actionCacheVisibility,$actionCacheResponsive);\t\t\t\t\n\t\t\t}\n\n\t\t\t// Show flash button to copy Xml if developer on user side and not on Bo\n\t\t\tif (SLS_BoRights::isLogged() && SLS_BoRights::getAdminType() == \"developer\" && $this->_generic->getSide() == \"user\" && $this->_generic->getGenericControllerName() != $this->_generic->getBo())\n\t\t\t\t$html = preg_replace('/\\<\\/head\\>/i', \"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'<!-- Sls developer Toolbar -->'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'<script type=\"text/javascript\" src=\"'.$this->_generic->getProtocol().'://'.$this->_generic->getSiteConfig(\"domainName\").\"/\".$this->_generic->getPathConfig(\"coreJsDyn\").'ZeroClipboard/ZeroClipboard.js\"></script>'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'<script type=\"text/javascript\">'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(2).'window.slsBuild.xml = \"'.htmlentities(str_replace(array('\"',\"\\n\"),array('\\\"',''),$this->_xml),ENT_COMPAT,\"UTF-8\").'\";'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'</script>'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'<!-- /Sls developer Toolbar -->'.\"\\n\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'</head>', $html);\n\n\t\t\techo $html;\n\t\t\t\n\t\t\t$this->_generic->logTime($this->_generic->monitor($this->_generic->_time_checkpoint),\"Parsing HTML\",\"\",\"HTML Parsing\");\n\t\t}\t\t\n\t}", "function _runXslTransformWithParam($info) {\n\n $xsl = new DOMDocument();\n $xsl->load($info['xsl']);\n $input = new DOMDocument();\n $input->loadXML($info['input']);\n\n $processor = new XSLTProcessor();\n $processor->importStylesheet($xsl);\n if (isset($info['param_name']) && isset($info['param_value'])) {\n $processor->setParameter('', $info['param_name'], $info['param_value']);\n }\n\n if (isset($info['php_functions'])) {\n $processor->registerPHPFunctions($info['php_functions']);\n }\n\n // XXX: Suppressing warnings regarding unregistered prefixes.\n return $processor->transformToXML($input);\n}", "protected function transform ( $xml, $path_to_xsl, $output_type = null, array $params = array(), array $import_array = array(), $to_string = true )\r\n\t{\r\n\t\tif ( $path_to_xsl == \"\") throw new \\Exception(\"no stylesheet supplied\");\r\n\t\t\r\n\t\t// make sure we have a domdocument\r\n\t\t\r\n\t\tif ( is_string($xml) )\r\n\t\t{\r\n\t\t\t$xml = Parser::convertToDOMDocument($xml);\r\n\t\t}\r\n\t\t\r\n\t\t// create xslt processor\r\n\t\t\r\n\t\t$processor = new \\XsltProcessor();\r\n\t\t$processor->registerPhpFunctions();\r\n\r\n\t\t// add parameters\r\n\t\t\r\n\t\tforeach ($params as $key => $value)\r\n\t\t{\r\n\t\t\t$processor->setParameter(null, $key, $value);\r\n\t\t}\r\n\t\t\t\r\n\t\t// add stylesheet\r\n\t\t\r\n\t\t$xsl = $this->generateBaseXsl($path_to_xsl, $import_array, $output_type);\r\n\t\t\r\n\t\t$processor->importStylesheet($xsl);\r\n\t\t\r\n\t\t// transform\r\n\t\t\r\n\t\tif ( $to_string == true )\r\n\t\t{\r\n\t\t\treturn $processor->transformToXml($xml);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\treturn $processor->transformToDoc($xml);\r\n\t\t}\r\n\t}", "function tidy_xml( $xml ) {\n \t\n\t $dom = new DOMDocument();\n\t $dom->preserveWhiteSpace = false;\n\t $dom->formatOutput = true;\n\t $dom->loadXML( $xml->asXML() );\n\t return $dom->saveXML();\n \t\n\t}", "function transformWithProcessor(XSLTProcessor $proc, DOMDocument $doc)\n{\n $doc = $proc->transformToDoc($doc);\n\n // With current logic, only menu tags can be left unprocessed the first pass\n // Check if there are any left before doing a second pass\n if ($doc->getElementsByTagName('menu')->length === 0) {\n return $doc;\n }\n\n return $proc->transformToDoc($doc);\n}", "public function xslTransformResult ($xsl_file, $xsl_params = NULL) {\n // call default xslTransform with option to specify xml input\n $this->xslTransform($xsl_file, $xsl_params, TRANSFORMED_XML);\n }", "protected function parseXslText(DOMElement $ir, DOMElement $node)\n\t{\n\t\t$this->appendLiteralOutput($ir, $node->textContent);\n\t\tif ($node->getAttribute('disable-output-escaping') === 'yes')\n\t\t{\n\t\t\t$ir->lastChild->setAttribute('disable-output-escaping', 'yes');\n\t\t}\n\t}", "public function xslTransform ($xsl_file, $xsl_params = NULL, $input = DATABASE_XML) {\n /* load xsl & xml as DOM documents */\n $xsl = new DomDocument();\n $rval = $xsl->load($xsl_file);\n if (!($rval)) {\n print \"Error! unable to load xsl file $xsl_file.<br>\";\n } \n\n /* create processor & import stylesheet */\n $proc = new XsltProcessor();\n $xsl = $proc->importStylesheet($xsl);\n if ($xsl_params) {\n foreach ($xsl_params as $name => $val) {\n $proc->setParameter(null, $name, $val);\n }\n }\n /* transform the xml document and store the result */\n\n // transform xml retrieved from the database (default)\n if ($input == DATABASE_XML && $this->xmldb->xml) \t // make sure data exists\n $this->xsl_result = $proc->transformToDoc($this->xmldb->xml);\n // transform xml resulting from prior xsl transform (make sure input data exists)\n else if ($input == TRANSFORMED_XML && $this->xsl_result)\n $this->xsl_result = $proc->transformToDoc($this->xsl_result);\n }", "function testClientXSL() {\n $this->get('/');\n $this->assertPattern('#<\\?xml-stylesheet#', $this->responseDom->saveXML());\n $this->get('/test');\n $this->assertPattern('#<\\?xml-stylesheet#', $this->responseDom->saveXML());\n \n $this->get('/?NOXSL');\n $this->assertNoPattern('#<\\?xml-stylesheet#', $this->responseDom->saveXML());\n $this->get('/test?NOXSL');\n $this->assertNoPattern('#<\\?xml-stylesheet#', $this->responseDom->saveXML());\n }", "protected function transform($xml, $path_to_xsl, array $params = array())\r\n\t{\r\n\t\t$registry = Registry::getInstance();\r\n\r\n\t\t$import_array = array();\r\n\t\t\r\n\t\t// the xsl lives here\r\n\r\n\t\t$distro_xsl_dir = $this->_script_path . \"/\";\r\n\t\t$local_xsl_dir = realpath(getcwd()) . \"/views/\";\r\n\t\t\r\n\t\t// language file\r\n\t\t\r\n\t\t$request = new Request();\r\n\t\t$language = $request->getParam(\"lang\");\r\n\t\t\r\n\t\tif ( $language == \"\" )\r\n\t\t{\r\n\t\t\t$language = $registry->defaultLanguage();\r\n\t\t}\r\n\t\t\r\n\t\t// english file is included by default (as a fallback)\r\n\t\t\r\n\t\tarray_push($import_array, \"labels/eng.xsl\");\r\n\t\t\r\n\t\t// if language is set to something other than english\r\n\t\t// then include that file to override the english labels\r\n\t\t\r\n\t\tif ( $language != \"eng\" && $language != '') \r\n\t\t{\r\n\t\t\tarray_push($import_array, \"labels/$language.xsl\");\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// make sure we've got a reference to the local includes too\r\n\t\t\r\n\t\tarray_push($import_array, \"includes.xsl\");\r\n\t\t\r\n\t\t// transform\r\n\t\t\r\n\t\t$xsl = new Xsl($distro_xsl_dir, $local_xsl_dir);\r\n\t\t\r\n\t\treturn $xsl->transformToXml($xml, $path_to_xsl, $this->format, $params, $import_array);\r\n\t}", "public function xss_clean_on()\n\t{\n\t\t$this->_xss_on = TRUE;\n\t}", "protected function useXMLInternalErrors()\n {\n \\libxml_clear_errors();\n $this->initialUseInternalErrorsValue = \\libxml_use_internal_errors(true);\n }", "function set_xsl($xsl)\n\t{\n\t\t$this->xsl_proyecto = $xsl;\n\t}", "public static function xhtml($xhtml)\n {\n self::$useXhtml = $xhtml === true ? ' /' : '';\n }", "function transformDOM(DOMDocument $doc)\n{\n return transformWithProcessor(createInkyProcessor(), $doc);\n}", "public function setXSLDocument($xsl) {\n libxml_get_last_error() && libxml_clear_errors();\n $this->stylesheet= $xsl;\n strlen($this->_base) && $this->stylesheet->documentURI= $this->_base;\n \n $this->_checkErrors($xsl);\n }", "protected function renderAsXML() {}", "static function processXSLT($xml, $xsl, $params = null)\n {\n // Create the domXSL\n $domXsl = new DOMDocument;\n if (!@$domXsl->load($xsl))\n {\n wcmProject::getInstance()->logger->logError('Invalid XSL: ' . $xsl);\n throw new Exception('Invalid XSL');\n }\n\n // Create the domXML\n $domXml = new DOMDocument();\n if (!@$domXml->loadXML($xml))\n {\n wcmProject::getInstance()->logger->logError('Invalid XML: ' . $xml);\n throw new Exception('Invalid XML');\n }\n\n // Process the XSL with optional parameters\n $proc = new XSLTProcessor;\n $proc->registerPHPFunctions();\n $proc->importStyleSheet($domXsl);\n if (is_array($params))\n {\n foreach($params as $param => $value)\n {\n $proc->setParameter(\"\", $param, $value);\n }\n }\n\n return ($proc->transformToXML($domXml));\n }", "protected function handle_route_sitemap_xsl() {\n\n\t\t$yoast_sitemap = $this->get_yoast_sitemap_instance();\n\t\t$yoast_sitemap->xsl_output( 'main' );\n\n\t\tdie;\n\n\t}", "function outputEntitiesOff()\n\t{\n\t\t$this->bOutputEntities = false;\n\t}", "protected function transform(DOMDocument $document)\n {\n if (!$this->toDir->exists()) {\n throw new BuildException(\"Directory '\" . $this->toDir . \"' does not exist\");\n }\n\n $xslfile = $this->getStyleSheet();\n\n $xsl = new DOMDocument();\n $xsl->load($xslfile->getAbsolutePath());\n\n $proc = new XSLTProcessor();\n if (defined('XSL_SECPREF_WRITE_FILE')) {\n if (version_compare(PHP_VERSION, '5.4', \"<\")) {\n ini_set(\"xsl.security_prefs\", XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY);\n } else {\n $proc->setSecurityPrefs(XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY);\n }\n }\n\n $proc->importStylesheet($xsl);\n $proc->setParameter('', 'output.sorttable', (string) $this->useSortTable);\n\n if ($this->format == \"noframes\") {\n $writer = new FileWriter(new PhingFile($this->toDir, \"phpunit-noframes.html\"));\n $writer->write($proc->transformToXml($document));\n $writer->close();\n } else {\n ExtendedFileStream::registerStream();\n\n $toDir = (string) $this->toDir;\n\n // urlencode() the path if we're on Windows\n if (FileSystem::getFileSystem()->getSeparator() == '\\\\') {\n $toDir = urlencode($toDir);\n }\n\n // no output for the framed report\n // it's all done by extension...\n $proc->setParameter('', 'output.dir', $toDir);\n $proc->transformToXml($document);\n\n ExtendedFileStream::unregisterStream();\n }\n }", "public function initalise()\n\t{\n\t\tSettings::singleton()->overwrite_setting('cache_xslt_transformation', false);\n\t\treturn true;\n\t}", "public function setXSL($xsl){\r\n\t\t$this->xsl_file = $xsl;\r\n\t}", "private function runSaxon(){\r\n\t\t$this->execWrapper(\t$this->saxon_command.\r\n\t\t\t\t\t\t\t\" -o:\".$this->workingdir.$this->target.\r\n\t\t\t\t\t\t\t\" -xsl:\".$this->xsl_path.$this->xsl_file.\r\n\t\t\t\t\t\t\t\" -s:\".$this->workingdir.$this->source);\r\n\t}", "public function disableAutoTranslations()\r\n\t{\r\n\t\t$this->autoTranslations = false;\r\n\t}", "public function applyXslStyleSheet(&$xslDOMDocument, $xslOptions = array(), $xslOptionsURI = '')\n {\n $processor = new XSLTProcessor();\n\n $processor->importStylesheet($xslDOMDocument);\n\n if ($processor->setParameter($xslOptionsURI, $xslOptions) === false) {\n throw new Exception('Could not set values for the given XSL style sheet parameters.');\n }\n\n $xmlDOMDocument = new DOMDocument();\n if ($xmlDOMDocument->loadXML($this->_documentXML) === false) {\n throw new Exception('Could not load XML from the given template.');\n }\n\n $xmlTransformed = $processor->transformToXml($xmlDOMDocument);\n if ($xmlTransformed === false) {\n throw new Exception('Could not transform the given XML document.');\n }\n\n $this->_documentXML = $xmlTransformed;\n }", "private function generateBaseXsl( $path_to_file, $import_array = array(), $output_type)\r\n\t{\r\n\t\t$files_to_import = array();\r\n\t\t\r\n\t\t### first, set up the paths to the distro and local directories\r\n\r\n\t\t$distro_path = $this->distro_xsl_dir . '/' . $path_to_file;\r\n\t\t$local_path = $this->local_xsl_dir . '/' . $path_to_file;\r\n\t\t \r\n\r\n\t\t### check to make sure at least one of the files exists\r\n\t\t\r\n\t\t$distro_exists = file_exists($distro_path);\r\n\t\t$local_exists = file_exists($local_path);\r\n\r\n\t\t// if we don't have either a local or a distro copy, that's a problem.\r\n\t\t\r\n\t\tif (! ( $local_exists || $distro_exists) )\r\n\t\t{\r\n\t\t\t// throw new Exception(\"No xsl stylesheet found: $local_path || $distro_path\");\r\n\t\t\tthrow new \\Exception(\"No xsl stylesheet found: $path_to_file\");\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t### now create the skeleton XSLT file that will hold references to both\r\n\t\t### the distro and the local files\r\n\t\t\r\n\t\t$generated_xsl = new \\DOMDocument();\r\n\t\t\r\n\t\t$xml = \"\r\n\t\t\t<xsl:stylesheet \r\n\t\t\t\tversion=\\\"1.0\\\"\r\n\t\t\t\txmlns:xsl=\\\"http://www.w3.org/1999/XSL/Transform\\\"\r\n\t\t\t\txmlns:php=\\\"http://php.net/xsl\\\" \r\n\t\t\t\texclude-result-prefixes=\\\"php\\\">\t\t\r\n\t\t\t</xsl:stylesheet>\";\r\n\t\t\r\n\t\t$generated_xsl->loadXML(trim($xml));\r\n\t\t\r\n\t\t// dynamically create the output type\r\n\t\r\n\t\t$output = $generated_xsl->createElementNS('http://www.w3.org/1999/XSL/Transform', \"output\");\r\n\t\t$generated_xsl->documentElement->appendChild($output);\r\n\t\t\r\n\t\t// html 4\r\n\t\t\r\n\t\tif ( $output_type == \"html\")\r\n\t\t{\r\n\t\t\t$output->setAttribute(\"method\", \"html\");\r\n\t\t\t$output->setAttribute(\"doctype-public\", \"-//W3C//DTD HTML 4.01 Transitional//EN\");\r\n\t\t\t$output->setAttribute(\"doctype-system\", \"http://www.w3.org/TR/html4/loose.dtd\");\r\n\t\t}\r\n\t\t\r\n\t\t// always include distro includes\r\n\t\t\r\n\t\t$files_to_import[] = $this->distro_xsl_dir . '/' .'includes.xsl';\r\n\t\t\r\n\t\t\r\n\t\t### add a reference to the distro file\r\n\r\n\t\tif ( $distro_exists == true )\r\n\t\t{\t\r\n\t\t\tarray_push($files_to_import, $distro_path);\r\n\t\t}\r\n\t\t\r\n\t\t### add a refence for files programatically added\r\n\t\t\r\n\t\tif ( $import_array != null )\r\n\t\t{\r\n\t\t\tforeach ( $import_array as $strInclude )\r\n\t\t\t{\r\n\t\t\t\t// but only if a distro copy exists\r\n\t\t\t\t\r\n\t\t\t\t$distro_include = $this->distro_xsl_dir . '/' . $strInclude;\r\n\t\t\t\t$local_include = $this->local_xsl_dir . '/' . $strInclude;\r\n\t\t\t\t\r\n\t\t\t\t// don't include the distro includes.xsl, since this messes things up!\r\n\t\t\t\t// @todo: figure out why includes.xsl is this weird exception\r\n\t\t\t\t\r\n\t\t\t\tif ( file_exists($distro_include) && $strInclude != \"includes.xsl\")\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_push($files_to_import, $distro_include);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// see if there is a local version, and include it too\r\n\t\t\t\t\r\n\t\t\t\tif ( file_exists($local_include) )\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_push($files_to_import, $local_include);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t### add a refence to the local file\r\n\t\t\r\n\t\tif ( $local_exists )\r\n\t\t{\r\n\t\t\t$this->addIncludeReference( $generated_xsl, $local_path );\r\n\t\t}\r\n\t\t\r\n\r\n\t\t### if the distro file xsl:includes or xsl:imports other files\r\n\t\t### check if there is a corresponding local file, and import it too\r\n\t\t\r\n\t\t// We import instead of include in case the local stylesheet does erroneously \r\n\t\t// 'include', to avoid a conflict. We import LAST to make sure it takes \r\n\t\t// precedence over distro. \r\n\t\t\r\n\t\tif ( $distro_exists )\r\n\t\t{\r\n\t\t\t$distroXml = simplexml_load_file( $distro_path );\r\n\t\t\r\n\t\t\t$distroXml->registerXPathNamespace( 'xsl', 'http://www.w3.org/1999/XSL/Transform' );\r\n\t\t\t\r\n\t\t\t// find anything include'd or import'ed in original base file\r\n\t\t\t\r\n\t\t\t$array_merged = array_merge( $distroXml->xpath( \"//xsl:include\" ), $distroXml->xpath ( \"//xsl:import\" ) );\r\n\t\t\t\r\n\t\t\tforeach ( $array_merged as $extra )\r\n\t\t\t{\r\n\t\t\t\t// path to local copy\r\n\t\t\t\t\r\n\t\t\t\t$local_candidate = $this->local_xsl_dir . '/' . dirname ( $path_to_file ) . '/' . $extra['href'];\r\n\t\t\t\t\r\n\t\t\t\t// path to distro copy as a check\r\n\t\t\t\t\r\n\t\t\t\t$distro_check = $this->distro_xsl_dir . '/' . dirname ( $path_to_file ) . '/' . $extra['href'];\r\n\t\t\t\t\r\n\t\t\t\t// make sure local copy exists, and they are both not pointing at the same file \r\n\t\t\t\t\r\n\t\t\t\tif ( file_exists( $local_candidate ) && realpath($distro_check) != realpath($local_candidate) )\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_push($files_to_import, $local_candidate);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// now make sure no dupes\r\n\t\t\r\n\t\t$files_to_import = array_unique($files_to_import);\r\n\t\t\r\n\t\t\r\n\t\t### now the actual mechanics of the import\r\n\t\tforeach ( $files_to_import as $import )\r\n\t\t{\r\n\t\t\t$this->addImportReference ( $generated_xsl, $import, $output );\r\n\t\t}\r\n\t\t\r\n\t\t//header(\"Content-type: text/xml\"); echo $generated_xsl->saveXML(); exit;\r\n\t\t\r\n\t\treturn $generated_xsl;\r\n\t}", "function _quail_server_cleanup_xpath($query) {\n\t$remove = array(\n\t\t\t '[@class=\"\"]',\n\t\t\t '[@class=\"ac_template_selected\"]',\n\t\t\t '[1]',\n\t);\n\t\n\t$query = str_replace('html[@class=\"js\"]', 'html', $query);\n\t$query = str_replace($remove, '', $query);\n\treturn $query;\n}", "public function transform($xml, $outPath = null) {\n // define output directory\n if(!isset($outPath)) {\n $outPath = env('XSLT_OUT_PATH');\n }\n\n $this->transformUsingBuiltInXslt($xml, $outPath);\n }", "public function disableConcatenateCss() {}", "private function transformUsingBuiltInXslt($filePath, $outPath){\n\t$source = file_get_contents($filePath);\n \n $version = $this->getDDIVersion($source);\n \n if($version){\n $xml = new \\DOMDocument;\n $xml->loadXML($source);\n\n $xsl = new \\DOMDocument;\n\n $xsl->load('resources/xslt/'.$version.'_json.xsl');\n\n $proc = new \\XSLTProcessor;\n $proc->importStyleSheet($xsl); \n\n $json_xml = $proc->transformToXML($xml);\n\n $json = json_encode(simplexml_load_string($json_xml));\n\n file_put_contents($outPath . basename($filePath).'.json', $json);\n }else{\n //TODO: Handle non suported documents\n }\n }", "protected function parseXslValueOf(DOMElement $ir, DOMElement $node)\n\t{\n\t\t$this->appendXPathOutput($ir, $node->getAttribute('select'));\n\t\tif ($node->getAttribute('disable-output-escaping') === 'yes')\n\t\t{\n\t\t\t$ir->lastChild->setAttribute('disable-output-escaping', 'yes');\n\t\t}\n\t}", "static function clean4xml($xml) {\n\t\t$xml = self::makeUTF8($xml);\n\t\t$xml = self::str_replace_array(array(\n\t\t\t'&' => '&amp;',\n\t\t\t'<' => '&lt;',\n\t\t\t'>' => '&gt;',\n\t\t\t'\"' => '&quot;',\n\t\t\t\"'\" => '&apos;',\n\t\t\t),$xml);\n\t\t$xml = self::str_replace_array(array(\n\t\t\t'&amp;amp;' => '&amp;',\n\t\t\t),$xml);\n\t\t$xml = preg_replace('`\\n\\t+`',\"\\n\",$xml);\n\t\t$xml = preg_replace('`>\\t+`',\">\\n\",$xml);\n\t\t$xml = preg_replace('`>\\s?\\t?<`',\">\\n<\",$xml);\n\t\t$xml = preg_replace('`\\n\\n++`',\"\\n\",$xml);\n\t\treturn $xml;\n\t}", "public function forceStrip()\n {\n return $this->addAction(Flag::forceStrip());\n }", "public function removeXss()\n {\n static $antiXss = null;\n\n if ($antiXss === null) {\n $antiXss = new AntiXSS();\n }\n\n $str = $antiXss->xss_clean($this->str);\n\n return static::create($str, $this->encoding);\n }", "static function cleanXml($xml, $encoding = 'UTF-8')\n {\n static $mapping = null;\n if (!$mapping) {\n $list1 = get_html_translation_table(HTML_ENTITIES, ENT_NOQUOTES, $encoding);\n $list2 = get_html_translation_table(HTML_SPECIALCHARS, ENT_NOQUOTES, $encoding);\n $list = array_merge($list1, $list2);\n $mapping = array();\n foreach ($list as $char => $entity) {\n $mapping[strtolower($entity)] = '&#' . self::ord($char) . ';';\n }\n //$extras = array('&times;' => '&#215;', '&copy;' => '&#169;', '&nbsp;' => '&#160;', '&raquo;' => '&#187;', '&laquo;' => '&#171;');\n $extras = array('&times;' => '&#215;');\n $mapping = array_merge($mapping, $extras);\n }\n $xml = str_replace(array_keys($mapping), $mapping, $xml);\n $xml = preg_replace ('/[^\\x{0009}\\x{000a}\\x{000d}\\x{0020}-\\x{D7FF}\\x{E000}-\\x{FFFD}]+/u', ' ', $xml);\n return $xml;\n }", "private function runSalbatron(){\r\n\r\n\t\tob_start();\r\n\t\t//load the xsl stylesheet as domDocument\r\n\t\t$xslt_doc = new domDocument();\r\n\t\t$file = $this->xsl_path.'/'.$this->xsl_file;\r\n\t\t$xslt_doc->load($file);\r\n\r\n\t\t//load the source XML Document as domDocument\r\n\t\t$xml_doc = new domDocument();\r\n\t\t$abs_source = $this->workingdir.'/'.$this->source;\r\n\t\t$xml_doc->load($abs_source);\r\n\r\n\t\t$proc = new xsltprocessor;\r\n\t\t$xsl = $proc->importStylesheet($xslt_doc);\r\n\r\n\t\tt3lib_div::writeFile($this->workingdir.$this->target,$proc->transformToXml($xml_doc));\r\n\t\t$res = ob_get_contents();\r\n\t\tob_end_clean();\r\n\r\n\t\tif ($this->debug) t3lib_div::devLog ('XSL Trafo: '.$res,'tx_bridge_lib');\r\n\t}", "protected static function parseXslText(DOMElement $ir, DOMElement $node)\n\t{\n\t\tself::appendOutput($ir, 'literal', $node->textContent);\n\t}", "public function XmlObjAsHtml($xmlObj, $view = null) {\r\n $result = '';\r\n $view = $view == null ? (string) $xmlObj['id'] : $view;\r\n $xslFile = XSLT_PATH . $view . '.xsl';\r\n if(file_exists($xslFile)){\r\n // transform xsl file content into DOM object\r\n $this->dom->load($xslFile);\r\n // import xsl DOM to processor\r\n $this->xslt->importStyleSheet($this->dom);\r\n // load xml source into DOM\r\n $this->dom->loadXML($xmlObj->asXML());\r\n // execute XSLT\r\n $result = $this->xslt->transformToXML($this->dom);\r\n }\r\n return $result;\r\n }", "public static function disableHtmlExtension()\r\n {\r\n self::$html = false;\r\n }", "public function setXSLPath($path){\r\n\t\t$this->xsl_path = t3lib_div::getFileAbsFileName($path);\r\n\t}", "public function disablePrettyHTML() {\n\t\t$this->prettyHTML = false;\n\t}", "private function _preprocessDocument()\n {\n $xml = $this->getDocument();\n $xml = preg_replace('/<w:bookmarkStart w:id=\"[0-9]\" w:name=\"([0-9 A-Z _]*)\"/',\n self::$_templateSymbol . '${1}' . self::$_templateSymbol, $xml);\n return $xml;\n }", "function get_noko($source=false)\r\n{\r\n if ($source===false)\r\n return g('xparser');\r\n\r\n //if (is_string($source)) $source='<?xml encoding=\"UTF-8\">'.$source;\r\n return new nokogiri($source);\r\n}", "public function ssml();", "public function disableCompressCss() {}", "function xss_html_clean( $html )\n\t{\n\t\t//-----------------------------------------\n\t\t// Opening script tags...\n\t\t// Check for spaces and new lines...\n\t\t//-----------------------------------------\n\t\t\n\t\t$html = preg_replace( \"#<(\\s+?)?s(\\s+?)?c(\\s+?)?r(\\s+?)?i(\\s+?)?p(\\s+?)?t#is\" , \"&lt;script\" , $html );\n\t\t$html = preg_replace( \"#<(\\s+?)?/(\\s+?)?s(\\s+?)?c(\\s+?)?r(\\s+?)?i(\\s+?)?p(\\s+?)?t#is\", \"&lt;/script\", $html );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Basics...\n\t\t//-----------------------------------------\n\t\t\n\t\t$html = preg_replace( \"/javascript/i\" , \"j&#097;v&#097;script\", $html );\n\t\t$html = preg_replace( \"/alert/i\" , \"&#097;lert\" , $html );\n\t\t$html = preg_replace( \"/about:/i\" , \"&#097;bout:\" , $html );\n\t\t$html = preg_replace( \"/onmouseover/i\", \"&#111;nmouseover\" , $html );\n\t\t$html = preg_replace( \"/onclick/i\" , \"&#111;nclick\" , $html );\n\t\t$html = preg_replace( \"/onload/i\" , \"&#111;nload\" , $html );\n\t\t$html = preg_replace( \"/onsubmit/i\" , \"&#111;nsubmit\" , $html );\n\t\t$html = preg_replace( \"/<body/i\" , \"&lt;body\" , $html );\n\t\t$html = preg_replace( \"/<html/i\" , \"&lt;html\" , $html );\n\t\t$html = preg_replace( \"/document\\./i\" , \"&#100;ocument.\" , $html );\n\t\t\n\t\treturn $html;\n\t}", "public function initXlsContext() {\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n $view = $viewRenderer->view;\n if ($view instanceof Zend_View_Interface) {\n //$viewRenderer->setNoRender(true);\n }\n }", "public function __construct() {\n // Laravel. This line explicitly disables those errors for this single conversion process.\n libxml_use_internal_errors(true);\n }", "function createInkyProcessor()\n{\n $xslDoc = new DOMDocument();\n $xslDoc->load(__DIR__ . \"/inky.xsl\");\n\n $security = XSL_SECPREF_READ_FILE | XSL_SECPREF_READ_NETWORK | XSL_SECPREF_DEFAULT;\n $proc = new XSLTProcessor();\n $proc->setSecurityPrefs($security);\n $proc->importStylesheet($xslDoc);\n\n return $proc;\n}", "private function buildTempXslForThemes(){\n\t\t$arrayThemes = Theme::getAllThemes();\n\t\tforeach ($arrayThemes as $theme) {\n\t\t\t$theme->buildTempResources();\n\t\t\t$theme->project->buildCompressFile($theme->_shortname);\n\t\t\techo($theme->_shortname.\" theme installed\\r\\n\");\n\t\t}\t\t\n\t}", "protected function applyTransformation() {\n // no transformation for index\n }", "public function getDocTypeXHTMLStrict()\n {\n return self::DOC_TYPE_XHMTL_STRICT;\n }", "function _transxml($text) {\n \n //first replace allready translated text to original symbols\n\t $preout = str_replace(\"&amp;\",\"&\",$text);\n\t $preout1 = str_replace(\"&lt;\",\"<\",$preout);\n\t $preout2 = str_replace(\"&gt;\",\">\",$preout1);\n\t $preout3 = str_replace(\"&apos;\",\"'\",$preout2); \t \t \n\t $preout4 = str_replace(\"&quot\",\"\\\"\",$preout3);\n\t \n\t //next set original symbols to its equal symbols\t \n\t $out4 = str_replace(\"\\\"\",\"&quot;\",$preout4);\n\t $out3 = str_replace(\"'\",\"&apos;\",$preout4);\n\t $out2 = str_replace(\">\",\"&gt;\",$preout4);\n\t $out1 = str_replace(\"<\",\"&lt;\",$preout4);\n\t $out = str_replace(\"&\",\"&amp;\",$preout4);\t \t \t \t \n\t \n\t return ($out);\n }", "private function applyTransformation() {\n if($this->transform !== NULL) {\n $xsl = new DOMDocument();\n $xsl->load($this->transform);\n $xslt = new XSLTProcessor();\n $xslt->importStyleSheet($xsl);\n $document = $xslt->transformToDoc($this->document);\n if ($document) {\n $xpath = new DOMXPath($document);\n // Set the Label\n $results = $xpath->query(\"*[local-name()='title']\");\n $results->item(0)->nodeValue = $this->label;\n // Set the Pid\n $results = $xpath->query(\"*[local-name()='identifier']\");\n $results->item(0)->nodeValue = $this->pid;\n if (isset($document->documentElement)) {\n return $this->importNode($document->documentElement, TRUE);\n }\n }\n }\n return NULL;\n }", "public function run() {\n libxml_get_last_error() && libxml_clear_errors();\n \n $this->processor= new XSLTProcessor();\n $this->processor->importStyleSheet($this->stylesheet);\n $this->processor->setParameter('', $this->params);\n \n // If we have registered instances, register them in XSLCallback\n if (sizeof($this->_instances)) {\n $cb= XSLCallback::getInstance();\n foreach ($this->_instances as $name => $instance) {\n $cb->registerInstance($name, $instance);\n }\n }\n $this->processor->registerPHPFunctions(array('XSLCallback::invoke'));\n \n // Start transformation\n $this->output= $this->processor->transformToXML($this->document);\n\n // Check for errors\n $this->_checkErrors('<transformation>');\n\n // Perform cleanup when necessary (free singleton for further use)\n sizeof($this->_instances) && XSLCallback::getInstance()->clearInstances();\n \n return TRUE;\n }", "function jn_htmlInUrl_deactive() {\r\n\t\tglobal $wp_rewrite;\r\n\t\tif ( in_array( 'page', $this->selected_post_type ) ) {\r\n\t\t\t$wp_rewrite->page_structure = str_replace( '.html','',$wp_rewrite->page_structure );\r\n\t\t\t$wp_rewrite->flush_rules();\r\n\t\t}\r\n\t}", "function remove_sl(){\n\t\t\n\t}", "function deactivate() {\r\n global $wp_rewrite;\r\n\r\n $wp_rewrite->page_structure = str_replace(\".\" . $this->options->extension, \"\", $wp_rewrite->page_structure);\r\n $wp_rewrite->flush_rules();\r\n }", "public function setUp()\n {\n libxml_clear_errors();\n $this->mockXSLTProcessor = $this->getMock('\\XSLTProcessor');\n TestXslProcessor::$mockXsltProcessor = $this->mockXSLTProcessor;\n $this->xslProcessor = new TestXslProcessor(new XslCallbacks());\n $this->document = new \\DOMDocument();\n $this->document->loadXML('<?xml version=\"1.0\" encoding=\"UTF-8\"?><foo><bar/></foo>');\n $this->xslProcessor->onDocument($this->document);\n }", "function remove_word_styles() {\r\n\t\t$this->code = preg_replace('/<style[^<>]*?>(.*?)<\\/style>/is', '<style type=\"text/css\"></style>', $this->code);\r\n\t}", "function trans_off()\r\n\t{\r\n\t\t$this->db->trans_enabled = FALSE;\r\n\t}", "public function disableOutput()\n {\n $this->output = null;\n }", "public function isStylesheet()\n {\n return ! $this->isJavascript();\n }", "function first_edition_deregister_styles() {\n\tif ( '' != get_option( 'first_edition_font_pair' ) ) {\n\t\twp_dequeue_style( 'quattrocento' );\n\t\twp_dequeue_style( 'quattrocento-sans' );\n\t}\n}", "function transformString($xml)\n{\n return transformDOM(loadTemplateString($xml));\n}", "private function cleanForXML($string)\n {\n $string = strip_tags($string);\n $string = htmlentities($string, ENT_QUOTES, \"UTF-8\");\n $string = preg_replace(\"/&#?[a-z0-9]{2,8};/i\", \"\", $string);\n return $string;\n }", "private function cleanForXML($string)\n {\n $string = strip_tags($string);\n $string = htmlentities($string, ENT_QUOTES, \"UTF-8\");\n $string = preg_replace(\"/&#?[a-z0-9]{2,8};/i\", \"\", $string);\n return $string;\n }", "public function hideXLabels() {\n\t\t$this->Options['xaxis']['show'] = false;\n\t}", "private function restoreMathAndLocale()\n {\n ILess_Math::restore();\n ILess_UnitConversion::restore();\n }", "private static function check_xsl_loaded()\n {\n if (!defined('PHPOPENFW_XSL_LOADED')) {\n if (extension_loaded('xsl') && extension_loaded('dom')) {\n define('PHPOPENFW_XSL_LOADED', true);\n }\n else {\n define('PHPOPENFW_XSL_LOADED', false);\n }\n }\n return PHPOPENFW_XSL_LOADED;\n }", "private static function check_xsl_loaded()\n {\n if (!defined('PHPOPENFW_XSL_LOADED')) {\n if (extension_loaded('xsl') && extension_loaded('dom')) {\n define('PHPOPENFW_XSL_LOADED', true);\n }\n else {\n define('PHPOPENFW_XSL_LOADED', false);\n }\n }\n return PHPOPENFW_XSL_LOADED;\n }", "function unformatted($text) {\n $this->doc .= $this->_xmlEntities($text);\n }", "public static function clearOutput(): void\n {\n rex_extension::register('OUTPUT_FILTER', static function (rex_extension_point $ep) {\n $ep->setSubject(false);\n });\n }", "public function render($xml)\n\t{\n\t\t// Fast path for plain text\n\t\tif (substr($xml, 0, 4) === '<pt>')\n\t\t{\n\t\t\treturn substr($xml, 4, -5);\n\t\t}\n\n\t\t$dom = new DOMDocument;\n\t\t$dom->loadXML($xml);\n\n\t\tif (!isset($this->proc))\n\t\t{\n\t\t\t$xsl = new DOMDocument;\n\t\t\t$xsl->loadXML($this->stylesheet);\n\n\t\t\t$this->proc = new XSLTProcessor;\n\t\t\t$this->proc->importStylesheet($xsl);\n\t\t}\n\n\t\t// Remove the \\n that XSL adds at the end of the output\n\t\treturn substr($this->proc->transformToXml($dom), 0, -1);\n\t}", "public function transpile($template)\n\t{\n\t\t$replacements = [\n\t\t\t'(\\\\{\\\\{)' => '&#123;',\n\t\t\t'(\\\\}\\\\})' => '&#125;',\n\t\t\t'(\\\\{\\\\$([A-Z]\\\\w+)\\\\})' => '{{$xf.options.s9e_MediaSites_$1}}',\n\t\t\t'(\\\\{@(\\\\w+)\\\\})' => '{$$1}',\n\t\t\t'(<xsl:value-of select=\"@(\\\\w+)\"/>)' => '{$$1}',\n\t\t\t'(<xsl:value-of select=\"\\\\$(\\\\w+)\"/>)' => '{{$xf.options.s9e_MediaSites_$1}}',\n\t\t\t'((<iframe[^>]+?)/>)' => '$1></iframe>',\n\t\t\t'( data-s9e-livepreview[^=]*=\"[^\"]*\")' => '',\n\t\t\t\"(\\\\{translate\\\\(@id,'(.)','(.)'\\\\)\\\\})\" => \"{\\$id|replace('\\$1','\\$2')}\",\n\n\t\t\t'(<xsl:if test=\"([^\"]++)\">)' => '<xf:if is=\"$1\">',\n\t\t\t'(</xsl:if>)' => '</xf:if>',\n\t\t\t'(<xsl:choose><xsl:when test=\"([^\"]++)\">)' => '<xf:if is=\"$1\">',\n\t\t\t'(</xsl:when><xsl:when test=\"([^\"]++)\">)' => '<xf:elseif is=\"$1\"/>',\n\t\t\t'(</xsl:when><xsl:otherwise>)' => '<xf:else/>',\n\t\t\t'(</xsl:otherwise></xsl:choose>)' => '</xf:if>',\n\t\t];\n\t\t$template = preg_replace('((<xsl:when[^>]*)/>)', '$1></xsl:when>', $template);\n\t\t$template = preg_replace(array_keys($replacements), array_values($replacements), $template);\n\t\t$template = preg_replace_callback(\n\t\t\t'(<xf:(?:else)?if is=\"\\\\K[^\"]++)',\n\t\t\tfunction ($m)\n\t\t\t{\n\t\t\t\treturn $this->convertXPath($m[0]);\n\t\t\t},\n\t\t\t$template\n\t\t);\n\t\t$template = preg_replace_callback(\n\t\t\t'(<xsl:value-of select=\"(.*?)\"/>)',\n\t\t\tfunction ($m)\n\t\t\t{\n\t\t\t\treturn '{{ ' . $this->convertXPath($m[1]) . ' }}';\n\t\t\t},\n\t\t\t$template\n\t\t);\n\n\t\t// Replace xf:if with inline ternaries in attributes\n\t\t$template = preg_replace_callback(\n\t\t\t'(<xsl:attribute[^>]+>\\\\K.*?(?=</xsl:attribute))',\n\t\t\tfunction ($m)\n\t\t\t{\n\t\t\t\treturn $this->convertTernaries($m[0]);\n\t\t\t},\n\t\t\t$template\n\t\t);\n\n\t\t// Inline xsl:attribute elements in HTML elements\n\t\t$template = $this->loopReplace(\n\t\t\t'((<(?!\\\\w+:)[^>]*)><xsl:attribute name=\"(\\\\w+)\">(.*?)</xsl:attribute>)',\n\t\t\t'$1 $2=\"$3\">',\n\t\t\t$template\n\t\t);\n\n\t\t// Test whether we've been able to transpile everything\n\t\tif (strpos($template, '<xsl:') !== false)\n\t\t{\n\t\t\tthrow new RuntimeException('Cannot transpile XSL element');\n\t\t}\n\t\tif (preg_match('((?<!\\\\{)\\\\{(?![{$])[^}]*\\\\}?)', $template, $m))\n\t\t{\n\t\t\tthrow new RuntimeException(\"Cannot transpile attribute value template '\" . $m[0] . \"'\");\n\t\t}\n\n\t\t// Unescape braces\n\t\t$template = strtr($template, ['&#123;' => '{', '&#125;' => '}']);\n\n\t\t// Replace the $MEDIAEMBED_THEME parameter with the XenForo style property\n\t\t$template = str_replace('$xf.options.s9e_MediaSites_MEDIAEMBED_THEME', \"property('styleType')\", $template);\n\n\t\treturn $template;\n\t}", "public function disableTypeChecks() {\n $this->doTypeChecks = false;\n }", "function XML(){\n\t\t\t\t$this->parser = &xml_parser_create();\n\t\t\t\txml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);\n\t\t\t\txml_set_object($this->parser, $this);\n\t\t\t\txml_set_element_handler($this->parser, 'open','close');\n\t\t\t\txml_set_character_data_handler($this->parser, 'data');\n\t\t\t}", "private function render($template, $xml)\r\n\t{\r\n\t\tif(get::variable('xml','isset') or Settings::singleton()->get_setting('send_as_xml') or class_exists('xsltProcessor') === false)\r\n\t\t{\r\n\t\t\t//Just send the XML\r\n\t\t\tCommon::send_mime_type('text/xml');\r\n\r\n\t\t\t$search = '<?xml version=\"1.0\"?>';\r\n\t\t\t$replace = '<?xml version=\"1.0\" encoding=\"'. Settings::singleton()->get_setting('char_set').'\" ?><?xml-stylesheet type=\"text/xsl\" href=\"'. Settings::singleton()->get_setting('document_root').'/xslt\" ?>';\r\n\t\t\tif(get::variable('xml') == 1) { $replace = '<?xml version=\"1.0\" encoding=\"'. Settings::singleton()->get_setting('char_set').'\" ?>'; }\r\n\r\n\t\t\t$this->render_this(str_replace($search, $replace, $xml));\r\n\t\t\texit;\r\n\t\t}\r\n\r\n\t\t$this->html = $this->transform_xml_with_xslt($xml, $template);\r\n\r\n\t\t/* hack to clean html */\r\n\t\t$this->clean_html();\r\n\r\n\t\t/* output the html */\r\n\t\t$this->send_html();\r\n\t\texit;\r\n\t}", "function unset_template()\r\n\t{\r\n\t\t$this->_template = null;\r\n\t\t$this->set_mode(self::OUTPUT_MODE_NORMAL);\r\n\t}", "public function setDefaultTransformer($transformer);", "protected function resetNamespaceFilter() {\n\t\t$this->lookup->clearFilter( 'namespace_text' );\n\t}", "function regexcleanhtml($text){\n\t//get rid of unneeded spaces\n\t$text=regexspacecleaner($text);\n\t\n\t//lets get rid of weird spacing first so we can make simpler quearies later\n\t$regex_pattern=\"/<\\s/\"; //makes < followed by a space just < (e.g. slkj < slkj = slkj <slkj)\n\t$text = preg_replace($regex_pattern, \"<\", $text);\n\t$regex_pattern=\"/\\s>/\"; //makes > preceded by a space just > (e.g. slkj > slkj = slkj> slkj)\n\t$text = preg_replace($regex_pattern, \">\", $text);\n\t$regex_pattern=\"/<\\/\\s/\";\n\t$text = preg_replace($regex_pattern, \"</\", $text); //makes </ followed by a space just </ (e.g. slkj </ slkj = slkj </slkj)\n\t\n\treturn $text;\n}", "public function removeStyleDec() {\n\t}", "private function outputXml()\n {\n $stringXML = $this->dom->saveXML();\n\n $stringXML = str_replace('<?xml version=\"999\"?>', '', $stringXML);\n\n //dd(trim($stringXML));\n\n return trim($stringXML);\n }", "public function transformToUri(): void\n {\n $this->baseXsltProcessor->returns(['transformToUri' => 4555]);\n assertThat($this->xslProcessor->toUri('foo'), equals(4555));\n }", "function _make_safe_for_xml( $t )\n \t{\n \t\treturn str_replace( '&amp;#39;', '&#39;', htmlspecialchars( $t ) );\n \t}", "public function clearXmlPlugins()\n {\n $this->collXmlPlugins = null; // important to set this to NULL since that means it is uninitialized\n }", "public static function OptimizeXml($xml){\r\n\t\tself::Debug('Optimize XML');\r\n\t\treturn preg_replace('/[\\n|\\t]/','',$xml);\r\n\t}", "public function transform($xmlFile, $xslFile) {\r\n # load the xsl as DOM object\r\n $this->dom->load($xslFile);\r\n # import xsl DOM to processor\r\n $this->xslt->importStyleSheet($this->dom);\r\n # load xml DOM\r\n $this->dom->load($xmlFile);\r\n # execute XSLT\r\n return $this->xslt->transformToXML($this->dom);\r\n }", "public static function removeXmlEntities($xml)\n {\n return preg_replace('#\\s*<!ENTITY .*?>#is', '', $xml);\n }", "function _fly_transform($new_source) {\n $tempFilename = tempnam(\"/tmp\", \"MODS_xml_initial_\");\n $data = str_replace(\n array('{|', '|}', '}', '{'), \n array('?', '?', '>', '<'), '{{|xml version=\"1.0\" |}}\n{xsl:stylesheet version=\"1.0\"\n xmlns:mods=\"http://www.loc.gov/mods/v3\"\n xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"}\n {xsl:template match=\"/ | @* | node()\"}\n {xsl:copy}\n {xsl:apply-templates select=\"@* | node()\" /}\n {/xsl:copy}\n {/xsl:template}\n {xsl:template match=\"/mods:mods/mods:relatedItem[@type=\\'host\\']/mods:titleInfo\"}{mods:titleInfo}{mods:title}' . $new_source . '{/mods:title}{/mods:titleInfo}{/xsl:template}\n{/xsl:stylesheet}');\n\n file_put_contents($tempFilename, $data);\n return $tempFilename;\n}", "function clearTransformers()\n {\n $this->getTransformerContainer()->clearTransformers();\n }", "function cleanup() {\n\n\t\t// reset language\n\t\tif ( Language::is_multilingual() ) {\n\t\t\tLanguage::set_original();\n\t\t}\n\n\t\tremove_filter( 'woocommerce_get_tax_location', [ $this, 'filter_tax_location' ] );\n\n\t\t$this->is_setup = false;\n\t}" ]
[ "0.58941406", "0.56895256", "0.5678719", "0.5654335", "0.55474824", "0.5529772", "0.552298", "0.5462376", "0.54589814", "0.5355058", "0.5347424", "0.53075933", "0.5186075", "0.511506", "0.5105281", "0.50885534", "0.50488853", "0.5037611", "0.5032306", "0.5014301", "0.49986935", "0.49383342", "0.4936689", "0.489528", "0.4886625", "0.48816037", "0.48599315", "0.4842243", "0.48146942", "0.47613004", "0.47576204", "0.4748905", "0.47381786", "0.47294012", "0.4723768", "0.47212395", "0.46672878", "0.46515664", "0.46432865", "0.46248618", "0.46192554", "0.46079838", "0.46034878", "0.45886433", "0.45871106", "0.45747665", "0.45633703", "0.45503274", "0.451535", "0.45135573", "0.45107773", "0.45071593", "0.44953254", "0.4486224", "0.4485979", "0.44829005", "0.4468981", "0.44677025", "0.4461049", "0.4459076", "0.44515267", "0.44456217", "0.4439435", "0.44379622", "0.44340676", "0.44290105", "0.44099602", "0.44095084", "0.44066724", "0.43998352", "0.43988255", "0.4395684", "0.4387753", "0.4387753", "0.4378999", "0.43762952", "0.4375828", "0.4375828", "0.4375143", "0.43740568", "0.43730068", "0.43707487", "0.43647963", "0.43616024", "0.43439806", "0.43436557", "0.43382424", "0.4319731", "0.43168548", "0.43133312", "0.43104246", "0.42967054", "0.42928156", "0.4292566", "0.42914006", "0.42880824", "0.42858818", "0.42827788", "0.4254456", "0.4253131" ]
0.7720259
0
Create and use a hidden unique form key
public function use_key($key='form_key') { $stamp = date('U'); $this->add_hidden(new hidden($key, $stamp)); return $stamp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateFormkey()\n {\n $ip = $_SERVER['REMOTE_ADDR'];\n // mt_rand() is better than rand()\n $uniqid = uniqid(mt_rand(), true);\n\n return md5($ip . $uniqid);\n }", "public function getFormkey()\n {\n // generate the key and store it inside the class\n $this->formkey = $this->generateFormkey();\n // store the form key in the session\n $_SESSION['formkey'] = $this->formkey;\n // output the form key\n return \"<input type='hidden' name='formkey' value='\" . $this->formkey . \"' />\";\n }", "function add_form_key($form_name)\n{\n\tglobal $config, $template, $user;\n\n\t$now = time();\n\t$token_sid = ($user->data['user_id'] == ANONYMOUS && !empty($config['form_token_sid_guests'])) ? $user->session_id : '';\n\t$token = sha1($now . $user->data['user_form_salt'] . $form_name . $token_sid);\n\n\t$s_fields = build_hidden_fields(array(\n\t\t'creation_time' => $now,\n\t\t'form_token'\t=> $token,\n\t));\n\n\t$template->assign_vars(array(\n\t\t'S_FORM_TOKEN'\t=> $s_fields,\n\t));\n}", "function generateSessionKey(){\n\t\t // genereate session and form key\n\t\t$this->formSession['key'] = rand();\n\t\t$GLOBALS[\"TSFE\"]->fe_user->setKey('ses',$this->extKey, $this->formSession);\n\t\t$GLOBALS[\"TSFE\"]->storeSessionData();\n\t}", "function _pageform_newkey( )\n{\n $pf = rand();\n return $pf;\n}", "private function key() {\n return sprintf('form_%s_%d', $this->module->name, $this->module->id);\n }", "function generateFormToken( $form ) {\r\n\t\t\r\n\t\t // generate a token from an unique value\r\n\t\t\t$token = md5( uniqid( microtime( ), true) ); \r\n\t\t\t\r\n\t\t\t// Write the generated token to the session variable to check it against the hidden field when the form is sent\r\n\t\t\t$_SESSION[$form.'_token'] = $token; \r\n\t\t\t\r\n\t\t\treturn $token;\r\n\t\r\n\t\t}", "function clearFormKey(){\n\t\t // session genereate key\n\t\t$this->formSession['key'] = null;\n\t}", "function setFormKey($key);", "function nonce_input() {\n\techo '<input type=\"hidden\" name=\"nonce\" id=\"form_key\" value=\"' . $_SESSION['nonce'] . '\">';\n}", "public function getFormKey()\n {\n return Mage::getSingleton('core/session')->getFormKey();\n }", "function generate_form_token($form) {\n\t// Generate a token from an unique value\n\t$token = md5(uniqid(microtime(), true));\n\n\t// Write the generated token to the session variable\n\t// to check it against the hidden field when the form is sent\n\t$_SESSION[$form . '_token'] = $token;\n\n\treturn $token;\n}", "function generateFormToken($form) {\n\t\t$token = md5(uniqid(microtime(), true));\n\n\t\t// Write the generated token to the session variable to check it against the hidden field when the form is sent\n\t\t$_SESSION[$form . '_token'] = $token;\n\t\treturn $token;\n\t}", "private function generateKey(): string\n\t{\n\t\t// `+` and `/` are replaced by `-` and `_`, resp.\n\t\t// The other characters (a-z, A-Z, 0-9) are legal within an URL.\n\t\t// As the number of bytes is divisible by 3, no trailing `=` occurs.\n\t\treturn strtr(base64_encode(random_bytes(3 * self::RANDOM_ID_LENGTH / 4)), '+/', '-_');\n\t}", "function generateUid()\n{\n $uid = uniqid(md5(mt_rand()), true);\n $formid = hash(\"sha256\", $uid);\n return $formid;\n}", "public static function create_rsquestionkey()\n {\n global $CFG;\n $prefix = $CFG->wwwroot . '@';\n return uniqid($prefix, true);\n }", "public function generateAuthKey() {\n $this->llaveAutenticacion = Yii::$app->security->generateRandomString();\n }", "abstract protected function generateKey();", "public static function generate($form) {\n\t\t$token = md5( uniqid(microtime(), true) );\n\t\t\n\t\t// Write the generated token to the session variable to check it against the hidden field when the form is sent\n\t\t$_SESSION[ $form . self::TOKEN_SUFIX ] = $token; \n\t\t\n\t\treturn $token;\n\t}", "function generate_token()\n {\n $this->load->helper('security');\n $res = do_hash(time().mt_rand());\n $new_key = substr($res,0,config_item('rest_key_length'));\n return $new_key;\n }", "function generate_key()\n\t{\n\t\treturn $this->key_prefix . md5( $this->key_prefix . microtime() . uniqid() . 'teamps' );\n\t}", "function wp_generate_user_request_key($request_id)\n {\n }", "public function generateKey()\n {\n return 'do.' . $this->token->user->id . '.' . preg_replace('/\\//', '.', $this->getUrl());\n }", "public function createTokenInput(){\n $this->generateToken();\n return '<input type=\"hidden\" name=\"_once\" value=\"' . $_SESSION['token'] . '\">';\n }", "public function generateAuthKey() {\n\t\t$this->txt_auth_key = Yii::$app->security->generateRandomString ();\n\t}", "public function create_field() {\n\n return sprintf(\n '<input type=\"hidden\" id=\"%s\" name=\"%s\" value=\"%s\" />',\n esc_attr( $this->action ),\n esc_attr( $this->action ),\n esc_attr( (string) wp_create_nonce( $this->action ) )\n );\n\n }", "public function generateFormToken($form)\n\t{\n\t\t$token = md5(uniqid(microtime(), true));\n \n\t\t// Write the generated token to the session variable to check it against the hidden field when the form is sent\n\t\t$_SESSION[$form.'_token'] = $token;\n \n\t\treturn $token;\n\t}", "function um_add_form_identifier( $args ) {\r\n\t?>\r\n\t\t<input type=\"hidden\" name=\"form_id\" id=\"form_id_<?php echo $args['form_id']; ?>\" value=\"<?php echo $args['form_id']; ?>\" />\r\n\t<?php\r\n}", "private function get_key() {\n\t\t$key = get_option( 'github_oembed_key' );\n\t\tif ( ! $key ) {\n\t\t\t$key = md5( time() . rand( 0, 65535 ) );\n\t\t\tadd_option( 'github_oembed_key', $key, '', 'yes' );\n\t\t}\n\t\treturn $key;\n\t}", "function keymaker($id = ''){\n\t\t//look up of info unique to the user or id. It could include date/time to timeout keys.\n\t\t$secretkey='1RuL1HutysK98UuuhDasdfafdCrackThisBeeeeaaaatchkHgjsheIHFH44fheo1FhHEfo2oe6fifhkhs';\n\t\t$key=md5($id.$secretkey);\n\t\treturn $key;\n\t}", "public function regenerateValidationKey() {\n $this->saveAttributes(array(\n 'validation_key' => md5(mt_rand() . mt_rand() . mt_rand()),\n ));\n }", "public function generateAuthKey(){\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "protected function createSecretKey()\n\t{\n\t\treturn random_string('unique');\n\t}", "public function generateAuthKey()\n {\n $this->token = Yii::$app->security->generateRandomString(32);\n }", "public function genTrackingKey()\n {\n if ($this->trackMails) {\n $trackingKey = Yii::$app->security->generateRandomString(32);\n $this->setTrackingKey($trackingKey);\n return $trackingKey;\n } else {\n return null;\n }\n }", "public static function generateNewAuthKey()\r\n {\r\n return Yii::$app->security->generateRandomString();\r\n }", "function mace_gif_setting_s3_keyid() {\n\t?>\n\t<input name=\"mace_gif_s3_keyid\" id=\"mace_gif_s3_keyid\" class=\"regular-text code mace-s3-storage-config\" type=\"text\" value=\"<?php echo esc_attr( mace_get_gif_s3_keyid() ); ?>\" />\n\t<?php\n}", "public function generateAuthKey(): void\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\r\n {\r\n $this->auth_key = Yii::$app->security->generateRandomString();\r\n }", "public function generateAuthKey()\r\n {\r\n $this->auth_key = Yii::$app->security->generateRandomString();\r\n }", "public static function createFormToken($form_id)\n\t{\n\t\t$t = time();\n\t\t$salt = mt_rand();\n\n\t\t// Get form URL (empty string when not in web server). When \n\t\t// form is submitted, this URL will be same or contained in \n\t\t// referer header (both is checked).\n\t\tif (isset($_SERVER['SERVER_NAME']) && isset($_SERVER['REQUEST_URI'])) {\n\t\t\t$url = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];\n\t\t} else {\n\t\t\t$url = '';\n\t\t}\n\n\t\t$extras = join(':', static::getFormTokenExtras());\n\t\t$hash = sha1(\"$t:$salt:$form_id:$url:$extras\");\n\t\treturn \"$t:$salt:$hash\";\n\t}", "public function value(): string\n {\n return uniqid(prefix: 'dsafsdaf-');\n }", "function key_gen($str=''){\n\treturn str_replace('=','',base64_encode(md5($str)));\n}", "function _acf_generate_local_key($field)\n{\n}", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString(32);\n }", "public function generateAuthKey()\r\n {\r\n $this->auth_key = Yii::$app->getSecurity()->generateRandomString();\r\n }", "public function settings_field_public_key() {\n\t\t?>\n\t\t<input name=\"theme_my_login_recaptcha[public_key]\" type=\"text\" id=\"theme_my_login_recaptcha_public_key\" value=\"<?php echo esc_attr( $this->get_option( 'public_key' ) ); ?>\" class=\"regular-text\" />\n\t\t<?php\n\t}", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public static function generateKey () {\n $session = bin2hex(random_bytes(16));\n if (static::count([ 'key' => $session ]) == 1) {\n return static::generateSession();\n }\n return $session;\n }", "public function getFormKey()\n {\n return $this->getBlockHtml('form_key');\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "protected function generateRandomId(){\n return Keygen::numeric(7)->prefix(mt_rand(1, 9))->generate(true);\n}", "function createKey(){\n\t$strKey = md5(microtime());\n\t\n\t//check to make sure this key isnt already in use\n\t$resCheck = mysql_query(\"SELECT count(*) FROM downloads WHERE downloadkey = '{$strKey}' LIMIT 1\");\n\t$arrCheck = mysql_fetch_assoc($resCheck);\n\tif($arrCheck['count(*)']){\n\t\t//key already in use\n\t\treturn createKey();\n\t}else{\n\t\t//key is OK\n\t\treturn $strKey;\n\t}\n}", "public static function getNewTrackingKey() {\n\t\n\t\t$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n\t\t\n\t\t// try up to 100 times to guess a unique key\n\t\tfor($i=0; $i<100; $i++) {\n\t\t\t$key = '';\n\t\t\tfor($j=0; $j<32; $j++)\t// generate a random 32 char alphanumeric string\n\t\t\t\t$key .= substr($chars,rand(0,strlen($chars)-1), 1);\n\t\t\n\t\t\tif(X2Model::model('Contacts')->exists('trackingKey=\"'.$key.'\"'))\t// check if this key is already used\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\treturn $key;\n\t\t}\n\t\treturn null;\n\t}", "public static function generateKey(){\n $key = '';\n // [0-9a-z]\n for ($i=0;$i<32;$i++){\n $key .= chr(rand(48, 90));\n }\n self::$_key = $key;\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->getSecurity()->generateRandomString();\n }", "public function getFormKey()\n {\n return $this->formKey->getFormKey();\n }", "public function settings_field_private_key() {\n\t\t?>\n\t\t<input name=\"theme_my_login_recaptcha[private_key]\" type=\"text\" id=\"theme_my_login_recaptcha_private_key\" value=\"<?php echo esc_attr( $this->get_option( 'private_key' ) ); ?>\" class=\"regular-text\" />\n\t\t<?php\n\t}", "public function generateAuthKey()\n\t{\n\t\t$this->auth_key = Yii::$app->security->generateRandomString();\n\t}", "public function generateAuthKey()\n\t{\n\t\t$this->auth_key = Yii::$app->security->generateRandomString();\n\t}", "private function generateCFID() {\n\t\treturn md5(serialize($_POST)).'.json';\n\t}", "public function generateKey ( $unique = false )\n\t{\n\t\t$key = md5(uniqid(rand(), true));\n\t\tif ($unique)\n\t\t{\n\t\t\tlist($usec,$sec) = explode(' ',microtime());\n\t\t\t$key .= dechex($usec).dechex($sec);\n\t\t}\n\t\treturn $key;\n\t}", "public function generateKey ( $unique = false )\n\t{\n\t\t$key = md5(uniqid(rand(), true));\n\t\tif ($unique)\n\t\t{\n\t\t\tlist($usec,$sec) = explode(' ',microtime());\n\t\t\t$key .= dechex($usec).dechex($sec);\n\t\t}\n\t\treturn $key;\n\t}", "public function generateAuthKey()\n {\n $this->auth_key = UsniAdaptor::app()->security->generateRandomString();\n }", "protected function createHash()\n\t{\n\t\t// create new\n\t\t$this->setHash(uniqid());\n\t\tDB::get()->prepare(\"\n\t\t\tINSERT INTO forms\n\t\t\tSET forms_area = ?, forms_hash = ?, forms_u_id = ?, forms_created_time = ?\")\n\t\t\t->execute(array(\n\t\t\t\t$this->domain,\n\t\t\t\t$this->hash,\n\t\t\t\t$this->user->id,\n\t\t\t\ttime()));\n\t}", "public function generateAuthKey() {\n $this->employer_auth_key = Yii::$app->security->generateRandomString();\n }" ]
[ "0.792427", "0.7291355", "0.7154968", "0.7058801", "0.6831539", "0.6754814", "0.6646691", "0.65696883", "0.6544463", "0.6499674", "0.6456416", "0.64436656", "0.6432139", "0.6326169", "0.6311642", "0.62961644", "0.6259598", "0.6257857", "0.6257024", "0.6251602", "0.62457824", "0.62418836", "0.62228805", "0.6200681", "0.6183403", "0.61789817", "0.61743444", "0.61640453", "0.61317754", "0.61296666", "0.6125817", "0.60906124", "0.6083515", "0.60513955", "0.6045681", "0.60413367", "0.6021875", "0.6007824", "0.5977796", "0.5977796", "0.59752506", "0.59661615", "0.59605044", "0.5956672", "0.59517133", "0.59511715", "0.5949085", "0.59476244", "0.59476244", "0.59476244", "0.59476244", "0.5946797", "0.59460896", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.5933219", "0.59309375", "0.59259737", "0.59198207", "0.59143114", "0.5909418", "0.59017503", "0.5897599", "0.5896452", "0.58921885", "0.58921885", "0.58875364", "0.5883561", "0.5883561", "0.58816844", "0.58803576", "0.58740366" ]
0.6738532
6
Bootstrap any application services.
public function boot() { $this->app['blade.compiler']->extend(function ($view) { return $this->app[BladeFiltersCompiler::class]->compile($view); }); }
{ "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 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->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 $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 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 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->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(): 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 $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\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(): 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\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()\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 {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\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(): 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->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\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 $this->loadFilters();\n $this->loadRoutes();\n $this->loadHelpers();\n $this->loadCommands();\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }" ]
[ "0.7342354", "0.72115344", "0.72045606", "0.71229565", "0.7110962", "0.7082294", "0.7077916", "0.70714337", "0.7052025", "0.70234996", "0.70118046", "0.7005517", "0.69550276", "0.6931787", "0.69304705", "0.6927122", "0.6910007", "0.69058853", "0.6900327", "0.689661", "0.6895445", "0.6886933", "0.68853027", "0.6880453", "0.6876052", "0.6874365", "0.68678993", "0.68643886", "0.6863172", "0.68618375", "0.68584615", "0.6857102", "0.685599", "0.6855742", "0.685175", "0.6840086", "0.6833647", "0.68309957", "0.6826625", "0.68253994", "0.682322", "0.6818006", "0.6814446", "0.68119043", "0.6811291", "0.68070227", "0.68069947", "0.68019533", "0.68007374", "0.67962325", "0.6795983", "0.67907226", "0.6788914", "0.67868465", "0.678414", "0.6782577", "0.67776054", "0.6772685", "0.6766274", "0.6765994", "0.67614365", "0.67607445", "0.675866", "0.6756398", "0.6752818", "0.67511266", "0.67465293", "0.67440975", "0.67438674", "0.67428005", "0.67388153", "0.6738725", "0.6738422", "0.67380404", "0.67311186", "0.6728974", "0.67285264", "0.6726248", "0.6725217", "0.67197037", "0.6717161", "0.6716261", "0.6713992", "0.6711724", "0.6702587", "0.66990435", "0.6690547", "0.66888714", "0.6686608", "0.6683616", "0.66820496", "0.66817683", "0.66805947", "0.6677231", "0.6676365", "0.667199", "0.66712487", "0.66709524", "0.66709524", "0.66709524", "0.66709524" ]
0.0
-1
Creates a new Uptime check configuration. (uptimeCheckConfigs.create)
public function create($parent, UptimeCheckConfig $postBody, $optParams = []) { $params = ['parent' => $parent, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('create', [$params], UptimeCheckConfig::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function CreateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\CreateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], UptimeCheckConfig::class);\n }", "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function patch($name, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('patch', [$params], UptimeCheckConfig::class);\n }", "public function listProjectsUptimeCheckConfigs($parent, $optParams = [])\n {\n $params = ['parent' => $parent];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class);\n }", "public function UpdateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\UpdateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function createConfig()\n\t{\n\t}", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function DeleteUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\DeleteUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function checkConfig();", "public function ListUptimeCheckIps(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsResponse', 'decode'],\n $metadata, $options);\n }", "private function createConfigsTable()\n {\n $fields = array(\n 'id' => array('type' => 'int', 'constraint' => '10', 'unsigned' => true, 'auto_increment' => true),\n 'site_id' => array('type' => 'int', 'constraint' => '10', 'unsigned' => true),\n 'client_id' => array('type' => 'varchar', 'constraint' => '250'),\n 'client_secret' => array('type' => 'varchar', 'constraint' => '250'),\n 'api_endpoint' => array('type' => 'varchar', 'constraint' => '1000', 'null' => true),\n 'log_searches' => array('type' => 'tinyint', 'constraint' => '10', 'unsigned' => true),\n );\n\n ee()->dbforge->add_field($fields);\n ee()->dbforge->add_key('id', true);\n\n ee()->dbforge->create_table('rets_rabbit_v2_configs');\n }", "public function createFromConfig()\n { \n // Begin transation\n $this->pdo->beginTransaction();\n\n // Create tables\n foreach ($this->schema['create'] as $name => $schema) {\n $table = $this->tables[$name];\n $this->pdo->exec($this->getDropTable($table));\n $sql = $this->getCreateTable($table, $schema);\n $this->pdo->exec($sql);\n }\n\n // Commit changes\n $this->pdo->commit();\n }", "public function createConfig(array $nodes);", "function recurringdowntime_check_cfg()\n{\n if (!file_exists(RECURRINGDOWNTIME_CFG)) {\n $fh = @fopen(RECURRINGDOWNTIME_CFG, \"w+\");\n fclose($fh);\n }\n}", "public function create_table_config(){\n $sql = \" CREATE TABLE IF NOT EXISTS {$this->table_config} (\n `id` varchar(100),\n `day` varchar(50) DEFAULT NULL,\n `range` varchar(50) DEFAULT NULL,\n `qty` smallint DEFAULT 0,\n `type` varchar(50) DEFAULT NULL,\n `order` smallint DEFAULT 0,\n PRIMARY KEY (`id`)\n )\";\n\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n }", "private function createConfiguration()\n {\n $this->createVrpayecommercePluginConfig();\n $this->Form();\n }", "public static function checkConfig() {\n\t\tlog::add('surveillanceStation', 'debug', ' ┌──── Verification des configurations du plugin');\n\t\t// Checking snapLocation\n\t\tif (config::byKey('snapLocation', 'surveillanceStation') == 'synology') {\n\t\t\tconfig::save('snapRetention', '', 'surveillanceStation');\n\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::snapRetention Nettoyage des valeurs');\n\t\t}\n\t\t// Checking Integer fields\n\t\tforeach (array('port', 'snapRetention') as $field) {\n\t\t\tif ( ! empty(config::byKey($field, 'surveillanceStation'))) {\n\t\t\t\tswitch($field) {\n\t\t\t\t\tcase 'port':\n\t\t\t\t\t\t$min_range = 1;\n\t\t\t\t\t\t$max_range = 65535;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$min_range = 0;\n\t\t\t\t\t\t$max_range = 9999;\n\t\t\t\t}\n\t\t\t\tif(!filter_var(config::byKey($field, 'surveillanceStation'), FILTER_VALIDATE_INT, array('options' => array('min_range' => $min_range, 'max_range' => $max_range)))){\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ ERROR : checkConfig::'.$field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range);\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n\t\t\t\t\tthrow new Exception(__($field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range, __FILE__));\n\t\t\t\t} else {\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::'.$field.' OK with value ' . config::byKey($field, 'surveillanceStation'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n }", "public static function create(array $config = [])\n {\n }", "protected function setUpFromConfig()\n\t{\n\t\t$timeLimit = 4 * 60 * 60;\n\n\t\t$parameters = $this->container->getParameters();\n\t\tif (is_array($parameters) and array_key_exists(\"taskManager\", $parameters)) {\n\t\t\t/// ***** TIMELIMIT ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"timeLimit\"])) {\n\t\t\t\t$timeLimit = $parameters[\"taskManager\"][\"timeLimit\"];\n\t\t\t}\n\t\t\t/// ***** MAX HISTORY DAYS ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"history\"][\"maxDays\"])) {\n\t\t\t\t$this->maxHistoryDays = (int)$parameters[\"taskManager\"][\"history\"][\"maxDays\"];\n\t\t\t}\n\t\t\t/// ***** MAX HISTORY RECORDS ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"history\"][\"maxRecords\"])) {\n\t\t\t\t$this->maxHistoryRecords = (int)$parameters[\"taskManager\"][\"history\"][\"maxRecords\"];\n\t\t\t}\n\t\t}\n\n\t\tset_time_limit($timeLimit);\n\t}", "public static function addConfig($data) {\n\t\tif (!is_array($data)) return false;\n\t\t$data['create_time'] = Common::getTime();\n $data['update_time'] = Common::getTime();\n\t\t$data = self::_cookData($data);\n\t\treturn self::_getDao()->insert($data);\n\t}", "public static function configCheckTime($interval) {\n return time()+$interval;\n }", "public function createUser(array $config = []);", "abstract public static function createConfig(): Config;", "protected function validateCreating()\r\n {\r\n $rules = config('taki.validator.create', []);\r\n\r\n if (config('taki.username.required') && !array_get($rules, config('taki.field.username'))) {\r\n $rules[config('taki.field.username')] = config('taki.username.validator', 'required');\r\n }\r\n\r\n return $rules;\r\n }", "public static function createFromConfig(array $config);", "public function create()\n {\n return view('system_configs.create');\n }", "public function testCreate()\n {\n VCR::insertCassette('pickups/create.yml');\n\n $shipment = Shipment::create(Fixture::oneCallBuyShipment());\n\n $pickupData = Fixture::basicPickup();\n $pickupData['shipment'] = $shipment;\n\n $pickup = Pickup::create($pickupData);\n\n $this->assertInstanceOf('\\EasyPost\\Pickup', $pickup);\n $this->assertStringMatchesFormat('pickup_%s', $pickup->id);\n $this->assertNotNull($pickup->pickup_rates);\n }", "private function _uptime()\n {\n if (CommonFunctions::executeProgram('uptime', '', $buf)) {\n if (preg_match(\"/up (\\d+) days,\\s*(\\d+):(\\d+),/\", $buf, $ar_buf) || preg_match(\"/up (\\d+) day,\\s*(\\d+):(\\d+),/\", $buf, $ar_buf)) {\n $min = $ar_buf[3];\n $hours = $ar_buf[2];\n $days = $ar_buf[1];\n $this->sys->setUptime($days * 86400 + $hours * 3600 + $min * 60);\n }\n }\n }", "public function create()\n {\n return $this->check;\n }", "public function createCfg() {\n global $hostlist;\n $hostinfo = $hostlist[$this->host];\n $this->prepareCfg();\n $src = PATH . '/serverdata';\n $dest = GAMEPATH . '/users/ts' . $this->sid;\n if($ssh = new SSH($hostinfo)) {\n $ret1 = $ssh->sendFile($src . '/server' . $this->sid . '.cfg', $dest . '/server.cfg');\n $ret2 = $ssh->sendFile($src . '/mapcycle' . $this->sid . '.txt', $dest . '/mapcycle.txt');\n return $ret1 && $ret2;\n }\n }", "private function runConfig()\n {\n $configs = [\n [\n 'name' => 'sub_title',\n 'alias_name' => 'SubTitle',\n 'value' => 'SubTitle',\n ],\n [\n 'name' => 'title',\n 'alias_name' => 'Title',\n 'value' => 'Title',\n ],\n ];\n\n foreach ($configs as $config) {\n factory(Config::class)->create($config);\n }\n }", "public function CreateUserConfiguration($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }", "public function getCheckups()\n {\n $scheduledCheckups = User::find(auth()->id())->checkups->reverse();\n\n return api_resource('mobile\\CheckupSchedule')->make($scheduledCheckups);\n }", "function prepConfig() {\n\n global $db;\n global $lang;\n\n if($report = $db->query(\"CREATE DATABASE IF NOT EXISTS \".$lang[\"config_db_name\"].\"\")) {\n\n // Generate safety table\n if($report = $db->query(\"CREATE TABLE IF NOT EXISTS `\".$lang[\"config_db_name\"].\"`.`\".$lang[\"config_table_name\"].\"` ( `id` INT(6) NOT NULL AUTO_INCREMENT, `key` VARCHAR(100) NOT NULL, UNIQUE (`key`), `val` VARCHAR(100) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;\")) {\n\n return \"Ready\";\n\n } else {\n\n return \"Failed to create table. Error: \".$db->error;\n\n }\n\n } else {\n\n return \"Failed to create database. Error: \".$db->error;\n\n }\n\n }", "public function actionCreate() {\n $model = new Configuration();\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 }", "protected function createConfiguration($sf_user)\n {\n $conf = new mtAlertMessageUserConfiguration();\n $conf->setmtAlertMessageId($this->getId());\n $conf->setUsername(mtAlertUserHelper::getUsername($sf_user));\n\n return $conf;\n }", "public function run()\n {\n printf(\"Adding hauling configuration.\\r\\n\");\n\n if(HaulingConfig::where(['load_size' => 'small'])->count() == 0) {\n HaulingConfig::insert([\n 'load_size' => 'small',\n 'min_load_size' => 0,\n 'max_load_size' => 8000,\n 'price_per_jump' => 600000.00,\n ]);\n }\n \n if(HaulingConfig::where(['load_size' => 'medium'])->count() == 0) {\n HaulingConfig::insert([\n 'load_size' => 'medium',\n 'min_load_size' => 8000,\n 'max_load_size' => 57500,\n 'price_per_jump' => 800000.00,\n ]);\n }\n\n if(HaulingConfig::where(['load_size' => 'large'])->count() == 0) {\n HaulingConfig::insert([\n 'load_size' => 'large',\n 'min_load_size' => 57500,\n 'max_load_size' => 800000,\n 'price_per_jump' => 1000000.00,\n ]);\n }\n\n printf(\"Finished adding hauling configuration.\\r\\n\");\n }", "public function create()\n\t{\n\t\t//\n\t\treturn view('checkup_shedules.create');\n\t}", "public function setCheckCount($checkcount) {\n\t\t$this->checkcount = $checkcount;\n\t}", "function Dataface_ConfigTool_createConfigTable(){\n\t$self =& Dataface_ConfigTool::getInstance();\n\tif ( !Dataface_Table::tableExists($self->configTableName, false) ){\n\t\t$sql = \"CREATE TABLE `\".$self->configTableName.\"` (\n\t\t\t\t\tconfig_id int(11) NOT NULL auto_increment primary key,\n\t\t\t\t\t`file` varchar(255) NOT NULL,\n\t\t\t\t\t`section` varchar(128),\n\t\t\t\t\t`key` varchar(128) NOT NULL,\n\t\t\t\t\t`value` text NOT NULL,\n\t\t\t\t\t`lang` varchar(2),\n\t\t\t\t\t`username` varchar(32),\n\t\t\t\t\t`priority` int(5) default 5\n\t\t\t\t\t)\";\n\t\t$res = mysql_query($sql, df_db());\n\t\tif ( !$res ){\n\t\t\ttrigger_error(mysql_error(df_db()), E_USER_ERROR);\n\t\t\texit;\n\t\t}\n\t}\n\n}", "public function createNewConfig() { \n\n\t\t/** \n\t\t * Start by creating the top of the php file\n\t\t *\n\t\t */\n\t\t$this->newFileStr = \"<?php\\n\\n\";\n\n\t\t/** \n\t\t * We want to loop through the new config variables\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new variables.\n\t\t */\n\n\t\tforeach ($this->fileSettings as $name => $val) {\n\n\t\t/** \n\t\t * Output our config variables comment\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new config comment\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n\\n//\" . $val['1'] . \"\\n\";\n\t\t\n\n\t\t/** \n\t\t *\n\t\t * Using var_export() allows you to set complex values \n\t\t * such as arrays and also ensures types will be correct\n\t\t *\n\t\t * @var string stores new config setting\n\t\t */\n\t\t\n\t\t$this->newFileStr .= \"$\".$name.\" = \".var_export($val['0'], TRUE).\";\\n\";\n\n\n\t\t} // end of foreach\n\n\t\t/** \n\t\t *\n\t\t * End our php file\n\t\t *\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n?>\";\n\n\t\t/** \n\t\t *\n\t\t * Create out new config\n\t\t *\n\t\t */\n\t\tfile_put_contents($this->filePath, $this->newFileStr, LOCK_EX);\n\n\t}", "public function create()\n {\n return view('checks.create', [\n 'tags' => $this->getTags(),\n 'check' => (new Check())\n ]);\n }", "private function check_conf() {\n ConfigChecker::check();\n }", "public function configuredChecks() {\n if ($this->checks === null) {\n $this->checks = [];\n foreach( $this->config as $driver => $checkConfig ) {\n // check if multiple or just one\n if (is_array($checkConfig)) {\n foreach( $checkConfig as $key => $config ) {\n $instance = $this->createInstance( $driver, $config );\n $instance->setInstanceName(is_string($key)?$key:$config);\n $this->checks[] = $instance;\n }\n } else {\n $instance = $this->createInstance( $driver, $checkConfig );\n $this->checks[] = $instance;\n }\n }\n }\n return $this->checks;\n }", "public function setUp()\n {\n $this->config = array(\n 's1' => 'string',\n 's2' => 'str',\n 'i1' => 'integer',\n 'i2' => 'int',\n 'i3' => '+integer',\n 'i4' => '+int',\n 'i5' => '-integer',\n 'i6' => '-int',\n 'f1' => 'float',\n 'f2' => '+float',\n 'f3' => '-float',\n 'b' => 'boolean',\n 'a' => 'array',\n 'm' => array(true, 'false'),\n 'r' => '/^member/',\n );\n $this->helper = new ConfigValidator($this->config);\n }", "public function __construct() {\n $base_class_name = 'SiteAuditCheck' . $this->getReportName();\n $percent_override = NULL;\n\n $checks_to_skip = array();\n if (drush_get_option('skip')) {\n $checks_to_skip = explode(',', drush_get_option('skip'));\n }\n\n $checks_to_perform = $this->getCheckNames();\n\n foreach ($checks_to_perform as $key => $check_name) {\n if (in_array($this->getReportName() . $check_name, $checks_to_skip)) {\n unset($checks_to_perform[$key]);\n }\n }\n\n if (empty($checks_to_perform)) {\n // No message for audit_all.\n $command = drush_parse_command();\n if ($command['command'] == 'audit_all') {\n return FALSE;\n }\n return drush_set_error('SITE_AUDIT_NO_CHECKS', dt('No checks are available!'));\n }\n $config = \\Drupal::config('site_audit');\n foreach ($checks_to_perform as $check_name) {\n $class_name = $base_class_name . $check_name;\n $opt_out = $config->get('opt_out.' . $this->getReportName() . $check_name) != NULL;\n $check = new $class_name($this->registry, $opt_out);\n\n // Calculate score.\n if ($check->getScore() != SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO) {\n // Mark if there's a major failure.\n if ($check->getScore() == SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL) {\n $this->hasFail = TRUE;\n }\n // Total.\n $this->scoreTotal += $check->getScore();\n // Maximum.\n $this->scoreMax += SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;\n }\n // Allow Report percentage to be overridden.\n if ($check->getPercentOverride()) {\n $percent_override = $check->getPercentOverride();\n }\n // Combine registry.\n $this->registry = array_merge($this->registry, $check->getRegistry());\n // Store all checks.\n $this->checks[$class_name] = $check;\n // Abort the loop if the check says to bail.\n if ($check->shouldAbort()) {\n break;\n }\n }\n if ($percent_override) {\n $this->percent = $percent_override;\n }\n else {\n if ($this->scoreMax != 0) {\n $this->percent = round(($this->scoreTotal / $this->scoreMax) * 100);\n }\n else {\n $this->percent = SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO;\n }\n }\n }", "public function run()\n {\n App\\Models\\UserStatus::create(\n ['user_id' => 1,\n 'lesson_id' => 1,\n 'question_ids' => '2 3 4',\n 'current_position' => -1,\n 'count_true_answers' => 0,\n 'attempt' => 0,\n 'max_attempt' => 3,\n 'threshold' => 80,\n 'is_success' => false\n ]\n );\n }", "public function run()\n {\n $walletConfig = new WalletConfig;\n $walletConfig->wallet_validity_period = 30;\n $walletConfig->save();\n }", "public function run()\n {\n Configuration::create([\n \"KEY_\" => \"business.name\",\n \"VALUE_\" => \"Zawiyah dental\"\n ]);\n\n Configuration::create([\n \"KEY_\" => \"business.address1\",\n \"VALUE_\" => \"Jalan Tok Kiah\"\n ]);\n\n Configuration::create([\n \"KEY_\" => \"business.address2\",\n \"VALUE_\" => \"Kemaman\"\n ]);\n\n Configuration::create([\n \"KEY_\" => \"business.address2\",\n \"VALUE_\" => \"Terengganu\"\n ]);\n\n }", "public function create()\n {\n $this->createApply();\n $this->createNginx();\n }", "public function Create()\n\t\t{\n\t\t\tparent::Create();\n \n\t\t\t$this->RegisterPropertyBoolean(\"cbxGS\", true);\n $this->RegisterPropertyBoolean(\"cbxHM\", true);\n $this->RegisterPropertyBoolean(\"cbxPP\", true);\n $this->RegisterPropertyBoolean(\"cbxBO\", false);\n $this->RegisterPropertyBoolean(\"cbxPT\", false);\n $this->RegisterVariableString(\"RestTimesHTML\", $this->Translate(\"Waste dates\"), \"~HTMLBox\");\n\n $this->RegisterPropertyInteger(\"PushInstanceID\", 0);\n $this->RegisterPropertyInteger(\"MailInstanceID\", 0);\n\n $this->RegisterPropertyInteger(\"IntervalUpdateTimer\", 0);\n $this->RegisterPropertyInteger(\"IntervalNotificationTimer\", 19);\n $this->RegisterPropertyInteger(\"IntervalUpdateTimerMinute\", 1);\n $this->RegisterPropertyInteger(\"IntervalHtmlResetColorTodayTimer\", 9);\n $this->RegisterPropertyInteger(\"IntervalNotificationTimerMinute\", 50);\n $this->RegisterPropertyInteger(\"TableFontSize\", 100);\n\n //HTML Defaults:\n $this->RegisterPropertyInteger(\"selColHtmlDefault\", 16777215);\n $this->RegisterPropertyInteger(\"selColHtmlPickupDayTomorrow\", 16744448);\n $this->RegisterPropertyInteger(\"selColHtmlPickupDayToday\", 16711680);\n $this->RegisterPropertyBoolean(\"cbxHtmlShowDay\", false);\n $this->RegisterPropertyBoolean(\"cbxHtmlResetColorToday\", false);\n\n //Create timers\n $this->RegisterTimer(\"UpdateTimer\", 0, 'AFK_UpdateWasteTimes('.$this->InstanceID.', false);');\n $this->RegisterTimer(\"NotificationTimer\", 0, 'AFK_UpdateWasteTimes('.$this->InstanceID.', false);');\n $this->RegisterTimer(\"ResetFontTimer\", 0, 'AFK_UpdateWasteTimes('.$this->InstanceID.', true);');\n\t\t}", "public function create()\n {\n return view('categoryConfig.create', ['actFlag' => 'categoryConf']);\n }", "public function create($parent, Configuration $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], Configuration::class);\n }", "public function create()\n\t{\n\t\tlog::info('inside create method of user-notifications controller');\n\t}", "protected function setupConfig()\n\t{\n\t\tparent::setupConfig();\n\t\t\n\t\tunset($this->config->event_log);\n\t\t$this->config->event_log = new EventLogTemp(\n\t\t\t$this->config->olp_db,\n\t\t\t$this->config->olp_db->db_info['db'],\n\t\t\t$this->config_data->application_id,\n\t\t\t'event_log_new_bbx'\n\t\t);\n\t}", "public function actionCreate()\n {\n $model = new ActivityConfig();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new ConfigConstant();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "function heartbeat_install() {\n global $wpdb;\n global $heartbeat_db_version;\n $table_name = $wpdb->prefix . 'heartbeattimelogger';\n $table_name_logs = $wpdb->prefix . 'heartbeattimelogger_logs';\n \n $charset_collate = $wpdb->get_charset_collate();\n\n $sql_log = \"CREATE TABLE $table_name_logs (\n id int NOT NULL AUTO_INCREMENT,\n userid int NOT NULL,\n ip_add VARCHAR(64) default '0.0.0.0',\n datetime DATETIME,\n PRIMARY KEY (id),\n KEY SEC (userid, datetime)\n ) $charset_collate;\";\n\n $sql = \"CREATE TABLE $table_name (\n id int NOT NULL AUTO_INCREMENT,\n userid int NOT NULL,\n minutes int default 0,\n pageid int NOT NULL,\n PRIMARY KEY (id),\n KEY SEC (userid, pageid)\n ) $charset_collate;\";\n\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n dbDelta( $sql );\n dbDelta( $sql_log );\n\n add_option( 'heartbeattimelogger_db_version', $heartbeat_db_version );\n }", "public function run(): void\n {\n UsersCommissionConfig::insert(\n [\n [\n 'id' => 1,\n 'platform_sign' => 'JHHY',\n 'game_type_sign' => 'live',\n 'game_vendor_sign' => 'VR',\n 'bet' => 100,\n ],\n [\n 'id' => 2,\n 'platform_sign' => 'JHHY',\n 'game_type_sign' => 'sport',\n 'game_vendor_sign' => 'IM',\n 'bet' => 100,\n ],\n ],\n );\n }", "public function run()\n {\n SystemConfiguration::create([\n 'site_name' => 'Ediyt',\n 'site_motto' => 'Let\\'s Get your job done',\n 'site_address' => 'In ut dolore adipisc',\n 'site_phone' => '+1 (918) 126-5336',\n 'site_email' => '[email protected]',\n 'freelancer_policy' => 'Copyright laws can vary from one country to the next; thus, it is vitally important that you acknowledge the differences in the laws no matter where your staff members are located.SPELL OUT COMPLIANCE PROCEDURES……including whom employees should contact within your organization with copyright questions. Explain how employees can determine if they need copyright permission and how to obtain permissions from rightsholders (publishers and authors).INFORM EMPLOYEES ABOUT THE USE OF YOUR ORGANIZATION’S OWN COPYRIGHTED MATERIALSFor example: How should employees handle the issue of works for hire with contractors and other non-employees who produce work for your organization? When is it okay to distribute your organization’s own materials?ADVISE EMPLOYEES ON THE PROPER HANDLING OF INFRINGEMENTEncourage employees to do the right thing, and to follow specific procedures when they witness instances of copyright infringement within your organization. Also, identify procedures for how employees should handle infringement of your company’s own works that they discover online or in the marketplace.&nbsp;Once you have developed your policy, be sure to formally introduce these guidelines to employees and issue periodic reminders. You may also consider including copyright compliance in your new employee orientation as well as in trainingfor existing staff.',\n 'client_policy' => '6 Tips for Creating an Effective Copyright PolicyDemonstrate respect for the copyrights of others and reduce the risk of infringementEach day employees share copyrighted content with one another in emails, in sales presentations, in response to clients and business partners and in many other ways — it’s just the normal course of doing business. But in the rush to get things done, even well-intentioned employees may unknowingly share copyrighted material without permission to do so, exposing your organization to the risk of copyright infringement.By developing a corporate copyright policy, you can provide clear guidelines to employees around the use of published materials and demonstrate your company’s commitment to respecting the copyrights of others. Here are six steps to help you craft a policy that meets your company’s needs and decreases your infringement risk.SOLICIT INPUT FROM&nbsp;COPYRIGHT EXPERTS……in your organization who may have suggestions for issues to address in your policy. Outside of library/information services, legal and compliance staff,you might expand the group to include Marketing and Corporate Communications. For example, should you address the subject of clients’ or business partners’ requests for information? And what about guidance for Marketing and Sales teams on the use of images or video content in sales materials?PROVIDE INFORMATION ON COPYRIGHT LAWYour colleagues may lack even a basic understanding of copyright law and how it affects them. Provide foundational information on copyright law in your policy. Refer to the Copyright Basics section on copyright.com to get started. You can also make it easy for employees to get up-to-speed by including a link to the informative and fun Copyright Basics video from Copyright Clearance Center.ADDRESS GLOBAL COPYRIGHT ISSUESIf your organization employs workers in multiple countries, provide information to ensure that employees share content responsibly both domestically and across borders. Copyright laws can vary from one country to the next; thus, it is vitally important that you acknowledge the differences in the laws no matter where your staff members are located.SPELL OUT COMPLIANCE PROCEDURES……including whom employees should contact within your organization with copyright questions. Explain how employees can determine if they need copyright permission and how to obtain permissions from rightsholders (publishers and authors).INFORM EMPLOYEES ABOUT THE USE OF YOUR ORGANIZATION’S OWN COPYRIGHTED MATERIALSFor example: How should employees handle the issue of works for hire with contractors and other non-employees who produce work for your organization? When is it okay to distribute your organization’s own materials?ADVISE EMPLOYEES ON THE PROPER HANDLING OF INFRINGEMENTEncourage employees to do the right thing, and to follow specific procedures when they witness instances of copyright infringement within your organization. Also, identify procedures for how employees should handle infringement of your company’s own works that they discover online or in the marketplace.&nbsp;Once you have developed your policy, be sure to formally introduce these guidelines to employees and issue periodic reminders. You may also consider including copyright compliance in your new employee orientation as well as in trainingfor existing staff.',\n 'privacy_policy'=>'<p><b>6 Tips for Creating an Effective Copyright</b></p><p>PolicyDemonstrate respect for the copyrights of others and reduce the risk of infringementEach day employees share copyrighted content with one another in emails, in sales presentations, in response to clients and business partners and in many other ways — it’s just the normal course of doing business.</p><p>But in the rush to get things done, even well-intentioned employees may unknowingly share copyrighted material without permission to do so, exposing your organization to the risk of copyright infringement.By developing a corporate copyright policy, you can provide clear guidelines to employees around the use of published materials and demonstrate your company’s commitment to respecting the copyrights of others. Here are six steps to help you craft a policy that meets your company’s needs and decreases your infringement risk.SOLICIT INPUT FROM&nbsp;COPYRIGHT EXPERTS……in your organization who may have suggestions for issues to address in your policy. Outside of library/information services, legal and compliance staff,you might expand the group to include Marketing and Corporate Communications. For example, should you address the subject of clients’ or business partners’ requests for information? And what about guidance for Marketing and Sales teams on the use of images or video content in sales materials?PROVIDE INFORMATION ON COPYRIGHT LAWYour colleagues may lack even a basic understanding of copyright law and how it affects them. Provide foundational information on copyright law in your policy. Refer to the Copyright Basics section on copyright.com to get started. You can also make it easy for employees to get up-to-speed by including a link to the informative and fun Copyright Basics video from Copyright Clearance Center.ADDRESS GLOBAL COPYRIGHT ISSUESIf your organization employs workers in multiple countries, provide information to ensure that employees share content responsibly both domestically and across borders. Copyright laws can vary from one country to the next; thus, it is vitally important that you acknowledge the differences in the laws no matter where your staff members are located.SPELL OUT COMPLIANCE PROCEDURES……including whom employees should contact within your organization with copyright questions. Explain how employees can determine if they need copyright permission and how to obtain permissions from rightsholders (publishers and authors).INFORM EMPLOYEES ABOUT THE USE OF YOUR ORGANIZATION’S OWN COPYRIGHTED MATERIALSFor example: How should employees handle the issue of works for hire with contractors and other non-employees who produce work for your organization?</p><p>When is it okay to distribute your organization’s own materials?ADVISE EMPLOYEES ON THE PROPER HANDLING OF INFRINGEMENTEncourage employees to do the right thing, and to follow specific procedures when they witness instances of copyright infringement within your organization. Also, identify procedures for how employees should handle infringement of your company’s own works that they discover online or in the marketplace.&nbsp;Once you have developed your policy, be sure to formally introduce these guidelines to employees and issue periodic reminders. You may also consider including copyright compliance in your new employee orientation as well as in trainingfor existing staff.<br></p>',\n 'conditions_copytright_policy' => '<header class=\"entry-header\" style=\"box-sizing: inherit; font-family: &quot;Myriad W01&quot;, myriad-pro, &quot;Myriad Pro&quot;, &quot;Lucida Grande&quot;, &quot;Lucida Sans Unicode&quot;, sans-serif; font-size: 18px;\"><h1 class=\"entry-title page-title\" style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 3.9rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: 39px;\"><span style=\"font-family: inherit; font-size: 2.6rem; font-style: inherit;\">Demonstrate respect for the copyrights of others and reduce the risk of infringement</span><br></h1></header><div class=\"entry-content\" style=\"box-sizing: inherit; border: 0px; font-family: &quot;Myriad W01&quot;, myriad-pro, &quot;Myriad Pro&quot;, &quot;Lucida Grande&quot;, &quot;Lucida Sans Unicode&quot;, sans-serif; font-size: 18px; margin: 1.5em 0px 0px; outline: 0px; padding: 0px; vertical-align: baseline;\"><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">Each day employees share copyrighted content with one another in emails, in sales presentations, in response to clients and business partners and in many other ways — it’s just the normal course of doing business. But in the rush to get things done, even well-intentioned employees may unknowingly share copyrighted material without permission to do so, exposing your organization to the risk of copyright infringement.</p><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">By developing a corporate copyright policy, you can provide clear guidelines to employees around the use of published materials and demonstrate your company’s commitment to respecting the copyrights of others. Here are six steps to help you craft a policy that meets your company’s needs and decreases your infringement risk.</p><h2 style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 2.6rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: normal;\">SOLICIT INPUT FROM&nbsp;COPYRIGHT EXPERTS…</h2><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">…in your organization who may have suggestions for issues to address in your policy. Outside of library/information services, legal and compliance staff,<br style=\"box-sizing: inherit;\">you might expand the group to include Marketing and Corporate Communications. For example, should you address the subject of clients’ or business partners’ requests for information? And what about guidance for Marketing and Sales teams on the use of images or video content in sales materials?</p><h2 style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 2.6rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: normal;\">PROVIDE INFORMATION ON COPYRIGHT LAW</h2><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">Your colleagues may lack even a basic understanding of copyright law and how it affects them. Provide foundational information on copyright law in your policy. Refer to the Copyright Basics section on copyright.com to get started. You can also make it easy for employees to get up-to-speed by including a link to the informative and fun Copyright Basics video from Copyright Clearance Center.</p><h2 style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 2.6rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: normal;\">ADDRESS GLOBAL COPYRIGHT ISSUES</h2><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">If your organization employs workers in multiple countries, provide information to ensure that employees share content responsibly both domestically and across borders. Copyright laws can vary from one country to the next; thus, it is vitally important that you acknowledge the differences in the laws no matter where your staff members are located.</p><h2 style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 2.6rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: normal;\">SPELL OUT COMPLIANCE PROCEDURES…</h2><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">…including whom employees should contact within your organization with copyright questions. Explain how employees can determine if they need copyright permission and how to obtain permissions from rightsholders (publishers and authors).</p><h2 style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 2.6rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: normal;\">INFORM EMPLOYEES ABOUT THE USE OF YOUR ORGANIZATION’S OWN COPYRIGHTED MATERIALS</h2><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">For example: How should employees handle the issue of works for hire with contractors and other non-employees who produce work for your organization? When is it okay to distribute your organization’s own materials?</p><h2 style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 2.6rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: normal;\">ADVISE EMPLOYEES ON THE PROPER HANDLING OF INFRINGEMENT</h2><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">Encourage employees to do the right thing, and to follow specific procedures when they witness instances of copyright infringement within your organization. Also, identify procedures for how employees should handle infringement of your company’s own works that they discover online or in the marketplace.&nbsp;Once you have developed your policy, be sure to formally introduce these guidelines to employees and issue periodic reminders. You may also consider including copyright compliance in your new employee orientation as well as in training<br style=\"box-sizing: inherit;\">for existing staff.</p></div>'\n\n\n ]);\n }", "public function get_delay_between_checks(): int {\n $period = get_config('realtimeplugin_phppoll', 'checkinterval');\n return max($period, 200);\n }", "function addWorkweekConfigOptions() {\n try {\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('effective_work_hours', 'globalization', 'i:40;')\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public static function register_config( $file ) {\n\t\tif ( ! is_file( $file ) ) {\n\t\t\tWP_CLI::error( 'Invalid configuration file.' );\n\t\t}\n\n\t\t$check_data = \\Mustangostang\\Spyc::YAMLLoad( file_get_contents( $file ) );\n\n\t\tif ( ! empty( $check_data['_']['inherit'] ) ) {\n\t\t\t$inherited = $check_data['_']['inherit'];\n\t\t\tif ( 'default' === $inherited ) {\n\t\t\t\t$inherited = dirname( dirname( __FILE__ ) ) . '/doctor.yml';\n\t\t\t}\n\t\t\t$inherited = self::absolutize( $inherited, dirname( $file ) );\n\t\t\tif ( isset( $check_data['_']['skipped_checks'] ) ) {\n\t\t\t\tself::get_instance()->skipped_checks[ $inherited ] = $check_data['_']['skipped_checks'];\n\t\t\t}\n\t\t\tself::register_config( $inherited );\n\t\t}\n\n\t\tunset( $check_data['_'] );\n\n\t\t$skipped_checks = isset( self::get_instance()->skipped_checks[ $file ] ) ? self::get_instance()->skipped_checks[ $file ] : array();\n\t\tforeach ( $check_data as $check_name => $check_args ) {\n\t\t\tif ( ! empty( $check_args['require'] ) ) {\n\t\t\t\t$required_file = self::absolutize( $check_args['require'], dirname( $file ) );\n\t\t\t\tif ( ! file_exists( $required_file ) ) {\n\t\t\t\t\t$required_file = basename( $required_file );\n\t\t\t\t\tWP_CLI::error( \"Required file '{$required_file}' doesn't exist (from '{$check_name}').\" );\n\t\t\t\t}\n\t\t\t\trequire_once $required_file;\n\t\t\t}\n\n\t\t\tif ( empty( $check_args['class'] ) && empty( $check_args['check'] ) ) {\n\t\t\t\tWP_CLI::error( \"Check '{$check_name}' is missing 'class' or 'check'. Verify check registration.\" );\n\t\t\t}\n\n\t\t\t$class = ! empty( $check_args['check'] ) ? 'runcommand\\Doctor\\Checks\\\\' . $check_args['check'] : $check_args['class'];\n\t\t\tif ( ! class_exists( $class ) ) {\n\t\t\t\tWP_CLI::error( \"Class '{$class}' for check '{$check_name}' doesn't exist. Verify check registration.\" );\n\t\t\t}\n\t\t\tif ( $skipped_checks && in_array( $check_name, $skipped_checks, true ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$options = ! empty( $check_args['options'] ) ? $check_args['options'] : array();\n\t\t\t$obj = new $class( $options );\n\t\t\tself::add_check( $check_name, $obj );\n\t\t}\n\t}", "public function create()\n {\n return view('config.create');\n }", "public function run()\n {\n DB::table('system_settings')->insert([\n \t\t\"percentage\"=>30,\n \"days\"=>3,\n \"daily_reserves\"=>2,\n \"expiry_hours\"=>4,\n \"start_help_time\"=>\"10:00:00\",\n \"end_help_time\"=>\"10:30:00\",\n \t\t\"count_down_hours\"=>4,\n \t\t\"is_active\"=>1,\n ]);\n DB::table('system_settings')->insert([\n \t\t\"percentage\"=>60,\n \"days\"=>3,\n \t\t\"daily_reserves\"=>2,\n \"expiry_hours\"=>4,\n \"start_help_time\"=>\"03:00:00\",\n \"end_help_time\"=>\"00:00:00\",\n \"count_down_hours\"=>4,\n \t\t\"is_active\"=>0,\n ]);\n DB::table('system_settings')->insert([\n \t\t\"percentage\"=>100,\n \"days\"=>12,\n \t\t\"daily_reserves\"=>2,\n \"expiry_hours\"=>4,\n \"start_help_time\"=>\"03:00:00\",\n \"end_help_time\"=>\"00:00:00\",\n \"count_down_hours\"=>4,\n \t\t\"is_active\"=>0,\n ]);\n }", "public function setChecks ( array $checks ) {\n\t\tif ( !is_array ( $checks ) || count ( $checks ) < 1 ) {\n\t\t\tthrow new \\InvalidArgumentException('Invalid checks');\n\t\t}\n\t\t$this->config['checks'] = $checks;\n\t}", "public function create()\n {\n\n $email_id = date('Y-m-d_H-i-s') . '.' . $this->template;\n $email_data = [\n 'title' => $this->template, \n 'data' => serialize($this->data), \n 'email' => $this->to,\n 'id' => $email_id,\n 'date' => date('Y-m-d H:i:s')\n ];\n\n Storage::putYAML('statamify/emails/' . $email_id, $email_data);\n\n }", "public function actionCreate()\n {\n $model = new WeichatPushSetTemplatePushList();\n\n $date_tiem = date(\"Y-m-d H:i:s\",time());\n $model->created_time = $date_tiem;\n $model->updated_time = $date_tiem;\n $model->status = 1;\n $model->create_user = Yii::$app->user->id;\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 }", "public function testTimeBeforePruningUsersCanBeConfigured(): void\n {\n Config::set('hydrofon.prune_models_after_days.users', 1);\n\n $user = User::factory()->create([\n 'created_at' => now()->subDay(),\n ]);\n\n $this->artisan('model:prune');\n\n $this->assertModelMissing($user);\n }", "function checkConfig(){\n global $ugenome_list_file; global $loadscript;global $dir; \n if(!file_exists(\"$ugenome_list_file\")){exec(\"$perl $loadscript $dir\");}\n $Diff = (time() - filectime(\"$ugenome_list_file\"))/60/60/24;\n if ($Diff > 21) exec(\"$perl $loadscript $dir\");//also check the last mod date < 21 days\n}", "public function safeUp()\n\t{\n $this->insert('options', array('name'=>'user_activity_period','value'=>30));\t \n\t}", "protected function setUpCheck()\n {\n $this->getOldTable()->createColumn('foo', Type::INTEGER);\n $this->getOldTable()->createColumn('bar', Type::INTEGER);\n $this->getOldTable()->createCheck('foo > 0', 'ck_foo');\n\n $this->createOldTable();\n }", "public function create()\n {\n $ostObj = $this->instantiateOSTSDKForV2Api();\n $usersService = $ostObj->services->users;\n $params = array();\n $response = $usersService->create($params)->wait();\n $this->isSuccessResponse($response);\n }", "public function run()\n {\n \n Config::create([\n 'title'=>'Công ty Cổ phần Dịch vụ Thiết bị đo và Hệ thống điều khiển',\n 'description'=>'Công ty Cổ phần Dịch vụ Thiết bị đo và Hệ thống điều khiển',\n 'keywords'=>'Công ty, Cổ phần, Dịch vụ, Thiết bị, đo lường, hệ thống điều khiển',\n 'facebook'=>'http://facebook.com',\n 'youtube'=>'https://youtube.com/',\n 'twitter'=>'https://twitter.com/',\n 'google'=>'https://google.com/',\n 'email'=>'[email protected]',\n 'phone'=>'+84 4 3540 2685',\n 'timeword' =>'08:00 - 18:00',\n 'office' =>'2',\n 'staff' =>'86',\n 'born' =>'2000',\n 'introleft' =>'Nhà phân phối chính thức của các nhà sản xuất thiết bị hàng đầu thế giới',\n 'introright' =>'Bạn cần được tư vấn để hiểu rõ hơn về dịch vụ và sản phẩm mình quan tâm?',\n 'copyright'=>'Copyright © 2016 VietCIS.,JSC. All rights reserved.',\n 'address' => 'dia chi',\n 'countdown'=>date('Y-m-d H:i:s'),\n ]);\n }", "private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = '';\r\n }\r\n $response = Configuration::updateValue($this->name . '_TITLE', $title);\r\n $response &= Configuration::updateValue($this->name . '_MAXITEM', 5);\r\n $response &= Configuration::updateValue($this->name . '_MINITEM', 2);\r\n $response &= Configuration::updateValue($this->name . '_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue($this->name . '_AUTOSCROLLDELAY', 5000);\r\n $response &= Configuration::updateValue($this->name . '_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue($this->name . '_PAGINATION', 0);\r\n $response &= Configuration::updateValue($this->name . '_NAVIGATION', 0);\r\n $response &= Configuration::updateValue($this->name . '_MANTITLE', 0);\r\n\r\n return $response;\r\n }", "function newConfigOptions() {\n $insert = $this->utility->db->execute(\"INSERT INTO \" . TABLE_PREFIX . \"config_options (name, module, type, value) VALUES \n ('last_frequently_activity', 'system', 'system', 'N;'),\n ('last_hourly_activity', 'system', 'system', 'N;'),\n ('last_daily_activity', 'system', 'system', 'N;')\n \");\n \t\n \t if(is_error($insert)) {\n \t return $insert->getMessage();\n \t } // if\n \t\n \treturn true;\n }", "public function store(CreateConfigRequest $request)\n {\n $input = $request->all();\n\n $config = $this->configRepository->create($input);\n\n Flash::success(Lang::get('validation.save_success'));\n\n return redirect(route('configs.index'));\n }", "public function store(CreateSystemConfigRequest $request)\n {\n $input = $request->all();\n\n $systemConfig = $this->systemConfigRepository->create($input);\n\n Flash::success('System Config saved successfully.');\n\n return redirect(route('systemConfigs.index'));\n }", "public function run()\n {\n DB::table('settings')->insert([\n 'currency' => 'Bs',\n 'time_jwt' => 1,\n 'last_user' => 1,\n 'is_deleted' => 1,\n 'created_at' => date('Y-m-d'),\n 'updated_at' => date('Y-m-d'),\n ]);\n\n factory(\\App\\Setting::class, 20)->create();\n }", "protected function preInstCheck()\n {\n // PHP Version\n if(!version_compare(PHP_VERSION,$this->prereqs['phpversion'],'>=')) {\n $this->errors[] = array(\n 'check' => 'PHP-Version',\n 'required' => $this->prereqs['phpversion'],\n 'actual' => PHP_VERSION\n );\n }\n if(!version_compare(PHP_VERSION,$this->suggested['phpversion'],\">=\")) {\n $this->warnings[] = array(\n 'check' => 'PHP-Version',\n 'suggestion' => ( isset($suggestion_text['phpversion'][$lang]) ? $suggestion_text['phpversion'][$lang] : 'en'),\n 'actual' => PHP_VERSION\n );\n }\n // PHP Settings\n foreach($this->prereqs['phpsettings'] as $key => $value) {\n $actual_setting = ($temp=ini_get($key)) ? $temp : 0;\n if($actual_setting !== $value) {\n $this->errors[] = array(\n 'check' => 'PHP-Settings -&gt; '.$key,\n 'required' => $value,\n 'actual' => $actual_setting,\n );\n }\n }\n // Check if AddDefaultCharset is set\n $sapi = php_sapi_name();\n if(strpos($sapi,'apache') !== false || strpos($sapi,'nsapi') !== false ) {\n \tflush();\n \t$apache_rheaders = apache_response_headers();\n \tforeach($apache_rheaders as $h) {\n \t\tif(strpos($h,'html; charset') !== false && (!strpos(strtolower($h),'utf-8')) ) {\n \t\t\tpreg_match( '/charset\\s*=\\s*([a-zA-Z0-9- _]+)/', $h, $match );\n \t\t\t$apache_charset = $match[1];\n \t\t\t$this->errors[] = array(\n 'check' => 'Apache-Settings',\n 'required' => 'unset',\n 'actual' => $apache_charset,\n );\n \t\t}\n \t}\n }\n // check installer\n $seen = array();\n foreach($this->installdata as $file) {\n if(file_exists(__dir__.'/../data/'.$file)) {\n $seen[] = $file;\n }\n }\n if(count($seen)!=count($this->installdata)) {\n $this->errors[] = array(\n 'check' => $this->t('Installation data'),\n 'required' => implode(\"<br />\",$this->installdata),\n 'actual' => implode(\"<br />\",$seen)\n );\n }\n\n }", "public function runConfig():Create {\n\n # Set config\n Config::setup();\n\n # Return instance\n return $this;\n\n }", "public function vxUserCreateCheck() {\n\t\t$rt = array();\n\t\t\n\t\t$rt['errors'] = 0;\n\t\t\n\t\t$rt['usr_email_value'] = '';\n\t\t/* usr_email_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (100 sbs)\n\t\t3 => mismatch\n\t\t4 => conflict\n\t\t999 => unspeicific */\n\t\t$rt['usr_email_error'] = 0;\n\t\t$rt['usr_email_error_msg'] = array(1 => '你忘记填写电子邮件地址了', 2 => '你的电子邮件地址太长了', 3 => '你的电子邮件地址看起来有问题', 4 => '这个电子邮件地址已经注册过了');\n\t\t\n\t\t$rt['usr_nick_value'] = '';\n\t\t/* usr_nick_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (20 mbs)\n\t\t3 => invalid characters\n\t\t4 => conflict\n\t\t999 => unspecific */\n\t\t$rt['usr_nick_error'] = 0;\n\t\t$rt['usr_nick_error_msg'] = array(1 => '你忘记填写昵称了', 2 => '你的昵称太长了,精简一下吧', 3 => '你的昵称中包含了不被允许的字符', 4 => '你填写的这个昵称被别人用了');\n\t\t\n\t\t$rt['usr_password_value'] = '';\n\t\t$rt['usr_confirm_value'] = '';\n\t\t/* usr_password_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (32 sbs)\n\t\t3 => invalid characters\n\t\t4 => not identical\n\t\t999 => unspecific */\n\t\t$rt['usr_password_error'] = 0;\n\t\t$rt['usr_password_error_msg'] = array(1 => '你忘记填写密码了', 2 => '你的这个密码太长了,缩减一下吧', 3 => '你填写的密码中包含了不被允许的字符', 4 => '你所填写的两个密码不匹配');\n\t\t/* usr_confirm_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (32 sbs)\n\t\t3 => invalid characters(should not reach here in final rendering)\n\t\t4 => not identical\n\t\t999 => unspecific */\n\t\t$rt['usr_confirm_error'] = 0;\n\t\t$rt['usr_confirm_error_msg'] = array(1 => '你忘记填写密码确认了', 2 => '你的这个密码确认太长了,缩减一下吧', 3 => '你填写的密码中包含了不被允许的字符', 4 => '你所填写的两个密码不匹配');\n\t\t\n\t\t$rt['c_value'] = 0;\n\t\t$rt['c_error'] = 0;\n\t\t$rt['c_error_msg'] = array(1 => '你忘记填写确认码了', 4 => '你填写的确认码是错的');\n\t\t\n\t\t/* check: c */\n\t\tif (isset($_POST['c'])) {\n\t\t\t$rt['c_value'] = strtolower(trim($_POST['c']));\n\t\t\tif (strlen($rt['c_value']) > 0) {\n\t\t\t\tif ($rt['c_value'] != strtolower($_SESSION['c'])) {\n\t\t\t\t\t$rt['c_error'] = 4;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$rt['c_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['c_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t\t\n\t\t}\n\t\t\n\t\t/* check: usr_email */\n\t\t\n\t\tif (isset($_POST['usr_email'])) {\n\t\t\t$rt['usr_email_value'] = strtolower(make_single_safe($_POST['usr_email']));\n\t\t\tif (strlen($rt['usr_email_value']) == 0) {\n\t\t\t\t$rt['usr_email_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t} else {\n\t\t\t\tif (strlen($rt['usr_email_value']) > 100) {\n\t\t\t\t\t$rt['usr_email_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t} else {\n\t\t\t\t\tif (!is_valid_email($rt['usr_email_value'])) {\n\t\t\t\t\t\t$rt['usr_email_error'] = 3;\n\t\t\t\t\t\t$rt['errors']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_email_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\t\n\t\tif ($rt['usr_email_error'] == 0) {\n\t\t\t$sql = \"SELECT usr_email FROM babel_user WHERE usr_email = '\" . $rt['usr_email_value'] . \"'\";\n\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\tif (mysql_num_rows($rs) > 0) {\n\t\t\t\t$rt['usr_email_error'] = 4;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t\tmysql_free_result($rs);\n\t\t}\n\t\t\n\t\t/* check: usr_nick */\n\t\t\n\t\tif (isset($_POST['usr_nick'])) {\n\t\t\t$rt['usr_nick_value'] = make_single_safe($_POST['usr_nick']);\n\t\t\tif (strlen($rt['usr_nick_value']) == 0) {\n\t\t\t\t$rt['usr_nick_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t} else {\n\t\t\t\tif (mb_strlen($rt['usr_nick_value']) > 20) {\n\t\t\t\t\t$rt['usr_nick_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t} else {\n\t\t\t\t\tif (!is_valid_nick($rt['usr_nick_value'])) {\n\t\t\t\t\t\t$rt['usr_nick_error'] = 3;\n\t\t\t\t\t\t$rt['errors']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_nick_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif ($rt['usr_nick_error'] == 0) {\n\t\t\t$sql = \"SELECT usr_nick FROM babel_user WHERE usr_nick = '\" . $rt['usr_nick_value'] . \"'\";\n\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\tif (mysql_num_rows($rs) > 0) {\n\t\t\t\t$rt['usr_nick_error'] = 4;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t\tmysql_free_result($rs);\n\t\t}\n\t\t\n\t\t/* check: usr_gender */\n\t\tif (isset($_POST['usr_gender'])) {\n\t\t\t$rt['usr_gender_value'] = intval($_POST['usr_gender']);\n\t\t\tif (!in_array($rt['usr_gender_value'], array(0,1,2,5,6,9))) {\n\t\t\t\t$rt['usr_gender_value'] = 9;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_gender_value'] = 9;\n\t\t}\n\t\t\n\t\t/* check: usr_password and usr_confirm */\n\t\t\n\t\tif (isset($_POST['usr_password'])) {\n\t\t\t$rt['usr_password_value'] = $_POST['usr_password'];\n\t\t\tif (strlen($rt['usr_password_value']) == 0) {\n\t\t\t\t$rt['usr_password_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_password_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif (isset($_POST['usr_confirm'])) {\n\t\t\t$rt['usr_confirm_value'] = $_POST['usr_confirm'];\n\t\t\tif (strlen($rt['usr_confirm_value']) == 0) {\n\t\t\t\t$rt['usr_confirm_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_confirm_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_error'] == 0) && ($rt['usr_confirm_error'] == 0)) {\n\t\t\tif (strlen($rt['usr_password_value']) > 32) {\n\t\t\t\t$rt['usr_password_error'] = 2;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t\tif (strlen($rt['usr_confirm_value']) > 32) {\n\t\t\t\t$rt['usr_confirm_error'] = 2;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_error'] == 0) && ($rt['usr_confirm_error'] == 0)) {\n\t\t\tif ($rt['usr_password_value'] != $rt['usr_confirm_value']) {\n\t\t\t\t$rt['usr_confirm_error'] = 4;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $rt;\n\t}", "public function initialize(bool $reCreate = false) {\n $cfgNs = self::CONFIG_NS;\n\n if ($reCreate) {\n $cFile = new File(self::CONFIG_FILE_PATH);\n $cFile->remove();\n $this->initDefaultConfig();\n }\n\n if (!class_exists($cfgNs)) {\n $this->writeAppConfig();\n } else {\n //$cfg is of type [APP_DIR]\\config\\AppConfig\n $cfg = new $cfgNs();\n $this->configVars = [\n 'smtp-connections' => $cfg->getAccounts(),\n 'database-connections' => $cfg->getDBConnections(),\n 'scheduler-password' => $cfg->getSchedulerPassword(),\n 'version-info' => [\n 'version' => $cfg->getVersion(),\n 'version-type' => $cfg->getVersionType(),\n 'release-date' => $cfg->getReleaseDate()\n ],\n 'env-vars' => $cfg->getConstants(),\n 'site' => [\n 'base-url' => $cfg->getBaseURL(),\n 'primary-lang' => $cfg->getPrimaryLanguage(),\n 'title-sep' => $cfg->getTitleSep(),\n 'home-page' => $cfg->getHomePage(),\n 'base-theme' => $cfg->getBaseThemeName(),\n 'descriptions' => [\n 'AR' => $cfg->getDescription('AR'),\n 'EN' => $cfg->getDescription('EN')\n ],\n 'website-names' => [\n 'AR' => $cfg->getWebsiteName('AR'),\n 'EN' => $cfg->getWebsiteName('EN')\n ],\n 'titles' => [\n 'AR' => $cfg->getTitle('AR'),\n 'EN' => $cfg->getTitle('EN')\n ],\n ]\n ];\n }\n }", "public function postcreate(Request $request)\n {\n \t$attendance = Attendance::whereEmployeeId(Auth::user()->id)->whereCheckOut(null)->first();\n\n \t$now \t\t\t= Carbon::now();\n\n\t $now->toTimeString();\n\n \tif($attendance)\n \t{\n \t\t$attendance->update([\n \t\t\t'check_out' \t\t=> $now,\n \t\t]);\n\n \t\t$message = 'You have checked out successfully!';\n \t} else {\n \t\t$user \t\t\t= Auth::user()->id; \n\n\t \t$checkin_time = Carbon::today();\n $checkin_time->addHours(8);\n\n\t \tif(Carbon::parse($checkin_time)->lt($now))\n\t \t{\n\t \t\t$lateness_status = 1;\n\t \t} else {\n\t \t\t$lateness_status = 0;\n\t \t}\n\t \t\n\t \tAttendance::create([\n\t \t\t'employee_id' \t => $user,\n\t \t\t'check_in' \t\t\t=> $now, \n\t \t\t'lateness_status' \t=> $lateness_status,\n\t \t]);\n\n\t \t$message = 'You have checked in successfully!';\n \t} \n\n \treturn redirect('/attendances/view/')->with('success', $message);\n }", "public function run()\n {\n // Сотрудник\n User::create([\n 'name' => config('test.employee.name'),\n 'email' => config('test.employee.email'),\n 'email_verified_at' => config('test.employee.email_verified_at'),\n 'password' => config('test.employee.password'),\n ]);\n\n // Рандомные сотрудники\n factory(App\\User::class, 7)->create();\n }", "public function create(array $values = array()) {\n // Add values that are specific to our timetracking\n $values += array( \n 'timetracking_id' => '',\n 'is_new' => true,\n 'type' => 'timetracking', //allways fixed because we have no bundles \n 'created' => time(),\n 'changed' => time(),\n 'time_start' => 0,\n 'time_end' => 0,\n 'duration' => 0,\n 'description' => '',\n 'subject_id' => 0,\n 'uid' => 0,\n );\n \n $timetracking = parent::create($values);\n return $timetracking;\n }", "public function create()\n {\n //Valida se usuário possui permissão para acessar esta opção\n if(App\\Models\\User::getPermission('configs_add',Auth::user()->user_type_code)){\n\n return view('configs.create');\n\n }else{\n //Sem permissão\n Flash::error(Lang::get('validation.permission'));\n return redirect(route('configs.index'));\n }\n }", "public function create()\n\t{ \n\t\t# Return if just the countoff is needed\n\t\tif ($this->countoff<2) return;\n\t\t\n\t\t# Add a note on and note off for each beat in the click track\n\t\tfor($i=0; $i<$this->beatsTotal; $i++) { \n\t\t\t$vol = (($i%$this->timeSig)==0) ? 127 : 70;\n\t\t\t$this->addEvent(0,153,37,$vol);\n\t\t\t$this->addEvent($this->ticksPerBeat,153,37,0);\n\t\t}\n\t}", "public function __construct() {\n $this->_configPassword = $this->parseConfig(2);\n $this->_configClass = $this->parseConfig(5);\n $this->_time = time();\n\t}", "public function setCreating()\n {\n $this->update(['status' => static::STATUS_CREATING]);\n }", "public function testComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.aem.upgrade.prechecks.tasks.impl.ConsistencyCheckTaskImpl';\n\n $crawler = $client->request('POST', $path);\n }", "public function create()\n\t{\n\t\t//\n\t\tif(!$this->permit->crud_configs_create)\n return redirect('accessDenied');\n\t\treturn view(\"configs.create\");\n\t}", "public static function fromArray(array $data): Configuration\n {\n $ConfigurationObject = new Configuration();\n\n if(isset($data['openblu']))\n {\n $ConfigurationObject->OpenBlu = OpenBlu::fromArray($data['openblu']);\n }\n\n if(isset($data['balance']))\n {\n $ConfigurationObject->Balance = (float)$data['balance'];\n }\n\n return $ConfigurationObject;\n }", "public function run(){\n \tforeach (range(0, 30) as $value) {\n\t DB::table('configs')->insert([\n\t 'uid' => 'key-'.$value,\n\t 'value' => $value,\n\t ]);\n \t}\n }", "public function up(Kohana_Database $db)\n\t{\n\t\t$db->query(NULL, 'ALTER TABLE `forum_categories` ADD `topics_count` INT(10) UNSIGNED NOT NULL AFTER `created`;');\n\t}", "public function setCheck ( $name, $value ) {\n\t\tif ( empty ( $name ) ) {\n\t\t\tthrow new \\InvalidArgumentException(sprintf('The field \"%s\" is invalid.', $field) );\n\t\t}\n\t\t$this->config['checks'][$name] = $value;\n\t}", "protected function setupConfig()\n\t{\n\t\t$this->config = OLPBlackbox_Config::getInstance();\n\t\t$site_config = SiteConfig::getInstance()->asObject();\n\n\t\t//Add site config data to the OLPBlackbox_Config\n\t\tforeach ($site_config as $key => $value)\n\t\t{\n\t\t\t$this->config->$key = $value;\n\t\t}\n\n\t\t$this->config->blackbox_mode = $this->mode;\n\t\t$this->config->debug = new OLPBlackbox_DebugConf();\n\t\t$this->config->title_loan = $this->config_data->title_loan;\n\t\t$this->config->olp_db = $this->config_data->sql;\n\t\t$this->config->event_log = $this->config_data->log;\n\t\t$this->config->session = $this->config_data->session;\n\t\t$this->config->allowSnapshot = TRUE;\n\t\t$this->config->allow_datax_rework = $this->config_data->config->enable_rework;\n\t\t$this->config->do_datax_rework = !empty($_SESSION['do_datax_rework']);\n\t\t$this->config->return_visitor = !empty($_SESSION['return_visitor']);\n\t\t$this->config->track_key = $_SESSION['statpro']['track_key'];\n\t\t$this->config->space_key = $_SESSION['statpro']['space_key'];\n\t\t$this->config->hit_stats_bb = defined('STAT_SYSTEM_2') ? STAT_SYSTEM_2 : FALSE;\n\t\t$this->config->hit_stats_site = TRUE;\n\n\t\t// whether we're on the enterprise site; the actual\n\t\t// enterprise company is available via bb_force_winner?\n\t\t$this->config->is_enterprise = $this->config_data->is_enterprise;\n\t\t$this->config->react_company = $this->getReactCompany();\n\n\t\t$this->config->applog = OLP_Applog_Singleton::Get_Instance(\n\t\t\t'blackbox',\n\t\t\t1000000000,\n\t\t\t20,\n\t\t\tNULL,\n\t\t\tFALSE,\n\t\t\t002\n\t\t);\n\t}" ]
[ "0.7086295", "0.66852397", "0.5832289", "0.58181393", "0.5645919", "0.5617374", "0.55739444", "0.53473675", "0.51100296", "0.5091077", "0.49437207", "0.47102794", "0.46942794", "0.45402044", "0.44555312", "0.44000417", "0.43998283", "0.4356518", "0.43465766", "0.43297982", "0.42961174", "0.42895743", "0.42807662", "0.42666212", "0.42645094", "0.42463478", "0.4237371", "0.4225576", "0.42216444", "0.42121655", "0.4211638", "0.4210855", "0.42033026", "0.41963193", "0.4190039", "0.41854003", "0.41837573", "0.4171433", "0.41710886", "0.4124325", "0.41188604", "0.41028145", "0.41006547", "0.40974623", "0.40771905", "0.40589848", "0.40577096", "0.40539536", "0.4048206", "0.4039039", "0.40260884", "0.40117544", "0.4007773", "0.40001553", "0.39886343", "0.39853027", "0.3943187", "0.39361277", "0.3935054", "0.39348543", "0.39339924", "0.39198506", "0.3918118", "0.38941127", "0.38842857", "0.38811663", "0.38699153", "0.38682544", "0.38630003", "0.38564187", "0.3850456", "0.38456792", "0.38453498", "0.38421056", "0.38416848", "0.38311145", "0.38285762", "0.38277438", "0.38224086", "0.3822383", "0.381839", "0.38131058", "0.3811959", "0.3809777", "0.38027874", "0.38008097", "0.38000277", "0.37950957", "0.37936312", "0.37934533", "0.378937", "0.37881076", "0.37841323", "0.3783908", "0.37836412", "0.37740517", "0.37727004", "0.37716788", "0.37681043", "0.37650472" ]
0.80216384
0
Deletes an Uptime check configuration. Note that this method will fail if the Uptime check configuration is referenced by an alert policy or other dependent configs that would be rendered invalid by the deletion. (uptimeCheckConfigs.delete)
public function delete($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('delete', [$params], MonitoringEmpty::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function DeleteUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\DeleteUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "protected function deleteConfiguration(){\n Configuration::deleteByName($this->name.'_settings');\n }", "public function create($parent, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], UptimeCheckConfig::class);\n }", "public function UpdateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\UpdateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "public function patch($name, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('patch', [$params], UptimeCheckConfig::class);\n }", "public function listProjectsUptimeCheckConfigs($parent, $optParams = [])\n {\n $params = ['parent' => $parent];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class);\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], UptimeCheckConfig::class);\n }", "abstract protected function deleteConfiguration($name);", "public function deleteSetupConfig($request)\n {\n $runtime = new RuntimeOptions([]);\n $headers = [];\n\n return $this->deleteSetupConfigEx($request, $headers, $runtime);\n }", "public function deleteObsoleteConfigs();", "public function delete_config($data)\n {\n\n $this->db->where('id', $data);\n $this->db->delete('configuration');\n return true;\n }", "public function deleteConfig() {\n\t\tif(!$this->_configId) throw new Exception(lang('error_126'));\n\t\tif(!$this->db->query(\"DELETE FROM \"._WE_CREDITSYS_.\" WHERE config_id = ?\", array($this->_configId))) {\n\t\t\tthrow new Exception(lang('error_142'));\n\t\t}\n\t}", "public function deleteConfigs()\n {\n foreach ($this->fields_form as $k => $f) {\n foreach ($f['form']['input'] as $i => $input) {\n if (isset($input['ignore']) && $input['ignore'] == true) {\n continue;\n }\n Configuration::deleteByName($input['name']);\n }\n }\n\n $this->deleteCustomConfigs();\n\n return true;\n }", "public function testDeleteWebhookConfig()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $sw->deleteWebhookConfig();\n\n $this->checkDeleteRequests($container, ['/v4/webhooks/configure']);\n }", "public function CreateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\CreateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function DeleteUserConfiguration($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }", "private function _deleteConfigs()\r\n {\r\n $response = Configuration::deleteByName('FIELD_FEATUREDPSL_TITLE');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_VERTICAL');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_COLUMNITEM');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_MAXITEM');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_MEDIUMITEM');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_MINITEM');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_AUTOSCROLL');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_PAGINATION');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_NAVIGATION');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_AUTOSCROLLDELAY');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_PAUSEONHOVER');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_NBR');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_CAT');\r\n\r\n return $response;\r\n }", "public function deleteSetupConfigEx($request, $headers, $runtime)\n {\n Utils::validateModel($request);\n\n return DeleteSetupConfigResponse::fromMap($this->doRequest('1.0', 'antcloud.monitor.setup.config.delete', 'HTTPS', 'POST', '/gateway.do', Tea::merge($request), $headers, $runtime));\n }", "public function destroy(AppSettings $appSettings)\n {\n //\n }", "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "private function cleanupExerciseConfigs(DateTime $limit): int {\n $usedConfigs = [];\n\n /** @var Exercise $exercise */\n foreach ($this->exercises->findAllAndIReallyMeanAllOkay() as $exercise) {\n $usedConfigs[] = $exercise->getExerciseConfig()->getId();\n }\n\n /** @var Assignment $assignment */\n foreach ($this->assignments->findAllAndIReallyMeanAllOkay() as $assignment) {\n $usedConfigs[] = $assignment->getExerciseConfig()->getId();\n }\n\n $deleteQuery = $this->entityManager->createQuery('\n DELETE FROM App\\Model\\Entity\\ExerciseConfig c\n WHERE c.createdAt <= :date AND c.id NOT IN (:ids)\n ');\n\n $deleteQuery->setParameter(\":date\", $limit);\n $deleteQuery->setParameter(\"ids\", $usedConfigs, Connection::PARAM_STR_ARRAY);\n return $deleteQuery->execute();\n }", "function cfg_del(...$args)\n{\n\tglobal $CONFIG;\n\tswitch( count($args) )\n\t{\n\t\tcase 1: unset($CONFIG[$args[0]]); break;\n\t\tcase 2: unset($CONFIG[$args[0]][$args[1]]); break;\n\t\tcase 3: unset($CONFIG[$args[0]][$args[1]][$args[2]]); break;\n\t\tcase 4: unset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]]); break;\n\t\tcase 5: unset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]]); break;\n\t\tcase 6: unset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]]); break;\n\t\tdefault: WdfException::Raise(\"Illegal argument count: \".count($args));\n\t}\n}", "protected function deleteConfiguration($name)\n {\n // TODO: Implement deleteConfiguration() method.\n }", "function deleteSettings() {\n\t\tdelete_option('wassup_settings');\n\t}", "public function cleanUpOldRunningConfigurations() {}", "public function deleteSettings()\n {\n $master = new DynaGridStore([\n 'id' => $this->dynaGridId,\n 'category' => DynaGridStore::STORE_GRID,\n 'storage' => $this->storage,\n 'userSpecific' => $this->userSpecific\n ]);\n $config = $this->storage == DynaGrid::TYPE_DB ? null : $master->fetch();\n $master->deleteConfig($this->category, $config);\n $this->store->delete();\n }", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "private function _deleteConfigs()\r\n {\r\n $response = Configuration::deleteByName($this->name . '_TITLE');\r\n $response &= Configuration::deleteByName($this->name . '_MAXITEM');\r\n $response &= Configuration::deleteByName($this->name . '_MINITEM');\r\n $response &= Configuration::deleteByName($this->name . '_AUTOSCROLL');\r\n $response &= Configuration::deleteByName($this->name . '_PAGINATION');\r\n $response &= Configuration::deleteByName($this->name . '_NAVIGATION');\r\n $response &= Configuration::deleteByName($this->name . '_AUTOSCROLLDELAY');\r\n $response &= Configuration::deleteByName($this->name . '_PAUSEONHOVER');\r\n $response &= Configuration::deleteByName($this->name . '_MANTITLE');\r\n\r\n return $response;\r\n }", "public function DeleteMuteConfig(\\Google\\Cloud\\SecurityCenter\\V1\\DeleteMuteConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/DeleteMuteConfig',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function delete(ConfigItem $configItem)\n {\n $this->deleteMultiple([$configItem]);\n }", "public static function removeAllConfig()\n {\n foreach (self::CONFIG as $configKey) {\n Configuration::deleteByName($configKey);\n }\n }", "private function cleanupEnvironmentConfigs(DateTime $limit): int {\n $usedConfigs = [];\n\n /** @var Exercise $exercise */\n foreach ($this->exercises->findAllAndIReallyMeanAllOkay() as $exercise) {\n foreach ($exercise->getExerciseEnvironmentConfigs() as $config) {\n $usedConfigs[] = $config->getId();\n }\n }\n\n /** @var Assignment $assignment */\n foreach ($this->assignments->findAllAndIReallyMeanAllOkay() as $assignment) {\n foreach ($assignment->getExerciseEnvironmentConfigs() as $config) {\n $usedConfigs[] = $config->getId();\n }\n }\n\n $deleteQuery = $this->entityManager->createQuery('\n DELETE FROM App\\Model\\Entity\\ExerciseEnvironmentConfig c\n WHERE c.createdAt <= :date AND c.id NOT IN (:ids)\n ');\n\n $deleteQuery->setParameter(\":date\", $limit);\n $deleteQuery->setParameter(\"ids\", $usedConfigs, Connection::PARAM_STR_ARRAY);\n return $deleteQuery->execute();\n }", "private function _deleteConfigs()\r\n {\r\n $response = Configuration::deleteByName('FIELD_SPECIALPLS_TITLE');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_VERTICAL');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_COLUMNITEM');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_MAXITEM');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_MEDIUMITEM');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_MINITEM');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_AUTOSCROLL');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_PAGINATION');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_NAVIGATION');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_AUTOSCROLLDELAY');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_PAUSEONHOVER');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_NBR');\r\n\r\n return $response;\r\n }", "public function postDeleteKeyValueGroupConfig(Object_KeyValue_GroupConfig $config)\n {\n\n }", "function delete_configuracion($sql)\n {\n return $this->db->delete('configuracion',array(''=>$sql));\n }", "public function destroy(Config $config)\n {\n $config->delete();\n\n return redirect()->route('config.index')\n ->with('success','config deleted successfully');\n }", "public static function delete($name)\n {\n unset(self::$settings[$name]);\n\n DB::table('settings')->where('name', $name)->delete();\n }", "public function destroy($id)\n {\n $post = $this->config->findOrFail($id);\n\n $post->delete();\n\n return redirect(route('backend.config.index'))->with('status', 'Config has been deleted.');\n }", "public function testComDayCqWcmCoreImplVersionPurgeTask()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.wcm.core.impl.VersionPurgeTask';\n\n $crawler = $client->request('POST', $path);\n }", "public function remove_all_check_points() {\n $path = new tool_mhacker_tc_path($this);\n if (!$path->is_writeable()) {\n return;\n }\n $path->remove_check_points();\n }", "public function remove() {\n $f = new File(self::CONFIG_FILE_PATH);\n $f->remove();\n }", "public function deleteConfig($key) {\n\t $config = Mage::getConfig();\n\t $config->deleteConfig($key);\n\t}", "public static function deactivation() {\n\t\t\tmonstroid_dashboard_updater()->remove_shedules();\n\t\t\tmonstroid_dashboard_updater()->clear_update_data();\n\t\t\tdelete_option( 'monstroid_dashboard_disable_auto_updates' );\n\t\t}", "private function deleteSettings()\n\t{\n\t}", "function remove() {\n global $db;\n $db->Execute(\"delete from \" . TABLE_CONFIGURATION . \" where configuration_key in ('\" . implode(\"', '\", $this->keys()) . \"')\");\n }", "public function destroy(PricingCheck $pricingCheck)\n {\n //\n }", "public function destroy($id)\n {\n \t$ok=DB::table('config')->where('id',$id)->get()->toArray()[0]->status;\n\t\tif(!$ok){\n\t $res=DB::table('config')->delete($id);\n\t\t\tif($res){\n\t\t\t\treturn 1;\n\t\t\t}else{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t}", "public function delete()\n {\n delete_option($this->optionName);\n }", "function remove() {\r\n global $db;\r\n $db->Execute(\"delete from \" . TABLE_CONFIGURATION . \" where configuration_key in ('\" . implode(\"', '\", $this->keys()) . \"')\");\r\n }", "public function uninstall()\n {\n if (!parent::uninstall())\n {\n return false;\n }\n\n return $this->deleteConfigValues(array(\n 'PAYNETEASY_END_POINT',\n 'PAYNETEASY_LOGIN',\n 'PAYNETEASY_SIGNING_KEY',\n 'PAYNETEASY_SANDBOX_GATEWAY',\n 'PAYNETEASY_PRODUCTION_GATEWAY',\n 'PAYNETEASY_GATEWAY_MODE'\n ));\n }", "public function DeleteNotificationConfig(\\Google\\Cloud\\SecurityCenter\\V1\\DeleteNotificationConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/DeleteNotificationConfig',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function cleanUp()\n {\n $this->autoScalingService->disableMetricsCollection($this->autoScalingGroupName);\n\n /**\n * Step 12: DeleteAutoScalingGroup: to delete the group you must stop all instances.\n * - UpdateAutoScalingGroup with MinSize=0\n * - TerminateInstanceInAutoScalingGroup for each instance,\n * specify ShouldDecrementDesiredCapacity=True. Wait for instances to stop.\n * - Now you can delete the group.\n */\n $this->autoScalingService->updateAutoScalingGroup($this->autoScalingGroupName, ['MinSize' => 0]);\n $this->autoScalingService->terminateAllInstancesInAutoScalingGroup($this->autoScalingGroupName);\n $this->autoScalingService->waitUntilGroupInService([$this->autoScalingGroupName]);\n $this->autoScalingService->deleteAutoScalingGroup($this->autoScalingGroupName);\n\n /**\n * Step 13: Delete launch template.\n */\n $this->ec2Client->deleteLaunchTemplate([\n 'LaunchTemplateName' => $this->templateName,\n ]);\n }", "static function removePaperConfig($PaperConfig = null)\r\n {\r\n if ($PaperConfig === null)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n $tablePaperConfig = DatabaseManager::getNameTable('TABLE_PAPER_CONFIG');\r\n $id = $PaperConfig->getId();\r\n\r\n $query = \"DELETE FROM $tablePaperConfig\r\n WHERE $tablePaperConfig.id = $id\";\r\n\r\n return DatabaseManager::singleAffectedRow($query);\r\n }\r\n }", "public function deleteContentValidationConfig(RestServiceEntity $entity)\n {\n $controllerService = $entity->controllerServiceName;\n $key = ['api-tools-content-validation', $controllerService];\n $this->configResource->deleteKey($key);\n }", "public function delete(array $options = [])\n {\n $this->connection->deleteMetric($options + [\n 'metricName' => $this->formattedName\n ]);\n }", "public function destroy($id)\n\t{\n\t\t//\n\t\tif(!$this->permit->crud_configs_delete)\n return redirect('accessDenied');\n\t\tCepConfigs::where('conf_id',$id)->delete();\n\t\treturn redirect('configs');\n\t}", "public function deleted ( ScoreboardTeamConfig $config )\n {\n Cache::tags( [ 'Scoreboard', $config->event_instance->name ] )->flush();\n }", "public function down()\n {\n // Remove config entries.\n foreach (words('CLIENT_ID CLIENT_SECRET AUTHORIZATION_CODE ACCESS_TOKEN CALLBACK_URL') as $entry) {\n Config::get()->delete('VIMEO_' . $entry);\n }\n }", "public function destroy($id)\n\t{\n\t\t$configuration = Configuration::findOrFail($id);\n\t\t$configuration->delete();\n\t\tsession()->flash('success_message', 'Configuration deleted successfully.');\n\t\treturn redirect()->action('UserController@show', ['user_id' => $configuration->user->id]);\n\t}", "public function destroy($id)\n {\n Config::destroy($id);\n return redirect('configs')->with('success', 'Config Deleted Successfully');\n }", "public function destroy(Config $config)\n {\n $config->delete();\n \n return response()->json('La configuración se eliminó exitosamente');\n }", "public function delete() {\n\n\t\tif (is_multisite()) {\n\t\t\tdelete_site_option('wpo_cache_config');\n\t\t} else {\n\t\t\tdelete_option('wpo_cache_config');\n\t\t}\n\t\t\n\t\tif (!WPO_Page_Cache::delete(WPO_CACHE_CONFIG_DIR)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function remove()\n {\n // MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID - Keep this on removing for old installation\n xtc_db_query(\n \"delete from \" . TABLE_CONFIGURATION\n . \" where configuration_key in ('MODULE_PAYMENT_SHOPGATE_STATUS', 'MODULE_PAYMENT_SHOPGATE_ALLOWED', 'MODULE_PAYMENT_SHOPGATE_SORT_ORDER', 'MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID')\"\n );\n }", "function remove()\t{\r\n\t\ttep_db_query(\"delete from IXcore.\" . TABLE_CONFIGURATION . \" where configuration_key in ('\" . implode(\"', '\", $this->keys()) . \"')\");\r\n\t}", "public function clearConfig()\n {\n $this->_xcoobee->getStore()->clearStore();\n }", "function deleteconf($update_id){\n\t\tif(!is_numeric($update_id)){\n\t\t\tredirect('site_security/not_allowed');\n\t\t}\n\t\t\n\t\t$this->load->module('site_security');\n\t\t$this->site_security->_make_sure_is_admin();\n\t\t//$this->load->view('upload_form', $error)\n $data['update_id'] = $update_id;\n $data['flash'] = $this->session->flashdata('item');\n\n\n\t\t$entity_name = ucfirst($this->_get_type_sliders_name('sungular'));\n\t $data['headline'] = 'Delete '.$entity_name;\n //$data['stor_items'] = 'stor_items';\n\t\t$data['view_file'] = 'deleteconf';\n\t\t$this->load->module('templates');\n\t\t$this->templates->admin($data);\n\t}", "private function deleteConfigurationEntry($id)\n\t{\n\t\treturn $this->engine->delete([\n\t\t\t'index' => $this->configurationIndexName,\n\t\t\t'type' => static::TYPE_CONFIGURATION,\n\t\t\t'id' => $id\n\t\t]);\n\t}", "public static function deleteByName($key)\n\t{\n\t \tif (!Validate::isConfigName($key))\n\t\t\treturn false;\n\n\t\tif (Db::getInstance()->exec('DELETE FROM `'.DB_PREFIX.'configuration` WHERE `name` = \\''.pSQL($key).'\\''))\n\t\t{\n\t\t\tunset(self::$_CONF[$key]);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function destroy($id)\n {\n //Valida se usuário possui permissão para acessar esta opção\n if(App\\Models\\User::getPermission('configs_remove',Auth::user()->user_type_code)){\n \n $config = $this->configRepository->findWithoutFail($id);\n\n if (empty($config)) {\n Flash::error(Lang::get('validation.not_found'));\n\n return redirect(route('configs.index'));\n }\n\n $this->configRepository->delete($id);\n\n //Grava log\n $descricao = 'Excluiu Config ID: '.$id;\n $log = App\\Models\\Log::wlog('configs_remove', $descricao);\n\n\n Flash::success(Lang::get('validation.delete_success'));\n return array(0,Lang::get('validation.delete_success'));\n\n }else{\n //Sem permissão\n Flash::error(Lang::get('validation.permission'));\n return array(1,Lang::get('validation.permission'));\n } \n }", "private function removeOldConfigurationKeys()\n {\n foreach ($this->oldConfigurationKeys as $configuration) {\n Configuration::deleteByName($configuration);\n }\n }", "public function inspection_checklist_delete(User $user, InspectionChecklist $inspectionchecklist)\n {\n return $this->permit($user,'inspection_checklist_delete');\n }", "public function tearDown()\n {\n if ($this->configData) {\n $this->objectManager->create(\n 'Magento\\Config\\Test\\TestStep\\SetupConfigurationStep',\n ['configData' => $this->configData, 'rollback' => true]\n )->run();\n }\n }", "public function removeAlertmanagerConfig()\n {\n $config = $this->getAlertingConfigs();\n $config['alertmanager_config'] = null;\n\n $this->op->request('POST', '/api/prom/configs/alertmanager', [\n 'headers' => [\n 'X-Scope-OrgID' => $this->consumerId,\n ],\n 'json' => $config,\n ]);\n }", "function remove() {\r\n global $db;\r\n $db->Execute(\"delete from \" . TABLE_CONFIGURATION . \" where configuration_key LIKE 'MODULE\\_PAYMENT\\_NOCHEX%'\");\r\n $this->notify('NOTIFY_PAYMENT_NOCHEX_UNINSTALLED');\r\n }", "function remove(){\n tep_db_query(\"delete from \" . TABLE_CONFIGURATION . \" where configuration_key in ('\" . implode(\"', '\", $this->keys()) . \"')\");\n }", "public function delete( $args ) {\n\t\tforeach ( $args as $arg ) {\n\t\t\tif ( ! delete_option( $arg ) ) {\n\t\t\t\tWP_CLI::warning( \"Could not delete '{$arg}' option. Does it exist?\" );\n\t\t\t} else {\n\t\t\t\tWP_CLI::success( \"Deleted '{$arg}' option.\" );\n\t\t\t}\n\t\t}\n\t}", "public function ListUptimeCheckIps(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsResponse', 'decode'],\n $metadata, $options);\n }", "public function destroy(CheckIn $checkIn)\n {\n //\n }", "public function delete_watch(){\r\n\r\n\t\tif($this->expectsPost(array('watchId'))){\r\n\r\n\t\t\tif ($this->watch->deleteWatch($this->watchId, $this->session->userdata('userId'))) {\r\n\r\n\t\t\t\t$this->_bodyData['success'] = 'Watch successfully deleted!';\r\n\t\t\t}\r\n\r\n\t\t\t$this->constructMeasurePage();\r\n\t\t}\r\n\t}", "public function removeConfigValue($name)\n {\n $entity = $this->getConfigEntity($name);\n\n return $entity ? $this->getRepository()->delete($entity) : true;\n }", "function deleteConfigParameter($name){\n try {\n global $db_table_prefix;\n\n $results = array();\n\n $db = pdoConnect();\n\n $query = \"DELETE\n\t\tFROM \".$db_table_prefix.\"configuration WHERE name = :name\";\n\n if (!$stmt = $db->prepare($query))\n return false;\n\n $sqlVars[\":name\"] = $name;\n\n if (!$stmt->execute($sqlVars)){\n // Error\n return false;\n }\n\n if ($stmt->rowCount() > 0)\n return true;\n else {\n addAlert(\"danger\", \"No configuration parameter '$name' exists.\");\n return false;\n }\n\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}", "public function delete()\n {\n return delete_option($this->hash);\n }", "public function destroy(Request $req)\n {\n //\n\t\t$r = config::find($req->id);\n\t\t$r->delete();\n\t\treturn redirect('config')->with('status', 'Deleted successfully');\n }", "public function destroy($id)\n {\n $systemConfig = $this->systemConfigRepository->findWithoutFail($id);\n\n if (empty($systemConfig)) {\n Flash::error('System Config not found');\n\n return redirect(route('systemConfigs.index'));\n }\n\n $this->systemConfigRepository->delete($id);\n\n Flash::success('System Config deleted successfully.');\n\n return redirect(route('systemConfigs.index'));\n }", "public function postDeleteKeyValueKeyConfig(Object_KeyValue_KeyConfig $config)\n {\n\n }", "public function delete(SettingModel $settingModel): bool;", "function uninstall()\n\t{\n\t\tdelete_config_option('youtube_channel_update_time');\n\t}", "function deleteSetting($userId, $name, $assocType = null, $assocId = null) {\n\t\treturn $this->update(\n\t\t\t'DELETE FROM user_settings WHERE user_id = ? AND setting_name = ? AND assoc_type = ? AND assoc_id = ?',\n\t\t\tarray((int) $userId, $name, (int) $assocType, (int) $assocId)\n\t\t);\n\t}", "public static function deleteEntry($profileId){\n $tableObj = new matchalerts_TwoWayVsDppCount();\n $tableObj->deleteEntryOfProfile($profileId);\n }", "function clear_integration_settings() {\n\tglobal $db;\n\t\n\t$config_fields = get_db_schema();\n\t$key_names = array();\n\tforeach ($config_fields as $config_field) {\n\t\t$key_names[] = 'wpu_' . $config_field;\n\t}\n\t\n\t$sql = 'DELETE FROM ' . CONFIG_TABLE . '\n\t\t\tWHERE ' . $db->sql_in_set('config_name', $key_names);\n\t$db->sql_query($sql);\n\n}", "public function testComAdobeCqAuditPurgeReplication()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.audit.purge.Replication';\n\n $crawler = $client->request('POST', $path);\n }", "public function deactivate()\n {\n $this->op->request('DELETE', '/api/prom/configs/deactivate', [\n 'headers' => [\n 'X-Scope-OrgID' => $this->consumerId,\n ]\n ]);\n }", "function delete_configuracion($id)\n {\n return $this->db->delete('configuracion',array('id'=>$id));\n }", "public function tearDown()\n {\n $this->objectManager->create(\n \\Magento\\Config\\Test\\TestStep\\SetupConfigurationStep::class,\n ['configData' => $this->configData, 'rollback' => true]\n )->run();\n }", "public function removeConfiguration(string $name): void\n\t{\n\t\tunset($this->configurations[$name]);\n\t}", "public function uninstall()\n {\n $registeredPlugin=GPCCore::getRegistered();\n if(count($registeredPlugin)>0)\n {\n return(l10n(\"Some plugins are dependent on Grum Plugin Classes: before uninstall, you must first uninstall the plugins dependent\"));\n }\n else\n {\n $this->deleteConfig();\n GPCCore::deleteConfig();\n GPCRequestBuilder::deleteConfig();\n $result=GPCRequestBuilder::deleteTables();\n return($result);\n }\n }", "private function deleteAttempt()\n {\n Attempt::where('ip', $this->ip)\n ->whereDate('created_at', date('Y-m-d'))\n ->delete();\n }" ]
[ "0.7359583", "0.60657585", "0.54425657", "0.5425039", "0.5347119", "0.5328237", "0.52433217", "0.5243305", "0.51132256", "0.50850207", "0.50649977", "0.50649256", "0.50477254", "0.50028634", "0.49690515", "0.4952889", "0.48913378", "0.4769733", "0.47678268", "0.47544557", "0.47543716", "0.47430515", "0.47022292", "0.47014895", "0.4685597", "0.46752343", "0.46733093", "0.463125", "0.45930925", "0.45281836", "0.45079237", "0.44783467", "0.44766212", "0.44370684", "0.44055584", "0.43925774", "0.43869877", "0.43753156", "0.43513745", "0.4335307", "0.432618", "0.43076444", "0.4298912", "0.42838383", "0.42596176", "0.42097306", "0.4209615", "0.4204635", "0.42034397", "0.41983026", "0.41922548", "0.417008", "0.41598016", "0.4134845", "0.41329783", "0.41262582", "0.41235268", "0.41102883", "0.41097584", "0.4103099", "0.40942663", "0.40783122", "0.4075121", "0.40746266", "0.40720245", "0.40671432", "0.40605757", "0.40595168", "0.40549636", "0.40543795", "0.40516147", "0.4042807", "0.4041399", "0.40322402", "0.4031798", "0.40223745", "0.40166947", "0.3998899", "0.3991675", "0.3980754", "0.39799267", "0.39786494", "0.39759982", "0.3970406", "0.39598808", "0.3959495", "0.39567044", "0.3951412", "0.39507023", "0.39458802", "0.39313674", "0.39301887", "0.39300898", "0.39235786", "0.39133537", "0.39123514", "0.39045912", "0.39016494", "0.389949" ]
0.39950687
79
Gets a single Uptime check configuration. (uptimeCheckConfigs.get)
public function get($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('get', [$params], UptimeCheckConfig::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "public function get($key){\r\n\t\tif(key_exists($key, $this->config)){\r\n\t\t\treturn $this->config[$key];\r\n\t\t}\r\n\t\tdie('Index is out of range');\r\n\t}", "public function get()\r\n {\r\n $this->ensureLoaded();\r\n return $this->config;\r\n }", "public function config_get(){\n\t\treturn $this->fb->exec('dhcp.config_get');\n\t}", "public function get($key)\r\n {\r\n return $this->config[$key];\r\n }", "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "protected function get(string $key)\n {\n if (!array_key_exists($key, $this->config)) throw new InvalidConfigException(\"Your configuration doesn't have a value for the key `$key`\");\n return $this->config[$key];\n }", "public static function get( $key ) {\n\t\tif ( ! static::$config ) {\n\t\t\tstatic::_set_config_data();\n\t\t}\n\n\t\tif ( array_key_exists( $key, static::$config ) ) {\n\t\t\treturn static::$config[ $key ];\n\t\t}\n\t}", "function getConfig($key = '')\n {\n return isset($this->config[$key]) ? $this->config[$key] : null;\n }", "public function __get($name): mixed {\n if (isset($this->data[$name]))\n return $this->data[$name];\n\n trigger_error(\n __(\"Requested configuration setting not found.\"),\n E_USER_NOTICE\n );\n\n return null;\n }", "public static function get($key)\n\t{\n\t\tif (is_array(self::$_CONF) AND array_key_exists($key, self::$_CONF))\n\t\t\treturn self::$_CONF[$key];\n\t\telseif($value = Db::getInstance()->getValue('SELECT `value` FROM `'.DB_PREFIX.'configuration` WHERE `name` = \\''.pSQL($key).'\\'')){\n\t\t\tself::$_CONF[$key] = $value;\n\t\t\treturn $value;\n\t\t}\n\t\treturn false;\n\t}", "public function get_config()\n\t{\n\t\treturn $this->cfg;\n\t}", "public function patch($name, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('patch', [$params], UptimeCheckConfig::class);\n }", "public function get($key)\n {\n if (array_key_exists($key, $this->config)) {\n $value = $this->config[ $key ];\n } elseif ($this->offsetExists($key)) {\n $value = $this->defaults[ $key ];\n } else {\n throw new Exception(\"Config entry «{$key}» doesn't exists. \");\n }\n\n return $value;\n }", "public function getCfg()\n {\n return $this->get(self::_CFG);\n }", "public static function get($key)\n {\n return Arr::get(static::$config, $key);\n }", "public static function getCfg($key) {\r\n\t\treturn self::$cfg->get($key);\r\n\t}", "function getConfigValue($name) {\n return UserConfigOptions::getValue($name, $this);\n }", "public final function getConfig($key = false)\n {\n return $key ? $this->config->get($key) : $this->config;\n }", "public function listProjectsUptimeCheckConfigs($parent, $optParams = [])\n {\n $params = ['parent' => $parent];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class);\n }", "protected function get($name) {\n return $this->configuration->get($name);\n }", "function recurringdowntime_get_cfg()\n{\n recurringdowntime_check_cfg();\n $cfg = file_get_contents(RECURRINGDOWNTIME_CFG);\n return recurringdowntime_cfg_to_array($cfg);\n}", "public function getConfig($key)\n {\n return Config::get($key);\n }", "public static function get($key)\r\n {\r\n require_once ROOT . \"/app/config/{$key}.php\";\r\n return isset(self::$settings[$key]) ? self::$settings[$key] : null;\r\n }", "public function get($key)\n\t{\n\t\t$default = array_key_exists($key, $this->defaultConfig) ? $this->defaultConfig[$key] : null;\n\n\t\treturn $this->componentConfig->get($key, $default);\n\t}", "public function get ( $name ) {\n\t\tif( !$this->has ( $name ) ) {\n\t\t\tthrow new \\InvalidArgumentException(sprintf('The name \"%s\" is invalid.', $name));\n\t\t}\n\t\treturn $this->config[$name];\n\t}", "private function getConfig($key)\n {\n return $this->config->get($key);\n }", "public static function config($key) {\n\t\t\tif (isset(self::$config[$key])) {\n\t\t\t\treturn self::$config[$key];\n\t\t\t} else {\n\t\t\t\t// Should we throw an exception or return null?\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "public function get($name)\n {\n $config = $this->fromCache();\n return isset($config[$name]) ? $config[$name] : null;\n }", "public function getConfig($name) {\n\t\t$this->loadConfig();\n\t\treturn isset($this->_config[$name]) ? $this->_config[$name] : null;\n\t}", "public function get( $key ) {\n\t\tif ( isset( $this->config[ $key ] ) ) {\n\t\t\treturn $this->config[ $key ];\n\t\t}\n\t\treturn null;\n\t}", "public function getConfig($key=NULL) {\r\n return is_null($key) ? $this->config : (isset($this->config[$key]) ? $this->config[$key] : NULL);\r\n }", "public function __get($key)\n {\n if (is_object($this->config)) {\n $value = $this->config->where('key', $key)->first();\n\n return $value ? $value->value : null;\n }\n }", "public static function get($key=null){\n\t\t $connection = MyActiveRecord::getDb();\n\t\t if(empty(self::$psconfig_values))\n\t\t {\n\t\t\t $query = \"SELECT name, value FROM \" . SITE_CONFIG;\n\t\t\t $rst = $connection->createCommand($query)->queryAll();\n\t\t\t foreach($rst as $v){\n\t\t\t\t self::$psconfig_values[$v['name']] = $v['value'];\n\t\t\t }\n\t\t }\n \t\treturn self::$psconfig_values[$key];\n\t\t}", "protected function config($name) {\n return $this->configFactory->get($name);\n }", "protected function config($key)\n {\n return $this->app['config']->get($key);\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], Configuration::class);\n }", "public function getConfig($item = null) {\n\t\treturn isset($item) ? $this->config->get($item) : $this->config;\n\t}", "protected function config($key)\n {\n return $this->utility->getConfig($key);\n }", "public static function read()\n {\n return self::$config;\n }", "function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }", "static function getValue($name) {\r\n if (isset(self::$config[$name])) \r\n return self::$config[$name];\r\n else {\r\n return DB::getConfig($name);\r\n }\r\n }", "public static function getConfig()\n {\n return self::$config;\n }", "public function getConfig($name)\n {\n return $this->config->get(self::CONFIG_PATH.'.'.$name);\n }", "function get_setting() {\n return get_config(NULL, $this->name);\n }", "public function getConfigValue($key)\n {\n return $this->config[$key];\n }", "public function configOffsetGet($name)\n {\n return $this->settings[$name];\n }", "static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}", "public function create($parent, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], UptimeCheckConfig::class);\n }", "static public function get($key) {\n if (!property_exists(self::getConfig(), $key))\n return null;\n else\n return self::getConfig()->$key;\n }", "public function getConfig()\n {\n return $this->get('config');\n }", "public static function getInstance() {\n return self::getConfig();\n }", "public function getConfig($path) {\n return Config::getInstance()->getElementByPath($path);\n }", "public static function getConf(){\n $conf = Configuration::first();\n return $conf;\n }", "function getConfigValue($key) {\r\n\t\t$db = & JFactory::getDBO() ;\r\n\t\t$sql = 'SELECT config_value FROM #__osmembership_configs WHERE config_key=\"'.$key.'\"';\r\n\t\t$db->setQuery($sql) ;\t\t\r\n\t\treturn $db->loadResult();\r\n\t}", "public static function config($name) {\n\t\treturn isset(self::$config[$name]) ? self::$config[$name] : null;\n\t}", "public static function config($key)\n\t{\n\t\treturn (TC::$config !== NULL) ? TC::$config->get($key) : false;\n\t}", "public static function get($name)\n {\n self::loadConfiguration();\n\n return self::$configuration[$name] ?? null;\n }", "protected function getConfig($name)\n {\n return $this->core->getConfig()->get($name, '');\n }", "public function getValue($key = NULL) {\n return isset($this->config[$key]) ? $this->config[$key] : NULL;\n }", "public function getCfg($path = null)\n {\n return $this->config->getCfg($path);\n }", "public function get() {\n\n\t\tif (is_multisite()) {\n\t\t\t$config = get_site_option('wpo_cache_config', $this->get_defaults());\n\t\t} else {\n\t\t\t$config = get_option('wpo_cache_config', $this->get_defaults());\n\t\t}\n\n\t\treturn wp_parse_args($config, $this->get_defaults());\n\t}", "protected function _get_config()\n {\n $config = Spyc::YAMLLoad(\"config.yaml\");\n return $config;\n }", "public function getConfig()\n {\n return $this->config ?: $this->setConfig()->getConfig();\n }", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfigurationValue($key) {\n return $this->configuration[$key] ?? NULL;\n }", "public function getCurrentUserConfig();", "public static function get_configuration()\n\t{\n\t\tif (empty(self::$_configuration))\n\t\t{\n\t\t\tself::check();\n\t\t}\n\t\treturn self::$_configuration;\n\t}", "public static function get($path = null)\r\n\t{\r\n\t\tif($path)\r\n\t\t{\r\n\t\t\t$config = $GLOBALS['config'];\t\t//ARRAY NAME for configurations \r\n\t\t\t$path = explode('/', $path);\r\n\r\n\t\t\tforeach ($path as $bit) {\r\n\t\t\t\tif(isset($config[$bit]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$config = $config[$bit]; //To access to second level of config\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $config;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function get($key=null)\n {\n if (is_null($key)) {\n return $this->getConfig();\n } elseif (isset($this->config[$key])) {\n return $this->config[$key];\n }\n\n throw new \\InvalidArgumentException(\n sprintf('Config for \"%s\" does not exists.', $key)\n );\n }", "public function get($name)\n {\n return (isset($this->settings[$name]) ? $this->settings[$name] : null);\n }", "public function getSetting() {}", "public function getSetting() {}", "public function getConfig($key);", "public function getConfig($key);", "public static function getConfig () {\n\n\t\treturn parse_ini_file(APPPATH . '/config/config.ini');\n\t}", "static public function getConfig() {\n return Application::$config;\n }", "public function getConfig() {\n $configFiles = [\n 4 => 'laravel-haml::config',\n 5 => 'laravel-haml',\n 6 => 'haml'\n ];\n\n\t\t$key = $configFiles[$this->version()];\n\t\treturn $this->app->make('config')->get($key);\n\t}", "public function retrieveSystemConfiguration()\n {\n return $this->start()->uri(\"/api/system-configuration\")\n ->get()\n ->go();\n }", "protected function getConfig($key = null)\n {\n if ($this->config === null) {\n $this->setConfig();\n }\n\n if (null === $key) {\n return $this->config;\n }\n\n if (!array_key_exists($key, $this->config)) {\n throw new InvalidArgumentException(\"key: '\" . $key . \"' is not set in configuration options.\");\n }\n\n return $this->config[$key];\n }", "public static function get ($key = null)\n\t{\n\t\t// load config file here\n\t\tself::check_config();\n\n\t\tif ($key != null)\n\t\t{\n\t\t\tif (isset(self::$_config[$key]))\n\t\t\t{\n\t\t\t\treturn self::$_config[$key];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn self::$_config;\n\t\t}\n\t}", "public function getConfig($config_key)\n {\n if(array_key_exists(strtolower($config_key), self::$config_array)) \n {\n return self::$config_array[strtolower($config_key)];\n }\n\n try \n {\n return self::getDefaultValue($config_key);\n }\n catch(\\Exception $e) \n {\n printf(\"Unable to prepare configs: %s\", $e->getMessage());\n }\n }", "public function getConfig()\n {\n return $this['config'];\n }", "public static function get(string $key): mixed\n {\n if (!isset(static::$config[$key])) {\n throw new Exception(\n sprintf(\n 'Configuration with key %s not found!',\n $key\n )\n );\n }\n\n return static::$config[$key];\n }", "public function getConfig() {\n return $this->container->offsetGet('config');\n }", "public function getStatusLEDConfig()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_STATUS_LED_CONFIG, $payload);\n\n $payload = unpack('C1config', $data);\n\n return $payload['config'];\n }", "public function getConfig() {}", "public function getConfig(){\n\t\t$request = $this->_sendPacketToController(self::GET_CONFIG);\n\t\tif ($request->getState() == self::STATE_OK) // If the packet is send sucefully\n\t\t\treturn $this->_getResponse(); // TODO mettre en forme la sortie\n\t\telse\n\t\t\treturn $request;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}" ]
[ "0.78731394", "0.6626676", "0.5898211", "0.5777897", "0.5675747", "0.56366116", "0.55743366", "0.5553726", "0.5539036", "0.5508878", "0.54915833", "0.54881966", "0.5483576", "0.5481618", "0.54761094", "0.5475268", "0.545728", "0.5454844", "0.5446216", "0.54440486", "0.5430929", "0.5429014", "0.54239666", "0.54177505", "0.54138714", "0.5400217", "0.53720516", "0.53720003", "0.5368049", "0.53411704", "0.53378063", "0.53311574", "0.5321453", "0.53207344", "0.53044724", "0.5291597", "0.5286985", "0.52808183", "0.5276731", "0.52762103", "0.5264876", "0.52620095", "0.52510804", "0.5246018", "0.52400327", "0.52399975", "0.52092195", "0.52031326", "0.520193", "0.5185591", "0.51818055", "0.518003", "0.51719016", "0.51566625", "0.5153598", "0.51483047", "0.51416016", "0.51387364", "0.51315784", "0.5123802", "0.511924", "0.5114502", "0.5114303", "0.50945777", "0.50832236", "0.5079989", "0.5076274", "0.5076274", "0.5076274", "0.5076274", "0.5076274", "0.5076274", "0.5076274", "0.5076274", "0.50757384", "0.5074405", "0.50723803", "0.50711346", "0.5071127", "0.50650144", "0.50638455", "0.50638455", "0.50635284", "0.50635284", "0.5063209", "0.5062018", "0.50609916", "0.50514656", "0.5049276", "0.50426954", "0.5035866", "0.5032544", "0.5019685", "0.5009644", "0.50091195", "0.4997159", "0.49916437", "0.4987622", "0.4987622", "0.4987622" ]
0.79686177
0
Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations). (uptimeCheckConfigs.listProjectsUptimeCheckConfigs)
public function listProjectsUptimeCheckConfigs($parent, $optParams = []) { $params = ['parent' => $parent]; $params = array_merge($params, $optParams); return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "public function ListUptimeCheckIps(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsResponse', 'decode'],\n $metadata, $options);\n }", "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], UptimeCheckConfig::class);\n }", "function getProjectList() {\n global $logger;\n\n $projects = Project::getProjects();\n if($projects != NULL) {\n $extproj_id = Config::getInstance()->getValue(Config::id_externalTasksProject);\n $smartyProjects = array();\n foreach($projects as $id => $name) {\n // exclude ExternalTasksProject\n if ($extproj_id == $id) {\n echo \"<script type=\\\"text/javascript\\\">console.log(\\\" getProjectList - project $id: ExternalTasksProject is excluded\\\");</script>\";\n continue;\n }\n\n // exclude SideTasksProjects\n try {\n $p = ProjectCache::getInstance()->getProject($id);\n if ($p->isSideTasksProject()) {\n echo \"<script type=\\\"text/javascript\\\">console.log(\\\" getProjectList - project $id: sideTaskProjects are excluded\\\");</script>\";\n continue;\n }\n } catch (Exception $e) {\n // could not determinate, so the project should be included in the list\n echo \"<script type=\\\"text/javascript\\\">console.log(\\\" getProjectList - project $id: Unknown type, project included anyway\\\");</script>\";\n // nothing to do.\n }\n $smartyProjects[$id] = $name;\n }\n return $smartyProjects;\n } else {\n return NULL;\n }\n}", "public function getCheckups()\n {\n $scheduledCheckups = User::find(auth()->id())->checkups->reverse();\n\n return api_resource('mobile\\CheckupSchedule')->make($scheduledCheckups);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "function GetProjectStatuses()\n\t{\n\t\t$result = $this->sendRequest(\"GetProjectStatuses\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getProjectsList($hint, $uacc_uid=''){\r\n\t\t$list = array();\r\n\r\n\t\tif($uacc_uid != '')\r\n\t\t\t$query = $this->db->select(\"project_id,project_name\")->like(\"project_name\", $hint)->where(array(\"created_by\"=>$uacc_uid,\"deleted\"=>0, \"archived\"=>0))->order_by(\"project_name\", \"asc\")->get(\"sc_projects\");\r\n\t\telse\r\n\t\t\t$query = $this->db->select(\"project_id,project_name\")->like(\"project_name\", $hint)->where(array(\"deleted\"=>0, \"archived\"=>0))->order_by(\"project_name\", \"asc\")->get(\"sc_projects\");\r\n\r\n\t if ($query->num_rows() > 0){\r\n\t\t\tforeach($query->result() as $row){\r\n\r\n\t\t\t\t$list[] = array(\"name\"=>$row->project_name, \"label\"=>$row->project_name, \"id\"=>$row->project_id);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $list;\r\n\t}", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['localNetworkPort']) && (mb_strlen($this->container['localNetworkPort']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'localNetworkPort', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['localNetworkPort']) && (mb_strlen($this->container['localNetworkPort']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'localNetworkPort', the character length must be bigger than or equal to 0.\";\r\n }\r\n $allowedValues = $this->getNotifyStatusAllowableValues();\r\n if (!is_null($this->container['notifyStatus']) && !in_array($this->container['notifyStatus'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'notifyStatus', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if (!is_null($this->container['notifyStatus']) && (mb_strlen($this->container['notifyStatus']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'notifyStatus', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['notifyStatus']) && (mb_strlen($this->container['notifyStatus']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'notifyStatus', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['createTime']) && (mb_strlen($this->container['createTime']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'createTime', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['createTime']) && (mb_strlen($this->container['createTime']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'createTime', the character length must be bigger than or equal to 0.\";\r\n }\r\n $allowedValues = $this->getCreateSourceAllowableValues();\r\n if (!is_null($this->container['createSource']) && !in_array($this->container['createSource'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'createSource', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if (!is_null($this->container['createSource']) && (mb_strlen($this->container['createSource']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'createSource', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['createSource']) && (mb_strlen($this->container['createSource']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'createSource', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['ecsId']) && (mb_strlen($this->container['ecsId']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'ecsId', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['ecsId']) && (mb_strlen($this->container['ecsId']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'ecsId', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['lockStatus']) && (mb_strlen($this->container['lockStatus']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'lockStatus', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['lockStatus']) && (mb_strlen($this->container['lockStatus']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'lockStatus', the character length must be bigger than or equal to 0.\";\r\n }\r\n $allowedValues = $this->getFreezedStatusAllowableValues();\r\n if (!is_null($this->container['freezedStatus']) && !in_array($this->container['freezedStatus'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'freezedStatus', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if (!is_null($this->container['freezedStatus']) && (mb_strlen($this->container['freezedStatus']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'freezedStatus', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['freezedStatus']) && (mb_strlen($this->container['freezedStatus']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'freezedStatus', the character length must be bigger than or equal to 0.\";\r\n }\r\n return $invalidProperties;\r\n }", "public function getProjectTasksForSelectProjects($projectIdList) {\n if (count($projectIdList) < 1) return [];\n $fieldNames = [];\n $sql = \"SELECT \n p.category as category, \n p.name as ProjectName,\n pt.name as TaskName, \n u.username, \n pt.`start_date`,\n pt.`due_date`,\n pt.status \n FROM projects AS p \n LEFT JOIN project_has_tasks as pt on pt.project_id = p.id \n LEFT JOIN users as u on pt.user_id=u.id\n WHERE p.id IN (\" . implode(\",\", $projectIdList) . \")\n ORDER BY p.category, p.name;\";\n /** @var CI_DB_mysql_result $result */\n $result = $this->_primaryDatabase->query($sql, []);\n $resultArray = $result->result();\n if ($result->num_rows() > 0) {\n foreach ((array) $resultArray[0] as $fieldName => $fieldValue) $fieldNames[] = $fieldName;\n $resultArray = array_merge([(object) $fieldNames], $resultArray);\n }\n return $resultArray;\n }", "public function getCheckInTaskListList(){\n return $this->_get(2);\n }", "public function listProjects(ProjectListRequest $request)\n {\n $sorting = $request->getSortKey();\n $friendly = $request->getSortKeyFriendly();\n $order = $request->getSortOrderFriendly();\n \n return $request->renderViewOrEmpty('projects', compact(['sorting', 'friendly', 'order']));\n }", "public static function projectList() {\n\t\tif(!Authenticate::isAuthorized()) {\n \t\t throw new NotifyException(\"You are not authorized for this method\", 1);\n \t}\n else {\n\t\t\t$api_end_point = \"project\";\n\t\t\t$request_data=[];\n\t\t\treturn Request::sendRequest($api_end_point, $request_data);\n\t\t}\n\t}", "public function getTaskList($params = [])\n {\n $this->sendRequest(\n [\n 'methodName' => 'project.list',\n 'pool_id' => $params['pool_id'] ?? 0,\n 'limit' => $params['limit'] ?? 10,\n 'status' => $params['status'] ?? 'ACTIVE',\n 'sort' => $params['sort'] ?? '-id',\n ]\n );\n\n return $this->result;\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if ($this->container['clusterVersion'] === null) {\r\n $invalidProperties[] = \"'clusterVersion' can't be null\";\r\n }\r\n if ($this->container['clusterName'] === null) {\r\n $invalidProperties[] = \"'clusterName' can't be null\";\r\n }\r\n if ((mb_strlen($this->container['clusterName']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'clusterName', the character length must be smaller than or equal to 64.\";\r\n }\r\n if ((mb_strlen($this->container['clusterName']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'clusterName', the character length must be bigger than or equal to 1.\";\r\n }\r\n if ($this->container['clusterType'] === null) {\r\n $invalidProperties[] = \"'clusterType' can't be null\";\r\n }\r\n if ($this->container['region'] === null) {\r\n $invalidProperties[] = \"'region' can't be null\";\r\n }\r\n if ($this->container['vpcName'] === null) {\r\n $invalidProperties[] = \"'vpcName' can't be null\";\r\n }\r\n if ($this->container['subnetName'] === null) {\r\n $invalidProperties[] = \"'subnetName' can't be null\";\r\n }\r\n if ($this->container['components'] === null) {\r\n $invalidProperties[] = \"'components' can't be null\";\r\n }\r\n if ($this->container['availabilityZone'] === null) {\r\n $invalidProperties[] = \"'availabilityZone' can't be null\";\r\n }\r\n if ($this->container['safeMode'] === null) {\r\n $invalidProperties[] = \"'safeMode' can't be null\";\r\n }\r\n if ($this->container['managerAdminPassword'] === null) {\r\n $invalidProperties[] = \"'managerAdminPassword' can't be null\";\r\n }\r\n if ($this->container['loginMode'] === null) {\r\n $invalidProperties[] = \"'loginMode' can't be null\";\r\n }\r\n $allowedValues = $this->getLogCollectionAllowableValues();\r\n if (!is_null($this->container['logCollection']) && !in_array($this->container['logCollection'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'logCollection', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if ($this->container['nodeGroups'] === null) {\r\n $invalidProperties[] = \"'nodeGroups' can't be null\";\r\n }\r\n return $invalidProperties;\r\n }", "public function callProjectList(array $params = array())\n {\n return $this->call('projekt/list', $params);\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['app_name'] === null) {\n $invalidProperties[] = \"'app_name' can't be null\";\n }\n if ($this->container['app_display_name'] === null) {\n $invalidProperties[] = \"'app_display_name' can't be null\";\n }\n if ($this->container['release_id'] === null) {\n $invalidProperties[] = \"'release_id' can't be null\";\n }\n if ($this->container['platform'] === null) {\n $invalidProperties[] = \"'platform' can't be null\";\n }\n if ($this->container['uploaded_at'] === null) {\n $invalidProperties[] = \"'uploaded_at' can't be null\";\n }\n if ($this->container['version'] === null) {\n $invalidProperties[] = \"'version' can't be null\";\n }\n if ($this->container['short_version'] === null) {\n $invalidProperties[] = \"'short_version' can't be null\";\n }\n if ($this->container['size'] === null) {\n $invalidProperties[] = \"'size' can't be null\";\n }\n if ($this->container['bundle_identifier'] === null) {\n $invalidProperties[] = \"'bundle_identifier' can't be null\";\n }\n if ($this->container['install_link'] === null) {\n $invalidProperties[] = \"'install_link' can't be null\";\n }\n return $invalidProperties;\n }", "public function getListSchemaChecking() {\n\t\treturn $this->_getConfigValueArray('schemaCheckingList');\n\t}", "private function get_raw_messages() {\n\t\t$jetpack_setup_url = $this->generate_admin_url(\n\t\t\tarray(\n\t\t\t\t'page' => 'jetpack',\n\t\t\t\t'#/setup' => '',\n\t\t\t)\n\t\t);\n\n\t\t$messages = array(\n\t\t\tarray(\n\t\t\t\t'id' => 'jpsetup-upload',\n\t\t\t\t'message_path' => '/wp:upload:admin_notices/',\n\t\t\t\t'message' => __( 'Do you want lightning-fast images?', 'jetpack' ),\n\t\t\t\t'description' => __( 'Set up Jetpack, enable Site Accelerator, and start serving your images lightning fast, for free.', 'jetpack' ),\n\t\t\t\t'button_link' => $jetpack_setup_url,\n\t\t\t\t'button_caption' => __( 'Set up Jetpack', 'jetpack' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => 'jpsetup-widgets',\n\t\t\t\t'message_path' => '/wp:widgets:admin_notices/',\n\t\t\t\t'message' => __( 'Looking for even more widgets?', 'jetpack' ),\n\t\t\t\t'description' => __( 'Set up Jetpack for great additional widgets that display business contact info and maps, blog stats, and top posts.', 'jetpack' ),\n\t\t\t\t'button_link' => $jetpack_setup_url,\n\t\t\t\t'button_caption' => __( 'Set up Jetpack', 'jetpack' ),\n\t\t\t),\n\t\t);\n\n\t\tif ( wp_count_posts()->publish >= 5 ) {\n\t\t\t$messages[] = array(\n\t\t\t\t'id' => 'jpsetup-posts',\n\t\t\t\t'message_path' => '/wp:edit-post:admin_notices/',\n\t\t\t\t'message' => __( 'Do you know which of these posts gets the most traffic?', 'jetpack' ),\n\t\t\t\t'description' => __( 'Set up Jetpack to get in-depth stats about your content and visitors.', 'jetpack' ),\n\t\t\t\t'button_link' => $jetpack_setup_url,\n\t\t\t\t'button_caption' => __( 'Set up Jetpack', 'jetpack' ),\n\t\t\t);\n\t\t}\n\n\t\treturn $messages;\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['pkiSystemconfigurationID'] === null) {\n $invalidProperties[] = \"'pkiSystemconfigurationID' can't be null\";\n }\n if (($this->container['pkiSystemconfigurationID'] > 1)) {\n $invalidProperties[] = \"invalid value for 'pkiSystemconfigurationID', must be smaller than or equal to 1.\";\n }\n\n if (($this->container['pkiSystemconfigurationID'] < 1)) {\n $invalidProperties[] = \"invalid value for 'pkiSystemconfigurationID', must be bigger than or equal to 1.\";\n }\n\n if ($this->container['fkiSystemconfigurationtypeID'] === null) {\n $invalidProperties[] = \"'fkiSystemconfigurationtypeID' can't be null\";\n }\n if (($this->container['fkiSystemconfigurationtypeID'] < 1)) {\n $invalidProperties[] = \"invalid value for 'fkiSystemconfigurationtypeID', must be bigger than or equal to 1.\";\n }\n\n if ($this->container['sSystemconfigurationtypeDescriptionX'] === null) {\n $invalidProperties[] = \"'sSystemconfigurationtypeDescriptionX' can't be null\";\n }\n if ($this->container['eSystemconfigurationNewexternaluseraction'] === null) {\n $invalidProperties[] = \"'eSystemconfigurationNewexternaluseraction' can't be null\";\n }\n if ($this->container['eSystemconfigurationLanguage1'] === null) {\n $invalidProperties[] = \"'eSystemconfigurationLanguage1' can't be null\";\n }\n if ($this->container['eSystemconfigurationLanguage2'] === null) {\n $invalidProperties[] = \"'eSystemconfigurationLanguage2' can't be null\";\n }\n if ($this->container['eSystemconfigurationEzsign'] === null) {\n $invalidProperties[] = \"'eSystemconfigurationEzsign' can't be null\";\n }\n if ($this->container['bSystemconfigurationEzsignpersonnal'] === null) {\n $invalidProperties[] = \"'bSystemconfigurationEzsignpersonnal' can't be null\";\n }\n if ($this->container['bSystemconfigurationSspr'] === null) {\n $invalidProperties[] = \"'bSystemconfigurationSspr' can't be null\";\n }\n// if (!is_null($this->container['dtSystemconfigurationReadonlyexpirationstart']) && !preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $this->container['dtSystemconfigurationReadonlyexpirationstart'])) {\n if (!is_null($this->container['dtSystemconfigurationReadonlyexpirationstart']) && !preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $this->container['dtSystemconfigurationReadonlyexpirationstart'])) {\n $invalidProperties[] = \"invalid value for 'dtSystemconfigurationReadonlyexpirationstart', must be conform to the pattern /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/.\";\n }\n\n// if (!is_null($this->container['dtSystemconfigurationReadonlyexpirationend']) && !preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $this->container['dtSystemconfigurationReadonlyexpirationend'])) {\n if (!is_null($this->container['dtSystemconfigurationReadonlyexpirationend']) && !preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $this->container['dtSystemconfigurationReadonlyexpirationend'])) {\n $invalidProperties[] = \"invalid value for 'dtSystemconfigurationReadonlyexpirationend', must be conform to the pattern /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/.\";\n }\n\n return $invalidProperties;\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['taskId']) && !preg_match(\"/^[A-Za-z0-9]{32}$/\", $this->container['taskId'])) {\r\n $invalidProperties[] = \"invalid value for 'taskId', must be conform to the pattern /^[A-Za-z0-9]{32}$/.\";\r\n }\r\n if (!is_null($this->container['appId']) && !preg_match(\"/^[A-Za-z0-9]{32}$/\", $this->container['appId'])) {\r\n $invalidProperties[] = \"invalid value for 'appId', must be conform to the pattern /^[A-Za-z0-9]{32}$/.\";\r\n }\r\n if (!is_null($this->container['appName']) && !preg_match(\"/^deploy_[A-Za-z0-9]{6}$/\", $this->container['appName'])) {\r\n $invalidProperties[] = \"invalid value for 'appName', must be conform to the pattern /^deploy_[A-Za-z0-9]{6}$/.\";\r\n }\r\n if (!is_null($this->container['compId']) && !preg_match(\"/^[A-Za-z0-9]{32}$/\", $this->container['compId'])) {\r\n $invalidProperties[] = \"invalid value for 'compId', must be conform to the pattern /^[A-Za-z0-9]{32}$/.\";\r\n }\r\n if (!is_null($this->container['compName']) && (mb_strlen($this->container['compName']) > 128)) {\r\n $invalidProperties[] = \"invalid value for 'compName', the character length must be smaller than or equal to 128.\";\r\n }\r\n if (!is_null($this->container['compName']) && (mb_strlen($this->container['compName']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'compName', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['domainId']) && !preg_match(\"/^[A-Za-z0-9]{32}$/\", $this->container['domainId'])) {\r\n $invalidProperties[] = \"invalid value for 'domainId', must be conform to the pattern /^[A-Za-z0-9]{32}$/.\";\r\n }\r\n if (!is_null($this->container['region']) && (mb_strlen($this->container['region']) > 256)) {\r\n $invalidProperties[] = \"invalid value for 'region', the character length must be smaller than or equal to 256.\";\r\n }\r\n if (!is_null($this->container['region']) && (mb_strlen($this->container['region']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'region', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['state']) && (mb_strlen($this->container['state']) > 32)) {\r\n $invalidProperties[] = \"invalid value for 'state', the character length must be smaller than or equal to 32.\";\r\n }\r\n if (!is_null($this->container['state']) && (mb_strlen($this->container['state']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'state', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['state']) && !preg_match(\"/^[0-1]{1}$/\", $this->container['state'])) {\r\n $invalidProperties[] = \"invalid value for 'state', must be conform to the pattern /^[0-1]{1}$/.\";\r\n }\r\n return $invalidProperties;\r\n }", "function getProjectList()\n\t{\n\t\t//Update Project List\n\t\t$this->Project_List = null;\n\t\t$assigned_projects_rows = returnRowsDeveloperAssignments($this->getUsername(), 'Project');\n\t\tforeach($assigned_projects_rows as $assigned_project)\n\t\t\t$this->Project_List[] = new Projects( $assigned_project['ClientProjectTask'] );\n\t\treturn $this->Project_List;\n\t}", "public function getProjects()\n\t{\n\t\t$query = $this->db->getQuery(true);\n\t\t$query->select('id, name, alias')\n\t\t\t->from('#__monitor_projects');\n\n\t\t$this->countItems($query);\n\n\t\tif ($this->list !== null && isset($this->list['fullordering']) && in_array($this->list['fullordering'], $this->orderOptions))\n\t\t{\n\t\t\t$query->order($this->list['fullordering']);\n\t\t}\n\n\t\t$this->db->setQuery($query);\n\n\t\treturn $this->db->loadObjectList();\n\t}", "public function getProjects(){\n $projects = Project::all()->sortBy('dead');\n return $projects;\n }", "function getProjects(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t $result = false;\n\t\t \n\t\t $sql = \"SELECT count(actTab.uuid) AS recCount, project_list.project_id, project_list.project_name\n\t\t FROM \".$this->penelopeTabID.\" AS actTab\n\t\t JOIN space ON actTab.uuid = space.uuid\n\t\t JOIN project_list ON space.project_id = project_list.project_id\n\t\t GROUP BY space.project_id \n\t\t \";\n\t\t \n\t\t $result = $db->fetchAll($sql);\n\t\t if($result){\n\t\t\t\t$projects = array();\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t $name = $row[\"project_name\"];\n\t\t\t\t\t $count = $row[\"recCount\"] + 0;\n\t\t\t\t\t $uuid = $row[\"project_id\"];\n\t\t\t\t\t $uri = self::projectBaseURI.$uuid;\n\t\t\t\t\t $projects[$uri] = array(\"name\" => $name, \"count\" => $count);\n\t\t\t\t}//end loop\n\t\t\t\t\n\t\t\t\t$projects = $this->orderURIs($projects);\n\t\t\t\t$this->projects = $projects;\n\t\t }//end case with results\n\t \n\t }", "function VM_projects() { return bList::getListInstance(myOrg_ID,'bList_vm_projects'); }", "public function worklogsReporting()\n {\n \t//\n \t// by developer\n //\n // by hours\n\n $worklogs_segmented_by_proj = [];\n $company_projects = $this->getAllProjects();\n\n foreach ($company_projects as $ndx => $company_project)\n {\n $worklogs_by_user = Werklog::with('user')\n ->selectRaw('user_id, COUNT(user_id) as user_occurrences, SUM(minutes) as user_project_total_time')\n ->where('project_id', $company_project->id)\n ->groupBy('user_id')\n ->orderBy('user_project_total_time', 'DESC')\n ->take(static::$_numrows)\n ->get();\n\n $worklogs_segmented_by_proj[$company_project->id] = $worklogs_by_user;\n }\n\n\t\tDebugbar::info($worklogs_segmented_by_proj);\n\n\t\treturn $worklogs_segmented_by_proj;\n }", "public function configuredChecks() {\n if ($this->checks === null) {\n $this->checks = [];\n foreach( $this->config as $driver => $checkConfig ) {\n // check if multiple or just one\n if (is_array($checkConfig)) {\n foreach( $checkConfig as $key => $config ) {\n $instance = $this->createInstance( $driver, $config );\n $instance->setInstanceName(is_string($key)?$key:$config);\n $this->checks[] = $instance;\n }\n } else {\n $instance = $this->createInstance( $driver, $checkConfig );\n $this->checks[] = $instance;\n }\n }\n }\n return $this->checks;\n }", "public function findHostDowntimesForAdminUser(): array;", "public function getProjectList($params = [])\n {\n $this->sendRequest(\n [\n 'methodName' => 'project.list',\n 'parameters' => [\n\n 'limit' => $params['limit'] ?? 10,\n 'status' => $params['status'] ?? 'ACTIVE',\n 'sort' => $params['sort'] ?? '-id',\n ]\n ]\n );\n\n return $this->result;\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 listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['applications'] === null) {\n $invalidProperties[] = \"'applications' can't be null\";\n }\n if ($this->container['liveApplications'] === null) {\n $invalidProperties[] = \"'liveApplications' can't be null\";\n }\n if ($this->container['sandboxApplications'] === null) {\n $invalidProperties[] = \"'sandboxApplications' can't be null\";\n }\n if ($this->container['campaigns'] === null) {\n $invalidProperties[] = \"'campaigns' can't be null\";\n }\n if ($this->container['activeCampaigns'] === null) {\n $invalidProperties[] = \"'activeCampaigns' can't be null\";\n }\n if ($this->container['liveActiveCampaigns'] === null) {\n $invalidProperties[] = \"'liveActiveCampaigns' can't be null\";\n }\n if ($this->container['coupons'] === null) {\n $invalidProperties[] = \"'coupons' can't be null\";\n }\n if ($this->container['activeCoupons'] === null) {\n $invalidProperties[] = \"'activeCoupons' can't be null\";\n }\n if ($this->container['expiredCoupons'] === null) {\n $invalidProperties[] = \"'expiredCoupons' can't be null\";\n }\n if ($this->container['referralCodes'] === null) {\n $invalidProperties[] = \"'referralCodes' can't be null\";\n }\n if ($this->container['activeReferralCodes'] === null) {\n $invalidProperties[] = \"'activeReferralCodes' can't be null\";\n }\n if ($this->container['expiredReferralCodes'] === null) {\n $invalidProperties[] = \"'expiredReferralCodes' can't be null\";\n }\n if ($this->container['activeRules'] === null) {\n $invalidProperties[] = \"'activeRules' can't be null\";\n }\n if ($this->container['users'] === null) {\n $invalidProperties[] = \"'users' can't be null\";\n }\n if ($this->container['roles'] === null) {\n $invalidProperties[] = \"'roles' can't be null\";\n }\n if ($this->container['customAttributes'] === null) {\n $invalidProperties[] = \"'customAttributes' can't be null\";\n }\n if ($this->container['webhooks'] === null) {\n $invalidProperties[] = \"'webhooks' can't be null\";\n }\n if ($this->container['loyaltyPrograms'] === null) {\n $invalidProperties[] = \"'loyaltyPrograms' can't be null\";\n }\n if ($this->container['liveLoyaltyPrograms'] === null) {\n $invalidProperties[] = \"'liveLoyaltyPrograms' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['name'] === null) {\n $invalidProperties[] = \"'name' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalidProperties[] = \"'status' can't be null\";\n }\n $allowedValues = $this->getStatusAllowableValues();\n if (!in_array($this->container['status'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'status', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if ($this->container['poolname'] === null) {\n $invalidProperties[] = \"'poolname' can't be null\";\n }\n if ($this->container['template_name'] === null) {\n $invalidProperties[] = \"'template_name' can't be null\";\n }\n if ($this->container['utm'] === null) {\n $invalidProperties[] = \"'utm' can't be null\";\n }\n if ($this->container['body'] === null) {\n $invalidProperties[] = \"'body' can't be null\";\n }\n if ($this->container['sender'] === null) {\n $invalidProperties[] = \"'sender' can't be null\";\n }\n if ($this->container['attachments'] === null) {\n $invalidProperties[] = \"'attachments' can't be null\";\n }\n return $invalidProperties;\n }", "public static function setQueuedFetchStatusAllProjects() \r\n\t{\r\n\t\tglobal $realtime_webservice_data_fetch_interval, $realtime_webservice_stop_fetch_inactivity_days;\r\n\t\t\r\n\t\t// Make sure we have a value for $realtime_webservice_data_fetch_interval\r\n\t\tif (!(is_numeric($realtime_webservice_data_fetch_interval) && $realtime_webservice_data_fetch_interval >= 1)) {\r\n\t\t\t$realtime_webservice_data_fetch_interval = 24;\r\n\t\t}\r\n\t\t\r\n\t\t// Set fetch interval as specific timestamp in the past\r\n\t\t$fetchIntervalTime = date(\"Y-m-d H:i:s\", (strtotime(NOW)-(3600*$realtime_webservice_data_fetch_interval)));\r\n\t\t// Validate value of $realtime_webservice_stop_fetch_inactivity_days\r\n\t\tif (!is_numeric($realtime_webservice_stop_fetch_inactivity_days) || $realtime_webservice_stop_fetch_inactivity_days < 1) {\r\n\t\t\t$realtime_webservice_stop_fetch_inactivity_days = 7;\r\n\t\t}\r\n\t\t// Get timestamp of time limit of inactivity for a project\r\n\t\t$x_days_ago = date(\"Y-m-d H:i:s\", mktime(date(\"H\"),date(\"i\"),date(\"s\"),date(\"m\"),date(\"d\")-$realtime_webservice_stop_fetch_inactivity_days,date(\"Y\")));\r\n\t\t\t\t\r\n\t\t// Get list of records that are ready to be queued (ignore any records where the value is blank for the source ID field).\r\n\t\t// Make sure that we still check records with datetime reference fields with values in the future, even if the project or record has\r\n\t\t// not been modified in the past X days of inactivity.\r\n\t\t$project_mrid_list = array();\r\n\t\t$sql = \"select r.project_id, r.record, r.mr_id from \r\n\t\t\t\tredcap_projects p, redcap_ddp_mapping m, redcap_data d, redcap_ddp_records r \r\n\t\t\t\twhere p.status <= 1 and p.realtime_webservice_enabled = 1 and p.date_deleted is null\r\n\t\t\t\tand ((p.last_logged_event is not null and p.last_logged_event > '$x_days_ago') \r\n\t\t\t\t\tor (select count(1) from redcap_ddp_records r2 where r2.project_id = p.project_id and r2.future_date_count > 0) > 0)\r\n\t\t\t\tand p.project_id = m.project_id and m.is_record_identifier = 1 and d.project_id = m.project_id \r\n\t\t\t\tand d.event_id = m.event_id and d.field_name = m.field_name and r.project_id = m.project_id \r\n\t\t\t\tand r.record = d.record and d.value != '' and r.fetch_status is null \r\n\t\t\t\tand (r.updated_at is null or r.updated_at <= '$fetchIntervalTime')\";\r\n\t\t$q = db_query($sql);\t\t\r\n\t\twhile ($row = db_fetch_assoc($q)) {\r\n\t\t\t// Add to array\r\n\t\t\t$project_mrid_list[$row['project_id']][$row['record']] = $row['mr_id'];\r\n\t\t}\r\n\t\t\r\n\t\t// Keep count of number of records queued\r\n\t\t$numRecordsQueued = 0;\r\n\t\t// Loop through records and return only those modified in past X days (based upon $realtime_webservice_stop_fetch_inactivity_days)\r\n\t\tforeach ($project_mrid_list as $this_project_id=>$records_mrids) {\r\n\t\t\t// If there are more records than max records per batch, then do in several batches\r\n\t\t\t$records_log_query = array_chunk($records_mrids, self::RECORD_LIMIT_PER_LOG_QUERY, true);\r\n\t\t\t// Query log_event table for each batch\r\n\t\t\tforeach ($records_log_query as $records_mrids_this_batch) {\r\n\t\t\t\t// Return a list of records in this batch that have dates of service that exist in the future\r\n\t\t\t\t$records_mrids_this_batch_future_dates = self::checkRecordsFutureDates($this_project_id, $records_mrids_this_batch);\r\n\t\t\t\t// Return a list of records in this batch that have been modified in past X days \r\n\t\t\t\t// (exclude those already found that have future dates - reduces query time)\r\n\t\t\t\t$records_mrids_this_batch_NO_future_dates = array_diff_assoc($records_mrids_this_batch, $records_mrids_this_batch_future_dates);\r\n\t\t\t\t$records_mrids_this_batch_modified = self::checkRecordsModifiedRecently($this_project_id, $records_mrids_this_batch_NO_future_dates, $x_days_ago);\r\n\t\t\t\t// Merge the mr_id arrays to build the ones that we need to queue in this batch\r\n\t\t\t\t$mr_ids_to_queue_this_batch = array_unique(array_merge($records_mrids_this_batch_modified, $records_mrids_this_batch_future_dates));\r\n\t\t\t\t// Set the fetch status of the records returned to QUEUED\r\n\t\t\t\tif (!empty($mr_ids_to_queue_this_batch)) \r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = \"update redcap_ddp_records set fetch_status = 'QUEUED' \r\n\t\t\t\t\t\t\twhere mr_id in (\" . prep_implode($mr_ids_to_queue_this_batch) . \")\";\r\n\t\t\t\t\tif (db_query($sql)) {\r\n\t\t\t\t\t\t// Increment queued record count\r\n\t\t\t\t\t\t$numRecordsQueued += db_affected_rows();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Return number of recrods queued\r\n\t\treturn $numRecordsQueued;\r\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getEssTimesheetSettingAllowableValues();\n if (!is_null($this->container['ess_timesheet_setting']) && !in_array($this->container['ess_timesheet_setting'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'ess_timesheet_setting', must be one of '%s'\",\n $this->container['ess_timesheet_setting'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "public function testBackgroundCheckStatusesList()\n {\n $r = self::$f1->get('/v1/requirements/backgroundcheckstatuses.json');\n $this->assertEquals('200', $r['http_code'] );\n $this->assertNotEmpty($r['body'], \"No Response Body\");\n return $r['body']['backgroundCheckStatuses'];\n }", "public static function getAll() {\n self::checkConnection();\n $sql = \"SELECT p.*, (p.start_date+p.duration) AS end_date, (p.goal - COALESCE(SUM(d.amount), 0)) AS rem FROM project p LEFT JOIN donation d ON d.project_id = p.id GROUP BY p.id ORDER BY end_date DESC, rem DESC;\"; //coalesce similar with isnull;\n if(isset($_GET['_category'])) {\n $category_id = $_GET['_category'];\n settype($category_id, 'integer');\n $sql = sprintf(\"SELECT p.*,(p.start_date+p.duration) AS end_date, (p.goal - COALESCE(SUM(d.amount), 0)) AS rem FROM project p LEFT JOIN donation d ON d.project_id = p.id WHERE p.id IN (SELECT c.project_id FROM project_category c WHERE c.category_id = %d) GROUP BY p.id ORDER BY end_date DESC, rem DESC;\", $category_id);\n }\n $results = self::$connection->execute($sql);\n $projects = array();\n foreach ($results as $project_arr) {\n array_push($projects, new Project($project_arr));\n }\n return $projects;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['busy_status'] === null) {\n $invalidProperties[] = \"'busy_status' can't be null\";\n }\n if ($this->container['end_date_time'] === null) {\n $invalidProperties[] = \"'end_date_time' can't be null\";\n }\n if ($this->container['has_attachment'] === null) {\n $invalidProperties[] = \"'has_attachment' can't be null\";\n }\n if ($this->container['meeting_type'] === null) {\n $invalidProperties[] = \"'meeting_type' can't be null\";\n }\n if ($this->container['original_start_date'] === null) {\n $invalidProperties[] = \"'original_start_date' can't be null\";\n }\n if ($this->container['reminder_delta'] === null) {\n $invalidProperties[] = \"'reminder_delta' can't be null\";\n }\n if ($this->container['reminder_set'] === null) {\n $invalidProperties[] = \"'reminder_set' can't be null\";\n }\n if ($this->container['start_date_time'] === null) {\n $invalidProperties[] = \"'start_date_time' can't be null\";\n }\n if ($this->container['sub_type'] === null) {\n $invalidProperties[] = \"'sub_type' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['resourceId']) && (mb_strlen($this->container['resourceId']) > 256)) {\r\n $invalidProperties[] = \"invalid value for 'resourceId', the character length must be smaller than or equal to 256.\";\r\n }\r\n if (!is_null($this->container['resourceId']) && (mb_strlen($this->container['resourceId']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'resourceId', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['version']) && (mb_strlen($this->container['version']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'version', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['version']) && (mb_strlen($this->container['version']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'version', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['quotaStatus']) && (mb_strlen($this->container['quotaStatus']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'quotaStatus', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['quotaStatus']) && (mb_strlen($this->container['quotaStatus']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'quotaStatus', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['usedStatus']) && (mb_strlen($this->container['usedStatus']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'usedStatus', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['usedStatus']) && (mb_strlen($this->container['usedStatus']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'usedStatus', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['hostId']) && (mb_strlen($this->container['hostId']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'hostId', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['hostId']) && (mb_strlen($this->container['hostId']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'hostId', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['hostName']) && (mb_strlen($this->container['hostName']) > 128)) {\r\n $invalidProperties[] = \"invalid value for 'hostName', the character length must be smaller than or equal to 128.\";\r\n }\r\n if (!is_null($this->container['hostName']) && (mb_strlen($this->container['hostName']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'hostName', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['chargingMode']) && (mb_strlen($this->container['chargingMode']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'chargingMode', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['chargingMode']) && (mb_strlen($this->container['chargingMode']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'chargingMode', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['expireTime']) && ($this->container['expireTime'] > 2147483647)) {\r\n $invalidProperties[] = \"invalid value for 'expireTime', must be smaller than or equal to 2147483647.\";\r\n }\r\n if (!is_null($this->container['expireTime']) && ($this->container['expireTime'] < 0)) {\r\n $invalidProperties[] = \"invalid value for 'expireTime', must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['sharedQuota']) && (mb_strlen($this->container['sharedQuota']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'sharedQuota', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['sharedQuota']) && (mb_strlen($this->container['sharedQuota']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'sharedQuota', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['enterpriseProjectId']) && (mb_strlen($this->container['enterpriseProjectId']) > 256)) {\r\n $invalidProperties[] = \"invalid value for 'enterpriseProjectId', the character length must be smaller than or equal to 256.\";\r\n }\r\n if (!is_null($this->container['enterpriseProjectId']) && (mb_strlen($this->container['enterpriseProjectId']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'enterpriseProjectId', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['enterpriseProjectName']) && (mb_strlen($this->container['enterpriseProjectName']) > 256)) {\r\n $invalidProperties[] = \"invalid value for 'enterpriseProjectName', the character length must be smaller than or equal to 256.\";\r\n }\r\n if (!is_null($this->container['enterpriseProjectName']) && (mb_strlen($this->container['enterpriseProjectName']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'enterpriseProjectName', the character length must be bigger than or equal to 0.\";\r\n }\r\n return $invalidProperties;\r\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['third_party_app_id'] === null) {\n $invalidProperties[] = \"'third_party_app_id' can't be null\";\n }\n if ($this->container['install_url'] === null) {\n $invalidProperties[] = \"'install_url' can't be null\";\n }\n if ($this->container['name'] === null) {\n $invalidProperties[] = \"'name' can't be null\";\n }\n if ($this->container['os'] === null) {\n $invalidProperties[] = \"'os' can't be null\";\n }\n $allowedValues = $this->getOsAllowableValues();\n if (!is_null($this->container['os']) && !in_array($this->container['os'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'os', must be one of '%s'\",\n $this->container['os'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "function index(){\n\t\t$user = $this->Auth->user('id');\n\t\t\n\t\t$user = $this->Auth->user('id');\n\t\t//get user's projects.\n\t\t$result = $this->Project->find('all', array(\n\t\t\t'recursive' => -1,\n\t\t\t'fields' => array('Project.id', 'Project.name'),\n\t\t\t'joins' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'admins_projects',\n\t\t\t\t\t'alias' => 'AdminProject',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'foreignKey' => false,\n\t\t\t\t\t'conditions'=> array('Project.id = AdminProject.project_id','AdminProject.user_id =' . $user) \n\t\t\t\t)\n\t\t\t)\n\t\t));\n\t\t$list = Set::classicExtract($result,'{n}.Project.id');\n\t\t\n\t\t//set all other projects.\n\t\t$currProjects = $this->Project->find('all', array(\n\t\t\t'recursive' => -1,\n\t\t\t'conditions' => array(\n\t\t\t\t'Project.status NOT' => array(PROJECT_SEED, PROJECT_ARCHIVE),\n\t\t\t\t'Project.id' => $list\t\t\t\t\n\t\t\t)\n\t\t));\n\t\t$projects = Set::combine($currProjects, '{n}.Project.id', '{n}.Project', '{n}.Project.status');\n\t\t\t\n\t\t//sort phase 2 projects by their cut-off date\n\t\tif(array_key_exists(PROJECT_COLLECT, $projects))\n\t\t\t$projects[PROJECT_COLLECT] = Set::sort(array_values($projects[PROJECT_COLLECT]), '{n}.collection_end', 'asc');\n\t\t\t\n\t\t//sort phase 3 projects by their cut-off date\n\t\tif(array_key_exists(PROJECT_FEEDBACK, $projects))\n\t\t\t$projects[PROJECT_FEEDBACK] = Set::sort(array_values($projects[PROJECT_FEEDBACK]), '{n}.feedback_end', 'asc');\n\t\t\n\t\t//set archived projects.\n\t\t$this->Project->recursive = 0;\n\t\t$this->paginate['Project']['order'] = \"Project.feedback_end DESC\";\n\t\t$projects[PROJECT_ARCHIVE] = $this->paginate(array('Project.status' => PROJECT_ARCHIVE, 'Project.id' => $list));\n\t\t\n\t\t$this->set(compact('projects'));\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['task_uid'] === null) {\n $invalidProperties[] = \"'task_uid' can't be null\";\n }\n if ($this->container['resource_uid'] === null) {\n $invalidProperties[] = \"'resource_uid' can't be null\";\n }\n if ($this->container['uid'] === null) {\n $invalidProperties[] = \"'uid' can't be null\";\n }\n if ($this->container['percent_work_complete'] === null) {\n $invalidProperties[] = \"'percent_work_complete' can't be null\";\n }\n if ($this->container['actual_cost'] === null) {\n $invalidProperties[] = \"'actual_cost' can't be null\";\n }\n if ($this->container['actual_finish'] === null) {\n $invalidProperties[] = \"'actual_finish' can't be null\";\n }\n if ($this->container['actual_overtime_cost'] === null) {\n $invalidProperties[] = \"'actual_overtime_cost' can't be null\";\n }\n if ($this->container['actual_overtime_work'] === null) {\n $invalidProperties[] = \"'actual_overtime_work' can't be null\";\n }\n if ($this->container['actual_start'] === null) {\n $invalidProperties[] = \"'actual_start' can't be null\";\n }\n if ($this->container['actual_work'] === null) {\n $invalidProperties[] = \"'actual_work' can't be null\";\n }\n if ($this->container['acwp'] === null) {\n $invalidProperties[] = \"'acwp' can't be null\";\n }\n if ($this->container['confirmed'] === null) {\n $invalidProperties[] = \"'confirmed' can't be null\";\n }\n if ($this->container['cost'] === null) {\n $invalidProperties[] = \"'cost' can't be null\";\n }\n if ($this->container['cost_rate_table_type'] === null) {\n $invalidProperties[] = \"'cost_rate_table_type' can't be null\";\n }\n if ($this->container['cost_variance'] === null) {\n $invalidProperties[] = \"'cost_variance' can't be null\";\n }\n if ($this->container['cv'] === null) {\n $invalidProperties[] = \"'cv' can't be null\";\n }\n if ($this->container['delay'] === null) {\n $invalidProperties[] = \"'delay' can't be null\";\n }\n if ($this->container['finish'] === null) {\n $invalidProperties[] = \"'finish' can't be null\";\n }\n if ($this->container['finish_variance'] === null) {\n $invalidProperties[] = \"'finish_variance' can't be null\";\n }\n if ($this->container['work_variance'] === null) {\n $invalidProperties[] = \"'work_variance' can't be null\";\n }\n if ($this->container['has_fixed_rate_units'] === null) {\n $invalidProperties[] = \"'has_fixed_rate_units' can't be null\";\n }\n if ($this->container['fixed_material'] === null) {\n $invalidProperties[] = \"'fixed_material' can't be null\";\n }\n if ($this->container['leveling_delay'] === null) {\n $invalidProperties[] = \"'leveling_delay' can't be null\";\n }\n if ($this->container['leveling_delay_format'] === null) {\n $invalidProperties[] = \"'leveling_delay_format' can't be null\";\n }\n if ($this->container['linked_fields'] === null) {\n $invalidProperties[] = \"'linked_fields' can't be null\";\n }\n if ($this->container['milestone'] === null) {\n $invalidProperties[] = \"'milestone' can't be null\";\n }\n if ($this->container['overallocated'] === null) {\n $invalidProperties[] = \"'overallocated' can't be null\";\n }\n if ($this->container['overtime_cost'] === null) {\n $invalidProperties[] = \"'overtime_cost' can't be null\";\n }\n if ($this->container['overtime_work'] === null) {\n $invalidProperties[] = \"'overtime_work' can't be null\";\n }\n if ($this->container['peak_units'] === null) {\n $invalidProperties[] = \"'peak_units' can't be null\";\n }\n if ($this->container['regular_work'] === null) {\n $invalidProperties[] = \"'regular_work' can't be null\";\n }\n if ($this->container['remaining_cost'] === null) {\n $invalidProperties[] = \"'remaining_cost' can't be null\";\n }\n if ($this->container['remaining_overtime_cost'] === null) {\n $invalidProperties[] = \"'remaining_overtime_cost' can't be null\";\n }\n if ($this->container['remaining_overtime_work'] === null) {\n $invalidProperties[] = \"'remaining_overtime_work' can't be null\";\n }\n if ($this->container['remaining_work'] === null) {\n $invalidProperties[] = \"'remaining_work' can't be null\";\n }\n if ($this->container['response_pending'] === null) {\n $invalidProperties[] = \"'response_pending' can't be null\";\n }\n if ($this->container['start'] === null) {\n $invalidProperties[] = \"'start' can't be null\";\n }\n if ($this->container['stop'] === null) {\n $invalidProperties[] = \"'stop' can't be null\";\n }\n if ($this->container['resume'] === null) {\n $invalidProperties[] = \"'resume' can't be null\";\n }\n if ($this->container['start_variance'] === null) {\n $invalidProperties[] = \"'start_variance' can't be null\";\n }\n if ($this->container['summary'] === null) {\n $invalidProperties[] = \"'summary' can't be null\";\n }\n if ($this->container['sv'] === null) {\n $invalidProperties[] = \"'sv' can't be null\";\n }\n if ($this->container['units'] === null) {\n $invalidProperties[] = \"'units' can't be null\";\n }\n if ($this->container['update_needed'] === null) {\n $invalidProperties[] = \"'update_needed' can't be null\";\n }\n if ($this->container['vac'] === null) {\n $invalidProperties[] = \"'vac' can't be null\";\n }\n if ($this->container['work'] === null) {\n $invalidProperties[] = \"'work' can't be null\";\n }\n if ($this->container['work_contour'] === null) {\n $invalidProperties[] = \"'work_contour' can't be null\";\n }\n if ($this->container['bcws'] === null) {\n $invalidProperties[] = \"'bcws' can't be null\";\n }\n if ($this->container['bcwp'] === null) {\n $invalidProperties[] = \"'bcwp' can't be null\";\n }\n if ($this->container['booking_type'] === null) {\n $invalidProperties[] = \"'booking_type' can't be null\";\n }\n if ($this->container['actual_work_protected'] === null) {\n $invalidProperties[] = \"'actual_work_protected' can't be null\";\n }\n if ($this->container['actual_overtime_work_protected'] === null) {\n $invalidProperties[] = \"'actual_overtime_work_protected' can't be null\";\n }\n if ($this->container['creation_date'] === null) {\n $invalidProperties[] = \"'creation_date' can't be null\";\n }\n if ($this->container['budget_cost'] === null) {\n $invalidProperties[] = \"'budget_cost' can't be null\";\n }\n if ($this->container['budget_work'] === null) {\n $invalidProperties[] = \"'budget_work' can't be null\";\n }\n if ($this->container['rate_scale'] === null) {\n $invalidProperties[] = \"'rate_scale' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n if ($this->container['start_time'] === null) {\n $invalid_properties[] = \"'start_time' can't be null\";\n }\n if ($this->container['last_update_time'] === null) {\n $invalid_properties[] = \"'last_update_time' can't be null\";\n }\n if ($this->container['avg_cpu_percentage'] === null) {\n $invalid_properties[] = \"'avg_cpu_percentage' can't be null\";\n }\n if ($this->container['avg_memory_gi_b'] === null) {\n $invalid_properties[] = \"'avg_memory_gi_b' can't be null\";\n }\n if ($this->container['peak_memory_gi_b'] === null) {\n $invalid_properties[] = \"'peak_memory_gi_b' can't be null\";\n }\n if ($this->container['avg_disk_gi_b'] === null) {\n $invalid_properties[] = \"'avg_disk_gi_b' can't be null\";\n }\n if ($this->container['peak_disk_gi_b'] === null) {\n $invalid_properties[] = \"'peak_disk_gi_b' can't be null\";\n }\n if ($this->container['disk_read_i_ops'] === null) {\n $invalid_properties[] = \"'disk_read_i_ops' can't be null\";\n }\n if ($this->container['disk_write_i_ops'] === null) {\n $invalid_properties[] = \"'disk_write_i_ops' can't be null\";\n }\n if ($this->container['disk_read_gi_b'] === null) {\n $invalid_properties[] = \"'disk_read_gi_b' can't be null\";\n }\n if ($this->container['disk_write_gi_b'] === null) {\n $invalid_properties[] = \"'disk_write_gi_b' can't be null\";\n }\n if ($this->container['network_read_gi_b'] === null) {\n $invalid_properties[] = \"'network_read_gi_b' can't be null\";\n }\n if ($this->container['network_write_gi_b'] === null) {\n $invalid_properties[] = \"'network_write_gi_b' can't be null\";\n }\n return $invalid_properties;\n }", "function getAllSubProjectTasks()\n {\n\t\t$projectTasksBeans = array();\n\n if (!empty($this->project_task_id) && !empty($this->project_id))\n\t\t{\n //select all tasks from a project\n $query = \"SELECT id, project_task_id, parent_task_id FROM project_task WHERE project_id = '{$this->project_id}' AND deleted = 0 ORDER BY project_task_id\";\n\n $result = $this->db->query($query, true, \"Error retrieving child project tasks\");\n\n $projectTasks=array();\n while($row = $this->db->fetchByAssoc($result))\n {\n $projectTasks[$row['id']]['project_task_id'] = $row['project_task_id'];\n $projectTasks[$row['id']]['parent_task_id'] = $row['parent_task_id'];\n }\n\n $potentialParentTaskIds[$this->project_task_id] = $this->project_task_id;\n $actualParentTaskIds=array();\n $subProjectTasks=array();\n\n $startProjectTasksCount=0;\n $endProjectTasksCount=0;\n\n //get all child tasks\n $run = true;\n while ($run)\n {\n $count=0;\n\n foreach ($projectTasks as $id=>$values)\n {\n if (in_array($values['parent_task_id'], $potentialParentTaskIds))\n {\n $potentialParentTaskIds[$values['project_task_id']] = $values['project_task_id'];\n $actualParentTaskIds[$values['parent_task_id']] = $values['parent_task_id'];\n\n $subProjectTasks[$id]=$values;\n $count=$count+1;\n }\n }\n\n $endProjectTasksCount = count($subProjectTasks);\n\n if ($startProjectTasksCount == $endProjectTasksCount)\n {\n $run = false;\n }\n else\n {\n $startProjectTasksCount = $endProjectTasksCount;\n }\n }\n\n foreach($subProjectTasks as $id=>$values)\n {\n //ignore tasks that are parents\n if(!in_array($values['project_task_id'], $actualParentTaskIds))\n {\n $projectTaskBean = BeanFactory::getBean('ProjectTask', $id);\n array_push($projectTasksBeans, $projectTaskBean);\n }\n }\n\t\t}\n\n\t\treturn $projectTasksBeans;\n\t}", "public function run()\n\t{\n\t\t$projects = [\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'Caerus',\n\t\t\t\t\"description\" => 'Caerus is a free service to job seekers, where you can upload a resume, search for jobs, save them and apply to them directly. Employers may also keep track of their candidates and maintain a history of the interview progress.',\n\t\t\t\t\"photo\" => 'projects/caerus.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'Hermes',\n\t\t\t\t\"description\" => 'Hermes is a free instant messaging app available on the web. It allows you to send text messages to other users one-on-one.',\n\t\t\t\t\"photo\" => 'projects/hermes.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'SiSr',\n\t\t\t\t\"description\" => 'SiSr is a web app that allows you to order your food at your favorite restaurant without the need of interacting with the waiters, simply choose your grub, confirm and await!',\n\t\t\t\t\"photo\" => 'projects/sisr.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'Agora',\n\t\t\t\t\"description\" => 'An online marketplace where you can buy and sell anything, anywhere at anytime!',\n\t\t\t\t\"photo\" => 'projects/agora.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'Artemis',\n\t\t\t\t\"description\" => 'A bug tracking software meant for software development companies',\n\t\t\t\t\"photo\" => 'projects/artemis.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'Aletheia',\n\t\t\t\t\"description\" => 'No information provided',\n\t\t\t\t\"photo\" => 'projects/aletheia.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'UI Basa Capital',\n\t\t\t\t\"description\" => 'The static version of the website of Basa Capital (https://portalweb.basacapital.com.py)',\n\t\t\t\t\"photo\" => 'projects/ui-basa-capital.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'UI Raices',\n\t\t\t\t\"description\" => 'The static version of the website of Raices (https://usuarios.raices.com.py/login)',\n\t\t\t\t\"photo\" => 'projects/ui-raices.png',\n\t\t\t],\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\t\t\t\t\t\t\t\"status_id\" => 1,\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\" => 'Merkto',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"description\" => 'A business-to-business (B2B) ecommerce, purchase goods from anywhere in Paraguay!',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"photo\" => 'projects/merkto.png',\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\t\t\t[\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"status_id\" => 1,\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\" => 'Gymmer',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"description\" => 'Manage your customers data such as routines, schedules, muscle priorities, monthly payments/installments and more!',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"photo\" => 'projects/gymmer.png',\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\t\t\t[\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"status_id\" => 1,\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\" => 'Matse',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"description\" => 'Software meant to manage all the real estate properties of Matse S.A.',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"photo\" => 'projects/matse.png',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t];\n\n\t\tforeach ($projects as $project) {\n\t\t\t$new_project = new Project();\n\t\t\t$new_project->status_id = $project['status_id'];\n\t\t\t$new_project->name = $project['name'];\n\t\t\t$new_project->description = $project['description'];\n\t\t\t$new_project->photo = $project['photo'];\n\t\t\t$new_project->name = $project['name'];\n\t\t\t$new_project->started_at = now()->subDays(rand(30, 120));\n\t\t\t$new_project->save();\n\t\t}\n\n\t}", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['appId']) && !preg_match(\"/^[a-zA-Z0-9_-]{1,36}$/\", $this->container['appId'])) {\r\n $invalidProperties[] = \"invalid value for 'appId', must be conform to the pattern /^[a-zA-Z0-9_-]{1,36}$/.\";\r\n }\r\n if (!is_null($this->container['name']) && !preg_match(\"/^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,64}$/\", $this->container['name'])) {\r\n $invalidProperties[] = \"invalid value for 'name', must be conform to the pattern /^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,64}$/.\";\r\n }\r\n if (!is_null($this->container['deviceType']) && !preg_match(\"/^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,32}$/\", $this->container['deviceType'])) {\r\n $invalidProperties[] = \"invalid value for 'deviceType', must be conform to the pattern /^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,32}$/.\";\r\n }\r\n if (!is_null($this->container['protocolType']) && !preg_match(\"/(MQTT|CoAP|HTTP|HTTPS|Modbus|ONVIF|OPC-UA|OPC-DA|Other)/\", $this->container['protocolType'])) {\r\n $invalidProperties[] = \"invalid value for 'protocolType', must be conform to the pattern /(MQTT|CoAP|HTTP|HTTPS|Modbus|ONVIF|OPC-UA|OPC-DA|Other)/.\";\r\n }\r\n if (!is_null($this->container['dataFormat']) && !preg_match(\"/(json|binary)/\", $this->container['dataFormat'])) {\r\n $invalidProperties[] = \"invalid value for 'dataFormat', must be conform to the pattern /(json|binary)/.\";\r\n }\r\n if (!is_null($this->container['manufacturerName']) && !preg_match(\"/^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,32}$/\", $this->container['manufacturerName'])) {\r\n $invalidProperties[] = \"invalid value for 'manufacturerName', must be conform to the pattern /^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,32}$/.\";\r\n }\r\n if (!is_null($this->container['industry']) && !preg_match(\"/^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,64}$/\", $this->container['industry'])) {\r\n $invalidProperties[] = \"invalid value for 'industry', must be conform to the pattern /^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,64}$/.\";\r\n }\r\n if (!is_null($this->container['description']) && !preg_match(\"/^[\\\\s一-龥a-zA-Z0-9_?'#().,;&%@!\\\\- ,、:;。¥$!【】’‘“”()?…~\\/]{1,128}$/\", $this->container['description'])) {\r\n $invalidProperties[] = \"invalid value for 'description', must be conform to the pattern /^[\\\\s一-龥a-zA-Z0-9_?'#().,;&%@!\\\\- ,、:;。¥$!【】’‘“”()?…~\\/]{1,128}$/.\";\r\n }\r\n return $invalidProperties;\r\n }", "protected function PopulateProjects()\n\t{\n\t\tif (!($fp = fopen($this->projectConfig, 'r'))) {\n\t\t\tthrow new Exception('Failed to open project list file ' . $this->projectConfig);\n\t\t}\n\n\t\t$projectRoot = GitPHP_Config::GetInstance()->GetValue('projectroot');\n\n\t\twhile (!feof($fp) && ($line = fgets($fp))) {\n\t\t\t$pinfo = explode(' ', $line);\n\t\t\t$ppath = trim($pinfo[0]);\n\t\t\tif (is_file($projectRoot . $ppath . '/HEAD')) {\n\t\t\t\ttry {\n\t\t\t\t\t$projObj = new GitPHP_Project($ppath);\n\t\t\t\t\tif (isset($pinfo[1])) {\n\t\t\t\t\t\t$projOwner = trim($pinfo[1]);\n\t\t\t\t\t\tif (!empty($projOwner)) {\n\t\t\t\t\t\t\t$projObj->SetOwner($projOwner);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->projects[] = $projObj;\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\terror_log($e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfclose($fp);\n\t}", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n if ($this->container['code'] === null) {\n $invalid_properties[] = \"'code' can't be null\";\n }\n if ($this->container['settings'] === null) {\n $invalid_properties[] = \"'settings' can't be null\";\n }\n if ($this->container['deeplink'] === null) {\n $invalid_properties[] = \"'deeplink' can't be null\";\n }\n if ($this->container['enrollment'] === null) {\n $invalid_properties[] = \"'enrollment' can't be null\";\n }\n if ($this->container['courses'] === null) {\n $invalid_properties[] = \"'courses' can't be null\";\n }\n if ($this->container['id'] === null) {\n $invalid_properties[] = \"'id' can't be null\";\n }\n if ($this->container['create_date'] === null) {\n $invalid_properties[] = \"'create_date' can't be null\";\n }\n if ($this->container['subscription'] === null) {\n $invalid_properties[] = \"'subscription' can't be null\";\n }\n if ($this->container['ecommerce'] === null) {\n $invalid_properties[] = \"'ecommerce' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalid_properties[] = \"'status' can't be null\";\n }\n $allowed_values = [\"not_subscribed\", \"subscribed\", \"in_progress\", \"completed\"];\n if (!in_array($this->container['status'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'status', must be one of 'not_subscribed', 'subscribed', 'in_progress', 'completed'.\";\n }\n\n if ($this->container['name'] === null) {\n $invalid_properties[] = \"'name' can't be null\";\n }\n if ($this->container['complete_percent'] === null) {\n $invalid_properties[] = \"'complete_percent' can't be null\";\n }\n return $invalid_properties;\n }", "function GetProjectList()\n\t{\n\t\t$qry=$this->db->query(\"select DISTINCT rp_projects.projectKey,rp_projects.projectID,rp_projects.projectAddedDate,rp_projects.projectStatus,rp_user_plan_details.planTitle,rp_projects.projectKey,rp_project_details.projectName,rp_users.userEmail,rp_user_details.userFirstName,rp_user_types.userTypeStatus,rp_user_type_details.userTypeName from rp_dbho_user_plans_subdetail,rp_dbho_plan_mapping,rp_projects,rp_project_details,rp_users,rp_user_plan_details,rp_user_details,rp_user_to_type,rp_user_types,rp_user_type_details where rp_projects.projectID=rp_project_details.projectID and rp_projects.projectID=rp_dbho_plan_mapping.objectID and rp_dbho_plan_mapping.objectType='project' and rp_dbho_plan_mapping.planID=rp_dbho_user_plans_subdetail.planID and rp_dbho_user_plans_subdetail.listingType='Project' and rp_user_plan_details.planID=rp_dbho_plan_mapping.planID and rp_projects.userID=rp_users.userID and rp_users.userID=rp_user_details.userID and rp_projects.userID=rp_user_to_type.userID and rp_user_to_type.userTypeID =rp_user_types.userTypeID and rp_user_types.userTypeStatus='Active' and rp_user_types.userTypeID=rp_user_type_details.userTypeID and rp_projects.projectStatus!='Deleted' and rp_user_type_details.languageID=1 and rp_project_details.languageID=1 and rp_project_details.versionID=0 and rp_user_details.languageID=1 ORDER BY rp_projects.projectID DESC \"); \n\t\treturn $qry->result(); \n\t}", "function grabListProjectCount()\n{\n\tglobal $smcFunc;\n\n\t// As we requested that we might also need it...\n\t$request = $smcFunc['db_query']('', '\n\t\tSELECT COUNT(id) AS project_count\n\t\tFROM {db_prefix}bugtracker_projects',\n\t\tarray()\n\t);\n\n\t// Countin' our way up.\n\tlist ($count) = $smcFunc['db_fetch_row']($request);\n\n\t// And give us some free space.\n\t$smcFunc['db_free_result']($request);\n\n\t// This is how many we have.\n\treturn $count;\n}", "private function loadProjects() {\n $result = $this->database()->query('\n SELECT\n tracking_projects.project_id,\n tracking_projects.project_name,\n tracking_projects.project_path,\n tracking_projects.project_branch,\n tracking_projects.repository_ignore,\n (\n SELECT\n tracking_revisions.revision_sha\n FROM\n tracking_revisions\n WHERE\n tracking_revisions.project_id = tracking_projects.project_id\n ORDER BY\n tracking_revisions.revision_date DESC\n LIMIT\n 1\n ) AS revision_sha\n FROM\n tracking_projects\n WHERE\n project_path <> \"\"');\n\n if ($result === false) {\n Error('RepositoryTracker: Unable to retrieve a list of projects from the database.');\n return false;\n }\n\n $projects = array();\n while ($row = $result->fetch_assoc()) {\n $projects[] = array(\n 'id' => $row['project_id'],\n 'name' => $row['project_name'],\n 'path' => $row['project_path'],\n 'ignore' => $row['repository_ignore'],\n 'branch' => $row['project_branch'],\n 'rev' => $row['revision_sha'],\n );\n }\n\n if (!count($projects)) {\n Error('RepositoryTracker: No projects have been specified in the database.');\n return false;\n }\n\n return $projects;\n }", "public function findDowntimesForAdminUser(): array;", "public static function index(Project $project): array\n {\n $company = $project->company;\n $tasks = $project->tasks()\n ->with('list')\n ->with('assignee')\n ->with('author')\n ->with('timeTrackingEntries')\n ->get();\n\n // the goal of the following is to first display tasks without lists,\n // and after this, tasks with lists, grouped by lists.\n // the trick is to do this with a single query, as we don’t want to do\n // multiple queries to slow down the loading speed of the page.\n\n $tasksWithoutLists = $tasks->filter(function ($task) {\n return is_null($task->project_task_list_id);\n });\n $tasksWithoutListsCollection = collect([]);\n foreach ($tasksWithoutLists as $task) {\n $tasksWithoutListsCollection->push(self::getTaskInfo($task, $company));\n }\n\n $tasksWithLists = $tasks->diff($tasksWithoutLists);\n\n // get the list of unique task list ids\n $taskLists = $project->lists;\n $tasksListCollection = collect([]);\n foreach ($taskLists as $taskList) {\n $tasksWithListsCollection = collect([]);\n\n $tasks = $tasksWithLists->filter(function ($task) use ($taskList) {\n return $task->project_task_list_id == $taskList->id;\n });\n\n foreach ($tasks as $task) {\n $tasksWithListsCollection->push(self::getTaskInfo($task, $company));\n }\n\n $tasksListCollection->push([\n 'id' => $taskList->id,\n 'title' => $taskList->title,\n 'description' => $taskList->description,\n 'tasks' => $tasksWithListsCollection,\n ]);\n }\n\n return [\n 'tasks_without_lists' => $tasksWithoutListsCollection,\n 'task_lists' => $tasksListCollection,\n ];\n }", "public function getCheckNames() {\n $commands = drush_get_commands();\n\n // Guess the name of the Drush command.\n $command_name_pieces = preg_split('/(?=[A-Z])/', get_called_class());\n unset($command_name_pieces[0], $command_name_pieces[1], $command_name_pieces[3]);\n $command_name = strtolower(implode('-', $command_name_pieces));\n $command = $commands[$command_name];\n\n drush_command_invoke_all_ref('drush_command_alter', $command);\n\n $checks = array();\n foreach ($command['checks'] as $check) {\n if (is_array($check)) {\n $checks[] = $check['name'];\n require_once $check['location'];\n }\n else {\n $checks[] = $check;\n $base_class_name = 'SiteAuditCheck' . $this->getReportName();\n $class_name = $base_class_name . $check;\n if (!class_exists($class_name)) {\n require_once SITE_AUDIT_BASE_PATH . \"/Check/{$this->getReportName()}/$check.php\";\n }\n }\n }\n\n return $checks;\n }", "function get_projects($connect){\n\t$sql = \"SELECT * FROM projects WHERE status='' OR status=0 OR status=1\";\n\t$result = $connect->query($sql);\n\t\treturn $result;\n}", "function monitor_list_statuses() {\n $query = \"select distinct(`wf_status`) from `\".GALAXIA_TABLE_PREFIX.\"instances`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_status'];\n }\n return $ret;\n }", "public function renderList($project)\n {\n $vp = new \\VisualPaginator($this, 'vp');\n $paginator = $vp->getPaginator();\n $paginator->itemsPerPage = 30;\n $paginator->itemCount = $this->context->svnHelper->getLogSize();\n $this->template->vpPage = $paginator->page;\n\n $this->template->mailTo = \"\";\n if (isset($this->context->parameters['projects'][$this->project]['sendTo'])) {\n $this->template->mailTo = $this->context->parameters['projects'][$this->project]['sendTo'];\n }\n\n try {\n $logList = $this->context->svnHelper->getLog(\n $this->context->svnHelper->getCurrentBranch(),\n $paginator->offset,\n $paginator->itemsPerPage\n );\n } catch (\\Exception $e) {\n $logList = array();\n $this->flashMessage($e->getMessage(), 'error');\n }\n\n//\t\t$this->template->ticketLog = false;\n $this->template->logTpl = \"\";\n\n // generating log for confluence\n $selectedLogs = array();\n $log = $this->getParameter('log');\n if (!empty($log)) {\n\n $changeLogList = array();\n foreach ($log as $revision) {\n $changeLogList[$revision] = $logList[$revision];\n $selectedLogs[] = $revision;\n }\n\n if ($this->getParameter('emailSend') == 'email') {\n $this->context->mailHelper->getMail(\n $this->formatLog($changeLogList),\n $this->template->projectName,\n $this->project,\n $this->getParameter('toReleaseNote'),\n 'Line'\n );\n $this->flashMessage('Mail was sent!', 'success');\n }\n\n $this->template->logTpl = $this->getChangelogTemplate(\n $this->getTemplateForProject($project),\n $this->getLogGenerator()->generateTicketLog($changeLogList)\n );\n }\n\n \\Nette\\Diagnostics\\Debugger::barDump($logList, \"Log list\");\n\n $logTable = new \\DixonsCz\\Chuck\\Log\\Table($this, 'logTable');\n $logTable->setLog($this->formatLog($logList));\n $logTable->setSelectedLogs($selectedLogs);\n\n $this->template->log = array();\n }", "public function list()\n {\n $properties = Properties::all();\n\n foreach ($properties as $key => $property) {\n $property->connection_error = true;\n\n $heartbeat = new DateTime($property->device->heartbeat);\n $interval = $heartbeat->diff(new DateTime());\n $totalSeconds = ($interval->format('%h') * 60 + $interval->format('%i'));\n\n if ($totalSeconds < $property->device->sleep) {\n $property->connection_error = false;\n }\n\n $property->connection_ago = Carbon::parse($heartbeat, 'Europe/Prague')->diffForHumans();\n }\n\n return view('properties.list', [\"properties\" => $properties]);\n }", "public function playlists()\n\t{\n\t\treturn $this->CLI->arrayQuery(\"alarm playlists\");\n\t}", "public function listTasks()\n\t{\n\t\t$this->import('BackendUser', 'User');\n\n\t\t$tasksReg = 0;\n\t\t$tasksNew = 0;\n\t\t$tasksDue = 0;\n\t\t$arrReturn = array();\n\n\t\t$objTask = $this->Database->prepare(\"SELECT t.deadline, s.status, s.assignedTo FROM tl_task t LEFT JOIN tl_task_status s ON t.id=s.pid AND s.tstamp=(SELECT MAX(tstamp) FROM tl_task_status ts WHERE ts.pid=t.id)\" . (!$this->User->isAdmin ? \" WHERE (t.createdBy=? OR s.assignedTo=?)\" : \"\"))\n\t\t\t\t\t\t\t\t ->execute($this->User->id, $this->User->id);\n\n\t\tif ($objTask->numRows) \n\t\t{\n\t\t\t$time = time();\n\n\t\t\twhile ($objTask->next())\n\t\t\t{\n\t\t\t\tif ($objTask->status == 'completed')\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($objTask->deadline <= $time)\n\t\t\t\t{\n\t\t\t\t\t++$tasksDue;\n\t\t\t\t}\n\t\t\t\telseif ($objTask->status == 'created' && $objTask->assignedTo == $this->User->id)\n\t\t\t\t{\n\t\t\t\t\t++$tasksNew;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++$tasksReg;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($tasksReg > 0)\n\t\t\t{\n\t\t\t\t$arrReturn[] = '<p class=\"tl_info\">' . sprintf($GLOBALS['TL_LANG']['MSC']['tasksCur'], $tasksReg) . '</p>';\n\t\t\t}\n\n\t\t\tif ($tasksNew > 0)\n\t\t\t{\n\t\t\t\t$arrReturn[] = '<p class=\"tl_new\">' . sprintf($GLOBALS['TL_LANG']['MSC']['tasksNew'], $tasksNew) . '</p>';\n\t\t\t}\n\n\t\t\tif ($tasksDue > 0)\n\t\t\t{\n\t\t\t\t$arrReturn[] = '<p class=\"tl_error\">' . sprintf($GLOBALS['TL_LANG']['MSC']['tasksDue'], $tasksDue) . '</p>';\n\t\t\t}\n\t\t}\n\n\t\treturn implode(\"\\n\", $arrReturn);\n\t}", "public function get_wiki_enabled_projects() {\n\n\t\t// Get a list of namespaces.\n\t\t$groups = $this->_get_groups();\n\t\t$projecttable = $this->_create_table();\n\n\t\t$projecttable->setHeaders(\n\t\t\t[\n\t\t\t\t'ID',\n\t\t\t\t'Name',\n\t\t\t\t'Wiki Count',\n\t\t\t]\n\t\t);\n\n\t\tforeach ( $groups as $group ) {\n\n\t\t\t// Get projects in namespace.\n\t\t\t$projects = $this->_get_group_projects( $group['id'] );\n\n\t\t\tforeach ( $projects as $project ) {\n\n\t\t\t\tif ( true === $project['wiki_enabled'] ) {\n\n\t\t\t\t\t$wikis = $this->_get_project_wikis( $project['id'] );\n\n\t\t\t\t\tif ( count( $wikis ) > 0 ) {\n\n\t\t\t\t\t\t$this->_write_log( sprintf( 'Adding %s with %d wiki(s) to list', $project['path'], count( $wikis ) ) );\n\n\t\t\t\t\t\t$projecttable->addRow(\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t$project[\"id\"],\n\t\t\t\t\t\t\t\t$project[\"name\"],\n\t\t\t\t\t\t\t\tcount( $wikis ),\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t$projecttable->sort( 1 );\n\t\t$projecttable->display();\n\n\t}", "public function create($parent, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], UptimeCheckConfig::class);\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if (!is_null($this->container[self::VERSION]) && ($this->container[self::VERSION] < 1)) {\n $invalidProperties[] = \"invalid value for 'version', must be bigger than or equal to 1.\";\n }\n\n return $invalidProperties;\n }", "public function findHostDowntimesForNonAdminUser(): array;", "public function testComDayCqCompatCodeupgradeImplVersionRangeTaskIgnorelist()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.compat.codeupgrade.impl.VersionRangeTaskIgnorelist';\n\n $crawler = $client->request('POST', $path);\n }", "public function executeChangeStatusProjectForm()\n {\n $this->statusProjectList = StatusProjectPeer::getStatusProjectList();\n }", "public function getChecks()\n {\n $result = (version_compare(phpversion(), '5.2.8', '>=')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'PHP version', $result, \"PHP version 5.2.8 or higher is needed. A latest PHP version is always recommended.\");\n\n $current = ini_get('memory_limit');\n $result = (version_compare($current, '255M', '>')) ? self::CHECK_OK : self::CHECK_WARNING;\n $this->addResult('system', 'PHP memory', $result, \"The minimum requirement for Magento itself is 256Mb. Current memory: \".$current);\n\n $result = (function_exists('json_decode')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'JSON', $result, 'The JSON-extension for PHP is needed');\n\n $result = (function_exists('curl_init')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'CURL', $result, 'The CURL-extension for PHP is needed');\n\n $result = (function_exists('simplexml_load_string')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'SimpleXML', $result, 'The SimpleXML-extension for PHP is needed');\n\n $result = (in_array('ssl', stream_get_transports())) ? self::CHECK_OK : self::CHECK_WARNING;\n $this->addResult('system', 'OpenSSL', $result, 'PHP support for OpenSSL is needed if you want to use HTTPS');\n\n $result = (function_exists('iconv')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'iconv', $result, 'The iconv-extension for PHP is needed');\n\n $result = (ini_get('safe_mode')) ? self::CHECK_ERROR : self::CHECK_OK;\n $this->addResult('system', 'Safe Mode', $result, 'PHP Safe Mode is strongly outdated and not supported by either Joomla! or Magento');\n\n $result = (ini_get('magic_quotes_gpc')) ? self::CHECK_ERROR : self::CHECK_OK;\n $this->addResult('system', 'Magic Quotes GPC', $result, 'Magic Quotes GPC is outdated and should be disabled');\n\n $remote_domain = 'api.yireo.com';\n $result = (@fsockopen($remote_domain, 80, $errno, $errmsg, 5)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Firewall', $result, 'Firewall needs to allow outgoing access on port 80.');\n\n $logfile = Mage::helper('vm2mage')->getDebugLog();\n $result = (@is_writable($logfile)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Logfile', $result, 'Logfile \"'.$logfile.'\" should be writable');\n\n $import_dir = Mage::getBaseDir('media').DS.'import';\n if(!is_dir($import_dir)) @mkdir($import_dir);\n $result = (@is_writable($import_dir)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Import folder', $result, 'Import-folder \"'.$import_dir.'\" should be writable');\n\n $catalog_dir = Mage::getBaseDir('media').DS.'catalog';\n if(!is_dir($catalog_dir)) @mkdir($catalog_dir);\n $result = (@is_writable($catalog_dir)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Catalog folder', $result, 'Catalog-folder \"'.$catalog_dir.'\" should be writable');\n\n $collection = Mage::getResourceModel('api/user_collection');\n $result = ($collection->count() > 0) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'API-user', $result, 'You should create an API-user with API resource-access');\n\n return $this->system_checks;\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if ($this->container['status'] === null) {\r\n $invalidProperties[] = \"'status' can't be null\";\r\n }\r\n $allowedValues = $this->getStatusAllowableValues();\r\n if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'status', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if ($this->container['reason'] === null) {\r\n $invalidProperties[] = \"'reason' can't be null\";\r\n }\r\n if ($this->container['message'] === null) {\r\n $invalidProperties[] = \"'message' can't be null\";\r\n }\r\n if ($this->container['currentVersion'] === null) {\r\n $invalidProperties[] = \"'currentVersion' can't be null\";\r\n }\r\n return $invalidProperties;\r\n }", "function list_of_available_project_titles()\n{\n\t$output = \"\";\n\t//$static_url = \"https://static.fossee.in/cfd/project-titles/\";\n\t$preference_rows = array();\n\t\t$i = 1;\n\t$query = db_query(\"SELECT * from list_of_project_titles WHERE {project_title_name} NOT IN( SELECT project_title from case_study_proposal WHERE approval_status = 0 OR approval_status = 1 OR approval_status = 3)\");\n\twhile($result = $query->fetchObject()) {\n\t\t$preference_rows[] = array(\n\t\t\t\t$i,\n\t\t\t\t//print_r(array_keys($case_studies_list))\n\t\t\t\tl($result->project_title_name, 'case-study-project/download/project-title-file/' .$result->id)\n\t\t\t\t);\n\t\t\t$i++;\n\t}\n\t\t$preference_header = array(\n\t\t\t'No',\n\t\t\t'List of available projects'\n\t\t);\n\t\t$output .= theme('table', array(\n\t\t\t'header' => $preference_header,\n\t\t\t'rows' => $preference_rows\n\t\t));\n\t\n\treturn $output;\n}", "private function getAllConfig() {\n $this->user_panel->checkAuth();\n $this->config->findAll();\n }", "static function getAllProjects($status)\n {\n $projects = [];\n global $db;\n try {\n $db->where('deleted_at', NULL, 'IS');\n\n if ($status && in_array($status, ['opened', 'closed', 'progress', 'archived'])) {\n $db->where('status', $status);\n }\n\n $projects = $db->get('project');\n } catch (\\Exception $exception) {\n Log::write($exception, $db->getLastError());\n }\n\n return $projects;\n }", "function recurringdowntime_get_cfg()\n{\n recurringdowntime_check_cfg();\n $cfg = file_get_contents(RECURRINGDOWNTIME_CFG);\n return recurringdowntime_cfg_to_array($cfg);\n}", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function getGroupList() {\n\t\t$thisUser = Auth::user();\n\n\t\t$groups = ProjectHandler::listProjects();\n\t\t$projects = [];\n\t\t\n\t\t$isAdmin = PermissionHandler::checkAdmin($thisUser, Permissions::ALLOW_ALL);\n\t\t\n\t\tforeach ($groups as $group) {\n\t\t\t$canView = PermissionHandler::checkProject($thisUser, $group, Permissions::PROJECT_READ);\n\t\t\t\n\t\t\t$users = 0;\n\t\t\tforeach(Roles::$PROJECT_ROLE_NAMES as $role) {\n\t\t\t\t// List userts with $role in this group -- make [] when none\n\t\t\t\t$projectRole = Sentry::findGroupByName($group.':'.$role);\n\t\t\t\t$users += sizeOf($projectRole['user_agent_ids']);\n\t\t\t}\n\t\t\t\n\t\t\t// if user is not admin, do not show the admin group\n\t\t\tif($group != 'admin') {\n\t\t\t\tarray_push($projects, [\n\t\t\t\t\t'name' => $group,\n\t\t\t\t\t'canview' => $canView,\n\t\t\t\t\t'users' => $users\n\t\t\t\t]);\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\treturn View::make('projects.list')\n\t\t\t->with('projects', $projects)\n\t\t\t->with('isAdmin', $isAdmin);\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['owner_id'] === null) {\n $invalidProperties[] = \"'owner_id' can't be null\";\n }\n if ($this->container['brand_id'] === null) {\n $invalidProperties[] = \"'brand_id' can't be null\";\n }\n if ($this->container['group_id'] === null) {\n $invalidProperties[] = \"'group_id' can't be null\";\n }\n if ($this->container['token'] === null) {\n $invalidProperties[] = \"'token' can't be null\";\n }\n if ($this->container['count'] === null) {\n $invalidProperties[] = \"'count' can't be null\";\n }\n if ($this->container['video_count'] === null) {\n $invalidProperties[] = \"'video_count' can't be null\";\n }\n if ($this->container['when_unix'] === null) {\n $invalidProperties[] = \"'when_unix' can't be null\";\n }\n return $invalidProperties;\n }", "public function listBuildConfigForAllNamespaces(\n $fieldSelector = null,\n $labelSelector = null,\n $resourceVersion = null,\n $timeoutSeconds = null,\n $watch = null,\n $pretty = null\n ) {\n\n //the base uri for api requests\n $_queryBuilder = Configuration::$BASEURI;\n \n //prepare query string for API call\n $_queryBuilder = $_queryBuilder.'/oapi/v1/buildconfigs';\n\n //process optional query parameters\n APIHelper::appendUrlWithQueryParameters($_queryBuilder, array (\n 'fieldSelector' => $fieldSelector,\n 'labelSelector' => $labelSelector,\n 'resourceVersion' => $resourceVersion,\n 'timeoutSeconds' => $timeoutSeconds,\n 'watch' => var_export($watch, true),\n 'pretty' => $pretty,\n ));\n\n //validate and preprocess url\n $_queryUrl = APIHelper::cleanUrl($_queryBuilder);\n\n //prepare headers\n $_headers = array (\n 'user-agent' => 'APIMATIC 2.0',\n 'Accept' => 'application/json'\n );\n\n //call on-before Http callback\n $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl);\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n\n //and invoke the API call request to fetch the response\n $response = Request::get($_queryUrl, $_headers);\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n //handle errors defined at the API level\n $this->validateResponse($_httpResponse, $_httpContext);\n\n $mapper = $this->getJsonMapper();\n\n return $mapper->mapClass($response->body, 'OpenShiftAPIWithKubernetesLib\\\\Models\\\\V1BuildConfigList');\n }", "function getTestFilesForAllProjects(): array\n {\n $ret = array();\n foreach (config::$projects as $project) {\n $testFiles = $this->getDirContents($project[\"dir\"], config::$excludeFiles);\n foreach ($testFiles as $idx => $testFile) {\n $tests = $this->getTestClassMethodsFromFile($testFile[\"dir\"] . $testFile[\"file\"]);\n $asserts=0;\n foreach ($tests as $count) {\n $asserts +=$count;\n }\n $testFiles[$idx][\"tests\"] = sizeof($tests);\n $testFiles[$idx][\"asserts\"] = $asserts;\n $testFiles[$idx][\"name\"] = $project[\"name\"];\n }\n $ret=array_merge($ret, $testFiles);\n }\n return $ret;\n }", "private function _listSyncConfigs()\n {\n if (null === $this->_syncConfigListCache) {\n $store = Erfurt_App::getInstance()->getStore();\n\n require_once 'Erfurt/Sparql/SimpleQuery.php';\n $query = new Erfurt_Sparql_SimpleQuery();\n $query->setProloguePart('SELECT ?s ?p ?o');\n $query->addFrom($this->_syncModelUri);\n $where = 'WHERE {\n ?s ?p ?o .\n ?s <' . EF_RDF_TYPE . '> <' . $this->_properties['syncConfigClass'] . '> . }';\n $query->setWherePart($where);\n $result = $store->sparqlQuery($query, array('use_ac' => false));\n\n if (count($result) === 0) {\n return false;\n }\n\n $retVal = array();\n foreach ($result as $row) {\n if (!isset($retVal[$row['s']])) {\n $retVal[$row['s']] = array(\n 'uri' => $row['s']\n );\n }\n\n switch ($row['p']) {\n case $this->_properties['targetModel']:\n $retVal[$row['s']]['targetModel'] = $row['o'];\n break;\n case $this->_properties['syncResource']:\n $retVal[$row['s']]['syncResource'] = $row['o'];\n break;\n case $this->_properties['wrapperName']:\n $retVal[$row['s']]['wrapperName'] = $row['o'];\n break;\n case $this->_properties['lastSyncPayload']:\n $retVal[$row['s']]['lastSyncPayload'] = unserialize($row['o']);\n break;\n case $this->_properties['lastSyncDateTime']:\n $retVal[$row['s']]['lastSyncDateTime'] = $row['o'];\n break;\n case $this->_properties['syncQuery']:\n $retVal[$row['s']]['syncQuery'] = $row['o'];\n break;\n case $this->_properties['checkHasChanged']:\n $retVal[$row['s']]['checkHasChanged'] = (bool)$row['o'];\n break;\n }\n }\n\n $cacheVal = array();\n foreach ($retVal as $s=>$valueArray) {\n $hash = $this->_getHash(\n $valueArray['syncResource'],\n $valueArray['wrapperName'],\n $valueArray['targetModel']\n );\n $cacheVal[$hash] = $valueArray;\n }\n\n $this->_syncConfigListCache = $cacheVal;\n }\n\n return $this->_syncConfigListCache;\n }", "public function cleanUpOldRunningConfigurations() {}", "protected function getAceprojectStatus($aceForm) {\r\n $data = $aceForm->getData();\r\n $em = $this->getDoctrine()->getManager();\r\n $qb = $em->createQueryBuilder();\r\n $aceNameEntityArr = $data['ace']->toArray();\r\n $aceIdArr = array();\r\n $aceNumberEntityArr = $data['acenumber']->toArray();\r\n $aceNumberArr = array();\r\n $buEntityArr = $data['bu']->toArray();\r\n $buArr = array();\r\n $countryEntityArr = $data['country']->toArray();\r\n $countryArr = array();\r\n $pmEntityArr = $data['pm']->toArray();\r\n $pmArr = array();\r\n $brandEntityArr = $data['brand']->toArray();\r\n $brandArr = array();\r\n $final = array();\r\n $qb->select('opproj', 'proj')\r\n ->from('AlbatrossOperationBundle:OperationProject', 'opproj')\r\n ->leftJoin('opproj.bu', 'bu')\r\n ->leftJoin('opproj.customclient', 'client')\r\n ->leftJoin('opproj.country', 'country')\r\n ->leftJoin('opproj.project', 'proj')\r\n ->leftJoin('proj.tasks', 'task')\r\n ->where('proj.percent < 100');\r\n if (!empty($aceNameEntityArr)) {\r\n foreach ($aceNameEntityArr as $aceEntity) {\r\n $aceIdArr[] = $aceEntity->getId();\r\n }\r\n $qb->andWhere('proj.id IN (:projArr)');\r\n $qb->setParameter('projArr', $aceIdArr);\r\n }\r\n if (!empty($aceNumberEntityArr)) {\r\n foreach ($aceNumberEntityArr as $acenumEntity) {\r\n $aceNumberArr[] = $acenumEntity->getId();\r\n }\r\n $qb->andWhere('task.number > 100 AND task.number < 117 AND task.projectNumber IN (:projNumArr)');\r\n $qb->setParameter('projNumArr', $aceNumberArr);\r\n }\r\n if (!empty($buEntityArr)) {\r\n $buNameArr = array();\r\n foreach ($buEntityArr as $bu) {\r\n $buArr[] = $bu->getId();\r\n $buNameArr[] = $bu->getName();\r\n };\r\n $qb->andWhere('bu.id IN (:buArr)');\r\n $qb->setParameter('buArr', $buArr);\r\n } else {\r\n $buNameArr = '';\r\n }\r\n if (!empty($countryEntityArr)) {\r\n foreach ($countryEntityArr as $country) {\r\n $countryArr[] = $country->getId();\r\n }\r\n $qb->andWhere('country.id IN (:countryArr)');\r\n $qb->setParameter('countryArr', $countryArr);\r\n }\r\n if (!empty($pmEntityArr)) {\r\n foreach ($pmEntityArr as $pm) {\r\n $pmArr[] = $pm->getUsername();\r\n }\r\n $qb->andWhere('opproj.pm IN (:pmArr)');\r\n $qb->setParameter('pmArr', $pmArr);\r\n }\r\n if (!empty($brandEntityArr)) {\r\n foreach ($brandEntityArr as $brand) {\r\n $brandArr[] = $brand->getId();\r\n }\r\n $qb->andWhere('client.id IN (:brandArr)');\r\n $qb->setParameter('brandArr', $brandArr);\r\n }\r\n //date filter part\r\n if ($data['fw_s_f'] != null) {\r\n $qb->andWhere('opproj.fwsdate >= :fwsf');\r\n $qb->andWhere(\"opproj.fwsdate != 'none'\");\r\n $qb->setParameter('fwsf', $data['fw_s_f']);\r\n }\r\n if ($data['fw_s_t'] != null) {\r\n $qb->andWhere('opproj.fwsdate <= :fwst');\r\n $qb->andWhere(\"opproj.fwsdate != 'none'\");\r\n $qb->setParameter('fwst', $data['fw_s_t']);\r\n }\r\n if ($data['fw_e_f'] != null) {\r\n $qb->andWhere('opproj.fwedate >= :fwef');\r\n $qb->andWhere(\"opproj.fwedate != 'none'\");\r\n $qb->setParameter('fwef', $data['fw_e_f']);\r\n }\r\n if ($data['fw_e_t'] != null) {\r\n $qb->andWhere('opproj.fwedate <= :fwet');\r\n $qb->andWhere(\"opproj.fwedate != 'none'\");\r\n $qb->setParameter('fwet', $data['fw_e_t']);\r\n }\r\n if ($data['due_f'] != null) {\r\n $qb->andWhere('opproj.reportdate >= :duef');\r\n $qb->andWhere(\"opproj.reportdate != 'none'\");\r\n $qb->setParameter('duef', $data['due_f']);\r\n }\r\n if ($data['due_t'] != null) {\r\n $qb->andWhere('opproj.reportdate <= :duet');\r\n $qb->andWhere(\"opproj.reportdate != 'none'\");\r\n $qb->setParameter('duet', $data['due_t']);\r\n }\r\n $query = $qb->getQuery();\r\n $result = $query->getArrayResult();\r\n foreach ($result as $r) {\r\n $projId = $r['project']['id'];\r\n $final[$projId]['firstDate'] = $r['first_visit_date'];\r\n $final[$projId]['lastDate'] = $r['last_visit_date'];\r\n $final[$projId]['aceprojectname'] = $r['project']['name'];\r\n $final[$projId]['num'] = $r['survey_num'];\r\n $final[$projId]['fwsdate'] = $r['fwsdate'];\r\n $final[$projId]['fwedate'] = $r['fwedate'];\r\n $final[$projId]['reportdate'] = $r['reportdate'];\r\n $final[$projId]['assigned'] = $r['survey_num'] != 0 ? floor(($r['assigned_num'] / $r['survey_num']) * 100) : 0;\r\n $final[$projId]['done'] = $r['survey_num'] != 0 ? floor(($r['fw_num'] / $r['survey_num']) * 100) : 0;\r\n $final[$projId]['validationPercent'] = $r['survey_num'] != 0 ? floor(($r['editing_num'] / $r['survey_num']) * 100) : 0;\r\n $final[$projId]['assignnum'] = $r['assigned_num'];\r\n $final[$projId]['fwdonenum'] = $r['fw_num'];\r\n $final[$projId]['edit'] = $r['editing_num'];\r\n\r\n if ($data['assign_f'] != null && (float) $data['assign_f'] > $final[$projId]['assigned']) {\r\n unset($final[$projId]);\r\n }\r\n if ($data['assign_t'] != null && (float) $data['assign_t'] < $final[$r['id']]['assigned']) {\r\n unset($final[$r['id']]);\r\n }\r\n if ($data['fw_done_f'] != null && (float) $data['fw_done_f'] > $final[$r['id']]['done']) {\r\n unset($final[$r['id']]);\r\n }\r\n if ($data['fw_done_t'] != null && (float) $data['fw_done_t'] < $final[$r['id']]['done']) {\r\n unset($final[$r['id']]);\r\n }\r\n if ($data['editing_done_f'] != null && (float) $data['editing_done_f'] > $final[$r['id']]['validationPercent']) {\r\n unset($final[$r['id']]);\r\n }\r\n if ($data['editing_done_t'] != null && (float) $data['editing_done_t'] < $final[$r['id']]['validationPercent']) {\r\n unset($final[$r['id']]);\r\n }\r\n }\r\n $result_merge['result'] = $final;\r\n $result_merge['buArr'] = $buNameArr;\r\n return $result_merge;\r\n }", "static public function getStatusList() {\n return array(\n self::STATUS_SHOW => Yii::t('main', 'Show'),\n self::STATUS_HIDE => Yii::t('main', 'Hide'),\n );\n }", "static public function getStatusList() {\n return array(\n self::STATUS_SHOW => Yii::t('main', 'Show'),\n self::STATUS_HIDE => Yii::t('main', 'Hide'),\n );\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['id_import_file'] === null) {\n $invalidProperties[] = \"'id_import_file' can't be null\";\n }\n if ($this->container['uri'] === null) {\n $invalidProperties[] = \"'uri' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalidProperties[] = \"'status' can't be null\";\n }\n if ($this->container['note'] === null) {\n $invalidProperties[] = \"'note' can't be null\";\n }\n if ($this->container['total_lines'] === null) {\n $invalidProperties[] = \"'total_lines' can't be null\";\n }\n if ($this->container['current_line'] === null) {\n $invalidProperties[] = \"'current_line' can't be null\";\n }\n if ($this->container['ts_created'] === null) {\n $invalidProperties[] = \"'ts_created' can't be null\";\n }\n if ($this->container['ts_updated'] === null) {\n $invalidProperties[] = \"'ts_updated' can't be null\";\n }\n if ($this->container['ts_last_row_updated'] === null) {\n $invalidProperties[] = \"'ts_last_row_updated' can't be null\";\n }\n if ($this->container['ts_completed'] === null) {\n $invalidProperties[] = \"'ts_completed' can't be null\";\n }\n if ($this->container['error_count'] === null) {\n $invalidProperties[] = \"'error_count' can't be null\";\n }\n if ($this->container['async_import_done'] === null) {\n $invalidProperties[] = \"'async_import_done' can't be null\";\n }\n return $invalidProperties;\n }", "private static function print_log_configs() {\n\t//--\n\tglobal $configs;\n\t//--\n\t$log = '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_head\"><font size=\"4\"><b>Application :: CONFIGURATION Log</b></font></div>';\n\t//-- vars\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\"><b>App CONFIG VARIABLES</b></div>';\n\t$arr = (array) $configs;\n\tksort($arr);\n\t$i=0;\n\t$j=0;\n\tforeach((array)$arr as $key => $val) {\n\t\t//--\n\t\t$i++;\n\t\t//--\n\t\t$log .= '<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">';\n\t\t$log .= '<tr valign=\"top\" title=\"#'.$i.'\"><td width=\"195\"><div class=\"smartframework_debugbar_inforow\">';\n\t\t$log .= '<b>'.Smart::escape_html((string)$key).'</b>';\n\t\t$log .= '</div></td><td><div class=\"smartframework_debugbar_inforow\">';\n\t\tif(is_array($val)) {\n\t\t\t$log .= '<table width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" border=\"0\" style=\"font-size:13px;\">';\n\t\t\t$j=0;\n\t\t\tforeach($val as $k => $v) {\n\t\t\t\t$j++;\n\t\t\t\tif($j % 2) {\n\t\t\t\t\t$color = '#FFFFFF';\n\t\t\t\t} else {\n\t\t\t\t\t$color = '#FAFAFA';\n\t\t\t\t} //end if else\n\t\t\t\t$log .= '<tr bgcolor=\"'.$color.'\" valign=\"top\" title=\"#'.$i.'.'.$j.'\"><td width=\"290\"><b>'.Smart::escape_html((string)$k).'</b></td><td>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(self::print_value_by_type($v))), true).'</td></tr>';\n\t\t\t} //end foreach\n\t\t\t$log .= '</table>';\n\t\t} else {\n\t\t\t$log .= '<pre>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html((string)$val), true).'</pre>';\n\t\t} //end if else\n\t\t$log .= '</div></td></tr>';\n\t\t$log .= '</table>';\n\t\t//--\n\t} //end while\n\t//-- constants\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\"><b>App SETTING CONSTANTS</b></div>';\n\t$arr = (array) get_defined_constants(true);\n\t$arr = (array) $arr['user'];\n\tksort($arr);\n\t$i=0;\n\t$j=0;\n\tforeach((array)$arr as $key => $val) {\n\t\t//--\n\t\t$i++;\n\t\t//--\n\t\tif(((string)$key == 'SMART_FRAMEWORK_CHMOD_DIRS') OR ((string)$key == 'SMART_FRAMEWORK_CHMOD_FILES')) {\n\t\t\tif(is_numeric($val)) {\n\t\t\t\t$val = (string) '0'.@decoct($val).' (octal)';\n\t\t\t} else {\n\t\t\t\t$val = (string) $val.' (!!! Warning, Invalid ... Must be OCTAL !!!)';\n\t\t\t} //end if\n\t\t} //end if\n\t\t//--\n\t\t$log .= '<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">';\n\t\t$log .= '<tr valign=\"top\" title=\"#'.$i.'\"><td width=\"375\"><div class=\"smartframework_debugbar_inforow\"><b>'.Smart::escape_html((string)$key).'</b></div></td><td><div class=\"smartframework_debugbar_inforow\">'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(self::print_value_by_type($val))), true).'</div></td></tr>';\n\t\t$log .= '</table>';\n\t\t//--\n\t} //end while\n\t//--\n\treturn $log;\n\t//--\n}", "public function getActiveProjectList() {\n\t\treturn $this->getProjectDao()->getActiveProjectList();\n\t}", "public function getHealthChecks(): Collection\n {\n return $this->healthChecks;\n }", "public function getListOfProjectsMissingInfo($where = null)\n {\n $projectList = $this->project\n ->select('u2.name AS manager_name','users.id AS user_id','users.name','projects.id','customers.name AS customer_name','projects.project_name','projects.otl_project_code','projects.project_type',\n 'projects.activity_type','projects.project_status','projects.meta_activity','projects.region',\n 'projects.country','projects.technology','projects.description','projects.estimated_start_date','projects.estimated_end_date',\n 'projects.comments','projects.LoE_onshore','projects.LoE_nearshore',\n 'projects.LoE_offshore', 'projects.LoE_contractor', 'projects.gold_order_number', 'projects.product_code', 'projects.revenue', 'projects.win_ratio');\n $projectList->leftjoin('activities', 'project_id', '=', 'projects.id');\n $projectList->leftjoin('users', 'user_id', '=', 'users.id');\n $projectList->leftjoin('users_users', 'users.id', '=', 'users_users.user_id');\n $projectList->leftjoin('users AS u2', 'u2.id', '=', 'users_users.manager_id');\n $projectList->leftjoin('customers', 'projects.customer_id', '=', 'customers.id');\n $projectList->whereRaw(\"(project_type = '' or activity_type = '' or project_status = '')\");\n $projectList->groupBy('users.name', 'projects.id');\n\n $data = Datatables::of($projectList)->make(true);\n\n return $data;\n }", "public function getProjectTasks() {\n $fieldNames = [];\n $sql = \"SELECT \n p.name as ProjectName,\n pt.name as TaskName, \n u.username, \n pt.`start_date`,\n pt.`due_date`,\n pt.status \n FROM projects AS p \n LEFT JOIN project_has_tasks as pt on pt.project_id = p.id \n LEFT JOIN users as u on pt.user_id=u.id;\";\n /** @var CI_DB_mysql_result $result */\n $result = $this->_primaryDatabase->query($sql, []);\n $resultArray = $result->result();\n if ($result->num_rows() > 0) {\n foreach ((array) $resultArray[0] as $fieldName => $fieldValue) $fieldNames[] = $fieldName;\n $resultArray = array_merge([(object) $fieldNames], $resultArray);\n }\n\n return $resultArray;\n }", "static function getAllPlans(){\n global $configClass;\n if($configClass['integrate_membership'] == 1){\n $db = JFactory::getDbo();\n $nullDate = $db->quote($db->getNullDate());\n $nowDate = $db->quote(JHtml::_('date', 'now', 'Y-m-d H:i:s', false));\n $query = $db->getQuery(true);\n $query->select('tbl.*')->from('#__osmembership_plans as tbl');\n $query->where('tbl.published = 1')\n ->where('tbl.access IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')')\n ->where('(tbl.publish_up = ' . $nullDate . ' OR tbl.publish_up <= ' . $nowDate . ')')\n ->where('(tbl.publish_down = ' . $nullDate . ' OR tbl.publish_down >= ' . $nowDate . ')');\n $db->setQuery($query);\n $allPlans = $db->loadObjectList();\n return $allPlans;\n }\n }", "public function getTimeoutList()\n {\n $value = $this->get(self::TIMEOUTLIST);\n return $value === null ? (string)$value : $value;\n }", "public function index()\n {\n //\n //Projects with schedules\n\n $projectsWithSchedulesIds = DB::select(\"\n SELECT DISTINCT tblproject.intProjectId\n FROM tblproject\n LEFT JOIN tblschedules ON tblproject.intProjectId = tblschedules.intProjectId\n WHERE tblschedules.intProjectId IS NOT NULL AND tblproject.strProjectStatus = 'on going' AND tblproject.intActive = 1\n \");\n\n $finishedProjectSchedules = array();\n foreach($projectsWithSchedulesIds as $projectId){\n $projectDetails = DB::table('tblproject')\n ->where('tblproject.intProjectId','=',$projectId->intProjectId)\n ->where('tblproject.intActive','=',1)\n ->first();\n\n array_push($finishedProjectSchedules,$projectDetails);\n }\n\n //dd($pendingProjectSchedules);\n\n return view ('Admin/project-progress',compact(\n 'finishedProjectSchedules'\n ));\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['architecture'] === null) {\n $invalidProperties[] = \"'architecture' can't be null\";\n }\n if ($this->container['boot_id'] === null) {\n $invalidProperties[] = \"'boot_id' can't be null\";\n }\n if ($this->container['container_runtime_version'] === null) {\n $invalidProperties[] = \"'container_runtime_version' can't be null\";\n }\n if ($this->container['kernel_version'] === null) {\n $invalidProperties[] = \"'kernel_version' can't be null\";\n }\n if ($this->container['kube_proxy_version'] === null) {\n $invalidProperties[] = \"'kube_proxy_version' can't be null\";\n }\n if ($this->container['kubelet_version'] === null) {\n $invalidProperties[] = \"'kubelet_version' can't be null\";\n }\n if ($this->container['machine_id'] === null) {\n $invalidProperties[] = \"'machine_id' can't be null\";\n }\n if ($this->container['operating_system'] === null) {\n $invalidProperties[] = \"'operating_system' can't be null\";\n }\n if ($this->container['os_image'] === null) {\n $invalidProperties[] = \"'os_image' can't be null\";\n }\n if ($this->container['system_uuid'] === null) {\n $invalidProperties[] = \"'system_uuid' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n $allowedValues = $this->getTaskModeAllowableValues();\r\n if (!is_null($this->container['taskMode']) && !in_array($this->container['taskMode'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'taskMode', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n return $invalidProperties;\r\n }", "public static function checkConf()\n\t{\n\t\treturn array();\n\t}", "public static function checkConf()\n\t{\n\t\treturn array();\n\t}", "public function getMaintainedProjects()\n {\n return array(\n 'etiennemarais/lumen-starter-api' => 'https://github.com/etiennemarais/lumen-starter-api',\n 'laravel-notification-channels/clickatell' => 'https://github.com/laravel-notification-channels/clickatell',\n 'etiennemarais/hubot-yesnowtf' => 'https://github.com/etiennemarais/hubot-yesnowtf',\n );\n }", "function admin_index() {\n\t\t$user = $this->Auth->user('id');\n\t\t//get user's projects.\n\t\t$result = $this->Project->find('all', array(\n\t\t\t'recursive' => -1,\n\t\t\t'conditions' => array('AdminProject.user_id' => $user), \n\t\t\t'fields' => array('Project.id', 'Project.name'),\n\t\t\t'joins' => array(\n\t\t\t\tarray(\n\t\t\t\t\t\t'table' => 'admins_projects',\n\t\t\t\t\t\t'alias' => 'AdminProject',\n\t\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t\t'foreignKey' => false,\n\t\t\t\t\t\t'conditions'=> 'Project.id = AdminProject.project_id'\n\t\t\t\t)\n\t\t\t)\n\t\t));\n\t\t$list = Set::classicExtract($result,'{n}.Project.id');\n\t\t\n\t\t//set all other projects.\n\t\t$currProjects = $this->Project->find('all', array(\n\t\t\t'recursive' => -1,\n\t\t\t'conditions' => array(\n\t\t\t\t'Project.status <>' => PROJECT_ARCHIVE,\n\t\t\t\t'Project.id' => $list\t\t\t\t\n\t\t\t)\n\t\t));\n\t\t$projects = Set::combine($currProjects, '{n}.Project.id', '{n}.Project', '{n}.Project.status');\n\t\t\t\t\n\t\t//sort phase 1 projects by their modified date\n\t\tif(array_key_exists(PROJECT_SEED, $projects))\n\t\t\t$projects[PROJECT_SEED] = Set::sort(array_values($projects[PROJECT_SEED]), '{n}.modified', 'desc'); \n\t\t\t\n\t\t//sort phase 2 projects by their cut-off date\n\t\tif(array_key_exists(PROJECT_COLLECT, $projects))\n\t\t\t$projects[PROJECT_COLLECT] = Set::sort(array_values($projects[PROJECT_COLLECT]), '{n}.collection_end', 'asc');\n\t\t\t\n\t\t//sort phase 3 projects by their cut-off date\n\t\tif(array_key_exists(PROJECT_FEEDBACK, $projects))\n\t\t\t$projects[PROJECT_FEEDBACK] = Set::sort(array_values($projects[PROJECT_FEEDBACK]), '{n}.feedback_end', 'asc');\n\t\t\n\t\t//set archived projects.\n\t\t$this->Project->recursive = 0;\n\t\t$this->paginate['Project']['order'] = \"Project.feedback_end DESC\";\n\t\t$projects[PROJECT_ARCHIVE] = $this->paginate(array('Project.status' => PROJECT_ARCHIVE, 'Project.id' => $list));\n\t\t\n\t\t$this->set(compact('projects'));\n\t}", "public function listAll() : array\n {\n return \\Cache::remember('query_list_all_config', 60 * 60, function () {\n return $this->config->all()->pluck('value', 'name')->all();\n });\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['http_status_code'] === null) {\n $invalidProperties[] = \"'http_status_code' can't be null\";\n }\n if (($this->container['http_status_code'] > 599)) {\n $invalidProperties[] = \"invalid value for 'http_status_code', must be smaller than or equal to 599.\";\n }\n\n if (($this->container['http_status_code'] < 200)) {\n $invalidProperties[] = \"invalid value for 'http_status_code', must be bigger than or equal to 200.\";\n }\n\n if ($this->container['message'] === null) {\n $invalidProperties[] = \"'message' can't be null\";\n }\n if ($this->container['request_data'] === null) {\n $invalidProperties[] = \"'request_data' can't be null\";\n }\n if ($this->container['runtime'] === null) {\n $invalidProperties[] = \"'runtime' can't be null\";\n }\n if ($this->container['public_key_credential_request_options'] === null) {\n $invalidProperties[] = \"'public_key_credential_request_options' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalidProperties[] = \"'status' can't be null\";\n }\n $allowedValues = $this->getStatusAllowableValues();\n if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'status', must be one of '%s'\",\n $this->container['status'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }" ]
[ "0.6722513", "0.5504905", "0.53350157", "0.52022237", "0.5178261", "0.49790195", "0.49472752", "0.47796518", "0.4686594", "0.4643526", "0.46052107", "0.4591228", "0.45873624", "0.4557695", "0.4524556", "0.45164093", "0.44967884", "0.4488663", "0.44674298", "0.44586378", "0.4431005", "0.4423921", "0.44209892", "0.4416442", "0.43963835", "0.43871763", "0.43789434", "0.43751073", "0.43725982", "0.43678504", "0.43591407", "0.4352613", "0.43304077", "0.43285057", "0.43213448", "0.4304429", "0.42917377", "0.4286736", "0.42810297", "0.42764172", "0.42708978", "0.42701063", "0.42670023", "0.42622983", "0.42612702", "0.42556816", "0.42527357", "0.42479327", "0.42449", "0.42359203", "0.4235662", "0.423367", "0.4222153", "0.42220768", "0.4217217", "0.42166185", "0.4211634", "0.421012", "0.4207254", "0.42045307", "0.419361", "0.4189219", "0.4188586", "0.41853225", "0.41818655", "0.41763404", "0.41751423", "0.41739368", "0.4166176", "0.41658974", "0.41580397", "0.41566414", "0.4154721", "0.41525692", "0.4133897", "0.4133353", "0.41320068", "0.4129886", "0.41298652", "0.41264933", "0.412542", "0.4122838", "0.4122838", "0.4121163", "0.4120634", "0.41185597", "0.41175705", "0.4116866", "0.41092002", "0.41079223", "0.41078532", "0.41077203", "0.41075343", "0.4107492", "0.41025653", "0.41025653", "0.40956327", "0.40950188", "0.40903696", "0.40897867" ]
0.7945477
0
Updates an Uptime check configuration. You can either replace the entire configuration with a new one or replace only certain fields in the current configuration by specifying the fields to be updated via updateMask. Returns the updated configuration. (uptimeCheckConfigs.patch)
public function patch($name, UptimeCheckConfig $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('patch', [$params], UptimeCheckConfig::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function UpdateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\UpdateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], UptimeCheckConfig::class);\n }", "public function create($parent, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], UptimeCheckConfig::class);\n }", "public function listProjectsUptimeCheckConfigs($parent, $optParams = [])\n {\n $params = ['parent' => $parent];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class);\n }", "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "public function testUpdate(): void {\n $configObject = $this->configUpdateManager->getConfig();\n\n $this->configUpdateManager->update();\n foreach ($configObject->getTargetConfigFilepaths() as $filepath) {\n self::assertFileExists($filepath);\n }\n\n $targetConfigFilepath = $configObject->getTargetConfigFilepath(Config::TARGET_CONFIG_FILENAME);\n /**\n * @var array{\n * draft: array{\n * last_applied_update: int,\n * },\n * } $config\n */\n $config = $configObject->readAndParseConfigFromTheFile($targetConfigFilepath);\n self::assertSame(App::LAST_AVAILABLE_UPDATE_WEIGHT, $config['draft']['last_applied_update']);\n }", "public function updateFromConfig()\n {\n // Begin transation\n $this->pdo->beginTransaction();\n\n // Update tables\n foreach ($this->schema['update'] as $schema) {\n $sql = false;\n\n // validate table to update\n if (isset($this->tables[$schema['table']])) {\n $table = $this->tables[$schema['table']];\n $columns = $table->getColumns(false);\n if (isset($schema['drop'])) {\n $sql = $this->getDropColumn($table, $schema['drop']);\n } elseif (isset($schema['add'])) {\n $sql = $this->getAddColumn(\n $table, $schema['add'], $schema['type']\n );\n } elseif (isset($schema['modify'])) {\n $sql = $this->getModifyColumn(\n $table, $columns[$schema['modify']], $schema['type']\n );\n }\n }\n\n // Finally run query if exists\n if (!empty($sql)) {\n $this->pdo->exec($sql);\n }\n }\n\n // Commit changes\n $this->pdo->commit();\n }", "public function update_beamtime_config($config) {\n $this->connect();\n $old_config = $this->beamtime_config();\n foreach( $config as $param => $value ) {\n\n $param_trimmed = strtolower(trim($param));\n $param_escaped = $this->escape_string($param_trimmed);\n\n $value_escaped = '';\n\n switch($param_trimmed) {\n\n case 'min_gap_width_sec':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = intval($value);\n break;\n\n case 'last_run_begin_time':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = $value->to64();\n break;\n\n default:\n $value_escaped = is_null($value) ? \"NULL\" : \"'\".$this->escape_string(\"{$value}\").\"'\";\n break;\n }\n $this->query(\n array_key_exists($param_trimmed, $old_config) ?\n \"UPDATE beamtime_config SET value={$value_escaped} WHERE param='{$param_escaped}'\" :\n \"INSERT INTO beamtime_config VALUES('{$param_escaped}',{$value_escaped})\"\n );\n }\n }", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function update_beamtime_config($config) {\n $old_config = $this->beamtime_config();\n foreach( $config as $param => $value ) {\n\n $param_trimmed = strtolower(trim($param));\n $param_escaped = $this->escape_string($param_trimmed);\n\n $value_escaped = '';\n\n switch($param_trimmed) {\n\n case 'min_gap_width_sec':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = intval($value);\n break;\n\n case 'last_run_begin_time':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = $value->to64();\n break;\n\n default:\n $value_escaped = is_null($value) ? \"NULL\" : \"'\".$this->escape_string(\"{$value}\").\"'\";\n break;\n }\n $this->query(\n array_key_exists($param_trimmed, $old_config) ?\n \"UPDATE beamtime_config SET value={$value_escaped} WHERE param='{$param_escaped}'\" :\n \"INSERT INTO beamtime_config VALUES('{$param_escaped}',{$value_escaped})\"\n );\n }\n }", "public function DeleteUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\DeleteUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "function crpTalk_admin_updateconfig()\n{\n\t// Security check\n\tif (!SecurityUtil :: checkPermission('crpTalk::', '::', ACCESS_ADMIN))\n\t{\n\t\treturn LogUtil :: registerPermissionError();\n\t}\n\n\t$talk= new crpTalk();\n\treturn $talk->updateConfig();\n}", "public function UpdateUserConfiguration($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }", "public function CreateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\CreateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function patchSystemConfiguration($request)\n {\n return $this->start()->uri(\"/api/system-configuration\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->patch()\n ->go();\n }", "public function updateSystemConfiguration($request)\n {\n return $this->start()->uri(\"/api/system-configuration\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->put()\n ->go();\n }", "public function updateUser(array $config = []);", "public function testUpdate() {\n $legacy_tour_config = $this->container->get('config.factory')->get('tour.tour.views-ui');\n $tips = $legacy_tour_config->get('tips');\n\n // Confirm the existing tour tip configurations match expectations.\n $this->assertFalse(isset($tips['views-ui-view-admin']['selector']));\n $this->assertEquals('views-display-extra-actions', $tips['views-ui-view-admin']['attributes']['data-id']);\n $this->assertEquals('views-ui-display-tab-bucket.format', $tips['views-ui-format']['attributes']['data-class']);\n $this->assertSame('left', $tips['views-ui-view-admin']['location']);\n $this->assertArrayNotHasKey('position', $tips['views-ui-view-admin']);\n\n $this->runUpdates();\n\n $updated_legacy_tour_config = $this->container->get('config.factory')->get('tour.tour.views-ui');\n $updated_tips = $updated_legacy_tour_config->get('tips');\n\n // Confirm that views-ui-view-admin uses `selector` instead of `data-id`.\n $this->assertSame('#views-display-extra-actions', $updated_tips['views-ui-view-admin']['selector']);\n\n // Confirm that views-ui-format uses `selector` instead of `data-class`.\n $this->assertSame('.views-ui-display-tab-bucket.format', $updated_tips['views-ui-format']['selector']);\n\n // Assert that the deprecated attributes key has been removed now that it is\n // empty.\n $this->assertArrayNotHasKey('attributes', $updated_tips['views-ui-view-admin']);\n\n $this->assertSame('left-start', $updated_tips['views-ui-view-admin']['position']);\n $this->assertArrayNotHasKey('location', $updated_tips['views-ui-view-admin']);\n }", "public function UpdateConfig($config = []) {\n\n $config = array_intersect_key($config, $this->\n config);\n\n $this->\n config = array_replace_recursive($this->\n config, $config);\n\n if (!is_int($this->\n config['expire'])) {\n\n $this->\n config['expire'] = intval($this->\n config['expire']);\n }\n\n $this->\n Upgrade();\n\n \\FluitoPHP\\Events\\Events::GetInstance()->\n Run('FluitoPHP.Authentication.GC', $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n Select($this->\n GetPrefix() . 'usersalt', '*', array(\n array(\n 'column' => \"&DateAdd(last_access, {$this->\n config['expire']}, S)\",\n 'operator' => '<',\n 'rightcolumn' => '&CurrDTTM'\n )\n ))->\n GetResults(), $this->\n config);\n\n $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n Delete($this->\n GetPrefix() . 'usersalt', array(\n array(\n 'column' => \"&DateAdd(last_access, {$this->\n config['expire']}, S)\",\n 'operator' => '<',\n 'rightcolumn' => '&CurrDTTM'\n )\n ))->\n Query();\n }", "public function updateSetupConfig($request)\n {\n $runtime = new RuntimeOptions([]);\n $headers = [];\n\n return $this->updateSetupConfigEx($request, $headers, $runtime);\n }", "public function ListUptimeCheckIps(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsResponse', 'decode'],\n $metadata, $options);\n }", "public function update($data = array (), $condition = array())\n {\n return DB::table('hawthorne_configuration')->where($condition)->update($data);\n }", "public function updateSettings(Request $request)\n {\n\n $configFilePath = dirname(__DIR__) . '/../../../build/configs/pirrot_default.conf';\n if (file_exists('/etc/pirrot.conf')) {\n $configFilePath = '/etc/pirrot.conf';\n }\n\n // Get setting values from the configuration file.\n $config = new ConfManagerService($configFilePath);\n $currentSettings = $config->read();\n $updateSettings = $request->json();\n $newSettings = [];\n foreach ($updateSettings as $setting) {\n $newSettings[$setting['name']] = $setting['value'];\n }\n\n // Set all \"boolean\" type config items to \"false\" if the checkbox is not checked.\n $falseBooleanValues = array_diff_key($currentSettings, $newSettings);\n foreach ($falseBooleanValues as $key => $value) {\n // Ignore settings that are on the \"blacklist\"/ignored list (to prevent them being overwritten with \"false\")\n if (!in_array($key, $this->ignoredSettings)) {\n $newSettings[$key] = \"false\"; // Yes, really set this to a string and NOT a boolean type (as we're witting it to a text file)\n }\n }\n $updatedConfig = $config->update($newSettings);\n\n // Get the current request URL so we can manipulate it for the auto-refresh after the service has been restarted.\n $url = parse_url(request()->root());\n $response =\n [\n 'check_url' => $url['scheme'] . \"://\" . $url['host'] . ':' . $newSettings['web_interface_port'] . '/up',\n 'after_url' => $url['scheme'] . \"://\" . $url['host'] . ':' . $newSettings['web_interface_port'] . '/settings',\n ];\n\n // We will only write the new configuration file and attempt to restart the Pirrot daemon ONLY if it's actually running on a RPi.\n if (env('APP_ENV') !== 'production') {\n $response =\n [\n 'check_url' => request()->root() . '/up',\n 'after_url' => request()->root() . '/settings',\n ];\n return response($response, 200);\n }\n\n // Backup the old configuration file and then write the new file...\n system(\"cp \" . $configFilePath . \" /opt/pirrot/storage/backups/pirrot-\" . date(\"dmYHis\") . \".conf\");\n file_put_contents('/etc/pirrot.conf', $updatedConfig);\n\n // Trigger a daemon restart (after two seconds to give us enough time to respond to the HTTP request)\n system('sudo /opt/pirrot/web/resources/scripts/restart-pirrot.sh > /dev/null &');\n\n return response($response, 200);\n }", "public function patch($name, Configuration $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('patch', [$params], Configuration::class);\n }", "public function batchUpdateConfigs()\n {\n foreach ($this->fields_form as $k => $f) {\n foreach ($f['form']['input'] as $i => $input) {\n $input['name'] = str_replace(array('[]'), array(''), $input['name']);\n\n if (isset($input['ignore']) && $input['ignore'] == true) {\n continue;\n }\n\n if (isset($input['lang']) && $input['lang'] == true) {\n $data = array();\n foreach (Language::getLanguages(false) as $lang) {\n $val = Tools::getValue($input['name'].'_'.$lang['id_lang'], $input['default']);\n $data[$lang['id_lang']] = $val;\n }\n\n if (isset($input['callback']) && method_exists($this, $input['callback'])) {\n $data[$lang['id_lang']] = $this->{$input['callback']}($data[$lang['id_lang']]);\n }\n\n Configuration::updateValue(trim($input['name']), $data, true);\n } else {\n $val = Tools::getValue($input['name'], $input['default']);\n if (isset($input['callback']) && method_exists($this, $input['callback'])) {\n $val = $this->{$input['callback']}($val);\n }\n Configuration::updateValue($input['name'], $val, true);\n }\n }\n }\n\n $this->batchUpdateCustomConfigs();\n\n return true;\n }", "public function UpdateMuteConfig(\\Google\\Cloud\\SecurityCenter\\V1\\UpdateMuteConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateMuteConfig',\n $argument,\n ['\\Google\\Cloud\\SecurityCenter\\V1\\MuteConfig', 'decode'],\n $metadata, $options);\n }", "public static function updateConfigBy($data, $params) {\n\t\tif (!is_array($data)) return false;\n if (!is_array($params)) return false; \n $data['update_time'] = Common::getTime();\n\t\t$data = self::_cookData($data);\n\t\treturn self::_getDao()->updateBy($data, $params);\n\t}", "abstract protected function _updateConfiguration();", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add( 'StatusNet', '8676A858-E4B1-11DD-9968-131C56D89593', $this->info->version );\n\t}", "private function upgradeConfig(): void\n\t{\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->update(['type_range' => 'created_at|taken_at|title|description|is_public|is_starred|type']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->where('value', '=', 'id')\n\t\t\t->update(['value' => 'created_at']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->where('value', '=', 'public')\n\t\t\t->update(['value' => 'is_public']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->where('value', '=', 'star')\n\t\t\t->update(['value' => 'is_starred']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Albums_col')\n\t\t\t->update(['type_range' => 'created_at|title|description|is_public|max_taken_at|min_taken_at']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Albums_col')\n\t\t\t->where('value', '=', 'id')\n\t\t\t->update(['value' => 'created_at']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Albums_col')\n\t\t\t->where('value', '=', 'public')\n\t\t\t->update(['value' => 'is_public']);\n\t\tDB::table('configs')\n\t\t\t->insert([\n\t\t\t\t'key' => 'legacy_id_redirection',\n\t\t\t\t'value' => '1',\n\t\t\t\t'cat' => 'config',\n\t\t\t\t'confidentiality' => 0,\n\t\t\t\t'type_range' => '0|1',\n\t\t\t\t'description' => 'Enables/disables the redirection support for legacy IDs',\n\t\t\t]);\n\t}", "public static function update_all($config)\n\t{\n\t\treturn self::new_instance_records()->update_all($config);\n\t}", "public static function check_for_updates() {\n global $wpdb;\n\n $current_version = get_option('h5p_version');\n if ($current_version === self::VERSION) {\n return; // Same version as before\n }\n\n // We have a new version!\n if (!$current_version) {\n // Never installed before\n $current_version = '0.0.0';\n }\n\n // Split version number\n $v = self::split_version($current_version);\n\n $between_1710_1713 = ($v->major === 1 && $v->minor === 7 && $v->patch >= 10 && $v->patch <= 13); // Target 1.7.10, 1.7.11, 1.7.12, 1.7.13\n if ($between_1710_1713) {\n // Fix tmpfiles table manually :-)\n $wpdb->query(\"ALTER TABLE {$wpdb->prefix}h5p_tmpfiles ADD COLUMN id INT UNSIGNED NOT NULL AUTO_INCREMENT FIRST, DROP PRIMARY KEY, ADD PRIMARY KEY(id)\");\n }\n\n // Check and update database\n self::update_database();\n\n $pre_120 = ($v->major < 1 || ($v->major === 1 && $v->minor < 2)); // < 1.2.0\n $pre_180 = ($v->major < 1 || ($v->major === 1 && $v->minor < 8)); // < 1.8.0\n $pre_1102 = ($v->major < 1 || ($v->major === 1 && $v->minor < 10) ||\n ($v->major === 1 && $v->minor === 10 && $v->patch < 2)); // < 1.10.2\n $pre_1110 = ($v->major < 1 || ($v->major === 1 && $v->minor < 11)); // < 1.11.0\n $pre_1113 = ($v->major < 1 || ($v->major === 1 && $v->minor < 11) ||\n ($v->major === 1 && $v->minor === 11 && $v->patch < 3)); // < 1.11.3\n $pre_1150 = ($v->major < 1 || ($v->major === 1 && $v->minor < 15)); // < 1.15.0\n\n // Run version specific updates\n if ($pre_120) {\n // Re-assign all permissions\n self::upgrade_120();\n }\n else {\n // Do not run if upgrade_120 runs (since that remaps all the permissions)\n if ($pre_180) {\n // Does only add new permissions\n self::upgrade_180();\n }\n if ($pre_1150) {\n // Does only add new permissions\n self::upgrade_1150();\n }\n }\n\n if ($pre_180) {\n // Force requirements check when hub is introduced.\n update_option('h5p_check_h5p_requirements', TRUE);\n }\n\n if ($pre_1102 && $current_version !== '0.0.0') {\n update_option('h5p_has_request_user_consent', TRUE);\n }\n\n if ($pre_1110) {\n // Remove unused columns\n self::drop_column(\"{$wpdb->prefix}h5p_contents\", 'author');\n self::drop_column(\"{$wpdb->prefix}h5p_contents\", 'keywords');\n self::drop_column(\"{$wpdb->prefix}h5p_contents\", 'description');\n }\n\n if ($pre_1113 && !$pre_1110) { // 1.11.0, 1.11.1 or 1.11.2\n // There are no tmpfiles in content folders, cleanup\n $wpdb->query($wpdb->prepare(\n \"DELETE FROM {$wpdb->prefix}h5p_tmpfiles\n WHERE path LIKE '%s'\",\n \"%/h5p/content/%\"));\n }\n\n // Keep track of which version of the plugin we have.\n if ($current_version === '0.0.0') {\n add_option('h5p_version', self::VERSION);\n }\n else {\n update_option('h5p_version', self::VERSION);\n }\n }", "function check_update( $_, $assoc_args ) {\n\t\tself::run( 'core check-update', $_, $assoc_args );\n\t}", "public function update(Request $request)\n {\n $rules = [];\n if(count((array) $request->centers) > 0){\n foreach ($request->centers as $key => $value) {\n if ($request->filled('centers.'.$key.'.emails')) {\n $rules['centers.'.$key.'.emails'] = [\n function($attribute, $value, $fail){\n $values = explode(',', $value);\n foreach($values as $email){\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)){\n $fail('Email to receive notifications contains invalid email addresses.');\n }\n }\n }\n ];\n }\n }\n }\n if(count((array) $request->centers) > 0){\n foreach ($request->centers as $key => $value) {\n if ($request->filled('centers.'.$key.'.mobiles')) {\n $rules['centers.'.$key.'.mobiles'] = [\n function($attribute, $value, $fail){\n $values = explode(',', $value);\n foreach($values as $mobile){\n if(!preg_match('/(09)[0-9]{9}$|(\\+63)[0-9]{10}$/', $mobile)){\n $fail('Mobile to receive notifications contains invalid mobile numbers.');\n }\n }\n }\n ];\n }\n }\n }\n $data = $request->validate($rules);\n\n if(count((array) $request->centers) > 0){\n foreach($request->centers as $key => $value){\n $center = ServiceCategory::find($key);\n if($center){\n $center->email_to_receive_notifications = $value['emails'];\n $center->mobile_to_receive_notifications = $value['mobiles'];\n $center->save();\n }\n }\n }\n\n return redirect()->back()\n ->with('success', 'Successfully updated settings!');\n }", "private function checkUpdate() {\n\n $doupdate = false;\n\n foreach(array_values($this->checkUpdateVersion) AS $package) {\n $match = explode(':', $package);\n // always set and extract if not match\n if ($this->get_config('last_'.$match[0].'_version') == $match[1]) {\n $doupdate = false;\n } else {\n $this->set_config('last_'.$match[0].'_version', $match[1]);\n $doupdate = true;\n break; // this is possibly needed to force install upgrade routines\n }\n }\n\n return $doupdate ? true : false;\n }", "function _update_config($new_values = array(), $remove_values = array())\n\t{\n\t\tif ( ! is_array($new_values) && count($remove_values) == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Is the config file writable?\n\t\tif ( ! is_really_writable($this->config_path))\n\t\t{\n\t\t\tshow_error(lang('unwritable_config_file'), 503);\n\t\t}\n\n\t\t// Read the config file as PHP\n\t\trequire $this->config_path;\n\n\t\t// Read the config data as a string\n\t\t// Really no point in loading file_helper to do this one\n\t\t$config_file = file_get_contents($this->config_path);\n\n\t\t// Trim it\n\t\t$config_file = trim($config_file);\n\n\t\t// Remove values if needed\n\t\tif (count($remove_values) > 0)\n\t\t{\n\t\t\tforeach ($remove_values as $key => $val)\n\t\t\t{\n\t\t\t\t$config_file = preg_replace(\n\t\t\t\t\t'#\\$'.\"config\\[(\\042|\\047)\".$key.\"\\\\1\\].*?;\\n#is\",\n\t\t\t\t\t\"\",\n\t\t\t\t\t$config_file\n\t\t\t\t);\n\t\t\t\tunset($config[$key]);\n\t\t\t}\n\t\t}\n\n\t\t// Cycle through the newconfig array and swap out the data\n\t\t$to_be_added = array();\n\t\tif (is_array($new_values))\n\t\t{\n\t\t\tforeach ($new_values as $key => $val)\n\t\t\t{\n\t\t\t\tif (is_array($val))\n\t\t\t\t{\n\t\t\t\t\t$val = var_export($val, TRUE);\n\t\t\t\t}\n\t\t\t\telseif (is_bool($val))\n\t\t\t\t{\n\t\t\t\t\t$val = ($val == TRUE) ? 'TRUE' : 'FALSE';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$val = str_replace(\"\\\\\\\"\", \"\\\"\", $val);\n\t\t\t\t\t$val = str_replace(\"\\\\'\", \"'\", $val);\n\t\t\t\t\t$val = str_replace('\\\\\\\\', '\\\\', $val);\n\n\t\t\t\t\t$val = str_replace('\\\\', '\\\\\\\\', $val);\n\t\t\t\t\t$val = str_replace(\"'\", \"\\\\'\", $val);\n\t\t\t\t\t$val = str_replace(\"\\\"\", \"\\\\\\\"\", $val);\n\t\t\t\t}\n\n\t\t\t\t// Are we adding a brand new item to the config file?\n\t\t\t\tif ( ! isset($config[$key]))\n\t\t\t\t{\n\t\t\t\t\t$to_be_added[$key] = $val;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$base_regex = '#(\\$config\\[(\\042|\\047)'.$key.'\\\\2\\]\\s*=\\s*)';\n\n\t\t\t\t\t// Here we need to determine which regex to use for matching\n\t\t\t\t\t// the config varable's value; if we're replacing an array,\n\t\t\t\t\t// use regex that spans multiple lines until hitting a\n\t\t\t\t\t// semicolon\n\t\t\t\t\tif (is_array($new_values[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$config_file = preg_replace(\n\t\t\t\t\t\t\t$base_regex.'(.*?;)#s',\n\t\t\t\t\t\t\t\"\\${1}{$val};\",\n\t\t\t\t\t\t\t$config_file\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse // Otherwise, use the one-liner match\n\t\t\t\t\t{\n\t\t\t\t\t\t$config_file = preg_replace(\n\t\t\t\t\t\t\t$base_regex.'((\\042|\\047)[^\\\\4]*?\\\\4);#',\n\t\t\t\t\t\t\t\"\\${1}\\${4}{$val}\\${4};\",\n\t\t\t\t\t\t\t$config_file\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->config[$key] = $val;\n\t\t\t}\n\t\t}\n\n\t\t// Do we need to add totally new items to the config file?\n\t\tif (count($to_be_added) > 0)\n\t\t{\n\t\t\t// First we will determine the newline character used in the file\n\t\t\t// so we can use the same one\n\t\t\t$newline = (preg_match(\"#(\\r\\n|\\r|\\n)#\", $config_file, $match)) ? $match[1] : \"\\n\";\n\n\t\t\t$new_data = '';\n\t\t\tforeach ($to_be_added as $key => $val)\n\t\t\t{\n\t\t\t\tif (is_array($new_values[$key]))\n\t\t\t\t{\n\t\t\t\t\t$new_data .= \"\\$config['\".$key.\"'] = \".$val.\";\".$newline;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_data .= \"\\$config['\".$key.\"'] = '\".$val.\"';\".$newline;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// First we look for our comment marker in the config file. If found, we'll swap\n\t\t\t// it out with the new config data\n\t\t\tif (preg_match(\"#.*// END EE config items.*#i\", $config_file))\n\t\t\t{\n\t\t\t\t$new_data .= $newline.'// END EE config items'.$newline;\n\n\t\t\t\t$config_file = preg_replace(\"#\\n.*// END EE config items.*#i\", $new_data, $config_file);\n\t\t\t}\n\t\t\t// If we didn't find the marker we'll remove the opening PHP line and\n\t\t\t// add the new config data to the top of the file\n\t\t\telseif (preg_match(\"#<\\?php.*#i\", $config_file, $match))\n\t\t\t{\n\t\t\t\t// Remove the opening PHP line\n\t\t\t\t$config_file = str_replace($match[0], '', $config_file);\n\n\t\t\t\t// Trim it\n\t\t\t\t$config_file = trim($config_file);\n\n\t\t\t\t// Add the new data string along with the opening PHP we removed\n\t\t\t\t$config_file = $match[0].$newline.$newline.$new_data.$config_file;\n\t\t\t}\n\t\t\t// If that didn't work we'll add the new config data to the bottom of the file\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Remove the closing PHP tag\n\t\t\t\t$config_file = preg_replace(\"#\\?>$#\", \"\", $config_file);\n\n\t\t\t\t$config_file = trim($config_file);\n\n\t\t\t\t// Add the new data string\n\t\t\t\t$config_file .= $newline.$newline.$new_data.$newline;\n\n\t\t\t\t// Add the closing PHP tag back\n\t\t\t\t$config_file .= '?>';\n\t\t\t}\n\t\t}\n\n\t\tif ( ! $fp = fopen($this->config_path, FOPEN_WRITE_CREATE_DESTRUCTIVE))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tflock($fp, LOCK_EX);\n\t\tfwrite($fp, $config_file, strlen($config_file));\n\t\tflock($fp, LOCK_UN);\n\t\tfclose($fp);\n\n\t\tif ( ! empty($this->_config_path_errors))\n\t\t{\n\t\t\treturn $this->_config_path_errors;\n\t\t}\n\n\t\t$this->clear_opcache($this->config_path);\n\t\treturn TRUE;\n\t}", "public function update($args = null) {\n\t\tglobal $config;\n\t\t\n\t\t$updates = array();\n\t\tforeach($args as $key => $val){\n\t\t\tif($this->data[$key] != $val){\n\t\t\t\tif(!get_magic_quotes_gpc()){\n\t\t\t\t\tif(is_string($val))\n\t\t\t\t\t\t$val = $config['database']->real_escape_string($val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$updates[$key] = $val;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$count = 0;\n\t\t$len = count($updates);\n\t\tforeach($updates as $key => $val){\n\t\t\t$count++;\n\t\t\tif($key == 'options')\n\t\t\t\t$val = json_encode($val);\n\t\t\n\t\t\tif($count != $len){\n\t\t\t\tif(is_int($val) || is_float($val)) $values .= $key.' = '.$val.', ';\n\t\t\t\telseif(is_string($val)) $values .= $key.\" = '\".$val.\"', \";\n\t\t\t}else{\n\t\t\t\tif(is_int($val) || is_float($val)) $values .= $key.' = '.$val;\n\t\t\t\telseif(is_string($val)) $values .= $key.\" = '\".$val.\"'\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!empty($updates)){\n\t\t\t$result = $config['database']->query(\"\n\t\t\t\tUPDATE nuusers\n\t\t\t\tSET $values\n\t\t\t\tWHERE id = {$this->data['id']}\n\t\t\t\tLIMIT 1\n\t\t\t\");\n\t\t\t\n\t\t\tif($result){\n\t\t\t\tforeach($updates as $key => $val){\n\t\t\t\t\t$this->data[$key] = $val;\n\t\t\t\t\tif($key == 'level_pts'){\n\t\t\t\t\t\t$this->data['level'] = $this->loadLevel();\n\t\t\t\t\t\t$this->data['levelProgress'] = $this->loadLevelProgress();\n\t\t\t\t\t\t$this->data['rank'] = $this->loadRank();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $result;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "public function update(Request $request)\n {\n $this->validate($request, [\n 'admission_open_date' => 'required|date_format:Y-m-d',\n 'admission_close_date' => 'required|date_format:Y-m-d',\n 'current_session' => 'required|regex:/\\d{4}\\/\\d{4}/',\n 'late_payment_fee' => 'required|numeric',\n 'admission_payment_fee' => 'required|numeric',\n 'acceptance_payment_fee' => 'required|numeric',\n ]);\n\n foreach ($request->post() as $name => $value) {\n SystemSetting::where('name', $name)->update(['value' => $value]);\n }\n\n return redirect()->route('settings.index')->with('success', 'Settings updated');\n }", "private function downgradeConfig(): void\n\t{\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->update(['type_range' => 'id|taken_at|title|description|public|star|type']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->where('value', '=', 'created_at')\n\t\t\t->update(['value' => 'id']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->where('value', '=', 'is_public')\n\t\t\t->update(['value' => 'public']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->where('value', '=', 'is_starred')\n\t\t\t->update(['value' => 'star']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Albums_col')\n\t\t\t->update(['type_range' => 'id|title|description|public|max_taken_at|min_taken_at']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Albums_col')\n\t\t\t->where('value', '=', 'created_at')\n\t\t\t->update(['value' => 'id']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Albums_col')\n\t\t\t->where('value', '=', 'is_public')\n\t\t\t->update(['value' => 'public']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'legacy_id_redirection')\n\t\t\t->delete();\n\t}", "static function updatePaperConfig($PaperConfig = null)\r\n {\r\n if ($PaperConfig === null)\r\n {\r\n return false;\r\n }\r\n\r\n $tablePaperConfig = DatabaseManager::getNameTable('TABLE_PAPER_CONFIG');\r\n\r\n $id = $PaperConfig->getId();\r\n\r\n $baptismCertX = $PaperConfig->getBaptismCertX();\r\n $baptismCertY = $PaperConfig->getBaptismCertY();\r\n $copyBaptismCertX = $PaperConfig->getCopyBaptismCertX();\r\n $copyBaptismCertY = $PaperConfig->getCopyBaptismCertY();\r\n \r\n $communionCertX = $PaperConfig->getCommunionCertX();\r\n $communionCertY = $PaperConfig->getCommunionCertY();\r\n $copyCommunionCertX = $PaperConfig->getCopyCommunionCertX();\r\n $copyCommunionCertY = $PaperConfig->getCopyCommunionCertY();\r\n \r\n $confirmationCertX = $PaperConfig->getConfirmationCertX();\r\n $confirmationCertY = $PaperConfig->getConfirmationCertY();\r\n $copyConfirmationCertX= $PaperConfig->getCopyConfirmationCertX();\r\n $copyConfirmationCertY= $PaperConfig->getCopyConfirmationCertY();\r\n\r\n $marriageCertX = $PaperConfig->getMarriageCertX();\r\n $marriageCertY = $PaperConfig->getMarriageCertY();\r\n $marriageConstancyX = $PaperConfig->getMarriageConstancyX();\r\n $marriageConstancyY = $PaperConfig->getMarriageConstancyY();\r\n $marriageNoticeX = $PaperConfig->getMarriageNoticeX();\r\n $marriageNoticeY = $PaperConfig->getMarriageNoticeY();\r\n $marriageExhortX = $PaperConfig->getMarriageExhortX();\r\n $marriageExhortY = $PaperConfig->getMarriageExhortY(); \r\n $marriageTraslationX = $PaperConfig->getMarriageTraslationX();\r\n $marriageTraslationY = $PaperConfig->getMarriageTraslationY();\r\n\r\n $query = \"UPDATE $tablePaperConfig\r\n SET baptismCertX = $baptismCertX, \r\n baptismCertY = $baptismCertY, \r\n copyBaptismCertX = $copyBaptismCertX, \r\n copyBaptismCertY = $copyBaptismCertY,\r\n communionCertX = $communionCertX,\r\n communionCertY = $communionCertY,\r\n copyCommunionCertX = $copyCommunionCertX,\r\n copyCommunionCertY = $copyCommunionCertY,\r\n confirmationCertX = $confirmationCertX,\r\n confirmationCertY = $confirmationCertY,\r\n copyConfirmationCertX = $copyConfirmationCertX,\r\n copyConfirmationCertY = $copyConfirmationCertY,\r\n marriageCertX = $marriageCertX,\r\n marriageCertY = $marriageCertY,\r\n marriageConstancyX = $marriageConstancyX,\r\n marriageConstancyY = $marriageConstancyY,\r\n marriageNoticeX = $marriageNoticeX,\r\n marriageNoticeY = $marriageNoticeY,\r\n marriageExhortX = $marriageExhortX,\r\n marriageExhortY = $marriageExhortY,\r\n marriageTraslationX = $marriageTraslationX,\r\n marriageTraslationY = $marriageTraslationY\r\n WHERE $tablePaperConfig.id = $id\";\r\n\r\n return DatabaseManager::singleAffectedRow($query);\r\n }", "public function update(Request $request)\n {\n\n var_dump($request);\n config('app.name', 'TestName');\n // $request->validate([\n // 'siteName' => 'required',\n // 'siteDescription' => 'required',\n // 'adminEmail' => 'required|email',\n // 'titleTag' => 'required',\n // 'allowLogin' => 'required|boolean',\n // 'allowRegistration' => 'required|boolean',\n // 'maintenanceMode' => 'required|boolean'\n // ]);\n // Configuration::whereId(1)->update([\n // 'siteName' => $request->name,\n // 'siteDescription' => $request->email,\n // 'titleTag' => $request->titleTag,\n // 'allowLogin' => $request->allowLogin,\n // 'allowRegistration' => $request->allowRegistration,\n // 'maintenanceMode' => $request->maintenanceMode,\n // 'adminEmail' => $request->adminEmail,\n // ]);\n }", "function Admin_Messages_admin_updateconfig()\n{\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing\n if (!pnSecAuthAction(0, 'Admin_Messages::', '::', ACCESS_ADMIN)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n // Get parameters from whatever input we need. All arguments to this\n // function should be obtained from pnVarCleanFromInput(), getting them\n // from other places such as the environment is not allowed, as that makes\n // assumptions that will not hold in future versions of PostNuke\n $itemsperpage = pnVarCleanFromInput('itemsperpage');\n\n // Confirm authorisation code. This checks that the form had a valid\n // authorisation code attached to it. If it did not then the function will\n // proceed no further as it is possible that this is an attempt at sending\n // in false data to the system\n if (!pnSecConfirmAuthKey()) {\n pnSessionSetVar('errormsg', _BADAUTHKEY);\n pnRedirect(pnModURL('Admin_Messages', 'admin', 'view'));\n return true;\n }\n\n // Update module variables. Note that depending on the HTML structure used\n // to obtain the information from the user it is possible that the values\n // might be unset, so it is important to check them all and assign them\n // default values if required\n if (empty($itemsperpage)) {\n $itemsperpage = 10;\n }\n pnModSetVar('Admin_Messages', 'itemsperpage', $itemsperpage);\n\n // Let any other modules know that the modules configuration has been updated\n pnModCallHooks('module','updateconfig','Admin_Messages', array('module' => 'Admin_Messages'));\n\n\t// the module configuration has been updated successfuly\n\tpnSessionSetVar('statusmsg', _CONFIGUPDATED);\n\n // This function generated no output, and so now it is complete we redirect\n // the user to an appropriate page for them to carry on their work\n pnRedirect(pnModURL('Admin_Messages', 'admin', 'view'));\n\n // Return\n return true;\n}", "public function UpdateNotificationConfig(\\Google\\Cloud\\SecurityCenter\\V1\\UpdateNotificationConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateNotificationConfig',\n $argument,\n ['\\Google\\Cloud\\SecurityCenter\\V1\\NotificationConfig', 'decode'],\n $metadata, $options);\n }", "function updateConfig($settings) {\n try {\n global $db_table_prefix;\n\n $results = array();\n\n $db = pdoConnect();\n\n $query = \"UPDATE \".$db_table_prefix.\"configuration\n SET\n value = :value\n WHERE\n name = :name\";\n\n $stmt = $db->prepare($query);\n\n foreach ($settings as $name => $value){\n $sqlVars = array(':name' => $name, ':value' => $value);\n $stmt->execute($sqlVars);\n }\n\n return true;\n\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}", "public function updateSettings(User $user, array $data);", "public function action_update_check()\n\t{\n\t\tUpdate::add( $this->info->name, '9bfb17aa-f8f0-4638-a549-af4f86a9d412', $this->info->version );\n\t}", "private function set_to_be_updated()\n {\n if ( !$this->presence_in_db ){\n $this->to_be_updated = true;\n return;\n }\n $orig_db_check = ($this->value === $this->new_value) ? false : true;\n\n $wle_definition = $this->get_wpconfig_by_name();\n $pattern = $this->build_wle_pattern_by_name();\n\n preg_match($pattern, $wle_definition, $matches);\n\n if ( !$orig_db_check && !empty($matches[1]) ) {\n $this->to_be_updated = ($this->value === $matches[1]) ? false : true;\n }\n else {\n $this->to_be_updated = $orig_db_check;\n }\n }", "public function updateSetupConfigEx($request, $headers, $runtime)\n {\n Utils::validateModel($request);\n\n return UpdateSetupConfigResponse::fromMap($this->doRequest('1.0', 'antcloud.monitor.setup.config.update', 'HTTPS', 'POST', '/gateway.do', Tea::merge($request), $headers, $runtime));\n }", "private function _uptime()\n {\n if (CommonFunctions::executeProgram('uptime', '', $buf)) {\n if (preg_match(\"/up (\\d+) days,\\s*(\\d+):(\\d+),/\", $buf, $ar_buf) || preg_match(\"/up (\\d+) day,\\s*(\\d+):(\\d+),/\", $buf, $ar_buf)) {\n $min = $ar_buf[3];\n $hours = $ar_buf[2];\n $days = $ar_buf[1];\n $this->sys->setUptime($days * 86400 + $hours * 3600 + $min * 60);\n }\n }\n }", "public function update($data)\n\t{\n\t\tforeach($data as $key=>$value)\n\t\t{\n\t\t\t$result['flag']=$this->where(array('key'=>$key))->save(array(\n\t\t\t\t'value'=>$value,\n\t\t\t));\n\t\t\tif(!$result['flag'])\n\t\t\t{\n\t\t\t\t$result['message']='修改配置失败';\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "function updateConfig() {\n global $db;\n global $lang;\n\n if(configEnabled() == true) {\n if($res = $db->query(\"INSERT IGNORE INTO `\".$lang[\"config_db_name\"].\"`.`\".$lang[\"config_table_name\"].\"` (`id`, `key`, `val`) VALUES \".getKeys())) {\n return \"Updated\";\n } else {\n return \"Cannot insert rows. Error: \".$db->error;\n }\n } else {\n return \"Config never been initialized\";\n }\n }", "protected function updateConfig() {\n $config_factory = \\Drupal::configFactory();\n $settings = $config_factory->getEditable('message_subscribe.settings');\n $settings->set('use_queue', TRUE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('mailsystem.settings');\n $settings->set('defaults', [\n 'sender' => 'swiftmailer',\n 'formatter' => 'swiftmailer',\n ]);\n $settings->set('modules', [\n 'swiftmailer' => [\n 'none' => [\n 'formatter' => 'swiftmailer',\n 'sender' => 'swiftmailer',\n ],\n ],\n 'message_notify' => [\n 'none' => [\n 'formatter' => 'swiftmailer',\n 'sender' => 'swiftmailer',\n ],\n ],\n ]);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('swiftmailer.message');\n $settings->set('format', 'text/html');\n $settings->set('respect_format', FALSE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('flag.flag.subscribe_node');\n $settings->set('status', TRUE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('user.role.authenticated');\n $permissions = $settings->get('permissions');\n foreach ([\n 'flag subscribe_node',\n 'unflag subscribe_node',\n ] as $perm) {\n if (!in_array($perm, $permissions)) {\n $permissions[] = $perm;\n }\n }\n $settings->set('permissions', $permissions);\n $settings->save(TRUE);\n\n }", "public function updateUsersSettings(Request $request)\n {\n $err = array();\n $this->validate($request, [\n 'users_paginate' => 'required|numeric|min:1',\n 'default_user_status' => 'required',\n 'allows_registration' => 'required',\n 'allow_reset_password' => 'required',\n 'allow_remember' => 'required'\n ]);\n $set_names = [\n 'paginate'=>'users_paginate',\n 'default_groups'=>'group_selection',\n 'default_user_status'=>'default_user_status',\n 'allows_registration'=>'allows_registration',\n 'allow_reset_password'=>'allow_reset_password',\n 'allow_remember'=>'allow_remember'\n ];\n foreach ($set_names as $name => $value) {\n if($name != 'default_groups'){\n $users = Setting::where(['group' => 'users','name' =>$name])\n ->update(['value' => $request->input($value)]);\n }else{\n if($request->input('group_selection')){\n $default_groups = implode(\",\", $request->input('group_selection'));\n }else{\n $default_groups = \"\";\n }\n $users = Setting::where(['group' => 'users','name' =>$name])\n ->update(['value' => $default_groups]);\n }\n if(!$users){\n $err[] = $users;\n }\n }\n\n if(empty($err)){\n return redirect()->back()->with('success', 'Settings Updated!');\n }else{\n return redirect()->back()->with('error', 'Error Updating!: ' . implode(', ', $err));\n }\n\n }", "function updateConfig($configParams) {\n\t\t// Update config file\n\t\t$configParser = new ConfigParser();\n\t\tif (!$configParser->updateConfig(Config::getConfigFileName(), $configParams)) {\n\t\t\t// Error reading config file\n\t\t\t$this->setError(INSTALLER_ERROR_GENERAL, 'installer.configFileError');\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->configContents = $configParser->getFileContents();\n\t\tif (!$configParser->writeConfig(Config::getConfigFileName())) {\n\t\t\t$this->wroteConfig = false;\n\t\t}\n\n\t\treturn true;\n\t}", "function update_v10_to_v11() {\n\n // add default issue tooltips\n $customField_type = Config::getInstance()->getValue(Config::id_customField_type);\n $backlogField = Config::getInstance()->getValue(Config::id_customField_backlog);\n $fieldList = array('project_id', 'category_id', 'custom_'.$customField_type,\n 'codevtt_elapsed', 'custom_'.$backlogField, 'codevtt_drift');\n $serialized = serialize($fieldList);\n Config::setValue('issue_tooltip_fields', $serialized, Config::configType_string, 'fields to be displayed in issue tooltip');\n\n $query = \"UPDATE `codev_config_table` SET `value`='11' WHERE `config_id`='database_version';\";\n $result = execQuery($query);\n\n}", "function update_v10_to_v11() {\n\n // add default issue tooltips\n $customField_type = Config::getInstance()->getValue(Config::id_customField_type);\n $backlogField = Config::getInstance()->getValue(Config::id_customField_backlog);\n $fieldList = array('project_id', 'category_id', 'custom_'.$customField_type,\n 'codevtt_elapsed', 'custom_'.$backlogField, 'codevtt_drift');\n $serialized = serialize($fieldList);\n Config::setValue('issue_tooltip_fields', $serialized, Config::configType_string, 'fields to be displayed in issue tooltip');\n\n $query = \"UPDATE `codev_config_table` SET `value`='11' WHERE `config_id`='database_version';\";\n $result = execQuery($query);\n\n}", "public function update()\n\t{\n\t\tif (!is_numeric($this->get('uidNumber')))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$db = \\App::get('db');\n\n\t\t$modifiedDate = gmdate('Y-m-d H:i:s');\n\n\t\t$this->set('modifiedDate', $modifiedDate);\n\n\t\t$query = \"UPDATE `#__xprofiles` SET \";\n\n\t\t$classvars = get_class_vars(__CLASS__);\n\n\t\t$first = true;\n\t\t$affected = 0;\n\n\t\tforeach ($classvars as $property => $value)\n\t\t{\n\t\t\tif ('_' == substr($property, 0, 1))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!$first)\n\t\t\t{\n\t\t\t\t$query .= ',';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$first = false;\n\t\t\t}\n\n\t\t\tif ($property == 'params')\n\t\t\t{\n\t\t\t\tif (is_object($this->_params))\n\t\t\t\t{\n\t\t\t\t\t$query .= \"params='\".str_replace(\"\", \"\", $this->_params->toString()).\"'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$query .= \"params=''\";\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($this->get($property) === null)\n\t\t\t{\n\t\t\t\t$query .= \"$property=NULL\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$query .= \"$property=\" . $db->quote($this->get($property));\n\t\t\t}\n\t\t}\n\n\t\t$query .= \" WHERE uidNumber=\" . $db->quote($this->get('uidNumber')) . \";\";\n\n\t\t$db->setQuery($query);\n\n\t\tif (!$db->query())\n\t\t{\n\t\t\t$this->setError('Error updating data in xprofiles table: ' . $db->getErrorMsg());\n\t\t}\n\n\t\t$affected = $db->getAffectedRows();\n\n\t\tforeach ($classvars as $property => $value)\n\t\t{\n\t\t\tif (('_auxv_' != substr($property, 0, 6)) && ('_auxs_' != substr($property, 0, 6)))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$property = substr($property, 6);\n\n\t\t\t$first = true;\n\n\t\t\t$query = \"REPLACE INTO #__xprofiles_\" . $property . \" (uidNumber, \" . $property . \") VALUES \";\n\t\t\t$query_values = \"\";\n\n\t\t\t$list = $this->get($property);\n\n\t\t\tif (!is_array($list))\n\t\t\t{\n\t\t\t\t$list = array($list);\n\t\t\t}\n\n\t\t\tforeach ($list as $value)\n\t\t\t{\n\t\t\t\tif (!$first)\n\t\t\t\t{\n\t\t\t\t\t$query_values .= ',';\n\t\t\t\t}\n\n\t\t\t\t$first = false;\n\n\t\t\t\t$query_values .= '(' . $db->quote($this->get('uidNumber')) . ',' . $db->quote($value) . ')';\n\t\t\t}\n\n\t\t\tif ($query_values != '')\n\t\t\t{\n\t\t\t\t$db->setQuery($query . $query_values);\n\n\t\t\t\tif (!$db->query())\n\t\t\t\t{\n\t\t\t\t\t$this->setError(\"Error updating data in xprofiles $property table: \" . $db->getErrorMsg());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$affected += $db->getAffectedRows();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (property_exists(__CLASS__, '_auxv_' . $property))\n\t\t\t{\n\t\t\t\tforeach ($list as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$list[$key] = $db->quote($value);\n\t\t\t\t}\n\n\t\t\t\t$valuelist = implode($list, \",\");\n\n\t\t\t\tif (empty($valuelist))\n\t\t\t\t{\n\t\t\t\t\t$valuelist = \"''\";\n\t\t\t\t}\n\n\t\t\t\t$query = \"DELETE FROM #__xprofiles_\" . $property . \" WHERE uidNumber=\" . $this->get('uidNumber') . \" AND $property NOT IN ($valuelist);\";\n\n\t\t\t\t$db->setQuery($query);\n\n\t\t\t\tif (!$db->query())\n\t\t\t\t{\n\t\t\t\t\t$this->setError(\"Error deleting data in xprofiles $property table: \" . $db->getErrorMsg());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$affected += $db->getAffectedRows();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($affected > 0)\n\t\t{\n\t\t\tEvent::trigger('user.onAfterStoreProfile', array($this));\n\t\t}\n\n\t\treturn true;\n\t}", "public function updateTopPicks(array $data)\n {\n return $this->call(\n 'POST',\n '/api/v1/top_picks/update',\n $data\n );\n }", "public function update(Request $request, $id)\n {\n $uptime = Uptime::find($id);\n $uptime->morningFrom = $request->morningFrom;\n $uptime->morningTo = $request->morningTo;\n $uptime->afternoonFrom = $request->afternoonFrom;\n $uptime->afternoonTo = $request->afternoonTo;\n $uptime->eveningFrom = $request->eveningFrom;\n $uptime->eveningTo = $request->eveningTo;\n $uptime->days = implode('|', $request->days);\n\n $save = $uptime->save();\n\n return back()->withInput();\n }", "public static function update($input)\n\t{\t\n\t\ttry\n\t\t{\n\t\t$success = DB::table('devices')\n\t\t\t->where('id', '=', $input['id'])\n\t\t\t->update(array(\n\t\t\t'name' => $input['name'],\n\t\t\t'ip_address' => $input['ip_address'],\n\t\t\t'warning_threshold' => $input['warning_threshold'],\n\t\t\t'alert_threshold' => $input['alert_threshold'],\n\t\t\t'critical_threshold' => $input['critical_threshold'],\n\t\t\t'type' => $input['type'],\n\t\t\t'ports' => $input['ports'],\n\t\t\t'room_id' => $input['room_id'],\n\t\t\t'updated_at' => date(\"Y-m-d H:i:s\")\n\t\t\t));\n\n\t\treturn $success;\n\t\t}\n\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tLog::write('error', $e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t}", "public static function update_all_and_use($config)\n\t{\n\t\treturn self::new_instance_records()->update_all_and_use($config);\n\t}", "public function updateUserSettings($data, $where){\n\n\t\t$this->db->where($where)->update(\"user_settings\", $data);\n\t\treturn $this->db->affected_rows();\n\t}", "public function update_check ( $transient ) {\n\t // Check if the transient contains the 'checked' information\n\t // If no, just return its value without hacking it\n\t if( empty( $transient->checked ) )\n\t return $transient;\n\t \n\t // The transient contains the 'checked' information\n\t // Now append to it information form your own API\n\t $args = array(\n\t 'action' => 'pluginupdatecheck',\n\t 'plugin_name' => $this->file,\n\t 'version' => $transient->checked[$this->file]\n\t );\n\n\t // Send request checking for an update\n\t $response = $this->request( $args );\n\n\t // If response is false, don't alter the transient\n\t if( false !== $response ) {\n\t $transient->response[$this->file] = $response;\n\t }\n\t return $transient;\n\t}", "public function testAPIUpdateMonitoredAddress() {\n $sample_user = $this->app->make('\\UserHelper')->createSampleUser();\n\n $helper = $this->app->make('\\MonitoredAddressHelper');\n $created_address = $helper->createSampleMonitoredAddress($sample_user);\n $update_vars = [\n 'monitorType' => 'send',\n 'active' => false,\n ];\n $api_tester = $this->getAPITester();\n $loaded_address_from_api = $api_tester->testUpdateResource($created_address, $update_vars);\n PHPUnit::assertEquals(false, $loaded_address_from_api['active']);\n\n $update_vars = [\n 'webhookEndpoint' => 'http://xchain.tokenly.dev/notifyme2',\n ];\n $api_tester = $this->getAPITester();\n $loaded_address_from_api = $api_tester->testUpdateResource($created_address, $update_vars);\n PHPUnit::assertEquals('http://xchain.tokenly.dev/notifyme2', $loaded_address_from_api['webhookEndpoint']);\n }", "public static function configCheckTime($interval) {\n return time()+$interval;\n }", "public function updateConfig(Request $request) {\n $title = $request->input('title');\n $description = $request->input('description');\n\n if ($title && $description){\n $configModel = new Config();\n\n $result = $configModel->updateConfig(['title' => $title, 'description' => $description]);\n return $result;\n }\n return 0;\n }", "public function update_settings($data) {\n\n\t\tif(function_exists('update_option')) { \n\t\t\t$data = array_merge($this->settings, (array)$data); \n\t\t\tupdate_option('wpu-settings', $data);\n\t\t\t$this->settings = $data;\n\t\t}\n\t}", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Firestore\\V1beta1\\DocumentMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "protected function updateSettings($companyId, $postdata, $app) {\n\t\t\n\t\t$setting_id = self::getSettingID($companyId, $app);\n\t\t$where = \"id = '{$setting_id}'\";\n\t\t$row = $this->fetchRow($where);\n\t\t\n\t\t$option = self::getSubmittedSettings($app, $postdata);\n\t\t\n\t\tif($app == self::MAIN){\n\t\t\t$current = (array)json_decode($row->defined_settings)->current_settings;\n\t\t\t$default = $this->getDefaultSettings($app);\n\t\t\t$option = array_merge($current, $option);\n \n\t\t\t$opt = array('default' => $default, 'current_settings' => $option, 'previous_settings' => $current);\n\t\t}else if($app == self::NOTIFICATIONS) {\n\t\t\t$current = json_decode($row->defined_settings,true);\n\t\t\t$app_changed = false;\n\t\t\t$e_content_changed = false;\n\t\t\t$main_email_address = $current['main_email_address'];\n\t\t\tif($postdata['add_main_email']!='') {\n\t\t\t\tunset($current['main_email_address']);\n\t\t\t\t$current['main_email_address'] = $postdata['main_email_add'];\n\t\t\t\t$app_changed = true;\n\t\t\t}else{\n\t\t\t\tforeach($current['notifications'] as $k => $i) {\n\t\t\t\t\tif($k == $postdata['application_type']){\n\t\t\t\t\t\tforeach($i as $ks => $j) {\n\t\t\t\t\t\t\tif(($ks+1) == $postdata['notification_for']) {\n\t\t\t\t\t\t\t\tunset($current['notifications'][$k][$ks][$postdata['notification_for']]);\n\t\t\t\t\t\t\t\t$current['notifications'][$k][$ks] = array($postdata['notification_for'] => array('email_content' => $postdata['email_template']));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$app_changed = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!$app_changed) {\n\t\t\t\t$opt = $current['notifications'] + $option['notifications'];\n\t\t\t\t$opt = array('main_email_address' => $main_email_address,'notifications' => $opt);\n\t\t\t}else{\n\t\t\t\t$opt = $current;\n\t\t\t}\n\t\t}\n\t\t$row->defined_settings = json_encode($opt);\n\t\t$row->last_updated = date('Y-m-d H:i:s');\n\t\t$row->save();\n\t}", "public function modifyFBMessengerConfigFile(UpdateSystemConfigRequest $request)\n {\n $file_content = file_get_contents(base_path('.fb_messenger'));\n\n return view('admin.system.modify_fb_messenger_config_file', compact('file_content'));\n }", "public function action_update_check()\n\t{\n\t \tUpdate::add( 'DateNinja', 'e64e02e0-38f8-11dd-ae16-0800200c9a66', $this->info->version );\n\t}", "public function action_update_check()\n\t{\n\t \tUpdate::add('Atom Threading Extensions', 'a413fa7e-76cf-4edf-b7c5-53b8aa648eef', $this->info->version);\n\t}", "public function checkUpdate()\n {\n if (($this->getFrequency() + $this->getLastUpdate()) > time()) {\n return $this;\n }\n\n $feedData = array();\n\n $feedXml = $this->getFeedData();\n\n if ($feedXml && $feedXml->channel && $feedXml->channel->item) {\n foreach ($feedXml->channel->item as $item) {\n $feedData[] = array(\n 'severity' => (int)$item->severity,\n 'date_added' => $this->getDate((string)$item->pubDate),\n 'title' => (string)$item->title,\n 'description' => (string)$item->description,\n 'url' => (string)$item->link,\n );\n }\n\n if ($feedData) {\n Mage::getModel('adminnotification/inbox')->parse(array_reverse($feedData));\n }\n\n }\n $this->setLastUpdate();\n\n return $this;\n }", "public function update()\n {\n // $this->ajaxRequest();\n\n // Validate the submitted data\n $this->validateInput();\n\n // Preparing the data before update\n $data = (object) $this->input->post();\n \n // Execute update function from model\n $query = $this->m_setting->update($data);\n \n // Check if query was success\n if ($query === true) {\n $results = array('status' => true, 'action' => 'Success', 'message' => 'Settings updated sucessfully');\n } else {\n $results = array('status' => false, 'action' => 'Failed', 'message' => $query);\n }\n\n // Return the result to the view\n return response($results);\n }", "public function updatePassword(array $params)\n {\n $params['action'] = 'udp';\n return $this->apiRequest('changepass', $params);\n }", "function wp_schedule_update_checks()\n {\n }", "function modifyPuppetConfiguration( $puppetinfo ) {\n\t\tglobal $wgAuth;\n\t\tglobal $wgOpenStackManagerPuppetOptions;\n\n\t\t$hostEntry = array();\n\t\tif ( $wgOpenStackManagerPuppetOptions['enabled'] ) {\n\t\t\tforeach ( $wgOpenStackManagerPuppetOptions['defaultclasses'] as $class ) {\n\t\t\t\t$hostEntry['puppetclass'][] = $class;\n\t\t\t}\n\t\t\tforeach ( $wgOpenStackManagerPuppetOptions['defaultvariables'] as $variable => $value ) {\n\t\t\t\t$hostEntry['puppetvar'][] = $variable . '=' . $value;\n\t\t\t}\n\t\t\tif ( isset( $puppetinfo['classes'] ) ) {\n\t\t\t\tforeach ( $puppetinfo['classes'] as $class ) {\n\t\t\t\t\t$hostEntry['puppetclass'][] = $class;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( isset( $puppetinfo['variables'] ) ) {\n\t\t\t\tforeach ( $puppetinfo['variables'] as $variable => $value ) {\n\t\t\t\t\t$hostEntry['puppetvar'][] = $variable . '=' . $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$oldpuppetinfo = $this->getPuppetConfiguration();\n\t\t\tif ( isset( $oldpuppetinfo['puppetvar'] ) ) {\n\t\t\t\t$wgAuth->printDebug( \"Checking for preexisting variables\", NONSENSITIVE );\n\t\t\t\tforeach ( $oldpuppetinfo['puppetvar'] as $variable => $value ) {\n\t\t\t\t\t$wgAuth->printDebug( \"Found $variable\", NONSENSITIVE );\n\t\t\t\t\tif ( $variable == \"instancecreator_email\" || $variable == \"instancecreator_username\"\n\t\t\t\t\t\t|| $variable == \"instancecreator_lang\" || $variable == \"instanceproject\" || $variable == \"instancename\" ) {\n\t\t\t\t\t\t$hostEntry['puppetvar'][] = $variable . '=' . $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( $hostEntry ) {\n\t\t\t\t$success = LdapAuthenticationPlugin::ldap_modify( $wgAuth->ldapconn, $this->hostDN, $hostEntry );\n\t\t\t\tif ( $success ) {\n\t\t\t\t\t$this->fetchHostInfo();\n\t\t\t\t\t$wgAuth->printDebug( \"Successfully modified puppet configuration for host\", NONSENSITIVE );\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t$wgAuth->printDebug( \"Failed to modify puppet configuration for host\", NONSENSITIVE );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$wgAuth->printDebug( \"No hostEntry when trying to modify puppet configuration\", NONSENSITIVE );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function updateSettings(){\n\t\tuser_login_required();\n\n\t\t//Get conversationID\n\t\t$conversationID = $this->getSafePostConversationID(\"conversationID\");\n\n\t\t//Check if user want to update its follow state\n\t\tif(isset($_POST['following'])){\n\t\t\t$follow = $_POST[\"following\"] === \"true\" ? true : false;\n\n\t\t\t//Try to update follow state\n\t\t \tif(!CS::get()->components->conversations->changeFollowState(userID, $conversationID, $follow))\n\t\t \t\tRest_fatal_error(500, \"Couldn't update user follow state !\");\n\t\t}\n\t\t\n\t\t//Check if user asked to change moderation settings\n\t\tif(isset($_POST['members']) OR isset($_POST['name'])){\n\n\t\t\t//Check if user is allowed to change such settings\n\t\t\tif(!CS::get()->components->conversations->userIsModerator(userID, $conversationID))\n\t\t\t\tRest_fatal_error(401, \"The user isn't a moderator, he can't updates such settings !\");\n\t\t\t\n\t\t\t//Update conversation name (if required)\n\t\t\tif(isset($_POST[\"name\"])){\n\t\t\t\t$conversationName = $_POST['name'] == \"false\" ? \"\" : $_POST['name'];\n\n\t\t\t\t//Update conversation name\n\t\t\t\tif(!CS::get()->components->conversations->changeName($conversationID, $conversationName))\n\t\t\t\t\tRest_fatal_error(500, \"Couldn't update conversation name !\");\n\t\t\t}\n\n\t\t\t//Update conversation users (if required)\n\t\t\tif(isset($_POST[\"members\"])){\n\t\t\t\t//Get user list\n\t\t\t\t$conversationMembers = numbers_list_to_array($_POST['members']);\n\n\t\t\t\t//Make sure current user is in the list\n\t\t\t\t$conversationMembers[userID] = userID;\n\n\t\t\t\t//Try to update conversation members\n\t\t\t\tif(!CS::get()->components->conversations->updateMembers($conversationID, $conversationMembers))\n\t\t\t\t\tRest_fatal_error(500, \"Couldn't update conversation members list !\");\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\t//Success\n\t\treturn array(\"success\" => \"Conversation informations were successfully updated !\");\n\t}", "public function updater() {\n\n\t\t// Bail if current user cannot manage plugins.\n\t\tif ( ! current_user_can( 'install_plugins' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if plugin updater is not loaded.\n\t\tif ( ! class_exists( 'Puc_v4_Factory' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Setup the updater.\n\t\t// $updater = Puc_v4_Factory::buildUpdateChecker( 'https://github.com/maithemewp/mai-grid-entries/', __FILE__, 'mai-grid' );\n\t}", "public function vxUserPasswordUpdateCheck() {\n\t\t$rt = array();\n\t\t\n\t\t$rt['errors'] = 0;\n\t\t\n\t\t$rt['pswitch'] = 'a';\n\t\t\n\t\t$rt['usr_password_value'] = '';\n\t\t$rt['usr_confirm_value'] = '';\n\t\t/* usr_password_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (32 sbs)\n\t\t3 => invalid characters\n\t\t4 => not identical\n\t\t5 => modify empty\n\t\t999 => unspecific */\n\t\t$rt['usr_password_error'] = 0;\n\t\t$rt['usr_password_touched'] = 0;\n\t\t$rt['usr_password_error_msg'] = array(1 => '你忘记填写密码了', 2 => '你的这个密码太长了,缩减一下吧', 3 => '你填写的密码中包含了不被允许的字符', 4 => '你所填写的两个密码不匹配', 5 => '你修改密码时需要将新密码输入两遍');\n\t\t/* usr_confirm_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (32 sbs)\n\t\t3 => invalid characters(should not reach here in final rendering)\n\t\t4 => not identical\n\t\t5 => modify empty\n\t\t999 => unspecific */\n\t\t$rt['usr_confirm_error'] = 0;\n\t\t$rt['usr_confirm_touched'] = 0;\n\t\t$rt['usr_confirm_error_msg'] = array(1 => '你忘记填写密码确认了', 2 => '你的这个密码确认太长了,缩减一下吧', 3 => '你填写的密码中包含了不被允许的字符', 4 => '你所填写的两个密码不匹配', 5 => '你修改密码时需要将新密码输入两遍');\n\n\t\t/* S check: usr_password and usr_confirm */\n\t\t\n\t\tif (isset($_POST['usr_password'])) {\n\t\t\t$rt['usr_password_value'] = $_POST['usr_password'];\n\t\t\tif (strlen($rt['usr_password_value']) == 0) {\n\t\t\t\t$rt['usr_password_touched'] = 0;\n\t\t\t\t$rt['usr_password_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t} else {\n\t\t\t\t$rt['usr_password_touched'] = 1;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_password_touched'] = 0;\n\t\t\t$rt['usr_password_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif (isset($_POST['usr_confirm'])) {\n\t\t\t$rt['usr_confirm_value'] = $_POST['usr_confirm'];\n\t\t\tif (strlen($rt['usr_confirm_value']) == 0) {\n\t\t\t\t$rt['usr_confirm_touched'] = 0;\n\t\t\t\t$rt['usr_confirm_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t} else {\n\t\t\t\t$rt['usr_confirm_touched'] = 1;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_confirm_touched'] = 0;\n\t\t\t$rt['usr_confirm_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_touched'] == 0) && ($rt['usr_confirm_touched'] == 0)) {\n\t\t\t$rt['pswitch'] = 'a'; /* both blank */\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_touched'] == 1) && ($rt['usr_confirm_touched'] == 1)) {\n\t\t\t$rt['pswitch'] = 'b'; /* both touched */\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_touched'] == 1) && ($rt['usr_confirm_touched'] == 0)) {\n\t\t\t$rt['pswitch'] = 'c'; /* first touched */\n\t\t}\n\t\t\t\n\t\tif (($rt['usr_password_touched'] == 0) && ($rt['usr_confirm_touched'] == 1)) {\n\t\t\t$rt['pswitch'] = 'd'; /* second touched */\n\t\t}\n\t\t\n\t\tswitch ($rt['pswitch']) {\n\t\t\tdefault:\n\t\t\tcase 'a':\n\t\t\t\t/* nothing will happen */\n\t\t\t\tbreak;\n\t\t\tcase 'b':\n\t\t\t\t/* a lot check here */\n\t\t\t\tif (strlen($rt['usr_password_value']) > 32) {\n\t\t\t\t\t$rt['usr_password_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif (strlen($rt['usr_confirm_value']) > 32) {\n\t\t\t\t\t$rt['usr_confirm_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (($rt['usr_password_error'] == 0) && ($rt['usr_confirm_error'] == 0)) {\n\t\t\t\t\tif ($rt['usr_password_value'] != $rt['usr_confirm_value']) {\n\t\t\t\t\t\t$rt['usr_confirm_error'] = 4;\n\t\t\t\t\t\t$rt['errors']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t$rt['usr_confirm_error'] = 5;\n\t\t\t\t$rt['errors']++;\n\t\t\t\tbreak;\n\t\t\tcase 'd':\n\t\t\t\t$rt['usr_password_error'] = 5;\n\t\t\t\t$rt['errors']++;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $rt;\n\t}", "public function update(UserSettingsRequest $request)\n {\n $input = $request->except(['_method', '_token']);\n\n foreach ($input as $key => $value) {\n\n setting()->set(\n $key,\n $value\n );\n setting()->setExtraColumns(['user_id' => auth()->user()->id]);\n }\n setting()->save();\n\n return redirect(route('settings.index'))->with('message', 'Settings have been saved!');\n }", "public function applyPatch($name)\n {\n // Check if this patch is valid first, before applying.\n Channels::includeSystem('Patching');\n $valid = Patching::wsValidateUpdate($name);\n if ($valid === FALSE) {\n return FALSE;\n }\n\n Patching::extractPatch($name);\n\n $dataDir = BaseSystem::getDataDir('Patching');\n $patchDir = $dataDir.'/'.$name;\n if (is_dir($patchDir) === FALSE) {\n return FALSE;\n }\n\n $rootDir = dirname(dirname(dirname(dirname(__FILE__))));\n\n $patchResultPath = $patchDir.'/patch.result';\n\n // Turn off the system cron service before we apply.\n file_put_contents($patchResultPath, '[Turn off the system cron service.]'.\"\\n\", FILE_APPEND);\n exec('/etc/init.d/cron stop');\n\n file_put_contents($patchResultPath, '[Applying Patch Begins]'.\"\\n\", FILE_APPEND);\n file_put_contents($patchResultPath, '[Start running Pre upgrade scripts]'.\"\\n\", FILE_APPEND);\n self::runUpgradeScripts('pre', $rootDir, $patchDir);\n\n // Add new files and delete old files.\n file_put_contents($patchResultPath, '[Start running patch.sh]'.\"\\n\", FILE_APPEND);\n if (file_exists($patchDir.'/patch.sh') === TRUE) {\n $script = 'cd '.$rootDir.' && ';\n $script .= 'cp '.$patchDir.'/patch.sh . && ';\n $script .= 'sh patch.sh >> '.$patchResultPath;\n exec($script);\n }\n\n // Applies the patch.\n if (file_exists($patchDir.'/patch.diff') === TRUE) {\n // Do a dry run to check for error.\n file_put_contents($patchResultPath, '[Start running dry run]'.\"\\n\", FILE_APPEND);\n $dryRun = 'patch --dry-run -d '.$rootDir.' -p1 -i '.$patchDir.'/patch.diff';\n $output = array();\n $retval = 0;\n exec($dryRun, $output, $retval);\n if ($retval !== 0) {\n file_put_contents($patchResultPath, '[Patch file dry run failed]'.\"\\n\", FILE_APPEND);\n // Patch's exit status is 0 if all hunks are applied\n // successfully, 1 if some hunks cannot be applied, and 2 if\n // there is more serious trouble.\n $error = implode(\"\\n\", $output);\n file_put_contents($patchResultPath, $error.\"\\n\", FILE_APPEND);\n return $error;\n } else {\n file_put_contents($patchResultPath, '[Start running patch command with patch.diff]'.\"\\n\", FILE_APPEND);\n $script = 'patch -d '.$rootDir.' -p1 -i '.$patchDir.'/patch.diff >> '.$patchResultPath;\n exec($script);\n }\n }//end if\n\n file_put_contents($patchResultPath, '[Start running Post upgrade scripts]'.\"\\n\", FILE_APPEND);\n self::runUpgradeScripts('post', $rootDir, $patchDir);\n if (file_exists($rootDir.'/web/Skins/defaultSkin') === TRUE) {\n // Remove cached css files in the web dir.\n file_put_contents($patchResultPath, '[Removing cached CSS files in Web directory]'.\"\\n\", FILE_APPEND);\n $cachedCss = glob($rootDir.'/web/Skins/defaultSkin/*.css');\n foreach ($cachedCss as $file) {\n unlink($file);\n }\n }\n\n // Re-generate Help documentation.\n file_put_contents($patchResultPath, '[Re-generate Help documentation]'.\"\\n\", FILE_APPEND);\n $helpScriptCommand = 'php '.$rootDir.'/Systems/Help/Scripts/generate_docs.php';\n exec($helpScriptCommand);\n\n // Re-generate API.\n file_put_contents($patchResultPath, '[Re-generate API]'.\"\\n\", FILE_APPEND);\n Channels::includeSystem('API');\n API::removeAPI();\n include_once 'Systems/API/APISystem.inc';\n $system = new APISystem();\n $system->install();\n\n // Minify Javascript and CSS files.\n file_put_contents($patchResultPath, '[Minify Javascript and CSS files]'.\"\\n\", FILE_APPEND);\n Channels::includeSystem('GUI');\n GUI::minifyGzipJSFiles();\n GUI::minifyCSSFiles();\n system($rootdir.'/Scripts/fix_perms.sh');\n\n // Update the *_create_wizard.xml file for asset type wizards.\n if (Channels::systemExists('Wizard') === TRUE) {\n file_put_contents($patchResultPath, '[Remove *_create_wizard.xml files.]'.\"\\n\", FILE_APPEND);\n Channels::includeSystem('Wizard');\n $wPath = Wizard::getWizardsPath();\n foreach (glob($wPath.'/*php') as $phpWizardFile) {\n unlink($phpWizardFile);\n }\n }\n\n // Clear Firefox cache.\n file_put_contents($patchResultPath, '[Clean up firefox cache.]'.\"\\n\", FILE_APPEND);\n exec('rm /root/.mozilla/firefox/squiz/Cache/*');\n\n // Turn the system cron back on.\n exec('/etc/init.d/cron start');\n file_put_contents($patchResultPath, '[Turn on the system cron service]'.\"\\n\", FILE_APPEND);\n file_put_contents($patchResultPath, '[applyPatch() function returning TRUE]'.\"\\n\", FILE_APPEND);\n\n return TRUE;\n\n }", "public function fixedUpdate($data)\n {\n if (!$this->settings) {\n $this->settings = $this->initDefaultSettings();\n }\n $lastCheckedBlock = $this->settings['lastCheckedBlock'];\n $filters = $this->settings['filters'];\n if ($filters) {\n // Luckily we had filter active. It should have all new transactions\n $pending = $filters['pending'];\n if ($pending) {\n $this->checkPending($pending);\n }\n } else {\n // No filters found. Need to install one and manually check everything from last update\n // Let's hope we will end here only once after first start or long downtime of system\n // Still, better to send notification that something can be wrong here\n }\n $this->checkFilter();\n return 0;\n }", "public function check_for_updates() {\n $current_version = get_option( 'laterpay_version' );\n if ( version_compare( $current_version, $this->config->version, '!=' ) ) {\n $this->install();\n }\n }", "public function postUpdate()\n\t{\n $input = Input::only('global_prefix','panel_path', 'domain_limit', 'phone_number_limit', 'mail_address', 'sender_name', 'sip_server','reserved_extension','reserved_domain_prefix');\n\n $rules = array(\n 'global_prefix' => 'required|min:1|max:10',\n 'panel_path' => 'required|min:1',\n 'domain_limit' => 'required|numeric',\n 'phone_number_limit' => 'required|numeric',\n 'mail_address' => 'required|email',\n 'sender_name' => 'required|min:1',\n 'sip_server' => 'required|min:3',\n 'reserved_extension' => 'required|min:3',\n 'reserved_domain_prefix' => 'required|min:3',\n );\n $v = Validator::make($input, $rules);\n if ($v->fails()) {\n return Output::push(array('path' => 'main_config', 'errors' => $v, 'input' => TRUE));\n }\n\n $panel_path = Setting::whereName('global_prefix')->first();\n $panel_path->value = $input['global_prefix'];\n $panel_path->save();\n\n $panel_path = Setting::whereName('panel_path')->first();\n $panel_path->value = $input['panel_path'];\n $panel_path->save();\n\n $domain_limit = Setting::whereName('domain_limit')->first();\n $domain_limit->value = $input['domain_limit'];\n $domain_limit->save();\n\n $phone_number_limit = Setting::whereName('phone_number_limit')->first();\n $phone_number_limit->value = $input['phone_number_limit'];\n $phone_number_limit->save();\n\n $mail_address = Setting::whereName('mail_address')->first();\n $mail_address->value = $input['mail_address'];\n $mail_address->save();\n\n $sender_name = Setting::whereName('sender_name')->first();\n $sender_name->value = $input['sender_name'];\n $sender_name->save();\n\n $sip_server = Setting::whereName('sip_server')->first();\n $sip_server->value = $input['sip_server'];\n $sip_server->save();\n\n $reserved_extension = Setting::whereName('reserved_extension')->first();\n $reserved_extension->value = $input['reserved_extension'];\n $reserved_extension->save();\n\n $reserved_domain_prefix = Setting::whereName('reserved_domain_prefix')->first();\n $reserved_domain_prefix->value = $input['reserved_domain_prefix'];\n $reserved_domain_prefix->save();\n\n if ($panel_path->id && $domain_limit->id && $phone_number_limit && $mail_address && $sender_name && $sip_server && $reserved_domain_prefix &&$reserved_extension) {\n return Output::push(array(\n 'path' => 'main_config',\n 'messages' => array('success' => _('You have updated main configuration successfully')),\n ));\n } else {\n return Output::push(array(\n 'path' => 'main_config',\n 'messages' => array('fail' => _('Fail to update main configuration')),\n 'input' => TRUE,\n ));\n }\n\t}", "public function updateConfigData(array $data): void\n {\n foreach ($data as $key => $value) {\n $this->db->update('settings', array('value'), array($value), \"setting_name = '{$key}'\");\n }\n }", "protected function prepareConfig($request)\n {\n $this->config = array_merge($this->config, $this->container->make('config')->get('api::rate_limiting'));\n\n if ($this->isAuthenticatedRequest()) {\n $this->config = array_merge(['exceeded' => $this->config['exceeded']], $this->config['authenticated']);\n } else {\n $this->config = array_merge(['exceeded' => $this->config['exceeded']], $this->config['unauthenticated']);\n }\n\n $this->config['keys']['requests'] = sprintf('dingo:api:requests:%s', $request->getClientIp());\n $this->config['keys']['reset'] = sprintf('dingo:api:reset:%s', $request->getClientIp());\n }", "public function autoupdate() {\n\t\t$uC = new PluginUpdateChecker( $this->autoupdate_endpoint, $this->path . $this->slug . '.php', $this->slug );\n\t}", "public function update(Request $request, User $user)\n {\n $this->authorize('update', $user);\n\n $request->merge(['settings' => [\n 'email_notifications' => $request->has('settings.email_notifications')\n ]]);\n\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,' . $user->id,\n 'password' => 'nullable|min:6|confirmed',\n 'settings.email_notifications' => 'boolean'\n ]);\n\n $data = $request->all();\n\n if ($request->has('password')) {\n $data['password'] = bcrypt($request->password);\n } else {\n unset($data['password']);\n unset($data['password_confirmation']);\n }\n\n $this->users->update($data, $user);\n\n return redirect($user->url() . '/settings')->with('flash', 'Settings updated.');\n }" ]
[ "0.6711495", "0.66990566", "0.5914926", "0.582598", "0.5785443", "0.56012374", "0.5382435", "0.49926636", "0.49801952", "0.48861706", "0.48679906", "0.48537675", "0.48073092", "0.47214732", "0.47213593", "0.46373323", "0.46329278", "0.46152425", "0.45887405", "0.45285544", "0.45094183", "0.4492244", "0.4484791", "0.44004205", "0.4363516", "0.4291372", "0.42812952", "0.42679954", "0.42587674", "0.42550412", "0.42433596", "0.42433596", "0.42433596", "0.42433596", "0.42433596", "0.42433596", "0.42433596", "0.42433596", "0.42433596", "0.42349467", "0.41198036", "0.4116388", "0.41150165", "0.40992296", "0.4086519", "0.40662593", "0.40585062", "0.40376398", "0.40333453", "0.4014005", "0.39967433", "0.39963534", "0.39886168", "0.3988507", "0.39880818", "0.39806738", "0.39776763", "0.3975896", "0.39698672", "0.39659426", "0.39648283", "0.3964437", "0.39631104", "0.39582774", "0.3942749", "0.3930401", "0.3930401", "0.3920529", "0.39152828", "0.39143753", "0.39105618", "0.3907216", "0.39002278", "0.38994595", "0.38847497", "0.38842037", "0.3880911", "0.38796622", "0.38663262", "0.3859757", "0.38521257", "0.38495266", "0.3834346", "0.3826381", "0.38247132", "0.3822459", "0.38218358", "0.38207316", "0.3817141", "0.38139102", "0.38117704", "0.3810006", "0.3796836", "0.37923542", "0.3791943", "0.3789035", "0.37811992", "0.37791973", "0.37713513", "0.3769058" ]
0.77980983
0
sets up the DB connection and loads fixtures
protected function setUp() { self::bootKernel(); //Apply the primer DatabasePrimer::prime(self::$kernel); //Set entity manager $this->em = DatabasePrimer::$entityManager; $fixture = new ProfileFixtures(); $fixture->load($this->em); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}", "protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }", "protected function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t$oContext = &Context::getInstance();\n\n\t\t$db_info = include dirname(__FILE__) . '/../config/db.config.php';\n\n\t\t$db = new stdClass();\n\t\t$db->master_db = $db_info;\n\t\t$db->slave_db = array($db_info);\n\t\t$oContext->setDbInfo($db);\n\n\t\tDB::getParser(TRUE);\n\t}", "public function setUp()\n {\n $this->reloadSchema();\n $this->reloadDataFixtures();\n }", "function setUp()\n\t{\n\t\tglobal $config;\n\t\tDb::init($config);\n\t\t$this->db = Db::get_instance();\n\t\t$this->sql = SqlObject::get_instance();\n\t}", "public function setUp()\n {\n parent::setUp();\n\n $this->database = \\oxDb::getDb();\n }", "public function setUp()\n {\n TestConfiguration::setupDatabase();\n }", "public function setUp() {\n\t\t$this->getConnection();\n\t\tforeach($this->fixtureData() as $row) {\n\t\t\t$record = new ExampleSolrActiveRecord();\n\t\t\tforeach($row as $attribute => $value) {\n\t\t\t\t$record->{$attribute} = $value;\n\t\t\t}\n\t\t\t$this->assertTrue($record->save());\n\t\t}\n\t}", "protected function setUpTestDatabase() {}", "protected function setUp(): void\n {\n $this->dbSetUp();\n $this->prepareObjects();\n $this->createDummyData();\n }", "public function setUp()\n {\n parent::setUp();\n $this->setupDatabase();\n }", "protected function setUp(): void\n {\n $this->recreateDbScheme();\n $this->getConnection()\n ->insertInitData($this->getDataSet());\n parent::setUp();\n }", "protected function setUp() {\n parent::setUp ();\n $this->storage = new Storage();\r\n $this->connectDB();\r\n $this->cleanDB();\r\n $this->createUser();\n $this->storage->connect($this->dbh);\n }", "public function setUp(): void\n {\n if ( isset($this->db) )\n {\n return;\n }\n\n (new DBConnect\\Load\\INI(self::DB_CREDENTIALS))->run();\n $this->db = DBConnect\\Connect\\Bank::get();\n\n $this->table = new DBTable\\PostgreSQL(self::TABLE_NAME);\n $this->table->runFieldLookup($this->db);\n }", "public function setupFixtures()\n {\n if ($this->_fixtures === null) {\n $loadedFixtures = [];\n foreach ($this->fixtures() as $fixtureClass) {\n $loadedFixtures[$fixtureClass] = Yii::createObject($fixtureClass);\n }\n\n $this->_fixtures = $loadedFixtures;\n }\n }", "public function setUp()\n\t{\n\t\tparent::setUp();\n if(is_array($this->fixtures)){\n foreach($this->fixtures as $fixtureName=>$modelClass)\n {\n $tableName=WF_Table::model($modelClass)->tableName();\n $this->resetTable($tableName);\n $rows=$this->loadFixtures($modelClass, $tableName);\n if(is_array($rows) && is_string($fixtureName))\n {\n $this->_rows[$fixtureName]=$rows;\n if(isset($modelClass))\n {\n foreach(array_keys($rows) as $alias)\n $this->_records[$fixtureName][$alias]=$modelClass;\n }\n }\n }\n }\n }", "public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }", "public function setUp()\n\t{\n\t\t$this->connection = Db::connection(array(\n\t\t\t'driver' => 'mysql',\n\t\t\t'username' => 'root',\n\t\t\t'password' => isset($_SERVER['DB']) ? '' : 'root',\n\t\t\t'database' => 'test_database',\n\t\t));\n\t}", "protected function setUp() {\r\n\t\tparent::setUp ();\r\n\t\t$this->storage = new Storage ( );\r\n\t\t$this->connectDB();\r\n\t\t$this->cleanDB ();\r\n\t\t$this->createUser ();\r\n\t\t$this->storage->connect ( $this->dbh );\n\t}", "public function setUp()\n\t{ \n\t\tparent::setUp();\n\n\t\t$this->app['config']->set('database.default','sqlite');\t\n\t\t$this->app['config']->set('database.connections.sqlite.database', ':memory:');\n\n\t\t$this->migrate();\n\t}", "protected function setUp () {\n $this->pdoConnection = new \\PDO('mysql:host='.$this->config['server'].';',\n $this->config['user'],\n $this->config['password']);\n $this->pdoConnection->exec('DROP SCHEMA IF EXISTS '.$this->config['name']);\n $this->pdoConnection->exec('CREATE SCHEMA '.$this->config['name']);\n $this->pdoConnection->exec('USE '.$this->config['name']);\n $this->pdoConnection->exec(file_get_contents(__DIR__.'\\ConnectionTestSchema.sql'));\n\n $this->mysqli = new mysqli($this->config['server'],\n $this->config['user'],\n $this->config['password'],\n $this->config['name']);\n\n $this->mysqliConnection = new MysqliConnection($this->mysqli);\n $this->run = true;\n }", "protected function setUp() {\r\n $this->_instance = $this->getProvider()->get('PM\\Main\\Database');\r\n\r\n parent::setUp();\r\n }", "public function setUp() {\n\t\t$this->validConnectionString = \"host=testdatabase port=5432 dbname=AtroxTest user=WebUser password=test\";\n\t\t$this->application = Atrox_Core_Application::getInstance(Mock_Application::getInstance());\n\t\t$this->application->setConnection(new Atrox_Core_Data_PostgreSql_Connection($this->validConnectionString));\n\t\t$this->application->getConnection()->connect();\n\t\t$this->application->setLogPath(realpath(\"../../../../../Log\"));\n\n\t\t$this->application->createBlogTable();\n\t}", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->load();\n }", "protected function setUp(): void\n {\n $db = new DB;\n\n $db->addConnection([\n 'driver' => 'sqlite',\n 'database' => ':memory:',\n ]);\n\n $db->bootEloquent();\n $db->setAsGlobal();\n\n $this->createSchema();\n }", "protected function setUp() {\r\n\t\t$this->cacheDatabaseEntryRepository = new Tx_StaticfilecacheMananger_Domain_Repository_CacheDatabaseEntryRepository ();\r\n\t\t$this->cacheDatabaseEntryRepository->setFileTable('tx_ncstaticfilecache_file');\r\n\t\t$this->assertTrue($this->createDatabase());\r\n\t\t$this->useTestDatabase();\r\n\t\t$this->importExtensions(array('nc_staticfilecache'));\r\n\t\t$path = dirname ( __FILE__ ) . DIRECTORY_SEPARATOR .'fixtures'.DIRECTORY_SEPARATOR.'db'.DIRECTORY_SEPARATOR.'tx_ncstaticfilecache_file.xml';\r\n\t\t$this->importDataSet($path);\r\n\t}", "public function setUp()\n {\n\n parent::setUp();\n\n $this->db = get_db();\n $this->_exhibitsTable = $this->db->getTable('NeatlineExhibit');\n\n }", "protected function setUp()\n {\n try {\n chdir(CWD . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR);\n if (!isset($this->db)) {\n $schema = \\Yana\\Files\\XDDL::getDatabase('check');\n $this->db = new \\Yana\\Db\\FileDb\\Connection($schema);\n }\n // reset database\n $this->db->remove('i', array(), 0);\n $this->db->remove('t', array(), 0);\n $this->db->remove('ft', array(), 0);\n $this->db->commit();\n $this->query = new \\Yana\\Db\\Queries\\Insert($this->db);\n } catch (\\Exception $e) {\n $this->markTestSkipped(\"Unable to connect to database\");\n }\n }", "protected function setUp() {\n $db = Kohana::config('database.default.connection.database');\n Kohana::config('database')->default['connection']['database'] = 'test_'.$db;\n DB::query(Database::DELETE, 'DROP TABLE IF EXISTS ut_init, ut_pop, db_deltas')\n ->execute();\n }", "public function setUp() {\n\t\t$this->PDO = $this->getConnection();\n\t\t$this->createTable();\n\t\t$this->populateTable();\n\n\t\t$this->ItemsTable = new ItemsTable($this->PDO);\n\t}", "public function initDBConnections(): void\n {\n $this->addConnectionsToConfig();\n $this->testConnections();\n }", "public function setUp(): void\n {\n parent::setUp();\n $this->setupTestDatabase();\n\n if ($this->usingInMemoryDatabase()) {\n\n // Setup database, then setup User & default role\n $this->refreshDatabase();\n $this->setupUser();\n } elseif (!static::$initialized) {\n\n // Only refresh db once\n $this->refreshDatabase();\n static::$initialized = true;\n }\n }", "protected function setupDBData()\n {\n /**\n * IMPORTANT NOTE : these functions must be executed sequentially in order for the command to work.\n */\n $this->setupProducts();\n $this->setupServerTypes();\n $this->setupServers();\n $this->setupUsers();\n }", "protected function setUp()\n {\n self::bootKernel();\n\n $this->em = static::$kernel->getContainer()\n ->get('doctrine')\n ->getManager();\n $schemaTool = new SchemaTool($this->em);\n $metadata = $this->em->getMetadataFactory()->getAllMetadata();\n\n // Drop and recreate tables for all entities\n $schemaTool->dropSchema($metadata);\n $schemaTool->createSchema($metadata);\n $users = new LoadUserData();\n $users->setContainer(static::$kernel->getContainer());\n $users->load($this->em);\n }", "public function setUp()\n\t{\n\t\t$this->handler = new DbHandler();\n\t}", "private function myLoadFixtures()\n {\n $em = $this->getDatabaseManager();\n\n // load fixtures\n $client = static::createClient();\n $classes = array(\n // classes implementing Doctrine\\Common\\DataFixtures\\FixtureInterface\n 'Demofony2\\AppBundle\\DataFixtures\\ORM\\FixturesLoader',\n );\n\n $this->loadFixtures($classes);\n }", "public function setUp() {\n\t\t$this->setUpDatabase();\n\t\t$this->match = new Match;\n\t}", "public function setUp() {\n ORM::set_db(new MockPDO('sqlite::memory:'));\n\n // Enable logging\n ORM::configure('logging', true);\n }", "protected function setUp()\r\n {\r\n parent::setUp();\r\n\r\n $this->driver = new Driver([\r\n 'dsn' => 'mysql:dbname=mysql;host=127.0.0.1'\r\n ]);\r\n }", "public function setUp() {\n\n $connection = new \\Redis();\n $connection->connect('127.0.0.1', 6379);\n $connection->select(11);\n $adapter = new Rstore\\ConnectionAdapter\\Phpredis($connection);\n\n $this->connection = $connection;\n $this->repo = new Repository(\n $adapter,\n yaml_parse_file(__DIR__.'/../../config/models.yaml')\n );\n }", "public function setUp() {\n $this->fixture= new FreeTdsLookup($this->getClass()->getPackage()->getResourceAsStream('freetds.conf'));\n }", "protected function setUp()\n {\n $this->setUpFilesystem();\n $this->object = Config::table('users');\n }", "public function setUp(){\n \tparent::setUp();\n \t//factory(Category::class)->create();\n \tArtisan::call('migrate:refresh');\n \t$this->seed();\n }", "public function setUp() {\n\t\t\\OMV\\Environment::set(\"OMV_CONFIG_FILE\", sprintf(\n\t\t\t\"%s/../data/config.xml\", getcwd()));\n\t\t// Setup the model manager.\n\t\t$modelMngr = \\OMV\\DataModel\\Manager::getInstance();\n\t\t$modelMngr->load();\n\t}", "protected function setUp()\n {\n $this->fixture = new Record();\n }", "public function setUp()\n {\n $this->fixtures('articles');\n }", "protected function setUp()\n {\n chdir(CWD . '../../..' );\n \\Yana\\Db\\Ddl\\Database::setDirectory(CWD . '/resources/');\n try {\n\n \\Yana\\Db\\FileDb\\Sequence::create($this->ascendingId, +1, null, null, +3, false);\n \\Yana\\Db\\FileDb\\Sequence::create($this->descendingId, -1, null, -3, null, true);\n $this->ascendingSequence = new \\Yana\\Db\\FileDb\\Sequence($this->ascendingId);\n $this->descendingSequence = new \\Yana\\Db\\FileDb\\Sequence($this->descendingId);\n\n } catch (\\Exception $e) {\n $this->markTestSkipped(\"Unable to connect to database: \" . $e->getMessage());\n chdir(CWD);\n }\n }", "protected function setUp()\n {\n global $testCase;\n $testCase = 'table_for_test';\n\n $this->container = include './config/container.php';\n $this->store = $this->container->get(StoreFactory::KEY);\n }", "protected function setUp() {\n \n parent::setUp();\n \n $config = include '../inc/config.inc';\n \n $this->userDao = new UserDao($config);\n }", "public function setUp()\n {\n parent::setUp();\n\n $this->app['config']->set('database.default', 'sqlite');\n $this->app['config']->set('database.connections.sqlite.database', ':memory:');\n\n $this->migrate();\n }", "public function setUp()\n {\n parent::setUp();\n $this->migrate();\n $this->withFactories(__DIR__.'/factories');\n }", "public static function setUpBeforeClass() {\n\t\t$database = MYSQL_DSN;\n\t\t$pdo = new \\PDO(MYSQL_DSN, MYSQL_USER, MYSQL_PASSWORD);\n\t\t$pdo->exec('drop table if exists user');\n $pdo->exec('drop table if exists item');\n\t\t$create = <<<SQL\nCREATE TABLE `user` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `name` varchar(45) DEFAULT NULL,\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8\nSQL;\n\t$pdo->exec($create);\n\t$create2 = <<<SQL\nCREATE TABLE `item` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `name` varchar(45) DEFAULT NULL,\n `created_at` timestamp,\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8\nSQL;\n\t\t$r = $pdo->exec($create2);\n\n\n\t\t$insert = <<<SQL\ninsert into user values(1, 'sato');\ninsert into user values(2, 'suzuki');\ninsert into user values(3, 'takahashi');\ninsert into user values(4, 'tanaka');\ninsert into user values(5, 'ito');\nSQL;\n\t\t$pdo->exec($insert);\n $pdo = null;\n\t}", "public function setUp(): void\n {\n if (!defined('ROOT_DIR')) {\n define(\"ROOT_DIR\", __DIR__ . \"/../\");\n }\n \n if (!class_exists('Database', false)) {\n require(\"./www/classes/database.class.php\");\n }\n if (!class_exists('Settings', false)) {\n require(\"./www/classes/settings.class.php\");\n }\n $this->settings = new \\Settings();\n \n try {\n $this->database = new \\Database($this->settings);\n } catch (Exception $error) {\n $this->markTestSkipped(\"Something went when loading Database class: \" .\n $error->getMessage());\n }\n }", "public function setUp()\n {\n parent::setUp();\n $this->container = $this->app->getContainer();\n\n // Check if phinxlog table exists in database.\n $tableSchema = $this->container->get('settings')->get('db')['database'];\n $pdo = $this->getPdo();\n $stmt = $pdo->prepare('SELECT 1 FROM information_schema.TABLES WHERE TABLE_SCHEMA = :tableschema AND TABLE_NAME = :phinxlog');\n $stmt->execute(['tableschema' => $tableSchema, 'phinxlog' => 'phinxlog']);\n\n $shouldMigrate = true;\n\n if ($stmt->fetch()) {\n $shouldMigrate = $this->hasPendingMigrations($pdo);\n }\n\n if ($shouldMigrate) {\n chdir(__DIR__ . '/../config');\n $wrap = new TextWrapper(new PhinxApplication());\n // Execute the command and determine if it was successful.\n $target = null;\n call_user_func([$wrap, 'getMigrate'], 'local', $target);\n $error = $wrap->getExitCode() > 0;\n if ($error) {\n throw new Exception('Error: Setup database failed with exit code: %s', $wrap->getExitCode());\n }\n }\n\n $this->truncateTables();\n Factory::INSERT()->execute($this->getConnection(), $this->getDataSet());\n }", "public function setUp()\n {\n $dsn = 'mysql:host=localhost;dbname=demo';\n\n $pdo = new \\PDO($dsn, 'root', '');\n\n $driver = new MySQLDriver($pdo, 'demo');\n\n $this->table = new Table('post', $driver);\n }", "protected function setUp() {\n $this->dbh = DB::getDBConnection('mysql:dbname=www_lab0123_users_test;host=127.0.0.1');\n\n // check if we actually got a connection\n if ($this->dbh == null) {\n $this->fail('DB::getDBConnection returned null..');\n }\n\n // create table in database (fail if couldn't do so)\n if (!$this->dbh->query(\n 'CREATE TABLE `users` (\n `id` int(11) NOT NULL,\n `email` varchar(255) NOT NULL,\n `password` varchar(255) NOT NULL,\n `name` varchar(255) NOT NULL,\n `phone` varchar(30) NOT NULL\n ) ENGINE=InnoDB DEFAULT CHARSET=latin1;'\n )) {\n\n $this->fail('Coudn\\'t create table in setup stage of testing');\n }\n\n \n }", "public function setUp(): void\n {\n // Boot parent TestCase, which will set up the database and connections for us.\n parent::setUp();\n\n // Boot database\n $this->ci->db;\n\n $this->createSchema();\n }", "protected function setUp()\n {\n $this->object = new Sql();\n }", "public function setUp()\n {\n parent::setUp();\n\n $this->app['config']->set('database.default', 'sqlite');\n $this->app['config']->set('database.connections.sqlite.database', ':memory:');\n $this->app['config']->set('jsonapi', [EmployeesTransformer::class, OrdersTransformer::class]);\n $this->app['config']->set('app.url', 'http://localhost/');\n $this->app['config']->set('app.debug', true);\n $this->app['config']->set('app.key', \\env('APP_KEY', '1234567890123456'));\n $this->app['config']->set('app.cipher', 'AES-128-CBC');\n\n $this->app->boot();\n\n $this->migrate();\n }", "protected function setUp()\n {\n parent::setUp();\n\n $this->loadMigrationsFrom(__DIR__.'/database/migrations');\n $this->withFactories(__DIR__.'/database/factories');\n $this->artisan('migrate', ['--database' => env('DB_DATABASE', 'lighthouse')]);\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->dropTables($this->tables);\n $this->createTables($this->tables);\n $this->insertDefaultRows();\n\n $this->repository = new RepositoryConcrete();\n $this->repository->getDbAdapter()->setAdapter($this->getAdapter());\n\n $cacheService = new CacheService();\n $cacheService->setCacheDir($this->getDataDir() . '/cache');\n $this->repository->setCache($cacheService->getFrontend());\n\n // Remove as pastas criadas\n $this->clearDataDir();\n }", "protected function fixture() {\n return new \\rdbms\\sqlite3\\SQLite3Connection(new \\rdbms\\DSN('sqlite://localhost/'));\n }", "protected function setUp() {\n\t\t$dsn = 'mysql:dbname=test;host=127.0.0.1';\n\t\t$user = 'root';\n\t\t$pass = '';\n\n\t\t$this->pdo = new PDO($dsn,$user,$pass);\n\t\t$this->profiler = new Profiler($this->pdo, 0, 0);\n\t}", "public function setUp()\n {\n parent::setUp();\n \n $this->db = Ediary_Db::getInstance();\n $this->object = new Ediary_Database_Schema($this->db);\n \n // DEBUG: THIS WILL DROP TABLES AND RECREATE THEM\n //Ediary_Db::getInstance()->upgrade();\n }", "public function setUp(): void\n {\n parent::setUp();\n\n $this->createTables();\n }", "protected function setUp(): void\n {\n // echo '### ' . env('DB_CONNECTION') . '::`' . env('DB_DATABASE') . '`';\n parent::setUp();\n }", "public function testDatabase()\n {\n self::$kernel = self::bootKernel();\n\n // nothing should occur\n $this->assertNull(AbstractUserFixture::createDatabase(self::$kernel));\n\n // nothing should occur\n $this->assertNull(AbstractUserFixture::createFixtures(self::$kernel,3));\n\n //create the entity manager\n $this->entityManager = self::$kernel->getContainer()->get('doctrine.orm.entity_manager');\n }", "public function testFixturesSetup() {\n $this->assertCount(3, $this->databaseDumpFiles);\n }", "protected function setUp() {\n\t\t$this->object = new Model(\"test\", new PDODatabase(DB_DSN, DB_USER, DB_PASS, DB_CHARSET));\n\t}", "public function setUp() : void\n {\n parent::setUp();\n\n require_once(__DIR__.'/stubs/Stub_User.php');\n require_once(__DIR__.'/stubs/Widget.php');\n\n $this->loadLaravelMigrations();\n $this->loadMigrationsFrom(__DIR__ . '/../src/database/migrations');\n $this->withFactories(__DIR__.'/../src/database/factories');\n }", "protected function setUp()\n {\n $this->fixture = new Configuration();\n }", "public function setUp() {\n ORM::set_db(new MockPDO('sqlite::memory:'));\n\n // Enable logging\n ORM::configure('logging', true);\n\n Model::$auto_prefix_models = null;\n }", "public function setUp()\n {\n $this->loadFixtures([]);\n }", "protected function setUp(): void\n {\n parent::setUp();\n $this->withFactories(__DIR__.'/Fixtures/Factories');\n $this->loadMigrationsFrom(__DIR__ . '/Fixtures/Migrations');\n require __DIR__.'/Fixtures/routes.php';\n }", "public static function dbSeed(){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Turn foreign key checks off\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');// <- USE WITH CAUTION!\n\t\t\t//Seed tables\n\t\t\tArtisan::call('db:seed');\n\t\t\t//Turn foreign key checks on\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');// <- SHOULD RESET ANYWAY BUT JUST TO MAKE SURE!\n\t\t}\n\t}", "public function setUp() {\n parent::setUp();\n Artisan::call('migrate:refresh');\n Artisan::call('db:seed');\n }", "public function setUpDatabase()\n\t{\n\t\t$schemes = new Schemes;\n\t\t$schemes->createRequestTable();\n\n\t Customer::create([\n\t 'email' => '[email protected]',\n\t 'first_name' => 'Osuagwu',\n\t 'last_name' => 'Emeka',\n\t 'phone_number' => \"09095685594\",\n\t 'image' => 'https://github.com/rakit/validation',\n\t 'location' => 'Lagos, Nigeria',\n\t 'sex' => 'Male',\n\t ]);\n\n\t Customer::create([\n\t 'email' => '[email protected]',\n\t 'first_name' => 'Mustafa',\n\t 'last_name' => 'Ozyurt',\n\t 'phone_number' => \"09095685594\",\n\t 'image' => 'https://github.com/rakit/validation',\n\t 'location' => 'Berlin, Germany',\n\t 'sex' => 'Male',\n\t ]);\n\t}", "public static function setUpBeforeClass() {\n $dbh = new SQLiteDatabase(__DIR__ . '/../../database/chat_server.db');\n $dbh->query('INSERT INTO Users (username) VALUES(:username)', ['username' => 'Bob']);\n $dbh->query('INSERT INTO Users (username) VALUES(:username)', ['username' => 'Carl']);\n $dbh = null;\n }", "final public function setUp( )\n {\n $this->_initContext();\n\n $this->_assertTestDatabaseConnection();\n $this->_assertTestUploadsDir();\n\n $configuration = $this->getApplicationConfiguration();\n\n $this->_fixtureLoader = new Test_FixtureLoader($configuration);\n $this->_state = new Test_State($configuration);\n\n /* Set custom sfConfig values here. */\n sfConfig::add(array(\n 'sf_fixture_dir' =>\n $this->_fixtureLoader->getFixtureDir(false, $this->_plugin)\n ));\n\n $this->_state\n ->flushDatabase($this->_alwaysRebuildDB)\n ->flushUploads()\n ->flushConfigs();\n\n $this->_init();\n $this->_setUp();\n }", "public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->loadMigrationsFrom([\n '--realpath' => realpath(__DIR__ . './src/migrations'),\n ]);\n $this->artisan('webappid:user:seed');\n $this->artisan('webappid:member:seed');\n\n }", "function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t\n\t\t// Set up fixture\n\t\tif($fixtureFile) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(),0,5) != 'tmpdb') {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\t// This code is a bit misplaced; we want some way of the whole session being reinitialised...\n\t\t\tVersioned::reading_stage(null);\n\n\t\t\tsingleton('DataObject')->flushCache();\n\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// We have to disable validation while we import the fixtures, as the order in\n\t\t\t// which they are imported doesnt guarantee valid relations until after the\n\t\t\t// import is complete.\n\t\t\t$validationenabled = DataObject::get_validation_enabled();\n\t\t\tDataObject::set_validation_enabled(false);\n\t\t\t$this->fixture = new YamlFixture($fixtureFile);\n\t\t\t$this->fixture->saveIntoDatabase();\n\t\t\tDataObject::set_validation_enabled($validationenabled);\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t}", "protected function setUp()\n\t {\n\t\t$conn = $this->getConnection();\n\t\t$db = $conn->getConnection();\n\t\t$db->exec(\n\t\t \"CREATE TABLE IF NOT EXISTS `MySQLdatabase` (\" .\n\t\t \"id int NOT NULL AUTO_INCREMENT, \" .\n\t\t \"string text NOT NULL, \" .\n\t\t \"testblob longblob NOT NULL, \" .\n\t\t \"PRIMARY KEY (`id`)\" .\n\t\t \") ENGINE=InnoDB DEFAULT CHARSET=utf8;\"\n\t\t);\n\n\t\t$this->object = new MySQLdatabase($GLOBALS[\"DB_HOST\"], $GLOBALS[\"DB_DBNAME\"], $GLOBALS[\"DB_USER\"], $GLOBALS[\"DB_PASSWD\"]);\n\n\t\tparent::setUp();\n\t }", "public static function setUpBeforeClass() {\n Database::registry()\n ->addDriver('default', new MongoDriver(Config::get('db')));\n\n // Remove singletons\n User::flushInstances();\n Book::flushInstances();\n Series::flushInstances();\n Profile::flushInstances();\n }", "protected function setUp()\n {\n Kohana::config('database')->default = Kohana::config('database')\n ->unit_testing;\n Auth::instance()->login(TEST_USERNAME, TEST_PASSWORD);\n\n // Index data and start up the search daemon\n exec('indexer --all --config ' . SPHINX_CONF);\n exec('searchd --config ' . SPHINX_CONF);\n }", "protected function setUp()\n {\n parent::setUp();\n\n $this->databaseTester = null;\n if (method_exists($this, 'getSetUpOperation')) {\n $this->getDatabaseTester()->setSetUpOperation($this->getSetUpOperation());\n }\n if (method_exists($this, 'getDataSet')) {\n $this->getDatabaseTester()->setDataSet($this->getDataSet());\n }\n if ($this->databaseTester !== null) {\n $this->getDatabaseTester()->onSetUp();\n }\n }", "protected function setUp()\n {\n $ruckusing_config = require RUCKUSING_BASE . '/config/database.inc.php';\n\n if (!is_array($ruckusing_config) || !(array_key_exists(\"db\", $ruckusing_config) && array_key_exists(\"mysql_test\", $ruckusing_config['db']))) {\n $this->markTestSkipped(\"\\n'mysql_test' DB is not defined in config/database.inc.php\\n\\n\");\n }\n\n $test_db = $ruckusing_config['db']['mysql_test'];\n\n //setup our log\n $logger = Ruckusing_Util_Logger::instance(RUCKUSING_BASE . '/tests/logs/test.log');\n\n $this->adapter = new Ruckusing_Adapter_MySQL_Base($test_db, $logger);\n $this->adapter->logger->log(\"Test run started: \" . date('Y-m-d g:ia T') );\n\n //create the schema table if necessary\n $this->adapter->create_schema_version_table();\n\n $framework = new Ruckusing_FrameworkRunner($ruckusing_config, array('ENV=mysql_test', 'module=default'));\n $this->migrations_dirs = $framework->migrations_directories();\n // need to deal with array, not just string at main\n if (!is_dir($this->migrations_dirs['default'])) {\n mkdir($this->migrations_dirs['default'], 0755, true);\n }\n }", "private function initDatabase() {\n \n \n \n }", "protected function setUp()\n {\n parent::setUp();\n $this->entityManager = $this->createEntityManager();\n // Pass the Entity Manager into the Factory to allow Gocdb_Services\n // to use other Gocdb_Services.\n \\Factory::setEntityManager($this->entityManager);\n }", "public function setUp()\n {\n $folder = dirname(__DIR__) . '/fixtures';\n\n $this->keyVal(true);\n $this->_mutableLoader = new Loader($folder);\n $this->_immutableLoader = new Loader($folder, true);\n }", "public static function setUpBeforeClass(){\n\t\tself::$connection = new Connection( $GLOBALS['DB_DRIVER'], $GLOBALS['DB_HOST'], $GLOBALS['DB_NAME'], $GLOBALS['DB_USER'], $GLOBALS['DB_PASS']);\n\t}", "public function setUp() {\r\n // and doing it every test slows the tests down to a crawl\r\n $this->sharedFixture = new MovieLensDataSet(DATA_DIR);\r\n }", "protected function setUp() {\n $this->object = new LyvDAL;\n }", "public function setupDatabase()\n {\n exec('rm ' . storage_path() . '/testdb.sqlite');\n exec('cp ' . 'database/database.sqlite ' . storage_path() . '/testdb.sqlite');\n }", "public function setUp(): void\n {\n $this->_shutdown = [];\n\n $this->connection = getConnection();\n $this->collectionHandler = new CollectionHandler($this->connection);\n\n // clean up first\n try {\n $this->collectionHandler->drop('ArangoDB_PHP_TestSuite_TestCollection_01' . '_' . static::$testsTimestamp);\n } catch (\\Exception $e) {\n // don't bother us, if it's already deleted.\n }\n\n try {\n $this->collectionHandler->drop('ArangoDB_PHP_TestSuite_TestCollection_02' . '_' . static::$testsTimestamp);\n } catch (Exception $e) {\n //Silence the exception\n }\n\n\n $this->collection1 = new Collection();\n $this->collection1->setName('ArangoDB_PHP_TestSuite_TestCollection_01' . '_' . static::$testsTimestamp);\n $this->collectionHandler->create($this->collection1);\n\n $this->collection2 = new Collection();\n $this->collection2->setName('ArangoDB_PHP_TestSuite_TestCollection_02' . '_' . static::$testsTimestamp);\n $this->collectionHandler->create($this->collection2);\n \n $adminHandler = new AdminHandler($this->connection);\n \n $this->transactionHandler = new StreamingTransactionHandler($this->connection);\n }", "protected function setUp()\n {\n $this->object = new Util_Db_Extends;\n }", "public function setUp()\n {\n parent::setUp();\n\n $this->accounts = Resistance::factory('\\ActiveCollab\\Resistance\\Test\\Storage\\Accounts');\n $this->users = Resistance::factory('\\ActiveCollab\\Resistance\\Test\\Storage\\Users');\n }", "public function beforeSetup()\n {\n $this->setUpDatabaseConnection();\n\n $this->createSchema();\n }", "protected function setUp()\n\t{\n $dsn = sprintf('sqlite:%s/pdo_test.db', __DIR__);\n $this->pdo = new \\PDO($dsn);\n $this->handler = new Handler($this->pdo);\n\n\t\t// create our logger and our pdo handler\n\t\t$this->logger = new Logger(self::APP_NAME);\n $this->logger->pushHandler($this->handler);\n\n // drop the table\n $drop_sql = sprintf(\"\n\t\t\tDROP TABLE IF EXISTS %s;\n\t\t\", Handler::DEFAULT_TABLE_NAME);\n\n\t\t$this->pdo->exec($drop_sql);\n \n // create the table\n\t\t$create_sql = sprintf(\"\n CREATE TABLE %s (\n id integer(11) PRIMARY KEY,\n time datetime DEFAULT(CURRENT_TIMESTAMP),\n level varchar(100) NOT NULL,\n channel varchar(25) NOT NULL,\n message text\n );\n \", Handler::DEFAULT_TABLE_NAME);\n\n $this->pdo->exec($create_sql);\n\t}", "public function setUp()\n {\n $this->manager = new ElasticaPopulatorManager();\n }" ]
[ "0.8419189", "0.81207275", "0.7665418", "0.75528014", "0.74813294", "0.7425585", "0.74090296", "0.7379403", "0.73513526", "0.7260411", "0.72557414", "0.7246315", "0.7241855", "0.7216419", "0.71948284", "0.71937424", "0.71345687", "0.7131393", "0.7129719", "0.7129049", "0.7112753", "0.7098456", "0.70770264", "0.70639586", "0.7063159", "0.7033492", "0.70157313", "0.70044404", "0.7000384", "0.6983664", "0.69641787", "0.6963329", "0.6954793", "0.6949699", "0.69379956", "0.69345313", "0.69010276", "0.68998075", "0.68835264", "0.6870013", "0.68634516", "0.68246955", "0.6824305", "0.6819718", "0.67964613", "0.67963755", "0.6792012", "0.67913145", "0.6790256", "0.67595315", "0.6748144", "0.6746576", "0.6738759", "0.6730557", "0.67250377", "0.67027414", "0.66993046", "0.6698306", "0.6694707", "0.6689369", "0.6679239", "0.66746277", "0.66713244", "0.6666636", "0.666121", "0.665288", "0.66512847", "0.6651224", "0.6646975", "0.66398853", "0.66397804", "0.6638838", "0.6637938", "0.66352636", "0.6634679", "0.6621331", "0.66164273", "0.6600564", "0.65901303", "0.65834814", "0.65813833", "0.65767556", "0.65725744", "0.65694314", "0.656816", "0.6564275", "0.6561281", "0.6560263", "0.65563637", "0.65546834", "0.6550932", "0.6543808", "0.653628", "0.65295124", "0.6529171", "0.65273017", "0.65103155", "0.6507262", "0.6502641", "0.65021515" ]
0.6835197
41
Tears down DB connection and deletes DB
protected function tearDown() { $application = new Application(self::$kernel); $application->setAutoExit(false); $options = array('command' => 'doctrine:database:drop', '--force' => true); $application->run(new ArrayInput($options)); parent::tearDown(); $this->em->close(); $this->em = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _teardownDb()\n {\n list ($host, $port, $db) = $this->_getUrlParts();\n $db = trim($db, '/');\n \n try {\n Sopha_Db::deleteDb($db, $host, $port);\n } catch (Sopha_Db_Exception $e) {\n if ($e->getCode() != 404) {\n throw $e;\n }\n }\n }", "static function kill_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbConn = DB::getConn();\n\t\t\t$dbName = $dbConn->currentDatabase();\n\t\t\tif($dbName && DB::getConn()->databaseExists($dbName)) {\n\t\t\t\t// Some DataExtensions keep a static cache of information that needs to \n\t\t\t\t// be reset whenever the database is killed\n\t\t\t\tforeach(ClassInfo::subclassesFor('DataExtension') as $class) {\n\t\t\t\t\t$toCall = array($class, 'on_db_reset');\n\t\t\t\t\tif(is_callable($toCall)) call_user_func($toCall);\n\t\t\t\t}\n\n\t\t\t\t// echo \"Deleted temp database \" . $dbConn->currentDatabase() . \"\\n\";\n\t\t\t\t$dbConn->dropDatabase();\n\t\t\t}\n\t\t}\n\t}", "public function shutdown()\n {\n if ($this->db) {\n $db->disconnect();\n }\n }", "function destroy_connection(){\n\t\t//if($this->dbconn != null)\n\t\t//\t$this->dbconn->disconnect();\n\t\tunset($this->dbconn);\n\t}", "public function destroy()\n {\n $db = XenForo_Application::get('db');\n $db->query('DROP TABLE `' . self::DB_TABLE . '`');\n }", "public function disconnect() {\n $this->db = null;\n }", "public function disconnect() {\n $this->db = null;\n }", "static function kill_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbConn = DB::getConn();\n\t\t\t$dbName = $dbConn->currentDatabase();\n\t\t\tif($dbName && DB::query(\"SHOW DATABASES LIKE '$dbName'\")->value()) {\n\t\t\t\t// echo \"Deleted temp database \" . $dbConn->currentDatabase() . \"\\n\";\n\t\t\t\t$dbConn->dropDatabase();\n\t\t\t}\n\t\t}\n\t}", "public function destroy()\n {\n $forge = \\Config\\Database::forge();\n if ($forge->dropDatabase(env('database.default.database'))) {\n echo 'Database deleted!';\n }\n }", "public function CloseConnection()\n {\n $this->db = null;\n }", "function teardown() {\n // close database connection\n $this->conn = null;\n }", "public static function unsetDbConnection(){\n\t\tself::$db=null;\n\t}", "function close_db(){\n $this->_dbh = null;\n \n }", "function close_db(){\n $this->_dbh = null;\n \n }", "public function shutdown()\n {\n $this->dbTable = null;\n }", "private function _disconnect()\n {\n //\tDisconnect\n $this->_db->conn = null;\n $this->_db->clear();\n }", "protected function tearDown()\n\t {\n\t\tunset($this->object);\n\n\t\t$conn = $this->getConnection();\n\t\t$db = $conn->getConnection();\n\t\t$db->exec(\"DROP TABLE IF EXISTS `MySQLdatabase`;\");\n\n\t\tunset($GLOBALS[\"errstr\"]);\n\t\tunset($GLOBALS[\"stuckerror\"]);\n\t }", "private function closeConnection(){\n $this->db =null;\n }", "function db_disconnect()\n{\n\tglobal $dbh;\n\n\tif (!isset($dbh))\n\t\t// Already disconnected.\n\t\treturn;\n\n\t$dbh->close();\n\t$dbh = NULL;\n\treturn;\n}", "public function close_connection()\n {\n $this->db = null;\n }", "protected function closeConection()\n {\n $this->db->close();\n unset($this->db);\n unset($this->satz);\n }", "protected function shutDown()\n {\n if (!is_null(System::getInstance()->database())) {\n System::getInstance()->set('database', null);\n }\n }", "function db_disconnect()\n\t{\n\t\tpg_close($this->db_connection);\n\t}", "public function tearDown(): void\n {\n unset($this->db);\n }", "public function disconnectDatabase()\n {\n $this->database->close();\n $this->database = null;\n }", "public function close()\n {\n $this->db = null;\n }", "protected function tearDown() {\r\n\t\t$this->dropDatabase();\r\n\t\tunset ( $this->cacheDatabaseEntryRepository );\r\n\t\t\r\n\t}", "public function disconnect()\n {\n $this->db->dispose();\n }", "public function tearDown() {\r\n global $cfg;\r\n try {\r\n $dbConn = new mysqli(\r\n $cfg['db']['host'],\r\n $cfg['db']['user'],\r\n $cfg['db']['pass'],\r\n $cfg['db']['db']\r\n );\r\n }catch (Exception $e){\r\n throw new Exception(\"connection error\");\r\n }\r\n $sql = \"DROP TABLE `users`\";\r\n //run sql query\r\n $dbConn->query($sql);\r\n }", "static function close()\n\t{\n\t\tforeach (self::$dbConnections as $dbName => $db)\n\t\t{\n\t\t\t$db->close();\n\t\t\tunset(self::$dbConnections[$dbName]);\n\t\t}\n\n\t\tforeach(self::$extraConnections as $index => $db)\n\t\t{\n\t\t\t$db->close();\n\t\t\tunset(self::$extraConnections[$index]);\n\t\t}\n\t}", "protected function tearDown(): void\n {\n $this->_connection->dropTable($this->_tableName);\n $this->_connection->resetDdlCache($this->_tableName);\n $this->_connection = null;\n }", "function deconnexion_DB() {\n\tmysql_close();\n}", "function shutdown()\n\t{\n\t\tif (class_exists('Db'))\n\t\t{\n\t\t\tDb::close_connection();\n\t\t}\n\t}", "public function close(){\r\n\t\tself::$dbh = null;\r\n\t\tself::$db = null;\r\n\t}", "private function deconnexion()\n\t\t{\n\t\t\tmysql_close($this->id);\n\t\t\t\n\t\t}", "public function disconnect()\n {\n \t//$GLOBALS['log']->debug('Calling DBManager::disconnect()');\n $close = $this->backendFunctions['close'];\n if(isset($this->database)){\n $this->freeResult();\n if ( is_resource($this->database) || is_object($this->database) )\n\t\t\t\t$close($this->database);\n unset($this->database);\n }\n }", "public function CloseConnectDB(){\n $this->PDO = null;\n }", "public function destroy() {\n\t\t$this->removeInstance();\n\t\t$this->tearDownTestDatabase();\n\t}", "public function clearDb ()\n {\n // Empty tables and reset auto-increment values\n $this->_dbh->query('SET FOREIGN_KEY_CHECKS = 0');\n foreach (self::$dbTables as $table) {\n $stmt = $this->_dbh->prepare('TRUNCATE `' . $table . '`');\n $stmt->execute();\n $stmt = $this->_dbh->prepare('ALTER TABLE `' . $table . '` AUTO_INCREMENT = 1');\n $stmt->execute();\n }\n // Re-enable checks only if set as such in config\n $config = parse_ini_file('config/AcToBs.ini', true);\n if (isset($config['checks']['fk_constraints']) && $config['checks']['fk_constraints'] == 1) {\n $this->_dbh->query('SET FOREIGN_KEY_CHECKS = 1');\n }\n // Delete denormalized tables\n foreach (self::$dbDenormalizedTables as $table) {\n $stmt = $this->_dbh->prepare('DROP TABLE IF EXISTS `' . $table . '`');\n $stmt->execute();\n }\n // Delete non-standard taxonomic ranks\n $stmt = $this->_dbh->prepare(\n 'DELETE FROM `taxonomic_rank` WHERE `standard` = ?');\n $stmt->execute(array(\n 0\n ));\n unset($stmt);\n }", "protected function tearDown() {\n\t\t$this->sql->Disconnect(__FILE__, __LINE__);\n\t\tsqlsolution_unlink_sqlite($this->sql);\n\t\t$this->sql = null;\n\t}", "protected function tearDown(): void\n {\n $this->closeDatabase();\n }", "public function destroy() {\r\n\t\t$this->mysqli->close();\r\n\t}", "private function CloseDbConnection()\n\t{\n\t\tmysqli_close($this->DB_CONN);\n\t}", "public function __destruct() {\n unset($this->dbh);\n }", "public function __destruct()\r\n {\r\n $this->db = null;\r\n }", "function __destruct() {\n\t\t\tunset($this->db);\n\t\t}", "public function __destruct()\n {\n $this->db = null;\n }", "function __destruct() {\n mysqli_close($this->database_manager);\n }", "function __destruct()\n {\n unset($this->db);\n }", "public function __destructor()\n {\n if ($this->dbCache) {\n $this->dbCache->Close();\n }\n }", "public function __destruct(){\r\n\t\tself::$dbh = null;\r\n\t\tself::$db = null;\r\n\t}", "public function down(Kohana_Database $db)\n\t{\n\t\t$db->query(NULL, 'DROP TABLE `stores`;');\n\t\t$db->query(NULL, 'DROP TABLE `store_inventories`;');\n\t\t$db->query(NULL, 'DROP TABLE `store_restocks`;');\n\t\t$db->query(NULL, 'DROP TABLE `user_shops`;');\n\t}", "protected function cleanApplication() {\n @unlink('sql.db');\n }", "protected function tearDown()\n {\n \n unset($this->object->db);\n\n }", "public static function close()\n {\n static::$_db = null;\n }", "public function destroy() {\n $this->connection->schema()->dropTable($this->mapTable);\n $this->connection->schema()->dropTable($this->messageTable);\n }", "public function cleanupDatabase() {\n\t\t\tif ( !$this->getTableExists() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$sQuery = \"\n\t\t\t\tDELETE from `%s`\n\t\t\t\tWHERE\n\t\t\t\t\t`day_id`\t\t\t!= '0'\n\t\t\t\t\tAND `created_at`\t< '%s'\n\t\t\t\";\n\t\t\t$sQuery = sprintf( $sQuery,\n\t\t\t\t$this->getTableName(),\n\t\t\t\t( $this->loadDP()->time() - 31*DAY_IN_SECONDS )\n\t\t\t);\n\t\t\t$this->loadDbProcessor()->doSql( $sQuery );\n\t\t}", "function disconnect_from_db () {\n\tglobal $conn;\n\t$conn = null;\n}", "public static function truncate()\n {\n include self::dbFile();\n $pdo = self::createPDO($dbuser, $dbpass);\n $pdo->query(\"DROP DATABASE IF EXISTS $dbname\");\n $pdo->query(\"DROP DATABASE IF EXISTS {$dbname}_test\");\n $pdo->query(\"CREATE DATABASE $dbname\");\n $pdo->query(\"CREATE DATABASE {$dbname}_test\");\n }", "function close_db() {\n\t\tmysql_close($this -> dbc);\n\t}", "public function __destruct() {\n $this->db = NULL;\n }", "public function __destruct() {\n if ($this->_db !== null)\n mysql_close($this->_db);\n }", "public function disconnect() {\n if (isset($this->database))\n @$this->database->close();\n }", "protected function tearDown(): void\n {\n $this->dbClear();\n }", "public function __destruct() {\n mysqli_close($this->db_connection);\n }", "public function closeDB(){\r\n $this->db->schließen();\r\n $this->con = 0;\r\n }", "public function closeDb(){\n $this->db->close();\n }", "public function __destruct()\n {\n parent::$db->closeConnection();\n }", "function closeDbConnection() {\n global $objDb;\n\n if (isset($objDb)) {\n @$objDb->Close();\n }\n }", "public function __destruct()\r\n\t{\r\n\t\t$this->db = null;\r\n\t}", "public function __destruct()\n {\n $this->db->close($this->conn);\n }", "private function closeConnection(){\n $this->file_db = null;\n }", "function __destruct() {\n $this->db->close();\n }", "function __destruct() {\n $this->db->close();\n }", "abstract public function unloadDatabase();", "function disconnect(){\n\t\t$this->dbconn = null;\n\t\t$this->logger->info('RECOLIN DB DB disconnected successfully');\n\t}", "function __destructor() {\n /**\n * Re-enable foreign key checks \n */\n if ($this->disableForeignKeyChecks === true) {\n mysqli_query($this->conn, 'SET foreign_key_checks = 1');\n }\n }", "public function tearDown()\n {\n $this->schema()->drop('users');\n $this->schema()->drop('users32');\n $this->schema()->drop('usersb');\n $this->schema()->drop('posts');\n $this->schema()->drop('posts32');\n $this->schema()->drop('postsb');\n $this->schema()->drop('rolesb');\n $this->schema()->drop('roles32');\n $this->schema()->drop('user32_role32');\n $this->schema()->drop('userb_roleb');\n }", "function __destruct()\n {\n $this->db = null;\n static::$instance = null;\n }", "public function uninstallDB()\n {\n Db::getInstance()->execute('DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'onehop_sms_rulesets`;');\n return Db::getInstance()->execute('DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'onehop_sms_templates`;');\n }", "public function tearDown()\n {\n unset($this->db);\n unset($this->statement);\n unset($this->mockData);\n }", "private function close() {\n if (!empty($this->_dbConn)) {\n pg_close($this->_dbConn);\n unset($this->_dbConn);\n }\n }", "function closedb(){\r\n\t\tif($this->socket)\r\n\t\t\t\r\n\t\t\tmysqli_close($this->socket);\r\n\t\t\t$this->connected = false;\r\n\t}", "function drop_db($db) {\n\t\treturn mysql_drop_db($db, $this -> dbc);\n\t}", "function closedbconnection() {\r\n\t\t\r\n\t\t\r\n #if ($this->dbconnection = TRUE) {\r\n mysql_close($this->dbconnection);\r\n #}\r\n \r\n }", "public function disconnect(): void\n {\n $this->pdo = null;\n }", "function __destruct() {\n $this->db->close();\n }", "public function down(Kohana_Database $db)\n\t{\n\t\t$db->query(NULL, 'DROP TABLE `services`');\n\t}", "protected function disconnect()\n {\n $this->conn_queries = 0;\n @$this->dbh->close();\n }", "protected function tearDown() {\n try {\n if ($this->dbh != null) {\n if (!$this->dbh->query('DROP TABLE users')) {\n $this->fail('Couldn\\'t teardown db. Query didn\\'t succeed');\n }\n }\n } catch (PDOException $ex) {\n $this->fail('Couldn\\'t teardown db ('. $ex->getMessage() .')');\n }\n }", "protected function resetDb()\n {\n if (is_readable(PHPUNIT_WEBROOT . '/app/database/bolt.db')) {\n unlink(PHPUNIT_WEBROOT . '/app/database/bolt.db');\n copy(PHPUNIT_ROOT . '/resources/db/bolt.db', PHPUNIT_WEBROOT . '/app/database/bolt.db');\n }\n }", "public function down(Kohana_Database $db)\n\t{\n\t\t// $db->query(NULL, 'DROP TABLE ... ');\n\t}", "public function down(Kohana_Database $db)\n\t{\n\t\t// $db->query(NULL, 'DROP TABLE ... ');\n\t}", "protected function tearDown()\n\t{\n\t\tunset($GLOBALS['__DB__']);\n\n\t\tparent::tearDown();\n\t}", "public function closeConnection()\n {\n $this->pdo = null;\n }", "function cerrar_conexion()\n {\n mysqli_close($this->db);\n }", "public function disconnect()\n {\n $this->pdo = null;\n }", "protected function tearDown()\n {\n $this->testDBConnector->clearDataFromTables();\n }", "public function __destruct()\n {\n try {\n if (!empty($this->databaseConnection)) {\n $this->databaseConnection->disconnect();\n }\n } catch (\\Exception) {\n }\n }", "protected function __destruct()\n {\n if (self::$db) self::$db->close();\n }", "public static function closeConnection(){\n //Check if instance exists\n if(isset(self::$instance)){\n //Closes connection\n self::$connection = null;\n //unset the instance, following connections will require re-connection to the DB.\n self::$instance = null;\n }\n }" ]
[ "0.8563309", "0.7685049", "0.76681256", "0.7657197", "0.7602402", "0.75653803", "0.7516724", "0.75141233", "0.7496532", "0.74791545", "0.7469615", "0.74570525", "0.7436036", "0.7436036", "0.74286443", "0.7378944", "0.73700523", "0.7321816", "0.73142993", "0.731309", "0.7312397", "0.72883576", "0.727989", "0.72702897", "0.7250862", "0.72235864", "0.72149706", "0.7187714", "0.71676344", "0.71635467", "0.7157977", "0.7146231", "0.7139775", "0.7121067", "0.71132773", "0.7065065", "0.7054028", "0.7040678", "0.7026886", "0.7018462", "0.7004573", "0.698134", "0.6973169", "0.69601375", "0.6954202", "0.69518495", "0.69419175", "0.69384784", "0.69328856", "0.6929504", "0.69086635", "0.6888036", "0.68719256", "0.6867044", "0.6862973", "0.68595064", "0.68461716", "0.68428814", "0.6842504", "0.68272966", "0.6825384", "0.6804571", "0.67984337", "0.67929024", "0.6788065", "0.67734325", "0.6760056", "0.6759758", "0.675667", "0.67562157", "0.6753862", "0.6747001", "0.67448026", "0.67448026", "0.67436266", "0.6730321", "0.6729128", "0.6728877", "0.67280316", "0.6726027", "0.67246634", "0.6721809", "0.67161393", "0.6708226", "0.670733", "0.6702977", "0.6701895", "0.66991174", "0.6697623", "0.66966546", "0.6685953", "0.66843414", "0.66843414", "0.6683021", "0.668106", "0.6680942", "0.66806054", "0.66794944", "0.66793007", "0.66754514", "0.6675041" ]
0.0
-1
Test to ensure a user receives their own profile data
public function testGetOwnProfile() { $url = "http://127.0.0.1/app_test.php/profile/view/bucky-barnes"; $username = '[email protected]'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Bucky Barnes', $response->body->data->user->name); $this->assertEquals(0, $response->body->data->relationships->isFriend); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProfileCheckIfUserExists()\n {\n\n }", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function _assertProfileExists($profile_uid)\n {\n }", "public function testQuarantineCheckIfProfileIsQuarantined()\n {\n\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "abstract protected function getUserProfile();", "public function testGetOneUserInformation()\n {\n $response = $this->json('GET', $this->userEndpoint.'/prostoalex');\n\n // It should return a valid user json with all the basic attributes filled\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'created',\n 'id',\n 'karma',\n 'submitted',\n 'about',\n ])\n ->assertJsonFragment([\n 'id' => 'prostoalex'\n ]);\n }", "public function testProfileUnilogin()\n {\n\n }", "public function testGetValidProfileByProfileName() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get Profile form database using profile name\n\t\t$results = Profile::getProfileByProfileName($this->getPDO(), $this->VALID_PROFILE_NAME);\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\n\t\t// make sure no other objects are contaminating the profile\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\FoodTruckFinder\\\\Profile\", $results);\n\n\t\t// make sure results are same as expected\n\t\t$pdoProfile = $results[0];\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "public function testProfileCreate()\n {\n\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "public function testProfileInvalid()\n {\n $email = new Notification();\n $email->profile('derp');\n }", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"[email protected]\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes Drupal perfect. You should have no complaints.'\nPROFILE_TEST;\n\n vfsStream::setup('profiles');\n vfsStream::create([\n 'fixtures' => [\n 'invalid_profile.info.txt' => $profile,\n ],\n ]);\n $info = $this->infoParser->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));\n $this->assertFalse($info['core_incompatible']);\n }", "public function testFillProfile() {\n $user = factory(\\App\\Models\\User::class)->make();\n\n // Register with factory credentials\n $this->browse(function ($browser) use ($user) {\n $browser->visit('/register')\n ->type('name', $user->name)\n ->type('email', $user->email)\n ->type('password', $user->password)\n ->type('password_confirmation', $user->password)\n ->press('Register')\n // Should be able to see My Profile after authentication\n ->assertSee('My Profile');\n\n // Go to profile\n $browser->clickLink('My Profile')\n ->assertSee('About Me');\n\n // Go to My Experience, open accordion\n $browser->clickLink('My Experience')\n ->assertSee('My Experience')\n ->press('Add Diploma/Degree')\n ->assertSee('New Diploma/Degree');\n\n // Add a diploma\n $browser->select('#degrees\\5b new\\5d \\5b 1\\5d degreeType', '4')\n ->type('#degrees\\5b new\\5d \\5b 1\\5d degreeArea', 'Test area of study')\n ->type('#degrees\\5b new\\5d \\5b 1\\5d degreeInstitution', 'Test institution');\n // TODO: Selectors for date picker\n //->click('#degrees\\5b new\\5d \\5b 1\\5d degreeStartDate')\n //->type('#degrees\\5b new\\5d \\5b 1\\5d degreeStartDate', ['2017'], ['{tab}'], ['0717']);\n //->type('#degrees\\5b new\\5d \\5b 1\\5d degreeEndDate', '2018', ['{tab}'], '08', ['{tab}'], '18');\n\n $browser->script('window.scrollTo(0, 1000);');\n\n // Saved work sample name should be visible\n $browser->assertSee('Save Diploma/Degree')\n ->pause(777) // Fails without a short pause\n ->press('Save Diploma/Degree')\n ->assertSee('Phd, Test area of study');\n\n // TODO: Repeat for certification / equivalent experience\n //$browser->press('Add Course/Certification')\n // ->assertSee('New Course/Certification');\n\n // Go to My Skills page\n $browser->clickLink('My Skills')\n ->assertSee('My Skills')\n ->press('Add Skill')\n ->assertSee('New Skill');\n\n // Add a soft skill\n $browser->select('#skill_declarations\\5b new\\5d \\5b soft\\5d \\5b 1\\5d skillSelection', '24') // Select dropdown by value\n ->keys('#skill_declarations\\5b new\\5d \\5b soft\\5d \\5b 1\\5d skillSelection',\n ['{tab}'], ['{tab}'], ['{arrow_right}']) // Keyboard controls were necessary to select skill level properly\n ->type('#skill_declarations\\5b new\\5d \\5b soft\\5d \\5b 1\\5d skillDescription', 'Test skill description');\n\n $browser->script('window.scrollTo(0, 1000);');\n\n // Text corresponding to skill selection value should be visible\n $browser->assertSee('Save Skill')\n ->pause(777)\n ->press('Save Skill')\n ->assertSee('Passion');\n\n // TODO: Repeat for hard skill\n\n // Go to My References, open accordion\n $browser->clickLink('My References')\n ->assertSee('My References')\n ->press('Add Reference')\n ->assertSee('New Reference');\n\n // Add a reference\n $browser->type('#references\\5b new\\5d \\5b 1\\5d referenceName', 'Test Reference')\n ->select('#references\\5b new\\5d \\5b 1\\5d referenceRelationship') // Selects random if not specified\n ->type('#references\\5b new\\5d \\5b 1\\5d referenceEmail', '[email protected]')\n ->type('#references\\5b new\\5d \\5b 1\\5d referenceDescription', 'Test reference description');\n\n // Scroll down (button click will fail if not visible on test browser screen)\n $browser->script('window.scrollTo(0, 1000);');\n\n // Saved work sample name should be visible\n $browser->assertSee('Save Reference')\n ->pause(777) // Fails without a short pause\n ->press('Save Reference')\n ->assertSee('Test Reference');\n\n // Go to My Work Samples, open accordion\n $browser->clickLink('My Work Samples')\n ->assertSee('My Work Samples')\n ->press('Add Sample')\n ->assertSee('New Work Sample');\n\n // Add work sample data, wouln't work without copying the full selector\n $browser->type('#work_samples\\5b new\\5d \\5b 1\\5d sampleName', 'Test Sample')\n ->select('#work_samples\\5b new\\5d \\5b 1\\5d sampleType') // Selects random if not specified\n ->type('#work_samples\\5b new\\5d \\5b 1\\5d sampleLink', 'http://talent.canada.ca')\n ->type('#work_samples\\5b new\\5d \\5b 1\\5d sampleDescription', 'Test sample description');\n\n $browser->script('window.scrollTo(0, 1000);');\n\n // Saved work sample name should be visible\n $browser->assertSee('Save Sample')\n ->pause(777) // Fails without a short pause\n ->press('Save Sample')\n ->assertSee('Test Sample');\n\n });\n }", "public function testProfileApp()\n {\n $client = static::createClient();\n $client->request('GET', '/candidate/profile');\n $this->assertEquals(301, $client->getResponse()->getStatusCode());\n\n //authenticated users are allowed\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile');\n $response = $client->getResponse();\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue(0 === strpos($response->getTargetUrl(), 'https'));\n\n //https and authentication loads page\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile', [], [], ['HTTPS' => true]);\n $this->assertTrue($crawler->filter('html:contains(\"Loading ...\")')->count() > 0);\n }", "public function testGetInvalidProfileByProfileEmail() : void {\n\t\t// get an email that doesn't exist\n\t\t$profile = Profile::getProfileByProfileEmail($this->getPDO(), \"[email protected]\");\n\t\t$this->assertNull($profile);\n\t}", "public function testProfileFind()\n {\n\n }", "public function testGetInvalidProfileByProfileName() : void {\n\t\t// get a profile name that doesn't exist\n\t\t$profile = Profile::getProfileByProfileName($this->getPDO(), \"Invalid Profile Name\");\n\t\t$this->assertCount(0, $profile);\n\t}", "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfileFindOne()\n {\n\n }", "public function testManagerNotAccessProfileUser()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextPresent('You don\\'t have access to this section.');\n\t}", "public function testGuestNotAccessProfilePage()\n\t{\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\t}", "public function testGetValidProfileById() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// grab the date from mySQL and enforce the fields match out expectations\n\t\t$pdoProfile = Profile::getProfileByProfileId($this->getPDO(), $profile->getProfileId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function testUserDetails() {\n\t\t// make new User and save it to the database\n\t\t$Role = Role::where('name', 'user')->first();\n\n\t\t// test home page 200 response code\n\t\t$this->visit('/home')\n\t\t\t->seePageIs('/home')\n\t\t\t->assertResponseOk();\n\n\t\t// check that User details are being displayed\n\t\t$this->visit('/home')->within('.body-content', function() use($Role) {\n\t\t\t$this->see($this->User->name)\n\t\t\t\t->see($this->User->email)\n\t\t\t\t->see(Language::trans('database.role-name-'.$Role->name));\n\t\t});\n\t}", "public function testGetProfilebyProfileEmail() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get the Profile from database by profile email\n\t\t$pdoProfile = Profile::getProfileByProfileEmail($this->getPDO(), $profile->getProfileEmail());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "private function generateProfile()\n {\n \t$profile = new Profile();\n \t$profile->firstname = $this->user_name_prefix . '_' . $this->faker->firstName;\n \t$profile->lastname = $this->faker->lastName;\n \t$profile->user_id = $this->userId;\n \t$profile->save(false);\n \treturn true;\n }", "public function test_user_edit_its_profile()\n {\n $user = factory(User::class)->create();\n\n $newProfession = factory(Profession::class)->create();\n\n //$this->actingAs($user);\n\n $response = $this->get('/perfil/');\n $response->assertStatus(200);\n\n $response = $this->put('/perfil/', [\n \t'first_name' => 'Dayan',\n 'last_name' => 'Betancourt',\n\t 'email' => '[email protected]',\n\t 'profession_id' => $newProfession->id,\n\t 'bio' => 'Programador de Laravel',\n\t 'twitter' => 'https://twitter.com/delfinbeta',\n ]);\n\n $response->assertRedirect();\n\n $this->assertDatabaseHas('users', [\n 'first_name' => 'Dayan',\n 'last_name' => 'Betancourt',\n\t 'email' => '[email protected]'\n ]);\n\n $this->assertDatabaseHas('user_profiles', [\n 'profession_id' => $newProfession->id,\n 'bio' => 'Programador de Laravel',\n\t 'twitter' => 'https://twitter.com/delfinbeta',\n ]);\n }", "public function testGetProfileOtherUserFriends()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bruce-banner\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bruce Banner', $response->body->data->user->name);\r\n $this->assertEquals(1, $response->body->data->relationships->isFriend);\r\n\r\n }", "public function testInfoUser()\n {\n }", "public function testGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/steve-rogers\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Steve Rogers', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function getUserProfile();", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function test_upload_with_profile_fields() {\n global $DB, $CFG;\n $this->resetAfterTest();\n set_config('passwordpolicy', 0);\n $this->setAdminUser();\n\n $categoryid = $DB->insert_record('user_info_category', ['name' => 'Cat 1', 'sortorder' => 1]);\n $this->field1 = $DB->insert_record('user_info_field', [\n 'shortname' => 'superfield', 'name' => 'Super field', 'categoryid' => $categoryid,\n 'datatype' => 'text', 'signup' => 1, 'visible' => 1, 'required' => 1, 'sortorder' => 1]);\n\n $filepath = $CFG->dirroot.'/lib/tests/fixtures/upload_users_profile.csv';\n\n $clihelper = $this->construct_helper([\"--file=$filepath\"]);\n ob_start();\n $clihelper->process();\n $output = ob_get_contents();\n ob_end_clean();\n\n // CLI output suggests that 2 users were created.\n $stats = $clihelper->get_stats();\n $this->assertEquals(2, preg_match_all('/New user/', $output));\n $this->assertEquals('Users created: 2', $stats[0]);\n\n // Created users have data in the profile fields.\n $user1 = core_user::get_user_by_username('reznort');\n $profilefields1 = profile_user_record($user1->id);\n $this->assertEquals((object)['superfield' => 'Loves cats'], $profilefields1);\n }", "public function userHasProfileLastname()\n {\n $name = explode(' ', $this->user->name);\n\n $this->user->profile()->create([\n 'firstname' => $name[0],\n 'lastname' => $name[1],\n ]);\n\n $this->assertEquals($this->user->profile->lastname, $name[1]);\n\n }", "public function testProfileFindById()\n {\n\n }", "public function test_logged_in_user_show_info()\n {\n $user=User::factory()->create();\n //behavior as this created user\n $response=$this->actingAs($user)->get(route('auth.user'));\n\n $response->assertStatus(Response::HTTP_OK);\n }", "public function userHasProfileFirstname()\n {\n $name = explode(' ', $this->user->name);\n\n $this->user->profile()->create([\n 'firstname' => $name[0],\n 'lastname' => $name[1],\n ]);\n\n $this->assertEquals($this->user->profile->firstname, $name[0]);\n }", "public function testGetCustomerProfile()\n {\n self::testCreateCustomerProfile();\n\n $response = $this->gateway->getCustomerProfile($this->customerProfileId);\n\n $this->assertTrue($response->isSuccess());\n }", "public function testGetAccountProfileIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/profile')\n ->see('Account Privacy')\n ->see('SPONSORED')\n ->see('ADS')\n ->see('CALENDAR')\n ->see('Edit Profile Image')\n ->seePageIs('account/profile');\n }", "public function testGetInvalidProfileByProfileId () : void {\n\t\t// grab a profile id that doesn't exist?\n\t\t$invalidProfileId = generateUuidV4();\n\n\t\t$profile = Profile::getProfileByProfileId($this->getPDO() , \"$invalidProfileId\");\n\t\t$this->assertNull($profile);\n\t}", "public function testProfileTitle()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see(trans('profile.title', ['username'=>'johndoe']));\n }", "public function testMeetupWillBeListedForPermittedUsers()\n {\n $data = array(\n 'permission' => 'custom',\n 'permittedUsers' => array('5003e8bc757df2020d000000'),\n );\n list($responseCode, $responseBody) = sendPutRequest($this->endpoint .'/5003e8bc757df2020d0f0033', $data, $this->user1Headers);\n\n list($responseCode, $responseBody2) = sendGetRequest($this->endpoint, array(), $this->user2Headers);\n $retrievedForUser2 = json_decode($responseBody2);\n\n list($responseCode, $responseBody3) = sendGetRequest($this->endpoint, array(), $this->user3Headers);\n $retrievedForUser3 = json_decode($responseBody3);\n\n $this->assertSame(2, count($retrievedForUser2));\n $this->assertSame(3, count($retrievedForUser3));\n }", "public function testProfileIndexFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(new BlokkrUser());\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "public function test_auth_code_redemption_with_profile() {\n\t\tstatic::$test_auth_code['scope'] = 'profile';\n\t\t$code = $this->set_auth_code();\n\t\t$response = $this->create_form( 'POST', \n\t\t\t\tarray(\n\t\t\t\t\t'grant_type' => 'authorization_code',\n\t\t\t\t\t'code' => $code,\n\t\t\t\t\t'client_id' => 'https://app.example.com',\n\t\t\t\t\t'redirect_uri' => 'https://app.example.com/redirect',\n\t\t\t\t)\n\t\t);\n\t\t$this->assertEquals( 200, $response->get_status(), 'Response: ' . wp_json_encode( $response ) );\n\t\t$data = $response->get_data();\n\t\t$this->assertArrayNotHasKey( 'access_token', $data );\n\t\t$this->assertEquals( \n\t\t\tarray( \n\t\t\t\t'me' => get_author_posts_url( static::$author_id ),\n\t\t\t\t'profile' => indieauth_get_user( static::$author_id )\n\t\t\t), \n\t\t\t$data, \n\t\t\t'Response: ' . wp_json_encode( $data ) \n\t\t);\n\t\t// Reset Just in Case.\n\t\tunset( static::$test_auth_code['scope'] );\n\t}", "private function GetFakeInstructorProfile()\n\t{\n\t\t# Creates a fake instructor profile since database does not \n\t\t# currently have instructor information in it.\n\t\t\n\t\t$record = array(\n\t\t\t'name' => 'Selma Louise',\n 'picture' => 'instructor_53456.gif',\n //'location' => 'Boston, MA',\n //'experience' => '5',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque bibendum metus vitae urna interdum faucibus. Proin euismod faucibus purus, dapibus luctus mi tincidunt sit amet. Mauris consectetur tincidunt molestie. Aliquam erat volutpat. Quisque nulla libero, tincidunt sed convallis at, tincidunt vitae diam. Nulla nibh arcu, viverra a consectetur sed, facilisis aliquam orci. Ut ullamcorper lectus eget odio ullamcorper mattis. Phasellus ac turpis leo, vel porttitor ipsum. Aliquam facilisis est vel tellus vulputate id faucibus risus gravida. Sed ut nisl id ante hendrerit aliquam.',\n 'types' => '',\n\t\t);\n\t\t\n\t\t$this->profile = $record;\n\t}", "public function testProfileCount()\n {\n\n }", "function getUserProfile()\n\t{\n\t\t// refresh tokens if needed \n\t\t$this->refreshToken();\n\n\t\ttry{\n\t\t\t$authTest = $this->api->api( \"auth.test\" );\n\t\t\t$response = $this->api->get( \"users.info\", array( \"user\" => $authTest->user_id ) );\n\t\t}\n\t\tcatch( SlackException $e ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->user->id ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\t\t# store the user profile. \n\t\t$this->user->profile->identifier\t\t=\t@$response->user->id;\n\t\t$this->user->profile->profileURL\t\t=\t\"\";\n\t\t$this->user->profile->webSiteURL\t\t=\t\"\";\n\t\t$this->user->profile->photoURL\t\t\t=\t@$response->user->profile->image_original;\n\t\t$this->user->profile->displayName\t\t=\t@$response->user->profile->real_name;\n\t\t$this->user->profile->description\t\t=\t\"\";\n\t\t$this->user->profile->firstName\t\t\t=\t@$response->user->profile->first_name;\n\t\t$this->user->profile->lastName\t\t\t=\t@$response->user->profile->last_name;\n\t\t$this->user->profile->gender\t\t\t=\t\"\";\n\t\t$this->user->profile->language\t\t\t=\t\"\";\n\t\t$this->user->profile->age\t\t\t\t=\t\"\";\n\t\t$this->user->profile->birthDay\t\t\t=\t\"\";\n\t\t$this->user->profile->birthMonth\t\t=\t\"\";\n\t\t$this->user->profile->birthYear\t\t\t=\t\"\";\n\t\t$this->user->profile->email\t\t\t\t=\t@$response->user->profile->email;\n\t\t$this->user->profile->emailVerified\t =\t\"\";\n\t\t$this->user->profile->phone\t\t\t\t=\t\"\";\n\t\t$this->user->profile->address\t\t\t=\t\"\";\n\t\t$this->user->profile->country\t\t\t=\t\"\";\n\t\t$this->user->profile->region\t\t\t=\t\"\";\n\t\t$this->user->profile->city\t\t\t\t=\t\"\";\n\t\t$this->user->profile->zip\t\t\t\t=\t\"\";\n\n\t\treturn $this->user->profile;\n\t}", "public function testProfileUpdateAll()\n {\n\n }", "public function testProfilePrototypeExistsCommunityRoles()\n {\n\n }", "public function testUpdateValidProfile() : void {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new profile and update it in mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// edit the profile and update it in mySQL\n\t\t$profile->setProfileContent($this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_NAME);\n\t\t$profile->update($this->getPDO());\n\n\t\t// grab the date from mySQL and enforce the fields match out expectations\n\t\t$pdoProfile = Profile::getProfileByProfileId($this->getPDO(), $profile->getProfileId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "public function testSaveProfileWrongUser() {\n\t\tCakeSession::write('Auth.User.id', 2);\n\t\t$this->Model->saveProfile(array(\n\t\t\t'User' => array(\n\t\t\t\t'id' => 1\n\t\t\t)\n\t\t));\n\t}", "public function testGetSiteMembershipRequestForPerson()\n {\n }", "public function testProfilePrototypeUpdateByIdAccessTokens()\n {\n\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfilePrototypeGetQuarantines()\n {\n\n }", "public function testUserMeGet()\n {\n }", "public function testPrivs()\n {\n return true; ///< Every client sees only it's own information\n }", "public function testInsertValidProfile() : void {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create new profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoProfile = Profile::getProfileByProfileId($this->getPDO(), $profile->getProfileId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "public function testUserCreate() {\n $createUser = PromisePay::User()->create($this->userData);\n \n // Second, fetch its data\n $getUser = PromisePay::User()->get($createUser['id']);\n \n $this->assertNotNull($createUser['created_at']);\n $this->assertNotNull($createUser['updated_at']);\n $this->assertEquals($createUser['id'], $getUser['id']);\n $this->assertEquals($this->userData['first_name'] . ' ' . $this->userData['last_name'], $getUser['full_name']);\n }", "public function testGetInfoUser()\n {\n $id = 1;\n $this->json('GET', \"api/user/get-info/$id\", ['Accept' => 'application/json'])\n ->assertStatus(200)\n ->assertJsonStructure([\n \"data\" => [\n \"created_at\",\n \"email\",\n \"name\",\n \"id\",\n \"org_id\",\n \"updated_at\"\n ]\n ]);\n }", "public function testGetValidProfileByActivationToken() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get Profile from the database by profile activation token\n\t\t$pdoProfile = Profile::getProfileByProfileActivationToken($this->getPDO(), $profile->getProfileActivationToken());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "public function testHasAccess()\n {\n $user = new User(null, null, null, \"admin\");\n\n $this->assertTrue($user->is(User::STUDENT));\n $this->assertTrue($user->isStudent());\n\n $this->assertFalse($user->is(User::LECTURER));\n $this->assertFalse($user->isLecturer());\n\n $this->assertFalse($user->is(User::ADMIN));\n $this->assertFalse($user->isAdmin());\n\n $user->setVerified(true);\n\n $this->assertTrue($user->is(User::STUDENT));\n $this->assertTrue($user->isStudent());\n\n $this->assertTrue($user->is(User::LECTURER));\n $this->assertTrue($user->isLecturer());\n\n $this->assertTrue($user->is(User::ADMIN));\n $this->assertTrue($user->isLecturer());\n }", "public function testGetProfileUserNotExist()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/thor\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n //AppBundle:User object not found. (404 Not Found)\r\n $this->assertTrue($response->code === 404);\r\n\r\n }", "public function testGetVoicemailUserpolicy()\n {\n }", "public function testGetAccountProfileOut()\n {\n // Grab Page\n $result = $this->visit('account/profile')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function verify_user_profile()\n {\n $this->CI->load->library('form_validation');\n $this->form_validation->CI =& $this;\n\n $this->CI->form_validation->set_rules('profdesc','Profile Description','required|min_length[5]|alpha_numeric_spaces|max_length[253]');\n $this->CI->form_validation->set_rules('first_name','Firstname','required|alpha|min_length[3]|max_length[15]');\n $this->CI->form_validation->set_rules('last_name','Lastname','required|alpha|min_length[2]|max_length[15]');\n\n\n return $this->CI->form_validation->run();\n }", "public function testGetSelfServiceBrowserProfileManagementRequest()\n {\n }", "function a_user_can_be_created(){\n\n $profession = factory(Profession::class)->create([\n 'title' => 'Web Developer'\n ]);\n $skillA = factory(Skill::class)->create([\n 'description' => 'CSS'\n ]);\n $skillB = factory(Skill::class)->create([\n 'description' => 'HTML'\n ]);\n\n $this->browse(function(Browser $browser) use ($profession,$skillA,$skillB){\n $browser->visit('users/create')\n ->assertSeeIn('h5','Create User')\n ->type('name','Yariel Gordillo')\n ->type('email','[email protected]')\n ->type('password','secret')\n ->type('bio','This a small bio')\n ->select('profession_id',$profession->id)\n ->type('twitter' ,'https://twitter.com/yariko')\n ->check(\"skills[{$skillA->id}]\")\n ->check(\"skills[{$skillB->id}]\")\n ->radio('role', 'user')\n ->press('Create User')\n ->assertPathIs('/users')\n ->assertSee('Yariel Gordillo')\n ->assertSee('[email protected]');\n });\n\n }", "function testProfileTitle() {\n $this->drupalGet(Url::fromRoute('entity.linkit_profile.edit_form', [\n 'linkit_profile' => $this->linkitProfile->id(),\n ]));\n\n $this->assertText('Edit ' . $this->linkitProfile->label() . ' profile');\n }", "public function FirstTimeProfileCheck(){\n\t\t\t\t$checkheader=$this->db->prepare(\"SELECT verified_status FROM users WHERE id=:id AND status=1 AND verified_status=2\");\n\t\t\t\t$user_id=isset($_SESSION['user_id']) ? $_SESSION['user_id'] : 0;\n\t\t\t\t$checkheader->execute(array(\"id\"=>$user_id));\n\t\t\t\t$rowchk=$checkheader->fetch(PDO::FETCH_ASSOC);\n\n\t\t\t\tif(!empty($rowchk)){\n\t\t\t\t\tif($_SESSION['user_type']=='broker'){\n\t\t\t\t\t\tif(strpos($_SERVER['REQUEST_URI'], \"/app/broker/profile\")!=false){\n\t\t\t\t\t\t\theader(\"Location:\".SITEURL.\"app/broker/add-load\");\n\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t\t}elseif($_SESSION['user_type']=='shipper'){\n\t\t\t\t\t\tif(strpos($_SERVER['REQUEST_URI'], \"/app/shipper/profile\")!=false){\n\t\t\t\t\t\t\theader(\"Location:\".SITEURL.\"app/shipper/add-load\");\n\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t\t}elseif($_SESSION['user_type']=='trucker'){\n\t\t\t\t\t\tif(strpos($_SERVER['REQUEST_URI'], \"/app/trucker/profile\")!=false){\n\t\t\t\t\t\t\theader(\"Location:\".SITEURL.\"app/trucker/search-loads\");\n\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($_SESSION['user_type']=='broker'){\n\t\t\t\t\t\tif(strpos($_SERVER['REQUEST_URI'], \"/app/broker/profile\")==false){\n\t\t\t\t\t\t\theader(\"Location:\".SITEURL.\"app/broker/profile\");\n\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t }elseif($_SESSION['user_type']=='shipper'){\n\t\t\t\t\t\tif(strpos($_SERVER['REQUEST_URI'], \"/app/shipper/profile\")==false){\n\t\t\t\t\t\t\theader(\"Location:\".SITEURL.\"app/shipper/profile\");\n\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t }elseif($_SESSION['user_type']=='trucker'){\n\t\t\t\t \tif(strpos($_SERVER['REQUEST_URI'], \"/app/trucker/profile\")==false){\n\t\t\t\t\t\t\theader(\"Location:\".SITEURL.\"app/trucker/profile\");\n\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t } \n\t\t\t}\n\n\t\t}", "public function viewProfile_post(){\n $user_id = $this->input->post('user_id');\n $sub = $this->User_model->getprofile($user_id);\n\n $memData = $this->User_model->selMembership($user_id);\n if (empty($sub)) {\n $result = array(\n \"controller\" => \"User\",\n \"action\" => \"viewProfile\",\n \"ResponseCode\" => false,\n \"MessageWhatHappen\" => \"User does not exists\"\n );\n } else {\n $result = array(\n \"controller\" => \"User\",\n \"action\" => \"viewProfile\",\n \"ResponseCode\" => true,\n 'viewProfileData' => $sub,\n 'membership'=>$memData\n );\n }\n $this->set_response($result, REST_Controller::HTTP_OK);\n }", "public function editprofile_action()\n {\n Auth::checkAuthentication();\n \n \n $postname = Request::post('user_name');\n $postemail = Request::post('user_email');\n $postbio = Request::post('user_bio');\n\n\n if(Session::get('user_name') != $postname && $postname != null)\n {\n UserModel::editUserName($postname);\n }\n \n if(Session::get('user_email') != $postemail && $postemail != null)\n {\n UserModel::editUserEmail($postemail);\n }\n \n //null is checked in this method\n AvatarModel::createAvatar();\n \n if(Session::get('user_bio') != $postbio && $postbio != null)\n {\n UserModel::editBio($postbio);\n }\n\n return true;\n }", "protected function readUserProfile()\n {\n if (isset($_GET['code'])) {\n $params = array(\n 'client_id' => $this->clientId,\n 'client_secret' => $this->clientSecret,\n 'redirect_uri' => $this->redirectUri,\n 'grant_type' => 'authorization_code',\n 'code' => $_GET['code']\n );\n\n $tokenInfo = $this->post('https://accounts.google.com/o/oauth2/token', $params);\n\n if (isset($tokenInfo['access_token']) && isset($tokenInfo['id_token']))\n {\n $params = array('id_token' => $tokenInfo['id_token']);\n $validateToken = $this->get('https://www.googleapis.com/oauth2/v1/tokeninfo', $params);\n\n if (!isset($validateToken['email'])) {\n return false;\n }\n\n $params = array('access_token' => $tokenInfo['access_token']);\n $userInfo = $this->get('https://www.googleapis.com/plus/v1/people/me', $params);\n\n if (isset($userInfo['kind']) && $userInfo['kind'] == 'plus#person')\n {\n $this->parseUserData($userInfo);\n\n $this->userInfo['email'] = $validateToken['email'];\n\n if (isset($this->response['birthday']))\n {\n $birthDate = explode('-', $this->response['birthday']);\n $this->userInfo['birthDay'] = isset($birthDate[2]) ? $birthDate[2] : null;\n $this->userInfo['birthMonth'] = isset($birthDate[1]) ? $birthDate[1] : null;\n $this->userInfo['birthYear'] = isset($birthDate[0]) ? $birthDate[0] : null;\n }\n\n return true;\n }\n }\n }\n\n return false;\n }", "public function profileAction(){\n /** @var Object_User $user */\n $data = $this->getRequestData();\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n if(isset($data['phone'])){\n $user->setPhone($data['phone']);\n }\n if(isset($data['email'])){\n $user->setPhone($data['email']);\n }\n if(isset($data['workphone'])){\n $user->setWorkPhone($data['workphone']);\n }\n if(isset($data['workemail'])){\n $user->setWorkEmail($data['workemail']);\n }\n if(!$user->save()){\n $this->setErrorResponse('Cannot update user profile');\n }\n $this->_helper->json($user);\n }", "public function canViewProfile() {\n\t\treturn (!$this->protectedProfile || WCF::getUser()->userID == $this->userID || UserProfile::isBuddy($this->userID) || WCF::getUser()->getPermission('admin.general.canViewPrivateUserOptions'));\n\t}", "public function testGetSiteMembershipForPerson()\n {\n }", "public function testProfilePrototypeUpdateByIdQuarantines()\n {\n\n }", "public function createUserProfile($data) {\n\n global $user, $db;\n\n $userID = $user->getId();\n\n $sql = 'SELECT COUNT(*)\n FROM users AS u\n JOIN profiles AS p ON p.userID = u.id\n WHERE u.id = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([$userID]);\n $result = $stmt->fetch(PDO::FETCH_COLUMN);\n\n if ($result) {\n $sql = 'UPDATE profiles\n SET firstName=?, lastName=?, dob=?, addressFirst=?, addressSecond=?, city=?, postcode=?, mobile=?, bio=?\n WHERE userID = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([\n $data['firstName'],\n $data['lastName'],\n $data['dob'],\n $data['addressFirst'],\n $data['addressSecond'],\n $data['city'],\n $data['postcode'],\n $data['mobile'],\n $data['bio'],\n $userID\n ]);\n header(\"Location: ../profile.php?profile=updated\");\n exit();\n }\n }\n else {\n $sql = 'INSERT INTO profiles (userID, firstName, lastName, dob, addressFirst, addressSecond, city, postcode, mobile, bio)\n VALUES (?,?,?,?,?,?,?,?,?,?)';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([\n $userID,\n $data['firstName'],\n $data['lastName'],\n $data['dob'],\n $data['addressFirst'],\n $data['addressSecond'],\n $data['city'],\n $data['postcode'],\n $data['mobile'],\n $data['bio']\n ]);\n header(\"Location: ../profile.php?profile=updated\");\n exit();\n }\n }\n }\n }", "public function testGetUserAttributes()\n {\n }", "public function testProfilePrototypeCreateQuarantines()\n {\n\n }", "public function testSelfUserInfo()\n {\n // Test own user\n $kraken = new Kraken(self::$tokenProvider);\n $kraken->setDefaultTarget(ACCESS_CHANNEL);\n\n $user = $kraken->users->info();\n\n $this->assertInstanceOf(stdClass::class, $user);\n\n // Check user info structure.\n foreach (self::USER_INFO_OBJ_ATTRIBUTES as $attr) {\n $this->assertObjectHasAttribute($attr, $user);\n }\n\n $this->assertEquals(ACCESS_CHANNEL, $user->name);\n\n return $user->_id;\n }", "public function testProfilePrototypeFindByIdQuarantines()\n {\n\n }", "private function checkingApiCanFetchAProfile($profile_id)\n {\n $api_profile=$this->api_request->get(\"profile\",\"single_profile\",$params=array('profile_id'=>$profile_id));\n return ($api_profile['user_id']==$profile_id);\n }", "function do_personal()\r\n\t{\r\n\r\n\t\t$this->lib->do_profile();\r\n\r\n\t}", "public function testExample()\n {\n $user = User::count();\n $profile = Profile:: count();\n $this->assertEquals($user,$profile);\n }", "public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }", "function canCreate(){\n\t\t\tif(!isset($_POST['action'])) return false;\n\t\t\tif($_POST['action'] !== 'create_profile') return false;\n\t\t\tif($_POST['profile_folder'] === '') return false;\n\t\t\tif($_POST['profile_name'] === '') return false;\n\t\t\treturn true;\n\t\t}", "public function profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}" ]
[ "0.7678932", "0.76426554", "0.75188756", "0.73572254", "0.7291773", "0.71189636", "0.7094142", "0.7018698", "0.6958791", "0.6945694", "0.6921496", "0.67984915", "0.6791915", "0.66957873", "0.66834736", "0.6652722", "0.6599944", "0.6556649", "0.6546952", "0.65285903", "0.652737", "0.6526382", "0.65119976", "0.65075636", "0.6499172", "0.64678794", "0.6466967", "0.6455154", "0.6452743", "0.6424725", "0.64005286", "0.63666123", "0.63652736", "0.6349374", "0.63427246", "0.63386256", "0.63312715", "0.6319212", "0.62991196", "0.62924737", "0.62831736", "0.62745357", "0.6254937", "0.62405944", "0.6235039", "0.6226397", "0.6195327", "0.61945623", "0.61738527", "0.616968", "0.6150655", "0.61377996", "0.61148435", "0.6113174", "0.6106057", "0.60982597", "0.60975015", "0.60642654", "0.6063292", "0.6054403", "0.6036592", "0.60312563", "0.6026348", "0.6019878", "0.60182124", "0.601594", "0.60105866", "0.59952843", "0.5979383", "0.5973873", "0.5970837", "0.59670067", "0.5954275", "0.5953426", "0.59520686", "0.59353167", "0.59323514", "0.59298724", "0.5928827", "0.59261423", "0.591508", "0.5910081", "0.59098995", "0.59022754", "0.59016955", "0.5897805", "0.5895842", "0.5891241", "0.5890311", "0.58891153", "0.5888513", "0.5881865", "0.5879904", "0.58798444", "0.5879141", "0.5876387", "0.58761674", "0.5874723", "0.58720046", "0.586696" ]
0.7338619
4
Test to ensure a not logged in user cannot get profile data
public function testGetProfileNotLoggedIn() { $url = "http://127.0.0.1/app_test.php/profile/view/bucky-barnes"; $response = \Httpful\Request::get($url)->send(); //ERROR Call to a member function getWellnessProfessional() on string (500 Internal Server Error) $this->assertEquals(302, $response->code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testManagerNotAccessProfileUser()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextPresent('You don\\'t have access to this section.');\n\t}", "public function testGuestNotAccessProfilePage()\n\t{\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\t}", "public function testGetInvalidProfileByProfileEmail() : void {\n\t\t// get an email that doesn't exist\n\t\t$profile = Profile::getProfileByProfileEmail($this->getPDO(), \"[email protected]\");\n\t\t$this->assertNull($profile);\n\t}", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function testGetInvalidProfileByProfileName() : void {\n\t\t// get a profile name that doesn't exist\n\t\t$profile = Profile::getProfileByProfileName($this->getPDO(), \"Invalid Profile Name\");\n\t\t$this->assertCount(0, $profile);\n\t}", "public function testQuarantineCheckIfProfileIsQuarantined()\n {\n\n }", "public function testGetInvalidProfileByProfileId () : void {\n\t\t// grab a profile id that doesn't exist?\n\t\t$invalidProfileId = generateUuidV4();\n\n\t\t$profile = Profile::getProfileByProfileId($this->getPDO() , \"$invalidProfileId\");\n\t\t$this->assertNull($profile);\n\t}", "public function testProfileInvalid()\n {\n $email = new Notification();\n $email->profile('derp');\n }", "public function testGetProfileUserNotExist()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/thor\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n //AppBundle:User object not found. (404 Not Found)\r\n $this->assertTrue($response->code === 404);\r\n\r\n }", "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testNotLoggedIn()\n {\n $this->sessionInfo['logged_in'] = false;\n $this->sessionInfo['token'] = 'foo';\n\n $this->session($this->sessionInfo);\n\n $response = $this->call('GET', '/api/user');\n\n $this->assertEquals(200, $response->getStatusCode());\n\n $decoded = json_decode($response->getContent());\n\n $this->assertEquals('error', $decoded->status);\n }", "public function loginUserConditionDoesNotMatchSingleLoggedInUser() {}", "public function testGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/steve-rogers\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Steve Rogers', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetInvalidAdultUsername() : void {\n// grab an email that does not exist\n$profile = Adult::getAdultByAdultUsername($this->getPDO(), \"yourmom\");\n$this->assertNull($profile);\n}", "function testGetUserBySession() {\n $this->assertFalse(Sessions::getUserBySession());\n }", "public function testSaveProfileWrongUser() {\n\t\tCakeSession::write('Auth.User.id', 2);\n\t\t$this->Model->saveProfile(array(\n\t\t\t'User' => array(\n\t\t\t\t'id' => 1\n\t\t\t)\n\t\t));\n\t}", "public function test_show_user_as_unauthorized_user()\n {\n $user = User::factory()->create();\n $user2 = User::factory()->create();\n\n $response = $this->actingAs($user)\n ->get(route('api.users.show', [$user2->id]));\n\n $response->assertStatus(403);\n }", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function mustbeuser()\n {\n if (!$this->hasuser())\n {\n $this->web()->noaccess();\n }\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "abstract protected function getUserProfile();", "public function testGuestNotAccessUsersPage()\n\t{\n\t\t$this->open('user');\n\t\t$this->assertTextNotPresent('Users');\n\t}", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function _assertProfileExists($profile_uid)\n {\n }", "public function test_that_unauthroized_user_cannot_view_courses()\n {\n\n }", "public function testGetInvalidAccessByAccessId() {\n\t\t//grab a user id that exceeds the maximum allowable profile id\n\t\t$access = Access::getAccessByAccessId($this->getPDO(), TimeCrunchersTest::INVALID_KEY);\n\t\t$this->assertNull($access);\n\t}", "public function testProfileUnilogin()\n {\n\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "public function loginUserConditionDoesNotMatchIfNotUserIsLoggedId() {}", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function testdefaultUserDataAvailable()\n {\n $logger = new Logger('error-log');\n $logger->pushHandler(new SentryMonologHandler());\n \n // Setup the \"fixture data\" for this test\n $this->logInWithPermission('admin');\n\n $userDataThatWasSet = $logger->getClient()->getData()['user'];\n\n // Cannot get Member data at by default at initialisation time\n $this->assertEquals('Unavailable', $userDataThatWasSet['ID']);\n $this->assertEquals('Unavailable', $userDataThatWasSet['Email']);\n }", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testNotLoggedIn()\n {\n $user = new User($this->getDb());\n $user->setNick(\"TestNickname\");\n $user->setPassword(\"TestPassword\");\n $user->create();\n\n // create a rank\n $this->createTestRank(\"Test Name\");\n\n $deleteApi = new Delete($this->getDb());\n $answer = $deleteApi->post(1);\n\n $this->assertEquals(['error' => 'NotLoggedIn'], $answer);\n\n // try to load the rank\n $rank = new Rank($this->getDb(), 1);\n $this->assertEquals(\"Test Name\", $rank->getTitle());\n }", "public function testGetInvalidUserByEmail(): void {\n\t\t// Grab an email that does not exist\n\t\t$user = User::getUserByUserEmail($this->getPDO(), \"[email protected]\");\n\t\t$this->assertNull($user);\n\t}", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public static function getUserNoProfile()\n {\n $user = static::get();\n if (isset($user->noPerfil)) {\n return $user->noPerfil;\n }\n }", "public function testFailedDifferentUserLoggedIn(): void\n {\n self::$httpAuthorizationToken = AccessTokenFixture::DATA['access-token-juliette']['id'];\n\n $this->checkFailedAccessDenied();\n }", "public function testUserMustBeLoggedIn()\n {\n $response = $this->json('POST', '/avatar', [\n 'avatar' => ''\n ]);\n\n $response->assertStatus(401);\n }", "function user_not_loggedin() {\n global $USER;\n return ($USER->id <= 0 || isguestuser());\n}", "public function testGetProfileWPNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/natasha-romanov\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Natasha Romanov', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testCannotViewRegisterIfLoggedIn()\n {\n $user = factory(User::class)->create([\n 'email' => '[email protected]',\n 'password' => bcrypt('testing')\n ]);\n\n $this->actingAs($user)->visit('/')->visit('/register')->seePageIs('/');\n }", "public function testGetInvalidUserByEmail() {\n\t\t// grab an email that does not exist\n\t\t$user = User::getUserByEmail($this->getPDO(), \"<sript><Scrpt\");\n\t\t$this->assertNull($user);\n\t}", "public function test_if_user_isnt_authorized_to_sign_in_if_doesnt_exists()\n {\n $this->postJson('/api/v1/auth/login', $this->credentials)->assertUnauthorized();\n }", "public function testGetInvalidProfileActivationToken() : void {\n\t\t// get an activation token that does not exist\n\t\t$profile = Profile::getProfileByProfileActivationToken($this->getPDO(), \"91a930a7d9746db530a1315d65c31bbf\");\n\t\t$this->assertNull($profile);\n\t}", "public function testShowUnauthicatedAccess(): void { }", "public function testProfileApp()\n {\n $client = static::createClient();\n $client->request('GET', '/candidate/profile');\n $this->assertEquals(301, $client->getResponse()->getStatusCode());\n\n //authenticated users are allowed\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile');\n $response = $client->getResponse();\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue(0 === strpos($response->getTargetUrl(), 'https'));\n\n //https and authentication loads page\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile', [], [], ['HTTPS' => true]);\n $this->assertTrue($crawler->filter('html:contains(\"Loading ...\")')->count() > 0);\n }", "public function testProfileIndexNotFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(null);\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(404, $client->getResponse()->getStatusCode());\n }", "public function testGetSingleUserPageWithoutAuth()\n\t{\n\t\t$response = $this->call('orchestra::users@view', array(1));\n\t\t\n\t\t$this->assertInstanceOf('Laravel\\Redirect', $response);\t\n\t\t$this->assertEquals(302, $response->foundation->getStatusCode());\n\t\t$this->assertEquals(handles('orchestra::login'), \n\t\t\t$response->foundation->headers->get('location'));\n\t}", "private function _checkValidUser()\n\t{\n\t\t$user = $this->getUser();\n\t\tif(NULL == $user->getFirstname()) return $this->redirect('/logout');\n\t\tif(NULL <> $user->getEmployerId()) return $this->redirect('/admin');\n\t}", "private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }", "public function testGetInvalidUserByUserName(): void {\n\t\t// Grab an username that does not exist\n\t\t$user = User::getUserByUserName($this->getPDO(), \"doesnotexist\");\n\t\t$this->assertCount(0, $user);\n\t}", "public function loginUserConditionMatchIfUserIsNotLoggedIn() {}", "public function test_export_user_preferences_not_defined() {\n $this->resetAfterTest();\n $user = $this->getDataGenerator()->create_user();\n provider::export_user_preferences($user->id);\n $writer = writer::with_context(\\context_user::instance($user->id));\n $this->assertFalse($writer->has_any_data());\n }", "private function is_hidden_profile() {\n\t\treturn ! bp_profile_visibility_is_visible_profile( bp_displayed_user_id(), bp_loggedin_user_id() );\n\t}", "public function testGetUsersPageWithoutAuth()\n\t{\n\t\t$response = $this->call('orchestra::users@index');\n\t\t\n\t\t$this->assertInstanceOf('Laravel\\Redirect', $response);\t\n\t\t$this->assertEquals(302, $response->foundation->getStatusCode());\n\t\t$this->assertEquals(handles('orchestra::login'), \n\t\t\t$response->foundation->headers->get('location'));\n\t}", "public function testManagerNotAccessSettingsPage()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/setting/');\n\t\t$this->assertTextPresent('You don\\'t have access to this section.');\n\t}", "public function testUserWithoutAccesToResource()\n {\n $this->unlogged();\n $this->visit('/resource')\n ->seePageIs(route('auth.getLogin'))\n ->see('Login');\n }", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "public function test_unauthorized_fetch()\n {\n $headers = [\n 'Authorization' => \"Bearer None\"\n ];\n\n $response = $this\n ->withHeaders($headers)\n ->json('GET', '/api/github-users', [\n 'logins' => [\n 'souinhua',\n 'taylorotwell',\n 'no_one_151asd@'\n ]\n ]);\n\n $response->assertStatus(Response::HTTP_UNAUTHORIZED);\n }", "public function testUnauthorizedAccess()\n {\n $this->get('/properties/1');\n\n $this->assertGuest();\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "public function testEnterIncorrectData()\n {\n $user = User::factory()->create();\n \n $response = $this->call('POST', '/admin/signin', [\n 'email' => '',\n 'password' => '',\n '_token' => csrf_token()\n ]);\n \n $this->assertNotEquals(200, $response->getStatusCode());\n\n $response = $this->call('POST', '/admin/signin', [\n 'email' => '[email protected]',\n 'password' => '123',\n '_token' => csrf_token()\n ]);\n $this->assertEquals(422, $response->decodeResponseJson()['status']);\n\n }", "public function testUpdateUserProfileErrorForbidden()\n {\n // Request\n $response = $this->call('POST', $this->accountProfilePostUrl, []);\n\n // Assert redirect to login\n $response->assertStatus(302);\n $response->assertRedirect('login');\n }", "private function notExist() : void\n {\n if(!$this->user)\n {\n (new Session())->set('user','error','Désolé une erreur est survenue');\n header('Location:' . self::REDIRECT_HOME);\n die();\n }\n }", "public function test_a_user_cannot_modify_another_users_account_information()\n {\n $userA = factory(User::class)->create();\n $userB = factory(User::class)->create();\n\n // When user A tries to view user B data\n Passport::actingAs($userA);\n $response = $this->json('GET', 'api/v1/users/' . $userB->id);\n\n // Then it is not successful\n $response->assertStatus(ResponseCode::HTTP_UNAUTHORIZED);\n $response->assertSee('Unauthorized Access');\n }", "public function testShowUserFail()\n {\n $this->withoutMiddleware();\n $response = $this->get('/api/users/2');\n $response->assertJsonStructure([\n \"meta\" => [\n \"message\",\n \"code\"\n ],\n ]);\n $response->assertJson([\n \"meta\" => [\n \"code\" => Response::HTTP_NOT_FOUND\n ]\n ]);\n }", "public function test_unauthorized_user_cannot_access_the_user_route()\n {\n $response = $this->getJson('/user');\n\n $response->assertStatus(401);\n }", "function core_validateUserAccessProfile($intProfileID, $intUserID = 0) {\n\tif ($intUserID == 0) $intUserID = $_SESSION[\"wt\"][\"uid\"];\n\n\tif (check_user_class(\"admin\") || check_user_class(\"helpdesk\")) {\n\t\treturn true;\n\t}\n\telse {\n\t\t$strQuery = \"SELECT UAPD.module AS shouldHave, UA.module AS hasAccess\n\t\t\t\t\t FROM wt_user_access_perfiles_d AS UAPD\n\t\t\t\t\t\t\tLEFT JOIN wt_user_access AS UA\n\t\t\t\t\t\t\tON UA.module = UAPD.module AND\n\t\t\t\t\t\t\t UA.userid = {$intUserID}\n\t\t\t\t\t WHERE UAPD.perfil_id = {$intProfileID} AND\n\t\t\t\t\t\t UA.module IS NULL\n\t\t\t\t\t ORDER BY UAPD.module\";\n\t\t$qTMP = db_query($strQuery);\n\t\t$intNumRows = db_num_rows($qTMP);\n\t\tdb_free_result($qTMP);\n\n\t\treturn ($intNumRows == 0);\n\t}\n}", "public function limitToMissingRegistrationsWithNoLoggedInFeUserThrowsException()\n {\n $this->setExpectedException(\n 'BadMethodCallException',\n 'No FE user is currently logged in. Please call this function only when a FE user is logged in.'\n );\n\n $this->fixture->limitToMissingRegistrations();\n }", "public function testItDoesntReturnAnInvalidUser()\n { \n $this->actingAs($this->user)\n ->getJson(\"api/v1/users/0\")\n ->assertStatus(422);\n }", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "function getUserIsLoggedIn() {\r\n\r\n // For now, just return false\r\n return false;\r\n}", "public function testAdminUpdateAccountDoesntExist()\n {\n $this->withSession(['expert' => ['id' => 99, 'type' => 'admin']])\n ->get(route('account.update', ['id' => 9999]))\n ->assertSessionHas('warning')\n ->assertRedirect(route('account.list'));\n }", "private function userNotLoggedin(){\n \n if (session()->get('grandidsession')===null || !session()->has('user_id')\n || (session()->get('role')!==config('constants.roles.USER_ROLE'))){\n return true;\n }\n return false;\n }", "public function testNotAuthenticated()\n {\n $response = $this->get('/api/auth/me');\n $response->assertStatus(302);\n\n $response = $this->followingRedirects()->get('/api/auth/me');\n $response->assertStatus(401);\n }", "public function test_teams_show_authenticated_user_returns_403(){\n $this->signInUser();\n $response = $this->get(route('teams.show', ['team' => 1]));\n $response->assertStatus(403); }", "public function testVisitUserAccountProfilePageRedirectsToLogin()\n {\n $response = $this->call('GET', $this->accountProfilePageUrl);\n $response->assertRedirect('login');\n }", "public function testNoPermission(){\n $noAccessUser = $this->drupalCreateUser([]);\n $this->drupalLogin($noAccessUser);\n $this->drupalGet('connect-four');\n $this->assertSession()->statusCodeEquals(403);\n }", "public function checkUser()\n {\n $response = $this->di->get(\"response\");\n $user = $this->di->get(\"user\");\n\n if (!$user->isLoggedIn()) {\n $response->redirect(\"login\");\n }\n }", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function testRoomMembershipNotAuthorized()\n {\n $room = $this->createRoomWithPassword('Test Password');\n $user = factory(User::class)->create();\n\n $response = $this->actingAs($user)\n ->call('GET', '/room/'.$room->id);\n $response->assertStatus(Response::HTTP_UNAUTHORIZED);\n }", "public function testGetInvalidAccessByAccessName() {\n\t\t// grab a user id that exceeds the maximum allowable user id\n\t\t$access = Access::getAccessByAccessName($this->getPDO(), \"nobody was ever given this access\");\n\t\t$this->assertCount(0, $access);\n\t}", "public function badPaymentProfile()\n {\n\n $payment_profile = $this->payment_profile()->first();\n\n if ($payment_profile === NULL)\n return TRUE;\n\n if (empty($payment_profile->stripe_customer))\n return TRUE;\n\n return FALSE;\n\n }", "public function isLoggedInForNoFrontEndReturnsFalse() {\n\t\t$this->assertFalse(\n\t\t\t$this->subject->isLoggedIn()\n\t\t);\n\t}", "public function test_users_edit_leader_returns_403(){\n $this->signInUser();\n $response = $this->get(route('users.edit', ['user'=> 2]));\n $response->assertStatus(403);\n }", "public function testLoginActionWithUnknowUser()\n {\n $data = [\n '_username' => 'unknowuser',\n '_password' => '',\n ];\n $client = static::createClient();\n\n $crawler = $client->request('GET', '/login');\n $form = $crawler->filter('form[action$=\"login_check\"].form-horizontal button[type=\"submit\"]')->form();\n $client->submit($form, $data);\n $crawler = $client->followRedirect();\n $this->assertSame('Bad credentials', $crawler->filter('div.alert.alert-error')->text());\n $security = $client->getContainer()->get('security.context');\n $this->assertFalse($security->isGranted('ROLE_USER'));\n }", "private function checkIfLoggedIn()\n {\n if (!session()->has('user')) {\n abort(403, 'You are not logged in.');\n }\n }", "public function testWrongUser(){\n Session::flush();\n $user = $this->postuser(array('username'=>'XxX','password'=>'XxX'));\n $status_message = $this->getJsonResponse();\n $this->assertResponseStatus('401');\n $this->assertTrue($status_message['message'] == 'login refused');\n }", "public function testThatGetPermissionsThrowsExceptionIfUserIdIsMissing()\n {\n $api = new MockManagementApi();\n\n try {\n $api->call()->users()->getPermissions( '' );\n $caught_message = '';\n } catch (EmptyOrInvalidParameterException $e) {\n $caught_message = $e->getMessage();\n }\n\n $this->assertContains( 'Empty or invalid user_id', $caught_message );\n }", "function action_profile_show() {\n // Process request with using of models\n $user = get_authorized_user();\n // Make Response Data\n if ($user !== NULL) {\n $data = [\n 'profile' => $user,\n ];\n return ['view' => 'user/show', 'data' => $data];\n } else {\n return error403();\n }\n}", "public function testUserCannotAccessAdminDashboard(): void\n {\n $username = $this->fixtures->getReference('user')->getUsername();\n $this->formLogIn($username);\n $this->client->request('GET', '/admin/dashboard');\n $this->assertSame(\n Response::HTTP_FORBIDDEN,\n $this->client->getResponse()->getStatusCode()\n );\n }", "private function checkValidUser() {\n return;\n if(!($this->getData('key') == $this->sessionId && isset($_SESSION['user']) && isset($_SESSION['valid']) && $_SESSION['valid'] === true)) {\n $this->output = array(\n 'success' => false,\n 'key' => 'kMIvl'\n );\n\n // Terminate the call now, user isn't allowed to perform this action\n $this->renderOutput(true);\n }\n }", "protected static function maybe_disable_invalid_profile_notice() {\n\t\tif ( isset( $_GET['wcs_disable_paypal_invalid_profile_id_notice'] ) ) {\n\t\t\tupdate_option( 'wcs_paypal_invalid_profile_id', 'disabled' );\n\t\t}\n\n\t\tif ( isset( $_GET['wcs_ipn_error_notice'] ) ) {\n\t\t\tupdate_option( 'wcs_fatal_error_handling_ipn_ignored', true );\n\t\t}\n\t}", "public function getUserProfile();", "public function testUserNotExisted(){\n $array_test = ['email' => '[email protected]', 'pubid' => 4];\n\n $api = new ApiConnection();\n $dataCheck = [\n 'status' => 401,\n 'message' => \"User does not exist\",\n 'data' => []\n ];\n $this->assertEquals($dataCheck, $api->updateAccount($array_test));\n }", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"[email protected]\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "function requires_login()\n {\n $user = user();\n \n if ( empty( $user ) )\n {\n // no user id found, send to login\n Utility::redirect( Utility::login_url() );\n }\n }", "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }" ]
[ "0.7578113", "0.74428815", "0.7123898", "0.69528604", "0.69355494", "0.6854474", "0.68390185", "0.6789364", "0.67766964", "0.6639339", "0.6553816", "0.6541412", "0.64906883", "0.64691174", "0.64636546", "0.6434995", "0.64103854", "0.6403959", "0.6402856", "0.6375673", "0.63698745", "0.6362647", "0.6358366", "0.63252294", "0.6320696", "0.62988913", "0.62533677", "0.62336415", "0.619262", "0.619193", "0.6186905", "0.61780405", "0.6173272", "0.6172327", "0.61435384", "0.61403894", "0.61334354", "0.61324584", "0.61235607", "0.61190325", "0.61062515", "0.61005485", "0.60831815", "0.60541385", "0.605363", "0.60380363", "0.60308933", "0.6004963", "0.60020745", "0.6000712", "0.59961796", "0.5990361", "0.5986721", "0.5967771", "0.5950576", "0.59499013", "0.5939661", "0.5939052", "0.5938803", "0.5934141", "0.59191984", "0.5907346", "0.5906071", "0.5905469", "0.5866958", "0.5864471", "0.5857196", "0.5850018", "0.58400947", "0.5838516", "0.5821912", "0.5818579", "0.5813847", "0.57983106", "0.5796937", "0.57840574", "0.5779271", "0.5754291", "0.57507646", "0.5746926", "0.57442176", "0.57432485", "0.57431746", "0.57407534", "0.5740179", "0.57393175", "0.5728895", "0.5726272", "0.57196164", "0.5716163", "0.57153153", "0.5710817", "0.57097006", "0.5708994", "0.5706562", "0.5704123", "0.57028776", "0.5702484", "0.5699047", "0.5696219" ]
0.66595954
9
tests user looking at other user profile
public function testGetProfileOtherUserNoRel() { $url = "http://127.0.0.1/app_test.php/profile/view/steve-rogers"; $username = '[email protected]'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Steve Rogers', $response->body->data->user->name); $this->assertEquals(0, $response->body->data->relationships->isFriend); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProfileCheckIfUserExists()\n {\n\n }", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public function testGuestNotAccessProfilePage()\n\t{\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\t}", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function testManagerNotAccessProfileUser()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextPresent('You don\\'t have access to this section.');\n\t}", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "public function testProfileUnilogin()\n {\n\n }", "abstract protected function getUserProfile();", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function testProfileFind()\n {\n\n }", "public function testGetProfileOtherUserFriends()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bruce-banner\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bruce Banner', $response->body->data->user->name);\r\n $this->assertEquals(1, $response->body->data->relationships->isFriend);\r\n\r\n }", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testProfileFindOne()\n {\n\n }", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "public function testUserDetails() {\n\t\t// make new User and save it to the database\n\t\t$Role = Role::where('name', 'user')->first();\n\n\t\t// test home page 200 response code\n\t\t$this->visit('/home')\n\t\t\t->seePageIs('/home')\n\t\t\t->assertResponseOk();\n\n\t\t// check that User details are being displayed\n\t\t$this->visit('/home')->within('.body-content', function() use($Role) {\n\t\t\t$this->see($this->User->name)\n\t\t\t\t->see($this->User->email)\n\t\t\t\t->see(Language::trans('database.role-name-'.$Role->name));\n\t\t});\n\t}", "public function testQuarantineCheckIfProfileIsQuarantined()\n {\n\n }", "public function testProfileApp()\n {\n $client = static::createClient();\n $client->request('GET', '/candidate/profile');\n $this->assertEquals(301, $client->getResponse()->getStatusCode());\n\n //authenticated users are allowed\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile');\n $response = $client->getResponse();\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue(0 === strpos($response->getTargetUrl(), 'https'));\n\n //https and authentication loads page\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile', [], [], ['HTTPS' => true]);\n $this->assertTrue($crawler->filter('html:contains(\"Loading ...\")')->count() > 0);\n }", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "public function testUser1() {\n // Load the user 1 profile page.\n $this->drupalGet('/user/1');\n // Confirm the page title is correct.\n $this->assertRaw('<title>Access denied | ');\n $this->assertNoRaw('<title>admin | ');\n $this->assertNoRaw('<title>Site under maintenance | ');\n\n // Put the site into maintenance mode.\n \\Drupal::state()->set('system.maintenance_mode', TRUE);\n Cache::invalidateTags(['rendered']);\n\n // Load the user 1 profile page again.\n $this->drupalGet('/user/1');\n // Confirm the page title has changed.\n $this->assertNoRaw('<title>Access denied | ');\n $this->assertNoRaw('<title>admin | ');\n $this->assertRaw('<title>Site under maintenance | ');\n }", "public function testGetAccountProfileIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/profile')\n ->see('Account Privacy')\n ->see('SPONSORED')\n ->see('ADS')\n ->see('CALENDAR')\n ->see('Edit Profile Image')\n ->seePageIs('account/profile');\n }", "public function testProfileFindById()\n {\n\n }", "public function testGetOneUserInformation()\n {\n $response = $this->json('GET', $this->userEndpoint.'/prostoalex');\n\n // It should return a valid user json with all the basic attributes filled\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'created',\n 'id',\n 'karma',\n 'submitted',\n 'about',\n ])\n ->assertJsonFragment([\n 'id' => 'prostoalex'\n ]);\n }", "public function test_a_user_cannot_modify_another_users_account_information()\n {\n $userA = factory(User::class)->create();\n $userB = factory(User::class)->create();\n\n // When user A tries to view user B data\n Passport::actingAs($userA);\n $response = $this->json('GET', 'api/v1/users/' . $userB->id);\n\n // Then it is not successful\n $response->assertStatus(ResponseCode::HTTP_UNAUTHORIZED);\n $response->assertSee('Unauthorized Access');\n }", "public function getUserProfile();", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"[email protected]\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function test_logged_in_user_show_info()\n {\n $user=User::factory()->create();\n //behavior as this created user\n $response=$this->actingAs($user)->get(route('auth.user'));\n\n $response->assertStatus(Response::HTTP_OK);\n }", "public function testFillProfile() {\n $user = factory(\\App\\Models\\User::class)->make();\n\n // Register with factory credentials\n $this->browse(function ($browser) use ($user) {\n $browser->visit('/register')\n ->type('name', $user->name)\n ->type('email', $user->email)\n ->type('password', $user->password)\n ->type('password_confirmation', $user->password)\n ->press('Register')\n // Should be able to see My Profile after authentication\n ->assertSee('My Profile');\n\n // Go to profile\n $browser->clickLink('My Profile')\n ->assertSee('About Me');\n\n // Go to My Experience, open accordion\n $browser->clickLink('My Experience')\n ->assertSee('My Experience')\n ->press('Add Diploma/Degree')\n ->assertSee('New Diploma/Degree');\n\n // Add a diploma\n $browser->select('#degrees\\5b new\\5d \\5b 1\\5d degreeType', '4')\n ->type('#degrees\\5b new\\5d \\5b 1\\5d degreeArea', 'Test area of study')\n ->type('#degrees\\5b new\\5d \\5b 1\\5d degreeInstitution', 'Test institution');\n // TODO: Selectors for date picker\n //->click('#degrees\\5b new\\5d \\5b 1\\5d degreeStartDate')\n //->type('#degrees\\5b new\\5d \\5b 1\\5d degreeStartDate', ['2017'], ['{tab}'], ['0717']);\n //->type('#degrees\\5b new\\5d \\5b 1\\5d degreeEndDate', '2018', ['{tab}'], '08', ['{tab}'], '18');\n\n $browser->script('window.scrollTo(0, 1000);');\n\n // Saved work sample name should be visible\n $browser->assertSee('Save Diploma/Degree')\n ->pause(777) // Fails without a short pause\n ->press('Save Diploma/Degree')\n ->assertSee('Phd, Test area of study');\n\n // TODO: Repeat for certification / equivalent experience\n //$browser->press('Add Course/Certification')\n // ->assertSee('New Course/Certification');\n\n // Go to My Skills page\n $browser->clickLink('My Skills')\n ->assertSee('My Skills')\n ->press('Add Skill')\n ->assertSee('New Skill');\n\n // Add a soft skill\n $browser->select('#skill_declarations\\5b new\\5d \\5b soft\\5d \\5b 1\\5d skillSelection', '24') // Select dropdown by value\n ->keys('#skill_declarations\\5b new\\5d \\5b soft\\5d \\5b 1\\5d skillSelection',\n ['{tab}'], ['{tab}'], ['{arrow_right}']) // Keyboard controls were necessary to select skill level properly\n ->type('#skill_declarations\\5b new\\5d \\5b soft\\5d \\5b 1\\5d skillDescription', 'Test skill description');\n\n $browser->script('window.scrollTo(0, 1000);');\n\n // Text corresponding to skill selection value should be visible\n $browser->assertSee('Save Skill')\n ->pause(777)\n ->press('Save Skill')\n ->assertSee('Passion');\n\n // TODO: Repeat for hard skill\n\n // Go to My References, open accordion\n $browser->clickLink('My References')\n ->assertSee('My References')\n ->press('Add Reference')\n ->assertSee('New Reference');\n\n // Add a reference\n $browser->type('#references\\5b new\\5d \\5b 1\\5d referenceName', 'Test Reference')\n ->select('#references\\5b new\\5d \\5b 1\\5d referenceRelationship') // Selects random if not specified\n ->type('#references\\5b new\\5d \\5b 1\\5d referenceEmail', '[email protected]')\n ->type('#references\\5b new\\5d \\5b 1\\5d referenceDescription', 'Test reference description');\n\n // Scroll down (button click will fail if not visible on test browser screen)\n $browser->script('window.scrollTo(0, 1000);');\n\n // Saved work sample name should be visible\n $browser->assertSee('Save Reference')\n ->pause(777) // Fails without a short pause\n ->press('Save Reference')\n ->assertSee('Test Reference');\n\n // Go to My Work Samples, open accordion\n $browser->clickLink('My Work Samples')\n ->assertSee('My Work Samples')\n ->press('Add Sample')\n ->assertSee('New Work Sample');\n\n // Add work sample data, wouln't work without copying the full selector\n $browser->type('#work_samples\\5b new\\5d \\5b 1\\5d sampleName', 'Test Sample')\n ->select('#work_samples\\5b new\\5d \\5b 1\\5d sampleType') // Selects random if not specified\n ->type('#work_samples\\5b new\\5d \\5b 1\\5d sampleLink', 'http://talent.canada.ca')\n ->type('#work_samples\\5b new\\5d \\5b 1\\5d sampleDescription', 'Test sample description');\n\n $browser->script('window.scrollTo(0, 1000);');\n\n // Saved work sample name should be visible\n $browser->assertSee('Save Sample')\n ->pause(777) // Fails without a short pause\n ->press('Save Sample')\n ->assertSee('Test Sample');\n\n });\n }", "public function test_user_edit_other_details_of_another_user() {\n\n $this->actingAs(factory(\\App\\User::class)->create())\n ->post('/bills/' . $this->bill->id . '/edit-other-details', ['other_details' => 'other details'])\n ->seeJson([\n 'success' => false,\n 'message' => trans('bill.bill_not_found')\n ])\n ->seeInDatabase('bills', [\n 'id' => $this->bill->id,\n 'user_id' => $this->user->id,\n 'other_details' => $this->bill->other_details\n ]);\n }", "public function testGetAccountProfileOut()\n {\n // Grab Page\n $result = $this->visit('account/profile')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testGetValidProfileByProfileName() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get Profile form database using profile name\n\t\t$results = Profile::getProfileByProfileName($this->getPDO(), $this->VALID_PROFILE_NAME);\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\n\t\t// make sure no other objects are contaminating the profile\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\FoodTruckFinder\\\\Profile\", $results);\n\n\t\t// make sure results are same as expected\n\t\t$pdoProfile = $results[0];\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "public function testUserMeGet()\n {\n }", "public function testProfileIndexFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(new BlokkrUser());\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "public function testSaveProfileWrongUser() {\n\t\tCakeSession::write('Auth.User.id', 2);\n\t\t$this->Model->saveProfile(array(\n\t\t\t'User' => array(\n\t\t\t\t'id' => 1\n\t\t\t)\n\t\t));\n\t}", "public function testVisitUserAccountProfilePageRedirectsToLogin()\n {\n $response = $this->call('GET', $this->accountProfilePageUrl);\n $response->assertRedirect('login');\n }", "public function testProfilePrototypeLinkCommunityRoles()\n {\n\n }", "public function index(){\n $this->existing_profile=$this->profile_model->read_highest_rank_profiles(1);\n \n //Fetch this profile with the api and ensure it matches\n $test_name=\"Checking API can be used to fetch the top profile\";\n $test1=$this->checkingApiCanFetchAProfile($this->existing_profile[0]['user_id']);\n $expected_result=TRUE;\n echo $this->unit->run($test1,$expected_result,$test_name,$notes=\"Assumes atleast 1 account is created\");\n\n //Fetch the same profile by searching for it using its first_name\n $test_name=\"Checking API can be used to fetch same profile using search\";\n $test2=$this->checkingApiCanFetchProfileUsingSearch($this->existing_profile[0]['first_name']);\n $expected_result=TRUE;\n echo $this->unit->run($test2,$expected_result,$test_name,$notes=\"Assumes first result found has identical first name\");\n \n }", "public function _assertProfileExists($profile_uid)\n {\n }", "public function testInfoUser()\n {\n }", "public function testGetSuperUserStatus()\n {\n $superStatus = $this->la->getUserSuperUserStatus('poa32kc');\n $this->assertTrue($superStatus);\n }", "public function testExample()\n {\n $user = User::count();\n $profile = Profile:: count();\n $this->assertEquals($user,$profile);\n }", "public function testProfilePrototypeFindByIdCommunityRoles()\n {\n\n }", "public function testProfilePrototypeExistsCommunityRoles()\n {\n\n }", "public function InitOtherUser()\n {\n $login = trim( strip_tags( _v('login', '') ) );\n //if link has login\n if ($login)\n {\n if ($this->IsAuth() && $login==$this->mUserInfo['Name'])\n {\n //show current user profile\n $this->mOtherUserId = 0;\n return false; \n }\n else\n {\n $this->mOtherUserInfo = UserQuery::create()\n ->Select(array('Id', 'Email', 'Status', 'Pass', 'LastReload', 'FirstName', 'LastName', 'Name', 'Blocked', 'BlockReason', 'Country',\n 'Avatar', 'Location', 'HideLoc', 'About', 'BandName', 'Likes', 'Dob', 'Gender', 'YearsActive', 'Genres', 'Members', 'Website', 'Bio', 'RecordLabel', 'RecordLabelLink', 'UserPhone', 'State', 'HashTag', 'FbOn', 'TwOn', 'InOn'))\n ->where('LOWER(Name) = \"' . ToLower( $login ) . '\"')\n\t\t\t\t\t->filterByEmailConfirmed(1)\n\t\t\t\t\t->filterByBlocked(0)\n ->filterByStatus(1, '>=')->findOne();\n\n if (!empty($this->mOtherUserInfo)) \n {\n $this->mOtherUserId = $this->mOtherUserInfo['Id'];\n\n\t\t\t\t\t$genres_list = User::GetGenresList();\n\t\t\t\t\t\n\t\t\t\t\t$genresListArr = explode(',',$this->mOtherUserInfo['Genres']);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tforeach($genresListArr as $key=> $val)\n\t\t\t\t\t{\n\t\t\t\t\t\t$userGenres .= $genres_list[$val].'/';\n\t\t\t\t\t}\n\t\t\t\t\t$this->mOtherUserInfo['GenresList'] = trim($userGenres, '/');\t\n\n\t\t\t\t//Fellow count\n\t\t\t\t$this->mOtherUserInfo['FollowersCount'] = UserFollow::GetFollowersUserListCount($this->mOtherUserInfo['Id'], USER_FAN);\n\t\t\t\t\n\t\t\t\t$memTrack = unserialize($this->mOtherUserInfo['Members']);\t\t\t\n\t\t\t\t$this->mOtherUserInfo['Members'] = $memTrack[0];\n\t\t\t\t$this->mOtherUserInfo['Tracks'] = $memTrack[1];\n\n\t\t\t\t\t\t\t\t\t\t\n } else {\n\t\t\t\t\t$this->mOtherUserId = -1;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n return true;\n }\n }\n }", "public function test_user_edit_its_profile()\n {\n $user = factory(User::class)->create();\n\n $newProfession = factory(Profession::class)->create();\n\n //$this->actingAs($user);\n\n $response = $this->get('/perfil/');\n $response->assertStatus(200);\n\n $response = $this->put('/perfil/', [\n \t'first_name' => 'Dayan',\n 'last_name' => 'Betancourt',\n\t 'email' => '[email protected]',\n\t 'profession_id' => $newProfession->id,\n\t 'bio' => 'Programador de Laravel',\n\t 'twitter' => 'https://twitter.com/delfinbeta',\n ]);\n\n $response->assertRedirect();\n\n $this->assertDatabaseHas('users', [\n 'first_name' => 'Dayan',\n 'last_name' => 'Betancourt',\n\t 'email' => '[email protected]'\n ]);\n\n $this->assertDatabaseHas('user_profiles', [\n 'profession_id' => $newProfession->id,\n 'bio' => 'Programador de Laravel',\n\t 'twitter' => 'https://twitter.com/delfinbeta',\n ]);\n }", "public function testGetProfilebyProfileEmail() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get the Profile from database by profile email\n\t\t$pdoProfile = Profile::getProfileByProfileEmail($this->getPDO(), $profile->getProfileEmail());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "public function testGetProfileUserNotExist()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/thor\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n //AppBundle:User object not found. (404 Not Found)\r\n $this->assertTrue($response->code === 404);\r\n\r\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes Drupal perfect. You should have no complaints.'\nPROFILE_TEST;\n\n vfsStream::setup('profiles');\n vfsStream::create([\n 'fixtures' => [\n 'invalid_profile.info.txt' => $profile,\n ],\n ]);\n $info = $this->infoParser->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));\n $this->assertFalse($info['core_incompatible']);\n }", "function testGetUserBySession() {\n $this->assertFalse(Sessions::getUserBySession());\n }", "public function testGetSiteMembershipForPerson()\n {\n }", "public function testGetInvalidProfileByProfileEmail() : void {\n\t\t// get an email that doesn't exist\n\t\t$profile = Profile::getProfileByProfileEmail($this->getPDO(), \"[email protected]\");\n\t\t$this->assertNull($profile);\n\t}", "public function testProfileCreate()\n {\n\n }", "public function testShowUser()\n {\n \t$user = factory(User::class)->create()''\n \t$response = $this->actingAs($user)->withSession(['Foo' => 'bar'])->get('/memes');\n \t$response->assertStatus(200);\n \n }", "public function testProfileTitle()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see(trans('profile.title', ['username'=>'johndoe']));\n }", "public function testShowUser()\n {\n $user = User::find(1);\n $this->browse(function (Browser $browser) use ($user) {\n $browser->visit('/users/' . $user->id)\n ->assertSee($user->id)\n ->assertSee($user->full_name)\n ->assertSee($user->email);\n });\n }", "public function testItReturnsAUserByUserId()\n {\n $user1 = factory(User::class)->create([\n \"tenant_id\" => $this->user->tenant->id,\n ]);\n \n $this->actingAs($this->user)\n ->getJson(\"api/v1/users/{$user1->id}\")\n ->assertStatus(200)\n ->assertJson([\n \"id\" => $user1->id,\n \"firstname\" => $user1->firstname,\n ]);\n }", "public function testItReturnsUsers()\n {\n $this->user->update([\"firstname\" => \"anthony\"]);\n $user1 = factory(User::class)->create([\n \"firstname\" => \"james\",\n \"tenant_id\" => $this->user->tenant_id,\n ]);\n $tenant2 = factory(Tenant::class)->create();\n $user2 = factory(User::class)->create([\n \"firstname\" => \"benjamin\",\n \"tenant_id\" => $tenant2->id,\n ]);\n\n $this->actingAs($this->user)\n ->getJson(\"api/v1/users\")\n ->assertOk()\n ->assertJson([\n \"data\" => [\n $this->user->only([\"id\", \"firstname\"]),\n $user2->only([\"id\", \"firstname\"]),\n $user1->only([\"id\", \"firstname\"]),\n ],\n ]);\n }", "public function testListSiteMembershipsForPerson()\n {\n }", "public function testGetInvalidProfileByProfileName() : void {\n\t\t// get a profile name that doesn't exist\n\t\t$profile = Profile::getProfileByProfileName($this->getPDO(), \"Invalid Profile Name\");\n\t\t$this->assertCount(0, $profile);\n\t}", "public function testGetSecondVerifier()\n {\n $secondVerifier = $this->em->getRepository('UserBundle:User')->find(6);\n //Get the polling Station in order to compare its frist & second verifier to the above ones\n $pollingStation = $this->em->getRepository('VtallyBundle:PollingStation')->find(1);\n $_secondVerifier = $pollingStation->getSecondVerifier();\n //$this->assertEquals($secondVerifier, $pollingStation->getSecondVerifier());\n $this->assertEquals($_secondVerifier->getFirstName(), 'VERIFIER 2');\n }", "public function profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}", "public function testGetProfileWPNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/natasha-romanov\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Natasha Romanov', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testRedirect()\n {\n //$member = $this->objFromFixture(Member::class, \"joebloggs\");\n //$this->logInAs($member);\n $this->markTestIncomplete('Test user config CMS fields');\n }", "public function FirstTimeProfileCheck(){\n\t\t\t\t$checkheader=$this->db->prepare(\"SELECT verified_status FROM users WHERE id=:id AND status=1 AND verified_status=2\");\n\t\t\t\t$user_id=isset($_SESSION['user_id']) ? $_SESSION['user_id'] : 0;\n\t\t\t\t$checkheader->execute(array(\"id\"=>$user_id));\n\t\t\t\t$rowchk=$checkheader->fetch(PDO::FETCH_ASSOC);\n\n\t\t\t\tif(!empty($rowchk)){\n\t\t\t\t\tif($_SESSION['user_type']=='broker'){\n\t\t\t\t\t\tif(strpos($_SERVER['REQUEST_URI'], \"/app/broker/profile\")!=false){\n\t\t\t\t\t\t\theader(\"Location:\".SITEURL.\"app/broker/add-load\");\n\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t\t}elseif($_SESSION['user_type']=='shipper'){\n\t\t\t\t\t\tif(strpos($_SERVER['REQUEST_URI'], \"/app/shipper/profile\")!=false){\n\t\t\t\t\t\t\theader(\"Location:\".SITEURL.\"app/shipper/add-load\");\n\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t\t}elseif($_SESSION['user_type']=='trucker'){\n\t\t\t\t\t\tif(strpos($_SERVER['REQUEST_URI'], \"/app/trucker/profile\")!=false){\n\t\t\t\t\t\t\theader(\"Location:\".SITEURL.\"app/trucker/search-loads\");\n\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($_SESSION['user_type']=='broker'){\n\t\t\t\t\t\tif(strpos($_SERVER['REQUEST_URI'], \"/app/broker/profile\")==false){\n\t\t\t\t\t\t\theader(\"Location:\".SITEURL.\"app/broker/profile\");\n\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t }elseif($_SESSION['user_type']=='shipper'){\n\t\t\t\t\t\tif(strpos($_SERVER['REQUEST_URI'], \"/app/shipper/profile\")==false){\n\t\t\t\t\t\t\theader(\"Location:\".SITEURL.\"app/shipper/profile\");\n\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t }elseif($_SESSION['user_type']=='trucker'){\n\t\t\t\t \tif(strpos($_SERVER['REQUEST_URI'], \"/app/trucker/profile\")==false){\n\t\t\t\t\t\t\theader(\"Location:\".SITEURL.\"app/trucker/profile\");\n\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t}\n\t\t\t\t } \n\t\t\t}\n\n\t\t}", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/user/profile')\n ->assertSee('Profile');\n \n });\n }", "public function testProfilePrototypeGetCommunityRoles()\n {\n\n }", "public function testGetCustomerProfile()\n {\n self::testCreateCustomerProfile();\n\n $response = $this->gateway->getCustomerProfile($this->customerProfileId);\n\n $this->assertTrue($response->isSuccess());\n }", "function testProfileTitle() {\n $this->drupalGet(Url::fromRoute('entity.linkit_profile.edit_form', [\n 'linkit_profile' => $this->linkitProfile->id(),\n ]));\n\n $this->assertText('Edit ' . $this->linkitProfile->label() . ' profile');\n }", "public function testGetUser()\n {\n $user = factory(User::class)->create();\n $userRepo = new UserRepository(new User);\n $found = $userRepo->get($user->id);\n\n $this->assertInstanceOf(User::class, $found);\n foreach ($this->data as $key => $value) {\n \t$this->assertEquals($found->$key, $user->$key);\n }\n }", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function testProfileUpdateAll()\n {\n\n }", "public function testProfilePrototypeFindByIdLikes()\n {\n\n }", "public function testGetNetworkMerakiAuthUser()\n {\n }", "public function testGetSingleUserPage()\n\t{\n\t\t$this->be($this->user);\n\n\t\t$response = $this->call('orchestra::users@view', array(1));\n\t\t\n\t\t$this->assertInstanceOf('Laravel\\Response', $response);\n\t\t$this->assertEquals(200, $response->foundation->getStatusCode());\n\t\t$this->assertEquals('orchestra::users.edit', $response->content->view);\n\t}", "public function testGetSiteMembershipRequestForPerson()\n {\n }", "public function testProfileCount()\n {\n\n }", "public function OtherUser(User $user)\n {\n if($user->auth_id == 2)\n {\n return true;\n }\n return false;\n }", "public function hasUser();", "public function testProfilePrototypeFindByIdAccessTokens()\n {\n\n }", "public function testAuth()\n {\n $user = factory(User::class)->create();\n $this->browse(function ($first, $second, $third) use ($user) {\n // prompted to log in\n $first->visit(new AdminPage)\n ->assertRouteIs('login');\n\n // successfully login\n $second->loginAs($user)\n ->visit(new AdminPage)\n ->assertRouteIs('admin')\n ->assertSee('Dashboard')\n ->assertSee($user->name);\n\n // successfully logout\n $third->loginAs($user)\n ->visit(new AdminPage)\n ->click('@profile-toggle')\n ->click('@logout-link')\n ->assertRouteIs('login');\n });\n }", "public function testCannotEditOtherUser()\n {\n $faker = \\Faker\\Factory::create();\n $user = factory(User::class)->create();\n $user->activate();\n $other = factory(User::class)->create();\n $other->activate();\n $newName = $faker->name;\n Auth::login($other);\n \n $this->put('/api/v1/user/'.$user->id, ['name' => $newName], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertStatus(403);\n $this->assertDatabaseHas('users', [\n 'name' => $user->name,\n 'email' => $user->email\n ]);\n }", "public function testGetAccountFriendsUsersIn($auth)\n {\n // Set query param\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/friends/users?query=a')\n ->see('success\":true,')\n ->see('error\":null,')\n ->seePageIs('/account/friends/users?query=a');\n }", "public function testMeetupWillBeListedForPermittedUsers()\n {\n $data = array(\n 'permission' => 'custom',\n 'permittedUsers' => array('5003e8bc757df2020d000000'),\n );\n list($responseCode, $responseBody) = sendPutRequest($this->endpoint .'/5003e8bc757df2020d0f0033', $data, $this->user1Headers);\n\n list($responseCode, $responseBody2) = sendGetRequest($this->endpoint, array(), $this->user2Headers);\n $retrievedForUser2 = json_decode($responseBody2);\n\n list($responseCode, $responseBody3) = sendGetRequest($this->endpoint, array(), $this->user3Headers);\n $retrievedForUser3 = json_decode($responseBody3);\n\n $this->assertSame(2, count($retrievedForUser2));\n $this->assertSame(3, count($retrievedForUser3));\n }", "public function testExample()\n {\n\n $finduser = Profile::find(3);\n $finduser->fname ='Silmon';\n $finduser->save();\n $this->assertEquals('Silmon', $finduser->fname);\n }", "public function profile()\n {\n\n // lets check if we can access this method\n\n if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') {\n\n // get mentee\n $mentee_id = $this->user['is_matched'];\n $mentee['profile']['user'] = $this->Application_model->get(array('table' => 'users', 'id' => $mentee_id));\n $mentee['profile']['answers'] = $this->_extract_data(\n $this->Matcher_model->get(array('table' => 'users_answers', 'user_id' => $mentee_id))\n );\n\n $this->data['page'] = 'profile';\n $this->data['user'] = $this->user;\n $this->data['mentee'] = $mentee;\n\n $this->load->view('/chooser/header', $this->data);\n $this->load->view('/chooser/profile', $this->data);\n $this->load->view('/chooser/footer', $this->data);\n\n }else{\n\n redirect('/dashboard');\n\n }\n\n }", "public function testProfileInvalid()\n {\n $email = new Notification();\n $email->profile('derp');\n }", "public function cestMixedUsers(\\FunctionalTester $I)\n {\n /**\n * @todo IMPLEMENT THIS\n *\n */\n\n $I->amOnPage([\n 'base/api',\n 'users' => [\n 'hhhhh',\n 'kfr'\n ],\n 'platforms' => [\n 'github',\n ]\n ]);\n\n $expected = json_decode('[\n {\n \"name\": \"kfr\",\n \"platform\": \"github\",\n \"total-rating\": 1.5,\n \"repos\": [],\n \"repo\": [\n {\n \"name\": \"kf-cli\",\n \"fork-count\": 0,\n \"start-count\": 2,\n \"watcher-count\": 2,\n \"rating\": 1\n },\n {\n \"name\": \"cards\",\n \"fork-count\": 0,\n \"start-count\": 0,\n \"watcher-count\": 0,\n \"rating\": 0\n },\n {\n \"name\": \"UdaciCards\",\n \"fork-count\": 0,\n \"start-count\": 0,\n \"watcher-count\": 0,\n \"rating\": 0\n },\n {\n \"name\": \"unikgen\",\n \"fork-count\": 0,\n \"start-count\": 1,\n \"watcher-count\": 1,\n \"rating\": 0.5\n }\n ]\n }\n ]');\n $I->assertEquals($expected, json_decode($I->grabPageSource()));\n $I->seeResponseCodeIs(200);\n\n\n }", "public function testSuperAdminCanImpersonateUser(): void\n {\n $username = $this->fixtures->getReference('super_admin')->getUsername();\n $this->formLogIn($username);\n\n $crawler = $this->client->request('GET', \"/admin/sonata/user/user/list\");\n $this->assertSame(\n Response::HTTP_OK,\n $this->client->getResponse()->getStatusCode()\n );\n $this->assertSame(\n 5,\n $crawler->filter('a[title=\"Impersonate User\"]')->count()\n );\n }", "public function testGetNetworkMerakiAuthUsers()\n {\n }", "public function test_users_edit_authenticated_leader_shows_correct_view(){\n $this->signInLeader();\n $response = $this->get(route('users.edit', ['user'=> 5]));\n $response->assertStatus(200);\n $response->assertViewIs('views.users.edit');\n }", "public function loginUserConditionMatchesSingleLoggedInUser() {}", "public function loginUserConditionMatchesSingleLoggedInUser() {}" ]
[ "0.75405914", "0.739358", "0.7171159", "0.708067", "0.7020314", "0.70177287", "0.6988417", "0.6980894", "0.6915305", "0.6895644", "0.6859885", "0.68140304", "0.6791535", "0.6789883", "0.6779884", "0.67381316", "0.6722318", "0.6647381", "0.66335344", "0.65784836", "0.651658", "0.6506723", "0.6484439", "0.646089", "0.64475137", "0.6423198", "0.6392898", "0.63588136", "0.6319506", "0.62940073", "0.6292876", "0.6287039", "0.6286621", "0.6273952", "0.6249691", "0.6247287", "0.624309", "0.621283", "0.62041944", "0.61959136", "0.61900914", "0.6161311", "0.6156426", "0.6150469", "0.6145763", "0.61377054", "0.61363804", "0.61301136", "0.61254764", "0.612485", "0.6100222", "0.60834223", "0.60809696", "0.6050075", "0.60445935", "0.6036487", "0.60310847", "0.6024449", "0.6023961", "0.60162216", "0.6015949", "0.6008572", "0.60085094", "0.6007638", "0.59625226", "0.59610987", "0.592638", "0.5917184", "0.59169847", "0.58968717", "0.58955115", "0.5883473", "0.5881364", "0.58802384", "0.5865542", "0.5849048", "0.5845889", "0.5840019", "0.58361256", "0.58312535", "0.58305585", "0.58267033", "0.58243227", "0.5816962", "0.5815176", "0.5814053", "0.58108395", "0.58039665", "0.5793725", "0.5793021", "0.5791204", "0.5790052", "0.57879806", "0.57868814", "0.57861066", "0.5784603", "0.5765063", "0.57621133", "0.5759506", "0.57591826" ]
0.6904997
9
tests getting friend's profile
public function testGetProfileOtherUserFriends() { $url = "http://127.0.0.1/app_test.php/profile/view/bruce-banner"; $username = '[email protected]'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Bruce Banner', $response->body->data->user->name); $this->assertEquals(1, $response->body->data->relationships->isFriend); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"[email protected]\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "abstract protected function getUserProfile();", "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/steve-rogers\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Steve Rogers', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function getUserProfile();", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testProfileFind()\n {\n\n }", "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "public function _assertProfileExists($profile_uid)\n {\n }", "public function twitter_user_profile() {\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n $TwitterHelper = new TwitterHelperFunction();\n $properties = ['token_access'];\n $response_token = \\Drupal::service('social_media.social_media_controller')->getKabbodeNetworkStatusProperty(174, $current_uid, $properties);\n $connection = new TwitterOAuth($TwitterHelper->getTwitterApiKey(), $TwitterHelper->getTwitterSecretKey(), $response_token['token_access']->oauth_token, $response_token['token_access']->oauth_token_secret);\n $verify_account = $connection->get('account/verify_credentials');\n return $verify_account;\n }", "public function getProfile()\n {\n return $this->request('me');\n }", "public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes Drupal perfect. You should have no complaints.'\nPROFILE_TEST;\n\n vfsStream::setup('profiles');\n vfsStream::create([\n 'fixtures' => [\n 'invalid_profile.info.txt' => $profile,\n ],\n ]);\n $info = $this->infoParser->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));\n $this->assertFalse($info['core_incompatible']);\n }", "public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }", "function getProfile(){\n\t\t\t\t$this->__dataDecode();\n\t\t\t\t$data=$this->data;\n\t\t\t\t$playerId = $data['User']['playerId'];\n\t\t\t\t$token = $data['User']['secToken'];\n\t\t\t\t//pr($token);die('ok');\n\t\t\t\t$playerdetails = $this->User->find('first', array('conditions' => array('User.id' => $playerId,'User.secToken' => $token)));\n\t\t\t\t\t\t//pr($playerdetails);die;\t\n\t\t\t\t\t\tif($playerdetails)\n\t\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t$response['error']\t\t\t= 0;\n\t\t\t\t\t\t$response['response']['firstName'] \t= $playerdetails['User']['firstname'];\n\t\t\t\t\t\t$response['response']['wieght'] \t= $playerdetails['User']['wieght'];\n\t\t\t\t\t\t$response['response']['school'] \t= $playerdetails['User']['school'];\n\t\t\t\t\t\t$response['response']['profilePicture'] = LIVE_SITE.'/img/upload_userImages/'.$playerdetails['User']['image'];\n\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\tdie();\n\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'UnAuthorized User';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\n}\n}", "public function testProfileFindOne()\n {\n\n }", "function requestProfile() {\n $username = $_GET['username'];\n\n $response = retrieveProfile($username);\n\n if ($response['status'] == 'SUCCESS') {\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }", "public function testGetProfileWPNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/natasha-romanov\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Natasha Romanov', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }", "public function testGetValidProfileByProfileName() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get Profile form database using profile name\n\t\t$results = Profile::getProfileByProfileName($this->getPDO(), $this->VALID_PROFILE_NAME);\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\n\t\t// make sure no other objects are contaminating the profile\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\FoodTruckFinder\\\\Profile\", $results);\n\n\t\t// make sure results are same as expected\n\t\t$pdoProfile = $results[0];\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "public function testGetProfilebyProfileEmail() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get the Profile from database by profile email\n\t\t$pdoProfile = Profile::getProfileByProfileEmail($this->getPDO(), $profile->getProfileEmail());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "public function testProfileApp()\n {\n $client = static::createClient();\n $client->request('GET', '/candidate/profile');\n $this->assertEquals(301, $client->getResponse()->getStatusCode());\n\n //authenticated users are allowed\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile');\n $response = $client->getResponse();\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue(0 === strpos($response->getTargetUrl(), 'https'));\n\n //https and authentication loads page\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile', [], [], ['HTTPS' => true]);\n $this->assertTrue($crawler->filter('html:contains(\"Loading ...\")')->count() > 0);\n }", "protected function readUserProfile()\n {\n if (isset($_GET['code'])) {\n $params = array(\n 'client_id' => $this->clientId,\n 'client_secret' => $this->clientSecret,\n 'redirect_uri' => $this->redirectUri,\n 'grant_type' => 'authorization_code',\n 'code' => $_GET['code']\n );\n\n $tokenInfo = $this->post('https://accounts.google.com/o/oauth2/token', $params);\n\n if (isset($tokenInfo['access_token']) && isset($tokenInfo['id_token']))\n {\n $params = array('id_token' => $tokenInfo['id_token']);\n $validateToken = $this->get('https://www.googleapis.com/oauth2/v1/tokeninfo', $params);\n\n if (!isset($validateToken['email'])) {\n return false;\n }\n\n $params = array('access_token' => $tokenInfo['access_token']);\n $userInfo = $this->get('https://www.googleapis.com/plus/v1/people/me', $params);\n\n if (isset($userInfo['kind']) && $userInfo['kind'] == 'plus#person')\n {\n $this->parseUserData($userInfo);\n\n $this->userInfo['email'] = $validateToken['email'];\n\n if (isset($this->response['birthday']))\n {\n $birthDate = explode('-', $this->response['birthday']);\n $this->userInfo['birthDay'] = isset($birthDate[2]) ? $birthDate[2] : null;\n $this->userInfo['birthMonth'] = isset($birthDate[1]) ? $birthDate[1] : null;\n $this->userInfo['birthYear'] = isset($birthDate[0]) ? $birthDate[0] : null;\n }\n\n return true;\n }\n }\n }\n\n return false;\n }", "public function testGetCustomerProfile()\n {\n self::testCreateCustomerProfile();\n\n $response = $this->gateway->getCustomerProfile($this->customerProfileId);\n\n $this->assertTrue($response->isSuccess());\n }", "public function testProfileInvalid()\n {\n $email = new Notification();\n $email->profile('derp');\n }", "public function getProfileAction()\n\t{\n\t\t// Find own profile by authorisation token\n\t\tif ($this->request->hasPost('token')) {\n\t\t\tif ($auth = AuthTokens::findFirstByToken($this->request->getPost('token'))) {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'message' => '',\n\t\t\t\t\t'user' => [\n\t\t\t\t\t\t'firstname' => $auth->users->userFirstname,\n\t\t\t\t\t\t'lastname' => $auth->users->userLastname,\n\t\t\t\t\t\t'prefix' => $auth->users->userPrefix,\n\t\t\t\t\t\t'phone' => $auth->users->userPhone,\n\t\t\t\t\t\t'email' => $auth->users->userEmail,\n\t\t\t\t\t\t'points' => $auth->users->userPoints,\n\t\t\t\t\t]\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn $this->reply->withFail(Response::ERROR_INVALID_AUTH);\n\t\t\t}\n\n\t\t// Find another profile by user id\n\t\t} else if (\n\t\t\t$this->request->hasPost('id') &&\n\t\t\tis_numeric($this->request->getPost('id'))\n\t\t) {\n\t\t\tif ($user = Users::findFirst($this->request->getPost('id'))) {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'message' => '',\n\t\t\t\t\t'user' => [\n\t\t\t\t\t\t'firstname' => $user->userFirstname,\n\t\t\t\t\t\t'lastname' => $user->userLastname,\n\t\t\t\t\t\t'prefix' => $user->userPrefix,\n\t\t\t\t\t\t'points' => $user->userPoints,\n\t\t\t\t\t]\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => false,\n\t\t\t\t\t'message' => 'Invalid user id.'\n\t\t\t\t]);\n\t\t\t}\n\n\t\t// Invalid parameters\n\t\t} else {\n\t\t\treturn $this->reply->withFail(Response::ERROR_INVALID_PARAMS);\n\t\t}\n\t}", "function getUserProfile()\n\t{\n\t\t// refresh tokens if needed \n\t\t$this->refreshToken();\n\n\t\ttry{\n\t\t\t$authTest = $this->api->api( \"auth.test\" );\n\t\t\t$response = $this->api->get( \"users.info\", array( \"user\" => $authTest->user_id ) );\n\t\t}\n\t\tcatch( SlackException $e ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->user->id ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\t\t# store the user profile. \n\t\t$this->user->profile->identifier\t\t=\t@$response->user->id;\n\t\t$this->user->profile->profileURL\t\t=\t\"\";\n\t\t$this->user->profile->webSiteURL\t\t=\t\"\";\n\t\t$this->user->profile->photoURL\t\t\t=\t@$response->user->profile->image_original;\n\t\t$this->user->profile->displayName\t\t=\t@$response->user->profile->real_name;\n\t\t$this->user->profile->description\t\t=\t\"\";\n\t\t$this->user->profile->firstName\t\t\t=\t@$response->user->profile->first_name;\n\t\t$this->user->profile->lastName\t\t\t=\t@$response->user->profile->last_name;\n\t\t$this->user->profile->gender\t\t\t=\t\"\";\n\t\t$this->user->profile->language\t\t\t=\t\"\";\n\t\t$this->user->profile->age\t\t\t\t=\t\"\";\n\t\t$this->user->profile->birthDay\t\t\t=\t\"\";\n\t\t$this->user->profile->birthMonth\t\t=\t\"\";\n\t\t$this->user->profile->birthYear\t\t\t=\t\"\";\n\t\t$this->user->profile->email\t\t\t\t=\t@$response->user->profile->email;\n\t\t$this->user->profile->emailVerified\t =\t\"\";\n\t\t$this->user->profile->phone\t\t\t\t=\t\"\";\n\t\t$this->user->profile->address\t\t\t=\t\"\";\n\t\t$this->user->profile->country\t\t\t=\t\"\";\n\t\t$this->user->profile->region\t\t\t=\t\"\";\n\t\t$this->user->profile->city\t\t\t\t=\t\"\";\n\t\t$this->user->profile->zip\t\t\t\t=\t\"\";\n\n\t\treturn $this->user->profile;\n\t}", "public function testProfileIndexFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(new BlokkrUser());\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "public function testGetInvalidProfileByProfileEmail() : void {\n\t\t// get an email that doesn't exist\n\t\t$profile = Profile::getProfileByProfileEmail($this->getPDO(), \"[email protected]\");\n\t\t$this->assertNull($profile);\n\t}", "public function testRequestOrgProfile() {\n\t\t$node = $this->mockLocalNodeInterface();\n\t\t$this->stdLocalNodeInterfaceUri($node);\n\t\t$orgprofile = $this->mockOrgProfileServiceInterface();\n\t\t\n\t\t$orgprofile->expects($this->once())\n\t\t\t->method('getProfile')\n\t\t\t->willReturn(new OrgProfile('org', 'http://site', ['tag1','tag2']));\n\t\t$service = new CciOrgProfileService($orgprofile, $node);\n\t\t\n\t\t$response = $service->run(['orgprofile'], []);\n\t\t$check = MessageDecoder::jsonServiceText($response);\n\t\t$this->assertObjectHasAttribute('alpha.venus.uk', $check);\n\t\t\n\t\t$profile = MessageDecoder::jsonServiceTextStripNode($response);\n\t\t\n\t\t$this->assertEquals('org', $profile->name);\n\t\t$this->assertEquals('http://site', $profile->website);\n\t\t$this->assertEquals(['tag1','tag2'], $profile->tags);\n\t}", "function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }", "public function testProfilePrototypeGetLikes()\n {\n\n }", "public function testProfileFindById()\n {\n\n }", "public function testDestiny2GetLinkedProfiles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function pullRemoteProfile()\n {\n $this->profile_uri = $this->trimmed('profile');\n try {\n if (Validate::email($this->profile_uri)) {\n $this->oprofile = Ostatus_profile::ensureWebfinger($this->profile_uri);\n } else if (Validate::uri($this->profile_uri)) {\n $this->oprofile = Ostatus_profile::ensureProfileURL($this->profile_uri);\n } else {\n // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com\n // TRANS: and example.net, as these are official standard domain names for use in examples.\n $this->error = _m(\"Sorry, we could not reach that address. Please make sure that the OStatus address is like [email protected] or http://example.net/nickname.\");\n common_debug('Invalid address format.', __FILE__);\n return false;\n }\n return true;\n } catch (FeedSubBadURLException $e) {\n // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com\n // TRANS: and example.net, as these are official standard domain names for use in examples.\n $this->error = _m('Sorry, we could not reach that address. Please make sure that the OStatus address is like [email protected] or http://example.net/nickname.');\n common_debug('Invalid URL or could not reach server.', __FILE__);\n } catch (FeedSubBadResponseException $e) {\n // TRANS: Error text.\n $this->error = _m('Sorry, we could not reach that feed. Please try that OStatus address again later.');\n common_debug('Cannot read feed; server returned error.', __FILE__);\n } catch (FeedSubEmptyException $e) {\n // TRANS: Error text.\n $this->error = _m('Sorry, we could not reach that feed. Please try that OStatus address again later.');\n common_debug('Cannot read feed; server returned an empty page.', __FILE__);\n } catch (FeedSubBadHTMLException $e) {\n // TRANS: Error text.\n $this->error = _m('Sorry, we could not reach that feed. Please try that OStatus address again later.');\n common_debug('Bad HTML, could not find feed link.', __FILE__);\n } catch (FeedSubNoFeedException $e) {\n // TRANS: Error text.\n $this->error = _m(\"Sorry, we could not reach that feed. Please try that OStatus address again later.\");\n common_debug('Could not find a feed linked from this URL.', __FILE__);\n } catch (FeedSubUnrecognizedTypeException $e) {\n // TRANS: Error text.\n $this->error = _m(\"Sorry, we could not reach that feed. Please try that OStatus address again later.\");\n common_debug('Not a recognized feed type.', __FILE__);\n } catch (Exception $e) {\n // Any new ones we forgot about\n // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com\n // TRANS: and example.net, as these are official standard domain names for use in examples.\n $this->error = _m(\"Sorry, we could not reach that address. Please make sure that the OStatus address is like [email protected] or http://example.net/nickname.\");\n common_debug(sprintf('Bad feed URL: %s %s', get_class($e), $e->getMessage()), __FILE__);\n }\n\n return false;\n }", "public function testQuarantineCheckIfProfileIsQuarantined()\n {\n\n }", "public function testProfileUnilogin()\n {\n\n }", "public function testGetInvalidProfileByProfileName() : void {\n\t\t// get a profile name that doesn't exist\n\t\t$profile = Profile::getProfileByProfileName($this->getPDO(), \"Invalid Profile Name\");\n\t\t$this->assertCount(0, $profile);\n\t}", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "function getUserProfile()\n\t{\n\t\t$data = $this->api->api( \"v1/market/private/user/account.json\" );\n\t\tif ( ! isset( $data->account ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->account->surname;\n\t\t$this->user->profile->displayName = @ $data->account->firstname . ' ' . $data->account->surname;\n\t\t$this->user->profile->photoURL = @ $data->account->image;\n\t\t$this->user->profile->profileURL = @ $data->account->image;\n\n\t\t// request user emails from envato api\n\t\ttry{\n\t\t\t$email = $this->api->api(\"v1/market/private/user/email.json\");\n\t\t\t$this->user->profile->email = @ $email->email;\n\t\t}\n\t\tcatch( Exception $e ){\n\t\t\tthrow new Exception( \"User email request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }", "public function testGetInvalidProfileByProfileId () : void {\n\t\t// grab a profile id that doesn't exist?\n\t\t$invalidProfileId = generateUuidV4();\n\n\t\t$profile = Profile::getProfileByProfileId($this->getPDO() , \"$invalidProfileId\");\n\t\t$this->assertNull($profile);\n\t}", "function getUserProfile()\n\t{\n\t\t// ask kakao api for user infos\n\t\t$data = $this->api->api( \"user/me\" ); \n \n\t\tif ( ! isset( $data->id ) || isset( $data->error ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->id; \n\t\t$this->user->profile->displayName = @ $data->properties->nickname;\n\t\t$this->user->profile->photoURL = @ $data->properties->thumbnail_image;\n\n\t\treturn $this->user->profile;\n\t}", "public function GetProfile()\n {\n return $this->profile;\n }", "function GetUserProfileInfo($access_token) {\t\n\t\t$url = 'https://www.googleapis.com/plus/v1/people/me';\t\t\t\n\t\t\n\t\t$ch = curl_init();\t\t\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\t\t\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer '. $access_token));\n\t\t$data = json_decode(curl_exec($ch), true);\n\t\t$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\t\t\n\t\tif($http_code != 200) \n\t\t\tthrow new Exception('Error : Failed to get user information');\n\t\t\t\n\t\treturn $data;\n\t}", "public function testProfilePrototypeFindByIdLikes()\n {\n\n }", "public function testProfilePrototypeGetCommunityRoles()\n {\n\n }", "private function GetFakeInstructorProfile()\n\t{\n\t\t# Creates a fake instructor profile since database does not \n\t\t# currently have instructor information in it.\n\t\t\n\t\t$record = array(\n\t\t\t'name' => 'Selma Louise',\n 'picture' => 'instructor_53456.gif',\n //'location' => 'Boston, MA',\n //'experience' => '5',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque bibendum metus vitae urna interdum faucibus. Proin euismod faucibus purus, dapibus luctus mi tincidunt sit amet. Mauris consectetur tincidunt molestie. Aliquam erat volutpat. Quisque nulla libero, tincidunt sed convallis at, tincidunt vitae diam. Nulla nibh arcu, viverra a consectetur sed, facilisis aliquam orci. Ut ullamcorper lectus eget odio ullamcorper mattis. Phasellus ac turpis leo, vel porttitor ipsum. Aliquam facilisis est vel tellus vulputate id faucibus risus gravida. Sed ut nisl id ante hendrerit aliquam.',\n 'types' => '',\n\t\t);\n\t\t\n\t\t$this->profile = $record;\n\t}", "public function testProfilePrototypeFindByIdOwnedGroups()\n {\n\n }", "public function test_auth_code_redemption_with_profile() {\n\t\tstatic::$test_auth_code['scope'] = 'profile';\n\t\t$code = $this->set_auth_code();\n\t\t$response = $this->create_form( 'POST', \n\t\t\t\tarray(\n\t\t\t\t\t'grant_type' => 'authorization_code',\n\t\t\t\t\t'code' => $code,\n\t\t\t\t\t'client_id' => 'https://app.example.com',\n\t\t\t\t\t'redirect_uri' => 'https://app.example.com/redirect',\n\t\t\t\t)\n\t\t);\n\t\t$this->assertEquals( 200, $response->get_status(), 'Response: ' . wp_json_encode( $response ) );\n\t\t$data = $response->get_data();\n\t\t$this->assertArrayNotHasKey( 'access_token', $data );\n\t\t$this->assertEquals( \n\t\t\tarray( \n\t\t\t\t'me' => get_author_posts_url( static::$author_id ),\n\t\t\t\t'profile' => indieauth_get_user( static::$author_id )\n\t\t\t), \n\t\t\t$data, \n\t\t\t'Response: ' . wp_json_encode( $data ) \n\t\t);\n\t\t// Reset Just in Case.\n\t\tunset( static::$test_auth_code['scope'] );\n\t}", "public function getProfile($userid);", "public function testGetProfileUserNotExist()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/thor\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n //AppBundle:User object not found. (404 Not Found)\r\n $this->assertTrue($response->code === 404);\r\n\r\n }", "public function testProfileCount()\n {\n\n }", "public function profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}", "public function testGetAccountProfileIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/profile')\n ->see('Account Privacy')\n ->see('SPONSORED')\n ->see('ADS')\n ->see('CALENDAR')\n ->see('Edit Profile Image')\n ->seePageIs('account/profile');\n }", "public function profile()\n {\n\n // lets check if we can access this method\n\n if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') {\n\n // get mentee\n $mentee_id = $this->user['is_matched'];\n $mentee['profile']['user'] = $this->Application_model->get(array('table' => 'users', 'id' => $mentee_id));\n $mentee['profile']['answers'] = $this->_extract_data(\n $this->Matcher_model->get(array('table' => 'users_answers', 'user_id' => $mentee_id))\n );\n\n $this->data['page'] = 'profile';\n $this->data['user'] = $this->user;\n $this->data['mentee'] = $mentee;\n\n $this->load->view('/chooser/header', $this->data);\n $this->load->view('/chooser/profile', $this->data);\n $this->load->view('/chooser/footer', $this->data);\n\n }else{\n\n redirect('/dashboard');\n\n }\n\n }", "private function checkProfile($profile)\n {\n if ($profile === null) {\n $profile = $this->getProfile();\n return $profile;\n } elseif ($this->getProfile()->getUsername() === $profile || $this->getDoorman()->isKitchenStaff() === true) {\n $profileRepository = $this->getDoctrine()->getRepository('MealzUserBundle:Profile');\n $profile = $profileRepository->find($profile);\n return $profile;\n }\n\n return null;\n }", "public function getProfile() {\n\t\treturn $this->profile;\n\t}", "public function testGetAccountFriendsUsersIn($auth)\n {\n // Set query param\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/friends/users?query=a')\n ->see('success\":true,')\n ->see('error\":null,')\n ->seePageIs('/account/friends/users?query=a');\n }", "public function testProfilePrototypeGetOwnedGroups()\n {\n\n }", "public function testListSiteMembershipsForPerson()\n {\n }", "public function testGetSiteMembershipRequestForPerson()\n {\n }", "function getUserProfile()\r\n\t{\r\n\t\ttry{ \r\n\t\t\t$data = $this->api->api('/me'); \r\n\t\t}\r\n\t\tcatch( Exception $e ){\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error while requesting the user profile.\", 6 );\r\n\t\t} \r\n\r\n\t\t// if the provider identifier is not recived, we assume the auth has failed\r\n\t\tif ( ! isset( $data[\"id\"] ) )\r\n\t\t{ \r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\r\n\t\t}\r\n\r\n\t\t# store the user profile. \r\n\t\t$this->user->profile->identifier = @ $data['id'];\r\n\t\t$this->user->profile->displayName = @ $data['name'];\r\n\t\t$this->user->profile->firstName = @ $data['first_name'];\r\n\t\t$this->user->profile->lastName \t= @ $data['last_name'];\r\n\t\t$this->user->profile->photoURL = \"https://graph.facebook.com/\" . $this->user->profile->identifier . \"/picture\";\r\n\t\t$this->user->profile->profileURL \t= @ $data['link']; \r\n\t\t$this->user->profile->webSiteURL \t= @ $data['website']; \r\n\t\t$this->user->profile->gender \t= @ $data['gender'];\r\n\t\t$this->user->profile->description \t= @ $data['bio'];\r\n\t\t$this->user->profile->email \t= @ $data['email'];\r\n\t\t$this->user->profile->region \t= @ $data['hometown'][\"name\"];\r\n\r\n\t\tif( isset( $data['birthday'] ) ) {\r\n\t\t\tlist($birthday_month, $birthday_day, $birthday_year) = @ explode('/', $data['birthday'] );\r\n\r\n\t\t\t$this->user->profile->birthDay = $birthday_day;\r\n\t\t\t$this->user->profile->birthMonth = $birthday_month;\r\n\t\t\t$this->user->profile->birthYear = $birthday_year;\r\n\t\t}\r\n\r\n\t\treturn $this->user->profile;\r\n \t}", "public function index(){\n $this->existing_profile=$this->profile_model->read_highest_rank_profiles(1);\n \n //Fetch this profile with the api and ensure it matches\n $test_name=\"Checking API can be used to fetch the top profile\";\n $test1=$this->checkingApiCanFetchAProfile($this->existing_profile[0]['user_id']);\n $expected_result=TRUE;\n echo $this->unit->run($test1,$expected_result,$test_name,$notes=\"Assumes atleast 1 account is created\");\n\n //Fetch the same profile by searching for it using its first_name\n $test_name=\"Checking API can be used to fetch same profile using search\";\n $test2=$this->checkingApiCanFetchProfileUsingSearch($this->existing_profile[0]['first_name']);\n $expected_result=TRUE;\n echo $this->unit->run($test2,$expected_result,$test_name,$notes=\"Assumes first result found has identical first name\");\n \n }", "function ds_get_social_profiles() {\n\n // Return a filterable social profile.\n return apply_filters(\n 'ds_social_profiles',\n array()\n );\n \n}", "public function testProfilePrototypeFindByIdCommunityRoles()\n {\n\n }", "private function checkingApiCanFetchAProfile($profile_id)\n {\n $api_profile=$this->api_request->get(\"profile\",\"single_profile\",$params=array('profile_id'=>$profile_id));\n return ($api_profile['user_id']==$profile_id);\n }", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function testGetProfileNotLoggedIn()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $response = \\Httpful\\Request::get($url)->send();\r\n\r\n //ERROR Call to a member function getWellnessProfessional() on string (500 Internal Server Error)\r\n $this->assertEquals(302, $response->code);\r\n\r\n }", "public function userProfile() {\n\t\t\t$request = $this->api(\"GET\", \"/me\");\n\t\t\t\n\t\t\t$request->execute();\n\t\t\t$response = $request->responseObject();\n\t\t\t$response->id = $response->ID;\n\t\t\treturn $response;\n\t\t}", "function do_personal()\r\n\t{\r\n\r\n\t\t$this->lib->do_profile();\r\n\r\n\t}", "private function generateProfile()\n {\n \t$profile = new Profile();\n \t$profile->firstname = $this->user_name_prefix . '_' . $this->faker->firstName;\n \t$profile->lastname = $this->faker->lastName;\n \t$profile->user_id = $this->userId;\n \t$profile->save(false);\n \treturn true;\n }", "public function profile()\n {\n try {\n $user = $this->guard()->user();\n $success['users'] = $user;\n return Helper::successResponse($success, 'Successfully get profile');\n } catch (\\Exception $e) {\n return Helper::errorResponse($e->getCode(), $e->getMessage());\n }\n }", "public function getUserProfile()\n {\n $this->sandbox = ($this->config[\"paypal_sandbox\"] == 'Y');\n\n // refresh tokens if needed\n $this->refreshToken();\n\n // store for seamless checkout\n Tygh::$app['session']['paypal_token'] = $this->token( \"access_token\" );\n\n // ask google api for user infos\n $response = $this->api->api( \"https://api\".($this->sandbox?'.sandbox' : '').\".paypal.com/v1/identity/openidconnect/userinfo/?schema=openid\" );\n\n if ( ! isset( $response->user_id ) || isset( $response->message ) ) {\n throw new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n }\n\n $this->user->profile->identifier = (property_exists($response,'user_id'))? md5($response->user_id):\"\";\n $this->user->profile->firstName = (property_exists($response,'given_name'))?$response->given_name:\"\";\n $this->user->profile->lastName = (property_exists($response,'family_name'))?$response->family_name:\"\";\n $this->user->profile->displayName = (property_exists($response,'name'))?$response->name:\"\";\n $this->user->profile->photoURL = (property_exists($response,'picture'))?$response->picture:\"\";\n $this->user->profile->gender = (property_exists($response,'gender'))?$response->gender:\"\";\n $this->user->profile->email = (property_exists($response,'email'))?$response->email:\"\";\n $this->user->profile->emailVerified = (property_exists($response,'email_verified'))?$response->email_verified:\"\";\n $this->user->profile->language = (property_exists($response,'locale'))?$response->locale:\"\";\n $this->user->profile->phone = (property_exists($response,'phone_number'))?$response->phone_number:\"\";\n if (property_exists($response,'address')) {\n $address = $response->address;\n $this->user->profile->address = (property_exists($address,'street_address'))?$address->street_address:\"\";\n $this->user->profile->city = (property_exists($address,'locality'))?$address->locality:\"\";\n $this->user->profile->zip = (property_exists($address,'postal_code'))?$address->postal_code:\"\";\n $this->user->profile->country = (property_exists($address,'country'))?$address->country:\"\";\n $this->user->profile->region = (property_exists($address,'region'))?$address->region:\"\";\n }\n\n if ( property_exists($response,'birthdate') ) {\n if (strpos($response->birthdate, '-') === false) {\n if ($response->birthdate !== '0000') {\n $this->user->profile->birthYear = (int) $response->birthdate;\n }\n } else {\n list($birthday_year, $birthday_month, $birthday_day) = explode( '-', $response->birthdate );\n\n $this->user->profile->birthDay = (int) $birthday_day;\n $this->user->profile->birthMonth = (int) $birthday_month;\n if ($birthday_year !== '0000') {\n $this->user->profile->birthYear = (int) $birthday_year;\n }\n }\n }\n\n return $this->user->profile;\n }", "function getUserProfile()\n\t{\n\t\t$response = $this->api->get( 'user/get.json' );\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 )\n\t\t{\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->id_user ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\n\t\t# store the user profile.\n\t\t$this->user->profile->identifier = (property_exists($response,'id_user'))?$response->id_user:\"\";\n\t\t$this->user->profile->displayName = (property_exists($response,'username'))?$response->username:\"\";\n\t\t$this->user->profile->profileURL = (property_exists($response,'user_url'))?$response->user_url:\"\";\n\t\t$this->user->profile->photoURL = (property_exists($response,'avatar_url'))?$response->avatar_url:\"\";\n//unknown\t\t$this->user->profile->description = (property_exists($response,'description'))?$response->description:\"\";\n\t\t$this->user->profile->firstName = (property_exists($response,'firstname'))?$response->firstname:\"\";\n\t\t$this->user->profile->lastName = (property_exists($response,'name'))?$response->name:\"\";\n\n\t\tif( property_exists($response,'gender') ) {\n\t\t\tif( $response->gender == 1 ){\n\t\t\t\t$this->user->profile->gender = \"male\";\n\t\t\t}\n\t\t\telseif( $response->gender == 2 ){\n\t\t\t\t$this->user->profile->gender = \"female\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->user->profile->gender = \"\";\n\t\t\t}\n\t\t}\n\n\t\t$this->user->profile->language = (property_exists($response,'lang'))?$response->lang:\"\";\n\n\t\tif( property_exists( $response,'birth_date' ) && $response->birth_date ) {\n $birthday = date_parse($response->birth_date);\n\t\t\t$this->user->profile->birthDay = $birthday[\"day\"];\n\t\t\t$this->user->profile->birthMonth = $birthday[\"month\"];\n\t\t\t$this->user->profile->birthYear = $birthday[\"year\"];\n\t\t}\n\n\t\t$this->user->profile->email = (property_exists($response,'email'))?$response->email:\"\";\n\t\t$this->user->profile->emailVerified = (property_exists($response,'email'))?$response->email:\"\";\n\n//unknown\t\t$this->user->profile->phone = (property_exists($response,'unknown'))?$response->unknown:\"\";\n\t\t$this->user->profile->address = (property_exists($response,'address1'))?$response->address1:\"\";\n\t\t$this->user->profile->address .= (property_exists($response,'address2'))?$response->address2:\"\";\n\t\t$this->user->profile->country = (property_exists($response,'country'))?$response->country:\"\";\n//unknown\t\t$this->user->profile->region = (property_exists($response,'unknown'))?$response->unknown:\"\";\n\t\t$this->user->profile->city = (property_exists($response,'city'))?$response->city:\"\";\n\t\t$this->user->profile->zip = (property_exists($response,'postalcode'))?$response->postalcode:\"\";\n\n\t\treturn $this->user->profile;\n\t}", "public function testProfilePrototypeGetQuarantines()\n {\n\n }", "public function testListSiteMembershipRequestsForPerson()\n {\n }", "public function getProfile(){\n\t\treturn (new Profile($this->userName));\n\t}", "public function testProfileCreate()\n {\n\n }", "function wpcom_vip_get_user_profile( $email_or_id ) {\n\n\tif ( is_numeric( $email_or_id ) ) {\n\t\t$user = get_user_by( 'id', $email_or_id );\n\t\tif ( ! $user )\n\t\t\treturn false;\n\n\t\t$email = $user->user_email;\n\t} elseif ( is_email( $email_or_id ) ) {\n\t\t$email = $email_or_id;\n\t} else {\n\t\t$user_login = sanitize_user( $email_or_id, true );\n\t\t$user = get_user_by( 'login', $user_login );\n\t\tif ( ! $user )\n\t\t\treturn;\n\n\t\t$email = $user->user_email;\n\t}\n\n\t$hashed_email = md5( strtolower( trim( $email ) ) );\n\t$profile_url = esc_url_raw( sprintf( '%s.gravatar.com/%s.php', ( is_ssl() ? 'https://secure' : 'http://www' ), $hashed_email ), array( 'http', 'https' ) );\n\n\t$profile = wpcom_vip_file_get_contents( $profile_url, 1, 900 );\n\tif ( $profile ) {\n\t\t$profile = unserialize( $profile );\n\n\t\tif ( is_array( $profile ) && ! empty( $profile['entry'] ) && is_array( $profile['entry'] ) ) {\n\t\t\t$profile = $profile['entry'][0];\n\t\t} else {\n\t\t\t$profile = false;\n\t\t}\n\t}\n\treturn $profile;\n}", "public function testGetValidProfileById() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// grab the date from mySQL and enforce the fields match out expectations\n\t\t$pdoProfile = Profile::getProfileByProfileId($this->getPDO(), $profile->getProfileId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "function get_profile($field, $user = \\false)\n {\n }", "function at_follow_is_pro_user() {\n $isPro = false;\n $options = get_option('addthis_settings');\n $profile = $options['profile'];\n if ($profile) {\n $request = wp_remote_get( \"http://q.addthis.com/feeds/1.0/config.json?pubid=\" . $profile );\n $server_output = wp_remote_retrieve_body( $request );\n $array = json_decode($server_output);\n // check for pro user\n if (array_key_exists('_default',$array)) {\n $isPro = true;\n } else {\n $isPro = false;\n }\n }\n return $isPro;\n}", "public function testGetAccountFriendsIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/friends')\n ->see('Notifications')\n ->see('Friends')\n ->see('Invite')\n ->seePageIs('account/friends');\n }" ]
[ "0.76226526", "0.7584691", "0.72922677", "0.7016606", "0.6957223", "0.6950044", "0.6880951", "0.6863824", "0.6856816", "0.6786138", "0.6758383", "0.67314774", "0.66405886", "0.6620992", "0.6611972", "0.6545408", "0.65420955", "0.65275466", "0.65168256", "0.64682096", "0.6439118", "0.64377177", "0.64112103", "0.63997513", "0.6381813", "0.637435", "0.637229", "0.63712275", "0.63096774", "0.6307923", "0.6292969", "0.62887025", "0.62795067", "0.6276934", "0.6262045", "0.6260603", "0.62470406", "0.6237359", "0.6234301", "0.6226901", "0.62102634", "0.6192342", "0.61742103", "0.61718357", "0.6151945", "0.6113901", "0.60998905", "0.6089646", "0.6080353", "0.60528684", "0.6046386", "0.60383904", "0.60383904", "0.60383904", "0.60143614", "0.6004511", "0.6000676", "0.5990294", "0.5985401", "0.5975851", "0.5974429", "0.5968785", "0.59617645", "0.59608597", "0.5957619", "0.59526265", "0.59481204", "0.5939736", "0.5933355", "0.59323657", "0.5932039", "0.59319305", "0.5930934", "0.5925633", "0.59234834", "0.592209", "0.5916749", "0.59102035", "0.5909577", "0.59087795", "0.5892993", "0.58833754", "0.5883189", "0.58806235", "0.5878367", "0.5869278", "0.58601785", "0.5857236", "0.58553183", "0.5853568", "0.58512294", "0.584834", "0.5846581", "0.5845595", "0.5828357", "0.5813848", "0.5812334", "0.5810623", "0.58057874", "0.58011484" ]
0.7316204
2
tests getting supporter profile
public function testGetProfileOtherUserSupporter() { $url = "http://127.0.0.1/app_test.php/profile/view/tony-stark"; $username = '[email protected]'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Tony Stark', $response->body->data->user->name); $this->assertEquals(1, $response->body->data->relationships->isSupportee); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes Drupal perfect. You should have no complaints.'\nPROFILE_TEST;\n\n vfsStream::setup('profiles');\n vfsStream::create([\n 'fixtures' => [\n 'invalid_profile.info.txt' => $profile,\n ],\n ]);\n $info = $this->infoParser->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));\n $this->assertFalse($info['core_incompatible']);\n }", "public function testProfileFind()\n {\n\n }", "abstract protected function getUserProfile();", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "public function testGetSelfServiceBrowserProfileManagementRequest()\n {\n }", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "protected function _loadProfileRequired()\n {\n $profile = $this->_loadProfile();\n if ($profile === false) {\n require_once 'Zend/Tool/Project/Provider/Exception.php';\n throw new Zend_Tool_Project_Provider_Exception('A project profile was not found in the current working directory.');\n }\n return $profile;\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "function yz_profile() {\n\treturn Youzer_Profile::get_instance();\n}", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testProfileCheckIfUserExists()\n {\n\n }", "private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }", "public function testQuarantineCheckIfProfileIsQuarantined()\n {\n\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function getProfile() {\n\t\treturn $this->profile;\n\t}", "public function testProfilePrototypeGetGroups()\n {\n\n }", "public function profile() {\n return $this->profile;\n }", "public function testProfilePrototypeGetCommunityRoles()\n {\n\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function testProfilePrototypeGetQuarantines()\n {\n\n }", "public function testProfileFindOne()\n {\n\n }", "public function GetProfile()\n {\n return $this->profile;\n }", "public function testProfilePrototypeGetAccessTokens()\n {\n\n }", "public function getUserProfile();", "public function testRequestOrgProfile() {\n\t\t$node = $this->mockLocalNodeInterface();\n\t\t$this->stdLocalNodeInterfaceUri($node);\n\t\t$orgprofile = $this->mockOrgProfileServiceInterface();\n\t\t\n\t\t$orgprofile->expects($this->once())\n\t\t\t->method('getProfile')\n\t\t\t->willReturn(new OrgProfile('org', 'http://site', ['tag1','tag2']));\n\t\t$service = new CciOrgProfileService($orgprofile, $node);\n\t\t\n\t\t$response = $service->run(['orgprofile'], []);\n\t\t$check = MessageDecoder::jsonServiceText($response);\n\t\t$this->assertObjectHasAttribute('alpha.venus.uk', $check);\n\t\t\n\t\t$profile = MessageDecoder::jsonServiceTextStripNode($response);\n\t\t\n\t\t$this->assertEquals('org', $profile->name);\n\t\t$this->assertEquals('http://site', $profile->website);\n\t\t$this->assertEquals(['tag1','tag2'], $profile->tags);\n\t}", "function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }", "public function testProfileCount()\n {\n\n }", "public function testProfilePrototypeFindByIdAccessTokens()\n {\n\n }", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function testProfileFindById()\n {\n\n }", "public function testProfilePrototypeExistsCommunityRoles()\n {\n\n }", "public function testProfileUnilogin()\n {\n\n }", "public function profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}", "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function getProfile(){\n\t\treturn (new Profile($this->userName));\n\t}", "public function getProfile()\n {\n return $this->getFieldValue(self::FIELD_PROFILE);\n }", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"[email protected]\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function testProfilePrototypeFindByIdCommunityRoles()\n {\n\n }", "protected static function profilePageProvider()\n {\n $config = \\Codeception\\Configuration::config();\n $civiRemoteApi = new \\CiviRemoteApi($config['modules']['config']['CiviRemoteApi']);\n\n $params = [\n 'entity' => 'UFGroup',\n 'action' => 'get',\n 'is_active' => 1,\n 'is_reserved' => 0,\n // 'id' => 12,\n // group_type (comma separated list of contact types)\n //\n 'options' => [\n // 'limit' => 1,\n ],\n ];\n $profiles = $civiRemoteApi->CiviRemote($params);\n $examples = [];\n\n if (!empty($profiles['values'])) {\n // Iterate over pages to pick up payment processors.\n foreach ($profiles['values'] as $profile) {\n $example = [\n 'profile_id' => $profile['id'],\n 'profile_title' => $profile['title'],\n 'profile_url' => \"civicrm/profile/create?gid={$profile['id']}\",\n ];\n\n // Other profile setup?\n $examples[] = $example;\n }\n\n }\n return $examples;\n }", "public function testProfileCreate()\n {\n\n }", "public function testGetValidProfileByProfileName() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get Profile form database using profile name\n\t\t$results = Profile::getProfileByProfileName($this->getPDO(), $this->VALID_PROFILE_NAME);\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\n\t\t// make sure no other objects are contaminating the profile\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\FoodTruckFinder\\\\Profile\", $results);\n\n\t\t// make sure results are same as expected\n\t\t$pdoProfile = $results[0];\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "protected function getSimulatingUser()\n {\n // Ideally, return Profile\n }", "public function testProfilePrototypeGetImage()\n {\n\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testProfilePrototypeExistsGroups()\n {\n\n }", "public function testProfilePrototypeGetReviews()\n {\n\n }", "function getProfileConfig() {\n $this->load->model('Usermodel');\n $this->Usermodel->getProfileConfiguration();\n }", "function profile_info() {\n $parameters = array(\n 'method' => __FUNCTION__\n );\n return $this->get_data($parameters);\n }", "private function GetFakeInstructorProfile()\n\t{\n\t\t# Creates a fake instructor profile since database does not \n\t\t# currently have instructor information in it.\n\t\t\n\t\t$record = array(\n\t\t\t'name' => 'Selma Louise',\n 'picture' => 'instructor_53456.gif',\n //'location' => 'Boston, MA',\n //'experience' => '5',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque bibendum metus vitae urna interdum faucibus. Proin euismod faucibus purus, dapibus luctus mi tincidunt sit amet. Mauris consectetur tincidunt molestie. Aliquam erat volutpat. Quisque nulla libero, tincidunt sed convallis at, tincidunt vitae diam. Nulla nibh arcu, viverra a consectetur sed, facilisis aliquam orci. Ut ullamcorper lectus eget odio ullamcorper mattis. Phasellus ac turpis leo, vel porttitor ipsum. Aliquam facilisis est vel tellus vulputate id faucibus risus gravida. Sed ut nisl id ante hendrerit aliquam.',\n 'types' => '',\n\t\t);\n\t\t\n\t\t$this->profile = $record;\n\t}", "function getProfileName() {\n\t\treturn $this->_ProfileName;\n\t}", "function getUserProfile()\n\t{\n\t\t// refresh tokens if needed \n\t\t$this->refreshToken();\n\n\t\ttry{\n\t\t\t$authTest = $this->api->api( \"auth.test\" );\n\t\t\t$response = $this->api->get( \"users.info\", array( \"user\" => $authTest->user_id ) );\n\t\t}\n\t\tcatch( SlackException $e ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->user->id ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\t\t# store the user profile. \n\t\t$this->user->profile->identifier\t\t=\t@$response->user->id;\n\t\t$this->user->profile->profileURL\t\t=\t\"\";\n\t\t$this->user->profile->webSiteURL\t\t=\t\"\";\n\t\t$this->user->profile->photoURL\t\t\t=\t@$response->user->profile->image_original;\n\t\t$this->user->profile->displayName\t\t=\t@$response->user->profile->real_name;\n\t\t$this->user->profile->description\t\t=\t\"\";\n\t\t$this->user->profile->firstName\t\t\t=\t@$response->user->profile->first_name;\n\t\t$this->user->profile->lastName\t\t\t=\t@$response->user->profile->last_name;\n\t\t$this->user->profile->gender\t\t\t=\t\"\";\n\t\t$this->user->profile->language\t\t\t=\t\"\";\n\t\t$this->user->profile->age\t\t\t\t=\t\"\";\n\t\t$this->user->profile->birthDay\t\t\t=\t\"\";\n\t\t$this->user->profile->birthMonth\t\t=\t\"\";\n\t\t$this->user->profile->birthYear\t\t\t=\t\"\";\n\t\t$this->user->profile->email\t\t\t\t=\t@$response->user->profile->email;\n\t\t$this->user->profile->emailVerified\t =\t\"\";\n\t\t$this->user->profile->phone\t\t\t\t=\t\"\";\n\t\t$this->user->profile->address\t\t\t=\t\"\";\n\t\t$this->user->profile->country\t\t\t=\t\"\";\n\t\t$this->user->profile->region\t\t\t=\t\"\";\n\t\t$this->user->profile->city\t\t\t\t=\t\"\";\n\t\t$this->user->profile->zip\t\t\t\t=\t\"\";\n\n\t\treturn $this->user->profile;\n\t}", "public function profile(): string\n {\n if ($this->profile) {\n return $this->profile;\n }\n\n return $this->app['opx.profile'] ?? 'default';\n }", "public function testGetInvalidProfileByProfileName() : void {\n\t\t// get a profile name that doesn't exist\n\t\t$profile = Profile::getProfileByProfileName($this->getPDO(), \"Invalid Profile Name\");\n\t\t$this->assertCount(0, $profile);\n\t}", "public function testProfilePrototypeFindByIdGroups()\n {\n\n }", "public function getProfileSize() {}", "public function loadProfileInformation() {\n\t\t\t$procedure = \"get\" . $this->mode_ . \"Information\"; \n\t\t\t$this->profileInformation_ = $this->dbHandler_->call($procedure, \"%d\", array($this->id_));\n\t\t}", "public function getProfile()\n {\n $res = $this->getEntity()->getProfile();\n\t\tif($res === null)\n\t\t{\n\t\t\t$this->setProfile(SDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->findByCriteria('Profile', array('primary' => $this::getPrimary())));\n\t\t\treturn $this->getEntity()->getProfile();\n\t\t}\n return $res;\n }", "public function testProfileInvalid()\n {\n $email = new Notification();\n $email->profile('derp');\n }", "public function testGetCustomerProfile()\n {\n self::testCreateCustomerProfile();\n\n $response = $this->gateway->getCustomerProfile($this->customerProfileId);\n\n $this->assertTrue($response->isSuccess());\n }", "public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function testProfilePrototypeFindByIdReviews()\n {\n\n }", "public function getUserProfile(){\n\n\t\treturn $this->cnuser->getUserProfile($this->request->header('Authorization'));\n\t}", "public function testProfilePrototypeFindByIdQuarantines()\n {\n\n }", "public function testInfoUser()\n {\n }", "public function testProfilePrototypeGetComments()\n {\n\n }", "public function testProfilePrototypeCreateAccessTokens()\n {\n\n }", "public function getProfile()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\r\n }", "public function testDestiny2GetLinkedProfiles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "function drush_dslm_add_profile() {\n // Bootstrap dslm, this grabs the instantiated and configured Dslm library object\n if (!$dslm = _dslm_bootstrap()) {\n return FALSE;\n }\n\n $args = drush_get_arguments();\n\n // Get a list of profiles\n $profiles = $dslm->getProfiles();\n\n // Get the profile name via args or interactively\n $profile_name = isset($args[1]) ? $args[1] : FALSE;\n if (!$profile_name) {\n $choices = array();\n foreach ($profiles as $k => $v) {\n $choices[$k] = $k;\n }\n $profile_name = drush_choice($choices);\n if (!$profile_name || !isset($profiles[$profile_name])) {\n return FALSE;\n }\n }\n\n // Get the version via args or interactively\n $profile_Version = isset($args[2]) ? $args[2] : FALSE;\n if (!$profile_version) {\n $choices = array();\n foreach ($profiles[$profile_name]['all'] as $k => $v) {\n $choices[$v] = $v;\n }\n $profile_version = drush_choice($choices);\n if (!$profile_version || !in_array($profile_version, $profiles[$profile_name]['all'])) {\n return FALSE;\n }\n }\n\n // Run the DSLM manageProfile method to add the profile or deal with an error\n if ($dslm->manageProfile($profile_name, $profile_version)) {\n drush_log(\"The profile '$profile_name' version '$profile_version' has been added\", 'ok');\n }\n else {\n drush_log($dslm->lastError(), 'error');\n }\n\n}", "public function testProfilePrototypeCreateImage()\n {\n\n }", "public function getProf(){\n return $this->prof;\n }", "public function setProfileInformation()\n {\n $view = \\Utility\\Singleton::getInstance(\"\\View\\Main\");\n\t\t$username=$view->get('userProfile');\n\t\t$this->getUserInformations($view,$username);\n\t\t$this->setResourcesUploaded($view,$username);\n\t\treturn $view->fetch('profile.tpl');\n\t}", "public function testProfilePrototypeCreateCommunityRoles()\n {\n\n }", "public function _assertProfileExists($profile_uid)\n {\n }", "public function isSupported(Profile $profile): bool\n {\n }", "function getProfile($prj_id, $usr_id)\n {\n $backend =& self::_getBackend($prj_id);\n return $backend->getProfile($usr_id);\n }", "public function testGetInvalidProfileByProfileId () : void {\n\t\t// grab a profile id that doesn't exist?\n\t\t$invalidProfileId = generateUuidV4();\n\n\t\t$profile = Profile::getProfileByProfileId($this->getPDO() , \"$invalidProfileId\");\n\t\t$this->assertNull($profile);\n\t}", "public function testProfileApp()\n {\n $client = static::createClient();\n $client->request('GET', '/candidate/profile');\n $this->assertEquals(301, $client->getResponse()->getStatusCode());\n\n //authenticated users are allowed\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile');\n $response = $client->getResponse();\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue(0 === strpos($response->getTargetUrl(), 'https'));\n\n //https and authentication loads page\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile', [], [], ['HTTPS' => true]);\n $this->assertTrue($crawler->filter('html:contains(\"Loading ...\")')->count() > 0);\n }", "public function testProfilePrototypeLinkCommunityRoles()\n {\n\n }", "public function testProfilePrototypeCreateGroups()\n {\n\n }", "public function testProfilePrototypeGetOwnedGroups()\n {\n\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function getCurrentProfile(){\n\n try{\n\n if( $this->hasToken() ){\n\n $account = $this->asObj( '/profile' );\n\n return $account->data;\n\n }\n else\n throw new ClientException(\"You need an authorization token, in order to request a profile.\");\n\n }\n catch (ResourceNotFoundException $e){\n //account does not exist\n return NULL;\n }\n\n }", "public function get_profile($username = '')\n {\n\n\n if($username) $this->username = $username;\n\n $details = (Object) $this->user_details($this->username);\n\n $profile = $details->profile;\n\n $not_valid = !(!empty($profile) and FILE::isExist($profile,\"profile\"));\n\n if($not_valid) return;\n\n return $profile;\n\n\n }", "function test28() {\n $profile = 'x';\n return $profile;\n}", "public function testProfilePrototypeGetLikes()\n {\n\n }", "public function getProfileName()\n\t\t{\n\t\t return $this->profileName;\n\t\t}", "public function testProfilePrototypeUpdateByIdAccessTokens()\n {\n\n }", "public function testProfilePrototypeCountCommunityRoles()\n {\n\n }", "protected function _coverPhotoStorageExtension()\n\t{\n\t\treturn 'core_Profile';\n\t}", "public function setProfileInfo($profile){\n $profile_dir = conf::pathBase() . \"/profiles/$profile\";\n if (!file_exists($profile_dir)) {\n common::abort( \"No such path to profiles: $profile_dir\");\n } \n \n include $profile_dir . \"/profile.inc\";\n $this->profileModules = $_PROFILE_MODULES;\n $this->profileTemplates = $_PROFILE_TEMPLATES;\n $this->profileTemplate = $_PROFILE_TEMPLATE;\n }", "function get_profile_usrnm($usrname){\r\n\t\r\n}", "function get_profile_usrid($usrid){\r\n\t\r\n}", "function GetProfileDetails(){\n\t\t$this->load->model('User_model');\n\t\t\n\t\t$this->user_id = $this->User_model->Get_User_ID_By_Token($this->user_auth_id); //Just Like a call to require ID of USER\n\t\t//Did this because the user_id might be set but above function just represents auth ID and sends to model to deliver real ID\n\t\t\n\t\t$this->db->select('firstname,lastname,auth_token,program_name,level,grad_year');\n\t\t$this->db->from('users');\n\t\t$this->db->join('programs', 'programs.program_id = users.program_id');\n\t\t$this->db->join('students', 'students.user_id = users.user_id');\n\t\t$this->db->where('users.user_id', $this->user_id);\n\t\t$query = $this->db->get();\n\t\t\n\t\t$results = $query->result_array();\n\t\t\n\t\treturn $results[0];\n\t}", "public function getProfile() {\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\n }" ]
[ "0.7234903", "0.6723165", "0.66822654", "0.65449274", "0.65082306", "0.64712346", "0.63994133", "0.6393896", "0.63905436", "0.63622856", "0.6357651", "0.61896676", "0.61553925", "0.61525655", "0.6125855", "0.6113694", "0.60903585", "0.6070724", "0.60698146", "0.60694635", "0.60694635", "0.60694635", "0.60580605", "0.6053325", "0.6038557", "0.60245043", "0.60223675", "0.59983695", "0.59638184", "0.5955097", "0.59510833", "0.5937344", "0.5918691", "0.5910705", "0.5908597", "0.5901075", "0.58936054", "0.58875006", "0.5886735", "0.5880858", "0.5880444", "0.58759886", "0.58742845", "0.5866362", "0.5852988", "0.5851608", "0.5849187", "0.5812616", "0.5803671", "0.5795641", "0.57778716", "0.57766503", "0.5769621", "0.57470876", "0.5733279", "0.5732488", "0.57221955", "0.5718369", "0.5712343", "0.5697574", "0.56829345", "0.5676171", "0.5665535", "0.5664378", "0.56053543", "0.55895007", "0.5580296", "0.55760795", "0.55760294", "0.55689764", "0.5568331", "0.5561922", "0.55562425", "0.55506957", "0.5546584", "0.554466", "0.553914", "0.5536623", "0.55333245", "0.55313104", "0.55282295", "0.55268216", "0.55215603", "0.5521369", "0.55104953", "0.55095154", "0.55024576", "0.5481047", "0.547546", "0.5471114", "0.54697925", "0.5465533", "0.5462431", "0.5462368", "0.5455859", "0.5451055", "0.54491925", "0.54408944", "0.5434416", "0.5431213" ]
0.60819143
17
test getting WP profile no relation
public function testGetProfileWPNoRel() { $url = "http://127.0.0.1/app_test.php/profile/view/natasha-romanov"; $username = '[email protected]'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Natasha Romanov', $response->body->data->user->name); $this->assertNotEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function _assertProfileExists($profile_uid)\n {\n }", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/steve-rogers\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Steve Rogers', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetInvalidProfileByProfileName() : void {\n\t\t// get a profile name that doesn't exist\n\t\t$profile = Profile::getProfileByProfileName($this->getPDO(), \"Invalid Profile Name\");\n\t\t$this->assertCount(0, $profile);\n\t}", "public function testProfileFindOne()\n {\n\n }", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"[email protected]\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function testGetInvalidProfileByProfileEmail() : void {\n\t\t// get an email that doesn't exist\n\t\t$profile = Profile::getProfileByProfileEmail($this->getPDO(), \"[email protected]\");\n\t\t$this->assertNull($profile);\n\t}", "public function testProfileInvalid()\n {\n $email = new Notification();\n $email->profile('derp');\n }", "abstract protected function getUserProfile();", "public function testGetInvalidProfileByProfileId () : void {\n\t\t// grab a profile id that doesn't exist?\n\t\t$invalidProfileId = generateUuidV4();\n\n\t\t$profile = Profile::getProfileByProfileId($this->getPDO() , \"$invalidProfileId\");\n\t\t$this->assertNull($profile);\n\t}", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "function at_follow_is_pro_user() {\n $isPro = false;\n $options = get_option('addthis_settings');\n $profile = $options['profile'];\n if ($profile) {\n $request = wp_remote_get( \"http://q.addthis.com/feeds/1.0/config.json?pubid=\" . $profile );\n $server_output = wp_remote_retrieve_body( $request );\n $array = json_decode($server_output);\n // check for pro user\n if (array_key_exists('_default',$array)) {\n $isPro = true;\n } else {\n $isPro = false;\n }\n }\n return $isPro;\n}", "public function testProfilePrototypeGetPosts()\n {\n\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "private function checkProfile($profile)\n {\n if ($profile === null) {\n $profile = $this->getProfile();\n return $profile;\n } elseif ($this->getProfile()->getUsername() === $profile || $this->getDoorman()->isKitchenStaff() === true) {\n $profileRepository = $this->getDoctrine()->getRepository('MealzUserBundle:Profile');\n $profile = $profileRepository->find($profile);\n return $profile;\n }\n\n return null;\n }", "public function testProfileFind()\n {\n\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testGetProfileUserNotExist()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/thor\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n //AppBundle:User object not found. (404 Not Found)\r\n $this->assertTrue($response->code === 404);\r\n\r\n }", "function get_profile($field, $user = \\false)\n {\n }", "public function testQuarantineCheckIfProfileIsQuarantined()\n {\n\n }", "public static function getUserNoProfile()\n {\n $user = static::get();\n if (isset($user->noPerfil)) {\n return $user->noPerfil;\n }\n }", "public function testProfilePrototypeFindByIdPosts()\n {\n\n }", "public function testProfilePrototypeExistsCommunityRoles()\n {\n\n }", "function hasProfilePicture()\n\t{\n\t\treturn $this->ppic;\n\t}", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public function getUserProfile();", "function ds_get_social_profiles() {\n\n // Return a filterable social profile.\n return apply_filters(\n 'ds_social_profiles',\n array()\n );\n \n}", "public function hasProfilePreLoaded()\n {\n return property_exists($this, 'profile') && ! is_null($this->profile);\n }", "public function testGuestNotAccessProfilePage()\n\t{\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\t}", "public function testGetCustomerProfile()\n {\n self::testCreateCustomerProfile();\n\n $response = $this->gateway->getCustomerProfile($this->customerProfileId);\n\n $this->assertTrue($response->isSuccess());\n }", "public function testProfileIndexFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(new BlokkrUser());\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "public function testProfilePrototypeFindByIdQuarantines()\n {\n\n }", "public function testProfilePrototypeGetQuarantines()\n {\n\n }", "public function testProfilePrototypeGetLikes()\n {\n\n }", "private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }", "public function testProfileUnilogin()\n {\n\n }", "public function testDestiny2GetLinkedProfiles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testProfilePrototypeGetCommunityRoles()\n {\n\n }", "public function testProfileIndexNotFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(null);\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(404, $client->getResponse()->getStatusCode());\n }", "public function testManagerNotAccessProfileUser()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextPresent('You don\\'t have access to this section.');\n\t}", "public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes Drupal perfect. You should have no complaints.'\nPROFILE_TEST;\n\n vfsStream::setup('profiles');\n vfsStream::create([\n 'fixtures' => [\n 'invalid_profile.info.txt' => $profile,\n ],\n ]);\n $info = $this->infoParser->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));\n $this->assertFalse($info['core_incompatible']);\n }", "public function testProfilePrototypeFindByIdCommunityRoles()\n {\n\n }", "public function badPaymentProfile()\n {\n\n $payment_profile = $this->payment_profile()->first();\n\n if ($payment_profile === NULL)\n return TRUE;\n\n if (empty($payment_profile->stripe_customer))\n return TRUE;\n\n return FALSE;\n\n }", "public function testGetProfileNotLoggedIn()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $response = \\Httpful\\Request::get($url)->send();\r\n\r\n //ERROR Call to a member function getWellnessProfessional() on string (500 Internal Server Error)\r\n $this->assertEquals(302, $response->code);\r\n\r\n }", "public function testProfilePrototypeFindByIdLikes()\n {\n\n }", "private function checkingApiCanFetchAProfile($profile_id)\n {\n $api_profile=$this->api_request->get(\"profile\",\"single_profile\",$params=array('profile_id'=>$profile_id));\n return ($api_profile['user_id']==$profile_id);\n }", "public function getProfile()\n {\n ProfileResource::withoutWrapping();\n MinistryResource::withoutWrapping();\n\n if (request()->has('complete') && request()->complete) {\n return new ProfileResource(auth()->user());\n } else {\n return new MinistryResource(auth()->user());\n }\n }", "public function testGetValidProfileByProfileName() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get Profile form database using profile name\n\t\t$results = Profile::getProfileByProfileName($this->getPDO(), $this->VALID_PROFILE_NAME);\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\n\t\t// make sure no other objects are contaminating the profile\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\FoodTruckFinder\\\\Profile\", $results);\n\n\t\t// make sure results are same as expected\n\t\t$pdoProfile = $results[0];\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "function wp_get_users_with_no_role($site_id = \\null)\n {\n }", "public function testProfilePrototypeCountPosts()\n {\n\n }", "public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }", "public function testProfileEmptySkillsMatrix()\n {\n factory(App\\Models\\Profile::class, 'withAUser', 1)->create();\n $user = DB::table('users')->first();\n $this->visit(route('profile.view', ['name'=>$user->username]))\n ->see('seeInElement', '.skills', trans('profile.show.no_skills'));\n }", "public function testProfileCount()\n {\n\n }", "public function testHasPage() {\n $this->assertEquals(1, $this->users->page());\n }", "public function testProfileFindById()\n {\n\n }", "function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }", "public function hasProfilePicture()\n {\n $file = public_path('/images/players/') . $this->id . '.webp';\n return ( file_exists($file) ) ? true : false;\n }", "function yz_profile() {\n\treturn Youzer_Profile::get_instance();\n}", "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function testListSiteMembershipsForPerson()\n {\n }", "public function testGetOneUserInformation()\n {\n $response = $this->json('GET', $this->userEndpoint.'/prostoalex');\n\n // It should return a valid user json with all the basic attributes filled\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'created',\n 'id',\n 'karma',\n 'submitted',\n 'about',\n ])\n ->assertJsonFragment([\n 'id' => 'prostoalex'\n ]);\n }", "public function getProfile()\n {\n return $this->hasOne(Profile::className(), ['id' => 'profile_id']);\n }", "public function existing_profiles()\n {\n if ($this->db->table_exists('profiles'))\n {\n $this->db->select('id, temperatureopt, temperaturemax, lighthours, moisture, phvaluemin, phvaluemax');\n $this->db->where('is_default', '1');\n $query = $this->db->get('profiles');\n return $query;\n }\n }", "private function generateProfile()\n {\n \t$profile = new Profile();\n \t$profile->firstname = $this->user_name_prefix . '_' . $this->faker->firstName;\n \t$profile->lastname = $this->faker->lastName;\n \t$profile->user_id = $this->userId;\n \t$profile->save(false);\n \treturn true;\n }", "public function testExample()\n {\n $user = User::count();\n $profile = Profile:: count();\n $this->assertEquals($user,$profile);\n }", "public function getProfile()\n {\n $res = $this->getEntity()->getProfile();\n\t\tif($res === null)\n\t\t{\n\t\t\t$this->setProfile(SDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->findByCriteria('Profile', array('primary' => $this::getPrimary())));\n\t\t\treturn $this->getEntity()->getProfile();\n\t\t}\n return $res;\n }", "public function hasWpUserId(){\n return $this->_has(7);\n }", "public function testProfilePrototypeFindByIdOwnedGroups()\n {\n\n }", "public function testProfilePrototypeLinkCommunityRoles()\n {\n\n }", "public function testProfilePrototypeCreatePosts()\n {\n\n }", "function pullRemoteProfile()\n {\n $this->profile_uri = $this->trimmed('profile');\n try {\n if (Validate::email($this->profile_uri)) {\n $this->oprofile = Ostatus_profile::ensureWebfinger($this->profile_uri);\n } else if (Validate::uri($this->profile_uri)) {\n $this->oprofile = Ostatus_profile::ensureProfileURL($this->profile_uri);\n } else {\n // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com\n // TRANS: and example.net, as these are official standard domain names for use in examples.\n $this->error = _m(\"Sorry, we could not reach that address. Please make sure that the OStatus address is like [email protected] or http://example.net/nickname.\");\n common_debug('Invalid address format.', __FILE__);\n return false;\n }\n return true;\n } catch (FeedSubBadURLException $e) {\n // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com\n // TRANS: and example.net, as these are official standard domain names for use in examples.\n $this->error = _m('Sorry, we could not reach that address. Please make sure that the OStatus address is like [email protected] or http://example.net/nickname.');\n common_debug('Invalid URL or could not reach server.', __FILE__);\n } catch (FeedSubBadResponseException $e) {\n // TRANS: Error text.\n $this->error = _m('Sorry, we could not reach that feed. Please try that OStatus address again later.');\n common_debug('Cannot read feed; server returned error.', __FILE__);\n } catch (FeedSubEmptyException $e) {\n // TRANS: Error text.\n $this->error = _m('Sorry, we could not reach that feed. Please try that OStatus address again later.');\n common_debug('Cannot read feed; server returned an empty page.', __FILE__);\n } catch (FeedSubBadHTMLException $e) {\n // TRANS: Error text.\n $this->error = _m('Sorry, we could not reach that feed. Please try that OStatus address again later.');\n common_debug('Bad HTML, could not find feed link.', __FILE__);\n } catch (FeedSubNoFeedException $e) {\n // TRANS: Error text.\n $this->error = _m(\"Sorry, we could not reach that feed. Please try that OStatus address again later.\");\n common_debug('Could not find a feed linked from this URL.', __FILE__);\n } catch (FeedSubUnrecognizedTypeException $e) {\n // TRANS: Error text.\n $this->error = _m(\"Sorry, we could not reach that feed. Please try that OStatus address again later.\");\n common_debug('Not a recognized feed type.', __FILE__);\n } catch (Exception $e) {\n // Any new ones we forgot about\n // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com\n // TRANS: and example.net, as these are official standard domain names for use in examples.\n $this->error = _m(\"Sorry, we could not reach that address. Please make sure that the OStatus address is like [email protected] or http://example.net/nickname.\");\n common_debug(sprintf('Bad feed URL: %s %s', get_class($e), $e->getMessage()), __FILE__);\n }\n\n return false;\n }", "public function testProfilePrototypeExistsOwnedGroups()\n {\n\n }", "public function profile()\n {\n return $this->belongsTo(UserProfile::class);\n }", "public function testProfilePrototypeUnlinkCommunityRoles()\n {\n\n }", "public function GetProfile()\n {\n return $this->profile;\n }", "function usr_has_profile($db, $uid) {\n $rv=0;\n $q='SELECT flags from user WHERE id='.intval($uid).';';\n $res=$db->query($q);\n if ($res) {\n $d=$res->fetch(PDO::FETCH_ASSOC);\n if ($d['flags'] & 1 ) $rv|=2;\n }\n $q='SELECT ukey from auth WHERE user_id='.intval($uid).';';\n $res=$db->query($q);\n if ($res) {\n $d=$res->fetch(PDO::FETCH_ASSOC);\n if (!empty($d['ukey'])) $rv|=1;\n }\n return $rv;\n }", "public function testProfilePrototypeExistsGroups()\n {\n\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "public function userProfile()\n {\n return $this->hasOne(config('aggregator.namespace').'UserProfile');\n }", "public function testProfilePrototypeCountCommunityRoles()\n {\n\n }", "public function testGetSiteMembershipForPerson()\n {\n }", "public function testGetInvalidAdultUsername() : void {\n// grab an email that does not exist\n$profile = Adult::getAdultByAdultUsername($this->getPDO(), \"yourmom\");\n$this->assertNull($profile);\n}", "public function get_profile($username = '')\n {\n\n\n if($username) $this->username = $username;\n\n $details = (Object) $this->user_details($this->username);\n\n $profile = $details->profile;\n\n $not_valid = !(!empty($profile) and FILE::isExist($profile,\"profile\"));\n\n if($not_valid) return;\n\n return $profile;\n\n\n }", "public function getProfile() {\n\t\treturn $this->profile;\n\t}", "public function testGetAccountProfileIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/profile')\n ->see('Account Privacy')\n ->see('SPONSORED')\n ->see('ADS')\n ->see('CALENDAR')\n ->see('Edit Profile Image')\n ->seePageIs('account/profile');\n }" ]
[ "0.7313183", "0.67644936", "0.6726738", "0.6717151", "0.6700389", "0.6694808", "0.65982246", "0.6515449", "0.6451861", "0.64039105", "0.63828796", "0.6347496", "0.633259", "0.62712973", "0.6269025", "0.6254397", "0.62381446", "0.62373203", "0.62109494", "0.6209512", "0.6182171", "0.61310464", "0.6123738", "0.61198866", "0.6104943", "0.60860723", "0.60764086", "0.6075769", "0.6061719", "0.60556525", "0.60330427", "0.60301334", "0.60262096", "0.6014576", "0.59970134", "0.5974442", "0.59577775", "0.59378994", "0.5933619", "0.59253734", "0.5905219", "0.58967644", "0.5878251", "0.5864204", "0.58561033", "0.58307725", "0.58231246", "0.5813854", "0.5785119", "0.57788926", "0.57758206", "0.5765962", "0.5761275", "0.5739738", "0.5731471", "0.5729835", "0.5726196", "0.5722767", "0.570885", "0.5689173", "0.5685643", "0.5683209", "0.56806386", "0.5669352", "0.5658494", "0.5642854", "0.5639504", "0.56308156", "0.56286156", "0.56187075", "0.56121975", "0.56077445", "0.56077445", "0.56077445", "0.5599683", "0.5586813", "0.55718744", "0.55559206", "0.55537915", "0.5543303", "0.5537626", "0.5536351", "0.5535563", "0.5531081", "0.55289346", "0.5523531", "0.55232054", "0.55208796", "0.55164826", "0.5514662", "0.55105966", "0.5502623", "0.5502499", "0.5501695", "0.5498554", "0.5498328", "0.5492072", "0.5490036", "0.54815406", "0.54786175" ]
0.7236867
1
test getting WP profile relation exists
public function testGetProfileWPPatientRel() { $url = "http://127.0.0.1/app_test.php/profile/view/vision-jones"; $username = '[email protected]'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Vision Jones', $response->body->data->user->name); $this->assertNotEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _assertProfileExists($profile_uid)\n {\n }", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "public function testProfileCheckIfUserExists()\n {\n\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "public function testExists()\n {\n $this->assertFalse($this->insight->accounts->exists(12345));\n $this->insight->accounts->addTrial(12345);\n $this->assertTrue($this->insight->accounts->exists(12345));\n }", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "public function testProfilePrototypeExistsCommunityRoles()\n {\n\n }", "public function exists() {\n\t\tglobal $wpdb, $bp;\n\n\t\t// Check cache first\n\t\t$cached = wp_cache_get( $this->field_id, 'bp_xprofile_data_' . $this->user_id );\n\n\t\tif ( $cached && ! empty( $cached->id ) ) {\n\t\t\t$retval = true;\n\t\t} else {\n\t\t\t$retval = $wpdb->get_row( $wpdb->prepare( \"SELECT id FROM {$bp->profile->table_name_data} WHERE user_id = %d AND field_id = %d\", $this->user_id, $this->field_id ) );\n\t\t}\n\n\t\treturn apply_filters_ref_array( 'xprofile_data_exists', array( (bool)$retval, $this ) );\n\t}", "public function testProfileFindOne()\n {\n\n }", "public function hasProfilePreLoaded()\n {\n return property_exists($this, 'profile') && ! is_null($this->profile);\n }", "public function hasProfilePicture()\n {\n $file = public_path('/images/players/') . $this->id . '.webp';\n return ( file_exists($file) ) ? true : false;\n }", "public function doesUserAssociationExist(){\r\n\t\tif($this->userDevices){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function testExists() {\n\t\t$table = TableRegistry::get('users');\n\t\t$this->assertTrue($table->exists(['id' => 1]));\n\t\t$this->assertFalse($table->exists(['id' => 501]));\n\t\t$this->assertTrue($table->exists(['id' => 3, 'username' => 'larry']));\n\t}", "public function testGetProfileWPNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/natasha-romanov\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Natasha Romanov', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "function hasProfilePicture()\n\t{\n\t\treturn $this->ppic;\n\t}", "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetInvalidProfileByProfileName() : void {\n\t\t// get a profile name that doesn't exist\n\t\t$profile = Profile::getProfileByProfileName($this->getPDO(), \"Invalid Profile Name\");\n\t\t$this->assertCount(0, $profile);\n\t}", "function at_follow_is_pro_user() {\n $isPro = false;\n $options = get_option('addthis_settings');\n $profile = $options['profile'];\n if ($profile) {\n $request = wp_remote_get( \"http://q.addthis.com/feeds/1.0/config.json?pubid=\" . $profile );\n $server_output = wp_remote_retrieve_body( $request );\n $array = json_decode($server_output);\n // check for pro user\n if (array_key_exists('_default',$array)) {\n $isPro = true;\n } else {\n $isPro = false;\n }\n }\n return $isPro;\n}", "private function checkProfile($profile)\n {\n if ($profile === null) {\n $profile = $this->getProfile();\n return $profile;\n } elseif ($this->getProfile()->getUsername() === $profile || $this->getDoorman()->isKitchenStaff() === true) {\n $profileRepository = $this->getDoctrine()->getRepository('MealzUserBundle:Profile');\n $profile = $profileRepository->find($profile);\n return $profile;\n }\n\n return null;\n }", "public function exists() {\n\t\tglobal $config;\n\t\t\n\t\tif(!empty($this->data['id']))\n\t\t\t$where = 'id = '.$this->data['id'];\n\t\telseif(!empty($this->data['fbid']))\n\t\t\t$where = 'fbid = '.$this->data['fbid'];\n\t\n\t\t$result = $config['database']->query(\"\n\t\t\tSELECT id\n\t\t\tFROM nuusers\n\t\t\tWHERE $where\n\t\t\tLIMIT 1\n\t\t\");\n\t\t\n\t\treturn $result->num_rows;\n\t}", "protected function exists() {}", "private function checkProfileExists($id)\n {\n $profile = Profile::find($id);\n if (!$profile) {\n throw new DomainException(self::MESSAGE_PROFILE_NOT_FOUND);\n }\n }", "public function hasWpUserId(){\n return $this->_has(7);\n }", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "private function checkingApiCanFetchAProfile($profile_id)\n {\n $api_profile=$this->api_request->get(\"profile\",\"single_profile\",$params=array('profile_id'=>$profile_id));\n return ($api_profile['user_id']==$profile_id);\n }", "public function hasUser();", "public function testProfilePrototypeExistsOwnedGroups()\n {\n\n }", "private function checkUserExistence() {\n\t\t\t\t$query = \"select count(email) as count from register where email='$this->email'\";\n\t\t\t\t$resource = returnQueryResult($query);\n\t\t\t\t$result = mysql_fetch_assoc($resource);\n\t\t\t\tif($result['count'] > 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "function wp_sub_user_exists_on_network( int $user_id, int $network_id ) : bool {\n\t$networks = (array) get_user_meta( $user_id, \\WP_SUB\\WP_Separate_User_Base::NETWORK_META_KEY, false );\n\t$networks = array_filter( $networks );\n\n\t$allowed = in_array( $network_id, $networks );\n\treturn apply_filters( 'wp_sub_user_exists_on_network', $allowed, $user_id, $network_id );\n}", "public function user_exists() {\n\t\t$user = $this->search(\"(uid=\".$this->user.\")\");\n\t\treturn $user !== false;\n\t}", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "public function testProfileFind()\n {\n\n }", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "private function userExist(){\n $result = $this->facebookModel->project(array(\"User_id\" => true, \"Current_city\" => true, \"_id\" => false))->get()->count();\n return $result;\n }", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function testGetInvalidProfileByProfileId () : void {\n\t\t// grab a profile id that doesn't exist?\n\t\t$invalidProfileId = generateUuidV4();\n\n\t\t$profile = Profile::getProfileByProfileId($this->getPDO() , \"$invalidProfileId\");\n\t\t$this->assertNull($profile);\n\t}", "public function testGetValidProfileByProfileName() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get Profile form database using profile name\n\t\t$results = Profile::getProfileByProfileName($this->getPDO(), $this->VALID_PROFILE_NAME);\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\n\t\t// make sure no other objects are contaminating the profile\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\FoodTruckFinder\\\\Profile\", $results);\n\n\t\t// make sure results are same as expected\n\t\t$pdoProfile = $results[0];\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "function wcs_do_subscriptions_exist() {\n\tglobal $wpdb;\n\t$sql = $wpdb->prepare( \"SELECT ID FROM {$wpdb->posts} WHERE post_type = %s LIMIT 1;\", 'shop_subscription' );\n\n\t// query is the fastest, every other built in method uses this. Plus, the return value is the number of rows found\n\t$num_rows_found = $wpdb->query( $sql );\n\n\treturn ( 0 !== $num_rows_found ) ? true: false;\n}", "public function photoExists(): bool\n {\n return Storage::disk($this->profilePhotoDisk())->exists($this->profile_photo_path);\n }", "static function user_already_has_a_relationship_with($user1, $user2) {\n global $con;\n\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `relationship` WHERE `user1` = \".$user1.\" AND `user2` = \".$user2.\";\";\n $query = mysqli_query($con, $sql);\n if (mysqli_fetch_object($query)->count == 0) {\n return false;\n }\n return true;\n }", "function isUserExistsByUsername($username) {\n $query = \"select * from user_profile_details WHERE username='{$username}' \";\n $result_set = mysql_query($query);\n\tif(isQuerySuccess($result_set)){\n\t\tif (mysql_num_rows($result_set) > 0) { \n\t\t\treturn true;\n\t\t} else { \n\t\t\treturn false;\n\t\t}\t\n\t} \n}", "public function userExists()\r\n {\r\n $sql = \"SELECT COUNT(*) FROM (SELECT * FROM doctors WHERE email = :email) AS subquery\";\r\n\r\n $query = $this->db_connection->prepare($sql);\r\n $query->bindValue(':email', $this->email);\r\n $query->execute();\r\n\r\n while($result_row = $query->fetch() ){\r\n if($result_row[0] == 1) return true;\r\n else return false;\r\n }\r\n\r\n return false; \r\n }", "public function isProfileCompleted() {\n\t\tif ($this->RelatedProductsAndServices()->count() == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (empty($this->Title) ||\n\t\t\tempty($this->Description) ||\n\t\t\tempty($this->PhoneNumber)\n\t\t) {\n\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "private function existsRule()\n {\n if (!empty($this->user())) {\n return '';\n }\n\n return 'exists:users';\n }", "function usr_has_profile($db, $uid) {\n $rv=0;\n $q='SELECT flags from user WHERE id='.intval($uid).';';\n $res=$db->query($q);\n if ($res) {\n $d=$res->fetch(PDO::FETCH_ASSOC);\n if ($d['flags'] & 1 ) $rv|=2;\n }\n $q='SELECT ukey from auth WHERE user_id='.intval($uid).';';\n $res=$db->query($q);\n if ($res) {\n $d=$res->fetch(PDO::FETCH_ASSOC);\n if (!empty($d['ukey'])) $rv|=1;\n }\n return $rv;\n }", "public function hasUser($id);", "public function testProfilePrototypeExistsGroups()\n {\n\n }", "function does_exists($id, $type) {\n\n global $course_id;\n switch ($type) {\n case 'forum':\n $sql = Database::get()->querySingle(\"SELECT id FROM forum\n WHERE id = ?d\n AND course_id = ?d\", $id, $course_id);\n break;\n case 'topic':\n $sql = Database::get()->querySingle(\"SELECT id FROM forum_topic\n WHERE id = ?d\", $id);\n break;\n }\n if (!$sql) {\n return 0;\n } else {\n return 1;\n }\n}", "public function bidirectional_relation_exists() {\n $this->db->query(\"SELECT * FROM user_relation WHERE (`from` = ? AND `to` = ?) OR (`from` = ? AND `to` = ?)\",\n array(\n $this->from,\n $this->to,\n $this->to,\n $this->from,\n ));\n\n if($this->db->count() > 0) {\n return $this->db->results()[0]->status;\n } else {\n return false;\n }\n }", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "private function generateProfile()\n {\n \t$profile = new Profile();\n \t$profile->firstname = $this->user_name_prefix . '_' . $this->faker->firstName;\n \t$profile->lastname = $this->faker->lastName;\n \t$profile->user_id = $this->userId;\n \t$profile->save(false);\n \treturn true;\n }", "function wp_sub_user_exists_on_site( int $user_id, int $site_id ) : bool {\n\t$allowed = in_array( $site_id, get_user_meta( $user_id, \\WP_SUB\\WP_Separate_User_Base::SITE_META_KEY, false ) );\n\n\treturn apply_filters( 'wp_sub_user_exists_on_network', $allowed, $user_id, $site_id );\n}", "public function testProfileIndexFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(new BlokkrUser());\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function testProfilePrototypeFindByIdPosts()\n {\n\n }", "public function testProfilePrototypeFindByIdCommunityRoles()\n {\n\n }", "public function testProfilePrototypeFindByIdQuarantines()\n {\n\n }", "function displayNameExists($display_name) {\n return valueExists('users', 'display_name', $display_name);\n}", "public function testGetInvalidProfileByProfileEmail() : void {\n\t\t// get an email that doesn't exist\n\t\t$profile = Profile::getProfileByProfileEmail($this->getPDO(), \"[email protected]\");\n\t\t$this->assertNull($profile);\n\t}", "function check_user_analytics_exist( $post ) {\n\n $form_id = get_post_meta( $post->ID, '_wpuf_form_id', true );\n $user_analytics_info = get_post_meta( $post->ID, 'user_analytics_info', true );\n\n if ( empty( $form_id ) && empty( $user_analytics_info ) ) {\n return false;\n }\n\n return true;\n }", "public function isExistingShop(): bool\n {\n $shop = ShopProfileEntity::findOne([\n 'user_id' => Yii::$app->request->post()['shop_id']]);\n if (!$shop) {\n $this->addError('user_id',\n Yii::t('app', 'Магазин не найден'));\n return false;\n } else {\n return true;\n }\n }", "function userIdExists($id) {\n return valueExists('users', 'id', $id);\n}", "public function isUserProfile(Model $model): bool\n {\n return isset($model->{$this->user_id_field}) && !is_null($model->{$this->user_id_field});\n }", "public function badPaymentProfile()\n {\n\n $payment_profile = $this->payment_profile()->first();\n\n if ($payment_profile === NULL)\n return TRUE;\n\n if (empty($payment_profile->stripe_customer))\n return TRUE;\n\n return FALSE;\n\n }", "public function testQuarantineCheckIfProfileIsQuarantined()\n {\n\n }", "public function testGetCustomerProfile()\n {\n self::testCreateCustomerProfile();\n\n $response = $this->gateway->getCustomerProfile($this->customerProfileId);\n\n $this->assertTrue($response->isSuccess());\n }", "public function getHasCompanyProfileAttribute()\n {\n return $this->profile_type == 'App\\Models\\CompanyProfile';\n }", "public function exists() {\n\t\treturn !isset($userData);\n\t}", "public function testProfilePrototypeFindByIdLikes()\n {\n\n }", "function hasGoal($username, $connect){\n$stmt = $connect->prepare(\"SELECT EXISTS(SELECT id FROM users WHERE goal IS NOT NULL AND username = ?)\");\n\tif($stmt){\n\t\t$stmt->bind_param(\"s\", $username);\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($exists);\n\t\t$stmt->fetch();\n\t\treturn $exists;\n}\n}", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function exists() {}", "static function checkExistingPropertyMembership(){\n\t global $mainframe,$configClass;\n $available_plans = self::getAllPlans();\n if(count($available_plans) > 0){\n foreach ($available_plans as $plan){\n $params = new JRegistry() ;\n $params->loadString($plan->params);\n $isOsproperty = $params->get('isospplugin',0);\n if($isOsproperty == 1){\n return true;\n }\n }\n }\n return false;\n }", "function randomUser_exists()\t{\n\t\treturn $this->recordNumber(self::RNDUSERSC_NAME) > 0;\n\t}", "function _checkIfSkuExists($sku, $connection_read){ \n $sql = \"SELECT COUNT(*) AS count_no FROM catalog_product_entity WHERE sku = ?\";\n $count = $connection_read->fetchOne($sql, array($sku));\n if($count > 0){\n return true;\n }else{\n return false;\n }\n}", "public function testProfilePrototypeFindByIdOwnedGroups()\n {\n\n }", "function name_exists($name){\n\t\t\t\n\t\t\t//var_dump($name);\n\t\t\tglobal $wpdb;\n\t\t\t$table = $wpdb->prefix.'users' ;\n\t\t\t$user_id = $wpdb->get_var( \"SELECT ID FROM $table WHERE user_login='$name'\" ) ;\n\t\t\t\n\t\t\t//return ($user_id) ? false: true ;\n\t\t\treturn $user_id ;\n\t\t}", "public function canGetRecurringProfileDetails()\r\n {\r\n return true;\r\n }", "public function hasPartinUsers(){\n return $this->_has(2);\n }", "public function testProfileInvalid()\n {\n $email = new Notification();\n $email->profile('derp');\n }", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"[email protected]\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "function wp_sub_user_exists( int $user_id, int $network = 0, int $site = 0 ) : bool {\n\t$callers = wp_list_pluck( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ), 'function' );\n\tarray_shift( $callers );\n\n\t// Prevent recursions\n\tif ( in_array( __FUNCTION__, $callers ) ) {\n\t\treturn true;\n\t}\n\n\t// Fill defaults\n\tif ( empty( $network ) ) {\n\t\t$network = get_current_site()->id;\n\t}\n\n\tif ( empty( $site ) ) {\n\t\t$site = get_current_blog_id();\n\t}\n\n\t$allowed = false;\n\n\tif ( is_super_admin( $user_id ) ) {\n\t\t$allowed = true;\n\t} else if ( wp_sub_user_exists_on_network( $user_id, $network ) ) {\n\t\t// Check if user can access network\n\t\t$allowed = true;\n\t} else if ( wp_sub_user_exists_on_site( $user_id, $site ) ) {\n\t\t// Check if user can access site\n\t\t$allowed = true;\n\t}\n\n\treturn apply_filters( 'wp_sub_user_exists', $allowed, $user_id, $network, $site );\n}", "public function canPopulateRelationTest()\n {\n $relationTest = new Relation(['test' => 'super']);\n\n $this->assertArrayHasKey('test', $relationTest->getData());\n }", "function _user_exists($username)\n {\n $this->where('username', $username);\n $user = $this->get('users');\n //return true/false\n if ($user)\n {\n return true;\n } else {\n return false;\n }\n }", "public function testExample()\n {\n $user = User::count();\n $profile = Profile:: count();\n $this->assertEquals($user,$profile);\n }", "public function has() {\n\t\t$userid = $this->get();\n\t\treturn ! empty( $userid );\n\t}", "public function testGetValidProfileById() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// grab the date from mySQL and enforce the fields match out expectations\n\t\t$pdoProfile = Profile::getProfileByProfileId($this->getPDO(), $profile->getProfileId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "public function profile_complete()\n\t{\n\t\t$profile_image = glob(\"uploads/avatar/\".$this->_user->id.\"*\");\n\t\treturn ( ! empty($this->_user->biography) AND !empty($profile_image));\n\t}", "public function testHasPage() {\n $this->assertEquals(1, $this->users->page());\n }", "function exists($conn, $fieldName, $fieldValue) {\n\t$sql = \"select count(*) from users where $fieldName='$fieldValue'\";\n\t$result = $conn->query($sql);\n\t$row = $result->fetch_assoc();\n\t$count = $row['count(*)'];\n\tif($count > 0) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function checkModel(): bool\n {\n if (is_null($this->profile)) throw new ProfileModelNotDefined();\n else return true;\n }", "public function hasLinkedIn(): bool;" ]
[ "0.7234199", "0.70396787", "0.6914464", "0.6808734", "0.6591236", "0.64913315", "0.64902526", "0.6340507", "0.62700504", "0.6224946", "0.6170685", "0.61643016", "0.6145755", "0.6134113", "0.6117112", "0.60914314", "0.59851086", "0.59708875", "0.5958153", "0.58984065", "0.5875424", "0.58487034", "0.5838145", "0.5826681", "0.5815953", "0.5807494", "0.5804596", "0.5770757", "0.5765809", "0.5744646", "0.5729708", "0.5709241", "0.57083106", "0.5698704", "0.5689583", "0.56865644", "0.5680184", "0.5680096", "0.56715596", "0.5663627", "0.56550646", "0.56539065", "0.5642456", "0.56316155", "0.562844", "0.56258154", "0.56243116", "0.5619315", "0.5613389", "0.5608473", "0.5604165", "0.55991215", "0.5593241", "0.5591065", "0.5573941", "0.55651826", "0.5557959", "0.5557959", "0.5557959", "0.5557959", "0.5557959", "0.55546474", "0.554805", "0.5543136", "0.5543077", "0.55366087", "0.5535012", "0.55271834", "0.5521461", "0.55212677", "0.55153984", "0.55133986", "0.5506686", "0.55064166", "0.5497661", "0.54975545", "0.5478823", "0.5478601", "0.5477032", "0.5462893", "0.5448994", "0.54452956", "0.54449147", "0.54342055", "0.54341435", "0.54308414", "0.5429359", "0.54286844", "0.54243046", "0.5421126", "0.541265", "0.5409878", "0.5407737", "0.54063654", "0.5398556", "0.5384813", "0.5384674", "0.53823966", "0.5375635", "0.53737605" ]
0.5386017
95
tests WP getting other user profile
public function testWPGetProfileOtherUserNoRel() { $url = "http://127.0.0.1/app_test.php/profile/view/bucky-barnes"; $username = '[email protected]'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Bucky Barnes', $response->body->data->user->name); $this->assertEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "abstract protected function getUserProfile();", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function getUserProfile();", "public function testGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/steve-rogers\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Steve Rogers', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "public function testGetProfileWPNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/natasha-romanov\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Natasha Romanov', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"[email protected]\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function testGetProfileOtherUserFriends()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bruce-banner\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bruce Banner', $response->body->data->user->name);\r\n $this->assertEquals(1, $response->body->data->relationships->isFriend);\r\n\r\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "public function testGuestNotAccessProfilePage()\n\t{\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\t}", "public function testGetAccountProfileIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/profile')\n ->see('Account Privacy')\n ->see('SPONSORED')\n ->see('ADS')\n ->see('CALENDAR')\n ->see('Edit Profile Image')\n ->seePageIs('account/profile');\n }", "function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }", "public function testProfileUnilogin()\n {\n\n }", "function get_profile($field, $user = \\false)\n {\n }", "public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }", "function at_follow_is_pro_user() {\n $isPro = false;\n $options = get_option('addthis_settings');\n $profile = $options['profile'];\n if ($profile) {\n $request = wp_remote_get( \"http://q.addthis.com/feeds/1.0/config.json?pubid=\" . $profile );\n $server_output = wp_remote_retrieve_body( $request );\n $array = json_decode($server_output);\n // check for pro user\n if (array_key_exists('_default',$array)) {\n $isPro = true;\n } else {\n $isPro = false;\n }\n }\n return $isPro;\n}", "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function InitOtherUser()\n {\n $login = trim( strip_tags( _v('login', '') ) );\n //if link has login\n if ($login)\n {\n if ($this->IsAuth() && $login==$this->mUserInfo['Name'])\n {\n //show current user profile\n $this->mOtherUserId = 0;\n return false; \n }\n else\n {\n $this->mOtherUserInfo = UserQuery::create()\n ->Select(array('Id', 'Email', 'Status', 'Pass', 'LastReload', 'FirstName', 'LastName', 'Name', 'Blocked', 'BlockReason', 'Country',\n 'Avatar', 'Location', 'HideLoc', 'About', 'BandName', 'Likes', 'Dob', 'Gender', 'YearsActive', 'Genres', 'Members', 'Website', 'Bio', 'RecordLabel', 'RecordLabelLink', 'UserPhone', 'State', 'HashTag', 'FbOn', 'TwOn', 'InOn'))\n ->where('LOWER(Name) = \"' . ToLower( $login ) . '\"')\n\t\t\t\t\t->filterByEmailConfirmed(1)\n\t\t\t\t\t->filterByBlocked(0)\n ->filterByStatus(1, '>=')->findOne();\n\n if (!empty($this->mOtherUserInfo)) \n {\n $this->mOtherUserId = $this->mOtherUserInfo['Id'];\n\n\t\t\t\t\t$genres_list = User::GetGenresList();\n\t\t\t\t\t\n\t\t\t\t\t$genresListArr = explode(',',$this->mOtherUserInfo['Genres']);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tforeach($genresListArr as $key=> $val)\n\t\t\t\t\t{\n\t\t\t\t\t\t$userGenres .= $genres_list[$val].'/';\n\t\t\t\t\t}\n\t\t\t\t\t$this->mOtherUserInfo['GenresList'] = trim($userGenres, '/');\t\n\n\t\t\t\t//Fellow count\n\t\t\t\t$this->mOtherUserInfo['FollowersCount'] = UserFollow::GetFollowersUserListCount($this->mOtherUserInfo['Id'], USER_FAN);\n\t\t\t\t\n\t\t\t\t$memTrack = unserialize($this->mOtherUserInfo['Members']);\t\t\t\n\t\t\t\t$this->mOtherUserInfo['Members'] = $memTrack[0];\n\t\t\t\t$this->mOtherUserInfo['Tracks'] = $memTrack[1];\n\n\t\t\t\t\t\t\t\t\t\t\n } else {\n\t\t\t\t\t$this->mOtherUserId = -1;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n return true;\n }\n }\n }", "function wpcom_vip_get_user_profile( $email_or_id ) {\n\n\tif ( is_numeric( $email_or_id ) ) {\n\t\t$user = get_user_by( 'id', $email_or_id );\n\t\tif ( ! $user )\n\t\t\treturn false;\n\n\t\t$email = $user->user_email;\n\t} elseif ( is_email( $email_or_id ) ) {\n\t\t$email = $email_or_id;\n\t} else {\n\t\t$user_login = sanitize_user( $email_or_id, true );\n\t\t$user = get_user_by( 'login', $user_login );\n\t\tif ( ! $user )\n\t\t\treturn;\n\n\t\t$email = $user->user_email;\n\t}\n\n\t$hashed_email = md5( strtolower( trim( $email ) ) );\n\t$profile_url = esc_url_raw( sprintf( '%s.gravatar.com/%s.php', ( is_ssl() ? 'https://secure' : 'http://www' ), $hashed_email ), array( 'http', 'https' ) );\n\n\t$profile = wpcom_vip_file_get_contents( $profile_url, 1, 900 );\n\tif ( $profile ) {\n\t\t$profile = unserialize( $profile );\n\n\t\tif ( is_array( $profile ) && ! empty( $profile['entry'] ) && is_array( $profile['entry'] ) ) {\n\t\t\t$profile = $profile['entry'][0];\n\t\t} else {\n\t\t\t$profile = false;\n\t\t}\n\t}\n\treturn $profile;\n}", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "function getUserProfile()\n\t{\n\t\t// refresh tokens if needed \n\t\t$this->refreshToken();\n\n\t\ttry{\n\t\t\t$authTest = $this->api->api( \"auth.test\" );\n\t\t\t$response = $this->api->get( \"users.info\", array( \"user\" => $authTest->user_id ) );\n\t\t}\n\t\tcatch( SlackException $e ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->user->id ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\t\t# store the user profile. \n\t\t$this->user->profile->identifier\t\t=\t@$response->user->id;\n\t\t$this->user->profile->profileURL\t\t=\t\"\";\n\t\t$this->user->profile->webSiteURL\t\t=\t\"\";\n\t\t$this->user->profile->photoURL\t\t\t=\t@$response->user->profile->image_original;\n\t\t$this->user->profile->displayName\t\t=\t@$response->user->profile->real_name;\n\t\t$this->user->profile->description\t\t=\t\"\";\n\t\t$this->user->profile->firstName\t\t\t=\t@$response->user->profile->first_name;\n\t\t$this->user->profile->lastName\t\t\t=\t@$response->user->profile->last_name;\n\t\t$this->user->profile->gender\t\t\t=\t\"\";\n\t\t$this->user->profile->language\t\t\t=\t\"\";\n\t\t$this->user->profile->age\t\t\t\t=\t\"\";\n\t\t$this->user->profile->birthDay\t\t\t=\t\"\";\n\t\t$this->user->profile->birthMonth\t\t=\t\"\";\n\t\t$this->user->profile->birthYear\t\t\t=\t\"\";\n\t\t$this->user->profile->email\t\t\t\t=\t@$response->user->profile->email;\n\t\t$this->user->profile->emailVerified\t =\t\"\";\n\t\t$this->user->profile->phone\t\t\t\t=\t\"\";\n\t\t$this->user->profile->address\t\t\t=\t\"\";\n\t\t$this->user->profile->country\t\t\t=\t\"\";\n\t\t$this->user->profile->region\t\t\t=\t\"\";\n\t\t$this->user->profile->city\t\t\t\t=\t\"\";\n\t\t$this->user->profile->zip\t\t\t\t=\t\"\";\n\n\t\treturn $this->user->profile;\n\t}", "public function testManagerNotAccessProfileUser()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextPresent('You don\\'t have access to this section.');\n\t}", "public function testProfileApp()\n {\n $client = static::createClient();\n $client->request('GET', '/candidate/profile');\n $this->assertEquals(301, $client->getResponse()->getStatusCode());\n\n //authenticated users are allowed\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile');\n $response = $client->getResponse();\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue(0 === strpos($response->getTargetUrl(), 'https'));\n\n //https and authentication loads page\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile', [], [], ['HTTPS' => true]);\n $this->assertTrue($crawler->filter('html:contains(\"Loading ...\")')->count() > 0);\n }", "public function testGetCustomerProfile()\n {\n self::testCreateCustomerProfile();\n\n $response = $this->gateway->getCustomerProfile($this->customerProfileId);\n\n $this->assertTrue($response->isSuccess());\n }", "private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "function getProfile(){\n\t\t\t\t$this->__dataDecode();\n\t\t\t\t$data=$this->data;\n\t\t\t\t$playerId = $data['User']['playerId'];\n\t\t\t\t$token = $data['User']['secToken'];\n\t\t\t\t//pr($token);die('ok');\n\t\t\t\t$playerdetails = $this->User->find('first', array('conditions' => array('User.id' => $playerId,'User.secToken' => $token)));\n\t\t\t\t\t\t//pr($playerdetails);die;\t\n\t\t\t\t\t\tif($playerdetails)\n\t\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t$response['error']\t\t\t= 0;\n\t\t\t\t\t\t$response['response']['firstName'] \t= $playerdetails['User']['firstname'];\n\t\t\t\t\t\t$response['response']['wieght'] \t= $playerdetails['User']['wieght'];\n\t\t\t\t\t\t$response['response']['school'] \t= $playerdetails['User']['school'];\n\t\t\t\t\t\t$response['response']['profilePicture'] = LIVE_SITE.'/img/upload_userImages/'.$playerdetails['User']['image'];\n\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\tdie();\n\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'UnAuthorized User';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\n}\n}", "public function testDestiny2GetLinkedProfiles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function getProfile($userid);", "public function testProfileFind()\n {\n\n }", "public function twitter_user_profile() {\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n $TwitterHelper = new TwitterHelperFunction();\n $properties = ['token_access'];\n $response_token = \\Drupal::service('social_media.social_media_controller')->getKabbodeNetworkStatusProperty(174, $current_uid, $properties);\n $connection = new TwitterOAuth($TwitterHelper->getTwitterApiKey(), $TwitterHelper->getTwitterSecretKey(), $response_token['token_access']->oauth_token, $response_token['token_access']->oauth_token_secret);\n $verify_account = $connection->get('account/verify_credentials');\n return $verify_account;\n }", "abstract function getUserProfileProperty($user, $property_name);", "public function getProfileAction()\n\t{\n\t\t// Find own profile by authorisation token\n\t\tif ($this->request->hasPost('token')) {\n\t\t\tif ($auth = AuthTokens::findFirstByToken($this->request->getPost('token'))) {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'message' => '',\n\t\t\t\t\t'user' => [\n\t\t\t\t\t\t'firstname' => $auth->users->userFirstname,\n\t\t\t\t\t\t'lastname' => $auth->users->userLastname,\n\t\t\t\t\t\t'prefix' => $auth->users->userPrefix,\n\t\t\t\t\t\t'phone' => $auth->users->userPhone,\n\t\t\t\t\t\t'email' => $auth->users->userEmail,\n\t\t\t\t\t\t'points' => $auth->users->userPoints,\n\t\t\t\t\t]\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn $this->reply->withFail(Response::ERROR_INVALID_AUTH);\n\t\t\t}\n\n\t\t// Find another profile by user id\n\t\t} else if (\n\t\t\t$this->request->hasPost('id') &&\n\t\t\tis_numeric($this->request->getPost('id'))\n\t\t) {\n\t\t\tif ($user = Users::findFirst($this->request->getPost('id'))) {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'message' => '',\n\t\t\t\t\t'user' => [\n\t\t\t\t\t\t'firstname' => $user->userFirstname,\n\t\t\t\t\t\t'lastname' => $user->userLastname,\n\t\t\t\t\t\t'prefix' => $user->userPrefix,\n\t\t\t\t\t\t'points' => $user->userPoints,\n\t\t\t\t\t]\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => false,\n\t\t\t\t\t'message' => 'Invalid user id.'\n\t\t\t\t]);\n\t\t\t}\n\n\t\t// Invalid parameters\n\t\t} else {\n\t\t\treturn $this->reply->withFail(Response::ERROR_INVALID_PARAMS);\n\t\t}\n\t}", "public function testProfileFindOne()\n {\n\n }", "function requestProfile() {\n $username = $_GET['username'];\n\n $response = retrieveProfile($username);\n\n if ($response['status'] == 'SUCCESS') {\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function getProfile()\n {\n return $this->request('me');\n }", "public function profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}", "public function testGetOneUserInformation()\n {\n $response = $this->json('GET', $this->userEndpoint.'/prostoalex');\n\n // It should return a valid user json with all the basic attributes filled\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'created',\n 'id',\n 'karma',\n 'submitted',\n 'about',\n ])\n ->assertJsonFragment([\n 'id' => 'prostoalex'\n ]);\n }", "public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "public static function getProfile($gotuser) {\n $assocprofile = User::with('profile')->find($gotuser->id)->profile;\n return $assocprofile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "private function checkProfile($profile)\n {\n if ($profile === null) {\n $profile = $this->getProfile();\n return $profile;\n } elseif ($this->getProfile()->getUsername() === $profile || $this->getDoorman()->isKitchenStaff() === true) {\n $profileRepository = $this->getDoctrine()->getRepository('MealzUserBundle:Profile');\n $profile = $profileRepository->find($profile);\n return $profile;\n }\n\n return null;\n }", "public function getUserProfile(){\n\n\t\treturn $this->cnuser->getUserProfile($this->request->header('Authorization'));\n\t}", "public function get_profile($user_profile_data){\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to get contents of user profile\n\t\t$user_profile_data = UserProfileHelper::get_user_profile($user_id);\n\t\treturn $user_profile_data;\n\t}", "function getUserProfile()\n\t{\n\t\t// ask kakao api for user infos\n\t\t$data = $this->api->api( \"user/me\" ); \n \n\t\tif ( ! isset( $data->id ) || isset( $data->error ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->id; \n\t\t$this->user->profile->displayName = @ $data->properties->nickname;\n\t\t$this->user->profile->photoURL = @ $data->properties->thumbnail_image;\n\n\t\treturn $this->user->profile;\n\t}", "public function testGetProfileUserNotExist()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/thor\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n //AppBundle:User object not found. (404 Not Found)\r\n $this->assertTrue($response->code === 404);\r\n\r\n }", "public function testUserMeGet()\n {\n }", "public function testGetAccountProfileOut()\n {\n // Grab Page\n $result = $this->visit('account/profile')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "function yz_profile() {\n\treturn Youzer_Profile::get_instance();\n}", "function getUserProfile()\n\t{\n\t\t$data = $this->api->api( \"v1/market/private/user/account.json\" );\n\t\tif ( ! isset( $data->account ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->account->surname;\n\t\t$this->user->profile->displayName = @ $data->account->firstname . ' ' . $data->account->surname;\n\t\t$this->user->profile->photoURL = @ $data->account->image;\n\t\t$this->user->profile->profileURL = @ $data->account->image;\n\n\t\t// request user emails from envato api\n\t\ttry{\n\t\t\t$email = $this->api->api(\"v1/market/private/user/email.json\");\n\t\t\t$this->user->profile->email = @ $email->email;\n\t\t}\n\t\tcatch( Exception $e ){\n\t\t\tthrow new Exception( \"User email request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}", "function user_user_profile($CI,$user){\n\t\t$CI->user->head($user);\n\t}", "protected function getSimulatingUser()\n {\n // Ideally, return Profile\n }", "public function profile(){\n // using the auth() helper we are returning the authenticated user info\n return auth('api')->user();\n }", "public function profile()\n\t{\n\t\t// echo $this->fungsi->user_login()->nik;\n\t\t$query = $this->user_m->get($this->fungsi->user_login()->nik);\n\t\t$data['data'] = $query->row();\n\t\t$this->template->load('template2', 'profile', $data);\n\t}", "function ds_get_social_profiles() {\n\n // Return a filterable social profile.\n return apply_filters(\n 'ds_social_profiles',\n array()\n );\n \n}", "public function testProfileIndexFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(new BlokkrUser());\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "public function testGetProfileNotLoggedIn()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $response = \\Httpful\\Request::get($url)->send();\r\n\r\n //ERROR Call to a member function getWellnessProfessional() on string (500 Internal Server Error)\r\n $this->assertEquals(302, $response->code);\r\n\r\n }", "function owa_wpAuthUser($auth_status) {\r\n\r\n\t$current_user = wp_get_current_user();\r\n\t\r\n if ( $current_user instanceof WP_User ) { \r\n \t// logged in, authenticated\r\n \t$cu = owa_coreAPI::getCurrentUser();\r\n \t\r\n \t$cu->setAuthStatus(true);\r\n \t\r\n \tif (isset($current_user->user_login)) {\r\n\t\t\t$cu->setUserData('user_id', $current_user->user_login);\r\n\t\t\towa_coreAPI::debug(\"Wordpress User_id: \".$current_user->user_login);\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($current_user->user_email)) {\t\r\n\t\t\t$cu->setUserData('email_address', $current_user->user_email);\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($current_user->first_name)) {\r\n\t\t\t$cu->setUserData('real_name', $current_user->first_name.' '.$current_user->last_name);\r\n\t\t\t$cu->setRole(owa_translate_role($current_user->roles));\r\n\t\t}\r\n\t\t\r\n\t\towa_coreAPI::debug(\"Wordpress User Role: \".print_r($current_user->roles, true));\r\n\t\towa_coreAPI::debug(\"Wordpress Translated OWA User Role: \".$cu->getRole());\r\n\t\t\r\n\t\t// fetch the list of allowed blogs from WP\r\n\t\t$domains = array();\r\n\t\t$allowedBlogs = get_blogs_of_user($current_user->ID);\r\n\t\r\n\t\tforeach ( $allowedBlogs as $blog) {\r\n\t\t\t$domains[] = $blog->siteurl;\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// check to see if we are installing before trying to load sites\r\n\t\t// other wise you run into a race condition as config file\r\n\t\t// might not be created.\r\n\t\tif (! defined('OWA_INSTALLING') ) {\r\n\t\t\t// load assigned sites list by domain\r\n \t\t$cu->loadAssignedSitesByDomain($domains);\r\n \t}\r\n \t\r\n\t\t$cu->setInitialized();\r\n \r\n \treturn true;\r\n \r\n } else {\r\n \t// not logged in to WP and therefor not authenticated\r\n \treturn false;\r\n }\t\r\n}", "public function GetProfile()\n {\n return $this->profile;\n }", "public function _assertProfileExists($profile_uid)\n {\n }", "public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes Drupal perfect. You should have no complaints.'\nPROFILE_TEST;\n\n vfsStream::setup('profiles');\n vfsStream::create([\n 'fixtures' => [\n 'invalid_profile.info.txt' => $profile,\n ],\n ]);\n $info = $this->infoParser->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));\n $this->assertFalse($info['core_incompatible']);\n }", "public function testVisitUserAccountProfilePageRedirectsToLogin()\n {\n $response = $this->call('GET', $this->accountProfilePageUrl);\n $response->assertRedirect('login');\n }", "public function getProfile() {\n\t\treturn $this->profile;\n\t}", "public function testProfilePrototypeGetCommunityRoles()\n {\n\n }", "function yz_hide_profile_settings_page_for_other_users() {\n\n if ( apply_filters( 'yz_hide_profile_settings_page_for_other_users', true ) ) {\n if ( bp_is_user() && ! is_super_admin() && ! bp_is_my_profile() ) {\n bp_core_remove_nav_item( bp_get_profile_slug() );\n }\n }\n\n}", "public function testUser1() {\n // Load the user 1 profile page.\n $this->drupalGet('/user/1');\n // Confirm the page title is correct.\n $this->assertRaw('<title>Access denied | ');\n $this->assertNoRaw('<title>admin | ');\n $this->assertNoRaw('<title>Site under maintenance | ');\n\n // Put the site into maintenance mode.\n \\Drupal::state()->set('system.maintenance_mode', TRUE);\n Cache::invalidateTags(['rendered']);\n\n // Load the user 1 profile page again.\n $this->drupalGet('/user/1');\n // Confirm the page title has changed.\n $this->assertNoRaw('<title>Access denied | ');\n $this->assertNoRaw('<title>admin | ');\n $this->assertRaw('<title>Site under maintenance | ');\n }", "function userdetail_callback() {\n\tif ( isset( $_REQUEST['security'] ) ) {\n\t\t$nonce = strval( wp_unslash( $_REQUEST['security'] ) );\n\t\tif ( wp_verify_nonce( $nonce, 'nonce_custom_endpoint' ) ) {\n\t\t\t$userid = isset( $_REQUEST['userid'] ) ? intval( $_REQUEST['userid'] ) : 0;\n\t\t\tif ( 0 !== $userid ) {\n\t\t\t\t$response = wp_remote_get( API_CALL_URL . 'users/' . $userid );\n\t\t\t\t$data['data']['error'] = '';\n\t\t\t\t$data['data'] = json_decode( $response['body'] );\n\n\t\t\t\techo wp_json_encode( $data );\n\t\t\t} else {\n\t\t\t\t$data['data'] = array( 'error' );\n\t\t\t\techo wp_json_encode( $data );\n\t\t\t}\n\t\t\twp_die();\n\t\t} else {\n\t\t\twp_die();\n\t\t}\n\t} else {\n\t\twp_die();\n\t}\n}", "function fetch_user_profile($data)\n {\n // $data['is_logged_in'] = 1;\n // $data = array('username' => $data);\n $this->load->library('encrypt');\n $profile = $this->db->get_where('user', array('email' => $data));\n if ($profile->num_rows() > 0) {\n $profile = $profile->row_array();\n $profile['avatar'] = ($profile['avatar'] != '' && file_exists('./uploads/ava/' . $profile['avatar'])) ? base_url() . 'uploads/ava/' . $profile['avatar'] : '';\n $profile['expire_date'] = ($profile['expire_date']) ? date('Y-m-d', $profile['expire_date']) : '';\n $profile['password'] = $this->encrypt->decode($profile['password']);\n $profile['city_name'] = db_get_one('ref_city', 'name', \"id = '\" . $profile['city'] . \"'\");;\n $profile['workshop_name'] = db_get_one('ref_location', 'location',\n \"id_ref_location = '\" . $profile['nearest_workshop'] . \"'\");;\n } else {\n $profile = false;\n }\n return $profile;\n }", "function action_profile_show() {\n // Process request with using of models\n $user = get_authorized_user();\n // Make Response Data\n if ($user !== NULL) {\n $data = [\n 'profile' => $user,\n ];\n return ['view' => 'user/show', 'data' => $data];\n } else {\n return error403();\n }\n}", "function GetUserProfileInfo($access_token) {\t\n\t\t$url = 'https://www.googleapis.com/plus/v1/people/me';\t\t\t\n\t\t\n\t\t$ch = curl_init();\t\t\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\t\t\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer '. $access_token));\n\t\t$data = json_decode(curl_exec($ch), true);\n\t\t$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\t\t\n\t\tif($http_code != 200) \n\t\t\tthrow new Exception('Error : Failed to get user information');\n\t\t\t\n\t\treturn $data;\n\t}", "public function index(){\n $this->existing_profile=$this->profile_model->read_highest_rank_profiles(1);\n \n //Fetch this profile with the api and ensure it matches\n $test_name=\"Checking API can be used to fetch the top profile\";\n $test1=$this->checkingApiCanFetchAProfile($this->existing_profile[0]['user_id']);\n $expected_result=TRUE;\n echo $this->unit->run($test1,$expected_result,$test_name,$notes=\"Assumes atleast 1 account is created\");\n\n //Fetch the same profile by searching for it using its first_name\n $test_name=\"Checking API can be used to fetch same profile using search\";\n $test2=$this->checkingApiCanFetchProfileUsingSearch($this->existing_profile[0]['first_name']);\n $expected_result=TRUE;\n echo $this->unit->run($test2,$expected_result,$test_name,$notes=\"Assumes first result found has identical first name\");\n \n }", "public function testProfilePrototypeGetPosts()\n {\n\n }", "function cacap_get_commons_profile_url( $user_id ) {\n\t$url = trailingslashit( bp_core_get_user_domain( $user_id ) . buddypress()->profile->slug );\n\t$url = add_query_arg( 'commons-profile', '1', $url );\n\treturn apply_filters( 'cacap_get_commons_profile_url', $url, $user_id );\n}", "public function forceProfilePage() {\n\t\t$user = wp_get_current_user();\n\t\tif ( ! is_object( $user ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$settings = Auth_Settings::instance();\n\t\tif ( $settings->force_auth != true ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//not enable for this role oass\n\t\tif ( ! Auth_API::isEnableForCurrentRole( $user ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//check if this role is forced\n\t\tif ( ! Auth_API::isForcedRole( $user ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//user already enable OTP\n\t\tif ( Auth_API::isUserEnableOTP( $user->ID ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$screen = get_current_screen();\n\t\tif ( $screen->id != 'profile' ) {\n\t\t\twp_safe_redirect( admin_url( 'profile.php' ) . '#show2AuthActivator' );\n\t\t\texit;\n\t\t}\n\t}", "function display_user_profile_fields() {\r\n global $wpdb, $user_id, $wpi_settings;\r\n $profileuser = get_user_to_edit($user_id);\r\n\r\n include($wpi_settings['admin']['ui_path'] . '/profile_page_content.php');\r\n }", "public function get_profile_details_view() {\n $html = '';\n if ( $this->get_access_token() ) {\n $uri = 'https://www.googleapis.com/oauth2/v2/userinfo';\n $params = array(\n 'sslverify' => false,\n 'timeout' => 60,\n 'headers' => array(\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->get_access_token(),\n ),\n );\n\n $response = wp_remote_get( $uri, $params );\n\n if ( !is_wp_error( $response ) && 200 == $response[ 'response' ][ 'code' ] && 'OK' == $response[ 'response' ][ 'message' ] ) {\n $body = json_decode( $response[ 'body' ] );\n $html = $this->get_view( 'profile-details.php', array( 'name' => $body->name, 'picture' => $body->picture ) );\n\n $this->debug( 'Profile Details retrieved successfully', $body );\n } else {\n $this->error( 'Error while retrieving user information: ', $response );\n }\n }\n\n return $html;\n }", "function do_personal()\r\n\t{\r\n\r\n\t\t$this->lib->do_profile();\r\n\r\n\t}", "function url_profile_user(int $wordpress_id): string\n{\n return \\admin_url(\"user-edit.php?user_id=$wordpress_id\");\n}", "public function get_profile($username = '')\n {\n\n\n if($username) $this->username = $username;\n\n $details = (Object) $this->user_details($this->username);\n\n $profile = $details->profile;\n\n $not_valid = !(!empty($profile) and FILE::isExist($profile,\"profile\"));\n\n if($not_valid) return;\n\n return $profile;\n\n\n }", "function is_pro_user($user_id = false) {\r\n\t\tglobal $wpdb, $current_user, $current_site;\r\n\r\n\t\tif ( !$user_id ) {\r\n\t\t\t$user_id = $current_user->ID;\r\n\t\t}\r\n $user_id = intval($user_id);\r\n\r\n\t\tif ( is_super_admin($user_id) )\r\n\t\t\treturn true;\r\n\r\n\t\t//very db intensive, so we cache (1 hour)\r\n\t\t$expire_time = time()-3600;\r\n\t\t@list($expire, $is_pro) = get_user_meta($user_id, 'psts_user', true);\r\n\t\tif ($expire && $expire >= $expire_time) {\r\n\t return $is_pro;\r\n\t }\r\n\r\n\t\t//TODO - add option to select which user levels from supporter blog will be supporter user. Right now it's all (>= Subscriber)\r\n\t\t//$results = $wpdb->get_results(\"SELECT * FROM `$wpdb->usermeta` WHERE `user_id` = $user_id AND `meta_key` LIKE 'wp_%_capabilities' AND `meta_value` LIKE '%administrator%'\");\r\n\t\t$results = $wpdb->get_results(\"SELECT * FROM `$wpdb->usermeta` WHERE `user_id` = $user_id AND `meta_key` LIKE '{$wpdb->base_prefix}%_capabilities'\");\r\n\t if (!$results) {\r\n\t //update cache\r\n\t update_user_meta($user_id, 'psts_user', array(time(), 0));\r\n\t return false;\r\n\t }\r\n\r\n\t foreach ($results as $row) {\r\n\t\t $tmp = explode('_', $row->meta_key);\r\n\t\t //skip main blog\r\n\t\t if ($tmp[1] != $current_site->blogid)\r\n\t $blog_ids[] = $tmp[1];\r\n\t }\r\n\t $blog_ids = implode(',',$blog_ids);\r\n\r\n\t $count = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE expire > '\" . time() . \"' AND blog_ID IN ($blog_ids)\");\r\n\t if ($count) {\r\n\t update_user_meta($user_id, 'psts_user', array(time(), 1)); //update cache\r\n\t return true;\r\n\t } else {\r\n\t //update cache\r\n\t update_user_meta($user_id, 'psts_user', array(time(), 0)); //update cache\r\n\t return false;\r\n\t }\r\n\t}", "private function getUser()\n {\n $userObj = new Core_Model_Users;\n return $userObj->profile();\n }", "function wponion_user_profile( $instance_id_or_args = array(), $fields = array() ) {\n\t\tif ( is_string( $instance_id_or_args ) && empty( $fields ) ) {\n\t\t\treturn wponion_user_profile_registry( $instance_id_or_args );\n\t\t}\n\t\treturn new User_Profile( $instance_id_or_args, $fields );\n\t}", "public function test_auth_code_redemption_with_profile() {\n\t\tstatic::$test_auth_code['scope'] = 'profile';\n\t\t$code = $this->set_auth_code();\n\t\t$response = $this->create_form( 'POST', \n\t\t\t\tarray(\n\t\t\t\t\t'grant_type' => 'authorization_code',\n\t\t\t\t\t'code' => $code,\n\t\t\t\t\t'client_id' => 'https://app.example.com',\n\t\t\t\t\t'redirect_uri' => 'https://app.example.com/redirect',\n\t\t\t\t)\n\t\t);\n\t\t$this->assertEquals( 200, $response->get_status(), 'Response: ' . wp_json_encode( $response ) );\n\t\t$data = $response->get_data();\n\t\t$this->assertArrayNotHasKey( 'access_token', $data );\n\t\t$this->assertEquals( \n\t\t\tarray( \n\t\t\t\t'me' => get_author_posts_url( static::$author_id ),\n\t\t\t\t'profile' => indieauth_get_user( static::$author_id )\n\t\t\t), \n\t\t\t$data, \n\t\t\t'Response: ' . wp_json_encode( $data ) \n\t\t);\n\t\t// Reset Just in Case.\n\t\tunset( static::$test_auth_code['scope'] );\n\t}", "function getProfileInfo($user){\n\t\tglobal $db;\n\t\t$sql = \"SELECT * from personalinfo WHERE user_email ='$user'\";\n\t\t$result =$db->query($sql);\n\t\t$infotable = $result->fetch_assoc();\n\t\treturn $infotable;\n\t}", "function get_user()\n{\n$response = $GLOBALS['http']->request('GET', '/api/users/@me', [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $_SESSION['auth_token']\n ]\n]);\n\n$responseBody = $response->getBody(true); \n$response = json_decode($responseBody, true);\n$_SESSION['username'] = $response['username'];\n$_SESSION['discrim'] = $response['discriminator'];\n$_SESSION['user_id'] = $response['id'];\n$_SESSION['user_avatar'] = $response['avatar'];\n}", "function get_user_profile_image_url($user_id){\n\t$image_url = THEME_URI.'/images/profile_placeholder.png';\n\tif($image_relative_path = get_user_meta($user_id, 'profile_image_url', true))\n\t{\n\t\t$image_url = $image_relative_path;\n\t}\n\treturn $image_url;\n}", "public function getProfile(){\n\t\treturn (new Profile($this->userName));\n\t}" ]
[ "0.7305726", "0.71837515", "0.7180283", "0.6933108", "0.68574077", "0.68501556", "0.677595", "0.6709536", "0.6694701", "0.6604053", "0.65933204", "0.6558116", "0.6557394", "0.65279", "0.63662887", "0.6222691", "0.62009585", "0.61989343", "0.61876166", "0.6178911", "0.61762846", "0.61620325", "0.61465234", "0.6114763", "0.6111513", "0.6109977", "0.6102795", "0.60959315", "0.607483", "0.60731614", "0.60644037", "0.6050501", "0.60295177", "0.60130143", "0.5999232", "0.5998012", "0.5996617", "0.5984902", "0.5983627", "0.5949577", "0.594888", "0.5944818", "0.59386945", "0.59330493", "0.5929517", "0.59206", "0.59201735", "0.59052324", "0.5888426", "0.5884268", "0.5882399", "0.5882332", "0.5882332", "0.5882332", "0.5882027", "0.58777475", "0.5859091", "0.5851809", "0.5850241", "0.58486986", "0.58303773", "0.5825635", "0.5823502", "0.5822003", "0.5818719", "0.5814187", "0.58113754", "0.58104575", "0.58046734", "0.58024716", "0.5802376", "0.57812977", "0.5776509", "0.5749566", "0.5749254", "0.5745833", "0.57433534", "0.57422614", "0.57340956", "0.5727083", "0.5718133", "0.5709912", "0.5704769", "0.5698479", "0.5694637", "0.5691343", "0.56812066", "0.5680195", "0.5676245", "0.5675002", "0.567254", "0.56603354", "0.56517035", "0.56468356", "0.5637612", "0.5637378", "0.5631102", "0.56288964", "0.56203645", "0.5612358" ]
0.77301717
0
test WP getting patient profile
public function testWPGetProfileOtherUserPatientRel() { $url = "http://127.0.0.1/app_test.php/profile/view/bucky-barnes"; $username = '[email protected]'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Bucky Barnes', $response->body->data->user->name); $this->assertEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGetProfileWPNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/natasha-romanov\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Natasha Romanov', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function testProfileFind()\n {\n\n }", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "public function testProfileUnilogin()\n {\n\n }", "public function testProfileFindOne()\n {\n\n }", "abstract protected function getUserProfile();", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"[email protected]\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "public function testProfilePrototypeGetPosts()\n {\n\n }", "public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function testProfilePrototypeFindByIdAccessTokens()\n {\n\n }", "public function testProfilePrototypeFindByIdPosts()\n {\n\n }", "public function testProfilePrototypeGetQuarantines()\n {\n\n }", "function do_personal()\r\n\t{\r\n\r\n\t\t$this->lib->do_profile();\r\n\r\n\t}", "public function testWebinarRegistrantGet()\n {\n }", "public function testProfileFindById()\n {\n\n }", "public function testGetSiteMembershipRequestForPerson()\n {\n }", "function get_profile_usrid($usrid){\r\n\t\r\n}", "public function getUserProfile();", "protected static function profilePageProvider()\n {\n $config = \\Codeception\\Configuration::config();\n $civiRemoteApi = new \\CiviRemoteApi($config['modules']['config']['CiviRemoteApi']);\n\n $params = [\n 'entity' => 'UFGroup',\n 'action' => 'get',\n 'is_active' => 1,\n 'is_reserved' => 0,\n // 'id' => 12,\n // group_type (comma separated list of contact types)\n //\n 'options' => [\n // 'limit' => 1,\n ],\n ];\n $profiles = $civiRemoteApi->CiviRemote($params);\n $examples = [];\n\n if (!empty($profiles['values'])) {\n // Iterate over pages to pick up payment processors.\n foreach ($profiles['values'] as $profile) {\n $example = [\n 'profile_id' => $profile['id'],\n 'profile_title' => $profile['title'],\n 'profile_url' => \"civicrm/profile/create?gid={$profile['id']}\",\n ];\n\n // Other profile setup?\n $examples[] = $example;\n }\n\n }\n return $examples;\n }", "public function testGetSelfServiceBrowserProfileManagementRequest()\n {\n }", "public function testFillProfile() {\n $user = factory(\\App\\Models\\User::class)->make();\n\n // Register with factory credentials\n $this->browse(function ($browser) use ($user) {\n $browser->visit('/register')\n ->type('name', $user->name)\n ->type('email', $user->email)\n ->type('password', $user->password)\n ->type('password_confirmation', $user->password)\n ->press('Register')\n // Should be able to see My Profile after authentication\n ->assertSee('My Profile');\n\n // Go to profile\n $browser->clickLink('My Profile')\n ->assertSee('About Me');\n\n // Go to My Experience, open accordion\n $browser->clickLink('My Experience')\n ->assertSee('My Experience')\n ->press('Add Diploma/Degree')\n ->assertSee('New Diploma/Degree');\n\n // Add a diploma\n $browser->select('#degrees\\5b new\\5d \\5b 1\\5d degreeType', '4')\n ->type('#degrees\\5b new\\5d \\5b 1\\5d degreeArea', 'Test area of study')\n ->type('#degrees\\5b new\\5d \\5b 1\\5d degreeInstitution', 'Test institution');\n // TODO: Selectors for date picker\n //->click('#degrees\\5b new\\5d \\5b 1\\5d degreeStartDate')\n //->type('#degrees\\5b new\\5d \\5b 1\\5d degreeStartDate', ['2017'], ['{tab}'], ['0717']);\n //->type('#degrees\\5b new\\5d \\5b 1\\5d degreeEndDate', '2018', ['{tab}'], '08', ['{tab}'], '18');\n\n $browser->script('window.scrollTo(0, 1000);');\n\n // Saved work sample name should be visible\n $browser->assertSee('Save Diploma/Degree')\n ->pause(777) // Fails without a short pause\n ->press('Save Diploma/Degree')\n ->assertSee('Phd, Test area of study');\n\n // TODO: Repeat for certification / equivalent experience\n //$browser->press('Add Course/Certification')\n // ->assertSee('New Course/Certification');\n\n // Go to My Skills page\n $browser->clickLink('My Skills')\n ->assertSee('My Skills')\n ->press('Add Skill')\n ->assertSee('New Skill');\n\n // Add a soft skill\n $browser->select('#skill_declarations\\5b new\\5d \\5b soft\\5d \\5b 1\\5d skillSelection', '24') // Select dropdown by value\n ->keys('#skill_declarations\\5b new\\5d \\5b soft\\5d \\5b 1\\5d skillSelection',\n ['{tab}'], ['{tab}'], ['{arrow_right}']) // Keyboard controls were necessary to select skill level properly\n ->type('#skill_declarations\\5b new\\5d \\5b soft\\5d \\5b 1\\5d skillDescription', 'Test skill description');\n\n $browser->script('window.scrollTo(0, 1000);');\n\n // Text corresponding to skill selection value should be visible\n $browser->assertSee('Save Skill')\n ->pause(777)\n ->press('Save Skill')\n ->assertSee('Passion');\n\n // TODO: Repeat for hard skill\n\n // Go to My References, open accordion\n $browser->clickLink('My References')\n ->assertSee('My References')\n ->press('Add Reference')\n ->assertSee('New Reference');\n\n // Add a reference\n $browser->type('#references\\5b new\\5d \\5b 1\\5d referenceName', 'Test Reference')\n ->select('#references\\5b new\\5d \\5b 1\\5d referenceRelationship') // Selects random if not specified\n ->type('#references\\5b new\\5d \\5b 1\\5d referenceEmail', '[email protected]')\n ->type('#references\\5b new\\5d \\5b 1\\5d referenceDescription', 'Test reference description');\n\n // Scroll down (button click will fail if not visible on test browser screen)\n $browser->script('window.scrollTo(0, 1000);');\n\n // Saved work sample name should be visible\n $browser->assertSee('Save Reference')\n ->pause(777) // Fails without a short pause\n ->press('Save Reference')\n ->assertSee('Test Reference');\n\n // Go to My Work Samples, open accordion\n $browser->clickLink('My Work Samples')\n ->assertSee('My Work Samples')\n ->press('Add Sample')\n ->assertSee('New Work Sample');\n\n // Add work sample data, wouln't work without copying the full selector\n $browser->type('#work_samples\\5b new\\5d \\5b 1\\5d sampleName', 'Test Sample')\n ->select('#work_samples\\5b new\\5d \\5b 1\\5d sampleType') // Selects random if not specified\n ->type('#work_samples\\5b new\\5d \\5b 1\\5d sampleLink', 'http://talent.canada.ca')\n ->type('#work_samples\\5b new\\5d \\5b 1\\5d sampleDescription', 'Test sample description');\n\n $browser->script('window.scrollTo(0, 1000);');\n\n // Saved work sample name should be visible\n $browser->assertSee('Save Sample')\n ->pause(777) // Fails without a short pause\n ->press('Save Sample')\n ->assertSee('Test Sample');\n\n });\n }", "public function testProfileInvalid()\n {\n $email = new Notification();\n $email->profile('derp');\n }", "private function GetFakeInstructorProfile()\n\t{\n\t\t# Creates a fake instructor profile since database does not \n\t\t# currently have instructor information in it.\n\t\t\n\t\t$record = array(\n\t\t\t'name' => 'Selma Louise',\n 'picture' => 'instructor_53456.gif',\n //'location' => 'Boston, MA',\n //'experience' => '5',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque bibendum metus vitae urna interdum faucibus. Proin euismod faucibus purus, dapibus luctus mi tincidunt sit amet. Mauris consectetur tincidunt molestie. Aliquam erat volutpat. Quisque nulla libero, tincidunt sed convallis at, tincidunt vitae diam. Nulla nibh arcu, viverra a consectetur sed, facilisis aliquam orci. Ut ullamcorper lectus eget odio ullamcorper mattis. Phasellus ac turpis leo, vel porttitor ipsum. Aliquam facilisis est vel tellus vulputate id faucibus risus gravida. Sed ut nisl id ante hendrerit aliquam.',\n 'types' => '',\n\t\t);\n\t\t\n\t\t$this->profile = $record;\n\t}", "public function testProfilePrototypeFindByIdQuarantines()\n {\n\n }", "public function testProfileCreate()\n {\n\n }", "public function testGetOneUserInformation()\n {\n $response = $this->json('GET', $this->userEndpoint.'/prostoalex');\n\n // It should return a valid user json with all the basic attributes filled\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'created',\n 'id',\n 'karma',\n 'submitted',\n 'about',\n ])\n ->assertJsonFragment([\n 'id' => 'prostoalex'\n ]);\n }", "public function testGetInstitutionsUsingGET()\n {\n }", "public function _assertProfileExists($profile_uid)\n {\n }", "public function testListSiteMembershipsForPerson()\n {\n }", "public function testGetCustomerProfile()\n {\n self::testCreateCustomerProfile();\n\n $response = $this->gateway->getCustomerProfile($this->customerProfileId);\n\n $this->assertTrue($response->isSuccess());\n }", "public function testGetSiteMembershipForPerson()\n {\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "function get_profile($field, $user = \\false)\n {\n }", "public function testProfilePrototypeGetReviews()\n {\n\n }", "public function testProfileApp()\n {\n $client = static::createClient();\n $client->request('GET', '/candidate/profile');\n $this->assertEquals(301, $client->getResponse()->getStatusCode());\n\n //authenticated users are allowed\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile');\n $response = $client->getResponse();\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue(0 === strpos($response->getTargetUrl(), 'https'));\n\n //https and authentication loads page\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile', [], [], ['HTTPS' => true]);\n $this->assertTrue($crawler->filter('html:contains(\"Loading ...\")')->count() > 0);\n }", "private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }", "public function testInfoUser()\n {\n }", "public function profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}", "public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes Drupal perfect. You should have no complaints.'\nPROFILE_TEST;\n\n vfsStream::setup('profiles');\n vfsStream::create([\n 'fixtures' => [\n 'invalid_profile.info.txt' => $profile,\n ],\n ]);\n $info = $this->infoParser->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));\n $this->assertFalse($info['core_incompatible']);\n }", "public function controlProfile(){\n\t\t$profilePage = \\Utility\\Singleton::getInstance('\\View\\Main');\n\t\t$data=\"\";\n\t\t\n\t\tswitch($profilePage->get('profileAction'))\n\t\t{\t\n\t\t\tcase 'hasAlreadyVoted':\n\t\t\t\t$data=$this->hasVoted();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'getProfilePage':\n\t\t\t\t$data=$this->setProfileInformation();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'rateUser':\n\t\t\t\t$data=$this->rateUser();\n\t\t\t\tbreak;\n\n\t\t}\n\t\n\t\treturn $data;\n\t\t\n\t}", "public function testProfilePrototypeGetAccessTokens()\n {\n\n }", "public function setProfileInformation()\n {\n $view = \\Utility\\Singleton::getInstance(\"\\View\\Main\");\n\t\t$username=$view->get('userProfile');\n\t\t$this->getUserInformations($view,$username);\n\t\t$this->setResourcesUploaded($view,$username);\n\t\treturn $view->fetch('profile.tpl');\n\t}", "public function renderMemberProfile($string) {\r\n\t$ids = explode('-', $string);\r\n\t$kid = $ids[0];\r\n\ttry {\r\n\t $userData = $this->getUserModel()->getUserByKid((int) $kid);\r\n\t $profileData = $this->getUserModel()->getWebProfilesFluent((int) $kid)->execute()->fetch();\r\n\t} catch (Exception $ex) {\r\n\t $this->flashMessage('Omlouváme se, ale požadovaná data nelze získat. Zkuste to prosím znovu nebo později.', 'error');\r\n\t Debugger::log($ex->getMessage(), Debugger::ERROR);\r\n\t $this->redirect('Homepage:default');\r\n\t}\r\n\r\n\tdump(\"PICTURE\");\r\n\r\n\t$this->template->profile_req = $userData->profile_required;\r\n\r\n\r\n\t$this->template->publicData = array('name' => $userData->name,\r\n\t 'surname' => $userData->surname,\r\n\t 'year' => $userData->year,\r\n\t 'nick' => $userData->nick,\r\n\t 'signature' => $userData->signature,\r\n\t 'city' => $userData->city);\r\n\t$profileData->offsetUnset('kid');\r\n\t$profileData->offsetUnset('city');\r\n\t$profileData->offsetUnset('job');\r\n\t$profileData->offsetUnset('last_updated');\r\n\t$profileData->offsetUnset('contact');\r\n\t$this->template->profileData = $profileData;\r\n\r\n\t// TODO rights 0 1 2\r\n\t$this->template->levelOneData = array('job' => $userData->job,\r\n\t 'phone' => $userData->phone);\r\n\r\n\t// TODO rights 3 4\r\n\t$this->template->levelTwoData = array('address' => $userData->address,\r\n\t 'postalCode' => $userData->postal_code,\r\n\t 'contName' => $userData->contperson_name,\r\n\t 'contPhone' => $userData->contperson_phone,\r\n\t 'contEmail' => $userData->contperson_email);\r\n }", "public function testListSiteMembershipRequestsForPerson()\n {\n }", "public function profile()\n\t{\n\t\t// echo $this->fungsi->user_login()->nik;\n\t\t$query = $this->user_m->get($this->fungsi->user_login()->nik);\n\t\t$data['data'] = $query->row();\n\t\t$this->template->load('template2', 'profile', $data);\n\t}", "public function testProfileCount()\n {\n\n }", "public function testProfilePrototypeGetComments()\n {\n\n }", "public function testProfilePrototypeCreatePosts()\n {\n\n }", "public function testProfilePrototypeGetGroups()\n {\n\n }", "public function tutorPublicProfile() {\n\t\t$this->isLoggedIn();\n\t\t//assign public class values to function variable\n\t\t$data = $this->data;\n\t\t$data['common_data'] = $this->common_data;\n\t\t$data['page'] = 'tutor_public_profile';\n\t\t$data['pageName'] = 'My Tutor Profile (Public)';\n\t\t$tutor_id = $data['common_data']['user_id'];\n/*\t\tif($tutor_id != $data['common_data']['user_id']){\n\t\t\tshow_404();\n\t\t\tdie();\n\t\t}*/\n\t\t// get tutor details\n\t\t$data['tutor_details'] = $this->profile_model->getTutorDetailsById($tutor_id);\n\t\tif($data['common_data']['user_data']['role'] == INACTIVE_STATUS_ID){\n\t\t\theader(\"Location: \".ROUTE_PROFILE);\n\t\t\tdie();\n\t\t}\n\t\t// get main subjects and sub subjects\n\t\t$data['main_subjects'] = $this->profile_model->getMainSubjects();\n\t\tif(!empty($data['main_subjects'])){\n\t\t\tforeach($data['main_subjects'] as $key=>$row){\n\t\t\t\t$data['main_subjects'][$key]['subjects'] = $this->profile_model->getSubjectsByMainId($row['id']);\n\t\t\t}\n\t\t}\n\t\tif(empty($data['tutor_details'])){\n\t\t\t$level_type = ($data['common_data']['user_data']['role'] == STUDENT)? OPEN_STAR:TIER;\n\t\t\t// get level\n\t\t\t$data['tutor_level'] = $this->profile_model->getTutorFirstLevel($level_type);\n\t\t\tif(!empty($data['tutor_level'])){\n\t\t\t\t$this->profile_model->saveTutorLevel($data['common_data']['user_id'],$data['tutor_level']['id']);\n\t\t\t\t$this->profile_model->saveTutorLevelinDetail($data['common_data']['user_id'],$data['tutor_level']['id']);\n\t\t\t}\n\t\t} else {\n\t\t\t// get level\n\t\t\t$data['tutor_level'] = $this->profile_model->getLevelById($data['tutor_details']['level_id']);\n\t\t\t// get subjects\n\t\t\t$data['tutor_details']['subjects'] = $this->profile_model->getSubjectsByTutorId($tutor_id);\n\t\t\t// get avaiability\n\t\t\t$availability = $this->profile_model->getAvailabilityByTutorId($tutor_id);\n\t\t\t$index = 0;\n\t\t\tforeach ($availability as $row){\n//\t\t\t\t$data['tutor_details']['availability'][$row['day_available']]['times'][$index] = $row['time_available'];\n\t\t\t\t$data['tutor_details']['availability'][$row['day_available']]['times'][$row['id']] = $row['time_available'];\n\t\t\t\t$index++;\n\t\t\t}\n\t\t\t// get avaiability\n\t\t\t$group_availability = $this->profile_model->getGroupAvailabilityByTutorId($tutor_id);\n\t\t\t$g_index = 0;\n\t\t\tforeach ($group_availability as $row){\n//\t\t\t\t$data['tutor_details']['group_availability'][$row['day_available']]['times'][$g_index] = $row['time_available'];\n\t\t\t\t$data['tutor_details']['group_availability'][$row['day_available']]['times'][$row['id']] = $row['time_available'];\n\t\t\t\t$data['tutor_details']['group_availability'][$row['day_available']]['no_of_students'] = $row['seats'];\n\t\t\t\t$data['tutor_details']['group_availability'][$row['day_available']]['syllabus'] = $row['syllabus'];\n\t\t\t\t$g_index++;\n\t\t\t}\n\t\t}\n\t\t//Getting all payment details\n\t\t$data['payment_details'] = $this->payment_model->getPaymentDetailsById($data['common_data']['user_id']);\n\t\t$data['teaching_levels'] = $this->profile_model->getTeachingLevels();\n\t\t$data['tutor_badges'] = $this->user_model->getTutorBadges($data['common_data']['user_id']);\n\t\t$data['badges'] = $this->user_model->getBadges();\n\n\t\t$data['page'] = 'tutor-public-profile';\n\t\t$data['countries'] = $this->user_model->getCountries();\n\t\t$template['body_content'] = $this->load->view('frontend/profile/tutor-public-profile', $data, true);\t\n\t\t$this->load->view('frontend/layouts/template', $template, false);\t\t\n\t}", "public function testGetInstitutionUsingGET()\n {\n }", "public function testProfilePrototypeFindByIdReviews()\n {\n\n }", "function requestProfile() {\n $username = $_GET['username'];\n\n $response = retrieveProfile($username);\n\n if ($response['status'] == 'SUCCESS') {\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }", "public function getPersonal();", "public function testGetVoicemailUserpolicy()\n {\n }", "public function testGetInvalidAdultUsername() : void {\n// grab an email that does not exist\n$profile = Adult::getAdultByAdultUsername($this->getPDO(), \"yourmom\");\n$this->assertNull($profile);\n}", "function personal()\r\n\t{\r\n\t\tglobal $ibforums, $std, $print;\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Check to make sure that we can edit profiles..\r\n\t\t//-----------------------------------------------\r\n\r\n\t\tif (empty($ibforums->member['g_edit_profile']))\r\n\t\t{\r\n\t\t\t$std->Error(array('LEVEL' => 1, 'MSG' => 'cant_use_feature'));\r\n\t\t}\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Format the birthday drop boxes..\r\n\t\t//-----------------------------------------------\r\n\r\n\t\t$date = getdate();\r\n\r\n\t\t$day = \"<option value='0'>--</option>\";\r\n\t\t$mon = \"<option value='0'>--</option>\";\r\n\t\t$year = \"<option value='0'>--</option>\";\r\n\r\n\t\tfor ($i = 1; $i < 32; $i++)\r\n\t\t{\r\n\t\t\t$day .= \"<option value='$i'\";\r\n\r\n\t\t\t$day .= $i == $this->member['bday_day']\r\n\t\t\t\t? \"selected>$i</option>\"\r\n\t\t\t\t: \">$i</option>\";\r\n\t\t}\r\n\r\n\t\tfor ($i = 1; $i < 13; $i++)\r\n\t\t{\r\n\t\t\t$mon .= \"<option value='$i'\";\r\n\r\n\t\t\t$mon .= $i == $this->member['bday_month']\r\n\t\t\t\t? \"selected>{$ibforums->lang['month'.$i]}</option>\"\r\n\t\t\t\t: \">{$ibforums->lang['month'.$i]}</option>\";\r\n\t\t}\r\n\r\n\t\tfor ($i = $date['year'] - 1, $j = $date['year'] - 100; $j < $i; $i--)\r\n\t\t{\r\n\t\t\t$year .= \"<option value='$i'\";\r\n\r\n\t\t\t$year .= $i == $this->member['bday_year']\r\n\t\t\t\t? \"selected>$i</option>\"\r\n\t\t\t\t: \">$i</option>\";\r\n\t\t}\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Custom profile fields stuff\r\n\t\t//-----------------------------------------------\r\n\r\n\t\t$required_output = \"\";\r\n\t\t$optional_output = \"\";\r\n\t\t$field_data = array();\r\n\r\n\t\t$stmt = $ibforums->db->query(\r\n\t\t \"SELECT *\r\n\t\t\tFROM ibf_pfields_content\r\n WHERE member_id='\" . $ibforums->member['id'] . \"'\"\r\n );\r\n\r\n\t\twhile ($content = $stmt->fetch())\r\n\t\t{\r\n\t\t\tforeach ($content as $k => $v)\r\n\t\t\t{\r\n\t\t\t\tif (preg_match(\"/^field_(\\d+)$/\", $k, $match))\r\n\t\t\t\t{\r\n\t\t\t\t\t$field_data[$match[1]] = $v;\r\n\t\t\t\t\t//break;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$stmt = $ibforums->db->query(\r\n\t\t \"SELECT *\r\n\t\t\tFROM ibf_pfields_data\r\n WHERE fedit=1\r\n\t\t\tORDER BY forder\"\r\n );\r\n\r\n\t\twhile ($row = $stmt->fetch())\r\n\t\t{\r\n\t\t\t$form_element = \"\";\r\n\r\n\t\t\tif ($row['freq'] == 1)\r\n\t\t\t{\r\n\t\t\t\t$ftype = 'required_output';\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\t$ftype = 'optional_output';\r\n\t\t\t}\r\n\r\n\t\t\tif ($row['ftype'] == 'drop')\r\n\t\t\t{\r\n\t\t\t\t$carray = explode('|', trim($row['fcontent']));\r\n\r\n\t\t\t\t$d_content = \"\";\r\n\r\n\t\t\t\tforeach ($carray as $entry)\r\n\t\t\t\t{\r\n\t\t\t\t\t$value = explode('=', $entry);\r\n\r\n\t\t\t\t\t$ov = trim($value[0]);\r\n\t\t\t\t\t$td = trim($value[1]);\r\n\r\n\t\t\t\t\tif ($ov != \"\" and $td != \"\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$d_content .= ($field_data[$row['fid']] == $ov)\r\n\t\t\t\t\t\t\t? \"<option value='$ov' selected>$td</option>\\n\"\r\n\t\t\t\t\t\t\t: \"<option value='$ov'>$td</option>\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($d_content != \"\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$form_element = View::make(\r\n\t\t\t\t\t\t\"ucp.field_dropdown\",\r\n\t\t\t\t\t\t['name' => 'field_' . $row['fid'], 'options' => $d_content]\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif ($row['ftype'] == 'area')\r\n\t\t\t\t{\r\n\t\t\t\t\t$form_element = View::make(\r\n\t\t\t\t\t\t\"ucp.field_textarea\",\r\n\t\t\t\t\t\t['name' => 'field_' . $row['fid'], 'value' => $field_data[$row['fid']]]\r\n\t\t\t\t\t);\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\t$form_element = View::make(\r\n\t\t\t\t\t\t\"ucp.field_textinput\",\r\n\t\t\t\t\t\t['name' => 'field_' . $row['fid'], 'value' => $field_data[$row['fid']]]\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t${$ftype} .= View::make(\r\n\t\t\t\t\"ucp.field_entry\",\r\n\t\t\t\t['title' => $row['ftitle'], 'desc' => $row['fdesc'], 'content' => $form_element]\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Format the interest / location boxes\r\n\t\t//-----------------------------------------------\r\n\r\n\t\t$this->member['location'] = $this->parser->unconvert($this->member['location']);\r\n\t\t$this->member['interests'] = $this->parser->unconvert($this->member['interests']);\r\n\r\n\t\t$this->member['key'] = $this->md5_check;\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Suck up the HTML and swop some tags if need be\r\n\t\t//-----------------------------------------------\r\n\r\n\t\t$this->output .= View::make(\"ucp.personal_panel\", ['Profile' => $this->member]);\r\n\r\n\t\tif (($ibforums->vars['post_titlechange'] and $this->member['posts'] > $ibforums->vars['post_titlechange']) or\r\n\t\t ($ibforums->vars['rep_titlechange'] and $this->member['rep'] >= $ibforums->vars['rep_titlechange'])\r\n\t\t)\r\n\t\t{\r\n\t\t\t$t_html = View::make(\"ucp.member_title\", ['title' => $this->member['title']]);\r\n\t\t\t$this->output = preg_replace(\"/<!--\\{MEMBERTITLE\\}-->/\", $t_html, $this->output);\r\n\t\t}\r\n\r\n\t\t$t_html = View::make(\"ucp.birthday\", ['day' => $day, 'month' => $mon, 'year' => $year]);\r\n\r\n\t\t$this->output = preg_replace(\"/<!--\\{BIRTHDAY\\}-->/\", $t_html, $this->output);\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Format the Gender radio buttons..\r\n\t\t//-----------------------------------------------\r\n\r\n\t\t$t_html = View::make(\"ucp.gender\", ['gender' => $this->member['gender']]);\r\n\r\n\t\t$this->output = preg_replace(\"/<!--\\{GENDER\\}-->/\", $t_html, $this->output);\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Add in the custom fields if we need to.\r\n\t\t//-----------------------------------------------\r\n\r\n\t\t//echo \"required_output =\".$required_output.\"<br>\";\r\n\r\n\t\tif ($required_output != \"\")\r\n\t\t{\r\n\t\t\t$this->output = str_replace(\"<!--{REQUIRED.FIELDS}-->\", View::make(\r\n\t\t\t\t\t\"ucp.required_title\"\r\n\t\t\t\t) . \"\\n\" . View::make(\r\n\t\t\t\t\t\"ucp.personal_panel_username\",\r\n\t\t\t\t\t['name' => $this->member['name']]\r\n\t\t\t\t) . \"\\n\" . $required_output . View::make(\"ucp.required_end\"), $this->output);\r\n\t\t}\r\n\r\n\t\tif ($optional_output != \"\")\r\n\t\t{\r\n\t\t\t$this->output = str_replace(\"<!--{OPTIONAL.FIELDS}-->\", \"\\n\" . $optional_output, $this->output);\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\t}", "public function testQuarantineCheckIfProfileIsQuarantined()\n {\n\n }", "public function testGuestNotAccessProfilePage()\n\t{\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\t}", "public function testGetAccountProfileIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/profile')\n ->see('Account Privacy')\n ->see('SPONSORED')\n ->see('ADS')\n ->see('CALENDAR')\n ->see('Edit Profile Image')\n ->seePageIs('account/profile');\n }", "public function testProfilePrototypeFindByIdGroups()\n {\n\n }", "function profile_info() {\n $parameters = array(\n 'method' => __FUNCTION__\n );\n return $this->get_data($parameters);\n }", "public function testGetInvalidProfileByProfileId () : void {\n\t\t// grab a profile id that doesn't exist?\n\t\t$invalidProfileId = generateUuidV4();\n\n\t\t$profile = Profile::getProfileByProfileId($this->getPDO() , \"$invalidProfileId\");\n\t\t$this->assertNull($profile);\n\t}", "public function testGetProfileNotLoggedIn()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $response = \\Httpful\\Request::get($url)->send();\r\n\r\n //ERROR Call to a member function getWellnessProfessional() on string (500 Internal Server Error)\r\n $this->assertEquals(302, $response->code);\r\n\r\n }", "public function get_profile_details_view() {\n $html = '';\n if ( $this->get_access_token() ) {\n $uri = 'https://www.googleapis.com/oauth2/v2/userinfo';\n $params = array(\n 'sslverify' => false,\n 'timeout' => 60,\n 'headers' => array(\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->get_access_token(),\n ),\n );\n\n $response = wp_remote_get( $uri, $params );\n\n if ( !is_wp_error( $response ) && 200 == $response[ 'response' ][ 'code' ] && 'OK' == $response[ 'response' ][ 'message' ] ) {\n $body = json_decode( $response[ 'body' ] );\n $html = $this->get_view( 'profile-details.php', array( 'name' => $body->name, 'picture' => $body->picture ) );\n\n $this->debug( 'Profile Details retrieved successfully', $body );\n } else {\n $this->error( 'Error while retrieving user information: ', $response );\n }\n }\n\n return $html;\n }", "public function testProfilePrototypeUpdateByIdAccessTokens()\n {\n\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function test_admin_monitoring()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Home', 'member_dsc_summary']);\n $this->assertResponseCode(404);\n }", "public function index(){\n $this->existing_profile=$this->profile_model->read_highest_rank_profiles(1);\n \n //Fetch this profile with the api and ensure it matches\n $test_name=\"Checking API can be used to fetch the top profile\";\n $test1=$this->checkingApiCanFetchAProfile($this->existing_profile[0]['user_id']);\n $expected_result=TRUE;\n echo $this->unit->run($test1,$expected_result,$test_name,$notes=\"Assumes atleast 1 account is created\");\n\n //Fetch the same profile by searching for it using its first_name\n $test_name=\"Checking API can be used to fetch same profile using search\";\n $test2=$this->checkingApiCanFetchProfileUsingSearch($this->existing_profile[0]['first_name']);\n $expected_result=TRUE;\n echo $this->unit->run($test2,$expected_result,$test_name,$notes=\"Assumes first result found has identical first name\");\n \n }", "public function testProfileTitle()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see(trans('profile.title', ['username'=>'johndoe']));\n }", "public function testGetAccountProfileOut()\n {\n // Grab Page\n $result = $this->visit('account/profile')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testProfilePrototypeGetImage()\n {\n\n }", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function testGetInvalidProfileByProfileName() : void {\n\t\t// get a profile name that doesn't exist\n\t\t$profile = Profile::getProfileByProfileName($this->getPDO(), \"Invalid Profile Name\");\n\t\t$this->assertCount(0, $profile);\n\t}", "function callSample(): void\n{\n $formattedParent = ProfileServiceClient::tenantName('[PROJECT]', '[TENANT]');\n\n search_profiles_sample($formattedParent);\n}", "public function testGetInvalidProfileByProfileEmail() : void {\n\t\t// get an email that doesn't exist\n\t\t$profile = Profile::getProfileByProfileEmail($this->getPDO(), \"[email protected]\");\n\t\t$this->assertNull($profile);\n\t}", "public function testGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/steve-rogers\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Steve Rogers', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "public function testUserMeGet()\n {\n }", "public function test_admin_certified_member()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/MemberSkills', 'certified_member']);\n $this->assertResponseCode(404);\n }", "function user_user_profile($CI,$user){\n\t\t$CI->user->head($user);\n\t}", "public function getProfile()\n {\n ProfileResource::withoutWrapping();\n MinistryResource::withoutWrapping();\n\n if (request()->has('complete') && request()->complete) {\n return new ProfileResource(auth()->user());\n } else {\n return new MinistryResource(auth()->user());\n }\n }", "public function testProfileIndexFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(new BlokkrUser());\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "public function testProfilePrototypeFindByIdComments()\n {\n\n }", "function get_profile_fname($fname){\r\n\t\r\n}", "function getProfile(){\n\t\t\t\t$this->__dataDecode();\n\t\t\t\t$data=$this->data;\n\t\t\t\t$playerId = $data['User']['playerId'];\n\t\t\t\t$token = $data['User']['secToken'];\n\t\t\t\t//pr($token);die('ok');\n\t\t\t\t$playerdetails = $this->User->find('first', array('conditions' => array('User.id' => $playerId,'User.secToken' => $token)));\n\t\t\t\t\t\t//pr($playerdetails);die;\t\n\t\t\t\t\t\tif($playerdetails)\n\t\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t$response['error']\t\t\t= 0;\n\t\t\t\t\t\t$response['response']['firstName'] \t= $playerdetails['User']['firstname'];\n\t\t\t\t\t\t$response['response']['wieght'] \t= $playerdetails['User']['wieght'];\n\t\t\t\t\t\t$response['response']['school'] \t= $playerdetails['User']['school'];\n\t\t\t\t\t\t$response['response']['profilePicture'] = LIVE_SITE.'/img/upload_userImages/'.$playerdetails['User']['image'];\n\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\tdie();\n\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'UnAuthorized User';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\n}\n}", "function testProfileTitle() {\n $this->drupalGet(Url::fromRoute('entity.linkit_profile.edit_form', [\n 'linkit_profile' => $this->linkitProfile->id(),\n ]));\n\n $this->assertText('Edit ' . $this->linkitProfile->label() . ' profile');\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/user/profile')\n ->assertSee('Profile');\n \n });\n }" ]
[ "0.66872036", "0.6682553", "0.66458416", "0.6529471", "0.6407498", "0.640187", "0.6374029", "0.636708", "0.63409925", "0.625468", "0.6236356", "0.62344956", "0.62273055", "0.622525", "0.62183315", "0.6185998", "0.61758316", "0.60946333", "0.6046463", "0.59812826", "0.59422874", "0.59221506", "0.59202784", "0.5871911", "0.5845557", "0.584265", "0.582566", "0.58224124", "0.5807709", "0.5790517", "0.57825243", "0.57757974", "0.57728785", "0.57505465", "0.57381284", "0.5736225", "0.5718288", "0.5709593", "0.5700811", "0.5686015", "0.56826335", "0.56810904", "0.56782365", "0.56731546", "0.5667867", "0.5661563", "0.56598014", "0.56589776", "0.56514275", "0.5651079", "0.5631558", "0.56269", "0.5612086", "0.56091577", "0.5601424", "0.5598176", "0.5580572", "0.55703646", "0.5569048", "0.55588895", "0.55573386", "0.5550063", "0.55383945", "0.55290717", "0.55251473", "0.55180764", "0.5512654", "0.5508647", "0.55076605", "0.5507092", "0.5502788", "0.54998434", "0.54982007", "0.5497429", "0.54973006", "0.5493541", "0.54857767", "0.5483532", "0.5483381", "0.54794246", "0.54757303", "0.547506", "0.5470067", "0.5464233", "0.5459989", "0.54578507", "0.5456744", "0.54520136", "0.54470974", "0.5444634", "0.544131", "0.5437542", "0.54363", "0.53966707", "0.5388154", "0.5378279", "0.5370899", "0.53690886", "0.536868", "0.5362669" ]
0.7107858
0
test accessing profile of user who doesn't exist
public function testGetProfileUserNotExist() { $url = "http://127.0.0.1/app_test.php/profile/view/thor"; $username = '[email protected]'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); //AppBundle:User object not found. (404 Not Found) $this->assertTrue($response->code === 404); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProfileCheckIfUserExists()\n {\n\n }", "public function testManagerNotAccessProfileUser()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextPresent('You don\\'t have access to this section.');\n\t}", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function testGetInvalidProfileByProfileName() : void {\n\t\t// get a profile name that doesn't exist\n\t\t$profile = Profile::getProfileByProfileName($this->getPDO(), \"Invalid Profile Name\");\n\t\t$this->assertCount(0, $profile);\n\t}", "public function testGuestNotAccessProfilePage()\n\t{\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\t}", "public function testGetInvalidProfileByProfileEmail() : void {\n\t\t// get an email that doesn't exist\n\t\t$profile = Profile::getProfileByProfileEmail($this->getPDO(), \"[email protected]\");\n\t\t$this->assertNull($profile);\n\t}", "public function _assertProfileExists($profile_uid)\n {\n }", "public function testGetInvalidProfileByProfileId () : void {\n\t\t// grab a profile id that doesn't exist?\n\t\t$invalidProfileId = generateUuidV4();\n\n\t\t$profile = Profile::getProfileByProfileId($this->getPDO() , \"$invalidProfileId\");\n\t\t$this->assertNull($profile);\n\t}", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testProfileIndexNotFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(null);\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(404, $client->getResponse()->getStatusCode());\n }", "public function testGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/steve-rogers\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Steve Rogers', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function testProfileIndexFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(new BlokkrUser());\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "abstract protected function getUserProfile();", "public function testProfileInvalid()\n {\n $email = new Notification();\n $email->profile('derp');\n }", "public function testQuarantineCheckIfProfileIsQuarantined()\n {\n\n }", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function testSaveProfileWrongUser() {\n\t\tCakeSession::write('Auth.User.id', 2);\n\t\t$this->Model->saveProfile(array(\n\t\t\t'User' => array(\n\t\t\t\t'id' => 1\n\t\t\t)\n\t\t));\n\t}", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"[email protected]\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "private function checkProfile($profile)\n {\n if ($profile === null) {\n $profile = $this->getProfile();\n return $profile;\n } elseif ($this->getProfile()->getUsername() === $profile || $this->getDoorman()->isKitchenStaff() === true) {\n $profileRepository = $this->getDoctrine()->getRepository('MealzUserBundle:Profile');\n $profile = $profileRepository->find($profile);\n return $profile;\n }\n\n return null;\n }", "public function testProfileFindOne()\n {\n\n }", "public function testGetProfileWPNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/natasha-romanov\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Natasha Romanov', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfileUnilogin()\n {\n\n }", "public function testGetValidProfileByProfileName() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get Profile form database using profile name\n\t\t$results = Profile::getProfileByProfileName($this->getPDO(), $this->VALID_PROFILE_NAME);\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\n\t\t// make sure no other objects are contaminating the profile\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\FoodTruckFinder\\\\Profile\", $results);\n\n\t\t// make sure results are same as expected\n\t\t$pdoProfile = $results[0];\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes Drupal perfect. You should have no complaints.'\nPROFILE_TEST;\n\n vfsStream::setup('profiles');\n vfsStream::create([\n 'fixtures' => [\n 'invalid_profile.info.txt' => $profile,\n ],\n ]);\n $info = $this->infoParser->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));\n $this->assertFalse($info['core_incompatible']);\n }", "public function testProfileFind()\n {\n\n }", "public function testGetInvalidAdultUsername() : void {\n// grab an email that does not exist\n$profile = Adult::getAdultByAdultUsername($this->getPDO(), \"yourmom\");\n$this->assertNull($profile);\n}", "public function testGetProfileNotLoggedIn()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $response = \\Httpful\\Request::get($url)->send();\r\n\r\n //ERROR Call to a member function getWellnessProfessional() on string (500 Internal Server Error)\r\n $this->assertEquals(302, $response->code);\r\n\r\n }", "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function getUserProfile();", "public function testGetInvalidUserByUserName(): void {\n\t\t// Grab an username that does not exist\n\t\t$user = User::getUserByUserName($this->getPDO(), \"doesnotexist\");\n\t\t$this->assertCount(0, $user);\n\t}", "public function testProfileApp()\n {\n $client = static::createClient();\n $client->request('GET', '/candidate/profile');\n $this->assertEquals(301, $client->getResponse()->getStatusCode());\n\n //authenticated users are allowed\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile');\n $response = $client->getResponse();\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue(0 === strpos($response->getTargetUrl(), 'https'));\n\n //https and authentication loads page\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/profile', [], [], ['HTTPS' => true]);\n $this->assertTrue($crawler->filter('html:contains(\"Loading ...\")')->count() > 0);\n }", "private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "public function testGetCustomerProfile()\n {\n self::testCreateCustomerProfile();\n\n $response = $this->gateway->getCustomerProfile($this->customerProfileId);\n\n $this->assertTrue($response->isSuccess());\n }", "private function checkingApiCanFetchAProfile($profile_id)\n {\n $api_profile=$this->api_request->get(\"profile\",\"single_profile\",$params=array('profile_id'=>$profile_id));\n return ($api_profile['user_id']==$profile_id);\n }", "public function get_profile($username = '')\n {\n\n\n if($username) $this->username = $username;\n\n $details = (Object) $this->user_details($this->username);\n\n $profile = $details->profile;\n\n $not_valid = !(!empty($profile) and FILE::isExist($profile,\"profile\"));\n\n if($not_valid) return;\n\n return $profile;\n\n\n }", "public function testGuestNotAccessUsersPage()\n\t{\n\t\t$this->open('user');\n\t\t$this->assertTextNotPresent('Users');\n\t}", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfileEmptySkillsMatrix()\n {\n factory(App\\Models\\Profile::class, 'withAUser', 1)->create();\n $user = DB::table('users')->first();\n $this->visit(route('profile.view', ['name'=>$user->username]))\n ->see('seeInElement', '.skills', trans('profile.show.no_skills'));\n }", "public static function getUserNoProfile()\n {\n $user = static::get();\n if (isset($user->noPerfil)) {\n return $user->noPerfil;\n }\n }", "public function testGetInvalidAccessByAccessId() {\n\t\t//grab a user id that exceeds the maximum allowable profile id\n\t\t$access = Access::getAccessByAccessId($this->getPDO(), TimeCrunchersTest::INVALID_KEY);\n\t\t$this->assertNull($access);\n\t}", "public function testProfileFindById()\n {\n\n }", "private function checkProfileExists($id)\n {\n $profile = Profile::find($id);\n if (!$profile) {\n throw new DomainException(self::MESSAGE_PROFILE_NOT_FOUND);\n }\n }", "public function test_show_user_as_unauthorized_user()\n {\n $user = User::factory()->create();\n $user2 = User::factory()->create();\n\n $response = $this->actingAs($user)\n ->get(route('api.users.show', [$user2->id]));\n\n $response->assertStatus(403);\n }", "public function hasProfilePicture()\n {\n $file = public_path('/images/players/') . $this->id . '.webp';\n return ( file_exists($file) ) ? true : false;\n }", "public function testProfilePrototypeExistsCommunityRoles()\n {\n\n }", "public function testProfilePrototypeFindByIdQuarantines()\n {\n\n }", "public function profileAction()\n {\n \tZend_Registry::set('Category', Category::COMMUNITY);\n Zend_Registry::set('SubCategory', SubCategory::USERS);\n\n $userId = $this->_request->getParam(2, null);\n if(empty($userId)){\n throw new Lib_Exception_NotFound(\"No user id found for profile page\");\n }\n\n if($userId == $this->_user->{User::COLUMN_USERID}){\n \tZend_Registry::set('Category', Category::ACCOUNT);\n\t\t\tZend_Registry::set('SubCategory', SubCategory::NONE);\n }\n\n $table = new User();\n $user = $table->find($userId)->current();\n if(empty($user)){\n throw new Lib_Exception_NotFound(\"User '$userId' could not be found for profile page\");\n }\n\n $blog = $user->getBlog();\n if(!$blog->isReadableBy($this->_user, $this->_acl)){\n $blog = null;\n \t}\n\n $album = $user->getProfileAlbum();\n if(!$album->isReadableBy($this->_user, $this->_acl)){\n $album = null;\n \t}\n\n $this->view->profilee = $user;\n $this->view->album = $album;\n $this->view->blog = $blog;\n $this->view->medias = $album->getItemSet();\n }", "function testGetUserBySession() {\n $this->assertFalse(Sessions::getUserBySession());\n }", "public function testGetAccountProfileIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/profile')\n ->see('Account Privacy')\n ->see('SPONSORED')\n ->see('ADS')\n ->see('CALENDAR')\n ->see('Edit Profile Image')\n ->seePageIs('account/profile');\n }", "public function testGetInvalidUserByEmail(): void {\n\t\t// Grab an email that does not exist\n\t\t$user = User::getUserByUserEmail($this->getPDO(), \"[email protected]\");\n\t\t$this->assertNull($user);\n\t}", "public function testGetOneUserInformation()\n {\n $response = $this->json('GET', $this->userEndpoint.'/prostoalex');\n\n // It should return a valid user json with all the basic attributes filled\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'created',\n 'id',\n 'karma',\n 'submitted',\n 'about',\n ])\n ->assertJsonFragment([\n 'id' => 'prostoalex'\n ]);\n }", "public function testGetInvalidProfileActivationToken() : void {\n\t\t// get an activation token that does not exist\n\t\t$profile = Profile::getProfileByProfileActivationToken($this->getPDO(), \"91a930a7d9746db530a1315d65c31bbf\");\n\t\t$this->assertNull($profile);\n\t}", "public function testGetProfilebyProfileEmail() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get the Profile from database by profile email\n\t\t$pdoProfile = Profile::getProfileByProfileEmail($this->getPDO(), $profile->getProfileEmail());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "function action_profile_show() {\n // Process request with using of models\n $user = get_authorized_user();\n // Make Response Data\n if ($user !== NULL) {\n $data = [\n 'profile' => $user,\n ];\n return ['view' => 'user/show', 'data' => $data];\n } else {\n return error403();\n }\n}", "public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }", "public function testGetProfileOtherUserFriends()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bruce-banner\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bruce Banner', $response->body->data->user->name);\r\n $this->assertEquals(1, $response->body->data->relationships->isFriend);\r\n\r\n }", "function core_validateUserAccessProfile($intProfileID, $intUserID = 0) {\n\tif ($intUserID == 0) $intUserID = $_SESSION[\"wt\"][\"uid\"];\n\n\tif (check_user_class(\"admin\") || check_user_class(\"helpdesk\")) {\n\t\treturn true;\n\t}\n\telse {\n\t\t$strQuery = \"SELECT UAPD.module AS shouldHave, UA.module AS hasAccess\n\t\t\t\t\t FROM wt_user_access_perfiles_d AS UAPD\n\t\t\t\t\t\t\tLEFT JOIN wt_user_access AS UA\n\t\t\t\t\t\t\tON UA.module = UAPD.module AND\n\t\t\t\t\t\t\t UA.userid = {$intUserID}\n\t\t\t\t\t WHERE UAPD.perfil_id = {$intProfileID} AND\n\t\t\t\t\t\t UA.module IS NULL\n\t\t\t\t\t ORDER BY UAPD.module\";\n\t\t$qTMP = db_query($strQuery);\n\t\t$intNumRows = db_num_rows($qTMP);\n\t\tdb_free_result($qTMP);\n\n\t\treturn ($intNumRows == 0);\n\t}\n}", "public function canViewProfile() {\n\t\treturn (!$this->protectedProfile || WCF::getUser()->userID == $this->userID || UserProfile::isBuddy($this->userID) || WCF::getUser()->getPermission('admin.general.canViewPrivateUserOptions'));\n\t}", "public function testGetValidProfileById() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// grab the date from mySQL and enforce the fields match out expectations\n\t\t$pdoProfile = Profile::getProfileByProfileId($this->getPDO(), $profile->getProfileId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "public function testGetSingleUserPageWithoutAuth()\n\t{\n\t\t$response = $this->call('orchestra::users@view', array(1));\n\t\t\n\t\t$this->assertInstanceOf('Laravel\\Redirect', $response);\t\n\t\t$this->assertEquals(302, $response->foundation->getStatusCode());\n\t\t$this->assertEquals(handles('orchestra::login'), \n\t\t\t$response->foundation->headers->get('location'));\n\t}", "public function getProfileAction()\n\t{\n\t\t// Find own profile by authorisation token\n\t\tif ($this->request->hasPost('token')) {\n\t\t\tif ($auth = AuthTokens::findFirstByToken($this->request->getPost('token'))) {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'message' => '',\n\t\t\t\t\t'user' => [\n\t\t\t\t\t\t'firstname' => $auth->users->userFirstname,\n\t\t\t\t\t\t'lastname' => $auth->users->userLastname,\n\t\t\t\t\t\t'prefix' => $auth->users->userPrefix,\n\t\t\t\t\t\t'phone' => $auth->users->userPhone,\n\t\t\t\t\t\t'email' => $auth->users->userEmail,\n\t\t\t\t\t\t'points' => $auth->users->userPoints,\n\t\t\t\t\t]\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn $this->reply->withFail(Response::ERROR_INVALID_AUTH);\n\t\t\t}\n\n\t\t// Find another profile by user id\n\t\t} else if (\n\t\t\t$this->request->hasPost('id') &&\n\t\t\tis_numeric($this->request->getPost('id'))\n\t\t) {\n\t\t\tif ($user = Users::findFirst($this->request->getPost('id'))) {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'message' => '',\n\t\t\t\t\t'user' => [\n\t\t\t\t\t\t'firstname' => $user->userFirstname,\n\t\t\t\t\t\t'lastname' => $user->userLastname,\n\t\t\t\t\t\t'prefix' => $user->userPrefix,\n\t\t\t\t\t\t'points' => $user->userPoints,\n\t\t\t\t\t]\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => false,\n\t\t\t\t\t'message' => 'Invalid user id.'\n\t\t\t\t]);\n\t\t\t}\n\n\t\t// Invalid parameters\n\t\t} else {\n\t\t\treturn $this->reply->withFail(Response::ERROR_INVALID_PARAMS);\n\t\t}\n\t}", "function get_profile($field, $user = \\false)\n {\n }", "public function profile() {\n\tif(!$this->user) {\n\t\tRouter::redirect(\"/users/login\");\n\t\t\n\t\t# Return will force this method to exit here so the rest of \n\t\t# the code won't be executed and the profile view won't be displayed.\n\t\treturn false;\n\t}\n \n # Setup view\n\t$this->template->content = View::instance('v_users_profile');\n\t$this->template->title = \"Profile of \".$this->user->first_name;\n \n #var_dump($this->user);\n \t\n\t# Render template\n\techo $this->template;\n }", "public function testGetInvalidUserByEmail() {\n\t\t// grab an email that does not exist\n\t\t$user = User::getUserByEmail($this->getPDO(), \"<sript><Scrpt\");\n\t\t$this->assertNull($user);\n\t}", "public function testGetUserNotFound() {\n $handleNameNotFound = getenv('HANDLENAME_NOT_FOUND');\n $response = $this->runApp('GET', '/histogram/'.$handleNameNotFound);\n $this->assertEquals(404, $response->getStatusCode());\n }", "function usr_has_profile($db, $uid) {\n $rv=0;\n $q='SELECT flags from user WHERE id='.intval($uid).';';\n $res=$db->query($q);\n if ($res) {\n $d=$res->fetch(PDO::FETCH_ASSOC);\n if ($d['flags'] & 1 ) $rv|=2;\n }\n $q='SELECT ukey from auth WHERE user_id='.intval($uid).';';\n $res=$db->query($q);\n if ($res) {\n $d=$res->fetch(PDO::FETCH_ASSOC);\n if (!empty($d['ukey'])) $rv|=1;\n }\n return $rv;\n }", "public function testUser1() {\n // Load the user 1 profile page.\n $this->drupalGet('/user/1');\n // Confirm the page title is correct.\n $this->assertRaw('<title>Access denied | ');\n $this->assertNoRaw('<title>admin | ');\n $this->assertNoRaw('<title>Site under maintenance | ');\n\n // Put the site into maintenance mode.\n \\Drupal::state()->set('system.maintenance_mode', TRUE);\n Cache::invalidateTags(['rendered']);\n\n // Load the user 1 profile page again.\n $this->drupalGet('/user/1');\n // Confirm the page title has changed.\n $this->assertNoRaw('<title>Access denied | ');\n $this->assertNoRaw('<title>admin | ');\n $this->assertRaw('<title>Site under maintenance | ');\n }", "public function testWithUserInfoOnlyUser()\n {\n $uri = $this->getUriForTest();\n $uriInfo = $uri->withUserInfo('foo');\n\n $this->assertEquals('', $uri->getUserInfo());\n $this->assertEquals('foo', $uriInfo->getUserInfo());\n }", "public function test_users_edit_leader_returns_403(){\n $this->signInUser();\n $response = $this->get(route('users.edit', ['user'=> 2]));\n $response->assertStatus(403);\n }", "public function testGetAccountProfileOut()\n {\n // Grab Page\n $result = $this->visit('account/profile')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testVisitUserAccountProfilePageRedirectsToLogin()\n {\n $response = $this->call('GET', $this->accountProfilePageUrl);\n $response->assertRedirect('login');\n }", "function getUserProfile()\n\t{\n\t\t// refresh tokens if needed \n\t\t$this->refreshToken();\n\n\t\ttry{\n\t\t\t$authTest = $this->api->api( \"auth.test\" );\n\t\t\t$response = $this->api->get( \"users.info\", array( \"user\" => $authTest->user_id ) );\n\t\t}\n\t\tcatch( SlackException $e ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->user->id ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\t\t# store the user profile. \n\t\t$this->user->profile->identifier\t\t=\t@$response->user->id;\n\t\t$this->user->profile->profileURL\t\t=\t\"\";\n\t\t$this->user->profile->webSiteURL\t\t=\t\"\";\n\t\t$this->user->profile->photoURL\t\t\t=\t@$response->user->profile->image_original;\n\t\t$this->user->profile->displayName\t\t=\t@$response->user->profile->real_name;\n\t\t$this->user->profile->description\t\t=\t\"\";\n\t\t$this->user->profile->firstName\t\t\t=\t@$response->user->profile->first_name;\n\t\t$this->user->profile->lastName\t\t\t=\t@$response->user->profile->last_name;\n\t\t$this->user->profile->gender\t\t\t=\t\"\";\n\t\t$this->user->profile->language\t\t\t=\t\"\";\n\t\t$this->user->profile->age\t\t\t\t=\t\"\";\n\t\t$this->user->profile->birthDay\t\t\t=\t\"\";\n\t\t$this->user->profile->birthMonth\t\t=\t\"\";\n\t\t$this->user->profile->birthYear\t\t\t=\t\"\";\n\t\t$this->user->profile->email\t\t\t\t=\t@$response->user->profile->email;\n\t\t$this->user->profile->emailVerified\t =\t\"\";\n\t\t$this->user->profile->phone\t\t\t\t=\t\"\";\n\t\t$this->user->profile->address\t\t\t=\t\"\";\n\t\t$this->user->profile->country\t\t\t=\t\"\";\n\t\t$this->user->profile->region\t\t\t=\t\"\";\n\t\t$this->user->profile->city\t\t\t\t=\t\"\";\n\t\t$this->user->profile->zip\t\t\t\t=\t\"\";\n\n\t\treturn $this->user->profile;\n\t}", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfileCreate()\n {\n\n }", "public function is_profile_page() {\r\n\t\tglobal $pagenow;\r\n\r\n\t\treturn $pagenow === 'profile.php' || $pagenow === 'user-new.php' || $pagenow === 'user-edit.php';\r\n\t}", "function hasProfilePicture()\n\t{\n\t\treturn $this->ppic;\n\t}", "function profileUser() {\n if (SSession::getInstance()->__isset(\"role\")) {\n $model = new UserModel;\n $result = $model->selectUser(SSession::getInstance()->mail);\n $this->view->show(\"profileView.php\", $result);\n } else {\n $this->view->show(\"indexView.php\");\n }\n }", "public function profile($username = NULL)\n {\n if (empty($username))\n {\n throw new NotFoundException();\n }\n }", "public function index(){\n $this->existing_profile=$this->profile_model->read_highest_rank_profiles(1);\n \n //Fetch this profile with the api and ensure it matches\n $test_name=\"Checking API can be used to fetch the top profile\";\n $test1=$this->checkingApiCanFetchAProfile($this->existing_profile[0]['user_id']);\n $expected_result=TRUE;\n echo $this->unit->run($test1,$expected_result,$test_name,$notes=\"Assumes atleast 1 account is created\");\n\n //Fetch the same profile by searching for it using its first_name\n $test_name=\"Checking API can be used to fetch same profile using search\";\n $test2=$this->checkingApiCanFetchProfileUsingSearch($this->existing_profile[0]['first_name']);\n $expected_result=TRUE;\n echo $this->unit->run($test2,$expected_result,$test_name,$notes=\"Assumes first result found has identical first name\");\n \n }", "public function profile() {\n $this->restrictToRoleId(2);\n \n // Exécute la view\n $this->show('user/profile');\n }", "private function is_hidden_profile() {\n\t\treturn ! bp_profile_visibility_is_visible_profile( bp_displayed_user_id(), bp_loggedin_user_id() );\n\t}", "public function myprofileAction()\n {\n \tZend_Registry::set('Category', Category::ACCOUNT);\n \tZend_Registry::set('SubCategory', SubCategory::NONE);\n\n $album = $this->_user->getProfileAlbum();\n if(!$album->isReadableBy($this->_user, $this->_acl)){\n $album = null;\n \t}\n\n $blog = $this->_user->getBlog();\n if(!$blog->isReadableBy($this->_user, $this->_acl)){\n $blog = null;\n \t}\n\n $this->view->profilee = $this->_user;\n $this->view->album = $album;\n $this->view->blog = $blog;\n $this->view->medias = $album->getItemSet();\n\n $this->renderScript('user/profile.phtml');\n }", "public function loginUserConditionDoesNotMatchSingleLoggedInUser() {}", "function randomUser_exists()\t{\n\t\treturn $this->recordNumber(self::RNDUSERSC_NAME) > 0;\n\t}", "public function profile()\n\t{\n\t\t// echo $this->fungsi->user_login()->nik;\n\t\t$query = $this->user_m->get($this->fungsi->user_login()->nik);\n\t\t$data['data'] = $query->row();\n\t\t$this->template->load('template2', 'profile', $data);\n\t}", "public function user_exists() {\n\t\t$user = $this->search(\"(uid=\".$this->user.\")\");\n\t\treturn $user !== false;\n\t}", "public function badPaymentProfile()\n {\n\n $payment_profile = $this->payment_profile()->first();\n\n if ($payment_profile === NULL)\n return TRUE;\n\n if (empty($payment_profile->stripe_customer))\n return TRUE;\n\n return FALSE;\n\n }", "public function testProfilePrototypeExistsOwnedGroups()\n {\n\n }" ]
[ "0.7831292", "0.7644241", "0.74199146", "0.7416056", "0.7397465", "0.72869897", "0.7271586", "0.7172934", "0.71265423", "0.7055683", "0.70554346", "0.6997637", "0.6959192", "0.6916604", "0.6904384", "0.68995845", "0.6846829", "0.6842074", "0.6830752", "0.68129325", "0.676956", "0.67570925", "0.6754539", "0.66708624", "0.663793", "0.6620322", "0.6608178", "0.6566628", "0.6547213", "0.6494881", "0.6487749", "0.6468745", "0.6462084", "0.6447688", "0.64412606", "0.63851535", "0.63691354", "0.63671297", "0.6320951", "0.62697345", "0.62612945", "0.62171066", "0.62145525", "0.6175565", "0.613793", "0.61360407", "0.6133615", "0.61254126", "0.6117553", "0.61149555", "0.6107624", "0.61018044", "0.6094762", "0.6094644", "0.607906", "0.6056696", "0.60526955", "0.60496914", "0.6026467", "0.602471", "0.60208714", "0.6010791", "0.6007818", "0.6006491", "0.5981073", "0.5974064", "0.5967638", "0.59501344", "0.59464455", "0.59359163", "0.5911664", "0.5907583", "0.588841", "0.58843845", "0.587854", "0.5878347", "0.58644396", "0.5862624", "0.5862159", "0.58591723", "0.5852541", "0.5832529", "0.5831706", "0.5827389", "0.5803753", "0.58031404", "0.57971156", "0.57935333", "0.5791164", "0.5790539", "0.5783734", "0.57816774", "0.57779354", "0.5776716", "0.57694656", "0.5766346", "0.5749661", "0.572827", "0.5727218", "0.57254183" ]
0.73234445
5
Fungsi untuk mendapatkan jadwal yang tersedia
private function dapatkanJadwal() { $waktu_ziarah = WaktuZiarah::get(); if (count($waktu_ziarah) === 0) { return [ [ 'id' => null, 'pesan' => "Jadwal tidak tersedia" ] ]; } return $waktu_ziarah; // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function karyawan(){\n $this->setActualJadwal(TRUE);\n $this->load->model('jadwal_detail_model', 'jdm');\n $periodeTerpilih = $this->input->post('periode');\n if(empty($periodeTerpilih)){\n $tanggalTerpilih = date('Y-m-d');\n }else{\n $tanggalTerpilih = date($periodeTerpilih.'-01');\n }\n \n $idJadwal = $this->jdm->fields(['jadwal_id'])->get_by(['nik' => $this->getNIK(), 'tanggalabsensi' => $tanggalTerpilih]);\n if(!empty($idJadwal)){\n $this->load->model('User_model', 'um');\n $_POST['key'] = ['id' => $idJadwal->jadwal_id];\n $bawahan = $this->getBawahan();\n $nikBawahan = array_column($this->um->as_array()->fields('ref_nik')->get_many(array_keys($bawahan)),'ref_nik');\n $this->setFilterNik($nikBawahan);\n $this->setMarkToday(TRUE);\n $this->edit();\n }else{\n echo 'Data jadwal tidak ditemukan untuk tanggal '.tglIndonesia($tanggalTerpilih);\n }\n }", "function jadwal(){\n\t\tdate_default_timezone_set('Asia/Jakarta');\n// ----------------------------------------------------------------------\n // meng generate tanggal sekarang sampai tanggal akhir bulan\n\t\t// mencari hari\n\t\t$dayList = array(\n\t\t\t'Sun' => 'Minggu',\n\t\t\t'Mon' => 'Senin',\n\t\t\t'Tue' => 'Selasa',\n\t\t\t'Wed' => 'Rabu',\n\t\t\t'Thu' => 'Kamis',\n\t\t\t'Fri' => 'Jumat',\n\t\t\t'Sat' => 'Sabtu'\n\t\t);\n\n\t\t$tgl_hari_ini=Date(\"j\");\n\t\t$tgl_terakhir=Date(\"t\");\n\t\t// --------------------------------------------------------------------------\n\t // mencari kode tanggal pada tabel waktu\n\t\t$tahun= Date(\"Y\");\n\t\t$bln_skrg= Date(\"n\");\n\t\t$bulanList=array(\n\t\t\t\t\"1\"=>\"januari\",\n\t\t\t\t\"2\"=>\"Februari\",\n\t\t\t\t\"3\"=>\"Maret\",\n\t\t\t\t\"4\"=>\"April\",\n\t\t\t\t\"5\"=>\"Mei\",\n\t\t\t\t\"6\"=>\"Juni\",\n\t\t\t\t\"7\"=>\"Juli\",\n\t\t\t\t\"8\"=>\"Agustus\",\n\t\t\t\t\"9\"=>\"September\",\n\t\t\t\t\"10\"=>\"Oktober\",\n\t\t\t\t\"11\"=>\"November\",\n\t\t\t\t\"12\"=>\"Desember\",\n\t\t\t);\n\n\t\t$tgl=0;\n\t\t$hr=1;\n\t\t$input_bulan=array();\n\t\tfor ($taggl=$tgl_hari_ini; $taggl<=$tgl_terakhir ; $taggl++) {\n\t\t$tanggal[$tgl++]=$taggl\t;\n // menentukan jumlah hari pada tgl sekarang sampai tanggal terakhir\n\t\t$jml_hri=$hr++;\n\t\t}\n\n\t\t$jum_tabl_tgl=$jml_hri;\n\t\t// untuk membatasi nilai ketika tanggal lebih dari 7 lengthnya\n\t\tif ($jum_tabl_tgl>=7) {\n\t\t\t$jum_tabl_tgl=7;\n\t\t\t\t$input_bulan[0]=$bulanList[$bln_skrg];\n\t\t}elseif ($jum_tabl_tgl<7) {\n\t\t\t// jika tanggal menjelang akhir maka akan menampilkan tnggal muda\n\t\t\t$jum_tabl_tgl=7;\n\t\t\t$jml_hri=7;\n\t\t\t$tgl_ahr_bln_dpn=$tgl_terakhir+1;\n\t\t\tfor ($taggl=1; $taggl<=$tgl_ahr_bln_dpn; $taggl++) {\n\t\t\t\t$tanggal[$tgl++]=$taggl;\n\t\t\t}\n\t\t\tfor ($i=0; $i <2 ; $i++) {\n\t\t\t\t$input_bulan[$i]=$bulanList[$bln_skrg+$i];\n\t\t\t}\n\n\t\t}elseif (empty($jum_tabl_tgl)) {\n\t\t\t$jum_tabl_tgl=1;\n\t\t}\n\n // untuk mencari nama hari di tampung di data_hari\n\t\tfor($i=0;$i<$jml_hri;$i++){\n\t\t\tif ($jum_tabl_tgl<7) {\n\t\t\t\t$time[$i] = mktime(0, 0, 0, date(\"m\")+1, date(\"d\")+$i, date(\"Y\"));\n\t \t\t $hari[$i]=date(\"D\", $time[$i]);\n\t\t\t $data_hari[$i]=$dayList[$hari[$i]];\n\t\t }elseif ($jum_tabl_tgl>=7) {\n\t\t\t $time[$i] = mktime(0, 0, 0, date(\"m\"), date(\"d\")+$i, date(\"Y\"));\n \t\t $hari[$i]=date(\"D\", $time[$i]);\n \t\t $data_hari[$i]=$dayList[$hari[$i]];\n\t\t }\n\n\t\t}\n\n\t\t$kod=0;\n\t\t$jum_jad=0;\n\n\n // ----------------------------------------------------------\n\t\t// mencari kode karyawan di tabel jadwal\n\t\t$kar=0;\n\t\t$kd_kary=array();\n\t\t$kd_karya=$this->crud_j->cari_kode_kar()->result();\n\t\tforeach ($kd_karya as $karyawan) {\n\t\t\t$kd_kary[$kar++]=$karyawan->kd_kar;\n\t\t}\n // mencari jumlah kode karyawan di tabel jadwal untuk di tampilkan di looping\n\t\t$jml_kar=$this->crud_j->cari_jml_kd_kary()->result();\n\t\tforeach ($jml_kar as $jml) {\n\t\t\t$jum_kd_kar=$jml->jml_kar;\n\t\t}\n// ---------------------------------------------------------\n\t\t//menacri nama karyawan berdasarkan kode karyawan yang ada di tabel jadwal di arrayy\n\t\t$nam=0;\n\t\t$nam_karya=array();\n\t\t$kd_karyaa=array();\n\t\tfor ($i=0; $i<$jum_kd_kar ; $i++) {\n\t\t\t$nam_kary=$this->crud_j->cari_nama_karyawan($kd_kary[$i])->result();\n\t\t\tforeach ($nam_kary as $nama ) {\n\t\t\t\t$nam_karya[$i]=$nama->nam_kar;\n\t\t\t\t$kd_karyaa[$i]=$nama->kd_kar;\n\t\t\t\tif (empty($nam_karya[$i])||empty($kd_karyaa[$i])) {\n\t\t\t\t\t$nam_karya[$i]=\"-\";\n\t\t\t\t\t$kd_karyaa[$i]=\"-\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n // mencari jadwal karyawan\n\t\t$jum_tgl=0;\n\t\t$jml_tgl=$this->crud_j->cari_jml_tanggal($bulanList[$bln_skrg],$tahun)->result();\n\t\tforeach ($jml_tgl as $jml) {\n\t\t\t$jum_tanggal=$jml->jml_tanggal;\n\t\t}\n\t\t$juml_tgl=$jum_tanggal;\n\t\tif ($jum_tgl>7) {\n\t\t\t$jum_tgl=7;\n\t\t}elseif (empty($jum_tgl)) {\n\t\t\t$jum_tgl=1;\n\t\t}elseif ($jum_tgl<7) {\n\t\t\t$jum_tgl=$jum_tanggal;\n\t\t}\n\n\t\tfor ($i=0; $i <$jum_kd_kar ; $i++) {\n\t\t\tfor ($j=0; $j <$jum_tabl_tgl ; $j++) {\n\t\t\t\t// untuk mendapatkan kde tab jam di tab jadwal\n\t\t\t\t$kd_jadwal=$this->crud_j->cari_jadwal_kar($kd_kary[$i],$tanggal[$j],$bulanList[$bln_skrg],$tahun)->result();\n\t\t\t\tforeach ($kd_jadwal as $jadwl_pgw) {\n\t\t\t\t\t$kdjad[$i][$j]=$jadwl_pgw->kd_waktu;\n\n\t\t\t\t}\n\t\t\t\t// mencari jadwal sesuai kode yang di cari di tab waktu\n\t\t\t\t$kdjadwal_jam=$this->crud_j->cari_jadwal_jam($kdjad[$i][$j])->result();\n\t\t\t\tforeach ($kdjadwal_jam as $kdjadwal_jam) {\n\t\t\t\t\t$jadwal_pgw[$i][$j]=$kdjadwal_jam->jadwal;\n\t\t\t\t\t$jadwal_jam[$i][$j]=$kdjadwal_jam->jam;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (empty($jadwal_pgw)||empty($jadwal_jam)) {\n\t\t\t$jadwal_pgw=\"-\";\n\t\t\t$jadwal_jam=\"-\";\n\t\t}\n\t\t\t$total_kary=$this->crud_s->cari_jumlah_kar()->result();\n\t\t\tforeach ($total_kary as $total) {\n\t\t\t\t$jum_tot_kary=$total->total;\n\t\t\t}\n\n\n // --------------------------------kusus CRUD--------------------\n\n\n\t\t// ceksession panah menu\n\t\t$this->cek_session->cek_session_jadwal();\n\n // pengiriman data tampilan\n\t\t$data['tanggal']=$tanggal;\n\n\t\t$data['jum_kar']=$jum_kd_kar;\n\t\t$data['nama_hari']=$data_hari;\n\t\t$data['jum_jad']=$jum_tgl;\n\t\t$data['jadwal']=$jadwal_pgw;\n\t\t$data['jadwal_jam']=$jadwal_jam;\n\t\t$data['bulan']=$input_bulan;\n\t\t$data['tahun']=$tahun;\n\t\t$data['jum_row_tgl']=$jum_tabl_tgl;\n // -------------pengiriman data crud----------------\n\n\t\t$data['kd_unik_jd']=$this->crud_j->cari_kode_jadwal();\n\t\t$data['nama_kary']=$nam_karya;\n\t\t$data['nama_pgw']=$this->crud_m->tampil_data_pegawai()->result();//untuk form input\n\t\t$data['kd_karya']=$kd_karyaa;\n\t\t$data['tgl_awl']=$tgl_hari_ini;\n\t\t$data{'tgl_akhr'}=$tgl_terakhir;\n\t\t$data['jum_kary']=$jum_tot_kary;\n\t\t$data['tgl_akhr_dpn']=$tgl_ahr_bln_dpn;\n\t\t$data['bln_skrg']=$bulanList[$bln_skrg];\n\n\t\t$data['cari_tahun']=$this->crud_j->cari_tahun()->result();\n\n\t\t//$data['cari_bulan']=$this->crud_j->cari_bulan()->result();\n\t\t//$data['kd_kar']=$this->db->crud_j->cari_kd_kar2($nama)->result();\n\t\t// untuk menampilkan halaman\\\n $this->load->view('adm/nav_content/header');\n \t$this->load->view('adm/content/data_jadwal',$data);\n\n\t\t$this->load->view('adm/nav_content/footer');\n\t\t$this->load->view('adm/modal_input/input_jadwal',$data);\n\t\t$this->load->view('adm/modal_input/edit_jadwal',$data);\n\t\t$this->load->view('adm/modal_input/edit_all_jadwal',$data);\n\t\t$this->load->view('adm/modal_input/hapus_jadwal',$data);\n\t\t$this->load->view('adm/modal_input/modal_info_jdwl');\n\t\t$this->load->view('adm/modal_input/input_cetak_jadwal',$data);\n\n\n\n\n\t\t// untuk mengecek pesan konfirmasi edit pegawai\n\t\t\t\tif ($this->session->userdata('tgl_jdwl')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-tgl-ggl');\n\t\t\t\t\t$this->session->unset_userdata('tgl_jdwl');\n\t\t\t\t}\n\t\t\t\tif ($this->session->userdata('cekWaktu')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-cekWaktu');\n\t\t\t\t\t$this->session->unset_userdata('cekWaktu');\n\t\t\t\t}elseif($this->session->userdata('cekWaktu')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-input');\n\t\t\t\t\t$this->session->unset_userdata('cekWaktu');\n\t\t\t\t}\n\t\t\t\tif ($this->session->userdata('edit_jadwal')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-gagal');\n\t\t\t\t\t$this->session->unset_userdata('edit_jadwal');\n\t\t\t\t}elseif($this->session->userdata('edit_jadwal')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-edit');\n\t\t\t\t\t$this->session->unset_userdata('edit_jadwal');\n\t\t\t\t}\n\t\t\t\tif ($this->session->userdata('hapus_jadwal')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-gagal');\n\t\t\t\t\t$this->session->unset_userdata('hapus_jadwal');\n\t\t\t\t}elseif($this->session->userdata('hapus_jadwal')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-hapus');\n\t\t\t\t\t$this->session->unset_userdata('hapus_jadwal');\n\t\t\t\t}\n\t\t\t\tif ($this->session->userdata('empty_jadwal')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-jadwal-empty');\n\t\t\t\t\t$this->session->unset_userdata('empty_jadwal');\n\t\t\t\t}elseif($this->session->userdata('empty_jadwal')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-thanks');\n\t\t\t\t\t$this->session->unset_userdata('empty_jadwal');\n\t\t\t\t}\n\n\t}\n\n\n\n\tfunction setting(){\n\n\t\t$data['jml_kar']=$this->crud_s->cari_jumlah_kar()->result();\n\t\t$data['super_usr']=$this->crud_s->tampil_data_super_user()->result();\n\t\t// ceksession panah menu\n\t\t$this->cek_session->cek_session_setting();\n // untuk menampilkan halaman\n\t\t$this->load->view('adm/nav_content/header');\n\t\t$this->load->view('adm/content/setting',$data);\n\t\t$this->load->view('adm/nav_content/footer');\n\t\t$this->load->view('adm/modal_input/modal_info_jdwl');\n\n\t\t// untuk mengecek pesan konfirmasi edit pegawai\n\t\t\t\tif ($this->session->userdata('editSuper')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-edit');\n\t\t\t\t\t$this->session->unset_userdata('editSuper');\n\t\t\t\t}elseif($this->session->userdata('editSuper')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-gagal');\n\t\t\t\t\t$this->session->unset_userdata('editSuper');\n\t\t\t\t}\n\n\t}\n\n\tfunction export_excel(){\n\t\tdate_default_timezone_set('Asia/Jakarta');\n\t// ----------------------------------------------------------------------\n\t\t// meng generate tanggal sekarang sampai tanggal akhir bulan\n\t\t// mencari hari\n\t\t$dayList = array(\n\t\t\t'Sun' => 'Minggu',\n\t\t\t'Mon' => 'Senin',\n\t\t\t'Tue' => 'Selasa',\n\t\t\t'Wed' => 'Rabu',\n\t\t\t'Thu' => 'Kamis',\n\t\t\t'Fri' => 'Jumat',\n\t\t\t'Sat' => 'Sabtu'\n\t\t);\n\t\t$tgl_hari_ini=Date(\"j\");\n\t\t$tgl_terakhir=Date(\"t\");\n\t\t$tgl=0;\n\t\t$hr=1;\n\t\tfor ($i=$tgl_hari_ini; $i<=$tgl_terakhir ; $i++) {\n\t\t$tanggal[$tgl++]=$i\t;\n\t\t// menentukan jumlah hari pada tgl sekarang sampai tanggal terakhir\n\t\t$jml_hri=$hr++;\n\t\t}\n\t\t$jum_tabl_tgl=$jml_hri;\n\t\tif ($jum_tabl_tgl>7) {\n\t\t\t$jum_tabl_tgl=7;\n\t\t}elseif ($jum_tabl_tgl<7) {\n\t\t\t$jum_tabl_tgl=$jml_hri;\n\t\t}elseif (empty($jum_tabl_tgl)) {\n\t\t\t$jum_tabl_tgl=1;\n\t\t}\n\n\t\t// untuk mencari nama hari di tampung di data_hari\n\t\tfor($i=0;$i<$jml_hri;$i++){\n\t\t\t$time[$i] = mktime(0, 0, 0, date(\"m\"), date(\"d\")+$i, date(\"Y\"));\n\t\t $hari[$i]=date(\"D\", $time[$i]);\n\t\t $data_hari[$i]=$dayList[$hari[$i]];\n\t\t}\n\t// --------------------------------------------------------------------------\n\t\t// mencari kode tanggal pada tabel waktu\n\t\t$tahun= Date(\"Y\");\n\t\t$bulan= Date(\"n\");\n\t\t$bulanList=array(\n\t\t\t\"1\"=>\"januari\",\n\t\t\t\"2\"=>\"Februari\",\n\t\t\t\"3\"=>\"Maret\",\n\t\t\t\"4\"=>\"April\",\n\t\t\t\"5\"=>\"Mei\",\n\t\t\t\"6\"=>\"Juni\",\n\t\t\t\"7\"=>\"Juli\",\n\t\t\t\"8\"=>\"Agustus\",\n\t\t\t\"9\"=>\"September\",\n\t\t\t\"10\"=>\"Oktober\",\n\t\t\t\"11\"=>\"November\",\n\t\t\t\"12\"=>\"Desember\",\n\t\t);\n\t\t$kod=0;\n\t\t$jum_jad=0;\n\n\t\t\t// mencari kode tanggal pada tabel waktu\n\t// \t\t$kde_tgl=array();\n\t// \tfor ($i=0; $i<7 ; $i++) {\n\t// \t$kode_tgl=($this->crud_j->cari_tanggal_kode($tanggal[$i],$bulanList[$bulan],$tahun)->result());\n\t// \tforeach ($kode_tgl as $kd_tgl) {\n\t// \t\t$kde_tgl[$i]=$kd_tgl->kd_waktu;\n\t// \t\tif(empty($kde_tgl[$i])){\n\t// \t\t$jum_jad=0;\n\t// \t}elseif (count($kde_tgl[$i])>7) {\n\t// \t\t$jum_jad=7;\n\t// \t}else {\n\t// \t\t$jum_jad=count($kde_tgl);\n\t// \t}\n\t// \t}\n\t// }\n\t// print_r($kde_tgl);\n\t\t// untuk membatasi jumlah jadwal yang tampil kekiri\n\n\n\t// ----------------------------------------------------------\n\t\t// mencari kode karyawan di tabel jadwal\n\t\t$kar=0;\n\t\t$kd_kary=array();\n\t\t$kd_karya=$this->crud_j->cari_kode_kar()->result();\n\t\tforeach ($kd_karya as $karyawan) {\n\t\t\t$kd_kary[$kar++]=$karyawan->kd_kar;\n\t\t}\n\t\t// mencari jumlah kode karyawan di tabel jadwal untuk di tampilkan di looping\n\t\t$jml_kar=$this->crud_j->cari_jml_kd_kary()->result();\n\t\tforeach ($jml_kar as $jml) {\n\t\t\t$jum_kd_kar=$jml->jml_kar;\n\t\t}\n\t// ---------------------------------------------------------\n\t\t//menacri nama karyawan berdasarkan kode karyawan yang ada di tabel jadwal di arrayy\n\t\t$nam=0;\n\t\t$nam_karya=array();\n\t\t$kd_karyaa=array();\n\t\tfor ($i=0; $i<$jum_kd_kar ; $i++) {\n\t\t\t$nam_kary=$this->crud_j->cari_nama_karyawan($kd_kary[$i])->result();\n\t\t\tforeach ($nam_kary as $nama ) {\n\t\t\t\t$nam_karya[$i]=$nama->nam_kar;\n\t\t\t\t$kd_karyaa[$i]=$nama->kd_kar;\n\t\t\t\tif (empty($nam_karya[$i])||empty($kd_karyaa[$i])) {\n\t\t\t\t\t$nam_karya[$i]=\"-\";\n\t\t\t\t\t$kd_karyaa[$i]=\"-\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t$jum_tgl=0;\n\t\t$jml_tgl=$this->crud_j->cari_jml_tanggal($bulanList[$bulan],$tahun)->result();\n\t\tforeach ($jml_tgl as $jml) {\n\t\t\t$jum_tanggal=$jml->jml_tanggal;\n\t\t}\n\t\t$juml_tgl=$jum_tanggal;\n\t\tif ($jum_tgl<7) {\n\t\t\t$jum_tgl=7;\n\t\t}elseif (empty($jum_tgl)) {\n\t\t\t$jum_tgl=1;\n\t\t}\n\t\tfor ($i=0; $i <$jum_kd_kar ; $i++) {\n\t\t\tfor ($j=0; $j <$jum_tanggal ; $j++) {\n\t\t\t\t$jadwal=$this->crud_j->cari_jadwal_kar($kd_kary[$i],$tanggal[$j],$bulanList[$bulan],$tahun)->result();\n\t\t\t\tforeach ($jadwal as $jadwl_pgw) {\n\t\t\t\t\t$jadwal_pgw[$i][$j]=$jadwl_pgw->jadwal;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (empty($jadwal_pgw)) {\n\t\t\t$jadwal_pgw=\"-\";\n\t\t}\n\t\t// print_r($jadwal_pgw);\n\t\t// for ($i=0; $i <$jum_kd_kar ; $i++) {\n\t\t// \tfor ($j=0; $j <$jum_tanggal ; $j++) {\n\t\t// \t\tif (empty($jadwal_pgw[$i][$j])) {\n\t\t//\n\t\t// \t\t}else {\n\t\t// \t\t\techo \"</br>\";\n\t\t// \t\t\techo $jadwal_pgw[$i][$j];\n\t\t// \t\t\techo \"</br>\";\n\t\t// \t\t}\n\t\t//\n\t\t// \t}\n\t\t// }\n\t\t// \techo \"</br>\";\n\t\t// \tprint_r($kd_kary);\n\n\t\t// for ($i=0; $i <3 ; $i++) {\n\t\t// \techo $kde_tgl[$i];\n\t\t// \techo \"</br>\";\n\t\t// \techo $kd_kary[$i];\n\t\t// \techo \"</br>\";\n\t\t// }\n\n\n\n\n\n\t\t\t//echo $jum_jad;\n\t\t // echo \"</br>\";\n\t\t\t// echo $jum_jad;\n\t\t// print_r($kde_tgl);\n\n\t\t// --------------------------------kusus CRUD--------------------\n\n\n\t\t// ceksession panah menu\n\n\n\t\t// pengiriman data tampilan\n\t\t$data['tanggal']=$tanggal;\n\n\t\t$data['jum_kar']=$jum_kd_kar;\n\t\t$data['nama_hari']=$data_hari;\n\t\t$data['jum_jad']=$jum_tgl;\n\t\t$data['jadwal']=$jadwal_pgw;\n\t\t$data['bulan']=$bulanList[$bulan];\n\t\t$data['tahun']=$tahun;\n\t\t// -------------pengiriman data crud----------------\n\n\t\t// $data['kd_unik_jd']=$this->crud_j->cari_kode_jadwal();\n\t\t $data['nama_kary']=$nam_karya;\n\t\t// $data['nama_pgw']=$this->crud_m->tampil_data_pegawai()->result();//untuk form input\n\t\t// $data['kd_karya']=$kd_karyaa;\n\t\t// $data['tgl_awl']=$tgl_hari_ini;\n\t\t// $data{'tgl_akhr'}=$tgl_terakhir;\n\t\t// $data['bln_skrg']=$bulanList[$bulan];\n\t\t// $data['thn_skrg']=$tahun;\n\t\t// $data['cari_tahun']=$this->crud_j->cari_tahun()->result();\n\n\t\t//$data['cari_bulan']=$this->crud_j->cari_bulan()->result();\n\t\t//$data['kd_kar']=$this->db->crud_j->cari_kd_kar2($nama)->result();\n\t\t// untuk menampilkan halaman\\\n\t\t$this->load->view('adm/laporan/vw_ex_excel',$data);\n\t}\n\n\n\n\t}", "private function currentJadwal($detail,$periode){\n /*$nik = array_keys($detail);\n $awalBulan = $periode.'-01';\n $akhirBulan = akhirBulan($awalBulan);\n $this->load->model('absent_detail_model','adm');\n $nikPengajuan = $this->adm->setWithHeader(TRUE)->as_array()->distinct()->fields(['absent_details.nik','absent_details.tanggalabsensi'])->where([['absent_details.nik' => $nik]])->get_many_by(['absents.status = \\'I\\' and absent_details.tanggalabsensi between \\''.$awalBulan.'\\' and \\''.$akhirBulan.'\\'']);\n if(!empty($nikPengajuan)){\n $nikJadwal = array_column($nikPengajuan,'nik');\n $tanggalJadwal = array_column($nikPengajuan,'tanggalabsensi');\n $this->load->model('jadwal_detail_model','jdm');\n $jadwalActual = convertArr2Key($this->jdm->as_array()->fields(['nik','tanggalabsensi','timetables_id'])->get_many_by(['nik' => $nikJadwal, 'tanggalabsensi' => $tanggalJadwal]),'nik','tanggalabsensi'); \n //log_message('error',json_encode($jadwalActual));\n if(!empty($jadwalActual)){\n foreach($jadwalActual as $nik => $pertanggal){\n foreach($pertanggal as $tgl => $val){\n if(isset($detail[$nik])){\n $tglSaja = explode('-',$tgl);\n $angkaTgl = intval($tglSaja[2]);\n if(isset($detail[$nik]['tanggal'][$angkaTgl])){\n $detail[$nik]['tanggal'][$angkaTgl] = $val['timetables_id'];\n } \n }\n }\n }\n }\n }\n*/\n //log_message('error',$periode);\n return $detail;\n }", "public function data_jadwal_kuliah()\n\t{\n\t\t$data['data'] = $this->m_aka->data_jadwal_kuliah(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'mata_kuliah/data_jadwal_kuliah';\n\t\t$this->load->view('content', $data);\n\t}", "public function tampilDataGalang(){\n\t\t\n\t}", "function getDataSingkatPrakt($conn,$key,$pengajar=true,$nip='') {\n\t\t\t$sql = \"select k.thnkurikulum, k.kodemk, k.kodeunit, k.periode, k.kelasmk, k.koderuang,\n\t\t\t\t\tk.nohari, k.jammulai, k.jamselesai, c.namamk\n\t\t\t\t\tfrom \".static::table('ak_kelaspraktikum').\" k join \".static::table('ak_kurikulum').\" c using (thnkurikulum,kodemk,kodeunit)\n\t\t\t\t\twhere \".static::getCondition($key,null,'k');\n\t\t\t$row = $conn->GetRow($sql);\n\t\t\t\n\t\t\t$row['jadwal'] = Date::indoDay($row['nohari']).', '.CStr::formatjam($row['jammulai']).' - '.CStr::formatjam($row['jamselesai']);\n\t\t\t//$row['jadwal2'] = Date::indoDay($row['nohari2']).', '.CStr::formatjam($row['jammulai2']).' - '.CStr::formatjam($row['jamselesai2']);\n\t\t\t\t\n\t\t\t// ambil data pengajar\n\t\t\tif($pengajar) {\n\t\t\t\t$sql = \"select p.idpegawai::text as nipdosen, akademik.f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as nama from \".static::table('ak_mengajar').\" a\n\t\t\t\t\t\tjoin sdm.ms_pegawai p on a.nipdosen::text = p.idpegawai::text\n\t\t\t\t\t\twhere \".static::getCondition($key,null,'a').\" order by a.nipdosen\";\n\t\t\t\t$rs = $conn->Execute($sql);\n\t\t\t\t\n\t\t\t\t$a_ajar = array();\n\t\t\t\twhile($rowa = $rs->FetchRow())\n\t\t\t\t\t$a_ajar[] = $rowa['nama'].' ('.$rowa['nipdosen'].')';\n\t\t\t\t\n\t\t\t\t$row['pengajar'] = implode('<br>',$a_ajar);\n\t\t\t}\n\t\t\tif(!empty($nip)){\n\t\t\t\t$sql = \"select idpegawai::text as nik, akademik.f_namalengkap(gelardepan,namadepan,namatengah,namabelakang,gelarbelakang) as nama \n\t\t\t\t\t\tfrom sdm.ms_pegawai where nik='$nip' or idpegawai::text='$nip'\";\n\t\t\t\t$rs=$conn->GetRow($sql);\n\t\t\t\t$row['pengajar'] =$rs['nama'].\" (\".$rs['nik'].\")\";\n\t\t\t}\n\t\t\treturn $row;\n\t\t}", "public function cekJadwalBentrok($hari=NULL,$guru=NULL,$jamke=NULL){\r\n // ini diinput manual dikarenakan\r\n // untuk mengAllow kelas yang mata pelajaran olahraga\r\n \r\n $idOlahraga= $this->db->query(\"SELECT id_mapel from mapel where (nama_mapel LIKE '%Olahraga%' ) OR (nama_mapel LIKE '%olahraga%' )\")->result_array()[0]['id_mapel'];\r\n \r\n $queryCekOlahraga=$this->db->query(\"SELECT * FROM guru WHERE id_guru='$guru' AND id_mapel='$idOlahraga'\")->num_rows();\r\n\r\n if($queryCekOlahraga>=1){\r\n $result=0;\r\n }else{\r\n $result=$this->db->query(\"SELECT nama_guru, kelas.kelas, kelas.nama_kelas, id_hari,jadwal.id_guru,id_jam_jadwal FROM jadwal JOIN guru ON guru.id_guru = jadwal.id_guru JOIN kelas ON kelas.id_kelas = jadwal.id_kelas WHERE id_hari='$hari' AND jadwal.id_guru='$guru' AND id_jam_jadwal='$jamke'\")->result_array();\r\n }\r\n\r\n\r\n return $result;\r\n\r\n }", "public function json() {\n\t\t$this->datatables->select('\n\t\t\ttb_jadwal_latihan.id,\n\t\t\ttb_jadwal_latihan.id_pelatih,\n\t\t\ttb_jadwal_latihan.hari,\n\t\t\tCONCAT(tb_jadwal_latihan.jam_mulai,\" s/d \",tb_jadwal_latihan.jam_selesai) as jam,\n\t\t\ttb_pelatih.nama');\n\t\t$this->datatables->from($this->table);\n\t\t$this->datatables->join('tb_pelatih', 'tb_jadwal_latihan.id_pelatih=tb_pelatih.id');\t\t\n\t\t$this->datatables->add_column('view', '<div align=\"center\">\n\t\t\t<a class=\"btn btn-warning btn-rounded btn-sm\" href=\"javascript:void(0)\" title=\"Edit\" onclick=\"edit($1)\"> <span class=\"fa fa-edit\"></span></a>\n\t\t\t<a class=\"btn btn-danger btn-rounded btn-sm\" href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus($1)\" > <span class=\"fa fa-trash\"></span></a>\n\t\t\t</div>', 'id');\n\t\treturn $this->datatables->generate();\n\t}", "function select_tb_penduduk(){\n\t\t$this->load->model('mamdani');\n\t\t//$klasifikasi['klasifikasi']=$this->mamdani->getdata();\n\t\t$klasifikasi['jumlah_aset']=$this->mamdani->jumlah_aset();\n\t\t$klasifikasi['tingkat']= $this->mamdani->klasifikasi3();\n\n\t\t$this->load->view('templates/header');\n\t\t$this->load->view('admin/lihatdata/tabel_klasifikasi_penduduk',$klasifikasi);\n\t\t$this->load->view('templates/footer');\n\t\t// var_dump($jml_aset);\n\t\t// die;\n\n\t}", "public function jadwalPas($kelas, $pembagianJam, $hari, $id_guru)\n\t{\n\t\techo \"jumlah hari yang tersedia :\" . count($hari) . \"<br>\";\n\t\techo \"<div style='background-color: #DC143C'>Pembagian_jam ($pembagianJam sks) -> </div>\";\n\t\t// echo implode(\", \", $pembagianJam);\n\t\t// foreach ($pembagianJam as $beban_jam) {\n\t\t// echo \"value pembagian : $beban_jam <br>\";\n\t\t$error = 0;\n\t\tforeach ($hari as $valueDataHari) {\n\t\t\t$jumlahHariKosong = 0;\n\t\t\t// echo $kelas;\n\t\t\techo $valueDataHari;\n\t\t\t$dataJadwal = $this->Jadwal_Model->getDataPenjadwalan($kelas, $valueDataHari, $id_guru);\n\t\t\t// echo \"</br>\";\n\t\t\t// print_r($dataJadwal);\n\t\t\t// echo \"</br>\";\n\t\t\t$data = [];\n\t\t\tif ($pembagianJam <= count($dataJadwal)) {\n\t\t\t\tforeach ($dataJadwal as $dataHari) {\n\t\t\t\t\tif ($dataHari->kode_jadwal == '-' && $dataHari->keterangan == 'kosong') {\n\t\t\t\t\t\t$jumlahHariKosong++;\n\t\t\t\t\t\t$data[] = $dataHari->sesi;\n\t\t\t\t\t\tif (count($data) == $pembagianJam) {\n\t\t\t\t\t\t\t$sesi[$valueDataHari][] = $data;\n\t\t\t\t\t\t\t$data = [];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$data = [];\n\t\t\t\t\t\t$jumlahHariKosong = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($jumlahHariKosong == $pembagianJam) {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'status' => 'Press',\n\t\t\t\t\t\t'sesi' => $pembagianBebanJam[$pembagianJam][] = $sesi\n\t\t\t\t\t];\n\t\t\t\t} else if ($jumlahHariKosong > $pembagianJam) {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'status' => 'tidakPress',\n\t\t\t\t\t\t'sesi' => $pembagianBebanJam[$pembagianJam][] = $sesi\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'status' => 'ada sesuatu',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$error++;\n\t\t\t\tif ($error == count($hari)) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'status' => 'tidakMuat'\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// }\n\t\treturn $result;\n\t}", "public function content_pengiriman_otw($id_cabang)\n {\n $query = \"\n select id_pk_penerimaan,id_pk_brg_pemenuhan,id_pk_brg_pengiriman,brg_pengiriman_qty,brg_pengiriman_note,brg_pemenuhan_status,pengiriman_tgl,cabang_daerah,toko_nama,toko_kode,brg_nama,brg_kode,ifnull(penerimaan_tgl,'-') as penerimaan_tgl\n from tbl_brg_pengiriman\n inner join mstr_pengiriman on mstr_pengiriman.id_pk_pengiriman = tbl_brg_pengiriman.id_fk_pengiriman and mstr_pengiriman.pengiriman_status = 'aktif' #harus yang jadi terkirim bukan yang dicancel\n inner join mstr_cabang on mstr_cabang.id_pk_cabang = mstr_pengiriman.id_fk_cabang #dapetin daerah cabang\n inner join mstr_toko on mstr_toko.id_pk_toko = mstr_cabang.id_fk_toko #dapetin nama toko\n inner join tbl_brg_pemenuhan on tbl_brg_pemenuhan.id_pk_brg_pemenuhan = tbl_brg_pengiriman.id_fk_brg_pemenuhan #cuman untuk dapetin id_cabang_minta & id_barang\n inner join tbl_brg_permintaan on tbl_brg_permintaan.id_pk_brg_permintaan = tbl_brg_pemenuhan.id_fk_brg_permintaan and tbl_brg_permintaan.id_fk_cabang = ? #menentukan peminta barang yang akan jadi penerima\n inner join mstr_barang on mstr_barang.id_pk_brg = tbl_brg_permintaan.id_fk_brg #dapetin detail barang\n left join tbl_brg_penerimaan on tbl_brg_penerimaan.id_fk_brg_pengiriman = tbl_brg_pengiriman.id_pk_brg_pengiriman and tbl_brg_penerimaan.brg_penerimaan_qty > 0 #dianggap diterima apabila brgditerima > 0 (klo delete, ini ke 0 sendiri)\n left join mstr_penerimaan on mstr_penerimaan.id_pk_penerimaan = tbl_brg_penerimaan.id_fk_penerimaan and mstr_penerimaan.penerimaan_status = 'aktif' and mstr_penerimaan.penerimaan_tipe = 'permintaan' #dianggap diterima apabila status penerimaan > 0\n where tbl_brg_pengiriman.brg_pengiriman_qty > 0 #dianggap terkirim apabila tidak di cancel (klo cancel, qty jadi 0)\n and brg_pemenuhan_status = 'perjalanan'\n union\n select id_pk_penerimaan,id_pk_brg_pemenuhan,id_pk_brg_pengiriman,brg_pengiriman_qty,brg_pengiriman_note,brg_pemenuhan_status,pengiriman_tgl,warehouse_alamat as cabang_daerah,warehouse_nama as toko_nama,'-' as toko_kode,brg_nama,brg_kode,ifnull(penerimaan_tgl,'-') as penerimaan_tgl\n from tbl_brg_pengiriman\n inner join mstr_pengiriman on mstr_pengiriman.id_pk_pengiriman = tbl_brg_pengiriman.id_fk_pengiriman and mstr_pengiriman.pengiriman_status = 'aktif' #harus yang jadi terkirim bukan yang dicancel\n inner join mstr_warehouse on mstr_warehouse.id_pk_warehouse = mstr_pengiriman.id_fk_warehouse\n inner join mstr_cabang on mstr_cabang.id_pk_cabang = mstr_warehouse.id_fk_cabang #dapetin daerah cabang\n inner join mstr_toko on mstr_toko.id_pk_toko = mstr_cabang.id_fk_toko #dapetin nama toko\n inner join tbl_brg_pemenuhan on tbl_brg_pemenuhan.id_pk_brg_pemenuhan = tbl_brg_pengiriman.id_fk_brg_pemenuhan #cuman untuk dapetin id_cabang_minta & id_barang\n inner join tbl_brg_permintaan on tbl_brg_permintaan.id_pk_brg_permintaan = tbl_brg_pemenuhan.id_fk_brg_permintaan and tbl_brg_permintaan.id_fk_cabang = ? #menentukan peminta barang yang akan jadi penerima\n inner join mstr_barang on mstr_barang.id_pk_brg = tbl_brg_permintaan.id_fk_brg #dapetin detail barang\n left join tbl_brg_penerimaan on tbl_brg_penerimaan.id_fk_brg_pengiriman = tbl_brg_pengiriman.id_pk_brg_pengiriman and tbl_brg_penerimaan.brg_penerimaan_qty > 0 #dianggap diterima apabila brgditerima > 0 (klo delete, ini ke 0 sendiri)\n left join mstr_penerimaan on mstr_penerimaan.id_pk_penerimaan = tbl_brg_penerimaan.id_fk_penerimaan and mstr_penerimaan.penerimaan_status = 'aktif' and mstr_penerimaan.penerimaan_tipe = 'permintaan' #dianggap diterima apabila status penerimaan > 0\n where tbl_brg_pengiriman.brg_pengiriman_qty > 0 #dianggap terkirim apabila tidak di cancel (klo cancel, qty jadi 0)\n and brg_pemenuhan_status = 'perjalanan'\n order by pengiriman_tgl DESC\";\n $args = array(\n $id_cabang, $id_cabang\n );\n //executeQuery($query,$args); echo $this->db->last_query();\n return executeQuery($query, $args);\n }", "public function set_pengiriman($id){ // untuk membuat database langkah pengiriman\n\t\t$cek = $this->M_biodata->get_biodata($id)->result();\n\t\t$this->load->model('M_transaksi');\n\t\tif (count($cek)>0){\n\t\t\tforeach ($cek as $c){\n\t\t\t\t\n\t\t\t};\n\t\t\t$data = array(\n\t\t\t'nama' => $c->namaAlumni,\n\t\t\t'alamat' => $c->alamat,\n\t\t\t'noHp' => $c->noHp,\n\t\t\t'id_pemesan' => $c->id_alumni\n\t\t\t);\t\n\t\t\t$this->M_transaksi->set_pengiriman($data,'pengiriman');\n\t\t$this->set_pembayaran($id);\n\t\t}\n\t}", "function jml_mhs_bimbingan_kkn(){\n\t\t\t$nip \t= $this->session->userdata('id_user'); //'197510242009121002';//\n\t\t\t$smt \t= array(1,2,3);\n\t\t\t$ta \t= $this->session->userdata('kd_ta');\n\t\t\t$kd_current_smt = $this->session->userdata('kd_smt');\n\t\t\t$jumlah_mahasiswa = 0;\n\n\t\t\t//GET ID DPL :\n\t\t\t\n\t\t\t$url \t\t= 'kkn_dosen/data_search';\n\t\t\t$api_url \t= URL_API_KKN.$url;\n\t\t\t$parameter \t= array(\n\t\t\t\t'api_kode' => 201400,\n\t\t\t\t'api_subkode' => 1,\n\t\t\t\t'api_search' => array('KKN.KKN_DPL2014','ID_DPL',array('NIP' => $nip)));\n\n\t\t\t$dpl = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter);\n\n\t\t\tif($dpl){\n\t\t\t\t//GET LIST KELOMPOK KKN\n\t\t\t\t$id_dpl \t= $dpl[0]['ID_DPL'];\n\n\t\t\t\tforeach ($smt as $kd_smt) {\n\t\t\t\t\t$parameter2 = array(\n\t\t\t\t\t\t'api_kode' => 201402,\n\t\t\t\t\t\t'api_subkode' => 1,\n\t\t\t\t\t\t'api_search' => array($ta,$kd_smt,$id_dpl)\n\t\t\t\t\t);\n\n\t\t\t\t\t$kelompok = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter2);\n\n\t\t\t\t\tforeach ($kelompok as $kel) {\n\t\t\t\t\t\t//GET LIST DATA MAHASISWA PER KELOMPOK\n\t\t\t\t\t\t$id_kelompok = $kel['ID_KELOMPOK'];\n\n\t\t\t\t\t\t$parameter \t= array(\t'api_kode' => 201401,\n\t\t\t\t\t\t\t\t\t\t'api_subkode' => 2,\n\t\t\t\t\t\t\t\t\t\t'api_search' => array($id_kelompok));\n\n\t\t\t\t\t\t$member \t= $this->s00_lib_api->get_api_json($api_url, 'POST', $parameter);\n\t\t\t\t\t\tforeach ($member as $mbr) {\n\t\t\t\t\t\t\t//CEK SEMESTER MAHASISWA KKN\n\t\t\t\t\t\t\t$nim \t= $mbr['NIM'];\n\t\t\t\t\t\t\t$tgl \t= str_replace('-', '/', $mbr['TGL_DAFTAR']);\n\t\t\t\t\t\t\t$data_mhs \t= $this->get_data_mhs($nim);\n\t\t\t\t\t\t\t$kd_prodi \t= $data_mhs[0]['KD_PRODI'];\n\n\t\t\t\t\t\t\t$semester \t= $this->periode_semester($tgl, $kd_prodi);\n\n\t\t\t\t\t\t\t$kd_ta_data \t= $semester[0]['KD_TA'];\n\t\t\t\t\t\t\t$kd_smt_data \t= $semester[0]['KD_SMT'];\n\n\t\t\t\t\t\t\t//JIKA SESUAI DENGAN SEMESTER SAAT INI MAKA :\n\t\t\t\t\t\t\tif($ta == $kd_ta_data && $kd_current_smt == $kd_smt_data){\n\t\t\t\t\t\t\t\t$jumlah_mahasiswa++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//$jumlah_mahasiswa++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\treturn $jumlah_mahasiswa;\n\t\t}", "function perpraktikum($mhsw, $khs, $bipot, $ada, $pmbmhswid=1) {\r\n // Jumlah Matakuliah praktikum/responsi yg diambil mhsw. \r\n $jml = GetaField('krstemp k left outer join jadwal j on k.JadwalID=j.JadwalID', \r\n \"k.TahunID='$khs[TahunID]' and k.MhswID='$mhsw[MhswID]' and j.JenisJadwalID\", \r\n 'R', \"count(*)\") *2;\r\n if (($jml == 0) and (empty($mhsw['MhswID']))) $jml = 2;\r\n $totharga = $bipot['Jumlah'];\r\n if (empty($ada) && ($totharga > 0)) {\r\n $s0 = \"insert into bipotmhsw(PMBID, MhswID, TahunID, BIPOT2ID, BIPOTNamaID,\r\n PMBMhswID, TrxID, Jumlah, Besar, Catatan,\r\n LoginBuat, TanggalBuat)\r\n values('$mhsw[PMBID]', '$mhsw[MhswID]', '$khs[TahunID]', '$bipot[BIPOT2ID]', '$bipot[BIPOTNamaID]',\r\n '$pmbmhswid', '$bipot[TrxID]', $jml, '$totharga', '$mk',\r\n '$_SESSION[_Login]', now())\";\r\n $r0 = _query($s0);\r\n }\r\n else {\r\n $s0 = \"update bipotmhsw set Jumlah=$jml, Besar='$totharga',\r\n PMBMhswID='$pmbmhswid',\r\n Catatan='Total SKS: $totsks',\r\n LoginEdit='$_SESSION[_Login]', TanggalEdit=now()\r\n where BIPOTMhswID='$ada[BIPOTMhswID]' \";\r\n $r0 = _query($s0);\r\n }\r\n}", "public function jalan() {\n echo \"method jalan() berisi : Hewan ini terbang\";\n }", "public function pertanyaan()\n {\n $query = \"SELECT diagnosa.nama_diagnosa, diagnosa.solusi_diagnosa, diagnosa.keterangan, gejala.* FROM gejala \n JOIN diagnosa on diagnosa.id_diagnosa = gejala.id_diagnosa\n ORDER BY gejala.id_gejala\";\n //query hasil hanya contoh untuk MYSQL\n $q = \"SELECT pasien.id, pasien.id_user,dtl_konsultasi.id_konsultasi, diagnosa.nama_diagnosa , gejala.nama_gejala, gejala.bobot_pakar, dtl_konsultasi.bobot_user, pasien.nama_pasien FROM dtl_konsultasi\n JOIN konsultasi on konsultasi.id_konsultasi = dtl_konsultasi.id_konsultasi\n JOIN gejala on gejala.id_gejala = dtl_konsultasi.id_gejala\n JOIN diagnosa on diagnosa.id_diagnosa = gejala.id_diagnosa\n JOIN pasien on pasien.id = konsultasi.id_pasien\";\n }", "public function tambah_data($no_meja)\n {\n $waktu_penjualan=Date(\"Y-m-d H:i:s\");\n $sql= \"INSERT INTO `penjualan` (no_meja,waktu_penjualan) VALUES ('$no_meja','$waktu_penjualan')\";\n $insert=$this->konek->query($sql);\n $id_penjualan=$this->konek->insert_id;\n if($insert){\n $status= \"Berhasil Menambahkan Data\";\n }else{\n $status=\"Gagal Menambahkan Data\".$sql;\n }\n return $id_penjualan;\n }", "function getDataSingkat($conn,$key,$pengajar=true,$nip='') {\n\t\t\t$sql = \"select k.thnkurikulum, k.kodemk, c.namamk, k.kodeunit, k.periode, k.kelasmk, k.koderuang,\n\t\t\t\t\tk.nohari, k.jammulai, k.jamselesai, k.nohari2, k.jammulai2, k.jamselesai2, k.nilaimasuk, k.kuncinilai,\n\t\t\t\t\tk.dayatampung,k.jumlahpeserta,k.isonline\n\t\t\t\t\tfrom \".static::table().\" k join \".static::table('ak_kurikulum').\" c using (thnkurikulum,kodemk,kodeunit)\n\t\t\t\t\twhere \".static::getCondition($key,null,'k');\n\t\t\t$row = $conn->GetRow($sql);\n\t\t\t\n\t\t\t$row['jadwal'] = Date::indoDay($row['nohari']).', '.CStr::formatjam($row['jammulai']).' - '.CStr::formatjam($row['jamselesai']);\n\t\t\t$row['jadwal2'] = Date::indoDay($row['nohari2']).', '.CStr::formatjam($row['jammulai2']).' - '.CStr::formatjam($row['jamselesai2']);\n\t\t\t\n\t\t\t// ambil data pengajar\n\t\t\tif($pengajar) {\n\t\t\t\t$sql = \"select p.idpegawai::text as nipdosen, akademik.f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as nama from \".static::table('ak_mengajar').\" a\n\t\t\t\t\t\tjoin sdm.ms_pegawai p on a.nipdosen::text = p.idpegawai::text\n\t\t\t\t\t\twhere \".static::getCondition($key,null,'a').\" order by a.nipdosen\";\n\t\t\t\t$rs = $conn->Execute($sql);\n\t\t\t\t\n\t\t\t\t$a_ajar = array();\n\t\t\t\twhile($rowa = $rs->FetchRow())\n\t\t\t\t\t$a_ajar[] = $rowa['nama'];\n\t\t\t\t\n\t\t\t\t$row['pengajar'] = implode('<br>',$a_ajar);\n\t\t\t}\n\t\t\tif(!empty($nip)){\n\t\t\t\t$sql = \"select idpegawai::text as nik, akademik.f_namalengkap(gelardepan,namadepan,namatengah,namabelakang,gelarbelakang) as nama \n\t\t\t\t\t\tfrom sdm.ms_pegawai where nik='$nip' or idpegawai::text='$nip'\";\n\t\t\t\t$rs=$conn->GetRow($sql);\n\t\t\t\t$row['pengajar'] =$rs['nama'];\n\t\t\t}\n\t\t\treturn $row;\n\t\t}", "public function auto_insert_pengabdian(){\n\t\t\t$ta = $this->session->userdata('kd_ta');\n\t\t\t$smt = $this->session->userdata('kd_smt');\n\t\t\t$get_api_pengabdian = $this->get_jml_pengabdian();\n\t\t\t\n\t\t\tif(isset($get_api_pengabdian)){\n\t\t\t\tforeach ($get_api_pengabdian as $key) {\n\t\t\t\t\t$id_transaksi = $key['ID_TRANSAKSI'];\n\t\t\t\t\t$kode_pengabdian = $key['KD_PENGABDIAN'];\n\t\t\t\t\t$judul_pengabdian = $key['JUDUL_PENGABDIAN'];\n\n\t\t\t\t\t$narasi = $judul_pengabdian;\n\t\t\t\t\t$narasi = str_replace(\"'\", \"\", $narasi);\n\t\t\t\t\t$narasi = strip_tags($narasi);\n\t\t\t\t\t\n\t\t\t\t\t$jml_mhs = 1;\n\t\t\t\t\t//sementara pakai api yang ketua penelitian kelompok, untuk sekedar uji coba saja\n\t\t\t\t\t$sks_rule = $this->sksrule->_nilai_sks($jml_mhs, 1004, 1);\n\t\t\t\t\t$nim = $id_transaksi;\n\n\t\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\t\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\n\t\t\t\t\t// $kd_jbk = 'A';\n\t\t\t\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\t\t\t$jenis_kegiatan = $narasi;\n\t\t\t\t\t/*$jenis_kegiatan ='test';*/\n\t\t\t\t\t$bukti_penugasan = '-';\n\t\t\t\t\t// $sks_penugasan = $sks_rule;\n\t\t\t\t\t$masa_penugasan = '1 Semester';\n\t\t\t\t\t$bkt_dokumen = '-';\n\t\t\t\t\t$kd_jbk \t\t= 'C';\n\t\t\t\t\t$bkt_penugasan \t= '-';\n\t\t\t\t\t$bkt_dokumen \t= '-';\n\t\t\t\t\t$rekomendasi \t= 'LANJUTKAN';\n\t\t\t\t\t$capaian \t\t= 100;\n\t\t\t\t\t$jml_jam \t\t= 1;\n\t\t\t\t\t$outcome \t\t= '-';\n\t\t\t\t\t$file_penugasan = '-';\n\t\t\t\t\t$file_capaian \t= '-';\n\t\t\t\t\t// $sks_bkt = $sks_rule;\n\t\t\t\t\t$thn = $this->session->userdata('ta');\n\t\t\t\t\tif($smt == 2) $semester = 'GENAP'; else $semester = 'GANJIL';\n\t\t\t\t\t\n\t\t\t\t\t$cek_dosen_pengabdian = $this->cek_api_dosen_pengabdian($id_transaksi);\n\n\t\t\t\t\tif(!$cek_dosen_pengabdian){\n\n\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia_ta';\n\t\t\t\t\t\t$parameter = array('api_search'=>array($kd_jbk, $kd_dosen, $jenis_kegiatan, $bkt_penugasan, $sks_rule, $masa_penugasan, $bkt_dokumen, $sks_rule, $thn, $semester, $rekomendasi, $jml_jam, $capaian, $outcome, $file_penugasan, $file_capaian, $ta, $smt));\n\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t\t// echo 'simpan ke db bkd_beban_kerja dan BKD_REMUN_KINERJA sukses'; echo '<br>';\n\t\t\t\t\t\t\t// $api_url \t= URL_API_BKD.'bkd_beban_kerja/get_current_data_tersimpan';\n\t\t\t\t\t\t\t// $parameter\t= array('api_search' => array('BKD.BKD_BEBAN_KERJA','KD_BK'));\n\t\t\t\t\t\t\t// $getid = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t\t\t\t\t$getid = $simpan;\n\t\t\t\t\t\t\t$nm_keg = $jenis_kegiatan;\n\n\t\t\t\t\t\t\t$status_pindah = 1;\n\t\t\t\t\t\t\t$jenjang = 'S1';\n\t\t\t\t\t\t\t$prodi = '-';\n\t\t\t\t\t\t\t$nim = $id_transaksi;\n\t\t\t\t\t\t\t#simpan data pendidikan\n\t\t\t\t\t\t\t//catatan: $parameter ke dua adalah kd_kat, parameter ini nantinya otomatis, misalya ketika ada status sebagai pembimbing, maka\n\t\t\t\t\t\t\t//akan berubah menjadi kd_kat untuk membimbing\n\t\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pengabdian_dosen';\n\t\t\t\t\t\t\t$parameter\t= array('api_search' => array($getid, '131', $nm_keg, $jenjang, '-', '1', $sks_rule, '1', '1', 'A', '1', $prodi, $nim, $status_pindah));\n\t\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t\t\t//echo 'simpan ke data pendidikan sukses'; echo '<br>';\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\n\t\t\t\t\t }\n\n\t\t\t\t}\n\t\t\t}else{\n\n\t\t\t}\n\t\t\t\n\t\t}", "function json($id_kelas) {\n $this->datatables->select('id_siswa,t_siswa.id_pendaftaran,nis,t_siswa.id_kelas,t_siswa.nisn,t_siswa.nama_siswa,t_ppdb.alamat,t_ppdb.tempat_lahir,t_ppdb.tanggal_lahir,t_siswa.status_aktif');\n $this->datatables->from('t_siswa');\n //add this line for join\n $this->datatables->join('t_ppdb', 't_siswa.id_pendaftaran = t_ppdb.id_pendaftaran');\n $this->datatables->join('t_kelas', 't_siswa.id_kelas = t_kelas.id_kelas');\n $this->datatables->where('t_siswa.id_kelas',$id_kelas);\n $this->datatables->add_column('action', anchor(site_url('datarombel/pindah_kelas/$1'),'<i class=\"fa fa-eye\" aria-hidden=\"true\"> Assign Kelas</i>', 'class=\"btn btn-danger btn-sm\" onclick=\"javasciprt: return confirm(\\'Are You Sure ? \\')\"'),'id_siswa');\n return $this->datatables->generate();\n }", "function tambah_data_wakel(){\n\t\tGLOBAL $koneksi;\n\t\t$query2 = mysqli_query($koneksi,\"SELECT max(kelas.id_kelas) AS 'id' FROM kelas\");\n\t\t$data = mysqli_fetch_assoc($query2);\n\n\t\t$w_kelas = (int)strip_tags(trim($_POST['wali_kelas']));\n\t\t$id_kelas = $data['id'];\n\t\t$query = \"INSERT INTO wali_kelas VALUES(NULL,'$w_kelas','$id_kelas')\";\n\n\t\treturn run_query($query); \t\t\n\t}", "public function simpanDataPengadilan($post){\n\t\t$connection \t= $this->db;\n\t\t$isNewRecord \t= htmlspecialchars($post['isNewRecord'], ENT_QUOTES);\n\t\t$tingkat \t\t= htmlspecialchars($post['tingkat'], ENT_QUOTES);\n\t\t$propinsi \t\t= htmlspecialchars($post['propinsi'], ENT_QUOTES);\n\t\t$kabupaten \t\t= htmlspecialchars($post['kabupaten'], ENT_QUOTES);\n\t\t$deskripsi \t\t= htmlspecialchars($post['deskripsi'], ENT_QUOTES);\n\t\t$alamat \t\t= htmlspecialchars($post['alamat'], ENT_QUOTES);\n\t\t\n\t\tif($tingkat == \"\" || $propinsi == \"\"){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Tingkat pengadilan, dan provinsi harus diisi\");\n\t\t} else if($tingkat == \"2\" && ($propinsi == \"\" || $kabupaten == \"\")){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Tingkat pengadilan, provinsi, dan kabupaten harus diisi\");\n\t\t} else{\n\t\t\t$transaction = $connection->beginTransaction();\n\t\t\ttry {\n\t\t\t\tif($isNewRecord){\n\t\t\t\t\tif($tingkat == 1){\n\t\t\t\t\t\t$cek1 = \"select deskripsi from datun.m_propinsi where id_prop = '\".$propinsi.\"'\";\n\t\t\t\t\t\t$prop = $connection->createCommand($cek1)->queryScalar();\n\t\t\t\t\t\t$sql1 = \"insert into datun.pengadilan_tk1 values('\".$propinsi.\"', 'Pengadilan Tinggi \".ucwords(strtolower($prop)).\"', '\".$alamat.\"')\";\n\t\t\t\t\t} else if($tingkat == 2){\n\t\t\t\t\t\t$cek1 = \"select deskripsi_kabupaten_kota from datun.m_kabupaten where id_prop = '\".$propinsi.\"' and id_kabupaten_kota = '\".$kabupaten.\"'\";\n\t\t\t\t\t\t$prop = $connection->createCommand($cek1)->queryScalar();\n\t\t\t\t\t\t$sql1 = \"insert into datun.pengadilan_tk2 values('\".$propinsi.\"', '\".$kabupaten.\"', 'Pengadilan Negeri \".ucwords(strtolower($prop)).\"', '\".$alamat.\"')\";\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\tif($kabupaten == '00'){\n\t\t\t\t\t\t$sql1 = \"update datun.pengadilan_tk1 set deskripsi_tk1 = '\".$deskripsi.\"', alamat = '\".$alamat.\"' where kode_pengadilan_tk1 = '\".$propinsi.\"'\";\n\t\t\t\t\t} else{\n\t\t\t\t\t\t$sql1 = \"update datun.pengadilan_tk2 set deskripsi_tk2 = '\".$deskripsi.\"', alamat = '\".$alamat.\"' where kode_pengadilan_tk1 = '\".$propinsi.\"' \n\t\t\t\t\t\t\t\tand kode_pengadilan_tk2 = '\".$kabupaten.\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$connection->createCommand($sql1)->execute();\n\t\t\t\t$transaction->commit();\n\t\t\t\treturn array(\"hasil\"=>true, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t$transaction->rollBack();\n\t\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t}\n\t\t}\n\t}", "public function poliSesuaiJadwal()\n {\n $poliTujuan = JadwalDokter::where('kd_poli',$this->kodePoli())->where('hari_kerja', $this->dayToHari())->first();\n $poliSesuaiJadwal = $poliTujuan->poli['nm_poli'];\n return $poliSesuaiJadwal;\n }", "function jabatan_data()\n\t{\t\t\n\t\t$data['j'] = $this->M_master->data_jabatan();\t\n\t\t$data['title'] = 'Data Jabatan';\t\t\n\t\t$data['isi'] = 'contents/jabatan_data';\n\t\t$this->load->view('wrapper', $data);\n\t}", "function data($jenis, $detail = null, $action = null){\n\t\t\t\n\t\t$jenis = $this->security->xss_clean($this->uri->segment(5));\n\t\t$data['kode'] = $jenis;\n\t\t# set parameters \n\t\t$kd_dosen = $this->session->userdata(\"kd_dosen\");\n\t\t$thn = $this->session->userdata(\"ta\");\n\t\t$smt = $this->session->userdata(\"smt\");\n\t\t$status = $this->session->userdata(\"jenis_dosen\");\n\t\t\n\t\t$kd_ta = $this->setting->_generate_kd_ta($thn);\n\t\t$kd_smt = $this->setting->_generate_kd_smt($smt);\n\t\t\n\t\t $data['is_crud'] = $this->setting->_is_crud_bkd_lalu($kd_ta, $kd_smt);\n\t\t/*if($data['is_crud'] == 1){\n\t\t\t$data['tombol'] = 'style=\"display:block\"';\n\t\t}else{\n\t\t\t$data['tombol'] = 'style=\"display:none\"';\n\t\t} */\n\t\t\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_jadwal';\n\t\t$parameter = array();\n\t\t$jadwal = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\tif(!empty($jadwal)){\n\t\t\t$data['tombol'] = 'style=\"display:block\"';\n\t\t}else{\n\t\t\t$data['tombol'] = 'style=\"display:none\"';\n\t\t\t$data['tombol2'] = 'style=\"display:;\"';\n\t\t\t$data['tombol3'] = 'style=\"display:;pointer-events:none; cursor:default;\"';\n\t\t}\t\n\t\t\n\t\tif ($detail !== null){\n\t\t\tif ($action !== ''){\n\t\t\t\tswitch ($action){\n\t\t\t\t\tcase 'penugasan-isi': $data['view'] = 'dosen/isi_dokumen'; break;\n\t\t\t\t\tcase 'penugasan-cari': {\n\t\t\t\t\t\t\t$data['view'] = 'dosen/cari_dokumen';\n\t\t\t\t\t\t}break;\n\t\t\t\t\tcase 'penugasan-upload': $data['view'] = 'dosen/upload_dokumen'; break;\n\t\t\t\t\tcase 'kinerja-isi': $data['view'] = 'dosen/isi_dokumen'; break;\n\t\t\t\t\tcase 'kinerja-cari': {\n\t\t\t\t\t\t\t$data['view'] = 'dosen/cari_dokumen'; \n\t\t\t\t\t}break;\n\t\t\t\t\tcase 'kinerja-upload': $data['view'] = 'dosen/upload_dokumen'; break;\n\t\t\t\t\tdefault : $data['view'] = 'dosen/isi_dokumen'; break;\n\t\t\t\t}\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_bkd';\n\t\t\t\t$parameter = array('api_search' => array($detail, $data['kode']));\n\t\t\t\t$data['current_data'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t\t# GET PARTNER\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/partner';\n\t\t\t\t$parameter = array('api_kode' => 11000, 'api_subkode' => 1, 'api_search' => array($detail,'PENELITIAN'));\n\t\t\t\t$data['partner'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\n\t\t\t\t$data['nama_partner'] = array();\n\t\t\t\tforeach ($data['partner'] as $p){\n\t\t\t\t\t$data['nama_partner'][$p->PARTNER] = $this->get_nama_partner($p->PARTNER);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_bkd';\n\t\t\t$parameter = array('api_search' => array($detail, $data['kode']));\n\t\t\t$data['current_data'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t}\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_bebankerja';\n\t\t$parameter = array('api_search' => array($data['kode'], $kd_dosen, $thn, $smt));\n\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t// $temp_sks =0;\n\t\t// foreach ($data['data_beban'] as $key) {\n\t\t// \t$n_sks = (float) str_replace(\",\", \".\", $key->SKS_BKT);\n\t\t// \t$temp_sks +=$n_sks;\n\t\t// }\n\t\t\n\t\t//berubah dari sini \n\t\t//============================================\n\t\t$temp_sks = array();\n\t\tforeach ($data['data_beban'] as $key) {\n\t\t\t$n_sks = (float) str_replace(\",\", \".\", $key->SKS_BKT);\n\t\t\t//$temp_sks +=$n_sks;\n\n\t\t\tif(isset($temp_sks[$key->KD_KAT])){\n\t\t\t\t$temp_sks[$key->KD_KAT] += $n_sks;\n\t\t\t}else{\n\t\t\t\t$temp_sks[$key->KD_KAT] = $n_sks;\n\t\t\t}\n\t\t}\n\n\t\t//===========================================\n\n\n\n\t\t$kd=$this->session->userdata('kd_dosen');\n\t\t$ta = $this->session->userdata('kd_ta');\n\t\t$smt = $this->session->userdata('kd_smt');\n\n\t\t$kd_ta = $this->_generate_ta($ta);\n\t\t$kd_smt = $this->_generate_smt($smt);\n\t\t$this->session->unset_userdata('jenis_dosen');\n\t\t$this->session->set_userdata('jenis_dosen', $this->history->_status_DS($kd, $kd_ta, $kd_smt));\n\n\t\t\n\t\tswitch ($jenis) {\n\t\t\tcase 'A':\n\t\t\t\t$subkode = 1;//syarat pendidikan\n\t\t\t\tbreak;\n\t\t\tcase 'B':\n\t\t\t\t$subkode = 2;//syarat penelitian\n\t\t\t\tbreak;\n\t\t\tcase 'C':\n\t\t\t\t$subkode = 3;//syarat pengabdian\n\t\t\t\tbreak;\n\t\t\tcase 'D': case 'F': case 'H':\n\t\t\t\t$subkode = 4;//syarat penunjang\n\t\t\t\tbreak;\n\n\t\t}\n\t\t//get syarat dari API\n\t\t\t$syarat_minimal = $this->s00_lib_api->get_api_json(\n\t\t\t\t\t\tURL_API_BKD.'/bkd_beban_kerja/get_syarat_kesimpulan',\n\t\t\t\t\t\t'POST',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'api_kode' => 1000,\n\t\t\t\t\t\t\t'api_subkode' => $subkode, //untuk PENDIDIKAN\n\t\t\t\t\t\t\t'api_search' => array($this->history->_status_DS($kd, $kd_ta, $kd_smt))\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\n\t\t//$temp_sks;\n\t\tif(isset($syarat_minimal['NILAI'])){\n\t\t\t$syarat_sks = $syarat_minimal['NILAI'];\n\t\t}else{\n\t\t\t$syarat_sks = 0;\n\t\t}\n\t\t\n\t\t$i=0;\n\t\tforeach ($data['data_beban'] as $key) {\n\t\t\t$kd_bk = $key->KD_BK;\n\t\t\t$kd_kat = $key->KD_KAT;\n\t\t\t$status_pindah = $key->STATUS_PINDAH;\n\t\t\tif($status_pindah == 1){\n\t\t\t\t$kd_kat_remun = $kd_kat;\n\t\t\t}elseif($status_pindah == 0){\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_kd_kat_remun2';\n\t\t\t\t$parameter = array('api_search' => array($kd_kat));\n\t\t\t\t$kd_kat_remun = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter);\n\t\t\t}\n\n\t\t\t//=======\n\n\t\t\t$temp_syarat = $this->s00_lib_api->get_api_json(\n\t\t\t\t\t\tURL_API_BKD.'/bkd_beban_kerja/get_syarat_kesimpulan_kat',\n\t\t\t\t\t\t'POST',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'api_kode' => 1000,\n\t\t\t\t\t\t\t'api_subkode' => $subkode, //untuk PENDIDIKAN\n\t\t\t\t\t\t\t'api_search' => array($this->history->_status_DS($kd, $kd_ta, $kd_smt), $kd_kat)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t$data['data_beban'][$i]->MINIMAL_SKS = $temp_syarat;\n\n\t\t\t//=======\n\n\t\t\t$data['data_beban'][$i]->KD_KAT_REMUN = $kd_kat_remun;\n\t\t\tif((($temp_sks[$kd_kat] - $data['data_beban'][$i]->SKS_BKT) >= $temp_syarat) AND $data['data_beban'][$i]->STATUS_PINDAH==0){\n\t\t\t\t$data['data_beban'][$i]->SYARAT_PINDAH = 1;//dapat dipindah\n\t\t\t}else{\n\t\t\t\t$data['data_beban'][$i]->SYARAT_PINDAH = 0;//tidak dapat dipindah\n\t\t\t}\n\t\t\t\n\t\t\t$i++;\n\t\t\t/*echo \"<pre>\";\n\t\t\tprint_r($key);\n\t\t\techo \"<pre>\";*/\n\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_kd_kat';\n\t\t\t$parameter \t= array('api_search'=>array($kd_bk));\n\t\t\t$kd_kat = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t//cek di tabel konversi apakah kd_kat memiliki kd_kat remun\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/cek_kd_konversi';\n\t\t\t$parameter \t= array('api_search'=>array($kd_kat));\n\t\t\t$data['konversi'][$kd_kat] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t}\n\n\t\t// echo '<pre>';\n\t\t// print_r($data['data_beban']);\n\t\t// echo '</pre>';\n\n\t\t// die();\n\n\t\t/*die();*/\n\t\t/*\n\n\t\tdie();*/\n\t\t#print_r($data['data_beban']);\n\t\t# load view\n\n\t\t/*mekanisme cek data asesor, untuk melihat apakah dosen sudah mengisi data asesor atau belum*/\n\t\t$data['nira'] = $this->get_data_asesor_dosen_by_nip();\n\t\t\n\t\t$this->cek_nira_asesor_dosen_uin();\n\t\t$this->auto_insert_penelitian();\n\n\t\t/*$this->auto_insert_pengabdian();*/ /*SUDAH BISA INSERT TINGGAL TUNGGU KEPUTUSAN DATA PENGABDIAN*/\n\n\t\t$this->output99->output_display('dosen/daftar_beban_kerja',$data);\n\t}", "function isNaikGaji($conn,$idpegawai,$tglkgb){\n\t\t\t$tglkgb = Cstr::formatDate($tglkgb);\n\t\t\t$bln = substr($tglkgb,5,2);\n\t\t\t$isnaik = true;\n\t\t\t//cek apakah pegawai sudah diproses naik pangkat\n\t\t\t$kgb = $conn->GetOne(\"select idpegawai from \".self::table('pe_kgb').\" \n\t\t\t\t\twhere idpegawai = $idpegawai and datepart(month,tglkgb)='$bln'\");\n\t\t\t\t\t\n\t\t\n\t\t\tif(!empty($kgb))\n\t\t\t\t$isnaik = false;\n\t\t\t\t\n\t\t\t//mendapatkan next pangkat\n\t\t\t$rown = mKenaikan::getNaikGaji($conn,$idpegawai,$tglkgb);\n\t\t\t\n\t\t\t//cek untuk status pegawai yang naik pangkat\n\t\t\t$sql = \"select p.idpegawai,coalesce(p.nik+' - ','')+\".static::schema.\".f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as pegawai,\n\t\t\t\t\tu.kodeunit+' - '+u.namaunit as namaunit,pl.golongan as golonganlama,p.tmtpangkat as tmtpangkatlama,cast(p.masakerjathngol as varchar)+' tahun '+cast(p.masakerjablngol as varchar)+' bulan' as mklama,\n\t\t\t\t\t'\".$rown['idpangkat'].\"' as pangkatbaru,'\".$rown['tmtpangkat'].\"' as tmtpangkat,substring(right(replicate('0', 4) + cast(\".$rown['mkg'].\" as varchar), 4),1,2) as mkthn, substring(right(replicate('0', 4) + cast(\".$rown['mkg'].\" as varchar), 4),3,2) as mkbln\n\t\t\t\t\tfrom \".self::table('ms_pegawai').\" p\n\t\t\t\t\tleft join \".self::table('ms_unit').\" u on u.idunit=p.idunit\n\t\t\t\t\tleft join \".self::table('ms_pangkat').\" pl on pl.idpangkat=p.idpangkat\n\t\t\t\t\tleft join \".self::table('pe_kgb').\" k on k.idpegawai=p.idpegawai and k.tglkgb = '$tglkgb'\n\t\t\t\t\twhere p.idpegawai = $idpegawai and p.idstatusaktif = 'AA'\";\n\t\t\t$row = $conn->GetRow($sql);\t\n\t\t\t\t\t\t\n\t\t\tif(empty($row))\n\t\t\t\t$isnaik = false;\n\t\t\t\t\n\t\t\t$a_data = array('kgb' => $kgb, 'row' => $rown, 'isnaik' => $isnaik, 'sql' => $sql);\n\t\t\t\n\t\t\treturn $a_data;\n\t\t}", "public function getJadwalBerakhir();", "public function daftarMahasiswa()\n {\n $this->load->model('Model_mahasiswa', 'mahasiswa');\n $data['mahasiswa'] = $this->mahasiswa->getDataMahasiswa();\n echo json_encode($data['mahasiswa']);\n }", "function index_put() {\n $id = $this->put('id'); // Memanggil data berdasarkan idnya \n $data = array( // Menerima data dan menyimpannya kedalam array\n 'id' => $this->put('id'),\n 'nama' => $this->put('nama'),\n 'nomor' => $this->put('nomor'));\n $this->db->where('id', $id);\n $update = $this->db->update('telepon', $data); // Menyimpan perubahan data\n if ($update) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function getJadwalDimulai();", "function _is_pejabat_penunjang_nt(){\n\t\t$CI \t\t=& get_instance();\n\t\t$kd \t\t= $CI->session->userdata('kd_dosen');\n\t\t$tgl \t\t= date('d-m-Y');\n\t\t$api_url \t= URL_API_SIMPEG1.'simpeg_mix/data_search';\n\t\t$parameter = array('api_kode' =>1121, 'api_subkode' => 3, 'api_search' => array($tgl, $kd, 1));\n\t\t$data = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t//print_r ($data);\n\t\t$value = array();\n\t\t//echo $data[count($data)-1]->STR_NAMA;\n\t\tif(!empty($data)){\n\t\t\t//$kd_jab \t= $data[count($data)-1]->STR_ID;\n\t\t\t//ini harusnya yang aktif, bukan yang index 0 ; \n\t\t\tforeach ($data as $d) {\n\t\t\t\t$kd_jab \t= $d->STR_ID;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/jabatan';\n\t\t\t\t$parameter = array('api_kode' =>20000, 'api_subkode' => 1, 'api_search' => array($kd_jab));\n\t\t\t\t$data2 = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif(!empty($data2)){\n\t\t\t\t\t//$value['nama_jabatan'] = $data[count($data)-1]->STR_NAMA;\n\t\t\t\t\t$value['nama_jabatan'] = $d->STR_NAMA;\n\t\t\t\t\t$value['sks_maks'] = $this->_get_sks_max($d->STR_ID);//$data2[0]->SKS_MAX;\n\t\t\t\t\t$value['bukti_penugasan'] = 'Surat Keputusan';\n\t\t\t\t\t$value['masa_penugasan'] = '1 Tahun';\n\t\t\t\t\t$value['tgl_mulai'] = $d->RR_TANGGAL_MULAI_F;\n\t\t\t\t\t$value['tgl_selesai'] = $d->RR_TANGGAL_AKHIR_F;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $value;\n\t\t#return $data;\n\t\t\n\t}", "public function displaymahasiswa()\r\n {\r\n $query = \"select * from data_mahasiswa\";\r\n return $this->db->query($query);\r\n }", "public function jadwal()\n { \n $jadwal = Jadwal::query()\n ->join('pelatihs','pelatihs.id','=','namaPelatih_id')\n ->select('pelatihs.namaPelatih',\n 'jadwals.kelompokUsia','jadwals.id','jadwals.tempatLatihan','jadwals.hariLatihan','jadwals.jamLatihan') \n ->orderBy('jadwals.id', 'DESC') \n ->get(); \n\n return view('admin-views.jadwal-index', ['jadwal'=>$jadwal]);\n }", "function jml_mhs_bimbingan_ta($periode = ''){\n\t\t\t// \t\t \t\t 2 --> untuk ujian tugas akhir (munaqasah)\n\n\t\t\t$kd_dosen \t= $this->session->userdata('kd_dosen');\n\t\t\t$ta \t\t= $this->session->userdata('kd_ta');\n\t\t\t$kd_smt \t= $this->session->userdata('kd_smt');\n\t\t\t$jumlah_mahasiswa = 0;\n\n\t\t\t$url \t\t= 'sia_skripsi_bimbingan/jadwalTA';\n\t\t\t$api_url \t= 'http://service.uin-suka.ac.id/servtugasakhir/sia_skripsi_public/'.$url;\n\t\t\t$parameter \t= array('api_kode' => 1000, 'api_subkode' => 1, 'api_search' => array($kd_dosen, $periode));\n\t\t\t$data \t \t= $this->s00_lib_api->get_api_json($api_url, 'POST', $parameter);\n\n\t\t\tif($data){\n\t\t\t\tforeach ($data as $key) {\n\t\t\t\t\t$nim \t= $key['NIM'];\n\t\t\t\t\t$tgl \t= str_replace('-', '/', $key['TGL_MUNA']);\n\n\t\t\t\t\t$data_mhs \t= $this->get_data_mhs($nim);\n\t\t\t\t\t$kd_prodi \t= $data_mhs[0]['KD_PRODI'];\n\n\t\t\t\t\t$semester \t= $this->periode_semester($tgl, $kd_prodi);\n\n\t\t\t\t\t$kd_ta_data \t= $semester[0]['KD_TA'];\n\t\t\t\t\t$kd_smt_data \t= $semester[0]['KD_SMT'];\n\n\t\t\t\t\tif($ta == $kd_ta_data && $kd_smt == $kd_smt_data){\n\t\t\t\t\t\t$jumlah_mahasiswa++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $jumlah_mahasiswa;\n\t\t}", "public function tambah_toko(){\n\t}", "function tampil_bentuk_sedia(){\n $data['login'] = 'Halaman Login';\n $data['title'] = 'Kelola Satuan Sedia';\n $data['query'] = $this->m_barang->tampil_satuan_sedia();\n $this->template->load('static','barang/satuan/satuansedia', $data);\n }", "public function jadwalTambah()\n { \n $pelatih = Pelatih::query()\n ->select('id','namaPelatih')\n ->get(); \n\n return view('admin-views.jadwal-tambah', ['pelatih'=>$pelatih]);\n }", "public function list_data_pejabat_berwenang()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $data_pejabat['data_pejabat'] = $this->m_admin->get_data_pejabat()->result();\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/list_data_pejabat_berwenang', $data_pejabat);\n $this->load->view('footer');\n }", "public function data_tahun_ajaran()\n\t{\n\t\t$data['data'] = $this->m_aka->data_tahun_ajaran(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'mata_kuliah/data_tahun_ajaran';\n\t\t$this->load->view('content', $data);\n\t}", "function data_prosesan()\n{\n //$jadual['medan'][]='*';\n /*$jadual['medan'][]='newss,ssm,nama,tel,fax,responden,' .\n '(SELECT keterangan FROM msic WHERE msic=msic2000 LIMIT 1,1) as keterangan,' .\n 'msic2000,msicB2000,fe';*/\n $sama='j1.newss,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn, ';\n $sama2='j2.newss,concat(j2.tahun_rujukan,\"-\",j2.siri_kekerapan) as blnthn, ';\n //$jadual['medan'][]=$sama . 'ssm, nama, operator, sv, kekerapan_sv'; \n //$jadual['medan'][]=$sama . 'ng, po, data_anggaran, cara_maklum_balas, cara_terima, sumber_pertubuhan, kategori_sample';\n //$jadual['medan'][]=$sama . 'status_operasi, status_lain_pbb, bil_bulan_bco, siasatan_bermula, siasatan_berakhir';\n //$jadual['medan'][]=$sama . 'no_jln_bgn, tmn_kg, bandar_kawasan, poskod, negeri, daerah, catatan';\n //$jadual['medan'][]=$sama . 'responden, jawatan, email, notel, lamanweb, tarikh';\n //$jadual['medan'][]=$sama . 'responden2, jawatan2, email2, notel2, nofax2';\n //$jadual['medan'][]=$sama . '`no_jln_bgn-lokasi`, `tmn_kg-lokasi`, `bandar_kawasan-lokasi`, ' .\n //'`poskod-lokasi`, `negeri-lokasi` ng, `daerah-lokasi` dp';\n $jadual['medan'][]='j1.newss,j1.ssm,j1.nama,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn ';\n $jadual['medan'][]=$sama . \"\\r\" . 'msic_lama, (SELECT keterangan FROM msic WHERE msic=msic_lama LIMIT 1,1) as keterangan,' . \n 'msic_baru, utama '; \n //$jadual['medan'][]=$sama . \"\\r\\t\" . 'F3001, F3002, catatan_soalan3, ' . 'F5001, F5002, F5003, F5104, catatan_soalan5';\n $jadual['medan'][]=$sama . 'F6001, F6002, F6003, F6004, F6005, F6101, F6102, F6103, F6104, F6105, catatan_soalan6';\n $jadual['medan'][]=$sama . 'F7001, F7002, F7003, catatan_soalan7, ' .\n 'F8001, catatan_soalan8, F9001, catatan_soalan9';\n //$jadual['medan'][]=$sama . 'cara_anggaran, bulan_terakhir_data_sebenar, bil_bulan_data_telah_dianggar';\n\n //$jadual['medan'][]=$sama . 'Deskripsi_Produk_Oleh_Responden, Produk_Tetap, Deskripsi_Produk_Tetap,\n //Produk_Tambahan, Deskripsi_Produk_Tambahan, UnitKuantitiAsal, UnitKuantitiLain'; \n $produk='Deskripsi_Produk_Tetap Nama, Produk_Tetap Kod, ';\n $jadual['medan'][]=$sama . $produk . 'KuantitiPengeluaran, KuantitiJualan, NilaiJualan, ' .\n 'format(NilaiJualan/KuantitiJualan,2) as HargaUnit, UnitKuantitiKini';\n //$jadual['medan'][]=$sama . $produk . 'ProsesanKuantitiPengeluaran, ProsesanKuantitiJualan, ProsesanNilaiJualan, AUP';\n $jadual['medan'][]=$sama . $produk . 'F2497, F2498, F2499, Catatan';\n $jadual['medan'][]=$sama . \"\\r\\t\" . \n 'F3001, F3002, catatan_soalan3, ' .\n 'F5001, F5002, F5003, F5104, catatan_soalan5';\n\n //$jadual['medan'][]=$sama . 'catatan';\n $jadual['medan'][]=$sama . 'F4001, F4002, F4003, F4004';\n $jadual['medan'][]=$sama . 'F4101, F4102, F4103, F4104';\n $jadual['medan'][]=$sama . 'F4201, F4202, F4203, F4204';\n $jadual['medan'][]=$sama . 'catatan \"Nota \", F4302, F4303, F4304';\n\n // bulanan\n //$bulan=($_GET['bln']==null)? '':'AND siri_kekerapan=\"'.bersih($_GET['bln']).'\"';\n $bulan_penuh = array('Januari', 'Februari', 'Mac', 'April', \n 'Mei', 'Jun', 'Julai', 'Ogos', \n 'September', 'Oktober', 'November', 'Disember');\n //$kerap='\"'.$bulan_penuh[0].'\",\"'.$bulan_penuh[1].'\",\"'.$bulan_penuh[2].'\"';\n //$bulan=($_GET['bln']==null)? '':'AND j1.siri_kekerapan in ('.$kerap.')';\n //$myJadual=array('mm_rangka','mm_rangka');\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_info'; } // bil medan = 15\n for($z=1;$z <= 2;$z++) { $jadual['nama'][]='prosesmm_jualan'; }\n $jadual['nama'][]='prosesmm_info';\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_gajistaf'; }\n $join1='prosesmm_info';\n $join2='prosesmm_jualan';\n $join3='prosesmm_gajistaf';\n \n return $jadual;\n}", "public function actionBatalkanPresensi(){\n Yii::$app->response->format = Response::FORMAT_JSON;\n $response = null;\n\n if (Yii::$app->request->isPost){\n $data = Yii::$app->request->post();\n\n $id_presensi = $data['id_presensi'];\n $nim = $data['nim'];\n\n $model = PresensiDetail::find()\n ->where(['id_presensi' => $id_presensi])\n ->andWhere(['nim' => $nim])\n ->one();\n\n $model->status = \"Tidak Hadir\";\n $model->update(false);\n\n $response['code'] = \"200\";\n $response['status'] = \"OK\";\n $response['message'] = \"Presensi \".$model->nim0->nama.\" berhasil dibatalkan\";\n }\n\n return $response;\n }", "public function list_data_mantan_pejabat_berwenang()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $data_pejabat['data_pejabat'] = $this->m_admin->get_data_mantan_pejabat()->result();\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/list_data_mantan_pejabat_berwenang', $data_pejabat);\n $this->load->view('footer');\n }", "public function getTableAcara(){\r\r\n\t\t$key = 1;\r\r\n\t\tif($this->input->post(\"key\")!==NULL){\r\r\n\t\t\t$key = intval($this->input->post(\"key\"));\r\r\n\t\t\tif($key < 0) $key = 1;\r\r\n\t\t}\r\r\n\t\t$s=true;\r\r\n\t\t$string = \"<h4>Informasi Acara</h4><div class='well'>Data Tidak ditemukan</div>\";\r\r\n\t\t$n = 1;\r\r\n\t\t$z = 1;\r\r\n\t\t$koko = 0;\r\r\n\t\t$this->loadLib('ControlEvent');\r\r\n\t\t$tempKejadian = (new ControlEvent($this->gateControlModel))->getAllData();\r\r\n\t\tif($tempKejadian){\r\r\n\t\t\twhile($tempKejadian->getNextCursor()){\r\r\n\t\t\t\tif($n <= 5 && $z == $key){\r\r\n\t\t\t\t\tif($s){\r\r\n\t\t\t\t\t\t$string = \"<h4>Informasi Acara</h4>\";\r\r\n\t\t\t\t\t\t$s = false;\t\r\r\n\t\t\t\t\t}\t\t\t\r\r\n\t\t\t\t\tif($tempKejadian->getKode() == '1'){\t\r\r\n\t\t\t\t\t\t$string .= \"<div class='well'>\";\r\r\n\t\t\t\t\t\t$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi();\r\r\n\t\t\t\t\t\t//$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi().\" Pada tahun ajaran \".substr($tempKejadian->getTahunAk(),0,strlen($tempKejadian->getTahunAk())-1).\"-\".(intval(substr($tempKejadian->getTahunAk(),0,strlen($tempKejadian->getTahunAk())-1))+1).\" Semester \".$tempKejadian->getTahunAk()[4].\" dimulai pada tanggal \".$tempKejadian->getMulai().\" hingga tanggal \".$tempKejadian->getBerakhir();\r\r\n\t\t\t\t\t\t$string .= \"</div>\";\t\r\r\n\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t$string .= \"<div class='well'>\";\r\r\n\t\t\t\t\t\t$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi();\r\r\n\t\t\t\t\t\t$string .= \"</div>\";\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$koko ++;\r\r\n\t\t\t\t\t$n++;\r\r\n\t\t\t\t}else if($n == 5 && $z < $key){\r\r\n\t\t\t\t\t$n = 1;\r\r\n\t\t\t\t\t$z++;\r\r\n\t\t\t\t}else{\r\r\n\t\t\t\t\t$n++;\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\techo \"1\".$string;\r\r\n\t\tif($key == 1){\r\r\n\t\t\tif($koko == 5)\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"nextPageBerandaBase();\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t\telse\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t}else{\r\r\n\t\t\tif($koko == 5)\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"previousPageBerandaBase();\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"nextPageBerandaBase();\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t\telse\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"previousPageBerandaBase();\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t}\r\r\n\t\t\r\r\n\t}", "function index_post() {\n $data = array(\n 'id_penumpang' => $this->post('id_penumpang'),\n 'nama_penumpang' => $this->post('nama_penumpang'),\n 'jml_bayar' => $this->post('jml_bayar'),\n 'dateFromPesanClass' => $this->post('tgl_keberangkatan'),\n 'jam_keberangkatan' => $this->post('jam_keberangkatan'),\n 'no_telp' => $this->post('no_telp'),\n 'kode_kursi' => $this->post('kode_kursi'),\n 'nama_pengemudi' => $this->post('nama_pengemudi'),\n 'kode_kendaraan' => $this->post('kode_kendaraan'),\n 'jenis_kendaraan' => $this->post('jenis_kendaraan'));\n \n $insert = $this->db->insert('t_penumpang', $data);\n if ($insert) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function mata_kuliah_jurusan(){\n\t\t\t$data['content'] = \"mk_jurusan/mata_kuliah_jurusan\";\n\t\t\t$mk = \"t_mk\";\n\t\t\t$data['mk'] = $this->m_aka->get_all($mk);\n\t\t\t$this->load->view(\"content\", $data);\n\t\t}", "function data_mhs(){\r\n\t\t\techo \"KodeMataKuliah : \".$this->KodeMataKuliah.\"<br />\";\r\n\t\t\techo \"SKS : \".$this->SKS.\"<br />\";\r\n\t\t\techo \"Daftar matakuliah yang diambil:<br />\";\r\n\t\t\t\r\n\t\t\t$i = 0; // nomor urut daftar SKS matakuliah yang diambil\r\n\t\t\tforeach($this->NamaMataKuliah as $mk){\r\n\t\t\t\techo ++$i.\". \".$mk.\"<br />\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Cuma buat ganti baris aja kok :-)\r\n\t\t\techo \"<br />\";\r\n\t\t}", "public function data_biaya_kuliah()\n\t{\n\t\t$data['data'] = $this->m_aka->data_biaya_kuliah(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'keuangan/data_biaya_kuliah';\n\t\t$this->load->view('content', $data);\n\t}", "public function aksi_ubah_pejabat_berwenang()\n {\n $data = array(\n 'nip' => $this->input->post('nip'),\n 'nama' => $this->input->post('nama'),\n 'jabatan' => $this->input->post('jabatan'),\n 'pangkat_gol' => $this->input->post('pangkat_gol'),\n );\n\n $detailhere = $this->input->post('id_pejabat_berwenang');\n\n $this->m_admin->aksi_ubah_data_pejabat($detailhere, $data, 'pejabat_berwenang');\n\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/detail_data_pejabat_berwenang/' . $detailhere);\n }", "public function get_pembeli_darat() {\r\n $nama = $this->input->get('term'); //variabel kunci yang di bawa dari input text id kode\r\n $tipe = \"darat\";\r\n $query = $this->master->get_pembeli($tipe,$nama); //query model\r\n\r\n if($query == TRUE){\r\n $pelanggan = array();\r\n foreach ($query as $data) {\r\n $pelanggan[] = array(\r\n 'label' => $data->nama_pengguna_jasa, //variabel array yg dibawa ke label ketikan kunci\r\n 'id' => $data->id_pengguna_jasa,\r\n 'nama' => $data->nama_pengguna_jasa , //variabel yg dibawa ke id nama\r\n 'alamat' => $data->alamat, //variabel yang dibawa ke id alamat\r\n 'no_telp' => $data->no_telp, //variabel yang dibawa ke id no telp\r\n 'pengguna'=> $data->pengguna_jasa_id_tarif, //variabel yang dibawa ke id pengguna jasa\r\n );\r\n }\r\n }\r\n\r\n echo json_encode($pelanggan); //data array yang telah kota deklarasikan dibawa menggunakan json\r\n }", "public function admin_hrd_tambah_karyawan(){\n\t\t\t$nik = Input::get('nik');\n\t\t\t$id_status_karyawan = Input::get('id_status_karyawan');\n\t\t\t$nama = Input::get('nama');\n\t\t\t$alamat = Input::get('alamat');\n\t\t\t$tempat_lahir = Input::get('tempat_lahir'); \n\t\t\t$tanggal_lahir = Input::get('tanggal_lahir');\n\t\t\t$agama = Input::get('agama');\n\t\t\t$jenis_kelamin = Input::get('jenis_kelamin');\n\t\t\t$tanggal_mulai_kerja = Input::get('tanggal_mulai_kerja'); \n\t\t\t$id_golongan = Input::get('id_golongan');\n\t\t\t$id_jabatan = Input::get('id_jabatan');\n\t\t\t$id_jurusan = Input::get('id_jurusan');\n\t\t\t$no_telepon = Input::get('no_telepon');\n\t\t\t$email = Input::get('email');\n\t\t\t$pendidikan = Input::get('pendidikan');\n\t\t\t$status_nikah = Input::get('status_nikah');\n\t\t\t$foto = Input::get('foto');\n\t\t\t$status = Input::get('status');\n\t\t\treturn Karyawan::tambah_karyawan($nik, $id_status_karyawan, $nama, $alamat, $tempat_lahir, $tanggal_lahir, $agama, $jenis_kelamin, $tanggal_mulai_kerja, $id_golongan, $id_jabatan, $id_jurusan, $no_telepon, $email, $pendidikan, $status_nikah, $foto, $status); \n\t\t}", "public function data_bahan_kuliah()\n\t{\n\t\t$this->load->model(\"m_aka\");\n\t\t$data['data'] = $this->m_aka->data_bahan_kuliah(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'posting_pengumuman/data_bahan_kuliah';\n\t\t$this->load->view('content', $data);\n\t}", "public function detail_data_pejabat_berwenang($id_pejabat_berwenang)\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $detailhere = array('id_pejabat_berwenang' => $id_pejabat_berwenang);\n $data_detail['detail_pejabat'] = $this->m_admin->get_detail_pejabat($detailhere, 'pejabat_berwenang')->result();\n\n $data_detail['foto_ttd'] = $this->m_admin->get_foto_ttd_pejabat($id_pejabat_berwenang)->result();\n\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/detail_data_pejabat_berwenang', $data_detail);\n $this->load->view('footer');\n }", "function auto_menguji_ta(){\n\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\n\t\t\t\t$data = $this->get_current_ujian_ta(2); //mengambil data menguji tugas akhir pada semester ini (2)\n\n\t\t\t\tforeach ($data as $ta) {\n\t\t\t\t\t$cek_nilai_mhs = $this->get_status_ta($ta['NIM']);\n\t\t\t\t\tif($cek_nilai_mhs){\n\t\t\t\t\t\t$nim = $ta['NIM'];\n\t\t\t\t\t\t$judul_ta = $ta['JUDUL'];\n\t\t\t\t\t\t$kd_kur_mhs = $this->kurikulum_mahasiswa($nim);\n\t\t\t\t\t\t$temp = $this->get_data_mhs($nim);\n\t\t\t\t\t\t$jenjang = $temp[0]['NM_JENJANG'];\n\t\t\t\t\t\t$prodi = $temp[0]['NM_PRODI'];\n\t\t\t\t\t\t$prodi = str_replace(\"'\", \"\", $prodi);\n\t\t\t\t\t\t$prodi = strip_tags($prodi);\n\n\t\t\t\t\t\t$list_mk = $this->api->get_api_json(\n\t\t\t\t\t\t\tURL_API_SIA.'sia_kurikulum/data_search',\n\t\t\t\t\t\t\t'POST',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'api_kode'=>40000,\n\t\t\t\t\t\t\t\t'api_subkode' => 15,\n\t\t\t\t\t\t\t\t'api_search' => array($kd_kur_mhs)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tforeach ($list_mk as $mk) {\n\t\t\t\t\t\t\t$get_makul = strtoupper($mk['NM_MK']);\n\t\t\t\t\t\t\t$get_jenjang = strtoupper($mk['NM_PEND']);\n\t\t\t\t\t\t\tif($get_jenjang == \"S0\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"TUGAS AKHIR\" || $get_makul == \"SKRIPSI\" || $get_makul == \"TUGAS AKHIR/SKRIPSI\" || $get_makul == \"SKRIPSI/TUGAS AKHIR\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($get_jenjang == \"S1\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"TUGAS AKHIR\" || $get_makul == \"SKRIPSI\" || $get_makul == \"TUGAS AKHIR/SKRIPSI\" || $get_makul == \"SKRIPSI/TUGAS AKHIR\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($get_jenjang==\"S2\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"TESIS\" || $get_makul == \"TESIS/TUGAS AKHIR\" || $get_makul == \"TUGAS AKHIR/TESIS\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($get_jenjang==\"S3\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"DISERTASI\" || $get_makul == \"DISERTASI/TUGAS AKHIR\" || $get_makul == \"TUGAS AKHIR/DISERTASI\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\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\n\t\t\t\t\t\t//BUAT NARASI + INPUT DATA KE DB + ADA CEK DUPLUKASI DATA :\n\n\t\t\t\t\t\t$narasi = \"Menguji Tugas Akhir \".$jenjang.\", Program Studi \".$prodi.\", Judul \".$judul_ta.\", \".$jml_sks.\" SKS\";\n\t\t\t\t\t\t$narasi = str_replace(\"'\", \"\", $narasi);\n\t\t\t\t\t\t$narasi = strip_tags($narasi);\n\t\t\t\t\t\t//$narasi = str_replace(\",\", \"\", $narasi);\n\t\t\t\t\t\t//$sks_rule = round($this->aturan_beban_sks2(strtoupper($jenjang), $jml_sks, 1, 'TUGAS_AKHIR'),2);\n\t\t\t\t\t\t$jml_mhs = 1;\n\n\t\t\t\t\t\t//ATURAN SKS_RULE UNTUK MENGUJI TA\n\t\t\t\t\t\t$kd_kat = '74'; //4 untuk menguji (sebagai ketua dan anggota)\n\t\t\t\t\t\tif($jenjang == 'S0'){\n\t\t\t\t\t\t\t//sks_rule sementara untuk menguji TA S0 \n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 2);\n\t\t\t\t\t\t\t$kd_kat = '74';\n\t\t\t\t\t\t}elseif($jenjang == 'S1'){\n\t\t\t\t\t\t\t//sks_rule sementara untuk menguji TA S0 \n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 2);\n\t\t\t\t\t\t\t$kd_kat = '74';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($jenjang == 'S2'){\n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 3);\n\t\t\t\t\t\t\t$kd_kat = '74'; //74 untuk menguji sebagai anggota\n\t\t\t\t\t\t}elseif($jenjang == 'S3'){\n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 4);\n\t\t\t\t\t\t\t$kd_kat = '74'; //74 untuk menguji sebagai anggota\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\t\t\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\n\t\t\t\t\t\t// $kd_jbk = 'A';\n\t\t\t\t\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\t\t\t\t$jenis_kegiatan = $narasi;\n\t\t\t\t\t\t/*$jenis_kegiatan ='test';*/\n\t\t\t\t\t\t$bukti_penugasan = '-';\n\t\t\t\t\t\t// $sks_penugasan = $sks_rule;\n\t\t\t\t\t\t$masa_penugasan = '1 Semester';\n\t\t\t\t\t\t$bkt_dokumen = '-';\n\t\t\t\t\t\t$kd_jbk \t\t= 'A';\n\t\t\t\t\t\t$bkt_penugasan \t= '-';\n\t\t\t\t\t\t$bkt_dokumen \t= '-';\n\t\t\t\t\t\t$rekomendasi \t= 'LANJUTKAN';\n\t\t\t\t\t\t$capaian \t\t= 100;\n\t\t\t\t\t\t$jml_jam \t\t= 1;\n\t\t\t\t\t\t$outcome \t\t= '-';\n\t\t\t\t\t\t$file_penugasan = '-';\n\t\t\t\t\t\t$file_capaian \t= '-';\n\t\t\t\t\t\t// $sks_bkt = $sks_rule;\n\t\t\t\t\t\t$thn = $this->session->userdata('ta');\n\t\t\t\t\t\tif($smt == 2) $semester = 'GENAP'; else $semester = 'GANJIL';\n\n\n\n\t\t\t\t\t\t//cek kemana data akan pergi :)\n\t\t\t\t\t\t$kewajiban_serdos = $this->cek_kewajiban_serdos($kd_dosen);\n\n\t\t\t\t\t\t$status_pindah = $this->get_status_pindah($kd_kat);\n\n\t\t\t\t\t\t$jalur_data = 0;\n\t\t\t\t\t\tif($status_pindah == 0){\n\t\t\t\t\t\t\t$jalur_data = $this->cek_jalur_data_kat($kd_kat);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$sts_pakai = 1;\n\t\t\t\t\t\tif($status_pindah == 0){\n\t\t\t\t\t\t\tif($kewajiban_serdos == 0){\n\t\t\t\t\t\t\t\t$sts_pakai = 0;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tif($jalur_data != 0){\n\t\t\t\t\t\t\t\t\t$sts_pakai = 0;\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\n\n\t\t\t\t\t\t//cek apakah sudah ada data atau belum ?\n\t\t\t\t\t\t $cek_mhs_bimbingan = $this->cek_api_mhs_ujian($nim);\n\n\t\t\t\t\t\t //cek nilai mahasiswa ta sudah ada apa belum :\n\t\t\t\t\t\t //$cek_nilai_mhs = $this->get_status_ta($nim);\n\t\t\t\t\t\t $cek_mhs_ujian_ta = $this->cek_api_data_pendidikan($kd_dosen, $ta, $smt, $kd_kat, $nim);\n\t\t\t\t\t\t $cek_status_ketua_ta = $this->cek_api_data_pendidikan($kd_dosen, $ta, $smt, '73', $nim);\n\t\t\t\t\t\t \n\t\t\t\t\t\t//if(!$cek_mhs_bimbingan){\n\t\t\t\t\t\tif(!$cek_mhs_ujian_ta && !$cek_status_ketua_ta){\n\n\t\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia_ta_maps';\n\t\t\t\t\t\t\t$parameter = array('api_search'=>array($kd_jbk, $kd_dosen, $jenis_kegiatan, $bkt_penugasan, $sks_rule, $masa_penugasan, $bkt_dokumen, $sks_rule, $thn, $semester, $rekomendasi, $jml_jam, $capaian, $outcome, $file_penugasan, $file_capaian, $ta, $smt, $sts_pakai));\n\t\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\t\tif($simpan){\n\n\t\t\t\t\t\t\t\t$getid = $simpan;\n\t\t\t\t\t\t\t\t$nm_keg = $jenis_kegiatan;\n\n\t\t\t\t\t\t\t\t$status_pindah = $this->get_status_pindah($kd_kat);\n\n\t\t\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pendidikan_ta';\n\t\t\t\t\t\t\t\t$parameter\t= array('api_search' => array($getid, $kd_kat, $nm_keg, $jenjang, '-', '1', $jml_sks, '1', '1', 'A', '1', $prodi, $nim, $status_pindah));\n\t\t\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t\t\t\t//echo 'simpan ke data pendidikan sukses'; echo '<br>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t}", "function index_post() {\n $data = array(\n // 'id_waktu' => $this->post('id_waktu'),\n 'nama_waktu' => $this->post('nama_waktu'),\n 'mulai' => $this->post('mulai'),\n 'selesai' => $this->post('selesai'));\n $insert = $this->db->insert('waktu', $data);\n if ($insert) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "function simpan\n\t\t(\n\t\t\t$id_jabatan\n\t\t\t,$no_karyawan\n\t\t\t,$nik_karyawan\n\t\t\t,$nama_karyawan\n\t\t\t,$pnd\n\t\t\t,$tlp\n\t\t\t,$email\n\t\t\t,$avatar\n\t\t\t,$avatar_url\n\t\t\t,$alamat\n\t\t\t,$keterangan\n\t\t\t,$kode_kantor\n\t\t\t,$user_updt\n\t\t)\n\t\t{\n\t\t\t/*$data = array\n\t\t\t(\n\t\t\t 'id_jabatan' => $id_jabatan,\n\t\t\t 'no_karyawan' => $no_karyawan,\n\t\t\t 'nik_karyawan' => $nik_karyawan,\n\t\t\t 'nama_karyawan' => $nama_karyawan,\n\t\t\t 'pnd' => $pnd,\n\t\t\t 'tlp' => $tlp,\n\t\t\t 'email' => $email,\n\t\t\t 'avatar' => $avatar,\n\t\t\t 'avatar_url' => $avatar_url,\n\t\t\t 'alamat' => $alamat,\n\t\t\t 'ket_karyawan' => $keterangan,\n\t\t\t 'kode_kantor' => $kode_kantor,\n\t\t\t 'user_updt' => $user_updt\n\t\t\t);\n\n\t\t\t$this->db->insert('tb_karyawan', $data); */\n\t\t\t\n\t\t\t$query = \"\n\t\t\t\t\t INSERT INTO tb_karyawan\n\t\t\t\t\t (\n\t\t\t\t\t\t id_karyawan\n\t\t\t\t\t\t ,id_jabatan\n\t\t\t\t\t\t ,no_karyawan\n\t\t\t\t\t\t ,nik_karyawan\n\t\t\t\t\t\t ,nama_karyawan\n\t\t\t\t\t\t ,pnd\n\t\t\t\t\t\t ,tlp\n\t\t\t\t\t\t ,email\n\t\t\t\t\t\t ,alamat\n\t\t\t\t\t\t ,ket_karyawan\n\t\t\t\t\t\t ,tgl_ins\n\t\t\t\t\t\t ,kode_kantor\n\t\t\t\t\t\t ,user_updt\n\t\t\t\t\t )\n\t\t\t\t\t Values\n\t\t\t\t\t (\n\t\t\t\t\t\t (\n\t\t\t\t\t\t\tSELECT CONCAT('KRYWN',FRMTGL,ORD) AS id_karyawan\n\t\t\t\t\t\t\t From\n\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t SELECT CONCAT(Y,M) AS FRMTGL\n\t\t\t\t\t\t\t\t ,CASE\n\t\t\t\t\t\t\t\t\t WHEN (ORD >= 10 AND ORD < 99) THEN CONCAT('000',CAST(ORD AS CHAR))\n\t\t\t\t\t\t\t\t\t WHEN (ORD >= 100 AND ORD < 999) THEN CONCAT('00',CAST(ORD AS CHAR))\n\t\t\t\t\t\t\t\t\t WHEN (ORD >= 1000 AND ORD < 9999) THEN CONCAT('0',CAST(ORD AS CHAR))\n\t\t\t\t\t\t\t\t\t WHEN ORD >= 10000 THEN CAST(ORD AS CHAR)\n\t\t\t\t\t\t\t\t\t ELSE CONCAT('0000',CAST(ORD AS CHAR))\n\t\t\t\t\t\t\t\t\t END As ORD\n\t\t\t\t\t\t\t\t From\n\t\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t\t SELECT\n\t\t\t\t\t\t\t\t\t CAST(LEFT(NOW(),4) AS CHAR) AS Y,\n\t\t\t\t\t\t\t\t\t CAST(MID(NOW(),6,2) AS CHAR) AS M,\n\t\t\t\t\t\t\t\t\t MID(NOW(),9,2) AS D,\n\t\t\t\t\t\t\t\t\t COALESCE(MAX(CAST(RIGHT(id_karyawan,5) AS UNSIGNED)) + 1,1) AS ORD\n\t\t\t\t\t\t\t\t\t From tb_karyawan\n\t\t\t\t\t\t\t\t\t WHERE DATE_FORMAT(tgl_ins,'%m-%Y') = DATE_FORMAT(NOW(),'%m-%Y')\n\t\t\t\t\t\t\t\t\t AND kode_kantor = '\".$kode_kantor.\"'\n\t\t\t\t\t\t\t\t ) AS A\n\t\t\t\t\t\t\t ) AS AA\n\t\t\t\t\t\t )\n\t\t\t\t\t\t ,'\".$id_jabatan.\"'\n\t\t\t\t\t\t ,'\".$no_karyawan.\"'\n\t\t\t\t\t\t ,'\".$nik_karyawan.\"'\n\t\t\t\t\t\t ,'\".$nama_karyawan.\"'\n\t\t\t\t\t\t ,'\".$pnd.\"'\n\t\t\t\t\t\t ,'\".$tlp.\"'\n\t\t\t\t\t\t ,'\".$email.\"'\n\t\t\t\t\t\t ,'\".$alamat.\"'\n\t\t\t\t\t\t ,'\".$keterangan.\"'\n\t\t\t\t\t\t ,NOW()\n\t\t\t\t\t\t ,'\".$kode_kantor.\"'\n\t\t\t\t\t\t ,'\".$user_updt.\"'\n\t\t\t\t\t )\n\n\t\t\t\t\t\";\n\t\t\t\t$this->db->query($query);\n\t\t}", "function spefisik($dataid_kematian)\n\t{\n\n\t\t# codenya sql sepert select*from penduduk where nik = $datanik dimna $datanik adalah yg sudah dipilih. jadi cuma 1 row.\n\t\t$query = $this->db->query(\"SELECT*FROM `kematian` left join penduduk on kematian.nik = penduduk.nik where id_kematian = '$dataid_kematian' \");\n\n\t\t// itu adalah perintah sql join 2 table, yaitupenduduk dan kematian, karena data yanglenkap ada ditable pendudukjadiharus dijoin, \n\t\treturn $query->row();\n\t\t\n\t}", "function pindahmeja($noord,$namamejaawal,$namamejaakhir,$userid){\n\t\t$this->db->trans_begin();\n\n\t\t$this->db->where('nama',$namamejaawal);\n\t\t$this->db->update('meja',array('tk' => '0'));\n\n\t\tif($this->db->affected_rows() > 0){\n\n\t\t\t$this->db->where('nama',$namamejaakhir);\n\t\t\t$this->db->update('meja',array('tk' => '1'));\n\n\t\t\tif($this->db->affected_rows() > 0){\n\t\t\t\t$this->db->where('meja',$namamejaawal);\n\t\t\t\t$this->db->where('idord',$noord);\n\t\t\t\t$this->db->update('ord_h',array('meja' => $namamejaakhir));\n\n\t\t\t\tif($this->db->affected_rows() > 0){\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'darimeja' =>$namamejaawal,\n\t\t\t\t\t\t'kemeja' => $namamejaakhir,\n\t\t\t\t\t\t'user' => $userid\n\t\t\t\t\t\t);\n\n\t\t\t\t\t$data=$this->db->insert('pindah',$data);\n\t\t\t\t\tif($this->db->affected_rows() > 0){\n\n\t\t\t\t\t\t $this->db->trans_complete();\n\t\t\t\t\t\t if ($this->db->trans_status() === FALSE) {\n\t\t\t\t //if something went wrong, rollback everything\n\t\t\t\t $this->db->trans_rollback();\n\t\t\t\t \treturn FALSE;\n\t\t\t\t } else {\n\t\t\t\t //if everything went right, commit the data to the database\n\t\t\t\t $this->db->trans_commit();\n\t\t\t\t return TRUE;\n\t\t\t\t }\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->db->trans_rollback();\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->db->trans_rollback();\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->db->trans_rollback();\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}else{\n\t\t\t$this->db->trans_rollback();\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t//check if transaction status TRUE or FALSE\n \n\n\t}", "function tampilkan(){\r\n\t\t\t$query \t= \"SELECT * FROM data\";\r\n\t\t\treturn result($query);\r\n\t\t}", "public function jadikanKetua()\n {\n // Menghapus hak akses sebagai anggota dari pengirim undangan\n $this->hakAksesPengguna()->detach(\n HakAkses::where('nama', HakAkses::ANGGOTA)->first()\n );\n\n // menjadikan pengirim undangan sebagai ketua\n $this->hakAksesPengguna()->attach(\n HakAkses::where('nama', HakAkses::KETUA_TIM)->first(), [\n 'status_request' => 'Approved'\n ]\n );\n }", "public function perpanjang(){\n\t\t$data = array(\n\t\t\t'due_date' => $this->input->post('due_date'),\n\t\t\t'keterangan' => $this->input->post('keterangan'),\n\t\t\t'status' => 4,\n\t\t\t//mungkin tambah alert\n\t\t\t'created_by' => $this->session->userdata('id')\n\t\t);\n\n\t\t//Get the startup's data by id\n\t\t$this->db->where('id', $this->input->post('id_detail'));\n\t\t//Change the data\n\t\treturn $this->db->update('pl_detail', $data);\n\t}", "function tampil_data()\n\t{\n\t\t# perintah join digunakan untuk menggabungkan 2 table, yaitu penduduk dan kematian, agar data yang tampil lebih detail, karena pada tabel kematian hanya terdapat sedikit kolom, sehingga dengan menambah kolom nik, maka data yang ada di tabel penduduk juga otomatis terdeteksi karena perintah join, dengan aturan, nik harus sama antara tabel kematian dan nik yang ada di penduduk.\n\t\treturn $this->db->query(\"SELECT*FROM `kematian` left join penduduk on kematian.nik = penduduk.nik\")->result();\n\t}", "function TampilkanHeaderNilai($mnux='') {\r\n $prodiku = $_SESSION['_ProdiID'];\r\n $arrprodi = explode(',', $prodiku);\r\n $whr = array();\r\n foreach ($arrprodi as $val) {\r\n $whr[] = \"INSTR(j.ProdiID, '.$val.')>0\";\r\n }\r\n $_whr = \" (\". implode(' or ', $whr) . \") \";\r\n // query\r\n $s = \"select j.JadwalID, j.MKKode, j.Nama, j.JenisJadwalID, j.NamaKelas, j.DosenID,\r\n concat(d.Nama, ', ', d.Gelar) as DSN\r\n from jadwal j\r\n left outer join dosen d on j.DosenID=d.Login\r\n where TahunID='$_SESSION[tahun]' \r\n and $_whr \r\n and j.JadwalSer = 0\r\n group by j.JadwalID, j.MKKode, j.JenisJadwalID, j.NamaKelas\r\n order by j.MKKode, j.NamaKelas, j.JenisJadwalID\";\r\n $r = _query($s);\r\n // buat option\r\n $opt = \"<option>--</option>\";\r\n while ($w = _fetch_array($r)) {\r\n $sel = ($w['JadwalID'] == $_SESSION['JadwalID']) ? \"selected\" : \"\";\r\n $opt .= \"<option value='$w[JadwalID]' $sel>$w[MKKode] $w[Nama] - $w[NamaKelas] ($w[JenisJadwalID]) - $w[DSN]</option>\\r\";\r\n }\r\n // Tampilkan opsi\r\n echo \"<p><table class=box cellspacing=1 cellpadding=4>\r\n <form action='?' methos=POST>\r\n <input type=hidden name='mnux' value='$mnux'>\r\n <tr><td class=inp>Tahun :</td><td class=ul><input type=text name='tahun' value='$_SESSION[tahun]' size=10 maxlength=10> <input type=submit name='Tampilkan' value='Tampilkan'></td></tr>\r\n <tr><td class=inp>Jadwal :</td><td class=ul><select name='JadwalID' onChange='this.form.submit()'>$opt</select></td></tr>\r\n </form></table></p>\";\r\n}", "public function aksi_cari_nik_ubah_kata_sandi_warga()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $nik_warga = $this->input->post('nik');\n $detailhere = array('nik' => $nik_warga);\n $data_detail['detail_warga'] = $this->m_admin->cari_nik_warga($detailhere, 'warga')->result();\n\n $warga = $this->m_admin->cek_nik_warga($nik_warga);\n\n if ($nik_warga === $warga['nik']) {\n $this->m_admin->cari_nik_warga($detailhere, 'warga');\n\n $this->session->set_flashdata('success', 'Data Berhasil Ditemukan');\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/form_ubah_kata_sandi_warga', $data_detail);\n $this->load->view('footer');\n } else {\n $this->session->set_flashdata('error', '<b>NIK</b> Tidak Ditemukan');\n redirect('admin/form_cari_nik_ubah_kata_sandi_warga');\n }\n }", "public function simpanDataFinstansi($post){\n\t\t$connection \t= $this->db;\n\t\t$kd_jns\t\t\t= htmlspecialchars($post['m1_jenis'], ENT_QUOTES);\n\t\t$kode_instansi\t= htmlspecialchars($post['m1_instansi'], ENT_QUOTES);\n\t\t$desc_instansi\t= htmlspecialchars($post['m1_deskripsi'], ENT_QUOTES);\n\t\t$isNewRecord\t= htmlspecialchars($post['isNewRecord'], ENT_QUOTES);\n\t\tif($kode_instansi == \"\" || $desc_instansi == \"\"){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Kode dan deskripsi instansi harus diisi\");\n\t\t} else{\n\t\t\tif($isNewRecord){\n\t\t\t\t$sqlCek\t= \"select count(*) as jumlah from datun.instansi where kode_jenis_instansi = '\".$kd_jns.\"' and kode_instansi = '\".$kode_instansi.\"' \n\t\t\t\t\t\t\tand kode_tk = '\".$_SESSION[\"kode_tk\"].\"'\";\n\t\t\t\t$jumlah = $connection->createCommand($sqlCek)->queryScalar();\n\t\t\t\tif($jumlah > 0){\n\t\t\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Maaf, kode instansi sudah ada\");\n\t\t\t\t} else{\n\t\t\t\t\t$sql \t= \"insert into datun.instansi values('\".$kd_jns.\"', '\".$kode_instansi.\"', '\".$desc_instansi.\"', '\".$_SESSION['kode_tk'].\"')\";\n\t\t\t\t\t$hasil \t= $connection->createCommand($sql)->execute();\n\t\t\t\t\treturn array(\"hasil\"=>$hasil, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$sql \t= \"update datun.instansi set deskripsi_instansi = '\".$desc_instansi.\"' where kode_jenis_instansi = '\".$kd_jns.\"' and kode_instansi = '\".$kode_instansi.\"' \n\t\t\t\t\t\t\tand kode_tk = '\".$_SESSION['kode_tk'].\"'\";\n\t\t\t\t$hasil \t= $connection->createCommand($sql)->execute();\n\t\t\t\treturn array(\"hasil\"=>$hasil, \"error\"=>\"* Maaf, data gagal disimpan\");\n\t\t\t}\n\t\t}\n\t}", "function hitung()\n\t{\n\t\t$this->model->hitungMhs();\n\t\t//$this->dashboardukmapendaftar(); //controller dikembalikan ke method index setelah selesai mengakses method ini.\n\t}", "public function absen(){\n\t\t\t$id_kelas = $this->input->post('id_kelas');\n\t\t\t$keterangan = $this->input->post('keterangan');\n\t\t\t$tanggal = $this->input->post('tanggal');\n\t\t\t$sesi = $this->input->post('sesi');\n\n\t\t\t$presensiInfo = array(\n\t\t\t\t'id_kelas'=>$id_kelas,\n\t\t\t\t'tgl_pertemuan'=>$tanggal,\n\t\t\t\t'keterangan'=>$keterangan,\n\t\t\t\t'sesi'=>$sesi,\n\t\t\t\t'status_pertemuan'=>'Tidak Hadir',\n\t\t\t\t\"createDtm\"=>date('Y-m-d H:s:i')\n\t\t\t);\n\n\t\t\t//get id_pertemuan yang barusaja dibuat\n\t\t\t$result = $this->JadwalAkademikM->presensi($presensiInfo);\n\n\t\t\tif($result > 0){\n\t\t\t\t$this->session->set_flashdata('success','Presensi berhasil dibuat');\n\t\t\t}else{\n\t\t\t\t$this->session->set_flashdata('error','Presensi gagal dibuat');\n\t\t\t}\n\n\t\t\tredirect('jadwalAkademikR');\n\t\t}", "public function index_put() {\n $id = $this->put('id');\n $data = array (\n 'id_pembeli' => $this->put('id_pembeli'),\n 'nama_pembeli' => $this->put('nama_pembeli'),\n 'jk' => $this->put('jk'),\n 'no_telp' => $this->put('no_telp'),\n 'alamat' => $this->put('alamat'));\n $this->db->where('id_pembeli', $id);\n $update = $this->db->update('pembeli', $data);\n if ($update) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function aksi_ubah_kata_sandi_warga()\n {\n $kata_sandi = $this->input->post('kata_sandi');\n $kata_sandi_hash = sha1($kata_sandi);\n $data = array(\n 'kata_sandi' => $kata_sandi_hash,\n );\n\n $detailhere = $this->input->post('id_warga');\n\n if ($this->m_admin->aksi_ubah_kata_sandi_warga($detailhere, $data, 'warga')); {\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/list_data_warga');\n }\n }", "function konfirmasiTerima()\n {\n $data_pengajuan = array(\n 'status_pengajuan' => 'VERIFIKASI'\n );\n $this->db->where('id_pengajuan', $this->input->post('id_pengajuan'));\n $this->db->update('tbl_pengajuan', $data_pengajuan);\n }", "public function data_kalender_akademik()\n\t{\n\t\t$data['content'] = 'jadwal/data_kalender_akademik';\n\t\t$data['data'] = $this->m_aka->data_kalender_akademik();\n\t\t$data['pagination'] = $this->pagination->create_links();\t\t\n\t\t$this->load->view('content', $data);\n\t}", "function tambahPeminjaman($nama,$NIM,$Tgl_Peminjaman,$Tgl_Kembali,$Nama_Lab,$Nama_Barang,$Keterangan) {\n\t\n $query = \"INSERT INTO Peminjaman(nama,NIM,Tgl_Peminjaman,Tgl_Kembali,Nama_Lab,Nama_Barang,Keterangan) VALUES ('$nama','$NIM','$Tgl_Peminjaman','$Tgl_Kembali','$Nama_Lab', '$Nama_Barang', '$Keterangan')\";\n $hasil = mysql_query($query);\n\n if ($hasil)\n\t\t echo \"<div class='alert alert-block alert-success'><strong><i></i> DATA BERHASIL DI SIMPAN</strong></div>\";\n\n else\n echo \"<div class='alert alert-block alert-danger'><strong><i></i> DATA GAGAL DI UPDATE</strong></div>\";\n\t\t}", "function kas_create($kas_tanggal, $kas_jumlah , $kas_keterangan ,$kas_tipe ,$kas_date_create ,$kas_date_update ){\r\n\t\t\tif ($kas_tipe==\"Kas Keluar\")\r\n\t\t\t\t$kas_jumlah = $kas_jumlah * -1;\r\n\r\n\t\t\t// AUTO KOD BS\r\n\t\t\t$bs_tanggal_pattern=strtotime($kas_tanggal);\r\n\t\t\t$pattern=\"BS/\".date(\"ym\",$bs_tanggal_pattern).\"-\";\r\n\t\t\t$bs_kode=$this->m_public_function->get_kode_1('bs','bs_kode',$pattern,12);\r\n\t\t\t// END AUTO\r\n\r\n\r\n\t\t\t$data = array(\r\n\t\t\t\t\"bs_tanggal\"=>$kas_tanggal,\t\r\n\t\t\t\t\"bs_kode\"=>$bs_kode,\t\r\n\t\t\t\t\"bs_jumlah\"=>$kas_jumlah,\t\r\n\t\t\t\t\"bs_keterangan\"=>$kas_keterangan,\t\r\n\t\t\t\t\"bs_tipe\"=>$kas_tipe,\t\r\n\t\t\t\t\"bs_date_create\"=>date('Y-m-d H:i:s')\r\n\t\t\t);\r\n\t\t\t$this->db->insert('bs', $data); \r\n\t\t\tif($this->db->affected_rows())\r\n\t\t\t\treturn '1';\r\n\t\t\telse\r\n\t\t\t\treturn '0';\r\n\t\t}", "function get_all_m_jadwal_praktek_antrian($jadwal_praktek_fk)\n {\n $where ='';\n if ($jadwal_praktek_fk!=0) {\n $where = \"AND a.jadwal_praktek_fk='$jadwal_praktek_fk'\";\n }\n $this->db->query(\" SELECT *,a.pk as id,b.nama as pasien,c.id_session_jadwal, d.metode_bayar\n FROM m_jadwal_praktek_antrian a\n LEFT JOIN m_kontak b on a.pasien_fk = b.pk\n LEFT JOIN m_jadwal_praktek c on a.jadwal_praktek_fk = c.pk \n\t\t\t\t\t\t\t\t LEFT JOIN m_metode_pembayaran d on a.metode_pembayaran_fk = d.pk\n WHERE 1=1 $where ORDER BY jadwal_praktek_fk,nomor_urut asc\")->result_array();\n\n\n /*$this->db->get('m_jadwal_praktek_antrian')->result_array();*/\n }", "public function index() \n {\n\t\t$this->papar->senaraiPegawai['biodata'] = $this->tanya->cariMedan('nama_pegawai', \n\t\t\t'namaPegawai,Nama_Penuh,email,nohp,unit', \n\t\t\tarray('medan'=>'unit', 'id'=>'ekonomi'));\n\t\n\t\t//\n\t\t$this->papar->ralat = null;\n\t\t\n\t\t$this->papar->pegawai = senarai_kakitangan();\n $this->papar->baca($this->_folder . '/index', 0);\n }", "public function kumpul(){\r\n\t\t$no_tim=$this->session->userdata('no_tim');\r\n\t\t$soal = $this->input->post('soal');\r\n\t\tforeach ($soal as $key => $value) {\r\n\t\t\t$query = $this->Mysql->read('soal', array('no_soal'=>$value), 'no_soal', 'ASC', null, null)->row_array();\r\n\t\t\tif ($query['jawaban_benar']==$this->input->post('jawaban_'.$value)) {\r\n\t\t\t\t$isBenar = 1;\r\n\t\t\t}else{\r\n\t\t\t\t$isBenar = 0;\r\n\t\t\t}\r\n\t\t\t$data = array(\r\n\t\t\t\t\t'no_tim'=>$this->session->userdata('no_tim'),\r\n\t\t\t\t\t'no_soal'=>$value,\r\n\t\t\t\t\t'jawab'=>$this->input->post('jawaban_'.$value),\r\n\t\t\t\t\t'is_benar'=>$isBenar\r\n\t\t\t\t);\r\n\t\t\t$update = $this->Mysql->create('ljk',$data);\r\n\t\t}\r\n\t\tredirect(site_url('tim'), 'refresh');\r\n\t}", "function tampil_jadwal(){\n\t\t\tglobal $con;\n\n\t\t\t$query=mysqli_query($con, \"select * from tb_jadwal\");\n\t\t\twhile($row=mysqli_fetch_array($query))\n\t\t\t\t$data[] = $row;\n\n\t\t\t\treturn $data;\n\t\t}", "function salah()\n\t{\n\t\t# debug\n\t\t$this->tanya->dapatid($_POST['password']);\n\t\t$this->papar->mesej = 'Ada masalah pada user dan password';\n\n\t\t# Set pemboleubah utama\n\t\t$this->papar->sesat = 'Enjin Carian - Sesat';\n\t\t$this->papar->isi = '';\n\n\t\t# Pergi papar kandungan\n\t\t//$this->semakPembolehubah($this->papar->mesej); # Semak data dulu\n\t\t$this->paparKandungan('index', 'salah');\n\t}", "public function odjava()\n {\n\n if (isset($_POST[\"komentar\"])){\n $komentar = $_POST[\"komentar\"];\n $kModel= new KomentarModel();\n $kModel->insert([\n 'idKomentara' => ($kModel->nadji_poslednjiId() + 1),\n 'idKKom' => $this->session->get('igrac')['idKI'],\n 'tekstKomentara' => $komentar\n ]);\n }\n $db= \\Config\\Database::connect();\n $builder=$db->table(\"korisnik\");\n //$builder->set('aktivan', '0', FALSE);\n $builder->where('username', $_SESSION['ulogovaniKorisnik']);\n $builder->update();\n $_SESSION['ulogovaniKorisnik']=\"\";\n $_SESSION['isLoggedIn']=\"0\";\n $_SESSION['tip_ulogovan']=\"\";\n $_SESSION['admin']=\"\";\n $_SESSION['moderator']=\"\";\n $_SESSION['tip_ulogovan']=\"\";\n\n return redirect()->to(\"index\");\n }", "public function ubah_data()\n {\n $id = $this->request->getVar('id');\n $jumlahAktif = 0;\n $jumlahTidakAktif = 0;\n if ($id) {\n $jumlahData = count($id);\n for ($i = 0; $i < $jumlahData; $i++) {\n $currentData = $this->BansosModel->where('id', $id[$i])->first();\n if ($currentData['statusAnggota'] == 'Aktif') {\n $db = \\Config\\Database::connect();\n $builder = $db->table('bansos');\n $builder->set('statusAnggota', 'Tidak Aktif');\n $builder->where('id', $id[$i]);\n $builder->update();\n $jumlahTidakAktif++;\n } else {\n $db = \\Config\\Database::connect();\n $builder = $db->table('bansos');\n $builder->set('statusAnggota', 'Aktif');\n $builder->where('id', $id[$i]);\n $builder->update();\n $jumlahAktif++;\n }\n }\n } else {\n session()->setFlashdata('gagal', 'Tidak Ada Data Yang Dipilih');\n return redirect()->to('/Admin/penerima_bansos');\n }\n session()->setFlashdata('pesan', '' . $jumlahAktif . ' Data Statusnya Dibuah Menjadi Aktif dan ' . $jumlahTidakAktif . ' Data Statusnya Diubah Menjadi Tidak Aktif');\n return redirect()->to('/Admin/penerima_bansos');\n }", "function cek_dpl(){\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t$ta = $this->session->userdata('ta');\n\t\t$smt = $this->session->userdata('smt');\n\t\t# cek data beban kerja\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/cek_data_bkd';\n\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $ta, $smt));\n\t\t$data['jml'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t#echo $data['jml']; print_r($parameter); die();\n\t\tif ($data['jml'] == 0){\n\t\t\t$url\t\t= 'http://service.uin-suka.ac.id/servsiasuper/index.php/';\n\t\t\t$parameter\t= array('api_kode' => 1000, 'api_subkode' => 1, 'api_search' => array($kd_dosen));\n\t\t\t$data\t\t= $this->mdl_bkd->get_api_kkn('kkn_admin/data_dpl_kkn', 'json', 'POST', $parameter);\n\t\t\tif(count($data) > 0){\n\t\t\t\t$tema = $data[0]['TEMA_KKN'];\n\t\t\t\t$angkatan = $data[0]['ANGKATAN'];\n\t\t\t\t$periode = $data[0]['PERIODE'];\n\t\t\t\t$ta = $data[0]['TA'];\n\t\t\t\t$tgl_mulai = $data[0]['TANGGAL_MULAI'];\n\t\t\t\t$tgl_selesai = $data[0]['TANGGAL_SELESAI'];\n\t\t\t\t$kelompok = $data[0]['JUM_KELOMPOK'];\n\t\t\t\t# BEBAN KERJA\n\t\t\t\t$jenis_kegiatan = \"Menjadi Dosen Pembimbing Lapangan (DPL) KKN, Angkatan \".$angkatan.\", Periode \".$periode.\", dengan Tema \\\"\".$tema.\"\\\", Kelompok \".$kelompok;\n\t\t\t\t$masa_penugasan = \"1 Semester\";\n\t\t\t\t$bukti_penugasan = '-'; $bkt_dokumen = '-';\n\t\t\t\t$sks_rule = 1;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia';\n\t\t\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $jenis_kegiatan, $bukti_penugasan, $sks_rule, $masa_penugasan, $sks_rule, $bkt_dokumen, $ta, $smt, 'LANJUTKAN','100'));\n\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif($simpan){\n\t\t\t\t\t# get last id beban kerja \n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_current_data_tersimpan';\n\t\t\t\t\t$parameter\t= array('api_search' => array('BKD.BKD_BEBAN_KERJA','KD_BK'));\n\t\t\t\t\t$getid = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter); \n\t\t\t\t\t#simpan data pengabdian\n\t\t\t\t\t$sumber_dana = '-'; $jumlah_dana = 0;\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pengabdian';\n\t\t\t\t\t$parameter\t= array('api_search' => array($getid, $tgl_mulai, $tgl_selesai, $tema, $sumber_dana, $jumlah_dana, '50'));\n\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t}\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}else{\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}\n\t\t}else{\n\t\t\tredirect('bkd/dosen/bebankerja/data/C');\t\t\n\t\t}\n\t}", "function get_mhs_ujian_ta($periode = '2'){\n\t\t\t//DETAIL PERIODE :\n\t\t\t\t// 0 = Untuk ujian komprehensif\n\t\t\t\t// 1 = untuk ujian seminar proposal\n\t\t\t\t// 2 = untuk ujian tugas akhir\n\t\t\t\t// 3 = untuk ujian tertutup\n\t\t\t\t// 4 = untuk ujian terbuka\n\n\t\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\t$data = $this->s00_lib_api->get_api_json(\n\t\t\t\t\t\t'http://service.uin-suka.ac.id/servtugasakhir/sia_skripsi_public/sia_skripsi_bimbingan/jadwalTA',\n\t\t\t\t\t\t'POST',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'api_kode'\t\t=> 1000,\n\t\t\t\t\t\t\t'api_subkode'\t=> 2,\n\t\t\t\t\t\t\t'api_search'\t=> array($kd_dosen, $periode)\n\t\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\treturn $data;\n\t\t}", "public function add_data_mahasiswa()\n\t{\n\t\t$save = $this->input->post('add_mahasiswa');\n\t\t$kelas = 't_kelas';\n\t\t$tahun = 't_tahun_akademik';\n\t\t$prodi = \"t_prodi\";\n\t\t$data['kelas'] = $this->m_aka->get_all($kelas);\n\t\t$data['tahun_aka'] = $this->m_aka->get_all($tahun);\n\t\t$data['prodi'] = $this->m_aka->get_all($prodi);\n\t\t$data['content'] = 'mahasiswa/tambah_mahasiswa';\n\t\t$this->load->view('content', $data);\n\t}", "public function run()\n {\n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TIN8044',\n 'kd_dosen_pengajar' => 'KO003N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TIN8053',\n 'kd_dosen_pengajar' => 'KO076N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '5',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TIN8053',\n 'kd_dosen_pengajar' => 'KO076N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '6',\n 'kd_sesi_berakhir' => '7',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TIN8032',\n 'kd_dosen_pengajar' => 'KO045N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16KI38022',\n 'kd_dosen_pengajar' => 'KO057N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16TIN8012',\n 'kd_dosen_pengajar' => 'KO005N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '9',\n 'kd_sesi_berakhir' => '11',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TIN8044',\n 'kd_dosen_pengajar' => 'KO003N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TIN6043',\n 'kd_dosen_pengajar' => 'KO002N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16TIN6023',\n 'kd_dosen_pengajar' => 'KO012N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '7',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN6023',\n 'kd_dosen_pengajar' => 'KO021N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TIN6013',\n 'kd_dosen_pengajar' => 'KO003N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '5',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TIN6013',\n 'kd_dosen_pengajar' => 'KO003N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TIN6073',\n 'kd_dosen_pengajar' => 'KO019N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '5',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16JTK6032',\n 'kd_dosen_pengajar' => 'KO075N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TIN6043',\n 'kd_dosen_pengajar' => 'KO045N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN6063',\n 'kd_dosen_pengajar' => 'KO007N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN6063',\n 'kd_dosen_pengajar' => 'KO007N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '1',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TIN6053',\n 'kd_dosen_pengajar' => 'KO007N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '2',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TIN6053',\n 'kd_dosen_pengajar' => 'KO007N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TIN6053',\n 'kd_dosen_pengajar' => 'KO007N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN4024',\n 'kd_dosen_pengajar' => 'KO012N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN4033',\n 'kd_dosen_pengajar' => 'KO021N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN4063',\n 'kd_dosen_pengajar' => 'KO013N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16TIN4043',\n 'kd_dosen_pengajar' => 'KO019N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN4053',\n 'kd_dosen_pengajar' => 'KO012N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN4053',\n 'kd_dosen_pengajar' => 'KO012N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN4033',\n 'kd_dosen_pengajar' => 'KO021N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '5',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16KU34052',\n 'kd_dosen_pengajar' => 'KO070N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN4014',\n 'kd_dosen_pengajar' => 'KO007N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '2',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN4014',\n 'kd_dosen_pengajar' => 'KO009N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN4024',\n 'kd_dosen_pengajar' => 'KO012N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN4043',\n 'kd_dosen_pengajar' => 'KO017N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN4063',\n 'kd_dosen_pengajar' => 'KO013N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D115',\n 'kd_matakuliah' => '16TIN2043',\n 'kd_dosen_pengajar' => 'KO060N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D111',\n 'kd_matakuliah' => '16TIN2054',\n 'kd_dosen_pengajar' => 'KO059N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TIN2054',\n 'kd_dosen_pengajar' => 'KO061N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D111',\n 'kd_matakuliah' => '16TIN2074',\n 'kd_dosen_pengajar' => 'KO001N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D111',\n 'kd_matakuliah' => '16KI22022',\n 'kd_dosen_pengajar' => 'KO075N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D111',\n 'kd_matakuliah' => '16KU12062',\n 'kd_dosen_pengajar' => 'KO069N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D111',\n 'kd_matakuliah' => '16TIN2032',\n 'kd_dosen_pengajar' => 'KO056N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D107',\n 'kd_matakuliah' => '16TIN2074',\n 'kd_dosen_pengajar' => 'KO002N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D111',\n 'kd_matakuliah' => '16TIN2013',\n 'kd_dosen_pengajar' => 'KO016N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D116',\n 'kd_matakuliah' => '16TIN2043',\n 'kd_dosen_pengajar' => 'KO023N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN2013',\n 'kd_dosen_pengajar' => 'KO016N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN2054',\n 'kd_dosen_pengajar' => 'KO059N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16KU12062',\n 'kd_dosen_pengajar' => 'KO072N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN2074',\n 'kd_dosen_pengajar' => 'KO001N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16KI22022',\n 'kd_dosen_pengajar' => 'KO075N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN2032',\n 'kd_dosen_pengajar' => 'KO057N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D107',\n 'kd_matakuliah' => '16TIN2074',\n 'kd_dosen_pengajar' => 'KO002N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16TKO2032',\n 'kd_dosen_pengajar' => 'KO016N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16TKO2044',\n 'kd_dosen_pengajar' => 'KO001N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D107',\n 'kd_matakuliah' => '16TKO2044',\n 'kd_dosen_pengajar' => 'KO009N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16TKO2053',\n 'kd_dosen_pengajar' => 'KO022N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16KU12022',\n 'kd_dosen_pengajar' => 'KO077N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16KI22012',\n 'kd_dosen_pengajar' => 'KO071N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16TKO2062',\n 'kd_dosen_pengajar' => 'KO018N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '12',\n 'kd_ruang' => 'D115',\n 'kd_matakuliah' => '16TKO2073',\n 'kd_dosen_pengajar' => 'KO023N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16TKO2053',\n 'kd_dosen_pengajar' => 'KO065N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16TKO2044',\n 'kd_dosen_pengajar' => 'KO001N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16TKO2032',\n 'kd_dosen_pengajar' => 'KO016N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16TKO2053',\n 'kd_dosen_pengajar' => 'KO022N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D107',\n 'kd_matakuliah' => '16TKO2044',\n 'kd_dosen_pengajar' => 'KO009N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16TKO2062',\n 'kd_dosen_pengajar' => 'KO018N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '2',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16KI22012',\n 'kd_dosen_pengajar' => 'KO071N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16KU12022',\n 'kd_dosen_pengajar' => 'KO077N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '12',\n 'kd_ruang' => 'D116',\n 'kd_matakuliah' => '16TKO2073',\n 'kd_dosen_pengajar' => 'KO013N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16TKO2053',\n 'kd_dosen_pengajar' => 'KO065N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO4024',\n 'kd_dosen_pengajar' => 'KO006N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO4024',\n 'kd_dosen_pengajar' => 'KO006N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D115',\n 'kd_matakuliah' => '16TKO4063',\n 'kd_dosen_pengajar' => 'KO067N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D115',\n 'kd_matakuliah' => '16TKO4063',\n 'kd_dosen_pengajar' => 'KO067N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16KU34052',\n 'kd_dosen_pengajar' => 'KO016N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16TKO4014',\n 'kd_dosen_pengajar' => 'KO045N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO4033',\n 'kd_dosen_pengajar' => 'KO008N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '1',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TKO4043',\n 'kd_dosen_pengajar' => 'KO062N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '2',\n 'kd_sesi_berakhir' => '7',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TKO4043',\n 'kd_dosen_pengajar' => 'KO061N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D116',\n 'kd_matakuliah' => '16TKO4014',\n 'kd_dosen_pengajar' => 'KO070N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D116',\n 'kd_matakuliah' => '16TKO4014',\n 'kd_dosen_pengajar' => 'KO070N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TKO4043',\n 'kd_dosen_pengajar' => 'KO072N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TKO4043',\n 'kd_dosen_pengajar' => 'KO061N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D116',\n 'kd_matakuliah' => '16TKO4063',\n 'kd_dosen_pengajar' => 'KO002N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D116',\n 'kd_matakuliah' => '16TKO4063',\n 'kd_dosen_pengajar' => 'KO002N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16TKO4014',\n 'kd_dosen_pengajar' => 'KO045N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16KU34052',\n 'kd_dosen_pengajar' => 'KO016N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16TKO4033',\n 'kd_dosen_pengajar' => 'KO075N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TKO4014',\n 'kd_dosen_pengajar' => 'KO064N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D115',\n 'kd_matakuliah' => '16TKO4024',\n 'kd_dosen_pengajar' => 'KO006N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D115',\n 'kd_matakuliah' => '16TKO4024',\n 'kd_dosen_pengajar' => 'KO006N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6043',\n 'kd_dosen_pengajar' => 'KO045N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6043',\n 'kd_dosen_pengajar' => 'KO045N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6022',\n 'kd_dosen_pengajar' => 'KO008N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16JTK6012',\n 'kd_dosen_pengajar' => 'KO063N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '9',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6032',\n 'kd_dosen_pengajar' => 'KO005N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6054',\n 'kd_dosen_pengajar' => 'KO008N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '9',\n 'kd_sesi_berakhir' => '11',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6054',\n 'kd_dosen_pengajar' => 'KO008N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '1',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO6043',\n 'kd_dosen_pengajar' => 'KO017N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '2',\n 'kd_sesi_berakhir' => '7',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO6043',\n 'kd_dosen_pengajar' => 'KO017N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO6022',\n 'kd_dosen_pengajar' => 'KO008N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16JTK6012',\n 'kd_dosen_pengajar' => 'KO063N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6032',\n 'kd_dosen_pengajar' => 'KO005N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO6054',\n 'kd_dosen_pengajar' => 'KO018N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '9',\n 'kd_sesi_berakhir' => '11',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO6054',\n 'kd_dosen_pengajar' => 'KO018N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n }", "public function cariWaktuTerbaik($kelas, $id_guru, $hari, $bebanJam, $kelompokMapel, $metode = 1, $id_mapel, $nama_mapel, $id_tugas)\n\t{\n\t\t/*\n\t\t* jumlah pembagian jam \n\t\t* cek apakah ada jadwal yg ngepress\n\t\t* cek apakah ada jadwal yang ada tapi tidak ngpress\n\t\t* jika sudah tidak ada tambahi metode\n\t\t* kalau sudah tidak bisa maka geser\n\t\t* kalau sudah tidak bisa lagi maka kepepet\n\t\t*/\n\n\t\t$pembagianJam = $this->pembagianWaktu($kelompokMapel, $bebanJam, $metode);\n\t\t$dataHari = explode(',', $hari);\n\t\tforeach ($pembagianJam as $valuePembagianjam) {\n\t\t\t$hasilJadwal = $this->jadwalPas($kelas, $valuePembagianjam, $dataHari, $id_guru);\n\t\t\t// * cek hasil statusnya\n\t\t\tswitch ($hasilJadwal['status']) {\n\t\t\t\tcase 'Press':\n\t\t\t\t\techo \" sesi press\";\n\t\t\t\t\t$status = '<div style=\"background-color: #c82333\">error</div>';\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\tprint_r($hasilJadwal['sesi']);\n\t\t\t\t\techo \"<br>\";\n\n\t\t\t\t\tforeach ($hasilJadwal['sesi'] as $keyHariJadwal => $sesi) {\n\t\t\t\t\t\t$jadwaltersedia = $this->Jadwal_Model->getJadwalGuru_Kelas_Hari($kelas, $keyHariJadwal, $id_guru);\n\t\t\t\t\t\tif (count($jadwaltersedia) == 0) {\n\t\t\t\t\t\t\t$saranSesi = [];\n\t\t\t\t\t\t\tforeach ($sesi as $valueSesi) {\n\t\t\t\t\t\t\t\t$saranSesi = $this->sesiUrut($kelas, $keyHariJadwal, $valueSesi);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!empty($saranSesi)) {\n\t\t\t\t\t\t\t\t$this->Jadwal_Model->isiJadwal($kelas, $keyHariJadwal, $saranSesi, $id_guru, $id_mapel, $nama_mapel, $id_tugas);\n\t\t\t\t\t\t\t\t$status = \"<div style='background-color: #218838;'>sukses</div>\";\n\t\t\t\t\t\t\t\tbreak;\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\techo \"<br>\";\n\t\t\t\t\techo \"$status : \";\n\t\t\t\t\tprint_r($saranSesi);\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tidakPress':\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\techo \"<div style='background-color: #7FFFD4 ;'>proses dahulu</div>\";\n\t\t\t\t\t$tempTotal = 0;\n\t\t\t\t\t$hariyangdipilih = '';\n\t\t\t\t\t$status = '<div style=\"background-color: #c82333\">error</div>';\n\n\t\t\t\t\tforeach ($hasilJadwal['sesi'] as $keyHariJadwal => $sesi) {\n\t\t\t\t\t\t$jadwaltersedia = $this->Jadwal_Model->getJadwalGuru_Kelas_Hari($kelas, $keyHariJadwal, $id_guru);\n\t\t\t\t\t\tif (count($jadwaltersedia) == 0) {\n\t\t\t\t\t\t\tif ($tempTotal < count($sesi)) {\n\t\t\t\t\t\t\t\t$tempTotal = count($sesi);\n\t\t\t\t\t\t\t\t$hariyangdipilih = $keyHariJadwal;\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\techo \"---$hariyangdipilih==>temp Total : \" . $tempTotal . \"---<br>\";\n\n\t\t\t\t\tif ($hariyangdipilih == '') {\n\t\t\t\t\t\tforeach ($hasilJadwal['sesi'] as $keyHariJadwal => $sesi) {\n\t\t\t\t\t\t\t// echo \"<br>\";\n\t\t\t\t\t\t\t// echo \"tidak ada pilihan lain jumlah jadwal \" . count($jadwaltersedia);\n\t\t\t\t\t\t\tif ($tempTotal < count($sesi)) {\n\t\t\t\t\t\t\t\t$tempTotal = count($sesi);\n\t\t\t\t\t\t\t\t$hariyangdipilih = $keyHariJadwal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo 'hari yang dipilih kosong';\n\t\t\t\t\t}\n\n\t\t\t\t\t// print_r($hasilJadwal['sesi'][$hariyangdipilih]);\n\t\t\t\t\tforeach ($hasilJadwal['sesi'][$hariyangdipilih] as $valueSesi) {\n\t\t\t\t\t\t$saranSesi = $this->sesiUrut($kelas, $hariyangdipilih, $valueSesi);\n\t\t\t\t\t\tif (!empty($saranSesi)) {\n\t\t\t\t\t\t\t// $this->Jadwal_Model->isiJadwal($kelas, $hariyangdipilih, $hasilJadwal['sesi'][$hariyangdipilih][0], $id_guru, $id_mapel, $nama_mapel, $id_tugas);\n\t\t\t\t\t\t\t$this->Jadwal_Model->isiJadwal($kelas, $hariyangdipilih, $saranSesi, $id_guru, $id_mapel, $nama_mapel, $id_tugas);\n\t\t\t\t\t\t\t$status = \"<div style='background-color: #218838;'>sukses</div>\";\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\techo \"<br>\";\n\t\t\t\t\techo \"$status : \";\n\t\t\t\t\tprint_r($saranSesi);\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tidakMuat':\n\t\t\t\t\techo \"tidak muat\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "function hapus_pengguna($nama_pengguna) {\n global $conn; //memanggil koneksi di global variabel\n $u = generate_id('pengguna', 'nama_pengguna'); //menggenerate id dengan fungsi generator\n $e = generate_id('pengguna', 'email'); //email juga\n $n = generate_id('pengguna', 'nomor_hp'); //nomor hp juga\n //diupdate dengan data tersebut, agar tidak terdeteksi sama jika ada penambahan data baru yang kebetulan memang sama dengan data yang sudah dihapus\n //tidak dihapus karena akan berpengaruh pada tabel yang berkaitan dengan data tersebut, cuma diupdate saja dan yang bersifat unik akan diganti data acak di atas\n //selain itu, mengeset kolom aktif menjadi 0\n $q = $conn->prepare(\"UPDATE pengguna SET aktif='0', nama_pengguna='$u', email='$e', nomor_hp='$n' WHERE nama_pengguna='{$_GET['nama-pengguna']}' AND aktif='1'\");\n $q->execute();\n //menonaktifkan rekening juga berdasarkan nama pengguna yang dimasukkan (jika ada, jika tidak ada [jenis admin] tetap akan melakukan ini dan tidak berefek apa-apa)\n $q = $conn->prepare(\"UPDATE rekening SET aktif='0' WHERE nama_pengguna='$u' AND aktif='1'\");\n $q->execute();\n}", "public function tambah(){\n $this->template->views('crud/tambah_mahasiswa'); //untuk menampilkan view tambah_mahasiswa\n }", "public function InsertBiodataMahasiswa()\n {\n\t\t$data = array(\n\t\t\t\t\"nama_mahasiswa\",\n\t\t\t\t\"jenis_kelamin\",\n\t\t\t\t\"tempat_lahir\",\n\t\t\t\t\"tanggal_lahir\",\n\t\t\t\t\"id_agama\",\n\t\t\t\t\"nik\",\n\t\t\t\t\"nisn\",\n\t\t\t\t\"npwp\",\n\t\t\t\t\"kewarganegaraan\",\n\t\t\t\t\"jalan\",\n\t\t\t\t\"dusun\",\n\t\t\t\t\"rt\",\n\t\t\t\t\"rw\",\n\t\t\t\t\"kelurahan\",\n\t\t\t\t\"kode_pos\",\n\t\t\t\t\"id_wilayah\",\n\t\t\t\t\"id_jenis_tinggal\",\n\t\t\t\t\"id_alat_transportasi\",\n\t\t\t\t\"telepon\",\n\t\t\t\t\"handphone\",\n\t\t\t\t\"email\",\n\t\t\t\t\"penerima_kps\",\n\t\t\t\t\"nomor_kps\",\n\t\t\t\t\"nik_ayah\",\n\t\t\t\t\"nama_ayah\",\n\t\t\t\t\"tanggal_lahir_ayah\",\n\t\t\t\t\"id_pendidikan_ayah\",\n\t\t\t\t\"id_pekerjaan_ayah\",\n\t\t\t\t\"id_penghasilan_ayah\",\n\t\t\t\t\"nik_ibu\",\n\t\t\t\t\"nama_ibu_kandung\",\n\t\t\t\t\"tanggal_lahir_ibu\",\n\t\t\t\t\"id_pendidikan_ibu\",\n\t\t\t\t\"id_pekerjaan_ibu\",\n\t\t\t\t\"id_penghasilan_ibu\",\n\t\t\t\t\"nama_wali\",\n\t\t\t\t\"tanggal_lahir_wali\",\n\t\t\t\t\"id_pendidikan_wali\",\n\t\t\t\t\"id_pekerjaan_wali\",\n\t\t\t\t\"id_penghasilan_wali\",\n\t\t\t\t\"id_kebutuhan_khusus_mahasiswa\",\n\t\t\t\t\"id_kebutuhan_khusus_ayah\",\n\t\t\t\t\"id_kebutuhan_khusus_ibu\");\t\t\t\n\t\treturn $data;\t\n\t}", "function cariObat()\n\t{\n\t\tif ($this->input->get() != NULL) {\n\t\t\t$dataForm = $this->input->get();\n\t\t\t\n\t\t\t$dataReturn = $this->db->query(\" SELECT * FROM logistik WHERE nama LIKE '%\".$dataForm['term']['term'].\"%' ESCAPE '!' AND stok > 0\")->result();\t\t\t\n\n\t\t\t$data = array();\n\t\t\tforeach ($dataReturn as $key => $value) {\n\t\t\t\t$data[$key]['id'] = $value->id.\"|\".$value->nama;\n\t\t\t\t$data[$key]['text'] = $value->nama;\n\t\t\t\t$data[$key]['stok'] = $value->stok;\n\t\t\t\tif ($value->kadaluarsa < date(\"Y-m-d-d\")) {\n\t\t\t\t\t$data[$key]['stok'] .= \" Sudah kadaluarsa\";\n\t\t\t\t}\n\t\t\t\t$data[$key]['satuan'] = $value->satuan;\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}else{\n\t\t\tredirect();\n\t\t}\t\t\n\t}", "public function run()\n {\n $jawaban_soal_ujians = [\n [ \n\t\t\t'jawaban'\t\t=> '3500',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '1',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> '2500',\n\t\t\t'is_benar'\t\t=> '1',\t\t\t\n\t\t\t'poin'\t\t=> '10',\n\t\t\t'id_soal'\t\t=> '1',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> '8900',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '1',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> '250',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '1',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> 'Mensyukuri',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '2',\t\t\t\n\t\t], \n\t\t[ \n\t\t\t'jawaban'\t\t=> 'Menyukai',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '2',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> 'Membenci',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '2',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> 'Menyayangi',\n\t\t\t'is_benar'\t\t=> '1',\t\t\t\n\t\t\t'poin'\t\t=> '10',\n\t\t\t'id_soal'\t\t=> '2',\t\t\t\n\t\t],\t\n\t\t]; \n\n\t\tDB::table('jawaban_soal_ujians')->insert($jawaban_soal_ujians);\n }", "public function aksi_tambah_pejabat_berwenang()\n {\n $data = array(\n 'nip' => $this->input->post('nip'),\n 'nama' => $this->input->post('nama'),\n 'jabatan' => $this->input->post('jabatan'),\n 'pangkat_gol' => $this->input->post('pangkat_gol'),\n );\n\n $this->m_admin->tambah_pejabat($data);\n $this->session->set_flashdata('success', 'ditambahkan');\n redirect('admin/list_data_pejabat_berwenang');\n }", "function datagolongan() {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t\t= \"SELECT * FROM golongan\";\n\t\t\t\t\n\t\t\t\t$sql\t\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\treturn $sql;\n\t\t\t}", "function cek_jabatan_kedepan(){\n\t\t\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t$ta = $this->_generate_ta($this->session->userdata('r_ta'));\n\t\t$smt = $this->_generate_smt($this->session->userdata('r_smt'));\n\t\t\n\t\t$tahun = $this->session->userdata('r_ta');\n\t\t$semester = $this->session->userdata('r_smt');\n\t\t\n\t\t$data = $this->setting->_is_pejabat_penunjang_nt();\n\t\t$tgl_laporan = $this->setting->_tanggal_akhir_laporan($ta, $smt, 'rbkd');\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_rbkd';\n\t\t$parameter = array('api_search' => array('D', $kd_dosen, $tahun, $semester));\n\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t# data kegiatan\n\t\t$kegiatan = $data['nama_jabatan'];\n\t\t$masa_penugasan = $data['masa_penugasan'];\n\t\t$bukti_penugasan = $data['bukti_penugasan']; $bkt_dokumen = $data['bukti_penugasan'];\n\t\t$sks = $data['sks_maks'];\n\t\t\n\t\tif(count($data['data_beban']) <= 1){\n\t\t\tif($data['tgl_selesai'] == '' || \n\t\t\t\tdate('d-m-Y', strtotime($data['tgl_selesai'])) > \n\t\t\t\tdate('d-m-Y', strtotime(str_replace('/','-', $tgl_laporan)))\n\t\t\t){\n\t\t\t\t\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_rbkd';\n\t\t\t\t$parameter = array('api_search' => array('D', $kd_dosen, $kegiatan, $bukti_penugasan, $sks, $masa_penugasan, $tahun, $semester, '', $ta, $smt));\n\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t}\n\t\t}\n\t\tredirect('bkd/dosen/bebankerja/rbkd/D');\t\t\n\t}", "function tambahberita($databerita){\n\t\tglobal $koneksi;\n\n\t\t$judul = htmlspecialchars($databerita['judul']);\n\t\t$nama = htmlspecialchars($databerita['nama']);\n\t\t$tanggal = date(\"Y-m-d\");\n\t\t$isi = htmlspecialchars($databerita['isi']);\n\n\t\t//upload gambar\n\t\t$gambar = upload();\n\t\tif( !$gambar ){\n\t\t\treturn false;\n\t\t}\n\n\n\t\t$query = \"INSERT INTO tabelberita VALUES ('','$judul','$nama','$tanggal','$isi','$gambar')\" or die(mysqli_error());\n\n\t\t$hasil = mysqli_query($koneksi, $query );\n\n\t\treturn mysqli_affected_rows($koneksi);\n\t}", "public function kosongkanDataBarang() {\n $this->daftar_barang = [];\n $this->editData();\n }", "public function cetak_dokumen(){\n\t\t$data['ambil_profil_usp']=$this->Tu_model->Select_satu('tbl_profil_usp', 'aktif', 'Ya');\n $id_pemanfaat = base64_decode($this->uri->segment(3));\n $id_pinjaman = base64_decode($this->uri->segment(4));\n $data['id_pemanfaat'] = $id_pemanfaat;\n $data['id_pinjaman'] = $id_pinjaman;\n $data['aksi'] = 'Dokumen Pinjaman';\n $data['target_kembali'] = 'pinjaman/'.$this->uri->segment(3);\n $data['ambil_dokumen_pinjaman']=$this->Tu_model->Select_satu('tbl_dokumen','id_pinjaman',$id_pinjaman);\n $data['ambil_pemanfaat']=$this->Tu_model->Select_satu('tbl_pemanfaat','id_pemanfaat',$id_pemanfaat);\n $data['ambil_pinjaman']=$this->Tu_model->Select_satu('tbl_pinjaman','id_pinjaman',$id_pinjaman);\n $data['ambil_agunan']=$this->Tu_model->Select_satu('tbl_agunan','id_pinjaman',$id_pinjaman);\n $data['ambil_status_pembayaran']=$this->Tu_model->Select_query(\"select max(tanggal_pinjaman) as tanggal, id_pinjaman , status_pembayaran\n from tbl_pinjaman where id_pemanfaat='$id_pemanfaat'\");\n $data['ambil_kades']=$this->Tu_model->Select_satu('tbl_kades','status_kades',\"Aktif\");\n $data['ambil_bpd']=$this->Tu_model->Select_satu('tbl_bpd','status_bpd',\"Aktif\");\n $data['ambil_pendamping']=$this->Tu_model->Select_satu('tbl_pendamping_desa','status_pendamping_desa ',\"Aktif\");\n $data['ambilPengurus']=$this->Tu_model->Select_satu('tbl_pengurus','status_pengurus',\"Aktif\");\n $this->load->view('tu/pemeriksaan_kelengkapan', $data);\n\n }", "public function aksi_setujui_permohonan_008()\n {\n $data = array(\n 'tgl_persetujuan_admin' => date(\"Y/m/d\"),\n 'notif' => 'Belum Dibaca',\n 'notif_rt' => 'Belum Dibaca',\n );\n\n $data_surat = array(\n 'no_registrasi' => $this->input->post('no_registrasi'),\n 'no_bulan' => $this->input->post('no_bulan'),\n 'no_tahun' => $this->input->post('no_tahun'),\n );\n\n $detailhere = $this->input->post('id_permohonan_surat');\n\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat');\n $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_ket_janda');\n\n if (\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat')\n && $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_ket_janda')\n ); {\n $this->session->set_flashdata('success', 'disetujui');\n redirect('admin/pilih_tanda_tangan/' . $detailhere);\n }\n }", "private function _serapan($proposal, $lpj, $tahun)\n {\n $lembaga = $this->db->get_where('lembaga', ['id_lembaga !=' => 0])->result_array();\n if ($proposal == null) {\n foreach ($lembaga as $l) {\n $proposal[$l['id_lembaga']] = [\n 'bulan' => 0,\n 'dana' => 0,\n 'id_lembaga' => $l['id_lembaga'],\n 'nama_lembaga' => $l['nama_lembaga']\n ];\n }\n }\n if ($lpj == null) {\n foreach ($lembaga as $l) {\n $lpj[$l['id_lembaga']] = [\n 'bulan' => 0,\n 'dana' => 0,\n 'id_lembaga' => $l['id_lembaga'],\n 'nama_lembaga' => $l['nama_lembaga']\n ];\n }\n }\n // inisialisasi data lpj\n $data_lpj = [];\n $index1 = 0;\n foreach ($proposal as $p) {\n $data_lpj[$index1++] = [\n 'bulan' => 0,\n 'dana' => 0,\n 'id_lembaga' => $p['id_lembaga'],\n 'nama_lembaga' => $p['nama_lembaga']\n ];\n }\n // mengisikan nilai array LPJ\n $index2 = 0;\n foreach ($lpj as $l) {\n $data_lpj[$index2++] = [\n 'bulan' => $l['bulan'],\n 'dana' => $l['dana'],\n 'id_lembaga' => $l['id_lembaga'],\n 'nama_lembaga' => $l['nama_lembaga']\n ];\n }\n $lpj = $data_lpj;\n $data = [];\n foreach ($lembaga as $l) {\n for ($j = 1; $j < 13; $j++) {\n $data[$l['id_lembaga']][$j] = 0;\n }\n $data[$l['id_lembaga']]['nama_lembaga'] = $l['nama_lembaga'];\n $dana = $this->db->select('anggaran_kemahasiswaan')->get_where('rekapan_kegiatan_lembaga', ['id_lembaga' => $l['id_lembaga'], 'tahun_pengajuan' => $tahun])->row_array();\n\n if ($dana['anggaran_kemahasiswaan'] == null) {\n $data[$l['id_lembaga']]['dana_pagu'] = 0;\n } else {\n $data[$l['id_lembaga']]['dana_pagu'] = $dana['anggaran_kemahasiswaan'];\n }\n $data[$l['id_lembaga']]['dana_terserap'] = 0;\n }\n foreach ($proposal as $p) {\n if ($p['bulan'] == \"1\") {\n $data[$p['id_lembaga']][1] += $p['dana'];\n } elseif ($p['bulan'] == \"2\") {\n $data[$p['id_lembaga']][2] += $p['dana'];\n } elseif ($p['bulan'] == \"3\") {\n $data[$p['id_lembaga']][3] += $p['dana'];\n } elseif ($p['bulan'] == \"4\") {\n $data[$p['id_lembaga']][4] += $p['dana'];\n } elseif ($p['bulan'] == \"5\") {\n $data[$p['id_lembaga']][5] += $p['dana'];\n } elseif ($p['bulan'] == \"6\") {\n $data[$p['id_lembaga']][6] += $p['dana'];\n } elseif ($p['bulan'] == \"7\") {\n $data[$p['id_lembaga']][7] += $p['dana'];\n } elseif ($p['bulan'] == \"8\") {\n $data[$p['id_lembaga']][8] += $p['dana'];\n } elseif ($p['bulan'] == \"9\") {\n $data[$p['id_lembaga']][9] += $p['dana'];\n } elseif ($p['bulan'] == \"10\") {\n $data[$p['id_lembaga']][10] += $p['dana'];\n } elseif ($p['bulan'] == \"11\") {\n $data[$p['id_lembaga']][11] += $p['dana'];\n } elseif ($p['bulan'] == \"12\") {\n $data[$p['id_lembaga']][12] += $p['dana'];\n }\n }\n foreach ($lpj as $l) {\n if ($l['bulan'] == \"1\") {\n $data[$l['id_lembaga']][1] += $l['dana'];\n } elseif ($l['bulan'] == \"2\") {\n $data[$l['id_lembaga']][2] += $l['dana'];\n } elseif ($l['bulan'] == \"3\") {\n $data[$l['id_lembaga']][3] += $l['dana'];\n } elseif ($l['bulan'] == \"4\") {\n $data[$l['id_lembaga']][4] += $l['dana'];\n } elseif ($l['bulan'] == \"5\") {\n $data[$l['id_lembaga']][5] += $l['dana'];\n } elseif ($l['bulan'] == \"6\") {\n $data[$l['id_lembaga']][6] += $l['dana'];\n } elseif ($l['bulan'] == \"7\") {\n $data[$l['id_lembaga']][7] += $l['dana'];\n } elseif ($l['bulan'] == \"8\") {\n $data[$l['id_lembaga']][8] += $l['dana'];\n } elseif ($l['bulan'] == \"9\") {\n $data[$l['id_lembaga']][9] += $l['dana'];\n } elseif ($l['bulan'] == \"10\") {\n $data[$l['id_lembaga']][10] += $l['dana'];\n } elseif ($l['bulan'] == \"11\") {\n $data[$l['id_lembaga']][11] += $l['dana'];\n } elseif ($l['bulan'] == \"12\") {\n $data[$l['id_lembaga']][12] += $l['dana'];\n }\n }\n foreach ($lembaga as $l) {\n for ($j = 1; $j < 13; $j++) {\n $data[$l['id_lembaga']]['dana_terserap'] += $data[$l['id_lembaga']][$j];\n }\n if ($data[$l['id_lembaga']]['dana_pagu'] == 0) {\n $data[$l['id_lembaga']]['terserap_persen'] = 0;\n } else {\n $data[$l['id_lembaga']]['terserap_persen'] = $data[$l['id_lembaga']]['dana_terserap'] / $data[$l['id_lembaga']]['dana_pagu'] * 100;\n }\n $data[$l['id_lembaga']]['dana_sisa'] = $data[$l['id_lembaga']]['dana_pagu'] - $data[$l['id_lembaga']]['dana_terserap'];\n if ($data[$l['id_lembaga']]['dana_pagu'] == 0) {\n $data[$l['id_lembaga']]['sisa_terserap'] = 0;\n } else {\n $data[$l['id_lembaga']]['sisa_terserap'] = $data[$l['id_lembaga']]['dana_sisa'] / $data[$l['id_lembaga']]['dana_pagu'] * 100;\n }\n }\n return $data;\n }", "public function actionPenulisWord()\n {\n $phpWord = new phpWord();\n $section = $phpWord->addSection(\n [\n 'marginTop' => Converter::cmTotwip(1.80),\n 'marginBottom' => Converter::cmTotwip(1.80),\n 'marginLeft' => Converter::cmTotwip(1.2),\n 'marginRight' => Converter::cmTotwip(1.6),\n ]\n );\n\n $fontStyle = [\n 'underline' => 'dash',\n 'bold' => true,\n 'italic' => true,\n ];\n $paragraphCenter =[\n 'alignment' =>'center',\n ];\n\n $headerStyle = [\n 'bold' => true,\n ];\n\n $section->addText(\n 'Daftar Penulis',\n $headerStyle,\n $fontStyle,\n $paragraphCenter\n );\n\n $section->addText(\n 'RINCIAN DARI TABEL PENULIS',\n $headerStyle,\n $paragraphCenter\n );\n\n $section->addTextBreak(1);\n\n $judul = $section->addTextRun($paragraphCenter);\n\n $judul->addText('Keterangan dari ', $fontStyle);\n $judul->addText('Tabel ', ['italic' =>true]);\n $judul->addText('Penulis ', ['bold' =>true]);\n\n $table = $section->addTable([\n 'alignment' => 'center',\n 'bgColor' => 6,\n 'borderSize' => 6,\n \n ]);\n $table->addRow(null);\n $table->addCell(500)->addText('NO', $headerStyle, $paragraphCenter);\n $table->addCell(5000)->addText('Nama', $headerStyle, $paragraphCenter);\n $table->addCell(5000)->addText('Alamat', $headerStyle, $paragraphCenter);\n $table->addCell(200)->addText('Telepon', $headerStyle, $paragraphCenter);\n $table->addCell(200)->addText('Email', $headerStyle, $paragraphCenter);\n\n $semuaPenulis = Penulis::find()->all();\n $nomor = 1;\n foreach ($semuaPenulis as $penulis) {\n $table->addRow(null);\n $table->addCell(500)->addText($nomor++, null, $headerStyle, $paragraphCenter);\n $table->addCell(5000)->addText($penulis->nama, null);\n $table->addCell(5000)->addText($penulis->alamat, null, $paragraphCenter);\n $table->addCell(5000)->addText($penulis->telepon, null, $paragraphCenter);\n $table->addCell(5000)->addText($penulis->email, null, $paragraphCenter);\n }\n\n $filename = time() . 'penulis-word.docx';\n $path = 'exportwordpenulis/' . $filename;\n $xmlWriter = IOfactory::createWriter($phpWord, 'Word2007');\n $xmlWriter -> save($path);\n return $this -> redirect($path);\n }", "public function mahasiswa()\n {\n $data['halaman'] = \"Data Mahasiswa\";\n $data['mahasiswa'] = $this->mod->m_get_all_mahasiswa_plus_dosen();\n // print('<pre>');print_r($data);exit();\n $this->load->view('head.php', $data);\n $this->load->view('sidebar.php');\n $this->load->view('header.php');\n $this->load->view('dosen/mahasiswa.php', $data);\n $this->load->view('footer.php');\n }", "public function aksi_tambah_permohonan_suket009()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama_alm' => $this->input->post('nama_alm'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'umur' => $this->input->post('umur'),\n\t\t\t'tempat_kediaman' => $this->input->post('tempat_kediaman'),\n\t\t\t'hari_meninggal' => $this->input->post('hari_meninggal'),\n\t\t\t'tanggal_meninggal' => $this->input->post('tanggal_meninggal'),\n\t\t\t'tempat_meninggal' => $this->input->post('tempat_meninggal'),\n\t\t\t'alasan_meninggal' => $this->input->post('alasan_meninggal'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_kematian');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket009/' . $id_surat . '/' . $id_permohonan);\n\t}" ]
[ "0.71276146", "0.69400436", "0.66536534", "0.66297597", "0.65348506", "0.6526685", "0.64617735", "0.643403", "0.6424141", "0.64191353", "0.6401473", "0.6392963", "0.63841313", "0.6379349", "0.63656783", "0.63621783", "0.6358174", "0.63446474", "0.6338772", "0.63370633", "0.63352287", "0.6333811", "0.6302264", "0.6299372", "0.62875104", "0.6280687", "0.6257565", "0.6251294", "0.6248553", "0.6236582", "0.6227294", "0.6224298", "0.6220608", "0.6220223", "0.62111974", "0.62107915", "0.62023336", "0.6191878", "0.6180989", "0.6180871", "0.6176014", "0.6172427", "0.6165911", "0.6162492", "0.61595595", "0.61574286", "0.6156242", "0.61411643", "0.6130386", "0.61280286", "0.61180747", "0.61172575", "0.6112617", "0.61111677", "0.61099166", "0.61081743", "0.6103057", "0.6097424", "0.60941184", "0.60932654", "0.60909957", "0.608875", "0.6088174", "0.6076785", "0.60726976", "0.60714084", "0.6062543", "0.60607934", "0.60605764", "0.6059808", "0.60595995", "0.60582054", "0.6056241", "0.60534555", "0.6051694", "0.60508025", "0.60501057", "0.6046289", "0.60456", "0.60432285", "0.60431594", "0.60386556", "0.6037028", "0.6034622", "0.60342914", "0.6031075", "0.6029212", "0.60285896", "0.60226095", "0.6021147", "0.6020607", "0.6020429", "0.6018732", "0.60128987", "0.6012464", "0.60123056", "0.6011904", "0.6011397", "0.6009593", "0.60067576" ]
0.6193172
37
Fungsi untuk mencari jenazah berdasarkan nama jenazah
public function cariJenazah(): void { $result = Jenazah::where('nama', 'LIKE', "%$this->namaJenazah%") ->get(['id', 'nama', 'blok']); if (count($result) === 0) { $result = [[ 'nama' => "Nama jenazah tidak ditemukan.", 'id' => null, 'blok' => null, ]]; } $this->suggestion_name = $result; // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tampilUrutNama(){\n require('DataMahasiswa.php');\n //Melakukan sorting nama secara ascending\n $nama = array_column($mahasiswa, 'Nama');\n array_multisort($nama, SORT_ASC, $mahasiswa);\n $namaMhs = \"\";\n // looping foreach\n foreach ($mahasiswa as $mhs => $value) {\n // looping for 1 iterasi\n for ($value=0; $value < 1; $value++) { \n $namaMhs = $namaMhs.\"Nama : \".$mahasiswa[$mhs]['Nama'].\", NRP : \".$mahasiswa[$mhs]['NRP'].\"<br>\";\n }\n }\n return $namaMhs;\n }", "public function o_nama()\n {\n $this->show('o_nama',[]);\n }", "function data_mhs(){\r\n\t\t\techo \"KodeMataKuliah : \".$this->KodeMataKuliah.\"<br />\";\r\n\t\t\techo \"SKS : \".$this->SKS.\"<br />\";\r\n\t\t\techo \"Daftar matakuliah yang diambil:<br />\";\r\n\t\t\t\r\n\t\t\t$i = 0; // nomor urut daftar SKS matakuliah yang diambil\r\n\t\t\tforeach($this->NamaMataKuliah as $mk){\r\n\t\t\t\techo ++$i.\". \".$mk.\"<br />\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Cuma buat ganti baris aja kok :-)\r\n\t\t\techo \"<br />\";\r\n\t\t}", "function cariNama()\n\t{\n\t\tif ($this->input->get() != NULL) {\n\t\t\t$dataForm = $this->input->get();\n\t\t\t$dataReturn = $this->Kesehatan_M->orLike('pasien',array('nama'=>$dataForm['term']['term'],'nomor_pasien'=>$dataForm['term']['term']))->result();\n\t\t\t$data = array();\n\t\t\tforeach ($dataReturn as $key => $value) {\n\t\t\t\t$data[$key]['id'] = $value->nomor_pasien;\n\t\t\t\t$data[$key]['text'] = $value->nama.\" / \".$value->nomor_pasien;\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}else{\n\t\t\tredirect();\n\t\t}\n\t}", "public function getNamaPelajaran();", "public function nama()\n {\n $nama = [\n [\n \"nama\" => \"Aziz\",\n \"kelas\" => 12,\n \"hobby\" => [\n \"Gaming\",\n \"Gitar\"\n ],\n \"guru\" => [\n \"nama1\" => \"Ujang\",\n \"nama2\" => \"Udin\"\n ]\n ],\n [\n \"nama\" => \"Aziz\",\n \"kelas\" => 12,\n \"hobby\" => [\n \"Gaming\",\n \"Gitar\"\n ],\n \"guru\" => [\n \"nama1\" => \"Ujang\",\n \"nama2\" => \"Udin\"\n ]\n ]\n ];\n return $nama;\n }", "public function tambah_toko(){\n\t}", "function data_prosesan()\n{\n //$jadual['medan'][]='*';\n /*$jadual['medan'][]='newss,ssm,nama,tel,fax,responden,' .\n '(SELECT keterangan FROM msic WHERE msic=msic2000 LIMIT 1,1) as keterangan,' .\n 'msic2000,msicB2000,fe';*/\n $sama='j1.newss,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn, ';\n $sama2='j2.newss,concat(j2.tahun_rujukan,\"-\",j2.siri_kekerapan) as blnthn, ';\n //$jadual['medan'][]=$sama . 'ssm, nama, operator, sv, kekerapan_sv'; \n //$jadual['medan'][]=$sama . 'ng, po, data_anggaran, cara_maklum_balas, cara_terima, sumber_pertubuhan, kategori_sample';\n //$jadual['medan'][]=$sama . 'status_operasi, status_lain_pbb, bil_bulan_bco, siasatan_bermula, siasatan_berakhir';\n //$jadual['medan'][]=$sama . 'no_jln_bgn, tmn_kg, bandar_kawasan, poskod, negeri, daerah, catatan';\n //$jadual['medan'][]=$sama . 'responden, jawatan, email, notel, lamanweb, tarikh';\n //$jadual['medan'][]=$sama . 'responden2, jawatan2, email2, notel2, nofax2';\n //$jadual['medan'][]=$sama . '`no_jln_bgn-lokasi`, `tmn_kg-lokasi`, `bandar_kawasan-lokasi`, ' .\n //'`poskod-lokasi`, `negeri-lokasi` ng, `daerah-lokasi` dp';\n $jadual['medan'][]='j1.newss,j1.ssm,j1.nama,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn ';\n $jadual['medan'][]=$sama . \"\\r\" . 'msic_lama, (SELECT keterangan FROM msic WHERE msic=msic_lama LIMIT 1,1) as keterangan,' . \n 'msic_baru, utama '; \n //$jadual['medan'][]=$sama . \"\\r\\t\" . 'F3001, F3002, catatan_soalan3, ' . 'F5001, F5002, F5003, F5104, catatan_soalan5';\n $jadual['medan'][]=$sama . 'F6001, F6002, F6003, F6004, F6005, F6101, F6102, F6103, F6104, F6105, catatan_soalan6';\n $jadual['medan'][]=$sama . 'F7001, F7002, F7003, catatan_soalan7, ' .\n 'F8001, catatan_soalan8, F9001, catatan_soalan9';\n //$jadual['medan'][]=$sama . 'cara_anggaran, bulan_terakhir_data_sebenar, bil_bulan_data_telah_dianggar';\n\n //$jadual['medan'][]=$sama . 'Deskripsi_Produk_Oleh_Responden, Produk_Tetap, Deskripsi_Produk_Tetap,\n //Produk_Tambahan, Deskripsi_Produk_Tambahan, UnitKuantitiAsal, UnitKuantitiLain'; \n $produk='Deskripsi_Produk_Tetap Nama, Produk_Tetap Kod, ';\n $jadual['medan'][]=$sama . $produk . 'KuantitiPengeluaran, KuantitiJualan, NilaiJualan, ' .\n 'format(NilaiJualan/KuantitiJualan,2) as HargaUnit, UnitKuantitiKini';\n //$jadual['medan'][]=$sama . $produk . 'ProsesanKuantitiPengeluaran, ProsesanKuantitiJualan, ProsesanNilaiJualan, AUP';\n $jadual['medan'][]=$sama . $produk . 'F2497, F2498, F2499, Catatan';\n $jadual['medan'][]=$sama . \"\\r\\t\" . \n 'F3001, F3002, catatan_soalan3, ' .\n 'F5001, F5002, F5003, F5104, catatan_soalan5';\n\n //$jadual['medan'][]=$sama . 'catatan';\n $jadual['medan'][]=$sama . 'F4001, F4002, F4003, F4004';\n $jadual['medan'][]=$sama . 'F4101, F4102, F4103, F4104';\n $jadual['medan'][]=$sama . 'F4201, F4202, F4203, F4204';\n $jadual['medan'][]=$sama . 'catatan \"Nota \", F4302, F4303, F4304';\n\n // bulanan\n //$bulan=($_GET['bln']==null)? '':'AND siri_kekerapan=\"'.bersih($_GET['bln']).'\"';\n $bulan_penuh = array('Januari', 'Februari', 'Mac', 'April', \n 'Mei', 'Jun', 'Julai', 'Ogos', \n 'September', 'Oktober', 'November', 'Disember');\n //$kerap='\"'.$bulan_penuh[0].'\",\"'.$bulan_penuh[1].'\",\"'.$bulan_penuh[2].'\"';\n //$bulan=($_GET['bln']==null)? '':'AND j1.siri_kekerapan in ('.$kerap.')';\n //$myJadual=array('mm_rangka','mm_rangka');\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_info'; } // bil medan = 15\n for($z=1;$z <= 2;$z++) { $jadual['nama'][]='prosesmm_jualan'; }\n $jadual['nama'][]='prosesmm_info';\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_gajistaf'; }\n $join1='prosesmm_info';\n $join2='prosesmm_jualan';\n $join3='prosesmm_gajistaf';\n \n return $jadual;\n}", "function getDataMahassiwa()\n{\n\t$data = array(\n\t\t\t\t\t\"nama\" => \"Edward\",\n\t\t\t\t\t\"npm\" \t=> \"17117369\",\n\t\t\t\t\t\"fakultas\" => \"Fakultas Ilmu Komputer & Teknologi Informasi\",\n\t\t\t\t\t\"jurusan\" => \"Sistem Informasi\"\n\t\t\t\t\t);\n\treturn $data;\n}", "public function getNama()\n {\n return $this->nama;\n }", "function select_tb_penduduk(){\n\t\t$this->load->model('mamdani');\n\t\t//$klasifikasi['klasifikasi']=$this->mamdani->getdata();\n\t\t$klasifikasi['jumlah_aset']=$this->mamdani->jumlah_aset();\n\t\t$klasifikasi['tingkat']= $this->mamdani->klasifikasi3();\n\n\t\t$this->load->view('templates/header');\n\t\t$this->load->view('admin/lihatdata/tabel_klasifikasi_penduduk',$klasifikasi);\n\t\t$this->load->view('templates/footer');\n\t\t// var_dump($jml_aset);\n\t\t// die;\n\n\t}", "public function getTanggalNamaSidang() {\n return CHtml::listData(Sidangmaster::model()->with('iDJenisSidang')->findAll('status=1'), 'Tanggal', 'Tanggal');\n }", "function berinamateman ($teman) {\n $this->nama_teman=$teman;\n }", "public function aksi_tambah_pengikut_suket014()\n\t{\n\t\t$id_permohonan = $this->input->post('id_permohonan_surat');\n\n\t\t$data_pengikut = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'umur' => $this->input->post('umur'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n\t\t\t'nama_ortu' => $this->input->post('nama_ortu'),\n\t\t\t'status_hub_kk' => $this->input->post('status_hub_kk'),\n\t\t);\n\n\t\t$this->m_warga->aksi_tambah_pengikut($data_pengikut);\n\n\t\t$this->session->set_flashdata('success', 'ditambahkan');\n\t\tredirect('warga/list_pengikut_suket014/' . $id_permohonan);\n\t}", "public function tambah()\n {\n $data['userdata'] = $this->userdata;\n\n $data['page'] = \"Tambah\";\n $data['judul'] = \"Data Nasabah\";\n $data['deskripsi'] = \"Manage Data Nasabah\";\n\n $data['jenisID'] = $this->M_nasabah->jenisID();\n\n $data['majelis'] = $this->M_nasabah->majelis();\n $data['petugas'] = $this->M_nasabah->petugas();\n $data['sektor_usaha'] = $this->M_nasabah->sektor_usaha();\n $data['kantor'] = $this->M_nasabah->kantor();\n $data['agama'] = $this->M_nasabah->agama();\n $data['status_nikah'] = $this->M_nasabah->status_nikah();\n\n $data['desa'] = $this->M_nasabah->desa();\n $data['kecamatan'] = $this->M_nasabah->kecamatan();\n $data['kota_kab'] = $this->M_nasabah->kota_kab();\n $data['provinsi'] = $this->M_nasabah->provinsi();\n\n $this->template->views('nasabah/tambah_nasabah', $data);\n }", "public function getNamaSidangd() {\n return CHtml::listData(Sidangmaster::model()->with('iDJenisSidang')->findAll('status=1 and iDJenisSidang.IDJenisSidang in(1,2,3,4)'), 'IdSidang', 'iDJenisSidang.NamaSidang');\n }", "public function percobaan()\n {\n \t$a = \"Ahmad Muhaimin\";\n \treturn \"Nama Saya Adalah \".$a;\n }", "function berinamaTeman($teman){\r\n\t\t\t$this->nama_teman = $teman;\r\n\t\t}", "function cariObat()\n\t{\n\t\tif ($this->input->get() != NULL) {\n\t\t\t$dataForm = $this->input->get();\n\t\t\t\n\t\t\t$dataReturn = $this->db->query(\" SELECT * FROM logistik WHERE nama LIKE '%\".$dataForm['term']['term'].\"%' ESCAPE '!' AND stok > 0\")->result();\t\t\t\n\n\t\t\t$data = array();\n\t\t\tforeach ($dataReturn as $key => $value) {\n\t\t\t\t$data[$key]['id'] = $value->id.\"|\".$value->nama;\n\t\t\t\t$data[$key]['text'] = $value->nama;\n\t\t\t\t$data[$key]['stok'] = $value->stok;\n\t\t\t\tif ($value->kadaluarsa < date(\"Y-m-d-d\")) {\n\t\t\t\t\t$data[$key]['stok'] .= \" Sudah kadaluarsa\";\n\t\t\t\t}\n\t\t\t\t$data[$key]['satuan'] = $value->satuan;\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}else{\n\t\t\tredirect();\n\t\t}\t\t\n\t}", "public function get_pembeli_darat() {\r\n $nama = $this->input->get('term'); //variabel kunci yang di bawa dari input text id kode\r\n $tipe = \"darat\";\r\n $query = $this->master->get_pembeli($tipe,$nama); //query model\r\n\r\n if($query == TRUE){\r\n $pelanggan = array();\r\n foreach ($query as $data) {\r\n $pelanggan[] = array(\r\n 'label' => $data->nama_pengguna_jasa, //variabel array yg dibawa ke label ketikan kunci\r\n 'id' => $data->id_pengguna_jasa,\r\n 'nama' => $data->nama_pengguna_jasa , //variabel yg dibawa ke id nama\r\n 'alamat' => $data->alamat, //variabel yang dibawa ke id alamat\r\n 'no_telp' => $data->no_telp, //variabel yang dibawa ke id no telp\r\n 'pengguna'=> $data->pengguna_jasa_id_tarif, //variabel yang dibawa ke id pengguna jasa\r\n );\r\n }\r\n }\r\n\r\n echo json_encode($pelanggan); //data array yang telah kota deklarasikan dibawa menggunakan json\r\n }", "public function aksi_tambah_permohonan_suket013()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t\t'penghasilan' => $this->input->post('penghasilan'),\n\t\t\t'terbilang' => $this->input->post('terbilang'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_penghasilan');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket013/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function getNamaSidang() {\n return CHtml::listData(Sidangmaster::model()->with('iDJenisSidang')->findAll('status=1'), 'IdSidang', 'iDJenisSidang.NamaSidang');\n }", "public function json() {\n\t\t$this->datatables->select('\n\t\t\ttb_jadwal_latihan.id,\n\t\t\ttb_jadwal_latihan.id_pelatih,\n\t\t\ttb_jadwal_latihan.hari,\n\t\t\tCONCAT(tb_jadwal_latihan.jam_mulai,\" s/d \",tb_jadwal_latihan.jam_selesai) as jam,\n\t\t\ttb_pelatih.nama');\n\t\t$this->datatables->from($this->table);\n\t\t$this->datatables->join('tb_pelatih', 'tb_jadwal_latihan.id_pelatih=tb_pelatih.id');\t\t\n\t\t$this->datatables->add_column('view', '<div align=\"center\">\n\t\t\t<a class=\"btn btn-warning btn-rounded btn-sm\" href=\"javascript:void(0)\" title=\"Edit\" onclick=\"edit($1)\"> <span class=\"fa fa-edit\"></span></a>\n\t\t\t<a class=\"btn btn-danger btn-rounded btn-sm\" href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus($1)\" > <span class=\"fa fa-trash\"></span></a>\n\t\t\t</div>', 'id');\n\t\treturn $this->datatables->generate();\n\t}", "public function aksi_tambah_permohonan_suket009()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama_alm' => $this->input->post('nama_alm'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'umur' => $this->input->post('umur'),\n\t\t\t'tempat_kediaman' => $this->input->post('tempat_kediaman'),\n\t\t\t'hari_meninggal' => $this->input->post('hari_meninggal'),\n\t\t\t'tanggal_meninggal' => $this->input->post('tanggal_meninggal'),\n\t\t\t'tempat_meninggal' => $this->input->post('tempat_meninggal'),\n\t\t\t'alasan_meninggal' => $this->input->post('alasan_meninggal'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_kematian');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket009/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function daftarMahasiswa()\n {\n $this->load->model('Model_mahasiswa', 'mahasiswa');\n $data['mahasiswa'] = $this->mahasiswa->getDataMahasiswa();\n echo json_encode($data['mahasiswa']);\n }", "public function aksi_tambah_pengikut_suket012()\n\t{\n\t\t$id_permohonan = $this->input->post('id_permohonan_surat');\n\n\t\t$data_pengikut = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'umur' => $this->input->post('umur'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n\t\t\t'nama_ortu' => $this->input->post('nama_ortu'),\n\t\t\t'status_hub_kk' => $this->input->post('status_hub_kk'),\n\t\t);\n\n\t\t$this->m_warga->aksi_tambah_pengikut($data_pengikut);\n\n\t\t$this->session->set_flashdata('success', 'ditambahkan');\n\t\tredirect('warga/list_pengikut_suket012/' . $id_permohonan);\n\t}", "public function aksi_tambah_permohonan_suket014()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'kewarganegaraan' => $this->input->post('kewarganegaraan'),\n\t\t\t'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'alamat_asal' => $this->input->post('alamat_asal'),\n\t\t\t'no_kk' => $this->input->post('no_kk'),\n\t\t\t'tanggal_kk' => $this->input->post('tanggal_kk'),\n\t\t\t'alamat_pindah' => $this->input->post('alamat_pindah'),\n\t\t\t'kelurahan_pindah' => $this->input->post('kelurahan_pindah'),\n\t\t\t'kecamatan_pindah' => $this->input->post('kecamatan_pindah'),\n\t\t\t'kabupaten_pindah' => $this->input->post('kabupaten_pindah'),\n\t\t\t'provinsi_pindah' => $this->input->post('provinsi_pindah'),\n\t\t\t'tanggal_pindah' => $this->input->post('tanggal_pindah'),\n\t\t\t'alasan_pindah' => $this->input->post('alasan_pindah'),\n\t\t\t'jumlah_pengikut' => $this->input->post('jumlah_pengikut'),\n\t\t);\n\n\t\t$this->m_warga->tambah_suket($data_surat, 'srt_ket_pindah');\n\n\t\tredirect('warga/list_pengikut_suket014/' . $id_permohonan);\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t}", "function tambah_nol($angka,$jumlah)\n\t\t{\n\t\t\t$jumlah_nol=strlen($angka);\n\t\t\t$angka_nol=$jumlah-$jumlah_nol;\n\t\t\t$nol = \"\";\n\t\t\tfor($i=1;$i<=$angka_nol;$i++)\n\t\t\t{\n\t\t\t$nol.='0000';\n\t\t\t}\n\t\t\treturn $nol.$angka;\n\t\t}", "public function aksi_tambah_permohonan_suket011()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nik' => $this->input->post('nik'),\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'golongan_darah' => $this->input->post('golongan_darah'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'no_kk' => $this->input->post('no_kk'),\n\t\t\t'alamat' => $this->input->post('alamat'),\n\t\t\t'rt' => $this->input->post('rt'),\n\t\t\t'kelurahan' => $this->input->post('kelurahan'),\n\t\t\t'kecamatan' => $this->input->post('kecamatan'),\n\t\t\t'tanggal_tinggal' => $this->input->post('tanggal_tinggal'),\n\t\t\t'no_surat_pindah' => $this->input->post('no_surat_pindah'),\n\t\t\t'tanggal_surat_pindah' => $this->input->post('tgl_surat_pindah'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_pengantar_ktp');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket011/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function getKojabStruktural(){\n if(isset($_POST['kolok'])){\n $kolok = $_POST['kolok'];\n }else{\n $return = array('response' => 'GAGAL', 'err' => 'No Kolok');\n echo json_encode($return);\n exit();\n }\n \n $listKojab = $this->infopegawai->getMasterKojab($kolok);\n //var_dump($listKojab);\n $arr = array('response' => 'SUKSES', 'listKojab' => $listKojab);\n echo json_encode($arr);\n }", "public function aksi_tambah_permohonan_suket012()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'kewarganegaraan' => $this->input->post('kewarganegaraan'),\n\t\t\t'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat' => $this->input->post('alamat'),\n\t\t\t'tanggal_tinggal' => $this->input->post('tanggal_tinggal'),\n\t\t\t'kepindahan_dari' => $this->input->post('kepindahan_dari'),\n\t\t\t'nama_ayah' => $this->input->post('nama_ayah'),\n\t\t\t'nama_ibu' => $this->input->post('nama_ibu'),\n\t\t\t'jml_pengikut' => $this->input->post('jml_pengikut'),\n\t\t);\n\n\t\t$this->m_warga->tambah_suket($data_surat, 'srt_pengantar_kk');\n\n\t\tredirect('warga/list_pengikut_suket012/' . $id_permohonan);\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t}", "public function them_nhom_monhoc()\r\n {\r\n $khoa_result=$this->mmonhoc->get_khoa();\r\n $loai_monhoc_result=$this->mmonhoc->get_loai_monhoc();\r\n \r\n $data[\"khoa_result\"]=$khoa_result;\r\n $data[\"loai_monhoc_result\"]=$loai_monhoc_result;\r\n \r\n $data[\"data_title\"]=\"Thao tác thêm nhóm môn học\";\r\n \r\n \r\n $data[\"title\"]=\"Trang thêm nhóm môn học\"; \r\n $this->load->view(\"admin/vmonhoc_nhom_add\",$data); \r\n }", "function berinamateman($teman){\n\t\t$this->nama_teman=$teman;\n\t}", "function nama_packing_barang($data_array){\n $nama = \"$data_array[1]\";\n if ($data_array['0'] == 'Generik'||$data_array[0] == 'Non Generik') {\n $nama.= ( $data_array[2] != 0) ? \" $data_array[2], $data_array[3]\" : \" $data_array[3]\"; //kekuatan dan sediaan\n }\n $nama.= !empty($data_array[4])?\" @$data_array[4]\":''; //satuan\n $nama.= ( $data_array[0] == 'Generik') ? ' ' . $data_array[5] : ''; //pabrik\n\n return $nama;\n}", "public function form_tambah_pejabat_berwenang()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/form_tambah_pejabat_berwenang');\n $this->load->view('footer');\n }", "public function tabel_pengantaran(){\r\n $result = $this->darat->get_tabel_transaksi();\r\n $data = array();\r\n $no = 1;\r\n\r\n if (is_array($result) || is_object($result)){\r\n foreach ($result as $row){\r\n $aksi = \"\";\r\n \r\n if($row->waktu_mulai_pengantaran == NULL){\r\n $aksi = '&nbsp;<a class=\"btn btn-sm btn-info glyphicon glyphicon-road\" href=\"javascript:void(0)\" title=\"Pengantaran\" onclick=\"pengantaran('.\"'\".$row->id_transaksi.\"'\".');\"></a>';\r\n }else if($row->waktu_selesai_pengantaran != NULL){\r\n $aksi = \"\";\r\n }else{\r\n $aksi = '&nbsp;<a class=\"btn btn-sm btn-primary glyphicon glyphicon-ok\" href=\"javascript:void(0)\" title=\"Realisasi\" onclick=\"realisasi('.\"'\".$row->id_transaksi.\"'\".')\"></a>';\r\n }\r\n $format_tgl = date('d-m-Y H:i', strtotime($row->tgl_transaksi ));\r\n $format_tgl_pengantaran = date('d-m-Y H:i', strtotime($row->tgl_perm_pengantaran ));\r\n \r\n if($row->status_delivery == 1){\r\n $status_pengantaran = \"Sudah Diantar\";\r\n }else if($row->waktu_mulai_pengantaran != NULL){\r\n $status_pengantaran = \"Sedang Dalam Pengantaran\";\r\n }else{\r\n $status_pengantaran = \"Belum Diantar\";\r\n }\r\n \r\n if(($row->status_pembayaran == 1 || $row->status_invoice == 1) && $row->status_delivery == 0 && $row->batal_nota == 0 && $row->batal_kwitansi == 0){\r\n $data[] = array(\r\n 'no' => $no,\r\n 'nama' => $row->nama_pemohon,\r\n 'alamat' => $row->alamat,\r\n 'no_telp' => $row->no_telp,\r\n 'tanggal' => $format_tgl,\r\n 'tanggal_permintaan' => $format_tgl_pengantaran,\r\n 'total_pengisian' => $row->total_permintaan,\r\n 'status_pengantaran' => $status_pengantaran,\r\n 'aksi' => $aksi\r\n );\r\n $no++;\r\n }\r\n }\r\n }\r\n \r\n echo json_encode($data);\r\n }", "public function aksi_tambah_permohonan_suket010()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama_anak' => $this->input->post('nama_anak'),\n\t\t\t'hari_lahir' => $this->input->post('hari_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'jam_lahir' => $this->input->post('jam_lahir'),\n\t\t\t'kelahiran' => $this->input->post('kelahiran'),\n\t\t\t'kembar_ke' => $this->input->post('kembar_ke'),\n\t\t\t'tempat_persalinan' => $this->input->post('tempat_persalinan'),\n\t\t\t'alamat_persalinan' => $this->input->post('alamat_persalinan'),\n\t\t\t'penolong_persalinan' => $this->input->post('penolong_persalinan'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'nama_ibu' => $this->input->post('nama_ibu'),\n\t\t\t'tanggal_lahir_ibu' => $this->input->post('tanggal_lahir_ibu'),\n\t\t\t'alamat_ibu' => $this->input->post('alamat_ibu'),\n\t\t\t'umur_ibu' => $this->input->post('umur_ibu'),\n\t\t\t'kewarganegaraan_ibu' => $this->input->post('kewarganegaraan_ibu'),\n\t\t\t'nama_ayah' => $this->input->post('nama_ayah'),\n\t\t\t'tanggal_lahir_ayah' => $this->input->post('tanggal_lahir_ayah'),\n\t\t\t'umur_ayah' => $this->input->post('umur_ayah'),\n\t\t\t'kewarganegaraan_ayah' => $this->input->post('kewarganegaraan_ayah'),\n\t\t\t'no_kk' => $this->input->post('no_kk'),\n\t\t\t'no_ktp' => $this->input->post('no_ktp'),\n\t\t\t'nama_pemohon' => $this->input->post('nama_pemohon'),\n\t\t\t'hubungan_dengan_bayi' => $this->input->post('hubungan_dengan_bayi'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_kelahiran');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket010/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function aksi_tambah_permohonan_suket003()\n\t{\n\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t\t'keperluan' => $this->input->post('keperluan'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_belum_memiliki_rumah');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket003/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function set_pengiriman($id){ // untuk membuat database langkah pengiriman\n\t\t$cek = $this->M_biodata->get_biodata($id)->result();\n\t\t$this->load->model('M_transaksi');\n\t\tif (count($cek)>0){\n\t\t\tforeach ($cek as $c){\n\t\t\t\t\n\t\t\t};\n\t\t\t$data = array(\n\t\t\t'nama' => $c->namaAlumni,\n\t\t\t'alamat' => $c->alamat,\n\t\t\t'noHp' => $c->noHp,\n\t\t\t'id_pemesan' => $c->id_alumni\n\t\t\t);\t\n\t\t\t$this->M_transaksi->set_pengiriman($data,'pengiriman');\n\t\t$this->set_pembayaran($id);\n\t\t}\n\t}", "public function tampil_data(){\n $sql= \"Select * From penjualan Order By id_penjualan DESC\";\n $data=$this->konek->query($sql);\n while ($row=mysqli_fetch_array($data)) {\n $hasil[]=$row;\n }\n return $hasil;\n }", "public function data_judul()\n {\n $data = ['aktif' => 'judul',\n 'data_judul' => $this->M_prospektus->ambil_data_judul()\n ];\n\n $this->template->load('template','prospektus/V_data_judul', $data);\n }", "public function list_data_mantan_pejabat_berwenang()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $data_pejabat['data_pejabat'] = $this->m_admin->get_data_mantan_pejabat()->result();\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/list_data_mantan_pejabat_berwenang', $data_pejabat);\n $this->load->view('footer');\n }", "function dropdown_perusahaan() {\n $result = $this->db->get('tbl_perusahaan');\n\n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $dd[''] = 'Please Select';\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $dd[$row->id_perusahaan] = $row->nama_perusahaan;\n }\n }\n return $dd;\n }", "public function nama_prodi(){\n\t\t$query = \"SELECT * FROM prodi\";//untuk menampilkan nama prodi pada tabel prodi\n\t\t$this->eksekusi($query);//untuk mengeksekusi query diatas\n\t\treturn $this->result;//untuk hasil query diatas\n\t}", "public function list_data_pejabat_berwenang()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $data_pejabat['data_pejabat'] = $this->m_admin->get_data_pejabat()->result();\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/list_data_pejabat_berwenang', $data_pejabat);\n $this->load->view('footer');\n }", "public function jadwalPas($kelas, $pembagianJam, $hari, $id_guru)\n\t{\n\t\techo \"jumlah hari yang tersedia :\" . count($hari) . \"<br>\";\n\t\techo \"<div style='background-color: #DC143C'>Pembagian_jam ($pembagianJam sks) -> </div>\";\n\t\t// echo implode(\", \", $pembagianJam);\n\t\t// foreach ($pembagianJam as $beban_jam) {\n\t\t// echo \"value pembagian : $beban_jam <br>\";\n\t\t$error = 0;\n\t\tforeach ($hari as $valueDataHari) {\n\t\t\t$jumlahHariKosong = 0;\n\t\t\t// echo $kelas;\n\t\t\techo $valueDataHari;\n\t\t\t$dataJadwal = $this->Jadwal_Model->getDataPenjadwalan($kelas, $valueDataHari, $id_guru);\n\t\t\t// echo \"</br>\";\n\t\t\t// print_r($dataJadwal);\n\t\t\t// echo \"</br>\";\n\t\t\t$data = [];\n\t\t\tif ($pembagianJam <= count($dataJadwal)) {\n\t\t\t\tforeach ($dataJadwal as $dataHari) {\n\t\t\t\t\tif ($dataHari->kode_jadwal == '-' && $dataHari->keterangan == 'kosong') {\n\t\t\t\t\t\t$jumlahHariKosong++;\n\t\t\t\t\t\t$data[] = $dataHari->sesi;\n\t\t\t\t\t\tif (count($data) == $pembagianJam) {\n\t\t\t\t\t\t\t$sesi[$valueDataHari][] = $data;\n\t\t\t\t\t\t\t$data = [];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$data = [];\n\t\t\t\t\t\t$jumlahHariKosong = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($jumlahHariKosong == $pembagianJam) {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'status' => 'Press',\n\t\t\t\t\t\t'sesi' => $pembagianBebanJam[$pembagianJam][] = $sesi\n\t\t\t\t\t];\n\t\t\t\t} else if ($jumlahHariKosong > $pembagianJam) {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'status' => 'tidakPress',\n\t\t\t\t\t\t'sesi' => $pembagianBebanJam[$pembagianJam][] = $sesi\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'status' => 'ada sesuatu',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$error++;\n\t\t\t\tif ($error == count($hari)) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'status' => 'tidakMuat'\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// }\n\t\treturn $result;\n\t}", "public function aksi_tambah_permohonan_suket001()\n\t{\n\t\t// $kades = $this->m_warga->cek_kades();\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t// 'id_kades' => $kades['id_kades'],\n\t\t\t'status' => $this->input->post('status'),\n\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat' => $this->input->post('alamat'),\n\t\t\t'nama_usaha' => $this->input->post('nama_usaha'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_usaha');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket001/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function no_faktur(){\n $tahun_sekarang = date('Y');\n $bulan_sekarang = date('m');\n $tahun_terakhir = substr($tahun_sekarang, 2);\n \n //mengecek jumlah karakter dari bulan sekarang\n $cek_jumlah_bulan = strlen($bulan_sekarang);\n\n //jika jumlah karakter dari bulannya sama dengan 1 maka di tambah 0 di depannya\n if ($cek_jumlah_bulan == 1) {\n $data_bulan_terakhir = \"0\".$bulan_sekarang;\n }\n else{\n $data_bulan_terakhir = $bulan_sekarang;\n }\n \n //ambil bulan dan no_faktur dari tanggal penjualan terakhir\n $penjualan = Penjualan::select([DB::raw('MONTH(created_at) bulan'), 'no_faktur'])->orderBy('id','DESC')->first();\n\n if ($penjualan != NULL) {\n $ambil_nomor = substr($penjualan->no_faktur, 0, -8);\n $bulan_akhir = $penjualan->bulan;\n }\n else{\n $ambil_nomor = 1;\n $bulan_akhir = 13;\n }\n \n /*jika bulan terakhir dari penjualan tidak sama dengan bulan sekarang, \n maka nomor nya kembali mulai dari 1, jika tidak maka nomor terakhir ditambah dengan 1\n */\n if ($bulan_akhir != $bulan_sekarang) {\n $no_faktur = \"1/IM/\".$data_bulan_terakhir.\"/\".$tahun_terakhir;\n }\n else {\n $nomor = 1 + $ambil_nomor ;\n $no_faktur = $nomor.\"/IM/\".$data_bulan_terakhir.\"/\".$tahun_terakhir;\n }\n\n return $no_faktur;\n //PROSES MEMBUAT NO. FAKTUR ITEM MASUK\n }", "public function tambah(){\n\t\t//$data['grup'] = $this->sinisa_model->getgrup()->result();\n\t\t//$data['user'] = $this->sinisa_model->getAll()->result();\n\t\t$this->load->view('crud/pengajuan_view');\n\t}", "public function print_suratKeterangan() {\n $status = FALSE;\n $msg = 'Proses buka hasil...';\n\n $noSurat = $this->input->post('no_surat');\n\n $getPrint = $this->data_pengajuan->get_print($noSurat);\n foreach($getPrint as $p) {\n $formPengajuan = $p->form_pengajuan;\n }\n\n if (empty($noSurat)) {\n $status = FALSE;\n $msg = 'Nomor surat tidak ada!';\n } else if(empty($formPengajuan)) {\n $status = FALSE;\n $msg = 'Data surat error!';\n } else {\n if($this->session->userdata('logged_in') == false) {\n $status = FALSE;\n $msg = 'Anda belum masuk akun!';\n } else {\n $status = TRUE;\n $msg = 'Proses lihat surat berhasil buka';\n }\n\n if ($this->session->userdata('staff_desa_in')){\n $status = TRUE;\n $msg = 'Proses lihat surat berhasil buka';\n }\n \n }\n\n echo json_encode(array('dataForm' => $formPengajuan, 'status' => $status, 'message' => $msg));\n\n // $enc = json_encode($formPengajuan);\n // $rjson = str_replace(array(\"\\t\",\"\\n\"), \"\", $enc);\n // $xjson = json_decode($rjson); \n }", "function dropdown_ijin() {\n $result = $this->db->get('tbl_ijin');\n\n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $dd[''] = 'Please Select';\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $dd[$row->id_ijin] = $row->nomor . \"/KODE KANTOR/\" . $row->id_seksi . \"/\" . $row->tahun;\n }\n }\n return $dd;\n }", "function fieldCek()\n {\n $f = array(\n 'noinduk'=>'Nomor Induk' \n );\n return $f;\n }", "public function getMahasiswa() {\n return CHtml::listData(Mahasiswa::model()->findAll(), 'NIM', 'Nama');\n }", "public function jadwalTambah()\n { \n $pelatih = Pelatih::query()\n ->select('id','namaPelatih')\n ->get(); \n\n return view('admin-views.jadwal-tambah', ['pelatih'=>$pelatih]);\n }", "public function cek_jenis_hak()\n\t{\n\t\t$output['status'] = ($this->input->get('hak')==5) ? true : false;\n\t\t$this->output->set_content_type('application/json')->set_output(json_encode($output));\n\t}", "public function daftar_nama_side_unit(){\n\t\t/*return $w = $this->db->query(\"select * from unit WHERE kode_unit='\".$this->get_session_unit().\"' AND kode_bahasa='\".$this->lang.\"' \")->result();*/\n\t\t//$query = \"SELECT * from unit WHERE kode_unit='67' AND kode_bahasa='id'\";\n\t\t$query = \"SELECT * FROM unit WHERE kode_unit = '\".$this->get_session_unit().\"' AND kode_bahasa = '\".$this->lang.\"'\";\n\t\t$sql = $this->db->query($query);\n\t\treturn $sql->row_array();\n\t}", "public function simpan_data_misi()\n {\n $aksi = $this->input->post('aksi');\n $id_misi = $this->input->post('id_misi');\n $misi = $this->input->post('nama_misi');\n\n $data = ['misi' => $misi,\n 'add_time' => date(\"Y-m-d H:i:s\", now('Asia/Jakarta')),\n 'add_by' => $this->session->userdata('id_user')\n ];\n\n if ($aksi == 'Tambah') {\n $this->M_master->input_data('m_misi', $data);\n } elseif ($aksi == 'Ubah') {\n $this->M_master->ubah_data('m_misi', $data, array('id_misi' => $id_misi));\n } elseif ($aksi == 'Hapus') {\n $this->M_master->hapus_data('m_misi', array('id_misi' => $id_misi));\n }\n\n echo json_encode($aksi);\n }", "function jabatan_data()\n\t{\t\t\n\t\t$data['j'] = $this->M_master->data_jabatan();\t\n\t\t$data['title'] = 'Data Jabatan';\t\t\n\t\t$data['isi'] = 'contents/jabatan_data';\n\t\t$this->load->view('wrapper', $data);\n\t}", "public function jml_laporan()\n {\n $this->db->select('id_pengaduan, COUNT(id_pengaduan) as total_laporan');\n $this->db->from('aduan_layanan');\n $this->db->where('id_kepala', null);\n\n $hasil = $this->db->get();\n return $hasil;\n }", "function getKelas(){\n\t$query = $this->db->get('kelas'); //KET: mengambil seluruh data pada tabel kelas\n\t\tif ($query->num_rows >= 1){\n\t\t\tforeach($query->result_array() as $row){\n\t\t\t$data[$row['ID_kelas']] = $row['nama_kelas']; \n\t\t\t} return $data;\n\t\t}\n\t}", "public function run()\n {\n $jawaban_soal_ujians = [\n [ \n\t\t\t'jawaban'\t\t=> '3500',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '1',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> '2500',\n\t\t\t'is_benar'\t\t=> '1',\t\t\t\n\t\t\t'poin'\t\t=> '10',\n\t\t\t'id_soal'\t\t=> '1',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> '8900',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '1',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> '250',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '1',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> 'Mensyukuri',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '2',\t\t\t\n\t\t], \n\t\t[ \n\t\t\t'jawaban'\t\t=> 'Menyukai',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '2',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> 'Membenci',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '2',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> 'Menyayangi',\n\t\t\t'is_benar'\t\t=> '1',\t\t\t\n\t\t\t'poin'\t\t=> '10',\n\t\t\t'id_soal'\t\t=> '2',\t\t\t\n\t\t],\t\n\t\t]; \n\n\t\tDB::table('jawaban_soal_ujians')->insert($jawaban_soal_ujians);\n }", "public function aksi_tambah_permohonan_suket006()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_belum_pernah_menikah');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket006/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function aksi_tambah_permohonan_suket002()\n\t{\n\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t\t'alamat_kk' => $this->input->post('alamat_kk'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_domisili');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket002/' . $id_surat . '/' . $id_permohonan);\n\t}", "function tambah_mk($SKSMK){\r\n\t\t\t// Format seperti di bawah ini secara otomatis akan\r\n\t\t\t// menambahkan data atau nilai baru ke dalam array\r\n\t\t\t// pada indeks paling belakang.\r\n\t\t\t// Jadi apabila sudah ada 5 data pada array tsb,\r\n\t\t\t// maka data baru akan disimpan pada posisi ke-6.\r\n\t\t\t$this->NamaMataKuliah[] = $SKSMK;\r\n\t\t}", "function tgl_jam_indo_no_hari($date=null){\n $array_hari = array(1=>'Senin','Selasa','Rabu','Kamis','Jumat', 'Sabtu','Minggu');\n //buat array nama bulan dalam bahasa Indonesia dengan urutan 1-12\n $array_bulan = array(1=>'Januari','Februari','Maret', 'April', 'Mei', 'Juni','Juli','Agustus',\n 'September','Oktober', 'November','Desember');\n if($date == null) {\n //jika $date kosong, makan tanggal yang diformat adalah tanggal hari ini\n $hari = $array_hari[date('N')];\n $tanggal = date ('d');\n $bulan = $array_bulan[date('n')];\n $tahun = date('Y');\n $jam = date('H:i:s');\n } else {\n //jika $date diisi, makan tanggal yang diformat adalah tanggal tersebut\n $date = strtotime($date);\n $hari = $array_hari[date('N',$date)];\n $tanggal = date ('d', $date);\n $bulan = $array_bulan[date('n',$date)];\n $tahun = date('Y',$date);\n $jam = date('H:i:s',$date);\n }\n $formatTanggal = $tanggal .\" \". $bulan .\" \". $tahun .\" Jam \". $jam;\n return $formatTanggal;\n }", "function _is_pejabat_penunjang_nt(){\n\t\t$CI \t\t=& get_instance();\n\t\t$kd \t\t= $CI->session->userdata('kd_dosen');\n\t\t$tgl \t\t= date('d-m-Y');\n\t\t$api_url \t= URL_API_SIMPEG1.'simpeg_mix/data_search';\n\t\t$parameter = array('api_kode' =>1121, 'api_subkode' => 3, 'api_search' => array($tgl, $kd, 1));\n\t\t$data = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t//print_r ($data);\n\t\t$value = array();\n\t\t//echo $data[count($data)-1]->STR_NAMA;\n\t\tif(!empty($data)){\n\t\t\t//$kd_jab \t= $data[count($data)-1]->STR_ID;\n\t\t\t//ini harusnya yang aktif, bukan yang index 0 ; \n\t\t\tforeach ($data as $d) {\n\t\t\t\t$kd_jab \t= $d->STR_ID;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/jabatan';\n\t\t\t\t$parameter = array('api_kode' =>20000, 'api_subkode' => 1, 'api_search' => array($kd_jab));\n\t\t\t\t$data2 = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif(!empty($data2)){\n\t\t\t\t\t//$value['nama_jabatan'] = $data[count($data)-1]->STR_NAMA;\n\t\t\t\t\t$value['nama_jabatan'] = $d->STR_NAMA;\n\t\t\t\t\t$value['sks_maks'] = $this->_get_sks_max($d->STR_ID);//$data2[0]->SKS_MAX;\n\t\t\t\t\t$value['bukti_penugasan'] = 'Surat Keputusan';\n\t\t\t\t\t$value['masa_penugasan'] = '1 Tahun';\n\t\t\t\t\t$value['tgl_mulai'] = $d->RR_TANGGAL_MULAI_F;\n\t\t\t\t\t$value['tgl_selesai'] = $d->RR_TANGGAL_AKHIR_F;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $value;\n\t\t#return $data;\n\t\t\n\t}", "public function dropdown_jabatan()\n {\n //Query untuk mengambil data jabatan dan diurutkan berdasarkan nama jabatan\n $sql = \"SELECT * FROM jabatan ORDER BY nama_jabatan\";\n $query = $this->db->query($sql);\n\n //Value default pada dropdown\n $value[''] = '-- CHOOSE --';\n //Menaruh data jabatan ke dalam dropdown, value yang akan diambil adalah value id_jabatan\n foreach ($query->result() as $row) {\n $value[$row->id_jabatan] = $row->nama_jabatan;\n }\n return $value;\n }", "public function aksi_tambah_permohonan_suket005()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'alamat' => $this->input->post('alamat'),\n\t\t\t'nama_kegiatan' => $this->input->post('nama_kegiatan'),\n\t\t\t'hari_kegiatan' => $this->input->post('hari_kegiatan'),\n\t\t\t'tanggal_kegiatan' => $this->input->post('tanggal_kegiatan'),\n\t\t\t'jam' => $this->input->post('jam'),\n\t\t\t'tempat' => $this->input->post('tempat'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_izin_keramaian');\n\t\tif ($_FILES != null) {\n\t\t\t$this->aksi_upload_lampiran_suket005($id_surat);\n\t\t}\n\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket005/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function actionGetDataKunjungan()\n {\n if(Yii::app()->request->isAjaxRequest) {\n $format = new MyFormatter();\n $returnVal = array();\n $model = BSInfokunjunganrjrdriV::model()->findByAttributes(array('pasienkirimkeunitlain_id'=>$_POST['pasienkirimkeunitlain_id']));\n $attributes = $model->attributeNames();\n foreach($attributes as $j=>$attribute) {\n $returnVal[\"$attribute\"] = $model->$attribute;\n }\n $returnVal[\"tanggal_lahir\"] = $format->formatDateTimeForUser($model->tanggal_lahir);\n $returnVal[\"tgl_pendaftaran\"] = $format->formatDateTimeForUser($model->tgl_pendaftaran);\n $returnVal[\"namalengkapdokter\"] = $model->gelardepan.\" \".$model->nama_pegawai.\" \".$model->gelarbelakang_nama;\n echo CJSON::encode($returnVal);\n }\n Yii::app()->end();\n }", "public function dataMahasiswa()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('tb_mahasiswa');\n\t\t$this->db->order_by('nim', 'asc');\n\t\t$data = $this->db->get('');\n\t\treturn $data;\n\t}", "public function kirimbarang(){\n\t\t$no_order \t= $this->input->post('no_order');\n\t\t$ket \t= $this->input->post('ket');\n\t\tif ($ket == 'Modifikasi') {\n\t\t\t$get = $this->M_monitoringorder->getdatamodif(\"where no_order = '$no_order'\");\n\t\t}elseif ($ket == 'Baru') {\n\t\t\t$get = $this->M_monitoringorder->getdatabaru(\"where no_order = '$no_order'\");\n\t\t}else {\n\t\t\t$get = $this->M_monitoringorder->getdatarekondisi(\"where no_order = '$no_order'\");\n\t\t}\n\t\t// echo \"<pre>\";print_r($get);exit();\n\t\t$cek \t\t= $this->M_monitoringorder->cekaction($no_order, \"and person = 10\"); // status 10 = barang sudah selesai / akan kirim ke seksi pengorder\n\t\tif (empty($cek)) {\n\t\t\t$this->M_monitoringorder->saveaction($no_order, 10, 1, '', date('Y-m-d H:i:s'), $this->session->user);\n\t\t}else {\n\t\t\t$this->M_monitoringorder->updateaction($no_order, 10, 1, '', date('Y-m-d H:i:s'), $this->session->user);\n\t\t}\n\t\tif (stripos($get[0]['jenis'], 'FIXTURE') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,7);\n\t\t}elseif (stripos($get[0]['jenis'], 'MASTER') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,6);\n\t\t}elseif (stripos($get[0]['jenis'], 'GAUGE') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,5);\n\t\t}elseif (stripos($get[0]['jenis'], 'ALAT LAIN') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,9);\n\t\t}else {\n\t\t\t$jenis = $get[0]['jenis'];\n\t\t}\n\t\t$this->send_email_kirim($get[0]['pengorder'], $get[0]['no_order'], $get[0]['seksi'], $jenis);\n\t\tredirect(base_url('OrderToolMakingAdminPPC/MonitoringOrder/'));\n\t}", "public function informasi()\n {\n //Query untuk mengambil semua data informasi yang diuurutkan berdasarkan tanggal\n $query = $this->db->query(\"SELECT A.tanggal, A.subject, A.pesan, A.id_informasi, C.nama FROM informasi A \n LEFT JOIN karyawan C ON C.nik = A.id_user\n ORDER BY A.tanggal DESC\");\n return $query;\n }", "public function getInfoLengkap(){\n $str = \"{$this->tipe} : {$this->judul} | {$this->getLable()} (Rp. {$this->harga}\";\n if($this->tipe == \"Komik\"){\n $str .= \" - ($this->jmlHalaman) Halaman.\";\n }elseif ($this->tipe == \"Game\"){\n $str .= \" ~ ($this->waktuMain) Jam.\";\n }\n return $str;\n }", "public function aksi_tambah_permohonan_suket008()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama_istri' => $this->input->post('nama_istri'),\n\t\t\t'tempat_lahir_istri' => $this->input->post('tempat_lahir_istri'),\n\t\t\t'tanggal_lahir_istri' => $this->input->post('tanggal_lahir_istri'),\n\t\t\t'pekerjaan_istri' => $this->input->post('pekerjaan_istri'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t\t'nama_suami' => $this->input->post('nama_suami'),\n\t\t\t'tempat_lahir_suami' => $this->input->post('tempat_lahir_suami'),\n\t\t\t'tanggal_lahir_suami' => $this->input->post('tanggal_lahir_suami'),\n\t\t\t'pekerjaan_suami' => $this->input->post('pekerjaan_suami'),\n\t\t\t'alasan' => $this->input->post('alasan'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_janda');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket008/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function displaymahasiswa()\r\n {\r\n $query = \"select * from data_mahasiswa\";\r\n return $this->db->query($query);\r\n }", "public function actionGetDataKunjungan()\n\t{\n\t\tif(Yii::app()->request->isAjaxRequest) {\n\t\t\t$format = new MyFormatter();\n\t\t\t$returnVal = array();\n\t\t\t$model = ROPasienKirimKeUnitLainV::model()->findByAttributes(array('pasienkirimkeunitlain_id'=>$_POST['pasienkirimkeunitlain_id']));\n\t\t\t$attributes = $model->attributeNames();\n\t\t\tforeach($attributes as $j=>$attribute) {\n\t\t\t\t$returnVal[\"$attribute\"] = $model->$attribute;\n\t\t\t}\n\t\t\t$returnVal[\"tanggal_lahir\"] = $format->formatDateTimeForUser($model->tanggal_lahir);\n\t\t\t$returnVal[\"tgl_pendaftaran\"] = $format->formatDateTimeForUser($model->tgl_pendaftaran);\n\t\t\t$returnVal[\"namalengkapdokter\"] = $model->gelardepan.\" \".$model->nama_pegawai.\" \".$model->gelarbelakang_nama;\n\t\t\techo CJSON::encode($returnVal);\n\t\t}\n\t\tYii::app()->end();\n\t}", "public function aksi_tambah_permohonan_suket007()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t\t'keperluan' => $this->input->post('keperluan'),\n\t\t);\n\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_tidak_mampu');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket007/' . $id_surat . '/' . $id_permohonan);\n\t}", "function _dispen_hari(){\n\t\t$CI =& get_instance();\n\t\t$api_url \t= URL_API_SIA.'sia_sistem/data_view';\n\t\t$parameter = array('api_kode' =>200002, 'api_subkode' => 1, 'api_search' => array());\n\t\t$data \t\t= $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\treturn $data[0]->KADALUWARSA_HARI1;\n\t}", "public function jabatan()\n {\n //Query untuk mengambil semua data jabatan dan diurutkan berdasarkan nama_jabatan\n $query = $this->db->query(\"SELECT * FROM jabatan ORDER BY nama_jabatan\");\n return $query;\n }", "public function tambah_data($no_meja)\n {\n $waktu_penjualan=Date(\"Y-m-d H:i:s\");\n $sql= \"INSERT INTO `penjualan` (no_meja,waktu_penjualan) VALUES ('$no_meja','$waktu_penjualan')\";\n $insert=$this->konek->query($sql);\n $id_penjualan=$this->konek->insert_id;\n if($insert){\n $status= \"Berhasil Menambahkan Data\";\n }else{\n $status=\"Gagal Menambahkan Data\".$sql;\n }\n return $id_penjualan;\n }", "function json($id_kelas) {\n $this->datatables->select('id_siswa,t_siswa.id_pendaftaran,nis,t_siswa.id_kelas,t_siswa.nisn,t_siswa.nama_siswa,t_ppdb.alamat,t_ppdb.tempat_lahir,t_ppdb.tanggal_lahir,t_siswa.status_aktif');\n $this->datatables->from('t_siswa');\n //add this line for join\n $this->datatables->join('t_ppdb', 't_siswa.id_pendaftaran = t_ppdb.id_pendaftaran');\n $this->datatables->join('t_kelas', 't_siswa.id_kelas = t_kelas.id_kelas');\n $this->datatables->where('t_siswa.id_kelas',$id_kelas);\n $this->datatables->add_column('action', anchor(site_url('datarombel/pindah_kelas/$1'),'<i class=\"fa fa-eye\" aria-hidden=\"true\"> Assign Kelas</i>', 'class=\"btn btn-danger btn-sm\" onclick=\"javasciprt: return confirm(\\'Are You Sure ? \\')\"'),'id_siswa');\n return $this->datatables->generate();\n }", "public function form_tambah_rt()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/form_cari_nik_warga');\n $this->load->view('footer');\n }", "function tampil_data()\n\t{\n\t\t# perintah join digunakan untuk menggabungkan 2 table, yaitu penduduk dan kematian, agar data yang tampil lebih detail, karena pada tabel kematian hanya terdapat sedikit kolom, sehingga dengan menambah kolom nik, maka data yang ada di tabel penduduk juga otomatis terdeteksi karena perintah join, dengan aturan, nik harus sama antara tabel kematian dan nik yang ada di penduduk.\n\t\treturn $this->db->query(\"SELECT*FROM `kematian` left join penduduk on kematian.nik = penduduk.nik\")->result();\n\t}", "public function CariPembahasan()\n\t{\n\t\t$ambil_akun1 = $this->Wali_Kelas_model->ambil_user($this->session->userdata('uname'));\n\t\t$ambil_status = $this->Wali_Kelas_model->ambil_status($this->session->userdata('kode'));\n\t\t$ambil_bahas = $this->Wali_Kelas_model->ambil_bahas($this->input->get('bahas'));\n\t\t$ambil_bahas_awal = $this->Wali_Kelas_model->ambil_bahas_awal($this->input->get('bahas'));\n\t\t$ambil_bahas_akhir = $this->Wali_Kelas_model->ambil_bahas_akhir($this->input->get('bahas'));\n\t\t$data = array(\n\t\t\t'user1' => $ambil_akun1,\n\t\t\t'status' => $ambil_status,\n\t\t\t'bahas' => $ambil_bahas,\n\t\t\t'bahas_awal' => $ambil_bahas_awal,\n\t\t\t'bahas_akhir' => $ambil_bahas_akhir\n\t\t);\n\t\t$data['jumlah']=$this->Wali_Kelas_model->ambil_jumlah($this->session->userdata('uname'));\n\t\t$data['notifInformasi']=$this->Wali_Kelas_model->notifInformasi_Wali();\n\t\t$data['ListNotifInformasi']=$this->Wali_Kelas_model->ListNotifInformasi_Wali();\n\t\t$data['notif'] = $this->Wali_Kelas_model->notifikasiPesan();\n\t\t$data['LihatNotifRespon']=$this->Wali_Kelas_model->LihatNotifRespon_Wali();\n\t\t$data['notifPesan'] = $this->Wali_Kelas_model->notifPesan_Wali();\n\t\t$data['ListnotifPesan'] = $this->Wali_Kelas_model->ListNotifPesan_Wali();\n\t\t$data['jumlahOrtu'] = $this->Wali_Kelas_model->getJumlahOrangtua();\n\t\t$data['jumlahBahas'] = $this->Wali_Kelas_model->getAllTanggapan_LJumlah($this->input->get('bahas'));\n\t\t$data['ListPembahasan'] = $this->Wali_Kelas_model->getAllPembahasan_Laporan();\n\t\t$this->load->view('W_DetailLaporan',$data);\n\t}", "public function karyawan(){\n $this->setActualJadwal(TRUE);\n $this->load->model('jadwal_detail_model', 'jdm');\n $periodeTerpilih = $this->input->post('periode');\n if(empty($periodeTerpilih)){\n $tanggalTerpilih = date('Y-m-d');\n }else{\n $tanggalTerpilih = date($periodeTerpilih.'-01');\n }\n \n $idJadwal = $this->jdm->fields(['jadwal_id'])->get_by(['nik' => $this->getNIK(), 'tanggalabsensi' => $tanggalTerpilih]);\n if(!empty($idJadwal)){\n $this->load->model('User_model', 'um');\n $_POST['key'] = ['id' => $idJadwal->jadwal_id];\n $bawahan = $this->getBawahan();\n $nikBawahan = array_column($this->um->as_array()->fields('ref_nik')->get_many(array_keys($bawahan)),'ref_nik');\n $this->setFilterNik($nikBawahan);\n $this->setMarkToday(TRUE);\n $this->edit();\n }else{\n echo 'Data jadwal tidak ditemukan untuk tanggal '.tglIndonesia($tanggalTerpilih);\n }\n }", "public function homepage_kemas() {\n \t\t$this->db->select('bahan_terima.Nomor_LPB, bahan_terima.Tanggal_Terima, jenis_bahan.Kode_Bahan, bahan_terima.Nama_Supplier, bahan_terima.Nama_Manufacturer, jenis_bahan.Satuan, bahan_terima.Status');\n \t\t$this->db->from('bahan_terima');\n \t\t$this->db->join('jenis_bahan', 'bahan_terima.ID_Bahan = jenis_bahan.ID_Bahan', 'inner');\n \t\t$this->db->order_by('Tanggal_Terima desc, Nomor_LPB desc');\n \t\t$this->db->where(\"jenis_bahan.Jenis\", \"Kemas\");\n \t\t\n \t\t$o_lpb_rows = $this->db->get()->result();\n \t\t\n \t\t$this->ubah_format_tanggal($o_lpb_rows);\n\t\n \t\treturn $o_lpb_rows;\n \t}", "public function actionBatalkanPresensi(){\n Yii::$app->response->format = Response::FORMAT_JSON;\n $response = null;\n\n if (Yii::$app->request->isPost){\n $data = Yii::$app->request->post();\n\n $id_presensi = $data['id_presensi'];\n $nim = $data['nim'];\n\n $model = PresensiDetail::find()\n ->where(['id_presensi' => $id_presensi])\n ->andWhere(['nim' => $nim])\n ->one();\n\n $model->status = \"Tidak Hadir\";\n $model->update(false);\n\n $response['code'] = \"200\";\n $response['status'] = \"OK\";\n $response['message'] = \"Presensi \".$model->nim0->nama.\" berhasil dibatalkan\";\n }\n\n return $response;\n }", "function get_idcabang()\n {\n $this->db->order_by('CB_ID', 'asc');\n $result = $this->db->get('tb_cabang');\n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $data[''] = 'Please Select';\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $data[$row->CB_ID] = $row->CB_NAMA;\n }\n }\n return $data;\n\t}", "public function themmh($loai=\"\")\r\n {\r\n $khoa_result=$this->mmonhoc->get_khoa();\r\n $loai_monhoc_result=$this->mmonhoc->get_loai_monhoc();\r\n $nhom_monhoc_result=$this->mmonhoc->get_ma_monhoc_nhom();\r\n $data[\"khoa_result\"]=$khoa_result;\r\n $data[\"loai_monhoc_result\"]=$loai_monhoc_result;\r\n $data[\"nhom_monhoc_result\"]=$nhom_monhoc_result;\r\n $data[\"loai\"]=$loai; \r\n \r\n \r\n $data[\"data_title\"]=\"Thao tác thêm môn học\";\r\n \r\n \r\n $data[\"title\"]=\"Trang thêm môn học\"; \r\n $this->load->view(\"admin/vmonhoc_add\",$data); \r\n }", "function auto_menguji_ta(){\n\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\n\t\t\t\t$data = $this->get_current_ujian_ta(2); //mengambil data menguji tugas akhir pada semester ini (2)\n\n\t\t\t\tforeach ($data as $ta) {\n\t\t\t\t\t$cek_nilai_mhs = $this->get_status_ta($ta['NIM']);\n\t\t\t\t\tif($cek_nilai_mhs){\n\t\t\t\t\t\t$nim = $ta['NIM'];\n\t\t\t\t\t\t$judul_ta = $ta['JUDUL'];\n\t\t\t\t\t\t$kd_kur_mhs = $this->kurikulum_mahasiswa($nim);\n\t\t\t\t\t\t$temp = $this->get_data_mhs($nim);\n\t\t\t\t\t\t$jenjang = $temp[0]['NM_JENJANG'];\n\t\t\t\t\t\t$prodi = $temp[0]['NM_PRODI'];\n\t\t\t\t\t\t$prodi = str_replace(\"'\", \"\", $prodi);\n\t\t\t\t\t\t$prodi = strip_tags($prodi);\n\n\t\t\t\t\t\t$list_mk = $this->api->get_api_json(\n\t\t\t\t\t\t\tURL_API_SIA.'sia_kurikulum/data_search',\n\t\t\t\t\t\t\t'POST',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'api_kode'=>40000,\n\t\t\t\t\t\t\t\t'api_subkode' => 15,\n\t\t\t\t\t\t\t\t'api_search' => array($kd_kur_mhs)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tforeach ($list_mk as $mk) {\n\t\t\t\t\t\t\t$get_makul = strtoupper($mk['NM_MK']);\n\t\t\t\t\t\t\t$get_jenjang = strtoupper($mk['NM_PEND']);\n\t\t\t\t\t\t\tif($get_jenjang == \"S0\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"TUGAS AKHIR\" || $get_makul == \"SKRIPSI\" || $get_makul == \"TUGAS AKHIR/SKRIPSI\" || $get_makul == \"SKRIPSI/TUGAS AKHIR\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($get_jenjang == \"S1\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"TUGAS AKHIR\" || $get_makul == \"SKRIPSI\" || $get_makul == \"TUGAS AKHIR/SKRIPSI\" || $get_makul == \"SKRIPSI/TUGAS AKHIR\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($get_jenjang==\"S2\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"TESIS\" || $get_makul == \"TESIS/TUGAS AKHIR\" || $get_makul == \"TUGAS AKHIR/TESIS\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($get_jenjang==\"S3\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"DISERTASI\" || $get_makul == \"DISERTASI/TUGAS AKHIR\" || $get_makul == \"TUGAS AKHIR/DISERTASI\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\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\n\t\t\t\t\t\t//BUAT NARASI + INPUT DATA KE DB + ADA CEK DUPLUKASI DATA :\n\n\t\t\t\t\t\t$narasi = \"Menguji Tugas Akhir \".$jenjang.\", Program Studi \".$prodi.\", Judul \".$judul_ta.\", \".$jml_sks.\" SKS\";\n\t\t\t\t\t\t$narasi = str_replace(\"'\", \"\", $narasi);\n\t\t\t\t\t\t$narasi = strip_tags($narasi);\n\t\t\t\t\t\t//$narasi = str_replace(\",\", \"\", $narasi);\n\t\t\t\t\t\t//$sks_rule = round($this->aturan_beban_sks2(strtoupper($jenjang), $jml_sks, 1, 'TUGAS_AKHIR'),2);\n\t\t\t\t\t\t$jml_mhs = 1;\n\n\t\t\t\t\t\t//ATURAN SKS_RULE UNTUK MENGUJI TA\n\t\t\t\t\t\t$kd_kat = '74'; //4 untuk menguji (sebagai ketua dan anggota)\n\t\t\t\t\t\tif($jenjang == 'S0'){\n\t\t\t\t\t\t\t//sks_rule sementara untuk menguji TA S0 \n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 2);\n\t\t\t\t\t\t\t$kd_kat = '74';\n\t\t\t\t\t\t}elseif($jenjang == 'S1'){\n\t\t\t\t\t\t\t//sks_rule sementara untuk menguji TA S0 \n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 2);\n\t\t\t\t\t\t\t$kd_kat = '74';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($jenjang == 'S2'){\n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 3);\n\t\t\t\t\t\t\t$kd_kat = '74'; //74 untuk menguji sebagai anggota\n\t\t\t\t\t\t}elseif($jenjang == 'S3'){\n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 4);\n\t\t\t\t\t\t\t$kd_kat = '74'; //74 untuk menguji sebagai anggota\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\t\t\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\n\t\t\t\t\t\t// $kd_jbk = 'A';\n\t\t\t\t\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\t\t\t\t$jenis_kegiatan = $narasi;\n\t\t\t\t\t\t/*$jenis_kegiatan ='test';*/\n\t\t\t\t\t\t$bukti_penugasan = '-';\n\t\t\t\t\t\t// $sks_penugasan = $sks_rule;\n\t\t\t\t\t\t$masa_penugasan = '1 Semester';\n\t\t\t\t\t\t$bkt_dokumen = '-';\n\t\t\t\t\t\t$kd_jbk \t\t= 'A';\n\t\t\t\t\t\t$bkt_penugasan \t= '-';\n\t\t\t\t\t\t$bkt_dokumen \t= '-';\n\t\t\t\t\t\t$rekomendasi \t= 'LANJUTKAN';\n\t\t\t\t\t\t$capaian \t\t= 100;\n\t\t\t\t\t\t$jml_jam \t\t= 1;\n\t\t\t\t\t\t$outcome \t\t= '-';\n\t\t\t\t\t\t$file_penugasan = '-';\n\t\t\t\t\t\t$file_capaian \t= '-';\n\t\t\t\t\t\t// $sks_bkt = $sks_rule;\n\t\t\t\t\t\t$thn = $this->session->userdata('ta');\n\t\t\t\t\t\tif($smt == 2) $semester = 'GENAP'; else $semester = 'GANJIL';\n\n\n\n\t\t\t\t\t\t//cek kemana data akan pergi :)\n\t\t\t\t\t\t$kewajiban_serdos = $this->cek_kewajiban_serdos($kd_dosen);\n\n\t\t\t\t\t\t$status_pindah = $this->get_status_pindah($kd_kat);\n\n\t\t\t\t\t\t$jalur_data = 0;\n\t\t\t\t\t\tif($status_pindah == 0){\n\t\t\t\t\t\t\t$jalur_data = $this->cek_jalur_data_kat($kd_kat);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$sts_pakai = 1;\n\t\t\t\t\t\tif($status_pindah == 0){\n\t\t\t\t\t\t\tif($kewajiban_serdos == 0){\n\t\t\t\t\t\t\t\t$sts_pakai = 0;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tif($jalur_data != 0){\n\t\t\t\t\t\t\t\t\t$sts_pakai = 0;\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\n\n\t\t\t\t\t\t//cek apakah sudah ada data atau belum ?\n\t\t\t\t\t\t $cek_mhs_bimbingan = $this->cek_api_mhs_ujian($nim);\n\n\t\t\t\t\t\t //cek nilai mahasiswa ta sudah ada apa belum :\n\t\t\t\t\t\t //$cek_nilai_mhs = $this->get_status_ta($nim);\n\t\t\t\t\t\t $cek_mhs_ujian_ta = $this->cek_api_data_pendidikan($kd_dosen, $ta, $smt, $kd_kat, $nim);\n\t\t\t\t\t\t $cek_status_ketua_ta = $this->cek_api_data_pendidikan($kd_dosen, $ta, $smt, '73', $nim);\n\t\t\t\t\t\t \n\t\t\t\t\t\t//if(!$cek_mhs_bimbingan){\n\t\t\t\t\t\tif(!$cek_mhs_ujian_ta && !$cek_status_ketua_ta){\n\n\t\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia_ta_maps';\n\t\t\t\t\t\t\t$parameter = array('api_search'=>array($kd_jbk, $kd_dosen, $jenis_kegiatan, $bkt_penugasan, $sks_rule, $masa_penugasan, $bkt_dokumen, $sks_rule, $thn, $semester, $rekomendasi, $jml_jam, $capaian, $outcome, $file_penugasan, $file_capaian, $ta, $smt, $sts_pakai));\n\t\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\t\tif($simpan){\n\n\t\t\t\t\t\t\t\t$getid = $simpan;\n\t\t\t\t\t\t\t\t$nm_keg = $jenis_kegiatan;\n\n\t\t\t\t\t\t\t\t$status_pindah = $this->get_status_pindah($kd_kat);\n\n\t\t\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pendidikan_ta';\n\t\t\t\t\t\t\t\t$parameter\t= array('api_search' => array($getid, $kd_kat, $nm_keg, $jenjang, '-', '1', $jml_sks, '1', '1', 'A', '1', $prodi, $nim, $status_pindah));\n\t\t\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t\t\t\t//echo 'simpan ke data pendidikan sukses'; echo '<br>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t}", "public function tambah()\n {\n $row_id = $this->M_isipaket->getId()->num_rows();\n // mengambil 1 baris data terakhir\n $old_id = $this->M_isipaket->getId()->row();\n\n if($row_id>0){\n // melakukan auto number dari id terakhir\n $id = $this->primslib->autonumber($old_id->id_isi_paket, 3, 12);\n }else{\n // generate id pertama kali jika tidak ada data sama sekali di dalam database\n $id = 'IPT000000000001';\n }\n\n $created_by = \"admin\";\n $created_at = date('Y-m-d H:i:s');\n \n\n // merekam data yang dikirim melalui form\n $data = array(\n 'id_isi_paket' => $id,\n 'nama_isi_paket' => $this->input->post('nama_isi_paket'),\n 'keterangan' => $this->input->post('keterangan', true),\n 'status' => $this->input->post('status'),\n 'created_by' => $created_by,\n 'created_at' => $created_at\n );\n\n // menjalankan fungsi insert pada model_promo untuk menambah data ke database\n $this->M_isipaket->insert($data, 'isi_paket');\n // mengirim pesan berhasil dihapus\n $this->session->set_flashdata('pesan', '\n <div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">\n <strong>Selamat!</strong> Anda berhasil menambahkan data.\n <button type=\"button\" class=\"close py-auto\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n ');\n // mengarahkan ke halaman tabel promo\n redirect('admin/C_isipaket');\n }", "public function get_mahasiswa()\n\t{\n\t\t$data = [\n\t\t\t'nim' => $this->nim,\n\t\t\t'nama' => $this->nama\n\t\t];\n\n\t\treturn $data;\n\t}", "function absender_bestimmen($absender,$db){\n$query1=\"select * from user\";\n\t$antwort1=$db->query($query1);\n\t$antwort1=array_bildung($antwort1);\n\t\n\t$i=0;\n\tforeach($absender[Absender] as $name => $inhalt){\n\tif($inhalt==0){\n\t\t$absender[Absender][$i]=\"Information an Alle !\";\n\t}\n\t\n\t\t$k=0;\n\t\tforeach($antwort1[id] as $name1 => $inhalt1){\n\t\t\tif($inhalt==$inhalt1){\n\t\t\t\t$absender[Absender][$i]=$antwort1[Name][$k].\"&nbsp;&nbsp;\".$antwort1[Vorname][$k].\"&nbsp;&nbsp;- \".$antwort1[Bemerkung][$k].\" -\";\n\t\t\t}\n\t\t$k++;\n\t\t}\n\t$i++;\n\t}\n\treturn $absender;\n}", "function get_mhs_ujian_ta($periode = '2'){\n\t\t\t//DETAIL PERIODE :\n\t\t\t\t// 0 = Untuk ujian komprehensif\n\t\t\t\t// 1 = untuk ujian seminar proposal\n\t\t\t\t// 2 = untuk ujian tugas akhir\n\t\t\t\t// 3 = untuk ujian tertutup\n\t\t\t\t// 4 = untuk ujian terbuka\n\n\t\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\t$data = $this->s00_lib_api->get_api_json(\n\t\t\t\t\t\t'http://service.uin-suka.ac.id/servtugasakhir/sia_skripsi_public/sia_skripsi_bimbingan/jadwalTA',\n\t\t\t\t\t\t'POST',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'api_kode'\t\t=> 1000,\n\t\t\t\t\t\t\t'api_subkode'\t=> 2,\n\t\t\t\t\t\t\t'api_search'\t=> array($kd_dosen, $periode)\n\t\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\treturn $data;\n\t\t}", "public function aksi_tambah_permohonan_suket004()\n\t{\n\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama_benar' => $this->input->post('nama_benar'),\n\t\t\t'nama_salah' => $this->input->post('nama_salah'),\n\t\t\t'nama_dokumen_benar' => $this->input->post('nama_dokumen_benar'),\n\t\t\t'nama_dokumen_salah' => $this->input->post('nama_dokumen_salah'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat' => $this->input->post('alamat'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_beda_nama');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket004/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function simpan_data_penerima_bansos()\n {\n $noKK = $this->request->getVar('noKK');\n $kepalaKeluarga = $this->request->getVar('kepalaKeluarga');\n $idBansos = $this->request->getVar('idBansos');\n $namaBansos = $this->request->getVar('namaBansos');\n $kategori = $this->request->getVar('kategori');\n $pendamping = $this->request->getVar('pendamping');\n $nominal = $this->request->getVar('nominal');\n $jumlahData = count($noKK);\n $jumlahBerhasil = 0;\n $jumlahGagal = 0;\n $jumlahTerdaftar = 0;\n $jumlahDataKKTidakDitemukan = 0;\n $jumlahDataBansosTidakDitemukan = 0;\n $jumlahBelumDisetujui = 0;\n for ($i = 0; $i < $jumlahData; $i++) {\n // cek apakah fieldnya kosong\n if ($noKK[$i] == 0 || $idBansos[$i] == 0) {\n $jumlahGagal++;\n } else {\n // cek pada database apakah data KK tersebut ada\n $dataKeluarga = $this->KeluargaModel->where('noKK', $noKK[$i])->first();\n if ($dataKeluarga) {\n // cek pada database apakah data bansos ada\n $dataBansos = $this->DataBansosModel->where('idBansos', $idBansos[$i])->first();\n if ($dataBansos) {\n // cek apakah data keluarga sudah\n $status = 'Disetujui';\n $disetujui = $this->KeluargaModel->where('noKK', $noKK[$i])->where('status', $status)->first();\n if ($disetujui) {\n // cek data peserta apakah sudah terdaftar\n $pesertaBansos = $this->BansosModel->where('noKK', $noKK[$i])->where('idBansos', $idBansos[$i])->first();\n if ($pesertaBansos) {\n $jumlahTerdaftar++;\n } else {\n\n $this->BansosModel->save([\n 'noKK' => $noKK[$i],\n 'kepalaKeluarga' => $kepalaKeluarga[$i],\n 'idBansos' => $idBansos[$i],\n 'namaBansos' => $namaBansos[$i],\n 'kategori' => $kategori[$i],\n 'pendamping' => $pendamping[$i],\n 'nominal' => $nominal[$i],\n 'statusAnggota' => 'Aktif'\n ]);\n $jumlahBerhasil++;\n }\n } else {\n $jumlahBelumDisetujui++;\n }\n } else {\n $jumlahDataBansosTidakDitemukan++;\n }\n } else {\n $jumlahDataKKTidakDitemukan++;\n }\n }\n }\n session()->setFlashdata('pesan', '' . $jumlahBerhasil . ' Berhasil Disimpan, ' . $jumlahTerdaftar . ' Telah Terdaftar, ' . $jumlahDataKKTidakDitemukan . ' Data KK Tidak Ditemukan, ' . $jumlahDataBansosTidakDitemukan . ' Data Bansos Tidak Ditemukan dan ' . $jumlahBelumDisetujui . ' Belum Disetujui');\n return redirect()->to('/Admin/penerima_bansos');\n }", "function jadwal(){\n\t\tdate_default_timezone_set('Asia/Jakarta');\n// ----------------------------------------------------------------------\n // meng generate tanggal sekarang sampai tanggal akhir bulan\n\t\t// mencari hari\n\t\t$dayList = array(\n\t\t\t'Sun' => 'Minggu',\n\t\t\t'Mon' => 'Senin',\n\t\t\t'Tue' => 'Selasa',\n\t\t\t'Wed' => 'Rabu',\n\t\t\t'Thu' => 'Kamis',\n\t\t\t'Fri' => 'Jumat',\n\t\t\t'Sat' => 'Sabtu'\n\t\t);\n\n\t\t$tgl_hari_ini=Date(\"j\");\n\t\t$tgl_terakhir=Date(\"t\");\n\t\t// --------------------------------------------------------------------------\n\t // mencari kode tanggal pada tabel waktu\n\t\t$tahun= Date(\"Y\");\n\t\t$bln_skrg= Date(\"n\");\n\t\t$bulanList=array(\n\t\t\t\t\"1\"=>\"januari\",\n\t\t\t\t\"2\"=>\"Februari\",\n\t\t\t\t\"3\"=>\"Maret\",\n\t\t\t\t\"4\"=>\"April\",\n\t\t\t\t\"5\"=>\"Mei\",\n\t\t\t\t\"6\"=>\"Juni\",\n\t\t\t\t\"7\"=>\"Juli\",\n\t\t\t\t\"8\"=>\"Agustus\",\n\t\t\t\t\"9\"=>\"September\",\n\t\t\t\t\"10\"=>\"Oktober\",\n\t\t\t\t\"11\"=>\"November\",\n\t\t\t\t\"12\"=>\"Desember\",\n\t\t\t);\n\n\t\t$tgl=0;\n\t\t$hr=1;\n\t\t$input_bulan=array();\n\t\tfor ($taggl=$tgl_hari_ini; $taggl<=$tgl_terakhir ; $taggl++) {\n\t\t$tanggal[$tgl++]=$taggl\t;\n // menentukan jumlah hari pada tgl sekarang sampai tanggal terakhir\n\t\t$jml_hri=$hr++;\n\t\t}\n\n\t\t$jum_tabl_tgl=$jml_hri;\n\t\t// untuk membatasi nilai ketika tanggal lebih dari 7 lengthnya\n\t\tif ($jum_tabl_tgl>=7) {\n\t\t\t$jum_tabl_tgl=7;\n\t\t\t\t$input_bulan[0]=$bulanList[$bln_skrg];\n\t\t}elseif ($jum_tabl_tgl<7) {\n\t\t\t// jika tanggal menjelang akhir maka akan menampilkan tnggal muda\n\t\t\t$jum_tabl_tgl=7;\n\t\t\t$jml_hri=7;\n\t\t\t$tgl_ahr_bln_dpn=$tgl_terakhir+1;\n\t\t\tfor ($taggl=1; $taggl<=$tgl_ahr_bln_dpn; $taggl++) {\n\t\t\t\t$tanggal[$tgl++]=$taggl;\n\t\t\t}\n\t\t\tfor ($i=0; $i <2 ; $i++) {\n\t\t\t\t$input_bulan[$i]=$bulanList[$bln_skrg+$i];\n\t\t\t}\n\n\t\t}elseif (empty($jum_tabl_tgl)) {\n\t\t\t$jum_tabl_tgl=1;\n\t\t}\n\n // untuk mencari nama hari di tampung di data_hari\n\t\tfor($i=0;$i<$jml_hri;$i++){\n\t\t\tif ($jum_tabl_tgl<7) {\n\t\t\t\t$time[$i] = mktime(0, 0, 0, date(\"m\")+1, date(\"d\")+$i, date(\"Y\"));\n\t \t\t $hari[$i]=date(\"D\", $time[$i]);\n\t\t\t $data_hari[$i]=$dayList[$hari[$i]];\n\t\t }elseif ($jum_tabl_tgl>=7) {\n\t\t\t $time[$i] = mktime(0, 0, 0, date(\"m\"), date(\"d\")+$i, date(\"Y\"));\n \t\t $hari[$i]=date(\"D\", $time[$i]);\n \t\t $data_hari[$i]=$dayList[$hari[$i]];\n\t\t }\n\n\t\t}\n\n\t\t$kod=0;\n\t\t$jum_jad=0;\n\n\n // ----------------------------------------------------------\n\t\t// mencari kode karyawan di tabel jadwal\n\t\t$kar=0;\n\t\t$kd_kary=array();\n\t\t$kd_karya=$this->crud_j->cari_kode_kar()->result();\n\t\tforeach ($kd_karya as $karyawan) {\n\t\t\t$kd_kary[$kar++]=$karyawan->kd_kar;\n\t\t}\n // mencari jumlah kode karyawan di tabel jadwal untuk di tampilkan di looping\n\t\t$jml_kar=$this->crud_j->cari_jml_kd_kary()->result();\n\t\tforeach ($jml_kar as $jml) {\n\t\t\t$jum_kd_kar=$jml->jml_kar;\n\t\t}\n// ---------------------------------------------------------\n\t\t//menacri nama karyawan berdasarkan kode karyawan yang ada di tabel jadwal di arrayy\n\t\t$nam=0;\n\t\t$nam_karya=array();\n\t\t$kd_karyaa=array();\n\t\tfor ($i=0; $i<$jum_kd_kar ; $i++) {\n\t\t\t$nam_kary=$this->crud_j->cari_nama_karyawan($kd_kary[$i])->result();\n\t\t\tforeach ($nam_kary as $nama ) {\n\t\t\t\t$nam_karya[$i]=$nama->nam_kar;\n\t\t\t\t$kd_karyaa[$i]=$nama->kd_kar;\n\t\t\t\tif (empty($nam_karya[$i])||empty($kd_karyaa[$i])) {\n\t\t\t\t\t$nam_karya[$i]=\"-\";\n\t\t\t\t\t$kd_karyaa[$i]=\"-\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n // mencari jadwal karyawan\n\t\t$jum_tgl=0;\n\t\t$jml_tgl=$this->crud_j->cari_jml_tanggal($bulanList[$bln_skrg],$tahun)->result();\n\t\tforeach ($jml_tgl as $jml) {\n\t\t\t$jum_tanggal=$jml->jml_tanggal;\n\t\t}\n\t\t$juml_tgl=$jum_tanggal;\n\t\tif ($jum_tgl>7) {\n\t\t\t$jum_tgl=7;\n\t\t}elseif (empty($jum_tgl)) {\n\t\t\t$jum_tgl=1;\n\t\t}elseif ($jum_tgl<7) {\n\t\t\t$jum_tgl=$jum_tanggal;\n\t\t}\n\n\t\tfor ($i=0; $i <$jum_kd_kar ; $i++) {\n\t\t\tfor ($j=0; $j <$jum_tabl_tgl ; $j++) {\n\t\t\t\t// untuk mendapatkan kde tab jam di tab jadwal\n\t\t\t\t$kd_jadwal=$this->crud_j->cari_jadwal_kar($kd_kary[$i],$tanggal[$j],$bulanList[$bln_skrg],$tahun)->result();\n\t\t\t\tforeach ($kd_jadwal as $jadwl_pgw) {\n\t\t\t\t\t$kdjad[$i][$j]=$jadwl_pgw->kd_waktu;\n\n\t\t\t\t}\n\t\t\t\t// mencari jadwal sesuai kode yang di cari di tab waktu\n\t\t\t\t$kdjadwal_jam=$this->crud_j->cari_jadwal_jam($kdjad[$i][$j])->result();\n\t\t\t\tforeach ($kdjadwal_jam as $kdjadwal_jam) {\n\t\t\t\t\t$jadwal_pgw[$i][$j]=$kdjadwal_jam->jadwal;\n\t\t\t\t\t$jadwal_jam[$i][$j]=$kdjadwal_jam->jam;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (empty($jadwal_pgw)||empty($jadwal_jam)) {\n\t\t\t$jadwal_pgw=\"-\";\n\t\t\t$jadwal_jam=\"-\";\n\t\t}\n\t\t\t$total_kary=$this->crud_s->cari_jumlah_kar()->result();\n\t\t\tforeach ($total_kary as $total) {\n\t\t\t\t$jum_tot_kary=$total->total;\n\t\t\t}\n\n\n // --------------------------------kusus CRUD--------------------\n\n\n\t\t// ceksession panah menu\n\t\t$this->cek_session->cek_session_jadwal();\n\n // pengiriman data tampilan\n\t\t$data['tanggal']=$tanggal;\n\n\t\t$data['jum_kar']=$jum_kd_kar;\n\t\t$data['nama_hari']=$data_hari;\n\t\t$data['jum_jad']=$jum_tgl;\n\t\t$data['jadwal']=$jadwal_pgw;\n\t\t$data['jadwal_jam']=$jadwal_jam;\n\t\t$data['bulan']=$input_bulan;\n\t\t$data['tahun']=$tahun;\n\t\t$data['jum_row_tgl']=$jum_tabl_tgl;\n // -------------pengiriman data crud----------------\n\n\t\t$data['kd_unik_jd']=$this->crud_j->cari_kode_jadwal();\n\t\t$data['nama_kary']=$nam_karya;\n\t\t$data['nama_pgw']=$this->crud_m->tampil_data_pegawai()->result();//untuk form input\n\t\t$data['kd_karya']=$kd_karyaa;\n\t\t$data['tgl_awl']=$tgl_hari_ini;\n\t\t$data{'tgl_akhr'}=$tgl_terakhir;\n\t\t$data['jum_kary']=$jum_tot_kary;\n\t\t$data['tgl_akhr_dpn']=$tgl_ahr_bln_dpn;\n\t\t$data['bln_skrg']=$bulanList[$bln_skrg];\n\n\t\t$data['cari_tahun']=$this->crud_j->cari_tahun()->result();\n\n\t\t//$data['cari_bulan']=$this->crud_j->cari_bulan()->result();\n\t\t//$data['kd_kar']=$this->db->crud_j->cari_kd_kar2($nama)->result();\n\t\t// untuk menampilkan halaman\\\n $this->load->view('adm/nav_content/header');\n \t$this->load->view('adm/content/data_jadwal',$data);\n\n\t\t$this->load->view('adm/nav_content/footer');\n\t\t$this->load->view('adm/modal_input/input_jadwal',$data);\n\t\t$this->load->view('adm/modal_input/edit_jadwal',$data);\n\t\t$this->load->view('adm/modal_input/edit_all_jadwal',$data);\n\t\t$this->load->view('adm/modal_input/hapus_jadwal',$data);\n\t\t$this->load->view('adm/modal_input/modal_info_jdwl');\n\t\t$this->load->view('adm/modal_input/input_cetak_jadwal',$data);\n\n\n\n\n\t\t// untuk mengecek pesan konfirmasi edit pegawai\n\t\t\t\tif ($this->session->userdata('tgl_jdwl')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-tgl-ggl');\n\t\t\t\t\t$this->session->unset_userdata('tgl_jdwl');\n\t\t\t\t}\n\t\t\t\tif ($this->session->userdata('cekWaktu')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-cekWaktu');\n\t\t\t\t\t$this->session->unset_userdata('cekWaktu');\n\t\t\t\t}elseif($this->session->userdata('cekWaktu')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-input');\n\t\t\t\t\t$this->session->unset_userdata('cekWaktu');\n\t\t\t\t}\n\t\t\t\tif ($this->session->userdata('edit_jadwal')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-gagal');\n\t\t\t\t\t$this->session->unset_userdata('edit_jadwal');\n\t\t\t\t}elseif($this->session->userdata('edit_jadwal')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-edit');\n\t\t\t\t\t$this->session->unset_userdata('edit_jadwal');\n\t\t\t\t}\n\t\t\t\tif ($this->session->userdata('hapus_jadwal')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-gagal');\n\t\t\t\t\t$this->session->unset_userdata('hapus_jadwal');\n\t\t\t\t}elseif($this->session->userdata('hapus_jadwal')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-hapus');\n\t\t\t\t\t$this->session->unset_userdata('hapus_jadwal');\n\t\t\t\t}\n\t\t\t\tif ($this->session->userdata('empty_jadwal')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-jadwal-empty');\n\t\t\t\t\t$this->session->unset_userdata('empty_jadwal');\n\t\t\t\t}elseif($this->session->userdata('empty_jadwal')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-thanks');\n\t\t\t\t\t$this->session->unset_userdata('empty_jadwal');\n\t\t\t\t}\n\n\t}\n\n\n\n\tfunction setting(){\n\n\t\t$data['jml_kar']=$this->crud_s->cari_jumlah_kar()->result();\n\t\t$data['super_usr']=$this->crud_s->tampil_data_super_user()->result();\n\t\t// ceksession panah menu\n\t\t$this->cek_session->cek_session_setting();\n // untuk menampilkan halaman\n\t\t$this->load->view('adm/nav_content/header');\n\t\t$this->load->view('adm/content/setting',$data);\n\t\t$this->load->view('adm/nav_content/footer');\n\t\t$this->load->view('adm/modal_input/modal_info_jdwl');\n\n\t\t// untuk mengecek pesan konfirmasi edit pegawai\n\t\t\t\tif ($this->session->userdata('editSuper')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-edit');\n\t\t\t\t\t$this->session->unset_userdata('editSuper');\n\t\t\t\t}elseif($this->session->userdata('editSuper')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-gagal');\n\t\t\t\t\t$this->session->unset_userdata('editSuper');\n\t\t\t\t}\n\n\t}\n\n\tfunction export_excel(){\n\t\tdate_default_timezone_set('Asia/Jakarta');\n\t// ----------------------------------------------------------------------\n\t\t// meng generate tanggal sekarang sampai tanggal akhir bulan\n\t\t// mencari hari\n\t\t$dayList = array(\n\t\t\t'Sun' => 'Minggu',\n\t\t\t'Mon' => 'Senin',\n\t\t\t'Tue' => 'Selasa',\n\t\t\t'Wed' => 'Rabu',\n\t\t\t'Thu' => 'Kamis',\n\t\t\t'Fri' => 'Jumat',\n\t\t\t'Sat' => 'Sabtu'\n\t\t);\n\t\t$tgl_hari_ini=Date(\"j\");\n\t\t$tgl_terakhir=Date(\"t\");\n\t\t$tgl=0;\n\t\t$hr=1;\n\t\tfor ($i=$tgl_hari_ini; $i<=$tgl_terakhir ; $i++) {\n\t\t$tanggal[$tgl++]=$i\t;\n\t\t// menentukan jumlah hari pada tgl sekarang sampai tanggal terakhir\n\t\t$jml_hri=$hr++;\n\t\t}\n\t\t$jum_tabl_tgl=$jml_hri;\n\t\tif ($jum_tabl_tgl>7) {\n\t\t\t$jum_tabl_tgl=7;\n\t\t}elseif ($jum_tabl_tgl<7) {\n\t\t\t$jum_tabl_tgl=$jml_hri;\n\t\t}elseif (empty($jum_tabl_tgl)) {\n\t\t\t$jum_tabl_tgl=1;\n\t\t}\n\n\t\t// untuk mencari nama hari di tampung di data_hari\n\t\tfor($i=0;$i<$jml_hri;$i++){\n\t\t\t$time[$i] = mktime(0, 0, 0, date(\"m\"), date(\"d\")+$i, date(\"Y\"));\n\t\t $hari[$i]=date(\"D\", $time[$i]);\n\t\t $data_hari[$i]=$dayList[$hari[$i]];\n\t\t}\n\t// --------------------------------------------------------------------------\n\t\t// mencari kode tanggal pada tabel waktu\n\t\t$tahun= Date(\"Y\");\n\t\t$bulan= Date(\"n\");\n\t\t$bulanList=array(\n\t\t\t\"1\"=>\"januari\",\n\t\t\t\"2\"=>\"Februari\",\n\t\t\t\"3\"=>\"Maret\",\n\t\t\t\"4\"=>\"April\",\n\t\t\t\"5\"=>\"Mei\",\n\t\t\t\"6\"=>\"Juni\",\n\t\t\t\"7\"=>\"Juli\",\n\t\t\t\"8\"=>\"Agustus\",\n\t\t\t\"9\"=>\"September\",\n\t\t\t\"10\"=>\"Oktober\",\n\t\t\t\"11\"=>\"November\",\n\t\t\t\"12\"=>\"Desember\",\n\t\t);\n\t\t$kod=0;\n\t\t$jum_jad=0;\n\n\t\t\t// mencari kode tanggal pada tabel waktu\n\t// \t\t$kde_tgl=array();\n\t// \tfor ($i=0; $i<7 ; $i++) {\n\t// \t$kode_tgl=($this->crud_j->cari_tanggal_kode($tanggal[$i],$bulanList[$bulan],$tahun)->result());\n\t// \tforeach ($kode_tgl as $kd_tgl) {\n\t// \t\t$kde_tgl[$i]=$kd_tgl->kd_waktu;\n\t// \t\tif(empty($kde_tgl[$i])){\n\t// \t\t$jum_jad=0;\n\t// \t}elseif (count($kde_tgl[$i])>7) {\n\t// \t\t$jum_jad=7;\n\t// \t}else {\n\t// \t\t$jum_jad=count($kde_tgl);\n\t// \t}\n\t// \t}\n\t// }\n\t// print_r($kde_tgl);\n\t\t// untuk membatasi jumlah jadwal yang tampil kekiri\n\n\n\t// ----------------------------------------------------------\n\t\t// mencari kode karyawan di tabel jadwal\n\t\t$kar=0;\n\t\t$kd_kary=array();\n\t\t$kd_karya=$this->crud_j->cari_kode_kar()->result();\n\t\tforeach ($kd_karya as $karyawan) {\n\t\t\t$kd_kary[$kar++]=$karyawan->kd_kar;\n\t\t}\n\t\t// mencari jumlah kode karyawan di tabel jadwal untuk di tampilkan di looping\n\t\t$jml_kar=$this->crud_j->cari_jml_kd_kary()->result();\n\t\tforeach ($jml_kar as $jml) {\n\t\t\t$jum_kd_kar=$jml->jml_kar;\n\t\t}\n\t// ---------------------------------------------------------\n\t\t//menacri nama karyawan berdasarkan kode karyawan yang ada di tabel jadwal di arrayy\n\t\t$nam=0;\n\t\t$nam_karya=array();\n\t\t$kd_karyaa=array();\n\t\tfor ($i=0; $i<$jum_kd_kar ; $i++) {\n\t\t\t$nam_kary=$this->crud_j->cari_nama_karyawan($kd_kary[$i])->result();\n\t\t\tforeach ($nam_kary as $nama ) {\n\t\t\t\t$nam_karya[$i]=$nama->nam_kar;\n\t\t\t\t$kd_karyaa[$i]=$nama->kd_kar;\n\t\t\t\tif (empty($nam_karya[$i])||empty($kd_karyaa[$i])) {\n\t\t\t\t\t$nam_karya[$i]=\"-\";\n\t\t\t\t\t$kd_karyaa[$i]=\"-\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t$jum_tgl=0;\n\t\t$jml_tgl=$this->crud_j->cari_jml_tanggal($bulanList[$bulan],$tahun)->result();\n\t\tforeach ($jml_tgl as $jml) {\n\t\t\t$jum_tanggal=$jml->jml_tanggal;\n\t\t}\n\t\t$juml_tgl=$jum_tanggal;\n\t\tif ($jum_tgl<7) {\n\t\t\t$jum_tgl=7;\n\t\t}elseif (empty($jum_tgl)) {\n\t\t\t$jum_tgl=1;\n\t\t}\n\t\tfor ($i=0; $i <$jum_kd_kar ; $i++) {\n\t\t\tfor ($j=0; $j <$jum_tanggal ; $j++) {\n\t\t\t\t$jadwal=$this->crud_j->cari_jadwal_kar($kd_kary[$i],$tanggal[$j],$bulanList[$bulan],$tahun)->result();\n\t\t\t\tforeach ($jadwal as $jadwl_pgw) {\n\t\t\t\t\t$jadwal_pgw[$i][$j]=$jadwl_pgw->jadwal;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (empty($jadwal_pgw)) {\n\t\t\t$jadwal_pgw=\"-\";\n\t\t}\n\t\t// print_r($jadwal_pgw);\n\t\t// for ($i=0; $i <$jum_kd_kar ; $i++) {\n\t\t// \tfor ($j=0; $j <$jum_tanggal ; $j++) {\n\t\t// \t\tif (empty($jadwal_pgw[$i][$j])) {\n\t\t//\n\t\t// \t\t}else {\n\t\t// \t\t\techo \"</br>\";\n\t\t// \t\t\techo $jadwal_pgw[$i][$j];\n\t\t// \t\t\techo \"</br>\";\n\t\t// \t\t}\n\t\t//\n\t\t// \t}\n\t\t// }\n\t\t// \techo \"</br>\";\n\t\t// \tprint_r($kd_kary);\n\n\t\t// for ($i=0; $i <3 ; $i++) {\n\t\t// \techo $kde_tgl[$i];\n\t\t// \techo \"</br>\";\n\t\t// \techo $kd_kary[$i];\n\t\t// \techo \"</br>\";\n\t\t// }\n\n\n\n\n\n\t\t\t//echo $jum_jad;\n\t\t // echo \"</br>\";\n\t\t\t// echo $jum_jad;\n\t\t// print_r($kde_tgl);\n\n\t\t// --------------------------------kusus CRUD--------------------\n\n\n\t\t// ceksession panah menu\n\n\n\t\t// pengiriman data tampilan\n\t\t$data['tanggal']=$tanggal;\n\n\t\t$data['jum_kar']=$jum_kd_kar;\n\t\t$data['nama_hari']=$data_hari;\n\t\t$data['jum_jad']=$jum_tgl;\n\t\t$data['jadwal']=$jadwal_pgw;\n\t\t$data['bulan']=$bulanList[$bulan];\n\t\t$data['tahun']=$tahun;\n\t\t// -------------pengiriman data crud----------------\n\n\t\t// $data['kd_unik_jd']=$this->crud_j->cari_kode_jadwal();\n\t\t $data['nama_kary']=$nam_karya;\n\t\t// $data['nama_pgw']=$this->crud_m->tampil_data_pegawai()->result();//untuk form input\n\t\t// $data['kd_karya']=$kd_karyaa;\n\t\t// $data['tgl_awl']=$tgl_hari_ini;\n\t\t// $data{'tgl_akhr'}=$tgl_terakhir;\n\t\t// $data['bln_skrg']=$bulanList[$bulan];\n\t\t// $data['thn_skrg']=$tahun;\n\t\t// $data['cari_tahun']=$this->crud_j->cari_tahun()->result();\n\n\t\t//$data['cari_bulan']=$this->crud_j->cari_bulan()->result();\n\t\t//$data['kd_kar']=$this->db->crud_j->cari_kd_kar2($nama)->result();\n\t\t// untuk menampilkan halaman\\\n\t\t$this->load->view('adm/laporan/vw_ex_excel',$data);\n\t}\n\n\n\n\t}", "function get_korelasi_jabatan()\n\t{\n\t\t$sj = $this->get_id_jabatan();\t\n\t\t$query = sprintf(\"select * from frm_isian_12_korelasi_jabatan where kode_jabatan='%s' and kode_instansi='%s'\", $sj['kode'], $sj['kode_instansi']);\n\t\tif($this->input->get('query'))\n\t\t{\n\t\t\t$where = \" and jabatan like '%\".$this->input->get('query').\"%' OR unit_kerja_instansi like '%\".$this->input->get('query').\"%' OR dalam_hal like '%\".$this->input->get('query').\"%'\";\n\t\t\t$query .= $where;\n\t\t}\t\t\n\t\t$rs = $this->db->query($query);\n\t\t$data = $rs->result_array();\n\t\techo json_encode(array('total'=>count($data), 'data'=>$data));\n\t}", "public static function tambah($data)\n {\n \nerror_reporting(\"E_ALL\") ;\n\n // data\n $detailgaji\t \t\t\t= new Detailgajiku;\n $detailgaji->kd_potongan\t\t= $data['kd_potongan'];\n\t\n $detailgaji->nomor \t\t= $data['nomor'];\n $detailgaji->jumlah \t\t= $data['jumlah'];\t\n\t\n // simpan\n return ($detailgaji->save()) ? true : false;\n }", "public function mostra(){\n echo \"<tr><td>\".$this->codi.\"</td><td>\".$this->nom.\"</td></tr>\";\n }" ]
[ "0.71959734", "0.7045538", "0.7041303", "0.6950427", "0.6939956", "0.671326", "0.66707927", "0.6575008", "0.65719527", "0.65698344", "0.65399075", "0.6538477", "0.6532704", "0.6517709", "0.6481223", "0.64811945", "0.64699537", "0.64673024", "0.64531964", "0.6450529", "0.64280385", "0.6422632", "0.64085877", "0.6405912", "0.6391267", "0.6387376", "0.6362691", "0.6356069", "0.6344142", "0.63351095", "0.63269085", "0.6321493", "0.63177574", "0.6310557", "0.63049036", "0.63036144", "0.630187", "0.62978953", "0.6291167", "0.6281676", "0.62809056", "0.62733763", "0.6266465", "0.6257805", "0.62542707", "0.6249409", "0.624722", "0.6243844", "0.62415725", "0.6239033", "0.6232434", "0.6229853", "0.6227157", "0.62223935", "0.6221103", "0.6218863", "0.6213528", "0.6207353", "0.6199815", "0.61989444", "0.619771", "0.61902356", "0.618588", "0.6185292", "0.61850554", "0.6181138", "0.61807084", "0.6177922", "0.6174728", "0.6173422", "0.6169861", "0.616282", "0.61616516", "0.61606205", "0.6158937", "0.61523736", "0.6149247", "0.61488867", "0.61438125", "0.61425966", "0.61403537", "0.61389893", "0.6138328", "0.6133353", "0.6117134", "0.61110777", "0.61102396", "0.6106928", "0.61049867", "0.6104902", "0.61044466", "0.610154", "0.60992926", "0.60976744", "0.60954684", "0.60893023", "0.6089117", "0.6087533", "0.6072025", "0.60641265" ]
0.6739432
5
Fungsi untuk mendapatkan data lenkap dari jenazah berdasarkan nama yang di masukkan peziarah
public function dapatkanDataLenkap(string $id): void { try { $id = Crypt::decrypt($id); $jenazah_data = Jenazah::find($id); $this->namaJenazah = $jenazah_data->nama; $this->jenazah_id = $jenazah_data->id; $this->alamat_jenazah = $jenazah_data->alamat; $this->suggestion_name = []; // ... } catch (\Exception $exception) { $this->dispatchBrowserEvent('onActionInfo', [ 'type' => 'error', 'title' => "Error", 'message' => 'Data tidak ditemukan.', ]); // ... } // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jumlahdata() {\r\n\t\t\treturn $this->db->count_all('tb_kelas');\t\t\t\r\n\t\t\t}", "function tampilUrutNama(){\n require('DataMahasiswa.php');\n //Melakukan sorting nama secara ascending\n $nama = array_column($mahasiswa, 'Nama');\n array_multisort($nama, SORT_ASC, $mahasiswa);\n $namaMhs = \"\";\n // looping foreach\n foreach ($mahasiswa as $mhs => $value) {\n // looping for 1 iterasi\n for ($value=0; $value < 1; $value++) { \n $namaMhs = $namaMhs.\"Nama : \".$mahasiswa[$mhs]['Nama'].\", NRP : \".$mahasiswa[$mhs]['NRP'].\"<br>\";\n }\n }\n return $namaMhs;\n }", "function cariNama()\n\t{\n\t\tif ($this->input->get() != NULL) {\n\t\t\t$dataForm = $this->input->get();\n\t\t\t$dataReturn = $this->Kesehatan_M->orLike('pasien',array('nama'=>$dataForm['term']['term'],'nomor_pasien'=>$dataForm['term']['term']))->result();\n\t\t\t$data = array();\n\t\t\tforeach ($dataReturn as $key => $value) {\n\t\t\t\t$data[$key]['id'] = $value->nomor_pasien;\n\t\t\t\t$data[$key]['text'] = $value->nama.\" / \".$value->nomor_pasien;\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}else{\n\t\t\tredirect();\n\t\t}\n\t}", "function nama_packing_barang($data_array){\n $nama = \"$data_array[1]\";\n if ($data_array['0'] == 'Generik'||$data_array[0] == 'Non Generik') {\n $nama.= ( $data_array[2] != 0) ? \" $data_array[2], $data_array[3]\" : \" $data_array[3]\"; //kekuatan dan sediaan\n }\n $nama.= !empty($data_array[4])?\" @$data_array[4]\":''; //satuan\n $nama.= ( $data_array[0] == 'Generik') ? ' ' . $data_array[5] : ''; //pabrik\n\n return $nama;\n}", "function data_mhs(){\r\n\t\t\techo \"KodeMataKuliah : \".$this->KodeMataKuliah.\"<br />\";\r\n\t\t\techo \"SKS : \".$this->SKS.\"<br />\";\r\n\t\t\techo \"Daftar matakuliah yang diambil:<br />\";\r\n\t\t\t\r\n\t\t\t$i = 0; // nomor urut daftar SKS matakuliah yang diambil\r\n\t\t\tforeach($this->NamaMataKuliah as $mk){\r\n\t\t\t\techo ++$i.\". \".$mk.\"<br />\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Cuma buat ganti baris aja kok :-)\r\n\t\t\techo \"<br />\";\r\n\t\t}", "public function getNamaPelajaran();", "public function nama()\n {\n $nama = [\n [\n \"nama\" => \"Aziz\",\n \"kelas\" => 12,\n \"hobby\" => [\n \"Gaming\",\n \"Gitar\"\n ],\n \"guru\" => [\n \"nama1\" => \"Ujang\",\n \"nama2\" => \"Udin\"\n ]\n ],\n [\n \"nama\" => \"Aziz\",\n \"kelas\" => 12,\n \"hobby\" => [\n \"Gaming\",\n \"Gitar\"\n ],\n \"guru\" => [\n \"nama1\" => \"Ujang\",\n \"nama2\" => \"Udin\"\n ]\n ]\n ];\n return $nama;\n }", "function tambah_nol($angka,$jumlah)\n\t\t{\n\t\t\t$jumlah_nol=strlen($angka);\n\t\t\t$angka_nol=$jumlah-$jumlah_nol;\n\t\t\t$nol = \"\";\n\t\t\tfor($i=1;$i<=$angka_nol;$i++)\n\t\t\t{\n\t\t\t$nol.='0000';\n\t\t\t}\n\t\t\treturn $nol.$angka;\n\t\t}", "public function o_nama()\n {\n $this->show('o_nama',[]);\n }", "public function getNamaSidangd() {\n return CHtml::listData(Sidangmaster::model()->with('iDJenisSidang')->findAll('status=1 and iDJenisSidang.IDJenisSidang in(1,2,3,4)'), 'IdSidang', 'iDJenisSidang.NamaSidang');\n }", "public function daftar_nama_side_unit(){\n\t\t/*return $w = $this->db->query(\"select * from unit WHERE kode_unit='\".$this->get_session_unit().\"' AND kode_bahasa='\".$this->lang.\"' \")->result();*/\n\t\t//$query = \"SELECT * from unit WHERE kode_unit='67' AND kode_bahasa='id'\";\n\t\t$query = \"SELECT * FROM unit WHERE kode_unit = '\".$this->get_session_unit().\"' AND kode_bahasa = '\".$this->lang.\"'\";\n\t\t$sql = $this->db->query($query);\n\t\treturn $sql->row_array();\n\t}", "public function nama_prodi(){\n\t\t$query = \"SELECT * FROM prodi\";//untuk menampilkan nama prodi pada tabel prodi\n\t\t$this->eksekusi($query);//untuk mengeksekusi query diatas\n\t\treturn $this->result;//untuk hasil query diatas\n\t}", "public function nama($status)\n {\n $nama = User::select('id as id_user', 'nama')->where('status',$status)->get();\n if($nama != null){\n $nama['count'] = $nama->count();\n }\n return $nama;\n }", "public function getNama()\n {\n return $this->nama;\n }", "public function tampilDataGalang(){\n\t\t\n\t}", "private function createLabel($no_urut,$jumlah,$prefix){\n $data =[];\n for ($i=($no_urut+1) ;$i<=($no_urut+$jumlah);$i++)\n {\n $data [] = $prefix.sprintf(\"%04s\", $i);//500 Nun B 0001-0003\n }\n return $data;\n }", "function data_prosesan()\n{\n //$jadual['medan'][]='*';\n /*$jadual['medan'][]='newss,ssm,nama,tel,fax,responden,' .\n '(SELECT keterangan FROM msic WHERE msic=msic2000 LIMIT 1,1) as keterangan,' .\n 'msic2000,msicB2000,fe';*/\n $sama='j1.newss,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn, ';\n $sama2='j2.newss,concat(j2.tahun_rujukan,\"-\",j2.siri_kekerapan) as blnthn, ';\n //$jadual['medan'][]=$sama . 'ssm, nama, operator, sv, kekerapan_sv'; \n //$jadual['medan'][]=$sama . 'ng, po, data_anggaran, cara_maklum_balas, cara_terima, sumber_pertubuhan, kategori_sample';\n //$jadual['medan'][]=$sama . 'status_operasi, status_lain_pbb, bil_bulan_bco, siasatan_bermula, siasatan_berakhir';\n //$jadual['medan'][]=$sama . 'no_jln_bgn, tmn_kg, bandar_kawasan, poskod, negeri, daerah, catatan';\n //$jadual['medan'][]=$sama . 'responden, jawatan, email, notel, lamanweb, tarikh';\n //$jadual['medan'][]=$sama . 'responden2, jawatan2, email2, notel2, nofax2';\n //$jadual['medan'][]=$sama . '`no_jln_bgn-lokasi`, `tmn_kg-lokasi`, `bandar_kawasan-lokasi`, ' .\n //'`poskod-lokasi`, `negeri-lokasi` ng, `daerah-lokasi` dp';\n $jadual['medan'][]='j1.newss,j1.ssm,j1.nama,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn ';\n $jadual['medan'][]=$sama . \"\\r\" . 'msic_lama, (SELECT keterangan FROM msic WHERE msic=msic_lama LIMIT 1,1) as keterangan,' . \n 'msic_baru, utama '; \n //$jadual['medan'][]=$sama . \"\\r\\t\" . 'F3001, F3002, catatan_soalan3, ' . 'F5001, F5002, F5003, F5104, catatan_soalan5';\n $jadual['medan'][]=$sama . 'F6001, F6002, F6003, F6004, F6005, F6101, F6102, F6103, F6104, F6105, catatan_soalan6';\n $jadual['medan'][]=$sama . 'F7001, F7002, F7003, catatan_soalan7, ' .\n 'F8001, catatan_soalan8, F9001, catatan_soalan9';\n //$jadual['medan'][]=$sama . 'cara_anggaran, bulan_terakhir_data_sebenar, bil_bulan_data_telah_dianggar';\n\n //$jadual['medan'][]=$sama . 'Deskripsi_Produk_Oleh_Responden, Produk_Tetap, Deskripsi_Produk_Tetap,\n //Produk_Tambahan, Deskripsi_Produk_Tambahan, UnitKuantitiAsal, UnitKuantitiLain'; \n $produk='Deskripsi_Produk_Tetap Nama, Produk_Tetap Kod, ';\n $jadual['medan'][]=$sama . $produk . 'KuantitiPengeluaran, KuantitiJualan, NilaiJualan, ' .\n 'format(NilaiJualan/KuantitiJualan,2) as HargaUnit, UnitKuantitiKini';\n //$jadual['medan'][]=$sama . $produk . 'ProsesanKuantitiPengeluaran, ProsesanKuantitiJualan, ProsesanNilaiJualan, AUP';\n $jadual['medan'][]=$sama . $produk . 'F2497, F2498, F2499, Catatan';\n $jadual['medan'][]=$sama . \"\\r\\t\" . \n 'F3001, F3002, catatan_soalan3, ' .\n 'F5001, F5002, F5003, F5104, catatan_soalan5';\n\n //$jadual['medan'][]=$sama . 'catatan';\n $jadual['medan'][]=$sama . 'F4001, F4002, F4003, F4004';\n $jadual['medan'][]=$sama . 'F4101, F4102, F4103, F4104';\n $jadual['medan'][]=$sama . 'F4201, F4202, F4203, F4204';\n $jadual['medan'][]=$sama . 'catatan \"Nota \", F4302, F4303, F4304';\n\n // bulanan\n //$bulan=($_GET['bln']==null)? '':'AND siri_kekerapan=\"'.bersih($_GET['bln']).'\"';\n $bulan_penuh = array('Januari', 'Februari', 'Mac', 'April', \n 'Mei', 'Jun', 'Julai', 'Ogos', \n 'September', 'Oktober', 'November', 'Disember');\n //$kerap='\"'.$bulan_penuh[0].'\",\"'.$bulan_penuh[1].'\",\"'.$bulan_penuh[2].'\"';\n //$bulan=($_GET['bln']==null)? '':'AND j1.siri_kekerapan in ('.$kerap.')';\n //$myJadual=array('mm_rangka','mm_rangka');\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_info'; } // bil medan = 15\n for($z=1;$z <= 2;$z++) { $jadual['nama'][]='prosesmm_jualan'; }\n $jadual['nama'][]='prosesmm_info';\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_gajistaf'; }\n $join1='prosesmm_info';\n $join2='prosesmm_jualan';\n $join3='prosesmm_gajistaf';\n \n return $jadual;\n}", "public function count_data_blok()\n\t{\n\n\t\t$this->db->select('k.nama_kawasan, b.nama_blok, b.gambar, b.add_time, b.jumlah_unit, k.alamat, b.id_blok');\n\t\t$this->db->from('blok as b');\n\t\t$this->db->join('kawasan as k', 'k.id_kawasan = b.id_kawasan', 'inner');\n\n\t\treturn $this->db->get();\n\t}", "function tgl_indo_lengkap($date=null){\n $array_hari = array(1=>'Senin','Selasa','Rabu','Kamis','Jumat', 'Sabtu','Minggu');\n //buat array nama bulan dalam bahasa Indonesia dengan urutan 1-12\n $array_bulan = array(1=>'Januari','Februari','Maret', 'April', 'Mei', 'Juni','Juli','Agustus',\n 'September','Oktober', 'November','Desember');\n if($date == null) {\n //jika $date kosong, makan tanggal yang diformat adalah tanggal hari ini\n $hari = $array_hari[date('N')];\n $tanggal = date ('d');\n $bulan = $array_bulan[date('n')];\n $tahun = date('Y');\n $jam = date('H:i:s');\n } else {\n //jika $date diisi, makan tanggal yang diformat adalah tanggal tersebut\n $date = strtotime($date);\n $hari = $array_hari[date('N',$date)];\n $tanggal = date ('d', $date);\n $bulan = $array_bulan[date('n',$date)];\n $tahun = date('Y',$date);\n $jam = date('H:i:s',$date);\n }\n $formatTanggal = $hari . \", \" . $tanggal .\" \". $bulan .\" \". $tahun .\" Jam \". $jam;\n return $formatTanggal;\n }", "function getKelas(){\n\t$query = $this->db->get('kelas'); //KET: mengambil seluruh data pada tabel kelas\n\t\tif ($query->num_rows >= 1){\n\t\t\tforeach($query->result_array() as $row){\n\t\t\t$data[$row['ID_kelas']] = $row['nama_kelas']; \n\t\t\t} return $data;\n\t\t}\n\t}", "public function tampil_data(){\n $sql= \"Select * From penjualan Order By id_penjualan DESC\";\n $data=$this->konek->query($sql);\n while ($row=mysqli_fetch_array($data)) {\n $hasil[]=$row;\n }\n return $hasil;\n }", "public function getDataWithTypeLeveltitle() {}", "function Data($sloupec){\n // prevod z velkych pismen na mala pro MySQL\n if (isset($this->data[$sloupec])){\n return $this->data[$sloupec];\n }else{\n if (isset($this->data[strtolower($sloupec)])){\n return $this->data[strtolower($sloupec)];\n }else{\n return '';\n }\n }\n }", "public function namas($status,$cabang,$wilayah)\n {\n $nama = User::select('id as id_user', 'nama')->where('status',$status)->where('cabang',$cabang)->where('wilayah',$wilayah)->get();\n if($nama != null){\n $nama['count'] = $nama->count();\n }\n return $nama;\n }", "public function getDataNasc()\n {\n return $this->dataNasc;\n }", "function get_all_data_prov(){\n return $this->db->query(\"\n SELECT *, a.nama, a.propinsiid,\n (select count(propinsiid) as jum from tbl_propinsi_kota where propinsiid=a.propinsiid) as jumlah_kota\n FROM tbl_propinsi a\n LEFT JOIN tbl_propinsi_kota b ON a.propinsiid = b.propinsiid\n GROUP BY a.propinsiid\n \")->result();\n }", "function AnoData($data){\n\t$ano = substr($data, 0, 4);\n\treturn $ano;\n}", "public function getTanggalNamaSidang() {\n return CHtml::listData(Sidangmaster::model()->with('iDJenisSidang')->findAll('status=1'), 'Tanggal', 'Tanggal');\n }", "function getNameList(){\n $con = getConnection();\n $sql = \"SELECT member_name FROM members_tab\";\n $results = mysqli_query($con, $sql);\n $nor = mysqli_num_rows($results);\n $counter = 0;\n if($nor != 0){\n while ($row = mysqli_fetch_assoc($results)) {\n $data[\"Name\"][$counter++] = $row[\"member_name\"]; \n }\n closeConnection($con);\n return $data;\n }else{\n closeConnection($con);\n return \"Null Data\";\n } \n }", "public function getNamaSidang() {\n return CHtml::listData(Sidangmaster::model()->with('iDJenisSidang')->findAll('status=1'), 'IdSidang', 'iDJenisSidang.NamaSidang');\n }", "public function apakahDataKosong() {\n $this->ambilData();\n if (empty($this->daftar_barang)) {\n return true;\n }\n return false;\n }", "function get_all_data_kecamatan(){\n return $this->db->query(\"\n SELECT *, a.nama, a.propinsiid,\n (select count(propinsiid) as jum from tbl_propinsi_kota where propinsiid=a.propinsiid) as jumlah_kota\n FROM tbl_propinsi a\n LEFT JOIN tbl_propinsi_kota b ON a.propinsiid = b.propinsiid\n \")->result();\n }", "function get_all_data_kecamatan(){\n return $this->db->query(\"\n SELECT *, a.nama, a.propinsiid,\n (select count(propinsiid) as jum from tbl_propinsi_kota where propinsiid=a.propinsiid) as jumlah_kota\n FROM tbl_propinsi a\n LEFT JOIN tbl_propinsi_kota b ON a.propinsiid = b.propinsiid\n \")->result();\n }", "public function data() {\n\t\treturn [\n\t\t\t0 => \"Не беременна\",\n\t\t\t1 => \"Беременна\"\n\t\t];\n\t}", "public function getData_metopen(){\n\t\t$query = \"SELECT COUNT(nim) AS jml_metopen FROM mahasiswa_metopen WHERE status = 'metopen'\"; //query untuk menghitung jumlah mahasiswa dengan status metopen\n\t\t$this->eksekusi($query); //mengeksekusi query diatas\n\t\treturn $this->result; //mengembalikan hasil query diatas\n\t}", "public function kosongkanDataBarang() {\n $this->daftar_barang = [];\n $this->editData();\n }", "public function jml_laporan()\n {\n $this->db->select('id_pengaduan, COUNT(id_pengaduan) as total_laporan');\n $this->db->from('aduan_layanan');\n $this->db->where('id_kepala', null);\n\n $hasil = $this->db->get();\n return $hasil;\n }", "function getDataMahassiwa()\n{\n\t$data = array(\n\t\t\t\t\t\"nama\" => \"Edward\",\n\t\t\t\t\t\"npm\" \t=> \"17117369\",\n\t\t\t\t\t\"fakultas\" => \"Fakultas Ilmu Komputer & Teknologi Informasi\",\n\t\t\t\t\t\"jurusan\" => \"Sistem Informasi\"\n\t\t\t\t\t);\n\treturn $data;\n}", "public function percobaan()\n {\n \t$a = \"Ahmad Muhaimin\";\n \treturn \"Nama Saya Adalah \".$a;\n }", "function dropdown_perusahaan() {\n $result = $this->db->get('tbl_perusahaan');\n\n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $dd[''] = 'Please Select';\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $dd[$row->id_perusahaan] = $row->nama_perusahaan;\n }\n }\n return $dd;\n }", "function tampilUrutNRP($mahasiswa){\n $nama = array_column($mahasiswa, 'NRP');\n array_multisort($nama, SORT_DESC, $mahasiswa);\n $nrpMhs = \"\";\n // looping foreach\n foreach ($mahasiswa as $mhs => $value) {\n // looping for 1 iterasi\n for ($value=0; $value < 1; $value++) { \n $nrpMhs = $nrpMhs.\"Nama : \".$mahasiswa[$mhs]['Nama'].\", NRP : \".$mahasiswa[$mhs]['NRP'].\"<br>\";\n }\n }\n return $nrpMhs;\n }", "public function cariJenazah(): void\n {\n $result = Jenazah::where('nama', 'LIKE', \"%$this->namaJenazah%\")\n ->get(['id', 'nama', 'blok']);\n\n if (count($result) === 0) {\n $result = [[\n 'nama' => \"Nama jenazah tidak ditemukan.\",\n 'id' => null,\n 'blok' => null,\n ]];\n }\n\n $this->suggestion_name = $result;\n\n // ...\n }", "function theme_helper_import_sample_data($data, $length = 0) {\n $header = NULL;\n\n foreach ((array)$data as $i => $fields) {\n foreach ((array)$fields as $j => $value) {\n if ($length > 0 && strlen($value) > $length) {\n $data[$i][$j] = check_plain(substr($value, 0, $length)) .' '. theme('placeholder', format_plural(strlen($value) - $length, t('(1 more character)'), t('(@count more characters)')));\n }\n else {\n $data[$i][$j] = check_plain($value);\n }\n }\n }\n\n if (!empty($data) > 0) {\n $header = array_shift($data);\n }\n else {\n $data = array(t('Empty data set.'));\n }\n\n return theme('table', $header, $data);\n}", "function select_tb_penduduk(){\n\t\t$this->load->model('mamdani');\n\t\t//$klasifikasi['klasifikasi']=$this->mamdani->getdata();\n\t\t$klasifikasi['jumlah_aset']=$this->mamdani->jumlah_aset();\n\t\t$klasifikasi['tingkat']= $this->mamdani->klasifikasi3();\n\n\t\t$this->load->view('templates/header');\n\t\t$this->load->view('admin/lihatdata/tabel_klasifikasi_penduduk',$klasifikasi);\n\t\t$this->load->view('templates/footer');\n\t\t// var_dump($jml_aset);\n\t\t// die;\n\n\t}", "public function getInfoLengkap(){\n $str = \"{$this->tipe} : {$this->judul} | {$this->getLable()} (Rp. {$this->harga}\";\n if($this->tipe == \"Komik\"){\n $str .= \" - ($this->jmlHalaman) Halaman.\";\n }elseif ($this->tipe == \"Game\"){\n $str .= \" ~ ($this->waktuMain) Jam.\";\n }\n return $str;\n }", "public function hospitalizaciones_tatalHospitalizaciones(){ \t\n\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"Select count(idHospitalizacion) as cantidadHospitalizaciones from tb_hospitalizacion \";\n\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado['cantidadHospitalizaciones'];\t\t\t\n\t\t\t\n\t\t\t\n }", "function tampil_data()\r\n\t{\r\n\t$data = mysql_query(\"select * from item order by Nama_Item\");\r\n\twhile($d = mysql_fetch_array($data))\r\n\t\t{\r\n\t\t\t$hasil[] = $d;\r\n\t\t}\r\n\treturn $hasil;\r\n\t}", "public function get_data()\n {\n $post = $this->input->post(null, true);\n if ($post) {\n // ambil data dari model\n $list = $this->hasil->get_datatables();\n $data = array();\n $no = $post['start'];\n foreach ($list as $field) {\n $no++;\n $row = array();\n $row[] = $no;\n $row[] = $field->nama_akun;\n $row[] = $this->date->tanggal($field->tgl, 's');\n $row[] = $field->nilai;\n $data[] = $row;\n }\n\n $output = array(\n \"draw\" => $post['draw'],\n \"recordsTotal\" => $this->hasil->count_all(),\n \"recordsFiltered\" => $this->hasil->count_filtered(),\n \"data\" => $data,\n );\n // tampilkan data\n echo json_encode($output);\n } else {\n $this->index();\n }\n }", "function _is_pejabat_penunjang_nt(){\n\t\t$CI \t\t=& get_instance();\n\t\t$kd \t\t= $CI->session->userdata('kd_dosen');\n\t\t$tgl \t\t= date('d-m-Y');\n\t\t$api_url \t= URL_API_SIMPEG1.'simpeg_mix/data_search';\n\t\t$parameter = array('api_kode' =>1121, 'api_subkode' => 3, 'api_search' => array($tgl, $kd, 1));\n\t\t$data = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t//print_r ($data);\n\t\t$value = array();\n\t\t//echo $data[count($data)-1]->STR_NAMA;\n\t\tif(!empty($data)){\n\t\t\t//$kd_jab \t= $data[count($data)-1]->STR_ID;\n\t\t\t//ini harusnya yang aktif, bukan yang index 0 ; \n\t\t\tforeach ($data as $d) {\n\t\t\t\t$kd_jab \t= $d->STR_ID;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/jabatan';\n\t\t\t\t$parameter = array('api_kode' =>20000, 'api_subkode' => 1, 'api_search' => array($kd_jab));\n\t\t\t\t$data2 = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif(!empty($data2)){\n\t\t\t\t\t//$value['nama_jabatan'] = $data[count($data)-1]->STR_NAMA;\n\t\t\t\t\t$value['nama_jabatan'] = $d->STR_NAMA;\n\t\t\t\t\t$value['sks_maks'] = $this->_get_sks_max($d->STR_ID);//$data2[0]->SKS_MAX;\n\t\t\t\t\t$value['bukti_penugasan'] = 'Surat Keputusan';\n\t\t\t\t\t$value['masa_penugasan'] = '1 Tahun';\n\t\t\t\t\t$value['tgl_mulai'] = $d->RR_TANGGAL_MULAI_F;\n\t\t\t\t\t$value['tgl_selesai'] = $d->RR_TANGGAL_AKHIR_F;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $value;\n\t\t#return $data;\n\t\t\n\t}", "public function jumlahDitolak(){\n $this->db->select(\"count(status_pendaftaran) as status_pendaftaran\");\n $this->db->from($this->_table);\n $this->db->where('status_pendaftaran',\"Tidak Diterima\");\n return $this->db->get()->row()->status_pendaftaran;\n }", "function get_data_kelurahan(){\r\n\t\t\t\r\n\t\t$this->db->where('kelurahan <>','0');\r\n\t\t$this->db->select(array('ID','nama'));\r\n\t\t$q=$this->db->get('kelurahan');\r\n\t\tif($q->num_rows()>0)return $q;\r\n\t}", "function getCount ($data){\nreturn count($data);\n \n}", "public function get_no_pa(){\n $this->db->select('Right(m_pa.no_pa,3) as unik ',false);\n $this->db->order_by('id_pa', 'desc');\n $this->db->limit(1);\n $query = $this->db->get('m_pa');\n if($query->num_rows()<>0){\n $data = $query->row();\n $unik = intval($data->unik)+1;\n }else{\n $unik = \"001\";\n\n }\n $kodemax = sprintf(\"%04s\", $unik);\n $kd = \"KK/MRP-PA/\".$kodemax;\n return $kd;\n\n }", "function get_idcabang()\n {\n $this->db->order_by('CB_ID', 'asc');\n $result = $this->db->get('tb_cabang');\n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $data[''] = 'Please Select';\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $data[$row->CB_ID] = $row->CB_NAMA;\n }\n }\n return $data;\n\t}", "public function totalPenggunaanPengetahuan()\n {\n return $this->db->table('kuesioner')->select('jawaban6')->where('jawaban1', 'sudah')->countAllResults();\n }", "function get_hasil_kerja()\n\t{\n\t\t$sj = $this->get_id_jabatan();\n\t\t$query = sprintf(\"select * from frm_isian_9_hasil_kerja where kode_jabatan='%s' and kode_instansi='%s'\", $sj['kode'],$sj['kode_instansi']);\n\t\tif($this->input->get('query'))\n\t\t{\n\t\t\t$where = \" and hasil_kerja like '%\".$this->input->get('query').\"%' or satuan_hasil like '%\".$this->input->get('query').\"%'\";\n\t\t\t$query .= $where;\n\t\t}\t\t\n\t\t$rs = $this->db->query($query);\n\t\t$data = $rs->result_array();\n\t\techo json_encode(array('total'=>count($data), 'data'=>$data));\n\t}", "public function examenes_tatalExamenes(){ \t\n\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"Select count(idExamen) as cantidadExamenes from tb_examenes \";\n\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado['cantidadExamenes'];\t\t\t\n\t\t\t\n\t\t\t\n }", "public function getDataNascimento()\n {\n return $this->dataNascimento;\n }", "public function desparasitantes_tatalDesparasitantes(){ \t\n\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"Select count(idDesparasitanteMascota) as cantidadDesparasitantes from tb_desparasitantesMascotas \";\n\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado['cantidadDesparasitantes'];\t\t\t\n\t\t\t\n\t\t\t\n }", "public function getLabelExtendedData()\n {\n $data = array();\n $data['label'] = $this->getNazwa();\n $data['subtext'] = $this->getIndeks();\n\n return $data;\n }", "public function list_data_pejabat_berwenang()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $data_pejabat['data_pejabat'] = $this->m_admin->get_data_pejabat()->result();\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/list_data_pejabat_berwenang', $data_pejabat);\n $this->load->view('footer');\n }", "public function data_judul()\n {\n $data = ['aktif' => 'judul',\n 'data_judul' => $this->M_prospektus->ambil_data_judul()\n ];\n\n $this->template->load('template','prospektus/V_data_judul', $data);\n }", "function fieldCek()\n {\n $f = array(\n 'noinduk'=>'Nomor Induk' \n );\n return $f;\n }", "private function array_count($data){\r\n $last_element = 0;\r\n foreach($data as $key=>$value){\r\n if(!is_null($value) AND $value !== \"\"){\r\n $last_element = $key + 1;\r\n }\r\n }\r\n return $last_element;\r\n }", "function cek_status_username(){\n $username = $this->input->post('username');\n \n # select ke model member username yang diinput user\n $hasil_username = $this->model_program->cek_username($username);\n \n # pengecekan value $hasil_username\n if(count($hasil_username)!=0){\n # kalu value $hasil_username tidak 0\n # echo 1 untuk pertanda username sudah ada pada db \n echo \"1\"; \n }else{\n # kalu value $hasil_username = 0\n # echo 2 untuk pertanda username belum ada pada db\n echo \"2\";\n }\n \n }", "public function informasi()\n {\n //Query untuk mengambil semua data informasi yang diuurutkan berdasarkan tanggal\n $query = $this->db->query(\"SELECT A.tanggal, A.subject, A.pesan, A.id_informasi, C.nama FROM informasi A \n LEFT JOIN karyawan C ON C.nik = A.id_user\n ORDER BY A.tanggal DESC\");\n return $query;\n }", "public function makeDataToko($row){\n\t\t\t$this->merge(\"A\".$row , \"D\".$row);\n\t\t\t$this->tulis(\"PT. Bee Bee Toys\", \"A\".$row);\n\t\t\t$this->fontSize(\"14\", \"A\".$row);\n\t\t\t$this->fontWeight(\"bold\", \"A\".$row);\n\t\t\t$row++;\n\n\t\t\t$this->merge(\"A\".$row , \"D\".$row);\n\t\t\t$this->tulis(\"Jl. Terusan Bandengan Utara\", \"A\".$row);\n\t\t\t$this->fontSize(\"10\", \"A\".$row);\n\t\t\t$row++;\n\n\t\t\t$this->merge(\"A\".$row , \"D\".$row);\n\t\t\t$this->tulis(\"Ruko Air Baja Blok I no 10\", \"A\".$row);\n\t\t\t$this->fontSize(\"10\", \"A\".$row);\n\t\t\t$row++;\n\n\t\t\t$this->merge(\"A\".$row , \"D\".$row);\n\t\t\t$this->tulis(\"Jakarta Utara\", \"A\".$row);\n\t\t\t$this->fontSize(\"10\", \"A\".$row);\n\t\t\t$row++;\n\n\t\t\t$this->merge(\"A\".$row , \"D\".$row);\n\t\t\t$this->tulis(\"021-667 123 52\", \"A\".$row);\n\t\t\t$this->fontSize(\"10\", \"A\".$row);\t\t\n\t\t\treturn 2;\n\t\t}", "function _dispen_hari(){\n\t\t$CI =& get_instance();\n\t\t$api_url \t= URL_API_SIA.'sia_sistem/data_view';\n\t\t$parameter = array('api_kode' =>200002, 'api_subkode' => 1, 'api_search' => array());\n\t\t$data \t\t= $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\treturn $data[0]->KADALUWARSA_HARI1;\n\t}", "public function data_paket($tahun){\n\t\t$data[\"baris_data\"] = array();\n\t\t$data[\"total_data\"] = array();\n\t\t$no \t= 1;\n\n\n\t\t$result_data\t\t= $this->model->data_paket($tahun);\n\t\tforeach ($result_data->result() as $rows_data) {\n\t\t\t$data[\"baris_data\"][] = array(\n\t\t\t\t\t\t\t\t\t\t\t\"no\"\t\t\t\t\t\t=> $no++,\n \"id_paket\"\t\t\t\t\t=> $rows_data->lls_id,\n \"nama_paket\"\t\t\t\t=>\n \"<b>Nama Paket : </b>\".$rows_data->pkt_nama.\"<br>\".\n \"<b>Kode SiRUP : </b>\".$rows_data->rup_id.\"<br>\".\n \"<b>Tahun : </b>\".$rows_data->tahun.\"<br>\",\n\t\t\t\t\t\t\t\t\t\t\t\"nama_opd\"\t\t\t\t\t=> $rows_data->stk_nama,\n \"nama_ppk\" => $rows_data->peg_nama,\n\t\t\t\t\t\t\t\t\t\t\t\"total_pagu\"\t\t\t\t=> number_format($rows_data->pkt_pagu),\n\t\t\t\t\t\t\t\t\t\t\t\"pemenang\"\t\t\t\t\t=> $rows_data->nama_rekanan_gabung,\n\t\t\t\t\t\t\t\t\t\t\t\"total_realisasi\"\t\t\t=> number_format($rows_data->rsk_nilai)\n\t\t\t\t\t\t\t\t\t);\n\t\t}\n\t\techo json_encode($data);\n }", "public function dataMahasiswa()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('tb_mahasiswa');\n\t\t$this->db->order_by('nim', 'asc');\n\t\t$data = $this->db->get('');\n\t\treturn $data;\n\t}", "function data_jumlah_siswa(){\n $this->db->select('s.id as idsiswa,s.namaDepan,s.namaBelakang,s.alamat,s.noKontak,s.namaSekolah,s.alamatSekolah,s.penggunaID,p.namaPengguna,p.eMail');\n $this->db->join('tb_pengguna p', 's.penggunaID = p.id');\n $this->db->where('s.status','1');\n $this->db->where('p.status','1');\n $this->db->order_by('s.namaDepan', 'asc');\n return $query = $this->db->get('tb_siswa s')->num_rows(); \n }", "private function muatNamaFileMasukan()\n {\n if(!is_dir($this->folderMasukan))\n {\n echo \"Data tidak lengkap.. Persiapkan file2 hasil konversi XML... Simpan dalam \". $this->folderMasukan .\"<br/>\";\n exit(0);\n }\n\n $handle = opendir($this->folderMasukan);\n $this->array_nama_file_masukan = array();\n\n if($handle)\n {\n $i = 0;\n while(false !== ($file = readdir($handle)))\n {\n if($file != \".\" && $file != \"..\" && !strcasecmp(substr($file, strlen($file) - strlen(Umum::AKHIRAN_NERPOS_FILE)), Umum::AKHIRAN_NERPOS_FILE))\n {\n array_push($this->array_nama_file_masukan, substr($file, 0, 0-strlen(Umum::AKHIRAN_NERPOS_FILE)) ); // yang disimpan hanya bagian nama utamanya saja, hilangkan akhirannya.\n $i++;\n }\n }\n closedir($handle);\n }\n }", "private function getEmptyData() {\n if (!$this -> empty_data) {\n $this -> empty_data = array();\n foreach ($this -> types as $key) {\n $this -> empty_data[$key] = \"\";\n }\n unset($this -> empty_data['user_type']); // the default value should never be set to \"\"\n unset($this -> empty_data['password']); // the default value should never be set to \"\"\n }\n return $this -> empty_data;\n }", "public function readDataPerbaikanBelum(){\n $sql = \"SELECT c.tanggal,c.nomor,c.no_inventaris,c.nama_user,b.cost_center,c.no_ex,GROUP_CONCAT(e.pekerjaan SEPARATOR '<br>') as pekerjaan FROM entri c,perbaikan e,kendaraan a,user b WHERE c.nomor = e.id_entri AND a.no_inventaris = c.no_inventaris AND c.id_status = 1 AND b.id_user = a.id_user GROUP BY c.nomor ORDER BY c.tanggal DESC\";\n $query = $this->db->query($sql);\n return $query;\n }", "public function listdataKeuAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('KEUANGAN');\n }", "public function getAllDataPengetahuan()\n {\n $query = $this->db->query('SELECT * FROM tb_pengetahuan');\n return $query->result();\n }", "function PrintData($key,$region)\n{\n\n $data = GetTheDataArray(array('theme','data',$key,$region));\n $returnData = '';\n if(is_array($data))\n {\n foreach($data as $key => $d)\n {\n if(!isset($data[0]) && !isset($data[1]))\n {\n $returnData .= '';\n } else {\n $returnData .= $d;\n }\n\n }\n } else {\n\n $returnData = $data;\n }\n\n return $returnData;\n\n\n}", "public function list_data_mantan_pejabat_berwenang()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $data_pejabat['data_pejabat'] = $this->m_admin->get_data_mantan_pejabat()->result();\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/list_data_mantan_pejabat_berwenang', $data_pejabat);\n $this->load->view('footer');\n }", "public function displaymahasiswa()\r\n {\r\n $query = \"select * from data_mahasiswa\";\r\n return $this->db->query($query);\r\n }", "function _jenisDosen($kode){\n\t\tif($kode == 'DS') $name = 'DOSEN BIASA';\n\t\telse if($kode == 'DT') $name = 'DOSEN DENGAN TUGAS TAMBAHAN';\n\t\telse if($kode == 'PR') $name = 'PROFESOR';\n\t\telse if($kode == 'PT') $name = 'PROFESOR DENGAN TUGAS TAMBAHAN';\n\t\telse $name = '';\n\t\treturn $name;\n\t}", "function cariObat()\n\t{\n\t\tif ($this->input->get() != NULL) {\n\t\t\t$dataForm = $this->input->get();\n\t\t\t\n\t\t\t$dataReturn = $this->db->query(\" SELECT * FROM logistik WHERE nama LIKE '%\".$dataForm['term']['term'].\"%' ESCAPE '!' AND stok > 0\")->result();\t\t\t\n\n\t\t\t$data = array();\n\t\t\tforeach ($dataReturn as $key => $value) {\n\t\t\t\t$data[$key]['id'] = $value->id.\"|\".$value->nama;\n\t\t\t\t$data[$key]['text'] = $value->nama;\n\t\t\t\t$data[$key]['stok'] = $value->stok;\n\t\t\t\tif ($value->kadaluarsa < date(\"Y-m-d-d\")) {\n\t\t\t\t\t$data[$key]['stok'] .= \" Sudah kadaluarsa\";\n\t\t\t\t}\n\t\t\t\t$data[$key]['satuan'] = $value->satuan;\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}else{\n\t\t\tredirect();\n\t\t}\t\t\n\t}", "function total_registros($data = NULL) {\n //Where\n $where = array('t1.estado != ' => 0);\n\n //Where\n if (!empty($data['estrellas'])) {\n $where[\"t1.estrellas\"] = $data['estrellas'];\n }\n \n if (!empty($data['id_provincia'])) {\n $where[\"t1.id_provincia\"] = $data['id_provincia'];\n }\n\n //Like\n if (!empty($data['campo']) && !empty($data['busqueda'])) {\n $like[$data['campo']] = $data['busqueda'];\n } else {\n $like[\"t1.nombre\"] = \"\";\n }\n\n $resultado = $this->db->select(\"t1.*, t2.provincia\")\n ->join(\"tblprovincia as t2\",\"t2.id = t1.id_provincia\")\n ->where($where)\n ->like($like)\n ->get(\"tblhotel as t1\")\n ->num_rows();\n\n return $resultado;\n }", "public function jumlahDiterima(){\n $this->db->select(\"count(status_pendaftaran) as status_pendaftaran\");\n $this->db->from($this->_table);\n $this->db->where('status_pendaftaran',\"Diterima\");\n return $this->db->get()->row()->status_pendaftaran;\n }", "function tambah($data){\r\n\t\tglobal $conn;\r\n\r\n\t\t$nim = htmlspecialchars($data[\"nim\"]);\r\n\t\t$namalengkap = htmlspecialchars($data[\"namalengkap\"]);\r\n\t\t$kotaasal = htmlspecialchars($data[\"kotaasal\"]);\r\n\t\t$tanggallahir = htmlspecialchars($data[\"tanggallahir\"]); \r\n\t\t$namaorangtua = htmlspecialchars($data[\"namaorangtua\"]);\r\n\t\t$alamatorangtua = htmlspecialchars($data[\"alamatorangtua\"]);\r\n\t\t$kodepos = htmlspecialchars($data[\"kodepos\"]);\r\n\t\t$nomortelepon = htmlspecialchars($data[\"nomortelepon\"]);\r\n\t\t$status = htmlspecialchars($data[\"status\"]);\r\n\r\n\t\t//query insert data\r\n\t\t$query = \"INSERT INTO datamahasiswa\r\n\t\t\t\t\t\tVALUES \r\n\t\t\t\t\t('', '$nim', '$namalengkap', '$kotaasal', '$tanggallahir', '$namaorangtua', '$alamatorangtua', '$kodepos', '$nomortelepon', '$status')\r\n\t\t\t\t\t\";\r\n\t\tmysqli_query($conn, $query);\r\n\r\n\t\treturn mysqli_affected_rows($conn);\r\n\r\n\t\t}", "public function simpan_data_penerima_bansos()\n {\n $noKK = $this->request->getVar('noKK');\n $kepalaKeluarga = $this->request->getVar('kepalaKeluarga');\n $idBansos = $this->request->getVar('idBansos');\n $namaBansos = $this->request->getVar('namaBansos');\n $kategori = $this->request->getVar('kategori');\n $pendamping = $this->request->getVar('pendamping');\n $nominal = $this->request->getVar('nominal');\n $jumlahData = count($noKK);\n $jumlahBerhasil = 0;\n $jumlahGagal = 0;\n $jumlahTerdaftar = 0;\n $jumlahDataKKTidakDitemukan = 0;\n $jumlahDataBansosTidakDitemukan = 0;\n $jumlahBelumDisetujui = 0;\n for ($i = 0; $i < $jumlahData; $i++) {\n // cek apakah fieldnya kosong\n if ($noKK[$i] == 0 || $idBansos[$i] == 0) {\n $jumlahGagal++;\n } else {\n // cek pada database apakah data KK tersebut ada\n $dataKeluarga = $this->KeluargaModel->where('noKK', $noKK[$i])->first();\n if ($dataKeluarga) {\n // cek pada database apakah data bansos ada\n $dataBansos = $this->DataBansosModel->where('idBansos', $idBansos[$i])->first();\n if ($dataBansos) {\n // cek apakah data keluarga sudah\n $status = 'Disetujui';\n $disetujui = $this->KeluargaModel->where('noKK', $noKK[$i])->where('status', $status)->first();\n if ($disetujui) {\n // cek data peserta apakah sudah terdaftar\n $pesertaBansos = $this->BansosModel->where('noKK', $noKK[$i])->where('idBansos', $idBansos[$i])->first();\n if ($pesertaBansos) {\n $jumlahTerdaftar++;\n } else {\n\n $this->BansosModel->save([\n 'noKK' => $noKK[$i],\n 'kepalaKeluarga' => $kepalaKeluarga[$i],\n 'idBansos' => $idBansos[$i],\n 'namaBansos' => $namaBansos[$i],\n 'kategori' => $kategori[$i],\n 'pendamping' => $pendamping[$i],\n 'nominal' => $nominal[$i],\n 'statusAnggota' => 'Aktif'\n ]);\n $jumlahBerhasil++;\n }\n } else {\n $jumlahBelumDisetujui++;\n }\n } else {\n $jumlahDataBansosTidakDitemukan++;\n }\n } else {\n $jumlahDataKKTidakDitemukan++;\n }\n }\n }\n session()->setFlashdata('pesan', '' . $jumlahBerhasil . ' Berhasil Disimpan, ' . $jumlahTerdaftar . ' Telah Terdaftar, ' . $jumlahDataKKTidakDitemukan . ' Data KK Tidak Ditemukan, ' . $jumlahDataBansosTidakDitemukan . ' Data Bansos Tidak Ditemukan dan ' . $jumlahBelumDisetujui . ' Belum Disetujui');\n return redirect()->to('/Admin/penerima_bansos');\n }", "public function retreiveData($data_label = \"\")\n\t{\n\n\t}", "public function chk_dat()\n {\n echo \"title = \" . $this->dat[\"title\"] . \"\\n\\n\";\n echo \"name = \" . $this->dat[\"name\"] . \"\\n\\n\";\n echo \"era = \" . $this->dat[\"era\"] . \"\\n\\n\";\n echo \"rows = \" . $this->dat[\"rows\"] . \"\\n\\n\";\n\n echo $this->dat[\"field\"][\"n\"] . \", \".\n $this->dat[\"field\"][\"id\"] . \", \".\n $this->dat[\"field\"][\"scd\"] . \", \".\n $this->dat[\"field\"][\"name\"] . \", \".\n $this->dat[\"field\"][\"ymd\"] . \", \".\n $this->dat[\"field\"][\"line\"] . \", \".\n $this->dat[\"field\"][\"debit\"] . \", \".\n $this->dat[\"field\"][\"credit\"] . \", \".\n $this->dat[\"field\"][\"debit_name\"] . \", \".\n $this->dat[\"field\"][\"credit_name\"] . \", \".\n $this->dat[\"field\"][\"debit_account\"] . \", \".\n $this->dat[\"field\"][\"credit_account\"] . \", \".\n $this->dat[\"field\"][\"debit_amount\"] . \", \".\n $this->dat[\"field\"][\"credit_amount\"] . \", \".\n $this->dat[\"field\"][\"amount\"] . \", \".\n $this->dat[\"field\"][\"remark\"] . \", \".\n $this->dat[\"field\"][\"settled_flg\"] . \"\\n\\n\";\n\n $cnt = $this->dat[\"rows\"];\n for ($i = 0; $i < $cnt; $i++) {\n echo $this->dat[\"data\"][$i][\"n\"] . \", \".\n $this->dat[\"data\"][$i][\"id\"] . \", \".\n $this->dat[\"data\"][$i][\"scd\"] . \", \".\n $this->dat[\"data\"][$i][\"name\"] . \", \".\n $this->dat[\"data\"][$i][\"ymd\"] . \", \".\n $this->dat[\"data\"][$i][\"line\"] . \", \".\n $this->dat[\"data\"][$i][\"debit\"] . \", \".\n $this->dat[\"data\"][$i][\"credit\"] . \", \".\n $this->dat[\"data\"][$i][\"debit_name\"] . \", \".\n $this->dat[\"data\"][$i][\"credit_name\"] . \", \".\n $this->dat[\"data\"][$i][\"debit_account\"] . \", \".\n $this->dat[\"data\"][$i][\"credit_account\"] . \", \".\n $this->dat[\"data\"][$i][\"debit_amount\"] . \", \".\n $this->dat[\"data\"][$i][\"credit_amount\"] . \", \".\n $this->dat[\"data\"][$i][\"amount\"] . \", \".\n $this->dat[\"data\"][$i][\"remark\"] . \", \".\n $this->dat[\"data\"][$i][\"settled_flg\"] . \"\\n\\n\";\n }\n }", "function checkAllData($f,$new = 0){\n\t\tif(empty($f['partno'])) return \"The field Part No does not have to be null\";\n if(empty($f['description'])) return \"The field Type does not have to be null\";\n\t \treturn 0;\n\t}", "public function actionGetDataKunjungan()\n\t{\n\t\tif(Yii::app()->request->isAjaxRequest) {\n\t\t\t$format = new MyFormatter();\n\t\t\t$returnVal = array();\n\t\t\t$model = ROPasienKirimKeUnitLainV::model()->findByAttributes(array('pasienkirimkeunitlain_id'=>$_POST['pasienkirimkeunitlain_id']));\n\t\t\t$attributes = $model->attributeNames();\n\t\t\tforeach($attributes as $j=>$attribute) {\n\t\t\t\t$returnVal[\"$attribute\"] = $model->$attribute;\n\t\t\t}\n\t\t\t$returnVal[\"tanggal_lahir\"] = $format->formatDateTimeForUser($model->tanggal_lahir);\n\t\t\t$returnVal[\"tgl_pendaftaran\"] = $format->formatDateTimeForUser($model->tgl_pendaftaran);\n\t\t\t$returnVal[\"namalengkapdokter\"] = $model->gelardepan.\" \".$model->nama_pegawai.\" \".$model->gelarbelakang_nama;\n\t\t\techo CJSON::encode($returnVal);\n\t\t}\n\t\tYii::app()->end();\n\t}", "function getLaporan($setorid,$jenis){\r\n\t//$kodeuk='81';\r\n\t//..................................\r\n\t$header=array();\r\n\t$rows[]=array(\r\n\t\tarray('data' => 'DAFTAR TRANSAKSI HARIAN BELANJA DAERAH(DTH)', 'width' => '875px','align'=>'center','style'=>'border:none;font-weight:bold;font-size:120%;'),\r\n\t\t\r\n\t);\r\n\t$rows[]=array(\r\n\t\tarray('data' => 'KABUPATEN JEPARA', 'width' => '875px','align'=>'center','style'=>'border:none;font-weight:bold;font-size:120%;'),\r\n\t\t\r\n\t);\r\n\t$rows[]=array(\r\n\t\tarray('data' => 'BULAN DESEMBER 2016', 'width' => '875px','align'=>'center','style'=>'border:none;font-weight:bold;font-size:120%;'),\r\n\t\t\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => 'Kode', 'width' => '120px','align'=>'left','style'=>'border:none;'),\r\n\t\tarray('data' => ': 102.14', 'width' => '400px','align'=>'left','style'=>'border:none'),\r\n\t);\r\n\t$rows[]=array(\r\n\t\tarray('data' => 'SKPD', 'width' => '120px','align'=>'left','style'=>'border:none;'),\r\n\t\tarray('data' => ': PUSKESMAS KEDUNG II', 'width' => '400px','align'=>'left','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => ' ', 'width' => '400px','align'=>'left','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => 'No. Urut', 'width' => '30px','rowspan'=>2,'align'=>'center','style'=>'border-left:1px solid black;border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'SPM/SPD', 'width' => '120px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'SP2D', 'width' => '120px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'Kode Akun Belanja', 'rowspan'=>2, 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'Potongan Pajak', 'width' => '180px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'Rekaman/Bendahara', 'width' => '280px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'Ket', 'rowspan'=>2, 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\t\r\n\t);\r\n\t$rows[]=array(\r\n\t\tarray('data' => 'Nomor', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'Nilai Belanja', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'Nomor', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'Nilai Belanja', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'Kode Akun', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'Jenis Pajak', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'Jumlah', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'NPWP', 'width' => '140px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => 'Nama', 'width' => '140px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\t\r\n\t);\r\n\t\r\n\tfor($n=0;$n<3;$n++){\r\n\t\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => $n, 'width' => '30px','align'=>'center','style'=>'border-left:1px solid black;border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => ' ', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => ' ', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => ' ', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => ' ', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => ' ', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => ' ', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => ' ', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => ' ', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => ' ', 'width' => '140px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => ' ', 'width' => '140px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => ' ', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\t\r\n\t);\r\n\t\r\n\t}\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => 'TOTAL', 'width' => '90px','align'=>'left','style'=>'border-left:1px solid black;border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => '1', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => '2', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => '3', 'width' => '180px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => '4', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => '5', 'width' => '60px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\tarray('data' => '6', 'width' => '340px','align'=>'center','style'=>'border-top:1px solid black;border-right:1px solid black;border-bottom:1px solid black;'),\r\n\t\t\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => ' ', 'width' => '400px','align'=>'left','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => '<blockquote>Bersama ini terlampir SSP lembar ke-3.</blockquote>', 'width' => '400px','align'=>'left','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => '<blockquote>Yang bertandatangan dibawah ini menyatakan bahwa Daftar Transaksi Harian Belanja Daerah ini dibuat dengan sebenarnya dan saya bertanggungjawab penuh atas kebenaran data yang tercantum dalam Daftar Transaksi Harian Belanja Daerah ini.</blockquote>', 'width' => '800px','align'=>'left','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => ' ', 'width' => '400px','align'=>'left','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => ' ', 'width' => '400px','align'=>'left','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => 'Mengetahui', 'width' => '400px','align'=>'center','style'=>'border:none'),\r\n\t\tarray('data' => 'Jepara, .............................', 'width' => '400px','align'=>'center','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => 'PENGGUNA ANGGARAN', 'width' => '400px','align'=>'center','style'=>'border:none'),\r\n\t\tarray('data' => 'BENDAHARA PENGELUARAN', 'width' => '400px','align'=>'center','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => ' ', 'width' => '400px','align'=>'left','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => ' ', 'width' => '400px','align'=>'left','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => ' ', 'width' => '400px','align'=>'left','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => ' ', 'width' => '400px','align'=>'left','style'=>'border:none'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => '<u>dr. PRIYO PURWANTO</u>', 'width' => '400px','align'=>'center','style'=>'border:none;font-weight:bold;'),\r\n\t\tarray('data' => '<u>ABDUL MANAN</u>', 'width' => '400px','align'=>'center','style'=>'border:none;font-weight:bold;'),\r\n\t);\r\n\t\r\n\t$rows[]=array(\r\n\t\tarray('data' => 'NIP. 196001131999031001', 'width' => '400px','align'=>'center','style'=>'border:none;'),\r\n\t\tarray('data' => 'NIP. 197001052007011021', 'width' => '400px','align'=>'center','style'=>'border:none;font-weight:bold;'),\r\n\t);\r\n\t\r\n\t$output = theme('table', array('header' => $header, 'rows' => $rows ));\r\n\t$rows=null;\r\n\t$output .= createT($header,$rows,null);\r\n\t//$output .= theme('table', array('header' => $header, 'rows' => $rows ));\r\n\treturn $output;\r\n}", "function berinamaTeman($teman){\r\n\t\t\t$this->nama_teman = $teman;\r\n\t\t}", "public function print_suratKeterangan() {\n $status = FALSE;\n $msg = 'Proses buka hasil...';\n\n $noSurat = $this->input->post('no_surat');\n\n $getPrint = $this->data_pengajuan->get_print($noSurat);\n foreach($getPrint as $p) {\n $formPengajuan = $p->form_pengajuan;\n }\n\n if (empty($noSurat)) {\n $status = FALSE;\n $msg = 'Nomor surat tidak ada!';\n } else if(empty($formPengajuan)) {\n $status = FALSE;\n $msg = 'Data surat error!';\n } else {\n if($this->session->userdata('logged_in') == false) {\n $status = FALSE;\n $msg = 'Anda belum masuk akun!';\n } else {\n $status = TRUE;\n $msg = 'Proses lihat surat berhasil buka';\n }\n\n if ($this->session->userdata('staff_desa_in')){\n $status = TRUE;\n $msg = 'Proses lihat surat berhasil buka';\n }\n \n }\n\n echo json_encode(array('dataForm' => $formPengajuan, 'status' => $status, 'message' => $msg));\n\n // $enc = json_encode($formPengajuan);\n // $rjson = str_replace(array(\"\\t\",\"\\n\"), \"\", $enc);\n // $xjson = json_decode($rjson); \n }", "function get_dept_manage_table_data_rows($table_data, $controller) {\n $CI = &get_instance();\n $table_data_rows = '';\n $no = 1;\n foreach ($table_data->result() as $val) {\n $table_data_rows.=get_dept_data_row($val, $controller, $no);\n $no++;\n }\n\n if ($table_data->num_rows() == 0) {\n $table_data_rows.=\"<tr><td colspan='5'><span class='col-md-12 text-center text-warning' >\" . lang('dept_no_dept_to_display') . \"</span></tr>\";\n }\n return $table_data_rows;\n}", "function show_data(){\n\t\t$tmp = str_replace(\"\\n*\",\"\\n\",trim($this->col_data));\n\t\t$tmp = preg_replace(\"/^\\*/\",\"\",$tmp);\n\t\t$value = explode(\"\\n\",$tmp);\n\t\tif(count($value) > 1) $this->col_data = \"*\".implode(\"\\n*\",$value);\n\t\t#echo $this->col_data.\"\\n\";\n\t\treturn $this->col_data;\n\t}", "function show_data(){\n\t\t$tmp = str_replace(\"\\n*\",\"\\n\",trim($this->col_data));\n\t\t$tmp = preg_replace(\"/^\\*/\",\"\",$tmp);\n\t\t$value = explode(\"\\n\",$tmp);\n\t\tif(count($value) > 1) $this->col_data = \"*\".implode(\"\\n*\",$value);\n\t\t#echo $this->col_data.\"\\n\";\n\t\treturn $this->col_data;\n\t}", "public function makeColumns(){\n $hijosDetalle=$this->\n getReportedetalle()->\n where(['and', \"esdetalle='1'\", \"visiblecampo='1'\"])->\n orderBy('orden')->all();\n //echo count( $hijosDetalle);die();\n $columns=[];\n foreach($hijosDetalle as $fila){\n $columns[]=[\n 'attribute'=>$fila->nombre_campo,\n 'label'=>$fila->aliascampo,\n 'format'=>'raw',\n 'options'=>['width'=>\n $this->sizePercentCampo($fila->nombre_campo).'%'],\n ];\n \n \n }\n return $columns;\n \n }", "public function ambildata_perusahaan(){\n\t\t$query=$this->db->query(\"SELECT * FROM tb_perusahaan\");\n\t\treturn $query->result_array();\n\t}", "public function clear()\n {\n $this->id_bangunan = null;\n $this->jenis_prasarana_id = null;\n $this->sekolah_id = null;\n $this->id_tanah = null;\n $this->ptk_id = null;\n $this->id_hapus_buku = null;\n $this->kepemilikan_sarpras_id = null;\n $this->kd_kl = null;\n $this->kd_satker = null;\n $this->kd_brg = null;\n $this->nup = null;\n $this->kode_eselon1 = null;\n $this->nama_eselon1 = null;\n $this->kode_sub_satker = null;\n $this->nama_sub_satker = null;\n $this->nama = null;\n $this->panjang = null;\n $this->lebar = null;\n $this->nilai_perolehan_aset = null;\n $this->jml_lantai = null;\n $this->thn_dibangun = null;\n $this->luas_tapak_bangunan = null;\n $this->vol_pondasi_m3 = null;\n $this->vol_sloop_kolom_balok_m3 = null;\n $this->panj_kudakuda_m = null;\n $this->vol_kudakuda_m3 = null;\n $this->panj_kaso_m = null;\n $this->panj_reng_m = null;\n $this->luas_tutup_atap_m2 = null;\n $this->kd_satker_tanah = null;\n $this->nm_satker_tanah = null;\n $this->kd_brg_tanah = null;\n $this->nm_brg_tanah = null;\n $this->nup_brg_tanah = null;\n $this->tgl_sk_pemakai = null;\n $this->tgl_hapus_buku = null;\n $this->ket_bangunan = null;\n $this->asal_data = null;\n $this->create_date = null;\n $this->last_update = null;\n $this->soft_delete = null;\n $this->last_sync = null;\n $this->updater_id = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "function ambil_data(){\n\t\t$this->db->order_by($this->id_admin,$this->order);\n\t\treturn $this->db->get($this->nama_table)->result();\n\t}", "public function data_kelas()\n\t{\n\t\t$query1 = \"SELECT t_kelas.id_kelas,t_kelas.nama_kelas,t_kelas.id_prodi,t_prodi.id_prodi,t_prodi.prodi FROM t_kelas INNER JOIN t_prodi ON t_kelas.id_prodi=t_prodi.id_prodi WHERE prodi = 'Analisis Kimia'\";\n\t\t$query2 = \"SELECT t_kelas.id_kelas,t_kelas.nama_kelas,t_kelas.id_prodi,t_prodi.id_prodi,t_prodi.prodi FROm t_kelas INNER JOIN t_prodi ON t_kelas.id_prodi=t_prodi.id_prodi WHERE prodi = 'Penjaminan Mutu Industri Pangan'\";\n\t\t$query3 = \"SELECT t_kelas.id_kelas,t_kelas.nama_kelas,t_kelas.id_prodi,t_prodi.id_prodi,t_prodi.prodi FROm t_kelas INNER JOIN t_prodi ON t_kelas.id_prodi=t_prodi.id_prodi WHERE prodi = 'Pengolahan Limbah Industri'\";\n\t\t$data['prodi1'] = $this->m_aka->query_aka($query1);\n\t\t$data['prodi2'] = $this->m_aka->query_aka($query2);\n\t\t$data['prodi3'] = $this->m_aka->query_aka($query3);\n\t\t$data['data'] = $this->m_aka->data_kelas(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'data_kelas';\n\t\t$this->load->view('content', $data);\n\t}", "private function setToData()\n {\n if($this->getTos()){\n $toArray = [];\n foreach($this->getTos() as $to){\n $toArray[] = $this->setEmailNameString($to['email'], $to['name']);\n } \n\n return implode(',', $toArray); \n }\n \n return '';\n }" ]
[ "0.658215", "0.65003103", "0.6413224", "0.6362615", "0.63230926", "0.629799", "0.61734396", "0.60093755", "0.59709287", "0.58908755", "0.58825624", "0.58238286", "0.58049756", "0.5783349", "0.57729936", "0.5736681", "0.57201505", "0.57145363", "0.57129645", "0.570564", "0.57037467", "0.570166", "0.57007074", "0.56980634", "0.5684739", "0.56691444", "0.5654788", "0.5653106", "0.5643975", "0.56314164", "0.5629295", "0.56282103", "0.56282103", "0.5622112", "0.5605063", "0.5602786", "0.5600554", "0.55992776", "0.55981594", "0.5594154", "0.5592775", "0.5588154", "0.55835396", "0.55833936", "0.5578134", "0.55716926", "0.5568269", "0.55509126", "0.55263513", "0.55248886", "0.5502135", "0.54958713", "0.54941726", "0.5492482", "0.54857755", "0.5456104", "0.5454608", "0.54534477", "0.5394499", "0.53902173", "0.538728", "0.5384775", "0.5382193", "0.5378687", "0.53763294", "0.5374766", "0.53669375", "0.536511", "0.5362176", "0.5355709", "0.5354349", "0.5353681", "0.53527105", "0.5348774", "0.53467155", "0.5343208", "0.53406477", "0.5336688", "0.53350884", "0.5332961", "0.5321081", "0.5320347", "0.5309066", "0.53071606", "0.5305637", "0.5302854", "0.5302435", "0.5300323", "0.52946854", "0.52925545", "0.52889127", "0.5288498", "0.528668", "0.5284716", "0.5284716", "0.52832097", "0.5278726", "0.52720165", "0.5270972", "0.5265078", "0.52535754" ]
0.0
-1
Fungsi untuk menyimpan data yang telah diinput
public function simpan() { $aturan = [ 'nama' => ['required', 'min:2', 'max:150'], 'namaJenazah' => ['required'], 'email' => ['required', 'email', 'unique:peziarah,email'], 'tanggal_dipilih' => ['required'], 'waktu_dipilih' => ['required'], 'jenis_kelamin' => ['required'], 'no_hp' => ['required', 'numeric', 'unique:peziarah,no_hp'], ]; // Pesan validasi jika error $pesan = [ // Field nama 'nama.required' => 'Harap masukan nama peziarah!', 'nama.min' => 'Nama peziarah tidak boleh kurang dari 2 karakter', 'nama.max' => 'Nama peziarah tidak boleh lebug dari 150 karakter', // Field nama jenazah 'namaJenazah.required' => 'Harap masukkan nama dari jenazah!', // Field email 'email.required' => "Harap masukan email.", 'email.email' => "Harap masukan email yang valid/benar.", 'email.unique' => "Email ini telah terdaftar!, silahkan masukkan email baru.", // Field jadwal 'tanggal_dipilih.required' => 'Harap masukkan tanggal ziarah.', 'waktu_dipilih.required' => 'Silahkan memilih waktu ziarah.', // Field jenis kelamin 'jenis_kelamin.required' => "Silahkan masukkan jenis kelamin dari peziarah.", // Field no hp 'no_hp.required' => 'Silahkan masukkan no whatsapp yang aktif.', 'no_hp.numeric' => 'Kolom nomor hp hanya boleh berisikan angka.', 'no_hp.unique' => 'Nomor telepon(whatsapp) telah terdaftar!, Silahkan masukkan nomor baru.', ]; // validasi input $this->validate($aturan, $pesan); try { $data['nama'] = $this->nama; $data['jenazah_id'] = $this->jenazah_id; $data['jenis_kelamin'] = $this->jenis_kelamin; $data['email'] = $this->email; $data['no_hp'] = $this->no_hp; $jenazah = Jenazah::find($this->jenazah_id); $peziarah = $jenazah->peziarah()->create($data); if ($peziarah instanceof Peziarah) { $peziarah->waktu_ziarah()->attach($this->waktu_dipilih, [ 'tanggal_id' => $this->tanggal_dipilih, ]); $waktu_ziarah = WaktuZiarah::find($this->waktu_dipilih); $waktu_ziarah->tanggal()->where('tanggal_id', $this->tanggal_dipilih); // ... } if (!$peziarah) throw new \Exception("Gagal menambahkan peziarah."); // reset semua property user $this->reset( 'nama', 'namaJenazah', 'jenazah_id', 'jenis_kelamin', 'alamat_jenazah', 'waktu_dipilih', 'email', 'no_hp', ); $this->dapatkanJadwal(); return $this->dispatchBrowserEvent('onActionInfo', [ 'type' => 'success', 'title' => "Berhasil mendaftarkan peziarah!", 'message' => "Kami akan mengirimkan pemberitahuan terkait jadwal anda melalui email atau whatsapp yang telah anda masukkan & harap mematuhi protokol kesehatan.", ]); // ... } catch (\Exception $e) { $this->dispatchBrowserEvent('onActionInfo', [ 'type' => 'error', 'title' => "Error", 'message' => $e->getMessage(), ]); // ... } // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function input_data($data,$table){\n\t\t$this->db->insert($table,$data);//menginputkan data ke database dengan function input_data\n }", "public function input(){\n\t\t$nama = $this->input->post('nama');\n\t\t$instansi = $this->input->post('nama_instansi');\n\t\t$status = $this->input->post('status');\n\t\t$tanggal_input = $this->input->post('tanggal_input');\n\t\t$tanggal_output = $this->input->post('tanggal_output');\n\t\t$materi = $this->input->post('materi');\n\n\t\t$data = array(\n\t\t\t'nama' => $nama,\n\t\t\t'nama_instansi' => $instansi,\n\t\t\t'status' => 'belum dikonfirmasi',\n\t\t\t'tanggal_input' => $tanggal_input,\n\t\t\t'tanggal_output' => $tanggal_output,\n\t\t\t'materi' => $materi\n\t\t);\n\n\t\t$this->sinisa_model->input_data($data, 'penyuluhan');\n\t\tredirect('sinisa/penyuluhan');\n\t}", "public function input(){\n $username = $this->input->post('username'); //untuk menambahkan data ke field username\n $password = $this->input->post('pass'); //untuk menambahkan data ke field password\n $nama = $this->input->post('nama'); //untuk menambahkan data ke field nama\n $grup = $this->input->post('grup'); //untuk menambahkan data ke field grup\n \n $data = array( //tipe data terstruktur yang berguna untuk menyimpan sejumlah data yang bertipe sama\n 'username' => $username,\n 'password' => $password,\n 'nama' => $nama,\n 'grup' => $grup\n );\n $this->Mahasiswa_model->input_data($data,'tm_user'); //memproses data melalui file mahasiswa_model di method input_data\n redirect('Mahasiswa/index'); //kembali ke tampilan home_mahasiswa\n }", "public function prosesinput_data_biaya_kuliah(){\n\t\t$this->m_aka->prosesinput_data_biaya_kuliah();\n\t\tredirect('c_index_aka/data_biaya_kuliah');\n\t}", "public function input($_data){\n\t\t$this->data=$_data;\n\t}", "public function inputbarang(){\n\t\t$id_barang = $this->input->post('id_barang');\n\t\t$nama_barang = $this->input->post('nama_barang');\n\t\t$harga = $this->input->post('harga');\n\t\t$stok = $this->input->post('stok');\n\t\t$gambar = $this->input->post('gambar');\n\n\t\t$data = array(\n\t\t\t'id_barang' => $id_barang,\n\t\t\t'nama_barang' => $nama_barang,\n\t\t\t'harga' => $harga,\n\t\t\t'stok' => $stok,\n\t\t\t'gambar' => $gambar\n\t\t);\n\n\t\t$this->sinisa_model->inputdatabarang($data, 'barang');\n\t\tredirect('sinisa/sewa');\n\t}", "public function InputDataLapor(){\n\n\t\t $data['judul1'] = 'Form Tambah Laporan';\n\n\t \t\t$this->load->view('templates/header',$data);\n\t\t\t$this->load->view('Lapor/halaman_Laporan');//folder dan file\n\t\t\t$this->load->view('templates/footer');\t \t\n\t }", "public function prosesinput_mata_kuliah(){\n\n\t\t$this->m_aka->prosesinput_mata_kuliah();\n\t\tredirect('c_index_aka/data_mata_kuliah');\n\t}", "public function getDataInputField();", "public function input_masuk($data){\n\t\treturn $this->db->insert('transaksi_barang', $data);\n\t}", "public function kosongkanDataBarang() {\n $this->daftar_barang = [];\n $this->editData();\n }", "public function prosesinput_data_dosen(){\n\t\t$this->m_aka->prosesinput_data_dosen();\n\t\tredirect('c_index_aka/data_dosen');\n\t}", "public function input_mata_kuliah(){\n\t\t$mk = \"t_mk\";\n\t\t$data['content'] = 'mata_kuliah/input_mata_kuliah';\n\t\t$data['mata_kuliah'] = $this->m_aka->get_all($mk);\n\t\t$this->load->view('content',$data);\n\t}", "public function getTalukData($input);", "function caridata()\n\t\t{\n\t\t\t$data['kode'] = $this->Pendataan_model->getIdDahak();\n\t\t\t$data['keyword'] = $this->input->post(\"keyword\");\n\t\t\t$data['pasientbc']= $this->Pendataan_model->getByName($data['keyword'])->row_array();\n\t\t\t$this->load->view(\"cekdahak/form_cekdahak2\", $data);\n\t\t}", "public function simpan_data_misi()\n {\n $aksi = $this->input->post('aksi');\n $id_misi = $this->input->post('id_misi');\n $misi = $this->input->post('nama_misi');\n\n $data = ['misi' => $misi,\n 'add_time' => date(\"Y-m-d H:i:s\", now('Asia/Jakarta')),\n 'add_by' => $this->session->userdata('id_user')\n ];\n\n if ($aksi == 'Tambah') {\n $this->M_master->input_data('m_misi', $data);\n } elseif ($aksi == 'Ubah') {\n $this->M_master->ubah_data('m_misi', $data, array('id_misi' => $id_misi));\n } elseif ($aksi == 'Hapus') {\n $this->M_master->hapus_data('m_misi', array('id_misi' => $id_misi));\n }\n\n echo json_encode($aksi);\n }", "public function tampilDataGalang(){\n\t\t\n\t}", "function cariMedanInput($ubah,$f,$row,$nama) \n{// papar medan yang terlibat\n \n $cariMedan = array(0,1,2,3,4,5,6,8);\n $cariText = array(0); // papar jika nota ada\n $cariMsic = array(8); // papar input text msic sahaja \n $namaM = $ubah .'[' . $nama . ']';\n \n // tentukan medan yang ada input\n $input=in_array($f,$cariMedan)? \n (@in_array($f,$cariMsic)? // tentukan medan yang ada msic\n '<input type=\"text\" name=\"' . $namaM . '\" value=\"' . $row[$f] . '\" size=6>'\n :(@in_array($f,$cariText)? // tentukan medan yang ada input textarea\n '<textarea name=\"' . $namaM . '\" rows=2 cols=23>' . $row[$f] . '</textarea>'\n : // tentukan medan yang bukan input textarea\n '<input type=\"text\" name=\"' . $namaM . '\" value=\"' . $row[$f] . '\" size=30>'\n )\n ):'<label class=\"papan\">' . $row[$f] . '</label>';\n \n return $input;\n\n}", "public function formDataDiri()\n\t{\n\t\t$username = $this->session->userdata('user');\n\t\t$data=array('username' => $this->session->userdata('user'),\n\t\t\t\t\t'cekDataDiri'=>$this->M_hrd->cekDataDiri($username));\n\t\t$this->load->view('user/karir/headerCareer',$data);\n\t\t$this->load->view('user/karir/form_datadiri',$data);\n\t\t$this->load->view('user/karir/footerCareer');\n\t}", "public function input_data_kalender_akademik(){\n\t\t$data['content'] = 'jadwal/input_data_kalender_akademik';\n\t\t$this->load->view('content',$data);\n\t}", "public function inputsewa(){\n\t\t$nik = $this->input->post('nik');\n\t\t$nama = $this->input->post('nama');\n\t\t$no_telepon = $this->input->post('no_telepon');\n\t\t$nama_barang = $this->input->post('nama_barang');\n\t\t$id_barang = $this->input->post('id_barang');\n\t\t$tanggalsewa = $this->input->post('tanggalsewa');\n\t\t$tanggalkembali = $this->input->post('tanggalkembali');\n\t\t$lamasewa = $this->input->post('lamasewa');\n\t\t$harga_sewa = $this->input->post('harga_sewa');\n\t\t$asal = $this->input->post('asal');\n\t\t$alamat = $this->input->post('alamat');\n\n\t\t$data = array(\n\t\t\t'nik' => $nik,\n\t\t\t'nama' => $nama,\n\t\t\t'no_telepon' => $no_telepon,\n\t\t\t'nama_barang' => $nama_barang,\n\t\t\t'id_barang' => $id_barang,\n\t\t\t'tanggal_sewa' => $tanggalsewa,\n\t\t\t'tanggal_kembali' => $tanggalkembali,\n\t\t\t'jumlah_hari' => $lamasewa,\n\t\t\t'harga_sewa' => $harga_sewa,\n\t\t\t'asal' => $asal,\n\t\t\t'alamat' => $alamat\n\t\t);\n\n\t\t$this->sinisa_model->inputdatasewa($data, 'sewa');\n\t\tredirect('sinisa/sewa');\n\t}", "public function add_data_mahasiswa()\n\t{\n\t\t$save = $this->input->post('add_mahasiswa');\n\t\t$kelas = 't_kelas';\n\t\t$tahun = 't_tahun_akademik';\n\t\t$prodi = \"t_prodi\";\n\t\t$data['kelas'] = $this->m_aka->get_all($kelas);\n\t\t$data['tahun_aka'] = $this->m_aka->get_all($tahun);\n\t\t$data['prodi'] = $this->m_aka->get_all($prodi);\n\t\t$data['content'] = 'mahasiswa/tambah_mahasiswa';\n\t\t$this->load->view('content', $data);\n\t}", "public function insertData()\n\t{\n\t\t$data = array(\n\t\t\t/* 'id' yang dikiri harus sama seperti di table\n\t\t\t'id' yang dikanan harus menurut name inputnya */\n\t\t\t'id_transaksi' => $this->input->post('id_transaksi'),\n\t\t\t'id_pelanggan' => $this->input->post('id_pelanggan'),\n\t\t\t'order_id' => $this->input->post('order_id'),\n\t\t\t'message' => $this->input->post('message'),\n\t\t\t'tgl_kirim' => $this->input->post('tgl_kirim'),\n\t\t\t'tgl_terima' => $this->input->post('tgl_terima')\n\t\t);\n\t\t/* jika semua sama sperti di table\n\t\tgunakan versi simple seprti berikut */\n\t\t$data = $this->input->post();\n\t\t/* eksekusi query insert into \"transaksi\" diisi dengan variable $data\n\t\tface2face ae lek bingung :| */\n\t\t$this->db->insert(\"transaksi\",$data);\n\t}", "public function inputData($staf){\n\t\t$staf->alamat_domisili = $this->input_alamat_domisili;\n\t\t$staf->alamat_ktp = $this->input_alamat_ktp;\n\t\t$staf->email = $this->input_email;\n\t\t$staf->titel_id = $this->input_titel_id;\n\t\t$staf->ktp = $this->input_ktp;\n\t\t$staf->jenis_kelamin = $this->input_jenis_kelamin;\n\t\t$staf->nama = $this->input_nama;;\n\t\t$staf->no_hp = $this->input_no_hp;\n\t\t$staf->no_telp = $this->input_no_telp;\n\t\t$staf->str = $this->input_str;\n\t\t$staf->menikah = $this->input_menikah;\n\t\t$staf->jumlah_anak = $this->input_jumlah_anak;\n\t\t$staf->npwp = $this->input_npwp;\n\t\t$staf->sip = $this->input_sip;\n\t\t$staf->sip_expiry_date = Input::get('sip_expiry_date');\n\t\t$staf->str_expiry_date = Input::get('str_expiry_date');\n\t\t$staf->nomor_rekening = $this->input_nomor_rekening ;\n\t\t$staf->bank = $this->input_bank ;\n\t\t$staf->tanggal_lahir = Input::get('tanggal_lahir');\n\t\t$staf->tanggal_lulus = Input::get('tanggal_lulus');\n\t\t$staf->tanggal_mulai = Input::get('tanggal_mulai');\n\t\t$staf->universitas_asal = $this->input_universitas_asal;\n\n\t\t$staf->save();\n\n\t\t$staf->image = $this->imageUpload('image', 'image', $staf);\n\t\t$staf->ktp_image = $this->imageUpload('ktp', 'ktp_image', $staf);\n\t\t$staf->str_image = $this->imageUpload('str', 'str_image', $staf);\n\t\t$staf->sip_image = $this->imageUpload('sip', 'sip_image', $staf);\n\t\t$staf->ijazah_image = $this->imageUpload('ijazah', 'ijazah_image', $staf);\n\t\t$staf->bukti_registrasi_kki_image = $this->imageUpload('bukti_registrasi_kki', 'bukti_registrasi_kki_image', $staf);\n\t\t$staf->gambar_npwp = $this->imageUpload('npwp', 'gambar_npwp', $staf);\n\t\t$staf->kartu_keluarga = $this->imageUpload('kk', 'kartu_keluarga', $staf);\n\n\t\t$staf->save();\n\n if ( session()->has('warning_biru') ) {\n $warning_biru = session()->get('warning_biru');\n if (isset( $warning_biru[$staf->id] ) ) {\n unset( $warning_biru[$staf->id] );\n }\n }\n\t\treturn $staf;\n\t}", "public function simpan_data_field_sppa()\n {\n $aksi = $this->input->post('aksi');\n $id_field_sppa = $this->input->post('id_field_sppa');\n $field_sppa = $this->input->post('field_sppa');\n\n $data = [ 'field_sppa' => $field_sppa,\n 'add_time' => date(\"Y-m-d H:i:s\", now('Asia/Jakarta')),\n 'add_by' => $this->session->userdata('id_user')\n ];\n\n if ($aksi == 'Tambah') {\n $this->M_master->input_data('m_field_sppa', $data);\n } elseif ($aksi == 'Ubah') {\n $this->M_master->ubah_data('m_field_sppa', $data, array('id_field_sppa' => $id_field_sppa));\n } elseif ($aksi == 'Hapus') {\n $this->M_master->hapus_data('m_field_sppa', array('id_field_sppa' => $id_field_sppa));\n }\n\n echo json_encode($aksi);\n }", "public function editData() {\n $this->daftar_barang = array_values($this->daftar_barang);\n $data_barang = json_encode($this->daftar_barang, JSON_PRETTY_PRINT);\n file_put_contents($this->file, $data_barang);\n $this->ambilData();\n }", "public function simpanDataPengadilan($post){\n\t\t$connection \t= $this->db;\n\t\t$isNewRecord \t= htmlspecialchars($post['isNewRecord'], ENT_QUOTES);\n\t\t$tingkat \t\t= htmlspecialchars($post['tingkat'], ENT_QUOTES);\n\t\t$propinsi \t\t= htmlspecialchars($post['propinsi'], ENT_QUOTES);\n\t\t$kabupaten \t\t= htmlspecialchars($post['kabupaten'], ENT_QUOTES);\n\t\t$deskripsi \t\t= htmlspecialchars($post['deskripsi'], ENT_QUOTES);\n\t\t$alamat \t\t= htmlspecialchars($post['alamat'], ENT_QUOTES);\n\t\t\n\t\tif($tingkat == \"\" || $propinsi == \"\"){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Tingkat pengadilan, dan provinsi harus diisi\");\n\t\t} else if($tingkat == \"2\" && ($propinsi == \"\" || $kabupaten == \"\")){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Tingkat pengadilan, provinsi, dan kabupaten harus diisi\");\n\t\t} else{\n\t\t\t$transaction = $connection->beginTransaction();\n\t\t\ttry {\n\t\t\t\tif($isNewRecord){\n\t\t\t\t\tif($tingkat == 1){\n\t\t\t\t\t\t$cek1 = \"select deskripsi from datun.m_propinsi where id_prop = '\".$propinsi.\"'\";\n\t\t\t\t\t\t$prop = $connection->createCommand($cek1)->queryScalar();\n\t\t\t\t\t\t$sql1 = \"insert into datun.pengadilan_tk1 values('\".$propinsi.\"', 'Pengadilan Tinggi \".ucwords(strtolower($prop)).\"', '\".$alamat.\"')\";\n\t\t\t\t\t} else if($tingkat == 2){\n\t\t\t\t\t\t$cek1 = \"select deskripsi_kabupaten_kota from datun.m_kabupaten where id_prop = '\".$propinsi.\"' and id_kabupaten_kota = '\".$kabupaten.\"'\";\n\t\t\t\t\t\t$prop = $connection->createCommand($cek1)->queryScalar();\n\t\t\t\t\t\t$sql1 = \"insert into datun.pengadilan_tk2 values('\".$propinsi.\"', '\".$kabupaten.\"', 'Pengadilan Negeri \".ucwords(strtolower($prop)).\"', '\".$alamat.\"')\";\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\tif($kabupaten == '00'){\n\t\t\t\t\t\t$sql1 = \"update datun.pengadilan_tk1 set deskripsi_tk1 = '\".$deskripsi.\"', alamat = '\".$alamat.\"' where kode_pengadilan_tk1 = '\".$propinsi.\"'\";\n\t\t\t\t\t} else{\n\t\t\t\t\t\t$sql1 = \"update datun.pengadilan_tk2 set deskripsi_tk2 = '\".$deskripsi.\"', alamat = '\".$alamat.\"' where kode_pengadilan_tk1 = '\".$propinsi.\"' \n\t\t\t\t\t\t\t\tand kode_pengadilan_tk2 = '\".$kabupaten.\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$connection->createCommand($sql1)->execute();\n\t\t\t\t$transaction->commit();\n\t\t\t\treturn array(\"hasil\"=>true, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t$transaction->rollBack();\n\t\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t}\n\t\t}\n\t}", "function inputDataPelanggan($nama, $alamat, $email, $userID) {\n\t\t$dataPelanggan = array(\n\t\t\t'nama_pelanggan' => $nama,\n\t\t\t'alamat_pelanggan' => $alamat,\n\t\t\t'email_pelanggan' => $email,\n\t\t\t'id_user' => $userID\n\t\t);\n\t\t$this->pelanggan->insertData($dataPelanggan);\n\t\t$this->session->set_flashdata('error_messages',' <div><label for=\"Alert\" style=\"color:green\">Silahkan Melakukan Login</label></div>');\n\t}", "public function input_aksi() {\n $this->is_loggedIn();\n $this->is_admin();\n $this->_rules();\n\n if($this->form_validation->run()==FALSE) {\n $this->input();\n }\n else {\n $userId = $this->input->post('uId');\n $plate_number = $this->input->post('plate_number');\n $project_location = $this->input->post('project_location');\n $km_onStart = $this->input->post('lk__km_onStart');\n $km_onFinish = $this->input->post('lk__km_onFinish');\n $km_total = $this->input->post('km_total');\n $gasoline = 0;\n\n $data = array(\n 'userId' => $userId,\n 'plate_number' => $plate_number,\n 'project_location' => $project_location,\n 'km_onStart' => $km_onStart,\n 'km_onFinish' => $km_onFinish,\n 'km_total' => $km_total,\n 'gasoline' => $gasoline\n );\n $this->LKDTModel->setDataLaporan($data);\n redirect('administrator/laporandt');\n }\n }", "protected function getInputData ()\n {\n (new HCRivilePaymentsValidator())->validateForm();\n\n $_data = request()->all();\n\n if (array_has($_data, 'id'))\n array_set($data, 'record.id', array_get($_data, 'id'));\n\n array_set($data, 'record.COUNT', array_get($_data, 'COUNT'));\n array_set($data, 'record.I04_KODAS_CH', array_get($_data, 'I04_KODAS_CH'));\n array_set($data, 'record.I04_DOK_NR', array_get($_data, 'I04_DOK_NR'));\n array_set($data, 'record.I04_OP_RUSIS', array_get($_data, 'I04_OP_RUSIS'));\n array_set($data, 'record.I04_OP_TIPAS', array_get($_data, 'I04_OP_TIPAS'));\n array_set($data, 'record.I04_OP_STORNO', array_get($_data, 'I04_OP_STORNO'));\n array_set($data, 'record.I04_OP_DATA', array_get($_data, 'I04_OP_DATA'));\n array_set($data, 'record.I04_KODAS_SS', array_get($_data, 'I04_KODAS_SS'));\n array_set($data, 'record.I04_MOKETOJAS', array_get($_data, 'I04_MOKETOJAS'));\n array_set($data, 'record.I04_KODAS_KS', array_get($_data, 'I04_KODAS_KS'));\n array_set($data, 'record.I04_PAV', array_get($_data, 'I04_PAV'));\n array_set($data, 'record.I04_ADR', array_get($_data, 'I04_ADR'));\n array_set($data, 'record.I04_ATSTOVAS', array_get($_data, 'I04_ATSTOVAS'));\n array_set($data, 'record.I04_KODAS_VS', array_get($_data, 'I04_KODAS_VS'));\n array_set($data, 'record.I04_SUMA', array_get($_data, 'I04_SUMA'));\n array_set($data, 'record.I04_SUMA_DSK', array_get($_data, 'I04_SUMA_DSK'));\n array_set($data, 'record.I04_SUMA_PLK', array_get($_data, 'I04_SUMA_PLK'));\n array_set($data, 'record.I04_PASTABOS', array_get($_data, 'I04_PASTABOS'));\n array_set($data, 'record.I04_PERKELTA', array_get($_data, 'I04_PERKELTA'));\n array_set($data, 'record.I04_IMP_EXP', array_get($_data, 'I04_IMP_EXP'));\n array_set($data, 'record.I04_KODAS_VL', array_get($_data, 'I04_KODAS_VL'));\n array_set($data, 'record.I04_SUMA_VAL', array_get($_data, 'I04_SUMA_VAL'));\n array_set($data, 'record.I04_KOEF', array_get($_data, 'I04_KOEF'));\n array_set($data, 'record.I04_USERIS', array_get($_data, 'I04_USERIS'));\n array_set($data, 'record.I04_R_DATE', array_get($_data, 'I04_R_DATE'));\n array_set($data, 'record.I04_ADDUSR', array_get($_data, 'I04_ADDUSR'));\n array_set($data, 'record.I04_KODAS_SM', array_get($_data, 'I04_KODAS_SM'));\n array_set($data, 'record.I04_APRASYMAS', array_get($_data, 'I04_APRASYMAS'));\n array_set($data, 'record.I04_SUMA_PER', array_get($_data, 'I04_SUMA_PER'));\n array_set($data, 'record.I04_SUMA_WK', array_get($_data, 'I04_SUMA_WK'));\n array_set($data, 'record.I04_KODAS_LS_1', array_get($_data, 'I04_KODAS_LS_1'));\n array_set($data, 'record.I04_KODAS_LS_2', array_get($_data, 'I04_KODAS_LS_2'));\n array_set($data, 'record.I04_KODAS_LS_3', array_get($_data, 'I04_KODAS_LS_3'));\n array_set($data, 'record.I04_KODAS_LS_4', array_get($_data, 'I04_KODAS_LS_4'));\n array_set($data, 'record.I04_KODAS_ZN', array_get($_data, 'I04_KODAS_ZN'));\n array_set($data, 'record.I04_BUSENA', array_get($_data, 'I04_BUSENA'));\n\n return makeEmptyNullable($data);\n }", "function TambahDataTemplatePesan()\n\t{\n\t\tinclude '../../koneksi/koneksi.php';\n\n\t\t//inisialisasi\n\t\t$jenis = $_POST['jenis'];\n\t\t$isi = $_POST['isi'];\n\n\t\t//insert ke tabel pesan\n\t\t$sql = \"INSERT INTO pesan (jenis, isi) VALUES(?, ?)\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param('ss', $jenis, $isi);\n\t\tif($stmt->execute()){\n\t\t\t$stmt->insert_id;\n\t\t\t$_SESSION['status_operasi_tp'] = \"berhasil_menyimpan\";\n\t\t}else{\n\t\t\t$_SESSION['status_operasi_tp'] = \"gagal_menyimpan\";\n\t\t}\n\t\t$stmt->close();\n\t}", "function inputdata($data)\n\t{\n\t\t$this->db->insert($this->table, $data);\n\t}", "public function prosesinput_jadwal_kuliah(){\n\t\t$this->m_aka->prosesinput_jadwal_kuliah();\n\t\tredirect('c_index_aka/data_jadwal_kuliah');\n\t}", "public function proses_tambah()\n\t{\n\t\t$data = array(\n\t\t\t'page_title' \t=> \"Tambah Latihan Soal\", \n\t\t\t'form_action' => current_url(),\n\t\t\t'submateri'\t\t=> $this->model_adm->fetch_all_materi()\n\t\t\t);\n\n\t\t//fetch input (make sure that the variable name is the same as column name in database!) \n\t\t$params \t\t\t\t= $this->input->post(null, true);\n\t\t$sub_materi \t\t \t\t= $params['sub_materi'];\n\n\t\t$this->form_validation->set_rules('sub_materi', 'Sub Materi', 'required');\n\t\t\n\t\t//run the validation\n\t\tif ($this->form_validation->run() == FALSE) \n\t\t{\n\t\t\talert_error(\"Error\", \"Data gagal ditambahkan\");\n\t\t\t$this->load->view('pg_admin/latihansoal_form', $data);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//passing input value to Model\n\t\t\t$result = $this->model_adm->add_latihan_soal($sub_materi);\n\t\t\talert_success(\"Sukses\", \"Data berhasil ditambahkan\");\n\t\t\tredirect('pg_admin/latihansoal');\n\t\t\t// echo \"Status Insert: \" . $result;\n\t\t}\t\n\t}", "function tambah_data($perusahaan, $kategori, $nama_file, $masa_berlaku){\r\n\t\t\t$perusahaan \t= escape($perusahaan);\r\n\t\t\t$kategori \t\t= escape($kategori);\r\n\t\t\t$nama_file\t\t= escape($nama_file);\r\n\t\t\t$masa_berlaku\t= escape($masa_berlaku);\r\n\t\t\t\r\n\t\t\t$query \t= \"INSERT INTO data (pt, kategori, nama_file, masa_berlaku) VALUES ('$perusahaan', '$kategori', '$nama_file', '$masa_berlaku')\";\r\n\t\t\treturn run($query);\r\n\t\t}", "public function prosesinput_bahan_kuliah(){\n\n\t\t$this->m_aka->prosesinput_bahan_kuliah();\n\t\tredirect('c_index_aka/data_bahan_kuliah');\n\t}", "public function input($data) \n \t\t{\n \t \t\t#insert data\n \t\t$this->db->insert('table_post', $data);\n \t\t}", "public static function tambah($data)\n {\n \nerror_reporting(\"E_ALL\") ;\n\n // data\n $detailgaji\t \t\t\t= new Detailgajiku;\n $detailgaji->kd_potongan\t\t= $data['kd_potongan'];\n\t\n $detailgaji->nomor \t\t= $data['nomor'];\n $detailgaji->jumlah \t\t= $data['jumlah'];\t\n\t\n // simpan\n return ($detailgaji->save()) ? true : false;\n }", "public function add_peserta_borang($data) {\r\n $objektif = $this-> input -> post('objektif');\r\n $sebab = $this-> input -> post('sebab');\r\n $penyampaian =$this -> input ->post('penyampaian');\r\n $komunikasi = $this-> input -> post('komunikasi');\r\n $interaksi =$this -> input ->post('interaksi');\r\n $respon = $this-> input -> post('respon');\r\n $difahami =$this -> input ->post('difahami');\r\n $kesan = $this-> input -> post('kesan');\r\n $aktiviti =$this -> input ->post('aktiviti');\r\n $bahan = $this-> input -> post('bahan');\r\n $tahap =$this -> input ->post('tahap');\r\n $kemahiran = $this-> input -> post('kemahiran');\r\n $tempoh =$this -> input ->post('tempoh');\r\n $lokasi = $this-> input -> post('lokasi');\r\n $penginapan =$this -> input ->post('penginapan');\r\n $makanan = $this-> input -> post('makanan');\r\n $dewan =$this -> input ->post('dewan');\r\n $urusetia = $this-> input -> post('urusetia');\r\n $faedah = $this-> input -> post('faedah');\r\n $cadangan = $this-> input -> post('cadangan');\r\n\r\n \r\n\r\n $data = array(\r\n 'ID_LATIHAN' => $data['id_latihan'],\r\n 'ID_USER' => $data['user'],\r\n 'ID_PENYELIA' =>$data['penyelia'],\r\n 'Objektif' => $objektif,\r\n 'Sebab' => $sebab,\r\n 'Penyampaian' => $penyampaian,\r\n 'Komunikasi' => $komunikasi,\r\n 'Interaksi' => $interaksi,\r\n 'Respon' => $respon,\r\n 'Difahami' => $difahami,\r\n 'Kesan' => $kesan,\r\n 'Aktiviti' => $aktiviti,\r\n 'BahanKursus' => $bahan,\r\n 'TahapPengetahuan' => $tahap,\r\n 'Kemahiran' => $kemahiran,\r\n 'TempohLatihan' => $tempoh,\r\n 'Lokasi' => $lokasi,\r\n 'Makanan' => $makanan,\r\n 'DewanKuliah' => $dewan,\r\n 'Urusetia' => $urusetia,\r\n 'Faedah' => $faedah,\r\n 'Cadangan' => $cadangan\r\n );\r\n\r\n $this-> db -> insert('penilaianpeserta',$data);\r\n \r\n}", "function tambah_data ($data){\n\t\treturn $this->db->insert($this->nama_table,$data);\n\t}", "public function personaldatapokokAction()\n\t{\n\t\t\n\t\t\t\n\t\t//echo \"nip=$nip\";\n\t\t$userid = $this->user;\n\t\t$this->view->perintah = $_REQUEST['perintah'];\n\t\t\n\t\t//echo $this->view->perintah;\n\t\tif($this->view->perintah == \"UPDATE\")\n\t\t{\n\t\t\t$nip = $_REQUEST['nip'];\n\t\t}\n\t\t\n\t\t$this->view->nip=$nip;\n\t\t\n\t\t$this->view->personalStatusList = $this->auditor_serv->getPersonalStatusList();\n\t\t//$this->view->personalList = $this->auditor_serv->getPersonalListByUser($nip, $nama, $stat, 1, 1);\n\t\t$this->view->personalDetail = $this->auditor_serv->getPersonalDetail($nip);\n\t\t\n\t\t$this->view->propinsiList = $this->auditor_serv->getPropinsiListAll();\n\t\t$prop1 = $this->view->personalDetail['a_peg_propinsi'];\n\t\t$this->view->kabupatenList = $this->auditor_serv->getKabupatenByProp($prop1);\n\t\t$this->view->kelurahanList = $this->auditor_serv->getKelurahan();\n\t\t\n\t\t$this->view->perintahproses = $_POST['perintahproses'];\n\t\t\n\t\tif($this->view->perintahproses)\n\t\t{\n\t\t\t//if($this->view->periintahproses == \"SIMPAN\")\n\t\t\t//{\n\t\t\t\t$nip = $_POST['nip'];\n\t\t\t\t$nipH = $_POST['nipH'];\n\t\t\t\t$namaPegawai = $_POST['namaPegawai'];\n\t\t\t// }\n\t\t\t// else\n\t\t\t// {\n\t\t\t\t// $nip = $_POST['nipH'];\n\t\t\t\t// $namaPegawai = $_POST['namaPegawaiH'];\n\t\t\t// }\n\t\t\t$gelarDpn = $_POST['gelarDpn'];\n\t\t\t$gelarBlk = $_POST['gelarBlk'];\n\t\t\t\n\t\t\t$tmpLahir = $_POST['tmpLahir'];\n\t\t\t\n\t\t\t$hrLahir = $_POST['hrLahir'];\n\t\t\t$blnLahir = $_POST['blnLahir'];\n\t\t\t$thnLahir = $_POST['thnLahir'];\n\t\t\t\n\t\t\tif(!$hrLahir)\n\t\t\t{\n\t\t\t\t$tanggalLahir = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(!$blnLahir)\n\t\t\t\t{\n\t\t\t\t\t$tanggalLahir = null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(!$thnLahir)\n\t\t\t\t\t{\n\t\t\t\t\t\t$tanggalLahir = null;\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$tanggalLahir = \"$thnLahir-$blnLahir-$hrLahir\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$jenisKelamin = $_POST['jenisKelamin'];\n\t\t\t$stsNikah = $_POST['stsNikah'];\n\t\t\t$agama = $_POST['agama'];\n\t\t\t$hrMasuk = $_POST['hrMasuk'];\n\t\t\t$blnMasuk = $_POST['blnMasuk'];\n\t\t\t$thnMasuk = $_POST['thnMasuk'];\n\t\t\t$tanggalMasuk = \"$thnMasuk-$blnMasuk-$hrMasuk\";\n\t\t\t\n\t\t\t$alamat = $_POST['alamat'];\n\t\t\t$rt = $_POST['rt'];\n\t\t\t$rw = $_POST['rw'];\n\t\t\t$kelurahan = $_POST['kelurahan'];\n\t\t\t$kecamatan = $_POST['kecamatan'];\n\t\t\t$propinsi = $_POST['propinsi'];\n\t\t\t$kabupaten = $_POST['kabupaten'];\n\t\t\t$kodePos = $_POST['kodePos'];\n\t\t\t$teleponRumah = $_POST['teleponRumah'];\n\t\t\t$tlpGenggam = $_POST['tlpGenggam'];\n\t\t\t$email = $_POST['email'];\n\t\t\t$email2 = $_POST['email2'];\n\t\t\t\n\t\t\t$paramDataPokok = array(\"nip\" => $nip,\n\t\t\t\t\t\t\t\t\t\"nipH\" => $nipH,\n\t\t\t\t\t\t\t\t\t\"namaPegawai\" => $namaPegawai,\n\t\t\t\t\t\t\t\t\t\"gelarDpn\" => $gelarDpn,\n\t\t\t\t\t\t\t\t\t\"gelarBlk\" => $gelarBlk,\n\t\t\t\t\t\t\t\t\t\"tmpLahir\" => $tmpLahir,\n\t\t\t\t\t\t\t\t\t\"tanggalLahir\" => $tanggalLahir,\n\t\t\t\t\t\t\t\t\t\"jenisKelamin\" => $jenisKelamin,\n\t\t\t\t\t\t\t\t\t\"stsNikah\" => $stsNikah,\n\t\t\t\t\t\t\t\t\t\"agama\" => $agama,\n\t\t\t\t\t\t\t\t\t\"tanggalMasuk\" => $tanggalMasuk,\n\t\t\t\t\t\t\t\t\t\"alamat\" => $alamat,\n\t\t\t\t\t\t\t\t\t\"rt\" => $rt,\n\t\t\t\t\t\t\t\t\t\"rw\" => $rw,\n\t\t\t\t\t\t\t\t\t\"kelurahan\" => $kelurahan,\n\t\t\t\t\t\t\t\t\t\"kecamatan\" => $kecamatan,\n\t\t\t\t\t\t\t\t\t\"propinsi\" => $propinsi,\n\t\t\t\t\t\t\t\t\t\"kabupaten\" => $kabupaten,\n\t\t\t\t\t\t\t\t\t\"kodePos\" => $kodePos,\n\t\t\t\t\t\t\t\t\t\"teleponRumah\" => $teleponRumah,\n\t\t\t\t\t\t\t\t\t\"tlpGenggam\" => $tlpGenggam,\n\t\t\t\t\t\t\t\t\t\"email\" => $email,\n\t\t\t\t\t\t\t\t\t\"email2\" => $email2,\n\t\t\t\t\t\t\t\t\t\"userid\" =>$userid\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t//var_dump($paramDataPokok);\n\t\t\t\n\t\t\t\n\t\t\tif((isset($_FILES['foto']['error']) && $_FILES['foto'] == 0) || (!empty($_FILES['foto']['tmp_name']) && $_FILES['foto']['tmp_name'] != 'none'))\n\t\t\t{\n\t\t\t\t$size = filesize($_FILES['foto']['tmp_name']);\n\t\t\t\tif (($size != 0) && ($size > 2048000)) \n\t\t\t\t{ ?> \n\t\t\t\t\t<script>alert('File Terlalu Besar');</script>\n\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$fileName = $_FILES['foto']['name'];\n\t\t\t\t\t$extention = substr($fileName, -3, 3);\n\t\t\t\t\t\n\t\t\t\t\tif (($extention == \"jpg\") || ($extention == \"JPG\")) \n\t\t\t\t\t{\n\t\t\t\t\t\t$destDir = \"..\\etc\\data\\auditor\\foto\\\\\";\n\t\t\t\t\t\t$newFileName = \"$nip.jpg\";\n\t\t\t\t\t\t$tujuan = $destDir.$newFileName;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$file = $_FILES['foto']['tmp_name'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$prosesUpload = move_uploaded_file($file,$tujuan);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($prosesUpload == \"1\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($this->view->perintahproses == \"SIMPAN\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$hasil = $this->auditor_serv->insertPersonalDataPokok($paramDataPokok);\t\n\t\t\t\t\t\t\t\t$proses = \"1\";\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$hasil = $this->auditor_serv->updatePersonalDataPokok($paramDataPokok);\n\t\t\t\t\t\t\t\t$proses = \"2\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//$hasil = \"sukses\";\n\t\t\t\t\t\t\t//var_dump($paramDataPokok);\n\t\t\t\t\t\t\tif($hasil == \"sukses\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$keterangan = \"Data Pokok Personal\";\n\t\t\t\t\t\t\t\t$status = $hasil;\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$keterangan = \"Data Pokok Personal\";\n\t\t\t\t\t\t\t\t$status = $hasil;\n\t\t\t\t\t\t\t\tif(file_exists($tujuan))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tunlink($tujuan);\n\t\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\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$proses = \"1\";\n\t\t\t\t\t\t\t$keterangan = \"File\";\n\t\t\t\t\t\t\t$status = \"Gagal\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->view->status = $status;\n\t\t\t\t\t\t$this->view->proses = $proses;\n\t\t\t\t\t\t$this->view->keterangan = $keterangan;\n\n\t\t\t\t\t\tunset($_POST);\n\t\t\t\t\t\t/* $this->personalsearchAction();\n\t\t\t\t\t\t$this->render('personalsearch'); */\n\t\t\t\t\t\tunset($_REQUEST);\n\t\t\t\t\t\t$_REQUEST = array(\"perintah\" => \"UPDATE\",\n\t\t\t\t\t\t\t\t\t\t\"nip\" => $nip);\n\t\t\t\t\t\t$this->personaldatapokokAction();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t?> \n\t\t\t\t\t\t<script>alert('File Harus Dalam Format jpg');</script>\n\t\t\t\t\t<? \n\t\t\t\t\t\t$this->render('personaldatapokok');\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\tif($this->view->perintahproses == \"SIMPAN\")\n\t\t\t\t{\n\t\t\t\t\t//echo \"hhhhhhhhhh\";\n\t\t\t\t\t$hasil = $this->auditor_serv->insertPersonalDataPokok($paramDataPokok);\n\t\t\t\t\t$proses = \"1\";\n\t\t\t\t\t$status = $hasil;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n//echo \"iiiiiiii\";\n\t\t\t\t\t$hasil = $this->auditor_serv->updatePersonalDataPokok($paramDataPokok);\n\t\t\t\t\t$proses = \"2\";\n\t\t\t\t\t$status = $hasil;\n\t\t\t\t\t$destDir = \"..\\etc\\data\\auditor\\foto\\\\\";\n\t\t\t\t\t$newFileName1 = \"$nipH.jpg\";\n\t\t\t\t\t$tujuan1 = $destDir.$newFileName1;\n\t\t\t\t\t$newFileName = \"$nip.jpg\";\n\t\t\t\t\t$tujuan = $destDir.$newFileName;\n\t\t\t\t\tif(file_exists($tujuan1))\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\trename($tujuan1, $tujuan);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t//$hasil = \"sukses\";\n\t\t\t\t\t//var_dump($paramDataPokok);\n\t\t\t\t\tif($hasil == \"sukses\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$keterangan = \"Data Pokok Personal\";\n\t\t\t\t\t\t$status = $hasil;\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$keterangan = \"Data n'Pokok Personal\";\n\t\t\t\t\t\t$status = $hasil;\n\t\t\t\t\t\tif(file_exists($tujuan))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunlink($tujuan);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this->view->status = $status;\n\t\t\t\t\t$this->view->proses = $proses;\n\t\t\t\t\t$this->view->keterangan = $keterangan;\n\n\t\t\t\t\tunset($_POST);\n\t\t\t\t\tunset($_REQUEST);\n\t\t\t\t\t$_REQUEST = array(\"perintah\" => \"UPDATE\",\n\t\t\t\t\t\t\t\t\t\"nip\" => $nip);\n\t\t\t\t\t$this->personaldatapokokAction();\n\t\t\t\t\t//$this->render('personalsearch');\n\t\t\t\t//}\n\t\t\t\t//var_dump($_REQUEST);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function cariObat()\n\t{\n\t\tif ($this->input->get() != NULL) {\n\t\t\t$dataForm = $this->input->get();\n\t\t\t\n\t\t\t$dataReturn = $this->db->query(\" SELECT * FROM logistik WHERE nama LIKE '%\".$dataForm['term']['term'].\"%' ESCAPE '!' AND stok > 0\")->result();\t\t\t\n\n\t\t\t$data = array();\n\t\t\tforeach ($dataReturn as $key => $value) {\n\t\t\t\t$data[$key]['id'] = $value->id.\"|\".$value->nama;\n\t\t\t\t$data[$key]['text'] = $value->nama;\n\t\t\t\t$data[$key]['stok'] = $value->stok;\n\t\t\t\tif ($value->kadaluarsa < date(\"Y-m-d-d\")) {\n\t\t\t\t\t$data[$key]['stok'] .= \" Sudah kadaluarsa\";\n\t\t\t\t}\n\t\t\t\t$data[$key]['satuan'] = $value->satuan;\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}else{\n\t\t\tredirect();\n\t\t}\t\t\n\t}", "public function dataSekolah()\n {\n // get user information\n $data['user'] = $this->Auth_model->getUserByEmail($this->session->userdata('email'));\n $data['title'] = 'Data Sekolah';\n $data['sekolah'] = $this->Crud_model->getSekolah();\n\n // set rules\n $this->form_validation->set_rules('Nama Sekolah', 'Nama Yayasan', 'Alamat', 'Kata Mutiara', 'Kepala Sekolah', 'required|trim');\n\n if ($this->form_validation->run() == FALSE) {\n $this->load->view('templates/header', $data);\n $this->load->view('templates/sidebar', $data);\n $this->load->view('templates/topbar', $data);\n $this->load->view('data/data-sekolah', $data);\n $this->load->view('templates/footer');\n } else {\n $data = [\n 'id' => $this->input->post('id'),\n 'sekolah' => $this->input->post('sekolah'),\n 'yayasan' => $this->input->post('yayasan'),\n 'alamat' => $this->input->post('alamat'),\n 'katamutiara' => $this->input->post('katamutiara'),\n 'kepalasekolah' => $this->input->post('kepalasekolah')\n ];\n // kirim data gukar ke model \n $this->Crud_model->editSekolah($data);\n $this->session->set_flashdata('massage', 'Data Sekolah Berhasil Diubah');\n redirect('data/datasekolah');\n }\n }", "public function tambah_data()\n {\n\n $nik = $this->input->post('nik');\n $nama = $this->input->post('nama');\n $jk = $this->input->post('jk');\n $tgl = $this->input->post('tgl');\n $jenispekerjaan = $this->input->post('jenis_pekerjaan');\n $instansipekerjaan = $this->input->post('instansi_pekerjaan');\n $alamatpekerjaan = $this->input->post('alamat_pekerjaan');\n $nomorhp = $this->input->post('nomor_hp');\n $kodekabkota = $this->input->post('kode_kab_kota');\n $kotakab = $this->input->post('kota_kab');\n $alamat = $this->input->post('alamat_lengkap');\n\n $data = array(\n 'nik' => $nik,\n 'nama' => $nama,\n 'jk' => $jk,\n 'tgl' => $tgl,\n 'jenis_pekerjaan' => $jenispekerjaan,\n 'instansi_pekerjaan' => $instansipekerjaan,\n 'alamat_pekerjaan' => $alamatpekerjaan,\n 'nomor_hp' => $nomorhp,\n 'kode_kab_kota' => $kodekabkota,\n 'kota_kab' => $kotakab,\n 'alamat_lengkap' => $alamat,\n );\n\n $this->M_vaksin->input_data($data, 'tb_vaksin');\n redirect('vaksinasi');\n }", "function jabatan_data()\n\t{\t\t\n\t\t$data['j'] = $this->M_master->data_jabatan();\t\n\t\t$data['title'] = 'Data Jabatan';\t\t\n\t\t$data['isi'] = 'contents/jabatan_data';\n\t\t$this->load->view('wrapper', $data);\n\t}", "function handle_get($indata) {\n// showDebug('form_class GET:');\n// showArray($indata);\n if(array_key_exists('new', $indata)) {\n $this->is_new = 1;\n $this->title = 'New data';\n } \n if(array_key_exists('find', $indata)){\n $this->is_find_form = 1;\n $this->title = 'Find in ' . $this->table_title;\n }\n if(array_key_exists('id', $indata)){\n $this->id = $indata['id'];\n $this->form_data = $this->fetchRecordInfo($this->id);\n }\n }", "public function inputAction()\n {\n $this->view->title = 'Master Periode Budget';\n $this->_helper->layout->setLayout('detail');\n\n $table = new Application_Model_SetupMasterBudgetPeriod();\n $this->view->input = $table->getInput();\n }", "public function pesan(){\n $dt = $this->input->post('id');\n $arr = explode(\",\", $dt);\n $data['nama'] = $arr[0];\n $data['nomor'] = $arr[1];\n $data['regis'] = $arr[2];\n $data['re'] = $arr[3];\n //print_r($data);\n $this->load->view('backend/admin/Approval/buat_pesan', $data);\n }", "public function tambahDataKC()\n {\n $data = array(\n 'kode_cabang' => htmlspecialchars($this->input->post('kode_cabang', true)),\n 'nama_kantorcabang' => htmlspecialchars($this->input->post('nama_kantorcabang', true))\n );\n\n //QUERY INSERT DATA\n $this->db->insert('tb_kantorcabang', $data);\n // Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')\n }", "function input_nilai(){\n\t\t$a['data']\t= $this->model_admin->tampil_nilai()->result_object();\n\t\t$a['page']\t= \"input_nilai\";\n\t\t\n\t\t$this->output->enable_profiler(true);\n\t\t$this->load->view('admin/index', $a);\n\t}", "protected function data(){\nEditor::inst( $db, 'datatables_demo' )\n ->fields(\n Field::inst( 'product_name' )->validator( 'Validate::notEmpty' ),\n Field::inst( 'quantity_in_stock' )\n ->validator( 'Validate::numeric' )\n ->setFormatter( 'Format::ifEmpty', null ),\n\t\tField::inst( 'product_price' )\n ->validator( 'Validate::numeric' )\n ->setFormatter( 'Format::ifEmpty', null ),\n\t\t Field::inst( 'date' )\n ->validator( 'Validate::dateFormat', array(\n \"format\" => Format::DATE_ISO_8601,\n \"message\" => \"Please enter a date in the format yyyy-mm-dd\"\n ) )\n ->getFormatter( 'Format::date_sql_to_format', Format::DATE_ISO_8601 )\n ->setFormatter( 'Format::date_format_to_sql', Format::DATE_ISO_8601 ),\n\t\t\tField::inst( 'total' )\n ->validator( 'Validate::numeric' )\n ->setFormatter( 'Format::ifEmpty', null )\t\n )\n ->process( $_POST )\n ->json();\n\t\t\n\t\t\n\t\t\n\t}", "public function input_data_staff_jurusan(){\n\t\t$data['content'] = 'admin/input_data_staff_jurusan';\n\t\t$this->load->view('content',$data);\n\t}", "function inputRekeningUser($data){\n// DETAIL AWAL PEMBUATAN REKENING MASIH BELOM DILAKUKAN\n $pengajuan = $this->getPengajuan($data['id']);\n if($pengajuan['kategori']==\"Tabungan\" || $pengajuan['kategori']==\"Tabungan Awal\"){\n $rekening =$this->getRekeningByid((json_decode($pengajuan->detail,true)['tabungan']));\n $detail=[\n 'saldo' => (json_decode($rekening->detail,true)['setoran_awal']),\n 'id_pengajuan' =>$pengajuan->id,\n ];\n $tab = $this->tabungan->where('id_user', $pengajuan->id_user)->orderBy('id','DESC')->get();\n\n if(count($tab)<1)$id=1;\n else $id=str_after($tab[0]['id_tabungan'], '.')+1;\n\n $detail_ptabungan=[\n 'teller' => Auth::user()->id,\n 'dari_rekening' => \"\",\n 'untuk_rekening' => json_decode(Auth::user()->detail,true)['id_rekening'],\n 'jumlah' => $detail['saldo'],\n 'saldo_awal' => 0,\n 'saldo_akhir' => $detail['saldo']\n ];\n $data2=[\n 'tipe' => $pengajuan->kategori,\n 'id_UsrTDP' =>$pengajuan->id_user.\".\".$id,\n 'id_TDP'=> $pengajuan->id_rekening,\n 'id_pengajuan' =>$pengajuan->id,\n 'jenis_TDP' =>json_decode($pengajuan['detail'],true)['nama_rekening'],\n 'id_user' =>$pengajuan->id_user,\n 'id_pencairan' =>$pengajuan->id_pencairan,\n 'status' =>\"Setoran Awal\",\n ];\n\n if($pengajuan->kategori==\"Tabungan Awal\"){\n $data2['pokok'] = str_replace(',',\"\",$data['pokok']);\n $data2['wajib'] = str_replace(',',\"\",$data['wajib']);\n }\n if($this->setoranAwal($detail_ptabungan,$data2)) return true;\n else return false;\n }\n elseif($pengajuan['kategori']==\"Deposito\"){\n $tab = $this->deposito->where('id_user', $pengajuan->id_user)->orderBy('id','DESC')->get();\n if(count($tab)<1)$id=1;\n else $id=str_after($tab[0]['id_deposito'], '.')+1;\n $rekening =$this->getRekeningByid((json_decode($pengajuan->detail,true)['deposito']));\n $detail_pdeposito=[\n 'teller' => Auth::user()->id,\n 'dari_rekening' => \"\",\n 'untuk_rekening' => json_decode(Auth::user()->detail,true)['id_rekening'],\n 'jumlah' => json_decode($pengajuan->detail,true)['jumlah'],\n 'saldo_awal' => 0,\n 'saldo_akhir' => json_decode($pengajuan->detail,true)['jumlah']\n ];\n $data=[\n 'tipe' => $pengajuan->kategori,\n 'id_UsrTDP' =>$pengajuan->id_user.\".\".$id,\n 'id_TDP'=> $pengajuan->id_rekening,\n 'id_pengajuan' =>$pengajuan->id,\n 'tempo' =>json_decode($rekening->detail,true)['jangka_waktu'],\n 'jenis_TDP' =>json_decode($pengajuan['detail'],true)['nama_rekening'],\n 'id_user' =>$pengajuan->id_user,\n 'id_pencairan' =>json_decode($pengajuan['detail'],true)['id_pencairan'],\n 'status' =>\"Setoran Awal\",\n ];\n if($this->setoranAwal($detail_pdeposito,$data))return true;\n else return false;\n }\n elseif($pengajuan['kategori']==\"Pembiayaan\"){\n $rekening =$this->getRekeningByid((json_decode($pengajuan['detail'],true)['pembiayaan']));\n $tab = $this->pembiayaan->where('id_user', $pengajuan->id_user)->orderBy('id','DESC')->get();\n if(count($tab)<1)$id=1;\n else $id=str_after($tab[0]['id_pembiayaan'], '.')+1;\n $lama_angsuran =1;\n if( str_after( json_decode($pengajuan['detail'],true)['keterangan'],\" \") == \"Tahun\"){\n $lama_angsuran = str_before( json_decode($pengajuan['detail'],true)['keterangan'],\" \") *12;\n }\n elseif( str_after( json_decode($pengajuan['detail'],true)['keterangan'],\" \") == \"Bulan\"){\n $lama_angsuran = str_before( json_decode($pengajuan['detail'],true)['keterangan'],\" \");\n }\n $margin_total = (floatval(json_decode($pengajuan['detail'],true)['jumlah'] )* floatval($data['nisbah'])/100)*floatval($lama_angsuran);\n $pinjaman_total = floatval(json_decode($pengajuan['detail'],true)['jumlah'] )+ $margin_total;\n $angsuran_pokok = floatval($pinjaman_total/$lama_angsuran );\n $detail_ppembiayaan=[\n 'teller' => Auth::user()->id,\n 'dari_rekening' => $data['bank'],\n 'untuk_rekening' => \"Tunai\",\n 'angsuran_pokok' => $angsuran_pokok ,\n 'angsuran_ke' => 0,\n 'nisbah' => floatval($data['nisbah'])/100,\n 'margin' => $margin_total,\n 'jumlah' => floatval(json_decode($pengajuan['detail'],true)['jumlah']),\n 'tagihan' => $angsuran_pokok ,\n 'sisa_angsuran' => floatval(json_decode($pengajuan['detail'],true)['jumlah']),\n 'sisa_margin' => $margin_total,\n 'sisa_pinjaman' => $pinjaman_total,\n ];\n\n $data=[\n 'detail_rekening' => $rekening->detail,\n 'lama_angsuran' => $lama_angsuran,\n 'tipe' => $pengajuan['kategori'],\n 'id_UsrTDP' => $pengajuan['id_user'].\".\".$id,\n 'id_TDP' => $pengajuan['id_rekening'],\n 'id_pengajuan' => $pengajuan['id'],\n 'tempo' => date(now()),\n 'margin' => $margin_total,\n 'jumlah' => floatval(json_decode($pengajuan['detail'],true)['jumlah']),\n 'nisbah' => floatval($data['nisbah'])/100,\n 'jenis_TDP' => json_decode($pengajuan['detail'],true)['nama_rekening'],\n 'id_user' => $pengajuan->id_user,\n 'status' => \"Pencairan Pembiayaan\",\n 'saksi1' => $data['saksi1'],\n 'saksi2' => $data['saksi2'],\n 'alamat2' => $data['alamat2'],\n 'ktp2' => $data['ktp2']\n ];\n\n if($this->setoranAwal($detail_ppembiayaan,$data))return true;\n else return false;\n }\n }", "public function pengaju(){\n $dt = $this->input->post('id');\n $arr = explode(\",\", $dt);\n $data['no_pend'] = $arr[0];\n $data['nik'] = $arr[1];\n $data['nama'] = $arr[2];\n $data['no_hp'] = $arr[3];\n //print_r($data);\n $this->load->view('backend/admin/Approval/lihat_pendaftar', $data);\n }", "public function simpanDataFinstansi($post){\n\t\t$connection \t= $this->db;\n\t\t$kd_jns\t\t\t= htmlspecialchars($post['m1_jenis'], ENT_QUOTES);\n\t\t$kode_instansi\t= htmlspecialchars($post['m1_instansi'], ENT_QUOTES);\n\t\t$desc_instansi\t= htmlspecialchars($post['m1_deskripsi'], ENT_QUOTES);\n\t\t$isNewRecord\t= htmlspecialchars($post['isNewRecord'], ENT_QUOTES);\n\t\tif($kode_instansi == \"\" || $desc_instansi == \"\"){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Kode dan deskripsi instansi harus diisi\");\n\t\t} else{\n\t\t\tif($isNewRecord){\n\t\t\t\t$sqlCek\t= \"select count(*) as jumlah from datun.instansi where kode_jenis_instansi = '\".$kd_jns.\"' and kode_instansi = '\".$kode_instansi.\"' \n\t\t\t\t\t\t\tand kode_tk = '\".$_SESSION[\"kode_tk\"].\"'\";\n\t\t\t\t$jumlah = $connection->createCommand($sqlCek)->queryScalar();\n\t\t\t\tif($jumlah > 0){\n\t\t\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Maaf, kode instansi sudah ada\");\n\t\t\t\t} else{\n\t\t\t\t\t$sql \t= \"insert into datun.instansi values('\".$kd_jns.\"', '\".$kode_instansi.\"', '\".$desc_instansi.\"', '\".$_SESSION['kode_tk'].\"')\";\n\t\t\t\t\t$hasil \t= $connection->createCommand($sql)->execute();\n\t\t\t\t\treturn array(\"hasil\"=>$hasil, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$sql \t= \"update datun.instansi set deskripsi_instansi = '\".$desc_instansi.\"' where kode_jenis_instansi = '\".$kd_jns.\"' and kode_instansi = '\".$kode_instansi.\"' \n\t\t\t\t\t\t\tand kode_tk = '\".$_SESSION['kode_tk'].\"'\";\n\t\t\t\t$hasil \t= $connection->createCommand($sql)->execute();\n\t\t\t\treturn array(\"hasil\"=>$hasil, \"error\"=>\"* Maaf, data gagal disimpan\");\n\t\t\t}\n\t\t}\n\t}", "function berinamateman ($teman) {\n $this->nama_teman=$teman;\n }", "function recuperar_datos() {\n\t\tglobal $nombre, $tipo ;\n\t\t\n\t\t\t$pers_id =(isset($_POST['id_marcas']) && !empty($_POST['id_marcas']))? $_POST['id_marcas']:\"\";\n\t\t\t$tipo =(isset($_POST['tipo']) && !empty($_POST['tipo']))? $_POST['tipo']:\"A\"; \t\n\n\t\t\t$nombre=(isset($_POST[\"nombre\"]) && !empty($_POST[\"nombre\"]))? $_POST[\"nombre\"]:\"\";\t\t\t\n\t\n\t\t}", "public function input_data_staff_akademik(){\n\t\t$data['content'] = 'admin/input_data_staff_akademik';\n\t\t$this->load->view('content',$data);\n\t}", "function EditDataPegawai()\n\t{\n\t\tinclude '../../koneksi/koneksi.php';\n\n\t\t//inisialisasi\n\t\t$id_pegawai = $_POST['id_pegawai'];\n\t\t$nama = $_POST['nama'];\n\t\t$jabatan = $_POST['jabatan'];\n\t\t$username = $_POST['username'];\n\t\t$password = $_POST['password'];\n\t\t$password = md5($password);\n\n\t\t//update ke tabel pegawai\n\t\t$sql = \"UPDATE pegawai SET id_pegawai = ?, nama = ?, jabatan = ? WHERE id = ?\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param('iss', $id_pegawai, $nama, $jabatan);\n\t\tif($stmt->execute()){\n\t\t\techo \"Data berhasil diperbaharui\";\n\t\t}else{\n\t\t\tdie('Error : ('. $db->errno .')'. $db->error);\n\t\t}\n\t\t$stmt->close();\n\t}", "protected function fieldData()\n {\n if ($this->field_data_fetched === false) {\n $this->field_data = array(\n 'label' => 'Your date of birth',\n 'description' => 'Please enter your date of birth',\n 'placeholder' => 'dd/mm/yyyy',\n 'size' => 50,\n 'maxlength' => 10\n );\n\n $this->field_data_fetched = true;\n }\n }", "public function prosesinput_data_staff_jurusan(){\n\t\t$this->m_aka->prosesinput_data_staff_jurusan();\n\t\tredirect('c_index_aka/data_staff_jurusan');\n\t}", "function tambahdata() \r\n \t{\r\n\t\t$this->load->model('model_home');\r\n\t\t$data['jenis_dok']=$this->model_home->getJenisDokumen();\r\n\t\t$data['jenis_data']=$this->model_home->getJenisData();\r\n\t\t$data['idnya']=$this->model_home->cariidbaru();\r\n\t\t//$this->load->view('form_rekam',$data);\r\n\t\t$this->load->view('new_header');\r\n\t\t$this->load->view('new_nav');\r\n\t\t$this->load->view('new_form_rekam',$data);\r\n\t}", "function input($data);", "function hapusData($kodeKamar)\n {\n //membuat variabel untuk menampung data where id dari inputan view\n //yg kiri nama atribute di database, yg kanan nama 'name' dari inputan view\n $where = ['kode_kamar' => $kodeKamar];\n\n try {\n //membuat variabel baru dengan nama hapus untuk melempar data ke model\n //objek model menjalankan method hapusData yang berada di model dan mengirim data array nya dengan tabel\n //menambahkam parameter where sebagai parameter menggunakan id\n $hapus = $this->mkamar->hapusData($this->table, $where);\n //jika hapus berhasil maka :\n if ($hapus) {\n //menjalankan script alert dan me redirect ke controller /kamar\n echo \"<script>alert('Data berhasil dihapus'); window.location='\" . base_url('/kamar') . \"';</script>\";\n //jika gagal maka :\n } else {\n echo \"<script>alert('Data gagal dihapus'); window.location='\" . base_url('/kamar') . \"';</script>\";\n }\n //jika data sudah ada maka :\n } catch (\\Exception $e) {\n echo \"<script>alert('Data sudah ada'); window.location='\" . base_url('/kamar') . \"';</script>\";\n }\n }", "function dropdown_ijin() {\n $result = $this->db->get('tbl_ijin');\n\n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $dd[''] = 'Please Select';\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $dd[$row->id_ijin] = $row->nomor . \"/KODE KANTOR/\" . $row->id_seksi . \"/\" . $row->tahun;\n }\n }\n return $dd;\n }", "public function data_judul()\n {\n $data = ['aktif' => 'judul',\n 'data_judul' => $this->M_prospektus->ambil_data_judul()\n ];\n\n $this->template->load('template','prospektus/V_data_judul', $data);\n }", "public function simpanedit()\n {\n $id_penghasilan = $this->input->post('dataid_penghasilan');\n // data post niok disimpan pada varibael yang berbeda dengan data array, soalnya digunakan untuk kondisi whre di modal\n $data['nik'] = $this->input->post('datanik');\n $data['penghasilan_sebulan'] = $this->input->post('penghasilansebulan');\n $data['maksud_pembuatan'] = $this->input->post('maksudpembuatan');\n $data['status'] = \"Request\";\n\n $this->M_penghasilan->edit_data($data, $id_penghasilan);\n\n redirect('C_penghasilan');\n }", "function _input_add() {\n\t\t$tpaket = $_POST;\n\t\tunset($tpaket['tpaket_header']['id_tpaket_header']);\n\t\tunset($tpaket['button']);\n\t\t// end of assign variables and delete not used variables\n\n\t\t$count = count($tpaket['tpaket_detail']['id_tpaket_h_detail'])-1;\n\t\t\n\t\t// check, at least one product quantity entered\n\t\t$quantity_exist = FALSE;\n\n\t\tfor($i = 1; $i <= $count; $i++) {\n\t\t\tif(empty($tpaket['tpaket_detail']['quantity'][$i])) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\t$quantity_exist = TRUE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif($quantity_exist == FALSE)\n\t\t\tredirect('tpaket/input_error/Anda belum memasukkan data GR Quantity. Mohon ulangi.');\n\n//\t\tif($this->m_config->running_number_select_update('tpaket', 1, date(\"Y-m-d\")) {\n\n\t\tif(isset($_POST['button']['save']) || isset($_POST['button']['approve'])) {\n\n//\t\t\t$tpaket_header['id_tpaket_header'] = '0001'.date(\"Ymd\").sprintf(\"%04d\", $running_number);\n\n\t\t\t$this->db->trans_start();\n\n \t\t\t$this->session->set_userdata('tpaket_detail', $tpaket['tpaket_detail']);\n\n \t\t$tpaket_header['plant'] = $this->session->userdata['ADMIN']['plant'];\n \t\t$tpaket_header['storage_location'] = $this->session->userdata['ADMIN']['storage_location'];\n\t\t\t$tpaket_header['id_tpaket_plant'] = $this->m_tpaket->id_tpaket_plant_new_select($tpaket_header['plant']);\n// \t\t\t$tpaket_header['posting_date'] = $this->m_general->posting_date_select_max($tpaket_header['plant']);\n \t\t\t$tpaket_header['posting_date'] = $this->l_general->str_to_date($tpaket['tpaket_header']['posting_date']);\n\n\t\t\t$tpaket_header['material_doc_no'] = '';\n\n\t\t\tif(isset($_POST['button']['approve']))\n\t\t\t\t$tpaket_header['status'] = '2';\n\t\t\telse\n\t\t\t\t$tpaket_header['status'] = '1';\n\n\t\t\t$tpaket_header['item_group_code'] = $tpaket['tpaket_header']['item_group_code'];\n\t\t\t$tpaket_header['id_user_input'] = $this->session->userdata['ADMIN']['admin_id'];\n\n $web_trans_id = $this->l_general->_get_web_trans_id($tpaket_header['plant'],$tpaket_header['posting_date'],\n $tpaket_header['id_tpaket_plant'],'17');\n $internal_order = $this->m_tpaket->tpaket_internal_order_select();\n\n\t\t\tif($id_tpaket_header = $this->m_tpaket->tpaket_header_insert($tpaket_header)) {\n\n //array utk parameter masukan pada saat approval\n if(isset($_POST['button']['approve'])) {\n $tpaket_to_approve = array (\n 'id_tpaket_header' => $id_tpaket_header,\n 'internal_order' => $internal_order['internal_order'],\n 'plant' => $tpaket_header['plant'],\n 'storage_location' => $tpaket_header['storage_location'],\n 'posting_date' => date('Ymd',strtotime($tpaket_header['posting_date'])),\n 'id_user_input' => $tpaket_header['id_user_input'],\n 'web_trans_id' => $web_trans_id,\n 'receiving_plant' => $tpaket_header['receiving_plant'],\n );\n }\n\n//\t\t\tif($id_tpaket_header = $this->m_tpaket->tpaket_header_insert($tpaket_header)) {\n\n $input_detail_success = FALSE;\n\t\t\t\t\t\t$tpaket_detail['id_tpaket_header'] = $id_tpaket_header;\n\t\t\t\t\t\t$batch['BaseEntry'] = $id_tpaket_header;\n\t\t\t\t\t\t//$qty=array_sum($tpaket['tpaket_detail']['quantity']);\n\t\t\t\t\t\t$tpaket_detail['quantity'] = $tpaket['tpaket_detail']['qty'][1];\n\t\t\t\t\t\t$tpaket_detail['qty'] = $tpaket['tpaket_detail']['qty'][1];\n\t\t\t\t\t\t$batch['Quantity'] = $tpaket['tpaket_detail']['qty'][1];\n\t\t\t\t\t\t$tpaket_detail['id_tpaket_h_detail'] = 1;\n\t\t\t\t\t\t$batch['BaseLinNum'] = 1;\n \t\t\t\t\t\t$tpaket_detail['material_no'] = $tpaket['tpaket_detail']['material_no'];\n\t\t\t\t\t\t//$tpaket_detail['num'] = $tpaket['tpaket_detail']['num'][$i];\n\t\t\t\t\t\t$batch['ItemCode'] = $tpaket['tpaket_detail']['material_no'];\n\t\t\t\t\t\t$item=$tpaket['tpaket_detail']['material_no'];\n\t\t\t\t\t\t$date=date('ymd');\n\t\t\t\t\t\t$whs=$this->session->userdata['ADMIN']['plant'];\n\t\t\t\t\t\t//mysql_connect(\"localhost\",\"root\",\"\");\n\t\t\t\t\t\t//mysql_select_db(\"sap_php\");\n\t\t\t\t\t\t$q=\"SELECT * FROM m_batch WHERE ItemCode = '$item' AND Whs ='$whs'\";\n\t\t\t\t\t\t$cek=\"SELECT BATCH,MAKTX FROM m_item WHERE MATNR = '$item'\";\n\t\t\t\t\t\t$cek1=mysql_query($cek);\n\t\t\t\t\t\t$ra=mysql_fetch_array($cek1);\n\t\t\t\t\t\t$b=$ra['BATCH'];\n\t\t\t\t\t\t$tq=mysql_query($q);\n\t\t\t\t\t\t$count1=mysql_num_rows($tq) + 1;\n\t\t\t\t\t\tif ($count1 > 9 && $count1 < 100)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$dg=\"0\";\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$dg=\"00\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$num=$item.$date.$dg.$count1;\n\t\t\t\t\t\t$batch['BatchNum'] = $num;\n\t\t\t\t\t\t$tpaket_detail['num'] = $num;\n\t\t\t\t\t\t$batch['BaseType'] = 4;\n\t\t\t\t\t\t$batch['Createdate'] = $this->l_general->str_to_date($tpaket['tpaket_header']['posting_date']);\n \t\t\t\t\t\t$tpaket_detail['material_desc'] = $ra['MAKTX'];;\n \t\t\t\t\t\t$tpaket_detail['uom'] = $tpaket['tpaket_detail']['uom'][1];\n\t\t\t\t\t\t//echo \"(\".$tpaket['tpaket_detail']['uom'].\")\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($b=='Y')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t//echo \"$batch[BaseEntry],$batch[Quantity],$batch[BaseLinNum],$batch[ItemCode],$batch[BatchNum],$b <br>\";\n\t\t\t\t\t\t$batch_in=$this->m_tpaket->batch_insert($batch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($id_tpaket_detail = $this->m_tpaket->tpaket_detail_insert($tpaket_detail)) {\n \n\n\t\t\t\t\tfor($i = 1; $i <= $count; $i++) {\n//echo \" \".$count.\"-\".$i.\"(\".$tpaket['tpaket_detail']['quantity'][$i].\") - (\".$tpaket['tpaket_detail']['material_detail'][$i].\")\";\n\t\t\t\t\tif((!empty($tpaket['tpaket_detail']['quantity'][$i]))&&(!empty($tpaket['tpaket_detail']['material_detail'][$i]))) \n\t\t\t\t\t{\n\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t $tpaket_detail_paket['id_tpaket_h_detail_paket'] = $i;\n\t\t\t\t\t\t\t $batch1['BaseLinNum'] =$i;\n $tpaket_detail_paket['id_tpaket_detail'] = $id_tpaket_detail;\n $tpaket_detail_paket['id_tpaket_header'] = $id_tpaket_header;\n\t\t\t\t\t\t\t $batch1['BaseEntry'] = $id_tpaket_header;\n\t\t\t\t\t\t\t $batch1['BaseType'] = 4;\n\t\t\t\t\t\t\t $batch1['BatchNum'] = $tpaket['tpaket_detail']['num'][$i];\n\t\t\t\t\t\t\t $batch1['Createdate'] =$batch['Createdate'] ;\n $tpaket_detail_paket['material_no_paket'] = $tpaket_detail['material_no'];\n $tpaket_detail_paket['material_no'] = $tpaket['tpaket_detail']['material_detail'][$i];\n\t\t\t\t\t\t\t $batch1['ItemCode'] = $tpaket['tpaket_detail']['material_detail'][$i];\n $tpaket_detail_paket['material_desc'] = $item_paket['material_desc'][$i];\n $tpaket_detail_paket['quantity'] = $tpaket['tpaket_detail']['quantity'][$i];\n\t\t\t\t\t\t\t $batch1['Quantity'] = $tpaket['tpaket_detail']['quantity'][$i];\n $tpaket_detail_paket['uom'] = $tpaket['tpaket_detail']['detail_uom'][$i];\n\t\t\t\t\t\t\t $tpaket_detail_paket['num'] = $tpaket['tpaket_detail']['num'][$i];\n\t\t\t\t\t\t\t $tpaket_detail_paket['quantity_total'] = $tpaket['tpaket_detail']['quantity'][$i] * $tpaket['tpaket_detail']['qty'][1];\n\t\t\t\t\t\t\t if ($batch1['Quantity'] != \"\")\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->m_tpaket->batch_insert($batch1);\n\t\t\t\t\t\t\t\t}\n \t\t\t\t\t if($this->m_tpaket->tpaket_detail_paket_insert($tpaket_detail_paket)) {\n $input_detail_success = TRUE;\n \t\t\t\t\t } else\n $input_detail_success = FALSE; \n } \n } \n\t\t\t\t\t} else {\n $input_detail_success = FALSE;\n \t} \n\t\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t}\n\n\t\t\tif (($input_detail_success === TRUE) && (isset($_POST['button']['approve']))) {\n\t\t\t /* $approved_data = $this->m_tpaket->sap_tpaket_header_approve($tpaket_to_approve);\n \t\t\tif((!empty($approved_data['material_document'])) && ($approved_data['material_document'] !== '') &&\n (!empty($approved_data['material_document_out'])) && ($approved_data['material_document_out'] !== '')) {\n \t\t\t $tpaket_no = $approved_data['material_document'];\n \t\t\t $tpaket_no_out = $approved_data['material_document_out'];*/\n \t\t\t\t$data = array (\n \t\t\t\t\t'id_tpaket_header'\t=>$id_tpaket_header,\n \t\t\t\t\t'material_doc_no'\t=>\t$tpaket_no,\n \t\t\t\t\t'material_doc_no_out'\t=>\t$tpaket_no_out,\n \t\t\t\t\t'status'\t=>\t'2',\n \t\t\t\t\t'id_user_approved'\t=>\t$this->session->userdata['ADMIN']['admin_id'],\n \t\t\t\t);\n \t\t\t\t$this->m_tpaket->tpaket_header_update($data);\n \t\t\t\t $approve_data_success = TRUE;\n\t\t\t/*\t} else {\n\t\t\t\t $approve_data_success = FALSE;\n\t\t\t\t}*/\n }\n\n $this->db->trans_complete();\n\n if(isset($_POST['button']['save'])) {\n if ($input_detail_success === TRUE) {\n \t\t\t $this->l_general->success_page('Data Transaksi Paket berhasil dimasukkan', site_url('tpaket/input'));\n } else {\n $this->m_tpaket->tpaket_header_delete($id_tpaket_header);\n\t\t\t\t$this->jagmodule['error_code'] = '004'; \n\t\t$this->l_general->error_page($this->jagmodule, 'Data Transaksi Paket tidak berhasil di tambah', site_url($this->session->userdata['PAGE']['next']));\n }\n } else if(isset($_POST['button']['approve']))\n if($approve_data_success === TRUE) {\n \t\t\t $this->l_general->success_page('Data Transaksi Paket berhasil diapprove', site_url('tpaket/input'));\n } else {\n $this->m_tpaket->tpaket_header_delete($id_tpaket_header);\n\t\t\t\t$this->jagmodule['error_code'] = '005'; \n\t\t$this->l_general->error_page($this->jagmodule, 'Data Transaksi Paket tidak berhasil diapprove.<br>\n Pesan Kesalahan dari sistem SAP : '.$approved_data['sap_messages'], site_url($this->session->userdata['PAGE']['next']));\n }\n\n\t\t}\n\t}", "public function tambah($data){\n\t\t$this->db->insert('pinjam_uang', $data);\n\t}", "function setData(){\n\t\t$this->load->library('jqdatagrid');\n\t\t$oper = $this->input->post('oper');\n\t\t$id = $this->input->post('id');\n\t\t$data = $_POST;\n\t\t$mcodp = \"??????\";\n\t\t$check = 0;\n\n\t\tunset($data['oper']);\n\t\tunset($data['id']);\n\t\tif($oper == 'add'){\n\t\t\tif(false == empty($data)){\n\t\t\t\t$check = $this->datasis->dameval(\"SELECT count(*) FROM prdo WHERE $mcodp=\".$this->db->escape($data[$mcodp]));\n\t\t\t\tif ( $check == 0 ){\n\t\t\t\t\t$this->db->insert('prdo', $data);\n\t\t\t\t\techo \"Registro Agregado\";\n\n\t\t\t\t\tlogusu('PRDO',\"Registro ????? INCLUIDO\");\n\t\t\t\t} else\n\t\t\t\t\techo \"Ya existe un registro con ese $mcodp\";\n\t\t\t} else\n\t\t\t\techo \"Fallo Agregado!!!\";\n\n\t\t} elseif($oper == 'edit') {\n\t\t\t$nuevo = $data[$mcodp];\n\t\t\t$anterior = $this->datasis->dameval(\"SELECT $mcodp FROM prdo WHERE id=$id\");\n\t\t\tif ( $nuevo <> $anterior ){\n\t\t\t\t//si no son iguales borra el que existe y cambia\n\t\t\t\t$this->db->query(\"DELETE FROM prdo WHERE $mcodp=?\", array($mcodp));\n\t\t\t\t$this->db->query(\"UPDATE prdo SET $mcodp=? WHERE $mcodp=?\", array( $nuevo, $anterior ));\n\t\t\t\t$this->db->where(\"id\", $id);\n\t\t\t\t$this->db->update(\"prdo\", $data);\n\t\t\t\tlogusu('PRDO',\"$mcodp Cambiado/Fusionado Nuevo:\".$nuevo.\" Anterior: \".$anterior.\" MODIFICADO\");\n\t\t\t\techo \"Grupo Cambiado/Fusionado en clientes\";\n\t\t\t} else {\n\t\t\t\tunset($data[$mcodp]);\n\t\t\t\t$this->db->where(\"id\", $id);\n\t\t\t\t$this->db->update('prdo', $data);\n\t\t\t\tlogusu('PRDO',\"Grupo de Cliente \".$nuevo.\" MODIFICADO\");\n\t\t\t\techo \"$mcodp Modificado\";\n\t\t\t}\n\n\t\t} elseif($oper == 'del') {\n\t\t\t$meco = $this->datasis->dameval(\"SELECT $mcodp FROM prdo WHERE id=$id\");\n\t\t\t//$check = $this->datasis->dameval(\"SELECT COUNT(*) FROM prdo WHERE id='$id' \");\n\t\t\tif ($check > 0){\n\t\t\t\techo \" El registro no puede ser eliminado; tiene movimiento \";\n\t\t\t} else {\n\t\t\t\t$this->db->query(\"DELETE FROM prdo WHERE id=$id \");\n\t\t\t\tlogusu('PRDO',\"Registro ????? ELIMINADO\");\n\t\t\t\techo \"Registro Eliminado\";\n\t\t\t}\n\t\t};\n\t}", "public function tambah_agama(){\n\t\t$data['ambil_profil_usp']=$this->Tu_model->Select_satu('tbl_profil_usp', 'aktif', 'Ya');\n $data['title'] = \"Agama\";\n $data['target_tambah'] = 'tambah_agama';\n $data['target_kembali'] = 'agama';\n $data['aksi'] = 'Data Agama';\n $this->load->view('tu/head', $data);\n $this->load->view('tu/profile');\n $this->load->view('tu/side_menu');\n $this->load->view('tu/top_nav');\n $this->load->view('tu/add_agama');\n\n if($this->input->method() === 'post') {\n $id_agama = $this->input->post('txtID');\n $simpan['id_agama'] =$id_agama;\n $simpan['agama'] = $this->input->post('txtAgama');\n if($this->Tu_model->Simpan_Content('tbl_agama',$simpan)){\n $data[\"status\"] = \"sukses\";\n $this->load->view('tu/modal_tambah',$data);\n }else{\n $data[\"status\"] = \"error\";\n $this->load->view('tu/modal_tambah');\n }\n\n }\n $this->load->view('tu/footer');\n $this->load->view('tu/js_file');\n $this->load->view('tu/js_mask');\n $this->load->view('tu/end_page');\n }", "public function simpan($input)\n\t{\n\t\t$this->KdSubKategori = $input['kdsubkategori'];\n\t\t$this->NmSubKategori = $input['nmsubkategori'];\n\t\t$this->save();\n\t}", "public function InsertBiodataMahasiswa()\n {\n\t\t$data = array(\n\t\t\t\t\"nama_mahasiswa\",\n\t\t\t\t\"jenis_kelamin\",\n\t\t\t\t\"tempat_lahir\",\n\t\t\t\t\"tanggal_lahir\",\n\t\t\t\t\"id_agama\",\n\t\t\t\t\"nik\",\n\t\t\t\t\"nisn\",\n\t\t\t\t\"npwp\",\n\t\t\t\t\"kewarganegaraan\",\n\t\t\t\t\"jalan\",\n\t\t\t\t\"dusun\",\n\t\t\t\t\"rt\",\n\t\t\t\t\"rw\",\n\t\t\t\t\"kelurahan\",\n\t\t\t\t\"kode_pos\",\n\t\t\t\t\"id_wilayah\",\n\t\t\t\t\"id_jenis_tinggal\",\n\t\t\t\t\"id_alat_transportasi\",\n\t\t\t\t\"telepon\",\n\t\t\t\t\"handphone\",\n\t\t\t\t\"email\",\n\t\t\t\t\"penerima_kps\",\n\t\t\t\t\"nomor_kps\",\n\t\t\t\t\"nik_ayah\",\n\t\t\t\t\"nama_ayah\",\n\t\t\t\t\"tanggal_lahir_ayah\",\n\t\t\t\t\"id_pendidikan_ayah\",\n\t\t\t\t\"id_pekerjaan_ayah\",\n\t\t\t\t\"id_penghasilan_ayah\",\n\t\t\t\t\"nik_ibu\",\n\t\t\t\t\"nama_ibu_kandung\",\n\t\t\t\t\"tanggal_lahir_ibu\",\n\t\t\t\t\"id_pendidikan_ibu\",\n\t\t\t\t\"id_pekerjaan_ibu\",\n\t\t\t\t\"id_penghasilan_ibu\",\n\t\t\t\t\"nama_wali\",\n\t\t\t\t\"tanggal_lahir_wali\",\n\t\t\t\t\"id_pendidikan_wali\",\n\t\t\t\t\"id_pekerjaan_wali\",\n\t\t\t\t\"id_penghasilan_wali\",\n\t\t\t\t\"id_kebutuhan_khusus_mahasiswa\",\n\t\t\t\t\"id_kebutuhan_khusus_ayah\",\n\t\t\t\t\"id_kebutuhan_khusus_ibu\");\t\t\t\n\t\treturn $data;\t\n\t}", "public function input_data($data,$table){\n\t\t$this->db->insert($table,$data);\n\t}", "public function input() {\n $this->is_loggedIn();\n $this->is_admin();\n // Populate username for form field username\n $operators = $this->populateOperator();\n // Populate vin for form field plate_number and serial_number\n $plate_number = $this->populateVin();\n $data = [\n 'username'=>$operators['username'],\n 'oId'=>$operators['oId'],\n 'plate_number'=>$plate_number,\n ];\n $this->load->view('template_administrator/header');\n $this->load->view('template_administrator/sidebar');\n $this->load->view('administrator/lk_dt_form',$data);\n $this->load->view('template_administrator/footer');\n }", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "public function prosesinput_data_kelas(){\n\t\t$this->m_aka->prosesinput_data_kelas();\n\t\tredirect('c_index_aka/data_kelas');\n\t}", "public function simpan()\n {\n $data['nik'] = $this->input->post('datanik');\n $data['penghasilan_sebulan'] = $this->input->post('penghasilansebulan');\n $data['maksud_pembuatan'] = $this->input->post('maksudpembuatan');\n $data['no_surat'] = date(\"Y.m.d\");\n $data['tanggal'] = date(\"Y-m-d\");\n $data['status'] = \"Request\";\n\n $this->M_penghasilan->inputdata($data);\n\n redirect('C_penghasilan');\n }", "function data($jenis, $detail = null, $action = null){\n\t\t\t\n\t\t$jenis = $this->security->xss_clean($this->uri->segment(5));\n\t\t$data['kode'] = $jenis;\n\t\t# set parameters \n\t\t$kd_dosen = $this->session->userdata(\"kd_dosen\");\n\t\t$thn = $this->session->userdata(\"ta\");\n\t\t$smt = $this->session->userdata(\"smt\");\n\t\t$status = $this->session->userdata(\"jenis_dosen\");\n\t\t\n\t\t$kd_ta = $this->setting->_generate_kd_ta($thn);\n\t\t$kd_smt = $this->setting->_generate_kd_smt($smt);\n\t\t\n\t\t $data['is_crud'] = $this->setting->_is_crud_bkd_lalu($kd_ta, $kd_smt);\n\t\t/*if($data['is_crud'] == 1){\n\t\t\t$data['tombol'] = 'style=\"display:block\"';\n\t\t}else{\n\t\t\t$data['tombol'] = 'style=\"display:none\"';\n\t\t} */\n\t\t\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_jadwal';\n\t\t$parameter = array();\n\t\t$jadwal = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\tif(!empty($jadwal)){\n\t\t\t$data['tombol'] = 'style=\"display:block\"';\n\t\t}else{\n\t\t\t$data['tombol'] = 'style=\"display:none\"';\n\t\t\t$data['tombol2'] = 'style=\"display:;\"';\n\t\t\t$data['tombol3'] = 'style=\"display:;pointer-events:none; cursor:default;\"';\n\t\t}\t\n\t\t\n\t\tif ($detail !== null){\n\t\t\tif ($action !== ''){\n\t\t\t\tswitch ($action){\n\t\t\t\t\tcase 'penugasan-isi': $data['view'] = 'dosen/isi_dokumen'; break;\n\t\t\t\t\tcase 'penugasan-cari': {\n\t\t\t\t\t\t\t$data['view'] = 'dosen/cari_dokumen';\n\t\t\t\t\t\t}break;\n\t\t\t\t\tcase 'penugasan-upload': $data['view'] = 'dosen/upload_dokumen'; break;\n\t\t\t\t\tcase 'kinerja-isi': $data['view'] = 'dosen/isi_dokumen'; break;\n\t\t\t\t\tcase 'kinerja-cari': {\n\t\t\t\t\t\t\t$data['view'] = 'dosen/cari_dokumen'; \n\t\t\t\t\t}break;\n\t\t\t\t\tcase 'kinerja-upload': $data['view'] = 'dosen/upload_dokumen'; break;\n\t\t\t\t\tdefault : $data['view'] = 'dosen/isi_dokumen'; break;\n\t\t\t\t}\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_bkd';\n\t\t\t\t$parameter = array('api_search' => array($detail, $data['kode']));\n\t\t\t\t$data['current_data'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t\t# GET PARTNER\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/partner';\n\t\t\t\t$parameter = array('api_kode' => 11000, 'api_subkode' => 1, 'api_search' => array($detail,'PENELITIAN'));\n\t\t\t\t$data['partner'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\n\t\t\t\t$data['nama_partner'] = array();\n\t\t\t\tforeach ($data['partner'] as $p){\n\t\t\t\t\t$data['nama_partner'][$p->PARTNER] = $this->get_nama_partner($p->PARTNER);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_bkd';\n\t\t\t$parameter = array('api_search' => array($detail, $data['kode']));\n\t\t\t$data['current_data'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t}\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_bebankerja';\n\t\t$parameter = array('api_search' => array($data['kode'], $kd_dosen, $thn, $smt));\n\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t// $temp_sks =0;\n\t\t// foreach ($data['data_beban'] as $key) {\n\t\t// \t$n_sks = (float) str_replace(\",\", \".\", $key->SKS_BKT);\n\t\t// \t$temp_sks +=$n_sks;\n\t\t// }\n\t\t\n\t\t//berubah dari sini \n\t\t//============================================\n\t\t$temp_sks = array();\n\t\tforeach ($data['data_beban'] as $key) {\n\t\t\t$n_sks = (float) str_replace(\",\", \".\", $key->SKS_BKT);\n\t\t\t//$temp_sks +=$n_sks;\n\n\t\t\tif(isset($temp_sks[$key->KD_KAT])){\n\t\t\t\t$temp_sks[$key->KD_KAT] += $n_sks;\n\t\t\t}else{\n\t\t\t\t$temp_sks[$key->KD_KAT] = $n_sks;\n\t\t\t}\n\t\t}\n\n\t\t//===========================================\n\n\n\n\t\t$kd=$this->session->userdata('kd_dosen');\n\t\t$ta = $this->session->userdata('kd_ta');\n\t\t$smt = $this->session->userdata('kd_smt');\n\n\t\t$kd_ta = $this->_generate_ta($ta);\n\t\t$kd_smt = $this->_generate_smt($smt);\n\t\t$this->session->unset_userdata('jenis_dosen');\n\t\t$this->session->set_userdata('jenis_dosen', $this->history->_status_DS($kd, $kd_ta, $kd_smt));\n\n\t\t\n\t\tswitch ($jenis) {\n\t\t\tcase 'A':\n\t\t\t\t$subkode = 1;//syarat pendidikan\n\t\t\t\tbreak;\n\t\t\tcase 'B':\n\t\t\t\t$subkode = 2;//syarat penelitian\n\t\t\t\tbreak;\n\t\t\tcase 'C':\n\t\t\t\t$subkode = 3;//syarat pengabdian\n\t\t\t\tbreak;\n\t\t\tcase 'D': case 'F': case 'H':\n\t\t\t\t$subkode = 4;//syarat penunjang\n\t\t\t\tbreak;\n\n\t\t}\n\t\t//get syarat dari API\n\t\t\t$syarat_minimal = $this->s00_lib_api->get_api_json(\n\t\t\t\t\t\tURL_API_BKD.'/bkd_beban_kerja/get_syarat_kesimpulan',\n\t\t\t\t\t\t'POST',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'api_kode' => 1000,\n\t\t\t\t\t\t\t'api_subkode' => $subkode, //untuk PENDIDIKAN\n\t\t\t\t\t\t\t'api_search' => array($this->history->_status_DS($kd, $kd_ta, $kd_smt))\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\n\t\t//$temp_sks;\n\t\tif(isset($syarat_minimal['NILAI'])){\n\t\t\t$syarat_sks = $syarat_minimal['NILAI'];\n\t\t}else{\n\t\t\t$syarat_sks = 0;\n\t\t}\n\t\t\n\t\t$i=0;\n\t\tforeach ($data['data_beban'] as $key) {\n\t\t\t$kd_bk = $key->KD_BK;\n\t\t\t$kd_kat = $key->KD_KAT;\n\t\t\t$status_pindah = $key->STATUS_PINDAH;\n\t\t\tif($status_pindah == 1){\n\t\t\t\t$kd_kat_remun = $kd_kat;\n\t\t\t}elseif($status_pindah == 0){\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_kd_kat_remun2';\n\t\t\t\t$parameter = array('api_search' => array($kd_kat));\n\t\t\t\t$kd_kat_remun = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter);\n\t\t\t}\n\n\t\t\t//=======\n\n\t\t\t$temp_syarat = $this->s00_lib_api->get_api_json(\n\t\t\t\t\t\tURL_API_BKD.'/bkd_beban_kerja/get_syarat_kesimpulan_kat',\n\t\t\t\t\t\t'POST',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'api_kode' => 1000,\n\t\t\t\t\t\t\t'api_subkode' => $subkode, //untuk PENDIDIKAN\n\t\t\t\t\t\t\t'api_search' => array($this->history->_status_DS($kd, $kd_ta, $kd_smt), $kd_kat)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t$data['data_beban'][$i]->MINIMAL_SKS = $temp_syarat;\n\n\t\t\t//=======\n\n\t\t\t$data['data_beban'][$i]->KD_KAT_REMUN = $kd_kat_remun;\n\t\t\tif((($temp_sks[$kd_kat] - $data['data_beban'][$i]->SKS_BKT) >= $temp_syarat) AND $data['data_beban'][$i]->STATUS_PINDAH==0){\n\t\t\t\t$data['data_beban'][$i]->SYARAT_PINDAH = 1;//dapat dipindah\n\t\t\t}else{\n\t\t\t\t$data['data_beban'][$i]->SYARAT_PINDAH = 0;//tidak dapat dipindah\n\t\t\t}\n\t\t\t\n\t\t\t$i++;\n\t\t\t/*echo \"<pre>\";\n\t\t\tprint_r($key);\n\t\t\techo \"<pre>\";*/\n\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_kd_kat';\n\t\t\t$parameter \t= array('api_search'=>array($kd_bk));\n\t\t\t$kd_kat = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t//cek di tabel konversi apakah kd_kat memiliki kd_kat remun\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/cek_kd_konversi';\n\t\t\t$parameter \t= array('api_search'=>array($kd_kat));\n\t\t\t$data['konversi'][$kd_kat] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t}\n\n\t\t// echo '<pre>';\n\t\t// print_r($data['data_beban']);\n\t\t// echo '</pre>';\n\n\t\t// die();\n\n\t\t/*die();*/\n\t\t/*\n\n\t\tdie();*/\n\t\t#print_r($data['data_beban']);\n\t\t# load view\n\n\t\t/*mekanisme cek data asesor, untuk melihat apakah dosen sudah mengisi data asesor atau belum*/\n\t\t$data['nira'] = $this->get_data_asesor_dosen_by_nip();\n\t\t\n\t\t$this->cek_nira_asesor_dosen_uin();\n\t\t$this->auto_insert_penelitian();\n\n\t\t/*$this->auto_insert_pengabdian();*/ /*SUDAH BISA INSERT TINGGAL TUNGGU KEPUTUSAN DATA PENGABDIAN*/\n\n\t\t$this->output99->output_display('dosen/daftar_beban_kerja',$data);\n\t}", "protected function loadFormData() \n {\n\t\t\techo '<br/> **************************************************************';\n\t\t echo '<br/> model VISTA -> funcion loadFormData\t\t\t\t ';\n\t\t echo '<br/> ************************************************************** <br/>';\n //Compruebe la sesión de datos de formularios previamente introducidos.\n $data = JFactory::getApplication()->getUserState('com_codigorecibo.edit.vista.data', array());\n if (empty($data)) \n {\n $data = $this->getItem();\n echo '///////////////////////////////////////////////////////////////////';\n echo '<br/>DENTRO model vista -> data en funcion loadFormData '.$data;\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n echo '/////////////////////////////////////////////////////////////////////';\n // Prime some default values.\n //getstate cojo el id del registro indicando la vista en la que estoy\n\t\t\t\t\t\t\t\t\t//~ if ($this->getState('vista.id') == 0) \n\t\t\t\t\t\t\t\t\t//~ {\n\t\t\t\t\t\t\t\t\t\t//~ $id = $this->getState('vista.id');\n\t\t\t\t\t\t\t\t\t\t//~ echo '<br/> estado Model Vista --> funcion load --> '.$estado;\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\t\n\t\t\t\t\t\t\n \n }\n //data = los datos del registro\n $view = $_GET['view'];\n $layout =$_GET['layout'];\n echo '<br/>DEVUELVE = '.$view.'--'.$layout.' ------- model vista -> data en funcion loadFormData '.$data;\n //~ echo '<pre>';\n //~ print_r($this);\n //~ echo '</pre>';\n \n return $data;\n }", "function tambah($data) {\r\n\t//koneksi sudah dilakukan di function\r\n\tglobal $conn;\r\n\t// mengambil data dari tiap elemen dalam form\r\n\t$nama = htmlspecialchars($data[\"nama\"]);\r\n\t$genre = htmlspecialchars($data[\"genre\"]);\r\n\t$harga = htmlspecialchars($data[\"harga\"]);\r\n\r\n\t//query untuk insert atau menambahkan data\r\n\t$query = \"INSERT INTO buku VALUES ('', '$nama', '$genre', $harga)\";\r\n\tmysqli_query($conn, $query);\r\n\t//mengembalikan angka 1 jika berhasil dan -1 jika gagal\r\n\treturn mysqli_affected_rows($conn);\r\n}", "private function setData($data){\n if (!empty($data['nis'])){ \n $siswa = $this->em->find('SiswaEntity', $data['nis']);\n $this->sertifikat->setSiswa($siswa); \n }\n if (!empty($data['tempat_ujian'])) : $this->sertifikat->setTempat_ujian($data['tempat_ujian']); endif;\n if (!empty($data['tgl_ujian'])) {\n $tgl_arr = explode('-', $data['tgl_ujian']);\n $tgl = new DateTime();\n $tgl->setDate($tgl_arr[0], $tgl_arr[1], $tgl_arr[2]);\n $this->sertifikat->setTgl_ujian($tgl);\n }\n if (!empty($data['juz'])) : $this->sertifikat->setJuz($data['juz']); endif;\n if (!empty($data['nilai'])) : $this->sertifikat->setNilai($data['nilai']); endif;\n if (!empty($data['predikat'])) : $this->sertifikat->setPredikat($data['predikat']); endif;\n if (!empty($data['keterangan'])) : $this->sertifikat->setKeterangan($data['keterangan']); endif;\n }", "public function peditberita(){\n\t\t$data_sender = $this->input->post('data_sender');\n//\t\tprint_r($data_sender);die();\n\t\t$flag = array('id_user'=>$this->input->post('oid'));\n\t\t$edit = array(\n\t\t\t'nama' => $this->input->post('nnama'),\n\t\t\t'email' => $this->input->post('nemail'),\n\t\t\t'no_hp' => $this->input->post('nhp'),\n\t\t\t'id_role' => $this->input->post('nrole')\n\t\t);\n\t\t$this->Allcrud->editData('user',$edit,$flag);\n\t}", "public function get_pembeli_darat() {\r\n $nama = $this->input->get('term'); //variabel kunci yang di bawa dari input text id kode\r\n $tipe = \"darat\";\r\n $query = $this->master->get_pembeli($tipe,$nama); //query model\r\n\r\n if($query == TRUE){\r\n $pelanggan = array();\r\n foreach ($query as $data) {\r\n $pelanggan[] = array(\r\n 'label' => $data->nama_pengguna_jasa, //variabel array yg dibawa ke label ketikan kunci\r\n 'id' => $data->id_pengguna_jasa,\r\n 'nama' => $data->nama_pengguna_jasa , //variabel yg dibawa ke id nama\r\n 'alamat' => $data->alamat, //variabel yang dibawa ke id alamat\r\n 'no_telp' => $data->no_telp, //variabel yang dibawa ke id no telp\r\n 'pengguna'=> $data->pengguna_jasa_id_tarif, //variabel yang dibawa ke id pengguna jasa\r\n );\r\n }\r\n }\r\n\r\n echo json_encode($pelanggan); //data array yang telah kota deklarasikan dibawa menggunakan json\r\n }", "public function ram_input($cikk =''){\n if (bothAdminSeller($_SESSION[\"jog\"])) {\n $warranity = $this->adminModel->getWarranity();\n $data = [\n 'main_title' => 'RAM-ok bevitele',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => '',\n 'socets' => $this->ramModel->ramSocets(),\n 'warr' => $warranity,\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' => '',\n 'warranity' => '',\n 'price' => '',\n 'type' => '',\n 'man_type' => '',\n 'capacity' => '',\n 'timing' => '',\n 'voltage' => '',\n 'clock' => '',\n 'kit' => '',\n 'xmp' => 0,\n 'man_url' => '',\n 'picUrl' => '',\n 'disabledIn' => '',\n 'disabledMod' => 'disabled'\n ];\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n if (isset($_POST['ram_input'])) {\n $data = [\n 'main_title' => 'RAM-ok bevitele',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => trim($_POST[\"ram_cikkszam\"]),\n 'socets' => $this->ramModel->ramSocets(),\n 'selected_socket' => trim($_POST[\"foglalat\"]),\n 'warr' => $warranity,\n 'warranity' => trim($_POST[\"warranity\"]),\n 'price' => trim($_POST[\"price\"]),\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' =>trim($_POST[\"manufacturer\"]),\n 'type' => trim($_POST[\"type\"]),\n 'man_type' => trim($_POST[\"man_type\"]),\n 'capacity' => trim($_POST[\"capacity\"]),\n 'timing' => trim($_POST[\"timing\"]),\n 'voltage' => trim($_POST[\"voltage\"]),\n 'clock' => trim($_POST[\"clock\"]),\n 'kit' => trim($_POST[\"kit\"]),\n 'xmp' => trim($_POST[\"xmp\"]),\n 'man_url' => trim($_POST[\"man_url\"]),\n 'picUrl' => trim($_POST[\"picUrl\"]),\n 'disabledIn' => '',\n 'disabledMod' => 'disabled'\n ];\n if ($this->ramModel->ramProductInput($data) && $this->ramModel->manUrl($data[\"ram_cikkszam\"],$data[\"man_url\"]) && $this->ramModel->picUrl($data[\"ram_cikkszam\"],$data[\"picUrl\"]) && $this->ramModel->priceInput($data[\"ram_cikkszam\"],$data[\"price\"])) {\n flash(\"ramInputSuccess\",\"A (\".$data[\"type\"].\") típusú RAM bevitele sikeres volt\");\n redirect(\"admins/ram_input\");\n }else{\n flash(\"ramInputFail\",\"A (\".$data[\"type\"].\") típusú RAM bevitele sikertelen volt\", \"alert alert-danger\");\n redirect(\"admins/ram_input\");\n }\n }elseif(isset($_POST[\"editRAM\"])){\n $item = $this->ramModel->ramByCikkszam($cikk);\n $data = [\n 'main_title' => $cikk.' Módosítása',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => $item->cikkszam,\n 'socets' => $this->ramModel->ramSocets(),\n 'selected_socket' => $item->tipus,\n 'warr' => $warranity,\n 'warranity' => $item->WMonth,\n 'price' => $item->ramPrice,\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' => $item->manufacturer,\n 'type' => $item->type,\n 'man_type' => $item->typeCode,\n 'capacity' => $item->capacity,\n 'timing' => $item->timing,\n 'voltage' => $item->voltage,\n 'clock' => $item->clock,\n 'kit' => $item->kit,\n 'xmp' => $item->is_xmp,\n 'man_url' => $item->Url,\n 'picUrl' => $item->picUrl,\n 'disabledIn' => 'disabled',\n 'disabledMod' => ''\n ];\n }\n elseif (isset($_POST[\"ram_modify\"])) {\n $data = [\n 'cikkszam' => $cikk,\n 'selected_socket' => trim($_POST[\"foglalat\"]),\n 'warranity' => trim($_POST[\"warranity\"]),\n 'price' => trim($_POST[\"price\"]),\n 'manufacturer' =>trim($_POST[\"manufacturer\"]),\n 'type' => trim($_POST[\"type\"]),\n 'man_type' => trim($_POST[\"man_type\"]),\n 'capacity' => trim($_POST[\"capacity\"]),\n 'timing' => trim($_POST[\"timing\"]),\n 'voltage' => trim($_POST[\"voltage\"]),\n 'clock' => trim($_POST[\"clock\"]),\n 'kit' => trim($_POST[\"kit\"]),\n 'xmp' => trim($_POST[\"xmp\"]),\n 'man_url' => trim($_POST[\"man_url\"]),\n 'picUrl' => trim($_POST[\"picUrl\"]),\n ];\n if ($this->ramModel->ramProductModify($data) &&$this->ramModel->picUrlModify($data[\"cikkszam\"], $data[\"picUrl\"]) && $this->ramModel->manUrlModify($data[\"cikkszam\"],$data[\"man_url\"]) && $this->ramModel->ramPriceModify($data[\"cikkszam\"], $data[\"price\"]))\n {\n flash('ramModifySuccess','A ('.$data[\"type\"].' '.$data[\"typeCode\"].') Módosítása sikeres volt!');\n redirect(\"admins/ram_input\");\n }else{\n flash(\"ramModifyFail\", 'A ('.$data[\"type\"].' '.$data[\"typeCode\"].') Módosítása sikertelen volt!', 'alert alert-danger');\n redirect(\"admins/ram_input\");\n }\n } \n \n }\n $this->view('admin/ram_input',$data);\n }else{\n redirect('index');\n }\n \n }", "public function get_data(){\n // $id = 2;\n // $stmt = $this->verivied()->prepare(\"SELECT * FROM emptab WHERE id= :id\");\n // $stmt->bindParam(':id', $id);\n // $stmt->execute();\n // $data = $stmt->fetchAll(PDO::FETCH_ASSOC);\n // return $data;\n // select by id;\n $data1 = $this->Xgen->select('id,nama')->from('emptab')->where('id = :id', 4)->go();\n // select all;\n //$data = $this->Xgen->select('id,nama')->from('emptab')->go();\n // inser data\n // $data = $this->Xgen->insert_query('emptab',[\n // 'nama' => 'bxel'\n // ])->go();\n //update data\n //$data = $this->Xgen->update_query('emptab', ['nama' => 'new name'])->where('id = :id', 4)->go();\n //DELETE\n //$data1 = $this->Xgen->delete('emptab','id = :id',4)->go();\n\n }", "public function get_data()\n {\n $post = $this->input->post(null, true);\n if ($post) {\n // ambil data dari model\n $list = $this->hasil->get_datatables();\n $data = array();\n $no = $post['start'];\n foreach ($list as $field) {\n $no++;\n $row = array();\n $row[] = $no;\n $row[] = $field->nama_akun;\n $row[] = $this->date->tanggal($field->tgl, 's');\n $row[] = $field->nilai;\n $data[] = $row;\n }\n\n $output = array(\n \"draw\" => $post['draw'],\n \"recordsTotal\" => $this->hasil->count_all(),\n \"recordsFiltered\" => $this->hasil->count_filtered(),\n \"data\" => $data,\n );\n // tampilkan data\n echo json_encode($output);\n } else {\n $this->index();\n }\n }", "public function editdata(){\n\t\t$id_soal_tpa = $this->input->post('id_soal_tpa');\n\t\t$soal = $this->input->post('soal');\n\t\t$opsi_a = $this->input->post('opsi_a');\n\t\t$opsi_b = $this->input->post('opsi_b');\n\t\t$opsi_c = $this->input->post('opsi_c');\n\t\t$opsi_d = $this->input->post('opsi_d');\n\t\t$opsi_e = $this->input->post('opsi_e');\n\t\t$jawaban = $this->input->post('jawaban');\n\n\t\t$data = array(\n\t\t\t'soal' => $soal,\n\t\t\t'opsi_a' => $opsi_a,\n\t\t\t'opsi_b' => $opsi_b,\n\t\t\t'opsi_c' => $opsi_c,\n\t\t\t'opsi_d' => $opsi_d,\n\t\t\t'opsi_e' => $opsi_e,\n\t\t\t'jawaban' => $jawaban\n\t\t);\n\n\t\t$where = array(\n\t\t\t'id_soal_tpa' => $id_soal_tpa\n\t\t);\n\n\t\t$this->Mdl_soal->update_data($where,$data,'tb_soal_tpa');\n\t\t$this->session->set_flashdata('msg_update','Data Berhasil Diedit');\n\t\tredirect('Soal/Soal_tpa/');\n\t}", "public function prosesinput_data_kalender_akademik(){\n\t\t$this->m_aka->prosesinput_data_kalender_akademik();\n\t\tredirect('c_index_aka/data_kalender_akademik');\n\t}", "public function createDataGejala()\n {\n $data = array(\n 'kd_gejala' => $this->input->post('kd_gejala'),\n 'nama_gejala' => $this->input->post('nama_gejala'),\n 'poin_gejala' => $this->input->post('poin_gejala'),\n );\n $this->db->insert('tb_gejala', $data); // tbl Gejala = nama database Gejala\n }", "function getInputValues();", "function PerbaharuiDataBahanBaku() {\n\tinclude '../../koneksi/index.php';\n\n\t//inisialisasi\n\t$kode = strtoupper($_POST['kode']);\n\t$nama = strtoupper($_POST['nama']);\n\t$harga_beli = $_POST['harga_beli'];\n\t$harga_jual = $_POST['harga_jual'];\n\t$stok = $_POST['stok'];\n\t$id = $_POST['id'];\n\n\t//update\n\t$sql = \"UPDATE bahan_baku SET kode = ?, nama = ?, harga_beli = ?, harga_jual = ?, stok = ? WHERE id = ?\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bind_param('ssiiii', $kode, $nama, $harga_beli, $harga_jual, $stok, $id);\n\tif ($stmt->execute()) {\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"berhasil_memperbaharui\";\n\t} else {\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"gagal_memperbaharui\";\n\t}\n\t$stmt->close();\n}", "public function setDataLaporan($data) {\n $this->db->insert($this->table,$data); \n }", "function inputData(&$data)\n{\n echo (\"tampil data\");\n}", "function tambah($data){\r\n\t\tglobal $conn;\r\n\r\n\t\t$nim = htmlspecialchars($data[\"nim\"]);\r\n\t\t$namalengkap = htmlspecialchars($data[\"namalengkap\"]);\r\n\t\t$kotaasal = htmlspecialchars($data[\"kotaasal\"]);\r\n\t\t$tanggallahir = htmlspecialchars($data[\"tanggallahir\"]); \r\n\t\t$namaorangtua = htmlspecialchars($data[\"namaorangtua\"]);\r\n\t\t$alamatorangtua = htmlspecialchars($data[\"alamatorangtua\"]);\r\n\t\t$kodepos = htmlspecialchars($data[\"kodepos\"]);\r\n\t\t$nomortelepon = htmlspecialchars($data[\"nomortelepon\"]);\r\n\t\t$status = htmlspecialchars($data[\"status\"]);\r\n\r\n\t\t//query insert data\r\n\t\t$query = \"INSERT INTO datamahasiswa\r\n\t\t\t\t\t\tVALUES \r\n\t\t\t\t\t('', '$nim', '$namalengkap', '$kotaasal', '$tanggallahir', '$namaorangtua', '$alamatorangtua', '$kodepos', '$nomortelepon', '$status')\r\n\t\t\t\t\t\";\r\n\t\tmysqli_query($conn, $query);\r\n\r\n\t\treturn mysqli_affected_rows($conn);\r\n\r\n\t\t}", "public function ubah_data()\n {\n $id = $this->request->getVar('id');\n $jumlahAktif = 0;\n $jumlahTidakAktif = 0;\n if ($id) {\n $jumlahData = count($id);\n for ($i = 0; $i < $jumlahData; $i++) {\n $currentData = $this->BansosModel->where('id', $id[$i])->first();\n if ($currentData['statusAnggota'] == 'Aktif') {\n $db = \\Config\\Database::connect();\n $builder = $db->table('bansos');\n $builder->set('statusAnggota', 'Tidak Aktif');\n $builder->where('id', $id[$i]);\n $builder->update();\n $jumlahTidakAktif++;\n } else {\n $db = \\Config\\Database::connect();\n $builder = $db->table('bansos');\n $builder->set('statusAnggota', 'Aktif');\n $builder->where('id', $id[$i]);\n $builder->update();\n $jumlahAktif++;\n }\n }\n } else {\n session()->setFlashdata('gagal', 'Tidak Ada Data Yang Dipilih');\n return redirect()->to('/Admin/penerima_bansos');\n }\n session()->setFlashdata('pesan', '' . $jumlahAktif . ' Data Statusnya Dibuah Menjadi Aktif dan ' . $jumlahTidakAktif . ' Data Statusnya Diubah Menjadi Tidak Aktif');\n return redirect()->to('/Admin/penerima_bansos');\n }", "public function insert_entry($data) //makanya perlu $data berupa array karena lemparan\n {\n /*\n\t\t\t $this->title = $_POST['title']; // please read the below note\n $this->content = $_POST['content'];\n $this->date = time();\n\t\t\t\t*/\n $this->db->insert('jenis_menu', $data); //method baru bukan kepunyaan controller maupun model ERORRR\n }", "function data_prosesan()\n{\n //$jadual['medan'][]='*';\n /*$jadual['medan'][]='newss,ssm,nama,tel,fax,responden,' .\n '(SELECT keterangan FROM msic WHERE msic=msic2000 LIMIT 1,1) as keterangan,' .\n 'msic2000,msicB2000,fe';*/\n $sama='j1.newss,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn, ';\n $sama2='j2.newss,concat(j2.tahun_rujukan,\"-\",j2.siri_kekerapan) as blnthn, ';\n //$jadual['medan'][]=$sama . 'ssm, nama, operator, sv, kekerapan_sv'; \n //$jadual['medan'][]=$sama . 'ng, po, data_anggaran, cara_maklum_balas, cara_terima, sumber_pertubuhan, kategori_sample';\n //$jadual['medan'][]=$sama . 'status_operasi, status_lain_pbb, bil_bulan_bco, siasatan_bermula, siasatan_berakhir';\n //$jadual['medan'][]=$sama . 'no_jln_bgn, tmn_kg, bandar_kawasan, poskod, negeri, daerah, catatan';\n //$jadual['medan'][]=$sama . 'responden, jawatan, email, notel, lamanweb, tarikh';\n //$jadual['medan'][]=$sama . 'responden2, jawatan2, email2, notel2, nofax2';\n //$jadual['medan'][]=$sama . '`no_jln_bgn-lokasi`, `tmn_kg-lokasi`, `bandar_kawasan-lokasi`, ' .\n //'`poskod-lokasi`, `negeri-lokasi` ng, `daerah-lokasi` dp';\n $jadual['medan'][]='j1.newss,j1.ssm,j1.nama,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn ';\n $jadual['medan'][]=$sama . \"\\r\" . 'msic_lama, (SELECT keterangan FROM msic WHERE msic=msic_lama LIMIT 1,1) as keterangan,' . \n 'msic_baru, utama '; \n //$jadual['medan'][]=$sama . \"\\r\\t\" . 'F3001, F3002, catatan_soalan3, ' . 'F5001, F5002, F5003, F5104, catatan_soalan5';\n $jadual['medan'][]=$sama . 'F6001, F6002, F6003, F6004, F6005, F6101, F6102, F6103, F6104, F6105, catatan_soalan6';\n $jadual['medan'][]=$sama . 'F7001, F7002, F7003, catatan_soalan7, ' .\n 'F8001, catatan_soalan8, F9001, catatan_soalan9';\n //$jadual['medan'][]=$sama . 'cara_anggaran, bulan_terakhir_data_sebenar, bil_bulan_data_telah_dianggar';\n\n //$jadual['medan'][]=$sama . 'Deskripsi_Produk_Oleh_Responden, Produk_Tetap, Deskripsi_Produk_Tetap,\n //Produk_Tambahan, Deskripsi_Produk_Tambahan, UnitKuantitiAsal, UnitKuantitiLain'; \n $produk='Deskripsi_Produk_Tetap Nama, Produk_Tetap Kod, ';\n $jadual['medan'][]=$sama . $produk . 'KuantitiPengeluaran, KuantitiJualan, NilaiJualan, ' .\n 'format(NilaiJualan/KuantitiJualan,2) as HargaUnit, UnitKuantitiKini';\n //$jadual['medan'][]=$sama . $produk . 'ProsesanKuantitiPengeluaran, ProsesanKuantitiJualan, ProsesanNilaiJualan, AUP';\n $jadual['medan'][]=$sama . $produk . 'F2497, F2498, F2499, Catatan';\n $jadual['medan'][]=$sama . \"\\r\\t\" . \n 'F3001, F3002, catatan_soalan3, ' .\n 'F5001, F5002, F5003, F5104, catatan_soalan5';\n\n //$jadual['medan'][]=$sama . 'catatan';\n $jadual['medan'][]=$sama . 'F4001, F4002, F4003, F4004';\n $jadual['medan'][]=$sama . 'F4101, F4102, F4103, F4104';\n $jadual['medan'][]=$sama . 'F4201, F4202, F4203, F4204';\n $jadual['medan'][]=$sama . 'catatan \"Nota \", F4302, F4303, F4304';\n\n // bulanan\n //$bulan=($_GET['bln']==null)? '':'AND siri_kekerapan=\"'.bersih($_GET['bln']).'\"';\n $bulan_penuh = array('Januari', 'Februari', 'Mac', 'April', \n 'Mei', 'Jun', 'Julai', 'Ogos', \n 'September', 'Oktober', 'November', 'Disember');\n //$kerap='\"'.$bulan_penuh[0].'\",\"'.$bulan_penuh[1].'\",\"'.$bulan_penuh[2].'\"';\n //$bulan=($_GET['bln']==null)? '':'AND j1.siri_kekerapan in ('.$kerap.')';\n //$myJadual=array('mm_rangka','mm_rangka');\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_info'; } // bil medan = 15\n for($z=1;$z <= 2;$z++) { $jadual['nama'][]='prosesmm_jualan'; }\n $jadual['nama'][]='prosesmm_info';\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_gajistaf'; }\n $join1='prosesmm_info';\n $join2='prosesmm_jualan';\n $join3='prosesmm_gajistaf';\n \n return $jadual;\n}", "public function hapusData($kode_barang){\n if (in_array($kode_barang, array_column($this->daftar_barang, 'kode_barang'))) {\n $key = array_search($kode_barang, array_column($this->daftar_barang, 'kode_barang'));\n unset($this->daftar_barang[$key]);\n $this->editData();\n echo \"Data berhasil dihapus\\n\";\n } else {\n echo \"Kode barang $kode_barang tidak ditemukan\\n\";\n }\n $this->ambilData();\n }", "public function insertBarang($data)\n {\n //menyimpan data ke tabel\n $this->insert($data);\n }", "public function input_data_staff_keuangan(){\n\t\t$data['content'] = 'admin/input_data_staff_keuangan';\n\t\t$this->load->view('content',$data);\n\t}" ]
[ "0.70207", "0.689755", "0.6679617", "0.6632788", "0.65572226", "0.6520138", "0.6492453", "0.64874566", "0.6442404", "0.6365272", "0.6360865", "0.63400966", "0.6327943", "0.631077", "0.628045", "0.6217633", "0.62124467", "0.6210119", "0.61954665", "0.6177942", "0.6172545", "0.6143116", "0.6139773", "0.61143076", "0.6108658", "0.610529", "0.6090613", "0.6083341", "0.6082028", "0.60505354", "0.60451007", "0.60310256", "0.5991247", "0.5983558", "0.5974964", "0.5942827", "0.5939957", "0.59204555", "0.59110695", "0.59072196", "0.5906455", "0.59050244", "0.59034586", "0.5902958", "0.58923554", "0.58733994", "0.58649707", "0.5860513", "0.5860113", "0.5850426", "0.58491635", "0.5848893", "0.5841379", "0.58410364", "0.58371365", "0.5831025", "0.5827754", "0.5822334", "0.58213663", "0.5817744", "0.58169186", "0.58156204", "0.58153087", "0.5809044", "0.58045614", "0.5801117", "0.57985795", "0.57955915", "0.57880396", "0.57833713", "0.57833415", "0.5781316", "0.5776553", "0.57617706", "0.57609797", "0.5760773", "0.5752229", "0.5746964", "0.5746367", "0.5743576", "0.5740822", "0.5739212", "0.5733984", "0.5725008", "0.572371", "0.5718683", "0.5717527", "0.5714859", "0.5714425", "0.57135785", "0.5709784", "0.57094914", "0.5698752", "0.5697564", "0.5694479", "0.56898266", "0.56892574", "0.5682499", "0.5680493", "0.5673063", "0.5671984" ]
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