query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Show the form for editing the specified resource.
public function edit($folio) { // // $id_folio = Empleado::find($folio); $puestos=Puesto::all(); return view('recept.empleados.edit_empleado',compact('id_folio','puestos')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.6834566", "0.68116575", "0.68075293", "0.6805924", "0.6801357", "0.6796291", "0.67915684", "0.67915684", "0.67874014", "0.678544", "0.67787844", "0.6777662", "0.67675763", "0.676299", "0.6746726", "0.6745706", "0.67450166", "0.67450166", "0.6739429", "0.6734577", "0.6725992", "0.67127997", "0.6694406", "0.6692487", "0.6689421", "0.66884303", "0.6687299", "0.6685663", "0.6682167", "0.66701853", "0.66697115", "0.6666091", "0.6666091", "0.66627705", "0.6661716", "0.6661522", "0.6657919", "0.6656454", "0.6653187", "0.6642113", "0.66332614", "0.66324973", "0.66275465", "0.66275465", "0.6619777", "0.6619387", "0.6617973", "0.66154003", "0.66110945", "0.6607966", "0.66065043", "0.6596376", "0.65953517", "0.65941286", "0.6591486", "0.6590759", "0.6588404", "0.658161", "0.6580548", "0.6579757", "0.6577171", "0.65761065", "0.657386", "0.65686774", "0.6567784", "0.65672046", "0.6566417", "0.65615803", "0.65615714", "0.65615714", "0.65592474", "0.65586483", "0.65568006", "0.6556628", "0.65564895", "0.6555322", "0.65551996", "0.6555016", "0.654888", "0.65477645", "0.65451735" ]
0.0
-1
Update the specified resource in storage.
public function update( Request $request, $folio) { //busco el elemento $emple = Empleado::find($folio); //verificacion si la variable esta tiene dato seleciona la imagen y eliminalo if ($request -> file('imagen')) { $imagen_antigua = DB::select("SELECT imagen FROM empleados"); storage::delete('public/'.$imagen_antigua[0]->imagen); //si existe remplazo la imagen por la actual $emple->update([ 'nombre' => $request -> input('nombre'), 'apellido_p' => $request -> input('apellido_p'), 'apellido_m'=> $request -> input('apellido_m'), 'telefono'=> $request -> input('telefono'), 'imagen'=> $request->file('imagen')->store('empleados','public'), 'id_puesto'=> $request -> input('id_puesto') ]); } //si no existe pues guardo la imagen con sus valores predefindos $emple->update([ 'nombre' => $request -> input('nombre'), 'apellido_p' => $request -> input('apellido_p'), 'apellido_m'=> $request -> input('apellido_m'), 'telefono'=> $request -> input('telefono'), 'id_puesto'=> $request -> input('id_puesto') ]); //retorno return redirect('empleados'); }
{ "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($folio) { //captop el valor de la imagen $datos = DB::select("SELECT imagen FROM empleados "); //verefico si esta vacio if($datos[0]->imagen==""){ //guardar la imagen Empleado::destroy($folio); }else{ //y si exxiste eliminalo $imagen_antigua = DB::select("SELECT imagen FROM empleados"); storage::delete('public/'.$imagen_antigua[0]->imagen); } Empleado::destroy($folio); return redirect('empleados'); }
{ "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
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function command(Command $command);", "public function __construct($command)\n {\n $this->command = $command;\n }", "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "public function getCommand() {}", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "public function getCommand();", "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "public function getCommand()\n {\n }", "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "public function addCommand($command);", "public function add(Command $command);", "abstract protected function getCommand();", "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "public function create() {}", "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "public function create(){}", "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function createCommand(?string $sql = null, array $params = []): Command;", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function generateCommands();", "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "protected function buildCommand()\n {\n return $this->command;\n }", "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "public function getCommand(string $command);", "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "public function generateCommand($singleCommandDefinition);", "public function create() {\n }", "public function create() {\n }", "public function create() {\r\n }", "public function create() {\n\n\t}", "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();" ]
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315901", "0.6248427", "0.6241929", "0.6194334", "0.6081284", "0.6075819", "0.6069913", "0.60685146", "0.6055616", "0.6027874", "0.60132784", "0.60118896", "0.6011778", "0.5969603", "0.59618074", "0.5954538", "0.59404427", "0.59388787", "0.5929363", "0.5910562", "0.590651", "0.589658", "0.589658", "0.589658", "0.58692765", "0.58665586", "0.5866528", "0.58663124", "0.5852474", "0.5852405", "0.58442044", "0.58391577", "0.58154446", "0.58055794", "0.5795853", "0.5780188", "0.57653266", "0.57640004", "0.57584697", "0.575748", "0.5742612", "0.5739361", "0.5732979", "0.572247", "0.5701043", "0.5686879", "0.5685233", "0.56819254", "0.5675983", "0.56670785", "0.56606543", "0.5659307", "0.56567776", "0.56534046", "0.56343585", "0.56290466", "0.5626615", "0.56255764", "0.5608852", "0.5608026", "0.56063116", "0.56026554", "0.5599553", "0.5599351", "0.55640906", "0.55640906", "0.5561977", "0.5559745", "0.5555084", "0.5551485", "0.5544597", "0.55397296", "0.5529626", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908" ]
0.0
-1
Execute the console command.
public function handle() { $vocquery = new VocabularyQuery; $vocquery->constructArray(); print_r($vocquery->relationSimulation()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }", "public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }", "public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }", "public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }", "public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }", "public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }", "public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }", "public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }", "public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }", "public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }", "public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }", "public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }", "public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}", "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}", "public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }", "public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }", "public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }", "public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }", "public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }", "public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }", "public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}", "public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }", "public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }", "public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }", "public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }", "public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }", "public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }", "public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }", "public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }", "public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }", "public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }", "public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }", "public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }", "public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }", "public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }", "public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }", "public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }", "public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }", "public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }", "public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }", "public function handle()\n {\n $this->revisions->updateListFiles();\n }", "public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }", "public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }", "public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }", "public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }", "public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }", "public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }", "public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }", "public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }", "public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }", "public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }", "public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }", "public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }", "public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }", "public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }", "public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }", "public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }", "public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }", "public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }", "public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }", "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }", "public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }", "public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }", "public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }", "public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }", "public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }", "public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }", "public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }", "public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }", "public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }", "public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }", "public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }", "public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}", "public function handle(Command $command);", "public function handle(Command $command);", "public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }", "public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }", "public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }", "public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }", "public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }", "public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }", "public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }", "public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }", "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }", "public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }", "public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }", "public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }", "public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }", "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }", "public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }", "public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }", "public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }", "public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }", "public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }", "public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }", "public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }", "public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }" ]
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.61484164", "0.6146793", "0.6139144", "0.61347336", "0.6131662", "0.61164206", "0.61144686", "0.61109483", "0.61082935", "0.6105106", "0.6103338", "0.6102162", "0.61020017", "0.60962653", "0.6095482", "0.6091584", "0.60885274", "0.6083864", "0.6082142", "0.6077832", "0.60766655", "0.607472", "0.60739267", "0.607275", "0.60699606", "0.6069931", "0.6068753", "0.6067665", "0.6061175", "0.60599935", "0.6059836", "0.605693", "0.60499364", "0.60418284", "0.6039709", "0.6031963", "0.6031549", "0.6027515", "0.60255647", "0.60208166", "0.6018581", "0.60179937", "0.6014668", "0.60145515", "0.60141796", "0.6011772", "0.6008498", "0.6007883", "0.60072047", "0.6006732", "0.60039204", "0.6001778", "0.6000803", "0.59996396", "0.5999325", "0.5992452", "0.5987503", "0.5987503", "0.5987477", "0.5986996", "0.59853584", "0.5983282", "0.59804505", "0.5976757", "0.5976542", "0.5973796", "0.5969228", "0.5968169", "0.59655035", "0.59642595", "0.59635514", "0.59619296", "0.5960217", "0.5955025", "0.5954439", "0.59528315", "0.59513766", "0.5947869", "0.59456027", "0.5945575", "0.5945031" ]
0.0
-1
Check for expected behavior of new function gc_replace_in_html_tags().
public function test_gc_replace_in_html_tags( $input, $output ) { return $this->assertSame( $output, gc_replace_in_html_tags( $input, array( "\n" => ' ' ) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function customTagReplace($html)\r\n\t{\r\n\t\t//ensure all tags can be found\r\n\t\t$html = str_replace(\"<IMG\",\"<img\",$html);\r\n\t\t$html = str_replace(\"SRC=\",\"src=\",$html);\r\n\t\t$html = str_replace(\"ALT=\",\"alt=\",$html);\r\n\t\t$html = str_replace(\"<SPAN\",\"<span\",$html);\r\n\r\n\t\t$html = replaceIMG($html); //CSS format img tags\r\n\t\t$html = youtubeEmbed($html); //custom include youtube embeds\r\n\t\t$html = apostrapheFix($html); //apostraphe fix for sql INSERT statements\r\n\t\treturn $html;\r\n\t}", "function testHTMLInj($data){\n $original = $data;\n \n /*convert 5 predefined characters into HTML values.\t\t\n They are > (&gt;), < (%lt;), \" (&quot;), ' (&#039;), & (&amp;) */\t\t\t\n $data = htmlspecialchars($data);\n\n //check for possible html injection\n return !($data === $original);\n }", "function cp_str_containsHTML($str){\r\n return ($str != str_replace(['>','<'],'',$str));\r\n}", "private function htmlFix() {\n // First, check if html is allowed\n if (!$this->allow_html) {\n $html = false;\n } elseif ($this->standard_html) {\n $html = true;\n } else {\n $html = false;\n }\n\n $newParseArray = array();\n while ($tag = array_shift($this->parseArray)) {\n switch ($tag) {\n case self::TAG_NOHTML_OPEN:\n case self::TAG_HTML_CLOSE:\n $html = false;\n break;\n case self::TAG_HTML_OPEN:\n case self::TAG_NOHTML_CLOSE:\n if ($this->allow_html) {\n $html = true;\n }\n break;\n\n default:\n if ($html) {\n if ($tag == self::BR_TAG) {\n $tag = \"\\n\";\n } // Really, no BR's in html code is wanted.\n $newParseArray[] = $tag;\n } else {\n $newParseArray[] = htmlspecialchars($tag);\n }\n }\n }\n $this->parseArray = $newParseArray;\n return true;\n }", "private function hasHTMLTags()\n {\n return !(strcmp($this->content, strip_tags($this->content)) == 0);\n }", "function wp_replace_in_html_tags($haystack, $replace_pairs)\n {\n }", "function correctHTMLValidationErrors($txt) {\r\n\tif (Settings::get ( \"disable_html_validation\" )) {\r\n\t\treturn $txt;\r\n\t}\r\n\t\r\n\t// Ersetze & durch &amp;\r\n\t$txt = preg_replace ( '/[&](?![A-Za-z]+[;])/', \"&amp;\", $txt );\r\n\t\r\n\t// replaced deprecated HTML-Tags\r\n\t$txt = str_ireplace ( \"<center>\", \"<div style=\\\"text-align:center\\\">\", $txt );\r\n\t$txt = str_ireplace ( \"</center>\", \"</div>\", $txt );\r\n\t$txt = str_ireplace ( \"<strike>\", \"<del>\", $txt );\r\n\t$txt = str_ireplace ( \"</strike>\", \"</del>\", $txt );\r\n\t$txt = str_ireplace ( \"<s>\", \"<del>\", $txt );\r\n\t$txt = str_ireplace ( \"</s>\", \"</del>\", $txt );\r\n\t$txt = str_ireplace ( \"<tt>\", \"<code>\", $txt );\r\n\t$txt = str_ireplace ( \"</tt>\", \"</code>\", $txt );\r\n\t$txt = str_ireplace ( \"<dir>\", \"<ul>\", $txt );\r\n\t$txt = str_ireplace ( \"</dir>\", \"</ul>\", $txt );\r\n\t$txt = str_ireplace ( \"<acronym>\", \"<abbr>\", $txt );\r\n\t$txt = str_ireplace ( \"</acronym>\", \"</abbr>\", $txt );\r\n\t\r\n\treturn $txt;\r\n}", "function check_html($message){\r\n\tstatic $tags = array('<a','<abbr','<acronym','<address','<applet','<area','<b','<base','\t\t\t<basefront','<bdo','<big','<blockquote','<body','<button','<caption','<center','<cite','<code','<col','<colgroup','<dd','<del','<dir','<div','<dfn','<dl','<dt','<em','<fieldset','<font','<form','<frame','<frameset','<h1','<h2','<h3','<h4','<h5','<h6','<i','<iframe','<ins','<isindex','<kbd','<label','<legend','<li','<link','<map','<menu','<noframes','<noscript','<object','<ol','<optgroup','<options','<p','<param','<pre','<q','<s','<samp','<select','<small','<span','<strike','<strong','<sub','<sup','<table','<tbody','<td','<textarea','<tfoot','<th','<thead','<tr','<tt','<u','<ul','<var','<xmp');\r\n\t//does not include <input /><img /><br /><hr /><embed /> because empty tags\r\n\tstatic $prohib_tags = array('<body', '<html','<head','<meta','<script','<style','<title'); \r\n\t$errors = 0;\r\n\t$error_log = \"\";\r\n\t//check for prohibited tags\r\n\t$n=0;\r\n\twhile($prohib_tags[$n]!=NULL){\r\n\t\tif((strpos($message,$prohib_tags[$n] . \" \",0)!==false) or (strpos($message,$prohib_tags[$n] . \">\",0)!==false) or (strpos($message,\"</\" . substr($prohib_tags[$n],1) . \" \",0)!==false) or (\tstrpos($message,\"</\" . substr($prohib_tags[$n],1) . \">\",0)!==false) ){\r\n\t\t\t$errors++;\r\n\t\t\t$error_log = $error_log . \"Error \" . $errors . \": Prohibited use of &lt;\" . substr($prohib_tags[$n],1) . \"&gt; element<br />\";\r\n\t\t}\r\n\t\t$n++;\r\n\t}\r\n\t//check proper tag nesting\r\n\t$n=0;\r\n\t$nest_lvl = 0;\r\n\twhile($tags[$n]!=NULL){\r\n\t\t$tag = $tags[$n];\r\n\t\t$tag_e = \"</\" . substr($tags[$n], 1) . \">\";\r\n\t\t$count = substr_count($message, $tag . \">\") + substr_count($message, $tag . \" \");\r\n\t\t$count_e = substr_count($message, $tag_e);\r\n\t\tif($count == $count_e){\r\n\t\t\tfor($m=0;$m<=strlen($message);$m++){\r\n\t\t\t\tif((substr($message,$m,strlen($tag)+1)== $tag . \">\")or((substr($message,$m,strlen($tag)+1)== $tag . \" \"))){\r\n\t\t\t\t\t$nest_lvl++;\r\n\t\t\t\t}\r\n\t\t\t\tif((substr($message,$m,strlen($tag_e))==($tag_e))){\r\n\t\t\t\t\t$nest_lvl--;\r\n\t\t\t\t}\r\n\t\t\t\tif($nest_lvl<0){\r\n\t\t\t\t\t$errors++;\r\n\t\t\t\t\t$error_log = $error_log . \"Error \" . $errors . \": Improper &lt;\" . substr($tag,1) . \"&gt; tag nesting<br />\";\r\n\t\t\t\t\t$m=strlen($message);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$nest_lvl = 0;\r\n\t\t}else{\r\n\t\t\t$errors++;\r\n\t\t\tif($count>$count_e){\r\n\t\t\t\t$error_log = $error_log . \"Error \" . $errors . \": Missing &lt;&#47;\" . substr($tag,1) . \"&gt; end tag(s)!<br />\";\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$error_log = $error_log . \"Error \" . $errors . \": Missing &lt;\" . substr($tag,1) . \"&gt; start tag(s)!<br />\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$n++;\r\n\t}\r\n\t//check proper \"</>\" use. example: <content>else> or <whatsoever<content>\r\n\t$tri_brkt!=0;\r\n\tfor($m=0;$m<=strlen($message);$m++){\r\n\t\tif(substr($message,$m,1)==\"<\"){\r\n\t\t\t$tri_brkt++;\r\n\t\t}\r\n\t\tif(substr($message,$m,1)==\">\"){\r\n\t\t\t$tri_brkt--;\r\n\t\t}\r\n\t}\r\n\tif($tri_brkt!=0){\r\n\t\t$errors++;\r\n\t\t$error_log = $error_log . \"Error \" . $errors . \": improper \\\"&lt;&#47;&gt;\\\" usage<br />\";\r\n\t}\r\n\t$error_log = \"Errors: \" . $errors . \"<br />\" . $error_log . \"<br />\";\r\n\treturn $error_log;\r\n\t//END OF TAG INSPECTION\r\n}", "private function cnew_allowed_html() {\r\n $allowed_html = array(\r\n 'a' => array(\r\n 'class' => array(),\r\n 'href' => array(),\r\n 'title' => array(),\r\n ),\r\n 'b' => array(),\r\n 'strong' => array(),\r\n 'em' => array(),\r\n 'h1' => array(),\r\n 'h2' => array(),\r\n 'h3' => array(),\r\n 'h4' => array(),\r\n 'h5' => array(),\r\n 'h6' => array(),\r\n 'i' => array(),\r\n 'ul' => array(\r\n 'class' => array(),\r\n ),\r\n 'li' => array(\r\n 'class' => array(),\r\n ),\r\n 'ol' => array(\r\n 'class' => array(),\r\n ),\r\n 'p' => array(\r\n 'class' => array(),\r\n ),\r\n 'q' => array(\r\n 'cite' => array(),\r\n ),\r\n 'blockquote' => array(\r\n 'cite' => array(),\r\n ),\r\n 'cite' => array(\r\n 'title' => array(),\r\n ),\r\n 'abbr' => array(\r\n 'title' => array(),\r\n ),\r\n );\r\n\r\n return $allowed_html;\r\n }", "function replaceIMG($html)\r\n\t{\r\n\t\t$iStart = stripos($html,\"<img\");\r\n\t\twhile((string)$iStart != null) //string typecast to handle \"0\" which equates to FALSE in PHP...\r\n\t\t{\r\n\t\t\t//get entire IMG tag\r\n\t\t\t$iEnd = stripos($html,\">\",$iStart)+1;\r\n\t\t\t$imgTag = substr($html,$iStart,($iEnd-$iStart));\r\n\t\t\t\r\n\t\t\t//get src\r\n\t\t\t$iSrcStart = stripos($imgTag,\"src=\");\r\n\t\t\tif(substr($imgTag,($iSrcStart+4),1) == \"'\")\r\n\t\t\t{\r\n\t\t\t\t//single quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,\"'\",$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//double quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,'\"',$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\t$imgSrc = substr($imgTag,$iSrcStart+5,($iSrcEnd-($iSrcStart+5)));\r\n\t\t\t\r\n\t\t\t//get alt\r\n\t\t\t$iAltStart = stripos($imgTag,\"alt=\");\r\n\t\t\tif($iAltStart != null)\r\n\t\t\t{\r\n\t\t\t\tif(substr($imgTag,($iAltStart+4),1) == \"'\")\r\n\t\t\t\t{\r\n\t\t\t\t\t//single quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,\"'\",$iAltStart+5);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//double quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,'\"',$iAltStart+5);\r\n\t\t\t\t}\r\n\t\t\t\t$imgAlt = substr($imgTag,$iAltStart+5,($iAltEnd-($iAltStart+5)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//replace HTML\r\n\t\t\tif((string)stripos($imgSrc,\"scripts/CLEditor/images/icons/\") == null) //exclude icons from rich text editor\r\n\t\t\t{\r\n\t\t\t\t$replacementHTML = \"<div class='table comicborder popupshadow-margin'><div class='table-row'><div class='table-cell'><a href='\" . $imgSrc . \"'>\" . $imgTag . \"</a></div></div>\";\r\n\t\t\t\tif($iAltStart != null)\r\n\t\t\t\t{\r\n\t\t\t\t\t$replacementHTML = $replacementHTML . \"<div class='table-row'><div class='table-cell comicimagecaption'>\" . $imgAlt . \"</div></div>\";\r\n\t\t\t\t}\r\n\t\t\t\t$replacementHTML = $replacementHTML . \"</div>\";\r\n\t\t\t\t$html = substr_replace($html,$replacementHTML,$iStart,($iEnd-$iStart));\r\n\t\t\t\t\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($replacementHTML)));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($imgTag)));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\t}", "public abstract function cleanHTML($content);", "public function isHtml() {}", "public function testProcessHtml(): void {\n\t\t/** @var BaseUtility&MockObject $utility */\n\t\t$utility = $this->getMockBuilder(BaseUtility::class)\n\t\t\t->onlyMethods(['getHyphenationWords'])\n\t\t\t->getMock();\n\t\t$utility->method('getHyphenationWords')->will(self::returnCallback(function(): array {\n\t\t\treturn ['con•sec•tetur', 'adi#pi#sicing'];\n\t\t}));\n\t\t$cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);\n\t\t$cObj->start([], '_NO_TABLE');\n\t\t$utility->setContentObjectRenderer($cObj);\n\n\t\t$baseContent = (string)file_get_contents(getcwd() . '/Tests/Unit/Fixtures/Utility/MetaTagsBase.html');\n\t\t$TSFE = $this->setupTsfeMock();\n\t\t$TSFE->content = $baseContent;\n\t\t$utility->postProcessHTML([], $TSFE);\n\n\t\t$expectedContent = (string)file_get_contents(getcwd() . '/Tests/Unit/Fixtures/Utility/HyphenationExpected.html');\n\t\t$expectedContent = str_replace('%SHY%', html_entity_decode('&shy;', 0, 'UTF-8'), $expectedContent);\n\t\t$expectedContent = str_replace(\"\\n\", '', $expectedContent);\n\n\t\t$actualContent = str_replace(\"\\n\", '', $TSFE->content);\n\n\t\tself::assertEquals($expectedContent, $actualContent);\n\t}", "function qa_sanitize_html($html, $linksnewwindow = false, $storage = false)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\trequire_once 'vendor/htmLawed.php';\n\n\tglobal $qa_sanitize_html_newwindow;\n\n\t$qa_sanitize_html_newwindow = $linksnewwindow;\n\n\t$safe = htmLawed($html, array(\n\t\t'safe' => 1,\n\t\t'elements' => '*+embed+object-form',\n\t\t'schemes' => 'href: aim, feed, file, ftp, gopher, http, https, irc, mailto, news, nntp, sftp, ssh, telnet; *:file, http, https; style: !; classid:clsid',\n\t\t'keep_bad' => 0,\n\t\t'anti_link_spam' => array('/.*/', ''),\n\t\t'hook_tag' => 'qa_sanitize_html_hook_tag',\n\t));\n\n\treturn $safe;\n}", "function testRenderAsHtml_no_references() {\n $mdtv = Metadata_Term_Value::getOneFromDb(['metadata_term_value_id' => 6205],$this->DB);\n $canonical = '<span class=\"term_value\" title=\"up to the the length of the back of the hand when a fist is made\">6-12 cm</span><div class=\"metadata-references\"><div class=\"metadata-references\">\n <ul class=\"metadata-references metadata-references-images\">\n </ul>\n <ul class=\"metadata-references metadata-references-links\">\n </ul>\n <ul class=\"metadata-references metadata-references-texts\">\n </ul>\n</div>\n</div>';\n\n $rendered = $mdtv->renderAsHtml();\n\n// echo \"<pre>\\n\".htmlentities($canonical).\"\\n\".htmlentities($rendered).\"\\n</pre>\";\n\n $this->assertEqual($canonical,$rendered);\n $this->assertNoPattern('/IMPLEMENTED/',$rendered);\n }", "function bub_simple_replace($src_block, $target_html) {\n return $target_html;\n}", "function test_html_fix() {\n $posts = CompliantPost::published();\n $first_post = $posts[0];\n $first_image = $first_post->embedded_images[0];\n\n // Test\n $content_before = $first_post->wp_post->post_content;\n $updated_content = $first_post->update_content_img_alt_attributes();\n\n // Dump output.\n var_dump(array(\n 'before' => $content_before,\n 'after' => $updated_content\n ));\n var_dump($first_post->errors);\n var_dump($first_post->updates_counter);\n }", "function cleanEvilTags($t){\r\n\t\t$t = preg_replace(\"/javascript/i\" , \"j&#097;v&#097;script\", $t);\r\n\t\t$t = preg_replace(\"/alert/i\" , \"&#097;lert\" , $t);\r\n\t\t$t = preg_replace(\"/about:/i\" , \"&#097;bout:\" , $t);\r\n\t\t$t = preg_replace(\"/onmouseover/i\", \"&#111;nmouseover\" , $t);\r\n\t\t$t = preg_replace(\"/onclick/i\" , \"&#111;nclick\" , $t);\r\n\t\t$t = preg_replace(\"/onload/i\" , \"&#111;nload\" , $t);\r\n\t\t$t = preg_replace(\"/onsubmit/i\" , \"&#111;nsubmit\" , $t);\r\n\t\t$t = preg_replace(\"/<body/i\" , \"&lt;body\" , $t);\r\n\t\t$t = preg_replace(\"/<html/i\" , \"&lt;html\" , $t);\r\n\t\t$t = preg_replace(\"/document\\./i\" , \"&#100;ocument.\" , $t);\r\n\t\treturn $t;\r\n\t}", "function clean_evil_tags( $t )\n {\n \t$t = preg_replace( \"/javascript/i\" , \"j&#097;v&#097;script\", $t );\n\t\t$t = preg_replace( \"/alert/i\" , \"&#097;lert\" , $t );\n\t\t$t = preg_replace( \"/about:/i\" , \"&#097;bout:\" , $t );\n\t\t$t = preg_replace( \"/onmouseover/i\", \"&#111;nmouseover\" , $t );\n\t\t$t = preg_replace( \"/onclick/i\" , \"&#111;nclick\" , $t );\n\t\t$t = preg_replace( \"/onload/i\" , \"&#111;nload\" , $t );\n\t\t$t = preg_replace( \"/onsubmit/i\" , \"&#111;nsubmit\" , $t );\n\t\t$t = preg_replace( \"/<body/i\" , \"&lt;body\" , $t );\n\t\t$t = preg_replace( \"/<html/i\" , \"&lt;html\" , $t );\n\t\t$t = preg_replace( \"/document\\./i\" , \"&#100;ocument.\" , $t );\n\t\t\n\t\treturn $t;\n }", "public function isHtml(): bool;", "public function doXHTML_cleaning() {}", "public function testValidateDocumentHtmlValidation()\n {\n }", "public static function get_allowed_wp_kses_html()\n {\n }", "function tagreplace_link($replace, $opentag, $tagoriginal, $closetag, $sign) {\n\n global $cfg, $defaults, $specialvars;\n\n $tagwert = $tagoriginal;\n // ------------------------------\n\n // tcpdf extra\n if ( $cfg[\"pdfc\"][\"state\"] == true ) {\n if ( !preg_match(\"/^http/\",$tagwert) ) {\n $tagwert = \"http://\".$_SERVER[\"SERVER_NAME\"].\"/\".$tagwert;\n }\n }\n\n if ( $sign == \"]\" ) {\n $ausgabewert = \"<a href=\\\"\".$tagwert.\"\\\" title=\\\"\".$tagwert.\"\\\">\".$tagwert.\"</a>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $linkwerte = explode(\";\",$tagwerte[0]);\n $href = $linkwerte[0];\n if ( !isset($tagwerte[1]) ) {\n $beschriftung = $href;\n } else {\n $beschriftung = $tagwerte[1];\n }\n\n // ziel\n if ( isset($linkwerte[1]) ) {\n $target = \" target=\\\"\".$linkwerte[1].\"\\\"\";\n } else {\n $target = null;\n }\n\n // title-tag\n if ( isset($linkwerte[2]) ) {\n $title = $linkwerte[2];\n } else {\n if ( !isset($linkwerte[1]) ) $linkwerte[1] = null;\n if ( $linkwerte[1] == \"_blank\" ) {\n $title = \"Link in neuem Fenster: \".str_replace(\"http://\",\"\",$href);\n } elseif ( !strstr($beschriftung,\"<\") ) {\n $title = $beschriftung;\n } else {\n $title = null;\n }\n }\n\n // css-klasse\n $class = \" class=\\\"link_intern\";\n if ( preg_match(\"/^http/\",$href) ) { # automatik\n $class = \" class=\\\"link_extern\";\n } elseif ( preg_match(\"/^\".str_replace(\"/\",\"\\/\",$cfg[\"file\"][\"base\"][\"webdir\"]).\".*\\.([a-zA-Z]+)/\",$href,$match) ) {\n if ( $cfg[\"file\"][\"filetyp\"][$match[1]] != \"\" ) {\n $class = \" class=\\\"link_\".$cfg[\"file\"][\"filetyp\"][$match[1]];\n }\n }\n if ( isset($linkwerte[3]) ) { # oder manuell\n $class .= \" \".$linkwerte[3];\n }\n $class .= \"\\\"\";\n\n // id\n if ( isset($linkwerte[4]) ) {\n $id = \" id=\\\"\".$linkwerte[4].\"\\\"\";\n } else {\n $id = null;\n }\n\n if ( !isset($pic) ) $pic = null;\n $ausgabewert = $pic.\"<a href=\\\"\".$href.\"\\\"\".$id.$target.\" title=\\\"\".$title.\"\\\"\".$class.\">\".$beschriftung.\"</a>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n }\n\n // ------------------------------\n return $replace;\n }", "public function testHtml() {\n $this->assertEquals('String with b &amp; i tags.', Sanitize::html('String <b>with</b> b & i <i>tags</i>.'));\n $this->assertEquals('String &lt;b&gt;with&lt;/b&gt; b &amp; i &lt;i&gt;tags&lt;/i&gt;.', Sanitize::html('String <b>with</b> b & i <i>tags</i>.', array('strip' => false)));\n $this->assertEquals('String &lt;b&gt;with&lt;/b&gt; b &amp; i tags.', Sanitize::html('String <b>with</b> b & i <i>tags</i>.', array('whitelist' => '<b>')));\n $this->assertEquals('String with b &amp;amp; i tags.', Sanitize::html('String <b>with</b> b &amp; i <i>tags</i>.', array('double' => true)));\n }", "function FixHtml($html_text) {\n\t\t$text_filter = new TextFilter ( );\n\t\t$text_nojs = $text_filter->filterJavaScript ( $html_text );\n\t\t$text_noif = preg_replace ( '/<iframe.*?<\\/iframe>/ims', \"\", $text_nojs );\n\t\t$text_noif = preg_replace ( '/<IFRAME.*?<\\/IFRAME>/ims', \"\", $text_noif );\n\t\t//$text_bal = $text_filter->balanceTags($text_noif);\n\t\t\n\n\t\treturn $text_noif;\n\t}", "function wp_kses_allowed_html($context = '')\n {\n }", "public function testScanDomHTML(): void\n {\n // http://php.net/manual/de/libxml.constants.php\n if (version_compare(LIBXML_DOTTED_VERSION, '2.7.8', '<')) {\n $this->markTestSkipped(\n 'libxml 2.7.8+ required but found ' . LIBXML_DOTTED_VERSION\n );\n }\n\n $dom = new DOMDocument('1.0');\n $html = <<<HTML\n <p>a simple test</p>\n HTML;\n $constants = LIBXML_HTML_NODEFDTD | LIBXML_HTML_NOIMPLIED;\n $result = XmlSecurity::scanHtml($html, $dom, $constants);\n $this->assertTrue($result instanceof DOMDocument);\n $this->assertEquals($html, trim($result->saveHtml()));\n }", "function verifyTextSearchReplaceAll(){\n parent::doExpandAdvanceSection();\n $this->type(TEXT_EDITOR, \"\");\n $this->click(LINK_SEARCH);\n $this->type(TEXT_EDITOR, (TEXT_SAMPLE));\n $this->type(INPUT_SEARCH, (TEXT_SEARCH));\n $this->type(INPUT_REPLACE, (TEXT_REPLACE));\n $this->click(BUTTON_REPLACEALL);\n $this->click(BUTTON_CANCEL);\n $this->click(BUTTON_PREVIEW);\n $this->waitForPageToLoad((WIKI_TEST_WAIT_TIME));\n try {\n $this->assertEquals((TEXT_REPLACE), $this->getText(TEXT_PREVIEW_TEXT1));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n try {\n $this->assertEquals((TEXT_REPLACE), $this->getText(TEXT_PREVIEW_TEXT2));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n try {\n $this->assertEquals((TEXT_REPLACE), $this->getText(TEXT_PREVIEW_TEXT3));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n }", "public function testReplaceTags()\n\t{\n\t\t$this->assertEquals('143',$this->obj->replace_tags('1{{2}}3', '', array(\"2\"=>\"4\")));\n\t\t$this->assertEquals('143',$this->obj->replace_tags('1{{args:2}}3', 'args', array(\"2\"=>\"4\")));\n\t\t$this->assertEquals('143$var',$this->obj->replace_tags('1{{args:2}}3$var', 'args', array(\"2\"=>\"4\")));\n\t}", "function test_misc_static_replacements( $input, $output ) {\n\t\treturn $this->assertEquals( $output, wptexturize( $input ) );\n\t}", "function replace_inside($find,$replace,$start, $end, $content = false) {\r\n if ($content!==false) $r = $content;\r\n else $r = g('html');\r\n $s=0;\r\n while (($s = strpos($r,$start,$s)) !==false) {\r\n\r\n $s += strlen($start);\r\n if ($end) $e = strpos($r,$end,$s);\r\n else $e = strlen($r);\r\n if ($e) {\r\n\r\n $left = substr($r,0,$s);\r\n $right = substr($r,$e);\r\n $mid = substr($r,$s,$e-$s);\r\n $midlen = strlen($mid);\r\n //echo \"[$left-$mid-$right]\";\r\n\r\n if ($find) $mid = str_replace($find,$replace,$mid);\r\n else $mid = $replace;\r\n $r=$left.$mid.$right;\r\n $e = $e + strlen($mid) - $midlen;\r\n $s = $e + strlen($end);\r\n if ($s>strlen($r)) break;\r\n }\r\n }\r\n\r\n if (DEV)\r\n xlogc('replace_inside', $r, $find,$replace,$start, $end, $content);\r\n\r\n\r\n return $r;\r\n}", "function clean_redundant_sufficient_inline() {\r\n\t\t// dirty generator (word). the point is it cannot be done on <span>s since they are not inherently sufficient for a sort of styling (and perhaps that is why this was overlooked).\r\n\t\t// notice also that this only treats simple cases (tags without attributes) of which there may be a fair number.\r\n\t\t// this array is ordered so that tag names that are substrings of other tag names are done last (b)\r\n\t\t$sufficient_inlines = array('big', 'small', 'em', 'strong', 'sub', 'sup', 'strike', 'blink', 'i', 'b', 'u');\r\n\t\tforeach($sufficient_inlines as $sufficient_inline) {\r\n\t\t\t$opening_part = '<' . $sufficient_inline;\r\n\t\t\t$closing_part = '</' . $sufficient_inline . '>';\r\n\t\t\t$strlen_opening_part = strlen($opening_part);\r\n\t\t\t$strlen_closing_part = strlen($closing_part);\r\n\t\t\t$OStrings = OM::getAllOstrings($this->code, $opening_part, $closing_part);\r\n\t\t\t$index = sizeof($OStrings) - 1;\r\n\t\t\twhile($index > -1) {\r\n\t\t\t\t$OString = $OStrings[$index][0];\r\n\t\t\t\t//print('$OString: ');var_dump($OString);\r\n\t\t\t\tif($OString[strlen($opening_part)] !== ' ' && $OString[strlen($opening_part)] !== '>') { // then we are catching the wrong tag\r\n\t\t\t\t\t//print('wrong $OString: ');var_dump($OString);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$offset = $OStrings[$index][1];\r\n\t\t\t\t\t$initial_substr = $substr = substr($OString, $strlen_opening_part, strlen($OString) - $strlen_opening_part - $strlen_closing_part);\r\n\t\t\t\t\t$substr = str_replace('<' . $sufficient_inline . '>', '', $substr, $count1);\r\n\t\t\t\t\t$substr = str_replace($closing_part, '', $substr, $count2);\r\n\t\t\t\t\tif($count1 > 0 || $count2 > 0 && $count1 === $count2) {\r\n\t\t\t\t\t\t$cleaned_OString = $opening_part . $substr . $closing_part;\r\n\t\t\t\t\t\t//$this->code = substr($this->code, 0, $offset) . $cleaned_OString . substr($this->code, $offset + strlen($OString));\r\n\t\t\t\t\t\t$this->code = str_replace($OString, $cleaned_OString, $this->code);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$index--;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function testProcessHtmlWithLongScript(): void {\n\t\t/** @var BaseUtility&MockObject $utility */\n\t\t$utility = $this->getMockBuilder(BaseUtility::class)\n\t\t\t->onlyMethods(['getHyphenationWords'])\n\t\t\t->getMock();\n\t\t$utility->method('getHyphenationWords')->will(self::returnCallback(function(): array {\n\t\t\treturn [];\n\t\t}));\n\t\t$cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);\n\t\t$cObj->start([], '_NO_TABLE');\n\t\t$utility->setContentObjectRenderer($cObj);\n\n\t\t$baseContent = (string)file_get_contents(getcwd() . '/Tests/Unit/Fixtures/Utility/ProcessLongHtml.html');\n\t\t$TSFE = $this->setupTsfeMock();\n\t\t$TSFE->content = $baseContent;\n\t\t$utility->postProcessHTML([], $TSFE);\n\n\t\t$expectedContent = str_replace(\"\\n\", '', trim($baseContent));\n\t\t$actualContent = str_replace(\"\\n\", '', trim($TSFE->content));\n\n\t\tself::assertEquals($expectedContent, $actualContent);\n\t}", "public static function ok_tags($html){\n \treturn self::closetags(strip_tags($html, \"<b><strong><i><em>\"));\n }", "private function replace_conditional_tag( $html, $original ) {\r\n\t\t$template_tag_position = strpos( $html, self::WP_ROCKET_CONDITIONAL );\r\n\r\n\t\treturn substr_replace(\r\n\t\t\t$html,\r\n\t\t\t$original,\r\n\t\t\t$template_tag_position,\r\n\t\t\tstrlen( self::WP_ROCKET_CONDITIONAL )\r\n\t\t);\r\n\t}", "public function testConstructInvalidHTML(string $html)\n {\n (new Dom($html));\n }", "function wpstart_sanitize_html($input)\n {\n return wp_kses_post(force_balance_tags($input));\n }", "public function isXhtml() {}", "function do_shortcodes_in_html_tags($content, $ignore_html, $tagnames)\n {\n }", "function isHTMLContent($c)\t{\n\t\t$c = trim($c);\n\t\t$first = strtolower(substr($c,0,6));\n\t\t$last = strtolower(substr($c,-7));\n\t\tif ($first.$last=='<html></html>')\treturn 1;\n\t}", "function allowed_html() {\n $arr = array();\n return array(\n 'a' => array(\n 'href' => $arr,\n 'title' => $arr\n ),\n 'span' => array(\n 'style' => $arr\n ),\n 'u' => $arr,\n 'b' => $arr,\n 'i' => $arr,\n 'em' => $arr,\n 'strong' => $arr,\n );\n }", "function handleBrokenHTML($html) {\n $old = libxml_use_internal_errors(true);\n $dom = new DOMDocument;\n $dom->loadHTML($html);\n libxml_use_internal_errors($old);\n return $dom;\n}", "public function testHtmlTag()\n {\n $this->assertProduces('<b>not bold</b>', '&lt;b&gt;not bold&lt;/b&gt;');\n $this->assertProduces('[b]<b>bold</b>[/b] <hr>', '<strong>&lt;b&gt;bold&lt;/b&gt;</strong> &lt;hr&gt;');\n }", "function HTMLPurifier($html, $config = null) {\r\r\n static $purifier = false;\r\r\n if (!$purifier) {\r\r\n require_once 'HTMLPurifier.php';\r\r\n $purifier = new HTMLPurifier();\r\r\n }\r\r\n return $purifier->purify($html, $config);\r\r\n}", "function testBug1597() \n {\n $sText = <<<SCRIPT\n<?php\nif (\\$_POST[\"url\"] != \"\") //inserting data\n{\n}\n?>\nSCRIPT;\n $this->setText($sText);\n $sExpected = <<<SCRIPT\n<?php\nif (\\$_POST[\"url\"] != \"\") //inserting data\n{\n}\n?>\nSCRIPT;\n $this->assertEquals($sExpected, $this->oBeaut->get());\n }", "function cleanup($html, $options = null) \n { \n if(isset($options) && is_array($options)){ \n $this->setOptions($options); \n } \n $this->_html = \"{$html}\"; \n\n if($this->_options['UseTidy'] && $this->_options['TidyBefore']){ \n $this->tidyClean(); \n } \n\n // Remove escape slashes \n $this->_html = stripslashes($this -> _html); \n\n if($this->_options['CleaningMethod']['tags'] == \"whitelist\"){ \n // Trim everything before body tag, leaving possible body attributes \n if(preg_match(\"/<body/i\", \"{$this -> _html}\")){ \n $this -> html = stristr($this -> _html, \"<body\"); \n } \n\n // strip tags, still leaving attributes, second variable is allowed tags \n $this->_html = strip_tags($this->_html, $this->_tag_whitelist); \n } \n\n if($this->_options['RemoveStyles']){ \n // Remove class and style attributes \n $this->removeBlacklistedAttributes(\"class|style\"); \n } \n\n if($this->_options['IsWord']){ \n $this->removeBlacklistedAttributes(\"lang|[ovwxp]:\\w+\"); \n } \n\n if($this->_options['CleaningMethod']['attributes'] == \"blacklist\"){ \n if(!empty ($this->_attrib_blacklist)){ \n $this->removeBlacklistedAttributes($this->_attrib_blacklist); \n } \n } \n\n if($this->_options['Optimize']){ \n $repl = 1; \n while($repl){ \n $repl = 0; \n foreach($this->_cleanup_tags as $tag){ \n // Strip empty inline tags \n $this -> _html = preg_replace(\"/<($tag)[^>]*>[\\s]*([(&nbsp;)]*)[\\s]*<\\/($tag)>/i\",\"\\\\2\", $this -> _html,-1,$count); \n $repl += $count; \n\n // Merge inline tags \n $this -> _html = preg_replace(\"/<\\/($tag)[^>]*>[\\s]*([(&nbsp;)]*)[\\s]*<($tag)>/i\",\"\\\\2\", $this -> _html,-1,$count); \n $repl += $count; \n } \n } \n\n // Drop empty paragraph tags \n if($this->_options['DropEmptyParas']){ \n $this -> _html = preg_replace('/<(p|h[1-6]{1})([^>]*)>[\\s]*[(&nbsp;)]*[\\s]*<\\/(p|h[1-6]{1})>/i',\"\\r\\n\", $this -> _html); \n } \n\n // Trim extra spaces only if tidy is not set to indent \n if(!$this->_tidy_config['indent']){ \n // Trim extra spaces between words \n $this -> _html = preg_replace('/([^<>])[\\s]+([^<>])/i',\"\\\\1 \\\\2\", $this -> _html); \n\n // Trim extra spaces before tags \n $this -> _html = preg_replace('/[\\n|\\r|\\r\\n|][\\n|\\r|\\r\\n|]+</i',\"<\", $this -> _html); \n } \n } \n\n if($this->_options['DropEmptyParas'] && !$this->_options['Optimize']){ \n $this -> _html = preg_replace('/<(p|h[1-6]{1})([^>]*)>[\\s]*[(&nbsp;)]*[\\s]*<\\/(p|h[1-6]{1})>/i',\"\\r\\n\", $this -> _html); \n } \n\n if($this->_options['FillEmptyTableCells']) { \n $this -> _html = preg_replace(\"/<td([^>]*)>[\\s]*<\\/td>/i\", \"<td\\\\1>&nbsp;</td>\", $this -> _html); \n } \n\n if($this->_options['Compress']){ \n // Trim spaces after tags \n $this -> _html = preg_replace('/>[\\s]+/',\">\", $this -> _html); \n\n // Trim spaces before end tags \n $this -> _html = preg_replace('/[\\s]+<\\//',\"</\", $this -> _html); \n\n // Trim spaces before tags \n $this -> _html = preg_replace('/[\\s]+</',\"<\", $this -> _html); \n\n // Trim extra spaces between words \n $this -> _html = preg_replace('/([^<>])[\\s]+([^<>])/',\"\\\\1 \\\\2\", $this -> _html); \n } \n\n if($this->_options['UseTidy'] && !$this->_options['TidyBefore']){ \n $this->tidyClean(); \n } \n return $this->output(\"{$this->_html}\"); \n }", "public function testAppendHtml() {\r\n\t\t$this->testObject->appendHtml ( '<div>test</div>' );\r\n\t\t$this->assertTrue ( '<div>test</div>' == $this->testObject->getAppendHtml (), 'incorrect appended html found' );\r\n\t}", "protected function cleanHtml($html) {\n $chain = new Zend_Filter();\n\n if($this->isFilterTags){\n $chain->addFilter(new Zend_Filter_StripTags(self::$tags));\n }\n $chain->addFilter(new Zend_Filter_StringTrim());\n\n $html = $chain->filter($html);\n\n $tmp = $html;\n while (1) {\n // Try and replace an occurrence of javascript:\n $html = preg_replace('/(<[^>]*)javascript:([^>]*>)/i', '$1$2', $html);\n \n\n // If nothing changed this iteration then break the loop\n if ($html == $tmp)\n break;\n\n $tmp = $html;\n }\n\n return $html;\n }", "abstract function get_html();", "public function replaceContent() {\n \treturn $this->_doReplacement();\n\t}", "function acf_allow_unfiltered_html()\n{\n}", "public function isClosingElementImplied($html);", "public abstract function get_html();", "function wp_auth_check_html()\n {\n }", "function isHTML($a_text)\n\t{\n\t\tif (preg_match(\"/<[^>]*?>/\", $a_text))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE; \n\t\t}\n\t}", "function purifyInput($htmlContent) {\n $purifier = $this->htmlPurifier();\n if (!is_object($purifier)) {\n return FALSE;\n }\n\n return $purifier->purify($htmlContent);\n }", "public function testSimpleHTML() : void\n {\n $string = $this->sanitizer->sanitize('<script>alert(\"hello\");</script><div id=\"fake\"><h5 class=\"foo\">Lorem ipsum</h5></div>');\n $this->assertEquals(\"Lorem ipsum\", $string);\n }", "function wp_kses_html_error($attr)\n {\n }", "function is_html(string $string): bool\n {\n return strcasecmp($string, strip_tags($string)) !== 0;\n }", "function wt_html_allowed() {\n\n\t$allowed = array(\n\t\t'a' => array( 'class' => true, 'title' => true, 'href' => true ),\n\t\t'abbr' => array( 'class' => true, 'title' => true ),\n\t\t'acronym' => array( 'class' => true, 'title' => true ),\n\t\t'code' => array( 'class' => true ),\n\t\t'em' => array( 'class' => true ),\n\t\t'strong' => array( 'class' => true ),\n\t\t'i' => array( 'class' => true ),\n\t\t'b' => array( 'class' => true ),\n\t\t'span' => array( 'class' => true )\n\t);\n\n\treturn apply_filters( 'wt_html_allowed', $allowed );\n}", "protected function allow_html() {\n\t\tremove_filter( 'pre_term_description', 'wp_filter_kses' );\n\t\tremove_filter( 'term_description', 'wp_kses_data' );\n\n\t\tadd_filter( 'pre_term_description', 'wp_filter_post_kses' );\n\t}", "function sanitize(\n $html,\n $tags_to_remove = ['script', 'iframe', 'input', 'form'],\n $attributes_to_keep = ['title', 'href', 'src'],\n $text_to_keep = []\n) {\n $htmlContent = str_get_html($html);\n\n foreach ($htmlContent->find('*') as $element) {\n if (in_array($element->tag, $text_to_keep)) {\n $element->outertext = $element->plaintext;\n } elseif (in_array($element->tag, $tags_to_remove)) {\n $element->outertext = '';\n } else {\n foreach ($element->getAllAttributes() as $attributeName => $attribute) {\n if (!in_array($attributeName, $attributes_to_keep)) {\n $element->removeAttribute($attributeName);\n }\n }\n }\n }\n\n return $htmlContent;\n}", "private function hasPregReplace() {\n\t\treturn isset($this->replaces);\n\t}", "function post_DOM_quotation() {\r\n\t\t// Consider this example from that story (page 29): [Marlow said,] \"...The fat man sighed. 'Very sad.' 'And the pestiferous \r\n\t\t// absurdity of his talk,' continued the other; 'he bothered me enough when he was here. \"Each station should be like a beacon \r\n\t\t// on the road towards better things, a center for trade of course, but also for humanizing, improving, instructing.\" Conceive \r\n\t\t// you—that ass! And he wants to be manager! No, it's—' Here he got choked by excessive indignation, and I lifted my head the least bit. ...\"\r\n\t\t\r\n\t\t//$this->code = iconv($this->config['encoding'], 'utf-8' . \"//TRANSLIT\", $this->code);\r\n\t\t$changes_count = 0;\r\n\t\t$singleQuotesArray = explode(\"|\", $this->singleQuotes);\r\n\t\t\r\n\t\t// here is where we bravely try to to semantically discern single quotes from apostrophes\r\n\t\t// first; only search for nested quotations in already identified (double quotes) quotations\r\n\t\t$q_strings = OM::getAllOStrings($this->code, \"<q\", \"</q>\");\r\n\t\tforeach($q_strings as $index => $value) {\r\n\t\t\t$q_string = $value[0];\r\n\t\t\t$substr = substr($q_string, 2, strlen($q_string) - 6);\r\n\t\t\t$do_the_replaces = false;\r\n\t\t\tforeach($singleQuotesArray as $singleQuote) {\r\n\t\t\t\tif(strpos($substr, $singleQuote) !== false) { // then there is potentially a nested quotation\r\n\t\t\t\t\t$do_the_replaces = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($do_the_replaces) {\r\n\t\t\t\t// notice that this assumes that there are no other tag names that begin with q which is currently (2011-07-11) true for\r\n\t\t\t\t// HTML5 and XHTML 1.0 Strict\r\n\t\t\t\t// whether there is an even number of single quotes is not a good indicator since there could be a nested quote \r\n\t\t\t\t// as well as an apostraphe although good authors would resist this situation\r\n\t\t\t\t// we make the word length at least 2 to avoid french things like: l'écouteur, d'écouter, c'est-à-dire\r\n\t\t\t\t// and english apostraphe words: Mark's, Tom's\r\n\t\t\t\tif($this->config['quotes_style'] === 'omit_characters') {\r\n\t\t\t\t\t$substr = preg_replace(\"/([\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/])(\\s*<[^q][^<>]*?>\\s*){0,1}(\\s*<q[^<>]*?>\\s*){0,1}(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->leftSingleQuotes . \")(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->nonBreakingSpaceRegex . \"){0,}(\\s*<[^<>]+?>\\s*){0,1}((\\.\\.\\.){0,}([iIaA0-9]\\s|\\w{2,}))/is\", '$1$2<q>$4$6$8$9', $substr, -1, $ct1);\r\n\t\t\t\t\tif($ct1 > 0) {\r\n\t\t\t\t\t\t$substr = preg_replace(\"/(\\w{2,}[\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/]{0,})(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->nonBreakingSpaceRegex . \"){0,}(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->rightSingleQuotes . \")(\\s*<[^\\/]|\\/[^q][^<>]*?>\\s*){0,1}(\\s*<\\/q>\\s*){0,1}(\\s*<[^<>]+?>\\s*){0,1}([\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/])/is\", '$1$2$4$6</q>$8$9', $substr, -1, $ct2);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif($this->language === \"french\") {\r\n\t\t\t\t\t\t$substr = preg_replace(\"/([\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/]|\" . $this->leftDoubleQuotes . \")(\\s*<[^q][^<>]*?>\\s*){0,1}(\" . $this->nonBreakingSpaceRegex . \"){0,}(\\s*<[^q][^<>]*?>\\s*){0,1}(\\s*<q[^<>]*?>\\s*){0,1}(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->leftSingleQuotes . \")(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->nonBreakingSpaceRegex . \"){0,}(\\s*<[^<>]+?>\\s*){0,1}((\\.\\.\\.){0,}([iIaA0-9]\\s|\\w{2,}))/is\", '$1$2$3$4<q>$6&lsaquo;$8&nbsp;$10$11', $substr, -1, $ct1);\r\n\t\t\t\t\t\tif($ct1 > 0) {\r\n\t\t\t\t\t\t\t$substr = preg_replace(\"/(\\w{2,}[\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/]{0,})(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->nonBreakingSpaceRegex . \"){0,}(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->rightSingleQuotes . \")(\\s*<[^\\/]|\\/[^q][^<>]*?>\\s*){0,1}(\\s*<\\/q>\\s*){0,1}(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->nonBreakingSpaceRegex . \"){0,}(\\s*<[^<>]+?>\\s*){0,1}([\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/]|\" . $this->rightDoubleQuotes . \")/is\", '$1$2&nbsp;$4&rsaquo;$6</q>$8$9$10$11', $substr, -1, $ct2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$substr = preg_replace(\"/([\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/]|\" . $this->leftDoubleQuotes . \")(\\s*<[^q][^<>]*?>\\s*){0,1}(\" . $this->nonBreakingSpaceRegex . \"){0,}(\\s*<[^q][^<>]*?>\\s*){0,1}(\\s*<q[^<>]*?>\\s*){0,1}(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->leftSingleQuotes . \")(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->nonBreakingSpaceRegex . \"){0,}(\\s*<[^<>]+?>\\s*){0,1}((\\.\\.\\.){0,}([iIaA0-9]\\s|\\w{2,}))/is\", '$1$2$3$4<q>$6&lsquo;$8$10$11', $substr, -1, $ct1);\r\n\t\t\t\t\t\tif($ct1 > 0) {\r\n\t\t\t\t\t\t\t$substr = preg_replace(\"/(\\w{2,}[\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/]{0,})(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->nonBreakingSpaceRegex . \"){0,}(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->rightSingleQuotes . \")(\\s*<[^\\/]|\\/[^q][^<>]*?>\\s*){0,1}(\\s*<\\/q>\\s*){0,1}(\\s*<[^<>]+?>\\s*){0,1}(\" . $this->nonBreakingSpaceRegex . \"){0,}(\\s*<[^<>]+?>\\s*){0,1}([\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/]|\" . $this->rightDoubleQuotes . \")/is\", '$1$2$4&rsquo;$6</q>$8$9$10$11', $substr, -1, $ct2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif($ct1 > 0) {\r\n\t\t\t\t\tif($ct1 !== $ct2) {\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->code = str_replace($q_string, \"<q\" . $substr . \"</q>\", $this->code, $ct3);\r\n\t\t\t\t\t\t$changes_count += $ct3;\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//<q>&laquo;&nbsp;XXX9o9NewQuotesEntityXXX#1609o9XXXRevenusXXX9o9NewQuotesEntityXXX#1609o9XXX&nbsp;&raquo;</q>\r\n\t\t$this->code = preg_replace('/XXX9o9NewQuotesEntityXXX(#32|#160|#xa0|#xA0|nbsp)9o9XXXXXX9o9NewQuotesEntityXXX(#32|#160|#xa0|#xA0|nbsp)9o9XXX/is', 'XXX9o9NewQuotesEntityXXX${1}9o9XXX', $this->code);\r\n\t\t$this->code = preg_replace('/XXX9o9NewQuotesEntityXXX(#32|#160|#xa0|#xA0|nbsp)9o9XXXXXX9o9NewQuotesEntityXXX(#32|#160|#xa0|#xA0|nbsp)9o9XXX/is', 'XXX9o9NewQuotesEntityXXX${2}9o9XXX', $this->code);\r\n\t\t$this->code = preg_replace('/XXX9o9NewQuotesEntityXXX(#32|#160|#xa0|#xA0|nbsp)9o9XXXXXX9o9NewEntityXXX(#32|#160|#xa0|#xA0|nbsp)9o9XXX/is', 'XXX9o9NewEntityXXX${2}9o9XXX', $this->code);\r\n\t\t$this->code = preg_replace('/XXX9o9NewEntityXXX(#32|#160|#xa0|#xA0|nbsp)9o9XXXXXX9o9NewQuotesEntityXXX(#32|#160|#xa0|#xA0|nbsp)9o9XXX/is', 'XXX9o9NewEntityXXX${1}9o9XXX', $this->code);\r\n\t\t$this->code = preg_replace('/XXX9o9NewQuotesEntityXXX(#32|#160|#xa0|#xA0|nbsp)9o9XXX(' . $this->nonBreakingSpaceRegex . ')/is', 'XXX9o9NewQuotesEntityXXX${1}9o9XXX', $this->code);\r\n\t\t$this->code = preg_replace('/(' . $this->nonBreakingSpaceRegex . ')XXX9o9NewQuotesEntityXXX(#32|#160|#xa0|#xA0|nbsp)9o9XXX/is', 'XXX9o9NewQuotesEntityXXX${2}9o9XXX', $this->code);\r\n\t\t//$this->code = preg_replace('/XXX9o9NewQuotesEntityXXX#1609o9XXX(' . $this->nonBreakingSpaceRegex . ')/is', 'XXX9o9NewQuotesEntityXXX#1609o9XXX', $this->code);\r\n\t\t//$this->code = preg_replace('/(' . $this->nonBreakingSpaceRegex . ')XXX9o9NewQuotesEntityXXX#1609o9XXX/is', 'XXX9o9NewQuotesEntityXXX#1609o9XXX', $this->code);\r\n\t\t//$this->code = preg_replace('/XXX9o9NewQuotesEntityXXX#1609o9XXX(&nbsp;)/is', 'XXX9o9NewQuotesEntityXXX#1609o9XXX', $this->code);\r\n\t\t//$this->code = preg_replace('/(&nbsp;)XXX9o9NewQuotesEntityXXX#1609o9XXX/is', 'XXX9o9NewQuotesEntityXXX#1609o9XXX', $this->code);\r\n\t\t//$this->code = str_replace('XXX9o9NewQuotesEntityXXX#1609o9XXX&nbsp;', 'XXX9o9NewQuotesEntityXXX#1609o9XXX', $this->code);\r\n\t\t//$this->code = str_replace('&nbsp;XXX9o9NewQuotesEntityXXX#1609o9XXX', 'XXX9o9NewQuotesEntityXXX#1609o9XXX', $this->code);\r\n\t\t\r\n\t\t// the quotation code was written expecting <q> tags on the outside of characters so if the configuration in the profile demands it, put them on the inside\r\n\t\tif($this->config['quotes_style'] === 'use_quote_chars_outside_quote_tags') {\r\n\t\t\t$this->code = preg_replace('/<q>(' . $this->leftQuotes . ')(' . $this->nonBreakingSpaceRegex . '){0,}\\s*<q>(' . $this->leftQuotes . ')(' . $this->nonBreakingSpaceRegex . '){0,}/is', '$1$2XXX9o9NewTagBeginXXXq9o9XXX$3$4XXX9o9NewTagBeginXXXq9o9XXX', $this->code);\r\n\t\t\t$this->code = preg_replace('/<q>(' . $this->leftQuotes . ')(' . $this->nonBreakingSpaceRegex . '){0,}/is', '$1$2<q>', $this->code);\r\n\t\t\t$this->code = preg_replace('/(' . $this->nonBreakingSpaceRegex . '){0,}(' . $this->rightQuotes . ')<\\/q>(' . $this->nonBreakingSpaceRegex . '){0,}(' . $this->rightQuotes . ')<\\/q>/is', 'XXX9o9NewTagEndXXXq9o9XXX$1$2XXX9o9NewTagEndXXXq9o9XXX$3$4', $this->code);\r\n\t\t\t$this->code = preg_replace('/(' . $this->nonBreakingSpaceRegex . '){0,}(' . $this->rightQuotes . ')<\\/q>/is', '</q>$1$2', $this->code);\r\n\t\t\t$this->code = str_replace('XXX9o9NewTagBeginXXXq9o9XXX', '<q>', $this->code);\r\n\t\t\t$this->code = str_replace('XXX9o9NewTagEndXXXq9o9XXX', '</q>', $this->code);\r\n\t\t\t// some replaces for clean-up\r\n\t\t\t$this->code = preg_replace('/(' . $this->leftQuotes . ')(' . $this->nonBreakingSpaceRegex . ')<q>((<[^<>]+?>)*)(' . $this->nonBreakingSpaceRegex . ')/is', '$1&nbsp;<q>$3', $this->code);\r\n\t\t\t$this->code = preg_replace('/(' . $this->nonBreakingSpaceRegex . ')<\\/q>(' . $this->nonBreakingSpaceRegex . ')/is', '$1</q>', $this->code);\r\n\t\t\t$this->code = preg_replace('/(' . $this->nonBreakingSpaceRegex . ')<q>(' . $this->nonBreakingSpaceRegex . ')/is', '<q>$2', $this->code);\r\n\t\t\t$this->code = preg_replace('/XXX9o9NewQuotesEntityXXXnbsp9o9XXX<\\/q>(' . $this->nonBreakingSpaceRegex . ')/is', '</q>$1', $this->code);\r\n\t\t\t$this->code = preg_replace('/(' . $this->nonBreakingSpaceRegex . ')<q>XXX9o9NewQuotesEntityXXXnbsp9o9XXX/is', '$1<q>', $this->code);\r\n\t\t}\r\n\t\t\r\n\t\t// also quotes decode the entities\r\n\t\t$this->code = preg_replace('/XXX9o9NewQuotesEntityXXX([^;&\\s]+?)9o9XXX/is', '&$1;', $this->code);\r\n\t\t$this->logMsgIf(\"single quotes to &lt;q&gt;\", $changes_count);\r\n\t}", "public static function globalNestingCorrectlyRemovesInvalidTagsDataProvider() {}", "function wp_filter_nohtml_kses($data)\n {\n }", "public function contentStrReplace() {}", "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}", "function somehtml($nohtml) {\n\t\t$nohtml = str_replace(\"&#124;\", \"|\", $nohtml);\n\t\treturn stripslashes(strip_tags($nohtml, '<p><a><font><ul><li><h1><h2><h3><h4><h5><h6><hr><b><u><i><strong><em><table><tr><td><tbody><tfoot><span><div><br><br /><blockquote><img><embed><object><form><input>'));\n\t}", "function _sanitize_naughty_html($matches) {\n\t\t// encode opening brace\n\t\t$str = '&lt;' . $matches [1] . $matches [2] . $matches [3];\n\n\t\t// encode captured opening or closing brace to prevent recursive vectors\n\t\t$str .= str_replace(array('>', '<'), array('&gt;', '&lt;'), $matches [4]);\n\n\t\treturn $str;\n\t}", "function _xss_sanitization_sanitize_stored_html( $html ) {\n \n // URL protocols\n $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn');\n\n return kses($html, _xss_sanitization_allowed_tags(), $protocols);\n}", "public function testAddInvalidHTML(string $html)\n {\n (new Dom())->add($html);\n }", "function replaceTagsAll(&$string, $enabled = 1, $security_pass = 1)\n\t{\n\t\tif (!is_string($string) || $string == '')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$enabled)\n\t\t{\n\t\t\t// replace source block content with HTML comment\n\t\t\t$string = '<!-- ' . JText::_('SRC_COMMENT') . ': ' . JText::_('SRC_CODE_REMOVED_NOT_ENABLED') . ' -->';\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$security_pass)\n\t\t{\n\t\t\t// replace source block content with HTML comment\n\t\t\t$string = '<!-- ' . JText::_('SRC_COMMENT') . ': ' . JText::sprintf('SRC_CODE_REMOVED_SECURITY', '') . ' -->';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$this->cleanTags($string);\n\n\t\t$a = $this->src_params->areas['default'];\n\t\t$forbidden_tags_array = explode(',', $a['forbidden_tags']);\n\t\t$this->cleanArray($forbidden_tags_array);\n\t\t// remove the comment tag syntax from the array - they cannot be disabled\n\t\t$forbidden_tags_array = array_diff($forbidden_tags_array, array('!--'));\n\t\t// reindex the array\n\t\t$forbidden_tags_array = array_merge($forbidden_tags_array);\n\n\t\t$has_forbidden_tags = 0;\n\t\tforeach ($forbidden_tags_array as $forbidden_tag)\n\t\t{\n\t\t\tif (!(strpos($string, '<' . $forbidden_tag) == false))\n\t\t\t{\n\t\t\t\t$has_forbidden_tags = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (!$has_forbidden_tags)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// double tags\n\t\t$tag_regex = '#<\\s*([a-z\\!][^>\\s]*?)(?:\\s+.*?)?>.*?</\\1>#si';\n\t\tpreg_match_all($tag_regex, $string, $matches, PREG_SET_ORDER);\n\n\t\tif (!empty($matches))\n\t\t{\n\t\t\tforeach ($matches as $match)\n\t\t\t{\n\t\t\t\tif (!in_array($match['1'], $forbidden_tags_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$tag = '<!-- ' . JText::_('SRC_COMMENT') . ': ' . JText::sprintf('SRC_TAG_REMOVED_FORBIDDEN', $match['1']) . ' -->';\n\t\t\t\t$string = str_replace($match['0'], $tag, $string);\n\t\t\t}\n\t\t}\n\n\t\t// single tags\n\t\t$tag_regex = '#<\\s*([a-z\\!][^>\\s]*?)(?:\\s+.*?)?>#si';\n\t\tpreg_match_all($tag_regex, $string, $matches, PREG_SET_ORDER);\n\n\t\tif (!empty($matches))\n\t\t{\n\t\t\tforeach ($matches as $match)\n\t\t\t{\n\t\t\t\tif (!in_array($match['1'], $forbidden_tags_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$tag = '<!-- ' . JText::_('SRC_COMMENT') . ': ' . JText::sprintf('SRC_TAG_REMOVED_FORBIDDEN', $match['1']) . ' -->';\n\t\t\t\t$string = str_replace($match['0'], $tag, $string);\n\t\t\t}\n\t\t}\n\t}", "function DOM_quotation() {\r\n\t\t$array_exclusions = array(\r\n\t\t'head',\r\n\t\t'script',\r\n\t\t'style',\r\n\t\t);\r\n\t\t\r\n\t\t$grand_changes_count = 0;\r\n\t\t\r\n\t\t// this does not deal with &quot; entities..........\r\n\t\t$query = '//text()';\r\n\t\t$text_nodes = $this->xpath->query($query);\r\n\t\tforeach($text_nodes as $text_node) {\r\n\t\t\t$changes_count = 0;\r\n\t\t\tif(strlen(trim($text_node->nodeValue)) > 0) {\r\n\t\t\t\t$node_value = $text_node->nodeValue;\r\n\t\t\t\t// come to think of it, the right double quotes lines just take any double quotes remaining and makes them closing quote tags... oh well.\r\n\t\t\t\tif($this->config['quotes_style'] === 'omit_characters') {\r\n\t\t\t\t\t$node_value = preg_replace('/(' . $this->leftDoubleQuotes . ')(\\s*<[^<>]+?>\\s*){0,1}(' . $this->nonBreakingSpaceRegex . '){0,}(\\s*<[^<>]+?>\\s*){0,1}((\\.\\.\\.){0,}\\w{1,})/is', 'XXX9o9NewTagBeginXXXq9o9XXX$2$4$5', $node_value, -1, $ct1);\r\n\t\t\t\t\t$node_value = preg_replace('/(\\w{0,}[\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/\\']{0,})(\\s*<[^<>]+?>\\s*){0,1}(' . $this->nonBreakingSpaceRegex . '){0,}(\\s*<[^<>]+?>\\s*){0,1}(' . $this->rightDoubleQuotes . ')/is', '$1$2$4XXX9o9NewTagEndXXXq9o9XXX', $node_value, -1, $ct2);\r\n\t\t\t\t\t$changes_count += $ct1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// unfortunately people seem to use french quotes on english pages...\r\n\t\t\t\t\tif($this->language === \"french\") {\r\n\t\t\t\t\t\t$node_value = preg_replace('/(' . $this->leftDoubleQuotes . ')(\\s*<[^<>]+?>\\s*){0,1}(' . $this->nonBreakingSpaceRegex . '){0,}(\\s*<[^<>]+?>\\s*){0,1}((\\.\\.\\.){0,}\\w{1,})/is', 'XXX9o9NewTagBeginXXXq9o9XXXXXX9o9NewEntityXXXlaquo9o9XXXXXX9o9NewEntityXXXnbsp9o9XXX$2$4$5', $node_value, -1, $ct4);\r\n\t\t\t\t\t\t$node_value = preg_replace('/(\\w{0,}[\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/\\']{0,})(\\s*<[^<>]+?>\\s*){0,1}(' . $this->nonBreakingSpaceRegex . '){0,}(\\s*<[^<>]+?>\\s*){0,1}(' . $this->rightDoubleQuotes . ')/is', '$1$2$4XXX9o9NewEntityXXXnbsp9o9XXXXXX9o9NewEntityXXXraquo9o9XXXXXX9o9NewTagEndXXXq9o9XXX', $node_value, -1, $ct5);\r\n\t\t\t\t\t\t$changes_count += $ct4;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$node_value = preg_replace('/(' . $this->leftDoubleQuotes . ')(\\s*<[^<>]+?>\\s*){0,1}(' . $this->nonBreakingSpaceRegex . '){0,}(\\s*<[^<>]+?>\\s*){0,1}((\\.\\.\\.){0,}\\w{1,})/is', 'XXX9o9NewTagBeginXXXq9o9XXXXXX9o9NewEntityXXXldquo9o9XXX$2$4$5', $node_value, -1, $ct7);\r\n\t\t\t\t\t\t$node_value = preg_replace('/(\\w{0,}[\\s,~!\\(\\)\\-=\\+\\{\\}\\[\\]\\\\\\|:;\\<>,\\.\\?\\/\\']{0,})(\\s*<[^<>]+?>\\s*){0,1}(' . $this->nonBreakingSpaceRegex . '){0,}(\\s*<[^<>]+?>\\s*){0,1}(' . $this->rightDoubleQuotes . ')/is', '$1$2$4XXX9o9NewEntityXXXrdquo9o9XXXXXX9o9NewTagEndXXXq9o9XXX', $node_value, -1, $ct8);\r\n\t\t\t\t\t\t$changes_count += $ct7;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif($ct1 > 0 || $ct2 > 0 || $ct4 > 0 || $ct5 > 0 || $ct7 > 0 || $ct8 > 0) {\r\n\t\t\t\t\t$nodeAncestorsArray = ReTidy::DOM_getNodeAncestry($text_node);\r\n\t\t\t\t\t$apply_q = true;\r\n\t\t\t\t\tforeach($nodeAncestorsArray as $ancestor) {\r\n\t\t\t\t\t\tforeach($array_exclusions as $exclusion) {\r\n\t\t\t\t\t\t\tif($exclusion === $ancestor) {\r\n\t\t\t\t\t\t\t\t$apply_q = false;\r\n\t\t\t\t\t\t\t\tcontinue 3;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($apply_q) {\r\n\t\t\t\t\t\t$text_node->nodeValue = $node_value;\r\n\t\t\t\t\t\t$grand_changes_count += $changes_count;\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$this->logMsgIf(\"double quotes to &lt;q&gt;\", $grand_changes_count);\r\n\t}", "private function getHtmlTags()\n {\n // Possible allowed HTML tags\n return [\n '!--' => 'https://www.w3schools.com/tags/tag_comment.asp',\n 'a' => 'https://www.w3schools.com/tags/tag_a.asp',\n 'abbr' => 'https://www.w3schools.com/tags/tag_abbr.asp',\n 'acronym' => 'https://www.w3schools.com/tags/tag_acronym.asp',\n 'address' => 'https://www.w3schools.com/tags/tag_address.asp',\n 'applet' => 'https://www.w3schools.com/tags/tag_applet.asp',\n 'area' => 'https://www.w3schools.com/tags/tag_area.asp',\n 'article' => 'https://www.w3schools.com/tags/tag_article.asp',\n 'aside' => 'https://www.w3schools.com/tags/tag_aside.asp',\n 'audio' => 'https://www.w3schools.com/tags/tag_audio.asp',\n 'b' => 'https://www.w3schools.com/tags/tag_b.asp',\n 'base' => 'https://www.w3schools.com/tags/tag_base.asp',\n 'basefont' => 'https://www.w3schools.com/tags/tag_basefont.asp',\n 'bdo' => 'https://www.w3schools.com/tags/tag_bdo.asp',\n 'big' => 'https://www.w3schools.com/tags/tag_font_style.asp',\n 'blockquote' => 'https://www.w3schools.com/tags/tag_blockquote.asp',\n 'br' => 'https://www.w3schools.com/tags/tag_br.asp',\n 'button' => 'https://www.w3schools.com/tags/tag_button.asp',\n 'canvas' => 'https://www.w3schools.com/tags/tag_canvas.asp',\n 'caption' => 'https://www.w3schools.com/tags/tag_caption.asp',\n 'center' => 'https://www.w3schools.com/tags/tag_center.asp',\n 'cite' => 'https://www.w3schools.com/tags/tag_cite.asp',\n 'code' => 'https://www.w3schools.com/tags/tag_code.asp',\n 'col' => 'https://www.w3schools.com/tags/tag_col.asp',\n 'colgroup' => 'https://www.w3schools.com/tags/tag_colgroup.asp',\n 'command' => 'https://www.w3schools.com/tags/tag_command.asp',\n 'datalist' => 'https://www.w3schools.com/tags/tag_datalist.asp',\n 'dd' => 'https://www.w3schools.com/tags/tag_dd.asp',\n 'del' => 'https://www.w3schools.com/tags/tag_del.asp',\n 'details' => 'https://www.w3schools.com/tags/tag_details.asp',\n 'dfn' => 'https://www.w3schools.com/tags/tag_dfn.asp',\n 'dir' => 'https://www.w3schools.com/tags/tag_dir.asp',\n 'div' => 'https://www.w3schools.com/tags/tag_div.asp',\n 'dl' => 'https://www.w3schools.com/tags/tag_dl.asp',\n 'dt' => 'https://www.w3schools.com/tags/tag_dt.asp',\n 'em' => 'https://www.w3schools.com/tags/tag_em.asp',\n 'embed' => 'https://www.w3schools.com/tags/tag_embed.asp',\n 'fieldset' => 'https://www.w3schools.com/tags/tag_fieldset.asp',\n 'figcaption' => 'https://www.w3schools.com/tags/tag_figcaption.asp',\n 'figure' => 'https://www.w3schools.com/tags/tag_figure.asp',\n 'font' => 'https://www.w3schools.com/tags/tag_font.asp',\n 'footer' => 'https://www.w3schools.com/tags/tag_footer.asp',\n 'form' => 'https://www.w3schools.com/tags/tag_form.asp',\n 'h1' => 'https://www.w3schools.com/tags/tag_hn.asp',\n 'h2' => 'https://www.w3schools.com/tags/tag_hn.asp',\n 'h3' => 'https://www.w3schools.com/tags/tag_hn.asp',\n 'h4' => 'https://www.w3schools.com/tags/tag_hn.asp',\n 'h5' => 'https://www.w3schools.com/tags/tag_hn.asp',\n 'h6' => 'https://www.w3schools.com/tags/tag_hn.asp',\n 'header' => 'https://www.w3schools.com/tags/tag_header.asp',\n 'hgroup' => 'https://www.w3schools.com/tags/tag_hgroup.asp',\n 'hr' => 'https://www.w3schools.com/tags/tag_hr.asp',\n 'i' => 'https://www.w3schools.com/tags/tag_i.asp',\n 'iframe' => 'https://www.w3schools.com/tags/tag_iframe.asp',\n 'img' => 'https://www.w3schools.com/tags/tag_img.asp',\n 'input' => 'https://www.w3schools.com/tags/tag_input.asp',\n 'ins' => 'https://www.w3schools.com/tags/tag_ins.asp',\n 'keygen' => 'https://www.w3schools.com/tags/tag_keygen.asp',\n 'kbd' => 'https://www.w3schools.com/tags/tag_kbd.asp',\n 'label' => 'https://www.w3schools.com/tags/tag_label.asp',\n 'legend' => 'https://www.w3schools.com/tags/tag_legend.asp',\n 'li' => 'https://www.w3schools.com/tags/tag_li.asp',\n 'map' => 'https://www.w3schools.com/tags/tag_map.asp',\n 'mark' => 'https://www.w3schools.com/tags/tag_mark.asp',\n 'menu' => 'https://www.w3schools.com/tags/tag_menu.asp',\n 'marquee' => '',\n 'meter' => 'https://www.w3schools.com/tags/tag_meter.asp',\n 'nav' => 'https://www.w3schools.com/tags/tag_nav.asp',\n 'nobr' => '',\n 'object' => 'https://www.w3schools.com/tags/tag_object.asp',\n 'ol' => 'https://www.w3schools.com/tags/tag_ol.asp',\n 'optgroup' => 'https://www.w3schools.com/tags/tag_optgroup.asp',\n 'option' => 'https://www.w3schools.com/tags/tag_option.asp',\n 'output' => 'https://www.w3schools.com/tags/tag_output.asp',\n 'p' => 'https://www.w3schools.com/tags/tag_p.asp',\n 'param' => 'https://www.w3schools.com/tags/tag_param.asp',\n 'pre' => 'https://www.w3schools.com/tags/tag_pre.asp',\n 'progress' => 'https://www.w3schools.com/tags/tag_progress.asp',\n 'q' => 'https://www.w3schools.com/tags/tag_q.asp',\n 'rp' => 'https://www.w3schools.com/tags/tag_rp.asp',\n 'rt' => 'https://www.w3schools.com/tags/tag_rt.asp',\n 'ruby' => 'https://www.w3schools.com/tags/tag_ruby.asp',\n 's' => 'https://www.w3schools.com/tags/tag_s.asp',\n 'samp' => 'https://www.w3schools.com/tags/tag_samp.asp',\n 'script' => 'https://www.w3schools.com/tags/tag_script.asp',\n 'section' => 'https://www.w3schools.com/tags/tag_section.asp',\n 'select' => 'https://www.w3schools.com/tags/tag_select.asp',\n 'small' => 'https://www.w3schools.com/tags/tag_small.asp',\n 'source' => 'https://www.w3schools.com/tags/tag_source.asp',\n 'span' => 'https://www.w3schools.com/tags/tag_span.asp',\n 'strike' => 'https://www.w3schools.com/tags/tag_strike.asp',\n 'strong' => 'https://www.w3schools.com/tags/tag_strong.asp',\n 'sub' => 'https://www.w3schools.com/tags/tag_sup.asp',\n 'summary' => 'https://www.w3schools.com/tags/tag_summary.asp',\n 'sup' => 'https://www.w3schools.com/tags/tag_sup.asp',\n 'table' => 'https://www.w3schools.com/tags/tag_table.asp',\n 'tbody' => 'https://www.w3schools.com/tags/tag_tbody.asp',\n 'td' => 'https://www.w3schools.com/tags/tag_td.asp',\n 'textarea' => 'https://www.w3schools.com/tags/tag_textarea.asp',\n 'tfoot' => 'https://www.w3schools.com/tags/tag_tfoot.asp',\n 'th' => 'https://www.w3schools.com/tags/tag_th.asp',\n 'thead' => 'https://www.w3schools.com/tags/tag_thead.asp',\n 'time' => 'https://www.w3schools.com/tags/tag_time.asp',\n 'tr' => 'https://www.w3schools.com/tags/tag_tr.asp',\n 'tt' => 'https://www.w3schools.com/tags/tag_font_style.asp',\n 'u' => 'https://www.w3schools.com/tags/tag_u.asp',\n 'ul' => 'https://www.w3schools.com/tags/tag_ul.asp',\n 'var' => 'https://www.w3schools.com/tags/tag_var.asp',\n 'video' => 'https://www.w3schools.com/tags/tag_video.asp',\n 'wbr' => 'https://www.w3schools.com/tags/tag_wbr.asp'\n ];\n }", "public function htmlIsValid()\n {\n if (!$this->scan_attributes) {\n return false;\n }\n\n return $this->versionIsValid($this->scan_attributes->html_version);\n }", "public function testHtmlPurifier() {\n\t\ttry {\n\t\t// cannot test this as fails hard\n\t\t//require_once('HTMLPurifier.auto.php');\n\t\t// so include instead :\n\t\t\tinclude 'HTMLPurifier.auto.php';\n\t\t}\n\n\t\tcatch (PHPUnit\\Framework\\Error $expected) {\n\t\t\t$this->fail('You probably need to install htmlpurifier : '.$expected->getMessage());\n\t\t\treturn;\n\t\t}\n\t\t$this->assertEquals(0,0);\n\t}", "function filter_html($as_admin,$source_member,$pos,&$len,&$comcode,$in_html,$in_semihtml)\n{\n\tif ((!$as_admin) && (!has_specific_permission($source_member,'use_very_dangerous_comcode')))\n\t{\n\t\tglobal $POTENTIAL_JS_NAUGHTY_ARRAY;\n\n\t\t$comcode=preg_replace('#(\\\\\\\\)+(\\[/(html|semihtml)\\])#','\\2',$comcode); // Stops sneaky trying to trick the end of the HTML tag to hack this function\n\n\t\tif (($in_html) && ($in_semihtml)) $ahead_end=max(strpos(strtolower($comcode),'[/html]',$pos),strpos(strtolower($comcode),'[/semihtml]',$pos));\n\t\telseif ($in_html) $ahead_end=strpos(strtolower($comcode),'[/html]',$pos);\n\t\telseif ($in_semihtml) $ahead_end=strpos(strtolower($comcode),'[/semihtml]',$pos);\n\t\telse $ahead_end=false;\n\t\tif ($ahead_end===false) $ahead_end=strlen($comcode);\n\t\t$ahead=substr($comcode,$pos,$ahead_end-$pos);\n\n\t\trequire_code('input_filter');\n\t\thard_filter_input_data__html($ahead);\n\n\t\t// Tidy up\n\t\t$comcode=substr($comcode,0,$pos).$ahead.substr($comcode,$ahead_end);\n\t\t$len=strlen($comcode);\n\t}\n}", "function sanitize_html_string($string)\n{\n $pattern[0] = '/\\&/';\n $pattern[1] = '/</';\n $pattern[2] = \"/>/\";\n $pattern[3] = '/\\n/';\n $pattern[4] = '/\"/';\n $pattern[5] = \"/'/\";\n $pattern[6] = \"/%/\";\n $pattern[7] = '/\\(/';\n $pattern[8] = '/\\)/';\n $pattern[9] = '/\\+/';\n $pattern[10] = '/-/';\n $replacement[0] = '&amp;';\n $replacement[1] = '&lt;';\n $replacement[2] = '&gt;';\n $replacement[3] = '<br>';\n $replacement[4] = '&quot;';\n $replacement[5] = '&#39;';\n $replacement[6] = '&#37;';\n $replacement[7] = '&#40;';\n $replacement[8] = '&#41;';\n $replacement[9] = '&#43;';\n $replacement[10] = '&#45;';\n return preg_replace($pattern, $replacement, $string);\n}", "function testBugInternal1() \n {\n $sText = <<<SCRIPT\n<?php\n\\$a = <<<HEREDOC\nsdsdsds\nHEREDOC;\n?>\nSCRIPT;\n $this->setText($sText);\n $sActual = $this->oBeaut->get();\n $this->assertTrue(preg_match(\"/HEREDOC;\\n\\s*?\\?>/ms\", $sActual));\n }", "function filterHTMLTags( $text )\n{\n $text = preg_replace(\n array(\n // Remove invisible content\n '@<head[^>]*?>.*?</head>@siu',\n '@<style[^>]*?>.*?</style>@siu',\n '@<script[^>]*?.*?</script>@siu',\n '@<object[^>]*?.*?</object>@siu',\n '@<embed[^>]*?.*?</embed>@siu',\n '@<applet[^>]*?.*?</applet>@siu',\n '@<noframes[^>]*?.*?</noframes>@siu',\n '@<noscript[^>]*?.*?</noscript>@siu',\n '@<noembed[^>]*?.*?</noembed>@siu',\n // Add line breaks before and after blocks\n '@</?((address)|(blockquote)|(center)|(del))@iu',\n '@</?((div)|(h[1-9])|(ins)|(isindex)|(p)|(pre))@iu',\n '@</?((dir)|(dl)|(dt)|(dd)|(li)|(menu)|(ol)|(ul))@iu',\n '@</?((table)|(th)|(td)|(caption))@iu',\n '@</?((form)|(button)|(fieldset)|(legend)|(input))@iu',\n '@</?((label)|(select)|(optgroup)|(option)|(textarea))@iu',\n '@</?((frameset)|(frame)|(iframe))@iu',\n ),\n array(\n ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',\n \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\",\n \"\\n\\$0\", \"\\n\\$0\",\n ),\n $text );\n return strip_tags( $text );\n}", "protected function isContentCorrect() {}", "public static function isCleanHtml($html, $allow_iframe = false)\n {\n $events = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange';\n $events .= '|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave|onerror|onselect|onreset|onabort|ondragdrop|onresize|onactivate|onafterprint|onmoveend';\n $events .= '|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onmove';\n $events .= '|onbounce|oncellchange|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondeactivate|ondrag|ondragend|ondragenter|onmousewheel';\n $events .= '|ondragleave|ondragover|ondragstart|ondrop|onerrorupdate|onfilterchange|onfinish|onfocusin|onfocusout|onhashchange|onhelp|oninput|onlosecapture|onmessage|onmouseup|onmovestart';\n $events .= '|onoffline|ononline|onpaste|onpropertychange|onreadystatechange|onresizeend|onresizestart|onrowenter|onrowexit|onrowsdelete|onrowsinserted|onscroll|onsearch|onselectionchange';\n $events .= '|onselectstart|onstart|onstop';\n\n if (preg_match('/<[\\s]*script/ims', $html) || preg_match('/(' . $events . ')[\\s]*=/ims', $html) || preg_match('/.*script\\:/ims', $html)) {\n return false;\n }\n\n if (!$allow_iframe && preg_match('/<[\\s]*(i?frame|form|input|embed|object)/ims', $html)) {\n return false;\n }\n\n return true;\n }", "public function providerContainsHtml() {\n $tests = [];\n $tests[] = ['some text', FALSE];\n $tests[] = ['<b>some text</b>', TRUE];\n return $tests;\n }", "function gwt_drupal_process_html_tag(&$variables) {\n $tag = &$variables['element'];\n\n if ($tag['#tag'] == 'style' || $tag['#tag'] == 'script') {\n // Remove redundant type attribute and CDATA comments.\n unset($tag['#attributes']['type'], $tag['#value_prefix'], $tag['#value_suffix']);\n\n // Remove media=\"all\" but leave others unaffected.\n if (isset($tag['#attributes']['media']) && $tag['#attributes']['media'] === 'all') {\n unset($tag['#attributes']['media']);\n }\n }\n}", "function closetags($html) {\n\t\tpreg_match_all('#<([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result);\n\t\t$openedtags = $result[1]; #put all closed tags into an array\n\t\tpreg_match_all('#</([a-z]+)>#iU', $html, $result);\n\t\t$closedtags = $result[1];\n\t\t$len_opened = count($openedtags);\n\t\t# all tags are closed\n\t\tif (count($closedtags) == $len_opened) {\n\t\t\treturn $html;\n\t\t}\n\t\t\n\t\t$openedtags = array_reverse($openedtags);\n\t\t# close tags\n\t\tfor ($i=0; $i < $len_opened; $i++) {\n\t\t\tif (!in_array($openedtags[$i], $closedtags)){\n\t\t\t $html .= '</'.$openedtags[$i].'>';\n\t\t\t} else {\n\t\t\t unset($closedtags[array_search($openedtags[$i], $closedtags)]); }\n\t\t\t} \n\t\t\treturn $html;\n\t\t}", "public function assert_equal_html( string $expected, string $actual, string $error_message ) {\n\t\t$from = [ '/\\>[^\\S ]+/s', '/[^\\S ]+\\</s', '/(\\s)+/s', '/> </s' ];\n\t\t$to = [ '>', '<', '\\\\1', '><' ];\n\t\t$this->assertEquals(\n\t\t\tpreg_replace( $from, $to, $expected ),\n\t\t\tpreg_replace( $from, $to, $actual ),\n\t\t\t$error_message\n\t\t);\n\t}", "function replaceContent($regex, $replacement){\n\t\t$this->html_result=preg_replace($regex, $replacement, $this->html_result);\n\t}", "function html_strip_unsafe($strData)\n\t\t{\n\t\t // Unsafe HTML tags/attributes that members may abuse\n\t\t $arrData=array(\n\t\t //'/<iframe(.*?)<\\/iframe>/is',\n\t\t '/<title(.*?)<\\/title>/is',\n\t\t '/<pre(.*?)<\\/pre>/is',\n\t\t '/<frame(.*?)<\\/frame>/is',\n\t\t '/<frameset(.*?)<\\/frameset>/is',\n\t\t //'/<object(.*?)<\\/object>/is',\n\t\t '/<script(.*?)<\\/script>/is',\n\t\t //'/<embed(.*?)<\\/embed>/is',\n\t\t '/<applet(.*?)<\\/applet>/is',\n\t\t '/<meta(.*?)>/is',\n\t\t '/<!doctype(.*?)>/is',\n\t\t '/<link(.*?)>/is',\n\t\t '/<body(.*?)>/is',\n\t\t '/<\\/body>/is',\n\t\t '/<head(.*?)>/is',\n\t\t '/<\\/head>/is',\n\t\t '/onload=\"(.*?)\"/is',\n\t\t '/onunload=\"(.*?)\"/is',\n\t\t '/onerror=\"(.*?)\"/is',\n\t\t '/onclick=\"(.*?)\"/is',\n\t\t '/onchange=\"(.*?)\"/is',\n\t\t '/onmouseover=\"(.*?)\"/is',\n\t\t '/autofocus=\"(.*?)\"/is',\n\t\t '/onfocus=\"(.*?)\"/is',\n\t\t '/<html(.*?)>/is',\n\t\t '/<\\/html>/is',\n\t\t );\n\t\t $strData = preg_replace($arrData, \"\", $strData);\n\t\t\t$strData = filter_var($strData, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);\n\n\t\t return $strData;\n\t\t}", "public static function isCleanHtml($html, $allow_iframe = false)\n {\n $events = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange';\n $events .= '|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave|onerror|onselect|onreset|onabort|ondragdrop|onresize|onactivate|onafterprint|onmoveend';\n $events .= '|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onmove';\n $events .= '|onbounce|oncellchange|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondeactivate|ondrag|ondragend|ondragenter|onmousewheel';\n $events .= '|ondragleave|ondragover|ondragstart|ondrop|onerrorupdate|onfilterchange|onfinish|onfocusin|onfocusout|onhashchange|onhelp|oninput|onlosecapture|onmessage|onmouseup|onmovestart';\n $events .= '|onoffline|ononline|onpaste|onpropertychange|onreadystatechange|onresizeend|onresizestart|onrowenter|onrowexit|onrowsdelete|onrowsinserted|onscroll|onsearch|onselectionchange';\n $events .= '|onselectstart|onstart|onstop';\n\n if (preg_match('/<[\\s]*script/ims', $html) || preg_match('/(' . $events . ')[\\s]*=/ims', $html) || preg_match('/.*script\\:/ims', $html))\n return false;\n\n if (!$allow_iframe && preg_match('/<[\\s]*(i?frame|form|input|embed|object)/ims', $html))\n return false;\n\n return true;\n }", "public function removeBadHTML($text)\n {\n GeneralUtility::logDeprecatedFunction();\n // Copyright 2002-2003 Thomas Bley\n $text = preg_replace([\n '\\'<script[^>]*?>.*?</script[^>]*?>\\'si',\n '\\'<applet[^>]*?>.*?</applet[^>]*?>\\'si',\n '\\'<object[^>]*?>.*?</object[^>]*?>\\'si',\n '\\'<iframe[^>]*?>.*?</iframe[^>]*?>\\'si',\n '\\'<frameset[^>]*?>.*?</frameset[^>]*?>\\'si',\n '\\'<style[^>]*?>.*?</style[^>]*?>\\'si',\n '\\'<marquee[^>]*?>.*?</marquee[^>]*?>\\'si',\n '\\'<script[^>]*?>\\'si',\n '\\'<meta[^>]*?>\\'si',\n '\\'<base[^>]*?>\\'si',\n '\\'<applet[^>]*?>\\'si',\n '\\'<object[^>]*?>\\'si',\n '\\'<link[^>]*?>\\'si',\n '\\'<iframe[^>]*?>\\'si',\n '\\'<frame[^>]*?>\\'si',\n '\\'<frameset[^>]*?>\\'si',\n '\\'<input[^>]*?>\\'si',\n '\\'<form[^>]*?>\\'si',\n '\\'<embed[^>]*?>\\'si',\n '\\'background-image:url\\'si',\n '\\'<\\\\w+.*?(onabort|onbeforeunload|onblur|onchange|onclick|ondblclick|ondragdrop|onerror|onfilterchange|onfocus|onhelp|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onmove|onreadystatechange|onreset|onresize|onscroll|onselect|onselectstart|onsubmit|onunload).*?>\\'si'\n ], '', $text);\n $text = preg_replace('/<a[^>]*href[[:space:]]*=[[:space:]]*[\"\\']?[[:space:]]*javascript[^>]*/i', '', $text);\n // Return clean content\n return $text;\n }", "function get_html_pre_page_end();", "public function typoSearchTagsRemovesBodyContentOutsideMarkers() {}", "function verifyTextSearchReplaceNext(){\n parent::doExpandAdvanceSection();\n $this->type(TEXT_EDITOR, \"\");\n $this->click(LINK_SEARCH);\n $this->type(TEXT_EDITOR, (TEXT_SAMPLE));\n $this->type(INPUT_SEARCH, (TEXT_SEARCH));\n $this->type(INPUT_REPLACE, (TEXT_REPLACE));\n $this->click(BUTTON_REPLACENEXT);\n $this->click(BUTTON_REPLACENEXT);\n $this->click(BUTTON_CANCEL);\n $this->click(BUTTON_PREVIEW);\n $this->waitForPageToLoad((WIKI_TEST_WAIT_TIME));\n try {\n $this->assertEquals((TEXT_REPLACE), $this->getText(TEXT_PREVIEW_TEXT1));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n try {\n $this->assertEquals((TEXT_REPLACE), $this->getText(TEXT_PREVIEW_TEXT2));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n try {\n $this->assertEquals((TEXT_SEARCH), $this->getText(TEXT_PREVIEW_TEXT3));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n }", "public function testGetHtml()\n {\n $doc = $this->createDomDocument('<content type=\"html\">&lt;em> &amp;lt; &lt;/em></content>');\n $content = new Content($this->createFakeNode(), $doc->documentElement->firstChild);\n static::assertEquals('html', $content->getType());\n static::assertEquals('<em> &lt; </em>', (string) $content);\n }", "function clean_html($html)\r\n{\r\n\t$html = preg_replace('/<script\\b[^>]*>(.*?)<\\/script>/is', \"\", $html);\r\n\t$html = preg_replace('/<style\\b[^>]*>(.*?)<\\/style>/is', \"\", $html);\r\n\t$html = preg_replace('/<link \\b[^>]*>(.*?)/is', \"\", $html);\r\n\r\n\treturn $html;\r\n}", "function fcl_utilities_is_html($string) {\r\n return preg_match('/<\\s?[^\\>]*\\/?\\s?>/i', $string);\r\n}", "protected function setHtmlContent() {}", "function my_minify_html() {\n ob_start('sanitize_output');\n}" ]
[ "0.62027615", "0.6129189", "0.59967583", "0.59779257", "0.5965421", "0.5935244", "0.58699083", "0.5817804", "0.57666993", "0.5744802", "0.5727738", "0.57015467", "0.5685006", "0.56318134", "0.56234574", "0.5589641", "0.5577994", "0.5571743", "0.5554161", "0.5533817", "0.5527198", "0.5518757", "0.5518589", "0.5508213", "0.54947776", "0.5478984", "0.5418952", "0.5414061", "0.54034865", "0.539013", "0.5382819", "0.5364445", "0.53130305", "0.5307209", "0.53032947", "0.5298577", "0.5294288", "0.52790695", "0.52666473", "0.5265755", "0.5264994", "0.5260799", "0.52576286", "0.5234345", "0.5208522", "0.52066696", "0.5199689", "0.5184604", "0.5183577", "0.5181536", "0.5167348", "0.51639956", "0.51605844", "0.51531696", "0.5137564", "0.51302415", "0.51116276", "0.510777", "0.51073205", "0.51044697", "0.50974923", "0.50964034", "0.50904375", "0.5088444", "0.5087066", "0.5079403", "0.5078326", "0.5073432", "0.5072748", "0.5054804", "0.50501895", "0.5050019", "0.50401926", "0.5031335", "0.5024657", "0.50216335", "0.5017697", "0.5015142", "0.5014312", "0.50129265", "0.5004657", "0.5004519", "0.5003457", "0.5001916", "0.5000945", "0.49990615", "0.4998582", "0.4995863", "0.49913543", "0.4990262", "0.49873367", "0.49841762", "0.49828437", "0.49822804", "0.49793383", "0.49750513", "0.49685997", "0.4959911", "0.49539158", "0.49470538" ]
0.7383801
0
/ instance de connexion de la bdd / methodes constructeur
public function __construct($host,$db,$user,$pass){ $this->_host = $host; $this->_db = $db; $this->_user = $user; $this->_pass = $pass; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n $bd = new ConexionBD();\n $this->conexion = $bd->getConexion(); \n }", "function __construct() {\r\n $instancia = Database::getInstance();\r\n\r\n $this->con = $instancia->getConexion();\r\n }", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n \n $this->conn = $db;\n }", "public function __construct()\n\t{\n\t\t$this->_connexion = Db::getInstance();\n\t\t// var_dump($connexion);\n\t}", "public function __construct()\r\n\t\t{\r\n\t\t\t$this->Connec = DBConnexion::getInstance();\r\n\t\t}", "public function __construct() {\n $this->conexion = new ConexionBD(); //instanciamos la clase\n\n }", "public function __construct() {\n $this->conexion = new ConexionBD(); //instanciamos la clase\n\n }", "function __construct(){\n $cls_conexion = new cls_conexion();\n $this->conexion = $cls_conexion->conectar();\n }", "function __construct() {\r\n\t\t$this->connBanco = new Db();\r\n\t}", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct(){\n\t\t$database = new Database();\n\t\t$db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct()\n {\n $this->conn = new Conexion;\n }", "public function __construct() {\n try {\n $Connexion = new connexion();\n $this->obj = $Connexion->IDconnexion;\n } catch ( PDOException $e ) {\n echo \"<h1>probleme access BDD</h1>\";\n }\n }", "public function __construct(){\n $this->db = new Conexion_BD; \n }", "function __construct(){\n $this->_db = (new DataBaseServices())->connect();\n }", "function __construct() {\n $this->createConnection();\n }", "function __construct($connexion){\n $this->setConnexion($connexion);\n }", "public function __construct()\n {\n $this->conexion = Conexion::conectar();\n }", "function __construct() {\n $this->conx = Connexion::getconnexion();\n }", "public function __construct(){\n $this->db = new Conect();//criando o objeto Conect\n $this->db = $this->db->Conn();//executando metodo e pondo em uma variavel\n}", "public function __construct() {\n $db = new Connection();\n $this->conn = $db->connect();\n }", "public function __construct() {\n parent::__construct();\n\t\t// Instancia Conectar y conexión \n $this->conectar=new Conectar();\n $this->adapter=$this->conectar->conexion();\n }", "public function __construct(){\n $this->conectado = $this->conectar();\n }", "function __construct()\n {\n $this->createConnection();\n\n }", "public function __construct(){\r\n $this->conn = $this->getConnection();\r\n }", "public function __construct() {\r\n $this->conn = PersistentManager::getInstance()->get_connection();\r\n }", "public function __construct()\r\n {\r\n $this->conexao = new conexao;\r\n }", "function __construct() // constructor, solo crea una conexion usando la clase \"Conexion\"\n {\n $this->coneccion= new ConexionMYSQL();\n }", "public function __construct(){\n\t\t\t$this->cmd = new Conexion();\n\t\t}", "public function __construct(){\r\n\r\n // Create connection with data base\r\n $this->_db = DB::get_Instance();\r\n }", "public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "function __construct()\n {\n $con_obj = new ConnectionClass();\n $this->con = $con_obj->getConnection();\n }", "function __construct(){\n\n\t\t\t$this->setConnection();\n\n\t\t}", "public function __construct()\n {\n $this -> connection = $this ->connecdatabase();\n }", "public function __construct()\r\n\r\n\t{\r\n\t\t$this->db = new Connection();\r\n\t\t//chama o metodo conectar da classe Conection\r\n\t\t$this->db = $this->db->conectar();\r\n\t\t\r\n\t}", "public function __construct(){\n $database = new Database();\n $db = $database->dbConnection();\n $this->conn = $db;\n }", "function __construct()\n\t\t{\n\t\t\t$this->conn = $this->connect();\n\t\t}", "public function __construct(){\n //Conexão ao banco\n //Também poderia passar os dados como parâmetros no método construtor (bom para mais servidores, bancos ou usuários)\n $this -> connect = new PDO (\"mysql:host=localhost;dbname=dnphp7\", \"root\", \"\");\n }", "public function __construct(){\n //estamos guardando la conexion en la base de datos;\n $this->db=Database::connect();\n }", "private function __construct(){\n try {\n $this->dbh = Conexion::singleton_conexion();\n } catch (PDOException $e) {\n print \"Error!: \" . $e->getMessage();\n die();\n }\n }", "public function __construct(){\n // initalisation des configurations\n $this->conf = Config::getInstance();\n // initialisation de la base de données\n $this->db = DB::getInstance();\n }", "function __construct() {\n $connection= new Connection;\n $this->link = $connection->conect();\n }", "public function __construct(){\n //get the configuration for connection to database\n $data_base_opt = System\\Config::get_instance()->get_database_config();\n // receiving object for working with database\n $this->database = System\\Safe_SQL::get_instance($data_base_opt);\n }", "public function __construct(){\r\n\r\n $db = new DB;\r\n\r\n $this->db = $db->get_connection();\r\n\r\n }", "public function __construct() {\n\t\t$this->db = MySQLConnectivity::get_instance();\n\t\t$this->conn = $this->db->get_connection(); \n\t}", "public function __construct()\n { // langsung connect ke class databasenya.\n $this->db = new Database(); // instansiasi kelas database.\n }", "public function __construct(){\n // algo que fará toda vez que a classe é 'instanciada'\n $this->conn = new PDO(\"mysql:host=localhost;dbname=dbphp7\",\"root\",\"\"); // parametros de conexão\n }", "public function __construct()\n {\n $this->host = \"localhost\";\n $this->user = \"buttaubc_chantal\";\n $this->pass = \"Bfly357T\";\n $this->db = \"buttaubc_SIMPLONG\";\n\n ConnectI::connexion($this->host, $this->db, $this->user, $this->pass);\n\n }", "public function __construct()\n {\n // Connexion à la Base de Données\n $this->conn = new PDO(DATABASE, LOGIN, PASSWORD);\n \n }", "public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "function __construct() {\n $connector = new DbConnection();\n $conn = $connector->connect(); \n }", "public function __construct( )\n {\n $this->openConnection();\n }", "private function __construct()\n {\n $this->connect();\n }", "public function constructor(){\n\t\tparent::constructor();\n\t\t$this->conectarDB();\n\t}", "public function __construct()\n {\n $this->db = new Conexion();\n // $this->nombre = $nombre;\n\n }", "public function __construct() {\n $this->conecta();\n }", "private function __construct(){\n\t\t$this->connection = new Connection();\n\t\t$this->connection\n\t\t\t->setHost(Stack::getInstance()->get('db_host'))\n\t\t\t->setUser(Stack::getInstance()->get('db_user'))\n\t\t\t->setPassword(Stack::getInstance()->get('db_pass'))\n\t\t\t->setDatabase(Stack::getInstance()->get('db_table'))\n\t\t\t->connect();\n\t}", "function __construct() {\n $this->_connect();\n }", "public function __construct()\n {\n $PARAM_hote = 'localhost';\n\n // le port de connexion à la base de données\n $PARAM_port = '3306';\n // le nom de la base de données\n\n $PARAM_nom_bd = 'InstaDog';\n\n // Le nom d'utilisateur pour se connecter \n $PARAM_utilisateur = 'adminInstaDog';\n\n // le mot de passe de l'utilisateur pour se connecter\n $PARAM_mot_passe = 'Inst@D0g';\n \n // Attraper les exceptions \n try {\n $this->connexion = new PDO(\n 'mysql:host=' . $PARAM_hote . '; dbname=' . $PARAM_nom_bd,\n $PARAM_utilisateur,\n $PARAM_mot_passe\n );\n } catch (Exception $e) {\n echo 'Erreur: ' . $e->getMessage() . '<br/>';\n echo 'N° : ' . $e->getCode();\n }\n }", "function __construct(){\n\n\t\t $this->connect() ;\n\t}", "function __construct(){\n // se definen los datos del servidor de base de datos\n $conection['server']=\"localhost\"; //host\n $conection['user']=\"root\"; // usuario\n $conection['pass']=\"admin\"; //password\n $conection['base']=\"INNSADB\"; //base de datos\n\n // crea la conexion pasandole el servidor , usuario y clave\n $conect= mysql_connect($conection['server'],$conection['user'],$conection['pass']);\n mysql_set_charset('utf8',$conect);\n\n if ($conect) {// si la conexion fue exitosa , selecciona la base\n mysql_select_db($conection['base']);\n $this->con=$conect;\n }\n\n }", "public function __construct() {\n $this->connection = $this->create_connection();\n }", "public function __construct()\n {\n $this->db = ConnectionClass::conn();\n }", "function __construct() {\n parent::bdConnect();\n }", "public function __construct()\n {\n $dbInstance= Database::getInstance();\n $this->db= $dbInstance->getdbConnection();\n }", "public function __construct(){\n $this->connection = new Connection();\n\t}", "public function __construct()\n {\n $this->_dbInstance = Database::getInstance();\n $this->_dbHandle = $this->_dbInstance->getConnection();\n }", "public function __constructor() {\n //la variabile debug mi distingue i casi online o offline\n \n //return $this->getConnection();\n }", "public function __construct() \n \t\t{\n \t // Connection au serveur\n\t\t\t\ttry {\n\t\t\t\t\t// Options de connection encodage UFT8\n\t\t\t\t\t$options = array(\n\t\t\t\t\t\tPDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\",\n\t\t\t\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n\t\t\t\t\t\tPDO::ATTR_PERSISTENT => true \n\t\t\t\t\t);\n\t\t\t\t$this->db = new PDO( self::DSN, self::USER, self::PSW, $options );\n\t\t\t\t} catch ( Exception $e ) {\n\t\t\t\t\techo \"Connection à MySQL impossible : \", $e->getMessage();die();\n\t\t\t\t}\n\t\t\t}", "function __construct()\n {\n $this->connect();\n }", "function __construct() {\n $this->open_connection();\n }", "function __construct(){\n \t//Obtenemos los datos con la función datosConexion declarada mas abajo\n $listadatos = $this->datosConexion();\n //Recorremos el array recibido y guardamos los datos en los atributos de esta clase\n foreach ($listadatos as $key => $value) {\n $this->server = $value['server'];\n $this->user = $value['user'];\n $this->password = $value['password'];\n $this->database = $value['database'];\n $this->port = $value['port'];\n }\n //En el atributo conexión instanciaremos la clase mysqli que nos permitirá conectar con la base de datos. Si la base de datos es de tipo distinto a mysql, habría que cambiar la linea\n $this->conexion = new mysqli($this->server,$this->user,$this->password,$this->database,$this->port);\n //Si la conexión da error, sacaremos un mensaje y detendremos la ejecución\n if($this->conexion->connect_errno){\n echo \"algo va mal con la conexion\";\n die();\n }\n\n }", "public function __construct()\r\n\t{\r\n\t\tConexion::realizarConexion();\r\n\t}", "public function __construct()\n\t\t{\n\t\t\t$this->connection();\n\t\t}", "public function __construct()\n {\n if (!empty($_SESSION['id_uzytkownika']) && !empty($_SESSION['id_roli'])) {\n $this->_idUzytkownik = (int) $_SESSION['id_uzytkownika'];\n $this->_idRoli = (int) $_SESSION['id_roli'];\n\t\t\t$this->_Imie= $_SESSION['imie'];\n\t\t\t$this->_Nazwisko= $_SESSION['nazwisko'];\n }\n\n $this->_conn = new Conn();\n }", "public function __construct()\n\t{\n\t\t//llamar constructor del padre IMPORTANTE\n\t\tparent::__construct();\n\t\t\n\t\t//inicializamos la conexion con la base de datos\n\t\t$this->conexionDB = new mysqli(KimaldiServerNamespace\\Configuracion::$bdServer, KimaldiServerNamespace\\Configuracion::$bdUsuario, KimaldiServerNamespace\\Configuracion::$bdPass, KimaldiServerNamespace\\Configuracion::$baseDatos);\n\t\t\n\t}", "public function __construct(){\n $this->db = new DBConnector(\"localhost\", \"root\", \"\", \"cine\");\n }", "private function __construct()\n \n {\n $config = Config::getConfig(); // set singleton config object\n $host = $this->host = Config::getKeys('host');\n $user = $this->username = Config::getKeys('username');\n $password = $this->password = Config::getKeys('password');\n $database = $this->db = Config::getKeys('db');\n $this->newConnection($host, $user, $password, $database);\n // return $dbid; //dbid to the registrey\n \n }", "function __construct() {\n\t\t\t$conexion = new Conexion(APPBD, APP);\n\t\t\t$this->entidad = $conexion->doctrineORM();\n\t\t}", "private function __construct() {\n\t\tself::$conexao = new PDO(\"mysql:dbname=\" . BD . \";host=\" . HOST, USUARIO, SENHA, array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n\t\tself::$conexao->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\tself::$conexao->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\t}", "function __construct()\r\n\t{\r\n\t\t$this->conexion=new Conect();\r\n\t}", "function __construct(){\n\t\t$this->conn = mysqli_connect($this->host, $this->uname, $this->pass, $this->db);//buatlah koneksi secara OOP\n\t\t\n\t}", "public function __construct() {\n\t\t$this->conexao = new DaoConexao();\n\t\t$this->util = new Util();\n\t}", "public function __construct(){\r\n $this->conexion = new Conexion();\r\n}", "public function __construct() {\n $this->db = database::getInstance();\n }", "public function __construct() {\n $this->miConexion = Conexion::singleton();\n $this->retorno = new stdClass();\n }", "public function __construct() {\n\t\t// conexao com o banco de dados\n\t\t$link = mysqli_connect ( 'localhost', 'bdr_api', 'bdr_api', 'bdr_api' );\n\t\tmysqli_set_charset ( $link, 'utf8' );\n\t\t\n\t\t$this->adapter = $link;\n\t}", "function __construct()\n {\n $this->setParams();\n $this->connDB();\n }", "function __construct()\n\t\t{\n\t\t\t$this->connection = Connection::database();\n\t\t}", "public function __construct(){\n self::connect(self::$classname);\n }", "public function __construct() {\n $obj = new DB();\n $this->db = $obj->pdo;\n \n }", "public function __construct($db){\r\n $this->conn = $db;\r\n\r\n\r\n\r\n }", "function __construct() {\n $this->open_db_connection();\n }", "public function __construct() {\n\t\t$this->db = new PDO(\"mysql:host=127.0.0.1;dbname=portfolio\", 'root', 'cr@ne');\n\t\t// Conecta no banco de DADOS\n\t}", "public function __construct() {\n $this->db = new Database();\n $this->con = $this->db->connect();\n }", "function __construct()\n {\n $this->my = new mysqli(\"localhost\",\"root\",\"\",\"bd_biblioteca\");\n if ($this->my->connect_error)\n die(\"Problemas con la conexión a la base de datos\");\n }", "public function __construct($db){ \n $this->conn = $db;\n }", "public function __construct($db){\n $this->conn = $db;\n \n }", "function __construct(){\n\t\t$this->open_db_connection();\n\t}", "public function __construct(){\n\t\t$this->db = new Connection();\n\t\t$this->db = $this->db->dbConnect();\n\t}" ]
[ "0.82341534", "0.80661154", "0.79730904", "0.79703075", "0.79636186", "0.7919296", "0.7919296", "0.791478", "0.7908952", "0.7906574", "0.7906574", "0.7895413", "0.7864213", "0.78601277", "0.7824315", "0.7821972", "0.78068376", "0.7801099", "0.7753877", "0.77247876", "0.7723386", "0.7695178", "0.76939553", "0.7692821", "0.7686941", "0.768307", "0.7654366", "0.7643198", "0.76424867", "0.7641095", "0.763414", "0.7627257", "0.76214087", "0.76202154", "0.76178896", "0.7607268", "0.76045835", "0.76009995", "0.75959456", "0.758617", "0.7550819", "0.7547821", "0.75410336", "0.75365394", "0.75352067", "0.7533728", "0.75243217", "0.75195134", "0.7513618", "0.75134075", "0.7508463", "0.75013614", "0.7500233", "0.75002235", "0.74989086", "0.7489323", "0.74869126", "0.7483736", "0.74833715", "0.7478259", "0.7470908", "0.7466222", "0.7458195", "0.7453982", "0.74461883", "0.74383074", "0.74367", "0.74328053", "0.7424803", "0.7419359", "0.74108475", "0.74103475", "0.7408151", "0.7400178", "0.7394795", "0.7393359", "0.7386315", "0.7385851", "0.7383507", "0.73798984", "0.73771983", "0.737232", "0.7357285", "0.735722", "0.73571527", "0.73555374", "0.735182", "0.7348924", "0.7348189", "0.7340708", "0.73398286", "0.7335738", "0.73338294", "0.7333689", "0.7333103", "0.733219", "0.7326636", "0.73263806", "0.732123", "0.73183227", "0.7317158" ]
0.0
-1
se connecte a la bdd a partir des attributs
public function connect(){ try { $this->_dbh = new PDO('mysql:host='.$this->_host.';dbname='.$this->_db,$this->_user,$this->_pass); echo "connexion reussi"; } catch(PDOException $e) { echo "Connection failed: " . $e->getMessage(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function fijarAtributos(){\n \n return array(\"cod_categoria\",\"nombre\");\n \n }", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'fk_documento',\n 'fk_funcionario',\n 'accion',\n 'fecha',\n 'descripcion',\n 'titulo'\n ],\n 'date' => ['fecha']\n ];\n }", "public function attributes();", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'nombre',\n 'estado',\n 'pais_idpais'\n ],\n 'date' => []\n ];\n }", "abstract protected function attributes();", "function attractions(){\n // \n //Get the selected destination \n if(isset($_REQUEST['destination'])){\n $destination=$_REQUEST['destination'];\n }\n //\n //Die if no destination is provided\n else{\n throw new Exception(\"No destination found\");\n }\n //\n //\n //return the attractions using the destination primary key\n $sql= $this->chk(\n \"SELECT \n attraction.attraction,\n attraction.name,\n attraction.description,\n destination.destination\n FROM \n attraction \n Inner Join \n destination on attraction.destination=destination.destination\n WHERE \n `destination`.`destination` = $destination\"\n );\n //\n $attraction= $this->sqlData($sql);\n echo ($attraction);\n }", "public function initialize()\n {\n $this->setSchema(\"bd_diagnostico\");\n $this->setSource(\"categoria\");\n $this->hasMany('id_categoria', 'diag\\cc\\Pregunta', 'id_categoria', ['alias' => 'Pregunta']);\n $this->hasMany('id_categoria', 'diag\\cc\\Visita', 'id_categoria', ['alias' => 'Visita']);\n }", "function describir_campos($tabla_x,$bd_x=\"\"){\r\n\t\tif($bd_x!=\"\"){\r\n\t\t\t$bd = $bd_x.\".\";\r\n\t\t}#end if\r\n\t\t$query_x = \"SHOW FIELDS FROM \".$bd.$tabla_x;\r\n\t\t$result = mysqli_query($this->conexion,$query_x);\r\n\t\tif($result){\r\n\t\t\t$n_filas = mysqli_num_rows($result);\r\n\t\t\t$this->serial[$tabla_x] = \"\";\r\n\t\t\tfor ($i=0;$i<$n_filas;$i++){\r\n\t\t\t\t$row_x = mysqli_fetch_array($result);\r\n\t\t\t\tif($i==0){\r\n\t\t\t\t\t$this->campo_clave = $row_x[0];\r\n\t\t\t\t}#end if\r\n\t\t\t\t$this->nombre[$i] = $row_x[0];\r\n\t\t\t\t$this->tipo[$i] = $row_x[1];\r\n\t\t\t\tif($row_x[\"Key\"] == \"PRI\"){\r\n\t\t\t\t\t$this->campo_clave = $row_x[0];\r\n\t\t\t\t}#end if\r\n\t\t\t}#end next i\r\n\t\t}#end if result\r\n\t}", "function __construct(){\n // Mapping con la tabla de EJEDISTANCIA\n $mappingString = '{ \n \"dbConnectionClass\":\"AvalesConnection\",\n \"dbTable\" : \"AVALES\",\n \"attributes\" : {\n \"idAval\" : {\"fiedlName\" : \"ID_AVAL\", \"type\" : \"NUMERIC\", \"onInsert\" : \"NO_INSERT\", \"onUpdate\" : \"NO_UPDATE\"},\n \"nroAval\" : {\"fiedlName\" : \"NRO_AVAL\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"nroExpediente\" : {\"fiedlName\" : \"NRO_EXPEDIENTE\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"nroRegistro\" : {\"fiedlName\" : \"REGISTRO\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"idIngeniero\" : {\"fiedlName\" : \"ID_INGENIERO\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"idTitular\" : {\"fiedlName\" : \"ID_TITULAR\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"idVehiculo\" : {\"fiedlName\" : \"ID_VEHICULO\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"fechaAlta\" : {\"fiedlName\" : \"FECHA_ALTA\", \"type\" : \"DATE\", \"onInsert\" : \"NO_INSERT\", \"onUpdate\" : \"NO_UPDATE\"},\n \"pendiente\" : {\"fiedlName\" : \"PENDIENTE\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"esAlta\" : {\"fiedlName\" : \"ID_INGENIERO\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"tipoAlta\" : {\"fiedlName\" : \"TIPO_ALTA\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"codPlanta\" : {\"fiedlName\" : \"COD_PLANTA\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"fechaFinalizacion\" : {\"fiedlName\" : \"FECHA_FINALIZACION\", \"type\" : \"DATE\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"estadoActual\" : {\"fiedlName\" : \"ESTADO_ACTUAL\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"fotos\" : {\"fiedlName\" : \"FOTOS\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"porAntiguedad\" : {\"fiedlName\" : \"POR_ANTIGUEDAD\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"idUsuarioFinalizacion\" : {\"fiedlName\" : \"USUARIO_FINALIZACION\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"}\n }\n }';\n\n # Initial Values...\n \n parent::__construct(json_decode($mappingString));\n }", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "public function renderLinkAttributeFields() {}", "public function renderLinkAttributeFields() {}", "abstract function exportableAttributes();", "private function addAtrributesToCRUD() {\r\n if (!empty($this->__attributes)) {\r\n $this->myCRUD()->setAtributes($this->__attributes);\r\n }\r\n }", "public function __construct()\n\n {\n parent::__construct();\n\n $this->tablename=\"etat_compte\";\n $this->ide = 'null' ;\n $this->idfa = 0 ;\n $this->idmouv = 0 ;\n $this->depense = 0 ;\n $this->gains = 0 ;\n $this->stock = 0 ;\n $this->datee = date(\"\") ;\n }", "public function setAttributes();", "public function baseCjenovnik()\n\t{\n\t\t\n\t\t$p = array();\n\t\t$this->red = Cjenovnik::model()->findAll(\"id>0\");\n $this->red1 = TekstCjenovnik::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]));\n\t/*\t$this->period_od = $konj->period_od;\n\t\t$this->period_do = $row->period_do;\n\t\t$this->tip = $row->tip;\n\t\t$this->cjena_km = $row->cjena_km;\n\t\t$this->cjena_eur = $row->cjena_eur;*/\n\t}", "function attributions($short) {\n $urls = [\n 'IGN'=> 'http://www.ign.fr',\n 'Shom'=>'http://data.shom.fr',\n 'Cadastre'=>'http://cadastre.gouv.fr',\n 'CNES'=>'http://www.cnes.fr',\n 'GEOSUD'=>'http://www.http://ids.equipex-geosud.fr',\n// 'CIRAD,CNES,CNRS,IGN,IRD,Irstea,GEOSUD'=>'CIRAD,CNES,CNRS,IGN,IRD,Irstea,GEOSUD',\n// 'DGAC/SIA'=>'DGAC/SIA',\n ];\n $attrs = [];\n foreach (explode(',',$short) as $sigle)\n if (isset($urls[$sigle]))\n $attrs[] = \"<a href='\".$urls[$sigle].\"' target='_blank'>$sigle</a>\";\n else\n $attrs[] = $sigle;\n return '&copy; '.implode(',',$attrs);\n}", "public function examen(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idExamen=\"\";\t\t\r\n\t\t$this->tipoExamen=\"\";\t\r\n\t\t$this->descripcion=\"\";\r\n\t}", "function getAdditionalAttributes() ;", "function ManejoBD(){\n\t\t$this->BaseDatos = \"instituto\"; # aignar valor a la propiedad $BaseDatos\n\t\t$this->Servidor = \"localhost\"; # aignar valor a la propiedad $Servidor\n\t\t$this->Usuario = \"root\"; # aignar valor a la propiedad $Usuario\n\t\t$this->Clave = \"123456\"; # aignar valor a la propiedad $Clave\n\t}", "function pegaDadosEtiquetas()\n\t{\n\t\tif(!$this->layer){return \"erro\";}\n\t\t$itens = $this->layer->getmetadata(\"ITENS\");\n\t\t$itens = explode(\",\",$itens);\n\t\t$itensdesc = mb_convert_encoding($this->layer->getmetadata(\"ITENSDESC\"),\"UTF-8\",\"ISO-8859-1\");\n\t\t$itensdesc = explode(\",\",$itensdesc);\n\t\t$itenslink = $this->layer->getmetadata(\"ITENSLINK\");\n\t\t$itenslink = explode(\",\",$itenslink);\n\n\t\t$tips = $this->layer->getmetadata(\"TIP\");\n\n\t\t$res = array(\n\t\t\t\t\"itens\"=>$itens,\n\t\t\t\t\"itensdesc\"=>array_combine($itens,$itensdesc),\n\t\t\t\t\"itenslink\"=>array_combine($itens,$itenslink),\n\t\t\t\t\"tips\"=>explode(\",\",$tips),\n\t\t\t\t\"itembuscarapida\"=>$this->layer->getmetadata(\"itembuscarapida\")\n\t\t);\n\t\treturn($res);\n\t}", "public function attributes() // atribūtu savi nosaukumi\n {\n return[ \n 'fname' => 'Vārds',\n 'lname' => 'Uzvārds',\n 'email' => 'E-pasts',\n 'oldpassword' => 'Paroles lauks',\n 'password' => 'Jaunas paroles lauks',\n 'buttontitle' => 'Pogas virsraksts',\n 'buttonlink' => 'Pogas links',\n 'reciever' => 'Saņēmēju lauks',\n 'emailtitle' => 'Ziņas virsrsksts',\n 'emailtext' => 'Ziņas teksts',\n 'transport' => 'Pasākumu lauks'\n ];\n }", "public function obtenerViajesplusAbonados();", "public function __construct() {\r\n parent::__construct(\"tr_angka_kredit_tahunan\");\r\n $this->primary_key = \"id_akt\";\r\n $this->attribute_labels = array_merge_recursive($this->_continuously_attribute_label, $this->attribute_labels);\r\n $this->rules = array_merge_recursive($this->_continuously_rules, $this->rules);\r\n }", "public function passaAtributo(){\n\t\t$this->seletor = 0; // Por algum motivo que não quero investigar, a condicional for nñao está se comportando como eu esperava. Por isso estou usando while\n\t\t$this->alvo = file_get_contents($this->alvo);\n\t\t\twhile ($this->seletor < $this->atributos) { \n\n\t\t\t\t\t\t\t\t$dom = new DOMDocument();\n\t\t\t\t\t\t\t\t$dom->loadHTMLFile($this->modelo);\n\t\t\t\t\t\t\t\t$controle = 0; // Variável de controle\n\t\t\t\t\t\t\t\t// Consultando os links\n\t\t\t\t\t\t\t\t$links = $dom->getElementsByTagName($this->valores[$this->seletor]); // Seleione a tag de pesquisa atual\n\t\t\t\t\t\t\t\tforeach ($links as $link) {\n\t\t\t\t\t\t\t\t\t\t\t\tif ($controle == 0) { // Pega primeiro valor da class e assume como padrão (uma por tag)\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->tag = $this->valores[$this->seletor];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->class = $link->getAttribute('class'); // Retorna tag do HTML com a nova class\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->alvo = str_replace(\"<$this->tag\", \"<$this->tag class='$this->class' \", $this->alvo);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$controle++;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t/*echo \"<p>Executando...\".$this->valores[$this->seletor].\"\"; */\n\t\t\t\t$this->seletor++;\n\t\t\t}\n\t\t\techo \"<p>\".$this->alvo;\n\n\n\t}", "public function listattr_cat()\n {\n $this->db->where('descripcion_atributo', 'Catalogo');\n $resultados = $this->db->get('atributos_b');\n\n return $resultados->result();\n }", "public function attributes()\n\t{\n\t\t/*Author -ptr.nov- add related fields to searchable attributes */\n\t\treturn array_merge(parent::attributes(), ['nmkategori','tipebrg','corp.CORP_NM']);\n\t}", "function listExport($table, $attr)\n {\n if (in_array('categoria', $attr)) {\n $join_data = $this->f->leftJoin($table, \"categorias\", \"cod\", \"categoria\", \"titulo\");\n // Genero el atributo \"categorias.titulo\" con uan bandera de \"%\" que me servira mas abajo y lo cambio por el atrr categoria que me devolveria el cod.\n $replace = [array_search('categoria', $attr) => \"%\" . $join_data['show']];\n $attr = array_replace($attr, $replace);\n // guardo en un array el LEFT JOIN\n $join[] = $join_data['join'];\n }\n if (in_array('subcategoria', $attr)) {\n $join_data = $this->f->leftJoin($table, \"subcategorias\", \"cod\", \"subcategoria\", \"titulo\");\n $replace = [array_search('subcategoria', $attr) => \"%\" . $join_data['show']];\n $attr = array_replace($attr, $replace);\n $join[] = $join_data['join'];\n }\n\n // Genero en 1 string cada atributo que me va a traer con su respectiva tabla. Para no generar conflicto ambiguo en la base de datos\n\n $attr = implode(\" , \" . $table . \".\", $attr);\n if (!empty($join)) {\n $join = implode(\" \", $join);\n // Elimino la tabla principal con la bandera que puse antes de categoria y subcategoria, sino quedaria ej: \"productos.categorias.titulo\".\n $attr = str_replace(\"$table.%\", \"\", $attr);\n } else {\n $join = '';\n }\n\n $sql = \"SELECT $table.$attr FROM $table $join\";\n\n $var = $this->con->sqlReturn($sql);\n if ($var) {\n while ($row = mysqli_fetch_assoc($var)) {\n $array[] = [\"data\" => $row];\n }\n }\n return $array;\n }", "private function connect()\r\n {\r\n\r\n /**\r\n * A TENTATIVA DE CRIAR UM OBJETO COM A CONEXAO DO BANCO É FEITA\r\n */\r\n try {\r\n /**\r\n * SALVA NA VARIAVEL ESTATICA O OBJETO REFERENTE A CONEXÃO COM O BANCO.\r\n * AS VARIAVEIS QUE SAO USADAS PARA CONEXAO SÃO DA CLASSE PAI\r\n */\r\n self::$con = new PDO('mysql:host=' . $this->getHost() . ';dbname=' . $this->getDatabase() . '', $this->getUser(), $this->getPassword(), array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\"));\r\n /**\r\n * DEFINE O TIPO DE MANIPULAÇÃO DE ERRO SERÁ USADO PELO PDO\r\n */\r\n self::$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n /**\r\n * CAPTURA O ERRO, SE GERADO\r\n */\r\n } catch (\\PDOException $error) {\r\n /**\r\n * O ERRO É IMPRESSO NA TELA\r\n */\r\n echo $error->getMessage();\r\n }\r\n }", "public function stampaDipendenti() {\n echo '<p> Nome: ' . $this->nome . '</p>';\n echo '<p> Cognome: ' . $this->cognome . '</p>';\n echo '<p> Software utilizzati: ' . $this->software . '</p>';\n }", "public static function readDemandesOrga(){\n if(ModelBenevole::isOrga($_SESSION['login'], $_GET['IDFestival'])){\n $tab_b = ModelBenevole::readAllDemandesOrga($_GET['IDFestival']); //appel au modèle pour gerer la BD\n $controller = 'benevole';\n $view = 'demandesorga';\n $pagetitle = 'Liste des demandes organisateur';\n require_once (File::build_path(array('view','view.php'))); //\"redirige\" vers la vue\n }else{\n $controller = 'benevole';\n $view = 'error';\n $pagetitle = 'Vous n\\'avez pas les droits ';\n }\n }", "function camposBD(){\n//\t\tSELECT idFactura, nombreTienda AS tienda, fecha, numfactura AS Factura FROM tblfacturas \n//\t\tINNER JOIN tbltiendas ON tbltiendas.idtblTienda = tblfacturas.idtblTienda\n\t\t$fields = array();\n\t\t$fields[] = 'idFactura';\t\n\t\t$fields[] = 'fecha';\t\n\t\t$fields[] = 'tienda';\t\n\t\t$fields[] = 'numFactura';\t\n\t\t/*$fields[] = 'opcion';\t*/\n\t\t/*$fields[] = 'comentario';*/\t\n\t\treturn $fields;\n\t}", "public function attributes(){\n return [\n 'ofi_fk_parroquia' =>'Código de parroquia',\n 'ofi_tipo' =>'Tipo de oficina (local, almacen)',\n 'ofi_direccion' =>'Dirección de la empresa'\n\n ];\n }", "function geraClassesBDBase(){\n # Abre o template da classe BD e armazena conteudo do modelo\n $modelo = Util::getConteudoTemplate('class.ModeloBDBase.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $copiaModelo = $modelo;\n $nomeClasse\t = $this->getCamelMode(ucfirst((string)$aTabela['NOME']));\n $objetoClasse = \"\\$o$nomeClasse\";\n # varre a estrutura dos campos da tabela em questao\n $aCampoInsert = $aValorInsert = $aCampoUpdate = $aChaveWhere = $aCampoConsulta = $aFKCampo = array();\n $aChaveAltera = $aChave = $aChaveWhereSel = $aChaveWhereDel = $aFKJoin = $aVerificaPK = array();\n \n $i = 2;\n\n foreach($aTabela as $oCampo){\n $nomeCampo = (string)$oCampo->NOME;\n\n # recupera valores a serem substituidos no modelo\n $aCampoInsert[] = $nomeCampo;\n if((int)$oCampo->CHAVE == 1){\n $aChaveWhere[] = \"$nomeCampo = {\\$reg['$nomeCampo']}\";\n $aChaveWhereSel[] = (string)$aTabela['NOME'].\".$nomeCampo = \\$$nomeCampo\";\n $aChaveWhereDel[] = \"$nomeCampo = \\$$nomeCampo\";\n $aChave[] = \"\\$$nomeCampo\";\n $aVerificaPK[] = $nomeCampo;\n $aChaveAltera[] = \"\\$cv == \\\"$nomeCampo\\\"\";\n if((string)$oCampo->FKTABELA != ''){\n $aCampoUpdate[] = \"$nomeCampo = \\\".\\$reg['$nomeCampo'].\\\"\";\n }\n }\n else{\n $aCampoUpdate[] = ((string)$oCampo->FKTABELA != '') ? \n \"$nomeCampo = \\\".\\$reg['$nomeCampo'].\\\"\" : \n \"$nomeCampo = '\\\".\\$reg['$nomeCampo'].\\\"'\";\t\t\t\t\n }\n\n if((string)$oCampo->FKTABELA != ''){\n $aValorInsert[] = (preg_match(\"#[dD]ata.*[Cc]adastro#is\", $nomeCampo)) ? \"\\\".\\$oConexao->data_cadastro_padrao.\\\"\" : \"\\\".\\$reg['$nomeCampo'].\\\"\";\n $tabelaFK = ((string)$aTabela['SCHEMA'] != \"\") ? (string)$aTabela['SCHEMA'].\".\".(string)$oCampo->FKTABELA : (string)$oCampo->FKTABELA;\n $aFKJoin[] = \"$tabelaFK \\n\\t\\t\\t\\t\\ton (\".(string)$aTabela['NOME'].\".$nomeCampo = \".(string)$oCampo->FKTABELA.\".\".(string)$oCampo->FKCAMPO.\")\";\n \n $i++;\n }\n else{\n $aValorInsert[] = ((int)$oCampo->CHAVE == 1) ? \n \"\\\".\\$reg['$nomeCampo'].\\\"\" : \n \"'\\\".\\$reg['$nomeCampo'].\\\"'\";\n }\n\n // =========== Montagem dos Campos da Consulta =============\n if((int)$oCampo->CHAVE != 1){\n $aCampoConsulta[] = (string)$aTabela['NOME'].\".$nomeCampo like '\\$valor'\";\n }\t\n }\n # =========== Monta demais valores a serem substituidos ========\n $aCampoInsert = join($aCampoInsert, \",\\n\\t\\t\\t\\t\\t\");\n $aValorInsert = join($aValorInsert, \",\\n\\t\\t\\t\\t\\t\");\n $aCampoUpdate = join($aCampoUpdate, \",\\n\\t\\t\\t\\t\\t\");\n $aChaveWhere = join($aChaveWhere, \" \\n\\t\\t\\t\\t\\tand \");\n $aChaveWhereSel = join($aChaveWhereSel, \" \\n\\t\\t\\t\\t\\tand \");\n $aChaveWhereDel = join($aChaveWhereDel, \" \\n\\t\\t\\t\\t\\tand \");\n $sCampoConsulta = join($aCampoConsulta, \" \\n\\t\\t\\t\\t\\tor \");\n $aChave = join($aChave,\t \",\");\n $aColuna = $this->getCamposSelect((string)$aTabela['NOME']);\n $aColuna = join($aColuna, \",\\n\\t\\t\\t\\t\\t\");\n\n $tabelaJoin = (((string)$aTabela['SCHEMA'] != \"\") ? (string)$aTabela['SCHEMA'].\".\".(string)$aTabela['NOME'] : (string)$aTabela['NOME']);\n\n $sVerificaPK = NULL;\n foreach($aVerificaPK as $v){\n $sVerificaPK .= \"\\t\\t\\$reg['$v'] = (\\$reg['$v'] != '') ? \\$reg['$v'] : \\\"null\\\";\\n\";\n }\n\n if(count($aFKJoin) > 0){\n $tabelaJoin .= \" \\n\\t\\t\\t\\tleft join \".join($aFKJoin,\"\\n\\t\\t\\t\\tleft join \");\n }\n \n $nomeTabela = (((string)$aTabela['SCHEMA'] != \"\") ? (string)$aTabela['SCHEMA'].\".\".(string)$aTabela['NOME'] : (string)$aTabela['NOME']);\n $chavesWhereConsulta = (($sCampoConsulta!='') ? $sCampoConsulta : '1=1');\n $sChaveAltera = (count($aChaveAltera)>0) ? \"if(\".implode(\" || \", $aChaveAltera).\") continue;\" : \"\";\n \n # ======== Substitui todas os parametros pelas variaveis ja processadas ==========\n $copiaModelo = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo);\n $copiaModelo = str_replace('%%VERIFICA_PK%%', $sVerificaPK, $copiaModelo);\n $copiaModelo = str_replace('%%OBJETO_CLASSE%%', $objetoClasse, $copiaModelo);\n $copiaModelo = str_replace('%%TABELA%%', $nomeTabela, $copiaModelo);\n $copiaModelo = str_replace('%%CAMPOS_INS%%', $aCampoInsert, $copiaModelo);\n $copiaModelo = str_replace('%%VAL_CAMPOS_INS%%', $aValorInsert, $copiaModelo);\n $copiaModelo = str_replace('%%CAMPOS_UPD%%', $aCampoUpdate, $copiaModelo);\n $copiaModelo = str_replace('%%CHAVES_WHERE%%', $aChaveWhere, $copiaModelo);\n $copiaModelo = str_replace('%%LISTA_CHAVES%%', $aChave, $copiaModelo);\n $copiaModelo = str_replace('%%CHAVES_WHERE_SEL%%', $aChaveWhereSel, $copiaModelo);\n $copiaModelo = str_replace('%%CHAVES_WHERE_DEL%%', $aChaveWhereDel, $copiaModelo);\n $copiaModelo = str_replace('%%TABELA_JOIN%%', $tabelaJoin, $copiaModelo);\n $copiaModelo = str_replace('%%CHAVES_WHERE_CONS%%', $chavesWhereConsulta, $copiaModelo);\n $copiaModelo = str_replace('%%COLUNAS%%', $aColuna, $copiaModelo); //Por Enquanto\n $copiaModelo = str_replace('%%CAMPOS_CHAVE_ALTERAR%%', $sChaveAltera, $copiaModelo);\n \n\n unset($sCampoConsulta);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes/core/bdbase\";\n if(!file_exists($dir)) \n mkdir($dir);\n $fp = fopen(\"$dir/class.$nomeClasse\".\"BDBase.php\",\"w\");\n fputs($fp,$copiaModelo); \n fclose($fp);\n }\n return true;\n }", "public function __Construct(){\n\t\t\t\t$this->conexao = mysqli_connect(\"127.0.0.1\",\"root\",\"\" ,\"seumadrugagames\")\n\t\t\t\tor die (\"Erro 404\");\n\t\t\t\t$this->tabela = \"vendas\";\n\t\t\t}", "public function Dame()\n {\n $sql = 'CALL tsp_dame_vaca( :id )';\n \n $query = Yii::$app->db->createCommand($sql);\n \n $query->bindValues([\n ':id' => $this->IdVaca\n ]);\n \n $this->attributes = $query->queryOne();\n }", "protected function initData() {\n $name = $this->_dbLink->query(self::GET_ATTRIBUTE_ID);\n $this->attribute_id = $name->fetch_object()->attribute_id;\n\n //Starting root paths, usually only one, but some sites have several pathes, if they change per website (ie. runnering)\n $root_cats = $this->_dbLink->query(self::GET_ROOT_CATEGORIES);\n while($cat = $root_cats->fetch_object()) {\n $this->root_cats[] = $cat->path;\n }\n }", "function getDatosDesc_breve()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'desc_breve'));\n $oDatosCampo->setEtiqueta(_(\"desc_breve\"));\n return $oDatosCampo;\n }", "public function getAtributos() {\r\n\t\t\t\r\n\t\t\t$atributos = array();\r\n\t\t\t$atributos[0] = \"nombreUnidad\";\r\n\t\t\t$atributos[1] = \"telefono\";\r\n\t\t\treturn $atributos;\r\n\t\t}", "private function __construct() {\n\t\tself::$conexao = new PDO(\"mysql:dbname=\" . BD . \";host=\" . HOST, USUARIO, SENHA, array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n\t\tself::$conexao->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\tself::$conexao->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\t}", "function usuarios_estados_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_estados\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Estado\",2);\n$this->agregarVariable2($v);\n\n\t}", "public function run()\n {\n $attribute_color = Attribute::create(['name' => 'Color']);\n\n AttributeDetail::create([\n 'name' => 'Rojo',\n 'hexa' => '#E84C3D',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Gris',\n 'hexa' => '#AAB2BD',\n 'attribute_id' => $attribute_color->id\n ]);\n \n AttributeDetail::create([\n 'name' => 'Gris pardo',\n 'hexa' => '#CFC4A6',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Beige',\n 'hexa' => '#F5F5DC',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Blanco',\n 'hexa' => '#FFFFFF',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Negro',\n 'hexa' => '#000000',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Camel',\n 'hexa' => '#C19A6B',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Naranja',\n 'hexa' => '#F39C11',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Azul',\n 'hexa' => '#5897fb',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Verde',\n 'hexa' => '#A0D468',\n 'attribute_id' => $attribute_color->id\n ]);\n\n\n AttributeDetail::create([\n 'name' => 'Amarillo',\n 'hexa' => '#F1C40F',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Marrón',\n 'hexa' => '#964B00',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Rosa',\n 'hexa' => '#FCCACD',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Fucsia',\n 'hexa' => '#FF11C2',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Morado',\n 'hexa' => '#74003D',\n 'attribute_id' => $attribute_color->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'Purpura',\n 'hexa' => '#340087',\n 'attribute_id' => $attribute_color->id\n ]);\n \n\n \n $attribute_size = Attribute::create(['name' => 'Talla']);\n \n AttributeDetail::create([\n 'name' => 'XS',\n 'attribute_id' => $attribute_size->id\n ]);\n AttributeDetail::create([\n 'name' => 'S',\n 'attribute_id' => $attribute_size->id\n ]);\n AttributeDetail::create([\n 'name' => 'M',\n 'attribute_id' => $attribute_size->id\n ]);\n AttributeDetail::create([\n 'name' => 'L',\n 'attribute_id' => $attribute_size->id\n ]);\n AttributeDetail::create([\n 'name' => 'XL',\n 'attribute_id' => $attribute_size->id\n ]);\n \n AttributeDetail::create([\n 'name' => 'XXL',\n 'attribute_id' => $attribute_size->id\n ]);\n\n AttributeDetail::create([\n 'name' => 'TU',\n 'attribute_id' => $attribute_size->id\n ]);\n\n AttributeDetail::create([\n 'name' => '4',\n 'attribute_id' => $attribute_size->id\n ]);\n\n AttributeDetail::create([\n 'name' => '6',\n 'attribute_id' => $attribute_size->id\n ]);\n\n AttributeDetail::create([\n 'name' => '8',\n 'attribute_id' => $attribute_size->id\n ]);\n AttributeDetail::create([\n 'name' => '12',\n 'attribute_id' => $attribute_size->id\n ]);\n AttributeDetail::create([\n 'name' => '14',\n 'attribute_id' => $attribute_size->id\n ]);\n AttributeDetail::create([\n 'name' => '16',\n 'attribute_id' => $attribute_size->id\n ]);\n\n }", "function getDatosNombre_dl()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'nombre_dl'));\n $oDatosCampo->setEtiqueta(_(\"nombre de la delegación\"));\n $oDatosCampo->setTipo('texto');\n $oDatosCampo->setArgument(30);\n return $oDatosCampo;\n }", "function select($id)\r\n{\r\n\r\n$sql = \"SELECT * FROM attribut WHERE attribut_pk_id = $id;\";\r\n$result = $this->database->query($sql);\r\n$result = $this->database->result;\r\n$row = mysql_fetch_object($result);\r\n\r\n\r\n$this->id_attribut = $row->id_attribut;\r\n\r\n$this->nom = $row->nom;\r\n\r\n}", "function allinea_db(){\n\t\tif ($this->attributes['BYTB']!='' ) $this->fields_value_bytb($this->attributes['BYTB']);\n\t\tif ($this->attributes['TB']!='no'){\n\t\t\t$i=0;\n\t\t\tforeach ($this->values as $key => $val){\n\t\t\t\t$ret[$i]=\"{$key} NUMBER\";\n\t\t\t\t$i++;\n\t\t\t\t$ret[$i]=\"D_{$key} VARCHAR2(200 CHAR)\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $ret;\n\t\t}\n\t\telse return ;\n\t}", "abstract protected function getModelAttributes();", "function GetAttributes();", "abstract public function getDBDesc();", "public function get_attributes()\n {\n }", "public function get_attributes()\n {\n }", "function panier2bdd() {\n\t// if (!empty($_SESSION['dims']['userid']) && !empty($_SESSION['catalogue']['panier'])) {\n\tif (!empty($_SESSION['dims']['userid'])) {\n\t\tinclude_once DIMS_APP_PATH.'/modules/catalogue/include/class_panier.php';\n\t\t$panier = new cata_panier();\n\t\t$panier->open($_SESSION['dims']['userid']);\n\t\t$panier->articles = array();\n\n\t\t$panier->fields['libelle'] = '';\n\t\t$panier->fields['id_user'] = $_SESSION['dims']['userid'];\n\t\t$panier->fields['id_module'] = $_SESSION['dims']['moduleid'];\n\n\t\tif (isset($_SESSION['catalogue']['panier'])) {\n\t\t\tforeach ($_SESSION['catalogue']['panier']['articles'] as $ref => $values) {\n\t\t\t\t$panier->articles[] = array(\n\t\t\t\t\t'ref' \t\t\t=> $ref,\n\t\t\t\t\t'qte' \t\t\t=> $values['qte'],\n\t\t\t\t\t'forced_price' \t=> (isset($values['forced_price']) ? $values['forced_price'] : 'NULL')\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$panier->save();\n\t}\n}", "function mostrar_link_publico($id){\n $sql=\"SELECT * FROM link WHERE id_cat='$id'\";\n $consulta=mysql_query($sql);\n $resultado = mysql_fetch_array($consulta);\n $this->id=$id;\n $this->nombre=$resultado['nombre_cat'];\n $this->etiqueta=$resultado['etiqueta_cat'];\n $this->descripcion=$resultado['descripcion_cat'];\n $this->claves=$resultado['claves_cat'];\n $this->tipo=$resultado['tipo_cat'];\n $this->prioridad=$resultado['prioridad_cat'];\n }", "public function copyAttributesToKey()\n\t{\n\t\t$primarykey = $this->factory->getPrimarykey ;\n\t\tforeach( $primarykey->fields as $n=>$field )\n\t\t{\n\t\t\t$this->key[$field] = $this->$field ;\n\t\t}\n\t}", "protected function getBParamDataAttributes() {}", "function select($id)\r\n{\r\n\r\n$sql = \"SELECT * FROM aattribut WHERE aatribut_pk_id = $id;\";\r\n$result = $this->database->query($sql);\r\n$result = $this->database->result;\r\n$row = mysql_fetch_object($result);\r\n\r\n\r\n$this->id_attribut = $row->id_attribut;\r\n\r\n$this->id_produit = $row->id_produit;\r\n\r\n$this->valeur = $row->valeur;\r\n\r\n}", "public function attributes(){\n return [\n 'mod_modelo' =>'Nombre del modelo',\n 'mod_fk_marca' => 'Código de la marca'\n ];\n }", "public function setForAuteur()\n {\n //met à jour les proposition qui n'ont pas de base contrat et qui ne sont pas null\n /*PLUS BESOIN DE BASE CONTRAT\n \t\t$dbP = new Model_DbTable_Iste_proposition();\n \t\t$dbP->update(array(\"base_contrat\"=>null), \"base_contrat=''\");\n */\n\t \t//récupère les vente qui n'ont pas de royalty\n\t \t$sql = \"SELECT \n ac.id_auteurxcontrat, ac.id_livre\n , ac.id_isbn, ac.pc_papier, ac.pc_ebook\n , a.prenom, a.nom, c.type, IFNULL(a.taxe_uk,'oui') taxe_uk\n ,i.num\n , v.id_vente, v.date_vente, v.montant_livre, v.id_boutique, v.type typeVente\n , i.id_editeur, i.type typeISBN\n , impF.conversion_livre_euro\n FROM iste_vente v\n INNER JOIN iste_isbn i ON v.id_isbn = i.id_isbn \n INNER JOIN iste_importdata impD ON impD.id_importdata = v.id_importdata\n INNER JOIN iste_importfic impF ON impF.id_importfic = impD.id_importfic\n INNER JOIN iste_auteurxcontrat ac ON ac.id_isbn = v.id_isbn\n INNER JOIN iste_contrat c ON c.id_contrat = ac.id_contrat\n INNER JOIN iste_auteur a ON a.id_auteur = ac.id_auteur\n INNER JOIN iste_livre l ON l.id_livre = i.id_livre \n LEFT JOIN iste_royalty r ON r.id_vente = v.id_vente AND r.id_auteurxcontrat = ac.id_auteurxcontrat\n WHERE pc_papier is not null AND pc_ebook is not null AND pc_papier != 0 AND pc_ebook != 0\n AND r.id_royalty is null \";\n\n $stmt = $this->_db->query($sql);\n \n \t\t$rs = $stmt->fetchAll(); \n \t\t$arrResult = array();\n \t\tforeach ($rs as $r) {\n\t\t\t//calcule les royalties\n \t\t\t//$mtE = floatval($r[\"montant_euro\"]) / intval($r[\"nbA\"]);\n \t\t\t//$mtE *= floatval($r[\"pc_papier\"])/100;\n \t\t\tif($r[\"typeVente\"]==\"ebook\")$pc = $r[\"pc_ebook\"];\n \t\t\telse $pc = $r[\"pc_papier\"];\n $mtL = floatval($r[\"montant_livre\"])*floatval($pc)/100;\n //ATTENTION le taux de conversion est passé en paramètre à l'import et le montant des ventes est calculé à ce moment\n \t\t\t//$mtD = $mtL*floatval($r[\"taux_livre_dollar\"]);\n \t\t\t$mtE = $mtL*floatval($r['conversion_livre_euro']);\n //ajoute les royalties pour l'auteur et la vente\n //ATTENTION les taxes de déduction sont calculer lors de l'édition avec le taux de l'année en cours\n $dt = array(\"pourcentage\"=>$pc,\"id_vente\"=>$r[\"id_vente\"]\n ,\"id_auteurxcontrat\"=>$r[\"id_auteurxcontrat\"],\"montant_euro\"=>$mtE,\"montant_livre\"=>$mtL\n ,\"conversion_livre_euro\"=>$r['conversion_livre_euro']);\n\t \t\t$arrResult[]= $this->ajouter($dt\n ,true,true);\n //print_r($dt);\n \t\t}\n \t\t\n \t\treturn $arrResult;\n }", "public function __construct()\n\n {\n parent::__construct();\n\n $this->tablename=\"produit\";\n $this->idp = 'null' ;\n $this->idc = 0 ;\n $this->id_cat = 0 ;\n $this->desi = \"\" ;\n $this->photo = \"\" ;\n $this->prixa = 0 ;\n $this->prixv = 0 ;\n $this->qnt = 0 ;\n $this->composer = 0 ;\n $this->ftech = \"\" ;\n $this->flag = 0 ;\n }", "public function obtenerViajesplus();", "private function getCrendentials()\n {\n $db = parse_ini_file('db.ini');\n $this->username = $db['user'];\n $this->password = $db['password'];\n $this->host = $db['host'];\n $this->dbname = $db['dbname'];\n }", "public function __construct() {\n self::getBdd();\n }", "public function verDados(){\n\t\t\techo $this->nome.\"<br>\";\n\t\t\techo $this->idade.\"<br>\";\n\t\t\techo $this->senha.\"<br>\";\n\t\t}", "function __construct() {\n parent::bdConnect();\n }", "public function initialize()\n {\n $this->setSchema(\"kp_si_disat\");\n $this->setSource(\"data_diksar\");\n $this->belongsTo('id_sertifikat', '\\Sertifikat', 'id_sertifikat', ['alias' => 'Sertifikat']);\n $this->belongsTo('id_kesehatan', '\\Kesehatan', 'id_kesehatan', ['alias' => 'Kesehatan']);\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_dl('');\n $this->setDl('');\n $this->setRegion('');\n $this->setNombre_dl('');\n $this->setGrupo_estudios('');\n $this->setRegion_stgr('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }", "function mostrar_link_publico($id){\n\t\t\t$sql=\"SELECT * FROM link WHERE id_cat='$id'\";\n\t\t\t$consulta=mysql_query($sql);\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->nombre=$resultado['nombre_cat'];\n\t\t\t$this->etiqueta=$resultado['etiqueta_cat'];\n\t\t\t$this->descripcion=$resultado['descripcion_cat'];\n\t\t\t$this->claves=$resultado['claves_cat'];\n\t\t\t$this->tipo=$resultado['tipo_cat'];\n\t\t\t$this->prioridad=$resultado['prioridad_cat'];\n\t}", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setNivel_stgr('');\n $this->setDesc_nivel('');\n $this->setDesc_breve('');\n $this->setOrden('');\n $this->setPrimary_key($aPK);\n }", "function init()\n {\n $this->defineAttribute('data', true, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('stru', false, '', COMPONENT_TYPE_STRING);\n parent::init();\n }", "function __construct(){\n\n\t\tparent::__construct(); //Llamada al constructor de la clase padre\n\n\t\t$this->id = \"\";\n\t\t$this->actividad = \"\";\n\t\t$this->nota = \"\";\n\t\t$this->alumno = \"\";\n\t\t$this->materia = \"\";\n\n\t}", "public function createAttributes()\n {\n /** @var \\Shopware\\Components\\Model\\ModelManager $em */\n $em = $this->get('models');\n\n $em->addAttribute(\n 's_categories_attributes',\n 'swag',\n 'link',\n 'int(11)',\n true,\n null\n );\n $em->addAttribute(\n 's_categories_attributes',\n 'swag',\n 'show_by_default',\n 'int(1)',\n true,\n 0\n );\n $em->addAttribute(\n 's_categories_attributes',\n 'swag',\n 'deleted_position',\n 'int(11)',\n true,\n null\n );\n\n $em->addAttribute(\n 's_categories_attributes',\n 'swag',\n 'base_sort',\n 'int(11)',\n true,\n null\n );\n\n $em->generateAttributeModels(['s_categories_attributes']);\n }", "public function __construct()\n {\n $this->setCode('desconto');\n }", "public function attributes()\n {\n return [\n 'cost.office_id' => 'sucursal',\n ];\n }", "public function attributes()\n {\n // add related fields to searchable attributes\n return array_merge(parent::attributes(), ['idPeserta.nama_lengkap']);\n }", "public function getContrasenia():string{return $this->contrasenia;}", "public function bddAction()\n {\n $u = new UserTable();\n //$u->displayClass($u);\n $user = $u->findOne(\"login = ?\", ['coquel_d']);\n }", "public function getAtributos($atributo){\n\t\t$sql = \"describe {$this->entidade->getTable()}\";\n\t\t$stmt = $this->db->getDb()->query($sql);\n\t\t\n\t\t$resultado = $stmt->fetchAll(\\PDO::FETCH_COLUMN);\n\t\treturn $resultado[$atributo];\n\t}", "function __construct() {\n\n $conection['server']=\"localhost\"; //host\n $conection['user']=\"dario\"; // usuario\n $conection['pass']=\"dario\"; //password\n $conection['base']=\"INNSADB\"; //base de datos\n\n $conect = oci_connect($conection['user'], $conection['pass'], $conection['server'],'AL32UTF8');\n //el parametro 'AL32UTF8' soluciona todo el tema de los acentos\n if (!$conect) {\n $m = oci_error();\n echo $m['message'], \"\\n\";\n exit;\n } else {\n //echo \"Conexión con éxito a Oracle!\";\n $this->con=$conect;\n }\n\n }", "function getDatosDl()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'dl'));\n $oDatosCampo->setEtiqueta(_(\"sigla\"));\n $oDatosCampo->setTipo('texto');\n return $oDatosCampo;\n }", "public function __construct($nombre,$edad,$sueldo){\n parent::__construct($nombre,$edad);\n $this->sueldo=$sueldo;\n }", "function getAttributes()\n {\n }", "public function attributes() : array;", "public function __construct($nom,$prenom,$adresse,$ville,$cp,$tel,$anniv,$login,$mdp,$rib,$email,$telB,$idB,$idA)\n {\n parent::__construct($nom,$prenom,$adresse,$ville,$cp,$tel,$anniv,$login,$mdp,$rib,$email,$telB);\n $this->id_banque = $idB;\n $this->num_appart = $idA;\n }", "public static function accueilDatas(){\n return ['title'=>'Notre page d\\'accueil',\n 'h1'=>'Bienvenue',\n 'h2'=>'sur notre site',\n 'content' => [\"premier paragraphe\",\"Deuxieme paragraphe\",\"Paragraphe final\"]\n\n ];\n }", "function xml_db ($aa)\n {\n\t\tif(sizeof($aa)>0)\n foreach ($aa as $k=>$v)\n $this->$k = $aa[$k];\n }", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function __construct() {\n parent::__construct();\n\n //kapcsolódás a db-hez:\n $this->db = db_connect();\t//\\Config\\Database::connect();\n $this->builder = $this->db->table(\"feladatok\");\n\n }", "public function Dame()\n {\n $sql = 'CALL tsp_dame_sucursal( :id )';\n \n $query = Yii::$app->db->createCommand($sql);\n \n $query->bindValues([\n ':id' => $this->IdSucursal\n ]);\n \n $this->attributes = $query->queryOne();\n\n $datos = json_decode($this->Datos);\n $this->Telefono = $datos->{'Telefono'};\n $this->Direccion = $datos->{'Direccion'};\n }", "public function getAtributosP() {\r\n\t\t\t$atributos = array();\r\n\t\t\t$atributos[0] = \"nombreUnidad\";\r\n\t\t\t$atributos[1] = \"telefono\";\r\n\t\t\treturn $atributos;\r\n\t\t}", "abstract function attributes(): array;", "function envios_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"envios\";\n\t\t$this->campoClave=\"IdEnvio\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdEnvio\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdMail\",2);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Envio\",3);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Descripcion\",4);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"TablaDatosExtras\",5);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"CondicionDatosExtras\",6);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaCreacion\",7);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaModificacion\",8);\n$this->agregarVariable2($v);\n\n\t}", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_nom('');\n $this->setId_nivel('');\n $this->setId_asignatura('');\n $this->setId_situacion('');\n // la fecha debe estar antes del acta por si hay que usar la funcion inventarActa.\n $this->setF_acta('');\n $this->setActa('');\n $this->setDetalle('');\n $this->setPreceptor('');\n $this->setId_preceptor('');\n $this->setEpoca('');\n $this->setId_activ('');\n $this->setNota_num('');\n $this->setNota_max('');\n $this->setTipo_acta('');\n $this->setPrimary_key($aPK);\n }", "public function getAttributes() {}" ]
[ "0.5799379", "0.56501573", "0.5620572", "0.54910713", "0.5425716", "0.52895737", "0.5229773", "0.51515865", "0.51187223", "0.5098508", "0.507955", "0.507955", "0.50732607", "0.50508565", "0.5048408", "0.5034166", "0.50340885", "0.5022948", "0.5018873", "0.50175637", "0.50119466", "0.5005049", "0.50048417", "0.4999405", "0.49984318", "0.4993185", "0.4986514", "0.49464336", "0.49389735", "0.4935975", "0.49221718", "0.49206948", "0.49084792", "0.48950392", "0.48899132", "0.48775402", "0.4877361", "0.4876193", "0.4870348", "0.4869925", "0.48678413", "0.48462796", "0.48400605", "0.48399338", "0.48390716", "0.4835241", "0.48336777", "0.4832915", "0.4831733", "0.48232102", "0.48232102", "0.48191658", "0.48156086", "0.48149177", "0.48113045", "0.48003083", "0.47991744", "0.4791703", "0.47872776", "0.47849244", "0.47606638", "0.47479105", "0.47389245", "0.4737763", "0.47366753", "0.4725624", "0.47251436", "0.47245067", "0.4721783", "0.47190714", "0.47155458", "0.4710429", "0.47052354", "0.4704645", "0.47037393", "0.4702873", "0.4699886", "0.46988055", "0.46981034", "0.4691606", "0.4690226", "0.46899644", "0.4689734", "0.46863747", "0.46816334", "0.46804276", "0.46804276", "0.46804276", "0.46804276", "0.46804276", "0.46804276", "0.46804276", "0.46804276", "0.46804276", "0.4680198", "0.4679799", "0.46790165", "0.4678639", "0.46740222", "0.46666664", "0.46645853" ]
0.0
-1
renvoie un tableaux contenant tous les elements d'une table
public function selectAll($table){ $requete = "SELECT * FROM $table"; $result = array(); foreach($this->_dbh->query($requete) as $raw){ array_push($result,$raw); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadTable()\n {\n $unites = $this->Unite->all([], 'uniid DESC');\n $i = 1;\n $html = '';\n\n foreach ($unites as $unite) {\n $html .= '<tr>' .\n '<td>' . $i ++ . '</td>' .\n '<td>' . $unite->unilibelle . '</td>' .\n '<td>' . $unite->uniabv . '</td>' .\n '<td>';\n if (in_array('113', $this->session->stkdroits)) {\n $html .= '<a data-toggle=\"modal\" href=\"#editeUnite\" onclick=\"laodForEditUnite(' . $unite->uniid . '); return false\" title=\"editer\"><i class=\"fa fa-edit\" style=\"color: #05AE0E;\"></i></a>';\n } else {\n $html .= '<a href=\"javascript: void(0)\" class=\"disabled\" title=\"editer\"><i class=\"fa fa-edit\"></i></a>';\n }\n if (in_array('112', $this->session->stkdroits)) {\n $html .= '<a data-toggle=\"modal\" href=\"#deletUnite\" onclick=\"laodDataForDeleteUnite(' . $unite->uniid . '); return false;\" title=\"supprimer\"><i class=\"fa fa-remove\" style=\"color: #FF3B30;\"></i></a>';\n }else {\n $html .= '<a href=\"javascript: void(0)\" class=\"disabled\" title=\"editer\"><i class=\"fa fa-remove\"></i></a>';\n }\n $html .= '</td>' .\n '</tr>';\n }\n\n return $html;\n }", "function prikazi_sqltabelu($sql_tabela) {\n\n\tglobal $db;\n\n\techo \"<table class='dt-table'>\";\n\techo \"<h2>\" . $sql_tabela . \"</h2>\";\n\n\t// generisanje headera tabele (prikaz podataka)\n\n\t$komanda_head = \"SELECT * FROM $sql_tabela LIMIT 1\";\n\t$result_head = mysql_query($komanda_head, $db);\t\n\n\twhile ( $red = mysql_fetch_assoc($result_head) ) :\n\n\t\t$m = 0;\n\n\t\techo \"<tr class='dt-table'>\";\n\n\t\tforeach ($red as $item) {\n\t\n\t\t\t$kolona = mysql_field_name($result_head, $m);\n \t\t\techo \"<td class='dt-table'>\" . $kolona . \"</td>\";\n \t\t\t//echo \"<td>\" . $item . \"</td>\";\n \t\t$m++;\n\n\t\t}\n\n\t\techo \"</tr>\";\n\n\tendwhile;\n\n\t// generisanje tela tabele (prikaz podataka)\n\n\t$komanda_body = \"SELECT * FROM $sql_tabela\";\n\t$result_body = mysql_query($komanda_body, $db);\n\n\n\twhile ( $red = mysql_fetch_assoc($result_body) ) :\n\n\t\t$n = 0;\n\n\t\techo \"<tr class='dt-table'>\";\n\n\t\tforeach ($red as $item) {\n\t\n\t\t\t$kolona = mysql_field_name($result_body, $n);\n \t\t\techo \"<td class='dt-table'>\" . $item . \"</td>\";\n \t\t$n++;\n\n\t\t}\n\n\t\techo \"</tr>\";\n\n\tendwhile;\n\n\techo \"</table>\";\n\n}", "function entable($all){\n \n $table = new Table();\n $table->setClass(\"table table-striped table-bordered\");\n $header = new Tr();\n \n $th = new Th(\"Orden\");\n $header->add($th);\n \n $th = new Th(\"Proveedor\");\n $header->add($th);\n \n $th = new Th(\"Total Pzas\");\n $header->add($th);\n \n $th = new Th(\"Recibidas\");\n $header->add($th);\n \n \n $th = new Th(\"Restantes\");\n $header->add($th);\n \n $th = new Th(\"Status\");\n $header->add($th);\n \n \n $th = new Th(\"Recibos\");\n $header->add($th);\n \n $th = new Th(\"Comprobante\");\n $header->add($th);\n \n $th = new Th(\"\");\n $header->add($th);\n \n $table->add($header);\n foreach ($all as $key=> $element){\n $tr = new Tr();\n \n $td = new Td($element->id);\n $tr->add($td);\n \n $td = new Td($element->getProvider());\n $tr->add($td);\n \n \n $pedidas = $element->getPiezas();\n $td = new Td($pedidas);\n $tr->add($td);\n \n $recibidas = $element->getReceived();\n $td = new Td($recibidas);\n $tr->add($td);\n \n \n $restantes = $pedidas - $recibidas;\n $td = new Td($restantes);\n $tr->add($td);\n if (empty($element->status))\n $element->status = \"Abierta\";\n $td = new Td($element->status);\n $tr->add($td);\n \n \n $recibos = $element->getRecibosTable();\n $td = new Td($recibos);\n $tr->add($td);\n \n \n \n \n $receipt = site_url2(\"orders/receipt/{$element->unique}\");\n $receive_anchor = new Anchor(\"Agregar Recibo\",\"$receipt\");\n if ($restantes==0){\n $receive_anchor = new Anchor(\"Agregar Recibo\",\"#\");\n $receive_anchor->setAttr(\"disabled\",\"disabled\");\n $receive_anchor->setAttr(\"onclick\",\"return false\");\n // mark order as closed\n \n \n }\n $receive_anchor->setClass(\"btn btn-default\");\n $td = new Td($receive_anchor);\n $td->setStyle(\"text-align:center\");\n $tr->add($td);\n \n \n \n \n $table->add($tr);\n \n }\n \n \n return $table;\n }", "function tablaDatos(){\n\n $editar = $this->Imagenes($this->PrimaryKey,0);\n $eliminar = $this->Imagenes($this->PrimaryKey,1);\n $sql = 'SELECT\n C.id_componentes,\n P.descripcion planta,\n S.descripcion secciones,\n E.descripcion Equipo,\n C.`descripcion` Componente\n ,'.$editar.','.$eliminar.' \nFROM\n `componentes` C\nINNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\nINNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\nINNER JOIN\n plantas P ON P.id_planta = S.id_planta\nWHERE\n \n C.`activo` = 1';\n \n $datos = $this->Consulta($sql,1); \n if(count($datos)){\n $_array_formu = array();\n $_array_formu = $this->generateHead($datos);\n $this->CamposHead = ( isset($_array_formu[0]) && is_array($_array_formu[0]) )? $_array_formu[0]: array();\n \n $tablaHtml = '<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-body recargaDatos\" style=\"page-break-after: always;\">\n <div class=\"table-responsive\">';\n $tablaHtml .='';\n \t\t$tablaHtml .= $this->print_table($_array_formu, 7, true, 'table table-striped table-bordered',\"id='tablaDatos'\");\n \t\t$tablaHtml .=' </div>\n </div>\n </div>\n </div>\n </div>\n ';\n }else{\n $tablaHtml = '<div class=\"col-md-8\">\n <div class=\"alert alert-info alert-dismissable\">\n <button class=\"close\" aria-hidden=\"true\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Atenci&oacute;n</strong>\n No se encontraron registros.\n </div>\n </div>';\n }\n \n if($this->_datos=='r') echo $tablaHtml;\n else return $tablaHtml;\n \n }", "function tabledata_Cadre_voirlestables ($serveur,$boolSPIP=false)\r\n{\r\n global $connect_statut, $spip_lang, $connect_id_auteur;\r\n\r\n $tables_extra = array();\r\n $tables_spip = array();\r\n $intNbExtra = 0 ;\r\n\r\n $sqlResultTables = sql_showbase('%');\r\n while ($tabNomTable = sql_fetch($sqlResultTables))\r\n {\r\n foreach ($tabNomTable as $key => $val)\r\n {\r\n if (preg_match('#^'.tabledata_table_prefix().'_#', $val))\r\n {\r\n $tables_spip[] = $val;\r\n }\r\n else\r\n {\r\n $tables_extra[] = $val;\r\n ++$intNbExtra ;\r\n }\r\n }\r\n }\r\n\r\n // affichage\r\n echo \"Choisir une table Extra parmis celle ci-dessous:\\n\";\r\n if ($intNbExtra<1)\r\n {\r\n echo \"Aucune table extra ne semble disponible.\";\r\n }\r\n else\r\n {\r\n echo tabledata_table_HTML ($tables_extra);\r\n }\r\n if ($boolSPIP)\r\n {\r\n echo \"<hr/>\";\r\n echo \"Les tables de SPIP :\\n\";\r\n echo tabledata_table_HTML ($tables_spip);\r\n }\r\n return;\r\n}", "function desplegarTabla($query,$anchtable=array(),$iconos=array(),$coLoTabla=\"table-primary\"){\n\n\tglobal $oBD;\n\n\t$registros = $oBD->consulta($query);\n\n\t$columnas = mysqli_num_fields($registros);\n\techo '<table class= \"table table-hover'.$coLoTabla.'\">';\n\t// creacion de la cabecera\n\techo '<tr class=\"table-dark\">';// hace el renglon\n\n\t// if (count($anchtable)){\n\t// \tforeach ($anchtable as $anch) {\n\t// \t\techo \"<td style=width:$anch.'%';></td>\";\n\t// \t\techo $anch;\n\t// \t}\n\t// }\n$k = 0;\n// si el count de iconos existe entonces me mandaron iconos \n\tif (count($iconos)){\n\t\tforeach ($iconos as $icono) {\n\t\t\techo $k;\n\t\t\t\t\t\n\t\t\tif (count($anchtable)) {\n\t\t\t\techo \"<td style=width:$anchtable[$k];>&nbsp;</td>\";\t\n\t\t\t}else{\n\t\t\t\techo \"<td>&nbsp;</td>\";\t\n\t\t\t}\n\n\t\t\t$k++;\n\t\t}\n\t}\n\t//echo $columnas;\n\techo $k;\n\t//$k=$k-1;\n\tfor ($c=0; $c < $columnas; $c++){\n\t\t// para traer los nombres de los campos\n\t\t$campo=mysqli_fetch_field_direct($registros,$c); // da la informacion de un campo en la base de datos\n\t\t \n\t\t if (count($anchtable)) {\n\t\t\t\techo \"<td style=width:$anchtable[$k];>$campo->name.$c</td>\";\t\n\t\t\t}else{\n\t\t\t\techo '<td style=\"width:(90/$columnas)%\">'.$campo->name.'</td>';\t\t\n\t\t\t}\n\t\t // echo $anchtable[$c];\n\t\t $k++;\n\t\t\n\t}\n\techo '</tr>';\n\t// fin cabecera\n\t// comienzo de registros\n\tfor ($r=0; $r < $oBD->numeRegistros; $r++) \n\t{ echo '<tr>';\n\t\t// agregando iconos\n\t\t// EN EL CASO DE QUE \"UPDATE EXISTA EN EL ARRGLO DE LOS ICONOS\"\n\t\tif (in_array(\"update\", $iconos)) {\n\t\t\t//da comportamiento de los iconos\n\t\t\techo '<td style=\"width:5%\"><img src=\"imagenes/update.png\"></td>';\n\t\t}\n\n\t\tif (in_array(\"delete\", $iconos)) {\n\t\t\t//da comportamiento de los iconos\n\t\t\techo '<td style=\"width:5%\"><img src=\"imagenes/delete.png\"></td>';\n\t\t}\n\n\n\t\t$campos = mysqli_fetch_array($registros);\n\t\t// despliega la informacion de un registro especifico\n\t\tfor ($c=0; $c < $columnas; $c++) \n\t\t\techo '<td>'.$campos[$c].'</td>';\n\t echo '</tr>';\n\t\t\n\t}\necho '</table>';\necho $k;\n}", "function ImprimirCabeceraTabla($tabla){\n echo \"<table><tr>\";\n foreach ($tabla as $valor){\n\n echo \"<th>\".$valor.\"</th>\";\n \n }\n echo \"</tr>\";\n}", "public function resetTable();", "public function refreshTable();", "public function rechercherTous() {\n // select all query\n $sRequete = \"SELECT * FROM \" . $this->sNomTable .\"\n LEFT JOIN panier ON idPanier = iNoPanier\n LEFT JOIN produit ON idProduit = iNoProduit\n \";\n\n // prepare query statement\n $stmt = $this->oConnexion->prepare($sRequete);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n }", "public function reset_tableaux() {\n\t\treturn $this->setArbreMoniteurs ( array () )\n\t\t\t->setArbreGroupes ( array () )\n\t\t\t->setArbreMachines ( array () )\n\t\t\t->setDependance ( array () )\n\t\t\t->setGroupeNumbers ( array () );\n\t}", "function ImprimeTable($idTabla, $data, $pactu = \"\", $peli = \"\",$classCSS=\"\") {\n // echo \"ImprimeTable:::::::::::::::\".count($data[\"cuerpo\"]).\" <br>\";\n\t\ttry {\n // if (count($data) > 0) {\n\t\t\t $tabla = '<table id=\"'.$idTabla.'\" class=\"' . $classCSS . '\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center\" >';\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n\t\t\t\t\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n\t\t\t\t\t \n if ($pactu != \"\") {\n if ($conta == 0) {;\n\t\t\t\t\t\t $tabla.= '<th></th>';\n //$tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<th></th>';\n\t\t\t\t\t\t\t//$tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n $tabla.= '<th>' . utf8_encode($data[\"columnas\"][$x]) . '</th>'; \n }\n\t\t\t\t$tabla.= \"</tr>\";\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n for ($i = 0;$i < $cantele;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= \"<tr>\";\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"javascript:Modificar('. $data[\"cuerpo\"][$i][\"$columnas\"] .');\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>';\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"Modificar('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td><a href=\"#\" onClick=\"Eliminar('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>';\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . ' </td>';\n }\n }\n $tabla.= \"</tr>\";\n }\n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Ningun Dato Registrado\"; \n\t\t\t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot>';\n\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n $tabla.= \"</table><br>\";\n\t\t\t\t//}\n }\n catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "public function createTable($prenotazioni) {\r\n echo \"<table id='tblPrenotazioni' summary='Tabella che riporta le prenotazioni delle aule di interesse per gli studenti di Matematica e Informatica.' >\";\r\n echo \"<thead>\";\r\n echo \"<tr> <th> ORARIO: </th>\";\r\n // NUMERO DI AULE:\r\n $numAule = 0;\r\n foreach (self::$array_aule as $aula) {\r\n echo \"<th> $aula </th>\";\r\n $numAule++;\r\n }\r\n echo \"</tr>\";\r\n echo \"</thead>\";\r\n echo \"<tbody>\";\r\n for ($i = 0; $i <= 22; $i++) {\r\n echo \"<tr> <td class='indice_ora'> \".$this->convertiInOra($i).\" </td>\";\r\n if (isset($prenotazioni[$i])) {\r\n foreach (self::$array_aule as $aula) {\r\n if (isset($prenotazioni[$i][$aula])) {\r\n if ($prenotazioni[$i][$aula]==\"\\\"\")\r\n echo \"<td class='apici'> <span > \\\" </span> </td>\";\r\n else\r\n echo \"<td class='corso'> <span>\" . $prenotazioni[$i][$aula][4] . \"</span> </td>\";\r\n } else {\r\n echo \"<td> </td>\";\r\n $this->arrayAuleLibere[$i][$aula]=\"libera\";\r\n }\r\n }\r\n } else {\r\n for ($j = 0; $j < $numAule; $j++)\r\n echo \"<td> </td>\";\r\n $this->arrayAuleLibere[$i]=\"tutto libero\";\r\n }\r\n echo \"</tr>\";\r\n } \r\n echo \"</tbody>\";\r\n echo \"</table>\";\r\n //var_dump($this->arrayAuleLibere);\r\n }", "function visualizar(){\n\t\t$consulta=$this->sql;\n\t\t$result=mysql_query($consulta);\n\t\t\n\t\techo \"<center><table class='enhancedtablerowhover'>\n\t\t\t<caption>\".$this->comentarioTabla($this->nombreTabla($result,0)).\"</caption>\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t<td scope='col' colspan=2></td>\n\t\t\t\";\n\t\tfor($i=0;$i<mysql_num_fields($result);$i++)\n\t\t{\t\n\t\t \tif(!$this->mostrarCampo($this->nombreCampo($result,$i)) or stripos($this->nombreCampo($result,$i),\"imagen\"))continue;\n\t\t \t$des = str_replace(\"/*\",\"\",$this->comentario($this->nombreCampo($result, $i), $this->nombreTabla($result, $i)));\n\t\t\techo \"<th scope='col' ><a href='?order='>$des</a></th>\";\n\t\t}\n\t\techo\"\t\n\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\";\n\t\twhile ($row = mysql_fetch_array($result)) {\n\t\t$filtro=$this->cifrar($row,$result);\n\t\techo \"<tr>\";\n\t\techo \"<td class='CrearReporte'>\n\t\t\t\t<a href='$_SERVER[PHP_SELF]?operacion=m&$filtro'>\n\t\t\t\t<img src='\".$this->PathImages.\"editar.png'>\n\t\t\t</a>\n\t\t </td>\";\n\t\techo \"<td class='CrearReporte' >\n\t <a href='$_SERVER[PHP_SELF]?operacion=b&$filtro'>\n\t\t\t\t<img src='\".$this->PathImages.\"eliminar.png'>\n\t\t\t\t</a>\n\t\t\t </td>\n\t\t\t \";\n\t\t //?columna=$row[0]&operacion=q \n\t\tfor ($i = 0; $i < mysql_num_fields($result); $i++){\n\t\t \tif(!$this->mostrarCampo($this->nombreCampo($result,$i)) or stripos($this->nombreCampo($result,$i),\"imagen\"))continue;\n\t\t\techo \"<td>\".$row[$i].\"</td>\";\n\t\t}\n\t\techo \"</tr>\";\n\t}\n\techo \"</tr></tbody></table></center>\";\n\t}", "function ImprimeTablePO($idTabla, $data, $pactu, $peli, $crxpag=10, $paginap = 1, $cantlink = 5,$orderby = -1,$classCSS=\"\") { \n $tabla = '<table id=\"' . $idTabla . '\" class=\"'.$classCSS.'\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center\" >';\n try {\n // if (count($data) > 0) {\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n if ($pactu != \"\") {\n if ($conta == 0) {;\n $tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n //Nombres de las columnas\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t$ordenar = $x + 1;\t\t\t\t\t\n\t\t\t\t\t//$tabla.= '<th><a href=\"?pagina=' . $paginap . '&orden=' . $ordenar . '\" >' . utf8_encode($data[\"columnas\"][$x]) . '</a></th>';\n\t\t\t\t\t$tabla.= '<th><a href=\"#\" onClick=\"Paginar(\\'pagina=' . $paginap . '&orden=' . $ordenar . '\\'); return false\" >' . utf8_encode($data[\"columnas\"][$x]) . '</a></th>'.\"\\n\";\n\t\t\t\t \n }\n \t\t$tabla.= \"</tr>\";\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n $fin = $paginap * $crxpag;\n $ini = $fin - $crxpag;\n for ($i = $ini;$i < $fin;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= '<tr>';\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"' . $pactu . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Mactualizar\"><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n // $tabla.= '<td><a href=\"' . $peli . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Eliminar\"><img src=\"../imgcixphp/ico_eliminar.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$peli.'('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . '</td> '.\"\\n\";\n }\n }\n $tabla.= '</tr>';\n }\n\t\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n \t$tabla.= '</table><p style=\"clear:both;height:5px;\"></p>'; \n //===========PAGINADO======================================================================================================================\n $paginado = Paginar($cantele, $crxpag, $paginap, $cantlink,$orderby);\n $tabla.= $paginado;\n //===========FIN PAGINADO ==================================================================================================================\n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Datos Registrados\"; \n\t\t\t \t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot></table><br>';\n\t\t\t\t}\n\t\t\t\n }catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "public function rep_objetivos_estrategicos(){\n $tabla='';\n $objetivos = $this->model_mestrategico->list_objetivos_estrategicos(); /// OBJETIVOS ESTRATEGICOS\n $configuracion=$this->model_resultado->configuracion_session(); /// Configuracion\n\n $tabla .='<table cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" border=0.2 style=\"width:100%;\" align=center>\n <thead>\n <tr style=\"font-size: 7px;\" bgcolor=#1c7368 align=center>\n <th style=\"width:1%;height:15px;color:#FFF;\">#</th>\n <th style=\"width:15%;color:#FFF;\">OBJETIVO ESTRATEGICO</th>\n <th style=\"width:84%;color:#FFF;\">ACCI&Oacute;N ESTRATEGICA</th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n foreach($objetivos as $rowo){\n $nro++;\n $acciones = $this->model_mestrategico->list_acciones_estrategicas($rowo['obj_id']); \n $tabla.='<tr>';\n $tabla.='<td style=\"width:1%;;height:12px;\" align=center>'.$nro.'</td>';\n $tabla.='<td style=\"width:15%;\">'.$rowo['obj_codigo'].'.- '.$rowo['obj_descripcion'].'</td>';\n $tabla.='<td style=\"width:84%;\">';\n if(count($acciones)!=0){\n $tabla.='<table cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" border=0.1 style=\"width:100%;\" align=center>\n <thead>\n <tr style=\"font-size: 7px;\" bgcolor=#d9d7d7 align=center>\n <th style=\"width:1%;height:15px;\">#</th>\n <th style=\"width:37%;\">DESCRIPCI&Oacute;N</th>\n <th style=\"width:60%;\">VINCULACI&Oacute;N PDES</th>\n </tr>\n </thead>\n <tbody>';\n $nra=0;\n foreach($acciones as $rowa){\n $pdes=$this->model_proyecto->datos_pedes($rowa['pdes_id']);\n $nra++;\n $tabla.='<tr>';\n $tabla.='<td style=\"width:1%;\">'.$nra.'</td>';\n $tabla.='<td style=\"width:37%;\">'.$rowa['acc_codigo'].'.- '.$rowa['acc_descripcion'].'</td>';\n $tabla.='<td style=\"width:60%;\">';\n $tabla.='<ul>\n <li type=\"circle\"><b>PILAR : </b>'.$pdes[0]['pilar'].'</li>\n <li type=\"square\"><b>META : </b>'.$pdes[0]['meta'].'</li>\n <li type=\"disc\"><b>RESULTADO : </b>'.$pdes[0]['resultado'].'</li>\n <li type=\"disc\"><b>ACCI&Oacute;N : </b>'.$pdes[0]['accion'].'</li>\n </ul>';\n $tabla.='</td>';\n $tabla.='</tr>';\n }\n $tabla.=' </tbody>\n </table>';\n }\n $tabla.='</td>';\n $tabla.='</tr>';\n }\n $tabla .='</tbody>\n </table>';\n\n\n\n\n\n return $tabla;\n }", "protected function getCleanableTableList() {}", "public function imprimirTabla()\r\n {\r\n try\r\n {\r\n $consulta = \"SELECT * FROM xxnombretabla\";//el nombre de la tabla\r\n $objeto = $this->PDO->prepare($consulata);\r\n $objeto->execute();\r\n $tabla = $objeto->fetchAll(PDO::FETCH_OBJ);\r\n\r\n foreach ($tabla as $fila )\r\n {\r\n $xxnombreclase = new xxnombreclase();//se instancia la clase que se esta haciendo\r\n $xxnombreclase->__SET('xid:clase', $fila->xxcampoTabla);//se llama el campo de la tabla que corresponda con el atributo de la clase\r\n $xxnombreclase->__SET('xatributo:clase',$fila->xxcampoTabla);//se repite segun los campos que hayan en la tabla\r\n\r\n $result[] = $xxnombreclase;//se mete en el arreglo result[] la varible con la clase\r\n }\r\n\r\n } catch (Exception $e) {\r\n die($e->getMessage());\r\n }\r\n\r\n return $result;//se devuelve el arreglo result\r\n }", "function tablaConversiones() {\n \n $array = array();\n $contador = 0;\n $output = \"\";\n $output2 = \"\";\n $heading = array('Numero ','Contenido de $var ', 'isset($var) ', 'empty($var) ', '(bool) $var ', 'is_null($var)');\n $var = array(null, 0, true, false, \"0\", \"\", \"foo\", $array, 2);\n $funciones = array('llamarIsset', 'llamarEmpty', 'llamarBool', 'llamarIsnull');\n \n $output .= \"<table class='table table-bordered'>\";\n $output .= \"<tr>\";\n // imprimimos cabecera\n foreach ($heading as $value) {\n $output .= \"<th>\" . $value . \" </th>\";\n }\n $output .= \"</tr>\";\n foreach ($var as $valor) {\n \n $contador++;\n $output .= \"<th> {$contador} </th>\";\n \n if ($valor === null) {\n $output2 = \"null\";\n } elseif($valor === true) {\n $output2 = \"true\";\n } elseif($valor === 2) {\n $output2 = \"unset(\\$var)\";\n } elseif($valor === \"\") {\n $output2 = \"\\\"\\\"\";\n } elseif($valor === false) {\n $output2 = \"false\";\n }else {\n $output2 = $valor;\n }\n \n $output .= \"<th> \\$var= \". $output2 .\" </th>\";\n \n foreach ($funciones as $funcion) {\n \n if ($valor == 2) {\n unset($valor);\n }\n if ($funcion($valor)) {\n $output .= \"<td class='true'> True </td>\";\n } else {\n $output .= \"<td class='false'> False </td>\";\n }\n }\n $output .= \"<tr>\";\n }\n \n $output .= \"</table>\";\n\n echo $output;\n }", "private function prepare_table()\n {\n global $g_dirs;\n\n $l_dao = new isys_cmdb_dao($this->database);\n $l_quicky = new isys_ajax_handler_quick_info();\n\n $l_table = \"<table width=\\\"100%\\\" class=\\\"report_listing\\\">\";\n\n foreach ($this->m_its_arr as $l_obj_id => $l_title) {\n unset($this->m_obj_arr);\n $l_table .= \"<tr style=\\\"\\\"><td onclick=\\\"collapse_it_service('\" . $l_obj_id . \"')\\\" id=\\\"\" . $l_obj_id . \"\\\" class=\\\"report_listing\\\"><img id=\\\"\" . $l_obj_id .\n \"_plusminus\\\" src=\\\"\" . $g_dirs[\"images\"] . \"dtree/nolines_plus.gif\\\" class=\\\"vam\\\">\";\n\n $l_table .= $l_quicky->get_quick_info($l_obj_id, $l_dao->get_obj_name_by_id_as_string($l_obj_id), C__LINK__OBJECT);\n\n $l_table .= \"<img src=\\\"\" . $g_dirs[\"images\"] . \"ajax-loading.gif\\\" id=\\\"ajax_loading_view_\" . $l_obj_id . \"\\\" style=\\\"display:none;\\\" class=\\\"vam\\\" /></td></tr>\";\n\n $l_table .= \"<tr id=\\\"childs_\" . $l_obj_id . \"\\\" style=\\\"display:none;\\\"><td><div id=\\\"childs_content_\" . $l_obj_id . \"\\\"></div>\";\n $l_table .= \"</td></tr>\";\n }\n\n $l_table .= \"</table>\";\n\n return $l_table;\n }", "function table_des_mots($table, $les_mots) {\n\tglobal $afficher_groupe;\n\n\tif (!is_array($afficher_groupe)) return;\n\n\t$in_group = \" AND id_groupe IN (\" . join($afficher_groupe, \", \") .\")\";\n\n\t$result_groupe = spip_query(\"SELECT * FROM spip_groupes_mots\n\tWHERE forum = 'oui' AND $table = 'oui'\". $in_group);\n\n\t$ret = '';\n\twhile ($row_groupe = spip_fetch_array($result_groupe)) {\n\t\t$id_groupe = $row_groupe['id_groupe'];\n\t\t$titre_groupe = propre($row_groupe['titre']);\n\t\t$unseul = ($row_groupe['unseul']== 'oui') ? 'radio' : 'checkbox';\n\t\t$result =spip_query(\"SELECT * FROM spip_mots\n\t\tWHERE id_groupe='$id_groupe'\");\n\t\t$total_rows = spip_num_rows($result);\n\n\t\tif ($total_rows > 0) {\n\t\t\t$ret .= \"\\n<p />\"\n\t\t\t . \"<div class='spip_encadrer' style='font-size: 80%;'>\"\n\t\t\t . \"<b>$titre_groupe&nbsp;:</b>\"\n\t\t\t . \"<table cellpadding='0' cellspacing='0' border='0' width='100%'>\\n\"\n\t\t\t .\"<tr><td width='47%' valign='top'>\";\n\t\t\t$i = 0;\n\n\t\twhile ($row = spip_fetch_array($result)) {\n\t\t\t$id_mot = $row['id_mot'];\n\t\t\t$titre_mot = propre($row['titre']);\n\t\t\t$descriptif_mot = propre($row['descriptif']);\n\n\t\t\tif ($i >= ($total_rows/2) AND $i < $total_rows) {\n\t\t\t\t$i = $total_rows + 1;\n\t\t\t\t$ret .= \"</td><td width='6%'>&nbsp;</td>\n\t\t\t\t<td width='47%' valign='top'>\";\n\t\t\t}\n\n\t\t\t$ret .= boutonne($unseul, \"ajouter_mot[]\", $id_mot, \"id='mot$id_mot' \" . $les_mots[$id_mot]) .\n\t\t\t afficher_petits_logos_mots($id_mot)\n\t\t\t. \"<b><label for='mot$id_mot'>$titre_mot</label></b><br />\";\n\n\t\t\tif ($descriptif_mot)\n\t\t\t\t$ret .= \"$descriptif_mot<br />\";\n\t\t\t$i++;\n\t\t}\n\n\t\t$ret .= \"</td></tr></table>\";\n\t\t$ret .= \"</div>\";\n\t\t}\n\t}\n\n\treturn $ret;\n}", "function ImprimeTableFunciones($idTabla, $data, $pactu = \"\", $peli = \"\",$classCSS=\"\") {\n // echo \"ImprimeTable:::::::::::::::\".count($data[\"cuerpo\"]).\" <br>\";\n\t\ttry {\n // if (count($data) > 0) {\n\t\t\t $tabla = '<table id=\"'.$idTabla.'\" class=\"' . $classCSS . '\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center;\" >';\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n\t\t\t\t\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n\t\t\t\t\t \n if ($pactu != \"\") {\n if ($conta == 0) {;\n\t\t\t\t\t\t $tabla.= '<th></th>';\n //$tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<th></th>';\n\t\t\t\t\t\t\t//$tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n $tabla.= '<th>' . utf8_encode($data[\"columnas\"][$x]) . '</th>'; \n }\n\t\t\t\t$tabla.= '</tr>';\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n for ($i = 0;$i < $cantele;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= \"<tr>\";\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"javascript:'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .');\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>';\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td><a href=\"#\" onClick=\"'.$peli.'('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>&nbsp;' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&nbsp; </td>'.\"\\n\";\n }\n }\n $tabla.= '</tr>';\n }\n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Datos Registrados\"; \n\t\t\t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot>';\n\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n $tabla.= '</table><br />';\n\t\t\t\t//}\n }catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "function ImprimeTableP($idTabla, $data, $pactu, $peli, $crxpag, $paginap = 1, $cantlink = 5,$classCSS=\"\") {\n\t\t$tabla = '<table id=\"' . $idTabla . '\" class=\"'.$classCSS.'\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center;\" >';\n try {\n //if (count($data) > 0) {\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n $tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {\n $tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n $tabla.= '<th>' . utf8_encode($data[\"columnas\"][$x]) . '</th>'.\"\\n\";\n //$tabla.= Columna_Cabezera(\"f1\", utf8_encode($data[\"columnas\"][$x]));\n \n }\n \t\t$tabla.= '</tr>';\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n\t\t\t\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n $fin = $paginap * $crxpag;\n $ini = $fin - $crxpag;\n for ($i = $ini;$i < $fin;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= '<tr>';\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"' . $pactu . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Mactualizar\"><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n // $tabla.= '<td><a href=\"' . $peli . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Eliminar\"><img src=\"../imgcixphp/ico_eliminar.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$peli.'('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . '</td> '.\"\\n\";\n }\n }\n $tabla.= '</tr>';\n } \n\t\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n \t $tabla.= '</table><p style=\"clear:both;height:5px;\"></p>';\n\t\t\t \n\t\t\t //===========PAGINADO======================================================================================================================\n \t$paginado = Paginar($cantele, $crxpag, $paginap, $cantlink);\n $tabla.= $paginado;\n //===========FIN PAGINADO ==================================================================================================================\n \n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Datos Registrados\"; \n\t\t\t \t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot></table><br/>';\n\t\t\t\t}\n\t\t\t\n }catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "function LUPE_criar_tabela_tab($prefixo, $rs, $vetCampo, $vetHidTab, $exc_tabela = '', $exc_campo = '') {\r\n\r\n echo \"<table id='tab{$prefixo}_Tabela' width='100%' border='1' cellspacing='0' cellpadding='0' vspace='0' hspace='0' class='Generica'>\\n\";\r\n echo \"<tr class='Generica'>\\n\";\r\n\r\n if (Ativo()) {\r\n echo \"<td class='Acao' width='1%' nowrap>\";\r\n echo '<a href=\"\" onclick=\"return tab'.$prefixo.'_Incluir();\" class=\"Titulo\"><img src=\"imagens/Incluir.gif\" border=\"0\" alt=\"Incluir\"></a>';\r\n echo \"</td>\\n\";\r\n }\r\n\r\n ForEach($vetCampo as $Campo => $Valor ) {\r\n echo \"<td class='Titulo'><b>\\n\";\r\n echo $Valor['nome'];\r\n echo \"</b></td>\\n\";\r\n }\r\n\r\n echo \"</tr>\\n\";\r\n\r\n if (mssql_num_rows($rs) != 0) {\r\n for ($i = 0; $i < mssql_num_rows($rs); $i++) {\r\n $row = mssql_fetch_array($rs);\r\n\r\n echo \"<tr id='tab{$prefixo}_linha{$i}' align=left>\\n\";\r\n\r\n if (Ativo()) {\r\n echo \"<td class='Acao' nowrap>\";\r\n\r\n echo '<a class=\"Registro\" href=\"\" onclick=\"return tab'.$prefixo.'_Alterar('.$i.');\"><img src=\"imagens/Alterar.gif\" border=\"0\" alt=\"Alterar\"></a>';\r\n\r\n echo '&nbsp;';\r\n\r\n echo '<a class=\"Registro\" href=\"\" onclick=\"return tab'.$prefixo.'_Excluir('.$i.');\"><img src=\"imagens/Excluir.gif\" border=\"0\" alt=\"Excluir\"></a>';\r\n\r\n if ($exc_campo == '' || $exc_tabela == '') {\r\n $exclui = 'N';\r\n } else {\r\n $sql = \"select $exc_campo from $exc_tabela where $exc_campo = \".$row[$exc_campo];\r\n if (mssql_num_rows(execsql($sql)) == 0)\r\n $exclui = 'N';\r\n else\r\n $exclui = 'E';\r\n }\r\n\r\n echo \"<input id='{$prefixo}_excluir$i' type='hidden' name='{$prefixo}_excluir[]' value='$exclui'>\\n\";\r\n\r\n ForEach($vetHidTab as $Valor)\r\n \t echo \"<input id='{$prefixo}_$Valor$i' type='hidden' name='{$prefixo}_{$Valor}[]' value='\".$row[$Valor].\"'>\\n\";\r\n\r\n echo \"</td>\\n\";\r\n }\r\n\r\n ForEach($vetCampo as $Campo => $Valor ) {\r\n echo \"<td id='{$prefixo}_cel_{$Campo}_{$i}' class='Registro'>\\n\";\r\n\r\n switch ($Valor['tipo']) {\r\n \tcase 'descDominio':\r\n if ($Valor['vetDominio'][$row[$Campo]] == '')\r\n echo $row[$Campo];\r\n else\r\n echo $Valor['vetDominio'][$row[$Campo]];\r\n \t\tbreak;\r\n\r\n default:\r\n echo $row[$Campo];\r\n \t\tbreak;\r\n }\r\n\r\n echo \"</td>\\n\";\r\n }\r\n\r\n echo\"</tr>\\n\";\r\n }\r\n }\r\n\r\n echo \"</table>\\n\";\r\n echo \"<script type='text/javascript'>\r\n tab{$prefixo}_TotLin = \".mssql_num_rows($rs).\";\r\n tab{$prefixo}_AtuLin = -1;\r\n </script>\";\r\n\r\n return 0;\r\n}", "public function requerimientos_operaciones($com_id){\n $componente=$this->model_producto->requerimientos_componentes($com_id); /// lista de requerimientos\n $tabla='';\n $tabla .='<style>\n table{font-size: 9px;\n width: 100%;\n max-width:1550px;\n overflow-x: scroll;\n }\n th{\n padding: 1.4px;\n text-align: center;\n font-size: 9px;\n }\n </style>';\n $tabla .='<table table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\">\n <thead>\n <tr class=\"modo1\" style=\"height:45px;\">\n <th style=\"width:1%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>COD. OPE.</b></font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>PARTIDA</b></font></th>\n <th style=\"width:10%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>DESCRIPCI&Oacute;N DE LA PARTIDA</b></font></th>\n <th style=\"width:10%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>DETALLE/DESCRIPCI&Oacute;N DEL INSUMOS</b></font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>UNIDAD DE MEDIDA</b></font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>CANTIDAD</b></font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>UNITARIO</b></font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>TOTAL</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>ENE.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>FEB.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>MAR.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>ABR.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>MAY.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>JUN.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>JUL.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>AGO.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>SEP.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>OCT.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>NOV.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>DIC.</b></font></th>\n <th style=\"width:7%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>OBSERVACI&Oacute;N</b></font></th>\n </tr>\n </thead>\n <tbody>';\n foreach($componente as $row){\n $color='';\n if($row['ins_costo_total']!=$row['programado_total']){\n $color='#f9c9b6';\n }\n $tabla.='<tr class=\"modo1\" bgcolor=\"'.$color.'\">';\n $tabla.=' <td>'.$row['prod_cod'].'</td>\n <td>'.$row['par_codigo'].'</td>\n <td>'.mb_convert_encoding($row['par_nombre'], 'cp1252', 'UTF-8').'</td>\n <td>'.mb_convert_encoding($row['ins_detalle'], 'cp1252', 'UTF-8').'</td>\n <td>'.$row['ins_unidad_medida'].'</td>\n <td>'.$row['ins_cant_requerida'].'</td>\n <td>'.$row['ins_costo_unitario'].'</td>\n <td>'.$row['ins_costo_total'].'</td>\n <td>'.$row['mes1'].'</td>\n <td>'.$row['mes2'].'</td>\n <td>'.$row['mes3'].'</td>\n <td>'.$row['mes4'].'</td>\n <td>'.$row['mes5'].'</td>\n <td>'.$row['mes6'].'</td>\n <td>'.$row['mes7'].'</td>\n <td>'.$row['mes8'].'</td>\n <td>'.$row['mes9'].'</td>\n <td>'.$row['mes10'].'</td>\n <td>'.$row['mes11'].'</td>\n <td>'.$row['mes12'].'</td>\n <td>'.mb_convert_encoding($row['ins_observacion'], 'cp1252', 'UTF-8').'</td>';\n $tabla.='</tr>';\n\n }\n $tabla.='</tbody>\n </table>';\n\n return $tabla;\n }", "public function rechercherTous() {\n // select all query\n $sRequete = \"SELECT * FROM \" . $this->sNomTable .\"\n LEFT JOIN produit ON idProduit = iNoProduit\n \";\n\n // prepare query statement\n $stmt = $this->oConnexion->prepare($sRequete);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n }", "function ImprovedTable($header,$data)\n{\n\t//Anchuras de las columnas\n\t$w=array(60,30,20,35,35);\n\t//Cabeceras\n\t$l = mysql_connect(\"localhost\",\"pmm\",\"guhAf2eh\");\n\t//$l = mysql_connect(\"DBSERVER\",\"root\",\"root\");\n\tmysql_select_db(\"pmm_dbpruebas\", $l);\n\t//mysql_select_db(\"pmm_dbweb\", $l);\n\t$s = \"SELECT CONCAT_WS(' ',nombre,paterno,materno) AS cliente, d.calle, d.poblacion, d.estado, d.pais\n\tFROM catalogocliente cc\n\tINNER JOIN direccion d ON cc.id = d.codigo\n\tWHERE d.facturacion='SI'\n\tLIMIT 0,100\";\t\n\t$r = mysql_query($s,$l) or die($s);\n\t\n\tfor($i=0;$i<count($header);$i++)\n\t\t$this->Cell($w[$i],7,$header[$i],1,0,'C');\n\t$this->Ln();\n\t//Datos\t\n\t\twhile($row = mysql_fetch_array($r)){\n\t\t\t$this->Cell($w[0],6,$row[0],'LR');\n\t\t\t$this->Cell($w[1],6,$row[1],'LR');\n\t\t\t$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');\n\t\t\t$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');\n\t\t\t$this->Ln();\n\t\t}\n\t/*foreach($data as $row)\n\t{\n\t\t$this->Cell($w[0],6,$row[0],'LR');\n\t\t$this->Cell($w[1],6,$row[1],'LR');\n\t\t$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');\n\t\t$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');\n\t\t$this->Ln();\n\t}*/\n\t//Lnea de cierre\n\t$this->Cell(array_sum($w),0,'','T');\n}", "public function tablaProductos () \n\t\t{\t\t\n\t\t\t//Javascript !!!\n\t\t\taddJs('js/products_table.js');\n\t\t\thidden ('iter',0); \n\t\t\t\n\t\t\techo '<table id=\"tabla_productos\" bgColor=#333 cellspacing=1 cellpadding=2 width=700><tbody>';\n\t\t\techo '<tr>'.\n\t\t\t\t\t'<th>Cantidad</th><th>Producto</th><th>Precio<br>sin Iva</th>'.\n\t\t\t\t\t'<th>Precio<br>con Iva</th><th>Total Neto</th><th>Total</th><th></th></tr>';\n\n\t\t\techo '</tbody></table>';\n\n\t\t\techo '<table bgColor=#333 cellspacing=1 cellpadding=2 width=700>';\n\t\t\t$this->tablaSumatoria();\n\t\t\techo '</table>';\t\t\t\n\t\t}", "function simplecal_declarer_tables_objets_sql($tables) {\n\t$fields = array(\n\t\t\"id_evenement\" => \"bigint(21) NOT NULL auto_increment\",\n\t\t\"id_secteur\" => \"bigint(21) NOT NULL DEFAULT '0'\",\n\t\t\"id_rubrique\" => \"bigint(21) NOT NULL DEFAULT '0'\",\n\t\t\"id_trad\" => \"bigint(21) NOT NULL DEFAULT '0'\",\n\t\t\"id_objet\" => \"bigint(21) NOT NULL DEFAULT '0'\",\n\t\t\"type\" => \"varchar(25) NOT NULL\",\n\t\t\"titre\" => \"varchar(255) NOT NULL\",\n\t\t\"date_debut\" => \"datetime NOT NULL DEFAULT '0000-00-00 00:00:00'\",\n\t\t\"date_fin\" => \"datetime NOT NULL DEFAULT '0000-00-00 00:00:00'\",\n\t\t\"horaire\" => \"varchar(3) NOT NULL DEFAULT 'oui'\",\n\t\t\"descriptif\" => \"text NOT NULL\",\n\t\t\"texte\" => \"text NOT NULL\",\n\t\t'lieu'\t\t\t\t=> \"text NOT NULL DEFAULT ''\",\n\t\t'adresse'\t\t\t=> \"text NOT NULL DEFAULT ''\",\n\t\t\"lien_titre\" => \"varchar(255) NOT NULL\",\n\t\t\"lien_url\" => \"varchar(255) NOT NULL\",\n\t\t\"date\" => \"datetime NOT NULL DEFAULT '0000-00-00 00:00:00'\", // creation ou publication (selon statut) \n\t\t\"statut\" => \"varchar(20) DEFAULT '0' NOT NULL\",\n\t\t\"lang\" => \"varchar(10) NOT NULL DEFAULT ''\",\n\t\t\"langue_choisie\" => \"varchar(3) NULL DEFAULT 'non'\", \n\t\t\"maj\" => \"timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\"\n\t);\n\t\n\t// champs qui possedent les cles\n\t$key = array(\n\t\t\"PRIMARY KEY\" => \"id_evenement\",\n\t\t\"KEY statut\" => \"statut\", \n\t\t\"KEY id_secteur\" => \"id_secteur\",\n\t\t\"KEY id_rubrique\" => \"id_rubrique\",\n\t\t\"KEY id_trad\" => \"id_trad\",\n\t\t\"KEY lang\" => \"lang\"\n\t);\n\t\n\t// champ 'statut'\n\t$statut = array(\n\t\t'champ'=>'statut',\n\t\t'publie'=>'publie',\n\t\t'previsu'=>'publie,prop',\n\t\t'exception'=>'statut'\n\t);\n\t\n\t// titre des statuts\n\t$statut_titres = array(\n\t\t'prepa'=>'simplecal:titre_evenement_redaction',\n\t\t'prop' => 'simplecal:titre_evenement_propose',\n\t\t'publie' => 'simplecal:titre_evenement_publie',\n\t\t'refuse' => 'simplecal:titre_evenement_refuse',\n\t\t'poubelle'=>'simplecal:titre_evenement_supprime'\n\t);\n\t\n\t$statut_textes_instituer = array(\n\t\t'prepa' => 'texte_statut_en_cours_redaction',\n\t\t'prop' => 'texte_statut_propose_evaluation',\n\t\t'publie' => 'texte_statut_publie', \n\t\t'refuse' => 'texte_statut_refuse',\n\t\t'poubelle' => 'texte_statut_poubelle'\n\t);\n\t\n\t// La Table\n\t$tables['spip_evenements'] = array(\n\t\t'type' => 'evenement',\n\t\t'principale' => 'oui',\n\t\t'field'=> $fields,\n\t\t'key' => $key,\n\t\t'titre' => 'titre, lang',\n\t\t'date' => 'date', // indique le nom du field pour le formulaires_dater_charger_dist\n\t\t'champs_editables' => array('titre', 'date_debut', 'date_fin', 'horaire', 'descriptif', 'texte', 'lieu', 'adresse', 'lien_titre', 'lien_url', 'type', 'id_objet'),\n\t\t'champs_versionnes' => array('titre', 'descriptif', 'texte', 'lieu', 'adresse', 'lien_titre', 'lien_url'),\n\t\t'rechercher_champs' => array('titre'=>8, 'descriptif'=>4, 'texte'=>2),\n\t\t'tables_jointures' => array(),\n\t\t'statut' => array($statut),\n\t\t'statut_textes_instituer' => $statut_textes_instituer,\n\t\t'statut_titres' => $statut_titres,\n\t\t'texte_retour' => 'icone_retour',\n\t\t'texte_objets' => 'simplecal:evenements',\n\t\t'texte_objet' => 'simplecal:evenement',\n\t\t'texte_modifier' => 'simplecal:icone_modifier_evenement',\n\t\t'texte_creer' => 'simplecal:icone_nouvel_evenement',\n\t\t'info_aucun_objet'=> 'simplecal:info_aucun_evenement',\n\t\t'info_1_objet' => 'simplecal:info_1_evenement',\n\t\t'info_nb_objets' => 'simplecal:info_nb_evenements',\n\t\t'texte_logo_objet' => 'simplecal:logo_evenement',\n\t\t'texte_langue_objet' => 'simplecal:titre_langue_evenement',\n\t\t'texte_changer_statut' => 'simplecal:entree_evenement_publie'\n\t);\n\t\n\treturn $tables;\n}", "public function limparTabela(){\r\n\t\t$sql = 'DELETE FROM oficina';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->execute();\r\n\t}", "public function list_unidades_es($estado_ppto){\n $unidades=$this->model_proyecto->list_gasto_corriente();\n $tabla='';\n \n $color=''; \n if($estado_ppto==1){\n $color='#e2f4f9';\n }\n\n $tabla.='\n <table id=\"dt_basic3\" class=\"table1 table-bordered\" style=\"width:100%;\">\n <thead>\n <tr style=\"height:50px;\">\n <th style=\"width:1%;\" bgcolor=\"#474544\" title=\"\">#</th>\n <th style=\"width:5%;\" bgcolor=\"#474544\" title=\"\"></th>\n <th style=\"width:5%;\" bgcolor=\"#474544\" title=\"VER PPTO\">VER PARTIDAS</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"APERTURA PROGRAM&Aacute;TICA\">CATEGORIA PROGRAM&Aacute;TICA '.$this->gestion.'</th>\n <th style=\"width:25%;\" bgcolor=\"#474544\" title=\"DESCRIPCI&Oacute;N\">DESCRIPCI&Oacute;N</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"NIVEL\">NIVEL</th>\n <th style=\"width:15%;\" bgcolor=\"#474544\" title=\"TIPO DE ADMINISTRACIÓN\">TIPO DE ADMINISTRACI&Oacute;N</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"UNIDAD ADMINISTRATIVA\">UNIDAD ADMINISTRATIVA</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"UNIDAD EJECUTORA\">UNIDAD EJECUTORA</th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n foreach($unidades as $row){\n $aper=$this->model_ptto_sigep->partidas_proyecto($row['aper_id']);\n $nro++;\n $tabla.='<tr bgcolor='.$color.'>';\n $tabla.='<td style=\"height:30px;\" align=center>'.$nro.'</td>';\n $tabla.='<td>';\n if($estado_ppto==0){\n if(count($aper)!=0){\n $tabla .='\n <center><a data-toggle=\"modal\" data-target=\"#'.$row['aper_id'].'\" title=\"PARTIDAS ASIGNADAS\" ><img src=\"'.base_url().'assets/img/select.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></center>\n <div class=\"modal fade bs-example-modal-lg\" tabindex=\"-1\" id=\"'.$row['aper_id'].'\" role=\"dialog\" aria-labelledby=\"myLargeModalLabel\">\n <div class=\"modal-dialog modal-lg\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close text-danger\" data-dismiss=\"modal\" aria-hidden=\"true\">\n &times;\n </button>\n <h4 class=\"modal-title\">';\n if($this->gestion>2019){\n $tabla.=$row['tipo'].' '.$row['act_descripcion'].' '.$row['abrev'];\n }\n else{\n $tabla.=$row['proy_nombre'];\n }\n $tabla.='\n </h4>\n </div>\n <div class=\"modal-body no-padding\">\n <div class=\"well\">\n '.$this->partidas($row['aper_id'],1).' \n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:abreVentana(\\''.site_url(\"\").'/mnt/rep_partidas/'.$row['aper_id'].'\\');\" class=\"btn btn-primary\" title=\"IMPRIMIR PARTIDAS\">IMPRIMIR PARTIDAS</a>\n </div>\n </div>\n </div>\n </div>';\n }\n }\n $tabla.='</td>';\n $tabla.='<td>';\n if($this->tp_adm==1){\n if($estado_ppto==0){\n if(count($aper)!=0){\n $tabla .='<center><a href=\"'.site_url(\"\").'/mnt/edit_ptto_asig/'.$row['proy_id'].'\" title=\"MODIFICAR PRESUPUESTO ASIGNADO\" class=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/faseetapa.png\" WIDTH=\"34\" HEIGHT=\"34\"/></a></center>';\n }\n }\n else{\n $tabla.='<center><a href=\"'.site_url(\"\").'/mnt/ver_ptto_asig_final/'.$row['proy_id'].'\" id=\"myBtnn'.$row['proy_id'].'\" title=\"VER PRESUPUESTO ASIGNADO INICIAL - PROGRAMADO - APROBADO\" iclass=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/faseetapa.png\" WIDTH=\"34\" HEIGHT=\"34\"/></a></center>';\n }\n }\n $tabla.='</td>';\n $tabla.='<td><center>'.$row['aper_programa'].''.$row['aper_proyecto'].''.$row['aper_actividad'].'</center></td>';\n if($this->gestion>2019){\n $tabla.='<td style=\"font-size: 8pt;\"><b>'.$row['tipo'].' '.$row['act_descripcion'].' '.$row['abrev'].'</b></td>';\n }\n else{\n $tabla.='<td style=\"font-size: 8pt;\"><b>'.$row['proy_nombre'].'</b></td>';\n }\n $tabla.='<td>'.$row['nivel'].'</td>';\n $tabla.='<td>'.$row['tipo_adm'].'</td>';\n $tabla.='<td>'.strtoupper($row['dep_departamento']).'</td>';\n $tabla.='<td>'.strtoupper($row['dist_distrital']).'</td>';\n $tabla.='</tr>';\n }\n $tabla.='\n </tbody>\n </table>';\n\n return $tabla;\n }", "function refreshTable()\n {\n $subjectTable = $this->Main_model->get('subjects', 'id');\n\n $counter = 0;\n foreach ($subjectTable->result() as $row) {\n $counter++;\n echo '\n <tr>\n <td> ' . $counter . ' </td>\n <td> ' . $this->Subject_model->maskSubject($row->id) . ' </td>\n <td>\n <button class=\"btn btn-primary btn-sm edit\" value=\" ' . $row->id . ' \"><i class=\"fas fa-edit\"></i></button>\n <button class=\"btn btn-danger btn-sm delete\" value=\" ' . $row->id . ' \"><i class=\"fas fa-trash\"></i></button>\n </td>\n </tr>\n ';\n }\n }", "public function tabla()\n {\n\n \treturn Datatables::eloquent(Encargos::query())->make(true);\n }", "public function mis_objetivos_estrategicos(){\n $objetivos = $this->model_mestrategico->list_objetivos_estrategicos(); /// OBJETIVOS ESTRATEGICOS\n $tabla ='';\n $tabla .='<article class=\"col-xs-12 col-sm-12 col-md-12 col-lg-12\">\n <div class=\"jarviswidget jarviswidget-color-darken\" >\n <header>\n <span class=\"widget-icon\"> <i class=\"fa fa-arrows-v\"></i> </span>\n <h2 class=\"font-md\"><strong>OBJETIVOS ESTRATEGICOS</strong></h2> \n </header>\n <div>\n <a role=\"menuitem\" tabindex=\"-1\" href=\"#\" data-toggle=\"modal\" data-target=\"#modal_nuevo_ff\" class=\"btn btn-success\" style=\"width:14%;\" title=\"NUEVO REGISTRO - OBJETIVO ESTRATEGICO\">NUEVO REGISTRO</a><br><br>\n <div class=\"widget-body no-padding\">\n <table id=\"dt_basic\" class=\"table table table-bordered\" width=\"100%\">\n <thead>\n <tr>\n <th style=\"width:1%;\">NRO</th>\n <th style=\"width:3%;\">ACCI&Oacute;N ESTRATEGICA</th>\n <th style=\"width:10%;\">DESCRIPCI&Oacute;N OBJETIVO ESTRATEGICO</th>\n <th style=\"width:5%;\">GESTI&Oacute;N INICIO</th>\n <th style=\"width:5%;\">GESTI&Oacute;N FIN</th>\n <th style=\"width:3%;\">NUEVOS RESULTADOS</th>\n <th style=\"width:50%;\">RESULTADOS FINALES</th>\n <th style=\"width:5%;\">MODIFICAR</th>\n <th style=\"width:5%;\">ELIMINAR</th>\n <th style=\"width:5%;\" title=\"Alineacion PEI-POA\">REPORTE</th>\n <th style=\"width:5%;\" title=\"Exportar Alineacion a formato Excel\">EXP.</th>\n <th></th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n foreach($objetivos as $row){\n $nro++;\n $tabla .='<tr>';\n $tabla .='<td>'.$nro.'</td>';\n $tabla .='<td align=\"center\"><a href=\"'.site_url(\"\").'/me/acciones_estrategicas/'.$row['obj_id'].'\" title=\"ACCIONES ESTRATEGICAS\"><img src=\"' . base_url() . 'assets/img/folder.png\"\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td>'.$row['obj_codigo'].'.- '.$row['obj_descripcion'].'</td>';\n $tabla .='<td>'.$row['obj_gestion_inicio'].'</td>';\n $tabla .='<td>'.$row['obj_gestion_fin'].'</td>';\n $tabla .='<td align=\"center\"><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_add_rf\" class=\"btn btn-xs add_rf\" title=\"AGREGAR NUEVO RESULTADO FINAL\" name=\"'.$row['obj_id'].'\"><img src=\"'.base_url().'assets/ifinal/add.jpg\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td>';\n $rfinal=$this->model_mestrategico->list_resultados_final($row['obj_id']);\n if(count($rfinal)!=0){\n $tabla.='<table class=\"table table-bordered\">\n <thead>\n <tr>\n <th style=\"width:1%;\">NRO</th>\n <th style=\"width:1%;\"></th>\n <th style=\"width:2%;\">C&Oacute;DIGO</th>\n <th style=\"width:10%;\">RESULTADOS FINALES</th>\n <th style=\"width:7%;\">INDICADOR DE IMPACTO</th>\n <th style=\"width:3%;\">META</th>\n <th style=\"width:3%;\">2016</th>\n <th style=\"width:3%;\">2017</th>\n <th style=\"width:3%;\">2018</th>\n <th style=\"width:3%;\">2019</th>\n <th style=\"width:3%;\">2020</th>\n </tr>\n </thead>\n <tbody>';\n $nro_rf=0;\n foreach($rfinal as $rowr){\n $nro_rf++;\n $tabla.='<tr>';\n $tabla.='\n <td>'.$nro_rf.'</td>\n <td align=center><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_mod_rf\" class=\"btn btn-xs mod_rf\" title=\"MODIFICAR RESULTADO FINAL\" name=\"'.$row['obj_id'].'\" id=\"'.$rowr['rf_id'].'\"><img src=\"'.base_url().'assets/img/mod_icon.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>\n <td>'.$rowr['rf_cod'].'</td>\n <td>'.$rowr['rf_resultado'].'</td>\n <td>'.$rowr['rf_indicador'].'</td>\n <td>'.$rowr['rf_meta'].'</td>\n <td>'.$rowr['mes1'].'</td>\n <td>'.$rowr['mes2'].'</td>\n <td>'.$rowr['mes3'].'</td>\n <td>'.$rowr['mes4'].'</td>\n <td>'.$rowr['mes5'].'</td>';\n $tabla.='</tr>';\n }\n $tabla.='\n </tbody>\n </table>';\n }\n $tabla .='</td>';\n $tabla .='<td align=center><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_mod_ff\" class=\"btn btn-xs mod_ff\" title=\"MODIFICAR OBJETIVO ESTRATEGICO\" name=\"'.$row['obj_id'].'\"><img src=\"' . base_url() . 'assets/ifinal/modificar.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td align=center><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_del_ff\" class=\"btn btn-xs del_ff\" title=\"ELIMINAR OBJETIVO ESTRATEGICO\" name=\"'.$row['obj_id'].'\"><img src=\"' . base_url() . 'assets/ifinal/eliminar.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td align=center><a href=\"javascript:abreVentana_obj(\\''.site_url(\"\").'/me/reporte_obj/'.$row['obj_id'].'\\');\" title=\"REPORTE DE VINCULACION PEI\"><img src=\"' . base_url() . 'assets/ifinal/pdf.png\" WIDTH=\"35\" HEIGHT=\"35\"/></td>';\n $tabla .='<td align=center><a href=\"'.site_url(\"\").'/me/exportar_alineacion/'.$row['obj_id'].'\" title=\"EXPORTAR ALINEACION PEI-POA\" id=\"myBtn'.$row['obj_id'].'\"><img src=\"' . base_url() . 'assets/ifinal/excel.jpg\" WIDTH=\"40\"/></a></td>';\n $tabla .='<td align=\"center\"><img id=\"load'.$row['obj_id'].'\" style=\"display: none\" src=\"'.base_url().'/assets/img/loading.gif\" width=\"25\" height=\"25\" title=\"ESPERE UN MOMENTO, LA PAGINA SE ESTA CARGANDO..\"></td>';\n $tabla .='</tr>';\n $tabla.='<script>\n document.getElementById(\"myBtn'.$row['obj_id'].'\").addEventListener(\"click\", function(){\n document.getElementById(\"load'.$row['obj_id'].'\").style.display = \"block\";\n });\n </script>';\n }\n $tabla .='\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </article>';\n\n return $tabla;\n\n }", "public function indexTable()\n {\n $this->paginate = array('all', 'order' => array('modified' => 'desc'));\n $contentVariableTables = $this->paginate('ContentVariableTable');\n $this->set(compact('contentVariableTables', $contentVariableTables));\n }", "public function rellenarTabla($cabecera,$cuerpo,$ini,$fin,$tipo){\n \n if($tipo == '1'){\n $tabla = \"<table class='table font-10 text-center'>\";\n $tablaHead =\"<thead><tr><th class='text-center'>FAMILIAR</th>\";\n }else{\n $tabla = \"<table class='table font-10 text-center'>\";\n $tablaHead =\"<thead><tr><th>NOMBRE</th>\";\n }\n \n //*********Se agregan las cabeceras a las tablas********\n \n $numRegistros = count($cabecera);\n \n for ($i=$ini; $i < $fin; $i++) {\n \n if($i < $numRegistros){\n $tablaHead = $tablaHead.\"<th class='text-center'>\".$cabecera[$i]->NOMBRE_ENFER.\"</th>\";\n }\n \n }\n\n $endThead = \"</tr></thead>\";\n $tablaBody = \"<tbody>\";\n $seEncontroRel = FALSE;\n\n //***********se agrega el body a las tablas************\n\n foreach ($cuerpo as $rel) {\n $enfermedad = explode(\",\", $rel->ENFERMEDAD);\n $numEnf = count($enfermedad);\n $rowTable = \"</tr><td>\".$rel->NOMBRE_PAR.\"</td>\";\n //se recorre las enfermedades en base a un inicio y un fin\n for ($i=$ini; $i < $fin; $i++) {\n //es te if es para que en caso de que el fin sea mayor al del arreglo no se rompa\n if($i < $numRegistros){\n //se recorren los enfermedades relacionadas\n for ($j=0; $j < $numEnf; $j++) {\n //se valisa si son iguales\n if($cabecera[$i]->ID_ENFER_PK == $enfermedad[$j]){\n //echo \"valor 1 \".$cabecera[$i]->ID_ENFER_PK.\"<br>\";\n //echo \"valor 2 \".$enfermedad[$j].\"<br>\";\n $seEncontroRel = TRUE;\n break;\n }else{\n $seEncontroRel = FALSE;\n }\n }\n //en base a la variable se agrega si o no\n if($seEncontroRel == FALSE){\n //se agrega un No si no corresponde\n $rowTable = $rowTable.\"<td>NO</td>\";\n }else{\n //se agrega un Si cuando sena iguales\n $rowTable = $rowTable.\"<td>SI</td>\";\n }\n }\n }\n //se agregan los valores a la tabla\n $tablaBody = $tablaBody.$rowTable.\"<tr>\";\n }\n //*****************************************************\n \n $endTBody = \"</tbody>\";\n $endTabla = \"</table>\";\n \n //se concatenan todos los valores para la creacion de la tabla\n $tablaFamily = $tabla.$tablaHead.$endThead.$tablaBody.$endTBody.$endTabla;\n\n //Se regresa la tabla\n return $tablaFamily;\n }", "function traiter_tableau($bloc) {\n\t// id \"unique\" pour les id du tableau\n\t$tabid = substr(md5($bloc), 0, 4);\n\n\t// Decouper le tableau en lignes\n\tpreg_match_all(',([|].*)[|]\\n,UmsS', $bloc, $regs, PREG_PATTERN_ORDER);\n\t$lignes = array();\n\t$debut_table = $summary = '';\n\t$l = 0;\n\n\t// Traiter chaque ligne\n\t$reg_line1 = ',^(\\|(' . _RACCOURCI_TH_SPAN . '))+$,sS';\n\t$reg_line_all = ',^(' . _RACCOURCI_TH_SPAN . ')$,sS';\n\t$hc = $hl = array();\n\tforeach ($regs[1] as $ligne) {\n\t\t$l++;\n\n\t\t// Gestion de la premiere ligne :\n\t\tif ($l == 1) {\n\t\t\t// - <caption> et summary dans la premiere ligne :\n\t\t\t// || caption | summary || (|summary est optionnel)\n\t\t\tif (preg_match(',^\\|\\|([^|]*)(\\|(.*))?$,sS', rtrim($ligne, '|'), $cap)) {\n\t\t\t\t$cap = array_pad($cap, 4, null);\n\t\t\t\t$l = 0;\n\t\t\t\tif ($caption = trim($cap[1])) {\n\t\t\t\t\t$debut_table .= \"<caption>\" . $caption . \"</caption>\\n\";\n\t\t\t\t}\n\t\t\t\t$summary = ' summary=\"' . entites_html(trim($cap[3])) . '\"';\n\t\t\t}\n\t\t\t// - <thead> sous la forme |{{titre}}|{{titre}}|\n\t\t\t// Attention thead oblige a avoir tbody\n\t\t\telse {\n\t\t\t\tif (preg_match($reg_line1, $ligne, $thead)) {\n\t\t\t\t\tpreg_match_all('/\\|([^|]*)/S', $ligne, $cols);\n\t\t\t\t\t$ligne = '';\n\t\t\t\t\t$cols = $cols[1];\n\t\t\t\t\t$colspan = 1;\n\t\t\t\t\tfor ($c = count($cols) - 1; $c >= 0; $c--) {\n\t\t\t\t\t\t$attr = '';\n\t\t\t\t\t\tif ($cols[$c] == '<') {\n\t\t\t\t\t\t\t$colspan++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($colspan > 1) {\n\t\t\t\t\t\t\t\t$attr = \" colspan='$colspan'\";\n\t\t\t\t\t\t\t\t$colspan = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// inutile de garder le strong qui n'a servi que de marqueur\n\t\t\t\t\t\t\t$cols[$c] = str_replace(array('{', '}'), '', $cols[$c]);\n\t\t\t\t\t\t\t$ligne = \"<th id='id{$tabid}_c$c'$attr>$cols[$c]</th>$ligne\";\n\t\t\t\t\t\t\t$hc[$c] = \"id{$tabid}_c$c\"; // pour mettre dans les headers des td\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$debut_table .= \"<thead><tr class='row_first'>\" .\n\t\t\t\t\t\t$ligne . \"</tr></thead>\\n\";\n\t\t\t\t\t$l = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Sinon ligne normale\n\t\tif ($l) {\n\t\t\t// Gerer les listes a puce dans les cellules\n\t\t\t// on declenche simplement sur \\n- car il y a les\n\t\t\t// -* -# -? -! (qui produisent des -&nbsp;!)\n\t\t\tif (strpos($ligne, \"\\n-\") !== false) {\n\t\t\t\t$ligne = traiter_listes($ligne);\n\t\t\t}\n\n\t\t\t// tout mettre dans un tableau 2d\n\t\t\tpreg_match_all('/\\|([^|]*)/S', $ligne, $cols);\n\n\t\t\t// Pas de paragraphes dans les cellules\n\t\t\tforeach ($cols[1] as &$col) {\n\t\t\t\tif (strlen($col = trim($col))) {\n\t\t\t\t\t$col = preg_replace(\"/\\n{2,}/S\", \"<br /> <br />\", $col);\n\t\t\t\t\tif (_AUTOBR) {\n\t\t\t\t\t\t$col = str_replace(\"\\n\", _AUTOBR . \"\\n\", $col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// assembler le tableau\n\t\t\t$lignes[] = $cols[1];\n\t\t}\n\t}\n\n\t// maintenant qu'on a toutes les cellules\n\t// on prepare une liste de rowspan par defaut, a partir\n\t// du nombre de colonnes dans la premiere ligne.\n\t// Reperer egalement les colonnes numeriques pour les cadrer a droite\n\t$rowspans = $numeric = array();\n\t$n = $lignes ? count($lignes[0]) : 0;\n\t$k = count($lignes);\n\t// distinguer les colonnes numeriques a point ou a virgule,\n\t// pour les alignements eventuels sur \",\" ou \".\"\n\t$numeric_class = array(\n\t\t'.' => 'point',\n\t\t',' => 'virgule',\n\t\ttrue => ''\n\t);\n\tfor ($i = 0; $i < $n; $i++) {\n\t\t$align = true;\n\t\tfor ($j = 0; $j < $k; $j++) {\n\t\t\t$rowspans[$j][$i] = 1;\n\t\t\tif ($align and preg_match('/^[{+-]*(?:\\s|\\d)*([.,]?)\\d*[}]*$/', trim($lignes[$j][$i]), $r)) {\n\t\t\t\tif ($r[1]) {\n\t\t\t\t\t$align = $r[1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$align = '';\n\t\t\t}\n\t\t}\n\t\t$numeric[$i] = $align ? (\" class='numeric \" . $numeric_class[$align] . \"'\") : '';\n\t}\n\tfor ($j = 0; $j < $k; $j++) {\n\t\tif (preg_match($reg_line_all, $lignes[$j][0])) {\n\t\t\t$hl[$j] = \"id{$tabid}_l$j\"; // pour mettre dans les headers des td\n\t\t} else {\n\t\t\tunset($hl[0]);\n\t\t}\n\t}\n\tif (!isset($hl[0])) {\n\t\t$hl = array();\n\t} // toute la colonne ou rien\n\n\t// et on parcourt le tableau a l'envers pour ramasser les\n\t// colspan et rowspan en passant\n\t$html = '';\n\n\tfor ($l = count($lignes) - 1; $l >= 0; $l--) {\n\t\t$cols = $lignes[$l];\n\t\t$colspan = 1;\n\t\t$ligne = '';\n\n\t\tfor ($c = count($cols) - 1; $c >= 0; $c--) {\n\t\t\t$attr = $numeric[$c];\n\t\t\t$cell = trim($cols[$c]);\n\t\t\tif ($cell == '<') {\n\t\t\t\t$colspan++;\n\n\t\t\t} elseif ($cell == '^') {\n\t\t\t\t$rowspans[$l - 1][$c] += $rowspans[$l][$c];\n\n\t\t\t} else {\n\t\t\t\tif ($colspan > 1) {\n\t\t\t\t\t$attr .= \" colspan='$colspan'\";\n\t\t\t\t\t$colspan = 1;\n\t\t\t\t}\n\t\t\t\tif (($x = $rowspans[$l][$c]) > 1) {\n\t\t\t\t\t$attr .= \" rowspan='$x'\";\n\t\t\t\t}\n\t\t\t\t$b = ($c == 0 and isset($hl[$l])) ? 'th' : 'td';\n\t\t\t\t$h = (isset($hc[$c]) ? $hc[$c] : '') . ' ' . (($b == 'td' and isset($hl[$l])) ? $hl[$l] : '');\n\t\t\t\tif ($h = trim($h)) {\n\t\t\t\t\t$attr .= \" headers='$h'\";\n\t\t\t\t}\n\t\t\t\t// inutile de garder le strong qui n'a servi que de marqueur\n\t\t\t\tif ($b == 'th') {\n\t\t\t\t\t$attr .= \" id='\" . $hl[$l] . \"'\";\n\t\t\t\t\t$cols[$c] = str_replace(array('{', '}'), '', $cols[$c]);\n\t\t\t\t}\n\t\t\t\t$ligne = \"\\n<$b\" . $attr . '>' . $cols[$c] . \"</$b>\" . $ligne;\n\t\t\t}\n\t\t}\n\n\t\t// ligne complete\n\t\t$class = alterner($l + 1, 'odd', 'even');\n\t\t$html = \"<tr class='row_$class $class'>$ligne</tr>\\n$html\";\n\t}\n\n\treturn \"\\n\\n<table\" . $GLOBALS['class_spip_plus'] . $summary . \">\\n\"\n\t. $debut_table\n\t. \"<tbody>\\n\"\n\t. $html\n\t. \"</tbody>\\n\"\n\t. \"</table>\\n\\n\";\n}", "public function list_ptto_poa_final($tp_id){\n $lista_aper_padres = $this->model_proyecto->list_prog();//lista de aperturas padres \n $tabla ='';\n foreach($lista_aper_padres as $rowa){\n $proyectos=$this->model_ptto_sigep->acciones_operativas($rowa['aper_programa'],$tp_id);\n if(count($proyectos)!=0){\n $tabla .='<tr bgcolor=\"#99DDF0\" height=\"30\">';\n $tabla .='<td></td>';\n if($this->tp_adm==1){\n $tabla .='<td></td>';\n }\n $tabla .='<td><center>'.$rowa['aper_programa'].''.$rowa['aper_proyecto'].''.$rowa['aper_actividad'].'</center></td>';\n $tabla .='<td>'.$rowa['aper_descripcion'].'</td>';\n $tabla .='<td>'.$rowa['aper_sisin'].'</td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='</tr>';\n $nro=0;\n foreach($proyectos as $row){\n $nro++;\n // $fase = $this->model_faseetapa->get_id_fase($row['proy_id']);\n $aper=$this->model_ptto_sigep->partidas_proyecto($row['aper_id']);\n $tabla .= '<tr height=\"50\">';\n $tabla .= '<td align=center><center><img id=\"loadd'.$row['proy_id'].'\" style=\"display: none\" src=\"'.base_url().'/assets/img/loading.gif\" width=\"25\" height=\"25\" title=\"ESPERE UN MOMENTO, LA PAGINA SE ESTA CARGANDO..\"></center></td>';\n if($this->tp_adm==1){\n if(count($aper)!=0){\n $tabla .='<td><center><a href=\"'.site_url(\"\").'/mnt/ver_ptto_asig_final/'.$row['proy_id'].'\" id=\"myBtnn'.$row['proy_id'].'\" title=\"VER PRESUPUESTO ASIGNADO INICIAL - PROGRAMADO - APROBADO\" iclass=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/faseetapa.png\" WIDTH=\"34\" HEIGHT=\"34\"/></a></center></td>';\n }\n else{\n $tabla .='<td></td>';\n }\n }\n $tabla .= '<td align=center>'.$row['aper_programa'].''.$row['aper_proyecto'].''.$row['aper_actividad'].'</td>';\n $tabla .= '<td>'.$row['proy_id'].' | '.$row['proy_nombre'].'</td>';\n $tabla .= '<td>'.$row['tp_tipo'].'</td>';\n $tabla .= '<td>'.$row['proy_sisin'].'</td>';\n $tabla .= '<td>'.$row['fun_nombre'].' '.$row['fun_paterno'].' '.$row['fun_materno'].'</td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .= '</tr>';\n \n\n }\n }\n }\n return $tabla;\n }", "function ImprimeTablePOB($idTabla, $data, $pactu, $peli, $crxpag, $paginap = 1, $cantlink = 5,$orderby = -1,$buscar=\"\",$classCSS=\"\",$link_td=\"\") {\n\t\t $tabla=\"\";\n\t\t//$tabla.= Buscar($buscar);// formulario buscar si llamo a esta funcion solo serviria para el boton buscar no eventos teclado\n //$tabla.= '<table id=\"' . $idTabla . '\" class=\"'.$classCSS.'\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center\" ><tr>';\n\t\t $tabla.= '<table id=\"' . $idTabla . '\" class=\"'.$classCSS.'\" cellpadding=\"0\" cellspacing=\"1\" >';\n try {\n // if (count($data) > 0) {\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n if ($pactu != \"\") {\n if ($conta == 0) {;\n $tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n //Nombres de las columnas\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t$ordenar = $x + 1;\t\t\t\t\t\n\t\t\t\t\t//$tabla.= '<th><a href=\"?pagina=' . $paginap . '&orden=' . $ordenar . '\" >' . utf8_encode($data[\"columnas\"][$x]) . '</a></th>';\n\t\t\t\t\t$tabla.= '<th><a href=\"#\" onClick=\"Paginar(\\'pagina=' . $paginap . '&orden=' .$ordenar .'&busca=' .$buscar .'\\'); return false\" >' . utf8_encode($data[\"columnas\"][$x]) . '</a></th>'.\"\\n\";\n\t\t\t\t \n }\n $tabla.= \"</tr>\";\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n $fin = $paginap * $crxpag;\n $ini = $fin - $crxpag;\n for ($i = $ini;$i < $fin;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= '<tr>';\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"' . $pactu . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Mactualizar\"><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t \n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n // $tabla.= '<td><a href=\"' . $peli . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Eliminar\"><img src=\"../imgcixphp/ico_eliminar.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$peli.'('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n\t\t\t\t\t\t\tif($link_td!=\"\"){\t$ID= $data[\"cuerpo\"][$i][0] ; // ID\n\t\t\t\t\t\t\t\t$url =$link_td.\"?id=\".$ID;// Url mas id como dato mediante el metodo get \t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t $tabla.= '<td onclick=\"document.location=\\''.$url.'\\' \" >' . $data[\"cuerpo\"][$i][\"$columnas\"] . '</td>' . \"\\n\";\n\t\t\t\t\t\t\t }else{ \n\t\t\t\t\t\t\t\t$tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . '</td> '.\"\\n\";\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t// $tabla.= '<td>&nbsp;&nbsp;' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&nbsp;&nbsp; </td> '.\"\\n\";\n \n }\n }\n $tabla.= '</tr>'.\"\\n\";\t\t\t\t\n\t\t\t\t\t\n } \n\t\t\t\t//===========FIN CUERPO DE TABLA==============================================================================\n\t\t\t\t\t $tabla.= '</table><p style=\"clear:both;height:5px;\"></p>'; \n //===========PAGINADO======================================================================================================================\n $paginado = Paginar($cantele, $crxpag, $paginap, $cantlink,$orderby,$buscar);\n $tabla.= $paginado;\n //===========FIN PAGINADO ==================================================================================================================\n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Datos Registrados\"; \n\t\t\t \t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot></table><br>';\n\t\t\t\t}\n\t\t\t\n } catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "private function prepareTables() {}", "function tabla_lotes_compra($filas,$lot='',$art='',$gru=''){\n\t$lot = explode(\"|\", $lot);\n\t$art = explode(\"|\", $art);\n\t$gru = explode(\"|\", $gru);\n\t//----\n\t\t\t$salida.= '<table>';\n\t$i = 1;\t\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"celda\">Lote #: </td>';\n\t\t\t//-\n\t\t\t$desc = Agrega_Ceros($lot[$i]).\"-\".Agrega_Ceros($art[$i]).\"-\".Agrega_Ceros($gru[$i]);\n\t\t\t$salida.= '<td class = \"busqueda\">'.$desc;\n\t\t\t$salida.= '<input type = \"hidden\" name = \"TLlot'.$i.'\" id = \"TLlot'.$i.'\" value = \"'.$lot[$i].'\"/>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"TLart'.$i.'\" id = \"TLart'.$i.'\" value = \"'.$art[$i].'\"/>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"TLgru'.$i.'\" id = \"TLgru'.$i.'\" value = \"'.$gru[$i].'\"/>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '</tr>';\n\t\t}\n\t}else{\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><span class = \"celda\">No hay Lotes Enlazados</span></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"TLlot0\" id = \"TLot0\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"TLart0\" id = \"TLart0\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"TLgru0\" id = \"TLgru0\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '</tr>';\n\t}\t\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"LotTotal\" id = \"LotTotal\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\n\treturn $salida;\n}", "function getTablas() {\r\n $tablas['inventario_equipo']['id']='inventario_equipo';\r\n $tablas['inventario_equipo']['nombre']='Inventario (equipo)';\r\n\r\n $tablas['inventario_grupo']['id']='inventario_grupo';\r\n $tablas['inventario_grupo']['nombre']='Inventario (grupo)';\r\n\r\n $tablas['inventario_estado']['id']='inventario_estado';\r\n $tablas['inventario_estado']['nombre']='Inventario (estado)';\r\n\r\n $tablas['inventario_marca']['id']='inventario_marca';\r\n $tablas['inventario_marca']['nombre']='Inventario (marca)';\r\n\r\n $tablas['obligacion_clausula']['id']='obligacion_clausula';\r\n $tablas['obligacion_clausula']['nombre']='Obligacion (clausula)';\r\n\r\n $tablas['obligacion_componente']['id']='obligacion_componente';\r\n $tablas['obligacion_componente']['nombre']='Obligacion (componente)';\r\n\r\n $tablas['documento_tipo']['id']='documento_tipo';\r\n $tablas['documento_tipo']['nombre']='Documento (Tipo)';\r\n\r\n \t\t$tablas['documento_tema']['id']='documento_tema';\r\n \t\t$tablas['documento_tema']['nombre']='Documento (Tema)';\r\n\r\n \t\t$tablas['documento_subtema']['id']='documento_subtema';\r\n \t\t$tablas['documento_subtema']['nombre']='Documento (Subtema)';\r\n\r\n \t\t$tablas['documento_estado']['id']='documento_estado';\r\n \t\t$tablas['documento_estado']['nombre']='Documento (Estado)';\r\n\r\n \t\t$tablas['documento_estado_respuesta']['id']='documento_estado_respuesta';\r\n \t\t$tablas['documento_estado_respuesta']['nombre']='Documento (Estado Respuesta)';\r\n\r\n \t\t$tablas['documento_actor']['id']='documento_actor';\r\n \t\t$tablas['documento_actor']['nombre']='Documento (Responsables)';\r\n\r\n \t\t$tablas['documento_tipo_actor']['id']='documento_tipo_actor';\r\n \t\t$tablas['documento_tipo_actor']['nombre']='Documento (Tipo de Responsable)';\r\n\r\n \t\t$tablas['riesgo_probabilidad']['id']='riesgo_probabilidad';\r\n \t\t$tablas['riesgo_probabilidad']['nombre']='Riesgo (Probabilidad)';\r\n\r\n \t\t$tablas['riesgo_categoria']['id']='riesgo_categoria';\r\n \t\t$tablas['riesgo_categoria']['nombre']='Riesgo (Categoria)';\r\n\r\n \t\t$tablas['riesgo_impacto']['id']='riesgo_impacto';\r\n \t\t$tablas['riesgo_impacto']['nombre']='Riesgo (Impacto)';\r\n\r\n \t\t$tablas['compromiso_estado']['id']='compromiso_estado';\r\n \t\t$tablas['compromiso_estado']['nombre']='Compromisos (Estado)';\r\n\r\n \t\t$tablas['departamento']['id']='departamento';\r\n \t\t$tablas['departamento']['nombre']='Departamentos';\r\n\r\n \t\t$tablas['departamento_region']['id']='departamento_region';\r\n \t\t$tablas['departamento_region']['nombre']='Departamentos (Region)';\r\n\r\n \t\t$tablas['municipio']['id']='municipio';\r\n \t\t$tablas['municipio']['nombre']='Municipios';\r\n\r\n $tablas['operador']['id']='operador';\r\n\t $tablas['operador']['nombre']='Operador';\r\n\r\n asort($tablas);\r\n return $tablas;\r\n }", "function refreshTable(){\n\t\t$this->table = array();\n\n\t\t//set the column headers\n\t\t$this->table[0] = $this->getColumnHeaders();\n\n\t\t//add a row for each user\n\t\tforeach ($this->users as $name => $schedule) {\n\t\t\t$row = array();\n\n\t\t\t//if this user is being edited\n\t\t\tif($this->currentEdit == $name) $row = $this->userEditRow($name, $schedule, $this->table[0]);\n\t\t\telse $row = $this->userDisplayRow($name, $schedule, $this->table[0]);\n\t\t\t\n\t\t\tarray_push($this->table, $row);\n\t\t}\n\n\t\tarray_push($this->table, $this->genSubmitRow());\n\n\t\tarray_push($this->table, $this->genTotalRow());\n\n\t\t$this->logMsg(SUCCESS, 'internal table constructed');\n\t}", "function insertTableInsumosVendidos($headers,$matrizDatos) {\n //verificar tabla a insertar (posteriormente puede ser una funcion):\n\n\n\n\n echo '<div class=\"card-body\">\n <div class=\"table-responsive\" >\n <table class=\"table table-bordered dataTableClase\" width=\"100%\" cellspacing=\"0\">'; //apertura de etiquetas\n //rellenar head:\n echo '<thead><tr>';\n foreach ($headers as $hd) {\n echo \"<th>\".$hd.\"</th>\";\n }\n echo'</tr></thead>';\n //rellenar el footer:\n echo '<tfoot><tr>';\n foreach ($headers as $hd) {\n echo \"<th>\".$hd.\"</th>\";\n }\n echo'</tr></tfoot>';\n echo '<tbody>';\n foreach ($matrizDatos as $reg) {\n echo \"<tr>\";\n foreach ($reg as $cell) {\n echo \"<td>\".$cap = ucfirst(mb_strtolower($cell)).\"</td>\"; // Capitalize\n }\n echo \"</tr>\";\n }\n echo '</tbody></table></div></div>'; //cierre etiquetas tabla\n}", "function mysql04($tabla){\n $qColumnNames = mysql_query(\"SHOW COLUMNS FROM \".$tabla) or die(\"mysql error\");\n $numColumns = mysql_num_rows($qColumnNames);\n $i = 0;\n while ( $i < $numColumns ){\n $colname = mysql_fetch_row($qColumnNames);\n $col[$i] = \"<th>\".$colname[0].\"</th>\";\n $i++;\n }\n $h = 0;\n $resultado[0] = \"<tr>\";\n while ( $h < $numColumns ){\n $resultado[0] = $resultado[0] . $col[$h];\n $h++;\n }\n $resultado[0] = $resultado[0].\"</tr>\";\n $query01=\"SELECT * FROM \".$tabla;\n $query02=mysql_query($query01);\n $numLines = mysql_num_rows($query02);\n\n $j=0;\n while( $rec = mysql_fetch_row($query02) ){\n for( $k = 0; $k != $numColumns ; $k++){\n if ( $resultado[1 + $j] == \"\" ){\n $resultado[1 + $j] = \"<tr>\";\n }\n if ( $rec[$k] == \"\" ){\n $rec[$k] = \"-\";\n }\n $resultado[1 + $j] = $resultado[1 + $j].\"<td>\".$rec[$k].\"</td>\";\n }\n $resultado[1 + $j] = $resultado[1 + $j].\"</tr>\";\n $j++;\n }\n return $resultado;\n/*\nCOMO USARLO\n$tabla = '';\n$resultado = mysql04($tabla);\necho \"<table>\";\n foreach( $resultado as $value ){\n\techo $value;\n}\necho \"</table>\";\n*/\n}", "function ispis_tablice($ucenici)\n {\n echo '<table border=1>';\n foreach ($ucenici as $key => $ime) {\n echo '<tr><td>'\n .$key.'</td>;\n <td>'.$ime.'</td>;\n </tr>';\n }\n echo '</table>';\n }", "function flip_tables() {\r\n\t\t$tables_flipped_counter = 0;\r\n\t\t$new_tables_array = array();\r\n\t\t$tables = OM::getAllOStrings($this->code, '<table', '</table>');\r\n\t\t//print('$tables: ');var_dump($tables);exit(0);\r\n\t\tforeach($tables as $table) {\r\n\t\t\t$new_table_array = array();\r\n\t\t\tpreg_match_all('/<(tr)([^<>]*?)>(.*?)<\\/\\1>/is', $table[0], $tr_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t//print('$tr_matches: ');var_dump($tr_matches);exit(0);\r\n\t\t\t$rowspan = 1;\r\n\t\t\t//$debug_counter = 0;\r\n\t\t\tforeach($tr_matches[0] as $index => $value) {\r\n\t\t\t\tpreg_match_all('/<(td|th)([^<>]*?)>(.*?)<\\/\\1>/is', $value[0], $cell_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\tif($rowspan > 1) {\r\n\t\t\t\t\tforeach($cell_matches[0] as $index2 => $value2) {\r\n\t\t\t\t\t\tpreg_match_all('/rowspan=\"([^\"]*?)\"/is', $value2[0], $rowspan_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\t\t\tif(sizeof($rowspan_matches[0]) > 0) {\r\n\t\t\t\t\t\t\t$rowspan = (int)$rowspan_matches[1][0][0];\r\n\t\t\t\t\t\t\t//print('$rowspan2: ');var_dump($rowspan);exit(0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$new_table_array[$index2 + 1][] = $value2[0];\r\n\t\t\t\t\t} \r\n\t\t\t\t} else {\r\n\t\t\t\t\tforeach($cell_matches[0] as $index2 => $value2) {\r\n\t\t\t\t\t\tpreg_match_all('/rowspan=\"([^\"]*?)\"/is', $value2[0], $rowspan_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\t\t\tif(sizeof($rowspan_matches[0]) > 0) {\r\n\t\t\t\t\t\t\t//print('$rowspan_matches: ');var_dump($rowspan_matches);exit(0);\r\n\t\t\t\t\t\t\t$rowspan = (int)$rowspan_matches[1][0][0] + 1;\r\n\t\t\t\t\t\t\t//print('$rowspan2: ');var_dump($rowspan);exit(0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$new_table_array[$index2][] = $value2[0];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$rowspan--;\r\n\t\t\t\t/*if($debug_counter === 8) {\r\n\t\t\t\t\t//print('$new_table_array: ');var_dump($new_table_array);exit(0);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t$debug_counter++;*/\r\n\t\t\t}\r\n\t\t\t$new_tables_array[] = $new_table_array;\r\n\t\t}\r\n\t\t//print('$new_tables_array: ');var_dump($new_tables_array);exit(0);\r\n\t\t$reversed_tables = array_reverse($tables);\r\n\t\t$counter = sizeof($reversed_tables) - 1;\r\n\t\tforeach($reversed_tables as $table) {\r\n\t\t\t$new_table_code = '<table>\r\n';\r\n\t\t\tforeach($new_tables_array[$counter] as $row => $cells) {\r\n\t\t\t\t$new_table_code .= '<tr>\r\n';\r\n\t\t\t\tforeach($cells as $cell) {\r\n\t\t\t\t\t$cell = str_replace('colspan', 'XXXrow9o9spanXXX', $cell);\r\n\t\t\t\t\t$cell = str_replace('rowspan', 'colspan', $cell);\r\n\t\t\t\t\t$cell = str_replace('XXXrow9o9spanXXX', 'rowspan', $cell);\r\n\t\t\t\t\t$new_table_code .= $cell . '\r\n';\r\n\t\t\t\t}\r\n\t\t\t\t$new_table_code .= '</tr>\r\n';\r\n\t\t\t}\r\n\t\t\t$new_table_code .= '</table>';\r\n\t\t\t$this->code = substr($this->code, 0, $table[1]) . $new_table_code . '<table deleteme=\"y\"' . substr($this->code, $table[1] + 6);\r\n\t\t\t$counter--;\r\n\t\t\t$tables_flipped_counter++;\r\n\t\t}\r\n\t\t\r\n\t\t// fucking DOM...\r\n\t\t/*$query = '//' . ReTidy::get_html_namespace() . 'table';\r\n\t\t$tables = $this->xpath->query($query);\r\n\t\tforeach($tables as $table) {\r\n\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'tr';\r\n\t\t\t$trs = $this->xpath->query($query, $table);\r\n\t\t\t$new_table_array = array();\r\n\t\t\t$record_max_cells_per_row = 0;\r\n\t\t\t$row = 0;\r\n\t\t\tforeach($trs as $tr) {\r\n\t\t\t\t$max_cells_per_row = 0;\r\n\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'th | .//' . ReTidy::get_html_namespace() . 'td';\r\n\t\t\t\t$cells = $this->xpath->query($query, $tr);\r\n\t\t\t\t$new_tr_array = array();\r\n\t\t\t\tforeach($cells as $cell) {\r\n\t\t\t\t\t$new_tr_array[] = $cell;\r\n\t\t\t\t\t$max_cells_per_row++;\r\n\t\t\t\t}\r\n\t\t\t\t$new_table_array[$row] = $new_tr_array;\r\n\t\t\t\tif($max_cells_per_row > $record_max_cells_per_row) {\r\n\t\t\t\t\t$record_max_cells_per_row = $max_cells_per_row;\r\n\t\t\t\t}\r\n\t\t\t\t$row++;\r\n\t\t\t}\r\n\t\t\t//var_dump($new_table_array);\r\n\t\t\t//$new_table = new DOMElement('table');\r\n\t\t\t$new_table = $this->dom->createElementNS(self::$xhtmlns, 'table');\r\n\t\t\t$tr_counter = 0;\r\n\t\t\twhile($tr_counter < $record_max_cells_per_row) {\r\n\t\t\t\tprint('here4585687979789<br>');\r\n\t\t\t\t//$new_tr = new DOMElement('tr');\r\n\t\t\t\t$new_tr = $this->dom->createElementNS(self::$xhtmlns, 'tr');\r\n\t\t\t\tforeach($new_table_array as $row => $cells) {\r\n\t\t\t\t\tprint('here4585687979790<br>');\r\n\t\t\t\t\tforeach($cells as $index => $cell) {\r\n\t\t\t\t\t\tprint('here4585687979791<br>');\r\n\t\t\t\t\t\t//if($index === $tr_counter) {\r\n\t\t\t\t\t\t\tprint('here4585687979792<br>');\r\n\t\t\t\t\t\t\t//$clone = $cell->cloneNode(true);\r\n\t\t\t\t\t\t\t$new_tr->appendChild($cell);\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t$new_table->appendChild($new_tr);\r\n\t\t\t\t$tr_counter++;\r\n\t\t\t}\r\n\t\t\t$table->parentNode->appendChild($new_table);\r\n\t\t\t//$table->parentNode->appendChild(new DOMText(\"XXX9o9NewTagEndXXXccc9o9XXX\"));\r\n\t\t\t//$previousElement->appendChild(new DOMText(\"XXX9o9NewTagEndXXXstrong9o9XXX\"));\r\n\t\t\t//$tr_cell->appendChild(new DOMText(ReTidy::DOM_decoded_for_DOM_child_of($element_cell)));\r\n\t\t\t$table->setAttribute('deleteme', 'y');\r\n\t\t\t$tables_flipped_counter++;\r\n\t\t}*/\r\n\t\t$this->logMsgIf('tables flipped', $tables_flipped_counter);\r\n\t\treturn $tables_flipped_counter;\r\n\t}", "function imprimir_contadores($fila,$contadores){\n\t for($i=0; $i<8;$i++){\n\t echo'<td>'.$contadores[$fila][$i].'</td>';\n\t }\n\n\t }", "function tableauToHTML(array $tab)\n{\n echo \"<table>\";\n foreach ($tab as $i => $ligne) {\n echo \"<tr>\";\n foreach ($ligne as $j => $valeur) {\n echo \"<td>$valeur</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "public function toTable(){\r\n\t\t$datas = array();\r\n\t\tforeach ($this as $key => $value) {\r\n\t\t\tif(!in_array($key, $this->arraysis)){\r\n\t\t\t\t$datas[$key] = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $datas;\r\n\t}", "function generar()\r\n\t{\r\n\t\tforeach($this->columnas as $ef) {\r\n\t\t \t$this->datos->tabla('columnas')->nueva_fila($ef->get_datos());\r\n\t\t}\r\n\t\tparent::generar();\r\n\t}", "function populate_table()\n\t{\n\t\t$this->table = array();\n\n\t\t$prev_row = array();\n\t\tfor ($i = -1; $i < $this->data_new_len; $i++)\n\t\t{\n\t\t\t$prev_row[$i] = 0;\n\t\t}\n\n\t\tfor ($i = 0; $i < $this->data_old_len; $i++)\n\t\t{\n\t\t\t$this_row = array('-1' => 0);\n\t\t\t$data_old_value = $this->data_old[$i];\n\n\t\t\tfor ($j = 0; $j < $this->data_new_len; $j++)\n\t\t\t{\n\t\t\t\tif ($data_old_value == $this->data_new[$j])\n\t\t\t\t{\n\t\t\t\t\t$this_row[$j] = $prev_row[$j - 1] + 1;\n\t\t\t\t}\n\t\t\t\telse if ($this_row[$j - 1] > $prev_row[$j])\n\t\t\t\t{\n\t\t\t\t\t$this_row[$j] = $this_row[$j - 1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this_row[$j] = $prev_row[$j];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->table[$i - 1] = $this->compress_row($prev_row);\n\t\t\t$prev_row = $this_row;\n\t\t}\n\t\tunset($prev_row);\n\t\t$this->table[$this->data_old_len - 1] = $this->compress_row($this_row);\n\t}", "function mesabonnes_declarer_tables_objets_sql($tables){\r\n\t$tables['spip_mesabonnes'] = array(\r\n\t\t/* Declarations principales */\r\n\t\t'table_objet' => 'mesabonnes',\r\n\t\t'table_objet_surnoms' => array('mesabonnes'),\r\n\t\t'type' => 'mesabonnes',\r\n\t\t'type_surnoms' => array('mesabonnes'),\r\n\r\n\t\t/* La table */\r\n\t\t'field'=> array(\r\n\t\t\t\t\"id_abonne\" \t=> \"bigint(21) NOT NULL auto_increment\",\r\n\t\t\t\t\"nom\"\t=> \"text DEFAULT '' NOT NULL\",\r\n\t\t\t\t\"email\"\t=> \"text DEFAULT '' NOT NULL\",\r\n\t\t\t\t\"lang\"\t=> \"tinytext DEFAULT '' NOT NULL\",\r\n\t\t\t\t\"date_modif\"\t=> \"datetime DEFAULT '0000-00-00 00:00:00' NOT NULL\",\r\n\t\t\t\t\"liste\"\t=> \"text DEFAULT '' NOT NULL\", // pas utilise pour l'instant, gestion multi-liste ?\r\n\t\t\t\t\"statut\"\t=> \"varchar(6) DEFAULT '0' NOT NULL\"),\r\n\t\t'key' => array(\r\n\t\t\t\"PRIMARY KEY\" => \"id_abonne\",\r\n\t\t),\r\n\t\t'principale' => 'oui'\r\n\r\n\t);\r\n\r\n\r\n\treturn $tables;\r\n}", "function OptimizeTables() {}", "function afficherListeElements($listOfElements) {\n $afficher = \"<p id='titre'>Les résultats de votre recherche : </p> \";\n $afficher .= ' <table id=\"table_recherche_individu\" >';\n $afficher .= '<thead>';\n $afficher .= ' <tr>';\n $afficher .= '<th id=\"table_recherche_individu\"> Votre choix </th> ';\n $afficher .= '<th id=\"table_recherche_individu\"> ID </th> ';\n $afficher .= '<th id=\"table_recherche_individu\"> nom </th>';\n $afficher .= ' <th id=\"table_recherche_individu\"> prnom </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> rue </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> ville </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> code postale </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> departement </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> email </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> tel </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> date de nissance </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> droit </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> mot de passe </th>';\n $afficher .= ' <th id=\"table_recherche_individu\"> date d\\'inscrire </th>';\n $afficher .= '<th id=\"table_recherche_individu\">nike name </th>';\n $afficher .= '</tr>';\n $afficher .= '<thead>';\n $afficher .= '<tbody>';\n\n\n foreach ($listOfElements as $individu) {\n\n\n $afficher .= '<tr>';\n $afficher .= '<td> <input type=\"radio\" name=\"select_individu\" </td>';\n $afficher .= \"<td id='table_recherche_individu'>\" . $individu->getIdUser() . \" \n <td id='table_recherche_individu'>\" . $individu->getNom() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getPrenom() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getRue() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getVille() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getCodePostal() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getDept() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getEmail() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getTelephone() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getDateNaissance() . \"</td> \n <td id='table_recherche_individu'>\" . $individu->getDroit() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getMdp() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getDateInscription() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getPseudo() . \"</td>\n \n </tr>\";\n }\n $afficher .= \"</tbody>\n</table>\";\n $afficher .= '<div id=\"button-table\"><br /><input id=\"submit\" type=\"submit\" name=\"submit\" value=\"Modifier votre recherche\" /> <button id=\"submit\" type=\"submit\" name=\"submit\" value=\"Valider votre choix\" >Valider votre choix</button>\n <br /><br /></div>';\n echo $afficher;\n}", "public function getTableOfContents();", "function tabla($result) {\n $tabla = \"\";\n while ($registro = mysqli_fetch_assoc($result)) {\n $tabla = $tabla .\n \"<div class='panel panel-default'>\n <div class='panel-heading'>\n <h4 class='panel-title'><a href='#'>\" . $registro[\"CurNom\"] . \"</a></h4>\n </div>\n <DIV class='panel-body' hidden>\n <div class='table-responsive'>\n <table class='table table-hover'>\n <tr> \n <Th>Criterio</Th>\n <Th>Nota</Th> \n </tr>\n <tr>\n <td>Evaluación Continua</td>\n <td>\" . $registro['NotaFinal1'] . \"</td>\n </tr>\n <tr>\n <td>Tareas y Practicas</td> \n <td>\" . $registro['NotaFinal2'] . \"</td> \n </tr>\n <tr>\n <td>Examen</td> \n <td>\" . $registro['NotaFinal3'] . \"</td> \n </tr> \n <tr>\n <th>Nota FINAL</th> \n <th>15</th> \n </tr>\n </table>\n </div>\n </DIV>\n </div>\\n\";\n }\n return $tabla;\n }", "public function dataTable();", "public function TableDrawFacturas($idCotizacion,$idFactura)\r\n {\r\n \r\n\r\n//$Columnas=mysql_query(\"describe $tabla\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n//$Columnas=mysql_fetch_array($Columnas);\t\r\nsession_start();\r\n\r\n\r\n$Columnas1=mysql_query(\"select * from cotizaciones where NumCotizacion = '$idCotizacion'\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n$reg=mysql_fetch_array($Columnas1);\t\r\n$numCols=count($reg);\r\n\r\n//print_r($Columnas1);\r\n//print_r($Columnas);\r\n\r\nprint('\r\n\r\n\r\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" align=\"center\" style=\"width:100%;border-left: 1px solid #000000;\r\n\t\tborder-right: 1px solid #000000;\r\n\t\tborder-top: 1px solid #000000;\r\n\t\tborder-bottom: 1px solid #000000;\">\r\n \r\n\r\n <tr> \r\n <td width=\"200\" colspan=\"8\" align=\"center\" style= \"border: 1px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\">\r\n Seleccione un producto</td>\r\n </tr> <tr> ');\r\n\r\nfor ($i=0; $i<=$numCols; $i++){\r\n\t\r\n\t\t$NombreCol[$i]=mysql_field_name($Columnas1,$i);\t\r\n\t\tif ($NombreCol[$i]==\"\"){\r\n\t\t\tunset($NombreCol[$i]); \r\n\t\t\t$NombreCol = array_values($NombreCol);//quito el espacio que ha quedado despues de eliminarse \r\n\t\t}else{\r\n\t\t\tif($i<>1 and $i<7)\r\n\t\t\tprint('<td width=\"200\" align=\"center\" style= \"border: 0px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\"><h5>'.$NombreCol[$i].'</h5></td>');\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n}\r\n\r\n\r\nprint('<td width=\"200\" align=\"center\" style= \"border: 0px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\">Cantidad</td>');\r\n\r\n\r\n$this->ID=$NombreCol[0];\r\n\r\n$numCols=count($NombreCol);\r\n$this->NumCols=$numCols;\r\n\r\n\r\n\t\r\n\tprint('<tr>');\r\n\t\r\n\t$reg=mysql_query(\"select * from cotizaciones where NumCotizacion = '$idCotizacion' AND Devuelto=''\", $this->con) or die('no se pudo conectar a cotizaciones 2: ' . mysql_error());\r\n\t\t$i=0;\r\n\t\twhile($datos=mysql_fetch_array($reg)){\r\n\t\t$i++;\r\n\t\tif($i%2)\r\n\t\t\t\t\t\t$backgroundRow=$this->back1;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$backgroundRow=$this->back2;\r\n\t\t\t\t\t\t\r\n\t\t\tfor($z=0;$z<$this->NumCols;$z++){\r\n\t\t\t\t\t//$mod=\r\n\t\t\t\t\tif($z<>1 and $z<7)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tprint('<td width=\"200\" style= \"border: 0px solid #000000;color:'.$this->fontCeldas.';font: oblique 100% sans-serif bold;background-color:'.$backgroundRow.'\">'.$datos[$z].'</td>');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\tprint('<td width=\"200\" style= \"border: 0px solid #000000;color:'.$this->fontCeldas.';font: oblique 100% sans-serif bold;background-color:'.$backgroundRow.'\">\r\n\t\t\t\t<form name=\"formAgregaItems'.$datos[0].'\" id=\"formAgregaItems'.$datos[0].'\" method=\"POST\" action=\"VerFacturas.php\" target=\"_self\" >\r\n\t\t\t\t<input type=\"hidden\" name=\"TxtBuscarFactura\" value=\"'.$idFactura.'\">\r\n\t\t\t\t\t\t<textarea type=\"text\" name=\"TxtObservaciones\" value=\"\" placeholder=\"Observaciones\"></textarea>\r\n\t\t\t\t\t\t<input type=\"number\" name=\"TxtCantidadDev\" value=\"'.$datos[7].'\" min=\"0\" max=\"'.$datos[7].'\" step=\"any\" readonly style=\"font-size:1em; color:#333; font-family:Arial, sans-serif;\">\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"ItemVenta\" value=\"'.$datos[0].'\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<input type=\"submit\" name=\"BtnDevolver\" value=\"Devolver\"></form></td>');\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tprint(\"</tr><tr nobr=true >\");\r\n }\r\n \r\n\t\t\r\n\t\t\r\n\r\n$EspacioCol=$numCols+1;\t\r\nprint('</tr><tr>\r\n\r\n<td width=\"200\" colspan=\"8\" align=\"CENTER\" style= \"border: 1px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\">\r\nTechno Soluciones\r\n</td>\r\n');\r\n\r\nprint('</tr></table>');\r\n\r\n//print($this->NumCols);\r\n\r\n}", "private function ListaNoticias(){\r\n \r\n $tabela = '<table id=\"tabela\" class=\"noticia\">\r\n <tr>\r\n \t<th>Data</th>\r\n \t<th>Titulo</th>\r\n <th>Editar</th>\r\n <th>Excluir</th>\r\n </tr>\r\n ';\r\n $a = $this -> __bdnoticia -> GetNoticia();\r\n while ($not = mysql_fetch_array($a)){ \r\n $tabela = $tabela . '\r\n <tr>\r\n <td>'. funcoes::DecorarData(funcoes::ConvertDateBD(substr($not['datahora'],0,10))).'</td>\r\n <td>'.stripslashes(base64_decode($not['titulo'])).'</td>\r\n <td><center><a href=\"#\" class=\"editar\" id=\"'.$not[0].'\"><img src=\"images/edit.png\" alt=\"\" /></a></center></td>\r\n <td><center><a href=\"#\" class=\"excluir\" id=\"'.$not[0].'\"><img src=\"images/excluir.png\" alt=\"\" /></a></center></td>\r\n </tr>';\r\n \r\n }\r\n \r\n $tabela = $tabela .'\r\n </table>';\r\n \r\n \r\n \r\n return $tabela;\r\n \r\n }", "public function makeTableur()\n {\n return $this->setDocumentPropertiesWithMetas(new Spreadsheet());\n }", "function tabla_filas_proyecto_pago($filas,$tpago,$monto,$moneda,$tcambio,$opera,$boucher,$observ,$tcambiodia){\n\t\t$tpago = explode(\"|\", $tpago);\n\t\t$monto = explode(\"|\", $monto);\n\t\t$moneda = explode(\"|\", $moneda);\n\t\t$tcambio = explode(\"|\", $tcambio);\n\t\t$opera = explode(\"|\", $opera);\n\t\t$boucher = explode(\"|\", $boucher);\n\t\t$observ = explode(\"|\", $observ);\n\t\t//----\n\t\t\t$salida.= '<table>';\n\t$i = 1;\t\n\t$total = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//acumulado\n\t\t\t$Dcambiar = 0;\n\t\t\t$Dcambiar = Cambio_Moneda($tcambio[$i],$tcambiodia,$monto[$i]);\n\t\t\t$total += $Dcambiar;\n\t\t\t//-\n\t\t\t$salida.= '<td>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttpag'.$i.'\" id = \"Ttpag'.$i.'\" value = \"'.$tpago[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmonto'.$i.'\" id = \"Tmonto'.$i.'\" value = \"'.$monto[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmoneda'.$i.'\" id = \"Tmoneda'.$i.'\" value = \"'.$moneda[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttipcambio'.$i.'\" id = \"Ttipcambio'.$i.'\" value = \"'.$tcambio[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Toperador'.$i.'\" id = \"Toperador'.$i.'\" value = \"'.$opera[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tboucher'.$i.'\" id = \"Tboucher'.$i.'\" value = \"'.$boucher[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tobserva'.$i.'\" id = \"Tobserva'.$i.'\" value = \"'.$observ[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagFilas\" id = \"PagFilas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagTotal\" id = \"PagTotal\" value = \"'.$total.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\n\treturn $salida;\n}", "public function muestra_resultados() {\n \t//dd($datos);\n \t/*https://zinoui.com/blog/css-tables-tutorial*/\n \t/*https://vuejs.org/v2/examples/grid-component.html*/\n \t/*http://webgenio.com/2017/01/14/40-bonitas-plantillas-tablas-css/*/\n\n \t$result = \\DB::table('pimof.dbo.estimaciones AS e')\n \t\t->leftJoin('pimof.dbo.arboles AS a', 'a.id', '=', 'e.id_arboles')\n ->select([\n 'e.id'\n , 'a.genero'\n , 'a.epiteto'\n , 'e.d130'\n , 'e.ht'\n , 'e.densidad'\n , 'e.ecuacion'\n , 'e.fraccion'\n , 'e.biomasa'\n , 'e.carbono'\n ])\n ->get();\n\n //dd($result);\n\t\t\n\t\t$tabla = '\n\t\t\t<table id=\"miTablaPersonalizada\" class=\"table table-striped table-responsive\">\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>id</th>\n\t\t\t\t\t\t<th>Especie</th>\n\t\t\t\t\t\t<th>d130</th>\n\t\t\t\t\t\t<th>ht</th>\n\t\t\t\t\t\t<th>Densidad</th>\n\t\t\t\t\t\t<th>Fracción</th>\n\t\t\t\t\t\t<th>Ecuación</th>\n\t\t\t\t\t\t<th>Carbono</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t';\n\n foreach ($result as $registro) {\n\n \t$tabla .= '\n \t\t\t<tr>\n\t\t\t\t\t\t<td>' . $registro->id . '</td>\n\t\t\t\t\t\t<td>' . $registro->genero . ' ' . $registro->epiteto . '</td>\n\t\t\t\t\t\t<td>' . round($registro->d130, 1) . '</td>\n\t\t\t\t\t\t<td>' . round($registro->ht, 1) . '</td>\n\t\t\t\t\t\t<td>' . round($registro->densidad, 2) . '</td>\n\t\t\t\t\t\t<td>' . round($registro->fraccion, 2) . '</td>\n\t\t\t\t\t\t<td>' . $registro->ecuacion . '</td>\n\t\t\t\t\t\t<td><b>' . round($registro->carbono, 2) . '</b></td>\n\t\t\t\t\t</tr>\n \t';\n }\n\n $tabla .= '\n \t\t</tbody>\n\t\t\t</table>\n\t\t\t';\n\t\t\n\t\treturn response($tabla);\n }", "protected function tableModel()\n {\n }", "function fill_modules_table($db){\n $query=\"SELECT m.*, u.usi from Modulo m join usi_moduli u on m.nome=u.modulo;\";\n $result = mysqli_query($db,$query);\n while($row=mysqli_fetch_assoc($result)){\n ?>\n <tr>\n <td><b class=\"text-primary\"><?php echo $row['nome']; ?></b></td>\n <td><?php echo $row['funzionalita']; ?></td>\n <td><?php echo $row['costo']; ?></td>\n <td><?php echo $row['usi'];?> </td>\n </tr>\n<?php\n }\n}", "function retornaEscolhidos($vetorComcadastros, $vetorComIndices){\n $limite = count($vetorComIndices);//limite conta quantos indices tem\n cabeçalhoTabela();//imprime o cabeçalho da tabela\n for($x=0; $x<$limite; $x++){//executa um for que percorre todos os indices do Vetor com os indices\n $y = $vetorComIndices[$x];//$y é igual indice do primeiro cadastro\n echo \"<tr>\";//cria linha na tabela\n echo \"<th scope='row'>$y</th>\";//escreve qual é o indice\n foreach ($vetorComcadastros[$y] as $string){//percorre todos os dados do cadastro com indice $y\n echo \"<td>$string</td>\";//cria uma celula e dentro escreve o dado\n }\n echo \"<td>\",botaoAlterar($y),\"</td>\";//cria uma celula e põe dentro o botão alterar com o indice que ele deve alterar caso clicado\n echo \"<td>\",botaoExcluir($y),\"</td>\";\n echo \"</tr>\";//finaliza a linha\n }\n echo \"</tbody>\";//encerra o corpo da tabela\n echo \"</table>\";//encerra a tabela\n }", "public function getOriginalTable() {}", "protected function setUpperTable() {\n $upper_table = array();\n $columns_params = $this->getColumnParams(); // getting parameters of columns in the table\n $filter_columns = $columns_params['filter']; // getting columns for wich filters are available\n $name_columns = $columns_params['name']; // getting columns names\n $width_columns = $columns_params['width']; // getting columns width\n for ($i = 0; $i < count($filter_columns); $i++) { // setting up each cell of table header\n $upper_table[$i]['column_name'] = $name_columns[$i];\n $upper_table[$i]['width'] = $width_columns[$i];\n $upper_table[$i]['link'] = $this->getFilterLink($filter_columns[$i]);\n if (isset($this->data['filter']) && isset($this->data['dir'])) {\n if ($this->data['filter'] == $filter_columns[$i]) {\n if ($this->data['dir'] == 'up') $upper_table[$i]['filter'] = 'up-filter';\n elseif ($this->data['dir'] == 'dn') $upper_table[$i]['filter'] = 'dn-filter';\n }\n }\n }\n return $upper_table;\n }", "public function renderLanguagesToTable(): void\n {\n $this->table->setHeaders(['ID', 'Country', 'Language', 'Default']);\n\n foreach ($this->languages as $language) {\n $this->table->addRow([\n $language->id,\n $language->country,\n $language->name,\n $language->default ? 'true' : 'false'\n ]);\n }\n\n $this->table->render();\n }", "function createTableString($tablas){\n\t\tglobal $formatedTables;\n\n\t\tforeach ($tablas as $key => $value) {\n\t\t\tif(!@in_array($value, $formatedTables)){\n\t\t\t\t$formatedTables[] = $value;\n\t\t\t}\n\t\t}\n\t}", "function createTableString($tablas){\n\t\tglobal $formatedTables;\n\n\t\tforeach ($tablas as $key => $value) {\n\t\t\tif(!@in_array($value, $formatedTables)){\n\t\t\t\t$formatedTables[] = $value;\n\t\t\t}\n\t\t}\n\t}", "function getTablaInformeAjuntament($desde,$hasta){\n \n // $this->ponerHorasTaller();\n // $this->ponerNumRegistro();\n \n \n $letra=getLetraCasal();\n $numeroRegistroCasalIngresos=getNumeroRegistroCasalIngresos();\n $numeroRegistroCasalDevoluciones=getNumeroRegistroCasalDevoluciones();\n \n $sql=\"SELECT id FROM casal_recibos WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY id ASC LIMIT 1\";\n if($this->db->query($sql)->num_rows()==0){\n $primero=0;\n }\n else {\n $primero=$this->db->query($sql)->row()->id;\n }\n \n $sql=\"SELECT id FROM casal_recibos WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY id DESC LIMIT 1\";\n if($this->db->query($sql)->num_rows()==0){\n $ultimo=0;\n }\n else {\n $ultimo=$this->db->query($sql)->row()->id;\n }\n \n $sql=\"SELECT r.id as id, r.fecha as fecha , r.id_socio as id_socio , r.importe as importe , r.recibo as recibo, s.nombre as nombre,s.apellidos as apellidos \n FROM casal_recibos r\n LEFT JOIN casal_socios_nuevo s ON s.num_socio=r.id_socio\n WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY r.id\";\n \n $sql=\"SELECT r.fecha as fecha,\"\n . \" lr.id_recibo as recibo,\"\n . \" lr.importe as importe, \"\n . \" t.nombre_corto as nombre,\"\n . \" t.horas_taller_T1 as horas_taller_T1,\"\n . \" t.horas_taller_T2 as horas_taller_T2,\"\n . \" t.horas_taller_T3 as horas_taller_T3,\"\n . \" s.dni as dni,\"\n . \" lr.tarjeta as tarjeta,\"\n . \" lr.periodos as periodos,\"\n . \" lr.id_taller as id_taller,\"\n . \" lr.id_socio as id_socio,\"\n . \" lr.id as id,\"\n . \" lr.num_registro as num_registro,\"\n . \" lr.num_registro_posicion as num_registro_posicion,\"\n . \" s.num_socio as num_socio\"\n . \" FROM casal_lineas_recibos lr\"\n . \" LEFT JOIN casal_recibos r ON lr.id_recibo=r.id\"\n . \" LEFT JOIN casal_talleres t ON t.id=lr.id_taller\"\n . \" LEFT JOIN casal_socios_nuevo s ON s.num_socio=lr.id_socio\"\n . \" WHERE lr.importe>0 AND lr.id_recibo>='$primero' AND lr.id_recibo<='$ultimo' ORDER BY lr.num_registro_posicion\";\n \n //log_message('INFO',$sql);\n \n $recibos=array(); \n if($this->db->query($sql)->num_rows()>0) \n $recibos=$this->db->query($sql)->result();\n \n \n $cabeceraTabla='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\">Data</th>\n <th class=\"col-sm-1 text-center\">Num Registre</th>\n <th class=\"col-sm-1 text-center\">DNI Usuari</th>\n <th class=\"col-sm-1 text-center\">Nom Actividad</th>\n <th class=\"col-sm-1 text-center\">Num Registre Ingrés</th>\n <th class=\"col-sm-1 text-center\" >Preu/hora</th>\n <th class=\"col-sm-1 text-center\">Import Base</th>\n <th class=\"col-sm-1 text-center\">% IVA (exempt)</th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\">TIPOLOGIA INGRES</th>\n \n </tr>';\n \n \n \n $tabla=$cabeceraTabla;\n \n $importeTotal=0;\n foreach ($recibos as $k=>$v) {\n $fecha=$v->fecha;\n $fecha=substr($fecha,8,2).'/'.substr($fecha,5,2).'/'.substr($fecha,0,4);\n $tabla.='<tr>';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $fecha;\n $tabla.='</td>';\n \n $num=strval($v->num_registro_posicion);\n while(strlen($num)<5) {\n $num='0'.$num;\n }\n $tabla.='<td class=\"text-center\">';\n $tabla.= $v->num_registro.$num;\n $tabla.='</td>';\n \n \n $dni=$v->dni;\n if($this->socios_model->validar_dni($dni)){\n $tabla.='<td class=\"text-center\">';\n $tabla.= strtoupper($dni);\n $tabla.='</td>';\n }\n else{\n $tabla.='<td class=\"text-center\" style=\"color:red\">';\n $tabla.= strtoupper($dni).\"(\".$v->num_socio.\")\";\n $tabla.='</td>';\n }\n \n $nombre=$v->nombre;\n $tabla.='<td class=\"text-center\">';\n $tabla.= $nombre;\n $tabla.='</td>';\n \n $recibo=$letra.' '.$v->recibo; \n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n \n if($v->periodos==4) $horas=floatval($v->horas_taller_T1);\n if($v->periodos==2) $horas=floatval($v->horas_taller_T2);\n if($v->periodos==1) $horas=floatval($v->horas_taller_T3); \n //log_message('INFO', '===================='.$v->nombre.' '.$horas);\n \n if($horas>0)\n $preu_hora=number_format($v->importe/$horas*100,2); \n else \n $preu_hora=0;\n\n $tabla.='<td class=\"text-center\">';\n $tabla.= $preu_hora;\n $tabla.='</td>';\n \n \n \n $importe=$v->importe;\n $tabla.='<td class=\"text-center\" >';\n $tabla.= number_format($importe,2);\n $tabla.='</td>';\n \n $importe=$v->importe;\n $tabla.='<td class=\"text-center\">';\n $tabla.= '0.00';\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" style=\"border-right:2px solid black;border-left:2px solid black;\">';\n $tabla.= number_format($importe,2);\n $tabla.='</td>';\n $importeTotal+=number_format($importe,2);\n \n $tarjeta=number_format($v->tarjeta,2);\n if($tarjeta==0) $pago=\"Efectiu\"; else $pago=\"TPV fisic\";\n $tabla.='<td class=\"text-center\">';\n $tabla.= $pago;\n $tabla.='</td>';\n \n $tabla.='</tr>';\n }\n \n \n $pieTabla='</tr></thead><thead><tr>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:0px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\">T O T A L S</th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:2px solid black;border-right:2px solid black;border-left:2px solid black;\">';\n $pieTabla.=number_format($importeTotal,2);\n $pieTabla.='</th>';\n $pieTabla.='</tr></thead></tody></table>';\n \n $tabla.=$pieTabla;\n \n \n $cabeceraTablaDevoluciones='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\">Data</th>\n <th class=\"col-sm-1 text-center\">Num Registre</th>\n <th class=\"col-sm-1 text-center\">DNI Usuari</th>\n <th class=\"col-sm-1 text-center\">Nom Actividad</th>\n <th class=\"col-sm-1 text-center\">Num Registre Devolució</th>\n <th class=\"col-sm-1 text-rigcenterht\" >Preu/hora</th>\n <th class=\"col-sm-1 text-center\">Import Base</th>\n <th class=\"col-sm-1 text-center\">% IVA (exempt)</th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\">TIPOLOGIA DEVOLUCIÓ</th>\n \n </tr>';\n \n $tituloCasal=strtoupper(getTituloCasal());\n $salida='<h4>INFORME DETALLAT INGRESSOS</h4>'\n . ''\n . 'EQUIPAMENT MUNICIPA: <STRONG>'.$tituloCasal.'</STRONG>'\n . '<BR>'\n . 'ADJUDICATARI: <STRONG>'.'SERVEIS A LES PERSONES INCOOP, SCCL</STRONG>'\n . '<BR>'\n . 'NIF ADJUDICATARI: <STRONG>F60137411</STRONG>'\n . '<BR>'\n . 'NÚM CONTRACTE: <STRONG>18001022</STRONG>'\n . '<BR>'\n . 'Periode: <STRONG>'.substr($desde,8,2).'/'.substr($desde,5,2).'/'.substr($desde,0,4).' - '.substr($hasta,8,2).'/'.substr($hasta,5,2).'/'.substr($hasta,0,4).'</STRONG>'\n . '<BR>'\n . '<BR>'\n \n .$tabla.'<br>';\n \n $sql=\"SELECT r.fecha as fecha,\"\n . \" lr.id_recibo as recibo,\"\n . \" lr.importe as importe, \"\n . \" t.nombre_corto as nombre,\"\n . \" t.horas_taller_T1 as horas_taller_T1,\"\n . \" t.horas_taller_T2 as horas_taller_T2,\"\n . \" t.horas_taller_T3 as horas_taller_T3,\"\n . \" s.dni as dni,\"\n . \" lr.tarjeta as tarjeta,\"\n . \" lr.periodos as periodos,\"\n . \" lr.id_taller as id_taller,\"\n . \" lr.id_socio as id_socio,\"\n . \" lr.id as id,\"\n . \" lr.num_registro as num_registro,\"\n . \" lr.num_registro_posicion as num_registro_posicion,\"\n . \" s.num_socio\"\n . \" FROM casal_lineas_recibos lr\"\n . \" LEFT JOIN casal_recibos r ON lr.id_recibo=r.id\"\n . \" LEFT JOIN casal_talleres t ON t.id=lr.id_taller\"\n . \" LEFT JOIN casal_socios_nuevo s ON s.num_socio=lr.id_socio\"\n . \" WHERE lr.importe<0 AND lr.id_recibo>='$primero' AND lr.id_recibo<='$ultimo' ORDER BY lr.num_registro_posicion\";\n \n \n \n $recibos=array(); \n if($this->db->query($sql)->num_rows()>0) \n $recibos=$this->db->query($sql)->result();\n \n $tabla=$cabeceraTablaDevoluciones;\n $importeTotalDevoluciones=0;\n foreach ($recibos as $k=>$v) {\n $fecha=$v->fecha;\n $fecha=substr($fecha,8,2).'/'.substr($fecha,5,2).'/'.substr($fecha,0,4);\n $tabla.='<tr>';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $fecha;\n $tabla.='</td>';\n \n $num=strval($v->num_registro_posicion);\n while(strlen($num)<5) {\n $num='0'.$num;\n } \n $tabla.='<td class=\"text-center\">';\n $tabla.= $v->num_registro.$num;;\n $tabla.='</td>';\n \n $dni=$v->dni;\n if($this->socios_model->validar_dni($dni)){\n $tabla.='<td class=\"text-center\">';\n $tabla.= strtoupper($dni);\n $tabla.='</td>';\n }\n else{\n $tabla.='<td class=\"text-center\" style=\"color:red\">';\n $tabla.= strtoupper($dni).\"(\".$v->num_socio.\")\";\n $tabla.='</td>';\n }\n \n $nombre=$v->nombre;\n $tabla.='<td class=\"text-center\">';\n $tabla.= $nombre;\n $tabla.='</td>';\n \n $recibo=$letra.' '.$v->recibo; \n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n \n \n \n /*\n $id_taller=$v->id_taller;\n $periodos=$v->periodos;\n $id_socio=$v->id_socio;\n $importe=-$v->importe;\n $id=$v->id;\n $sql=\"SELECT * FROM casal_lineas_recibos WHERE id<'$id' AND id_taller='$id_taller' AND id_socio='$id_socio' AND periodos='$periodos' AND importe='$importe' ORDER BY id DESC LIMIT 1\";\n //log_message('INFO',$sql);\n if($this->db->query($sql)->num_rows()==1) {\n $recibo=$letra.' '.$this->db->query($sql)->row()->id_recibo;\n }\n else $recibo='';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n */\n \n \n if($v->periodos==4) $horas=$v->horas_taller_T1;\n if($v->periodos==2) $horas=$v->horas_taller_T2;\n if($v->periodos==1) $horas=$v->horas_taller_T3; \n \n //log_message('INFO', '++=================='.$v->nombre.' '.$horas);\n \n $preu_hora=number_format($v->importe/$horas*100,2); \n $tabla.='<td class=\"text-center\">';\n $tabla.= -$preu_hora;\n $tabla.='</td>';\n \n \n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" >';\n $tabla.= -$importe;\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\">';\n $tabla.= '0.00';\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" style=\"border-right:2px solid black;border-left:2px solid black;\">';\n $tabla.= -$importe;\n $tabla.='</td>';\n $importeTotalDevoluciones+=$importe;\n \n $tarjeta=number_format($v->tarjeta,2);\n if($tarjeta==0) $pago=\"Efectiu\"; else $pago=\"TPV fisic\";\n $tabla.='<td class=\"text-center\">';\n $tabla.= $pago;\n $tabla.='</td>';\n \n $tabla.='</tr>';\n }\n \n \n \n \n $pieTablaDevoluciones='</tr></thead><thead><tr>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:0px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\">T O T A L S</th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:2px solid black;border-right:2px solid black;border-left:2px solid black;\">';\n $pieTablaDevoluciones.=-number_format($importeTotalDevoluciones,2);\n $pieTablaDevoluciones.='</th>';\n $pieTablaDevoluciones.='</tr></thead></tody></table>';\n \n \n \n \n \n $salida.='<h4>INFORME DETALLAT DEVOLUCIONS</h4>'\n . ''\n . 'EQUIPAMENT MUNICIPA: <STRONG>'.$tituloCasal.'</STRONG>'\n . '<BR>'\n . 'ADJUDICATARI: <STRONG>'.'SERVEIS A LES PERSONES INCOOP, SCCL</STRONG>'\n . '<BR>'\n . 'NIF ADJUDICATARI: <STRONG>F60137411</STRONG>'\n . '<BR>'\n . 'NÚM CONTRACTE: <STRONG>18001022</STRONG>'\n . '<BR>'\n . 'Periode: <STRONG>'.substr($desde,8,2).'/'.substr($desde,5,2).'/'.substr($desde,0,4).' - '.substr($hasta,8,2).'/'.substr($hasta,5,2).'/'.substr($hasta,0,4).'</STRONG>'\n . '<BR>'\n . '<BR>';\n \n \n \n \n \n \n $salida.=$tabla;\n $salida.=$pieTablaDevoluciones;\n $salida.='<br><h4>RESUM TOTAL</h4>';\n \n $importeResumen=number_format($importeTotal,2)+number_format($importeTotalDevoluciones,2);\n $resumenTotal='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n \n </tr>\n <tr >\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:2px solid #DDDDDD;border-top:2px solid #DDDDDD;border-left:1px solid #DDDDDD;\">T O T A L S</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:2px solid black;border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">'.number_format($importeResumen,2).'</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n \n </tr>\n\n\n\n </thead></tbody></table>';\n \n $salida.=$resumenTotal;\n \n \n \n \n return $salida;\n \n }", "function spipmine_declarer_tables_auxiliaires($tables_auxiliaires){\r\n\t// permettant le lien entre les rubriques et les clients\r\n\t$spipmine_clients_rubriques = array(\r\n\t\t\"id_rubrique\"\t\t\t=>\t\"int(11) NOT NULL\",\r\n\t\t\"id_client\"\t\t\t\t=>\t\"int(11) NOT NULL\"\r\n\t);\r\n\t$spipmine_clients_rubriques_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_rubrique\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_clients_rubriques'] = array(\r\n\t\t'field' => &$spipmine_clients_rubriques,\r\n\t\t'key' => &$spipmine_clients_rubriques_key\r\n\t);\r\n\r\n\r\n\t// structure de la table spipmine_lignes_factures\r\n\t// liée à la table spipmine_factures\r\n\t$spipmine_lignes_facture = array(\r\n\t\t\"id_ligne\"\t\t\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"id_facture\"\t\t\t=>\t\"int(11) default NULL\",\r\n\t\t\"position\"\t\t\t\t=>\t\"int(11) default NULL\",\r\n\t\t\"quantite\"\t\t\t\t=>\t\"float default NULL\",\r\n\t\t\"unite\"\t\t\t\t\t=>\t\"varchar(50) default NULL\",\r\n\t\t\"designation\"\t\t\t=>\t\"text default NULL\",\r\n\t\t\"prix_unitaire_ht\"\t\t=>\t\"int(11) default NULL\",\r\n\t\t\"commentaire\"\t\t\t=>\t\"mediumtext\"\r\n\t);\r\n\t$spipmine_lignes_facture_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_ligne\",\r\n\t\t\"KEY id_facture\"\t\t=>\t\"id_facture\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_lignes_facture'] = array(\r\n\t\t'field' => &$spipmine_lignes_facture,\r\n\t\t'key' => &$spipmine_lignes_facture_key\r\n\t);\r\n\r\n\r\n\r\n\t// structure de la table spipmine_types_actions\r\n\t$spipmine_types_actions = array(\r\n\t\t\"id_type_action\"\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_action\"\t\t=>\t\"varchar(255) default NULL\",\r\n\t\t\"commentaires\"\t\t\t=>\t\"mediumtext\"\r\n\t);\r\n\t$spipmine_types_actions_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_action\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_actions'] = array(\r\n\t\t'field' => &$spipmine_types_actions,\r\n\t\t'key' => &$spipmine_types_actions_key\r\n\t);\r\n\r\n\r\n\t\r\n\t// structure de la table spipmine_types_documents\r\n\t$spipmine_types_documents = array(\r\n\t\t\"id_type_document\"\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_document\"\t\t=>\t\"varchar(50) default NULL\"\r\n\t);\r\n\t$spipmine_types_documents_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_document\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_documents'] = array(\r\n\t\t'field' => &$spipmine_types_documents,\r\n\t\t'key' => &$spipmine_types_documents_key\r\n\t);\r\n\r\n\t\r\n\t\r\n\t// structure de la table spipmine_types_livrables\r\n\t$spipmine_types_livrables = array(\r\n\t\t\"id_type_livrable\"\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_livrable\"\t\t=>\t\"varchar(50) default NULL\"\r\n\t);\r\n\t$spipmine_types_livrables_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_livrable\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_livrables'] = array(\r\n\t\t'field' => &$spipmine_types_livrables,\r\n\t\t'key' => &$spipmine_types_livrables_key\r\n\t);\r\n\r\n\t\r\n\t\r\n\t// structure de la table spipmine_types_prestations\r\n\t$spipmine_types_prestations = array(\r\n\t\t\"id_type_presta\"\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_presta\"\t\t=>\t\"varchar(50) default NULL\",\r\n\t\t\"commentaires\"\t\t\t=>\t\"mediumtext\"\r\n\t);\r\n\t$spipmine_types_prestations_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_presta\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_prestations'] = array(\r\n\t\t'field' => &$spipmine_types_prestations,\r\n\t\t'key' => &$spipmine_types_prestations_key\r\n\t);\r\n\r\n\t\r\n\t\r\n\t// structure de la table spipmine_types_facturation\r\n\t$spipmine_types_facturation = array(\r\n\t\t\"id_type_facturation\"\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_facturation\"\t=>\t\"varchar(50) default NULL\",\r\n\t\t\"commentaires\"\t\t\t=>\t\"mediumtext\"\r\n\t);\r\n\t$spipmine_types_facturation_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_facturation\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_facturation'] = array(\r\n\t\t'field' => &$spipmine_types_facturation,\r\n\t\t'key' => &$spipmine_types_facturation_key\r\n\t);\r\n\r\n\r\n\t// structure de la table spipmine_types_status\r\n\t$spipmine_types_status = array(\r\n\t\t\"id_type_status\"\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_status\"\t\t=>\t\"varchar(50) default NULL\",\r\n\t\t\"commentaires\"\t\t\t=>\t\"mediumtext\"\r\n\t);\r\n\t$spipmine_types_status_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_status\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_status'] = array(\r\n\t\t'field' => &$spipmine_types_status,\r\n\t\t'key' => &$spipmine_types_status_key\r\n\t);\r\n\r\n\t// structure de la table spipmine_types_reglements\r\n\t$spipmine_types_reglements = array(\r\n\t\t\"id_type_reglement\"\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_reglement\"\t=>\t\"varchar(50) default NULL\",\r\n\t\t\"commentaires\"\t\t\t=>\t\"mediumtext\"\r\n\t);\r\n\t$spipmine_types_reglements_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_reglement\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_reglements'] = array(\r\n\t\t'field' => &$spipmine_types_reglements,\r\n\t\t'key' => &$spipmine_types_reglements_key\r\n\t);\r\n\r\n\t\r\n\treturn $tables_auxiliaires;\r\n}", "public function constructTableForMain() \n\t{ \n\t\n\t\t//- Construction des objets de la table 1\n $obj_model=$this->obj_mvc_menu_imbrication;\n\t\t$obj_message_manager=$obj_model->getManager()->getHtmlMessage();\n\t\t\n\t\t//- Positionnement des parties fixes de l'interface\n\t\t$obj_table_1 = new table();\n\t\t$obj_table_1->setWidth(\"100%\");\n\t\t$obj_tr = $obj_table_1->addTr();\n\t\t\t$obj_td = \t$obj_tr->addTd($this->constructTableForHeader());\n\t\t $obj_tr = $obj_table_1->addTr();\t\t\t\t\n $obj_td = \t$obj_tr->addTd($this->constructTableForMove()); \n\t\t$obj_tr = $obj_table_1->addTr();\n\t\t\t$obj_td = \t$obj_tr->addTd($obj_message_manager);\n\t\t\t\t$obj_td->setWidth(\"100%\");\n\t\t\t\t$obj_td->setAlign(\"center\");\n\t\t\n\t\t\n\t\t//- Positionnement des MVC\n $obj_tr = $obj_table_1->addTr();\n\t\t\t $obj_td = \t$obj_tr->addTd($obj_model->getMvcMenu());\n $obj_tr = $obj_table_1->addTr();\n\t\t\t $obj_td = \t$obj_tr->addTd($obj_model->getMvcMenuDeplacementLoader()); \n\t\n /*$obj_tr = $obj_table_1->addTr();\n\t\t $obj_td = \t$obj_tr->addTd($this->constructTableForPossibleMove()); */ \n\t\t\n\t\t\n\t\t//- affectation de la table principale\n\t\t$this->obj_main_table=$obj_table_1;\n\t\n\t\t \n\t\treturn $this->obj_main_table; \n\t}", "function tabla_filas_compra_pago($filas,$tpago,$monto,$moneda,$tcambio,$opera,$boucher,$observ,$empresa,$caja,$banco,$cuenta,$tcambiodia){\n\t\t$tpago = explode(\"|\", $tpago);\n\t\t$monto = explode(\"|\", $monto);\n\t\t$moneda = explode(\"|\", $moneda);\n\t\t$tcambio = explode(\"|\", $tcambio);\n\t\t$opera = explode(\"|\", $opera);\n\t\t$boucher = explode(\"|\", $boucher);\n\t\t$observ = explode(\"|\", $observ);\n\t\t$empresa = explode(\"|\", $empresa);\n\t\t$caja = explode(\"|\", $caja);\n\t\t$banco = explode(\"|\", $banco);\n\t\t$cuenta = explode(\"|\", $cuenta);\n\t\t//----\n\t\t\t$salida.= '<table>';\n\t$i = 1;\t\n\t$total = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//acumulado\n\t\t\t$Dcambiar = 0;\n\t\t\t$Dcambiar = Cambio_Moneda($tcambio[$i],$tcambiodia,$monto[$i]);\n\t\t\t$total += $Dcambiar;\n\t\t\t//-\n\t\t\t$salida.= '<td>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttpag'.$i.'\" id = \"Ttpag'.$i.'\" value = \"'.$tpago[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmonto'.$i.'\" id = \"Tmonto'.$i.'\" value = \"'.$monto[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmoneda'.$i.'\" id = \"Tmoneda'.$i.'\" value = \"'.$moneda[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttipcambio'.$i.'\" id = \"Ttipcambio'.$i.'\" value = \"'.$tcambio[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Toperador'.$i.'\" id = \"Toperador'.$i.'\" value = \"'.utf8_decode($opera[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tboucher'.$i.'\" id = \"Tboucher'.$i.'\" value = \"'.trim($boucher[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tobserva'.$i.'\" id = \"Tobserva'.$i.'\" value = \"'.utf8_decode($observ[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tsucur'.$i.'\" id = \"Tsucur'.$i.'\" value = \"'.$empresa[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tcaja'.$i.'\" id = \"Tcaja'.$i.'\" value = \"'.$caja[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tbanco'.$i.'\" id = \"Tbanco'.$i.'\" value = \"'.$banco[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tcuenta'.$i.'\" id = \"Tcuenta'.$i.'\" value = \"'.$cuenta[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagFilas\" id = \"PagFilas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagTotal\" id = \"PagTotal\" value = \"'.$total.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\n\treturn $salida;\n}", "function sestavTabulku($array, $popis, $id = \"\")\n{\n $dopln = \"\";\n \n $nadpis = \"<th>\" . implode(\"<th>\", array_keys(reset($array)));\n \n if ( $id ) {\n $dopln .= \"<br /><span class='odkaz modra' onclick='zobrazSkryj(\\\"$id\\\")'>$popis</span>\n <span id='$id' class='skryj'>\";\n } else {\n $dopln .= \"<span class='odkaz modra'>$popis</span>\";\n }\n \n $dopln .= \"<table class='persist-area'><thead><tr class='persist-header'>$nadpis</thead><tbody>\";\n \n foreach ( $array as $k => $pole ) {\n $dopln .= \"<tr>\";\n \n foreach ( $pole as $klic => $hodnota ) {\n $dopln .= \"<td>\";\n if (mb_strlen($hodnota) <= 30) $dopln .= \"<input type='text' value='$hodnota' size='\".mb_strlen($hodnota).\"'>\";\n else {\n $rows = mb_strlen($hodnota)<120 ? 2 : (mb_strlen($hodnota)<240 ? 4 : 6);\n $dopln .= \"<textarea name='' rows='$rows' cols='60' />$hodnota \".mb_strlen($hodnota).\"</textarea>\";\n }\n }\n }\n \n $dopln .= \"</tbody></table>\";\n if ( $id ) $dopln .= \"</span><br />\";\n return $dopln;\n}", "public function tblRequisitos($array){\n $tabla = \"<table class='table table-bordered table-hover'>\n <thead>\n <tr align='center'>\n <th>Programa</th>\n <th>Requisito</th>\n <th>Editar</th>\n </tr>\n </thead>\n <tbody>\";\n foreach ($array as $value){\n $info = utf8_encode(implode($value, '|'));\n //En la ruta de la imagen nos salimos de la carpeta \"../\" ya que la ruta que se guarda \n //en la base de datos se encuentra fuera de la carpeta 'admin'\n $tabla .= \"<tr align='left'>\n <td width='150'>\".utf8_encode($value[1]).\"</td>\n <td>\".utf8_encode($value[3]).\"</td>\n <td align='center'><a href='' onclick='frmEditarRequisito(\\\"$info\\\");return false;'><i class='fa fa-pencil'></i></a></td>\n </tr>\";\n }\n $tabla .= \"</tbody></table>\";\n return $tabla;\n }", "protected function prepareTable($table){\n\t\t\n\t\tjimport('joomla.filter.output');\n\t\tif (empty($table->id)) {\n\n\t\t\t// Set ordering to the last item if not set\n\t\t\tif (@$table->ordering === '') {\n\t\t\t\t$db = JFactory::getDbo();\n\t\t\t\t$db->setQuery('SELECT MAX(ordering) FROM #__egoi');\n\t\t\t\t$max = $db->loadResult();\n\t\t\t\t$table->ordering = $max+1;\n\t\t\t}\n\n\t\t}\n\t}", "function visualizar($pag=\"\",$orderby=\"\")\n {\n global $sIdConvenioAct;\n for($i=0;$i<2;$i++){\n $consulta = $this->sql;\n //filas obtenidas\n $total = $this->contarfilas($consulta);\n //tamaņo del paginador\n if($total<200):\n $tampag=20;\n elseif ($total<400):\n $tampag=40;\n else:\n $tampag=60;\n endif;\n $iniciaren=($pag-1) * $tampag; //Registro actual\n if($iniciaren<0)$iniciaren=0;\n \n $this->paginar($pag, $total, $tampag, \"?pag=\"); \n \n if ($orderby !=\"\"){\n $consulta = $this->sql.\" ORDER BY $orderby LIMIT $iniciaren,$tampag\";\n }\n else {\n $consulta = $this->sql.\" LIMIT $iniciaren,$tampag\"; \n }\n \n $result = $this->query($consulta);\n //obtener descripcion de la tabla\n $tablades = $this->comentarioTabla($this->nombreTabla($result, 0));\n //si no tiene, poner como descripcion el nombre de la misma\n if ($tablades == \"\") $tablades = $this->nombreTabla($result, 0);\n else if($this->edit==1 and $this->delete==1) $espacio = 2;\n else if($this->edit==1 and $this->delete==0) $espacio = 1;\n else if($this->edit==0 and $this->delete==1) $espacio = 1;\n else $espacio = 0;\n echo \"\\n<center><table class='enhancedtablerowhover'>\n \\n<caption><center><font size='1.5'>\".$tablades.\"</font></center></caption>\n \\n<thead>\n \\n<tr>\n \\n<td scope='col' colspan=\".($espacio+2).\"></td>\";\n \n for ($i = 0; $i < mysql_num_fields($result); $i++)\n {\n $campo=$this->nombreCampo($result, $i);\n //los campos imagen no mostrarlos\n if (!$this->mostrarCampo($campo))\n continue;\n //obtener descripcion del campo \n $des = str_replace(\"/*\", \"\", $this->comentario($this->nombreCampo($result, $i),\n $this->nombreTabla($result, $i)));\n //si no tiene, poner como descripcion el nombre del mismo\n if ($des == \"\" or is_numeric($des)) $des = $campo;\n echo \"\\n<th scope='col' ><a href='?order=$campo'>$des</a></th>\";\n }\n echo \" \\n</tr>\n \\n</thead>\n \\n<tbody>\";\n while ($row = mysql_fetch_array($result))\n {\n $filtro = $this->cifrar($row, $result);\n echo \"\\n<tr>\";\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Imprimir' href='reporte/rptEmbarques.php?iFolio=\".$row['iFolio'].\"&sContrato=\".$row['sContrato'].\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&sIdConvenio=$sIdConvenioAct\".\"&dFecha=\".$row['dIdFecha'].\"' target='_blank' >\n \\n<img src='\".$this->PathImages.\"impresora.png' width=15></a></td>\";//$_SESSION['orden']\n if($this->edit==1)\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Seleccionar Folio' href='$_SERVER[PHP_SELF]?iFolioSuministro=\".$row['iFolio'].\"'>\n \\n<img src='\".$this->PathImages.\"seleccionar.jpg' width=15></a></td>\";\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Modificar Registro ' href='$_SERVER[PHP_SELF]?operacion=m&$filtro'>\n \\n<img src='\".$this->PathImages.\"editar.png' width=12></a></td>\";\n if($this->delete==1)//'href='$_SERVER[PHP_SELF]?operacion=b&$filtro'\n echo \"\\n<td class='CrearReporte' >\n \\n<a title = 'Eliminar el Registro' href=\\\"#\\\" \n onClick=\\\" if( confirm('Realmente Desea Eliminar el Registro?') ){ document.location='$_SERVER[PHP_SELF]?operacion=b&$filtro' };\\\" >\n \\n<img src='\".$this->PathImages.\"eliminar.png' width=12>\n \\n</a></td> \";\n for ($i = 0; $i < mysql_num_fields($result); $i++)\n {\n if(strpos(strtoupper($this->nombreCampo($result, $i)),strtoupper(\"Imagen\")) and $tipo = $this->tipoCampo($result, $i)==\"blob\") \n {\n $nombreImagen=\"\";\n foreach($this->campollave as $claves){\n $nombreImagen.=$row[$claves]; \n }\n $nombreImagen = str_replace(\"/\",\"-\",$nombreImagen);\n $nombreImagen.=\".jpg\";\n //$nombreImagen=$row[$this->campollave].\".jpg\";\n $img = $this->procesarImagen($row[$i],$nombreImagen);\n }\n if (!$this->mostrarCampo($this->nombreCampo($result, $i)))\n continue;\n if ($img){\n echo \"\\n<td><img border=1 src = '$nombreImagen' width = '90' heigth = '90'</img></td>\";\n $img = false;\n }\n else if(( strpos(strtoupper($this->nombreCampo($result, $i)),\"DLL\")!==false or strpos(strtoupper($this->nombreCampo($result, $i)),\"MN\")!==false )\n AND $this->tipoCampo($result, $i)==\"real\"){\n $row[$i] = number_format($row[$i], 4, '.', ',');\n echo \"\\n<td class ='derecha'>$ \".$row[$i].\"</td>\";\n }\n else if( strpos($this->tipoCampo($result, $i),\"real\")!==false ){\n $row[$i] = number_format($row[$i], 4, '.', ',');\n echo \"\\n<td class ='derecha'> \".$row[$i].\"</td>\";\n }\n else if(strpos(strtolower($this->nombreCampo($result, $i)), strtolower(\"fecha\"))!==false){//formato de fecha\n echo \"\\n<td>\".formatoFecha($row[$i]).\"</td>\";\n }\n else\n echo \"\\n<td>\".$row[$i].\"</td>\";\n\n }\n echo \"\\n</tr>\";\n }\n echo \"\\n</tr></tbody></table></center>\";\n $this->paginar($pag, $total, $tampag, \"?pag=\"); \n }\n }", "function generateHorizontalTableFromQuery($tableid, $title, $description, $sql){\n\t\t global $database;\n\n $rec = $database->query($sql);\n \n if (!$rec || !$rec->num_rows){\n\t\t\t return $database->error;\n\t\t }\n\t\t \n\t\t $field_names = array();\n\t\t $fields = \"\";\n\t\t $body = \"\";\n\t\t\t\n\t\t\t// first field\n\t\t\t$field_names[] = \"<th>Category</th>\";\n\t\t\twhile ($row = $rec->fetch_array()){\n\t\t\t\t$col = $row[0];\n\t\t\t\t$field_names[] = \"<th>$col</th>\";\n\t\t\t}\n\n\t\t\t$fields = implode(\"\", $field_names);\n\t\t\t\n\t\t\tmysqli_data_seek($rec, 0);\n\n\t\t\t$keys = array();\t\t\t\n\t\t\t$row = $rec->fetch_array();\n\t\t\t$keys_ = array_keys($row);\n\t\t\t$idx = 0;\n\n\t\t\tforeach($keys_ as $key){\n\t\t\t\tif (! is_numeric($key) && $idx > 1){\n\t\t\t\t\t$keys[] = $key;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$idx++;\n\t\t\t}\n\n\t\t\tmysqli_data_seek($rec, 0);\n\t\t\t$data = \"\";\n\t\t\t$body = \"\";\n\t\t\t\n\t\t\t$total_fields = sizeof($field_names); // account for category\n\t\t\t$datasets = [];\n\t\t\t$idx = 1;\n\t\t\t\n\t\t\twhile ($row = $rec->fetch_array()){\t\t\n\t\t\t\tforeach($keys as $category) {\n\t\t\t\t\t\t $data = $row[$category];\n\t\t\t\t\t\t if (!$data) $data = 0;\n\t\t\t\t\t\t $datasets[$category][] = \"<td>$data</td>\"; \n\t\t\t\t}\n\t\t\t}\t\t\t\n\n\t\t\tforeach ($datasets as $key=>$arr){\n\t\t\t\t$data = implode(\"\", $arr);\n\t\t\t\t$body .= \"<tr><td>$key</td>$data</tr>\";\n\t\t\t\t$idx++;\n\t\t\t}\n\t\t\t\n\t\t\treturn \"<h5 style='font-weight:bold'>$title <small class='pull-right'>$description</small></h5>\n\t\t\t\t\t <div class='table-responsive' style='overflow-x:scroll;'>\n\t\t\t\t\t\t <table class='table table-hover table-bordered' id='$tableid'>\n\t\t\t\t\t <thead>\n\t\t\t\t\t\t <tr>$fields</tr>\n\t\t\t\t\t\t </thead>\n\t\t\t\t\t\t <tbody>\n\t\t\t\t\t\t\t\t$body\n\t\t\t\t\t\t </tbody>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t</div>\";\n }", "function tabla($lista, $totalColumnas) {\n $totalFilas = count($lista) / $totalColumnas;\n echo \"<table border='1'>\";\n for ($fila = 0; $fila < $totalFilas; $fila++) {\n echo \"<tr>\";\n for ($i=0;$i<$totalColumnas;$i++) {\n $posicion = $totalColumnas * $fila + $i;\n if ($posicion < count($lista)) {\n $contenido = $lista[$posicion];\n } else {\n $contenido = \"\";\n }\n echo \"<td>\".$contenido.\"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "public function rep_list_operaciones($com_id,$tp){\n $obj_est=$this->model_producto->list_oestrategico($com_id); /// Objetivos Estrategicos\n $componente=$this->model_componente->get_componente_pi($com_id);\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']);\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); //// DATOS PROYECTO\n $tabla='';\n\n if($tp==1){\n $tab='table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" width:100%;';\n }\n elseif($tp==2){\n $tabla .='<style>\n table{font-size: 9px;\n width: 100%;\n max-width:1550px;\n overflow-x: scroll;\n }\n th{\n padding: 1.4px;\n text-align: center;\n font-size: 9px;\n }\n </style>';\n $tab='table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\"';\n }\n \n\n\n $tabla.='<'.$tab.'>\n <thead>\n <tr class=\"modo1\" style=\"height:45px;\">\n <th style=\"width:1%;\" style=\"background-color: #1c7368; color: #FFFFFF\" style=\"height:12px;\">#</th>\n <th style=\"width:2%;\" style=\"background-color: #1c7368; color: #FFFFFF\">COD. ACE.</th>\n <th style=\"width:2%;\" style=\"background-color: #1c7368; color: #FFFFFF\">COD. ACP.</th>\n <th style=\"width:2%;\" style=\"background-color: #1c7368; color: #FFFFFF\">COD. OPE.</th>\n <th style=\"width:2%;\" style=\"background-color: #1c7368; color: #FFFFFF\">COD. ACT.</th> \n <th style=\"width:9%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ACTIVIDAD</th>\n <th style=\"width:9%;\" style=\"background-color: #1c7368; color: #FFFFFF\">RESULTADO</th>\n <th style=\"width:9%;\" style=\"background-color: #1c7368; color: #FFFFFF\">INDICADOR</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">LINEA BASE '.($this->gestion-1).'</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">META</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ENE.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">FEB.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">MAR.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ABR.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">MAY.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">JUN.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">JUL.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">AGO.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">SEPT.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">OCT.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">NOV.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">DIC.</th>\n <th style=\"width:9%;\" style=\"background-color: #1c7368; color: #FFFFFF\">VERIFICACI&Oacute;N</th> \n <th style=\"width:4%;\" style=\"background-color: #1c7368; color: #FFFFFF\">PPTO.</th> \n </tr>\n </thead>\n <tbody>';\n $nro=0;\n $operaciones=$this->model_producto->list_operaciones($com_id); /// 2020\n foreach($operaciones as $rowp){\n $sum=$this->model_producto->meta_prod_gest($rowp['prod_id']);\n $monto=$this->model_producto->monto_insumoproducto($rowp['prod_id']);\n $programado=$this->model_producto->producto_programado($rowp['prod_id'],$this->gestion);\n\n $color=''; $tp='';\n if($rowp['indi_id']==1){\n if(($sum[0]['meta_gest'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n elseif ($rowp['indi_id']==2) {\n $tp='%';\n if($rowp['mt_id']==3){\n if(($sum[0]['meta_gest'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n }\n\n $ptto=0;\n if(count($monto)!=0){\n $ptto=$monto[0]['total'];\n }\n\n $color_or='';\n if($rowp['or_id']==0){\n $color_or='#fbd5d5';\n }\n\n $nro++;\n $tabla.=\n '<tr class=\"modo1\" bgcolor=\"'.$color.'\">\n <td style=\"height:40px;\" bgcolor='.$color_or.'>'.$nro.'</td>\n <td style=\"width: 2%; text-align: center;\" bgcolor='.$color_or.' >'.$rowp['acc_codigo'].'</td>\n <td style=\"width: 2%; text-align: center;\" bgcolor='.$color_or.' >'.$rowp['og_codigo'].'</td>\n <td style=\"width: 2%; text-align: center;\" bgcolor='.$color_or.' >'.$rowp['or_codigo'].'</td>\n <td style=\"width: 2%; text-align: center;\" bgcolor=\"#dedcdc\">'.$rowp['prod_cod'].'</td>\n <td style=\"width: 9%; text-align: left;\">'.mb_convert_encoding(''.$rowp['prod_producto'], 'cp1252', 'UTF-8').'</td>\n <td style=\"width: 9%; text-align: left;\">'.mb_convert_encoding(''.$rowp['prod_resultado'], 'cp1252', 'UTF-8').'</td>\n <td style=\"width: 9%; text-align: left;\">'.mb_convert_encoding(''.$rowp['prod_indicador'], 'cp1252', 'UTF-8').'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['prod_linea_base'],2).'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['prod_meta'],2).'</td>';\n\n if(count($programado)!=0){\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['enero'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['febrero'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['marzo'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['abril'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['mayo'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['junio'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['julio'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['agosto'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['septiembre'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['octubre'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['noviembre'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['diciembre'],2).'</td>';\n }\n else{\n for ($i=1; $i <=12 ; $i++) { \n $tabla.='<td bgcolor=\"#f5cace\">0.00</td>';\n }\n }\n\n $tabla.='\n <td style=\"width: 9%; text-align: left;\">'.mb_convert_encoding(''.$rowp['prod_fuente_verificacion'], 'cp1252', 'UTF-8').'</td>\n <td style=\"width: 4%; text-align: right;\">'.number_format($ptto, 2, ',', '.').'</td>\n </tr>';\n }\n $tabla .=\n '</tbody>\n </table>';\n\n return $tabla;\n }", "function insertTableInsumos($headers,$matrizDatos,$nomTabla) {\n //verificar tabla a insertar (posteriormente puede ser una funcion):\n $cell_link=setNombreClase($nomTabla);\n\n echo '<div class=\"card-body\">\n <div class=\"table-responsive\" >\n <table class=\"table table-bordered dataTableClase\" width=\"100%\" cellspacing=\"0\">'; //apertura de etiquetas\n //rellenar head:\n echo '<thead><tr>';\n foreach ($headers as $hd) {\n echo \"<th>\".$hd.\"</th>\";\n }\n echo'</tr></thead>';\n //rellenar el footer:\n echo '<tfoot><tr>';\n foreach ($headers as $hd) {\n echo \"<th>\".$hd.\"</th>\";\n }\n echo'</tr></tfoot>';\n echo '<tbody>';\n foreach ($matrizDatos as $reg) {\n echo \"<tr>\";\n foreach ($reg as $cell) {\n echo \"<td>\".$cap = ucfirst(mb_strtolower($cell)).\"</td>\"; // Capitalize\n }\n //el nombre de la clase para las celdas de la ultima columna de la tabla dependen de la tabla a mostrar\n echo\"<td class=\".$cell_link.\">\";\n echo \"<b><a class='\".$reg[0].\" t-vendidos' data-toggle='modal' href= '#trasladoInsumosVendModal' title='Trasladar a vendidos'>V</a></b>\"; //el data-target debe variar segun la tabla\n echo \"<b><a class='\".$reg[0].\" t-consignacion' data-toggle='modal' href='#trasladoInsumosConsModal' title='Trasladar a consignación'>C</a></b>\";\n echo \"</td></tr>\"; //\".$reg[0].\"\n }\n echo '</tbody></table></div></div>'; //cierre etiquetas tabla\n}", "function tabela($vetorComcadastros, $vetorComIndices){//Função que cria a tabela/lista recebe o vetor cos os cadsastros e outro com os indices\n retornaEscolhidos($vetorComcadastros, $vetorComIndices);//escreve a tabela\n }", "public function rep_list_operaciones_pi_2019($com_id,$tp){\n $obj_est=$this->model_producto->list_oestrategico($com_id); /// Objetivos Estrategicos\n $componente=$this->model_componente->get_componente_pi($com_id);\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']);\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); //// DATOS PROYECTO\n $tabla='';\n\n if($tp==1){\n $tab='table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" style=\"width:100%;\"';\n }\n elseif($tp==2){\n $tabla .='<style>\n table{font-size: 9px;\n width: 100%;\n max-width:1550px;\n overflow-x: scroll;\n }\n th{\n padding: 1.4px;\n text-align: center;\n font-size: 9px;\n }\n </style>';\n $tab='table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\"';\n }\n \n $tabla.='<'.$tab.'>\n <thead>\n <tr class=\"modo1\" style=\"height:45px;\">\n <th style=\"width:1%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">#</font></th>\n <th style=\"width:6%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">ACCI&Oacute;N ESTRATEGICA</font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">OPERACI&Oacute;N</font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">RESULTADO</font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">ACTIVIDAD</font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">INDICADOR</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">LINEA BASE</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">META</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">ENE.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">FEB.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">MAR.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">ABR.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">MAY.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">JUN.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">JUL.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">AGO.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">SEP.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">OCT.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">NOV.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">DIC.</font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">VERIFICACI&Oacute;N</font></th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n if(count($obj_est)!=0){\n foreach($obj_est as $rowo){\n $tabla.='<tr class=\"modo1\" bgcolor=\"#c3efea\">';\n $tabla.='<td colspan=\"21\" style=\"height:15px;\">OBJ. EST. '.$rowo['obj_codigo'].'.- '.$rowo['obj_descripcion'].'</td>';\n $tabla.='</tr>';\n $productos=$this->model_producto->list_producto_programado_oestrategico($com_id,$this->gestion,$rowo['obj_id']); /// Productos\n \n foreach($productos as $rowp){\n $sum=$this->model_producto->meta_prod_gest($rowp['prod_id']);\n $monto=$this->model_producto->monto_insumoproducto($rowp['prod_id']);\n $color=''; $tp='';\n if($rowp['indi_id']==1){\n if(($sum[0]['meta_gest']+$rowp['prod_linea_base'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n elseif ($rowp['indi_id']==2) {\n $tp='%';\n if($rowp['mt_id']==3){\n if(($sum[0]['meta_gest'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n }\n\n $ptto=0;\n if(count($monto)!=0){\n $ptto=$monto[0]['total'];\n }\n\n $nro++;\n $tabla.='<tr class=\"modo1\" bgcolor=\"'.$color.'\" style=\"height:40px;\">';\n $tabla.='<td style=\"height:30px;\">'.$nro.'</td>\n <td>'.$rowp['acc_codigo'].'.- '.$rowp['acc_descripcion'].'</td>\n <td>'.$rowp['prod_producto'].'</td>\n <td>'.$rowp['prod_resultado'].'</td>\n <td></td>\n <td>'.$rowp['prod_indicador'].'</td>\n <td align=\"right\">'.$rowp['prod_linea_base'].'</td>\n <td align=\"right\">'.$rowp['prod_meta'].'</td>\n <td align=\"right\">'.$rowp['enero'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['febrero'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['marzo'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['abril'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['mayo'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['junio'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['julio'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['agosto'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['septiembre'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['octubre'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['noviembre'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['diciembre'].''.$tp.'</td>\n <td>'.$rowp['prod_fuente_verificacion'].'</td>'; \n $tabla.='</tr>';\n $tabla.=''.$this->actividades_2019($rowp['prod_id'],$nro).'';\n }\n }\n }\n else{\n $tabla.='<tr><td colspan=\"22\">No existen operaciones alineadas, Verifique Operaciones</td></tr>';\n }\n \n $tabla .=\n '</tbody>\n </table>';\n\n return $tabla;\n }", "public function table(){\r\n\r\n return $this;\r\n }", "function mostrar_tabla()\n {\n return $this->mostrar_tabla_slickgrid();\n /*\n $sPrefs = '';\n $id_usuario= core\\ConfigGlobal::mi_id_usuario();\n $tipo = 'tabla_presentacion';\n $oPref = new usuarios\\Preferencia(array('id_usuario'=>$id_usuario,'tipo'=>$tipo));\n $sPrefs=$oPref->getPreferencia();\n if ($sPrefs == 'html') {\n return $this->mostrar_tabla_html();\n } else {\n return $this->mostrar_tabla_slickgrid();\n }\n */\n }", "public function componente_operacion_nuevo($com_id){\n $obj_est=$this->model_producto->list_oestrategico($com_id); /// Objetivos Estrategicos\n $componente = $this->model_componente->get_componente_pi($com_id); //// DATOS COMPONENTE\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']); /// DATOS FASE\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); //// DATOS PROYECTO\n $mes = $this->mes_nombre();\n $tabla='';\n $tabla.='<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" style=\"width:100%;\" align=\"center\">\n <thead>\n <tr class=\"modo1\">\n <th style=\"width:1%;\" style=\"background-color: #1c7368; color: #FFFFFF\" style=\"height:12px;\">#</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ACCI&Oacute;N ESTRATEGICA</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">OPERACI&Oacute;N</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">RESULTADO</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">INDICADOR</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">LB.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">META</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ENE.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">FEB.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">MAR.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ABR.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">MAY.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">JUN.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">JUL.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">AGO.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">SEPT.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">OCT.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">NOV.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">DIC.</th>\n <th style=\"width:8%;\" style=\"background-color: #1c7368; color: #FFFFFF\">VERIFICACI&Oacute;N</th> \n <th style=\"width:4%;\" style=\"background-color: #1c7368; color: #FFFFFF\">PPTO.</th> \n <th style=\"width:4%;\" style=\"background-color: #1c7368; color: #FFFFFF\">COD. PPTO.</th> \n </tr> \n \n </thead>\n <tbody>';\n $nro=0;\n if(count($obj_est)!=0){\n foreach($obj_est as $rowo){\n $productos=$this->model_producto->list_producto_programado_oestrategico($com_id,$this->gestion,$rowo['obj_id'],$rowo['gi'],$rowo['gf']); /// Productos\n\n if(count($productos)!=0){\n $tabla.='<tr class=\"modo1\" bgcolor=\"#9cdcd4\"><td colspan=\"22\" style=\"width: 100%; text-align: left\" style=\"height:13px;\">OBJ. EST. '.$rowo['obj_codigo'].'.- '.$rowo['obj_descripcion'].'</td></tr>';\n foreach($productos as $rowp){\n $sum=$this->model_producto->meta_prod_gest($rowp['prod_id']);\n $monto=$this->model_producto->monto_insumoproducto($rowp['prod_id']);\n $color=''; $tp='';\n if($rowp['indi_id']==1){\n if(($sum[0]['meta_gest'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n elseif ($rowp['indi_id']==2) {\n $tp='%';\n if($rowp['mt_id']==3){\n if(($sum[0]['meta_gest'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n }\n\n $ptto=0;\n if(count($monto)!=0){\n $ptto=$monto[0]['total'];\n }\n\n $nro++;\n\n $tabla.='<tr class=\"modo1\" bgcolor=\"'.$color.'\">';\n $tabla.=' <td style=\"width: 1%; text-align: left;\" style=\"height:11px;\">'.$nro.'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['acc_codigo'].'.- '.$rowp['acc_descripcion'].'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['prod_producto'].'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['prod_resultado'].'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['prod_indicador'].'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['prod_linea_base'],2).'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['prod_meta'],2).'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['enero'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['febrero'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['marzo'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['abril'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['mayo'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['junio'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['julio'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['agosto'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['septiembre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['octubre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['noviembre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['diciembre'],2).''.$tp.'</td>\n <td style=\"width: 8%; text-align: left;\">'.$rowp['prod_fuente_verificacion'].'</td>\n <td style=\"width: 4%; text-align: right;\">'.number_format($ptto, 2, ',', '.').'</td>\n <td style=\"width: 4%; text-align: center;\" bgcolor=\"#dedcdc\">'.$rowp['prod_cod'].'</td>'; \n $tabla.='</tr>';\n }\n }\n }\n }\n else{\n $tabla.='<tr class=\"modo1\"><td colspan=\"22\" style=\"width: 100%; text-align: left;\">SIN OPERACIONES</td></tr>';\n }\n $tabla.='\n </tbody>\n </table>';\n\n return $tabla;\n }", "function tabla02($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table border=\\\"1\\\">\";\n\tforeach( $array01 as $key => $value){\n\t\tif ( $key == 'id' or $key == 'ID' or $key == 'Id'){\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td><td> - </td></tr>\\n\";\n\t\t} else{\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t\t}\n\t}\n\t$array02[$i++] = \"</table>\";\n\treturn $array02;\n}", "function base_clear(){\n $tables = array(\n 'oc_product',\n 'oc_product_image',\n 'oc_manufacturer',\n 'oc_manufacturer_description',\n 'oc_product_description',\n 'oc_product_to_category',\n 'oc_product_attribute',\n 'oc_attribute',\n 'oc_attribute_description',\n // 'oc_attribute_value',\n // 'oc_category',\n // 'oc_category_description',\n 'oc_product_to_store',\n // 'oc_category_to_store',\n 'oc_manufacturer_to_store',\n 'oc_product_to_layout',\n // 'oc_category_to_layout',\n );\n foreach ($tables as $table)\n {\n sDb::query(\"TRUNCATE TABLE $table\");\n echo \"Таблица $table очищена\\n\";\n }\n}", "function build_table($new,$array_cat){\n\t\t//de categorias de serviceo.\n\t\t//Hacemos las iniciaciones pertinentes para intentar\n\t\t//aclarar un poco el codigo\n\t\t$ini_fila=\"<tr>\";\n\t\t$fin_fila=\"</tr>\";\n\t\t$ini_col='<td valign=\"top\" nowrap>';\n\t\t$fin_col=\"</td>\";\n\t\t$NUM_MAX_COLS=1;\n\t\t//Por cada columna un padre y sus hijos.\n\t\t$cadena='<table border=\"0\">';\n\t\t$num_current_col=$NUM_MAX_COLS+1;\t\t\n\t\tfor ($i=0;$i<count($array_cat);$i++){\n\t\t\tif ($num_current_col==$NUM_MAX_COLS+1){\n\t\t\t\t$num_current_col=1;\n\t\t\t\t$cadena=$cadena.$ini_fila;\n\t\t\t}\n\t\t\t$cadena=$cadena.$ini_col;\n\t\t\t//Damos el padre para que empiece la recursividad\t\t\t\n\t\t\t\n\t\t\t$cadena=$cadena.$this->build_col($new,$array_cat[$i],0,\"services\");\t\t\n\t\t\t//0 es el numero de tabulaciones inicial.\n\t\t\t//\"services\" es el nombre que tendran los checkbox.\n\t\t\t$cadena=$cadena.$fin_col;\n\t\t\t$num_current_col++;\n\t\t\tif ($num_current_col==$NUM_MAX_COLS+1){\n\t\t\t\t$cadena=$cadena.$fin_fila;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Si el numero de la columna actual es menor\n\t\t//que el numero maximo de columnas +1 \n\t\t//restamos al maximo la actual para saber cuantas faltan. \n\t\tif ($num_current_col<$NUM_MAX_COLS+1){\t\t\t\n\t\t\t$cadena=$cadena.'<td colspan=\"'.($NUM_MAX_COLS+1-$num_current_col).'\">&nbsp;'.$fin_col.$fin_fila;\n\t\t}\n\t\t$cadena=$cadena.'</table>';\n\t\treturn $cadena;\n\t}", "function clonTable1toTable2Inscritos($T_INSCRITOS,$PROVINCIA, $CLAVE, $TOMO, $FOLIO)\n{\n global $mysqli;\n $TINS = $T_INSCRITOS;\n $query = new Query($mysqli, \"INSERT INTO inscritostmp SELECT * FROM \".$TINS.\" WHERE provincia=? and clave=? and tomo=? and folio=?\");\n $parametros = array('ssss', &$PROVINCIA, &$CLAVE, &$TOMO, &$FOLIO);\n $data = $query->getresults($parametros);\n return true;\n}", "function listarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_sel';\n\t\t$this->transaccion='WF_tabla_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tabla','int4');\n\t\t$this->captura('id_tipo_proceso','int4');\n\t\t$this->captura('vista_id_tabla_maestro','int4');\n\t\t$this->captura('bd_scripts_extras','text');\n\t\t$this->captura('vista_campo_maestro','varchar');\n\t\t$this->captura('vista_scripts_extras','text');\n\t\t$this->captura('bd_descripcion','text');\n\t\t$this->captura('vista_tipo','varchar');\n\t\t$this->captura('menu_icono','varchar');\n\t\t$this->captura('menu_nombre','varchar');\n\t\t$this->captura('vista_campo_ordenacion','varchar');\n\t\t$this->captura('vista_posicion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('menu_codigo','varchar');\n\t\t$this->captura('bd_nombre_tabla','varchar');\n\t\t$this->captura('bd_codigo_tabla','varchar');\n\t\t$this->captura('vista_dir_ordenacion','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('nombre_tabla_maestro','varchar');\n\t\t$this->captura('vista_estados_new','text');\n\t\t$this->captura('vista_estados_delete','text');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function buildHTMLTable($dataSet){\n\n $tblHTML = \"<table class='cleanTbl'>\";\n\n foreach ($dataSet as $row) {\n\n $tblHTML = $tblHTML.\"<tr class='cleanTbl'>\";\n\n foreach($row as $col){\n\n $tblHTML = $tblHTML.\"<td class='cleanTbl'>$col</td>\";\n\n }\n $tblHTML = $tblHTML.\"</tr>\";\n\n }\n $tblHTML = $tblHTML.\"</table>\";\n\n return $tblHTML;\n}", "function DOM_clean_table($table) {\r\n\t\t$parentNode = $table->parentNode;\r\n\t\tif($parentNode->nodeName === \"div\" && ReTidy::DOM_isConflationaryWithParentIgnoringWhitespace($table) && !$parentNode->hasAttributes()) {\r\n\t\t\t$parentNode->setAttribute(\"stripme\", \"y\");\r\n\t\t\tReTidy::DOM_strip_node($parentNode);\r\n\t\t}\r\n\t\t\r\n\t\t// empty tables...\r\n\t\tif(ReTidy::isEmptyElement($table)) {\r\n\t\t\t$table->setAttribute(\"stripme\", \"y\");\r\n\t\t\tReTidy::DOM_strip_node($table);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// tables with only one datum\r\n\t\t$border_attribute = ReTidy::getAttribute($table, \"border\");\r\n\t\t//$blockString = DTD::getBlock();\r\n\t\t//$query = ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'thead/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'thead/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tfoot/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tfoot/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tbody/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tbody/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th';\r\n\t\t$query = ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'thead/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tfoot/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tbody/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'thead/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tfoot/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tbody/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td';\r\n\t\t$cells = $this->xpath->query($query, $table);\r\n\t\t$count_cells = $count_empty_cells = 0;\r\n\t\t$last_cell_with_content = false;\r\n\t\tforeach($cells as $cell) {\r\n\t\t\t$count_cells++;\r\n\t\t\tif(ReTidy::isEmptyElement($cell)) {\r\n\t\t\t\t$count_empty_cells++;\r\n\t\t\t} else {\r\n\t\t\t\t$last_cell_with_content = $cell;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if($count_cells - $count_empty_cells < 2 && isset($last_cell_with_content)) {\r\n\t\tif($count_cells - $count_empty_cells < 2) {\r\n\t\t\t/*$table->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t$firstElementChild = ReTidy::getFirstElementChild($last_cell_with_content);\r\n\t\t\t$isConflationaryBlock = false;\r\n\t\t\t// notice that this is not smart enough to catch multiple block elements as the single datum in a table.\r\n\t\t\tif($firstElementChild && ReTidy::DOM_isConflationaryWithParentIgnoringWhitespace($firstElementChild)) {\r\n\t\t\t\tforeach(explode(\"|\", $blockString) as $blockName) {\r\n\t\t\t\t\tif($blockName === $firstElementChild->nodeName) {\r\n\t\t\t\t\t\t$isConflationaryBlock = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($isConflationaryBlock) {\r\n\t\t\t\t$new_node = $firstElementChild->cloneNode(true);\r\n\t\t\t} else {\r\n\t\t\t\t$last_cell_with_content->setAttribute(\"divme\", \"y\");\r\n\t\t\t\t$new_node = $last_cell_with_content->cloneNode(true);\r\n\t\t\t}*/\r\n\t\t\tif($border_attribute !== false) {\r\n\t\t\t\t//var_dump($border_attribute->nodeValue);\r\n\t\t\t\tif($border_attribute->nodeValue == 0) {\r\n\t\t\t\t\t// do nothing\r\n\t\t\t\t\t//$last_cell_with_content->setAttribute(\"divme\", \"stripme\");\r\n\t\t\t\t\t//$last_cell_with_content->setAttribute(\"stripme\", \"y\");\r\n\t\t\t\t\t//ReTidy::DOM_strip_node($last_cell_with_content);\r\n\t\t\t\t\tReTidy::DOM_strip_one_cell_table($table);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif($last_cell_with_content !== false) {\r\n\t\t\t\t\t\t$last_cell_with_content->setAttribute(\"divme\", \"y\");\r\n\t\t\t\t\t\tReTidy::addStyleWithoutOverwrite($last_cell_with_content, \"border: \" . $border_attribute->nodeValue . \"px solid black;\");\r\n\t\t\t\t\t\tReTidy::DOM_strip_all_but_datum_of_one_datum_table($table, $last_cell_with_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\tReTidy::DOM_strip_one_cell_table($table);\r\n\t\t\t}\r\n\t\t\t//$table->parentNode->insertBefore($new_node, $table);\r\n\t\t}\r\n\t\t\r\n\t\t// eliminate layout tables (at least the kind that is only one cell with a table in it)\r\n\t\t// seems to be taken care of by the above\r\n\t\t/*$query = ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'thead/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'thead/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tfoot/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tfoot/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tbody/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tbody/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th';\r\n\t\t$cells = $this->xpath->query($query, $table);\r\n\t\t$count_cells = 0;\r\n\t\tforeach($cells as $cell) {\r\n\t\t\t$count_cells++;\r\n\t\t}\r\n\t\tif($count_cells === 1) {\r\n\t\t\t$query = '//' . ReTidy::get_html_namespace() . 'table';\r\n\t\t\t$tables_in_single_cell = $this->xpath->query($query, $table);\r\n\t\t\t$count_tables_in_single_cell = 0;\r\n\t\t\tforeach($tables_in_single_cell as $table_in_single_cell) {\r\n\t\t\t\t$count_tables_in_single_cell++;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif($count_tables_in_single_cell > 0) {\r\n\t\t\t\tReTidy::DOM_strip_one_cell_table($table);\r\n\t\t\t}\r\n\t\t}*/\r\n\t\t\r\n\t\t/*\r\n\t\t// take \"captions\" out of tables\r\n\t\t$query = ReTidy::get_html_namespace() . 'thead';\r\n\t\t$theads = $this->xpath->query($query, $table);\r\n\t\tforeach($theads as $thead) {\r\n\t\t\t$query = ReTidy::get_html_namespace() . 'tr[1]';\r\n\t\t\t$first_tr_in_theads = $this->xpath->query($query, $thead);\r\n\t\t\tforeach($first_tr_in_theads as $first_tr_in_thead) {\r\n\t\t\t\t// (there should only be one <thead> and only one first <tr> therein.\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($first_tr_in_thead) {\r\n\t\t\t$first_tr_table = $first_tr_in_thead;\r\n\t\t} else {\r\n\t\t\t$query = ReTidy::get_html_namespace() . 'tr[1]';\r\n\t\t\t$first_tr_tables = $this->xpath->query($query, $table);\r\n\t\t\tforeach($first_tr_tables as $first_tr_table) {\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t$query = ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'th';\r\n\t\t$cells_in_first_tr = $this->xpath->query($query, $first_tr_table);\r\n\t\tforeach($cells_in_first_tr as $cell_in_first_tr) {\r\n\t\t\t$count429++;\r\n\t\t}\r\n\t\tif(strpos(trim(ReTidy::tagless($first_tr_table)), \"Table\") === 0 && $count429 === 1) {\r\n\t\t\t// then we want to take the caption out of the table\r\n\t\t\tif($thead) {\r\n\t\t\t\t// not sure if this is right since a thead could encompass many rows.\r\n\t\t\t\t//$thead->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\t// so:\r\n\t\t\t\t//$thead->setAttribute(\"stripme\", \"y\");\r\n\t\t\t\t//ReTidy::DOM_strip_node($thead);\r\n\t\t\t\t// maybe we do not want to do this at all\r\n\t\t\t}\r\n\t\t\tif($this->config['turn_captions_into'] === 'paragraphs') {\r\n\t\t\t\t$new_node = ReTidy::firstElementChild($first_tr_table)->cloneNode(true);\r\n\t\t\t\t$ps_in_new_node = $this->xpath->query('.//' . ReTidy::get_html_namespace() . 'p', $new_node);\r\n\t\t\t\t$number_of_ps = 0;\r\n\t\t\t\tforeach($ps_in_new_node as $index356435 => $value356435) {\r\n\t\t\t\t\tif($index356435 === 0) {\r\n\t\t\t\t\t\t$first_p_in_new_node = $value356435;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$number_of_ps++;\r\n\t\t\t\t}\r\n\t\t\t\tif($number_of_ps > 0) {\r\n\t\t\t\t\tif($number_of_ps === 1) {\r\n\t\t\t\t\t\tif(ReTidy::areConflationaryIgnoringWhiteSpace($new_node, $first_p_in_new_node)) {\r\n\t\t\t\t\t\t\t// it is unlikely but possible to have one paragraph that is not conflationary with the cell.\r\n\t\t\t\t\t\t\t$new_node = $first_p_in_new_node->cloneNode(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tprint(\"deal with one non-conflationary paragraph in the cell 43490434<br>\\r\\n\");\r\n\t\t\t\t\t\t\tprint(\"cell: \");var_dump(ReTidy::DOM_getNodeString($new_node));\r\n\t\t\t\t\t\t\texit(0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tprint(\"deal with more than one paragraph in a table caption 43490435<br>\\r\\n\");\r\n\t\t\t\t\t\tprint(\"cell: \");var_dump(ReTidy::DOM_getNodeString($new_node));\r\n\t\t\t\t\t\texit(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$new_node->setAttribute('newtag', 'p');\r\n\t\t\t\t}\r\n\t\t\t\t$first_tr_table->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\tforeach($new_node->attributes as $attribute) {\r\n\t\t\t\t\t$attribute->nodeValue = \"stripme\";\r\n\t\t\t\t}\r\n\t\t\t\t$new_node->insertBefore(new DOMText('XXX9o9NewTagBeginXXXstrong9o9XXX'), $new_node->firstChild);\r\n\t\t\t\t$new_node->appendChild(new DOMText('XXX9o9NewTagEndXXXstrong9o9XXX'));\r\n\t\t\t\t$table->parentNode->insertBefore($new_node, $table);\r\n\t\t\t} elseif($this->config['turn_captions_into'] === 'captions') {\r\n\t\t\t\t$first_tr_table->setAttribute(\"stripme\", \"y\");\r\n\t\t\t\tReTidy::DOM_strip_node($first_tr_table);\r\n\t\t\t\tif($cell_in_first_tr->hasAttributes()) {\r\n\t\t\t\t\tforeach($cell_in_first_tr->attributes as $attribute) {\r\n\t\t\t\t\t\t$attribute->nodeValue = \"stripme\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$cell_in_first_tr->setAttribute('newtag', 'caption');\r\n\t\t\t\t$cell_in_first_tr->setAttribute('style', 'text-align: left;');\r\n\t\t\t\t$cell_in_first_tr->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXstrong9o9XXX\"), $cell_in_first_tr->firstChild);\r\n\t\t\t\t$cell_in_first_tr->appendChild(new DOMText(\"XXX9o9NewTagEndXXXstrong9o9XXX\"));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t//$previousElement = ReTidy::previousElement($table);\r\n\t\t\t$previousElement = ReTidy::previousElementIgnoringNesting($table);\r\n\t\t\t$tagless = trim(ReTidy::tagless($previousElement));\r\n\t\t\tpreg_match('/Table(au){0,1} [0-9]*:/is', $tagless, $matches45089);\r\n\t\t\tif(strpos($tagless, $matches45089[0]) === 0 && $previousElement->nodeName === \"p\") {\r\n\t\t\t\tif($this->config['turn_captions_into'] === 'captions') {\r\n\t\t\t\t\t$new_node = $previousElement->cloneNode(true);\r\n\t\t\t\t\t$previousElement->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\t\tif($new_node->hasAttributes()) {\r\n\t\t\t\t\t\tforeach($new_node->attributes as $attribute) {\r\n\t\t\t\t\t\t\t$attribute->nodeValue = \"stripme\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$new_node->setAttribute('newtag', 'caption');\r\n\t\t\t\t\t$new_node->setAttribute('style', 'text-align: left;');\r\n\t\t\t\t\t$new_node->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXstrong9o9XXX\"), $new_node->firstChild);\r\n\t\t\t\t\t$new_node->appendChild(new DOMText(\"XXX9o9NewTagEndXXXstrong9o9XXX\"));\r\n\t\t\t\t\tif($thead) {\r\n\t\t\t\t\t\t$table->insertBefore($new_node, $thead);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$table->insertBefore($new_node, $first_tr_table);\r\n\t\t\t\t\t}\r\n\t\t\t\t} elseif($this->config['turn_captions_into'] === 'paragraphs') {\r\n\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'strong';\r\n\t\t\t\t\t$strongs735 = $this->xpath->query($query, $previousElement);\r\n\t\t\t\t\t$found_strong735 = false;\r\n\t\t\t\t\tforeach($strongs735 as $strong735) {\r\n\t\t\t\t\t\t$found_strong735 = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!$found_strong735) {\r\n\t\t\t\t\t\t$previousElement->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXstrong9o9XXX\"), $previousElement->firstChild);\r\n\t\t\t\t\t\t$previousElement->appendChild(new DOMText(\"XXX9o9NewTagEndXXXstrong9o9XXX\"));\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// take bottom table notes (source information, etc...) out of tables\r\n\t\t// needs work to properly identify only bottom table notes...\r\n\t\t$query = ReTidy::get_html_namespace() . 'tfoot';\r\n\t\t$tfoots = $this->xpath->query($query, $table);\r\n\t\tforeach($tfoots as $tfoot) {\r\n\t\t\t$query = ReTidy::get_html_namespace() . 'tr[last()]';\r\n\t\t\t$first_tr_in_tfoots = $this->xpath->query($query, $tfoot);\r\n\t\t\tforeach($first_tr_in_tfoots as $first_tr_in_tfoot) {\r\n\t\t\t\t// (there should only be one <tfoot> and only one first <tr> therein.\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($first_tr_in_tfoot) {\r\n\t\t\t$last_tr_table = $first_tr_in_tfoot;\r\n\t\t} else {\r\n\t\t\t$query = ReTidy::get_html_namespace() . 'tr[last()]';\r\n\t\t\t$last_tr_tables = $this->xpath->query($query, $table);\r\n\t\t\tforeach($last_tr_tables as $last_tr_table) { }\r\n\t\t}\r\n\t\t$query = ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'th';\r\n\t\t$cells_in_last_tr = $this->xpath->query($query, $last_tr_table);\r\n\t\t$count430 = 0;\r\n\t\tforeach($cells_in_last_tr as $cell_in_last_tr) {\r\n\t\t\t$count430++;\r\n\t\t}\r\n\t\t$tagless = ReTidy::tagless($cell_in_last_tr);\r\n\t\tif($count430 === 1 && (stripos(trim($tagless), \"source\") === 0 || ReTidy::hasABulletForThePurposesOfTableSourceInformation(trim($tagless)))) {\r\n\t\t\t// then we want to take the table notes out of the table\r\n\t\t\t$last_tr_table->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t$new_node = ReTidy::lastElementChild($last_tr_table)->cloneNode(true);\r\n\t\t\tforeach($new_node->attributes as $attribute) {\r\n\t\t\t\t$attribute->nodeValue = \"stripme\";\r\n\t\t\t}\r\n\t\t\t$new_node->setAttribute('newtag', 'div');\r\n\t\t\tif($this->config['table_note_size'] == '80percent') {\r\n\t\t\t\t//$new_node->setAttribute('class', 'fontSize80');\r\n\t\t\t\t// the file is not necessarily CLF2\r\n\t\t\t\t$new_node->setAttribute('style', 'font-size: 80%;');\r\n\t\t\t}\r\n\t\t\t//if($border_attribute !== false) { // ???\r\n\t\t\t//\tif($border_attribute->nodeValue === 0) {\r\n\t\t\t//\t\t// do nothing\r\n\t\t\t//\t} else {\r\n\t\t\t//\t\tReTidy::addStyleWithoutOverwrite($new_node, \"border: \" . $border_attribute->nodeValue . \"px solid black;\");\r\n\t\t\t//\t}\r\n\t\t\t//}\r\n\t\t\t$table->parentNode->insertBefore($new_node, $table->nextSibling);\r\n\t\t}\r\n\t\t*/\r\n\t\t$query = './/' . ReTidy::get_html_namespace() . 'tr';\r\n\t\t$trs = $this->xpath->query($query, $table);\r\n\t\t// another case that we would want to merge in: when for some number of columns; in each row out of these columns,\r\n\t\t// there is only content in one of the cells... not necessarily; empty cells could be considered data.\r\n\t\t/*\r\n\t\t\r\n\t\t// merge cells\r\n\t\t// check if this table is a difficult one that we want to avoid\r\n\t\t$proceed_with_merging = true;\r\n\t\tforeach($trs as $tr) {\r\n\t\t\t$query = ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'th';\r\n\t\t\t$cells = $this->xpath->query($query, $tr);\r\n\t\t\t$count_cells_in_row = 0;\r\n\t\t\tforeach($cells as $cell) {\r\n\t\t\t\t$colspan_amount = ReTidy::getColspan($cell);\r\n\t\t\t\twhile($colspan_amount > 1) {\r\n\t\t\t\t\t$colspan_amount--;\r\n\t\t\t\t\t$count_cells_in_row++;\r\n\t\t\t\t}\r\n\t\t\t\t$count_cells_in_row++;\r\n\t\t\t}\r\n\t\t\tif($count_cells_in_row !== $this->table_width) {\r\n\t\t\t\t$proceed_with_merging = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($proceed_with_merging) {\r\n\t\t\tforeach($trs as $tr) {\r\n\t\t\t\t// merge cells containing text that belongs in the same cell:\r\n\t\t\t\t// criteria for determining if cells should be joined:\r\n\t\t\t\t\t// * the text content of cells in a column that should be joined is of about the same length \r\n\t\t\t\t\t// (because a new cell exists where the text should simply wrap)?\r\n\t\t\t\t\t// * merging should begin at a row that has content in every cell?\r\n\t\t\t\t\t// * merging should end at the row before one where it could begin or at the end of the table\r\n\t\t\t\t\r\n\t\t\t\t// to simplify matters, we choose in rows without any rowspan or colspan\r\n\t\t\t\t// although we may want to consider rowspan later (because of the case where \"one part of a column\r\n\t\t\t\t// that should be joined is already joined\")\r\n\t\t\t\t$query = ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'th';\r\n\t\t\t\t$tr_cells = $cells = $this->xpath->query($query, $tr);\r\n\t\t\t\t$number_cells_in_row = 0;\r\n\t\t\t\tforeach($cells as $cell) {\r\n\t\t\t\t\t$number_cells_in_row++;\r\n\t\t\t\t}\r\n\t\t\t\tif($number_cells_in_row === $this->table_width) {\r\n\t\t\t\t\t$cells_in_this_row_have_content = true;\r\n\t\t\t\t\tforeach($cells as $cell) {\r\n\t\t\t\t\t\tif(ReTidy::isEmptyTag($cell)) {\r\n\t\t\t\t\t\t\t$cells_in_this_row_have_content = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($cells_in_this_row_have_content) {\r\n\t\t\t\t\t\t// then this is a candidate for merging so check the criteria\r\n\t\t\t\t\t\t// check if the text content in the cells is about the same length:\r\n\t\t\t\t\t\t// check if the cells look like they should be merged to a similar row or the end of the table:\r\n\t\t\t\t\t\t$nextElement = $tr;\r\n\t\t\t\t\t\twhile($nextElement = ReTidy::nextElement($nextElement)) {\r\n\t\t\t\t\t\t\t$query = ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'th';\r\n\t\t\t\t\t\t\t$cells4 = $this->xpath->query($query, $nextElement);\r\n\t\t\t\t\t\t\t$number_cells_in_row4 = 0;\r\n\t\t\t\t\t\t\tforeach($cells4 as $cell4) {\r\n\t\t\t\t\t\t\t\t$number_cells_in_row4++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif($number_cells_in_row4 === $this->table_width) {\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$cells_in_this_row_have_content4 = true;\r\n\t\t\t\t\t\t\t\tforeach($cells4 as $cell4) {\r\n\t\t\t\t\t\t\t\t\tif(ReTidy::isEmptyTag($cell4)) {\r\n\t\t\t\t\t\t\t\t\t\t$cells_in_this_row_have_content4 = false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif($cells_in_this_row_have_content4) {\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$element_cell_count = 0;\r\n\t\t\t\t\t\t\t\tforeach($cells4 as $element_cell) {\r\n\t\t\t\t\t\t\t\t\t$element_cell_count++;\r\n\t\t\t\t\t\t\t\t\t$tr_cell_count = 0;\r\n\t\t\t\t\t\t\t\t\tforeach($tr_cells as $tr_cell) {\r\n\t\t\t\t\t\t\t\t\t\t$tr_cell_count++;\r\n\t\t\t\t\t\t\t\t\t\tif($tr_cell_count === $element_cell_count) {\r\n\t\t\t\t\t\t\t\t\t\t\t//print(\"tr_cell\" . htmlentities(ReTidy::DOM_getNodeString($tr_cell)) . \"<br>\\r\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\tif($element_cell->hasChildNodes()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(!ReTidy::isEmptyTag($element_cell)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//$tr_cell->nodeValue = ReTidy::decode_for_DOM($tr_cell->nodeValue) . \" \";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tr_cell->nodeValue .= \" \";\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tr_cell->appendChild(new DOMText(ReTidy::DOM_decoded_for_DOM_child_of($element_cell)));\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t$element_cell->nodeValue = \"\";\r\n\t\t\t\t\t\t\t\t\t\t\t}\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}\r\n\t\t\t\t\t\t\t\t$element_cell->parentNode->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\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\r\n\t\t// (2011-10-26) we are doing very little table cleaning by now, due simply to the variety of ways <table>s may be misused (or possibly my lack of DOM coding skills)\r\n\t\t/*\r\n\t\t// eliminate empty rows then reduce rowspan on previous (along their column) cells\r\n\t\tforeach($trs as $tr) {\r\n\t\t\tif(ReTidy::isSpace(ReTidy::tagless($tr))) {\r\n\t\t\t\t$tr->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\t//if($tr->hasChildNodes()) {\r\n\t\t\t\t//\tforeach($tr->childNodes as $child) {\r\n\t\t\t\t//\t\tif($child->nodeType === 1) {\r\n\t\t\t\t//\t\t\t$child->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\t//\t\t}\r\n\t\t\t\t//\t}\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tReTidy::DOM_build_table_grid($table);\r\n\t\t$mirrored_array = ReTidy::array_mirror($this->table_grid);\r\n\t\tforeach($mirrored_array as $index => $row) {\r\n\t\t\t$empty_row = true;\r\n\t\t\tforeach($row as $index2 => $value2) {\r\n\t\t\t\t$cell = $value2[0];\r\n\t\t\t\t//if(ReTidy::isEmpty($cell)) {\r\n\t\t\t\tif(ReTidy::isSpace(ReTidy::tagless($cell))) {\r\n\t\t\t\t\t//$last_non_spanning_cell = $cell;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$rowspan = ReTidy::getRowspan($cell);\r\n\t\t\t\tif($rowspan > 1 && $mirrored_array[$index-1][$index2][0] === $cell) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$empty_row = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif($empty_row) {\r\n\t\t\t\t//$tr = $last_non_spanning_cell->parentNode;\r\n\t\t\t\t//$tr->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\tforeach($row as $index2 => $value2) {\r\n\t\t\t\t\t$cell = $value2[0];\r\n\t\t\t\t\t$rowspan = ReTidy::getRowspan($cell);\r\n\t\t\t\t\tif($rowspan > 1) {\r\n\t\t\t\t\t\t$rowspan--;\r\n\t\t\t\t\t\tif($rowspan === 1) {\r\n\t\t\t\t\t\t\t$cell->setAttribute('rowspan', 'stripme');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$cell->setAttribute('rowspan', $rowspan);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$cell->setAttribute(\"deleteme\", \"y\");\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\r\n\t\t// eliminate empty columns then reduce colspan on previous sibling cells\r\n\t\tReTidy::DOM_build_table_grid($table);\r\n\t\tforeach($this->table_grid as $index => $column) {\r\n\t\t\t$empty_column = true;\r\n\t\t\tforeach($column as $index2 => $value2) {\r\n\t\t\t\t$cell = $value2[0];\r\n\t\t\t\t//if(ReTidy::isEmpty($cell)) {\r\n\t\t\t\tif(ReTidy::isSpace(ReTidy::tagless($cell))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$colspan = ReTidy::getColspan($cell);\r\n\t\t\t\tif($colspan > 1 && $this->table_grid[$index-1][$index2][0] === $cell) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$empty_column = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif($empty_column) {\r\n\t\t\t\tforeach($column as $index2 => $value2) {\r\n\t\t\t\t\t$cell = $value2[0];\r\n\t\t\t\t\t$colspan = ReTidy::getColspan($cell);\r\n\t\t\t\t\tif($colspan > 1) {\r\n\t\t\t\t\t\t$colspan--;\r\n\t\t\t\t\t\tif($colspan === 1) {\r\n\t\t\t\t\t\t\t$cell->setAttribute('colspan', 'stripme');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$cell->setAttribute('colspan', $colspan);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t//var_dump(ReTidy::DOM_getNodeString($cell));print(\"<br>\\r\\n\");\r\n\t\t\t\t\t\t$cell->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t*/\r\n\t\t\r\n\r\n\t\tReTidy::DOM_empty_ths($table);\r\n\t\t/*\r\n\t\t// remove unnecessary <tbody>\r\n\t\t//$query = ReTidy::get_html_namespace() . 'tbody';\r\n\t\t//$tbodys = $this->xpath->query($query, $table);\r\n\t\t//foreach($tbodys as $tbody) {\r\n\t\t//\tif(ReTidy::DOM_isConflationaryWithParentIgnoringWhitespace($tbody)) {\r\n\t\t//\t\t$tbody->setAttribute(\"stripme\", \"y\");\r\n\t\t//\t\tReTidy::DOM_strip_node($tbody);\r\n\t\t//\t}\r\n\t\t//}\r\n\t\t// remove empty <thead>, <tbody>, <tfoot>? no.\r\n\t\t\r\n\t\t// cell splitting\r\n\t\t// it seems to be a rare case where the program will be able to determine when cells should be split\r\n\t\t// in other words; to determine when a putative datum cell is really many data\r\n\t\t// disabled 2011-09-09\r\n\t\tforeach($trs as $tr) {\r\n\t\t\t$array_cells_to_split = array();\r\n\t\t\t$saved_p_count = 0;\r\n\t\t\t$count_cells_with_large_number_of_ps = 0;\r\n\t\t\t$cells = $this->xpath->query('.//' . ReTidy::get_html_namespace() . 'td | .//' . ReTidy::get_html_namespace() . 'th', $tr);\r\n\t\t\tforeach($cells as $cell) {\r\n\t\t\t\t$p_in_cells = $this->xpath->query('.//' . ReTidy::get_html_namespace() . 'p', $cell);\r\n\t\t\t\t$count_ps_for_this_cell = 0;\r\n\t\t\t\tforeach($p_in_cells as $p_in_cell) {\r\n\t\t\t\t\t$count_ps_for_this_cell++;\r\n\t\t\t\t}\r\n\t\t\t\tif($count_ps_for_this_cell > 4) {\r\n\t\t\t\t\tif($saved_p_count < $count_ps_for_this_cell) {\r\n\t\t\t\t\t\t$saved_p_count = $count_ps_for_this_cell;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$array_cells_to_split[] = $cell;\r\n\t\t\t\t\t$count_cells_with_large_number_of_ps++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($count_cells_with_large_number_of_ps > 2) { // then do the splitting\r\n\t\t\t\tReTidy::splitCells($array_cells_to_split, $saved_p_count, 'row', $table);\r\n\t\t\t}\r\n\t\t}*/\r\n\t\treturn true;\r\n\t}", "public function mostrar_tabla_anuncios(){\n\n\t\t$return = '';\n\t\t$mensaje = array('0' => 'Desactivado', '1' => 'Activo');\n\t\t$cols = array('id', 'clave_interna', 'provincia', 'municipio', 'tipo_venta', 'anuncio_promocionado',\n\t\t\t\t\t 'anuncio_e','paquete','activo','apto');\n\t\t$this->where('ussr',$this->user);\n\n\t\tif($salida = $this->get('anuncios', NULL, $cols)){\n\n\t\t\t$return .= '<table class=\"table table-bordered table-hover\">';\n\n\t\t\t$return .= '<tr>\n\t\t\t\t\t <th>Imagen</th>\n\t\t\t\t\t <th>Clave interna</th>\n\t\t\t\t\t <th>Paquete</th>\n\t\t\t\t\t <th>Provincia</th>\n\t\t\t\t\t <th>Operacion</th>\n\t\t\t\t\t <th>Nº imagenes</th>\n\t\t\t\t\t <th>Idiomas</th>\n\t\t\t\t\t <th>Contratado</th>\n\t\t\t\t\t <th>Anuncio apto</th>\n\t\t\t\t\t <th>Anuncio activo</th>\n\t\t\t\t\t <th>Opciones</th>\n\t\t\t\t\t </tr>';\n\t\t\t//por cada anuncio varias cosas habra que hacer\n\t\t\t$i=1;\t\t \n\t\t\tforeach ($salida as $key => $value) {\n\t\t\n\t\t\t\t$num = $i++;\n\t\t\t\t$id_arr = md5($value['id']);\n\t\t\t\t$imagen = $this->sacar_foto($id_arr, $this->user);\n\n\t\t\t\t$return .='<tr>\n\t\t\t\t\t \t<td>'.$imagen.'</td>\n\t\t\t\t\t <td>'.$value['clave_interna'].'</td>\n\t\t\t\t\t <td>'.$value['paquete'].'</td>\n\t\t\t\t\t <td>'.$value['provincia'].'<br />\n\t\t\t\t\t '.$this->show_municipio($value['municipio']).'</td>\n\t\t\t\t\t <td>'.$value['tipo_venta'].'</td>';\n\n\n\n\t\t\t\t//mostrara numero de imagenes en el anuncio\n\t\t\t\t$return .='<td>';\n\t\t\t\t$return .= $this->num_imagenes_anuncio($value['id']);\n\t\t\t\t$return .='</td>';\n\n\n\t\t\t\t//mostrando idiomas en los que esta el anuncio\n\t\t\t\t$return .='<td>';\n\t\t\t\t$return .= $this->idiomas_del_anuncio($value['id']);\n\t\t\t\t$return .='</td>';\n\n\t\t\t\t//estrella o promocionado\n\t\t\t\t$return .='<td>';\n\t\t\t\tif(!empty($value['anuncio_promocionado']) && ($value['anuncio_promocionado'] == 1)){\n\t\t\t\t\t$return .= 'Anuncio promocionado<br />';\t}\n\t\t\t\tif($value['anuncio_e'] == 1){\n\t\t\t\t\t$return .= 'Anuncio estrella';\t\t\t}\t\n\t\t\t\t\t\n\t\t\t $return .= '</td>';\n\t\t\t $return .= '<td>'.$value['apto'].'</td>';\n\t\t\t $return .= '<td id=\"act-'.$id_arr.'\">'.$mensaje[$value['activo']].'</td>';\n\t\t\t //dropdown de opciones\n\t\t\t $return .= '<td>'.$this->dropdown_tabla_anuncios($id_arr).'</td>';\n\t\t\n\t\t\t\t$return .= '</tr>';\n\n\t\t\t}//fin del foreach\n\n\t\t\t$return .= '</table>';\n\n\n\t\t}else{\n\t\t\t$return .= '<h5 id=\"sec1\">No hay anuncios 1 </h5>';\n\t\t}\n\n\t\treturn $return;\n\t}", "public function tableWizard() {}", "function as_table() \n {\n #$str = \"<table> \\n\";\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) \n {\n if ($obj != NULL) \n {\n $str .= \"<tr>\\n\\t<td>\".$obj->label().\"</td>\\n\\t\";\n $str .= \"<td>\".$obj.\"</td>\\n</tr>\\n\";\n }\n }\n #$str .= \"</table>\\n\";\n return $str;\n }", "function affichagetableau6_12($tab)\n{\n foreach ($tab as $elt) {\n echo \"[\" . $elt . \"]\" . \"\\t\";\n }\n echo \"\\nLes valeurs du tableau ont été incrémentées de 1.\";\n}", "function make_table($result)\r\n{\r\n $temp_result=\"\\n<form name=f1 metbod='POST' action=''>\";\r\n $temp_result.=\"\\n<table cellpadding=2 cellspacing=1>\";\r\n for($i=0;$i<mysql_num_rows($result);$i++)\r\n {\r\n $a_rows=mysql_fetch_assoc($result);\r\n $noofcolumns=mysql_num_fields($result);\r\n #Starting rows-\r\n if($i==0)\r\n\t{\r\n\t $temp_result.=\"\\n<tr bgcolor=#d3dce3>\\n\";\r\n\t \t $temp_result.=\"<td colspan=3></td>\";\r\n\t foreach($a_rows as $key=>$value)\r\n\t {\r\n\t $temp_result.=\"<td>\".$key.\"</td>\";\r\n\t }\r\n\t $temp_result.=\"\\n</tr>\";\r\n\t}\r\n\r\n #data rows-\r\n $temp_result.=\"\\n<tr bgcolor=\".(($i%2==0)?\"#e5e5e5\":\"#d5d5d5\").\">\\n\";\r\n\t#edit columns-\r\n $temp_result.=\"\\n\\t<td><input type=checkbox name=check\".$i.\"></td>\";\r\n $temp_result.=\"\\n\\t<td><a name=\".$i.\" href=\\\"javascript:enable(\".$i.\",\".$noofcolumns.\")\\\"><img src=\\\"b_edit.png\\\" border=0></a></td>\";\r\n $temp_result.=\"\\n\\t<td><a href=\\\"\\\"><img src=\\\"b_drop.png\\\" border=0></a></td>\";\r\n\t#data columns- \r\n foreach($a_rows as $key=>$value)\r\n\t{\r\n\t $temp_result.=\"\\n\\t<td visibility='hidden'>\".$value.\"</td>\";\r\n\t $temp_result.=\"\\n\\t\";\r\n\t $temp_result.='<td id='.$key.$value.' display=\"none\"><input type=\"text\" disabled value=\"'.$value.'\" size='.size_of($key);\r\n\t /* if($key==\"Rollno\")*/ $temp_result.=(' name='.parsekey($key).$i);\r\n\t $temp_result.=' ></td>';\r\n\t}\r\n $temp_result.=\"\\n</tr>\";\r\n }\r\n\r\n $temp_result.=\"\\n</table>\";\r\n $temp_result.=\"\\n</form>\";\r\n\r\n $temp_java_result='<SCRIPT type=text/javascript>\r\n\tfunction hide(obj)\r\n\t{\r\n\t\tif(obj.style.display==\"none\")obj.style.display=\"\";\r\n\t\telse obj.style.display=\"none\";\r\n\t}\r\n\tfunction enable(row,col)\r\n\t{\r\n//\t\talert(\"row=\"+row+\"col=\"+col);\r\n\t\tfor( i=row*col+row+1;i<row*col+col+row+1 ;i++ )\r\n\t\t{\r\n//\t\t\talert(\"i=\"+document.f1.elements[i].name);\r\n\t\t\tdocument.f1.elements[i].disabled=false;//abled();//=\"\";\r\n\t\t}\t\t';\r\n\r\n foreach($a_rows as $key=>$value)\r\n {\r\n $temp_java_result.=\"\\n\\t\\tcellname=eval(\\\"\".parsekey($key).\"\\\"+row);\";\r\n $temp_java_result.=\"\\n\\t\\tdocument.f1.cellname.enabled=on;\";\r\n }\r\n $temp_java_result.='\r\n\t}\r\n\t</SCRIPT>';\r\n \r\n $temp_result=$temp_java_result.$temp_result;\r\n return $temp_result;\r\n}", "public function vistaXTablaModel($table){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $table\"); //preparacion de la consulta SQL \n\t\t$stmt->execute(); //ejecucion de la consulta\n\t\treturn $stmt->fetchAll(); //se retorna en un array asociativo el resultado de la consulta\n\t\t$stmt->close();\n\n\t}" ]
[ "0.6654925", "0.65896904", "0.6568284", "0.65653807", "0.6544467", "0.6507008", "0.64889824", "0.64698565", "0.64465", "0.64087266", "0.6332431", "0.63256013", "0.6316798", "0.6253999", "0.6213415", "0.6213369", "0.62104166", "0.62021184", "0.61981326", "0.61980724", "0.6195876", "0.6193925", "0.61616504", "0.6155494", "0.6150178", "0.6144538", "0.61357427", "0.613243", "0.6131448", "0.61200625", "0.6106987", "0.6088326", "0.608429", "0.6079589", "0.60697937", "0.6054531", "0.60534966", "0.60420144", "0.6035057", "0.602668", "0.60193294", "0.6017459", "0.6015461", "0.600726", "0.60029405", "0.60001904", "0.59975034", "0.5996498", "0.5989774", "0.59715605", "0.5971184", "0.5969077", "0.59260166", "0.5912031", "0.5853734", "0.58415854", "0.58365405", "0.58238983", "0.5795852", "0.5795128", "0.5795058", "0.57929873", "0.57925135", "0.57892764", "0.5784169", "0.5781228", "0.5771137", "0.5770244", "0.57694364", "0.57689005", "0.57689005", "0.5767981", "0.5766811", "0.576534", "0.5754975", "0.5745583", "0.5741276", "0.574093", "0.5740827", "0.5736968", "0.57357556", "0.5730672", "0.5728906", "0.5719552", "0.5714482", "0.5712304", "0.57118696", "0.570662", "0.5706093", "0.57048583", "0.570437", "0.5696169", "0.5693724", "0.5690917", "0.568801", "0.5682288", "0.56817746", "0.5681397", "0.56723815", "0.5672253", "0.5671977" ]
0.0
-1
renvoie un tableaux contenant tous les elements d'une table
public function selectAllWhere($table,$element, $value){ $requete = "SELECT * FROM $table WHERE $element ='$value'"; $result = array(); foreach($this->_dbh->query($requete) as $row){ $result = $row; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadTable()\n {\n $unites = $this->Unite->all([], 'uniid DESC');\n $i = 1;\n $html = '';\n\n foreach ($unites as $unite) {\n $html .= '<tr>' .\n '<td>' . $i ++ . '</td>' .\n '<td>' . $unite->unilibelle . '</td>' .\n '<td>' . $unite->uniabv . '</td>' .\n '<td>';\n if (in_array('113', $this->session->stkdroits)) {\n $html .= '<a data-toggle=\"modal\" href=\"#editeUnite\" onclick=\"laodForEditUnite(' . $unite->uniid . '); return false\" title=\"editer\"><i class=\"fa fa-edit\" style=\"color: #05AE0E;\"></i></a>';\n } else {\n $html .= '<a href=\"javascript: void(0)\" class=\"disabled\" title=\"editer\"><i class=\"fa fa-edit\"></i></a>';\n }\n if (in_array('112', $this->session->stkdroits)) {\n $html .= '<a data-toggle=\"modal\" href=\"#deletUnite\" onclick=\"laodDataForDeleteUnite(' . $unite->uniid . '); return false;\" title=\"supprimer\"><i class=\"fa fa-remove\" style=\"color: #FF3B30;\"></i></a>';\n }else {\n $html .= '<a href=\"javascript: void(0)\" class=\"disabled\" title=\"editer\"><i class=\"fa fa-remove\"></i></a>';\n }\n $html .= '</td>' .\n '</tr>';\n }\n\n return $html;\n }", "function prikazi_sqltabelu($sql_tabela) {\n\n\tglobal $db;\n\n\techo \"<table class='dt-table'>\";\n\techo \"<h2>\" . $sql_tabela . \"</h2>\";\n\n\t// generisanje headera tabele (prikaz podataka)\n\n\t$komanda_head = \"SELECT * FROM $sql_tabela LIMIT 1\";\n\t$result_head = mysql_query($komanda_head, $db);\t\n\n\twhile ( $red = mysql_fetch_assoc($result_head) ) :\n\n\t\t$m = 0;\n\n\t\techo \"<tr class='dt-table'>\";\n\n\t\tforeach ($red as $item) {\n\t\n\t\t\t$kolona = mysql_field_name($result_head, $m);\n \t\t\techo \"<td class='dt-table'>\" . $kolona . \"</td>\";\n \t\t\t//echo \"<td>\" . $item . \"</td>\";\n \t\t$m++;\n\n\t\t}\n\n\t\techo \"</tr>\";\n\n\tendwhile;\n\n\t// generisanje tela tabele (prikaz podataka)\n\n\t$komanda_body = \"SELECT * FROM $sql_tabela\";\n\t$result_body = mysql_query($komanda_body, $db);\n\n\n\twhile ( $red = mysql_fetch_assoc($result_body) ) :\n\n\t\t$n = 0;\n\n\t\techo \"<tr class='dt-table'>\";\n\n\t\tforeach ($red as $item) {\n\t\n\t\t\t$kolona = mysql_field_name($result_body, $n);\n \t\t\techo \"<td class='dt-table'>\" . $item . \"</td>\";\n \t\t$n++;\n\n\t\t}\n\n\t\techo \"</tr>\";\n\n\tendwhile;\n\n\techo \"</table>\";\n\n}", "function entable($all){\n \n $table = new Table();\n $table->setClass(\"table table-striped table-bordered\");\n $header = new Tr();\n \n $th = new Th(\"Orden\");\n $header->add($th);\n \n $th = new Th(\"Proveedor\");\n $header->add($th);\n \n $th = new Th(\"Total Pzas\");\n $header->add($th);\n \n $th = new Th(\"Recibidas\");\n $header->add($th);\n \n \n $th = new Th(\"Restantes\");\n $header->add($th);\n \n $th = new Th(\"Status\");\n $header->add($th);\n \n \n $th = new Th(\"Recibos\");\n $header->add($th);\n \n $th = new Th(\"Comprobante\");\n $header->add($th);\n \n $th = new Th(\"\");\n $header->add($th);\n \n $table->add($header);\n foreach ($all as $key=> $element){\n $tr = new Tr();\n \n $td = new Td($element->id);\n $tr->add($td);\n \n $td = new Td($element->getProvider());\n $tr->add($td);\n \n \n $pedidas = $element->getPiezas();\n $td = new Td($pedidas);\n $tr->add($td);\n \n $recibidas = $element->getReceived();\n $td = new Td($recibidas);\n $tr->add($td);\n \n \n $restantes = $pedidas - $recibidas;\n $td = new Td($restantes);\n $tr->add($td);\n if (empty($element->status))\n $element->status = \"Abierta\";\n $td = new Td($element->status);\n $tr->add($td);\n \n \n $recibos = $element->getRecibosTable();\n $td = new Td($recibos);\n $tr->add($td);\n \n \n \n \n $receipt = site_url2(\"orders/receipt/{$element->unique}\");\n $receive_anchor = new Anchor(\"Agregar Recibo\",\"$receipt\");\n if ($restantes==0){\n $receive_anchor = new Anchor(\"Agregar Recibo\",\"#\");\n $receive_anchor->setAttr(\"disabled\",\"disabled\");\n $receive_anchor->setAttr(\"onclick\",\"return false\");\n // mark order as closed\n \n \n }\n $receive_anchor->setClass(\"btn btn-default\");\n $td = new Td($receive_anchor);\n $td->setStyle(\"text-align:center\");\n $tr->add($td);\n \n \n \n \n $table->add($tr);\n \n }\n \n \n return $table;\n }", "function tablaDatos(){\n\n $editar = $this->Imagenes($this->PrimaryKey,0);\n $eliminar = $this->Imagenes($this->PrimaryKey,1);\n $sql = 'SELECT\n C.id_componentes,\n P.descripcion planta,\n S.descripcion secciones,\n E.descripcion Equipo,\n C.`descripcion` Componente\n ,'.$editar.','.$eliminar.' \nFROM\n `componentes` C\nINNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\nINNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\nINNER JOIN\n plantas P ON P.id_planta = S.id_planta\nWHERE\n \n C.`activo` = 1';\n \n $datos = $this->Consulta($sql,1); \n if(count($datos)){\n $_array_formu = array();\n $_array_formu = $this->generateHead($datos);\n $this->CamposHead = ( isset($_array_formu[0]) && is_array($_array_formu[0]) )? $_array_formu[0]: array();\n \n $tablaHtml = '<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-body recargaDatos\" style=\"page-break-after: always;\">\n <div class=\"table-responsive\">';\n $tablaHtml .='';\n \t\t$tablaHtml .= $this->print_table($_array_formu, 7, true, 'table table-striped table-bordered',\"id='tablaDatos'\");\n \t\t$tablaHtml .=' </div>\n </div>\n </div>\n </div>\n </div>\n ';\n }else{\n $tablaHtml = '<div class=\"col-md-8\">\n <div class=\"alert alert-info alert-dismissable\">\n <button class=\"close\" aria-hidden=\"true\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Atenci&oacute;n</strong>\n No se encontraron registros.\n </div>\n </div>';\n }\n \n if($this->_datos=='r') echo $tablaHtml;\n else return $tablaHtml;\n \n }", "function tabledata_Cadre_voirlestables ($serveur,$boolSPIP=false)\r\n{\r\n global $connect_statut, $spip_lang, $connect_id_auteur;\r\n\r\n $tables_extra = array();\r\n $tables_spip = array();\r\n $intNbExtra = 0 ;\r\n\r\n $sqlResultTables = sql_showbase('%');\r\n while ($tabNomTable = sql_fetch($sqlResultTables))\r\n {\r\n foreach ($tabNomTable as $key => $val)\r\n {\r\n if (preg_match('#^'.tabledata_table_prefix().'_#', $val))\r\n {\r\n $tables_spip[] = $val;\r\n }\r\n else\r\n {\r\n $tables_extra[] = $val;\r\n ++$intNbExtra ;\r\n }\r\n }\r\n }\r\n\r\n // affichage\r\n echo \"Choisir une table Extra parmis celle ci-dessous:\\n\";\r\n if ($intNbExtra<1)\r\n {\r\n echo \"Aucune table extra ne semble disponible.\";\r\n }\r\n else\r\n {\r\n echo tabledata_table_HTML ($tables_extra);\r\n }\r\n if ($boolSPIP)\r\n {\r\n echo \"<hr/>\";\r\n echo \"Les tables de SPIP :\\n\";\r\n echo tabledata_table_HTML ($tables_spip);\r\n }\r\n return;\r\n}", "function desplegarTabla($query,$anchtable=array(),$iconos=array(),$coLoTabla=\"table-primary\"){\n\n\tglobal $oBD;\n\n\t$registros = $oBD->consulta($query);\n\n\t$columnas = mysqli_num_fields($registros);\n\techo '<table class= \"table table-hover'.$coLoTabla.'\">';\n\t// creacion de la cabecera\n\techo '<tr class=\"table-dark\">';// hace el renglon\n\n\t// if (count($anchtable)){\n\t// \tforeach ($anchtable as $anch) {\n\t// \t\techo \"<td style=width:$anch.'%';></td>\";\n\t// \t\techo $anch;\n\t// \t}\n\t// }\n$k = 0;\n// si el count de iconos existe entonces me mandaron iconos \n\tif (count($iconos)){\n\t\tforeach ($iconos as $icono) {\n\t\t\techo $k;\n\t\t\t\t\t\n\t\t\tif (count($anchtable)) {\n\t\t\t\techo \"<td style=width:$anchtable[$k];>&nbsp;</td>\";\t\n\t\t\t}else{\n\t\t\t\techo \"<td>&nbsp;</td>\";\t\n\t\t\t}\n\n\t\t\t$k++;\n\t\t}\n\t}\n\t//echo $columnas;\n\techo $k;\n\t//$k=$k-1;\n\tfor ($c=0; $c < $columnas; $c++){\n\t\t// para traer los nombres de los campos\n\t\t$campo=mysqli_fetch_field_direct($registros,$c); // da la informacion de un campo en la base de datos\n\t\t \n\t\t if (count($anchtable)) {\n\t\t\t\techo \"<td style=width:$anchtable[$k];>$campo->name.$c</td>\";\t\n\t\t\t}else{\n\t\t\t\techo '<td style=\"width:(90/$columnas)%\">'.$campo->name.'</td>';\t\t\n\t\t\t}\n\t\t // echo $anchtable[$c];\n\t\t $k++;\n\t\t\n\t}\n\techo '</tr>';\n\t// fin cabecera\n\t// comienzo de registros\n\tfor ($r=0; $r < $oBD->numeRegistros; $r++) \n\t{ echo '<tr>';\n\t\t// agregando iconos\n\t\t// EN EL CASO DE QUE \"UPDATE EXISTA EN EL ARRGLO DE LOS ICONOS\"\n\t\tif (in_array(\"update\", $iconos)) {\n\t\t\t//da comportamiento de los iconos\n\t\t\techo '<td style=\"width:5%\"><img src=\"imagenes/update.png\"></td>';\n\t\t}\n\n\t\tif (in_array(\"delete\", $iconos)) {\n\t\t\t//da comportamiento de los iconos\n\t\t\techo '<td style=\"width:5%\"><img src=\"imagenes/delete.png\"></td>';\n\t\t}\n\n\n\t\t$campos = mysqli_fetch_array($registros);\n\t\t// despliega la informacion de un registro especifico\n\t\tfor ($c=0; $c < $columnas; $c++) \n\t\t\techo '<td>'.$campos[$c].'</td>';\n\t echo '</tr>';\n\t\t\n\t}\necho '</table>';\necho $k;\n}", "function ImprimirCabeceraTabla($tabla){\n echo \"<table><tr>\";\n foreach ($tabla as $valor){\n\n echo \"<th>\".$valor.\"</th>\";\n \n }\n echo \"</tr>\";\n}", "public function resetTable();", "public function refreshTable();", "public function rechercherTous() {\n // select all query\n $sRequete = \"SELECT * FROM \" . $this->sNomTable .\"\n LEFT JOIN panier ON idPanier = iNoPanier\n LEFT JOIN produit ON idProduit = iNoProduit\n \";\n\n // prepare query statement\n $stmt = $this->oConnexion->prepare($sRequete);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n }", "public function reset_tableaux() {\n\t\treturn $this->setArbreMoniteurs ( array () )\n\t\t\t->setArbreGroupes ( array () )\n\t\t\t->setArbreMachines ( array () )\n\t\t\t->setDependance ( array () )\n\t\t\t->setGroupeNumbers ( array () );\n\t}", "function ImprimeTable($idTabla, $data, $pactu = \"\", $peli = \"\",$classCSS=\"\") {\n // echo \"ImprimeTable:::::::::::::::\".count($data[\"cuerpo\"]).\" <br>\";\n\t\ttry {\n // if (count($data) > 0) {\n\t\t\t $tabla = '<table id=\"'.$idTabla.'\" class=\"' . $classCSS . '\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center\" >';\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n\t\t\t\t\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n\t\t\t\t\t \n if ($pactu != \"\") {\n if ($conta == 0) {;\n\t\t\t\t\t\t $tabla.= '<th></th>';\n //$tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<th></th>';\n\t\t\t\t\t\t\t//$tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n $tabla.= '<th>' . utf8_encode($data[\"columnas\"][$x]) . '</th>'; \n }\n\t\t\t\t$tabla.= \"</tr>\";\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n for ($i = 0;$i < $cantele;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= \"<tr>\";\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"javascript:Modificar('. $data[\"cuerpo\"][$i][\"$columnas\"] .');\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>';\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"Modificar('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td><a href=\"#\" onClick=\"Eliminar('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>';\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . ' </td>';\n }\n }\n $tabla.= \"</tr>\";\n }\n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Ningun Dato Registrado\"; \n\t\t\t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot>';\n\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n $tabla.= \"</table><br>\";\n\t\t\t\t//}\n }\n catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "public function createTable($prenotazioni) {\r\n echo \"<table id='tblPrenotazioni' summary='Tabella che riporta le prenotazioni delle aule di interesse per gli studenti di Matematica e Informatica.' >\";\r\n echo \"<thead>\";\r\n echo \"<tr> <th> ORARIO: </th>\";\r\n // NUMERO DI AULE:\r\n $numAule = 0;\r\n foreach (self::$array_aule as $aula) {\r\n echo \"<th> $aula </th>\";\r\n $numAule++;\r\n }\r\n echo \"</tr>\";\r\n echo \"</thead>\";\r\n echo \"<tbody>\";\r\n for ($i = 0; $i <= 22; $i++) {\r\n echo \"<tr> <td class='indice_ora'> \".$this->convertiInOra($i).\" </td>\";\r\n if (isset($prenotazioni[$i])) {\r\n foreach (self::$array_aule as $aula) {\r\n if (isset($prenotazioni[$i][$aula])) {\r\n if ($prenotazioni[$i][$aula]==\"\\\"\")\r\n echo \"<td class='apici'> <span > \\\" </span> </td>\";\r\n else\r\n echo \"<td class='corso'> <span>\" . $prenotazioni[$i][$aula][4] . \"</span> </td>\";\r\n } else {\r\n echo \"<td> </td>\";\r\n $this->arrayAuleLibere[$i][$aula]=\"libera\";\r\n }\r\n }\r\n } else {\r\n for ($j = 0; $j < $numAule; $j++)\r\n echo \"<td> </td>\";\r\n $this->arrayAuleLibere[$i]=\"tutto libero\";\r\n }\r\n echo \"</tr>\";\r\n } \r\n echo \"</tbody>\";\r\n echo \"</table>\";\r\n //var_dump($this->arrayAuleLibere);\r\n }", "function visualizar(){\n\t\t$consulta=$this->sql;\n\t\t$result=mysql_query($consulta);\n\t\t\n\t\techo \"<center><table class='enhancedtablerowhover'>\n\t\t\t<caption>\".$this->comentarioTabla($this->nombreTabla($result,0)).\"</caption>\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t<td scope='col' colspan=2></td>\n\t\t\t\";\n\t\tfor($i=0;$i<mysql_num_fields($result);$i++)\n\t\t{\t\n\t\t \tif(!$this->mostrarCampo($this->nombreCampo($result,$i)) or stripos($this->nombreCampo($result,$i),\"imagen\"))continue;\n\t\t \t$des = str_replace(\"/*\",\"\",$this->comentario($this->nombreCampo($result, $i), $this->nombreTabla($result, $i)));\n\t\t\techo \"<th scope='col' ><a href='?order='>$des</a></th>\";\n\t\t}\n\t\techo\"\t\n\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\";\n\t\twhile ($row = mysql_fetch_array($result)) {\n\t\t$filtro=$this->cifrar($row,$result);\n\t\techo \"<tr>\";\n\t\techo \"<td class='CrearReporte'>\n\t\t\t\t<a href='$_SERVER[PHP_SELF]?operacion=m&$filtro'>\n\t\t\t\t<img src='\".$this->PathImages.\"editar.png'>\n\t\t\t</a>\n\t\t </td>\";\n\t\techo \"<td class='CrearReporte' >\n\t <a href='$_SERVER[PHP_SELF]?operacion=b&$filtro'>\n\t\t\t\t<img src='\".$this->PathImages.\"eliminar.png'>\n\t\t\t\t</a>\n\t\t\t </td>\n\t\t\t \";\n\t\t //?columna=$row[0]&operacion=q \n\t\tfor ($i = 0; $i < mysql_num_fields($result); $i++){\n\t\t \tif(!$this->mostrarCampo($this->nombreCampo($result,$i)) or stripos($this->nombreCampo($result,$i),\"imagen\"))continue;\n\t\t\techo \"<td>\".$row[$i].\"</td>\";\n\t\t}\n\t\techo \"</tr>\";\n\t}\n\techo \"</tr></tbody></table></center>\";\n\t}", "function ImprimeTablePO($idTabla, $data, $pactu, $peli, $crxpag=10, $paginap = 1, $cantlink = 5,$orderby = -1,$classCSS=\"\") { \n $tabla = '<table id=\"' . $idTabla . '\" class=\"'.$classCSS.'\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center\" >';\n try {\n // if (count($data) > 0) {\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n if ($pactu != \"\") {\n if ($conta == 0) {;\n $tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n //Nombres de las columnas\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t$ordenar = $x + 1;\t\t\t\t\t\n\t\t\t\t\t//$tabla.= '<th><a href=\"?pagina=' . $paginap . '&orden=' . $ordenar . '\" >' . utf8_encode($data[\"columnas\"][$x]) . '</a></th>';\n\t\t\t\t\t$tabla.= '<th><a href=\"#\" onClick=\"Paginar(\\'pagina=' . $paginap . '&orden=' . $ordenar . '\\'); return false\" >' . utf8_encode($data[\"columnas\"][$x]) . '</a></th>'.\"\\n\";\n\t\t\t\t \n }\n \t\t$tabla.= \"</tr>\";\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n $fin = $paginap * $crxpag;\n $ini = $fin - $crxpag;\n for ($i = $ini;$i < $fin;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= '<tr>';\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"' . $pactu . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Mactualizar\"><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n // $tabla.= '<td><a href=\"' . $peli . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Eliminar\"><img src=\"../imgcixphp/ico_eliminar.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$peli.'('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . '</td> '.\"\\n\";\n }\n }\n $tabla.= '</tr>';\n }\n\t\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n \t$tabla.= '</table><p style=\"clear:both;height:5px;\"></p>'; \n //===========PAGINADO======================================================================================================================\n $paginado = Paginar($cantele, $crxpag, $paginap, $cantlink,$orderby);\n $tabla.= $paginado;\n //===========FIN PAGINADO ==================================================================================================================\n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Datos Registrados\"; \n\t\t\t \t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot></table><br>';\n\t\t\t\t}\n\t\t\t\n }catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "protected function getCleanableTableList() {}", "public function rep_objetivos_estrategicos(){\n $tabla='';\n $objetivos = $this->model_mestrategico->list_objetivos_estrategicos(); /// OBJETIVOS ESTRATEGICOS\n $configuracion=$this->model_resultado->configuracion_session(); /// Configuracion\n\n $tabla .='<table cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" border=0.2 style=\"width:100%;\" align=center>\n <thead>\n <tr style=\"font-size: 7px;\" bgcolor=#1c7368 align=center>\n <th style=\"width:1%;height:15px;color:#FFF;\">#</th>\n <th style=\"width:15%;color:#FFF;\">OBJETIVO ESTRATEGICO</th>\n <th style=\"width:84%;color:#FFF;\">ACCI&Oacute;N ESTRATEGICA</th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n foreach($objetivos as $rowo){\n $nro++;\n $acciones = $this->model_mestrategico->list_acciones_estrategicas($rowo['obj_id']); \n $tabla.='<tr>';\n $tabla.='<td style=\"width:1%;;height:12px;\" align=center>'.$nro.'</td>';\n $tabla.='<td style=\"width:15%;\">'.$rowo['obj_codigo'].'.- '.$rowo['obj_descripcion'].'</td>';\n $tabla.='<td style=\"width:84%;\">';\n if(count($acciones)!=0){\n $tabla.='<table cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" border=0.1 style=\"width:100%;\" align=center>\n <thead>\n <tr style=\"font-size: 7px;\" bgcolor=#d9d7d7 align=center>\n <th style=\"width:1%;height:15px;\">#</th>\n <th style=\"width:37%;\">DESCRIPCI&Oacute;N</th>\n <th style=\"width:60%;\">VINCULACI&Oacute;N PDES</th>\n </tr>\n </thead>\n <tbody>';\n $nra=0;\n foreach($acciones as $rowa){\n $pdes=$this->model_proyecto->datos_pedes($rowa['pdes_id']);\n $nra++;\n $tabla.='<tr>';\n $tabla.='<td style=\"width:1%;\">'.$nra.'</td>';\n $tabla.='<td style=\"width:37%;\">'.$rowa['acc_codigo'].'.- '.$rowa['acc_descripcion'].'</td>';\n $tabla.='<td style=\"width:60%;\">';\n $tabla.='<ul>\n <li type=\"circle\"><b>PILAR : </b>'.$pdes[0]['pilar'].'</li>\n <li type=\"square\"><b>META : </b>'.$pdes[0]['meta'].'</li>\n <li type=\"disc\"><b>RESULTADO : </b>'.$pdes[0]['resultado'].'</li>\n <li type=\"disc\"><b>ACCI&Oacute;N : </b>'.$pdes[0]['accion'].'</li>\n </ul>';\n $tabla.='</td>';\n $tabla.='</tr>';\n }\n $tabla.=' </tbody>\n </table>';\n }\n $tabla.='</td>';\n $tabla.='</tr>';\n }\n $tabla .='</tbody>\n </table>';\n\n\n\n\n\n return $tabla;\n }", "public function imprimirTabla()\r\n {\r\n try\r\n {\r\n $consulta = \"SELECT * FROM xxnombretabla\";//el nombre de la tabla\r\n $objeto = $this->PDO->prepare($consulata);\r\n $objeto->execute();\r\n $tabla = $objeto->fetchAll(PDO::FETCH_OBJ);\r\n\r\n foreach ($tabla as $fila )\r\n {\r\n $xxnombreclase = new xxnombreclase();//se instancia la clase que se esta haciendo\r\n $xxnombreclase->__SET('xid:clase', $fila->xxcampoTabla);//se llama el campo de la tabla que corresponda con el atributo de la clase\r\n $xxnombreclase->__SET('xatributo:clase',$fila->xxcampoTabla);//se repite segun los campos que hayan en la tabla\r\n\r\n $result[] = $xxnombreclase;//se mete en el arreglo result[] la varible con la clase\r\n }\r\n\r\n } catch (Exception $e) {\r\n die($e->getMessage());\r\n }\r\n\r\n return $result;//se devuelve el arreglo result\r\n }", "private function prepare_table()\n {\n global $g_dirs;\n\n $l_dao = new isys_cmdb_dao($this->database);\n $l_quicky = new isys_ajax_handler_quick_info();\n\n $l_table = \"<table width=\\\"100%\\\" class=\\\"report_listing\\\">\";\n\n foreach ($this->m_its_arr as $l_obj_id => $l_title) {\n unset($this->m_obj_arr);\n $l_table .= \"<tr style=\\\"\\\"><td onclick=\\\"collapse_it_service('\" . $l_obj_id . \"')\\\" id=\\\"\" . $l_obj_id . \"\\\" class=\\\"report_listing\\\"><img id=\\\"\" . $l_obj_id .\n \"_plusminus\\\" src=\\\"\" . $g_dirs[\"images\"] . \"dtree/nolines_plus.gif\\\" class=\\\"vam\\\">\";\n\n $l_table .= $l_quicky->get_quick_info($l_obj_id, $l_dao->get_obj_name_by_id_as_string($l_obj_id), C__LINK__OBJECT);\n\n $l_table .= \"<img src=\\\"\" . $g_dirs[\"images\"] . \"ajax-loading.gif\\\" id=\\\"ajax_loading_view_\" . $l_obj_id . \"\\\" style=\\\"display:none;\\\" class=\\\"vam\\\" /></td></tr>\";\n\n $l_table .= \"<tr id=\\\"childs_\" . $l_obj_id . \"\\\" style=\\\"display:none;\\\"><td><div id=\\\"childs_content_\" . $l_obj_id . \"\\\"></div>\";\n $l_table .= \"</td></tr>\";\n }\n\n $l_table .= \"</table>\";\n\n return $l_table;\n }", "function tablaConversiones() {\n \n $array = array();\n $contador = 0;\n $output = \"\";\n $output2 = \"\";\n $heading = array('Numero ','Contenido de $var ', 'isset($var) ', 'empty($var) ', '(bool) $var ', 'is_null($var)');\n $var = array(null, 0, true, false, \"0\", \"\", \"foo\", $array, 2);\n $funciones = array('llamarIsset', 'llamarEmpty', 'llamarBool', 'llamarIsnull');\n \n $output .= \"<table class='table table-bordered'>\";\n $output .= \"<tr>\";\n // imprimimos cabecera\n foreach ($heading as $value) {\n $output .= \"<th>\" . $value . \" </th>\";\n }\n $output .= \"</tr>\";\n foreach ($var as $valor) {\n \n $contador++;\n $output .= \"<th> {$contador} </th>\";\n \n if ($valor === null) {\n $output2 = \"null\";\n } elseif($valor === true) {\n $output2 = \"true\";\n } elseif($valor === 2) {\n $output2 = \"unset(\\$var)\";\n } elseif($valor === \"\") {\n $output2 = \"\\\"\\\"\";\n } elseif($valor === false) {\n $output2 = \"false\";\n }else {\n $output2 = $valor;\n }\n \n $output .= \"<th> \\$var= \". $output2 .\" </th>\";\n \n foreach ($funciones as $funcion) {\n \n if ($valor == 2) {\n unset($valor);\n }\n if ($funcion($valor)) {\n $output .= \"<td class='true'> True </td>\";\n } else {\n $output .= \"<td class='false'> False </td>\";\n }\n }\n $output .= \"<tr>\";\n }\n \n $output .= \"</table>\";\n\n echo $output;\n }", "function table_des_mots($table, $les_mots) {\n\tglobal $afficher_groupe;\n\n\tif (!is_array($afficher_groupe)) return;\n\n\t$in_group = \" AND id_groupe IN (\" . join($afficher_groupe, \", \") .\")\";\n\n\t$result_groupe = spip_query(\"SELECT * FROM spip_groupes_mots\n\tWHERE forum = 'oui' AND $table = 'oui'\". $in_group);\n\n\t$ret = '';\n\twhile ($row_groupe = spip_fetch_array($result_groupe)) {\n\t\t$id_groupe = $row_groupe['id_groupe'];\n\t\t$titre_groupe = propre($row_groupe['titre']);\n\t\t$unseul = ($row_groupe['unseul']== 'oui') ? 'radio' : 'checkbox';\n\t\t$result =spip_query(\"SELECT * FROM spip_mots\n\t\tWHERE id_groupe='$id_groupe'\");\n\t\t$total_rows = spip_num_rows($result);\n\n\t\tif ($total_rows > 0) {\n\t\t\t$ret .= \"\\n<p />\"\n\t\t\t . \"<div class='spip_encadrer' style='font-size: 80%;'>\"\n\t\t\t . \"<b>$titre_groupe&nbsp;:</b>\"\n\t\t\t . \"<table cellpadding='0' cellspacing='0' border='0' width='100%'>\\n\"\n\t\t\t .\"<tr><td width='47%' valign='top'>\";\n\t\t\t$i = 0;\n\n\t\twhile ($row = spip_fetch_array($result)) {\n\t\t\t$id_mot = $row['id_mot'];\n\t\t\t$titre_mot = propre($row['titre']);\n\t\t\t$descriptif_mot = propre($row['descriptif']);\n\n\t\t\tif ($i >= ($total_rows/2) AND $i < $total_rows) {\n\t\t\t\t$i = $total_rows + 1;\n\t\t\t\t$ret .= \"</td><td width='6%'>&nbsp;</td>\n\t\t\t\t<td width='47%' valign='top'>\";\n\t\t\t}\n\n\t\t\t$ret .= boutonne($unseul, \"ajouter_mot[]\", $id_mot, \"id='mot$id_mot' \" . $les_mots[$id_mot]) .\n\t\t\t afficher_petits_logos_mots($id_mot)\n\t\t\t. \"<b><label for='mot$id_mot'>$titre_mot</label></b><br />\";\n\n\t\t\tif ($descriptif_mot)\n\t\t\t\t$ret .= \"$descriptif_mot<br />\";\n\t\t\t$i++;\n\t\t}\n\n\t\t$ret .= \"</td></tr></table>\";\n\t\t$ret .= \"</div>\";\n\t\t}\n\t}\n\n\treturn $ret;\n}", "function ImprimeTableFunciones($idTabla, $data, $pactu = \"\", $peli = \"\",$classCSS=\"\") {\n // echo \"ImprimeTable:::::::::::::::\".count($data[\"cuerpo\"]).\" <br>\";\n\t\ttry {\n // if (count($data) > 0) {\n\t\t\t $tabla = '<table id=\"'.$idTabla.'\" class=\"' . $classCSS . '\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center;\" >';\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n\t\t\t\t\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n\t\t\t\t\t \n if ($pactu != \"\") {\n if ($conta == 0) {;\n\t\t\t\t\t\t $tabla.= '<th></th>';\n //$tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<th></th>';\n\t\t\t\t\t\t\t//$tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n $tabla.= '<th>' . utf8_encode($data[\"columnas\"][$x]) . '</th>'; \n }\n\t\t\t\t$tabla.= '</tr>';\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n for ($i = 0;$i < $cantele;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= \"<tr>\";\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"javascript:'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .');\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>';\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td><a href=\"#\" onClick=\"'.$peli.'('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>&nbsp;' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&nbsp; </td>'.\"\\n\";\n }\n }\n $tabla.= '</tr>';\n }\n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Datos Registrados\"; \n\t\t\t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot>';\n\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n $tabla.= '</table><br />';\n\t\t\t\t//}\n }catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "function ImprimeTableP($idTabla, $data, $pactu, $peli, $crxpag, $paginap = 1, $cantlink = 5,$classCSS=\"\") {\n\t\t$tabla = '<table id=\"' . $idTabla . '\" class=\"'.$classCSS.'\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center;\" >';\n try {\n //if (count($data) > 0) {\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n $tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {\n $tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n $tabla.= '<th>' . utf8_encode($data[\"columnas\"][$x]) . '</th>'.\"\\n\";\n //$tabla.= Columna_Cabezera(\"f1\", utf8_encode($data[\"columnas\"][$x]));\n \n }\n \t\t$tabla.= '</tr>';\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n\t\t\t\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n $fin = $paginap * $crxpag;\n $ini = $fin - $crxpag;\n for ($i = $ini;$i < $fin;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= '<tr>';\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"' . $pactu . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Mactualizar\"><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n // $tabla.= '<td><a href=\"' . $peli . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Eliminar\"><img src=\"../imgcixphp/ico_eliminar.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$peli.'('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . '</td> '.\"\\n\";\n }\n }\n $tabla.= '</tr>';\n } \n\t\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n \t $tabla.= '</table><p style=\"clear:both;height:5px;\"></p>';\n\t\t\t \n\t\t\t //===========PAGINADO======================================================================================================================\n \t$paginado = Paginar($cantele, $crxpag, $paginap, $cantlink);\n $tabla.= $paginado;\n //===========FIN PAGINADO ==================================================================================================================\n \n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Datos Registrados\"; \n\t\t\t \t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot></table><br/>';\n\t\t\t\t}\n\t\t\t\n }catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "function LUPE_criar_tabela_tab($prefixo, $rs, $vetCampo, $vetHidTab, $exc_tabela = '', $exc_campo = '') {\r\n\r\n echo \"<table id='tab{$prefixo}_Tabela' width='100%' border='1' cellspacing='0' cellpadding='0' vspace='0' hspace='0' class='Generica'>\\n\";\r\n echo \"<tr class='Generica'>\\n\";\r\n\r\n if (Ativo()) {\r\n echo \"<td class='Acao' width='1%' nowrap>\";\r\n echo '<a href=\"\" onclick=\"return tab'.$prefixo.'_Incluir();\" class=\"Titulo\"><img src=\"imagens/Incluir.gif\" border=\"0\" alt=\"Incluir\"></a>';\r\n echo \"</td>\\n\";\r\n }\r\n\r\n ForEach($vetCampo as $Campo => $Valor ) {\r\n echo \"<td class='Titulo'><b>\\n\";\r\n echo $Valor['nome'];\r\n echo \"</b></td>\\n\";\r\n }\r\n\r\n echo \"</tr>\\n\";\r\n\r\n if (mssql_num_rows($rs) != 0) {\r\n for ($i = 0; $i < mssql_num_rows($rs); $i++) {\r\n $row = mssql_fetch_array($rs);\r\n\r\n echo \"<tr id='tab{$prefixo}_linha{$i}' align=left>\\n\";\r\n\r\n if (Ativo()) {\r\n echo \"<td class='Acao' nowrap>\";\r\n\r\n echo '<a class=\"Registro\" href=\"\" onclick=\"return tab'.$prefixo.'_Alterar('.$i.');\"><img src=\"imagens/Alterar.gif\" border=\"0\" alt=\"Alterar\"></a>';\r\n\r\n echo '&nbsp;';\r\n\r\n echo '<a class=\"Registro\" href=\"\" onclick=\"return tab'.$prefixo.'_Excluir('.$i.');\"><img src=\"imagens/Excluir.gif\" border=\"0\" alt=\"Excluir\"></a>';\r\n\r\n if ($exc_campo == '' || $exc_tabela == '') {\r\n $exclui = 'N';\r\n } else {\r\n $sql = \"select $exc_campo from $exc_tabela where $exc_campo = \".$row[$exc_campo];\r\n if (mssql_num_rows(execsql($sql)) == 0)\r\n $exclui = 'N';\r\n else\r\n $exclui = 'E';\r\n }\r\n\r\n echo \"<input id='{$prefixo}_excluir$i' type='hidden' name='{$prefixo}_excluir[]' value='$exclui'>\\n\";\r\n\r\n ForEach($vetHidTab as $Valor)\r\n \t echo \"<input id='{$prefixo}_$Valor$i' type='hidden' name='{$prefixo}_{$Valor}[]' value='\".$row[$Valor].\"'>\\n\";\r\n\r\n echo \"</td>\\n\";\r\n }\r\n\r\n ForEach($vetCampo as $Campo => $Valor ) {\r\n echo \"<td id='{$prefixo}_cel_{$Campo}_{$i}' class='Registro'>\\n\";\r\n\r\n switch ($Valor['tipo']) {\r\n \tcase 'descDominio':\r\n if ($Valor['vetDominio'][$row[$Campo]] == '')\r\n echo $row[$Campo];\r\n else\r\n echo $Valor['vetDominio'][$row[$Campo]];\r\n \t\tbreak;\r\n\r\n default:\r\n echo $row[$Campo];\r\n \t\tbreak;\r\n }\r\n\r\n echo \"</td>\\n\";\r\n }\r\n\r\n echo\"</tr>\\n\";\r\n }\r\n }\r\n\r\n echo \"</table>\\n\";\r\n echo \"<script type='text/javascript'>\r\n tab{$prefixo}_TotLin = \".mssql_num_rows($rs).\";\r\n tab{$prefixo}_AtuLin = -1;\r\n </script>\";\r\n\r\n return 0;\r\n}", "public function requerimientos_operaciones($com_id){\n $componente=$this->model_producto->requerimientos_componentes($com_id); /// lista de requerimientos\n $tabla='';\n $tabla .='<style>\n table{font-size: 9px;\n width: 100%;\n max-width:1550px;\n overflow-x: scroll;\n }\n th{\n padding: 1.4px;\n text-align: center;\n font-size: 9px;\n }\n </style>';\n $tabla .='<table table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\">\n <thead>\n <tr class=\"modo1\" style=\"height:45px;\">\n <th style=\"width:1%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>COD. OPE.</b></font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>PARTIDA</b></font></th>\n <th style=\"width:10%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>DESCRIPCI&Oacute;N DE LA PARTIDA</b></font></th>\n <th style=\"width:10%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>DETALLE/DESCRIPCI&Oacute;N DEL INSUMOS</b></font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>UNIDAD DE MEDIDA</b></font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>CANTIDAD</b></font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>UNITARIO</b></font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>TOTAL</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>ENE.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>FEB.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>MAR.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>ABR.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>MAY.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>JUN.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>JUL.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>AGO.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>SEP.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>OCT.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>NOV.</b></font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>DIC.</b></font></th>\n <th style=\"width:7%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\"><b>OBSERVACI&Oacute;N</b></font></th>\n </tr>\n </thead>\n <tbody>';\n foreach($componente as $row){\n $color='';\n if($row['ins_costo_total']!=$row['programado_total']){\n $color='#f9c9b6';\n }\n $tabla.='<tr class=\"modo1\" bgcolor=\"'.$color.'\">';\n $tabla.=' <td>'.$row['prod_cod'].'</td>\n <td>'.$row['par_codigo'].'</td>\n <td>'.mb_convert_encoding($row['par_nombre'], 'cp1252', 'UTF-8').'</td>\n <td>'.mb_convert_encoding($row['ins_detalle'], 'cp1252', 'UTF-8').'</td>\n <td>'.$row['ins_unidad_medida'].'</td>\n <td>'.$row['ins_cant_requerida'].'</td>\n <td>'.$row['ins_costo_unitario'].'</td>\n <td>'.$row['ins_costo_total'].'</td>\n <td>'.$row['mes1'].'</td>\n <td>'.$row['mes2'].'</td>\n <td>'.$row['mes3'].'</td>\n <td>'.$row['mes4'].'</td>\n <td>'.$row['mes5'].'</td>\n <td>'.$row['mes6'].'</td>\n <td>'.$row['mes7'].'</td>\n <td>'.$row['mes8'].'</td>\n <td>'.$row['mes9'].'</td>\n <td>'.$row['mes10'].'</td>\n <td>'.$row['mes11'].'</td>\n <td>'.$row['mes12'].'</td>\n <td>'.mb_convert_encoding($row['ins_observacion'], 'cp1252', 'UTF-8').'</td>';\n $tabla.='</tr>';\n\n }\n $tabla.='</tbody>\n </table>';\n\n return $tabla;\n }", "public function rechercherTous() {\n // select all query\n $sRequete = \"SELECT * FROM \" . $this->sNomTable .\"\n LEFT JOIN produit ON idProduit = iNoProduit\n \";\n\n // prepare query statement\n $stmt = $this->oConnexion->prepare($sRequete);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n }", "function ImprovedTable($header,$data)\n{\n\t//Anchuras de las columnas\n\t$w=array(60,30,20,35,35);\n\t//Cabeceras\n\t$l = mysql_connect(\"localhost\",\"pmm\",\"guhAf2eh\");\n\t//$l = mysql_connect(\"DBSERVER\",\"root\",\"root\");\n\tmysql_select_db(\"pmm_dbpruebas\", $l);\n\t//mysql_select_db(\"pmm_dbweb\", $l);\n\t$s = \"SELECT CONCAT_WS(' ',nombre,paterno,materno) AS cliente, d.calle, d.poblacion, d.estado, d.pais\n\tFROM catalogocliente cc\n\tINNER JOIN direccion d ON cc.id = d.codigo\n\tWHERE d.facturacion='SI'\n\tLIMIT 0,100\";\t\n\t$r = mysql_query($s,$l) or die($s);\n\t\n\tfor($i=0;$i<count($header);$i++)\n\t\t$this->Cell($w[$i],7,$header[$i],1,0,'C');\n\t$this->Ln();\n\t//Datos\t\n\t\twhile($row = mysql_fetch_array($r)){\n\t\t\t$this->Cell($w[0],6,$row[0],'LR');\n\t\t\t$this->Cell($w[1],6,$row[1],'LR');\n\t\t\t$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');\n\t\t\t$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');\n\t\t\t$this->Ln();\n\t\t}\n\t/*foreach($data as $row)\n\t{\n\t\t$this->Cell($w[0],6,$row[0],'LR');\n\t\t$this->Cell($w[1],6,$row[1],'LR');\n\t\t$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');\n\t\t$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');\n\t\t$this->Ln();\n\t}*/\n\t//Lnea de cierre\n\t$this->Cell(array_sum($w),0,'','T');\n}", "function simplecal_declarer_tables_objets_sql($tables) {\n\t$fields = array(\n\t\t\"id_evenement\" => \"bigint(21) NOT NULL auto_increment\",\n\t\t\"id_secteur\" => \"bigint(21) NOT NULL DEFAULT '0'\",\n\t\t\"id_rubrique\" => \"bigint(21) NOT NULL DEFAULT '0'\",\n\t\t\"id_trad\" => \"bigint(21) NOT NULL DEFAULT '0'\",\n\t\t\"id_objet\" => \"bigint(21) NOT NULL DEFAULT '0'\",\n\t\t\"type\" => \"varchar(25) NOT NULL\",\n\t\t\"titre\" => \"varchar(255) NOT NULL\",\n\t\t\"date_debut\" => \"datetime NOT NULL DEFAULT '0000-00-00 00:00:00'\",\n\t\t\"date_fin\" => \"datetime NOT NULL DEFAULT '0000-00-00 00:00:00'\",\n\t\t\"horaire\" => \"varchar(3) NOT NULL DEFAULT 'oui'\",\n\t\t\"descriptif\" => \"text NOT NULL\",\n\t\t\"texte\" => \"text NOT NULL\",\n\t\t'lieu'\t\t\t\t=> \"text NOT NULL DEFAULT ''\",\n\t\t'adresse'\t\t\t=> \"text NOT NULL DEFAULT ''\",\n\t\t\"lien_titre\" => \"varchar(255) NOT NULL\",\n\t\t\"lien_url\" => \"varchar(255) NOT NULL\",\n\t\t\"date\" => \"datetime NOT NULL DEFAULT '0000-00-00 00:00:00'\", // creation ou publication (selon statut) \n\t\t\"statut\" => \"varchar(20) DEFAULT '0' NOT NULL\",\n\t\t\"lang\" => \"varchar(10) NOT NULL DEFAULT ''\",\n\t\t\"langue_choisie\" => \"varchar(3) NULL DEFAULT 'non'\", \n\t\t\"maj\" => \"timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\"\n\t);\n\t\n\t// champs qui possedent les cles\n\t$key = array(\n\t\t\"PRIMARY KEY\" => \"id_evenement\",\n\t\t\"KEY statut\" => \"statut\", \n\t\t\"KEY id_secteur\" => \"id_secteur\",\n\t\t\"KEY id_rubrique\" => \"id_rubrique\",\n\t\t\"KEY id_trad\" => \"id_trad\",\n\t\t\"KEY lang\" => \"lang\"\n\t);\n\t\n\t// champ 'statut'\n\t$statut = array(\n\t\t'champ'=>'statut',\n\t\t'publie'=>'publie',\n\t\t'previsu'=>'publie,prop',\n\t\t'exception'=>'statut'\n\t);\n\t\n\t// titre des statuts\n\t$statut_titres = array(\n\t\t'prepa'=>'simplecal:titre_evenement_redaction',\n\t\t'prop' => 'simplecal:titre_evenement_propose',\n\t\t'publie' => 'simplecal:titre_evenement_publie',\n\t\t'refuse' => 'simplecal:titre_evenement_refuse',\n\t\t'poubelle'=>'simplecal:titre_evenement_supprime'\n\t);\n\t\n\t$statut_textes_instituer = array(\n\t\t'prepa' => 'texte_statut_en_cours_redaction',\n\t\t'prop' => 'texte_statut_propose_evaluation',\n\t\t'publie' => 'texte_statut_publie', \n\t\t'refuse' => 'texte_statut_refuse',\n\t\t'poubelle' => 'texte_statut_poubelle'\n\t);\n\t\n\t// La Table\n\t$tables['spip_evenements'] = array(\n\t\t'type' => 'evenement',\n\t\t'principale' => 'oui',\n\t\t'field'=> $fields,\n\t\t'key' => $key,\n\t\t'titre' => 'titre, lang',\n\t\t'date' => 'date', // indique le nom du field pour le formulaires_dater_charger_dist\n\t\t'champs_editables' => array('titre', 'date_debut', 'date_fin', 'horaire', 'descriptif', 'texte', 'lieu', 'adresse', 'lien_titre', 'lien_url', 'type', 'id_objet'),\n\t\t'champs_versionnes' => array('titre', 'descriptif', 'texte', 'lieu', 'adresse', 'lien_titre', 'lien_url'),\n\t\t'rechercher_champs' => array('titre'=>8, 'descriptif'=>4, 'texte'=>2),\n\t\t'tables_jointures' => array(),\n\t\t'statut' => array($statut),\n\t\t'statut_textes_instituer' => $statut_textes_instituer,\n\t\t'statut_titres' => $statut_titres,\n\t\t'texte_retour' => 'icone_retour',\n\t\t'texte_objets' => 'simplecal:evenements',\n\t\t'texte_objet' => 'simplecal:evenement',\n\t\t'texte_modifier' => 'simplecal:icone_modifier_evenement',\n\t\t'texte_creer' => 'simplecal:icone_nouvel_evenement',\n\t\t'info_aucun_objet'=> 'simplecal:info_aucun_evenement',\n\t\t'info_1_objet' => 'simplecal:info_1_evenement',\n\t\t'info_nb_objets' => 'simplecal:info_nb_evenements',\n\t\t'texte_logo_objet' => 'simplecal:logo_evenement',\n\t\t'texte_langue_objet' => 'simplecal:titre_langue_evenement',\n\t\t'texte_changer_statut' => 'simplecal:entree_evenement_publie'\n\t);\n\t\n\treturn $tables;\n}", "public function tablaProductos () \n\t\t{\t\t\n\t\t\t//Javascript !!!\n\t\t\taddJs('js/products_table.js');\n\t\t\thidden ('iter',0); \n\t\t\t\n\t\t\techo '<table id=\"tabla_productos\" bgColor=#333 cellspacing=1 cellpadding=2 width=700><tbody>';\n\t\t\techo '<tr>'.\n\t\t\t\t\t'<th>Cantidad</th><th>Producto</th><th>Precio<br>sin Iva</th>'.\n\t\t\t\t\t'<th>Precio<br>con Iva</th><th>Total Neto</th><th>Total</th><th></th></tr>';\n\n\t\t\techo '</tbody></table>';\n\n\t\t\techo '<table bgColor=#333 cellspacing=1 cellpadding=2 width=700>';\n\t\t\t$this->tablaSumatoria();\n\t\t\techo '</table>';\t\t\t\n\t\t}", "public function limparTabela(){\r\n\t\t$sql = 'DELETE FROM oficina';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->execute();\r\n\t}", "public function list_unidades_es($estado_ppto){\n $unidades=$this->model_proyecto->list_gasto_corriente();\n $tabla='';\n \n $color=''; \n if($estado_ppto==1){\n $color='#e2f4f9';\n }\n\n $tabla.='\n <table id=\"dt_basic3\" class=\"table1 table-bordered\" style=\"width:100%;\">\n <thead>\n <tr style=\"height:50px;\">\n <th style=\"width:1%;\" bgcolor=\"#474544\" title=\"\">#</th>\n <th style=\"width:5%;\" bgcolor=\"#474544\" title=\"\"></th>\n <th style=\"width:5%;\" bgcolor=\"#474544\" title=\"VER PPTO\">VER PARTIDAS</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"APERTURA PROGRAM&Aacute;TICA\">CATEGORIA PROGRAM&Aacute;TICA '.$this->gestion.'</th>\n <th style=\"width:25%;\" bgcolor=\"#474544\" title=\"DESCRIPCI&Oacute;N\">DESCRIPCI&Oacute;N</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"NIVEL\">NIVEL</th>\n <th style=\"width:15%;\" bgcolor=\"#474544\" title=\"TIPO DE ADMINISTRACIÓN\">TIPO DE ADMINISTRACI&Oacute;N</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"UNIDAD ADMINISTRATIVA\">UNIDAD ADMINISTRATIVA</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"UNIDAD EJECUTORA\">UNIDAD EJECUTORA</th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n foreach($unidades as $row){\n $aper=$this->model_ptto_sigep->partidas_proyecto($row['aper_id']);\n $nro++;\n $tabla.='<tr bgcolor='.$color.'>';\n $tabla.='<td style=\"height:30px;\" align=center>'.$nro.'</td>';\n $tabla.='<td>';\n if($estado_ppto==0){\n if(count($aper)!=0){\n $tabla .='\n <center><a data-toggle=\"modal\" data-target=\"#'.$row['aper_id'].'\" title=\"PARTIDAS ASIGNADAS\" ><img src=\"'.base_url().'assets/img/select.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></center>\n <div class=\"modal fade bs-example-modal-lg\" tabindex=\"-1\" id=\"'.$row['aper_id'].'\" role=\"dialog\" aria-labelledby=\"myLargeModalLabel\">\n <div class=\"modal-dialog modal-lg\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close text-danger\" data-dismiss=\"modal\" aria-hidden=\"true\">\n &times;\n </button>\n <h4 class=\"modal-title\">';\n if($this->gestion>2019){\n $tabla.=$row['tipo'].' '.$row['act_descripcion'].' '.$row['abrev'];\n }\n else{\n $tabla.=$row['proy_nombre'];\n }\n $tabla.='\n </h4>\n </div>\n <div class=\"modal-body no-padding\">\n <div class=\"well\">\n '.$this->partidas($row['aper_id'],1).' \n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:abreVentana(\\''.site_url(\"\").'/mnt/rep_partidas/'.$row['aper_id'].'\\');\" class=\"btn btn-primary\" title=\"IMPRIMIR PARTIDAS\">IMPRIMIR PARTIDAS</a>\n </div>\n </div>\n </div>\n </div>';\n }\n }\n $tabla.='</td>';\n $tabla.='<td>';\n if($this->tp_adm==1){\n if($estado_ppto==0){\n if(count($aper)!=0){\n $tabla .='<center><a href=\"'.site_url(\"\").'/mnt/edit_ptto_asig/'.$row['proy_id'].'\" title=\"MODIFICAR PRESUPUESTO ASIGNADO\" class=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/faseetapa.png\" WIDTH=\"34\" HEIGHT=\"34\"/></a></center>';\n }\n }\n else{\n $tabla.='<center><a href=\"'.site_url(\"\").'/mnt/ver_ptto_asig_final/'.$row['proy_id'].'\" id=\"myBtnn'.$row['proy_id'].'\" title=\"VER PRESUPUESTO ASIGNADO INICIAL - PROGRAMADO - APROBADO\" iclass=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/faseetapa.png\" WIDTH=\"34\" HEIGHT=\"34\"/></a></center>';\n }\n }\n $tabla.='</td>';\n $tabla.='<td><center>'.$row['aper_programa'].''.$row['aper_proyecto'].''.$row['aper_actividad'].'</center></td>';\n if($this->gestion>2019){\n $tabla.='<td style=\"font-size: 8pt;\"><b>'.$row['tipo'].' '.$row['act_descripcion'].' '.$row['abrev'].'</b></td>';\n }\n else{\n $tabla.='<td style=\"font-size: 8pt;\"><b>'.$row['proy_nombre'].'</b></td>';\n }\n $tabla.='<td>'.$row['nivel'].'</td>';\n $tabla.='<td>'.$row['tipo_adm'].'</td>';\n $tabla.='<td>'.strtoupper($row['dep_departamento']).'</td>';\n $tabla.='<td>'.strtoupper($row['dist_distrital']).'</td>';\n $tabla.='</tr>';\n }\n $tabla.='\n </tbody>\n </table>';\n\n return $tabla;\n }", "function refreshTable()\n {\n $subjectTable = $this->Main_model->get('subjects', 'id');\n\n $counter = 0;\n foreach ($subjectTable->result() as $row) {\n $counter++;\n echo '\n <tr>\n <td> ' . $counter . ' </td>\n <td> ' . $this->Subject_model->maskSubject($row->id) . ' </td>\n <td>\n <button class=\"btn btn-primary btn-sm edit\" value=\" ' . $row->id . ' \"><i class=\"fas fa-edit\"></i></button>\n <button class=\"btn btn-danger btn-sm delete\" value=\" ' . $row->id . ' \"><i class=\"fas fa-trash\"></i></button>\n </td>\n </tr>\n ';\n }\n }", "public function tabla()\n {\n\n \treturn Datatables::eloquent(Encargos::query())->make(true);\n }", "public function mis_objetivos_estrategicos(){\n $objetivos = $this->model_mestrategico->list_objetivos_estrategicos(); /// OBJETIVOS ESTRATEGICOS\n $tabla ='';\n $tabla .='<article class=\"col-xs-12 col-sm-12 col-md-12 col-lg-12\">\n <div class=\"jarviswidget jarviswidget-color-darken\" >\n <header>\n <span class=\"widget-icon\"> <i class=\"fa fa-arrows-v\"></i> </span>\n <h2 class=\"font-md\"><strong>OBJETIVOS ESTRATEGICOS</strong></h2> \n </header>\n <div>\n <a role=\"menuitem\" tabindex=\"-1\" href=\"#\" data-toggle=\"modal\" data-target=\"#modal_nuevo_ff\" class=\"btn btn-success\" style=\"width:14%;\" title=\"NUEVO REGISTRO - OBJETIVO ESTRATEGICO\">NUEVO REGISTRO</a><br><br>\n <div class=\"widget-body no-padding\">\n <table id=\"dt_basic\" class=\"table table table-bordered\" width=\"100%\">\n <thead>\n <tr>\n <th style=\"width:1%;\">NRO</th>\n <th style=\"width:3%;\">ACCI&Oacute;N ESTRATEGICA</th>\n <th style=\"width:10%;\">DESCRIPCI&Oacute;N OBJETIVO ESTRATEGICO</th>\n <th style=\"width:5%;\">GESTI&Oacute;N INICIO</th>\n <th style=\"width:5%;\">GESTI&Oacute;N FIN</th>\n <th style=\"width:3%;\">NUEVOS RESULTADOS</th>\n <th style=\"width:50%;\">RESULTADOS FINALES</th>\n <th style=\"width:5%;\">MODIFICAR</th>\n <th style=\"width:5%;\">ELIMINAR</th>\n <th style=\"width:5%;\" title=\"Alineacion PEI-POA\">REPORTE</th>\n <th style=\"width:5%;\" title=\"Exportar Alineacion a formato Excel\">EXP.</th>\n <th></th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n foreach($objetivos as $row){\n $nro++;\n $tabla .='<tr>';\n $tabla .='<td>'.$nro.'</td>';\n $tabla .='<td align=\"center\"><a href=\"'.site_url(\"\").'/me/acciones_estrategicas/'.$row['obj_id'].'\" title=\"ACCIONES ESTRATEGICAS\"><img src=\"' . base_url() . 'assets/img/folder.png\"\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td>'.$row['obj_codigo'].'.- '.$row['obj_descripcion'].'</td>';\n $tabla .='<td>'.$row['obj_gestion_inicio'].'</td>';\n $tabla .='<td>'.$row['obj_gestion_fin'].'</td>';\n $tabla .='<td align=\"center\"><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_add_rf\" class=\"btn btn-xs add_rf\" title=\"AGREGAR NUEVO RESULTADO FINAL\" name=\"'.$row['obj_id'].'\"><img src=\"'.base_url().'assets/ifinal/add.jpg\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td>';\n $rfinal=$this->model_mestrategico->list_resultados_final($row['obj_id']);\n if(count($rfinal)!=0){\n $tabla.='<table class=\"table table-bordered\">\n <thead>\n <tr>\n <th style=\"width:1%;\">NRO</th>\n <th style=\"width:1%;\"></th>\n <th style=\"width:2%;\">C&Oacute;DIGO</th>\n <th style=\"width:10%;\">RESULTADOS FINALES</th>\n <th style=\"width:7%;\">INDICADOR DE IMPACTO</th>\n <th style=\"width:3%;\">META</th>\n <th style=\"width:3%;\">2016</th>\n <th style=\"width:3%;\">2017</th>\n <th style=\"width:3%;\">2018</th>\n <th style=\"width:3%;\">2019</th>\n <th style=\"width:3%;\">2020</th>\n </tr>\n </thead>\n <tbody>';\n $nro_rf=0;\n foreach($rfinal as $rowr){\n $nro_rf++;\n $tabla.='<tr>';\n $tabla.='\n <td>'.$nro_rf.'</td>\n <td align=center><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_mod_rf\" class=\"btn btn-xs mod_rf\" title=\"MODIFICAR RESULTADO FINAL\" name=\"'.$row['obj_id'].'\" id=\"'.$rowr['rf_id'].'\"><img src=\"'.base_url().'assets/img/mod_icon.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>\n <td>'.$rowr['rf_cod'].'</td>\n <td>'.$rowr['rf_resultado'].'</td>\n <td>'.$rowr['rf_indicador'].'</td>\n <td>'.$rowr['rf_meta'].'</td>\n <td>'.$rowr['mes1'].'</td>\n <td>'.$rowr['mes2'].'</td>\n <td>'.$rowr['mes3'].'</td>\n <td>'.$rowr['mes4'].'</td>\n <td>'.$rowr['mes5'].'</td>';\n $tabla.='</tr>';\n }\n $tabla.='\n </tbody>\n </table>';\n }\n $tabla .='</td>';\n $tabla .='<td align=center><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_mod_ff\" class=\"btn btn-xs mod_ff\" title=\"MODIFICAR OBJETIVO ESTRATEGICO\" name=\"'.$row['obj_id'].'\"><img src=\"' . base_url() . 'assets/ifinal/modificar.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td align=center><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_del_ff\" class=\"btn btn-xs del_ff\" title=\"ELIMINAR OBJETIVO ESTRATEGICO\" name=\"'.$row['obj_id'].'\"><img src=\"' . base_url() . 'assets/ifinal/eliminar.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td align=center><a href=\"javascript:abreVentana_obj(\\''.site_url(\"\").'/me/reporte_obj/'.$row['obj_id'].'\\');\" title=\"REPORTE DE VINCULACION PEI\"><img src=\"' . base_url() . 'assets/ifinal/pdf.png\" WIDTH=\"35\" HEIGHT=\"35\"/></td>';\n $tabla .='<td align=center><a href=\"'.site_url(\"\").'/me/exportar_alineacion/'.$row['obj_id'].'\" title=\"EXPORTAR ALINEACION PEI-POA\" id=\"myBtn'.$row['obj_id'].'\"><img src=\"' . base_url() . 'assets/ifinal/excel.jpg\" WIDTH=\"40\"/></a></td>';\n $tabla .='<td align=\"center\"><img id=\"load'.$row['obj_id'].'\" style=\"display: none\" src=\"'.base_url().'/assets/img/loading.gif\" width=\"25\" height=\"25\" title=\"ESPERE UN MOMENTO, LA PAGINA SE ESTA CARGANDO..\"></td>';\n $tabla .='</tr>';\n $tabla.='<script>\n document.getElementById(\"myBtn'.$row['obj_id'].'\").addEventListener(\"click\", function(){\n document.getElementById(\"load'.$row['obj_id'].'\").style.display = \"block\";\n });\n </script>';\n }\n $tabla .='\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </article>';\n\n return $tabla;\n\n }", "public function indexTable()\n {\n $this->paginate = array('all', 'order' => array('modified' => 'desc'));\n $contentVariableTables = $this->paginate('ContentVariableTable');\n $this->set(compact('contentVariableTables', $contentVariableTables));\n }", "public function rellenarTabla($cabecera,$cuerpo,$ini,$fin,$tipo){\n \n if($tipo == '1'){\n $tabla = \"<table class='table font-10 text-center'>\";\n $tablaHead =\"<thead><tr><th class='text-center'>FAMILIAR</th>\";\n }else{\n $tabla = \"<table class='table font-10 text-center'>\";\n $tablaHead =\"<thead><tr><th>NOMBRE</th>\";\n }\n \n //*********Se agregan las cabeceras a las tablas********\n \n $numRegistros = count($cabecera);\n \n for ($i=$ini; $i < $fin; $i++) {\n \n if($i < $numRegistros){\n $tablaHead = $tablaHead.\"<th class='text-center'>\".$cabecera[$i]->NOMBRE_ENFER.\"</th>\";\n }\n \n }\n\n $endThead = \"</tr></thead>\";\n $tablaBody = \"<tbody>\";\n $seEncontroRel = FALSE;\n\n //***********se agrega el body a las tablas************\n\n foreach ($cuerpo as $rel) {\n $enfermedad = explode(\",\", $rel->ENFERMEDAD);\n $numEnf = count($enfermedad);\n $rowTable = \"</tr><td>\".$rel->NOMBRE_PAR.\"</td>\";\n //se recorre las enfermedades en base a un inicio y un fin\n for ($i=$ini; $i < $fin; $i++) {\n //es te if es para que en caso de que el fin sea mayor al del arreglo no se rompa\n if($i < $numRegistros){\n //se recorren los enfermedades relacionadas\n for ($j=0; $j < $numEnf; $j++) {\n //se valisa si son iguales\n if($cabecera[$i]->ID_ENFER_PK == $enfermedad[$j]){\n //echo \"valor 1 \".$cabecera[$i]->ID_ENFER_PK.\"<br>\";\n //echo \"valor 2 \".$enfermedad[$j].\"<br>\";\n $seEncontroRel = TRUE;\n break;\n }else{\n $seEncontroRel = FALSE;\n }\n }\n //en base a la variable se agrega si o no\n if($seEncontroRel == FALSE){\n //se agrega un No si no corresponde\n $rowTable = $rowTable.\"<td>NO</td>\";\n }else{\n //se agrega un Si cuando sena iguales\n $rowTable = $rowTable.\"<td>SI</td>\";\n }\n }\n }\n //se agregan los valores a la tabla\n $tablaBody = $tablaBody.$rowTable.\"<tr>\";\n }\n //*****************************************************\n \n $endTBody = \"</tbody>\";\n $endTabla = \"</table>\";\n \n //se concatenan todos los valores para la creacion de la tabla\n $tablaFamily = $tabla.$tablaHead.$endThead.$tablaBody.$endTBody.$endTabla;\n\n //Se regresa la tabla\n return $tablaFamily;\n }", "function traiter_tableau($bloc) {\n\t// id \"unique\" pour les id du tableau\n\t$tabid = substr(md5($bloc), 0, 4);\n\n\t// Decouper le tableau en lignes\n\tpreg_match_all(',([|].*)[|]\\n,UmsS', $bloc, $regs, PREG_PATTERN_ORDER);\n\t$lignes = array();\n\t$debut_table = $summary = '';\n\t$l = 0;\n\n\t// Traiter chaque ligne\n\t$reg_line1 = ',^(\\|(' . _RACCOURCI_TH_SPAN . '))+$,sS';\n\t$reg_line_all = ',^(' . _RACCOURCI_TH_SPAN . ')$,sS';\n\t$hc = $hl = array();\n\tforeach ($regs[1] as $ligne) {\n\t\t$l++;\n\n\t\t// Gestion de la premiere ligne :\n\t\tif ($l == 1) {\n\t\t\t// - <caption> et summary dans la premiere ligne :\n\t\t\t// || caption | summary || (|summary est optionnel)\n\t\t\tif (preg_match(',^\\|\\|([^|]*)(\\|(.*))?$,sS', rtrim($ligne, '|'), $cap)) {\n\t\t\t\t$cap = array_pad($cap, 4, null);\n\t\t\t\t$l = 0;\n\t\t\t\tif ($caption = trim($cap[1])) {\n\t\t\t\t\t$debut_table .= \"<caption>\" . $caption . \"</caption>\\n\";\n\t\t\t\t}\n\t\t\t\t$summary = ' summary=\"' . entites_html(trim($cap[3])) . '\"';\n\t\t\t}\n\t\t\t// - <thead> sous la forme |{{titre}}|{{titre}}|\n\t\t\t// Attention thead oblige a avoir tbody\n\t\t\telse {\n\t\t\t\tif (preg_match($reg_line1, $ligne, $thead)) {\n\t\t\t\t\tpreg_match_all('/\\|([^|]*)/S', $ligne, $cols);\n\t\t\t\t\t$ligne = '';\n\t\t\t\t\t$cols = $cols[1];\n\t\t\t\t\t$colspan = 1;\n\t\t\t\t\tfor ($c = count($cols) - 1; $c >= 0; $c--) {\n\t\t\t\t\t\t$attr = '';\n\t\t\t\t\t\tif ($cols[$c] == '<') {\n\t\t\t\t\t\t\t$colspan++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($colspan > 1) {\n\t\t\t\t\t\t\t\t$attr = \" colspan='$colspan'\";\n\t\t\t\t\t\t\t\t$colspan = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// inutile de garder le strong qui n'a servi que de marqueur\n\t\t\t\t\t\t\t$cols[$c] = str_replace(array('{', '}'), '', $cols[$c]);\n\t\t\t\t\t\t\t$ligne = \"<th id='id{$tabid}_c$c'$attr>$cols[$c]</th>$ligne\";\n\t\t\t\t\t\t\t$hc[$c] = \"id{$tabid}_c$c\"; // pour mettre dans les headers des td\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$debut_table .= \"<thead><tr class='row_first'>\" .\n\t\t\t\t\t\t$ligne . \"</tr></thead>\\n\";\n\t\t\t\t\t$l = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Sinon ligne normale\n\t\tif ($l) {\n\t\t\t// Gerer les listes a puce dans les cellules\n\t\t\t// on declenche simplement sur \\n- car il y a les\n\t\t\t// -* -# -? -! (qui produisent des -&nbsp;!)\n\t\t\tif (strpos($ligne, \"\\n-\") !== false) {\n\t\t\t\t$ligne = traiter_listes($ligne);\n\t\t\t}\n\n\t\t\t// tout mettre dans un tableau 2d\n\t\t\tpreg_match_all('/\\|([^|]*)/S', $ligne, $cols);\n\n\t\t\t// Pas de paragraphes dans les cellules\n\t\t\tforeach ($cols[1] as &$col) {\n\t\t\t\tif (strlen($col = trim($col))) {\n\t\t\t\t\t$col = preg_replace(\"/\\n{2,}/S\", \"<br /> <br />\", $col);\n\t\t\t\t\tif (_AUTOBR) {\n\t\t\t\t\t\t$col = str_replace(\"\\n\", _AUTOBR . \"\\n\", $col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// assembler le tableau\n\t\t\t$lignes[] = $cols[1];\n\t\t}\n\t}\n\n\t// maintenant qu'on a toutes les cellules\n\t// on prepare une liste de rowspan par defaut, a partir\n\t// du nombre de colonnes dans la premiere ligne.\n\t// Reperer egalement les colonnes numeriques pour les cadrer a droite\n\t$rowspans = $numeric = array();\n\t$n = $lignes ? count($lignes[0]) : 0;\n\t$k = count($lignes);\n\t// distinguer les colonnes numeriques a point ou a virgule,\n\t// pour les alignements eventuels sur \",\" ou \".\"\n\t$numeric_class = array(\n\t\t'.' => 'point',\n\t\t',' => 'virgule',\n\t\ttrue => ''\n\t);\n\tfor ($i = 0; $i < $n; $i++) {\n\t\t$align = true;\n\t\tfor ($j = 0; $j < $k; $j++) {\n\t\t\t$rowspans[$j][$i] = 1;\n\t\t\tif ($align and preg_match('/^[{+-]*(?:\\s|\\d)*([.,]?)\\d*[}]*$/', trim($lignes[$j][$i]), $r)) {\n\t\t\t\tif ($r[1]) {\n\t\t\t\t\t$align = $r[1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$align = '';\n\t\t\t}\n\t\t}\n\t\t$numeric[$i] = $align ? (\" class='numeric \" . $numeric_class[$align] . \"'\") : '';\n\t}\n\tfor ($j = 0; $j < $k; $j++) {\n\t\tif (preg_match($reg_line_all, $lignes[$j][0])) {\n\t\t\t$hl[$j] = \"id{$tabid}_l$j\"; // pour mettre dans les headers des td\n\t\t} else {\n\t\t\tunset($hl[0]);\n\t\t}\n\t}\n\tif (!isset($hl[0])) {\n\t\t$hl = array();\n\t} // toute la colonne ou rien\n\n\t// et on parcourt le tableau a l'envers pour ramasser les\n\t// colspan et rowspan en passant\n\t$html = '';\n\n\tfor ($l = count($lignes) - 1; $l >= 0; $l--) {\n\t\t$cols = $lignes[$l];\n\t\t$colspan = 1;\n\t\t$ligne = '';\n\n\t\tfor ($c = count($cols) - 1; $c >= 0; $c--) {\n\t\t\t$attr = $numeric[$c];\n\t\t\t$cell = trim($cols[$c]);\n\t\t\tif ($cell == '<') {\n\t\t\t\t$colspan++;\n\n\t\t\t} elseif ($cell == '^') {\n\t\t\t\t$rowspans[$l - 1][$c] += $rowspans[$l][$c];\n\n\t\t\t} else {\n\t\t\t\tif ($colspan > 1) {\n\t\t\t\t\t$attr .= \" colspan='$colspan'\";\n\t\t\t\t\t$colspan = 1;\n\t\t\t\t}\n\t\t\t\tif (($x = $rowspans[$l][$c]) > 1) {\n\t\t\t\t\t$attr .= \" rowspan='$x'\";\n\t\t\t\t}\n\t\t\t\t$b = ($c == 0 and isset($hl[$l])) ? 'th' : 'td';\n\t\t\t\t$h = (isset($hc[$c]) ? $hc[$c] : '') . ' ' . (($b == 'td' and isset($hl[$l])) ? $hl[$l] : '');\n\t\t\t\tif ($h = trim($h)) {\n\t\t\t\t\t$attr .= \" headers='$h'\";\n\t\t\t\t}\n\t\t\t\t// inutile de garder le strong qui n'a servi que de marqueur\n\t\t\t\tif ($b == 'th') {\n\t\t\t\t\t$attr .= \" id='\" . $hl[$l] . \"'\";\n\t\t\t\t\t$cols[$c] = str_replace(array('{', '}'), '', $cols[$c]);\n\t\t\t\t}\n\t\t\t\t$ligne = \"\\n<$b\" . $attr . '>' . $cols[$c] . \"</$b>\" . $ligne;\n\t\t\t}\n\t\t}\n\n\t\t// ligne complete\n\t\t$class = alterner($l + 1, 'odd', 'even');\n\t\t$html = \"<tr class='row_$class $class'>$ligne</tr>\\n$html\";\n\t}\n\n\treturn \"\\n\\n<table\" . $GLOBALS['class_spip_plus'] . $summary . \">\\n\"\n\t. $debut_table\n\t. \"<tbody>\\n\"\n\t. $html\n\t. \"</tbody>\\n\"\n\t. \"</table>\\n\\n\";\n}", "public function list_ptto_poa_final($tp_id){\n $lista_aper_padres = $this->model_proyecto->list_prog();//lista de aperturas padres \n $tabla ='';\n foreach($lista_aper_padres as $rowa){\n $proyectos=$this->model_ptto_sigep->acciones_operativas($rowa['aper_programa'],$tp_id);\n if(count($proyectos)!=0){\n $tabla .='<tr bgcolor=\"#99DDF0\" height=\"30\">';\n $tabla .='<td></td>';\n if($this->tp_adm==1){\n $tabla .='<td></td>';\n }\n $tabla .='<td><center>'.$rowa['aper_programa'].''.$rowa['aper_proyecto'].''.$rowa['aper_actividad'].'</center></td>';\n $tabla .='<td>'.$rowa['aper_descripcion'].'</td>';\n $tabla .='<td>'.$rowa['aper_sisin'].'</td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='</tr>';\n $nro=0;\n foreach($proyectos as $row){\n $nro++;\n // $fase = $this->model_faseetapa->get_id_fase($row['proy_id']);\n $aper=$this->model_ptto_sigep->partidas_proyecto($row['aper_id']);\n $tabla .= '<tr height=\"50\">';\n $tabla .= '<td align=center><center><img id=\"loadd'.$row['proy_id'].'\" style=\"display: none\" src=\"'.base_url().'/assets/img/loading.gif\" width=\"25\" height=\"25\" title=\"ESPERE UN MOMENTO, LA PAGINA SE ESTA CARGANDO..\"></center></td>';\n if($this->tp_adm==1){\n if(count($aper)!=0){\n $tabla .='<td><center><a href=\"'.site_url(\"\").'/mnt/ver_ptto_asig_final/'.$row['proy_id'].'\" id=\"myBtnn'.$row['proy_id'].'\" title=\"VER PRESUPUESTO ASIGNADO INICIAL - PROGRAMADO - APROBADO\" iclass=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/faseetapa.png\" WIDTH=\"34\" HEIGHT=\"34\"/></a></center></td>';\n }\n else{\n $tabla .='<td></td>';\n }\n }\n $tabla .= '<td align=center>'.$row['aper_programa'].''.$row['aper_proyecto'].''.$row['aper_actividad'].'</td>';\n $tabla .= '<td>'.$row['proy_id'].' | '.$row['proy_nombre'].'</td>';\n $tabla .= '<td>'.$row['tp_tipo'].'</td>';\n $tabla .= '<td>'.$row['proy_sisin'].'</td>';\n $tabla .= '<td>'.$row['fun_nombre'].' '.$row['fun_paterno'].' '.$row['fun_materno'].'</td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .= '</tr>';\n \n\n }\n }\n }\n return $tabla;\n }", "function ImprimeTablePOB($idTabla, $data, $pactu, $peli, $crxpag, $paginap = 1, $cantlink = 5,$orderby = -1,$buscar=\"\",$classCSS=\"\",$link_td=\"\") {\n\t\t $tabla=\"\";\n\t\t//$tabla.= Buscar($buscar);// formulario buscar si llamo a esta funcion solo serviria para el boton buscar no eventos teclado\n //$tabla.= '<table id=\"' . $idTabla . '\" class=\"'.$classCSS.'\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center\" ><tr>';\n\t\t $tabla.= '<table id=\"' . $idTabla . '\" class=\"'.$classCSS.'\" cellpadding=\"0\" cellspacing=\"1\" >';\n try {\n // if (count($data) > 0) {\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n if ($pactu != \"\") {\n if ($conta == 0) {;\n $tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n //Nombres de las columnas\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t$ordenar = $x + 1;\t\t\t\t\t\n\t\t\t\t\t//$tabla.= '<th><a href=\"?pagina=' . $paginap . '&orden=' . $ordenar . '\" >' . utf8_encode($data[\"columnas\"][$x]) . '</a></th>';\n\t\t\t\t\t$tabla.= '<th><a href=\"#\" onClick=\"Paginar(\\'pagina=' . $paginap . '&orden=' .$ordenar .'&busca=' .$buscar .'\\'); return false\" >' . utf8_encode($data[\"columnas\"][$x]) . '</a></th>'.\"\\n\";\n\t\t\t\t \n }\n $tabla.= \"</tr>\";\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n $fin = $paginap * $crxpag;\n $ini = $fin - $crxpag;\n for ($i = $ini;$i < $fin;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= '<tr>';\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"' . $pactu . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Mactualizar\"><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t \n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n // $tabla.= '<td><a href=\"' . $peli . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Eliminar\"><img src=\"../imgcixphp/ico_eliminar.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$peli.'('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n\t\t\t\t\t\t\tif($link_td!=\"\"){\t$ID= $data[\"cuerpo\"][$i][0] ; // ID\n\t\t\t\t\t\t\t\t$url =$link_td.\"?id=\".$ID;// Url mas id como dato mediante el metodo get \t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t $tabla.= '<td onclick=\"document.location=\\''.$url.'\\' \" >' . $data[\"cuerpo\"][$i][\"$columnas\"] . '</td>' . \"\\n\";\n\t\t\t\t\t\t\t }else{ \n\t\t\t\t\t\t\t\t$tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . '</td> '.\"\\n\";\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t// $tabla.= '<td>&nbsp;&nbsp;' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&nbsp;&nbsp; </td> '.\"\\n\";\n \n }\n }\n $tabla.= '</tr>'.\"\\n\";\t\t\t\t\n\t\t\t\t\t\n } \n\t\t\t\t//===========FIN CUERPO DE TABLA==============================================================================\n\t\t\t\t\t $tabla.= '</table><p style=\"clear:both;height:5px;\"></p>'; \n //===========PAGINADO======================================================================================================================\n $paginado = Paginar($cantele, $crxpag, $paginap, $cantlink,$orderby,$buscar);\n $tabla.= $paginado;\n //===========FIN PAGINADO ==================================================================================================================\n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Datos Registrados\"; \n\t\t\t \t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot></table><br>';\n\t\t\t\t}\n\t\t\t\n } catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "private function prepareTables() {}", "function tabla_lotes_compra($filas,$lot='',$art='',$gru=''){\n\t$lot = explode(\"|\", $lot);\n\t$art = explode(\"|\", $art);\n\t$gru = explode(\"|\", $gru);\n\t//----\n\t\t\t$salida.= '<table>';\n\t$i = 1;\t\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"celda\">Lote #: </td>';\n\t\t\t//-\n\t\t\t$desc = Agrega_Ceros($lot[$i]).\"-\".Agrega_Ceros($art[$i]).\"-\".Agrega_Ceros($gru[$i]);\n\t\t\t$salida.= '<td class = \"busqueda\">'.$desc;\n\t\t\t$salida.= '<input type = \"hidden\" name = \"TLlot'.$i.'\" id = \"TLlot'.$i.'\" value = \"'.$lot[$i].'\"/>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"TLart'.$i.'\" id = \"TLart'.$i.'\" value = \"'.$art[$i].'\"/>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"TLgru'.$i.'\" id = \"TLgru'.$i.'\" value = \"'.$gru[$i].'\"/>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '</tr>';\n\t\t}\n\t}else{\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><span class = \"celda\">No hay Lotes Enlazados</span></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"TLlot0\" id = \"TLot0\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"TLart0\" id = \"TLart0\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"TLgru0\" id = \"TLgru0\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '</tr>';\n\t}\t\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"LotTotal\" id = \"LotTotal\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\n\treturn $salida;\n}", "function getTablas() {\r\n $tablas['inventario_equipo']['id']='inventario_equipo';\r\n $tablas['inventario_equipo']['nombre']='Inventario (equipo)';\r\n\r\n $tablas['inventario_grupo']['id']='inventario_grupo';\r\n $tablas['inventario_grupo']['nombre']='Inventario (grupo)';\r\n\r\n $tablas['inventario_estado']['id']='inventario_estado';\r\n $tablas['inventario_estado']['nombre']='Inventario (estado)';\r\n\r\n $tablas['inventario_marca']['id']='inventario_marca';\r\n $tablas['inventario_marca']['nombre']='Inventario (marca)';\r\n\r\n $tablas['obligacion_clausula']['id']='obligacion_clausula';\r\n $tablas['obligacion_clausula']['nombre']='Obligacion (clausula)';\r\n\r\n $tablas['obligacion_componente']['id']='obligacion_componente';\r\n $tablas['obligacion_componente']['nombre']='Obligacion (componente)';\r\n\r\n $tablas['documento_tipo']['id']='documento_tipo';\r\n $tablas['documento_tipo']['nombre']='Documento (Tipo)';\r\n\r\n \t\t$tablas['documento_tema']['id']='documento_tema';\r\n \t\t$tablas['documento_tema']['nombre']='Documento (Tema)';\r\n\r\n \t\t$tablas['documento_subtema']['id']='documento_subtema';\r\n \t\t$tablas['documento_subtema']['nombre']='Documento (Subtema)';\r\n\r\n \t\t$tablas['documento_estado']['id']='documento_estado';\r\n \t\t$tablas['documento_estado']['nombre']='Documento (Estado)';\r\n\r\n \t\t$tablas['documento_estado_respuesta']['id']='documento_estado_respuesta';\r\n \t\t$tablas['documento_estado_respuesta']['nombre']='Documento (Estado Respuesta)';\r\n\r\n \t\t$tablas['documento_actor']['id']='documento_actor';\r\n \t\t$tablas['documento_actor']['nombre']='Documento (Responsables)';\r\n\r\n \t\t$tablas['documento_tipo_actor']['id']='documento_tipo_actor';\r\n \t\t$tablas['documento_tipo_actor']['nombre']='Documento (Tipo de Responsable)';\r\n\r\n \t\t$tablas['riesgo_probabilidad']['id']='riesgo_probabilidad';\r\n \t\t$tablas['riesgo_probabilidad']['nombre']='Riesgo (Probabilidad)';\r\n\r\n \t\t$tablas['riesgo_categoria']['id']='riesgo_categoria';\r\n \t\t$tablas['riesgo_categoria']['nombre']='Riesgo (Categoria)';\r\n\r\n \t\t$tablas['riesgo_impacto']['id']='riesgo_impacto';\r\n \t\t$tablas['riesgo_impacto']['nombre']='Riesgo (Impacto)';\r\n\r\n \t\t$tablas['compromiso_estado']['id']='compromiso_estado';\r\n \t\t$tablas['compromiso_estado']['nombre']='Compromisos (Estado)';\r\n\r\n \t\t$tablas['departamento']['id']='departamento';\r\n \t\t$tablas['departamento']['nombre']='Departamentos';\r\n\r\n \t\t$tablas['departamento_region']['id']='departamento_region';\r\n \t\t$tablas['departamento_region']['nombre']='Departamentos (Region)';\r\n\r\n \t\t$tablas['municipio']['id']='municipio';\r\n \t\t$tablas['municipio']['nombre']='Municipios';\r\n\r\n $tablas['operador']['id']='operador';\r\n\t $tablas['operador']['nombre']='Operador';\r\n\r\n asort($tablas);\r\n return $tablas;\r\n }", "function refreshTable(){\n\t\t$this->table = array();\n\n\t\t//set the column headers\n\t\t$this->table[0] = $this->getColumnHeaders();\n\n\t\t//add a row for each user\n\t\tforeach ($this->users as $name => $schedule) {\n\t\t\t$row = array();\n\n\t\t\t//if this user is being edited\n\t\t\tif($this->currentEdit == $name) $row = $this->userEditRow($name, $schedule, $this->table[0]);\n\t\t\telse $row = $this->userDisplayRow($name, $schedule, $this->table[0]);\n\t\t\t\n\t\t\tarray_push($this->table, $row);\n\t\t}\n\n\t\tarray_push($this->table, $this->genSubmitRow());\n\n\t\tarray_push($this->table, $this->genTotalRow());\n\n\t\t$this->logMsg(SUCCESS, 'internal table constructed');\n\t}", "function insertTableInsumosVendidos($headers,$matrizDatos) {\n //verificar tabla a insertar (posteriormente puede ser una funcion):\n\n\n\n\n echo '<div class=\"card-body\">\n <div class=\"table-responsive\" >\n <table class=\"table table-bordered dataTableClase\" width=\"100%\" cellspacing=\"0\">'; //apertura de etiquetas\n //rellenar head:\n echo '<thead><tr>';\n foreach ($headers as $hd) {\n echo \"<th>\".$hd.\"</th>\";\n }\n echo'</tr></thead>';\n //rellenar el footer:\n echo '<tfoot><tr>';\n foreach ($headers as $hd) {\n echo \"<th>\".$hd.\"</th>\";\n }\n echo'</tr></tfoot>';\n echo '<tbody>';\n foreach ($matrizDatos as $reg) {\n echo \"<tr>\";\n foreach ($reg as $cell) {\n echo \"<td>\".$cap = ucfirst(mb_strtolower($cell)).\"</td>\"; // Capitalize\n }\n echo \"</tr>\";\n }\n echo '</tbody></table></div></div>'; //cierre etiquetas tabla\n}", "function mysql04($tabla){\n $qColumnNames = mysql_query(\"SHOW COLUMNS FROM \".$tabla) or die(\"mysql error\");\n $numColumns = mysql_num_rows($qColumnNames);\n $i = 0;\n while ( $i < $numColumns ){\n $colname = mysql_fetch_row($qColumnNames);\n $col[$i] = \"<th>\".$colname[0].\"</th>\";\n $i++;\n }\n $h = 0;\n $resultado[0] = \"<tr>\";\n while ( $h < $numColumns ){\n $resultado[0] = $resultado[0] . $col[$h];\n $h++;\n }\n $resultado[0] = $resultado[0].\"</tr>\";\n $query01=\"SELECT * FROM \".$tabla;\n $query02=mysql_query($query01);\n $numLines = mysql_num_rows($query02);\n\n $j=0;\n while( $rec = mysql_fetch_row($query02) ){\n for( $k = 0; $k != $numColumns ; $k++){\n if ( $resultado[1 + $j] == \"\" ){\n $resultado[1 + $j] = \"<tr>\";\n }\n if ( $rec[$k] == \"\" ){\n $rec[$k] = \"-\";\n }\n $resultado[1 + $j] = $resultado[1 + $j].\"<td>\".$rec[$k].\"</td>\";\n }\n $resultado[1 + $j] = $resultado[1 + $j].\"</tr>\";\n $j++;\n }\n return $resultado;\n/*\nCOMO USARLO\n$tabla = '';\n$resultado = mysql04($tabla);\necho \"<table>\";\n foreach( $resultado as $value ){\n\techo $value;\n}\necho \"</table>\";\n*/\n}", "function ispis_tablice($ucenici)\n {\n echo '<table border=1>';\n foreach ($ucenici as $key => $ime) {\n echo '<tr><td>'\n .$key.'</td>;\n <td>'.$ime.'</td>;\n </tr>';\n }\n echo '</table>';\n }", "function flip_tables() {\r\n\t\t$tables_flipped_counter = 0;\r\n\t\t$new_tables_array = array();\r\n\t\t$tables = OM::getAllOStrings($this->code, '<table', '</table>');\r\n\t\t//print('$tables: ');var_dump($tables);exit(0);\r\n\t\tforeach($tables as $table) {\r\n\t\t\t$new_table_array = array();\r\n\t\t\tpreg_match_all('/<(tr)([^<>]*?)>(.*?)<\\/\\1>/is', $table[0], $tr_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t//print('$tr_matches: ');var_dump($tr_matches);exit(0);\r\n\t\t\t$rowspan = 1;\r\n\t\t\t//$debug_counter = 0;\r\n\t\t\tforeach($tr_matches[0] as $index => $value) {\r\n\t\t\t\tpreg_match_all('/<(td|th)([^<>]*?)>(.*?)<\\/\\1>/is', $value[0], $cell_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\tif($rowspan > 1) {\r\n\t\t\t\t\tforeach($cell_matches[0] as $index2 => $value2) {\r\n\t\t\t\t\t\tpreg_match_all('/rowspan=\"([^\"]*?)\"/is', $value2[0], $rowspan_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\t\t\tif(sizeof($rowspan_matches[0]) > 0) {\r\n\t\t\t\t\t\t\t$rowspan = (int)$rowspan_matches[1][0][0];\r\n\t\t\t\t\t\t\t//print('$rowspan2: ');var_dump($rowspan);exit(0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$new_table_array[$index2 + 1][] = $value2[0];\r\n\t\t\t\t\t} \r\n\t\t\t\t} else {\r\n\t\t\t\t\tforeach($cell_matches[0] as $index2 => $value2) {\r\n\t\t\t\t\t\tpreg_match_all('/rowspan=\"([^\"]*?)\"/is', $value2[0], $rowspan_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\t\t\tif(sizeof($rowspan_matches[0]) > 0) {\r\n\t\t\t\t\t\t\t//print('$rowspan_matches: ');var_dump($rowspan_matches);exit(0);\r\n\t\t\t\t\t\t\t$rowspan = (int)$rowspan_matches[1][0][0] + 1;\r\n\t\t\t\t\t\t\t//print('$rowspan2: ');var_dump($rowspan);exit(0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$new_table_array[$index2][] = $value2[0];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$rowspan--;\r\n\t\t\t\t/*if($debug_counter === 8) {\r\n\t\t\t\t\t//print('$new_table_array: ');var_dump($new_table_array);exit(0);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t$debug_counter++;*/\r\n\t\t\t}\r\n\t\t\t$new_tables_array[] = $new_table_array;\r\n\t\t}\r\n\t\t//print('$new_tables_array: ');var_dump($new_tables_array);exit(0);\r\n\t\t$reversed_tables = array_reverse($tables);\r\n\t\t$counter = sizeof($reversed_tables) - 1;\r\n\t\tforeach($reversed_tables as $table) {\r\n\t\t\t$new_table_code = '<table>\r\n';\r\n\t\t\tforeach($new_tables_array[$counter] as $row => $cells) {\r\n\t\t\t\t$new_table_code .= '<tr>\r\n';\r\n\t\t\t\tforeach($cells as $cell) {\r\n\t\t\t\t\t$cell = str_replace('colspan', 'XXXrow9o9spanXXX', $cell);\r\n\t\t\t\t\t$cell = str_replace('rowspan', 'colspan', $cell);\r\n\t\t\t\t\t$cell = str_replace('XXXrow9o9spanXXX', 'rowspan', $cell);\r\n\t\t\t\t\t$new_table_code .= $cell . '\r\n';\r\n\t\t\t\t}\r\n\t\t\t\t$new_table_code .= '</tr>\r\n';\r\n\t\t\t}\r\n\t\t\t$new_table_code .= '</table>';\r\n\t\t\t$this->code = substr($this->code, 0, $table[1]) . $new_table_code . '<table deleteme=\"y\"' . substr($this->code, $table[1] + 6);\r\n\t\t\t$counter--;\r\n\t\t\t$tables_flipped_counter++;\r\n\t\t}\r\n\t\t\r\n\t\t// fucking DOM...\r\n\t\t/*$query = '//' . ReTidy::get_html_namespace() . 'table';\r\n\t\t$tables = $this->xpath->query($query);\r\n\t\tforeach($tables as $table) {\r\n\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'tr';\r\n\t\t\t$trs = $this->xpath->query($query, $table);\r\n\t\t\t$new_table_array = array();\r\n\t\t\t$record_max_cells_per_row = 0;\r\n\t\t\t$row = 0;\r\n\t\t\tforeach($trs as $tr) {\r\n\t\t\t\t$max_cells_per_row = 0;\r\n\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'th | .//' . ReTidy::get_html_namespace() . 'td';\r\n\t\t\t\t$cells = $this->xpath->query($query, $tr);\r\n\t\t\t\t$new_tr_array = array();\r\n\t\t\t\tforeach($cells as $cell) {\r\n\t\t\t\t\t$new_tr_array[] = $cell;\r\n\t\t\t\t\t$max_cells_per_row++;\r\n\t\t\t\t}\r\n\t\t\t\t$new_table_array[$row] = $new_tr_array;\r\n\t\t\t\tif($max_cells_per_row > $record_max_cells_per_row) {\r\n\t\t\t\t\t$record_max_cells_per_row = $max_cells_per_row;\r\n\t\t\t\t}\r\n\t\t\t\t$row++;\r\n\t\t\t}\r\n\t\t\t//var_dump($new_table_array);\r\n\t\t\t//$new_table = new DOMElement('table');\r\n\t\t\t$new_table = $this->dom->createElementNS(self::$xhtmlns, 'table');\r\n\t\t\t$tr_counter = 0;\r\n\t\t\twhile($tr_counter < $record_max_cells_per_row) {\r\n\t\t\t\tprint('here4585687979789<br>');\r\n\t\t\t\t//$new_tr = new DOMElement('tr');\r\n\t\t\t\t$new_tr = $this->dom->createElementNS(self::$xhtmlns, 'tr');\r\n\t\t\t\tforeach($new_table_array as $row => $cells) {\r\n\t\t\t\t\tprint('here4585687979790<br>');\r\n\t\t\t\t\tforeach($cells as $index => $cell) {\r\n\t\t\t\t\t\tprint('here4585687979791<br>');\r\n\t\t\t\t\t\t//if($index === $tr_counter) {\r\n\t\t\t\t\t\t\tprint('here4585687979792<br>');\r\n\t\t\t\t\t\t\t//$clone = $cell->cloneNode(true);\r\n\t\t\t\t\t\t\t$new_tr->appendChild($cell);\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t$new_table->appendChild($new_tr);\r\n\t\t\t\t$tr_counter++;\r\n\t\t\t}\r\n\t\t\t$table->parentNode->appendChild($new_table);\r\n\t\t\t//$table->parentNode->appendChild(new DOMText(\"XXX9o9NewTagEndXXXccc9o9XXX\"));\r\n\t\t\t//$previousElement->appendChild(new DOMText(\"XXX9o9NewTagEndXXXstrong9o9XXX\"));\r\n\t\t\t//$tr_cell->appendChild(new DOMText(ReTidy::DOM_decoded_for_DOM_child_of($element_cell)));\r\n\t\t\t$table->setAttribute('deleteme', 'y');\r\n\t\t\t$tables_flipped_counter++;\r\n\t\t}*/\r\n\t\t$this->logMsgIf('tables flipped', $tables_flipped_counter);\r\n\t\treturn $tables_flipped_counter;\r\n\t}", "function imprimir_contadores($fila,$contadores){\n\t for($i=0; $i<8;$i++){\n\t echo'<td>'.$contadores[$fila][$i].'</td>';\n\t }\n\n\t }", "function tableauToHTML(array $tab)\n{\n echo \"<table>\";\n foreach ($tab as $i => $ligne) {\n echo \"<tr>\";\n foreach ($ligne as $j => $valeur) {\n echo \"<td>$valeur</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "public function toTable(){\r\n\t\t$datas = array();\r\n\t\tforeach ($this as $key => $value) {\r\n\t\t\tif(!in_array($key, $this->arraysis)){\r\n\t\t\t\t$datas[$key] = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $datas;\r\n\t}", "function populate_table()\n\t{\n\t\t$this->table = array();\n\n\t\t$prev_row = array();\n\t\tfor ($i = -1; $i < $this->data_new_len; $i++)\n\t\t{\n\t\t\t$prev_row[$i] = 0;\n\t\t}\n\n\t\tfor ($i = 0; $i < $this->data_old_len; $i++)\n\t\t{\n\t\t\t$this_row = array('-1' => 0);\n\t\t\t$data_old_value = $this->data_old[$i];\n\n\t\t\tfor ($j = 0; $j < $this->data_new_len; $j++)\n\t\t\t{\n\t\t\t\tif ($data_old_value == $this->data_new[$j])\n\t\t\t\t{\n\t\t\t\t\t$this_row[$j] = $prev_row[$j - 1] + 1;\n\t\t\t\t}\n\t\t\t\telse if ($this_row[$j - 1] > $prev_row[$j])\n\t\t\t\t{\n\t\t\t\t\t$this_row[$j] = $this_row[$j - 1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this_row[$j] = $prev_row[$j];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->table[$i - 1] = $this->compress_row($prev_row);\n\t\t\t$prev_row = $this_row;\n\t\t}\n\t\tunset($prev_row);\n\t\t$this->table[$this->data_old_len - 1] = $this->compress_row($this_row);\n\t}", "function generar()\r\n\t{\r\n\t\tforeach($this->columnas as $ef) {\r\n\t\t \t$this->datos->tabla('columnas')->nueva_fila($ef->get_datos());\r\n\t\t}\r\n\t\tparent::generar();\r\n\t}", "function mesabonnes_declarer_tables_objets_sql($tables){\r\n\t$tables['spip_mesabonnes'] = array(\r\n\t\t/* Declarations principales */\r\n\t\t'table_objet' => 'mesabonnes',\r\n\t\t'table_objet_surnoms' => array('mesabonnes'),\r\n\t\t'type' => 'mesabonnes',\r\n\t\t'type_surnoms' => array('mesabonnes'),\r\n\r\n\t\t/* La table */\r\n\t\t'field'=> array(\r\n\t\t\t\t\"id_abonne\" \t=> \"bigint(21) NOT NULL auto_increment\",\r\n\t\t\t\t\"nom\"\t=> \"text DEFAULT '' NOT NULL\",\r\n\t\t\t\t\"email\"\t=> \"text DEFAULT '' NOT NULL\",\r\n\t\t\t\t\"lang\"\t=> \"tinytext DEFAULT '' NOT NULL\",\r\n\t\t\t\t\"date_modif\"\t=> \"datetime DEFAULT '0000-00-00 00:00:00' NOT NULL\",\r\n\t\t\t\t\"liste\"\t=> \"text DEFAULT '' NOT NULL\", // pas utilise pour l'instant, gestion multi-liste ?\r\n\t\t\t\t\"statut\"\t=> \"varchar(6) DEFAULT '0' NOT NULL\"),\r\n\t\t'key' => array(\r\n\t\t\t\"PRIMARY KEY\" => \"id_abonne\",\r\n\t\t),\r\n\t\t'principale' => 'oui'\r\n\r\n\t);\r\n\r\n\r\n\treturn $tables;\r\n}", "function OptimizeTables() {}", "function afficherListeElements($listOfElements) {\n $afficher = \"<p id='titre'>Les résultats de votre recherche : </p> \";\n $afficher .= ' <table id=\"table_recherche_individu\" >';\n $afficher .= '<thead>';\n $afficher .= ' <tr>';\n $afficher .= '<th id=\"table_recherche_individu\"> Votre choix </th> ';\n $afficher .= '<th id=\"table_recherche_individu\"> ID </th> ';\n $afficher .= '<th id=\"table_recherche_individu\"> nom </th>';\n $afficher .= ' <th id=\"table_recherche_individu\"> prnom </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> rue </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> ville </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> code postale </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> departement </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> email </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> tel </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> date de nissance </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> droit </th>';\n $afficher .= '<th id=\"table_recherche_individu\"> mot de passe </th>';\n $afficher .= ' <th id=\"table_recherche_individu\"> date d\\'inscrire </th>';\n $afficher .= '<th id=\"table_recherche_individu\">nike name </th>';\n $afficher .= '</tr>';\n $afficher .= '<thead>';\n $afficher .= '<tbody>';\n\n\n foreach ($listOfElements as $individu) {\n\n\n $afficher .= '<tr>';\n $afficher .= '<td> <input type=\"radio\" name=\"select_individu\" </td>';\n $afficher .= \"<td id='table_recherche_individu'>\" . $individu->getIdUser() . \" \n <td id='table_recherche_individu'>\" . $individu->getNom() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getPrenom() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getRue() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getVille() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getCodePostal() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getDept() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getEmail() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getTelephone() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getDateNaissance() . \"</td> \n <td id='table_recherche_individu'>\" . $individu->getDroit() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getMdp() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getDateInscription() . \"</td>\n <td id='table_recherche_individu'>\" . $individu->getPseudo() . \"</td>\n \n </tr>\";\n }\n $afficher .= \"</tbody>\n</table>\";\n $afficher .= '<div id=\"button-table\"><br /><input id=\"submit\" type=\"submit\" name=\"submit\" value=\"Modifier votre recherche\" /> <button id=\"submit\" type=\"submit\" name=\"submit\" value=\"Valider votre choix\" >Valider votre choix</button>\n <br /><br /></div>';\n echo $afficher;\n}", "public function getTableOfContents();", "function tabla($result) {\n $tabla = \"\";\n while ($registro = mysqli_fetch_assoc($result)) {\n $tabla = $tabla .\n \"<div class='panel panel-default'>\n <div class='panel-heading'>\n <h4 class='panel-title'><a href='#'>\" . $registro[\"CurNom\"] . \"</a></h4>\n </div>\n <DIV class='panel-body' hidden>\n <div class='table-responsive'>\n <table class='table table-hover'>\n <tr> \n <Th>Criterio</Th>\n <Th>Nota</Th> \n </tr>\n <tr>\n <td>Evaluación Continua</td>\n <td>\" . $registro['NotaFinal1'] . \"</td>\n </tr>\n <tr>\n <td>Tareas y Practicas</td> \n <td>\" . $registro['NotaFinal2'] . \"</td> \n </tr>\n <tr>\n <td>Examen</td> \n <td>\" . $registro['NotaFinal3'] . \"</td> \n </tr> \n <tr>\n <th>Nota FINAL</th> \n <th>15</th> \n </tr>\n </table>\n </div>\n </DIV>\n </div>\\n\";\n }\n return $tabla;\n }", "public function dataTable();", "public function TableDrawFacturas($idCotizacion,$idFactura)\r\n {\r\n \r\n\r\n//$Columnas=mysql_query(\"describe $tabla\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n//$Columnas=mysql_fetch_array($Columnas);\t\r\nsession_start();\r\n\r\n\r\n$Columnas1=mysql_query(\"select * from cotizaciones where NumCotizacion = '$idCotizacion'\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n$reg=mysql_fetch_array($Columnas1);\t\r\n$numCols=count($reg);\r\n\r\n//print_r($Columnas1);\r\n//print_r($Columnas);\r\n\r\nprint('\r\n\r\n\r\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" align=\"center\" style=\"width:100%;border-left: 1px solid #000000;\r\n\t\tborder-right: 1px solid #000000;\r\n\t\tborder-top: 1px solid #000000;\r\n\t\tborder-bottom: 1px solid #000000;\">\r\n \r\n\r\n <tr> \r\n <td width=\"200\" colspan=\"8\" align=\"center\" style= \"border: 1px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\">\r\n Seleccione un producto</td>\r\n </tr> <tr> ');\r\n\r\nfor ($i=0; $i<=$numCols; $i++){\r\n\t\r\n\t\t$NombreCol[$i]=mysql_field_name($Columnas1,$i);\t\r\n\t\tif ($NombreCol[$i]==\"\"){\r\n\t\t\tunset($NombreCol[$i]); \r\n\t\t\t$NombreCol = array_values($NombreCol);//quito el espacio que ha quedado despues de eliminarse \r\n\t\t}else{\r\n\t\t\tif($i<>1 and $i<7)\r\n\t\t\tprint('<td width=\"200\" align=\"center\" style= \"border: 0px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\"><h5>'.$NombreCol[$i].'</h5></td>');\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n}\r\n\r\n\r\nprint('<td width=\"200\" align=\"center\" style= \"border: 0px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\">Cantidad</td>');\r\n\r\n\r\n$this->ID=$NombreCol[0];\r\n\r\n$numCols=count($NombreCol);\r\n$this->NumCols=$numCols;\r\n\r\n\r\n\t\r\n\tprint('<tr>');\r\n\t\r\n\t$reg=mysql_query(\"select * from cotizaciones where NumCotizacion = '$idCotizacion' AND Devuelto=''\", $this->con) or die('no se pudo conectar a cotizaciones 2: ' . mysql_error());\r\n\t\t$i=0;\r\n\t\twhile($datos=mysql_fetch_array($reg)){\r\n\t\t$i++;\r\n\t\tif($i%2)\r\n\t\t\t\t\t\t$backgroundRow=$this->back1;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$backgroundRow=$this->back2;\r\n\t\t\t\t\t\t\r\n\t\t\tfor($z=0;$z<$this->NumCols;$z++){\r\n\t\t\t\t\t//$mod=\r\n\t\t\t\t\tif($z<>1 and $z<7)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tprint('<td width=\"200\" style= \"border: 0px solid #000000;color:'.$this->fontCeldas.';font: oblique 100% sans-serif bold;background-color:'.$backgroundRow.'\">'.$datos[$z].'</td>');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\tprint('<td width=\"200\" style= \"border: 0px solid #000000;color:'.$this->fontCeldas.';font: oblique 100% sans-serif bold;background-color:'.$backgroundRow.'\">\r\n\t\t\t\t<form name=\"formAgregaItems'.$datos[0].'\" id=\"formAgregaItems'.$datos[0].'\" method=\"POST\" action=\"VerFacturas.php\" target=\"_self\" >\r\n\t\t\t\t<input type=\"hidden\" name=\"TxtBuscarFactura\" value=\"'.$idFactura.'\">\r\n\t\t\t\t\t\t<textarea type=\"text\" name=\"TxtObservaciones\" value=\"\" placeholder=\"Observaciones\"></textarea>\r\n\t\t\t\t\t\t<input type=\"number\" name=\"TxtCantidadDev\" value=\"'.$datos[7].'\" min=\"0\" max=\"'.$datos[7].'\" step=\"any\" readonly style=\"font-size:1em; color:#333; font-family:Arial, sans-serif;\">\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"ItemVenta\" value=\"'.$datos[0].'\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<input type=\"submit\" name=\"BtnDevolver\" value=\"Devolver\"></form></td>');\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tprint(\"</tr><tr nobr=true >\");\r\n }\r\n \r\n\t\t\r\n\t\t\r\n\r\n$EspacioCol=$numCols+1;\t\r\nprint('</tr><tr>\r\n\r\n<td width=\"200\" colspan=\"8\" align=\"CENTER\" style= \"border: 1px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\">\r\nTechno Soluciones\r\n</td>\r\n');\r\n\r\nprint('</tr></table>');\r\n\r\n//print($this->NumCols);\r\n\r\n}", "public function makeTableur()\n {\n return $this->setDocumentPropertiesWithMetas(new Spreadsheet());\n }", "private function ListaNoticias(){\r\n \r\n $tabela = '<table id=\"tabela\" class=\"noticia\">\r\n <tr>\r\n \t<th>Data</th>\r\n \t<th>Titulo</th>\r\n <th>Editar</th>\r\n <th>Excluir</th>\r\n </tr>\r\n ';\r\n $a = $this -> __bdnoticia -> GetNoticia();\r\n while ($not = mysql_fetch_array($a)){ \r\n $tabela = $tabela . '\r\n <tr>\r\n <td>'. funcoes::DecorarData(funcoes::ConvertDateBD(substr($not['datahora'],0,10))).'</td>\r\n <td>'.stripslashes(base64_decode($not['titulo'])).'</td>\r\n <td><center><a href=\"#\" class=\"editar\" id=\"'.$not[0].'\"><img src=\"images/edit.png\" alt=\"\" /></a></center></td>\r\n <td><center><a href=\"#\" class=\"excluir\" id=\"'.$not[0].'\"><img src=\"images/excluir.png\" alt=\"\" /></a></center></td>\r\n </tr>';\r\n \r\n }\r\n \r\n $tabela = $tabela .'\r\n </table>';\r\n \r\n \r\n \r\n return $tabela;\r\n \r\n }", "function tabla_filas_proyecto_pago($filas,$tpago,$monto,$moneda,$tcambio,$opera,$boucher,$observ,$tcambiodia){\n\t\t$tpago = explode(\"|\", $tpago);\n\t\t$monto = explode(\"|\", $monto);\n\t\t$moneda = explode(\"|\", $moneda);\n\t\t$tcambio = explode(\"|\", $tcambio);\n\t\t$opera = explode(\"|\", $opera);\n\t\t$boucher = explode(\"|\", $boucher);\n\t\t$observ = explode(\"|\", $observ);\n\t\t//----\n\t\t\t$salida.= '<table>';\n\t$i = 1;\t\n\t$total = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//acumulado\n\t\t\t$Dcambiar = 0;\n\t\t\t$Dcambiar = Cambio_Moneda($tcambio[$i],$tcambiodia,$monto[$i]);\n\t\t\t$total += $Dcambiar;\n\t\t\t//-\n\t\t\t$salida.= '<td>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttpag'.$i.'\" id = \"Ttpag'.$i.'\" value = \"'.$tpago[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmonto'.$i.'\" id = \"Tmonto'.$i.'\" value = \"'.$monto[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmoneda'.$i.'\" id = \"Tmoneda'.$i.'\" value = \"'.$moneda[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttipcambio'.$i.'\" id = \"Ttipcambio'.$i.'\" value = \"'.$tcambio[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Toperador'.$i.'\" id = \"Toperador'.$i.'\" value = \"'.$opera[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tboucher'.$i.'\" id = \"Tboucher'.$i.'\" value = \"'.$boucher[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tobserva'.$i.'\" id = \"Tobserva'.$i.'\" value = \"'.$observ[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagFilas\" id = \"PagFilas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagTotal\" id = \"PagTotal\" value = \"'.$total.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\n\treturn $salida;\n}", "public function muestra_resultados() {\n \t//dd($datos);\n \t/*https://zinoui.com/blog/css-tables-tutorial*/\n \t/*https://vuejs.org/v2/examples/grid-component.html*/\n \t/*http://webgenio.com/2017/01/14/40-bonitas-plantillas-tablas-css/*/\n\n \t$result = \\DB::table('pimof.dbo.estimaciones AS e')\n \t\t->leftJoin('pimof.dbo.arboles AS a', 'a.id', '=', 'e.id_arboles')\n ->select([\n 'e.id'\n , 'a.genero'\n , 'a.epiteto'\n , 'e.d130'\n , 'e.ht'\n , 'e.densidad'\n , 'e.ecuacion'\n , 'e.fraccion'\n , 'e.biomasa'\n , 'e.carbono'\n ])\n ->get();\n\n //dd($result);\n\t\t\n\t\t$tabla = '\n\t\t\t<table id=\"miTablaPersonalizada\" class=\"table table-striped table-responsive\">\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>id</th>\n\t\t\t\t\t\t<th>Especie</th>\n\t\t\t\t\t\t<th>d130</th>\n\t\t\t\t\t\t<th>ht</th>\n\t\t\t\t\t\t<th>Densidad</th>\n\t\t\t\t\t\t<th>Fracción</th>\n\t\t\t\t\t\t<th>Ecuación</th>\n\t\t\t\t\t\t<th>Carbono</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t';\n\n foreach ($result as $registro) {\n\n \t$tabla .= '\n \t\t\t<tr>\n\t\t\t\t\t\t<td>' . $registro->id . '</td>\n\t\t\t\t\t\t<td>' . $registro->genero . ' ' . $registro->epiteto . '</td>\n\t\t\t\t\t\t<td>' . round($registro->d130, 1) . '</td>\n\t\t\t\t\t\t<td>' . round($registro->ht, 1) . '</td>\n\t\t\t\t\t\t<td>' . round($registro->densidad, 2) . '</td>\n\t\t\t\t\t\t<td>' . round($registro->fraccion, 2) . '</td>\n\t\t\t\t\t\t<td>' . $registro->ecuacion . '</td>\n\t\t\t\t\t\t<td><b>' . round($registro->carbono, 2) . '</b></td>\n\t\t\t\t\t</tr>\n \t';\n }\n\n $tabla .= '\n \t\t</tbody>\n\t\t\t</table>\n\t\t\t';\n\t\t\n\t\treturn response($tabla);\n }", "protected function tableModel()\n {\n }", "function fill_modules_table($db){\n $query=\"SELECT m.*, u.usi from Modulo m join usi_moduli u on m.nome=u.modulo;\";\n $result = mysqli_query($db,$query);\n while($row=mysqli_fetch_assoc($result)){\n ?>\n <tr>\n <td><b class=\"text-primary\"><?php echo $row['nome']; ?></b></td>\n <td><?php echo $row['funzionalita']; ?></td>\n <td><?php echo $row['costo']; ?></td>\n <td><?php echo $row['usi'];?> </td>\n </tr>\n<?php\n }\n}", "function retornaEscolhidos($vetorComcadastros, $vetorComIndices){\n $limite = count($vetorComIndices);//limite conta quantos indices tem\n cabeçalhoTabela();//imprime o cabeçalho da tabela\n for($x=0; $x<$limite; $x++){//executa um for que percorre todos os indices do Vetor com os indices\n $y = $vetorComIndices[$x];//$y é igual indice do primeiro cadastro\n echo \"<tr>\";//cria linha na tabela\n echo \"<th scope='row'>$y</th>\";//escreve qual é o indice\n foreach ($vetorComcadastros[$y] as $string){//percorre todos os dados do cadastro com indice $y\n echo \"<td>$string</td>\";//cria uma celula e dentro escreve o dado\n }\n echo \"<td>\",botaoAlterar($y),\"</td>\";//cria uma celula e põe dentro o botão alterar com o indice que ele deve alterar caso clicado\n echo \"<td>\",botaoExcluir($y),\"</td>\";\n echo \"</tr>\";//finaliza a linha\n }\n echo \"</tbody>\";//encerra o corpo da tabela\n echo \"</table>\";//encerra a tabela\n }", "public function getOriginalTable() {}", "protected function setUpperTable() {\n $upper_table = array();\n $columns_params = $this->getColumnParams(); // getting parameters of columns in the table\n $filter_columns = $columns_params['filter']; // getting columns for wich filters are available\n $name_columns = $columns_params['name']; // getting columns names\n $width_columns = $columns_params['width']; // getting columns width\n for ($i = 0; $i < count($filter_columns); $i++) { // setting up each cell of table header\n $upper_table[$i]['column_name'] = $name_columns[$i];\n $upper_table[$i]['width'] = $width_columns[$i];\n $upper_table[$i]['link'] = $this->getFilterLink($filter_columns[$i]);\n if (isset($this->data['filter']) && isset($this->data['dir'])) {\n if ($this->data['filter'] == $filter_columns[$i]) {\n if ($this->data['dir'] == 'up') $upper_table[$i]['filter'] = 'up-filter';\n elseif ($this->data['dir'] == 'dn') $upper_table[$i]['filter'] = 'dn-filter';\n }\n }\n }\n return $upper_table;\n }", "function createTableString($tablas){\n\t\tglobal $formatedTables;\n\n\t\tforeach ($tablas as $key => $value) {\n\t\t\tif(!@in_array($value, $formatedTables)){\n\t\t\t\t$formatedTables[] = $value;\n\t\t\t}\n\t\t}\n\t}", "function createTableString($tablas){\n\t\tglobal $formatedTables;\n\n\t\tforeach ($tablas as $key => $value) {\n\t\t\tif(!@in_array($value, $formatedTables)){\n\t\t\t\t$formatedTables[] = $value;\n\t\t\t}\n\t\t}\n\t}", "public function renderLanguagesToTable(): void\n {\n $this->table->setHeaders(['ID', 'Country', 'Language', 'Default']);\n\n foreach ($this->languages as $language) {\n $this->table->addRow([\n $language->id,\n $language->country,\n $language->name,\n $language->default ? 'true' : 'false'\n ]);\n }\n\n $this->table->render();\n }", "function spipmine_declarer_tables_auxiliaires($tables_auxiliaires){\r\n\t// permettant le lien entre les rubriques et les clients\r\n\t$spipmine_clients_rubriques = array(\r\n\t\t\"id_rubrique\"\t\t\t=>\t\"int(11) NOT NULL\",\r\n\t\t\"id_client\"\t\t\t\t=>\t\"int(11) NOT NULL\"\r\n\t);\r\n\t$spipmine_clients_rubriques_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_rubrique\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_clients_rubriques'] = array(\r\n\t\t'field' => &$spipmine_clients_rubriques,\r\n\t\t'key' => &$spipmine_clients_rubriques_key\r\n\t);\r\n\r\n\r\n\t// structure de la table spipmine_lignes_factures\r\n\t// liée à la table spipmine_factures\r\n\t$spipmine_lignes_facture = array(\r\n\t\t\"id_ligne\"\t\t\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"id_facture\"\t\t\t=>\t\"int(11) default NULL\",\r\n\t\t\"position\"\t\t\t\t=>\t\"int(11) default NULL\",\r\n\t\t\"quantite\"\t\t\t\t=>\t\"float default NULL\",\r\n\t\t\"unite\"\t\t\t\t\t=>\t\"varchar(50) default NULL\",\r\n\t\t\"designation\"\t\t\t=>\t\"text default NULL\",\r\n\t\t\"prix_unitaire_ht\"\t\t=>\t\"int(11) default NULL\",\r\n\t\t\"commentaire\"\t\t\t=>\t\"mediumtext\"\r\n\t);\r\n\t$spipmine_lignes_facture_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_ligne\",\r\n\t\t\"KEY id_facture\"\t\t=>\t\"id_facture\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_lignes_facture'] = array(\r\n\t\t'field' => &$spipmine_lignes_facture,\r\n\t\t'key' => &$spipmine_lignes_facture_key\r\n\t);\r\n\r\n\r\n\r\n\t// structure de la table spipmine_types_actions\r\n\t$spipmine_types_actions = array(\r\n\t\t\"id_type_action\"\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_action\"\t\t=>\t\"varchar(255) default NULL\",\r\n\t\t\"commentaires\"\t\t\t=>\t\"mediumtext\"\r\n\t);\r\n\t$spipmine_types_actions_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_action\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_actions'] = array(\r\n\t\t'field' => &$spipmine_types_actions,\r\n\t\t'key' => &$spipmine_types_actions_key\r\n\t);\r\n\r\n\r\n\t\r\n\t// structure de la table spipmine_types_documents\r\n\t$spipmine_types_documents = array(\r\n\t\t\"id_type_document\"\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_document\"\t\t=>\t\"varchar(50) default NULL\"\r\n\t);\r\n\t$spipmine_types_documents_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_document\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_documents'] = array(\r\n\t\t'field' => &$spipmine_types_documents,\r\n\t\t'key' => &$spipmine_types_documents_key\r\n\t);\r\n\r\n\t\r\n\t\r\n\t// structure de la table spipmine_types_livrables\r\n\t$spipmine_types_livrables = array(\r\n\t\t\"id_type_livrable\"\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_livrable\"\t\t=>\t\"varchar(50) default NULL\"\r\n\t);\r\n\t$spipmine_types_livrables_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_livrable\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_livrables'] = array(\r\n\t\t'field' => &$spipmine_types_livrables,\r\n\t\t'key' => &$spipmine_types_livrables_key\r\n\t);\r\n\r\n\t\r\n\t\r\n\t// structure de la table spipmine_types_prestations\r\n\t$spipmine_types_prestations = array(\r\n\t\t\"id_type_presta\"\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_presta\"\t\t=>\t\"varchar(50) default NULL\",\r\n\t\t\"commentaires\"\t\t\t=>\t\"mediumtext\"\r\n\t);\r\n\t$spipmine_types_prestations_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_presta\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_prestations'] = array(\r\n\t\t'field' => &$spipmine_types_prestations,\r\n\t\t'key' => &$spipmine_types_prestations_key\r\n\t);\r\n\r\n\t\r\n\t\r\n\t// structure de la table spipmine_types_facturation\r\n\t$spipmine_types_facturation = array(\r\n\t\t\"id_type_facturation\"\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_facturation\"\t=>\t\"varchar(50) default NULL\",\r\n\t\t\"commentaires\"\t\t\t=>\t\"mediumtext\"\r\n\t);\r\n\t$spipmine_types_facturation_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_facturation\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_facturation'] = array(\r\n\t\t'field' => &$spipmine_types_facturation,\r\n\t\t'key' => &$spipmine_types_facturation_key\r\n\t);\r\n\r\n\r\n\t// structure de la table spipmine_types_status\r\n\t$spipmine_types_status = array(\r\n\t\t\"id_type_status\"\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_status\"\t\t=>\t\"varchar(50) default NULL\",\r\n\t\t\"commentaires\"\t\t\t=>\t\"mediumtext\"\r\n\t);\r\n\t$spipmine_types_status_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_status\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_status'] = array(\r\n\t\t'field' => &$spipmine_types_status,\r\n\t\t'key' => &$spipmine_types_status_key\r\n\t);\r\n\r\n\t// structure de la table spipmine_types_reglements\r\n\t$spipmine_types_reglements = array(\r\n\t\t\"id_type_reglement\"\t\t=>\t\"int(11) NOT NULL auto_increment\",\r\n\t\t\"nom_type_reglement\"\t=>\t\"varchar(50) default NULL\",\r\n\t\t\"commentaires\"\t\t\t=>\t\"mediumtext\"\r\n\t);\r\n\t$spipmine_types_reglements_key = array(\r\n\t\t\"PRIMARY KEY\"\t\t\t=>\t\"id_type_reglement\"\r\n\t);\r\n\t$tables_auxiliaires['spipmine_types_reglements'] = array(\r\n\t\t'field' => &$spipmine_types_reglements,\r\n\t\t'key' => &$spipmine_types_reglements_key\r\n\t);\r\n\r\n\t\r\n\treturn $tables_auxiliaires;\r\n}", "function getTablaInformeAjuntament($desde,$hasta){\n \n // $this->ponerHorasTaller();\n // $this->ponerNumRegistro();\n \n \n $letra=getLetraCasal();\n $numeroRegistroCasalIngresos=getNumeroRegistroCasalIngresos();\n $numeroRegistroCasalDevoluciones=getNumeroRegistroCasalDevoluciones();\n \n $sql=\"SELECT id FROM casal_recibos WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY id ASC LIMIT 1\";\n if($this->db->query($sql)->num_rows()==0){\n $primero=0;\n }\n else {\n $primero=$this->db->query($sql)->row()->id;\n }\n \n $sql=\"SELECT id FROM casal_recibos WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY id DESC LIMIT 1\";\n if($this->db->query($sql)->num_rows()==0){\n $ultimo=0;\n }\n else {\n $ultimo=$this->db->query($sql)->row()->id;\n }\n \n $sql=\"SELECT r.id as id, r.fecha as fecha , r.id_socio as id_socio , r.importe as importe , r.recibo as recibo, s.nombre as nombre,s.apellidos as apellidos \n FROM casal_recibos r\n LEFT JOIN casal_socios_nuevo s ON s.num_socio=r.id_socio\n WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY r.id\";\n \n $sql=\"SELECT r.fecha as fecha,\"\n . \" lr.id_recibo as recibo,\"\n . \" lr.importe as importe, \"\n . \" t.nombre_corto as nombre,\"\n . \" t.horas_taller_T1 as horas_taller_T1,\"\n . \" t.horas_taller_T2 as horas_taller_T2,\"\n . \" t.horas_taller_T3 as horas_taller_T3,\"\n . \" s.dni as dni,\"\n . \" lr.tarjeta as tarjeta,\"\n . \" lr.periodos as periodos,\"\n . \" lr.id_taller as id_taller,\"\n . \" lr.id_socio as id_socio,\"\n . \" lr.id as id,\"\n . \" lr.num_registro as num_registro,\"\n . \" lr.num_registro_posicion as num_registro_posicion,\"\n . \" s.num_socio as num_socio\"\n . \" FROM casal_lineas_recibos lr\"\n . \" LEFT JOIN casal_recibos r ON lr.id_recibo=r.id\"\n . \" LEFT JOIN casal_talleres t ON t.id=lr.id_taller\"\n . \" LEFT JOIN casal_socios_nuevo s ON s.num_socio=lr.id_socio\"\n . \" WHERE lr.importe>0 AND lr.id_recibo>='$primero' AND lr.id_recibo<='$ultimo' ORDER BY lr.num_registro_posicion\";\n \n //log_message('INFO',$sql);\n \n $recibos=array(); \n if($this->db->query($sql)->num_rows()>0) \n $recibos=$this->db->query($sql)->result();\n \n \n $cabeceraTabla='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\">Data</th>\n <th class=\"col-sm-1 text-center\">Num Registre</th>\n <th class=\"col-sm-1 text-center\">DNI Usuari</th>\n <th class=\"col-sm-1 text-center\">Nom Actividad</th>\n <th class=\"col-sm-1 text-center\">Num Registre Ingrés</th>\n <th class=\"col-sm-1 text-center\" >Preu/hora</th>\n <th class=\"col-sm-1 text-center\">Import Base</th>\n <th class=\"col-sm-1 text-center\">% IVA (exempt)</th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\">TIPOLOGIA INGRES</th>\n \n </tr>';\n \n \n \n $tabla=$cabeceraTabla;\n \n $importeTotal=0;\n foreach ($recibos as $k=>$v) {\n $fecha=$v->fecha;\n $fecha=substr($fecha,8,2).'/'.substr($fecha,5,2).'/'.substr($fecha,0,4);\n $tabla.='<tr>';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $fecha;\n $tabla.='</td>';\n \n $num=strval($v->num_registro_posicion);\n while(strlen($num)<5) {\n $num='0'.$num;\n }\n $tabla.='<td class=\"text-center\">';\n $tabla.= $v->num_registro.$num;\n $tabla.='</td>';\n \n \n $dni=$v->dni;\n if($this->socios_model->validar_dni($dni)){\n $tabla.='<td class=\"text-center\">';\n $tabla.= strtoupper($dni);\n $tabla.='</td>';\n }\n else{\n $tabla.='<td class=\"text-center\" style=\"color:red\">';\n $tabla.= strtoupper($dni).\"(\".$v->num_socio.\")\";\n $tabla.='</td>';\n }\n \n $nombre=$v->nombre;\n $tabla.='<td class=\"text-center\">';\n $tabla.= $nombre;\n $tabla.='</td>';\n \n $recibo=$letra.' '.$v->recibo; \n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n \n if($v->periodos==4) $horas=floatval($v->horas_taller_T1);\n if($v->periodos==2) $horas=floatval($v->horas_taller_T2);\n if($v->periodos==1) $horas=floatval($v->horas_taller_T3); \n //log_message('INFO', '===================='.$v->nombre.' '.$horas);\n \n if($horas>0)\n $preu_hora=number_format($v->importe/$horas*100,2); \n else \n $preu_hora=0;\n\n $tabla.='<td class=\"text-center\">';\n $tabla.= $preu_hora;\n $tabla.='</td>';\n \n \n \n $importe=$v->importe;\n $tabla.='<td class=\"text-center\" >';\n $tabla.= number_format($importe,2);\n $tabla.='</td>';\n \n $importe=$v->importe;\n $tabla.='<td class=\"text-center\">';\n $tabla.= '0.00';\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" style=\"border-right:2px solid black;border-left:2px solid black;\">';\n $tabla.= number_format($importe,2);\n $tabla.='</td>';\n $importeTotal+=number_format($importe,2);\n \n $tarjeta=number_format($v->tarjeta,2);\n if($tarjeta==0) $pago=\"Efectiu\"; else $pago=\"TPV fisic\";\n $tabla.='<td class=\"text-center\">';\n $tabla.= $pago;\n $tabla.='</td>';\n \n $tabla.='</tr>';\n }\n \n \n $pieTabla='</tr></thead><thead><tr>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:0px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\">T O T A L S</th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:2px solid black;border-right:2px solid black;border-left:2px solid black;\">';\n $pieTabla.=number_format($importeTotal,2);\n $pieTabla.='</th>';\n $pieTabla.='</tr></thead></tody></table>';\n \n $tabla.=$pieTabla;\n \n \n $cabeceraTablaDevoluciones='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\">Data</th>\n <th class=\"col-sm-1 text-center\">Num Registre</th>\n <th class=\"col-sm-1 text-center\">DNI Usuari</th>\n <th class=\"col-sm-1 text-center\">Nom Actividad</th>\n <th class=\"col-sm-1 text-center\">Num Registre Devolució</th>\n <th class=\"col-sm-1 text-rigcenterht\" >Preu/hora</th>\n <th class=\"col-sm-1 text-center\">Import Base</th>\n <th class=\"col-sm-1 text-center\">% IVA (exempt)</th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\">TIPOLOGIA DEVOLUCIÓ</th>\n \n </tr>';\n \n $tituloCasal=strtoupper(getTituloCasal());\n $salida='<h4>INFORME DETALLAT INGRESSOS</h4>'\n . ''\n . 'EQUIPAMENT MUNICIPA: <STRONG>'.$tituloCasal.'</STRONG>'\n . '<BR>'\n . 'ADJUDICATARI: <STRONG>'.'SERVEIS A LES PERSONES INCOOP, SCCL</STRONG>'\n . '<BR>'\n . 'NIF ADJUDICATARI: <STRONG>F60137411</STRONG>'\n . '<BR>'\n . 'NÚM CONTRACTE: <STRONG>18001022</STRONG>'\n . '<BR>'\n . 'Periode: <STRONG>'.substr($desde,8,2).'/'.substr($desde,5,2).'/'.substr($desde,0,4).' - '.substr($hasta,8,2).'/'.substr($hasta,5,2).'/'.substr($hasta,0,4).'</STRONG>'\n . '<BR>'\n . '<BR>'\n \n .$tabla.'<br>';\n \n $sql=\"SELECT r.fecha as fecha,\"\n . \" lr.id_recibo as recibo,\"\n . \" lr.importe as importe, \"\n . \" t.nombre_corto as nombre,\"\n . \" t.horas_taller_T1 as horas_taller_T1,\"\n . \" t.horas_taller_T2 as horas_taller_T2,\"\n . \" t.horas_taller_T3 as horas_taller_T3,\"\n . \" s.dni as dni,\"\n . \" lr.tarjeta as tarjeta,\"\n . \" lr.periodos as periodos,\"\n . \" lr.id_taller as id_taller,\"\n . \" lr.id_socio as id_socio,\"\n . \" lr.id as id,\"\n . \" lr.num_registro as num_registro,\"\n . \" lr.num_registro_posicion as num_registro_posicion,\"\n . \" s.num_socio\"\n . \" FROM casal_lineas_recibos lr\"\n . \" LEFT JOIN casal_recibos r ON lr.id_recibo=r.id\"\n . \" LEFT JOIN casal_talleres t ON t.id=lr.id_taller\"\n . \" LEFT JOIN casal_socios_nuevo s ON s.num_socio=lr.id_socio\"\n . \" WHERE lr.importe<0 AND lr.id_recibo>='$primero' AND lr.id_recibo<='$ultimo' ORDER BY lr.num_registro_posicion\";\n \n \n \n $recibos=array(); \n if($this->db->query($sql)->num_rows()>0) \n $recibos=$this->db->query($sql)->result();\n \n $tabla=$cabeceraTablaDevoluciones;\n $importeTotalDevoluciones=0;\n foreach ($recibos as $k=>$v) {\n $fecha=$v->fecha;\n $fecha=substr($fecha,8,2).'/'.substr($fecha,5,2).'/'.substr($fecha,0,4);\n $tabla.='<tr>';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $fecha;\n $tabla.='</td>';\n \n $num=strval($v->num_registro_posicion);\n while(strlen($num)<5) {\n $num='0'.$num;\n } \n $tabla.='<td class=\"text-center\">';\n $tabla.= $v->num_registro.$num;;\n $tabla.='</td>';\n \n $dni=$v->dni;\n if($this->socios_model->validar_dni($dni)){\n $tabla.='<td class=\"text-center\">';\n $tabla.= strtoupper($dni);\n $tabla.='</td>';\n }\n else{\n $tabla.='<td class=\"text-center\" style=\"color:red\">';\n $tabla.= strtoupper($dni).\"(\".$v->num_socio.\")\";\n $tabla.='</td>';\n }\n \n $nombre=$v->nombre;\n $tabla.='<td class=\"text-center\">';\n $tabla.= $nombre;\n $tabla.='</td>';\n \n $recibo=$letra.' '.$v->recibo; \n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n \n \n \n /*\n $id_taller=$v->id_taller;\n $periodos=$v->periodos;\n $id_socio=$v->id_socio;\n $importe=-$v->importe;\n $id=$v->id;\n $sql=\"SELECT * FROM casal_lineas_recibos WHERE id<'$id' AND id_taller='$id_taller' AND id_socio='$id_socio' AND periodos='$periodos' AND importe='$importe' ORDER BY id DESC LIMIT 1\";\n //log_message('INFO',$sql);\n if($this->db->query($sql)->num_rows()==1) {\n $recibo=$letra.' '.$this->db->query($sql)->row()->id_recibo;\n }\n else $recibo='';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n */\n \n \n if($v->periodos==4) $horas=$v->horas_taller_T1;\n if($v->periodos==2) $horas=$v->horas_taller_T2;\n if($v->periodos==1) $horas=$v->horas_taller_T3; \n \n //log_message('INFO', '++=================='.$v->nombre.' '.$horas);\n \n $preu_hora=number_format($v->importe/$horas*100,2); \n $tabla.='<td class=\"text-center\">';\n $tabla.= -$preu_hora;\n $tabla.='</td>';\n \n \n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" >';\n $tabla.= -$importe;\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\">';\n $tabla.= '0.00';\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" style=\"border-right:2px solid black;border-left:2px solid black;\">';\n $tabla.= -$importe;\n $tabla.='</td>';\n $importeTotalDevoluciones+=$importe;\n \n $tarjeta=number_format($v->tarjeta,2);\n if($tarjeta==0) $pago=\"Efectiu\"; else $pago=\"TPV fisic\";\n $tabla.='<td class=\"text-center\">';\n $tabla.= $pago;\n $tabla.='</td>';\n \n $tabla.='</tr>';\n }\n \n \n \n \n $pieTablaDevoluciones='</tr></thead><thead><tr>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:0px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\">T O T A L S</th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:2px solid black;border-right:2px solid black;border-left:2px solid black;\">';\n $pieTablaDevoluciones.=-number_format($importeTotalDevoluciones,2);\n $pieTablaDevoluciones.='</th>';\n $pieTablaDevoluciones.='</tr></thead></tody></table>';\n \n \n \n \n \n $salida.='<h4>INFORME DETALLAT DEVOLUCIONS</h4>'\n . ''\n . 'EQUIPAMENT MUNICIPA: <STRONG>'.$tituloCasal.'</STRONG>'\n . '<BR>'\n . 'ADJUDICATARI: <STRONG>'.'SERVEIS A LES PERSONES INCOOP, SCCL</STRONG>'\n . '<BR>'\n . 'NIF ADJUDICATARI: <STRONG>F60137411</STRONG>'\n . '<BR>'\n . 'NÚM CONTRACTE: <STRONG>18001022</STRONG>'\n . '<BR>'\n . 'Periode: <STRONG>'.substr($desde,8,2).'/'.substr($desde,5,2).'/'.substr($desde,0,4).' - '.substr($hasta,8,2).'/'.substr($hasta,5,2).'/'.substr($hasta,0,4).'</STRONG>'\n . '<BR>'\n . '<BR>';\n \n \n \n \n \n \n $salida.=$tabla;\n $salida.=$pieTablaDevoluciones;\n $salida.='<br><h4>RESUM TOTAL</h4>';\n \n $importeResumen=number_format($importeTotal,2)+number_format($importeTotalDevoluciones,2);\n $resumenTotal='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n \n </tr>\n <tr >\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:2px solid #DDDDDD;border-top:2px solid #DDDDDD;border-left:1px solid #DDDDDD;\">T O T A L S</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:2px solid black;border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">'.number_format($importeResumen,2).'</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n \n </tr>\n\n\n\n </thead></tbody></table>';\n \n $salida.=$resumenTotal;\n \n \n \n \n return $salida;\n \n }", "public function constructTableForMain() \n\t{ \n\t\n\t\t//- Construction des objets de la table 1\n $obj_model=$this->obj_mvc_menu_imbrication;\n\t\t$obj_message_manager=$obj_model->getManager()->getHtmlMessage();\n\t\t\n\t\t//- Positionnement des parties fixes de l'interface\n\t\t$obj_table_1 = new table();\n\t\t$obj_table_1->setWidth(\"100%\");\n\t\t$obj_tr = $obj_table_1->addTr();\n\t\t\t$obj_td = \t$obj_tr->addTd($this->constructTableForHeader());\n\t\t $obj_tr = $obj_table_1->addTr();\t\t\t\t\n $obj_td = \t$obj_tr->addTd($this->constructTableForMove()); \n\t\t$obj_tr = $obj_table_1->addTr();\n\t\t\t$obj_td = \t$obj_tr->addTd($obj_message_manager);\n\t\t\t\t$obj_td->setWidth(\"100%\");\n\t\t\t\t$obj_td->setAlign(\"center\");\n\t\t\n\t\t\n\t\t//- Positionnement des MVC\n $obj_tr = $obj_table_1->addTr();\n\t\t\t $obj_td = \t$obj_tr->addTd($obj_model->getMvcMenu());\n $obj_tr = $obj_table_1->addTr();\n\t\t\t $obj_td = \t$obj_tr->addTd($obj_model->getMvcMenuDeplacementLoader()); \n\t\n /*$obj_tr = $obj_table_1->addTr();\n\t\t $obj_td = \t$obj_tr->addTd($this->constructTableForPossibleMove()); */ \n\t\t\n\t\t\n\t\t//- affectation de la table principale\n\t\t$this->obj_main_table=$obj_table_1;\n\t\n\t\t \n\t\treturn $this->obj_main_table; \n\t}", "function tabla_filas_compra_pago($filas,$tpago,$monto,$moneda,$tcambio,$opera,$boucher,$observ,$empresa,$caja,$banco,$cuenta,$tcambiodia){\n\t\t$tpago = explode(\"|\", $tpago);\n\t\t$monto = explode(\"|\", $monto);\n\t\t$moneda = explode(\"|\", $moneda);\n\t\t$tcambio = explode(\"|\", $tcambio);\n\t\t$opera = explode(\"|\", $opera);\n\t\t$boucher = explode(\"|\", $boucher);\n\t\t$observ = explode(\"|\", $observ);\n\t\t$empresa = explode(\"|\", $empresa);\n\t\t$caja = explode(\"|\", $caja);\n\t\t$banco = explode(\"|\", $banco);\n\t\t$cuenta = explode(\"|\", $cuenta);\n\t\t//----\n\t\t\t$salida.= '<table>';\n\t$i = 1;\t\n\t$total = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//acumulado\n\t\t\t$Dcambiar = 0;\n\t\t\t$Dcambiar = Cambio_Moneda($tcambio[$i],$tcambiodia,$monto[$i]);\n\t\t\t$total += $Dcambiar;\n\t\t\t//-\n\t\t\t$salida.= '<td>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttpag'.$i.'\" id = \"Ttpag'.$i.'\" value = \"'.$tpago[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmonto'.$i.'\" id = \"Tmonto'.$i.'\" value = \"'.$monto[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmoneda'.$i.'\" id = \"Tmoneda'.$i.'\" value = \"'.$moneda[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttipcambio'.$i.'\" id = \"Ttipcambio'.$i.'\" value = \"'.$tcambio[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Toperador'.$i.'\" id = \"Toperador'.$i.'\" value = \"'.utf8_decode($opera[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tboucher'.$i.'\" id = \"Tboucher'.$i.'\" value = \"'.trim($boucher[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tobserva'.$i.'\" id = \"Tobserva'.$i.'\" value = \"'.utf8_decode($observ[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tsucur'.$i.'\" id = \"Tsucur'.$i.'\" value = \"'.$empresa[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tcaja'.$i.'\" id = \"Tcaja'.$i.'\" value = \"'.$caja[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tbanco'.$i.'\" id = \"Tbanco'.$i.'\" value = \"'.$banco[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tcuenta'.$i.'\" id = \"Tcuenta'.$i.'\" value = \"'.$cuenta[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagFilas\" id = \"PagFilas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagTotal\" id = \"PagTotal\" value = \"'.$total.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\n\treturn $salida;\n}", "function sestavTabulku($array, $popis, $id = \"\")\n{\n $dopln = \"\";\n \n $nadpis = \"<th>\" . implode(\"<th>\", array_keys(reset($array)));\n \n if ( $id ) {\n $dopln .= \"<br /><span class='odkaz modra' onclick='zobrazSkryj(\\\"$id\\\")'>$popis</span>\n <span id='$id' class='skryj'>\";\n } else {\n $dopln .= \"<span class='odkaz modra'>$popis</span>\";\n }\n \n $dopln .= \"<table class='persist-area'><thead><tr class='persist-header'>$nadpis</thead><tbody>\";\n \n foreach ( $array as $k => $pole ) {\n $dopln .= \"<tr>\";\n \n foreach ( $pole as $klic => $hodnota ) {\n $dopln .= \"<td>\";\n if (mb_strlen($hodnota) <= 30) $dopln .= \"<input type='text' value='$hodnota' size='\".mb_strlen($hodnota).\"'>\";\n else {\n $rows = mb_strlen($hodnota)<120 ? 2 : (mb_strlen($hodnota)<240 ? 4 : 6);\n $dopln .= \"<textarea name='' rows='$rows' cols='60' />$hodnota \".mb_strlen($hodnota).\"</textarea>\";\n }\n }\n }\n \n $dopln .= \"</tbody></table>\";\n if ( $id ) $dopln .= \"</span><br />\";\n return $dopln;\n}", "protected function prepareTable($table){\n\t\t\n\t\tjimport('joomla.filter.output');\n\t\tif (empty($table->id)) {\n\n\t\t\t// Set ordering to the last item if not set\n\t\t\tif (@$table->ordering === '') {\n\t\t\t\t$db = JFactory::getDbo();\n\t\t\t\t$db->setQuery('SELECT MAX(ordering) FROM #__egoi');\n\t\t\t\t$max = $db->loadResult();\n\t\t\t\t$table->ordering = $max+1;\n\t\t\t}\n\n\t\t}\n\t}", "public function tblRequisitos($array){\n $tabla = \"<table class='table table-bordered table-hover'>\n <thead>\n <tr align='center'>\n <th>Programa</th>\n <th>Requisito</th>\n <th>Editar</th>\n </tr>\n </thead>\n <tbody>\";\n foreach ($array as $value){\n $info = utf8_encode(implode($value, '|'));\n //En la ruta de la imagen nos salimos de la carpeta \"../\" ya que la ruta que se guarda \n //en la base de datos se encuentra fuera de la carpeta 'admin'\n $tabla .= \"<tr align='left'>\n <td width='150'>\".utf8_encode($value[1]).\"</td>\n <td>\".utf8_encode($value[3]).\"</td>\n <td align='center'><a href='' onclick='frmEditarRequisito(\\\"$info\\\");return false;'><i class='fa fa-pencil'></i></a></td>\n </tr>\";\n }\n $tabla .= \"</tbody></table>\";\n return $tabla;\n }", "function visualizar($pag=\"\",$orderby=\"\")\n {\n global $sIdConvenioAct;\n for($i=0;$i<2;$i++){\n $consulta = $this->sql;\n //filas obtenidas\n $total = $this->contarfilas($consulta);\n //tamaņo del paginador\n if($total<200):\n $tampag=20;\n elseif ($total<400):\n $tampag=40;\n else:\n $tampag=60;\n endif;\n $iniciaren=($pag-1) * $tampag; //Registro actual\n if($iniciaren<0)$iniciaren=0;\n \n $this->paginar($pag, $total, $tampag, \"?pag=\"); \n \n if ($orderby !=\"\"){\n $consulta = $this->sql.\" ORDER BY $orderby LIMIT $iniciaren,$tampag\";\n }\n else {\n $consulta = $this->sql.\" LIMIT $iniciaren,$tampag\"; \n }\n \n $result = $this->query($consulta);\n //obtener descripcion de la tabla\n $tablades = $this->comentarioTabla($this->nombreTabla($result, 0));\n //si no tiene, poner como descripcion el nombre de la misma\n if ($tablades == \"\") $tablades = $this->nombreTabla($result, 0);\n else if($this->edit==1 and $this->delete==1) $espacio = 2;\n else if($this->edit==1 and $this->delete==0) $espacio = 1;\n else if($this->edit==0 and $this->delete==1) $espacio = 1;\n else $espacio = 0;\n echo \"\\n<center><table class='enhancedtablerowhover'>\n \\n<caption><center><font size='1.5'>\".$tablades.\"</font></center></caption>\n \\n<thead>\n \\n<tr>\n \\n<td scope='col' colspan=\".($espacio+2).\"></td>\";\n \n for ($i = 0; $i < mysql_num_fields($result); $i++)\n {\n $campo=$this->nombreCampo($result, $i);\n //los campos imagen no mostrarlos\n if (!$this->mostrarCampo($campo))\n continue;\n //obtener descripcion del campo \n $des = str_replace(\"/*\", \"\", $this->comentario($this->nombreCampo($result, $i),\n $this->nombreTabla($result, $i)));\n //si no tiene, poner como descripcion el nombre del mismo\n if ($des == \"\" or is_numeric($des)) $des = $campo;\n echo \"\\n<th scope='col' ><a href='?order=$campo'>$des</a></th>\";\n }\n echo \" \\n</tr>\n \\n</thead>\n \\n<tbody>\";\n while ($row = mysql_fetch_array($result))\n {\n $filtro = $this->cifrar($row, $result);\n echo \"\\n<tr>\";\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Imprimir' href='reporte/rptEmbarques.php?iFolio=\".$row['iFolio'].\"&sContrato=\".$row['sContrato'].\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&sIdConvenio=$sIdConvenioAct\".\"&dFecha=\".$row['dIdFecha'].\"' target='_blank' >\n \\n<img src='\".$this->PathImages.\"impresora.png' width=15></a></td>\";//$_SESSION['orden']\n if($this->edit==1)\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Seleccionar Folio' href='$_SERVER[PHP_SELF]?iFolioSuministro=\".$row['iFolio'].\"'>\n \\n<img src='\".$this->PathImages.\"seleccionar.jpg' width=15></a></td>\";\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Modificar Registro ' href='$_SERVER[PHP_SELF]?operacion=m&$filtro'>\n \\n<img src='\".$this->PathImages.\"editar.png' width=12></a></td>\";\n if($this->delete==1)//'href='$_SERVER[PHP_SELF]?operacion=b&$filtro'\n echo \"\\n<td class='CrearReporte' >\n \\n<a title = 'Eliminar el Registro' href=\\\"#\\\" \n onClick=\\\" if( confirm('Realmente Desea Eliminar el Registro?') ){ document.location='$_SERVER[PHP_SELF]?operacion=b&$filtro' };\\\" >\n \\n<img src='\".$this->PathImages.\"eliminar.png' width=12>\n \\n</a></td> \";\n for ($i = 0; $i < mysql_num_fields($result); $i++)\n {\n if(strpos(strtoupper($this->nombreCampo($result, $i)),strtoupper(\"Imagen\")) and $tipo = $this->tipoCampo($result, $i)==\"blob\") \n {\n $nombreImagen=\"\";\n foreach($this->campollave as $claves){\n $nombreImagen.=$row[$claves]; \n }\n $nombreImagen = str_replace(\"/\",\"-\",$nombreImagen);\n $nombreImagen.=\".jpg\";\n //$nombreImagen=$row[$this->campollave].\".jpg\";\n $img = $this->procesarImagen($row[$i],$nombreImagen);\n }\n if (!$this->mostrarCampo($this->nombreCampo($result, $i)))\n continue;\n if ($img){\n echo \"\\n<td><img border=1 src = '$nombreImagen' width = '90' heigth = '90'</img></td>\";\n $img = false;\n }\n else if(( strpos(strtoupper($this->nombreCampo($result, $i)),\"DLL\")!==false or strpos(strtoupper($this->nombreCampo($result, $i)),\"MN\")!==false )\n AND $this->tipoCampo($result, $i)==\"real\"){\n $row[$i] = number_format($row[$i], 4, '.', ',');\n echo \"\\n<td class ='derecha'>$ \".$row[$i].\"</td>\";\n }\n else if( strpos($this->tipoCampo($result, $i),\"real\")!==false ){\n $row[$i] = number_format($row[$i], 4, '.', ',');\n echo \"\\n<td class ='derecha'> \".$row[$i].\"</td>\";\n }\n else if(strpos(strtolower($this->nombreCampo($result, $i)), strtolower(\"fecha\"))!==false){//formato de fecha\n echo \"\\n<td>\".formatoFecha($row[$i]).\"</td>\";\n }\n else\n echo \"\\n<td>\".$row[$i].\"</td>\";\n\n }\n echo \"\\n</tr>\";\n }\n echo \"\\n</tr></tbody></table></center>\";\n $this->paginar($pag, $total, $tampag, \"?pag=\"); \n }\n }", "function generateHorizontalTableFromQuery($tableid, $title, $description, $sql){\n\t\t global $database;\n\n $rec = $database->query($sql);\n \n if (!$rec || !$rec->num_rows){\n\t\t\t return $database->error;\n\t\t }\n\t\t \n\t\t $field_names = array();\n\t\t $fields = \"\";\n\t\t $body = \"\";\n\t\t\t\n\t\t\t// first field\n\t\t\t$field_names[] = \"<th>Category</th>\";\n\t\t\twhile ($row = $rec->fetch_array()){\n\t\t\t\t$col = $row[0];\n\t\t\t\t$field_names[] = \"<th>$col</th>\";\n\t\t\t}\n\n\t\t\t$fields = implode(\"\", $field_names);\n\t\t\t\n\t\t\tmysqli_data_seek($rec, 0);\n\n\t\t\t$keys = array();\t\t\t\n\t\t\t$row = $rec->fetch_array();\n\t\t\t$keys_ = array_keys($row);\n\t\t\t$idx = 0;\n\n\t\t\tforeach($keys_ as $key){\n\t\t\t\tif (! is_numeric($key) && $idx > 1){\n\t\t\t\t\t$keys[] = $key;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$idx++;\n\t\t\t}\n\n\t\t\tmysqli_data_seek($rec, 0);\n\t\t\t$data = \"\";\n\t\t\t$body = \"\";\n\t\t\t\n\t\t\t$total_fields = sizeof($field_names); // account for category\n\t\t\t$datasets = [];\n\t\t\t$idx = 1;\n\t\t\t\n\t\t\twhile ($row = $rec->fetch_array()){\t\t\n\t\t\t\tforeach($keys as $category) {\n\t\t\t\t\t\t $data = $row[$category];\n\t\t\t\t\t\t if (!$data) $data = 0;\n\t\t\t\t\t\t $datasets[$category][] = \"<td>$data</td>\"; \n\t\t\t\t}\n\t\t\t}\t\t\t\n\n\t\t\tforeach ($datasets as $key=>$arr){\n\t\t\t\t$data = implode(\"\", $arr);\n\t\t\t\t$body .= \"<tr><td>$key</td>$data</tr>\";\n\t\t\t\t$idx++;\n\t\t\t}\n\t\t\t\n\t\t\treturn \"<h5 style='font-weight:bold'>$title <small class='pull-right'>$description</small></h5>\n\t\t\t\t\t <div class='table-responsive' style='overflow-x:scroll;'>\n\t\t\t\t\t\t <table class='table table-hover table-bordered' id='$tableid'>\n\t\t\t\t\t <thead>\n\t\t\t\t\t\t <tr>$fields</tr>\n\t\t\t\t\t\t </thead>\n\t\t\t\t\t\t <tbody>\n\t\t\t\t\t\t\t\t$body\n\t\t\t\t\t\t </tbody>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t</div>\";\n }", "function tabla($lista, $totalColumnas) {\n $totalFilas = count($lista) / $totalColumnas;\n echo \"<table border='1'>\";\n for ($fila = 0; $fila < $totalFilas; $fila++) {\n echo \"<tr>\";\n for ($i=0;$i<$totalColumnas;$i++) {\n $posicion = $totalColumnas * $fila + $i;\n if ($posicion < count($lista)) {\n $contenido = $lista[$posicion];\n } else {\n $contenido = \"\";\n }\n echo \"<td>\".$contenido.\"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "public function rep_list_operaciones($com_id,$tp){\n $obj_est=$this->model_producto->list_oestrategico($com_id); /// Objetivos Estrategicos\n $componente=$this->model_componente->get_componente_pi($com_id);\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']);\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); //// DATOS PROYECTO\n $tabla='';\n\n if($tp==1){\n $tab='table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" width:100%;';\n }\n elseif($tp==2){\n $tabla .='<style>\n table{font-size: 9px;\n width: 100%;\n max-width:1550px;\n overflow-x: scroll;\n }\n th{\n padding: 1.4px;\n text-align: center;\n font-size: 9px;\n }\n </style>';\n $tab='table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\"';\n }\n \n\n\n $tabla.='<'.$tab.'>\n <thead>\n <tr class=\"modo1\" style=\"height:45px;\">\n <th style=\"width:1%;\" style=\"background-color: #1c7368; color: #FFFFFF\" style=\"height:12px;\">#</th>\n <th style=\"width:2%;\" style=\"background-color: #1c7368; color: #FFFFFF\">COD. ACE.</th>\n <th style=\"width:2%;\" style=\"background-color: #1c7368; color: #FFFFFF\">COD. ACP.</th>\n <th style=\"width:2%;\" style=\"background-color: #1c7368; color: #FFFFFF\">COD. OPE.</th>\n <th style=\"width:2%;\" style=\"background-color: #1c7368; color: #FFFFFF\">COD. ACT.</th> \n <th style=\"width:9%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ACTIVIDAD</th>\n <th style=\"width:9%;\" style=\"background-color: #1c7368; color: #FFFFFF\">RESULTADO</th>\n <th style=\"width:9%;\" style=\"background-color: #1c7368; color: #FFFFFF\">INDICADOR</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">LINEA BASE '.($this->gestion-1).'</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">META</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ENE.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">FEB.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">MAR.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ABR.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">MAY.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">JUN.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">JUL.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">AGO.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">SEPT.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">OCT.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">NOV.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">DIC.</th>\n <th style=\"width:9%;\" style=\"background-color: #1c7368; color: #FFFFFF\">VERIFICACI&Oacute;N</th> \n <th style=\"width:4%;\" style=\"background-color: #1c7368; color: #FFFFFF\">PPTO.</th> \n </tr>\n </thead>\n <tbody>';\n $nro=0;\n $operaciones=$this->model_producto->list_operaciones($com_id); /// 2020\n foreach($operaciones as $rowp){\n $sum=$this->model_producto->meta_prod_gest($rowp['prod_id']);\n $monto=$this->model_producto->monto_insumoproducto($rowp['prod_id']);\n $programado=$this->model_producto->producto_programado($rowp['prod_id'],$this->gestion);\n\n $color=''; $tp='';\n if($rowp['indi_id']==1){\n if(($sum[0]['meta_gest'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n elseif ($rowp['indi_id']==2) {\n $tp='%';\n if($rowp['mt_id']==3){\n if(($sum[0]['meta_gest'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n }\n\n $ptto=0;\n if(count($monto)!=0){\n $ptto=$monto[0]['total'];\n }\n\n $color_or='';\n if($rowp['or_id']==0){\n $color_or='#fbd5d5';\n }\n\n $nro++;\n $tabla.=\n '<tr class=\"modo1\" bgcolor=\"'.$color.'\">\n <td style=\"height:40px;\" bgcolor='.$color_or.'>'.$nro.'</td>\n <td style=\"width: 2%; text-align: center;\" bgcolor='.$color_or.' >'.$rowp['acc_codigo'].'</td>\n <td style=\"width: 2%; text-align: center;\" bgcolor='.$color_or.' >'.$rowp['og_codigo'].'</td>\n <td style=\"width: 2%; text-align: center;\" bgcolor='.$color_or.' >'.$rowp['or_codigo'].'</td>\n <td style=\"width: 2%; text-align: center;\" bgcolor=\"#dedcdc\">'.$rowp['prod_cod'].'</td>\n <td style=\"width: 9%; text-align: left;\">'.mb_convert_encoding(''.$rowp['prod_producto'], 'cp1252', 'UTF-8').'</td>\n <td style=\"width: 9%; text-align: left;\">'.mb_convert_encoding(''.$rowp['prod_resultado'], 'cp1252', 'UTF-8').'</td>\n <td style=\"width: 9%; text-align: left;\">'.mb_convert_encoding(''.$rowp['prod_indicador'], 'cp1252', 'UTF-8').'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['prod_linea_base'],2).'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['prod_meta'],2).'</td>';\n\n if(count($programado)!=0){\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['enero'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['febrero'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['marzo'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['abril'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['mayo'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['junio'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['julio'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['agosto'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['septiembre'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['octubre'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['noviembre'],2).'</td>';\n $tabla.='<td style=\"width:3%;\" bgcolor=\"#e5fde5\">'.round($programado[0]['diciembre'],2).'</td>';\n }\n else{\n for ($i=1; $i <=12 ; $i++) { \n $tabla.='<td bgcolor=\"#f5cace\">0.00</td>';\n }\n }\n\n $tabla.='\n <td style=\"width: 9%; text-align: left;\">'.mb_convert_encoding(''.$rowp['prod_fuente_verificacion'], 'cp1252', 'UTF-8').'</td>\n <td style=\"width: 4%; text-align: right;\">'.number_format($ptto, 2, ',', '.').'</td>\n </tr>';\n }\n $tabla .=\n '</tbody>\n </table>';\n\n return $tabla;\n }", "function insertTableInsumos($headers,$matrizDatos,$nomTabla) {\n //verificar tabla a insertar (posteriormente puede ser una funcion):\n $cell_link=setNombreClase($nomTabla);\n\n echo '<div class=\"card-body\">\n <div class=\"table-responsive\" >\n <table class=\"table table-bordered dataTableClase\" width=\"100%\" cellspacing=\"0\">'; //apertura de etiquetas\n //rellenar head:\n echo '<thead><tr>';\n foreach ($headers as $hd) {\n echo \"<th>\".$hd.\"</th>\";\n }\n echo'</tr></thead>';\n //rellenar el footer:\n echo '<tfoot><tr>';\n foreach ($headers as $hd) {\n echo \"<th>\".$hd.\"</th>\";\n }\n echo'</tr></tfoot>';\n echo '<tbody>';\n foreach ($matrizDatos as $reg) {\n echo \"<tr>\";\n foreach ($reg as $cell) {\n echo \"<td>\".$cap = ucfirst(mb_strtolower($cell)).\"</td>\"; // Capitalize\n }\n //el nombre de la clase para las celdas de la ultima columna de la tabla dependen de la tabla a mostrar\n echo\"<td class=\".$cell_link.\">\";\n echo \"<b><a class='\".$reg[0].\" t-vendidos' data-toggle='modal' href= '#trasladoInsumosVendModal' title='Trasladar a vendidos'>V</a></b>\"; //el data-target debe variar segun la tabla\n echo \"<b><a class='\".$reg[0].\" t-consignacion' data-toggle='modal' href='#trasladoInsumosConsModal' title='Trasladar a consignación'>C</a></b>\";\n echo \"</td></tr>\"; //\".$reg[0].\"\n }\n echo '</tbody></table></div></div>'; //cierre etiquetas tabla\n}", "function tabela($vetorComcadastros, $vetorComIndices){//Função que cria a tabela/lista recebe o vetor cos os cadsastros e outro com os indices\n retornaEscolhidos($vetorComcadastros, $vetorComIndices);//escreve a tabela\n }", "public function rep_list_operaciones_pi_2019($com_id,$tp){\n $obj_est=$this->model_producto->list_oestrategico($com_id); /// Objetivos Estrategicos\n $componente=$this->model_componente->get_componente_pi($com_id);\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']);\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); //// DATOS PROYECTO\n $tabla='';\n\n if($tp==1){\n $tab='table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" style=\"width:100%;\"';\n }\n elseif($tp==2){\n $tabla .='<style>\n table{font-size: 9px;\n width: 100%;\n max-width:1550px;\n overflow-x: scroll;\n }\n th{\n padding: 1.4px;\n text-align: center;\n font-size: 9px;\n }\n </style>';\n $tab='table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\"';\n }\n \n $tabla.='<'.$tab.'>\n <thead>\n <tr class=\"modo1\" style=\"height:45px;\">\n <th style=\"width:1%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">#</font></th>\n <th style=\"width:6%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">ACCI&Oacute;N ESTRATEGICA</font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">OPERACI&Oacute;N</font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">RESULTADO</font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">ACTIVIDAD</font></th>\n <th style=\"width:4%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">INDICADOR</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">LINEA BASE</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">META</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">ENE.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">FEB.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">MAR.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">ABR.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">MAY.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">JUN.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">JUL.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">AGO.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">SEP.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">OCT.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">NOV.</font></th>\n <th style=\"width:2%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">DIC.</font></th>\n <th style=\"width:5%;\" bgcolor=\"#1c7368\"><font color=\"#ffffff\">VERIFICACI&Oacute;N</font></th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n if(count($obj_est)!=0){\n foreach($obj_est as $rowo){\n $tabla.='<tr class=\"modo1\" bgcolor=\"#c3efea\">';\n $tabla.='<td colspan=\"21\" style=\"height:15px;\">OBJ. EST. '.$rowo['obj_codigo'].'.- '.$rowo['obj_descripcion'].'</td>';\n $tabla.='</tr>';\n $productos=$this->model_producto->list_producto_programado_oestrategico($com_id,$this->gestion,$rowo['obj_id']); /// Productos\n \n foreach($productos as $rowp){\n $sum=$this->model_producto->meta_prod_gest($rowp['prod_id']);\n $monto=$this->model_producto->monto_insumoproducto($rowp['prod_id']);\n $color=''; $tp='';\n if($rowp['indi_id']==1){\n if(($sum[0]['meta_gest']+$rowp['prod_linea_base'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n elseif ($rowp['indi_id']==2) {\n $tp='%';\n if($rowp['mt_id']==3){\n if(($sum[0]['meta_gest'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n }\n\n $ptto=0;\n if(count($monto)!=0){\n $ptto=$monto[0]['total'];\n }\n\n $nro++;\n $tabla.='<tr class=\"modo1\" bgcolor=\"'.$color.'\" style=\"height:40px;\">';\n $tabla.='<td style=\"height:30px;\">'.$nro.'</td>\n <td>'.$rowp['acc_codigo'].'.- '.$rowp['acc_descripcion'].'</td>\n <td>'.$rowp['prod_producto'].'</td>\n <td>'.$rowp['prod_resultado'].'</td>\n <td></td>\n <td>'.$rowp['prod_indicador'].'</td>\n <td align=\"right\">'.$rowp['prod_linea_base'].'</td>\n <td align=\"right\">'.$rowp['prod_meta'].'</td>\n <td align=\"right\">'.$rowp['enero'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['febrero'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['marzo'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['abril'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['mayo'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['junio'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['julio'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['agosto'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['septiembre'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['octubre'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['noviembre'].''.$tp.'</td>\n <td align=\"right\">'.$rowp['diciembre'].''.$tp.'</td>\n <td>'.$rowp['prod_fuente_verificacion'].'</td>'; \n $tabla.='</tr>';\n $tabla.=''.$this->actividades_2019($rowp['prod_id'],$nro).'';\n }\n }\n }\n else{\n $tabla.='<tr><td colspan=\"22\">No existen operaciones alineadas, Verifique Operaciones</td></tr>';\n }\n \n $tabla .=\n '</tbody>\n </table>';\n\n return $tabla;\n }", "public function table(){\r\n\r\n return $this;\r\n }", "function mostrar_tabla()\n {\n return $this->mostrar_tabla_slickgrid();\n /*\n $sPrefs = '';\n $id_usuario= core\\ConfigGlobal::mi_id_usuario();\n $tipo = 'tabla_presentacion';\n $oPref = new usuarios\\Preferencia(array('id_usuario'=>$id_usuario,'tipo'=>$tipo));\n $sPrefs=$oPref->getPreferencia();\n if ($sPrefs == 'html') {\n return $this->mostrar_tabla_html();\n } else {\n return $this->mostrar_tabla_slickgrid();\n }\n */\n }", "function tabla02($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table border=\\\"1\\\">\";\n\tforeach( $array01 as $key => $value){\n\t\tif ( $key == 'id' or $key == 'ID' or $key == 'Id'){\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td><td> - </td></tr>\\n\";\n\t\t} else{\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t\t}\n\t}\n\t$array02[$i++] = \"</table>\";\n\treturn $array02;\n}", "function base_clear(){\n $tables = array(\n 'oc_product',\n 'oc_product_image',\n 'oc_manufacturer',\n 'oc_manufacturer_description',\n 'oc_product_description',\n 'oc_product_to_category',\n 'oc_product_attribute',\n 'oc_attribute',\n 'oc_attribute_description',\n // 'oc_attribute_value',\n // 'oc_category',\n // 'oc_category_description',\n 'oc_product_to_store',\n // 'oc_category_to_store',\n 'oc_manufacturer_to_store',\n 'oc_product_to_layout',\n // 'oc_category_to_layout',\n );\n foreach ($tables as $table)\n {\n sDb::query(\"TRUNCATE TABLE $table\");\n echo \"Таблица $table очищена\\n\";\n }\n}", "public function componente_operacion_nuevo($com_id){\n $obj_est=$this->model_producto->list_oestrategico($com_id); /// Objetivos Estrategicos\n $componente = $this->model_componente->get_componente_pi($com_id); //// DATOS COMPONENTE\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']); /// DATOS FASE\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); //// DATOS PROYECTO\n $mes = $this->mes_nombre();\n $tabla='';\n $tabla.='<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" style=\"width:100%;\" align=\"center\">\n <thead>\n <tr class=\"modo1\">\n <th style=\"width:1%;\" style=\"background-color: #1c7368; color: #FFFFFF\" style=\"height:12px;\">#</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ACCI&Oacute;N ESTRATEGICA</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">OPERACI&Oacute;N</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">RESULTADO</th>\n <th style=\"width:10%;\" style=\"background-color: #1c7368; color: #FFFFFF\">INDICADOR</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">LB.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">META</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ENE.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">FEB.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">MAR.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">ABR.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">MAY.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">JUN.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">JUL.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">AGO.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">SEPT.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">OCT.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">NOV.</th>\n <th style=\"width:3%;\" style=\"background-color: #1c7368; color: #FFFFFF\">DIC.</th>\n <th style=\"width:8%;\" style=\"background-color: #1c7368; color: #FFFFFF\">VERIFICACI&Oacute;N</th> \n <th style=\"width:4%;\" style=\"background-color: #1c7368; color: #FFFFFF\">PPTO.</th> \n <th style=\"width:4%;\" style=\"background-color: #1c7368; color: #FFFFFF\">COD. PPTO.</th> \n </tr> \n \n </thead>\n <tbody>';\n $nro=0;\n if(count($obj_est)!=0){\n foreach($obj_est as $rowo){\n $productos=$this->model_producto->list_producto_programado_oestrategico($com_id,$this->gestion,$rowo['obj_id'],$rowo['gi'],$rowo['gf']); /// Productos\n\n if(count($productos)!=0){\n $tabla.='<tr class=\"modo1\" bgcolor=\"#9cdcd4\"><td colspan=\"22\" style=\"width: 100%; text-align: left\" style=\"height:13px;\">OBJ. EST. '.$rowo['obj_codigo'].'.- '.$rowo['obj_descripcion'].'</td></tr>';\n foreach($productos as $rowp){\n $sum=$this->model_producto->meta_prod_gest($rowp['prod_id']);\n $monto=$this->model_producto->monto_insumoproducto($rowp['prod_id']);\n $color=''; $tp='';\n if($rowp['indi_id']==1){\n if(($sum[0]['meta_gest'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n elseif ($rowp['indi_id']==2) {\n $tp='%';\n if($rowp['mt_id']==3){\n if(($sum[0]['meta_gest'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n }\n }\n\n $ptto=0;\n if(count($monto)!=0){\n $ptto=$monto[0]['total'];\n }\n\n $nro++;\n\n $tabla.='<tr class=\"modo1\" bgcolor=\"'.$color.'\">';\n $tabla.=' <td style=\"width: 1%; text-align: left;\" style=\"height:11px;\">'.$nro.'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['acc_codigo'].'.- '.$rowp['acc_descripcion'].'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['prod_producto'].'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['prod_resultado'].'</td>\n <td style=\"width: 10%; text-align: left;\">'.$rowp['prod_indicador'].'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['prod_linea_base'],2).'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['prod_meta'],2).'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['enero'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['febrero'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['marzo'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['abril'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['mayo'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['junio'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['julio'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['agosto'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['septiembre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['octubre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['noviembre'],2).''.$tp.'</td>\n <td style=\"width: 3%; text-align: right;\">'.round($rowp['diciembre'],2).''.$tp.'</td>\n <td style=\"width: 8%; text-align: left;\">'.$rowp['prod_fuente_verificacion'].'</td>\n <td style=\"width: 4%; text-align: right;\">'.number_format($ptto, 2, ',', '.').'</td>\n <td style=\"width: 4%; text-align: center;\" bgcolor=\"#dedcdc\">'.$rowp['prod_cod'].'</td>'; \n $tabla.='</tr>';\n }\n }\n }\n }\n else{\n $tabla.='<tr class=\"modo1\"><td colspan=\"22\" style=\"width: 100%; text-align: left;\">SIN OPERACIONES</td></tr>';\n }\n $tabla.='\n </tbody>\n </table>';\n\n return $tabla;\n }", "function build_table($new,$array_cat){\n\t\t//de categorias de serviceo.\n\t\t//Hacemos las iniciaciones pertinentes para intentar\n\t\t//aclarar un poco el codigo\n\t\t$ini_fila=\"<tr>\";\n\t\t$fin_fila=\"</tr>\";\n\t\t$ini_col='<td valign=\"top\" nowrap>';\n\t\t$fin_col=\"</td>\";\n\t\t$NUM_MAX_COLS=1;\n\t\t//Por cada columna un padre y sus hijos.\n\t\t$cadena='<table border=\"0\">';\n\t\t$num_current_col=$NUM_MAX_COLS+1;\t\t\n\t\tfor ($i=0;$i<count($array_cat);$i++){\n\t\t\tif ($num_current_col==$NUM_MAX_COLS+1){\n\t\t\t\t$num_current_col=1;\n\t\t\t\t$cadena=$cadena.$ini_fila;\n\t\t\t}\n\t\t\t$cadena=$cadena.$ini_col;\n\t\t\t//Damos el padre para que empiece la recursividad\t\t\t\n\t\t\t\n\t\t\t$cadena=$cadena.$this->build_col($new,$array_cat[$i],0,\"services\");\t\t\n\t\t\t//0 es el numero de tabulaciones inicial.\n\t\t\t//\"services\" es el nombre que tendran los checkbox.\n\t\t\t$cadena=$cadena.$fin_col;\n\t\t\t$num_current_col++;\n\t\t\tif ($num_current_col==$NUM_MAX_COLS+1){\n\t\t\t\t$cadena=$cadena.$fin_fila;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Si el numero de la columna actual es menor\n\t\t//que el numero maximo de columnas +1 \n\t\t//restamos al maximo la actual para saber cuantas faltan. \n\t\tif ($num_current_col<$NUM_MAX_COLS+1){\t\t\t\n\t\t\t$cadena=$cadena.'<td colspan=\"'.($NUM_MAX_COLS+1-$num_current_col).'\">&nbsp;'.$fin_col.$fin_fila;\n\t\t}\n\t\t$cadena=$cadena.'</table>';\n\t\treturn $cadena;\n\t}", "function clonTable1toTable2Inscritos($T_INSCRITOS,$PROVINCIA, $CLAVE, $TOMO, $FOLIO)\n{\n global $mysqli;\n $TINS = $T_INSCRITOS;\n $query = new Query($mysqli, \"INSERT INTO inscritostmp SELECT * FROM \".$TINS.\" WHERE provincia=? and clave=? and tomo=? and folio=?\");\n $parametros = array('ssss', &$PROVINCIA, &$CLAVE, &$TOMO, &$FOLIO);\n $data = $query->getresults($parametros);\n return true;\n}", "function listarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_sel';\n\t\t$this->transaccion='WF_tabla_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tabla','int4');\n\t\t$this->captura('id_tipo_proceso','int4');\n\t\t$this->captura('vista_id_tabla_maestro','int4');\n\t\t$this->captura('bd_scripts_extras','text');\n\t\t$this->captura('vista_campo_maestro','varchar');\n\t\t$this->captura('vista_scripts_extras','text');\n\t\t$this->captura('bd_descripcion','text');\n\t\t$this->captura('vista_tipo','varchar');\n\t\t$this->captura('menu_icono','varchar');\n\t\t$this->captura('menu_nombre','varchar');\n\t\t$this->captura('vista_campo_ordenacion','varchar');\n\t\t$this->captura('vista_posicion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('menu_codigo','varchar');\n\t\t$this->captura('bd_nombre_tabla','varchar');\n\t\t$this->captura('bd_codigo_tabla','varchar');\n\t\t$this->captura('vista_dir_ordenacion','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('nombre_tabla_maestro','varchar');\n\t\t$this->captura('vista_estados_new','text');\n\t\t$this->captura('vista_estados_delete','text');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function buildHTMLTable($dataSet){\n\n $tblHTML = \"<table class='cleanTbl'>\";\n\n foreach ($dataSet as $row) {\n\n $tblHTML = $tblHTML.\"<tr class='cleanTbl'>\";\n\n foreach($row as $col){\n\n $tblHTML = $tblHTML.\"<td class='cleanTbl'>$col</td>\";\n\n }\n $tblHTML = $tblHTML.\"</tr>\";\n\n }\n $tblHTML = $tblHTML.\"</table>\";\n\n return $tblHTML;\n}", "function DOM_clean_table($table) {\r\n\t\t$parentNode = $table->parentNode;\r\n\t\tif($parentNode->nodeName === \"div\" && ReTidy::DOM_isConflationaryWithParentIgnoringWhitespace($table) && !$parentNode->hasAttributes()) {\r\n\t\t\t$parentNode->setAttribute(\"stripme\", \"y\");\r\n\t\t\tReTidy::DOM_strip_node($parentNode);\r\n\t\t}\r\n\t\t\r\n\t\t// empty tables...\r\n\t\tif(ReTidy::isEmptyElement($table)) {\r\n\t\t\t$table->setAttribute(\"stripme\", \"y\");\r\n\t\t\tReTidy::DOM_strip_node($table);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// tables with only one datum\r\n\t\t$border_attribute = ReTidy::getAttribute($table, \"border\");\r\n\t\t//$blockString = DTD::getBlock();\r\n\t\t//$query = ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'thead/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'thead/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tfoot/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tfoot/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tbody/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tbody/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th';\r\n\t\t$query = ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'thead/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tfoot/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tbody/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'thead/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tfoot/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tbody/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td';\r\n\t\t$cells = $this->xpath->query($query, $table);\r\n\t\t$count_cells = $count_empty_cells = 0;\r\n\t\t$last_cell_with_content = false;\r\n\t\tforeach($cells as $cell) {\r\n\t\t\t$count_cells++;\r\n\t\t\tif(ReTidy::isEmptyElement($cell)) {\r\n\t\t\t\t$count_empty_cells++;\r\n\t\t\t} else {\r\n\t\t\t\t$last_cell_with_content = $cell;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if($count_cells - $count_empty_cells < 2 && isset($last_cell_with_content)) {\r\n\t\tif($count_cells - $count_empty_cells < 2) {\r\n\t\t\t/*$table->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t$firstElementChild = ReTidy::getFirstElementChild($last_cell_with_content);\r\n\t\t\t$isConflationaryBlock = false;\r\n\t\t\t// notice that this is not smart enough to catch multiple block elements as the single datum in a table.\r\n\t\t\tif($firstElementChild && ReTidy::DOM_isConflationaryWithParentIgnoringWhitespace($firstElementChild)) {\r\n\t\t\t\tforeach(explode(\"|\", $blockString) as $blockName) {\r\n\t\t\t\t\tif($blockName === $firstElementChild->nodeName) {\r\n\t\t\t\t\t\t$isConflationaryBlock = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($isConflationaryBlock) {\r\n\t\t\t\t$new_node = $firstElementChild->cloneNode(true);\r\n\t\t\t} else {\r\n\t\t\t\t$last_cell_with_content->setAttribute(\"divme\", \"y\");\r\n\t\t\t\t$new_node = $last_cell_with_content->cloneNode(true);\r\n\t\t\t}*/\r\n\t\t\tif($border_attribute !== false) {\r\n\t\t\t\t//var_dump($border_attribute->nodeValue);\r\n\t\t\t\tif($border_attribute->nodeValue == 0) {\r\n\t\t\t\t\t// do nothing\r\n\t\t\t\t\t//$last_cell_with_content->setAttribute(\"divme\", \"stripme\");\r\n\t\t\t\t\t//$last_cell_with_content->setAttribute(\"stripme\", \"y\");\r\n\t\t\t\t\t//ReTidy::DOM_strip_node($last_cell_with_content);\r\n\t\t\t\t\tReTidy::DOM_strip_one_cell_table($table);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif($last_cell_with_content !== false) {\r\n\t\t\t\t\t\t$last_cell_with_content->setAttribute(\"divme\", \"y\");\r\n\t\t\t\t\t\tReTidy::addStyleWithoutOverwrite($last_cell_with_content, \"border: \" . $border_attribute->nodeValue . \"px solid black;\");\r\n\t\t\t\t\t\tReTidy::DOM_strip_all_but_datum_of_one_datum_table($table, $last_cell_with_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\tReTidy::DOM_strip_one_cell_table($table);\r\n\t\t\t}\r\n\t\t\t//$table->parentNode->insertBefore($new_node, $table);\r\n\t\t}\r\n\t\t\r\n\t\t// eliminate layout tables (at least the kind that is only one cell with a table in it)\r\n\t\t// seems to be taken care of by the above\r\n\t\t/*$query = ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'thead/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'thead/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tfoot/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tfoot/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th | ' . ReTidy::get_html_namespace() . 'tbody/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'tbody/' . ReTidy::get_html_namespace() . 'tr/' . ReTidy::get_html_namespace() . 'th';\r\n\t\t$cells = $this->xpath->query($query, $table);\r\n\t\t$count_cells = 0;\r\n\t\tforeach($cells as $cell) {\r\n\t\t\t$count_cells++;\r\n\t\t}\r\n\t\tif($count_cells === 1) {\r\n\t\t\t$query = '//' . ReTidy::get_html_namespace() . 'table';\r\n\t\t\t$tables_in_single_cell = $this->xpath->query($query, $table);\r\n\t\t\t$count_tables_in_single_cell = 0;\r\n\t\t\tforeach($tables_in_single_cell as $table_in_single_cell) {\r\n\t\t\t\t$count_tables_in_single_cell++;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif($count_tables_in_single_cell > 0) {\r\n\t\t\t\tReTidy::DOM_strip_one_cell_table($table);\r\n\t\t\t}\r\n\t\t}*/\r\n\t\t\r\n\t\t/*\r\n\t\t// take \"captions\" out of tables\r\n\t\t$query = ReTidy::get_html_namespace() . 'thead';\r\n\t\t$theads = $this->xpath->query($query, $table);\r\n\t\tforeach($theads as $thead) {\r\n\t\t\t$query = ReTidy::get_html_namespace() . 'tr[1]';\r\n\t\t\t$first_tr_in_theads = $this->xpath->query($query, $thead);\r\n\t\t\tforeach($first_tr_in_theads as $first_tr_in_thead) {\r\n\t\t\t\t// (there should only be one <thead> and only one first <tr> therein.\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($first_tr_in_thead) {\r\n\t\t\t$first_tr_table = $first_tr_in_thead;\r\n\t\t} else {\r\n\t\t\t$query = ReTidy::get_html_namespace() . 'tr[1]';\r\n\t\t\t$first_tr_tables = $this->xpath->query($query, $table);\r\n\t\t\tforeach($first_tr_tables as $first_tr_table) {\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t$query = ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'th';\r\n\t\t$cells_in_first_tr = $this->xpath->query($query, $first_tr_table);\r\n\t\tforeach($cells_in_first_tr as $cell_in_first_tr) {\r\n\t\t\t$count429++;\r\n\t\t}\r\n\t\tif(strpos(trim(ReTidy::tagless($first_tr_table)), \"Table\") === 0 && $count429 === 1) {\r\n\t\t\t// then we want to take the caption out of the table\r\n\t\t\tif($thead) {\r\n\t\t\t\t// not sure if this is right since a thead could encompass many rows.\r\n\t\t\t\t//$thead->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\t// so:\r\n\t\t\t\t//$thead->setAttribute(\"stripme\", \"y\");\r\n\t\t\t\t//ReTidy::DOM_strip_node($thead);\r\n\t\t\t\t// maybe we do not want to do this at all\r\n\t\t\t}\r\n\t\t\tif($this->config['turn_captions_into'] === 'paragraphs') {\r\n\t\t\t\t$new_node = ReTidy::firstElementChild($first_tr_table)->cloneNode(true);\r\n\t\t\t\t$ps_in_new_node = $this->xpath->query('.//' . ReTidy::get_html_namespace() . 'p', $new_node);\r\n\t\t\t\t$number_of_ps = 0;\r\n\t\t\t\tforeach($ps_in_new_node as $index356435 => $value356435) {\r\n\t\t\t\t\tif($index356435 === 0) {\r\n\t\t\t\t\t\t$first_p_in_new_node = $value356435;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$number_of_ps++;\r\n\t\t\t\t}\r\n\t\t\t\tif($number_of_ps > 0) {\r\n\t\t\t\t\tif($number_of_ps === 1) {\r\n\t\t\t\t\t\tif(ReTidy::areConflationaryIgnoringWhiteSpace($new_node, $first_p_in_new_node)) {\r\n\t\t\t\t\t\t\t// it is unlikely but possible to have one paragraph that is not conflationary with the cell.\r\n\t\t\t\t\t\t\t$new_node = $first_p_in_new_node->cloneNode(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tprint(\"deal with one non-conflationary paragraph in the cell 43490434<br>\\r\\n\");\r\n\t\t\t\t\t\t\tprint(\"cell: \");var_dump(ReTidy::DOM_getNodeString($new_node));\r\n\t\t\t\t\t\t\texit(0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tprint(\"deal with more than one paragraph in a table caption 43490435<br>\\r\\n\");\r\n\t\t\t\t\t\tprint(\"cell: \");var_dump(ReTidy::DOM_getNodeString($new_node));\r\n\t\t\t\t\t\texit(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$new_node->setAttribute('newtag', 'p');\r\n\t\t\t\t}\r\n\t\t\t\t$first_tr_table->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\tforeach($new_node->attributes as $attribute) {\r\n\t\t\t\t\t$attribute->nodeValue = \"stripme\";\r\n\t\t\t\t}\r\n\t\t\t\t$new_node->insertBefore(new DOMText('XXX9o9NewTagBeginXXXstrong9o9XXX'), $new_node->firstChild);\r\n\t\t\t\t$new_node->appendChild(new DOMText('XXX9o9NewTagEndXXXstrong9o9XXX'));\r\n\t\t\t\t$table->parentNode->insertBefore($new_node, $table);\r\n\t\t\t} elseif($this->config['turn_captions_into'] === 'captions') {\r\n\t\t\t\t$first_tr_table->setAttribute(\"stripme\", \"y\");\r\n\t\t\t\tReTidy::DOM_strip_node($first_tr_table);\r\n\t\t\t\tif($cell_in_first_tr->hasAttributes()) {\r\n\t\t\t\t\tforeach($cell_in_first_tr->attributes as $attribute) {\r\n\t\t\t\t\t\t$attribute->nodeValue = \"stripme\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$cell_in_first_tr->setAttribute('newtag', 'caption');\r\n\t\t\t\t$cell_in_first_tr->setAttribute('style', 'text-align: left;');\r\n\t\t\t\t$cell_in_first_tr->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXstrong9o9XXX\"), $cell_in_first_tr->firstChild);\r\n\t\t\t\t$cell_in_first_tr->appendChild(new DOMText(\"XXX9o9NewTagEndXXXstrong9o9XXX\"));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t//$previousElement = ReTidy::previousElement($table);\r\n\t\t\t$previousElement = ReTidy::previousElementIgnoringNesting($table);\r\n\t\t\t$tagless = trim(ReTidy::tagless($previousElement));\r\n\t\t\tpreg_match('/Table(au){0,1} [0-9]*:/is', $tagless, $matches45089);\r\n\t\t\tif(strpos($tagless, $matches45089[0]) === 0 && $previousElement->nodeName === \"p\") {\r\n\t\t\t\tif($this->config['turn_captions_into'] === 'captions') {\r\n\t\t\t\t\t$new_node = $previousElement->cloneNode(true);\r\n\t\t\t\t\t$previousElement->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\t\tif($new_node->hasAttributes()) {\r\n\t\t\t\t\t\tforeach($new_node->attributes as $attribute) {\r\n\t\t\t\t\t\t\t$attribute->nodeValue = \"stripme\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$new_node->setAttribute('newtag', 'caption');\r\n\t\t\t\t\t$new_node->setAttribute('style', 'text-align: left;');\r\n\t\t\t\t\t$new_node->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXstrong9o9XXX\"), $new_node->firstChild);\r\n\t\t\t\t\t$new_node->appendChild(new DOMText(\"XXX9o9NewTagEndXXXstrong9o9XXX\"));\r\n\t\t\t\t\tif($thead) {\r\n\t\t\t\t\t\t$table->insertBefore($new_node, $thead);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$table->insertBefore($new_node, $first_tr_table);\r\n\t\t\t\t\t}\r\n\t\t\t\t} elseif($this->config['turn_captions_into'] === 'paragraphs') {\r\n\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'strong';\r\n\t\t\t\t\t$strongs735 = $this->xpath->query($query, $previousElement);\r\n\t\t\t\t\t$found_strong735 = false;\r\n\t\t\t\t\tforeach($strongs735 as $strong735) {\r\n\t\t\t\t\t\t$found_strong735 = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!$found_strong735) {\r\n\t\t\t\t\t\t$previousElement->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXstrong9o9XXX\"), $previousElement->firstChild);\r\n\t\t\t\t\t\t$previousElement->appendChild(new DOMText(\"XXX9o9NewTagEndXXXstrong9o9XXX\"));\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// take bottom table notes (source information, etc...) out of tables\r\n\t\t// needs work to properly identify only bottom table notes...\r\n\t\t$query = ReTidy::get_html_namespace() . 'tfoot';\r\n\t\t$tfoots = $this->xpath->query($query, $table);\r\n\t\tforeach($tfoots as $tfoot) {\r\n\t\t\t$query = ReTidy::get_html_namespace() . 'tr[last()]';\r\n\t\t\t$first_tr_in_tfoots = $this->xpath->query($query, $tfoot);\r\n\t\t\tforeach($first_tr_in_tfoots as $first_tr_in_tfoot) {\r\n\t\t\t\t// (there should only be one <tfoot> and only one first <tr> therein.\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($first_tr_in_tfoot) {\r\n\t\t\t$last_tr_table = $first_tr_in_tfoot;\r\n\t\t} else {\r\n\t\t\t$query = ReTidy::get_html_namespace() . 'tr[last()]';\r\n\t\t\t$last_tr_tables = $this->xpath->query($query, $table);\r\n\t\t\tforeach($last_tr_tables as $last_tr_table) { }\r\n\t\t}\r\n\t\t$query = ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'th';\r\n\t\t$cells_in_last_tr = $this->xpath->query($query, $last_tr_table);\r\n\t\t$count430 = 0;\r\n\t\tforeach($cells_in_last_tr as $cell_in_last_tr) {\r\n\t\t\t$count430++;\r\n\t\t}\r\n\t\t$tagless = ReTidy::tagless($cell_in_last_tr);\r\n\t\tif($count430 === 1 && (stripos(trim($tagless), \"source\") === 0 || ReTidy::hasABulletForThePurposesOfTableSourceInformation(trim($tagless)))) {\r\n\t\t\t// then we want to take the table notes out of the table\r\n\t\t\t$last_tr_table->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t$new_node = ReTidy::lastElementChild($last_tr_table)->cloneNode(true);\r\n\t\t\tforeach($new_node->attributes as $attribute) {\r\n\t\t\t\t$attribute->nodeValue = \"stripme\";\r\n\t\t\t}\r\n\t\t\t$new_node->setAttribute('newtag', 'div');\r\n\t\t\tif($this->config['table_note_size'] == '80percent') {\r\n\t\t\t\t//$new_node->setAttribute('class', 'fontSize80');\r\n\t\t\t\t// the file is not necessarily CLF2\r\n\t\t\t\t$new_node->setAttribute('style', 'font-size: 80%;');\r\n\t\t\t}\r\n\t\t\t//if($border_attribute !== false) { // ???\r\n\t\t\t//\tif($border_attribute->nodeValue === 0) {\r\n\t\t\t//\t\t// do nothing\r\n\t\t\t//\t} else {\r\n\t\t\t//\t\tReTidy::addStyleWithoutOverwrite($new_node, \"border: \" . $border_attribute->nodeValue . \"px solid black;\");\r\n\t\t\t//\t}\r\n\t\t\t//}\r\n\t\t\t$table->parentNode->insertBefore($new_node, $table->nextSibling);\r\n\t\t}\r\n\t\t*/\r\n\t\t$query = './/' . ReTidy::get_html_namespace() . 'tr';\r\n\t\t$trs = $this->xpath->query($query, $table);\r\n\t\t// another case that we would want to merge in: when for some number of columns; in each row out of these columns,\r\n\t\t// there is only content in one of the cells... not necessarily; empty cells could be considered data.\r\n\t\t/*\r\n\t\t\r\n\t\t// merge cells\r\n\t\t// check if this table is a difficult one that we want to avoid\r\n\t\t$proceed_with_merging = true;\r\n\t\tforeach($trs as $tr) {\r\n\t\t\t$query = ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'th';\r\n\t\t\t$cells = $this->xpath->query($query, $tr);\r\n\t\t\t$count_cells_in_row = 0;\r\n\t\t\tforeach($cells as $cell) {\r\n\t\t\t\t$colspan_amount = ReTidy::getColspan($cell);\r\n\t\t\t\twhile($colspan_amount > 1) {\r\n\t\t\t\t\t$colspan_amount--;\r\n\t\t\t\t\t$count_cells_in_row++;\r\n\t\t\t\t}\r\n\t\t\t\t$count_cells_in_row++;\r\n\t\t\t}\r\n\t\t\tif($count_cells_in_row !== $this->table_width) {\r\n\t\t\t\t$proceed_with_merging = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($proceed_with_merging) {\r\n\t\t\tforeach($trs as $tr) {\r\n\t\t\t\t// merge cells containing text that belongs in the same cell:\r\n\t\t\t\t// criteria for determining if cells should be joined:\r\n\t\t\t\t\t// * the text content of cells in a column that should be joined is of about the same length \r\n\t\t\t\t\t// (because a new cell exists where the text should simply wrap)?\r\n\t\t\t\t\t// * merging should begin at a row that has content in every cell?\r\n\t\t\t\t\t// * merging should end at the row before one where it could begin or at the end of the table\r\n\t\t\t\t\r\n\t\t\t\t// to simplify matters, we choose in rows without any rowspan or colspan\r\n\t\t\t\t// although we may want to consider rowspan later (because of the case where \"one part of a column\r\n\t\t\t\t// that should be joined is already joined\")\r\n\t\t\t\t$query = ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'th';\r\n\t\t\t\t$tr_cells = $cells = $this->xpath->query($query, $tr);\r\n\t\t\t\t$number_cells_in_row = 0;\r\n\t\t\t\tforeach($cells as $cell) {\r\n\t\t\t\t\t$number_cells_in_row++;\r\n\t\t\t\t}\r\n\t\t\t\tif($number_cells_in_row === $this->table_width) {\r\n\t\t\t\t\t$cells_in_this_row_have_content = true;\r\n\t\t\t\t\tforeach($cells as $cell) {\r\n\t\t\t\t\t\tif(ReTidy::isEmptyTag($cell)) {\r\n\t\t\t\t\t\t\t$cells_in_this_row_have_content = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($cells_in_this_row_have_content) {\r\n\t\t\t\t\t\t// then this is a candidate for merging so check the criteria\r\n\t\t\t\t\t\t// check if the text content in the cells is about the same length:\r\n\t\t\t\t\t\t// check if the cells look like they should be merged to a similar row or the end of the table:\r\n\t\t\t\t\t\t$nextElement = $tr;\r\n\t\t\t\t\t\twhile($nextElement = ReTidy::nextElement($nextElement)) {\r\n\t\t\t\t\t\t\t$query = ReTidy::get_html_namespace() . 'td | ' . ReTidy::get_html_namespace() . 'th';\r\n\t\t\t\t\t\t\t$cells4 = $this->xpath->query($query, $nextElement);\r\n\t\t\t\t\t\t\t$number_cells_in_row4 = 0;\r\n\t\t\t\t\t\t\tforeach($cells4 as $cell4) {\r\n\t\t\t\t\t\t\t\t$number_cells_in_row4++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif($number_cells_in_row4 === $this->table_width) {\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$cells_in_this_row_have_content4 = true;\r\n\t\t\t\t\t\t\t\tforeach($cells4 as $cell4) {\r\n\t\t\t\t\t\t\t\t\tif(ReTidy::isEmptyTag($cell4)) {\r\n\t\t\t\t\t\t\t\t\t\t$cells_in_this_row_have_content4 = false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif($cells_in_this_row_have_content4) {\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$element_cell_count = 0;\r\n\t\t\t\t\t\t\t\tforeach($cells4 as $element_cell) {\r\n\t\t\t\t\t\t\t\t\t$element_cell_count++;\r\n\t\t\t\t\t\t\t\t\t$tr_cell_count = 0;\r\n\t\t\t\t\t\t\t\t\tforeach($tr_cells as $tr_cell) {\r\n\t\t\t\t\t\t\t\t\t\t$tr_cell_count++;\r\n\t\t\t\t\t\t\t\t\t\tif($tr_cell_count === $element_cell_count) {\r\n\t\t\t\t\t\t\t\t\t\t\t//print(\"tr_cell\" . htmlentities(ReTidy::DOM_getNodeString($tr_cell)) . \"<br>\\r\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\tif($element_cell->hasChildNodes()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(!ReTidy::isEmptyTag($element_cell)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//$tr_cell->nodeValue = ReTidy::decode_for_DOM($tr_cell->nodeValue) . \" \";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tr_cell->nodeValue .= \" \";\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tr_cell->appendChild(new DOMText(ReTidy::DOM_decoded_for_DOM_child_of($element_cell)));\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t$element_cell->nodeValue = \"\";\r\n\t\t\t\t\t\t\t\t\t\t\t}\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}\r\n\t\t\t\t\t\t\t\t$element_cell->parentNode->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\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\r\n\t\t// (2011-10-26) we are doing very little table cleaning by now, due simply to the variety of ways <table>s may be misused (or possibly my lack of DOM coding skills)\r\n\t\t/*\r\n\t\t// eliminate empty rows then reduce rowspan on previous (along their column) cells\r\n\t\tforeach($trs as $tr) {\r\n\t\t\tif(ReTidy::isSpace(ReTidy::tagless($tr))) {\r\n\t\t\t\t$tr->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\t//if($tr->hasChildNodes()) {\r\n\t\t\t\t//\tforeach($tr->childNodes as $child) {\r\n\t\t\t\t//\t\tif($child->nodeType === 1) {\r\n\t\t\t\t//\t\t\t$child->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\t//\t\t}\r\n\t\t\t\t//\t}\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tReTidy::DOM_build_table_grid($table);\r\n\t\t$mirrored_array = ReTidy::array_mirror($this->table_grid);\r\n\t\tforeach($mirrored_array as $index => $row) {\r\n\t\t\t$empty_row = true;\r\n\t\t\tforeach($row as $index2 => $value2) {\r\n\t\t\t\t$cell = $value2[0];\r\n\t\t\t\t//if(ReTidy::isEmpty($cell)) {\r\n\t\t\t\tif(ReTidy::isSpace(ReTidy::tagless($cell))) {\r\n\t\t\t\t\t//$last_non_spanning_cell = $cell;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$rowspan = ReTidy::getRowspan($cell);\r\n\t\t\t\tif($rowspan > 1 && $mirrored_array[$index-1][$index2][0] === $cell) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$empty_row = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif($empty_row) {\r\n\t\t\t\t//$tr = $last_non_spanning_cell->parentNode;\r\n\t\t\t\t//$tr->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\tforeach($row as $index2 => $value2) {\r\n\t\t\t\t\t$cell = $value2[0];\r\n\t\t\t\t\t$rowspan = ReTidy::getRowspan($cell);\r\n\t\t\t\t\tif($rowspan > 1) {\r\n\t\t\t\t\t\t$rowspan--;\r\n\t\t\t\t\t\tif($rowspan === 1) {\r\n\t\t\t\t\t\t\t$cell->setAttribute('rowspan', 'stripme');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$cell->setAttribute('rowspan', $rowspan);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$cell->setAttribute(\"deleteme\", \"y\");\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\r\n\t\t// eliminate empty columns then reduce colspan on previous sibling cells\r\n\t\tReTidy::DOM_build_table_grid($table);\r\n\t\tforeach($this->table_grid as $index => $column) {\r\n\t\t\t$empty_column = true;\r\n\t\t\tforeach($column as $index2 => $value2) {\r\n\t\t\t\t$cell = $value2[0];\r\n\t\t\t\t//if(ReTidy::isEmpty($cell)) {\r\n\t\t\t\tif(ReTidy::isSpace(ReTidy::tagless($cell))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$colspan = ReTidy::getColspan($cell);\r\n\t\t\t\tif($colspan > 1 && $this->table_grid[$index-1][$index2][0] === $cell) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$empty_column = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif($empty_column) {\r\n\t\t\t\tforeach($column as $index2 => $value2) {\r\n\t\t\t\t\t$cell = $value2[0];\r\n\t\t\t\t\t$colspan = ReTidy::getColspan($cell);\r\n\t\t\t\t\tif($colspan > 1) {\r\n\t\t\t\t\t\t$colspan--;\r\n\t\t\t\t\t\tif($colspan === 1) {\r\n\t\t\t\t\t\t\t$cell->setAttribute('colspan', 'stripme');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$cell->setAttribute('colspan', $colspan);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t//var_dump(ReTidy::DOM_getNodeString($cell));print(\"<br>\\r\\n\");\r\n\t\t\t\t\t\t$cell->setAttribute(\"deleteme\", \"y\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t*/\r\n\t\t\r\n\r\n\t\tReTidy::DOM_empty_ths($table);\r\n\t\t/*\r\n\t\t// remove unnecessary <tbody>\r\n\t\t//$query = ReTidy::get_html_namespace() . 'tbody';\r\n\t\t//$tbodys = $this->xpath->query($query, $table);\r\n\t\t//foreach($tbodys as $tbody) {\r\n\t\t//\tif(ReTidy::DOM_isConflationaryWithParentIgnoringWhitespace($tbody)) {\r\n\t\t//\t\t$tbody->setAttribute(\"stripme\", \"y\");\r\n\t\t//\t\tReTidy::DOM_strip_node($tbody);\r\n\t\t//\t}\r\n\t\t//}\r\n\t\t// remove empty <thead>, <tbody>, <tfoot>? no.\r\n\t\t\r\n\t\t// cell splitting\r\n\t\t// it seems to be a rare case where the program will be able to determine when cells should be split\r\n\t\t// in other words; to determine when a putative datum cell is really many data\r\n\t\t// disabled 2011-09-09\r\n\t\tforeach($trs as $tr) {\r\n\t\t\t$array_cells_to_split = array();\r\n\t\t\t$saved_p_count = 0;\r\n\t\t\t$count_cells_with_large_number_of_ps = 0;\r\n\t\t\t$cells = $this->xpath->query('.//' . ReTidy::get_html_namespace() . 'td | .//' . ReTidy::get_html_namespace() . 'th', $tr);\r\n\t\t\tforeach($cells as $cell) {\r\n\t\t\t\t$p_in_cells = $this->xpath->query('.//' . ReTidy::get_html_namespace() . 'p', $cell);\r\n\t\t\t\t$count_ps_for_this_cell = 0;\r\n\t\t\t\tforeach($p_in_cells as $p_in_cell) {\r\n\t\t\t\t\t$count_ps_for_this_cell++;\r\n\t\t\t\t}\r\n\t\t\t\tif($count_ps_for_this_cell > 4) {\r\n\t\t\t\t\tif($saved_p_count < $count_ps_for_this_cell) {\r\n\t\t\t\t\t\t$saved_p_count = $count_ps_for_this_cell;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$array_cells_to_split[] = $cell;\r\n\t\t\t\t\t$count_cells_with_large_number_of_ps++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($count_cells_with_large_number_of_ps > 2) { // then do the splitting\r\n\t\t\t\tReTidy::splitCells($array_cells_to_split, $saved_p_count, 'row', $table);\r\n\t\t\t}\r\n\t\t}*/\r\n\t\treturn true;\r\n\t}", "public function tableWizard() {}", "function as_table() \n {\n #$str = \"<table> \\n\";\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) \n {\n if ($obj != NULL) \n {\n $str .= \"<tr>\\n\\t<td>\".$obj->label().\"</td>\\n\\t\";\n $str .= \"<td>\".$obj.\"</td>\\n</tr>\\n\";\n }\n }\n #$str .= \"</table>\\n\";\n return $str;\n }", "public function mostrar_tabla_anuncios(){\n\n\t\t$return = '';\n\t\t$mensaje = array('0' => 'Desactivado', '1' => 'Activo');\n\t\t$cols = array('id', 'clave_interna', 'provincia', 'municipio', 'tipo_venta', 'anuncio_promocionado',\n\t\t\t\t\t 'anuncio_e','paquete','activo','apto');\n\t\t$this->where('ussr',$this->user);\n\n\t\tif($salida = $this->get('anuncios', NULL, $cols)){\n\n\t\t\t$return .= '<table class=\"table table-bordered table-hover\">';\n\n\t\t\t$return .= '<tr>\n\t\t\t\t\t <th>Imagen</th>\n\t\t\t\t\t <th>Clave interna</th>\n\t\t\t\t\t <th>Paquete</th>\n\t\t\t\t\t <th>Provincia</th>\n\t\t\t\t\t <th>Operacion</th>\n\t\t\t\t\t <th>Nº imagenes</th>\n\t\t\t\t\t <th>Idiomas</th>\n\t\t\t\t\t <th>Contratado</th>\n\t\t\t\t\t <th>Anuncio apto</th>\n\t\t\t\t\t <th>Anuncio activo</th>\n\t\t\t\t\t <th>Opciones</th>\n\t\t\t\t\t </tr>';\n\t\t\t//por cada anuncio varias cosas habra que hacer\n\t\t\t$i=1;\t\t \n\t\t\tforeach ($salida as $key => $value) {\n\t\t\n\t\t\t\t$num = $i++;\n\t\t\t\t$id_arr = md5($value['id']);\n\t\t\t\t$imagen = $this->sacar_foto($id_arr, $this->user);\n\n\t\t\t\t$return .='<tr>\n\t\t\t\t\t \t<td>'.$imagen.'</td>\n\t\t\t\t\t <td>'.$value['clave_interna'].'</td>\n\t\t\t\t\t <td>'.$value['paquete'].'</td>\n\t\t\t\t\t <td>'.$value['provincia'].'<br />\n\t\t\t\t\t '.$this->show_municipio($value['municipio']).'</td>\n\t\t\t\t\t <td>'.$value['tipo_venta'].'</td>';\n\n\n\n\t\t\t\t//mostrara numero de imagenes en el anuncio\n\t\t\t\t$return .='<td>';\n\t\t\t\t$return .= $this->num_imagenes_anuncio($value['id']);\n\t\t\t\t$return .='</td>';\n\n\n\t\t\t\t//mostrando idiomas en los que esta el anuncio\n\t\t\t\t$return .='<td>';\n\t\t\t\t$return .= $this->idiomas_del_anuncio($value['id']);\n\t\t\t\t$return .='</td>';\n\n\t\t\t\t//estrella o promocionado\n\t\t\t\t$return .='<td>';\n\t\t\t\tif(!empty($value['anuncio_promocionado']) && ($value['anuncio_promocionado'] == 1)){\n\t\t\t\t\t$return .= 'Anuncio promocionado<br />';\t}\n\t\t\t\tif($value['anuncio_e'] == 1){\n\t\t\t\t\t$return .= 'Anuncio estrella';\t\t\t}\t\n\t\t\t\t\t\n\t\t\t $return .= '</td>';\n\t\t\t $return .= '<td>'.$value['apto'].'</td>';\n\t\t\t $return .= '<td id=\"act-'.$id_arr.'\">'.$mensaje[$value['activo']].'</td>';\n\t\t\t //dropdown de opciones\n\t\t\t $return .= '<td>'.$this->dropdown_tabla_anuncios($id_arr).'</td>';\n\t\t\n\t\t\t\t$return .= '</tr>';\n\n\t\t\t}//fin del foreach\n\n\t\t\t$return .= '</table>';\n\n\n\t\t}else{\n\t\t\t$return .= '<h5 id=\"sec1\">No hay anuncios 1 </h5>';\n\t\t}\n\n\t\treturn $return;\n\t}", "function generateColonneByTypeEnTab($table, $columnName, $recherche=false, $attribut=null, $disabled=false) {\n $columnName = strtolower($columnName);\n $retour = '';\n $disabled = $disabled ? 'disabled' : '';\n $recherche = $recherche ? 'rechercheTableStatique' : '';\n $type = $table->getTypeOfColumn($columnName);\n switch ($type) {\n case 'string':\n $retour .= '<td class=\"'.$recherche.'\" columnName='.$columnName.'>'.$attribut.'</td>';\n break;\n case 'float' :\n case 'integer' :\n if (preg_match('#^id[a-zA-Z]+#', $columnName)) {\n $columnNameId = $columnName;\n $columnName = substr($columnName, 2);\n if ($attribut != 0) {\n $cleEtrangere = Doctrine_Core::getTable($columnName)->findOneBy(\"id\", $attribut);\n $retour .= '<td columnName='.$columnNameId.' idCleEtrangere='.$cleEtrangere->id.'>'.$cleEtrangere->libelle.'</td>';\n } else {\n $retour .= '<td columnName='.$columnNameId.'></td>';\n }\n } else {\n $retour .= '<td columnName='.$columnName.'>'.$attribut.'</td>';\n }\n break;\n case 'boolean' :\n $retour .= '<td>';\n if($attribut != null && $attribut == 1) {\n $retour .= '<span class=\"checkbox checkbox_active\" value=\"1\" columnName='.$columnName.' '.$disabled.'></span></div>';\n } else {\n $retour .= '<span class=\"checkbox\" value=\"0\" columnName='.$columnName.' '.$disabled.'></span></td>';\n };\n break;\n }\n return $retour;\n}", "function make_table($result)\r\n{\r\n $temp_result=\"\\n<form name=f1 metbod='POST' action=''>\";\r\n $temp_result.=\"\\n<table cellpadding=2 cellspacing=1>\";\r\n for($i=0;$i<mysql_num_rows($result);$i++)\r\n {\r\n $a_rows=mysql_fetch_assoc($result);\r\n $noofcolumns=mysql_num_fields($result);\r\n #Starting rows-\r\n if($i==0)\r\n\t{\r\n\t $temp_result.=\"\\n<tr bgcolor=#d3dce3>\\n\";\r\n\t \t $temp_result.=\"<td colspan=3></td>\";\r\n\t foreach($a_rows as $key=>$value)\r\n\t {\r\n\t $temp_result.=\"<td>\".$key.\"</td>\";\r\n\t }\r\n\t $temp_result.=\"\\n</tr>\";\r\n\t}\r\n\r\n #data rows-\r\n $temp_result.=\"\\n<tr bgcolor=\".(($i%2==0)?\"#e5e5e5\":\"#d5d5d5\").\">\\n\";\r\n\t#edit columns-\r\n $temp_result.=\"\\n\\t<td><input type=checkbox name=check\".$i.\"></td>\";\r\n $temp_result.=\"\\n\\t<td><a name=\".$i.\" href=\\\"javascript:enable(\".$i.\",\".$noofcolumns.\")\\\"><img src=\\\"b_edit.png\\\" border=0></a></td>\";\r\n $temp_result.=\"\\n\\t<td><a href=\\\"\\\"><img src=\\\"b_drop.png\\\" border=0></a></td>\";\r\n\t#data columns- \r\n foreach($a_rows as $key=>$value)\r\n\t{\r\n\t $temp_result.=\"\\n\\t<td visibility='hidden'>\".$value.\"</td>\";\r\n\t $temp_result.=\"\\n\\t\";\r\n\t $temp_result.='<td id='.$key.$value.' display=\"none\"><input type=\"text\" disabled value=\"'.$value.'\" size='.size_of($key);\r\n\t /* if($key==\"Rollno\")*/ $temp_result.=(' name='.parsekey($key).$i);\r\n\t $temp_result.=' ></td>';\r\n\t}\r\n $temp_result.=\"\\n</tr>\";\r\n }\r\n\r\n $temp_result.=\"\\n</table>\";\r\n $temp_result.=\"\\n</form>\";\r\n\r\n $temp_java_result='<SCRIPT type=text/javascript>\r\n\tfunction hide(obj)\r\n\t{\r\n\t\tif(obj.style.display==\"none\")obj.style.display=\"\";\r\n\t\telse obj.style.display=\"none\";\r\n\t}\r\n\tfunction enable(row,col)\r\n\t{\r\n//\t\talert(\"row=\"+row+\"col=\"+col);\r\n\t\tfor( i=row*col+row+1;i<row*col+col+row+1 ;i++ )\r\n\t\t{\r\n//\t\t\talert(\"i=\"+document.f1.elements[i].name);\r\n\t\t\tdocument.f1.elements[i].disabled=false;//abled();//=\"\";\r\n\t\t}\t\t';\r\n\r\n foreach($a_rows as $key=>$value)\r\n {\r\n $temp_java_result.=\"\\n\\t\\tcellname=eval(\\\"\".parsekey($key).\"\\\"+row);\";\r\n $temp_java_result.=\"\\n\\t\\tdocument.f1.cellname.enabled=on;\";\r\n }\r\n $temp_java_result.='\r\n\t}\r\n\t</SCRIPT>';\r\n \r\n $temp_result=$temp_java_result.$temp_result;\r\n return $temp_result;\r\n}", "function affichagetableau6_12($tab)\n{\n foreach ($tab as $elt) {\n echo \"[\" . $elt . \"]\" . \"\\t\";\n }\n echo \"\\nLes valeurs du tableau ont été incrémentées de 1.\";\n}" ]
[ "0.6653438", "0.65892583", "0.65661836", "0.6563796", "0.65437424", "0.65063006", "0.64876086", "0.64713806", "0.6447764", "0.64086574", "0.63319427", "0.6324289", "0.6315265", "0.62523824", "0.62119484", "0.6211769", "0.6211717", "0.62005544", "0.61976796", "0.6196856", "0.61949736", "0.6192774", "0.6160464", "0.6154624", "0.6147849", "0.61445546", "0.6135876", "0.61321485", "0.6129985", "0.6120257", "0.61051685", "0.60879815", "0.6083825", "0.6076714", "0.60684985", "0.60533065", "0.6052704", "0.604053", "0.60336524", "0.60284907", "0.60178655", "0.6015991", "0.6015929", "0.60060614", "0.6003194", "0.59991115", "0.5998558", "0.59951353", "0.5988637", "0.597198", "0.5969758", "0.5969669", "0.59257144", "0.5914336", "0.5850396", "0.5841332", "0.58340585", "0.5824532", "0.5795099", "0.5794254", "0.5792902", "0.5791058", "0.5789848", "0.57898456", "0.578266", "0.57807153", "0.57723105", "0.5771276", "0.5769878", "0.5769878", "0.5769496", "0.57671183", "0.57670766", "0.57638526", "0.5753144", "0.5744169", "0.574052", "0.5739427", "0.57389677", "0.5737398", "0.57344073", "0.5728553", "0.5727248", "0.5718948", "0.57120275", "0.5711801", "0.571065", "0.5706731", "0.5705533", "0.57039905", "0.57034546", "0.56967044", "0.5692114", "0.56912977", "0.5688352", "0.56817174", "0.5681547", "0.5680223", "0.56716806", "0.56716686", "0.5671527" ]
0.0
-1
Creates a new recipient. A duplicate account number will lead to the retrieval of the existing record.
public function create(string $type, string $name, string $account_number, string $bank_code, string $currency, $params = []): array { $params['type'] = $type; $params['name'] = $name; $params['account_number'] = $account_number; $params['bank_code'] = $bank_code; $params['currency'] = $currency; return $this->client->post("transferrecipient", $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_recipient(EmailAddress $address);", "public function createOneFromAccountAction() {\n $requestData = $this->get('json.service')->decode($this->getRequest()->get('json_data'));\n\n $sender = $requestData['sender'];\n $receiver = $requestData['receiver'];\n $subject = $requestData['subject'];\n $content = $requestData['content'];\n\n $email = $this->get('email.service')->createOne($sender, $receiver, $subject, $content);\n\n if ($email) {\n return $this->get('json.service')->sucessResponse();\n }\n\n return $this->get('json.service')->errorResponse(new ResponseEmailCreateFailure());\n }", "public function created(ContactRecipient $contact_recipient)\n {\n //\n }", "public function create($attributes = [])\n {\n $params = [];\n\n $params['transaction'] = 'fail';\n\n if ($creditcard === 'success') {\n $params['transaction'] = 'success';\n }\n\n return $this->gateway->commit('post', 'recipients', $params);\n }", "public function postCreateMail()\n {\n if ($this->_activeMail->getData('recipient_email') == '') {\n $recipient_email = $this->cart->getData('email');\n $recipient_name = $this->cart->getCustomerFirstname(). ' ' .$this->cart->getCustomerLastname();\n $data = [\n 'recipient_email' => $recipient_email,\n 'recipient_name' => $recipient_name\n ];\n $this->_activeMail->addData($data)->save();\n }\n }", "function addRecipientToEmail($id_email, $recip_email, $recip_name, $to, $cc, $bcc) {\n if ($this->connectToMySql()) {\n $query = sprintf(\"INSERT INTO scuola.email_recipients(\n id_email, email, name, to_recipient, cc_recipient, bcc_recipient)\" .\n \"VALUES (%s,'%s','%s',%s,%s,%s)\", $id_email, $recip_email, $recip_name, $to, $cc, $bcc);\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }\n }\n $this->closeConnection();\n return $result;\n }", "public function create()\n {\n return view('architect.messageRecipient.create');\n }", "public function AddNewRecipient()\n {\n $country = Country::find(session('order')['country_id']);\n $account = PaymentNetwork::find(session('order')['payment_network_id']);\n $reasons = Reason::all();\n return view('frontEnd.usersPanel.addRecipient',compact('country','reasons','account'));\n }", "public function Create() {\n\t\tvalid_only_single_method ( 'POST' );\n\t\trequire_authorization ();\n\n\t\t// Check the Phone number and Telephone number, then call the Notier model\n\t\t$courier_id\t\t\t\t= get_validated_courier_id ();\n\n\t\t$this->load->model ( 'delivery_session_model' );\n\t\t$delivery_session_id = $this->delivery_session_model->Create ( $courier_id );\n\n\n\t\tjson_response ( array ( 'response' => $this->config->item ( 'response_success' ),\n\t\t\t\t'delivery_session_id'\t=> $delivery_session_id ) );\n\t}", "function AddRecipient( $addr ){\n \n // User ID\n if( is_int( $addr ) ){\n $sql = \"SELECT name, first_name, last_name, has_left FROM user WHERE id = \".intval($addr);\n $db = new DB();\n $db->query( $sql );\n if( $db->numrows == 0 ) return false;\n $row = $db->fetchRow();\n if( $row[\"has_left\"] == 1 ){ \n $msg = $row[\"first_name\"].\" \".$row[\"last_name\"].\" has left, no email will be sent to them\";\n Flash::addWarning($msg);\n return false;\n }\n if( $row[\"name\"] == \"\" ){ \n $msg = $row[\"first_name\"].\" \".$row[\"last_name\"].\" does not have a known email address\";\n Flash::addWarning($msg);\n return false;\n }\n $this->AddAddress( $row[\"name\"].\"@\".SITE_EMAILDOMAIN ); // , $row[\"first_name\"].\" \".$row[\"last_name\"] );\n }\n \n // User name\n elseif( preg_match( \"/^[-a-z0-9\\.]+$/\", $addr ) ){\n $this->AddAddress( $addr.\"@\".SITE_EMAILDOMAIN );\n }\n \n // Probably an email address? Leave it up to the class/mail server to work out\n else{\n $this->AddAddress( $addr );\n }\n }", "public function create($messageId, $recipient , $originator , $message, $type = 'DEFAULT', $udh = null)\n {\n\n $params = [\n 'message_id' => $messageId,\n 'recipient' => $recipient,\n 'originator' => $originator,\n 'message' => $message,\n 'type' => $type,\n 'udh' => $udh,\n ];\n return $this->db->insert($this->table, $params);\n }", "function addToRecipient( $newRecipient, $newName='') {\n\t if((eregi(\"^([ 0-9a-z\\.-_]*)\",$newName))&&(eregi(\"^([0-9a-z]+)([ 0-9a-z\\.-_]+)@([0-9a-z\\.-_]+)\\.([0-9a-z]+)\",$newRecipient))) {\n \t $this->email_to\t.= $newName . \"<\" . $newRecipient . \">;\";\n \t return $this->email_to;\n\t } else {\n\t return false;\n\t }\n\t \n\t\t\t\t\n\t}", "public function createAction()\n\t{\n\t\t$contact = new Contacts();\n\t\t$success = $contact->save($this->request->getPost(), array('name', 'phone', 'email'));\n\n\t\tif ($success) {\n\t\t\t$this->flash->success(\"Contact Successfully Saved!\");\n\t\t\t$this->dispatcher->forward(['action' => 'index']);\n\t\t}\n\t\telse {\n\t\t\t$this->flash->error(\"Following Errors occurred: <br/>\");\n\n\t\t\tforeach ($contact->getMessages() as $message) {\n\t\t\t\t$this->flash->error($message);\n\t\t\t}\n\n\t\t\t$this->dispatcher->forward(['action' => 'new']);\n\t\t}\n\t}", "public function create()\n {\n $accountDetail = AccountDetail::latest()->first();\n return view('contact.create', [\n 'account_code' => $accountDetail->account_code,\n ]);\n }", "public function create()\n {\n $this->sesClient->verifyEmailIdentity(\n [\n 'EmailAddress' => $this->identity->getIdentity(),\n ]\n );\n }", "public function store(Request $request)\n {\n $request->validate([\n 'name' => ['required', 'string', 'unique:message_recipients,name'],\n 'numbers' => ['required', new Delimited('numeric')]\n ]);\n\n $message = MessageRecipient::create([\n 'name' => $request->name,\n 'numbers' => $request->numbers\n ]);\n return redirect()->route('messageRecipient.index')->with('status', 'SMS Recipient has been created.');\n }", "public function add(Request $request)\n {\n // if($is_duplicate == ''){\n Receiver::create($request->all());\n return redirect()->back()->with('success', 'Added Recipient: Successfull!');\n // }\n // else{\n // return redirect()->back()->with('warning', 'Recipient already in this Chat...');\n // } \n }", "public function assign()\n {\n /** @var User $user */\n $user = Auth::user();\n if(!is_null($user->twilio_number)) return back()->with('error', 'You already have a Twilio number.');\n\n try{\n $phone = Number::create();\n $user->update(['twilio_phone' => $phone]);\n return back()->with('success', 'A phone number has been assigned to you.');\n }catch (\\Exception $exception){\n return back()->with('error', sprintf('Error: %s', $exception->getMessage()));\n }\n }", "public function create(int $user_id, string $username, string $password, string $smtp_host, string $smtp_port)\n {\n $this->unsetAll();\n $this->user_id = $user_id;\n $this->username = $username;\n $this->password = $password;\n $this->smtp_host = $smtp_host;\n $this->smtp_port = $smtp_port;\n $this->save();\n return $this->id;\n }", "function add_create_account()\n {\n\t\t\n\t\tglobal $imported_ids;\n global $current_user;\n\n\t\t$acc_name = trim($this->column_fields['accountid']);\n\n\t\tif ((! isset($acc_name) || $acc_name == '') )\n\t\t{\n\t\t\treturn; \n\t\t}\n\n $arr = array();\n\n\t\t// check if it already exists\n $focus = new Accounts();\n\n\t\t$query = '';\n\n\t\t// if user is defining the ec_account id to be associated with this contact..\n\n\t\t//Modified to remove the spaces at first and last in ec_account name -- after 4.2 patch 2\n\t\t$acc_name = trim(addslashes($acc_name));\n\n\t\t//Modified the query to get the available account only ie., which is not deleted\n\t\t$query = \"select ec_account.* from ec_account WHERE accountname like '{$acc_name}%' \n\t\t\t\t\tand ec_account.deleted=0 ORDER BY accountname \";\n\t\t$result = $this->db->query($query);\n\t\t$row = $this->db->fetchByAssoc($result, -1, false);\n\t\t// we found a row with that id\n\t\tif (isset($row['accountid']) && $row['accountid'] != -1)\n\t\t{\n\t\t\t$focus->id = $row['accountid'];\n\t\t}\n\n\t\t// if we didnt find the ec_account, so create it\n\t\tif (! isset($focus->id) || $focus->id == '')\n\t\t{\n\t\t\t$focus->column_fields['accountname'] = $acc_name;\n\t\t\t$focus->column_fields['assigned_user_id'] = $current_user->id;\n\t\t\t$focus->column_fields['modified_user_id'] = $current_user->id;\n\n\t\t\t$focus->save(\"Accounts\");\n\t\t\t$acc_id = $focus->id;\n\t\t\t// avoid duplicate mappings:\n\t\t\tif (!isset( $imported_ids[$acc_id]) )\n\t\t\t{\n\t\t\t\t$imported_ids[$acc_id] = 1;\n\t\t\t}\n\t\t}\n\t\t// now just link the ec_account\n $this->column_fields[\"account_id\"] = $focus->id;\n\n }", "public function create(){\r\n\t\t\t$data['title'] = \"Accounts | Create Account\";\r\n\t\t\t$data['userData'] = $this->session->userdata();\r\n\r\n\t\t\tif (!empty($this->input->post())){\r\n\t\t\t\t$accountCreateValidation = $this->form_validation->run();\r\n\r\n\t\t\t\tif($accountCreateValidation){\r\n\t\t\t\t\t$_POST['userID'] = $data['userData']['userID'];\r\n\t\t\t\t\t$createCheck = $this->account_model->createAccount($_POST);\r\n\t\t\t\t\tif ($createCheck){\r\n\t\t\t\t\t\t$this->session->set_flashdata('success', 'You have successfully created an account.');\r\n\t\t\t\t\t\tredirect('accounts');\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$this->session->set_flashdata('danger', 'Something internally happened. Please try again.');\r\n\t\t\t\t\t\t$this->load->template('accounts/create', $data);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$this->load->template('accounts/create', $data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$this->load->template('accounts/create', $data);\r\n\t\t\t}\r\n\t\t}", "public function newContact() {\n $this->checkValidUser();\n\n $this->db->sql = 'INSERT INTO '.$this->db->dbTbl['contact'].' () VALUES ()';\n\n $res = $this->db->execute();\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'sdfU7'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'sdfE5',\n 'caseId' => $this->db->getLastInsertId(),\n 'timestamp' => time()\n );\n }\n\n $this->renderOutput();\n }", "public abstract function create_contact($list_id, $email);", "public function ctrRegistroRecipient(){\n\n\t\tif(isset($_POST[\"send\"])){\n\n\t\t\tif (preg_match('/^[a-zA-Z ]+$/', $_POST[\"fname\"]) && preg_match('/^[a-zA-Z ]+$/', $_POST[\"lname\"]) && preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"email\"]) && preg_match('/^[0-9+() ]*$/', $_POST[\"phone\"])) {\n\n\n\t\t\t\t$encriptarEmail=md5($_POST[\"email\"]);\n\t\t\t\t$photo =\"\";\n\n\t\t\t\t$datos = array(\"fname\"=>$_POST[\"fname\"],\n\t\t\t\t\t\"lname\"=>$_POST[\"lname\"],\n\t\t\t\t\t\"email\"=>$_POST[\"email\"],\n\t\t\t\t\t\"phone\"=>$_POST[\"phone\"],\n\t\t\t\t\t\"description\"=>$_POST[\"description\"],\n\t\t\t\t\t\"photo\"\t=> $photo,\n\t\t\t\t\t\"modo\"=> \"directo\",\t\t\t\t\t\t\t\n\t\t\t\t\t\"verificacion\"=> 1,\n\t\t\t\t\t\"emailEncriptado\" => $encriptarEmail);\n\n\t\t\t\t$tabla=\"recipient\";\n\n\t\t\t\t$respuesta = ModeloRecipients::mdlRegistroRecipient($tabla,$datos);\t\n\n\t\t\t\tif ($respuesta==\"ok\") {\n\n\n\t\t\t\t\t\n\t\t\t\t\tif ((isset($_POST[\"optradio\"])) && ($_POST[\"optradio\"]==\"No\")) {\n\t\t\t\t\t\t$cita= $_POST[\"firstName\"].\" has created an account for you at Kikupal\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$cita= $_POST[\"firstName\"].\" has created an account on Kikupal\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$search=array(\"fname\"=>$_POST[\"fname\"],\n\t\t\t\t\t\t\"lname\"=>$_POST[\"lname\"],\n\t\t\t\t\t\t\"email\"=>$_POST[\"email\"]);\n\t\t\t\t\t$consul= ModeloRecipients::mdlbuscarRecipient($tabla,$search);\t\n\t\t\t\t\t\n\t\t\t\t\t/*==========================================================\n\t\t\t\t\t= verificacion de correo electronico =\n\t\t\t\t\t==========================================================*/\n\t\t\t\t\t\n\t\t\t\t\tdate_default_timezone_get(\"America/Mexico_City\");\n\t\t\t\t\t$url=Ruta::ctrRuta();\n\t\t\t\t\t$mail = new PHPMailer;\n\n\t\t\t\t\t$mail->CharSet = 'UTF-8';\n\n\t\t\t\t\t$mail->isMail();\n\t\t\t\t\t$mail->setFrom('info@kikupal.com','Kikupal.com');\t\t\t\t\n\t\t\t\t\t$mail->Subject=\"Check your email address\";\n\t\t\t\t\t$mail->addAddress($_POST[\"email\"]);\n\t\t\t\t\t$mail->msgHTML('\n\t\t\t\t\t\t<div style=\"width:100%; background:#eee; position:relative; font-family:sans-serif; padding-bottom:40px\">\n\n\t\t\t\t\t\t<center>\n\n\t\t\t\t\t\t<img style=\"padding:20px; width:30%\" src=\"http://www.kikupal.com/img/logo-kikupal-hz.png\">\n\n\t\t\t\t\t\t</center>\n\n\t\t\t\t\t\t<div style=\"position:relative; margin:auto; width:65%; background:white; padding:20px\">\n\n\t\t\t\t\t\t<center>\n\n\t\t\t\t\t\t<img style=\"padding:20px; width:15%\" src=\"http://tutorialesatualcance.com/tienda/icon-email.png\">\n\n\t\t\t\t\t\t<h3 style=\"font-weight:100; color:#999\">CHECK YOUR EMAIL ADDRESS</h3>\n\n\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<h4 style=\"font-weight:100; color:#999; padding:0 20px\">'.$cita.' </h4>\n\n\t\t\t\t\t\t<a href=\"'.$url.'verificar/'.$encriptarEmail.'\" target=\"_blank\" style=\"text-decoration:none; border-radius:10px;\">\n\n\t\t\t\t\t\t<div style=\"line-height:60px; background:#0aa; width:60%; color:white\">Please active you account</div>\n\n\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t<br>\n\n\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\n\t\t\t\t\t\t<h5 style=\"font-weight:100; color:#999\">If you are not enrolled in this account, you can ignore this email and the account will be deleted.</h5>\n\n\t\t\t\t\t\t</center>\n\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t</div>'\n\t\t\t\t\t);\n\n\t\t\t\t\t$envio =$mail->send();\n\n\t\t\t\t\tif(!$envio){\n\t\t\t\t\t\techo '<script> \n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttitle:\"Error\",\n\t\t\t\t\t\t\ttext:\" problem has occurred sending the Verificaion '.$_POST[\"email\"].$mail->ErrorInfo.'!\",\n\t\t\t\t\t\t\ttipo:\"error\",\n\t\t\t\t\t\t\tconformButtonText:\"close\",\n\t\t\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t\t\t},function(isConfirm){if(isConfirm){history.back();}}); </script>';\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\techo '<script> \n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttitle:\"CONFIRM E-MAIL\",\n\t\t\t\t\t\t\ttext:\"Account created, an e-mail was sent to ('.$_POST[\"email\"].'), thank you!\",\n\t\t\t\t\t\t\ttipo:\"success\",\n\t\t\t\t\t\t\tconformButtonText:\"close\",\n\t\t\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t\t\t},function(isConfirm){if(isConfirm){window.location=\"'.$url.'c3.php?id='.$consul[\"id_recipient\"].'\";\t}});</script>';\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo '<script> \n\t\t\t\tswal({\n\t\t\t\t\ttitle:\"Error\",\n\t\t\t\t\ttext:\"Failed to register the recipient\",\n\t\t\t\t\ttipo:\"error\",\n\t\t\t\t\tconformButtonText:\"Cerrar\",\n\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t},function(isConfirm){if(isConfirm){history.back();\t}}); </script>';\n\t\t\t}\n\t\t}\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}", "function addCC( $newRecipient ) {\n\t\t\t\t\n\t}", "function sendMessageToNumber($number, $message, $client, $myNumber) {\n if ($number != \"\" && $number != NULL && strlen($number) >= 10) {\n $client->account->messages->create(array( \n 'To' => $number, \n 'From' => $myNumber, \n 'Body' => $message, \n ));\n }\n else {\n \n echo \"Cannot send number to null or blank number\";\n }\n}", "public function create($email);", "public static function sendNewUser($number, $username, $password, $fname, $lname){\n \n //Account SID and Auth Token from twilio.com/console\n static $sid = 'ACf0f564e6bb5668dec692fe70cf211e04';\n static $token = 'b2826af80df9518cacb536ad44e1b44c';\n \n $smsClient = new Client($sid, $token);\n //code obtained from https://www.twilio.com/docs/libraries/php\n $smsClient->messages->create(\n // the number you'd like to send the message to\n '+260'.$number,\n array(\n // A Twilio phone number that was purchased at twilio.com/console\n 'from' => '+447481346249',\n // the body of the text message\n 'body' => \"Hello \".$fname.\" \".$lname.\", your username is \".$username.\" and password is \".$password.\". Use these credentials to log into the shcool hotspot system.\"\n )\n );\n\n }", "public function recipient($address = null)\n {\n return new Account([\"address\" => $address ?: $this->getAttribute(\"recipient\")]);\n }", "public function create()\n {\n //\n $this->message->sendMessage();\n }", "public function store()\n\t{\n\t\t$author=User::find(ResourceServer::getOwnerId());\n\t\t$max=$author->credits;\n\t\t$input=Input::all();\n\t\t$validator=Validator::make($input,array(\n\t\t\t'recipient'=>'required',\n\t\t\t'recipient.addressee'=>'required',\n\t\t\t'credits'=>'integer|between:0,'.$max,\n\t\t));\n\t\t$validator->sometimes('recipient.email','required|email', function($input){\n\t\t return !Input::has('recipient.phoneNumber');\n\t\t});\n\t\t$validator->sometimes('recipient.phoneNumber','required|numeric',function($input){\n\t\t\treturn !Input::has('recipient.email');\n\t\t});\n\t\tif($validator->fails()){\n\t\t\treturn Response::json(array('error',$input,$validator->messages()->toArray()));\n\t\t}\n\t\t$email=(Input::has('recipient.email') ? $input['recipient']['email']: '');\n\t\t$phoneNumber=(Input::has('recipient.phoneNumber')? $input['recipient']['phoneNumber']:'');\n\t\t$name=$input['recipient']['addressee'];\n\t\t$addresses=Input::has('addresses')?$input['addresses']:null;\n\t\t$credits=$input['credits'];\n\t\t$user=User::where('email','=',$email)->where('active','=','1')->first();\n\t\tif(!isset($user->id)){\n\t\t\t$user=new User;\n\t\t\t$user->email=$email;\n\t\t\t$user->phoneNumber=$phoneNumber;\n\t\t\t$user->splitFullName($name);\n\t\t\t$password=str_random(6);\n\t\t\t$user->password=Hash::make($password);\n\t\t\t$code=str_random(10);\n\t\t\t$user->code=$code;\n\t\t\t$user->active=0;\n\t\t\t$user->save();\n\t\t\t$user_id=DB::connection('mysql')->getPdo()->lastInsertId();\n\t\t}\n\t\telse{\n\t\t\t$user_id=$user->id;\n\t\t\t$password=null;\n\t\t\t$code=null;\n\t\t}\n\t\tif($addresses){\n\t\t\t$address_ids=Input::get('addresses');\n\t\t\t$addresses=Addresses::find($address_ids);\n\t\t\tforeach($addresses as $address){\n\t\t\t\t$address->copyTo($user_id);\n\t\t\t\t}\n\t\t}\n\t\tif($credits>0){\n\t\t\t$transfer=new Transfers;\n\t\t\t$transfer->recipient_id=$user_id;\n\t\t\t$transfer->giver_id=$author->id;\n\t\t\t$transfer->credits=$credits;\n\t\t\t$transfer->save();\n\t\t\t$author->credits -= $credits;\n\t\t\t$author->save();\n\t\t}else{\n\t\t\t$credits=null;\n\t\t\t$transfer=null;\n\t\t}\n\t\tif($email){\n\t\t\t$mandrill=new Mandrill(Config::get('mandrill.api_key'));\n\t\t\t$html=View::make('emails.auth.share-activate')->with(array(\n\t\t\t\t'link'=>URL::route('account-registered',$code),\n\t\t\t\t'user'=>$user,\n\t\t\t\t'credits' =>$credits,\n\t\t 'addresses'=>$addresses,\n\t\t 'password'=>$password,\n\t\t 'auth'=>$author,\n\t ));\n\t\t\t$html=$html->render();\n\t\t\t $message = array(\n\t\t 'html' => $html,\n\t\t 'text' => $html,\n\t\t 'subject' => 'account activation',\n\t\t 'from_email' => 'info@x-presscards.com',\n\t\t 'from_name' => 'X-Press Cards',\n\t\t 'to' => array(\n\t\t array(\n\t\t 'email' => $user->email,\n\t\t 'name' => $name,\n\t\t 'type' => 'to'\n\t\t \t)\n\t\t \t),\n\t \t\t);\n\t\t\t$mandrill->messages->send($message);\n\t\t}else{\n\t\t\t$email=false;\n\t\t}\n\t\tif(($phoneNumber)){\n\t\t\tTwilio::message($phoneNumber, $author->fullName().' has shared with you: '.$code);\n\t\t}else{\n\t\t\t$text=false;\n\t\t}\n\t\treturn Response::json(array('input'=>Input::all(),'transfer'=>$transfer,'user'=>$user->toArray(),'email'=>$email,'text'=>$text));\n\t}", "public function create()\n {\n // TODO: Algún parámetro para no permitir el registro.\n \n // Es ya un usuario?\n if (Core::isUser())\n {\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('') . '\\';');\n return;\n }\n \n // Tenemos datos?\n if ($this->request->is('email'))\n {\n // Validamos los datos\n $form = Core::getLib('form.validator');\n $form->setRules(Core::getService('account.signup')->getValidation());\n \n // Si no hay errores procedemos a capturar los datos.\n if ($form->validate())\n {\n // Agregamos usuario\n if (Core::getService('account.process')->add($this->request->getRequest()))\n {\n if (Core::getParam('user.verify_email_at_signup'))\n {\n // Vamos a que verifique su email\n Core::getLib('session')->set('email', $this->request->get('email'));\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.verify') . '\\';');\n }\n else\n {\n // Iniciamos sesión\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.login') . '\\';');\n }\n \n return;\n }\n }\n }\n \n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.signup') . '\\';');\n }", "public function createnewaddressbookAction()\n {\n $addressBookName = $this->getRequest()->getParam('name');\n $visibility = $this->getRequest()->getParam('visibility');\n $website = $this->getRequest()->getParam('website', 0);\n $client = Mage::helper('ddg')->getWebsiteApiClient($website);\n if ($addressBookName !== '' && $client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {\n $response = $client->postAddressBooks($addressBookName, $visibility);\n if (isset($response->message))\n Mage::getSingleton('adminhtml/session')->addError($response->message);\n else\n Mage::getSingleton('adminhtml/session')->addSuccess('Address book : '. $addressBookName . ' created.');\n }\n\n }", "function add_new_phonebook_contact($phonebook_data_type, $id, $name, $phone, $address, $email, $contactPerson, $contactType){\n\t\tif( isset($_POST[$phonebook_data_type]) ){\n\t\t\tglobal $base;\n\t\t\tswitch ($_POST[$phonebook_data_type]) {\n\t\t\t\tcase 'insert':\n\t\t\t\t\t$phonebook = new phonebook();\n\t\t\n\t\t\t\t\t$phonebook->phonebook_company_id \t= $_POST[$id];\n\t\t\t\t\t$phonebook->user_id \t\t\t\t= $base->clear_string($_SESSION['user_id']);\n\t\t\t\t\t$phonebook->phonebook_name \t\t\t= $_POST[$name];\n\t\t\t\t\t$phonebook->phonebook_phone \t\t= $_POST[$phone];\n\t\t\t\t\t$phonebook->phonebook_address \t\t= $_POST[$address];\n\t\t\t\t\t$phonebook->phonebook_email\t\t\t= $_POST[$email];\n\t\t\t\t\t$phonebook->phonebook_contactperson = $_POST[$contactPerson];\n\t\t\t\t\t$phonebook->contact_type \t\t\t= $_POST[$contactType];\n\n\t\t\t\t\t$phonebook->create();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'update':\n\t\t\t\t\tphonebook::update_phonebook_info($_POST[$id], $_POST[$name], $_POST[$phone], $_POST[$address], $_POST[$email], $_POST[$contactPerson], $_POST[$contactType]);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t}", "public function create_a_record()\n {\n // Add a record\n factory(Email::class, 1)->create();\n\n $this->assertCount(1, Email::all());\n }", "public function create(CreateParams $params)\n {\n return $this->api->call('contacts', 'POST', ['contact' => $params->toArray()]);\n }", "protected function createDonorAddressEntry()\n {\n $this->donor_address = new DonorAddress;\n \n $this->donor_address->set('donor_id', $this->donor->get('id'));\n $this->donor_address->set('address', $this->data['address']);\n $this->donor_address->set('city', $this->data['city']);\n $this->donor_address->set('region', $this->data['region']);\n $this->donor_address->set('country', $this->data['country']);\n $this->donor_address->set('postal_code', $this->data['postal_code']);\n $this->donor_address->set('telephone', $this->data['telephone']);\n \n $this->donor_address->create();\n }", "function create_person($personRec = \"\", $personID = \"\")\n\t{\n\t\t//throw new exception(\"create_person - this function is not implemented\");\n\n\t}", "public function createcontactAction()\r\n {\r\n\r\n $auth = Zend_Auth::getInstance();\r\n $userGroupId = $auth->getIdentity()->UserGroupIdF;\r\n \r\n // Check Post\r\n if ($this->getRequest()->isPost()) {\r\n\r\n $params = $this->getRequest()->getParams();\r\n $contactfirstname = trim($params['contactfirstname']);\r\n $contactlastname = trim($params['contactlastname']);\r\n $contactemail = trim($params['contactemail']);\r\n\r\n\r\n\r\n $error = \"\";\r\n\r\n // Check if contact's name lenght is between 1 and 50\r\n \r\n if (strlen($contactfirstname)>50)\r\n $error .= \"Le prénom doit être compris entre 1 et 50 caractères. \";\r\n if (strlen($contactlastname)>50)\r\n $error .= \"Le nom doit être compris entre 1 et 50 caractères. \";\r\n\r\n\r\n // Check if mail is valid\r\n $validateur = new Zend_Validate_EmailAddress();\r\n if (! $validateur->isValid($contactemail))\r\n $error = \"L'email est invalide\";\r\n\r\n if (!empty($error)) {\r\n $this->_helper->json(array(\r\n 'code' => $error\r\n ));\r\n }\r\n\r\n\r\n\r\n $contact = new Application_Model_DbTable_Contact();\r\n $idInsert = $contact->createContact($contactfirstname, $contactlastname,$contactemail, $userGroupId);\r\n\r\n if ($idInsert == \"nok\") {\r\n $msg = \"Contactez un administrateur svp.\";\r\n $this->_helper->json(array(\r\n 'code' => $msg\r\n ));\r\n }\r\n $this->_helper->json(array(\r\n 'code' => '42'\r\n ));\r\n }\r\n }", "public function create_post() {\n\t\t$data['uid'] = $this->input->get('uid');\n\t\t$data['to'] = $this->input->get('to');\n\t\t$data['text'] = $this->input->get('text');\n\t\t$data['ts'] = now();\n\n\t\t$this->Messages_model->create($data);\n\t}", "function createUser($f_name, $l_name, $email, $username, $passsword, $profilePicture, $birthday, $phonenumber, $education, $location, $skill, $notes)\n{\n global $db, $BASE_URL;\n $command = \"INSERT INTO `user_accounts`(`firstname`, `lastname`, `email`, `username`, `password`, `confirmStatus`, `activationCode`,profilePicture,Birthday,phoneNumber,Education,Location,Skill,Notes)\n VALUES (?, ?, ?, ?, ?, ?, ?,?,?,?,null,null,null,null)\";\n $hashPass = password_hash($passsword, PASSWORD_DEFAULT);\n $activationCode = generateCode(16);\n $stmt = $db->prepare($command);\n $stmt->execute(array($f_name, $l_name, $email, $username, $hashPass, 0, $activationCode, $profilePicture, $birthday, $phonenumber));\n $newAccount = $db->lastInsertId();\n // Send mail\n // die();\n sendMail(\n $email,\n $l_name,\n 'Confirm email',\n \"Your activation code is:\n <a href=\\\"$BASE_URL/confirmEmail.php?activationCode=$activationCode\\\">$BASE_URL/confirmEmail.php?activationCode=$activationCode</a>\"\n );\n return $newAccount;\n}", "protected function create(array $data)\n {\n\n $pin = substr(time(), 4);\n if (isset($data['affiliate_id'])) {\n $position = ['L', 'R'];\n $ref_id = $data['user_id'];\n $poss = array_random($position);\n $posid = getLastChildOfLR($ref_id, $poss);\n }\n\n // $general = General::first();\n\n $message = '<tr>';\n $message .= '<td style=\"font-family: sans-serif; font-size: 14px; vertical-align: top;\">';\n $message .= '<p style=\"font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;color:green;\">Our warmest congratulations on your new account opening! This only shows that you have grown your business well. I pray for your prosperous.</p>';\n\n $message .= '<p style=\"font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;\">You have taken this path knowing that you can do it. Good luck with your new business. I wish you all the success and fulfillment towards your goal.</p>';\n $message .= '<p style=\"font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;\">Your username is ' . $data['username'] . ' .</p>';\n\n $message .= '<p style=\"font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;\">Your password is ' . $data['password'] . ' .</p>';\n\n $message .= '<p style=\"font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px; color:red;\">Remember, never share your password with otherone. And you are agree with our Terms and Policy.</p>';\n $message .= '</td>';\n $message .= '</tr>';\n\n send_email($data['email'], 'Account Created Successfully', $data['first_name'], $message);\n\n $sms = 'Congratulation, for registration. Your username is ' . $data['username'] . '. Your password is ' . $data['password'] . '';\n send_sms($data['mobile'], $sms);\n $affiliate_id = str_random(15);\n $check_affilate = User::where('affiliate_id', $affiliate_id)->count();\n while ($check_affilate > 0) {\n $affiliate_id = str_random(15);\n $check_affilate = User::where('affiliate_id', $affiliate_id)->count();\n if (!$check_affilate > 0) {\n break;\n }\n $check_affilate = $check_affilate - 1;\n }\n if (!$check_affilate > 0) {\n if (isset($data['affiliate_id'])) {\n // Add 20% COMMISION TO THE REFFERAL'S ACCOUNT\n $package_id = $data['package'];\n $package_info = Package::find($package_id);\n $package_price = $package_info->price;\n $commision = (20 / 100) * $package_price;\n $user = User::find($data['user_id']);\n $user_name = $user->first_name . $user->last_name;\n // Income::create([\n // 'user_id' => $data['user_id'],\n // 'amount' => $commision,\n // 'description' => 'Refferal Income By' . $user_name,\n // 'type' => 'R',\n // ]);\n // echo \"Resister With Affiliate\";\n return User::create([\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'referrer_id' => $data['user_id'],\n 'position' => $poss,\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'mobile' => $data['mobile'],\n 'street_address' => $data['street_address'],\n 'city' => $data['city'],\n //'post_code' => $data['post_code'],\n 'country' => $data['country'],\n 'username' => $data['username'],\n 'birth_day' => date('Y-m-d', strtotime($data['birth_day'])),\n 'join_date' => Carbon::today(),\n 'balance' => 0,\n 'status' => 0,\n 'paid_status' => 0,\n 'ver_status' => 1,\n 'ver_code' => $pin,\n 'forget_code' => 0,\n 'posid' => $posid,\n 'tauth' => 0,\n 'tfver' => 1,\n 'emailv' => 1,\n 'smsv' => 1,\n 'affiliate_id' => $affiliate_id,\n 'package_id' => $data['package'],\n 'expiry_date' => date('Y-m-d', strtotime('+4 months')),\n ]);\n } else {\n // echo \"Resister With Common\";date('Y-m-d', strtotime('+4 months'));\n return User::create([\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n //'referrer_id' => $data['referrer_id'],\n //'position' => $data['position'],\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'mobile' => $data['mobile'],\n 'street_address' => $data['street_address'],\n 'city' => $data['city'],\n //'post_code' => $data['post_code'],\n 'country' => $data['country'],\n 'username' => $data['username'],\n 'birth_day' => date('Y-m-d', strtotime($data['birth_day'])),\n 'join_date' => Carbon::today(),\n 'balance' => 0,\n 'status' => 0,\n 'paid_status' => 0,\n 'ver_status' => 1,\n 'ver_code' => $pin,\n 'forget_code' => 0,\n //'posid' => $posid,\n 'tauth' => 0,\n 'tfver' => 1,\n 'emailv' => 1,\n 'smsv' => 1,\n 'affiliate_id' => $affiliate_id,\n 'package_id' => $data['package'],\n 'expiry_date' => date('Y-m-d', strtotime('+4 months')),\n ]);\n }\n }\n }", "function add_new_phonebook_contact_from_contact_form( $contactFromForm, $name, $phone, $address, $email, $contactPerson, $contactType){\n\t\tif( isset($_POST[$contactFromForm]) ){\n\t\t\tglobal $base;\n\t\t\t$phonebook = new phonebook();\n\n\t\t\t//$phonebook->phonebook_company_id \t= '0';\n\t\t\t$phonebook->user_id \t\t\t\t= $base->clear_string($_SESSION['user_id']);\n\t\t\t$phonebook->phonebook_name \t\t\t= $_POST[$name];\n\t\t\t$phonebook->phonebook_phone \t\t= $_POST[$phone];\n\t\t\t$phonebook->phonebook_address \t\t= $_POST[$address];\n\t\t\t$phonebook->phonebook_email\t\t\t= $_POST[$email];\n\t\t\t$phonebook->phonebook_contactperson = $_POST[$contactPerson];\n\t\t\t$phonebook->contact_type \t\t\t= $_POST[$contactType];\n\n\t\t\t$phonebook->create();\n\t\t}\n\t}", "function addBCC( $newRecipient ) {\n\t\t\t\t\n\t}", "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 }", "public function create() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"INSERT INTO users (id, mail, name, password, role, state) VALUES (?, ?, ?, ?, ?, ?)\");\n\t\t$stmt->execute(array($this->id, $this->mail, $this->name, $this->password, $this->role, $this->state));\n\t}", "public function addMessage(string $text, int $authorId, int $recipientId) : int\n {\n $stmt = $this->db->prepare(\"INSERT INTO messages (text, author, recipient) VALUES (?,?,?)\");\n $stmt->execute([$text, $authorId, $recipientId]);\n return intval($this->db->lastInsertId());\n }", "public function store(Request $request)\n {\n $request->validate([\n 'name' => ['required', 'string'],\n 'number' => ['required', 'unique:sms_recipients,number'],\n 'desc' => 'nullable',\n 'type' => ['required', 'in:outlet,department'],\n 'type_id' => ['required', 'numeric']\n ]);\n\n $type = $request->type;\n $recipient = new SmsRecipient();\n $recipient->name = $request->name;\n $recipient->number = $request->number;\n $recipient->desc = $request->desc;\n\n switch ($type)\n {\n case \"department\":\n $depart = Department::findOrFail($request->type_id);\n $depart->sms_recipients()->save($recipient);\n break;\n case \"outlet\":\n $outlet = Outlet::findOrFail($request->type_id);\n $outlet->sms_recipients()->save($recipient);\n break;\n default:\n return redirect()->route('smsRecipient.index')->with('failure', \"The $type you're trying to assign doesn't exists.\");\n break;\n }\n\n $recipient->save();\n return redirect()->route('smsRecipient.index')->with('status', 'SMS Recipient has been created.');\n }", "public function actionCreate()\n {\n /* @var \\common\\models\\User $usr */\n $usr = Yii::$app->user->identity;\n\n $model = new CreateTransaction();\n $model->user_id = Yii::$app->user->id;\n $model->account_from = $usr->account->id;\n\n if ($model->load(Yii::$app->request->post())) {\n try {\n if (!Account::findOne($model->account_to)->user->is_admin) {\n throw new ForbiddenHttpException('You cannot transfer money to another user’s account.');\n }\n $model->createTransaction();\n Yii::$app->session->setFlash('createUserTransaction', 'ok');\n return $this->goBack();\n } catch (\\Exception $e) {\n Yii::$app->session->setFlash('createUserTransaction', $e->getMessage());\n }\n } else {\n Yii::$app->session->setFlash('createUserTransaction', 'Please fill out the following form');\n }\n return $this->render('create', ['model' => $model]);\n }", "function user_make_account($first_name, $last_name, $email){\n\t\t$queryText = 'INSERT INTO user_accounts (first_name, last_name, email) VALUES (:first_name, :last_name, :email)';\n\t\t\n\t\t$query = $this->connection->prepare($queryText);\n\t\t$query->execute(array(':first_name'=>$first_name, ':last_name'=>$last_name, ':email'=>$email));\n\t\t\n\t\treturn array(\"uid\"=>strval($this->connection->lastInsertId()));\n\t}", "function create($userId, $mobileNumber, $nickName, $verificationCode){\n // TODO: Do we user query for this, or something else?`\n try{\n $saveUserQuery = $this->db->query(\"INSERT INTO `user`(`id`, `mobileNumber`, `username`, `nickName`, `verificationCode`)\n VALUES ('\".$userId.\"',\".$mobileNumber.\",'\".$nickName.\"','\".$nickName.\"','\".$verificationCode.\"')\"); \n }catch(Exception $e){\n throw new Exception('Error: ' . $e->getMessage());\n }\n }", "public static function createNewEmail($args) {\n $email = new Email;\n $email->from_email = empty($args['fromEmail']) ? config('mail.from.address') : $args['fromEmail'];\n $email->from_name = empty($args['fromName']) ? config('mail.from.name') : $args['fromName'];\n $email->reply_to_email = empty($args['replyToEmail']) ? config('mail.from.address') : $args['replyToEmail'];\n $email->reply_to_name = empty($args['replyToName']) ? config('mail.from.name') : $args['replyToName'];\n $email->to_email = empty($args['toEmail']) ? config('mail.from.name') : $args['toEmail'];\n $email->to_name = empty($args['toName']) ? config('mail.from.name') : $args['toName'];\n $email->subject = $args['subject'];\n $email->data = empty($args['data']) ? null : json_encode($args['data']);\n $email->email_type = $args['emailType'];\n $email->receiver_id = isset($args['receiverId']) ? $args['receiverId'] : null;\n $email->sender_id = isset($args['senderId']) ? $args['senderId'] : null;\n $email->site_id = isset($args['siteId']) ? $args['siteId'] : null;\n $email->parent_email_id = isset($args['parentEmailId']) ? $args['parentEmailId'] : null;\n $email->save();\n return $email;\n }", "public function createNewRecord() {\n try {\n // Define classes that we need to use.\n $phoneUtil = PhoneNumberUtil::getInstance();\n $phoneNumberCarrier = PhoneNumberToCarrierMapper::getInstance();\n // Define PhoneNumber instance.\n $phoneNumber = $phoneUtil->parse($this->number);\n // Check if phone number is valid.\n if ($phoneUtil->isValidNumber($phoneNumber)) {\n // Get phone number parameters.\n $countryCode = $phoneUtil->getRegionCodeForNumber($phoneNumber);\n $carrier = $phoneNumberCarrier->getNameForNumber($phoneNumber, $countryCode);\n $countryDialingCode = $phoneNumber->getCountryCode();\n $subscriberNumber = $phoneNumber->getNationalNumber();\n\n // We will return this data to the view.\n $data = [\n 'mno' => $carrier,\n 'country_dialing_code' => $countryDialingCode,\n 'subscriber_number' => $subscriberNumber,\n 'country_code' => $countryCode,\n ];\n\n // Save new record into database.\n $record = Records::create([\n 'phone_number' => $this->number,\n 'data' => json_encode($data),\n ]);\n\n return $record;\n }\n } catch (NumberParseException $e) {\n throw new NumberParseException($e, $e->getMessage());\n }\n }", "public function withAddedRecipient($email, $name = null);", "public function createRecordByProviderId($name='', $account='', $providerType='', $providerId='', $attributes=array()) {\n\n if(!isset($attributes[\"email\"])) {\n $attributes[\"email\"] = null;\n }\n\n $rowCount = $this->create(array(\n \"domain_name\" => self::DOMAIN_NAME,\n \"group_id\" => self::GROUP_ID,\n \"name\" => $name,\n \"account\" => $account,\n \"email\" => $attributes[\"email\"],\n \"hash\" => \"------\",\n \"salt\" => \"------\",\n \"oauth_type\" => $providerType,\n \"oauth_id\" => $providerId,\n \"create_datetime\" => date(\"Y-m-d H:i:s\")\n ));\n\n if($rowCount == 1) {\n return $this->lastCreated()->getId();\n }\n else {\n throw new DbOperationException(\"Create new consumer user fail.\");\n }\n }", "public function createContact($id = null);", "public function create($data = array())\n {\n $matches = array();\n preg_match('/([^@]+)$/', $data['email'], $matches);\n $data['domain'] = $matches[1];\n $table = $this->getTable(); \n $this->_subscriberId = $table->insert($data); \n return $this->_subscriberId;\n }", "public function add_participant($project_key, $first_name, $last_name, $email)\n {\n $project_id = projects::get_project_id($project_key);\n\n /*\n * Get number of existing participants\n */\n $this->database->select(\"project_participants\", null, \"`project` = '\".$project_id.\"'\");\n $participant_count = $this->database->row_count();\n\n /*\n * Insert new participant into database\n */\n $this->database->insert(\"project_participants\", array(\n 'id' => Uuid::uuid4()->toString(),\n 'project' => $project_id,\n 'order' => $participant_count + 1,\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $email,\n 'status' => participant_statuses::ADDED,\n 'created' => $GLOBALS['timestamp'],\n 'last_modified' => 0\n ));\n\n /*\n * Update project last modified timestamp\n */\n projects::update_last_modified($project_key);\n\n /*\n * Compute project status\n */\n projects::compute_project_status($project_key);\n\n $result = array(\n 'error' => false,\n 'msg' => \"participant_created\"\n );\n\n return $result;\n }", "function insert_entry($username,$email,$password_hash,$auth_identifier)\n\t{\n\t\t$data = array(\n\t\t\t'username' => $username,\n\t\t\t'email' => $email,\n\t\t\t'password_hash' => $password_hash,\n\t\t\t'activation_id' => $auth_identifier\n\t\t\t);\n\t\t$this->db->insert('pending_users',$data);\n\t}", "public function create() \n\t{\n\t\n\t\t$this->form_validation->set_rules('firstname', 'First name', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('lastname', 'Last name', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('email', 'Email address', 'trim|required|valid_email|xss_clean');\n\t\t$this->form_validation->set_rules('password', 'Password', 'trim|required|xss_clean|min_length[8]|max_length[20]');\n\t\t$this->form_validation->set_rules('group', 'Role', 'trim|required|xss_clean');\n\t\t\n\t\t\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\n\t\t\t$this->session->set_flashdata('error_message', $this->lang->line('users_create_error1').validation_errors());\n\t\t\t\n\t\t\tredirect(\"/users/\", \"refresh\");\n\t\t\n\t\t} else {\n\t\t\n\t\t\t$userID = $this->usermodel->newUser($_POST);\n\t\t\t\n\t\t\t$this->session->set_flashdata('success_message', $this->lang->line('users_create_success'));\n\t\t\t\n\t\t\t\n\t\t\t//send email\n\t\t\t$this->load->library('email');\n\t\t\t\n\t\t\t$this->email->from($this->config->item('support_email'), $this->config->item('support_name'));\n\t\t\t$this->email->to($_POST['email']); \n\t\t\t\n\t\t\t$this->email->subject('Your new Databased account');\n\t\t\t$this->email->message( $this->load->view('auth/email/new', array('email'=>$_POST['email'], 'password'=>$_POST['password']), true ) );\t\n\t\t\t\n\t\t\t$this->email->send();\n\t\t\t\n\t\t\t//echo $this->email->print_debugger();\n\t\t\t\n\t\t\tredirect(\"/users/\".$userID, \"refresh\");\n\t\t\n\t\t}\n\t\n\t}", "public function createAction()\r\n {\r\n $user = new User($_POST);\r\n\r\n if ($user->save()) {\r\n\t\t\t\r\n\t\t\tsession_regenerate_id(true);\r\n\r\n\t\t\t$_SESSION['user_id'] = User::getIdSavedUser($_POST['email']);\r\n\t\t\t\r\n\t\t\tIncome::saveDefaultIncomes($_SESSION['user_id']);\r\n\t\t\tExpense::saveDefaultExpenses($_SESSION['user_id']);\r\n\t\t\tPaymentMethod::saveDefaultPaymentMethods($_SESSION['user_id']);\r\n\t\t\t\r\n\t\t\t$user->sendActivationEmail();\r\n\r\n $this->redirect('/signup/success');\r\n\r\n } else {\r\n\r\n View::renderTemplate('Signup/new.html', [\r\n 'user' => $user\r\n ]);\r\n\r\n }\r\n }", "public function actionCreate()\n\t{\n\t\t$this->addToTitle(\"Create Account\");\n\t\t$model=new User('create');\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\t$temp_passwd = $_POST['User']['password'];\n\t\t\t$temp_usernm = $_POST['User']['email'];\n\t\t\tif($model->validate()&&$model->save())\n\t\t\t{\n\t\t\t\t//log create new uesr\n\t\t\t\tYii::log(\"new user sign up, email:$model->email\");\n\t\t\t\t\n\t\t\t\t$emailServe = new EmailSending();\n\t\t\t\t$emailServe->sendEmailConfirm($model);\n\t\t\t\t\n\t\t\t\t$model->moveToWaitConfirm();\n\t\t\t\t$this->redirect(array('email/waitConfirm'));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array('model'=>$model));\n\t}", "public function createNewCampaign(){\n\t\t$viewDataController = new ViewDataController();\n\t\t$data = $viewDataController->buildData();\n\n\t\t$cc = new CollegeCampaign;\n\t\t$cc->save();\n\n\t\tCache::put(env('ENVIRONMENT').'_'.$data['user_id'].'_newCampaignId', $cc->id, 600);\n\t}", "public function addRecipient($phoneNumber, int $amount) : Airtime\n {\n $this->recipients[] = ['recipient' => $phoneNumber, 'amount' => $amount];\n return $this;\n }", "public function __construct()\n {\n parent::__construct(\"You didn't specify a `recipient` numeric field.\");\n }", "public function store(Request $request)\n {\n $input = $request->validate([\n 'name' => ['required', 'string', 'max:64'],\n 'user_id' => ['required', 'numeric', 'exists:users,id'],\n 'responsible_name' => ['required', 'string', 'max:64'],\n 'service_type' => ['required', 'string', 'max:64'],\n 'phone_number' => ['required', 'string', 'max:16'],\n 'accepted_terms' => ['required', 'boolean', 'accepted'],\n ]);\n\n $partner = new Partner();\n $partner->name = $input['name'];\n $partner->user_id = $input['user_id'];\n $partner->responsible_name = $input['responsible_name'];\n $partner->service_type = $input['service_type'];\n $partner->phone_number = $input['phone_number'];\n $partner->accepted_terms = $input['accepted_terms'];\n $partner->save();\n\n $user = User::find($input['user_id']);\n\n Mail::to($user)->send(new CreatePartner());\n\n return back()->withErrors(['success' => __('partners.created')]);\n }", "public function withRecipient($email, $name = null);", "public function store(Request $request)\n {\n \n if($request->user_type == 'new_user')\n {\n //register receiceiver as a contact\n //if receiver phone is null make country null invalid\n $receiver_country = ($request->rphonenumber) ? $request->rcountry:\"\";\n $contact = new User([\n 'country' => $receiver_country,\n 'phonenumber' => $request->rphonenumber,\n 'fname' => strstr($request->recname, ' ', true),\n 'lname' => strstr($request->recname, ' '),\n 'email' => $request->email,\n 'created_by' => Auth::user()->id\n ]);\n \n $contact->save(); \n\n //register an account for logged in user\n //if acc type is mobile acc number is phone number\n $sender_account_number = ($request->saccount_type==\"mobile_money\")?$sender_account_number = $request->sphonenumber : $sender_account_number = $request->saccount_number;\n $sender_account = new accounts([\n\n 'account_name' => ($request->saccount_name)?$request->saccount_name:$request->name,\n 'account_number' => $sender_account_number,\n 'account_type' => $request->saccount_type,\n 'user_id' => Auth::user()->id\n ]);\n\n $sender_account->save();\n $sender_account_id = DB::table('accounts')->orderBy('id', 'desc')->first();\n\n\n //register an account for receiver \n //if acc type is mobile acc number is phone number\n $receiver_account_number = ($request->raccount_type==\"mobile_money\")?$receiver_account_number = $request->rphonenumber:$receiver_account_number = $request->raccount_number;\n $receiver_account = new accounts([\n\n 'account_name' => ($request->raccount_name)?$request->raccount_name:$request->rregusername,\n 'account_number' => $receiver_account_number,\n 'account_type' => $request->saccount_type,\n 'user_id' => $contact->id\n ]);\n $receiver_account->save();\n \n\n\n //register transaction\n $transaction = new transactions([ 'sender_account' => $sender_account->id,'reciever_account' => $receiver_account->id,'amount' => $request->amount,\n ]);\n $transaction->save();\n\n }\n \n \n \n\n\n\n\n//create an account for user\n\n\n//create a transaction\n\n $this->validate($request,['account_name' => 'required', 'account_number' => 'required', 'account_type' => 'required']);\n \n \n \n $account = new accounts([\n 'account_name' => $request->account_name,\n 'account_number' => $request->account_number,\n 'account_type' => $request->account_type,\n 'user_id' => Auth::user()->id\n ]);\n if($request->user_id)\n $account->user_id = $request->user_id; \n $account->save();\n return redirect()->route('account.index')->with('success','Account Added Successfully');\n }", "public function create()\n\t{\n\t\t$this->auth->restrict('Purchase_Order.Orders.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_purchase_order())\n\t\t\t{\n\t\t\t\t// Log the activity\n\t\t\t\tlog_activity($this->current_user->id, lang('purchase_order_act_create_record') .': '. $insert_id .' : '. $this->input->ip_address(), 'purchase_order');\n\n\t\t\t\tTemplate::set_message(lang('purchase_order_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/orders/purchase_order');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('purchase_order_create_failure') . $this->purchase_order_model->error, 'error');\n\t\t\t}\n\t\t}\n\t\tAssets::add_module_js('purchase_order', 'purchase_order.js');\n\n\t\tTemplate::set('toolbar_title', lang('purchase_order_create') . ' Purchase Order');\n\t\tTemplate::render();\n\t}", "public function sendBookingMailToNewUser(array\r\n\t$a_participants_ids) {\r\n\t\tforeach (array_unique($a_participants_ids) as $participant_id) {\r\n\t\t\t$this->composeAndSendBookingMailToParticipant($participant_id);\r\n\t\t}\r\n\t}", "public function create(string $email, array $attributes = []): string\n {\n $contact = $this->request(\n method: 'post',\n path: 'contacts',\n data: [\n 'contact' => [\n 'email' => $email,\n ] + $attributes,\n ],\n responseKey: 'contact'\n );\n\n return $contact['id'];\n }", "public function save()\n {\n\n // Doesn't exist yet -- Insert it\n if( $this->id == -1 )\n {\n $sql = 'INSERT INTO messages (recipient, sender, annotation)\n VALUES (?, ?, ?);';\n $params = array( $this->recipient, $this->sender, $this->annotation );\n $query = $this->db->query( $sql, $params );\n }\n\n // Already exists -- Update it\n else \n {\n $sql = 'UPDATE messages\n SET recipient = ?, sender = ?, annotation = ?\n WHERE id = ?';\n $params = array( $this->id, $this->recipient->id, $this->sender->id, $this->annotation->id );\n $query = $this->db->query( $sql, $params );\n }\n }", "function AddIDLookupToRecipient($recipient, $address1=null, $address2=null, $city=null, $state=null, $zip=null){\n\t$recipient->RequireIDLookup = true;\n\t$recipient->IDCheckConfigurationName = \"ID Check $\";\n\t// prefill address\n\tif($address1<> null) {\n\t\t$recipient->IDCheckInformationInput->AddressInformationInput->AddressInformation->Street1 = $address1;\n\t}\n\tif($address2<> null) {\n\t\t$recipient->IDCheckInformationInput->AddressInformationInput->AddressInformation->Street2 = $address2;\n\t}\n\tif($city<> null) {\n\t\t$recipient->IDCheckInformationInput->AddressInformationInput->AddressInformation->City = $city;\n\t}\n\tif($state<> null) {\n\t\t$recipient->IDCheckInformationInput->AddressInformationInput->AddressInformation->State = $state;\n\t}\n\tif($zip<> null) {\n\t\t$recipient->IDCheckInformationInput->AddressInformationInput->AddressInformation->Zip = $zip;\n\t}\n\t$recipient->IDCheckInformationInput->AddressInformationInput->DisplayLevel = \"Editable\";\n\t$recipient->IDCheckInformationInput->AddressInformationInput->ReceiveInResponse = true;\n\treturn $recipient;\n\n}", "protected function createDonorEntry()\n {\n $this->donor = new Donor;\n \n $this->donor->set('email', $this->data['email']);\n $this->donor->set('first_name', $this->data['first_name']);\n $this->donor->set('last_name', $this->data['last_name']);\n $this->donor->set('anonymity', $this->data['anonymity'] );\n $this->donor->set('hide_amount', $this->data['hide_amount'] );\n $this->donor->set('receipt_key', $this->receipt_key);\n \n $this->donor->create();\n }", "public function getRecipientId();", "public function getRecipientId();", "function addContact ($p) {\r\n\r\n\tglobal $authentication_type;\r\n\r\n\t// security check\r\n\tif (!checkContactsMod()) return CONTACTS_ADD_UPDATE_ERROR_INSUFF_RIGHTS;\r\n\r\n\t// prepare data\r\n\t$admin = (isset($p['admin']) && $p['admin'] == 'on') ? '1' : '0';\r\n\t$username = prepareDBValue(trim($p['new_user']));\r\n\t$full_name = prepareDBValue(trim($p['full_name']));\r\n\t$email = prepareDBValue($p['email']);\r\n\t$phone = prepareDBValue($p['phone']);\r\n\t$mobile = prepareDBValue($p['mobile']);\r\n\t$growladdress = prepareDBValue($p['growladdress']);\r\n\t$timeframe_id = prepareDBValue($p['timeframe']);\r\n\t$timezone_id = prepareDBValue($p['timezone']);\r\n\t$restrict_alerts = prepareDBValue((isset($p['restrict_alerts']) && $p['restrict_alerts'] == 'on') ? '1' : '0');\r\n $growl_registration = ((isset($p['growl_register']) && $p['growl_register'] == 'on') ? registerWithGrowl($growladdress) : null);\r\n\t$passwordMask = \"\";\r\n\r\n\t// check whether contact already exists\r\n\t$query = sprintf(\r\n\t\t'select id from contacts where username=\\'%s\\' and admin=\\'%s\\' and full_name=\\'%s\\' and email=\\'%s\\' and phone=\\'%s\\' and mobile=\\'%s\\' and growladdress=\\'%s\\' and timeframe_id=\\'%s\\' and timezone_id=\\'%s\\'',\r\n\t\t$username,\r\n\t\t$admin,\r\n\t\t$full_name,\r\n\t\t$email,\r\n\t\t$phone,\r\n\t\t$mobile,\r\n\t\t$growladdress,\r\n\t\t$timeframe_id,\r\n\t\t$timezone_id\r\n\t);\r\n\t$dbResult = queryDB($query);\r\n\tif (!empty($dbResult[0]['id'])) return CONTACTS_ADD_USER_EXISTS;\r\n\r\n\t// we need a Username otherwise things don't look pretty\r\n\tif (empty($full_name)) return CONTACTS_ADD_UPDATE_NAME_MISSING;\r\n\r\n\t// native authentication\r\n\t$password = null;\r\n\tif ($authentication_type == 'native') {\r\n\r\n\t\tif (!isset($_POST['password']) || !isset($_POST['password_verify'])) return CONTACTS_ADD_UPDATE_PASSWD_MISSING;\r\n\t\tif (empty($_POST['password']) || empty($_POST['password_verify'])) return CONTACTS_ADD_UPDATE_PASSWD_MISSING;\r\n\t\tif ($_POST['password'] != $_POST['password_verify']) return CONTACTS_ADD_UPDATE_ERROR_PASSWD_MISMATCH;\r\n\r\n\t\t$passwordMask = ',password';\r\n\r\n\t\t//$password = ',sha1(\\'' . prepareDBValue($_POST['password']) . '\\')';\r\n\t\t// Because of SQLite which doesnt have native crypto, this needs to be done via PHP.\r\n $password = sha1(prepareDBValue($_POST['password']));\r\n\t\t$password = ',\\''.prepareDBValue($password).'\\'';\r\n\r\n\t}\r\n\r\n\r\n\t// add contact\r\n\t$query = sprintf(\r\n\t\t'insert into contacts (username,admin,full_name,email,phone,mobile,growladdress,timeframe_id,timezone_id,restrict_alerts%s)\r\n\t\t\tvalues (\\'%s\\',\\'%s\\',\\'%s\\',\\'%s\\',\\'%s\\',\\'%s\\',\\'%s\\',\\'%s\\',\\'%s\\',\\'%s\\'%s)',\r\n\t\t$passwordMask,\r\n\t\t$username,\r\n\t\t$admin,\r\n\t\t$full_name,\r\n\t\t$email,\r\n\t\t$phone,\r\n\t\t$mobile,\r\n\t\t$growladdress,\r\n\t\t$timeframe_id,\r\n\t\t$timezone_id,\r\n\t\t$restrict_alerts,\r\n\t\t$password\r\n\t);\r\n\tqueryDB($query);\r\n\r\n\r\n\t// get contact's ID\r\n\t$query = sprintf(\r\n\t\t'select id from contacts where username=\\'%s\\' and admin=\\'%s\\' and full_name=\\'%s\\' and email=\\'%s\\' and phone=\\'%s\\' and mobile=\\'%s\\' and growladdress=\\'%s\\' and timeframe_id=\\'%s\\' and timezone_id=\\'%s\\'',\r\n\t\t$username,\r\n\t\t$admin,\r\n\t\t$full_name,\r\n\t\t$email,\r\n\t\t$phone,\r\n\t\t$mobile,\r\n\t\t$growladdress,\r\n\t\t$timeframe_id,\r\n\t\t$timezone_id\r\n\t);\r\n\t$dbResult = queryDB($query);\r\n\tif (empty($dbResult[0]['id'])) return CONTACTS_ADD_ADDED_BUT_NOT_IN_DB;\r\n\r\n\t// add holidays\r\n\tif (!empty($p['holiday_name']) && !empty($p['holiday_start']) && !empty($p['holiday_end'])) {\r\n\t\taddCHolidays($dbResult[0]['id'], $p['holiday_name'], $p['holiday_start'], $p['holiday_end']);\r\n\t}\r\n\r\n\r\n\treturn CONTACTS_ADDED;\r\n\r\n}", "public function save_address(CreateAddressRequest $request)\n {\n $address = Auth::guard('customer')->user()->addresses()->create($request->all());\n\n return redirect()->to(url()->previous().'?address='.$address->id.'#address-tab')->with('success', trans('theme.notify.address_created'));\n }", "public function create(\n string $name, \n string $email, \n string $phone, \n string $id_card\n ) : Model;", "public function add_recipient(EmailAddress $address) {\n if (is_null($this->recipient)) {\n $this->recipient = $address->as_string();\n return TRUE;\n }\n return $this->add_cc($address);\n }", "public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'from' => $model->to_user_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function AddRecipient($listId, $recipientId)\n\t\t{\n\t\t\t$action = \"/lists/\" . $listId . \"/recipients/add/\" . $recipientId;\n\t\t\t$this->restClient->call($action);\n\n\t\t\treturn $this->restClient->GetStatusCode() === 200;\n\t\t}", "public function create($row)\n\t{\n\t\t$this->db->insert('tournaments', $row);\n\t\treturn $this->db->insert_id();\n\t}", "public function create ($givenNumber, array $data)\n {\n $data['InvoiceNumber'] = $givenNumber;\n\n $req = new FortieRequest();\n $req->method('POST');\n $req->path($this->basePath);\n $req->wrapper('SupplierInvoice');\n $req->data($data);\n $req->setRequired($this->required_create);\n\n return $this->send($req->build());\n }", "public function recipient($address, $dsn = '')\n {\n }", "static private function createNewUserFromPost() {\r\n\t\t$errors = array();\r\n\r\n\t\t$activationHash = (System::isAtLocalhost()) ? '' : self::getRandomHash();\r\n\t\t$newAccountId = DB::getInstance()->insert('account',\r\n\t\t\t\tarray('username', 'name', 'mail', 'password', 'registerdate', 'activation_hash'),\r\n\t\t\t\tarray($_POST['new_username'], $_POST['name'], $_POST['email'], self::passwordToHash($_POST['password']), time(), $activationHash));\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = true;\r\n\t\tself::$NEW_REGISTERED_ID = $newAccountId;\r\n\r\n\t\tif ($newAccountId === false)\r\n\t\t\t$errors[] = __('There went something wrong. Please contact the administrator.');\r\n\t\telse {\r\n\t\t\tself::importEmptyValuesFor($newAccountId);\r\n\t\t\tself::setSpecialConfigValuesFor($newAccountId);\r\n\r\n\t\t\tif ($activationHash != '')\r\n\t\t\t\tself::setAndSendActivationKeyFor($newAccountId, $errors);\r\n\t\t}\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = false;\r\n\t\tself::$NEW_REGISTERED_ID = -1;\r\n\r\n\t\treturn $errors;\r\n\t}", "public function createNew($UserID,$Type,$Application,$AdminName){\n try {\n $this->validateAccountParams($UserID, $Type, $Application);\n $this->accountGateway->create($UserID, $Type, $Application, $AdminName);\n } catch (ValidationException $exc) {\n throw $exc;\n } catch (PDOException $e){\n throw $e;\n }\n }", "function addRecipient($recipient)\n\t{\n\t\t// If the recipient is an aray, add each recipient... otherwise just add the one\n\t\tif (is_array($recipient))\n\t\t{\n\t\t\tforeach ($recipient as $to) {\n\t\t\t\t$to = JMailHelper::cleanLine( $to );\n\t\t\t\t$this->AddAddress($to);\n\t\t\t}\n\t\t} else {\n\t\t\t$recipient = JMailHelper::cleanLine( $recipient );\n\t\t\t$this->AddAddress($recipient);\n\t\t}\n\t}", "public function create($receive, $sent)\n {\n $request = \\Request::all();\n $message = new Message([\n 'message' => $request['message'],\n 'receive_id' => $receive\n ]);\n $message->sent_id = $sent;\n $message->save();\n\n return \\Redirect::back();\n }", "function roomify_conversations_add_booking_telephone() {\n field_info_cache_clear();\n\n if (field_read_field('booking_telephone') === FALSE) {\n $field = array(\n 'field_name' => 'booking_telephone',\n 'type' => 'text',\n 'cardinality' => 1,\n 'locked' => 1,\n 'settings' => array(\n 'max_length' => 255,\n 'profile2_private' => FALSE,\n ),\n );\n field_create_field($field);\n }\n\n field_cache_clear();\n\n if (field_read_instance('bat_booking', 'booking_telephone', 'conversation_booking') === FALSE) {\n $instance = array(\n 'field_name' => 'booking_telephone',\n 'entity_type' => 'bat_booking',\n 'label' => 'Telephone',\n 'bundle' => 'conversation_booking',\n 'required' => FALSE,\n 'widget' => array(\n 'type' => 'text_textfield',\n 'weight' => 6,\n ),\n );\n field_create_instance($instance);\n }\n}", "public function addRecipient ($value) {\n\t\tif (is_string($value) && preg_match(\"/(.+)@([a-z0-9-]+).([a-z\\.]+)/i\", $value)) {\n\t\t\t$this->recipients[] = $value;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function setToEmailAddress($toEmailAddress, $recipientName);", "static function account($unique_account_id, $params = array())\n {\n\n if (!$params || !is_array($params)) {\n $params = array();\n }\n\n $message = array(\n 'unique_id' => $unique_account_id,\n 'created_at' => self::get_time(),\n 'params' => $params,\n );\n\n self::store_or_send('account', 'POST', $message);\n }", "public function transfert()\n {\n\n $account = \\Stripe\\Account::create([\n 'country' => 'US',\n 'type' => 'custom',\n 'requested_capabilities' => ['card_payments', 'transfers'],\n ]);\n\n $transfer = Transfer::create([\n 'amount' => 7000,\n 'currency' => 'usd',\n 'destination' => $account->id,\n 'transfer_group' => '{ORDER10}',\n ]);\n }", "function create_account($account_name, $account_phone) {\r\n global $db;\r\n $query = 'INSERT INTO Accounts(Account_Name, Phone_Number)\r\n VALUES (:Account_Name, :Account_Phone)';\r\n //var_dump($query);\r\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n $statement = $db->prepare($query);\r\n var_dump($statement);\r\n $statement->bindParam(':Account_Name', $account_name);\r\n $statement->bindParam(':Account_Phone', $account_phone);\r\n $statement->execute();\r\n $last_id = $db->lastInsertId();\r\n echo \"New record created succesfully. Last inserted ID is: \" . $last_id .\"<br>\";\r\n $statement->closeCursor();\r\n echo \"New Entry Account ID: \" . $last_id;\r\n return $last_id;\r\n}", "public function addTo(string $to): void {\n\t\tself::checkValidEMail($to);\n\n\t\t$this->to[] = $to;\n\t}", "public function create() {\n $response = $this->sendRequest(\n 'GET', '/api/v1/persons/create'\n );\n\n return $this->validate($response);\n }", "function femail_user_add($form_state, $account){\n $form['femail_email'] = array(\n '#type' => 'textfield',\n '#title' => t('Email')\n );\n $form['femail_uid'] = array(\n '#type' => 'hidden',\n '#value' => $account->uid\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Add an additional Email')\n );\n return $form;\n}", "public static function insert()\n {\n if (isset($_POST['name'], \n $_POST['telephone'],\n $_POST['mobile'],\n $_POST['email'],\n $_POST['clientid'])) {\n ContactDAO::create($_POST['name'], \n $_POST['telephone'],\n $_POST['mobile'],\n $_POST['email'],\n $_POST['clientid']);\n }\n }" ]
[ "0.6574658", "0.6478802", "0.6265007", "0.62108505", "0.60338897", "0.60170346", "0.59105915", "0.5714287", "0.5633367", "0.56240195", "0.56070954", "0.55824727", "0.55783397", "0.5574275", "0.5563946", "0.55593073", "0.5557861", "0.5546203", "0.55281216", "0.548144", "0.54726833", "0.54450136", "0.5395295", "0.5388874", "0.53815293", "0.53661734", "0.5352281", "0.5348028", "0.53325355", "0.53299165", "0.5317279", "0.531698", "0.5292384", "0.5277091", "0.52740747", "0.52722436", "0.5246485", "0.5239382", "0.5226726", "0.5224853", "0.5206045", "0.5188141", "0.5180331", "0.5177482", "0.5162827", "0.5160952", "0.5159266", "0.5155655", "0.51544064", "0.51541394", "0.5151053", "0.5150102", "0.514978", "0.5147782", "0.5146274", "0.51451296", "0.5145093", "0.5143685", "0.51408434", "0.51373416", "0.5133046", "0.51318955", "0.5122096", "0.511933", "0.511818", "0.5117887", "0.5116198", "0.5110485", "0.51050603", "0.51019275", "0.50990856", "0.5094799", "0.50934184", "0.5086732", "0.508523", "0.5081017", "0.5081017", "0.5079854", "0.50653785", "0.50629777", "0.5056166", "0.50538945", "0.50502104", "0.50459635", "0.5044251", "0.5042298", "0.5039915", "0.50256187", "0.5024174", "0.50219375", "0.50169975", "0.5015533", "0.50134796", "0.50127006", "0.50041413", "0.49983177", "0.49902576", "0.49871168", "0.4986241", "0.498243" ]
0.5635415
8
Create multiple transfer recipients in batches. A duplicate account number will lead to the retrieval of the existing record.
public function bulk(array $batch): array { $params['batch'] = $batch; return $this->client->post("transferrecipient/bulk", $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSendEmailToMultipleRecipients()\n {\n $client = $this->getClient();\n\n // Create the email definition\n $provisioner = new EmailDefinitionProvisioner();\n $provisioner->setContainer($this->container);\n\n $definition = $provisioner->provision(EmailDefinitionProvider::getTestModel());\n $definition = $client->createEmailDefinition($definition);\n\n $messageRequestBody = new SendEmailToMultipleRecipientsRequest([\n \"definitionKey\" => $definition->getDefinitionKey(),\n \"recipients\" => [\n new Recipient([\"contactKey\" => \"johnDoe@gmail.com\"]),\n new Recipient([\"contactKey\" => \"johnDoe2@gmail.com\"]),\n ]\n ]);\n\n // SUT\n $result = $client->sendEmailToMultipleRecipients($messageRequestBody);\n\n try {\n Assert::assertNotNull($result->getRequestId());\n } catch (ExpectationFailedException $e) {\n throw $e;\n } finally {\n $client->deleteEmailDefinition($definition->getDefinitionKey());\n $provisioner->deplete($definition);\n }\n }", "public function testSendSmsToMultipleRecipients()\n {\n $client = $this->getClient();\n\n // Create the email definition\n $provisioner = new SmsDefinitionProvisioner();\n $provisioner->setContainer($this->container);\n\n $definition = $provisioner->provision(SmsDefinitionProvider::getTestModel());\n $definition = $client->createSmsDefinition($definition);\n\n $body = new SendSmsToMultipleRecipientsRequest([\n \"definitionKey\" => $definition->getDefinitionKey(),\n \"recipients\" => [\n new Recipient([\"contactKey\" => \"johnDoe@gmail.com\"]),\n new Recipient([\"contactKey\" => \"johnDoe2@gmail.com\"]),\n ]\n ]);\n\n // SUT\n $result = $client->sendSmsToMultipleRecipients($body);\n\n try {\n Assert::assertNotNull($result->getRequestId());\n } catch (ExpectationFailedException $e) {\n throw $e;\n } finally {\n $client->deleteSmsDefinition($definition->getDefinitionKey());\n $provisioner->deplete($definition);\n }\n }", "public function withRecipients(array $recipients);", "public function actionBatchCreate()\n\t{\n\t\t//batch inicio\n\t\t$models=array();\n\t\t$user=User::model()->getUserActualModel();\n\t\t$unidades=null;\n\t\t// batch fin\n\t\tfor ($i=1; $i <= 34 ; $i++) { \n\t\t\t$idunidad=$i;\n\t\t\tif(strlen((string)$i)==1){\n\t\t\t\t$idunidad='0'.$i;\n\t\t\t}\n\t\t\t$unidades=Contacto::model()->load2($user->nick,$idunidad);\n\t\t\tif(!empty($unidades))\n\t\t\t\tbreak;\n\t\t}\n\t\tif(empty($unidades)){\n\t\t\t$this->redirect(array('mensajefinal'));\n\t\t}\n\t\tforeach ($unidades as $key => $value) {\n\t\t\t$models[$key]=new Respuestas;\n\t\t\t$models[$key]->id_con=$value->id_con;\n\t\t\t$models[$key]->_contacto=Contacto::model()->load3($value->id_con);\n\t\t}\n\t\tif(isset($_POST['Respuestas']))\n\t\t{\n\n\t\t\tforeach($models as $key=>$value)\n\t\t\t{\n\t\t\t\t$value->attributes=$_POST['Respuestas'][$key];\n\t\t\t\t$value->save();\n\t\t\t}\n\t\t\t$this->redirect(array('router'));\n\n\t\t}\n\n\t\t$this->render('batchCreate',array(\n\t\t\t'models'=>$models,\n\t\t\t));\n\t}", "public function saveAll($recipientIds, $threadId) {\n if ($recipientIds === null) {\n throw new InvalidArgumentException(\n 'List of recipients is null.');\n }\n \n if (empty($threadId)\n || ($threadId < 0)) {\n throw new InvalidArgumentException(\n 'Invalid thread ID: ' . $threadId);\n }\n \n $dbc = new dbConnection();\n foreach ($recipientIds as $recipientId) {\n $sqc = new SqlBuilder();\n $query = $sqc->getInsertStatement('threadrecipients',\n array(\n 'thread_id',\n 'recipient_id'\n ), array(\n $threadId, \n $recipientId\n ));\n\n $dbc->execute_query(new sqlQuery($query), 0);\n }\n }", "public function testSendWithRequestSendMany()\n {\n $service = $this->getStubForTest(file_get_contents(__DIR__ . '/TestAsset/Response/send_many.txt'));\n\n $recipients = array(\n new Request\\Recipient('regl4jtwe8flmf23knfsd', 10000),\n new Request\\Recipient('23dskflsfuo2u4ourjsd', 20000),\n new Request\\Recipient('34tfskdlfcvkdjhvkjwehf', 30000),\n );\n\n $request = new Request\\SendMany();\n\n $request->setRecipients($recipients);\n\n /* @var $response Response\\Send */\n $response = $service->send($request);\n\n $this->assertEquals('Sent To Multiple Recipients', $response->getMessage());\n $this->assertEquals(\n 'f322d01ad784e5deeb25464a5781c3b20971c1863679ca506e702e3e33c18e9c',\n $response->getTxHash()\n );\n\n $this->assertEquals(\n $this->getLastRawRequestExpected(__DIR__ . '/TestAsset/Request/send_many.txt'),\n $this->getLastRawRequest($service),\n 'Requests does not match'\n );\n }", "public function send_many($addresses, $fee)\n {\n\t\t$addresses = json_encode($addresses);\n\t\t$fee ? $options = \"&fee=$fee\" : $options = \"\";\n\t\t$request = \"http://127.0.0.1:\".$this->port.\"/merchant/\".$this->guid.\"/sendmany?password=\".$this->password.\"&recipients=\".$addresses.$options;\n\t\treturn $this->cURL($request);\n }", "public function createBatch(array $attributes);", "function send() {\n\t\t$arrConsignmentsPerCourier = [];\n\t\tforeach($this->arrBatchData as $arrConsignment) {\n\t\t\t$objConsignment = new Consignment($arrConsignment);\n\t\t\t$strCourier = $objConsignment->getCourierName();\n\n\t\t\tif(!array_key_exists($strCourier, $arrConsignmentsPerCourier)) {\n\t\t\t\t$arrConsignmentsPerCourier[$strCourier] = [];\n\t\t\t}\n\n\t\t\t// add this consignment into the array for its Courier\n\t\t\t$arrConsignmentsPerCourier[$strCourier][] = $objConsignment;\n\t\t}\n\n\t\tforeach($arrConsignmentsPerCourier as $strIndex => $arrConsignments) {\n\n\t\t\t$strCourier = Helper::getCourierClassName($strIndex);\n\t\t\tforeach($arrConsignments as $objConsignment) {\n\t\t\t\t// Log the address being used for each courier\n\t\t\t\terror_log(\"Address for $strCourier: \" . $objConsignment->getAddress());\n\t\t\t}\n\n\t\t\t// send the IDs to each used Courier\n\t\t\t$strCourier::send();\n\t\t}\n\n\t\terror_log('complete');\n\t}", "public function sendMultiple(array $messages);", "public function run()\r\n {\r\n $senderId=DB::table('users')->value('userId');\r\n \r\n for ($i=0; $i <=10 ; $i++) { \r\n \tDB::table('transactions')->insert([\r\n \t\t'senderId'=>$senderId,\r\n \t\t'recipientId'=>$senderId,\r\n \t\t'amount'=>mt_rand(100000,999999)\r\n \t\t]);\r\n }\r\n }", "public function batchSend()\n\t{\n\t\treturn $this->mailer->batchSend($this->message);\n\t}", "public function batchSend(Swift_Mime_Message $message,\n &$failedRecipients = null,\n Swift_Mailer_RecipientIterator $it = null)\n {\n $failedRecipients = (array) $failedRecipients;\n \n $sent = 0;\n $to = $message->getTo();\n $cc = $message->getCc();\n $bcc = $message->getBcc();\n\n // save the original body, e.g. for personalization plugin\n $body = $message->getBody(); \n \n $userIds = array();\n if ($message instanceof ullsfMail)\n {\n $userIds = $message->getRecipientUllUserIds();\n \n $message->setRecipientUllUserIds(array());\n }\n \n if (!empty($cc))\n {\n $message->setCc(array());\n }\n if (!empty($bcc))\n {\n $message->setBcc(array());\n }\n \n //Use an iterator if set\n if (isset($it))\n {\n while ($it->hasNext())\n {\n $message->setTo($it->nextRecipient());\n \n //TODO: add UllUser support here\n \n $sent += $this->send($message, $failedRecipients);\n }\n }\n else\n {\n foreach ($to as $address => $name)\n {\n $message->setTo(array($address => $name));\n if (isset($userIds[$address]))\n {\n $message->setRecipientUllUserId($userIds[$address]);\n }\n $message->setBody($body);\n $sent += $this->send($message, $failedRecipients);\n }\n }\n \n //Reset\n \n $message->setTo($to);\n \n if (!empty($cc))\n {\n $message->setCc($cc);\n }\n if (!empty($bcc))\n {\n $message->setBcc($bcc);\n }\n \n if ($message instanceof ullsfMail)\n {\n $message->setRecipientUllUserIds($userIds);\n }\n \n $message->setBody($body); \n \n return $sent;\n }", "public function batchEmail($sender)\n\t{\n\t\t$total = 0;\n\t\t$success = 0;\n\t\t$mailer = Yii::app()->email;\n\n\t\tforeach($this->emailList as $record)\n\t\t{\n\t\t\tif (!empty($record->emailAddress) && $mailer->send(\n\t\t\t\t$record->emailAddress,\n\t\t\t\t$this->emailSubject, \n\t\t\t\t$this->emailContent, \n\t\t\t\t$sender,\n\t\t\t\t$this->attachments\n\t\t\t))\n\t\t\t\t$success++;\n\t\t\telse if (!empty($record->alternateEmail) && $mailer->send(\n\t\t\t\t$record->alternateEmail,\n\t\t\t\t$this->emailSubject, \n\t\t\t\t$this->emailContent, \n\t\t\t\t$sender,\n\t\t\t\t$this->attachments\n\t\t\t))\n\t\t\t\t$success++;\n\t\t\t$total++;\n\t\t}\n\t\treturn array (\n\t\t\t'count' => $success,\n\t\t\t'total' => $total\n\t\t);\n\t}", "public function sendBulk(array $notifications);", "public function run()\n {\n foreach (Partner::inRandomOrder()->get() as $partner) {\n for ($i = 0; $i < 10; $i++) {\n try {\n PartnerUser::create(['user_id' => md5(rand(0, 999999)), 'active' => rand(0, 1), 'partner_id' => $partner->id]);\n } catch (\\Exception $e) {\n // перехват Duplicate entry partner_users_user_id_unique\n }\n }\n }\n }", "public function transfert()\n {\n\n $account = \\Stripe\\Account::create([\n 'country' => 'US',\n 'type' => 'custom',\n 'requested_capabilities' => ['card_payments', 'transfers'],\n ]);\n\n $transfer = Transfer::create([\n 'amount' => 7000,\n 'currency' => 'usd',\n 'destination' => $account->id,\n 'transfer_group' => '{ORDER10}',\n ]);\n }", "public function bulkCreate()\n {\n if (empty($this->parameters['data'])) {\n return;\n }\n\n WCF::getDB()->beginTransaction();\n // prevent duplicate entries\n $condition = new PreparedStatementConditionBuilder();\n $condition->add('username IN(?)', [\\array_map(static function ($element) {\n return $element['username'];\n }, $this->parameters['data'])]);\n\n $sql = \"SELECT\t\" . \\call_user_func([$this->className, 'getDatabaseTableIndexName']) . \"\n FROM\t\" . \\call_user_func([$this->className, 'getDatabaseTableName']) . \"\n {$condition}\n FOR UPDATE\";\n $stmt = WCF::getDB()->prepareStatement($sql);\n $stmt->execute($condition->getParameters());\n $entryIDs = [];\n while ($entryID = $stmt->fetchColumn()) {\n $entryIDs[] = $entryID;\n }\n \\call_user_func([$this->className, 'deleteAll'], $entryIDs);\n\n foreach ($this->parameters['data'] as $entry) {\n \\call_user_func([$this->className, 'create'], $entry);\n }\n\n WCF::getDB()->commitTransaction();\n }", "public function deleteBulkCampaignRecipients(Request $request)\n {\n $appStage = app_config('AppStage');\n if ($appStage == 'Demo') {\n return redirect('user/sms/campaign-reports')->with([\n 'message' => language_data('This Option is Disable In Demo Mode'),\n 'message_important' => true\n ]);\n }\n\n if ($request->has('data_ids')) {\n $all_ids = explode(',', $request->get('data_ids'));\n $recipients = count($all_ids);\n if ($request->has('campaign_id')) {\n\n\n $campaign = Campaigns::where('user_id', Auth::guard('client')->user()->id)->find($request->campaign_id);\n\n if (!$campaign) {\n return response()->json([\n 'status' => 'error',\n 'message' => 'Campaign info not found'\n ]);\n }\n\n $msg_type = $campaign->sms_type;\n\n if (isset($all_ids) && is_array($all_ids) && count($all_ids) > 0) {\n\n $cost = 0;\n foreach ($all_ids as $id) {\n $recipient = CampaignSubscriptionList::find($id);\n if ($recipient->status == 'queued') {\n\n $phone = $recipient->number;\n $c_phone = PhoneNumber::get_code($phone);\n\n $sms_cost = IntCountryCodes::where('country_code', $c_phone)->where('active', '1')->first();\n if ($sms_cost) {\n $phoneUtil = PhoneNumberUtil::getInstance();\n $phoneNumberObject = $phoneUtil->parse('+' . $phone, null);\n $area_code_exist = $phoneUtil->getLengthOfGeographicalAreaCode($phoneNumberObject);\n\n if ($area_code_exist) {\n $format = $phoneUtil->format($phoneNumberObject, PhoneNumberFormat::INTERNATIONAL);\n $get_format_data = explode(\" \", $format);\n $operator_settings = explode('-', $get_format_data[1])[0];\n\n } else {\n $carrierMapper = PhoneNumberToCarrierMapper::getInstance();\n $operator_settings = $carrierMapper->getNameForNumber($phoneNumberObject, 'en');\n }\n\n $get_operator = Operator::where('operator_setting', $operator_settings)->where('coverage_id', $sms_cost->id)->first();\n if ($get_operator) {\n\n $sms_charge = $get_operator->plain_price;\n\n if ($msg_type == 'plain' || $msg_type == 'unicode' || $msg_type == 'arabic') {\n $sms_charge = $get_operator->plain_price;\n }\n\n if ($msg_type == 'voice') {\n $sms_charge = $get_operator->voice_price;\n }\n\n if ($msg_type == 'mms') {\n $sms_charge = $get_operator->mms_price;\n }\n\n\n } else {\n $sms_charge = $sms_cost->plain_tariff;\n\n if ($msg_type == 'plain' || $msg_type == 'unicode' || $msg_type == 'arabic') {\n $sms_charge = $sms_cost->plain_tariff;\n }\n\n if ($msg_type == 'voice') {\n $sms_charge = $sms_cost->voice_tariff;\n }\n\n if ($msg_type == 'mms') {\n $sms_charge = $sms_cost->mms_tariff;\n }\n }\n\n $cost += $sms_charge * $recipient->amount;\n }\n }\n\n $recipient->delete();\n\n }\n\n\n $client = Client::find(Auth::guard('client')->user()->id);\n $client->sms_limit += $cost;\n $client->save();\n\n $campaign->total_recipient -= $recipients;\n $campaign->save();\n\n return response()->json([\n 'status' => 'success',\n 'message' => language_data('Contact deleted successfully')\n ]);\n\n } else {\n return response()->json([\n 'status' => 'error',\n 'message' => language_data('Recipients required')\n ]);\n }\n } else {\n return response()->json([\n 'status' => 'error',\n 'message' => 'Campaign info not found'\n ]);\n }\n } else {\n return response()->json([\n 'status' => 'error',\n 'message' => language_data('Invalid request')\n ]);\n }\n }", "public function create($attributes = [])\n {\n $params = [];\n\n $params['transaction'] = 'fail';\n\n if ($creditcard === 'success') {\n $params['transaction'] = 'success';\n }\n\n return $this->gateway->commit('post', 'recipients', $params);\n }", "public function create(string $type, string $name, string $account_number, string $bank_code, string $currency, $params = []): array\n {\n $params['type'] = $type;\n $params['name'] = $name;\n $params['account_number'] = $account_number;\n $params['bank_code'] = $bank_code;\n $params['currency'] = $currency;\n return $this->client->post(\"transferrecipient\", $params);\n }", "public function lsvt_api_can_bulk_add_points_to_multiple_users_in_one_call()\n {\n //\n }", "public function sendBulkMail(Request $request){\n $subcriber=Subscriber::all();\n foreach ($subcriber as $value) {\n Mail::to($value)->send(new newslater($request->all()));\n\n }\n }", "public function sendBTCToMultipleDestinations($payment_address_id, $destinations, $account='default', $unconfirmed=false, $fee=null, $request_id=null, $fee_rate=null) {\n $body = [\n 'destinations' => $destinations,\n 'sweep' => false,\n 'unconfirmed' => $unconfirmed,\n 'account' => $account,\n ];\n if ($fee !== null) { $body['fee'] = $fee; }\n if ($request_id !== null) { $body['requestId'] = $request_id; }\n if ($fee_rate !== null) { $body['feeRate'] = $fee_rate; }\n\n $result = $this->newAPIRequest('POST', '/multisends/'.$payment_address_id, $body);\n return $result;\n }", "public function sendBatchEmail($peeps, $unsubtype, $SUBJECT, $TEXT, $context, \r\n // $FROM = array('webmail@cvuuf.org' => \"Conejo Valley UU Fellowship\"), $REPLYTO = null, $ATTACHMENT = null) \r\n $FROM = array('website@members.cvuuf.org' => \"Conejo Valley UU Fellowship\"), $REPLYTO = null, $ATTACHMENT = null) \r\n {\r\n // $FROM = array('website@members.cvuuf.org' => \"Conejo Valley UU Fellowship\");\r\n $FROM = array('cvuuf.org@cvuuf.net' => 'cvuuf.org@cvuuf.net');\r\n $efunctions = new Cvuuf_emailfunctions();\r\n $peoplemap = new Application_Model_PeopleMapper();\r\n $unsmap = new Application_Model_UnsubMapper();\r\n\r\n $results = array();\r\n $orwhere = array(\r\n array('`all`', ' = ', 1),\r\n array($unsubtype, ' = ', 1),\r\n );\r\n $unsubs = $unsmap->fetchOrWhere($orwhere);\r\n $unsubids = array();\r\n foreach ($unsubs as $unsub)\r\n {\r\n $person = $peoplemap->find($unsub->id);\r\n if ($person['email'] <> '')\r\n $unsubids[$person['email']] = 1;\r\n }\r\n\r\n $emailCount = count($peeps); \r\n $results[] = \"$emailCount copies to be sent.\";\r\n \t\t$count = 0;\r\n \t\t$fullcount = 0;\r\n\r\n $totalsent = 0;\r\n $invalid = array();\r\n $unsub = array();\r\n if ($emailCount >= 30) {\r\n return array('results' => $results.\" (rejected to avoid spam blacklists, 30-email max. Contact jakeholland.net@gmail.com to work out how to send this)\", 'log' => 'rejected to avoid spam blacklists', 'totalsent' => $totalsent, \r\n 'invalid' => $invalid, 'unsub' => $unsub);\r\n }\r\n unset($TO_array);\r\n \t\tforeach ($peeps as $peep) \r\n {\r\n \t $emailAddress = $peep->email;\r\n \t if (!$efunctions->isValidEmail($emailAddress))\r\n { \r\n $invalid[] = $emailAddress;\r\n }\r\n elseif (isset($unsubids[$emailAddress]))\r\n {\r\n $unsub[] = $emailAddress;\r\n } \r\n else \r\n {\r\n $fullcount++;\r\n $TO_array[$count++] = $emailAddress;\r\n \t\t\tif (($count%20) == 0) \r\n {\r\n $numsent = $efunctions->sendEmail($SUBJECT, $TO_array, $TEXT, $context, $FROM, $REPLYTO, $ATTACHMENT);\r\n $totalsent += $numsent;\r\n unset($TO_array);\r\n $count = 0;\r\n sleep(1);\r\n \t\t }\r\n // Check section limit and delay if reached\r\n if (($fullcount % 10) == 0)\r\n {\r\n $results[] = \"Progress count $fullcount sent\"; \r\n sleep(5);\r\n }\r\n \t}\r\n } \r\n // send last email segment\r\n $numsent = $efunctions->sendEmail($SUBJECT, $TO_array, $TEXT, $context, $FROM, $REPLYTO, $ATTACHMENT);\r\n $totalsent += $numsent;\r\n $results[] = sprintf(\"Ending fraction count %d copies\\n\", $numsent);\r\n $log = $efunctions->log_email($context, $emailCount, $totalsent, count($invalid), count($unsub));\r\n $results[] = \"Last Segment sent\";\r\n\r\n return array('results' => $results, 'log' => $log, 'totalsent' => $totalsent, \r\n 'invalid' => $invalid, 'unsub' => $unsub);\r\n }", "public function record_batch($amount): array\n {\n $created_consignments = [];\n $consignments = new Consignment();\n\n for ($i = 0; $i < $amount; $i++) {\n $created_consignments[] .= $consignments->add_consignment($amount);\n }\n\n return $created_consignments;\n }", "function get_recipients($address_list, $num_recipients = 1)\n{\n\t$recipient = array();\n\n\t$count = 0;\n\tforeach ($address_list as $field => $adr_ary)\n\t{\n\t\tforeach ($adr_ary as $id => $type)\n\t\t{\n\t\t\tif ($count >= $num_recipients)\n\t\t\t{\n\t\t\t\tbreak 2;\n\t\t\t}\n\t\t\t$recipient[$field][$id] = $type;\n\t\t\t$count++;\n\t\t}\n\t}\n\n\treturn $recipient;\n}", "function addToBatch($item, $values) {\n $item['rowValues'] = $values;\n $item['allowUpdate'] = $this->_allowEntityUpdate;\n $item['ignoreCase'] = $this->_ignoreCase;\n $this->_importQueueBatch[] = $item;\n }", "public function run()\n {\n $faker = Factory::create();\n foreach (range(1, 50) as $item) {\n Subscribers::create([\n 'email' => $faker->email\n ]);\n }\n }", "private function transfer_400_users() {\r\n\r\n\r\n\t\t// Grab all user accounts and insert them into new db\r\n\t\t$res = mysql_query('SELECT * FROM `users` WHERE 1', $this->sql);\r\n\t\twhile ($row = mysql_fetch_array($res)) {\r\n\t\t\t$row = $this->toText($row);\r\n\t\t\tif (!array_search($row['email'], $this->users)) {\r\n\t\t\t\t$data = array(\r\n\t\t\t\t\t'User' => array(\r\n\t\t\t\t\t\t'email' => $row['email'],\r\n\t\t\t\t\t\t'old_salt' => BcryptFormAuthenticate::generateSalt(),\r\n\t\t\t\t\t\t'group_id' => 5, // 5 - User\r\n\t\t\t\t\t\t'created' => $row['register_date'],\r\n\t\t\t\t\t\t'is_active' => $row['status'] == 'active' ? true : false,\r\n\t\t\t\t\t\t'last_login' => $row['last_login'],\r\n\t\t\t\t\t\t'force_reset' => false\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$data['User']['old_hash'] = $this->generateNewHash($row['password'], $data['User']['old_salt']);\r\n\r\n\t\t\t\t$this->User->create();\r\n\t\t\t\t$this->User->save($data);\r\n\r\n\t\t\t\t$data = array(\r\n\t\t\t\t\t'Profile' => array(\r\n\t\t\t\t\t\t'id' => $this->User->getInsertID(),\r\n\t\t\t\t\t\t'first_name' => $row['first_name'],\r\n\t\t\t\t\t\t'last_name' => $row['last_name'],\r\n\t\t\t\t\t\t'phone' => $row['phone'],\r\n\t\t\t\t\t\t'language' => 'eng',\r\n\t\t\t\t\t\t'timezone' => 'America/Montreal'\r\n\r\n\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$this->User->Profile->create();\r\n\t\t\t\t$this->User->Profile->save($data, false);\r\n\t\t\t\t$this->users[] = $row['email'];\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function addBatchToQueue() {\n if(count($this->_importQueueBatch) == 0) {\n return;\n }\n $queueParams = array(\n 'entity' => $this->_entity,\n 'params' => $this->_importQueueBatch,\n 'errorFileName' => $this->_errorFileName,\n );\n $task = new CRM_Queue_Task(\n array('CRM_Csvimport_Task_Import', 'ImportEntity'),\n $queueParams,\n ts('Importing entity') . ': ' . $this->_lineCount\n );\n $this->_importQueue->createItem($task);\n $this->_importQueueBatch = array();\n }", "public function createbulkorderAction() {\n\t\t$session = new Zend_Session_Namespace ( 'Default' );\n\t\n\t\t$mex = \"\";\n\t\t$items ['authcode'] = $this->getRequest ()->getParam ( 'authcode' );\n\t\t$items ['domains'] = $this->getRequest ()->getParam ( 'item' );\n\t\t$items ['billing_id'] = $this->getRequest ()->getParam ( 'billing_id' );\n\t\n\t\tif (is_array ( $items )) {\n\t\t\ttry {\n\t\n\t\t\t\tif (empty ( $session->cart ) ) {\n\t\t\t\t\t$session->cart = new Cart();\n\t\t\t\t\t$session->cart->setCustomer($this->customer ['customer_id']);\n\t\t\t\t}\n\t\n\t\t\t\tfor($i = 0; $i < count ( $items ['domains'] ); $i ++) {\n\t\t\t\t\t$data = DomainsBulk::find ( $items ['domains'] [$i] );\n\t\t\t\t\t$action = $data['isavailable'] ? \"registerDomain\" : \"transferDomain\";\n\t\t\t\t\t$params = array('domain' => $data['domain'], 'tld' => $data['tld_id'], 'action' => $action, 'authcode' => $items['authcode'][$i]);\n\t\t\t\t\t\t\n\t\t\t\t\t$session->cart->addDomain($data['domain'], $data['tld_id'], $action);\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\n\t\t\t\t$this->_helper->redirector ( 'summary', 'cart', 'default', array ('mex' => 'The domains have been added in the cart' ) );\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t$this->_helper->redirector ( 'list', 'domains', 'default', array ('mex' => 'A problem has been occurred during the creation of the order.', 'status' => 'danger' ) );\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function run()\n {\n for ($i=0; $i < 200; $i++) {\n\t \tCustomer::create([\n\t 'name' => Str::random(8),\n\t 'email' => Str::random(12).'@mail.com',\n\n\t ]);\n \t}\n }", "public function addRecipients($recipients)\n {\n // modify post, adding base_uri as 'message' key\n $format = [];\n\n $recipients = is_array($recipients) ? $recipients : [$recipients];\n\n // format recipients for the API POST, waiting for an associative array\n // with to/message keys\n foreach ($recipients as $mail)\n {\n $format[] = [\n 'to' => $mail,\n 'message' => $this->url\n ];\n }\n\n return $this->_resource->client->recipients->post($format);\n }", "public function handle()\r\n {\r\n foreach (AccountModel::all() as $account) {\r\n $client = $this->getClient($account);\r\n $service = new Google_Service_Gmail($client);\r\n $user = 'me';\r\n $i = 0;\r\n $nextPageToken = null;\r\n do {\r\n $i += 1;\r\n $messages = $service->users_messages->listUsersMessages($user,\r\n [\r\n 'labelIds' => ['INBOX', 'UNREAD'],\r\n 'pageToken' => $nextPageToken\r\n ]\r\n );\r\n $nextPageToken = $messages->nextPageToken;\r\n //save list\r\n $messageList = new ListModel;\r\n $messageList->account_id = $account->id;\r\n $messageList->next_page_token = $messages->nextPageToken;\r\n $messageList->result_size_estimate = $messages->resultSizeEstimate;\r\n $messageList->count = count($messages);\r\n $messageList->save();\r\n\r\n foreach ($messages as $message) {\r\n $messageNew = MessageModel::firstOrNew(['message_id' => $message->id]);\r\n if ($messageNew->id == null) {\r\n $messageContent = $service->users_messages->get($user, $message->id);\r\n $messagePayload = $messageContent->getPayload();\r\n $messageHeader = $this->parseMessageHeader($messagePayload->getHeaders());\r\n\r\n $messageLabels = $messageContent->getLabelIds();\r\n $messageNew->account_id = $account->id;\r\n $messageNew->list_id = $messageList->id;\r\n $messageNew->message_id = $messageContent->getId();\r\n $messageNew->labels = serialize($messageLabels);\r\n $messageNew->label = $messageLabels[0];\r\n if (isset($messageHeader['From'])) {\r\n $messageFrom = explode(' <', $messageHeader['From']);\r\n if (count($messageFrom) > 1) {\r\n $messageNew->from = $this->clearEmail(str_replace('>', '', $messageFrom[1]));\r\n $messageNew->from_name = str_replace('\"', '', $messageFrom[0]);\r\n } else {\r\n $messageNew->from = $this->clearEmail($messageHeader['From']);\r\n }\r\n }\r\n if (isset($messageHeader['To'])) {\r\n $messageTo = explode(' <', $messageHeader['To']);\r\n if (count($messageTo) > 1) {\r\n $messageNew->to = $this->clearEmail(str_replace('>', '', $messageTo[1]));\r\n } else {\r\n $messageNew->to = $this->clearEmail($messageHeader['To']);\r\n }\r\n }\r\n $messageNew->date = isset($messageHeader['Date']) ? $messageHeader['Date'] : '';\r\n $messageNew->subject = isset($messageHeader['Subject']) ? $messageHeader['Subject'] : '';\r\n /*\r\n //判断subject 是否有值\r\n if($messageHeader['Subject']){\r\n //截取两个规定字符之间的字符串\r\n preg_match_all(\"|Message from(.*)via|U\", $messageHeader['Subject'], $out,PREG_PATTERN_ORDER);\r\n }\r\n $messageNew->title_email = isset($out[0][0]) ? $out[0][0] : '';\r\n */\r\n $messageNew->save();\r\n $this->saveMessagePayload($service, $message->id, $messageNew->id, $messagePayload);\r\n $k=MessageModel::find($messageNew->id);\r\n //找到最近的历史邮件\r\n //找到这个历史邮件的assigne\r\n //判断如果是 pre-sale@choies.com 这种类型的邮箱不自动分配\r\n if($k->from !=\"pre-sale@choies.com\" and $k->from !=\"livechat@comm100chat.com\"){\r\n $userId = $k->last->assign_id;\r\n //因为id为14的这名客服已经离职所以判断历史邮件的时候总会报错\r\n //解决方案改成 把这封邮件手动分配给别人\r\n if($userId==14 || $userId==17){\r\n $userId=10;\r\n }\r\n if($userId){\r\n $data1['assign_id']=$k->assign_id=$userId;\r\n $data1['status']=$k->status=\"PROCESS\";\r\n $data1['content']=strip_tags($k->message_content);\r\n $k->update($data1);\r\n }\r\n }else{\r\n $data1['content']=strip_tags($k->message_content);\r\n $k->update($data1);\r\n }\r\n\r\n\r\n //找到关联订单\r\n //找到from的邮箱,再用这个邮箱去搜索订单列表对应EMAIL的订单\r\n //找到邮件内容,匹配 *********1340 ,用这个订单号去搜索订单列表\r\n /*\r\n if($k->from==\"pre-sale@choies.com\"){\r\n $body=$k->message_content;\r\n preg_match_all('/ordernum:(.*?)<br>/',$body,$match);\r\n if(count($match[1])){\r\n $orderNums[]=$match[1][0];\r\n $k->setRelatedOrders($orderNums);\r\n }\r\n }\r\n */\r\n\r\n\r\n\r\n /*\r\n $orderNums = $messageNew->guessRelatedOrders($messageNew->from);\r\n if($orderNums){\r\n $messageNew->setRelatedOrders($orderNums);\r\n }else{\r\n //把orderNums转化为只有orderNum的数组\r\n if($messageNew->to==\"pre-sale@choies.com\"){\r\n $body=$messageNew->message_content;\r\n preg_match_all('/ordernum:(.*?)<br>/',$body,$match);\r\n if(count($match[1])){\r\n $orderNums[]=$match[1][0];\r\n }\r\n }\r\n if(count($orderNums)){\r\n $messageNew->setRelatedOrders($orderNums);\r\n }\r\n }\r\n */\r\n $this->info('Message #' . $messageNew->message_id . ' Received.');\r\n }\r\n }\r\n } while ($nextPageToken != '');\r\n }\r\n }", "public function addRecipients($userIdList)\n {\n return $this\n ->service\n ->addRecipientsTo(\n $this->getId(),\n $userIdList\n )\n ;\n }", "public function bulk(array $data)\n {\n $transfer = Http::withToken($this->secretKey)->post(\n $this->baseUrl . '/bulk-transfers',\n $data\n )->json();\n\n return $transfer;\n }", "public function sendBookingMailToNewUser(array\r\n\t$a_participants_ids) {\r\n\t\tforeach (array_unique($a_participants_ids) as $participant_id) {\r\n\t\t\t$this->composeAndSendBookingMailToParticipant($participant_id);\r\n\t\t}\r\n\t}", "public function storeBatch(AdminNewVoucherRequest $request): RedirectResponse\n {\n // Setup some variables\n $input = $request->all();\n $sponsor = Sponsor::findOrFail($input['sponsor_id']);\n $now_time = Carbon::now();\n $maxStep = 1000;\n // We're going to ignore what they typed and use the calculated serials.\n $start = $input['start-serial'];\n $end = $input['end-serial'];\n\n // Calculate the number of codes we need\n $numCodes = $end - $start;\n\n $step = 1;\n if ($numCodes > 1) {\n // Calculate the step, max = $maxStep.\n $step = ($numCodes < $maxStep)\n ? $numCodes\n : $maxStep;\n }\n\n // Setup the chunks\n $chunks = range(\n $start,\n $end,\n $step\n );\n\n // Add the range to the end.\n if (!in_array($end, $chunks)) {\n $chunks[] = $end;\n }\n\n // For each chunk, create the integers in that set.\n foreach ($chunks as $k => $chunkStart) {\n // Reset New Vouchers\n $new_vouchers = [];\n\n $chunkEnd = (isset($chunks[$k + 1]))\n ? $chunks[$k + 1] - 1\n : $end;\n $currentChunk = range($chunkStart, $chunkEnd);\n\n foreach ($currentChunk as $c) {\n $v = new Voucher();\n $v->code = $sponsor->shortcode .\n // String pad to *5* places, eg 00001 to 09999 to 10000 to 10001\n str_pad(\n $c,\n 5,\n \"0\",\n STR_PAD_LEFT\n );\n $v->sponsor_id = $sponsor->id;\n $v->currentstate = 'printed';\n $v->created_at = $now_time;\n $v->updated_at = $now_time;\n $new_vouchers[] = $v->attributesToArray();\n unset($v);\n }\n // Batch insert raw vouchers.\n // Todo : there's NO \"this voucher already exists\" checking!!\n Voucher::insert($new_vouchers);\n }\n\n $notification_msg = trans('service.messages.vouchers_create.success', [\n 'shortcode' => $sponsor->shortcode,\n 'start' => $request['start'],\n 'end' => $request['end'],\n ]);\n\n return redirect()\n ->route('admin.vouchers.index')\n ->with('notification', $notification_msg);\n }", "public function handle()\r\n {\r\n foreach (AccountModel::all() as $account) {\r\n $client = $this->getClient($account);\r\n $service = new Google_Service_Gmail($client);\r\n $user = 'me';\r\n foreach ($account->replies()->where('message_replies.status', 'NEW')->get() as $reply)\r\n {\r\n $this->info($reply->id);\r\n $from = $account->name;\r\n $fromEmail = $account->account;\r\n $to = $reply->to ? $reply->to : $reply->message->from_name;\r\n $toEmail = $reply->to_email ? $reply->to_email : $reply->message->from;\r\n $subject = $reply->title;\r\n $content = nl2br($reply->content).\"<br/>\".$reply->updatefile;\r\n\r\n $message = new Google_Service_Gmail_Message();\r\n $message->setRaw($this->message($from, $fromEmail, $to, $toEmail, $subject, $content));\r\n $result = $service->users_messages->send($user, $message);\r\n $reply->status = $result->id ? 'SENT' : 'FAIL';\r\n $reply->save();\r\n $this->info($result->id . '<' . $account->account . '>' . $reply->title . ' Sent.');\r\n }\r\n\r\n //转发邮件\r\n /*\r\n $message = ForemailModel::find(1);\r\n $from = 'choies-service';\r\n $fromEmail = 'service@choies.com';\r\n $to = $message->to;\r\n $toEmail = $message->to_email;\r\n $subject = $message->title;\r\n $content = nl2br($message->content);\r\n $obj = new Google_Service_Gmail_Message();\r\n $obj->setRaw($this->message($from, $fromEmail, $to, $toEmail, $subject, $content)); \r\n $result = $service->users_messages->send($user, $obj);\r\n $this->info($result->id);\r\n exit;\r\n */\r\n\r\n $Foremails = ForemailModel::all();\r\n foreach ($Foremails as $k => $foremail) {\r\n if($foremail->status=='NEW'){\r\n $from ='choies-service';\r\n $fromEmail = 'service@choies.com';\r\n $to = $foremail->to;\r\n $toEmail = $foremail->to_email;\r\n $subject = '客户邮箱->'.$foremail->to_useremail;\r\n $content = nl2br($foremail->content);\r\n $obj = new Google_Service_Gmail_Message();\r\n $obj->setRaw($this->message($from, $fromEmail, $to, $toEmail, $subject, $content)); \r\n $result = $service->users_messages->send($user, $obj);\r\n $foremail->status = $result->id ? 'SENT' : 'FAIL';\r\n $foremail->save();\r\n $this->info($foremail->id);\r\n }\r\n }\r\n\r\n $Sendemails = SendemailModel::all();\r\n foreach ($Sendemails as $k => $sendemail) {\r\n if($sendemail->status=='NEW'){\r\n $from ='choies-service';\r\n $fromEmail = 'service@choies.com';\r\n $to = $foremail->to;\r\n $toEmail = $sendemail->to_email;\r\n $subject =$sendemail->title;\r\n $content = nl2br($sendemail->content);\r\n $obj = new Google_Service_Gmail_Message();\r\n $obj->setRaw($this->message($from, $fromEmail, $to, $toEmail, $subject, $content));\r\n $result = $service->users_messages->send($user, $obj);\r\n $sendemail->status = $result->id ? 'SENT' : 'FAIL';\r\n $sendemail->save();\r\n $this->info($sendemail->id);\r\n }\r\n }\r\n\r\n }\r\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n\n\n for ($i=0; $i < 200; $i++) {\n $this->generateUser_and_5Receivers($faker); \n }\n\n for ($j=0; $j < 500; $j++){\n $this->generate_afake_transaction($faker); \n }\n \n }", "public function run()\n {\n for($i=0;$i<50;$i++){\n \t$e = new Email;\n\n \t$e->name = \"user-\".$i;\n \t$e->email = \"user-\".$i.\"@gmail.com\";\n \t$e->phone = \"016370192\".$i;\n \t$e->subject = \"Subject-\".$i;\n \t$e->message = \"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur error soluta quae, expedita, molestias, rerum nihil optio recusandae doloribus maxime libero commodi facilis eveniet? Ullam illum laborum voluptatem, ea laboriosam assumenda, consequuntur facere animi sunt molestias deleniti eveniet expedita. Quos ipsum maxime, quisquam, dolor nulla doloremque ad suscipit impedit quidem voluptate commodi voluptatum consequuntur facilis, dolore id optio itaque culpa et tempore eligendi molestiae rerum dolores eaque harum possimus. Molestias modi labore assumenda tempora totam aliquam delectus harum atque, quae, perspiciatis reprehenderit eligendi dignissimos pariatur, est odit ut animi itaque consequuntur impedit sit! Unde, omnis, fugiat. Facere eius eligendi quidem!\";\n\n \t$e->save();\n\n }\n }", "function sendEmails($dictEmails) {\n $appConfig = new AppConfig();\n $conn = $appConfig->connect( \"populetic_form\", \"replica\" );\n $daoClient = new DaoClient();\n $daoClientBankAccount = new DaoClientBankAccount();\n\n foreach ($dictEmails as $email => $arrayClaimInfo) {\n $listClaimRefs = array();\n\n if (count($arrayClaimInfo) == 1) {\n //send email unic\n $name = $arrayClaimInfo[0][\"name\"];\n $clientId = $arrayClaimInfo[0][\"idClient\"];\n $amount = $arrayClaimInfo[0][\"clientAmount\"];\n $ref = $arrayClaimInfo[0][\"referencia\"];\n $lang = $arrayClaimInfo[0][\"lang\"];\n $idReclamacio = $arrayClaimInfo[0][\"id_reclamacion\"];\n $codigo_vuelo = $arrayClaimInfo[0][\"codigo\"];\n\n $daoClient->changeToSolicitarDatosPago($conn, $idReclamacio);\n $daoClient->insertLogChange($conn, $clientId, $idReclamacio, '36');\n \n } else {\n //send email with list of $clientInfo\n $name = $arrayClaimInfo[0][\"name\"];\n $clientId = $arrayClaimInfo[0][\"idClient\"];\n $amount = $arrayClaimInfo[0][\"clientAmount\"];\n $ref = $arrayClaimInfo[0][\"referencia\"];\n $lang = $arrayClaimInfo[0][\"lang\"];\n $idReclamacio = $arrayClaimInfo[0][\"id_reclamacion\"];\n $codigo_vuelo = $arrayClaimInfo[0][\"codigo\"];\n\n foreach ($arrayClaimInfo as $claimInfo) {\n $listClaimRefs[] = $claimInfo[\"referencia\"];\n\n //if it is set it means is the principal claim.\n if (isset($claimInfo[\"listAssociates\"])) {\n $name = $claimInfo[\"name\"];\n $clientId = $claimInfo[\"idClient\"];\n $amount = $claimInfo[\"clientAmount\"];\n $ref = $claimInfo[\"referencia\"];\n $lang = $claimInfo[\"lang\"];\n $idReclamacio = $claimInfo[\"id_reclamacion\"];\n $codigo_vuelo = $claimInfo[\"codigo\"];\n }\n\n $daoClient->changeToSolicitarDatosPago($conn, $idReclamacio);\n $daoClient->insertLogChange($conn, $clientId, $idReclamacio, '36');\n }\n }\n\n $date = date('Y-m-d H:i:s');\n $hash = Controller::getInstance()->generateHash($date, $idReclamacio);\n $result = Controller::getInstance()->sendEmailValidation($name, $email, $hash, $date, $amount,\n $ref, $lang, \n $codigo_vuelo, $listClaimRefs);\n \n $daoClientBankAccount->updatePendingBankAccount($conn, $email, $idReclamacio);\n\n $appConfig->closeConnection($conn);\n } \n}", "public function withAddedRecipients(array $recipients);", "public function run()\n {\n $minRecords = 6;\n $maxRecords = 20;\n\n factory(Account::class, rand($minRecords, $maxRecords))->create()->each(function($recordAccount) {\n $except = AccountTableSeeder::getChildAccountRecordsId($recordAccount);\n array_push($except, $recordAccount->id);\n\n if(($id = AccountTableSeeder::randomAccountId($except))) {\n $recordAccount->account_id = $id;\n $recordAccount->save();\n }\n }\n });\n }", "public function createRecordsWithBulk(array $data);", "public function postProcess( )\n { \n $processData = $this->get( 'processData' );\n $totalRecords = $this->get( 'totalRecords' );\n $recordsWithErrorMessages = $this->get( 'recordsWithErrorMessages' );\n $this->set( 'errorRecords', $recordsWithErrorMessages );\n $this->set( 'totalRecords', $totalRecords);\n require_once 'api/api.php';\n $importedRecords = 0;\n $session = CRM_Core_Session::singleton( );\n $contactID = $session->get( 'userID' );\n foreach( $processData as $key => $value ) {\n $sourceContactId = $targetContactId = $assignContactId = null;\n $rbcCustomDataDetails = getRBCColumns( );\n $accountCustomDataDetails = getAccountColumns( );\n if ( !empty( $value['customer_number'] ) ) {\n $doner_id = substr( $value['customer_number'], 8, 11 );\n }\n $ltrimed = ltrim( $doner_id, '0' ); \n $contact_id = rtrim( $ltrimed, ' ' ); \n if ( !empty( $value['payment_status'] ) ) {\n if ( $value['payment_status'] == 'U' ) {\n $getParams = array( $rbcCustomDataDetails['fieldId']['rbc'] => ltrim( $value['file_number'], '0' ),\n 'contact_id' => $contact_id,\n 'contribution_status_id' => 1,\n $accountCustomDataDetails['fieldId']['branch'] => ltrim( $value['branch_number'], '0' ),\n $accountCustomDataDetails['fieldId']['account'] => ltrim( $value['account_number'], '0' ),\n 'version' => 3 );\n $contributionParams = civicrm_api( 'contribution', 'get', $getParams );\n $data = null;\n foreach ( $contributionParams['values'] as $contrKey => $contrValue ) {\n\n \n $path = CIVICRM_UF_BASEURL.'civicrm/contact/view/contribution?action=view&reset=1&id='.$contrKey.'&cid='.$contact_id;\n $name = \"Contribution\".$contrKey;\n $data .= '<a href='.$path.'>'.$name.'</a> <br>';\n \n $getParams = array( 'contribution_recur_id' => $contrValue['contribution_recur_id'],\n 'contact_id' => $contact_id,\n 'contribution_type_id' => $contrValue['contribution_type_id'],\n 'version' => 3 );\n $result = civicrm_api( 'contribution', 'get', $getParams );\n \n $pathRec = CIVICRM_UF_BASEURL.'civicrm/contact/view/contribution?action=update&reset=1&id='.$result['id'].'&cid='.$contact_id;\n $nameRec = \"Recuring Contribution\". $contrValue['contribution_recur_id'];\n $data .= '<a href='.$pathRec.'>'.$nameRec.'</a> <br>';\n \n if ( $contact_id == $contrValue['contact_id'] ) {\n $relParams = array( 'contact_id' => 2,\n 'version' => 3 );\n $result = civicrm_api( 'relationship', 'get', $relParams );\n static $supporterFlag = null;\n foreach ( $result['values'] as $key => $value ) {\n if ( !isset( $supporterFlag ) ) {\n if ( $value['relationship_type_id'] == SUPPORTER_RELATION_TYPE_ID ) {\n $supporterFlag = 1;\n $newParams = array( 'contact_id' => $value['contact_id_b'],\n 'version' => 3 );\n $newResult = civicrm_api( 'relationship', 'get', $newParams );\n static $flag = null;\n foreach ( $newResult['values'] as $newKey => $newValue ) {\n if ( $newValue['relationship_type_id'] == PAR_ADMIN_RELATION_TYPE_ID ) {\n if ( !isset( $flag ) ) {\n $flag = 1;\n $sourceContactId = $contactID;\n $targetContactId = $contact_id;\n $assignContactId = $newValue['contact_id_a'];\n }\n }\n } \n $flag = null;\n }\n }\n }\n $supporterFlag = null;\n $nsfCustoData = getNSFColumns();\n $updateParams = array( 'id' => $contrKey,\n 'contact_id' => $contact_id,\n 'contribution_status_id' => 4,\n 'contribution_type_id' => $contrValue['contribution_type_id'],\n $nsfCustoData['fieldId']['nsf'] => 1,\n 'version' => 3 );\n\n $result = civicrm_api( 'contribution', 'create', $updateParams );\n\n // // update recurring contribution table status ///\n // $updateParam = array( 'id' => $contrRecId, \n // 'contact_id' => $contact_id, \n // 'contribution_type_id' => $contrValue['contribution_type_id'],\n // 'contribution_status_id' => 4 );\n // $ids = array( 'contribution' => $contrRecId );\n // $updateContribute = new CRM_Contribute_BAO_ContributionRecur();\n // $recurResult = $updateContribute->add( $updateParam, $ids );\n \n $importedRecords ++;\n }\n }\n \n if ( !empty ( $sourceContactId ) && !empty ( $targetContactId ) && !empty ( $assignContactId ) ) {\n \n $returnedContributions = getReturnedContributionsColumns( );\n $params = array( \n 'source_contact_id' => $sourceContactId,\n 'activity_type_id' => RETURNED_RECORDS_ACTIVITY_TYPE_ID,\n 'target_contact_id' => $targetContactId,\n 'assignee_contact_id' => $assignContactId,\n 'subject' => \"RBC returned records\",\n 'activity_date_time' => date( 'Y-m-d H:i:s' ),\n 'status_id' => 2,\n 'priority_id' => 2,\n 'version' => 3,\n \"{$returnedContributions['fieldId']['contributions']}\" => $data,\n );\n $activityResult = civicrm_api( 'activity','create',$params ); \n }\n } else if ( $value['payment_status'] == 'R' ) {\n $getParams = array( $rbcCustomDataDetails['fieldId']['rbc'] => ltrim( $value['file_number'], '0' ),\n 'contact_id' => $contact_id,\n $accountCustomDataDetails['fieldId']['branch'] => ltrim( $value['branch_number'], '0' ),\n $accountCustomDataDetails['fieldId']['account'] => ltrim( $value['account_number'], '0' ),\n 'version' => 3 );\n $contributionParams = civicrm_api( 'contribution', 'get', $getParams );\n foreach ( $contributionParams['values'] as $contrKey => $contrValue ) {\n if ( $contact_id == $contrValue['contact_id'] ) {\n $relParams = array( 'contact_id' => $contact_id,\n 'version' => 3 );\n $result = civicrm_api( 'relationship', 'get', $relParams );\n static $supporterFlag = null;\n foreach ( $result['values'] as $key => $value ) {\n if ( !isset( $supporterFlag ) ) {\n if ( $value['relationship_type_id'] == SUPPORTER_RELATION_TYPE_ID ) {\n $supporterFlag = 1;\n $newParams = array( 'contact_id' => $value['contact_id_b'],\n 'version' => 3 );\n $newResult = civicrm_api( 'relationship', 'get', $newParams );\n static $flag = null;\n foreach ( $newResult['values'] as $newKey => $newValue ) {\n if ( $newValue['relationship_type_id'] == PAR_ADMIN_RELATION_TYPE_ID ) {\n if ( !isset( $flag ) ) {\n $flag = 1;\n $sourceContactId = $contactID;\n $targetContactId = $contact_id;\n $assignContactId = $newValue['contact_id_a'];\n }\n }\n } \n $flag = null;\n }\n }\n }\n\n $suppoerterFlag = null; \n $updateParams = array( 'id' => $contrKey,\n 'contact_id' => $contact_id,\n 'contribution_status_id' => 4,\n 'contribution_type_id' => $contrValue['contribution_type_id'],\n 'version' => 3 );\n $result = civicrm_api( 'contribution', 'create', $updateParams );\n $importedRecords ++;\n }\n }\n if ( !empty ( $sourceContactId ) && !empty ( $targetContactId ) && !empty ( $assignContactId ) ) {\n $params = array( \n 'source_contact_id' => $sourceContactId,\n 'activity_type_id' => RETURNED_RECORDS_ACTIVITY_TYPE_ID,\n 'target_contact_id' => $targetContactId,\n 'assignee_contact_id' => $assignContactId,\n 'subject' => \"RBC returned records\",\n 'activity_date_time' => date( 'Y-m-d H:i:s' ),\n 'status_id' => 2,\n 'priority_id' => 2,\n 'version' => 3,\n );\n $activityResult = civicrm_api( 'activity','create',$params );\n }\n }\n } \n }\n $errorFlag = $ctrIDS = null;\n foreach( $recordsWithErrorMessages as $errorKey => $errorValue ) {\n $errorFlag = 1;\n $rbcCustomDataDetails = getRBCColumns( );\n $accountCustomDataDetails = getAccountColumns( );\n $doner_id = substr( $errorValue['customer_number'], 8, 11 );\n $ltrimed = ltrim( $doner_id, '0' );\n $contact_id = rtrim( $ltrimed, ' ' );\n if ( !empty( $errorValue['payment_status'] ) ) {\n $getParams = array( $rbcCustomDataDetails['fieldId']['rbc'] => ltrim( $errorValue['file_number'], '0' ),\n 'contact_id' => $contact_id,\n $accountCustomDataDetails['fieldId']['branch'] => ltrim( $errorValue['branch_number'], '0' ),\n $accountCustomDataDetails['fieldId']['account'] => ltrim( $errorValue['account_number'], '0' ),\n 'version' => 3 );\n $contributionParams = civicrm_api( 'contribution', 'get', $getParams );\n $data = null;\n foreach ( $contributionParams['values'] as $contrKey => $contrValue ) {\n\n $getParams = array( 'contribution_recur_id' => $contrValue['contribution_recur_id'],\n 'contact_id' => $contact_id,\n 'contribution_status_id' => 5,\n 'contribution_type_id' => $contrValue['contribution_type_id'],\n 'version' => 3 );\n $result = civicrm_api( 'contribution', 'get', $getParams );\n \n $ctrIDS = $ctrIDS.''.$contrValue['contribution_recur_id'].',';\n if ( $contact_id == $contrValue['contact_id'] ) {\n $relParams = array( 'contact_id' => $contact_id,\n 'version' => 3 );\n $result = civicrm_api( 'relationship', 'get', $relParams );\n foreach ( $result['values'] as $key => $value ) {\n if ( $value['relationship_type_id'] == SUPPORTER_RELATION_TYPE_ID ) {\n $newParams = array( 'contact_id' => $value['contact_id_b'],\n 'version' => 3 );\n $newResult = civicrm_api( 'relationship', 'get', $newParams );\n static $flag = null;\n foreach ( $newResult['values'] as $newKey => $newValue ) {\n if ( $newValue['relationship_type_id'] == PAR_ADMIN_RELATION_TYPE_ID ) {\n if ( !isset( $flag ) ) {\n $flag = 1;\n $sourceContactId = $contactID;\n $targetContactId = $contact_id;\n $assignContactId = $newValue['contact_id_a'];\n }\n }\n } \n $flag = null;\n }\n }\n $nsfCustoData = getNSFColumns();\n $updateParams = array( 'id' => $contrKey,\n 'contact_id' => $contact_id,\n 'contribution_status_id' => 7,\n 'contribution_type_id' => $contrValue['contribution_type_id'],\n 'version' => 3 );\n $result = civicrm_api( 'contribution', 'create', $updateParams );\n\n // //update rec table status\n // $updateParam = array( 'id' => $contrRecId, \n // 'contact_id' => $contact_id, \n // 'contribution_type_id' => $contrValue['contribution_type_id'],\n // 'contribution_status_id' => 4 );\n // $ids = array( 'contribution' => $contrRecId );\n // $updateContribute = new CRM_Contribute_BAO_ContributionRecur();\n // $recurResult = $updateContribute->add( $updateParam, $ids );\n \n $importedRecords ++;\n }\n } \n \n }\n } \n if ( !empty ( $sourceContactId ) && !empty ( $targetContactId ) && !empty ( $assignContactId ) && !empty ( $ctrIDS ) && !empty ( $errorFlag ) ) {\n $ctrIDS = rtrim( $ctrIDS, ',' );\n require_once 'CRM/Core/DAO.php';\n $query = \"SHOW TABLE STATUS LIKE 'civicrm_activity'\";\n $activityResult = CRM_Core_DAO::executeQuery( $query );\n while ( $activityResult->fetch( ) ) {\n $activityId = $activityResult->Auto_increment;\n }\n $pathRec = CIVICRM_UF_BASEURL.'civicrm/contact/view?reset=1&cid='.$contact_id.'&selectedChild=donation&ctrid='.$ctrIDS.'&actid='.$activityId;\n $nameRec = \"Donations\";\n $data .= '<a href='.$pathRec.'>'.$nameRec.'</a> <br>';\n \n $errorContributions = getErrorContributionsColumns( );\n $params = array ( \n 'source_contact_id' => $contactID,\n 'activity_type_id' => ERROR_RECORDS_ACTIVITY_TYPE_ID,\n 'target_contact_id' => $targetContactId,\n 'assignee_contact_id' => $assignContactId,\n 'subject' => \"RBC Error records\",\n 'activity_date_time' => date( 'Y-m-d H:i:s' ),\n 'status_id' => 1,\n 'priority_id' => 2,\n 'version' => 3,\n \"{$errorContributions['fieldId']['error_contributions']}\" => $data,\n );\n $activityResult = civicrm_api( 'activity','create',$params );\n } \n $errorMessageRecords = $this->get( 'errorMessageRecords' );\n $debitMessageRecords = $this->get( 'debitMessageRecords' );\n $creditMessageRecords = $this->get( 'creditMessageRecords' );\n $notProcessed = $debitMessageRecords - $importedRecords;\n $this->set( 'notProcessed', $notProcessed );\n $this->set( 'importedRecords', $importedRecords );\n $this->assign( 'errorMessageRecords', $errorMessageRecords );\n $this->assign( 'debitMessageRecords', $debitMessageRecords );\n $this->assign( 'creditMessageRecords', $creditMessageRecords );\n $fileName = $this->get( 'fileName' );\n $returnedFileColumns = getReturnedFileColumns( );\n $params = array( \n 'source_contact_id' => $contactID,\n 'activity_type_id' => IMPORT_RBC_ACTIVITY_TYPE_ID,\n 'assignee_contact_id' => $contactID,\n 'subject' => \"RBC Import {$fileName}\",\n 'activity_date_time' => date( 'Y-m-d H:i:s' ),\n 'status_id' => 2,\n 'priority_id' => 2,\n 'version' => 3,\n \"{$returnedFileColumns['fieldId']['total_error_message']}\" => $errorMessageRecords,\n \"{$returnedFileColumns['fieldId']['total_debit_records']}\" => $debitMessageRecords,\n \"{$returnedFileColumns['fieldId']['total_credit_records']}\" => $creditMessageRecords,\n \"{$returnedFileColumns['fieldId']['total_transactions']}\" => $totalRecords,\n \"{$returnedFileColumns['fieldId']['total_number_of_returned_records']}\" => $importedRecords,\n \"{$returnedFileColumns['fieldId']['records_in_import_file']}\" => $notProcessed,\n );\n $activityResult = civicrm_api( 'activity','create',$params );\n }", "public function run()\n {\n $usersIDs = Customer::pluck('id');\n $cnt =0;\n foreach ($usersIDs as $usersID) {\n factory(\\Modules\\Accounts\\Entities\\Address::class)->create([\n 'user_id' => $usersID,\n 'city_id' => ++$cnt,\n ]);\n factory(\\Modules\\Accounts\\Entities\\Address::class)->create([\n 'user_id' => $usersID,\n 'city_id' => $cnt,\n ]);\n }\n }", "public function createBetweenMyAccounts(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'method' => 'required|in:cour_epar,epar_cour,cour_devi_usd,devi_cour_usd,cour_devi_eur,devi_cour_eur',\n 'amount' => 'required|numeric|min:0'\n ]);\n if ($validator->fails()) {\n return response($validator->errors(), config('code.BAD_REQUEST'));\n }\n\n $amount = $request->input('amount');\n $method = $request->input('method');\n $hasEnoughMoney = false;\n $hasTheAccount = false;\n\n /**start transaction**/\n DB::beginTransaction();\n\n //todo check if he had this type of account\n\n try {\n\n $senderAccount = $this->client()->accounts()\n ->typeSender($method)->first();//todo check methode first()\n\n $receiverAccount = $this->client()->accounts()\n ->typeReceiver($method)->first();//todo check methode first()\n\n //check has the account\n if (is_null($receiverAccount)) throw new \\Exception;\n $hasTheAccount = true;\n\n //check the amount\n if (!$senderAccount->hasEnoughMoney($amount)) throw new \\Exception;\n $hasEnoughMoney = true;\n\n //create the transfer\n $mapMethodeToCommission = ['cour_epar' => 'COUR_EPART', 'epar_cour' => 'EPART_COUR',\n 'cour_devi_usd' => 'COUR_DEV', 'cour_devi_eur' => 'COUR_DEV',\n 'devi_cour_eur' => 'DEV_COUR', 'devi_cour_usd' => 'DEV_COUR'];\n $str = 'commission.' . $mapMethodeToCommission[$method];\n $commission = config('commission.' . $mapMethodeToCommission[$method]) * $amount;\n $now = \\Carbon\\Carbon::now();\n $nb = BalanceHistory::count();//todo fix this !all sol tested! re-migrate DB\n //sender history\n $mapMethodeToTransactionType = ['cour_epar' => 'vir_epar', 'epar_cour' => 'vir_cour',\n 'cour_devi_usd' => 'vir_devi', 'cour_devi_eur' => 'vir_devi',\n 'devi_cour_eur' => 'vir_cour', 'devi_cour_usd' => 'vir_cour'];\n BalanceHistory::create([\n 'id' => $nb + 1,\n 'amount' => $amount + $commission,//todo put it negative !!\n 'transaction_type' => $mapMethodeToTransactionType[$method],\n 'transaction_direction' => 'out',\n 'account_id' => $senderAccount->number,\n 'created_at' => $now->format('Y-m-d H:i:s'),\n 'updated_at' => $now->format('Y-m-d H:i:s')\n ]);\n\n\n //receiver history\n BalanceHistory::create([\n 'id' => $nb + 2,\n 'amount' => $amount,\n 'transaction_type' => $mapMethodeToTransactionType[$method],\n 'transaction_direction' => 'in',\n 'account_id' => $receiverAccount->number,\n 'created_at' => $now->format('Y-m-d H:i:s'),\n 'updated_at' => $now->format('Y-m-d H:i:s')\n ]);\n //change the amount of the destination client\n $receiverAccount->balance = $receiverAccount->balance + $amount;\n $receiverAccount->save();\n\n $mapMethodeToTransferType = ['cour_epar' => 'cour_epar', 'epar_cour' => 'epar_cour',\n 'cour_devi_usd' => 'cour_devi', 'cour_devi_eur' => 'cour_devi',\n 'devi_cour_eur' => 'devi_cour', 'devi_cour_usd' => 'devi_cour'];\n InternTransfer::create([\n 'code' => $senderAccount->number . $receiverAccount->number . $now->format('YmdHi'),\n 'amount' => $amount,\n 'transferDate' => $now->format('Y-m-d H:i:s'),\n 'creationDate' => $now->format('Y-m-d H:i:s'),\n 'status' => 'valide',\n 'transfers_type' => $mapMethodeToTransferType[$method],\n 'commission' => $commission,\n 'source_id' => $senderAccount->number,\n 'destination_id' => $receiverAccount->number,\n ]);\n\n //todo send commission to Tharwa account\n //we retrieve the amount from the sender account\n $senderAccount->balance = $senderAccount->balance - $commission - $amount;\n $senderAccount->save();\n\n\n// Mail::to($request->input('email'))\n// ->queue(new ClientRequestValidatedMail($acceptedClient->firstname.' '.$acceptedClient->lastname\n// , $request->input('code')));\n\n // all good\n /**commit - no problems **/\n DB::commit();\n return response([\"saved\" => true], config('code.CREATED'));\n\n } catch (\\Exception $e) {\n\n // something went wrong\n /**rollback every thing - problems **/\n DB::rollback();\n\n if (!$hasTheAccount)\n return response([\"account\" => false], config('code.NOT_FOUND'));\n\n if (!$hasEnoughMoney)\n return response([\"amount\" => false], config('code.NOT_FOUND'));\n\n return response([\"saved\" => false], config('code.UNKNOWN_ERROR'));\n }\n\n }", "public function setRecipients(?array $recipients): self\n {\n $this->initialized['recipients'] = true;\n $this->recipients = $recipients;\n\n return $this;\n }", "public function testSendInvoiceToBatchSuccessfulSendViaSendThreshold()\n {\n $validator = new InvoiceValidator();\n $invoice = Invoice::load($this->getValidInvoiceData()[0], $validator);\n\n $results = [\n # Result for GetQueueUrl command\n new Result(['QueueUrl' => 'my-queue-url']),\n # Result for SendMessageBatch command for first batch of 10\n new Result([]),\n # Result for SendMessageBatch command for the final batch of 1\n new Result([])\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n\n for ($i = 0; $i < (SqsQueue::SEND_BATCH_SIZE + 1); $i++) {\n $invoice->setInvoiceId($invoice->getInvoiceId() . '-' . $i);\n $sqsQueue->sendInvoiceToBatch($invoice, $validator);\n }\n\n # Destroy the object. This should trigger the final batch send.\n unset($sqsQueue);\n\n # Confirm the stack is empty (ie. that the API calls HAVE been made)\n $this->assertEquals(0, $this->getAwsMockHandlerStackCount());\n }", "public function run()\n {\n foreach (range(1, 10000) as $i) {\n $contact = new Contact();\n\n $contact->email = \"test1300{$i}@example.com\";\n $contact->list_id = 1;\n $contact->save();\n\n // $contact->refresh();\n }\n }", "public function run()\n {\n EmailTemplate::truncate();\n EmailTemplate::insert(\n [\n //Transferred\n [\n //Transferred - en\n 'temp_id' => '1',\n 'subject' => 'Notice of Transfer!',\n 'body' => 'Hi {sender_id},\n <br><br>The funds amount equal to {amount} was transferred from your account.\n\n <br><br><b><u><i>Here’s a brief overview of your Transfer:</i></u></b>\n\n <br><br>Transfer # {uuid} was created at {created_at}.\n\n <br><br><b><u>Amount:</u></b> {amount}\n\n <br><br><b><u>Receiver:</u></b> {receiver_id}\n\n <br><br><b><u>Fee:</u></b> {fee}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n //Transferred - ar\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n //Transferred - fr\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n //Transferred - pt\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n //Transferred - ru\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n //Transferred - es\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n //Transferred - tr\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n //Transferred - ch\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n //Bank Transfer\n [\n //Bank Transfer - en\n 'temp_id' => '3',\n 'subject' => 'Notice of Bank Transfer!',\n 'body' => 'Hi {sender_id},\n <br><br>The funds amount equal to {amount} was transferred to the assigned bank.\n\n <br><br><b><u><i>Here’s a brief overview of your Bank Transfer:</i></u></b>\n\n <br><br>Bank Transfer # {uuid} was created at {created_at}.\n\n <br><br><b><u>Amount:</u></b> {amount}\n\n <br><br><b><u>Fee:</u></b> {fee}\n\n <br><br><b><u>Bank Name:</u></b> {bank_name}\n\n <br><br><b><u>Branch Name:</u></b> {branch_name}\n\n <br><br><b><u>Account Name:</u></b> {account_name}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n //Bank Transfer - ar\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n //Bank Transfer - fr\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n //Bank Transfer - pt\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n //Bank Transfer - ru\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n //Bank Transfer - es\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n //Bank Transfer - tr\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n //Bank Transfer - ch\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n //Received\n [\n //Received - en\n 'temp_id' => '2',\n 'subject' => 'Notice to Receive!',\n 'body' => 'Hi {receiver_id},\n <br><br>The funds amount equal to {amount} was received on your account.\n\n <br><br>\n <b><u><i>Here’s a brief overview of your Received Payment:</i></u></b>\n\n <br><br>\n Transfer # {uuid} was received at {created_at}.\n\n <br><br>\n <b><u>Amount:</u></b> {amount}\n\n <br><br>\n <b><u>Sender:</u></b> {sender_id}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //Received - ar\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //Received - fr\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //Received - pt\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //Received - ru\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //Received - es\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //Received - tr\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //Received - tr\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n\n //Identity/Address Verification\n [\n //Identity/Address Verification - en\n 'temp_id' => '21',\n 'subject' => 'Notice of {Identity/Address} Verification!',\n 'body' => 'Hi {user},\n <br><br>Your {Identity/Address} verification is <b>{approved/pending/rejected}</b>.\n\n <br><br>If you have any questions, please feel free to reply to this email.\n\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //Identity/Address Verification - ar\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //Identity/Address Verification - fr\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //Identity/Address Verification - pt\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //Identity/Address Verification - ru\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //Identity/Address Verification - es\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //Identity/Address Verification - tr\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //Identity/Address Verification - tr\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n\n //Request Payment Creation\n [\n //Request Payment Creation - en\n 'temp_id' => '4',\n 'subject' => 'Notice of Request Creation!',\n 'body' => 'Hi {acceptor},\n\n <br><br>Amount {amount} has been requested by {creator}.\n\n <br><br><b><u><i>Here’s a brief overview of the Request:</i></u></b>\n\n <br><br>\n <b><u>Request #:</u></b> {uuid}\n\n <br><br>\n <b><u>Created At:</u></b> {created_at}\n\n <br><br>\n <b><u>Requested Amount:</u></b> {amount}\n\n <br><br>\n <b><u>Note: </u></b> {note}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n //Request Payment Creation - ar\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n //Request Payment Creation - fr\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n //Request Payment Creation - pt\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n //Request Payment Creation - ru\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n //Request Payment Creation - es\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n //Request Payment Creation - tr\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n //Request Payment Creation - ch\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n //Request Payment Acceptance\n [\n //Request Payment Acceptance - ne\n 'temp_id' => '5',\n 'subject' => 'Notice of Request Acceptance!',\n 'body' => 'Hi {creator},\n <br><br>Your request of #{uuid} has been accepted by {acceptor}.\n\n <br><br><b><u><i>Here’s a brief overview of the Request:</i></u></b>\n\n <br><br>\n <b><u>Accepted Date:</u></b> {created_at}.\n\n <br><br>\n <b><u>Requested Amount:</u></b> {amount}\n\n <br><br>\n <b><u>Requested Accepted Amount:</u></b> {accept_amount}\n\n <br><br>\n <b><u>Currency:</u></b> {currency}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n //Request Payment Acceptance - ar\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n //Request Payment Acceptance - fr\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n //Request Payment Acceptance - pt\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n //Request Payment Acceptance - ru\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n //Request Payment Acceptance - es\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n //Request Payment Acceptance - tr\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n //Request Payment Acceptance - ch\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n //Status Change - Transfer & received\n [\n //Status Change - Transfer - en\n 'temp_id' => '6',\n 'subject' => 'Status of Transaction #{uuid} has been updated!',\n 'body' => 'Hi {sender_id/receiver_id},\n\n <br><br><b>\n Transaction of Transfer #{uuid} has been updated to {status} by system administrator!</b>\n\n <br><br>\n {amount} is {added/subtracted} {from/to} your account.\n\n <br><br>If you have any questions, please feel free to reply to this email.\n\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //Status Change - Transfer - ar\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //Status Change - Transfer - fr\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //Status Change - Transfer - pt\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //Status Change - Transfer - ru\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //Status Change - Transfer - es\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //Status Change - Transfer - tr\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //Status Change - Transfer - ch\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n //Status Change - Bank Transfer\n [\n //Status Change - Bank Transfer - en\n 'temp_id' => '7',\n 'subject' => 'Status of Transaction #{uuid} has been updated!',\n 'body' => 'Hi {sender_id},\n <br><br><b>\n Transaction of Bank Transfer #{uuid} has been updated to {status} by system administrator!</b>\n <br><br>\n {amount} is {added/subtracted} {from/to} your account.\n\n <br><br>If you have any questions, please feel free to reply to this email.\n\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //Status Change - Bank Transfer - ar\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //Status Change - Bank Transfer - fr\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //Status Change - Bank Transfer - pt\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //Status Change - Bank Transfer - ru\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //Status Change - Bank Transfer - es\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //Status Change - Bank Transfer - tr\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //Status Change - Bank Transfer - ch\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n //Status Change - Request Payment\n [\n //Status Change - Request Payment - en\n 'temp_id' => '8',\n 'subject' => 'Status of Transaction #{uuid} has been updated!',\n 'body' => 'Hi {user_id/receiver_id},\n\n <br><br><b>\n Transaction of Request Payment #{uuid} has been updated to {status} by system administrator!</b>\n\n <br><br>\n {amount} is {added/subtracted} {from/to} your account.\n\n <br><br>If you have any questions, please feel free to reply to this email.\n\n <br><br>Regards,\n <br><b>{soft_name}</b>',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //Status Change - Request Payment - ar\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //Status Change - Request Payment - fr\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //Status Change - Request Payment - pt\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //Status Change - Request Payment - ru\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //Status Change - Request Payment - es\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //Status Change - Request Payment - tr\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //Status Change - Request Payment - ch\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n // //Payout\n // [\n // //Payout - en\n // 'temp_id' => '9',\n // 'subject' => 'Notice of Payout!',\n // 'body' => 'Hi {user_id},\n\n // <br><br><b>\n // Your request of Payout #{uuid} of {symbol}{amount} is being processed by system administrator!</b>\n\n // <br><br>\n // <b><u>Transaction Status:</u></b> {status}.\n\n // <br><br>\n // {symbol}{amount} is being subtracted from your account.\n\n // <br><br>If you have any questions, please feel free to reply to this email.\n\n // <br><br>Regards,\n // <br><b>{soft_name}</b>',\n // 'lang' => 'en',\n // 'type' => 'email',\n // 'language_id' => 1,\n // ],\n // [\n // //Payout - ar\n // 'temp_id' => '9',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ar',\n // 'type' => 'email',\n // 'language_id' => 2,\n // ],\n // [\n // //Payout - fr\n // 'temp_id' => '9',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'fr',\n // 'type' => 'email',\n // 'language_id' => 3,\n // ],\n // [\n // //Payout - pt\n // 'temp_id' => '9',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'pt',\n // 'type' => 'email',\n // 'language_id' => 4,\n // ],\n // [\n // //Payout - ru\n // 'temp_id' => '9',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ru',\n // 'type' => 'email',\n // 'language_id' => 5,\n // ],\n // [\n // //Payout - es\n // 'temp_id' => '9',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'es',\n // 'type' => 'email',\n // 'language_id' => 6,\n // ],\n // [\n // //Payout - tr\n // 'temp_id' => '9',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'tr',\n // 'type' => 'email',\n // 'language_id' => 7,\n // ],\n // [\n // //Payout - ch\n // 'temp_id' => '9',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ch',\n // 'type' => 'email',\n // 'language_id' => 8,\n // ],\n\n //Status Change - Payout\n [\n //Status Change - Payout - en\n 'temp_id' => '10',\n 'subject' => 'Status of Transaction #{uuid} has been updated!',\n 'body' => 'Hi {user_id},\n\n <br><br><b>\n Transaction of Payout #{uuid} has been updated to {status} by system administrator!</b>\n\n <br><br>\n {amount} is {added/subtracted} {from/to} your account.\n\n <br><br>If you have any questions, please feel free to reply to this email.\n\n <br><br>Regards,\n <br><b>{soft_name}</b>',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //Status Change - Payout - ar\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //Status Change - Payout - fr\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //Status Change - Payout - pt\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //Status Change - Payout - ru\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //Status Change - Payout - es\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //Status Change - Payout - tr\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //Status Change - Payout - ch\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n //Ticket\n [\n //Ticket - en\n 'temp_id' => '11',\n 'subject' => 'Notice of Ticket!',\n 'body' => 'Hi {assignee/user},\n\n <br><br>Ticket #{ticket_code} was {assigned/created} {to/for} you by the system administrator.\n\n <br><br><b><u><i>Here’s a brief overview of the ticket:</i></u></b>\n\n <br><br>Ticket #{ticket_code} was created at {created_at}.\n\n <br><br><b><u>{Assignee:}</u></b> {assignee}\n\n <br><br><b><u>{User:}</u></b> {user}\n\n <br><br><b><u>Ticket Subject:</u></b> {subject}\n\n <br><br><b><u>Ticket Message:</u></b> {message}\n\n <br><br><b><u>Ticket Status:</u></b> {status}\n\n <br><br><b><u>Ticket Priority Level:</u></b> {priority}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //Ticket - ar\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //Ticket - fr\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //Ticket - pt\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //Ticket - ru\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //Ticket - es\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //Ticket - tr\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //Ticket - ch\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n //Ticket Reply\n [\n //Ticket Reply - en\n 'temp_id' => '12',\n 'subject' => 'Notice of Ticket Reply!',\n 'body' => 'Hi {user},\n\n <br><br>A ticket reply has been sent to you by system administrator.\n\n <br><br><b><u><i>Here’s a brief overview of the reply:</i></u></b>\n\n <br><br>This reply was initiated against ticket code #{ticket_code}.\n\n <br><br><b><u>Assignee:</u></b> {assignee}\n\n <br><br><b><u>Reply Message:</u></b> {message}\n\n <br><br><b><u>Reply Status:</u></b> {status}\n\n <br><br><b><u>Reply Priority Level:</u></b> {priority}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //Ticket Reply - ar\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //Ticket Reply - fr\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //Ticket Reply - pt\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //Ticket Reply - ru\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //Ticket Reply - es\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //Ticket Reply - tr\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //Ticket Reply - ch\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n //Dispute Reply\n [\n //Dispute Reply - en\n 'temp_id' => '13',\n 'subject' => 'Notice of Dispute Reply!',\n 'body' => 'Hi {user},\n\n <br><br>A dispute reply has been sent to you by system administrator.\n\n <br><br><b><u><i>Here’s a brief overview of the reply:</i></u></b>\n\n <br><br>This reply was initiated at {created_at}.\n\n <br><br><b><u>{Claimant/Defendant:}</u></b> {claimant/defendant}\n\n <br><br><b><u>Transaction ID:</u></b> {transaction_id}\n\n <br><br><b><u>Subject:</u></b> {subject}\n\n <br><br><b><u>Replied Message:</u></b> {message}\n\n <br><br><b><u>Status:</u></b> {status}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //Dispute Reply - ar\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //Dispute Reply - fr\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //Dispute Reply - pt\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //Dispute Reply - ru\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //Dispute Reply - es\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //Dispute Reply - tr\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //Dispute Reply - ch\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n //Status Change - Merchant Payment\n [\n //Status Change - Merchant Payment - en\n 'temp_id' => '14',\n 'subject' => 'Status of Transaction #{uuid} has been updated!',\n 'body' => 'Hi {paidByUser/merchantUser},\n\n <br><br><b>\n Transaction of Merchant Payment #{uuid} has been updated to {status} by system administrator!</b>\n\n <br><br>\n {amount} is {added/subtracted} {from/to} your account.\n\n <br><br>If you have any questions, please feel free to reply to this email.\n\n <br><br>Regards,\n <br><b>{soft_name}</b>',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //Status Change - Merchant Payment - ar\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //Status Change - Merchant Payment - fr\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //Status Change - Merchant Payment - pt\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //Status Change - Merchant Payment - ru\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //Status Change - Merchant Payment - es\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //Status Change - Merchant Payment - tr\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //Status Change - Merchant Payment - ch\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n //Merchant Payment\n // [\n // //Merchant Payment - en\n // 'temp_id' => '15',\n // 'subject' => 'Notice of Merchant Payment!',\n // 'body' => 'Hi {paidByUser/merchantUser},\n\n // <br><br><b>\n // The funds amount equal to {symbol}{amount} has been {sent/received} {from/to} your account</b>\n\n // <br><br><b><u><i>Here’s a brief overview of the payment:</i></u></b>\n\n // <br><br>Payment # {uuid} was created at {created_at}.\n\n // <br><br><b><u>{Merchant Id/Paid By}:</u></b> {merchant_id/user_id}\n\n // <br><br><b><u>Currency:</u></b> {currency_id}\n\n // <br><br><b><u>Payment Method:</u></b> {receiver_id}\n\n // <br><br><b><u>Fees:</u></b> {symbol}{fees}\n\n // <br><br><b><u>Amount:</u></b> {symbol}{amount}\n\n // <br><br>If you have any questions, please feel free to reply to this email.\n\n // <br><br>Regards,\n // <br><b>{soft_name}</b>',\n\n // 'lang' => 'en',\n // 'type' => 'email',\n // 'language_id' => 1,\n // ],\n\n // [\n // //Merchant Payment - ar\n // 'temp_id' => '15',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ar',\n // 'type' => 'email',\n // 'language_id' => 2,\n // ],\n\n // [\n // //Merchant Payment - fr\n // 'temp_id' => '15',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'fr',\n // 'type' => 'email',\n // 'language_id' => 3,\n // ],\n\n // [\n // //Merchant Payment - pt\n // 'temp_id' => '15',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'pt',\n // 'type' => 'email',\n // 'language_id' => 4,\n // ],\n\n // [\n // //Merchant Payment - ru\n // 'temp_id' => '15',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ru',\n // 'type' => 'email',\n // 'language_id' => 5,\n // ],\n\n // [\n // //Merchant Payment - es\n // 'temp_id' => '15',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'es',\n // 'type' => 'email',\n // 'language_id' => 6,\n // ],\n\n // [\n // //Merchant Payment - tr\n // 'temp_id' => '15',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'tr',\n // 'type' => 'email',\n // 'language_id' => 7,\n // ],\n\n // Status Change - Request Payment (for Pending/Cancel)\n [\n //Request Payment - en\n 'temp_id' => '16',\n 'subject' => 'Status of Transaction #{uuid} has been updated!',\n 'body' => 'Hi {user_id/receiver_id},\n <br><br><b>\n Transaction of Request Payment #{uuid} has been updated to {status} by system administrator!</b>\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //Request Payment - ar\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //Request Payment - fr\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //Request Payment - pt\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //Request Payment - ru\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //Request Payment - es\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //Request Payment - tr\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //Request Payment - ch\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n // User Verification\n [\n //User Verification - en\n 'temp_id' => '17',\n 'subject' => 'Notice for User Verification!',\n 'body' => 'Hi {user},\n <br><br>\n Your registered email id: {email}. Please click on the below link to verify your account,<br><br>\n {verification_url}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //User Verification - ar\n 'temp_id' => '17',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //User Verification - fr\n 'temp_id' => '17',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //User Verification - pt\n 'temp_id' => '17',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //User Verification - ru\n 'temp_id' => '17',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //User Verification - es\n 'temp_id' => '17',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //User Verification - tr\n 'temp_id' => '17',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //User Verification - ch\n 'temp_id' => '17',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n\n // 2-Factor Authentication\n [\n //2-Factor Authentication - en\n 'temp_id' => '19',\n 'subject' => 'Notice for 2-Factor Authentication!',\n 'body' => 'Hi {user},\n <br><br>\n Your 2-Factor Authentication code is: {code}\n <br><br>Regards,\n <br><b>{soft_name}</b>',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //2-Factor Authentication - ar\n 'temp_id' => '19',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //2-Factor Authentication - fr\n 'temp_id' => '19',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //2-Factor Authentication - pt\n 'temp_id' => '19',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //2-Factor Authentication - ru\n 'temp_id' => '19',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //2-Factor Authentication - es\n 'temp_id' => '19',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //2-Factor Authentication - tr\n 'temp_id' => '19',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //2-Factor Authentication - ch\n 'temp_id' => '19',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n\n // Password Reset\n [\n //Password Reset - en\n 'temp_id' => '18',\n 'subject' => 'Notice for Password Reset!',\n 'body' => 'Hi {user},\n <br><br>\n Your registered email id: {email}. Please click on the below link to reset your password,<br><br>\n {password_reset_url}\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n\n [\n //Password Reset - ar\n 'temp_id' => '18',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n\n [\n //Password Reset - fr\n 'temp_id' => '18',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n\n [\n //Password Reset - pt\n 'temp_id' => '18',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n\n [\n //Password Reset - ru\n 'temp_id' => '18',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n\n [\n //Password Reset - es\n 'temp_id' => '18',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n\n [\n //Password Reset - tr\n 'temp_id' => '18',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n\n [\n //Password Reset - ch\n 'temp_id' => '18',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n\n// SMS /////////////////////////////////////////////////////////////////////////////////\n\n // User Verification\n // [\n // //User Verification - en\n // 'temp_id' => '17',\n // 'subject' => 'Notice for User Verification!',\n // 'body' => 'Hi {user},\n // <br><br>Please click on the below link to verify your account,\n // <br><br>{verification_url}',\n // 'lang' => 'en',\n // 'type' => 'sms',\n // 'language_id' => 1,\n // ],\n\n // [\n // //User Verification - ar\n // 'temp_id' => '17',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ar',\n // 'type' => 'sms',\n // 'language_id' => 2,\n // ],\n\n // [\n // //User Verification - fr\n // 'temp_id' => '17',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'fr',\n // 'type' => 'sms',\n // 'language_id' => 3,\n // ],\n\n // [\n // //User Verification - pt\n // 'temp_id' => '17',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'pt',\n // 'type' => 'sms',\n // 'language_id' => 4,\n // ],\n\n // [\n // //User Verification - ru\n // 'temp_id' => '17',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ru',\n // 'type' => 'sms',\n // 'language_id' => 5,\n // ],\n\n // [\n // //User Verification - es\n // 'temp_id' => '17',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'es',\n // 'type' => 'sms',\n // 'language_id' => 6,\n // ],\n\n // [\n // //User Verification - tr\n // 'temp_id' => '17',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'tr',\n // 'type' => 'sms',\n // 'language_id' => 7,\n // ],\n\n // [\n // //User Verification - ch\n // 'temp_id' => '17',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ch',\n // 'type' => 'sms',\n // 'language_id' => 8,\n // ],\n\n // Password Reset\n // [\n // //Password Reset - en\n // 'temp_id' => '18',\n // 'subject' => 'Notice for Password Reset!',\n // 'body' => 'Hi {user},\n // <br><br>Please click on the below link to reset your password,\n // <br><br>{password_reset_url}',\n // 'lang' => 'en',\n // 'type' => 'sms',\n // 'language_id' => 1,\n // ],\n\n // [\n // //Password Reset - ar\n // 'temp_id' => '18',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ar',\n // 'type' => 'sms',\n // 'language_id' => 2,\n // ],\n\n // [\n // //Password Reset - fr\n // 'temp_id' => '18',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'fr',\n // 'type' => 'sms',\n // 'language_id' => 3,\n // ],\n\n // [\n // //Password Reset - pt\n // 'temp_id' => '18',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'pt',\n // 'type' => 'sms',\n // 'language_id' => 4,\n // ],\n\n // [\n // //Password Reset - ru\n // 'temp_id' => '18',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ru',\n // 'type' => 'sms',\n // 'language_id' => 5,\n // ],\n\n // [\n // //Password Reset - es\n // 'temp_id' => '18',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'es',\n // 'type' => 'sms',\n // 'language_id' => 6,\n // ],\n\n // [\n // //Password Reset - tr\n // 'temp_id' => '18',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'tr',\n // 'type' => 'sms',\n // 'language_id' => 7,\n // ],\n\n // [\n // //Password Reset - ch\n // 'temp_id' => '18',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ch',\n // 'type' => 'sms',\n // 'language_id' => 8,\n // ],\n\n //Identity/Address Verification\n [\n //Identity/Address Verification - en\n 'temp_id' => '21',\n 'subject' => 'Notice of {Identity/Address} Verification!',\n 'body' => 'Hi {user},\n <br><br>Your {Identity/Address} verification is <b>{approved/pending/rejected}</b>.\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n\n [\n //Identity/Address Verification - ar\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n\n [\n //Identity/Address Verification - fr\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n\n [\n //Identity/Address Verification - pt\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n\n [\n //Identity/Address Verification - ru\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n\n [\n //Identity/Address Verification - es\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n\n [\n //Identity/Address Verification - tr\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n\n [\n //Identity/Address Verification - tr\n 'temp_id' => '21',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n\n //Transferred\n [\n //Transferred - en\n 'temp_id' => '1',\n 'subject' => 'Notice of Transfer!',\n 'body' => 'Hi {sender_id},\n <br><br>You have transferred {amount} from your account.\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n [\n //Transferred - ar\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n [\n //Transferred - fr\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n [\n //Transferred - pt\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n [\n //Transferred - ru\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n [\n //Transferred - es\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n [\n //Transferred - tr\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n [\n //Transferred - ch\n 'temp_id' => '1',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n //Bank Transfer\n [\n //Bank Transfer - en\n 'temp_id' => '3',\n 'subject' => 'Notice of Bank Transfer!',\n 'body' => 'Hi {sender_id},\n <br><br>You have transferred {amount} to the assigned bank.\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n [\n //Bank Transfer - ar\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n [\n //Bank Transfer - fr\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n [\n //Bank Transfer - pt\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n [\n //Bank Transfer - ru\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n [\n //Bank Transfer - es\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n [\n //Bank Transfer - tr\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n [\n //Bank Transfer - ch\n 'temp_id' => '3',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n //Received\n [\n //Received - en\n 'temp_id' => '2',\n 'subject' => 'Notice to Receive!',\n 'body' => 'Hi {receiver_id},\n <br><br>You have received {amount} from {sender_id}.\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n [\n //Received - ar\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n [\n //Received - fr\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n [\n //Received - pt\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n [\n //Received - ru\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n [\n //Received - es\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n [\n //Received - tr\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n [\n //Received - ch\n 'temp_id' => '2',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n //Request Payment Creation\n [\n //Request Payment Creation - en\n 'temp_id' => '4',\n 'subject' => 'Notice of Request Creation!',\n 'body' => 'Hi {acceptor},\n <br><br>Amount {amount} has been requested by {creator}.\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n [\n //Request Payment Creation - ar\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n [\n //Request Payment Creation - fr\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n [\n //Request Payment Creation - pt\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n [\n //Request Payment Creation - ru\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n [\n //Request Payment Creation - es\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n [\n //Request Payment Creation - tr\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n [\n //Request Payment Creation - ch\n 'temp_id' => '4',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n //Request Payment Acceptance\n [\n //Request Payment Acceptance - ne\n 'temp_id' => '5',\n 'subject' => 'Notice of Request Acceptance!',\n 'body' => 'Hi {creator},\n <br><br>Your request of #{uuid} of {amount} has been accepted by {acceptor}.\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n [\n //Request Payment Acceptance - ar\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n [\n //Request Payment Acceptance - fr\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n [\n //Request Payment Acceptance - pt\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n [\n //Request Payment Acceptance - ru\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n [\n //Request Payment Acceptance - es\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n [\n //Request Payment Acceptance - tr\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n [\n //Request Payment Acceptance - ch\n 'temp_id' => '5',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n // ---------------------------------------------------------\n\n //Status Change - Transfer\n [\n //Status Change - Transfer - en\n 'temp_id' => '6',\n 'subject' => 'Status of Transaction #{uuid} has been updated!',\n 'body' => 'Hi {sender_id/receiver_id},\n <br><br><b>\n Transfer #{uuid} has been updated to {status} by system administrator!</b>\n <br><br>\n {amount} is {added/subtracted} {from/to} your account.\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n [\n //Status Change - Transfer - ar\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n [\n //Status Change - Transfer - fr\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n [\n //Status Change - Transfer - pt\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n [\n //Status Change - Transfer - ru\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n [\n //Status Change - Transfer - es\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n [\n //Status Change - Transfer - tr\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n [\n //Status Change - Transfer - ch\n 'temp_id' => '6',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n\n //Status Change - Bank Transfer\n [\n //Status Change - Bank Transfer - en\n 'temp_id' => '7',\n 'subject' => 'Status of Transaction #{uuid} has been updated!',\n 'body' => 'Hi {sender_id},\n <br><br><b>\n Bank Transfer #{uuid} has been updated to {status} by system administrator!</b>\n <br><br>\n {amount} is {added/subtracted} {from/to} your account.\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n [\n //Status Change - Bank Transfer - ar\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n [\n //Status Change - Bank Transfer - fr\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n [\n //Status Change - Bank Transfer - pt\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n [\n //Status Change - Bank Transfer - ru\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n [\n //Status Change - Bank Transfer - es\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n [\n //Status Change - Bank Transfer - tr\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n [\n //Status Change - Bank Transfer - ch\n 'temp_id' => '7',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n //Status Change - Request Payment\n [\n //Status Change - Request Payment - en\n 'temp_id' => '8',\n 'subject' => 'Status of Transaction #{uuid} has been updated!',\n 'body' => 'Hi {user_id/receiver_id},\n <br><br><b>\n Transaction of Request Payment #{uuid} has been updated to {status} by system administrator!</b>\n <br><br>\n {amount} is {added/subtracted} {from/to} your account.\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n\n [\n //Status Change - Request Payment - ar\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n\n [\n //Status Change - Request Payment - fr\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n\n [\n //Status Change - Request Payment - pt\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n\n [\n //Status Change - Request Payment - ru\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n\n [\n //Status Change - Request Payment - es\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n\n [\n //Status Change - Request Payment - tr\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n [\n //Status Change - Request Payment - ch\n 'temp_id' => '8',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n //Status Change - Payout\n [\n //Status Change - Payout - en\n 'temp_id' => '10',\n 'subject' => 'Status of Transaction #{uuid} has been updated!',\n 'body' => 'Hi {user_id},\n <br><br><b>\n Transaction of Payout #{uuid} has been updated to {status} by system administrator!</b>\n <br><br>\n {amount} is {added/subtracted} {from/to} your account.\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n [\n //Status Change - Payout - ar\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n [\n //Status Change - Payout - fr\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n [\n //Status Change - Payout - pt\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n [\n //Status Change - Payout - ru\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n [\n //Status Change - Payout - es\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n [\n //Status Change - Payout - tr\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n [\n //Status Change - Payout - ch\n 'temp_id' => '10',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n //Status Change - Merchant Payment\n [\n //Status Change - Merchant Payment - en\n 'temp_id' => '14',\n 'subject' => 'Status of Transaction #{uuid} has been updated!',\n 'body' => 'Hi {paidByUser/merchantUser},\n <br><br><b>\n Transaction of Merchant Payment #{uuid} has been updated to {status} by system administrator!</b>\n <br><br>\n {amount} is {added/subtracted} {from/to} your account.\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n\n [\n //Status Change - Merchant Payment - ar\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n\n [\n //Status Change - Merchant Payment - fr\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n\n [\n //Status Change - Merchant Payment - pt\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n\n [\n //Status Change - Merchant Payment - ru\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n\n [\n //Status Change - Merchant Payment - es\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n\n [\n //Status Change - Merchant Payment - tr\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n\n [\n //Status Change - Merchant Payment - ch\n 'temp_id' => '14',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n // Merchant Payment\n // [\n // //Merchant Payment - en\n // 'subject' => 'Notice of Merchant Payment!',\n // 'body' => 'Hi {paidByUser/merchantUser},\n\n // <br><br><b>\n // The funds amount equal to {symbol}{amount} has been {sent/received} {from/to} your account</b>\n\n // <br><br><b><u><i>Here’s a brief overview of the payment:</i></u></b>\n\n // <br><br>Payment # {uuid} was created at {created_at}.\n\n // <br><br><b><u>{Merchant Id/Paid By}:</u></b> {merchant_id/user_id}\n\n // <br><br><b><u>Currency:</u></b> {currency_id}\n\n // <br><br><b><u>Payment Method:</u></b> {receiver_id}\n\n // <br><br><b><u>Fees:</u></b> {symbol}{fees}\n\n // <br><br><b><u>Amount:</u></b> {symbol}{amount}\n\n // <br><br>If you have any questions, please feel free to reply to this email.\n\n // <br><br>Regards,\n // <br><b>{soft_name}</b>',\n\n // 'lang' => 'en',\n // 'type' => 'sms',\n // 'language_id' => 1,\n // ],\n\n // [\n // //Merchant Payment - ar\n // 'temp_id' => '15',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ar',\n // 'type' => 'sms',\n // 'language_id' => 2,\n // ],\n\n // [\n // //Merchant Payment - fr\n // 'temp_id' => '15',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'fr',\n // 'type' => 'sms',\n // 'language_id' => 3,\n // ],\n\n // [\n // //Merchant Payment - pt\n // 'temp_id' => '15',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'pt',\n // 'type' => 'sms',\n // 'language_id' => 4,\n // ],\n\n // [\n // //Merchant Payment - ru\n // 'temp_id' => '15',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ru',\n // 'type' => 'sms',\n // 'language_id' => 5,\n // ],\n\n // [\n // //Merchant Payment - es\n // 'temp_id' => '15',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'es',\n // 'type' => 'sms',\n // 'language_id' => 6,\n // ],\n\n // [\n // //Merchant Payment - tr\n // 'temp_id' => '15',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'tr',\n // 'type' => 'sms',\n // 'language_id' => 7,\n // ],\n\n // Status Change - Request Payment (for Pending/Cancel)\n [\n //Request Payment - en\n 'temp_id' => '16',\n 'subject' => 'Status of Transaction #{uuid} has been updated!',\n 'body' => 'Hi {user_id/receiver_id},\n <br><br><b>\n Transaction of Request Payment #{uuid} has been updated to {status} by system administrator!</b>\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n\n [\n //Request Payment - ar\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n\n [\n //Request Payment - fr\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n\n [\n //Request Payment - pt\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n\n [\n //Request Payment - ru\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n\n [\n //Request Payment - es\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n\n [\n //Request Payment - tr\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n\n [\n //Request Payment - ch\n 'temp_id' => '16',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n\n /**\n * Not needeed - told by boss on - 5/9/2018\n */\n //Ticket\n [\n //Ticket - en\n 'temp_id' => '11',\n 'subject' => 'Notice of Ticket!',\n 'body' => 'Hi {assignee/user},\n <br><br>Ticket #{ticket_code} was {assigned/created} {to/for} you by the system administrator.\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n [\n //Ticket - ar\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n [\n //Ticket - fr\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n [\n //Ticket - pt\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n [\n //Ticket - ru\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n [\n //Ticket - es\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n [\n //Ticket - tr\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n [\n //Ticket - ch\n 'temp_id' => '11',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n //Ticket Reply\n [\n //Ticket Reply - en\n 'temp_id' => '12',\n 'subject' => 'Notice of Ticket Reply!',\n 'body' => 'Hi {user},\n <br><br>The system administrator has replied to your assigned ticket # {ticket_code).\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n [\n //Ticket Reply - ar\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n [\n //Ticket Reply - fr\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n [\n //Ticket Reply - pt\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n [\n //Ticket Reply - ru\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n [\n //Ticket Reply - es\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n [\n //Ticket Reply - tr\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n [\n //Ticket Reply - ch\n 'temp_id' => '12',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n //Dispute Reply\n [\n //Dispute Reply - en\n 'temp_id' => '13',\n 'subject' => 'Notice of Dispute Reply!',\n 'body' => 'Hi {user},\n <br><br>The system administrator has replied to your dispute for transaction # {transaction_id).\n ',\n 'lang' => 'en',\n 'type' => 'sms',\n 'language_id' => 1,\n ],\n [\n //Dispute Reply - ar\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'sms',\n 'language_id' => 2,\n ],\n [\n //Dispute Reply - fr\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'sms',\n 'language_id' => 3,\n ],\n [\n //Dispute Reply - pt\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'sms',\n 'language_id' => 4,\n ],\n [\n //Dispute Reply - ru\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'sms',\n 'language_id' => 5,\n ],\n [\n //Dispute Reply - es\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'sms',\n 'language_id' => 6,\n ],\n [\n //Dispute Reply - tr\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'sms',\n 'language_id' => 7,\n ],\n [\n //Dispute Reply - ch\n 'temp_id' => '13',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'sms',\n 'language_id' => 8,\n ],\n\n // Deposit Notification - Admin\n [\n // Deposit - en\n 'temp_id' => '23',\n 'subject' => 'Notice of Deposit Notification!',\n 'body' => 'Hi,\n <br><br>Amount {amount} was deposited by {user}.\n\n <br><br><b><u><i>Here’s a brief overview of the Deposit:</i></u></b>\n\n <br><br><b><u>Created at:</u></b> {created_at}\n\n <br><br><b><u>Transaction ID:</u></b> {uuid}\n\n <br><br><b><u>Currency:</u></b> {code}\n\n <br><br><b><u>Amount:</u></b> {amount}\n\n <br><br><b><u>Fee:</u></b> {fee}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n // Deposit - ar\n 'temp_id' => '23',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n // Deposit - fr\n 'temp_id' => '23',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n // Deposit - pt\n 'temp_id' => '23',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n // Deposit - ru\n 'temp_id' => '23',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n // Deposit - es\n 'temp_id' => '23',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n // Deposit - tr\n 'temp_id' => '23',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n // Deposit - ch\n 'temp_id' => '23',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n // Payout Notification - Admin\n [\n // Payout - en\n 'temp_id' => '24',\n 'subject' => 'Notice of Payout Notification!',\n 'body' => 'Hi,\n <br><br>Amount {amount} was payout by {user}.\n\n <br><br><b><u><i>Here’s a brief overview of the Payout:</i></u></b>\n\n <br><br><b><u>Created at:</u></b> {created_at}\n\n <br><br><b><u>Transaction ID:</u></b> {uuid}\n\n <br><br><b><u>Currency:</u></b> {code}\n\n <br><br><b><u>Amount:</u></b> {amount}\n\n <br><br><b><u>Fee:</u></b> {fee}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n // Payout - ar\n 'temp_id' => '24',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n // Payout - fr\n 'temp_id' => '24',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n // Payout - pt\n 'temp_id' => '24',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n // Payout - ru\n 'temp_id' => '24',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n // Payout - es\n 'temp_id' => '24',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n // Payout - tr\n 'temp_id' => '24',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n // Payout - ch\n 'temp_id' => '24',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n // Echange Notification - Admin\n [\n // Transfer - en\n 'temp_id' => '25',\n 'subject' => 'Notice of Exchange Notification!',\n 'body' => 'Hi,\n <br><br>Amount {amount} was exchanged by {user}.\n\n <br><br><b><u><i>Here’s a brief overview of the Exchange:</i></u></b>\n\n <br><br><b><u>Created at:</u></b> {created_at}\n\n <br><br><b><u>Transaction ID:</u></b> {uuid}\n\n <br><br><b><u>From wallet:</u></b> {from_wallet}\n\n <br><br><b><u>To wallet:</u></b> {to_wallet}\n\n <br><br><b><u>Amount:</u></b> {amount}\n\n <br><br><b><u>Fee (deducted from {from_wallet}):</u></b> {fee}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n // Exchange - ar\n 'temp_id' => '25',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n // Exchange - fr\n 'temp_id' => '25',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n // Exchange - pt\n 'temp_id' => '25',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n // Exchange - ru\n 'temp_id' => '25',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n // Exchange - es\n 'temp_id' => '25',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n // Exchange - tr\n 'temp_id' => '25',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n // Exchange - ch\n 'temp_id' => '25',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n // Transfer Notification - Admin\n [\n // Transfer - en\n 'temp_id' => '26',\n 'subject' => 'Notice of Transfer Notification!',\n 'body' => 'Hi,\n <br><br>Amount {amount} was sent by {sender} to {receiver}.\n\n <br><br><b><u><i>Here’s a brief overview of the Transfer:</i></u></b>\n\n <br><br><b><u>Created at:</u></b> {created_at}\n\n <br><br><b><u>Transaction ID:</u></b> {uuid}\n\n <br><br><b><u>Sent By:</u></b> {sender}\n\n <br><br><b><u>Received By:</u></b> {receiver}\n\n <br><br><b><u>Amount:</u></b> {amount}\n\n <br><br><b><u>Fee (deducted from {sender}):</u></b> {fee}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n // Transfer - ar\n 'temp_id' => '26',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n // Transfer - fr\n 'temp_id' => '26',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n // Transfer - pt\n 'temp_id' => '26',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n // Transfer - ru\n 'temp_id' => '26',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n // Transfer - es\n 'temp_id' => '26',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n // Transfer - tr\n 'temp_id' => '26',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n // Transfer - ch\n 'temp_id' => '26',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n // // Request Creation Notification - Admin\n // [\n // // Request Creation - en\n // 'temp_id' => '27',\n // 'subject' => 'Notice of Request Creation Notification!',\n // 'body' => 'Hi,\n // <br><br>Amount {amount} was requested by {creator} to {acceptor}.\n\n // <br><br><b><u><i>Here’s a brief overview of the Request Creation:</i></u></b>\n\n // <br><br><b><u>Created at:</u></b> {created_at}\n\n // <br><br><b><u>Transaction ID:</u></b> {uuid}\n\n // <br><br><b><u>Currency:</u></b> {code}\n\n // <br><br><b><u>Requested By:</u></b> {creator}\n\n // <br><br><b><u>Requested To:</u></b> {acceptor}\n\n // <br><br><b><u>Amount:</u></b> {amount}\n\n // <br><br>If you have any questions, please feel free to reply to this email.\n // <br><br>Regards,\n // <br><b>{soft_name}</b>\n // ',\n // 'lang' => 'en',\n // 'type' => 'email',\n // 'language_id' => 1,\n // ],\n // [\n // // Request Creation - ar\n // 'temp_id' => '27',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ar',\n // 'type' => 'email',\n // 'language_id' => 2,\n // ],\n // [\n // // Request Creation - fr\n // 'temp_id' => '27',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'fr',\n // 'type' => 'email',\n // 'language_id' => 3,\n // ],\n // [\n // // Request Creation - pt\n // 'temp_id' => '27',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'pt',\n // 'type' => 'email',\n // 'language_id' => 4,\n // ],\n // [\n // // Request Creation - ru\n // 'temp_id' => '27',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ru',\n // 'type' => 'email',\n // 'language_id' => 5,\n // ],\n // [\n // // Request Creation - es\n // 'temp_id' => '27',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'es',\n // 'type' => 'email',\n // 'language_id' => 6,\n // ],\n // [\n // // Request Creation - tr\n // 'temp_id' => '27',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'tr',\n // 'type' => 'email',\n // 'language_id' => 7,\n // ],\n // [\n // // Request Creation - ch\n // 'temp_id' => '27',\n // 'subject' => '',\n // 'body' => '',\n // 'lang' => 'ch',\n // 'type' => 'email',\n // 'language_id' => 8,\n // ],\n\n // Request Acceptance Notification - Admin\n [\n // Request Acceptance - en\n 'temp_id' => '27',\n 'subject' => 'Notice of Request Acceptance Notification!',\n 'body' => 'Hi,\n <br><br>The request #{uuid} from {creator} was accepted by {acceptor}.\n\n <br><br><b><u><i>Here’s a brief overview of the Request Acceptance:</i></u></b>\n\n <br><br><b><u>Created at:</u></b> {created_at}\n\n <br><br><b><u>Transaction ID:</u></b> {uuid}\n\n <br><br><b><u>Currency:</u></b> {code}\n\n <br><br><b><u>Requested By:</u></b> {creator}\n\n <br><br><b><u>Accepted By:</u></b> {acceptor}\n\n <br><br><b><u>Requested Amount:</u></b> {request_amount}\n\n <br><br><b><u>Given Amount:</u></b> {given_amount}\n\n <br><br><b><u>Fee (deducted from {acceptor}):</u></b> {fee}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n // Request Acceptance - ar\n 'temp_id' => '27',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n // Request Acceptance - fr\n 'temp_id' => '27',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n // Request Acceptance - pt\n 'temp_id' => '27',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n // Request Acceptance - ru\n 'temp_id' => '27',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n // Request Acceptance - es\n 'temp_id' => '27',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n // Request Acceptance - tr\n 'temp_id' => '27',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n // Request Acceptance - ch\n 'temp_id' => '27',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n // Payment Notification - Admin\n [\n // Payment - en\n 'temp_id' => '28',\n 'subject' => 'Notice of Payment Notification!',\n 'body' => 'Hi,\n <br><br>Amount {amount} was paid by {user} to {merchant}.\n\n <br><br><b><u><i>Here’s a brief overview of the Payment:</i></u></b>\n\n <br><br><b><u>Created at:</u></b> {created_at}\n\n <br><br><b><u>Transaction ID:</u></b> {uuid}\n\n <br><br><b><u>Currency:</u></b> {code}\n\n <br><br><b><u>Paid By:</u></b> {user}\n\n <br><br><b><u>Paid To:</u></b> {merchant}\n\n <br><br><b><u>Amount:</u></b> {amount}\n\n <br><br><b><u>Fee (deducted from {merchant}):</u></b> {fee}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n // Payment - ar\n 'temp_id' => '28',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n // Payment - fr\n 'temp_id' => '28',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n // Payment - pt\n 'temp_id' => '28',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n // Payment - ru\n 'temp_id' => '28',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n // Payment - es\n 'temp_id' => '28',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n // Payment - tr\n 'temp_id' => '28',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n // Payment - ch\n 'temp_id' => '28',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n // User Status Change\n [\n // User Status - en\n 'temp_id' => '29',\n 'subject' => 'Notice of Status Change!',\n 'body' => 'Hi {user},\n <br><br>Your status has been changed to <b>{status}</b> by the System Administrator\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>.',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n // User Status - ar\n 'temp_id' => '29',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n // User Status - fr\n 'temp_id' => '29',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n // User Status - ch\n 'temp_id' => '29',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n // User Status - ru\n 'temp_id' => '29',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n // User Status - es\n 'temp_id' => '29',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n // User Status - tr\n 'temp_id' => '29',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n // User Status - ch\n 'temp_id' => '29',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n\n // Deposit - en - via System Administrator\n [\n 'temp_id' => '30',\n 'subject' => 'Notice of Deposit via System Administrator!',\n 'body' => 'Hi,\n <br><br>Amount {amount} was deposited by System Administrator.\n\n <br><br><b><u><i>Here’s a brief overview of the Deposit:</i></u></b>\n\n <br><br><b><u>Created at:</u></b> {created_at}\n\n <br><br><b><u>Transaction ID:</u></b> {uuid}\n\n <br><br><b><u>Currency:</u></b> {code}\n\n <br><br><b><u>Amount:</u></b> {amount}\n\n <br><br><b><u>Fee:</u></b> {fee}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n 'temp_id' => '30',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n 'temp_id' => '30',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n 'temp_id' => '30',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n 'temp_id' => '30',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n 'temp_id' => '30',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n 'temp_id' => '30',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n 'temp_id' => '30',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n\n // Payout - en - via System Administrator\n [\n 'temp_id' => '31',\n 'subject' => 'Notice of Payout via System Administrator!',\n 'body' => 'Hi,\n <br><br>Amount {amount} was withdrawn by System Administrator.\n\n <br><br><b><u><i>Here’s a brief overview of the Deposit:</i></u></b>\n\n <br><br><b><u>Created at:</u></b> {created_at}\n\n <br><br><b><u>Transaction ID:</u></b> {uuid}\n\n <br><br><b><u>Currency:</u></b> {code}\n\n <br><br><b><u>Amount:</u></b> {amount}\n\n <br><br><b><u>Fee:</u></b> {fee}\n\n <br><br>If you have any questions, please feel free to reply to this email.\n <br><br>Regards,\n <br><b>{soft_name}</b>\n ',\n 'lang' => 'en',\n 'type' => 'email',\n 'language_id' => 1,\n ],\n [\n 'temp_id' => '31',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ar',\n 'type' => 'email',\n 'language_id' => 2,\n ],\n [\n 'temp_id' => '31',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'fr',\n 'type' => 'email',\n 'language_id' => 3,\n ],\n [\n 'temp_id' => '31',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'pt',\n 'type' => 'email',\n 'language_id' => 4,\n ],\n [\n 'temp_id' => '31',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ru',\n 'type' => 'email',\n 'language_id' => 5,\n ],\n [\n 'temp_id' => '31',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'es',\n 'type' => 'email',\n 'language_id' => 6,\n ],\n [\n 'temp_id' => '31',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'tr',\n 'type' => 'email',\n 'language_id' => 7,\n ],\n [\n 'temp_id' => '31',\n 'subject' => '',\n 'body' => '',\n 'lang' => 'ch',\n 'type' => 'email',\n 'language_id' => 8,\n ],\n ]);\n }", "public function run()\n {\n for($i=1; $i<=18; $i++)\n {\n User::create(\n [\n 'email' => 'nightmarket'.$i.'@atmtllc.com',\n 'password' => bcrypt('password'),\n 'subscribed' => '1',\n 'name' => 'Night Market Account #'.$i,\n 'username' => 'nm'.$i,\n ]);\n echo \"Created account number \" . $i .\"!\\r\\n\";\n }\n }", "public function lsvt_api_can_bulk_deduct_points_from_multiple_users_in_one_call()\n {\n //\n }", "private function Sendall($ids)\n {\n\t$success = true;\n foreach($ids as $id){\n if(!$this->sendinvoice($id)) $success = false;\n }\n if($success) Yii::$app->session->setFlash('success', 'Emails was send');\n\treturn $this->redirect(Yii::$app->request->referrer);\n }", "public function run()\n {\n for($i = 0; $i < 100; $i++) {\n $member = factory(\\App\\Member::class)->create();\n $nbPhones = rand (0, 3);\n $phones = factory(\\App\\Phone::class, $nbPhones)->make();\n foreach($phones as $phone) {\n $member->phones()->save($phone);\n }\n $nbAddresses = rand (0, 2);\n $addresses = factory(\\Lecturize\\Addresses\\Models\\Address::class, $nbAddresses)->make();\n $member->saveAddresses($addresses->toArray());\n }\n }", "protected function execute($arguments = array(), $options = array())\r\n {\r\n $databaseManager = new sfDatabaseManager($this->configuration);\r\n $connection = $databaseManager->getDatabase($options['connection'])->getConnection();\r\n\r\n $this->log('mailer on...');\r\n while(true)\r\n {\r\n $this->log('----------------------------------------------------------');\r\n\r\n if($mb_mail_list = MbMailPeer::getPendientes())\r\n {\r\n foreach($mb_mail_list as $mb_mail)\r\n {\r\n MbWorker::setActive($mb_mail->getId());\r\n\r\n $mb_mail->reload();\r\n\r\n if(!$mb_mail->getToken())\r\n {\r\n //$token = uniqid(null, true);\r\n $mb_mail->setToken(sha1(rand(111111,999999) . $mb_mail->getSubject()));\r\n $mb_mail->save();\r\n }\r\n\r\n $this->log('Procesando email: ' . $mb_mail->getSubject() . ' (batch size: ' . $mb_mail->getBatchSize() . ')');\r\n\r\n if($next_recipients = $mb_mail->getNextRecipients())\r\n {\r\n foreach($next_recipients as $i => $mb_mailto)\r\n {\r\n if($i%2 == 0)\r\n $mb_mail->reload();\r\n\r\n MbWorker::setActiveRecipient($mb_mailto->getId());\r\n\r\n if($mb_mail->getState() == 'stop')\r\n {\r\n $this->log('-- !!Correo detenido desde aplicacion');\r\n break;\r\n }\r\n\r\n $this->log('- Enviando a: ' . $mb_mailto->getMailto());\r\n\r\n if(!$mb_mail->send($mb_mailto))\r\n {\r\n $this->log('-- Correo con errores');\r\n break;\r\n }\r\n\r\n sleep(1);\r\n }\r\n MbWorker::setActiveRecipient(0);\r\n }\r\n\r\n if($mb_mail->getState() != 'stop' && !$mb_mail->hasMoreRecipients())\r\n {\r\n $this->log('-- Termino de envio de ' . $mb_mail->getSubject());\r\n\r\n $mb_mail->setState('ok');\r\n $mb_mail->save();\r\n $mb_mail->notifyIfNecessary();\r\n }\r\n MbWorker::setActive(0);\r\n }\r\n\r\n }\r\n else\r\n {\r\n $this->log('No hay mails para enviar');\r\n break;\r\n }\r\n }\r\n $this->log('mailer off...');\r\n }", "public function send()\n {\n $bulk = [];\n\n $time = date('Y-m-d H:i:s');\n\n //$recipients = $this->recepientsToArray( $this->recipients);\n\n foreach( $this->recipients as $recipient)\n {\n if ( ! in_array( $recipient, $this->exclude) )\n {\n $details = [\n 'recipient' => $recipient,\n 'sender' => Auth::id(),\n 'message' => $this->message,\n 'reply_to' => $this->replyTo,\n 'created_at' => $time,\n 'updated_at' => $time\n ];\n\n $bulk[] = $details;\n }\n }\n\n $message = InAppModel::insert($bulk);\n\n if( ! $message )\n {\n throw new \\Exception(\"error sending message\");\n }\n\n return true;\n\n\n\n }", "public function run()\n {\n $count = UserMembreship::all()->count();\n for ($i=1; $i <= $count; $i++) { \n Wallet::factory()->create(['id_user_membreship' => $i]);\n }\n }", "public function run()\n {\n for($i = 0; $i < 100000; $i++) {\n Contact::create([\n 'avatar' => 1, \n 'first_name' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestib',\n 'last_name' =>'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestib', \n 'address' =>'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestib', \n 'city'=>'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestib', \n 'zip'=>'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestib', \n 'country'=>'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestib', \n 'email'=>'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestib', \n 'phone'=>'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestib', \n 'note'=>'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestib', \n 'groups_id'=>'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestib',\n ]);\n\n Groups::create([\n 'group_name' =>'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestib' , \n 'detail' =>'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestib',\n ]);\n }\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n // $faker->addProvider(new \\Bezhanov\\Faker\\Provider\\Commerce($faker));\n\n foreach (range(1, 2000) as $index) {\n Subscriber::create([\n 'user_id' => $faker->numberBetween($min = 1, $max = 10),\n 'email' => $faker->email,\n 'name' => $faker->name,\n ]);\n }\n }", "protected function createMultiple($total, array $customValues = array())\n {\n for ($i = 1; $i <= $total; ++$i) {\n $this->create($customValues);\n }\n }", "public function run()\n {\n $users = User::all();\n \n $users->each(function($user) {\n $user->contacts()->createMany(Contact::factory(10)->make()->toArray());\n \n });\n\n }", "public function CreateEmails($Payload){\n\t\t\tif(empty($Payload['id'])){\n\t\t\t\tthrow new Exception('id can not be empty.');\n\t\t\t}\n\t\t\tif(empty($Payload['Body'])){\n\t\t\t\tthrow new Exception('body can not be empty.');\n\t\t\t}\n\t\t\t$Payload['Verb']='POST';\n\t\t\t$Payload['URL']='/V1/creditmemo/'.$Payload['id'].'/emails';\n\t\t\t$Payload['Body']=json_encode($Payload['Body']);\n\t\t\treturn $this->Execute($Payload);\n\t\t}", "public function run()\n {\n $transfer = ['bca','mandiri','bni','bri'];\n $faker = Faker\\Factory::create('id_ID');\n foreach (range(1,300) as $i){\n $reservasi = new \\App\\Reservasi();\n $reservasi->nama = $faker->name('male');\n $reservasi->email = $faker->freeEmail;\n $reservasi->no_telp = $faker->phoneNumber;\n $reservasi->status = rand(0,2);\n $reservasi->transfer_to = $transfer[rand(0,2)];\n $reservasi->total = 599000;\n $reservasi->created_at = $this->randomDate('2017-01-01 00:00:00','2017-12-31 00:00:00');\n $reservasi->save();\n }\n }", "public function run()\n {\n Sp_batch::insert([\n \t\t'batch'=>'1',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'2',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'3',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'4',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'5',\n ]);\n }", "protected function _prepareEnvelopes(array $recipients, $seed) {}", "public function actionCreate()\n {\n $model = new Transfer();\n $model->from = Yii::$app->request->get('user_id');\n $autocomplete = [];\n $users = User::find()->all();\n foreach( $users as $user) :\n $autocomplete[] = $user->username;\n endforeach;\n\n if ($model->load(Yii::$app->request->post())) {\n $transaction = Yii::$app->getDb()->beginTransaction();\n try{\n $model->created_at = time('U');\n // if transition is for the non-existing user\n if (!User::find()->where(['username' => $model->to])->exists()) :\n (new User([\n 'username' => $model->to,\n 'created_at' => date('U'),\n ]))->save();\n endif;\n $model->to = User::find()->where(['username' => $model->to])->one()->id;\n $model->save();\n // decreasing sender's balance\n $balance_sender = Balance::find()->where(['user_id' => $model->from])->one();\n $balance_sender->balance = $balance_sender->balance - $model->amount;\n $balance_sender->modified_at = date('U');\n $balance_sender->save();\n // increasing receiver's balance\n if(!Balance::find()->where(['user_id' => $model->to])->exists()) :\n (new Balance([\n 'user_id' => $model->to,\n 'balance' => $model->amount,\n 'modified_at' => date('U'),\n ]))->save();\n else :\n $balance_receiver = Balance::find()->where(['user_id' => $model->to])->one();\n $balance_receiver->balance = $balance_receiver->balance + $model->amount;\n $balance_receiver->modified_at = date('U');\n $balance_receiver->save();\n endif;\n $transaction->commit();\n } catch (Exception $e) {\n $transaction->rollBack();\n throw new $e;\n }\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'autocomplete' => $autocomplete,\n ]);\n }\n }", "private function SaveMultipleShippingAddresses()\n\t{\n\t\t// Split shipping only works for signed in users\n\t\tif(!CustomerIsSignedIn()) {\n\t\t\tredirect(getConfig('ShopPath').'/checkout.php?action=checkout');\n\t\t}\n\n\t\t// If split shipping is not available, take the customer back to the shipping address selection page\n\t\tif(!gzte11(ISC_MEDIUMPRINT) || !GetConfig('MultipleShippingAddresses') || !isset($_POST['multiaddress'])) {\n\t\t\tredirect(getConfig('ShopPath').'/checkout.php?action=choose_shipping_address&type=single');\n\t\t}\n\n\t\t$silent = false;\n\t\tif(isset($_POST['addAnotherAddress'])) {\n\t\t\t$silent = true;\n\t\t}\n\n\t\t$customerAddresses = getClass('ISC_CUSTOMER')\n\t\t\t->getCustomerShippingAddresses();\n\n\t\t$quoteItems = $this->getQuote()->getItems();\n\t\t$addressItems = array();\n\t\tforeach($quoteItems as $item) {\n\t\t\t// Digital items aren't shipped\n\t\t\tif($item->isDigital()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If we don't have an address for this product, we need to throw back to the address\n\t\t\t// selection page, as they've done something dodgy.\n\t\t\t$quantity = $item->getQuantity();\n\t\t\t$itemId = $item->getId();\n\t\t\tfor($i = 1; $i <= $quantity; ++$i) {\n\t\t\t\t$id = $itemId.'_'.$i;\n\t\t\t\tif(!isset($_POST['multiaddress'][$id]) ||\n\t\t\t\t\t!isset($customerAddresses[$_POST['multiaddress'][$id]]) && $silent == false) {\n\t\t\t\t\t\tredirect(GetConfig('ShopPath').'/checkout.php?action=choose_shipping_address&type=single');\n\t\t\t\t}\n\n\t\t\t\t$customerAddressId = $customerAddresses[$_POST['multiaddress'][$id]]['shipid'];\n\t\t\t\tif(!isset($addressItems[$customerAddressId])) {\n\t\t\t\t\t$addressItems[$customerAddressId] = array();\n\t\t\t\t}\n\t\t\t\tif(!isset($addressItems[$customerAddressId][$itemId])) {\n\t\t\t\t\t$addressItems[$customerAddressId][$itemId] = 0;\n\t\t\t\t}\n\t\t\t\t++$addressItems[$customerAddressId][$itemId];\n\t\t\t}\n\t\t}\n\n\t\t// Remove all shipping addresses on the order and start fresh\n\t\t$this->getQuote()->setIsSplitShipping(true);\n\t\t$this->getQuote()->removeAllShippingAddresses();\n\n\t\t$updatedItems = array();\n\t\t$first = true;\n\t\tforeach($addressItems as $addressId => $items) {\n\t\t\t$address = getClass('ISC_ACCOUNT')->getShippingAddress($addressId,\n\t\t\t\tgetClass('ISC_CUSTOMER')->getCustomerId()\n\t\t\t);\n\n\t\t\t// Invalid address was selected\n\t\t\tif(!$address) {\n\t\t\t\tredirect(GetConfig('ShopPath').'/checkout.php?action=choose_shipping_address&type=single');\n\t\t\t}\n\n\t\t\t// First iteration should use existing shipping address\n\t\t\tif($first) {\n\t\t\t\t$quoteShippingAddress = $this->getQuote()->getShippingAddress();\n\t\t\t\t$first = false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$quoteShippingAddress = new ISC_QUOTE_ADDRESS_SHIPPING;\n\t\t\t\t$quoteShippingAddress->setQuote($this->getQuote());\n\t\t\t\t$this->getQuote()->addShippingAddress($quoteShippingAddress);\n\t\t\t}\n\n\t\t\t$quoteShippingAddress->setAddressByArray($address);\n\n\t\t\t// If the address has custom fields, load those in too\n\t\t\tif($address['shipformsessionid']) {\n\t\t\t\t$formFields = $GLOBALS['ISC_CLASS_FORM']->getSavedSessionData(\n\t\t\t\t\t$address['shipformsessionid'],\n\t\t\t\t\tarray(),\n\t\t\t\t\tFORMFIELDS_FORM_ADDRESS\n\t\t\t\t);\n\t\t\t\t$quoteShippingAddress->setCustomFields($formFields);\n\t\t\t}\n\n\t\t\t$quoteAddressId = $quoteShippingAddress->getId();\n\t\t\tforeach($items as $itemId => $qty) {\n\t\t\t\t$item = $this->getQuote()->getItemById($itemId);\n\t\t\t\tif(!in_array($itemId, $updatedItems)) {\n\t\t\t\t\t$item->setAddressId($quoteAddressId);\n\t\t\t\t\t$item->setQuantity($qty, false);\n\t\t\t\t\t$updatedItems[] = $itemId;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$newItem = clone $item;\n\t\t\t\t\t$newItem->setQuantity($qty, false);\n\t\t\t\t\t$newItem->setAddressId($quoteAddressId);\n\t\t\t\t\t$this->getQuote()->addItem($newItem, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Do we need to go to the add address page?\n\t\tif(isset($_POST['addAnotherAddress'])) {\n\t\t\t$this_page = urlencode(\"checkout.php?action=choose_shipping_address\");\n\t\t\tredirect(getConfig('ShopPath').'/account.php?action=add_shipping_address&from='.$this_page);\n\t\t}\n\n\t\t// OK, the shipping method has been set, move on to the next step\n\t\tredirect(getConfig('ShopPath').'/checkout.php?action=choose_shipper');\n\t}", "public function run()\n {\n $numOfUsers = 10;\n for ($i = 1; $i <= $numOfUsers; $i++){\n User::query()->create([\n 'name' => \"User $i \" . str_random(10),\n 'balance' => rand(0,10000)\n ]);\n }\n }", "function send_template_sms_to_multiple($template_id,$to,$variables, $from=null){ \n //$to is a comma-separated string of valid numbers\n if($from && strlen($from)>11){\n $from = substr($from,0,11);\n }\n $url = $this->api_base_url.\"/templates/$template_id?app_id=\".$this->app_id.\"&app_secret=\".base64_encode($this->app_secret);\n $data = $variables;\n $data['to'] = $to;\n $data['from']= $from;\n $this->result = $this->send_request($url, \"POST\", [],$data, true);\n return ($this->result->success && $this->result->message==\"MESSAGE SENT.\");\n }", "public function getAllRecipients() {}", "public function mandrill_test(){\n\t\t\n\t\t$this->load->library('library_bulk_email', '', 'library_bulk_email');\n\t\t\n\t\t$test_users = array(\n\t\t\t'Casey Flynn' => 'casey_flynn@cobarsystems.com',\n\t\t\t'Casey Flynn1' => 'casey_flynn@clubbingowl.com',\n\t\t\t'Casey Flynn2' => 'casey_flynn@cobarsystems.com',\n\t\t\t'Casey Flynn3' => 'casey_flynn@clubbingowl.com'\n\t\t);\n\t\t\n\t\t\t\t\n\t\tforeach($test_users as $key => $email){\n\t\t\t\n\t\t\t$this->library_bulk_email->add_queue(array(\n\t\t\t\t'html'\t\t=> '<p>This is a test</p>',\n\t\t\t\t'text'\t\t=> 'This is a test',\n\t\t\t\t'subject'\t=> 'Email test from ClubbingOwl',\n\t\t\t\t'to_email'\t=> $email, \n\t\t\t\t'to_name'\t=> $key,\n\t\t\t));\n\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t$this->library_bulk_email->flush_queue();\n\t\t\n\t\techo 'complete' . PHP_EOL;\t\t\t\n\t\t\n\t}", "public function createTransactionMultiCredit(Array $params)\n {\n $res = $this->watchRequest(function () use ($params) {\n return $this->soapClient->createTransaction([\n 'auth' => $this->auth->toArray(),\n 'transaction' => $params\n ]);\n });\n\n return $res;\n }", "function insert($i) {\r\n $this->ds->partner_id[$i] = $this->ds->partner_id[$i] == ''? $_SESSION['login_user']: $this->ds->partner_id[$i];\r\n $partner_id = strtoupper($this->ds->partner_id[$i]); # get partner id\r\n $seq_gen = instantiate_module('seq_gen');\r\n $seq_number = $seq_gen->get_next_number('PROJECTID_'.$partner_id);\r\n $seq_number = sprintf('%03d', $seq_number); #zero padded length 3\r\n $this->ds->project_id[$i] = $partner_id.'-'.date('ymd').'-'.$seq_number;\r\n\r\n # set invitation expiration date\r\n $nowunix = time();\r\n $now = date(\"Y-m-d H:i:s\",$nowunix);\r\n $this->ds->create_date[$i] = $now;\r\n $this->ds->po1_exp_date[$i] = date(\"Y-m-d H:i:s\",$nowunix + $this->invitation_duration_po1);\r\n $this->ds->po2_exp_date[$i] = date(\"Y-m-d H:i:s\",$nowunix + $this->invitation_duration_po1 + $this->invitation_duration_po2);\r\n #~ $this->ds->po3_exp_date[$i] = date(\"Y-m-d H:i:s\",$nowunix + $this->invitation_duration_po1 + $this->invitation_duration_po2 + $this->invitation_duration_po3);\r\n $this->ds->po_stage[$i] = 1;\r\n $this->ds->email_cookie[$i] = md5($nowunix);\r\n $this->ds->status[$i] = 'waiting for po1';\r\n\r\n $ret = parent::insert($i);\r\n\r\n # send success email to partner\r\n $partner = instantiate_module('partner');\r\n $row = $partner->get_row(array('partner_id'=>$partner_id));\r\n assert($row);\r\n $row['email'];\r\n\r\n # get email\r\n $h = array();\r\n $h['from'] = $GLOBALS['mail_from'];\r\n $h['to'] = $row['email'];\r\n $h['subject'] = 'Thank you for entering new project';\r\n $h['body'] = <<<__END__\r\nThank you for entering new project. Here are some details:\r\n\r\nRegistration Number: {$this->ds->project_id[$i]}\r\nProject Name: {$this->ds->name[$i]}\r\nTotal: {$this->ds->total[$i]} (in 000 USD)\r\nList Price: {$this->ds->list_price[$i]} (in 000 USD)\r\n\r\nYour project will be reviewed by Cisco personnels, and we will contact you shortly.\r\n\r\n--\r\n admin\r\n\r\n__END__;\r\n #~ print_r($h);\r\n supermailer($h);\r\n\r\n $this->send_invitation('po1',$i);\r\n\r\n return $ret;\r\n }", "public function inviteUser()\r\n {\r\n Invite::instance()->from(Yii::$app->user->getIdentity())->about($this)->sendBulk($this->participantUsers);\r\n }", "public function run()\n {\n $elements = [\n ['from_id' => 1, 'to_id' => 2, 'details' => 'sample transaction', 'amount' => 14],\n ['from_id' => 1, 'to_id' => 2, 'details' => 'sample transaction 2', 'amount' => 24],\n ['from_id' => 2, 'to_id' => 1, 'details' => 'sample transaction 3', 'amount' => 15],\n ];\n foreach($elements as $element){\n $item = new \\App\\Transaction();\n $item->from_id = $element['from_id'];\n $item->to_id = $element['to_id'];\n $item->details = $element['details'];\n $item->amount = $element['amount'];\n $item->save();\n }\n }", "public function testSendInvoiceToBatchOnSendMessageBatchCallable()\n {\n $validator = new InvoiceValidator();\n $successInvoice = Invoice::load($this->getValidInvoiceData()[0], $validator);\n $failedInvoice = Invoice::load($this->getValidInvoiceData()[1], $validator);\n\n $results = [\n # Result for GetQueueUrl command\n new Result(['QueueUrl' => 'my-queue-url']),\n # Result for SendMessageBatch command for first batch of 10\n new Result([\n 'Successful' => [0 => ['Id' => $successInvoice->getInvoiceId()]],\n 'Failed' => [0 => ['Id' => $failedInvoice->getInvoiceId()]]\n ])\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n\n # Use SqsQueueCallbackTester to test the callback\n $callbackTester = new SqsQueueCallbackTester();\n $sqsQueue->setOnSendMessageBatchCallback($callbackTester);\n\n $sqsQueue\n ->sendInvoiceToBatch($successInvoice, $validator)\n ->sendInvoiceToBatch($failedInvoice, $validator);\n\n # Destroy the object. This should trigger the final batch send.\n unset($sqsQueue);\n\n # Confirm that the successful and failed invoices were passed to the\n # SqsQueueCallbackTester instance\n $this->assertEquals(1, count($callbackTester->successfulInvoices));\n $this->assertEquals($successInvoice, $callbackTester->successfulInvoices[0]);\n $this->assertEquals(1, count($callbackTester->failedInvoices));\n $this->assertEquals($failedInvoice, $callbackTester->failedInvoices[0]);\n\n # Confirm the stack is empty (ie. that the API calls HAVE been made)\n $this->assertEquals(0, $this->getAwsMockHandlerStackCount());\n }", "public function actionCreate()\n {\n $model = new Transfer();\n $modelTransaction = new Transactions();\n $modelPerson = Person::find()->where(['userid'=>Yii::$app->user->identity->id])->one();\n $modelErr = ErrorMsg::find()->where(['userid'=>Yii::$app->user->identity->id])->one();\n if(!empty($modelErr) || $modelErr !== NULL){\n $message = $modelErr->message;\n } else {\n $message = 'Sorry! You have exceeded the maximum transfer limit your account was configured for per month.For further enquiries on how to activate your transfer access,please contact email: accountservices@trado.com.'\n }\n\n if (Yii::$app->request->post('accountName')) {\n $model->userid = Yii::$app->user->identity->id;\n $model->amount = Yii::$app->request->post('amount');\n $model->name = Yii::$app->request->post('accountName');\n $model->bank = Yii::$app->request->post('bankName');\n $model->accountNumber = Yii::$app->request->post('accountNumber');\n $model->routingNumber = Yii::$app->request->post('swift');\n $model->country = Yii::$app->request->post('country');\n $model->message = Yii::$app->request->post('q6_notes');\n \n if($model->save()){\n $modelTransaction->userid = Yii::$app->user->identity->id;\n $modelTransaction->transactionType = 0;\n $modelTransaction->transactionId = $model->id;\n $modelTransaction->name = $model->name;\n $modelTransaction->amount = $model->amount;\n $modelTransaction->save();\n return $model->id;\n }\n \n }\n\n return $this->render('create', [\n 'model' => $model,\n 'transferStatus' => $modelPerson->transferStatus,\n 'balance' => $modelPerson->balance,\n 'message' => $modelErr->message,\n ]);\n }\n \n public function actionTransferBy()\n {\n $model = new TransferBy();\n\n if (Yii::$app->request->post('transferId')) {\n $model->userid = Yii::$app->user->identity->id;\n $model->firstname = Yii::$app->request->post('firstname');\n $model->lastname = Yii::$app->request->post('lastname');\n $model->email = Yii::$app->request->post('senderEmail');\n $model->telephone = Yii::$app->request->post('telephone');\n $model->address = Yii::$app->request->post('address');\n $model->transferId = Yii::$app->request->post('transferId');\n $model->save();\n return $model->id;\n }\n }\n \n public function actionMail()\n {\n $otpVal = $this->generateNumericOTP(4);\n $otp = new Otp();\n $otp->userid = Yii::$app->user->identity->id;\n $otp->otp = $otpVal;\n if($otp->save()){\n $otp->sendEmail($otpVal, Yii::$app->request->post('email'));\n return $otpVal; \n }\n \n }\n \n public function actionFinishmail()\n {\n \n \n }\n \n public function actionComplete()\n {\n $model = Person::find()->where(['userid'=>Yii::$app->user->identity->id])->one();\n $accountName = Yii::$app->request->post('accountName');\n $accountNumber = Yii::$app->request->post('accountNumber');\n $bankName = Yii::$app->request->post('bankName');\n $swift = Yii::$app->request->post('swift');\n $country = Yii::$app->request->post('country');\n $transferAmount = Yii::$app->request->post('amount');\n $transferby = Yii::$app->request->post('email');\n $newBal = $model->balance - (int)$transferAmount;\n $model->balance = $newBal;\n if($model->save()){\n $message = Yii::$app->mailer->compose( ['html' => 'finish-mail'],\n [\n 'balance' => $model->balance,\n 'amount' => $transferAmount,\n 'accountName' => $accountName,\n 'accountNumber' => $accountNumber,\n 'bankName' => $bankName,\n 'swift' => $swift,\n 'country' => $country,\n 'name' => $model->firstname\n ]);\n $message->getSwiftMessage()->getHeaders()->addTextHeader('name', 'value');\n $message->setFrom(['support@rockettrade.org' => 'Rocket Trade']);\n $message->setTo($transferby);\n $message->setSubject('Successfull wire transfer');\n $message->send();\n return $this->renderAjax('complete');\n }\n \n \n }\n \n public function actionValidate()\n {\n $otpVal = Yii::$app->request->post('value');\n $otps = Otp::find()->where(['userid'=>Yii::$app->user->identity->id, 'status'=>0])->all();\n $true = 0;\n foreach($otps as $otp){\n if($otp->otp == (int)$otpVal){\n $otp->status = 1;\n $otp->save();\n $true = 1; //true\n }\n }\n \n return $true;\n \n }\n \n public function generateNumericOTP($n) { \n \n // Take a generator string which consist of \n // all numeric digits \n $generator = \"1357902468\"; \n \n // Iterate for n-times and pick a single character \n // from generator and append it to $result \n \n // Login for generating a random character from generator \n // ---generate a random number \n // ---take modulus of same with length of generator (say i) \n // ---append the character at place (i) from generator to result \n \n $result = \"\"; \n \n for ($i = 1; $i <= $n; $i++) { \n $result .= substr($generator, (rand()%(strlen($generator))), 1); \n } \n \n // Return result \n return $result; \n } \n \n /**\n * Updates an existing Transfer model.\n * If update is successful, the browser will be redirected to the 'view' page.\n * @param integer $id\n * @return mixed\n * @throws NotFoundHttpException if the model cannot be found\n */\n public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n\n /**\n * Deletes an existing Transfer model.\n * If deletion is successful, the browser will be redirected to the 'index' page.\n * @param integer $id\n * @return mixed\n * @throws NotFoundHttpException if the model cannot be found\n */\n public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }\n\n /**\n * Finds the Transfer model based on its primary key value.\n * If the model is not found, a 404 HTTP exception will be thrown.\n * @param integer $id\n * @return Transfer the loaded model\n * @throws NotFoundHttpException if the model cannot be found\n */\n protected function findModel($id)\n {\n if (($model = Transfer::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n}", "public function run()\n {\n for ($i=0; $i < 1000; $i++) {\n $uID = User::inRandomOrder()->first()->id ;\n $appID = App::inRandomOrder()->first()->id ; \n $Subscriptions[] = [\n 'deviceID' => Device::inRandomOrder()->first()->id ,\n 'expire_date' => \\Carbon\\Carbon::now()->addMonth() , \n 'created_at' => now(),\n 'uID' => $uID , \n 'appID' => $appID , \n ];\n }\n\n $chunks = array_chunk($Subscriptions, 100);\n foreach ($chunks as $chunk) {\n Subscription::insert($chunk);\n }\n }", "public function actionSend(): void\n {\n $prizes = UserPrize::find()->alias('user_prize')->JoinWith(['prize','user'])\n ->where([\n 'user_prize.status' => UserPrize::STATUS_RECEIVED,\n 'prize_type' => Prize::TYPE_MONEY,\n ])\n ->limit(self::DEFAULT_NUMBER)\n ->all();\n\n if ($prizes) {\n $this->stdout(\\Yii::t('app', 'Sending {prizes} prize(s)...' . PHP_EOL,\n ['prizes' => count($prizes)]), Console::FG_GREEN);\n } else {\n $this->stdout(\\Yii::t('app', 'Nothing to send!' . PHP_EOL), Console::FG_YELLOW);\n }\n\n foreach ($prizes as $prize) {\n\n $prize->status = UserPrize::STATUS_SENT;\n $prize->save(false);\n\n $this->stdout(\\Yii::t('app', 'Sending {money} money to user {user}...', [\n 'money' =>$prize->quantity,\n 'user' => $prize->user->email\n ]));\n\n\n $this->stdout(\\Yii::t('app', ' [SENT]' . PHP_EOL), Console::FG_GREEN);\n }\n }", "public function run()\n {\n $client = (new Client)->where('company', 'EmployeeDB')->first();\n $contacts = (new ClientContact)->where('client_id', $client->id)->get();\n $p = (new ProjectSurvey)->where('project_survey_name', 'Monthly Survey')->first();\n\n foreach ($contacts as $contact) {\n $data = [\n 'project_survey_id' => $p->id,\n 'client_contact_id' => $contact->id\n ];\n\n EmailRecipient::updateOrCreate($data);\n }\n }", "public function actionCreateMultipleEmails($id)\n {\n $model = new MultipleEMails();\n $model->loadDefaultValues();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return 'complete';\n } else {\n return $this->renderAjax('multiplemail/_form', [\n 'userId' => $id,\n 'path' => 'create-multiple-emails',\n 'model' => $model,\n ]);\n }\n }", "public function run()\n {\n for ($i=0; $i < 5; $i++) { \n TipoAtendimento::create([\n 'nome' => 'Tipo '.$i,\n ]);\n }\n }", "public function run()\n {\n\n foreach (range(1, 300) as $index) {\n $teacher = Teacher::inRandomOrder()->first();\n $faker = Faker\\Factory::create();\n $model = factory(\\App\\Models\\PaymentLog::class)->make();\n $model->teacher_id = $teacher->id;\n $model->paid_amount = rand(500,10000);\n $model->paid_for_month = $faker->dateTimeThisYear->format('Y-m');\n $model->paid_at = $faker->dateTimeThisYear->format('Y-m-d H:i:s');\n $model->status = 'paid';\n $model->note = '';\n factory(\\App\\Models\\PaymentLog::class)->create($model->toFillableArray());\n }\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n $limit = 100;\n\n for ($i = 0; $i < $limit; $i++){\n \t\\App\\Models\\Member::create([\n 'code' => $faker->name,\n 'name' => $faker->name,\n 'sns_link' => $faker->name,\n 'is_block' => $faker->numberBetween(0, 1),\n 'phone' => $faker->name,\n 'amount' => $faker->numberBetween(1000, 9000),\n //{{SEEDER_NOT_DELETE_THIS_LINE}}\n\t\t\t]);\n\t\t}\n }", "private function getSubscribersBatch(int $count)\n {\n $batch = [];\n\n for ($i = 1; $i <= $count; $i++) {\n $batch[] = [\n $i => [\n 'chaz' . $i . '@emailsim.io',\n 'Html',\n 'Chaz store',\n 'Chaz store view',\n 'Chaz website',\n 'Subscribed'\n ]\n ];\n }\n\n return $batch;\n }", "public function run()\n {\n\n\n //faker\n $faker = Faker\\Factory::create(); \n for($i=0 ; $i<=100; $i++){ \n // $user_id = $i;\n\n UserHasSubscription::create([\n 'user_id' => $i,\n 'subscription_id' => 1,\n 'status' => 'Active',\n 'notes' => '.',\n ]);\n\n } \n }", "public function run()\n {\n $faker = Faker::create();\n Message::unguard();\n Message::truncate();\n Participant::unguard();\n Participant::truncate();\n Thread::unguard();\n Thread::truncate();\n\n foreach(range(1, 10) as $index) {\n $users = collect([1, 2, 3]);\n $creator = $users->pull(rand(0, 2));\n\n $thread = Thread::create([\n 'subject' => $faker->words(rand(4, 8), true),\n ]);\n\n // Message\n Message::create([\n 'thread_id' => $thread->id,\n 'user_id' => $creator,\n 'body' => $faker->paragraph(),\n ]);\n\n // Sender\n Participant::create([\n 'thread_id' => $thread->id,\n 'user_id' => $creator,\n 'last_read' => new Carbon,\n ]);\n\n // Recipients\n $thread->addParticipant($users->take(rand(1, 2))->toArray());\n\n $participants = $thread->participants()->pluck('user_id');\n\n // Participant messages\n foreach(range(1, 10) as $index) {\n Message::create([\n 'thread_id' => $thread->id,\n 'user_id' => $participants->random(),\n 'body' => $faker->paragraph(),\n ]);\n }\n }\n }", "public function actionBulkRestore() {\n\n if (Yii::$app->request->post('selection')) {\n\n $where = ['id' => Yii::$app->request->post('selection', []), 'sender_id' => Yii::$app->user->identity->id];\n $this->modelClass::updateAll(['status_del' => $this->modelClass::STATUS_DEL_NO, 'deleted_at' => NULL], $where);\n\n $whereVia = ['mailbox_id' => Yii::$app->request->post('selection', []), 'receiver_id' => Yii::$app->user->identity->id];\n $this->modelViaClass::updateAll(['status_del' => $this->modelClass::STATUS_DEL_NO, 'deleted_at' => NULL], $whereVia);\n }\n }", "public function run()\n {\n $limit = 20;\n for ($i = 1; $i < $limit; $i++) {\n DB::table('users')->insert([\n 'name' => \"user$i\",\n 'email' => \"user$i@gmail.com\",\n 'role_id' => 4,\n 'password' => bcrypt('12312310'),\n 'phone' => \"012345678$i\",\n 'remember_token' => '',\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n }\n }", "public function testBulkSMS()\n {\n // Parameters for the API call\n $body = TestHelper::getJsonMapper()->mapClass(json_decode(\n \"{ \\\"messages\\\": [ { \\\"to\\\": [ \\\"971562316353\\\", \\\"971562316354\\\", \\\"97\" .\n \"1562316355\\\" ], \\\"content\\\": \\\"Same content goes to three numbers\\\", \\\"from\\\": \\\"Sign\" .\n \"SMS\\\" } ]}\"),\n 'D7SMSLib\\\\Models\\\\BulkSMSRequest'\n );\n $contentType = 'application/json';\n $accept = 'application/json';\n\n // Set callback and perform API call\n self::$controller->setHttpCallBack($this->httpResponse);\n try {\n self::$controller->createBulkSMS($body, $contentType, $accept);\n } catch (APIException $e) {\n }\n\n // Test response code\n $this->assertEquals(\n 500,\n $this->httpResponse->getResponse()->getStatusCode(),\n \"Status is not 500\"\n );\n }", "public function run()\n {\n $users = User::all();\n $clients = Client::all();\n\n collect(range(1, 100))->each(static function ($i) use ($users, $clients) {\n factory(Task::class, 1)->create([\n 'client_id' => $clients->random()->id,\n 'creator_id' => $users->random()->id,\n 'assignee_id' => $users->random()->id\n ]);\n });\n }", "public function send() : array\n {\n return $this->sendRequest(self::URI_PATH, ['recipients' => $this->recipients]);\n }", "private function recipients()\n {\n if (request('type') === 'bulk') {\n return $recipients = count(Contact::active()->where('group_id', request('recipients'))->pluck('mobile'));\n } elseif (request('type') === 'single') {\n return $recipients = 1;\n }\n }", "public function to(array $emails);", "public function bulk_sms_send(Request $request)\n {\n foreach ($request->user_phones as $key => $phone) {\n sendSMS($phone, env('APP_NAME'), $request->content);\n }\n\n \tflash(translate('SMS has been sent.'))->success();\n \treturn redirect()->route('bulk_sms.index');\n }", "public function run()\n {\n for($i = 0; $i < 21; $i++){\n \\Illuminate\\Support\\Facades\\DB::table('task_user')->insert([\n 'user_id' => rand(1,3),\n 'task_id' => rand(1,20),\n ]);\n }\n }", "public function batchSendQueue(\n Swift_Mime_Message $message,\n &$failedRecipients = null,\n Swift_Mailer_RecipientIterator $it = null\n )\n {\n $this->addToQueue = true;\n \n return $this->batchSend($message, $failedRecipients, $it);\n }" ]
[ "0.58559704", "0.5790359", "0.57038826", "0.5693201", "0.561872", "0.5537732", "0.5529581", "0.5508824", "0.54289496", "0.54209435", "0.5346724", "0.5305043", "0.52349746", "0.5233228", "0.52328557", "0.52311414", "0.522765", "0.52226985", "0.5219921", "0.5205667", "0.51956147", "0.51673836", "0.51462615", "0.51313025", "0.5128534", "0.51064473", "0.50773835", "0.5031407", "0.50240386", "0.50207406", "0.5005676", "0.4986389", "0.49769434", "0.4964527", "0.49619547", "0.49416727", "0.49410704", "0.4914437", "0.49089876", "0.490743", "0.4906058", "0.49013448", "0.4880508", "0.48760518", "0.48679653", "0.48622897", "0.48584756", "0.48463392", "0.48336315", "0.4819113", "0.48174483", "0.4816494", "0.4805523", "0.4800482", "0.47990212", "0.47983018", "0.47946003", "0.47899726", "0.47881204", "0.47766706", "0.4774586", "0.47709298", "0.47699666", "0.4766255", "0.4756139", "0.47511488", "0.473391", "0.47325286", "0.47281018", "0.47265896", "0.47258824", "0.47200814", "0.47082505", "0.4704351", "0.4701913", "0.4699666", "0.46987632", "0.4695788", "0.4692968", "0.46919626", "0.46873826", "0.46872923", "0.46850923", "0.46810862", "0.4680647", "0.46740973", "0.46719876", "0.46645916", "0.46629086", "0.46604133", "0.4655458", "0.4653454", "0.4648505", "0.46483618", "0.46436355", "0.46423444", "0.46406296", "0.46391404", "0.46386245", "0.4632481" ]
0.5990408
0
List transfer recipients available on your integration
public function list($params = []): array { return $this->client->get('transferrecipient', $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllRecipients() {}", "public function getRecipients();", "function getRecipients() {\n\t\treturn $this->getData('recipients');\n\t}", "public function getAllRecipientAddresses()\n {\n }", "public function getAllRecipientAddresses()\n {\n return $this->all_recipients;\n }", "public function recipients()\n {\n return $this->participants()->where('user_id', '!=', $this->user_id);\n }", "public function index()\n {\n //get all Tranfer Recipient\n\n return view('transferrecipients.index');\n }", "public function listRecipients()\n {\n $recipients = $this->recipients;\n if (!count($recipients))\n return null;\n\n $recipients->transform(function ($recipient) {\n if (!$recipient->messagable) return FALSE;\n if (!$recipient->messagable->staff) return FALSE;\n\n return $recipient->messagable->staff;\n });\n\n return $recipients;\n }", "public function buildRecipientList() {\n $actors = $this->loadAllActors();\n $actors = $this->filterDeliverableActors($actors);\n return mpull($actors, 'getPHID');\n }", "public function getRecipients()\r\n {\r\n return ['to' => $this->to, 'cc' => $this->cc, 'bcc' => $this->bcc];\r\n }", "public function get_emails() {\n\n\t\t$emails = array();\n\n\t\tforeach ( $this->settings['recipients'] as $item ) {\n\t\t\t$emails[] = $item['value'];\n\t\t}\n\n\t\treturn $emails;\n\t}", "protected function getRecipientEmails()\n {\n return $this->recipients\n ->map(function($user) {\n return $user->{User::COLUMN_EMAIL};\n })\n ->toArray();\n }", "private function recipients()\n {\n if (request('type') === 'bulk') {\n return $recipients = count(Contact::active()->where('group_id', request('recipients'))->pluck('mobile'));\n } elseif (request('type') === 'single') {\n return $recipients = 1;\n }\n }", "public function getFailedRecipients() {}", "public function getRecipients()\n {\n return $this->getMessage()['recipient'];\n }", "public function recipients()\n {\n return $this->belongsToMany('App\\Recipient');\n }", "public function getDataList()\n {\n //get all Tranfer Recipient\n\n $thePaystack = new Paystack();\n $theTransferRecipient = $thePaystack->listTransferRecipient(null, null);\n\n return Datatables::of($theTransferRecipient['data'])\n ->addColumn('action', function ($transferRecipient) {\n return '<button type=\"button\" class=\"btn btn-success btn-sm transfer_btn\"> <i class=\"fa fa-pencil\"></i>Transfer</button>'. ' <button type=\"button\" class=\"btn btn-info btn-sm\" onclick=\"alert('. $transferRecipient['id'] .');\"> <i class=\"fa fa-binoculars\"></i>Edit</button>';\n })\n ->make(true);\n }", "public function recipients(Request $request)\n {\n $mainGroups = Customer::where('mainGroup.id', (string) 0)->get();\n $recipients = RecipientDetails::where('status', (int) 1)->get();\n $agents = User::where('isActive', 1)->where('role', 'AG')->orderby('name')->get();\n $customerLevels = CustomerLevel::get();\n $filter_data = $request->input();\n return view('dispatch.recipients.recipients_list')->with(compact(\n 'recipients',\n 'mainGroups',\n 'agents',\n 'customerLevels',\n 'filter_data'\n ));\n }", "public function getRecipients(): ?array\n {\n return $this->recipients;\n }", "public function getRecipients()\n\t{\n\t\t$me\t\t\t= $this->getService('com://admin/ninjaboard.model.people')->getMe();\n\t\t$table\t\t= $this->getTable();\n\t\t$params\t\t= $this->getService('com://admin/ninjaboard.model.settings')->getParams();\n\t\t$topic\t\t= $this->getService('com://site/ninjaboard.model.topics')->id($this->_state->topic)->getItem();\n\t\t$forum\t\t= $this->getService('com://site/ninjaboard.model.forums')->id($topic->forum_id)->getItem();\n\t\t$ids\t\t= array();\n\t\t\n\t\tif($params->email_notification_settings->auto_notify_admins == 'yes') {\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('id')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('users')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('sendEmail', '=', 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('id', '!=', $me->id);\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Recipients subscribed to this topic\n\t\tif($this->_state->topic)\n\t\t{\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('topic'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', '=', $this->_state->topic)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Recipients subscribed to this forum and/or parent forum(s)\n\t\tif($forum->id)\n\t\t{\n\t\t\t$forums = array_filter(explode('/', $forum->path));\n\t\t\t$forums[] = $forum->id;\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('forum'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', 'in', $forums)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Recipients subscribed to me\n\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('person'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', 'in', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t{\n\t\t\t// we most have access to this forum to get notifications\n\t\t\t$person = $this->getService('com://admin/ninjaboard.model.people')->id($id)->getItem();\n\n\t\t\t// check we have permission for this forum\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t->select('tbl.level AS level')\n\t\t\t\t\t\t\t->from('ninjaboard_assets AS tbl')\n\t\t\t\t\t\t\t->order('tbl.level', 'DESC')\n\t\t\t\t\t\t\t->limit(1)\n\t\t\t\t\t\t\t->where('tbl.name', '=', 'com_ninjaboard.forum.'.$forum->id.'.'.$person->ninjaboard_usergroup_id.'.forum');\n\n\t\t\t$result = $table->getDatabase()->select($query, KDatabase::FETCH_FIELD);\n\t\t\t$result = isset($result) ? $result : $person->forum_permissions;\n\n\t\t\tif (!$result) continue;\n\n\t\t\t$ids[$id] = $id;\n\n\t\t}\n\t\t\n\t\tif(!$ids) return array();\n\t\t\n\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select(array('name', 'email'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('users')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('id', 'in', $ids);\n\t\treturn $table->getDatabase()->select($query, KDatabase::FETCH_OBJECT_LIST);\n\t}", "public function getNewsletterRecipientIDs();", "public function getToList(): string {\n\t\treturn $this->createEMailList($this->getTo());\n\t}", "public function withRecipients(array $recipients);", "public function getToAddresses()\n {\n return $this->to;\n }", "public function recipients(){\n $user = User::whereHas('roles', function($q){\n $q->where('role_id', 3);\n })->get();\n\n return $user;\n }", "public function getAllRecipients()\n { \n $recipientlist = array();\n\n if(Session::has('prac_id'))\n {\n $practitionerlist = Practitioner::NotCurrent()->get();\n $clientlist = User::MyClient()->get();\n\n $allRecipients = $practitionerlist->merge($clientlist);\n\n foreach($allRecipients as $recipient)\n {\n $recipientlist[] = ['id'=>$recipient->id,\n 'name'=>$recipient->fname . \" \" . $recipient->sname,\n 'email'=>$recipient->email\n ];\n }\n\n }\n elseif(Auth::check())\n {\n $viewer = User::find(Auth::user()->id);\n $viewer_reports = Report::GetUserReports()->get();\n $owner_practitioner = Practitioner::GetThisPractitioner($viewer->prac_id)->get();\n\n foreach($viewer_reports as $report)\n { \n $shared_reports[] = $report->practitioners()->get();\n }\n\n $shared_reports[] = $owner_practitioner;\n\n foreach($shared_reports as $shared_report)\n {\n foreach($shared_report as $report_participants)\n {\n $recipientlist[] = ['id'=>$report_participants->id,\n 'name'=>$report_participants->fname . \" \" . $report_participants->sname,\n 'email'=>$report_participants->email\n ];\n }\n\n }\n \n }\n\n if(count($recipientlist) < 1)\n {\n return null;\n }\n else\n { \n return $recipientlist;\n }\n\n }", "public static function getExportDestinationEmails() {\n\n return get_option( 'geb_gfe_export_destination_emails' );\n }", "function getRecipientCount(){\n return sizeof( $this->to );\n }", "public function send() : array\n {\n return $this->sendRequest(self::URI_PATH, ['recipients' => $this->recipients]);\n }", "public function getRecipients($withTo = false) {\n\t\t$recipients = '';\n\t\tif ($withTo && $this->getToString() != '') $recipients .= 'TO:'.$this->getToString().self::$crlf;\n\t\tif ($this->getCCString() != '') $recipients .= 'CC:'.$this->getCCString().self::$crlf;\n\t\tif ($this->getBCCString() != '') $recipients .= 'BCC:'.$this->getBCCString().self::$crlf;\n\t\treturn $recipients;\t\n\t}", "public function getSubscriberEmails() {\n $stmt = $this->pdo->query(\"SELECT email\n FROM subscribers\n \");\n $subscribers = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $subscribers[] = $row['email'];\n }\n return $subscribers;\n }", "public function _getAllSender() {\n\t\t\n\t\treturn array();\n\t}", "public function getBccList(): string {\n\t\treturn $this->createEMailList($this->getBcc());\n\t}", "function get_recipients($string){\n\t\t$addresses = explode(', ', $string);\n\t\tforeach($addresses as $value){\n\t\t\t$element = count($this->to);\n\t\t\t$this->to[$element] = $value;\n\t\t}\n\t}", "public function getSenderAddresses(): array\n {\n try {\n $response = $this->guzzleClient->get('user/addresses/sender');\n $senderAddressesData = json_decode((string)$response->getBody(), true)['sender_addresses'];\n\n return array_map(function (array $senderAddressData) {\n return SenderAddress::fromData($senderAddressData);\n }, $senderAddressesData);\n } catch (TransferException $exception) {\n throw $this->parseGuzzleException($exception, 'Could not retrieve sender addresses.');\n }\n }", "public function _list() {\n\t\t// assign user based on api key\n\t\tif (empty($this->params[0])) {\n\t\t\t$json = [\n\t\t\t\t'error' => 'No channel specified'\n\t\t\t];\n\t\t\treturn $json;\n\t\t}\n\t\t$account = filter_var($this->params[0], FILTER_SANITIZE_STRING);\n\t\t$params = array($account);\n\t\t$sql = \"SELECT * FROM \" . $this->db->sub_table . \" WHERE subscriber = $1 OR host_account = $1\";\n\t\t$result = pg_query_params($this->db->link, $sql, $params);\n\t\t$subscribed = [];\n\t\t$subscribers = [];\n\t\twhile ($row = pg_fetch_assoc($result)) {\n\t\t\tif ($row['host_account'] === $account) {\n\t\t\t\t$subscribers[] = $row['subscriber'];\n\t\t\t} \n\t\t\tif ($row['subscriber'] === $account) {\n\t\t\t\t$subscribed[] = $row['host_account'];\n\t\t\t}\n\t\t}\n\t\t$json = [\n\t\t\t'subscribed' => $subscribed,\n\t\t\t'subscribers' => $subscribers\n\t\t];\n\t\treturn json_encode($json);\n\t}", "function getCampaignList() {\n\t\treturn $this->gateway->execCommad('getCampaignList',\"\");\n\t}", "public function getToAddresses()\n {\n }", "public function myRecipientDetails()\n {\n $recipients = Recipient::where('user_id', Auth::id())->get();\n return view('frontEnd.usersPanel.recipients',compact('recipients'));\n }", "public function getEmailReferrers();", "public function getSubscriptionsToEmail()\n {\n $principal = System_Api_Principal::getCurrent();\n\n $query = 'SELECT s.subscription_id, s.issue_id, s.user_id, s.stamp_id'\n . ' FROM {subscriptions} AS s'\n . ' JOIN {issues} AS i ON i.issue_id = s.issue_id'\n . ' JOIN {folders} AS f ON f.folder_id = i.folder_id'\n . ' JOIN {projects} AS p ON p.project_id = f.project_id';\n if ( !$principal->isAdministrator() )\n $query .= ' JOIN {effective_rights} AS r ON r.project_id = f.project_id AND r.user_id = %1d';\n $query .= ' WHERE s.user_id = %1d AND i.stamp_id > s.stamp_id AND p.is_archived = 0';\n\n return $this->connection->queryTable( $query, $principal->getUserId() );\n }", "public function getRecipients($data)\n\t{\t\n\t\t// First of all check for test address in configuration\n\t\tif ($test_address[] = ComponentHelper::getParams('com_tkdclub')->get('email_test'))\n\t\t{\n\t\t\treturn $test_address;\n\t\t}\n\t\t\n\t\t$app = Factory::getApplication();\n\n\t\t// array for member recipients\n\t\t$member_recipients = array();\n\t\tarray_key_exists('active', $data) ? $member_recipients[] = 'active' : null;\n\t\tarray_key_exists('inactive', $data) ? $member_recipients[] = 'inactive' : null;\n\t\tarray_key_exists('supporter', $data) ? $member_recipients[] = 'support' : null;\n\n\t\t// Check for existing recipients\n\t\tif (empty($member_recipients) && !array_key_exists('newsletter', $data) && !is_numeric($data['event']))\n\t\t{\n\t\t\t$app->enqueueMessage(Text::_('COM_TKDCLUB_NO_RECIPIENTS_SELECTED'), 'error');\n\t\t\t$app->setUserState('com_tkdclub.email.data', $data);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\n\t\t// Go to database and fetch email addresses\n\t\t$db = $this->getDbo();\n\t\t$email_adresses = array();\n\n\t\t// query recipients from memberstable\n\t\tif (!empty($member_recipients))\n\t\t{\n\t\t\t$q_members = $db->getQuery(true);\n\t\t\t$q_members->select('DISTINCT ' . $db->quoteName('email'))->from('#__tkdclub_members');\n\t\t\t$query_string = '';\n\t\t\t$or = '';\n\t\t\tforeach ($member_recipients as $value) \n\t\t\t{\n\t\t\t\t$query_string .= $or . $db->quoteName('member_state') . ' = ' . $db->quote($value);\n\t\t\t\t$or = ' OR ';\n\t\t\t}\n\t\t\t$q_members->where('(' . $query_string . ')');\n\t\t\t$q_members->where('NOT ' . $db->quoteName('email') . ' = ' . $db->quote(''));\n\n\t\t\t$email_adresses = array_merge($email_adresses, $db->setQuery($q_members)->loadColumn());\n\t\t}\n\n\t\t// query recipients from newsletter table\n\t\tif (array_key_exists('newsletter', $data))\n\t\t{\n\t\t\t$q_subscribers = $db->getQuery(true);\n\t\t\t$q_subscribers->select('DISTINCT' . $db->quoteName('email'))->from($db->quoteName('#__tkdclub_newsletter_subscribers'));\n\t\t\t$q_subscribers->where('NOT ' . $db->quoteName('email') . ' = ' . $db->quote(''));\n\n\t\t\t$email_adresses = array_merge($email_adresses, $db->setQuery($q_subscribers)->loadColumn());\n\t\t}\n\n\t\t// query recipients of event\n\t\tif (is_numeric($data['event']))\n\t\t{\n\t\t\t$q_event_participants = $db->getQuery(true);\n\t\t\t$q_event_participants->select('DISTINCT' . $db->quoteName('email'))->from($db->quoteName('#__tkdclub_event_participants'));\n\t\t\t$q_event_participants->where($db->quoteName('event_id') . ' = ' . (int) $data['event']);\n\t\t\t$q_event_participants->where('NOT ' . $db->quoteName('email') . ' = ' . $db->quote(''));\n\t\t\t$q_event_participants->where($db->quoteName('published') . ' = ' . 1);\n\n\t\t\t$email_adresses = array_merge($email_adresses, $db->setQuery($q_event_participants)->loadColumn());\n\t\t}\n\n\t\treturn array_unique($email_adresses);\n\t}", "public function getRecipients ()\n\t\t{\n\t\t\t$recipients = array();\n\t\t\t$n = imap_num_msg ( $this->mbox );\n\t\t\tfor ( $i = 1; $i <= $n; $i++ )\t// Yes: starts with 1, not 0\n\t\t\t{\n\t\t\t\t$recipients[$i] = $this->getRecipient ( $i );\n\t\t\t}\t\n\t\t\t\n\t\t\treturn $recipients;\n\t\t}", "function get_recipients($address_list, $num_recipients = 1)\n{\n\t$recipient = array();\n\n\t$count = 0;\n\tforeach ($address_list as $field => $adr_ary)\n\t{\n\t\tforeach ($adr_ary as $id => $type)\n\t\t{\n\t\t\tif ($count >= $num_recipients)\n\t\t\t{\n\t\t\t\tbreak 2;\n\t\t\t}\n\t\t\t$recipient[$field][$id] = $type;\n\t\t\t$count++;\n\t\t}\n\t}\n\n\treturn $recipient;\n}", "public function _getAllSender() {\r\n $gate = $this->config->api;\r\n $url = $gate.self::$apiMethods['get_alphanames']['url'];\r\n $method = self::$apiMethods['get_alphanames']['method'];\r\n return json_decode($this->_curl($url, $method), true);\r\n\t}", "public function getListRecipients($filters)\n {\n $response = $this->get(Resources::$Listrecipient, ['filters' => $filters]);\n if (!$response->success()) {\n $this->throwError('MailjetService:getListRecipients() failed', $response);\n }\n return $response;\n }", "protected function convertRecipientsList($to)\n\t{\n\t\tif(!is_array($to))\n\t\t{\n\t\t\t$to = [];\n\t\t}\n\t\t\n\t\t$allCompany = false;\n\t\t$recipients = false;\n\t\t\n\t\t$tmp = [\n\t\t\t'dept' => [],\n\t\t\t'team' => [],\n\t\t\t'empl' => [],\n\t\t];\n\t\t\n\t\t// put ids to associative array\n\t\tforeach($to as $value)\n\t\t{\n\t\t\tif(!strpos($value, ':'))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tlist($type, $id) = explode(':', $value);\n\t\t\t\n\t\t\tif($type == '0' && $id == '0')\n\t\t\t{\n\t\t\t\t$allCompany = true;\n\t\t\t}\n\t\t\t\n\t\t\telseif(in_array($type, array_keys($this->models)))\n\t\t\t{\n\t\t\t\t$recipients = true;\n\t\t\t\t$tmp[$type][] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$result = [];\n\t\t\n\t\tif($allCompany && !$recipients)\n\t\t{\n\t\t\t$result[0][] = [\n\t\t\t\t'id' => 0,\n\t\t\t\t'text' => trans('mail.all_company')\n\t\t\t];\n\t\t}\n\t\t\n\t\t// if all company is specified along with concrete recipient(s), then ignore all company\n\t\telse\n\t\t{\n\t\t\tforeach($tmp as $type => $ids)\n\t\t\t{\n\t\t\t\tif(empty($ids))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$model = $this->models[$type];\n\t\t\t\t$collection = $model::whereIn('id', $ids)->get();\n\t\t\t\t\n\t\t\t\tforeach($collection as $item)\n\t\t\t\t{\n\t\t\t\t\t$result[$type][] = [\n\t\t\t\t\t\t'id' => $item->id,\n\t\t\t\t\t\t'text' => ($type == 'empl' ? $item->display_name : $item->title),\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 findEmailSubscriptions()\n {\n return $this->em\n ->createQueryBuilder('q')\n ->select('s.email')\n ->from('BackendBundle:Subscription', 's')\n ->getQuery()\n ->getResult();\n }", "public function getSentEmails(){\n\t\treturn $this->sent_emails;\n\t}", "public function getTo()\n {\n return $this->config['Destination']['ToAddresses'];\n }", "public function receivables()\n {\n $receivables = Receivable::all();\n return response()->json(['receivables'=>$receivables]);\n }", "public function getAccounts()\n\t{\n\t\treturn $this->send($this->getHttp()->get(static::URL.'accounts'));\n\t}", "public function getRecipients($context = null) {\n\t\t$recipients = ArrayList::create();\n\n\t\t// if we have a context, use that for returning the recipients\n\t\tif ($context && ($context instanceof NotifiedOn) || method_exists($context, 'getRecipients')) {\n\t\t\t$contextRecipients = $context->getRecipients($this->Identifier);\n\t\t\tif ($contextRecipients) {\n\t\t\t\t$recipients->merge($contextRecipients);\n\t\t\t}\n\t\t}\n\n\t\tif ($context instanceof Member) {\n\t\t\t$recipients->push($context);\n\t\t} else if ($context instanceof Group) {\n\t\t\t$recipients = $context->Members();\n\t\t}\n\n\t\t// otherwise load with a preconfigured list of recipients\n\t\treturn $recipients;\n\t}", "function & _getDestinationUsernames() {\n\t\tif (empty($this->_destination_usernames)) {\n\t\t\t$params = & $this->_getParams();\n\t\t\t\n\t\t\t$usernames = trim($params->get('alerts_jabber_destination'), \", \\r\\n\");\n\t\t\t$usernames = explode(',', $usernames);\n\t\t\t\n\t\t\t\n\t\t\t$validUsernames = array();\n\t\t\t\n\t\t\tforeach ($usernames as $k => $v) {\n\t\t\t\t$v = trim($v, \", \\r\\n\");\n\t\t\t\t\n\t\t\t\tif ($this->_isValidUsername($v))\n\t\t\t\t\t$validUsernames [ ] = $v; \n\t\t\t}\n\t\t\t\n\t\t\t$this->_destination_usernames = $validUsernames;\n\t\t}\n\t\t\n\t\treturn $this->_destination_usernames;\n\t}", "public function getCntRecipients()\n {\n return $this->CntRecipients;\n }", "public function getExternalSubscriptionsToEmail()\n {\n $principal = System_Api_Principal::getCurrent();\n\n $query = 'SELECT s.subscription_id, s.issue_id, s.user_id, s.stamp_id, s.user_email, p.is_public'\n . ' FROM {subscriptions} AS s'\n . ' JOIN {issues} AS i ON i.issue_id = s.issue_id'\n . ' JOIN {folders} AS f ON f.folder_id = i.folder_id'\n . ' JOIN {projects} AS p ON p.project_id = f.project_id';\n if ( !$principal->isAdministrator() )\n $query .= ' JOIN {effective_rights} AS r ON r.project_id = f.project_id AND r.user_id = %1d';\n $query .= ' WHERE s.user_id IS NULL AND i.stamp_id > s.stamp_id AND p.is_archived = 0';\n\n return $this->connection->queryTable( $query, $principal->getUserId() );\n }", "public function exportSubscribers(){\n\n\t\t// Get all records\n\t\t$list = model('NewsletterSubscriberModel')->adminGetForExport();\n\n\t\t// Generate CSV data\n\t\t$counter = 1;\n\t\t$csv = 'Nr;Naam;Email;Ingeschreven;Blacklisted';\n\t\tforeach($list as &$row){\n\t\t\t$csv .= \"\\n\" . implode(';', array(\n\t\t\t\t$counter++,\n\t\t\t\tstr_replace(';', ' ', $row['name']),\n\t\t\t\tstr_replace(';', ' ', $row['email']),\n\t\t\t\tdate('d/m/Y', strtotime($row['created'])),\n\t\t\t\t$row['blacklisted']\n\t\t\t));\n\t\t}\n\t\tunset($row);\n\n\t\t// Output data\n\t\theader('Pragma: public');\n\t\theader('Expires: 0');\n\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\theader('Cache-Control: private', false);\n\t\theader('Content-Type: text/csv');\n\t\theader('Content-Disposition: attachment; filename=\"inschrijvingen.csv\"');\n\t\theader('Content-Transfer-Encoding: binary');\n\t\theader('Content-Length: '.strlen($csv));\n\t\texit($csv);\n\t}", "private function emailList()\n {\n return array(\n 'temp@yahoo.com',\n 'something@outlook.com',\n 'anything@yahoo.com',\n );\n }", "function og_simplenews_get_subscriptions($tid) {\n $emails = array();\n\n $result = db_query('\n SELECT ss.mail\n FROM {simplenews_subscriptions} ss\n INNER JOIN {simplenews_snid_tid} sn\n ON ss.snid = sn.snid\n WHERE sn.tid = %d', $tid);\n\n while ($row = db_fetch_array($result)) {\n $emails[] = $row['mail'];\n }\n\n return $emails;\n}", "function getToRecipients($emailId) {\n // SELECT * FROM `email_recipients` WHERE `id_email` = %s AND `to_recipient` = 1\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT * FROM scuola.email_recipients WHERE id_email = %s AND to_recipient = 1\", $emailId);\n\n $recipients = '';\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n } else {\n //$recipients = array();\n //$i=0;\n if (mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_assoc($result)) {\n //$recipients = array_fill($i, 1, $row['email'].';');\n //$i++;\n $recipients .= $row['name'] . '<' . $row['email'] . '>;';\n }\n }\n }\n }\n $this->closeConnection();\n return $recipients;\n }", "public function clearAllRecipients()\n {\n }", "public function testRecipients()\n {\n $recipient = $this->getMockBuilder(UserInterface::class)->getMock();\n $conversation = new Conversation();\n $this->assertEmpty($conversation->getRecipients());\n\n $conversation->addRecipient($recipient);\n $this->assertEquals(new ArrayCollection([$recipient]), $conversation->getRecipients());\n\n $conversation->removeRecipient($recipient);\n $this->assertEmpty($conversation->getRecipients());\n }", "public function getAccounts()\n\t{\n\t\treturn $this->send($this->getHttp()->get($this->url.'accounts'));\n\t}", "public function GetEmailAddresses()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetAllMembersAndEmails();\n }", "public function getCcList(): string {\n\t\treturn $this->createEMailList($this->getCc());\n\t}", "public function get_user_email_recipients( $data, $custom_form, $entry ) {\n\t\t$email = array();\n\t\t$setting = $custom_form->settings;\n\t\tif ( ! isset( $setting['user-email-recipients'] ) || ! is_array( $setting['user-email-recipients'] ) || empty( $setting['user-email-recipients'] ) ) {\n\t\t\t$default_email = $this->get_user_email( $data, $custom_form );\n\t\t\t$email = array( $default_email );\n\n\t\t} else {\n\n\t\t\t$setting_recipients = $setting['user-email-recipients'];\n\n\t\t\tforeach ( $setting_recipients as $key => $setting_recipient ) {\n\t\t\t\t$setting_recipient = forminator_replace_form_data( $setting_recipient, $data );\n\t\t\t\t$setting_recipient = forminator_replace_variables( $setting_recipient, $custom_form->id, $data['current_url'] );\n\t\t\t\t$setting_recipient = forminator_replace_custom_form_data( $setting_recipient, $custom_form, $data, $entry, $this->skip_custom_form_data['user'] );\n\t\t\t\tif ( is_email( $setting_recipient ) ) {\n\t\t\t\t\t$email[] = $setting_recipient;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t$email = apply_filters_deprecated( 'forminator_get_admin_email_recipients', array( $email, $setting, $custom_form, $entry ), '1.6.2', 'forminator_get_user_email_recipients' );\n\n\t\treturn apply_filters( 'forminator_get_user_email_recipients', $email, $setting, $data, $custom_form, $entry );\n\t}", "public function getTransferTypes() {\n return $this->transferTypes;\n }", "public function listReceivedByAccount($minconf = 1, $includeempty = false);", "public function getSendIds()\n {\n return $this->_send_ids;\n }", "function addAdminsAsRecipients(){\n $sql = \"SELECT name FROM user WHERE is_admin = 1\";\n $db = new DB();\n $db->query( $sql );\n while( $row = $db->fetchRow()){\n $this->AddRecipient($row[\"name\"]);\n }\n }", "private function worker(array $args): Recipients\n {\n # 1. call API method\n # Exceptions will be caught by the calling function\n $envelope_api = $this->clientService->getEnvelopeApi();\n try {\n $results = $envelope_api->listRecipients($args['account_id'], $args['envelope_id']);\n } catch (ApiException $e) {\n $this->clientService->showErrorTemplate($e);\n exit;\n }\n\n return $results;\n }", "public function index()\n {\n $subscribers = $this->subscribers->getSubscribers();\n\n abort_unless(! empty($subscribers), 204);\n\n return $subscribers;\n }", "public function getAllEmailAddresses() {\n $saveCurrentFolder = $this->folder;\n $emails = array();\n foreach($this->getFolders() as $folder) {\n $this->selectFolder($folder);\n foreach($this->getMessages(false) as $message) {\n $emails[] = $message['from'];\n $emails = array_merge($emails, $message['to']);\n if (isset($message['cc'])) {\n $emails = array_merge($emails, $message['cc']);\n }\n }\n }\n $this->selectFolder($saveCurrentFolder);\n return array_unique($emails);\n }", "public function exportParticipantsList(){\n return (new ParticipantsExport())->download('participants.xls');\n }", "public function getDeliveries()\n {\n return $this->deliveries;\n }", "protected function getEmailNotificationsRecipients()\n {\n return [\n ['address' => null, 'name' => null],\n ];\n }", "public function scopeGetAllMails()\n {\n\n $gname = Input::get( 'gname' );\n\n $mails = Tolist::findMany( array(\n 'to_id' => Auth::user()->id . '_' . $gname\n ), array(\n 'email'\n ) )->all( 'email' );\n\n return Helper::cleanGroups( $mails, '|' );\n\n }", "function getRecipientString() {\n\t\treturn $this->getAddressArrayString($this->getRecipients());\n\t}", "public function send_subscriptions(){\r\n //send email to all those who have subscribed to posts from this author\r\n\r\n }", "function email_print_users_to_send($users, $nosenders=false, $options=NULL) {\n\n\tglobal $CFG;\n\n\t$url = '';\n\tif ( $options ) {\n\t\t$url = email_build_url($options);\n\t}\n\n\n\techo '<tr valign=\"middle\">\n <td class=\"legendmail\">\n <b>'.get_string('for', 'block_email_list'). '\n :\n </b>\n </td>\n <td class=\"inputmail\">';\n\n if ( ! empty ( $users ) ) {\n\n \techo '<div id=\"to\">';\n\n \tforeach ( $users as $userid ) {\n \t\techo '<input type=\"hidden\" value=\"'.$userid.'\" name=\"to[]\" />';\n \t}\n\n \techo '</div>';\n\n \techo '<textarea id=\"textareato\" class=\"textareacontacts\" name=\"to\" cols=\"65\" rows=\"3\" disabled=\"true\" multiple=\"multiple\">';\n\n \tforeach ( $users as $userid ) {\n \t\techo fullname( get_record('user', 'id', $userid) ).', ';\n \t}\n\n \techo '</textarea>';\n }\n\n \techo '</td><td class=\"extrabutton\">';\n\n\tlink_to_popup_window( '/blocks/email_list/email/participants.php?'.$url, 'participants', get_string('participants', 'block_email_list').' ...',\n 470, 520, get_string('participants', 'block_email_list') );\n\n echo '</td></tr>';\n echo '<tr valign=\"middle\">\n \t\t\t<td class=\"legendmail\">\n \t\t\t\t<div id=\"tdcc\"></div>\n \t\t\t</td>\n \t\t\t<td><div id=\"fortextareacc\"></div><div id=\"cc\"></div><div id=\"url\">'.$urltoaddcc.'<span id=\"urltxt\">&#160;|&#160;</span>'.$urltoaddbcc.'</div></td><td><div id=\"buttoncc\"></div></td></tr>';\n echo '<tr valign=\"middle\"><td class=\"legendmail\"><div id=\"tdbcc\"></div></td><td><div id=\"fortextareabcc\"></div><div id=\"bcc\"></div></td><td><div id=\"buttonbcc\"></div></td>';\n\n\n}", "public function getSubscriptions();", "public function getGiftcardRecipientName();", "function _simplenews_subscription_list_export_get_emails($states, $subscribed, $newsletters) {\n\n // Build conditions for active state, subscribed state and newsletter selection.\n if (isset($states['active'])) {\n $condition_active[] = 1;\n }\n if (isset($states['inactive'])) {\n $condition_active[] = 0;\n }\n if (isset($subscribed['subscribed'])) {\n $condition_subscribed[] = SIMPLENEWS_SUBSCRIPTION_STATUS_SUBSCRIBED;\n }\n if (isset($subscribed['unsubscribed'])) {\n $condition_subscribed[] = SIMPLENEWS_SUBSCRIPTION_STATUS_UNSUBSCRIBED;\n }\n if (isset($subscribed['unconfirmed'])) {\n $condition_subscribed[] = SIMPLENEWS_SUBSCRIPTION_STATUS_UNCONFIRMED;\n }\n\n // Get emails from the database.\n $query = db_select('simplenews_subscriber', 'ss');\n $query->innerJoin('simplenews_subscription', 'si', 'si.snid = ss.snid');\n $query->fields('ss', array('mail'))\n ->condition('ss.activated', $condition_active)\n ->condition('si.status', $condition_subscribed)\n ->condition('si.newsletter_id', $newsletters)\n ->distinct();\n $mails = $query->execute()->fetchCol(0);\n\n // Return comma separated array of emails or empty text.\n if ($mails) {\n return implode(\", \", $mails);\n }\n return t('No addresses were found.');\n}", "public function list($body = [])\n {\n return $this->apiClient->post('/senders/list', $body);\n }", "public function getSubscribers()\n {\n return $this['subscribers'];\n }", "function get_recipients_from_text($recipients)\n {\n $result = [];\n if($recipients)\n {\n $text = trim($recipients);\n $textAr = explode(\"\\n\", $text);\n \n foreach($textAr as $line)\n {\n $str = trim($line);\n $subArr = explode(',', $str);\n $temp = [];\n \n if (filter_var($subArr[0], FILTER_VALIDATE_EMAIL)) {\n $temp['email'] = $subArr[0];\n if($subArr[1])\n {\n $nameArr = split_name($subArr[1]);\n if($nameArr)\n {\n $temp['first_name'] = $nameArr['first_name']; \n $temp['last_name'] = $nameArr['middle_name'].' '.$nameArr['last_name']; \n }\n }\n $temp['custom'] = $subArr;\n array_push($result, $temp);\n } \n }\n }\n return $result;\n }", "public function listSubscriptions($request);", "public function recipients($id)\n {\n $campaign = $this->campaignRepo->find($id, ['email']);\n\n if ($campaign->email->status_id == CampaignStatus::STATUS_DRAFT)\n {\n return redirect()->route('campaigns.edit', $id);\n }\n\n if ($campaign->email->status_id == CampaignStatus::STATUS_SENT)\n {\n $recipients = $this->contactCampaignRepo->paginate('created_at', [], 50, ['campaign_id' => $id]);\n\n return view('campaigns.recipients', compact('campaign', $recipients));\n }\n\n return redirect()->route('campaigns.status', $id);\n }", "public function getList()\n {\n return $this->returnText('Full list of users and queues can be found here: https://nbq.2g.be/'. $this->c->id .'/'. urlencode($this->c->displayName) .' ');\n }", "private function disposableEmailList()\n {\n return array(\n 'df@mailinator.com',\n 'df@spamevader.com',\n 'temp@tempmail.com',\n 'something@trbvm.com',\n 'anything@boximail.com',\n );\n }", "public function hasRecipients()\n {\n return !empty(array_merge($this->to, $this->cc, $this->bcc));\n }", "function listUnsubscribe($id, $email_address, $delete_member=false, $send_goodbye=true, $send_notify=true) {\n $params = array();\n $params[\"id\"] = $id;\n $params[\"email_address\"] = $email_address;\n $params[\"delete_member\"] = $delete_member;\n $params[\"send_goodbye\"] = $send_goodbye;\n $params[\"send_notify\"] = $send_notify;\n return $this->callServer(\"listUnsubscribe\", $params);\n }", "public function getContactList()\r\n {\r\n return $this->exec('contact_list');\r\n }", "function listEmails(){\n \n $conn = $this->connect();\n $ret = '';\n \n $sql = 'select email from ' . $this->dbtable;\n\t\t\t$query = mysql_query( $sql, $conn );\n \n\t\t\twhile( $row = mysql_fetch_assoc( $query ) ){\n\t\t\t\t$ret .= $row['email'] . \";\\n\";\n\t\t\t}\n \n mysql_close( $conn );\n \n\t\t\treturn $ret;\n }", "public function list_all() {\n global $retailers;\t\t\n $this->names = array_column($retailers, 'name');\n }", "function listSubscribe($id, $email_address, $merge_vars, $email_type='html', $double_optin=true) {\n $params = array();\n $params[\"id\"] = $id;\n $params[\"email_address\"] = $email_address;\n $params[\"merge_vars\"] = $merge_vars;\n $params[\"email_type\"] = $email_type;\n $params[\"double_optin\"] = $double_optin;\n return $this->callServer(\"listSubscribe\", $params);\n }", "function num_recipients($address_list)\n{\n\t$num_recipients = 0;\n\n\tforeach ($address_list as $field => $adr_ary)\n\t{\n\t\t$num_recipients += sizeof($adr_ary);\n\t}\n\n\treturn $num_recipients;\n}", "function GetPendingReceiverList()\r\n{\r\n\t$db = rmsData::GetInstance();\r\n\t$oUser = cUserContainer::GetInstance();\r\n\r\n\t$oXML = new XML;\r\n\r\n\t/*\r\n\t\tThe following sql string\r\n\t\tbuilds a list of receivers. All of the numbered fields, org_ID, user_ID (owner),\r\n\t\tetc are aliased with their name.\r\n\t\tThe next part of the process is including the filters based upon what the user requested\r\n\t*/\r\n\r\n\t$strSQL = \"\r\n\t\tSELECT\r\n\t\t\ttblReceiverRequest.recReq_ID\r\n\t\t\t, tblReceiverRequest.recReq_Number\r\n\t\t\t, tblReceiverRequest.recReq_Smartcard\r\n\t\t\t, tblReceiverRequest.recReq_Hardware\r\n\t\tFROM\r\n\t\t\ttblReceiverRequest\";\r\n\r\n\t$arResults = $db->Select($strSQL);\r\n\r\n\tfor($i = 0; $i < sizeof($arResults); $i++)\r\n\t{\r\n\t\t$arUser = $oUser->Get($arResults[$i]['user_ID']);\r\n\t\t$arResults[$i]['user_Name'] = $arUser['user_Name'];\r\n\t}\r\n\r\n\t$oXML->serializeArray($arResults);\r\n\t$oXML->outputXHTML();\r\n\t\r\n\t//OutputXMLList($strSQL, \"list\", \"element\");\r\n\t\r\n}", "public function actionListAvailable()\n\t{\n\t\t$destination = new Destinations();\n\t\t$tour = new Tours();\n\n\t\t$models = $destination->getAvailableDestination();\n\n\t\t$data = array();\n\t\tforeach ($models as $model) {\n\t\t\t$totalTours = count($tour->getTourInDestination($model->id));\n\n\t\t\t$data[] = array('des' => $model, 'totalTours' => $totalTours);\n\t\t}\n\t\theader('Content-Type: application/json');\n\t\theader(\"Access-Control-Allow-Origin: *\");\n header(\"Access-Control-Allow-Methods: GET, POST, PUT, DELETE\");\n echo json_encode($data);\n\t}", "public function getReceivers(): array\n {\n return \\iterator_to_array($this->receivers);\n }" ]
[ "0.75031847", "0.7330448", "0.6815565", "0.6630822", "0.6512784", "0.64755046", "0.6436107", "0.64142424", "0.63871074", "0.62665427", "0.6192078", "0.6102297", "0.609221", "0.60718334", "0.6026278", "0.6014206", "0.59820366", "0.5939836", "0.5939737", "0.59258425", "0.59183496", "0.585837", "0.5840727", "0.582808", "0.58134514", "0.5782607", "0.5758794", "0.5736924", "0.5736681", "0.5713473", "0.5676845", "0.56443834", "0.56405485", "0.5622341", "0.5618394", "0.5595923", "0.5594726", "0.5591325", "0.55817246", "0.5528145", "0.5498449", "0.5484481", "0.5481364", "0.54779255", "0.54518586", "0.5447513", "0.54208326", "0.5381389", "0.53788793", "0.53748333", "0.53745687", "0.53697467", "0.5349868", "0.53483754", "0.534054", "0.53388613", "0.53380847", "0.53350407", "0.5324264", "0.53141654", "0.5311989", "0.5307084", "0.52994436", "0.52983314", "0.52841204", "0.52784425", "0.52501774", "0.5245639", "0.5242878", "0.52383244", "0.5229629", "0.5225049", "0.52167064", "0.52130574", "0.52078766", "0.5207121", "0.52005816", "0.5197811", "0.5187127", "0.5178653", "0.51774573", "0.517396", "0.51641536", "0.51619583", "0.5161159", "0.51591754", "0.5157801", "0.51555586", "0.5150775", "0.51500946", "0.51497674", "0.5132839", "0.513188", "0.5131096", "0.513039", "0.5129008", "0.51232684", "0.5115496", "0.5113118", "0.5112524" ]
0.68317235
2
Fetch the details of a transfer recipient
public function fetch(string $id_or_code): array { return $this->client->get("transferrecipient/{$id_or_code}"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRecipient() {\n\t\treturn $this -> data['recipient'];\n\t}", "public function getRecipient($id);", "public function getRecipient()\n {\n return $this->hasOne($this->userClassName, ['id' => 'recipient_id'])->from(['recipient' => $this->userTableName]);\n }", "public function getRecipient()\n {\n return $this->recipient;\n }", "public function recipient ()\n {\n return $this->belongsTo(User::class, 'recipient_id', 'id');\n }", "public function getRecipient() {\n return $this->recipient;\n }", "public function getRecipients();", "public function getRecipientId();", "public function getRecipientId();", "public function originalRecipient()\n {\n $thread = $this;\n $creator = $thread->creator();\n\n // Filter out the original recipient\n $recipients = $thread->participants->filter(function ($participant, $key) use ($creator) {\n // If the userId doesn't equal the id of the sender\n // we can be sure this participant is the recipient\n return $participant->user->id !== $creator->id;\n });\n\n // Convert Participant to User\n $recipients = $recipients->map(function($participant) {\n return $participant->user;\n });\n\n // return $recipients;\n return $recipients->first();\n }", "public function getRecipientId() {\n return $this->recipientId;\n }", "function get_recipient_id() {\n\t\treturn $this->get_data( 'recipient' );\n\t}", "public function getReceivedBy()\n {\n return $this->get(self::RECEIVEDBY);\n }", "public function recipient() \n {\n if($this->recipient_type == 'User') return $this->belongsTo('App\\Models\\User\\User', 'recipient_id');\n return $this->belongsTo('App\\Models\\Character\\Character', 'recipient_id');\n }", "public function getAllRecipients() {}", "public function getTransfer()\n {\n if ($this->_info !== false) {\n return $this->_info;\n }\n if (!$this->transfer_type) {\n return false;\n }\n switch ($this->transfer_type) {\n case 'outgoing':\n $this->_info = Transfers_Outgoing::model()->findByPk($this->transfer_id);\n break;\n case 'incoming':\n $this->_info = Transfers_Incoming::model()->findByPk($this->transfer_id);\n break;\n }\n return $this->_info;\n }", "public function recipient()\n {\n return $this->belongsTo('App\\User');\n }", "public function myRecipientDetails()\n {\n $recipients = Recipient::where('user_id', Auth::id())->get();\n return view('frontEnd.usersPanel.recipients',compact('recipients'));\n }", "function getRecipients() {\n\t\treturn $this->getData('recipients');\n\t}", "public function __toString() {\n\t\treturn $this->recipient;\n\t}", "public function getTo();", "public function getMyParcelOnlyRecipient($order_id)\r\n {\r\n $order_query = $this->db->query(\"SELECT recipient_only FROM `\" . DB_PREFIX . self::$table_name . \"` WHERE order_id = \" . (int)$order_id . \" LIMIT 1\");\r\n return $this->getValueFromQuery('recipient_only', $order_query);\r\n }", "public function getMyParcelOnlyRecipient($order_id)\r\n {\r\n $order_query = $this->db->query(\"SELECT recipient_only FROM `\" . DB_PREFIX . self::$table_name . \"` WHERE order_id = \" . (int)$order_id . \" LIMIT 1\");\r\n return $this->getValueFromQuery('recipient_only', $order_query);\r\n }", "public function recipient($recipient)\n {\n return $this->setProperty('recipient', $recipient);\n }", "public function getToUser()\n {\n return $this->toUser;\n }", "function getRecipientString() {\n\t\treturn $this->getAddressArrayString($this->getRecipients());\n\t}", "public function buildRecipientList() {\n $actors = $this->loadAllActors();\n $actors = $this->filterDeliverableActors($actors);\n return mpull($actors, 'getPHID');\n }", "public function getTo() {\n return $this->user_to;\n }", "public function getGiftcardRecipientName();", "public function list($params = []): array\n {\n return $this->client->get('transferrecipient', $params);\n }", "function getTo(){\n\t\t\treturn $this->to;\n\t\t}", "public function getRecipients()\n {\n return $this->getMessage()['recipient'];\n }", "function getToRecipients($emailId) {\n // SELECT * FROM `email_recipients` WHERE `id_email` = %s AND `to_recipient` = 1\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT * FROM scuola.email_recipients WHERE id_email = %s AND to_recipient = 1\", $emailId);\n\n $recipients = '';\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n } else {\n //$recipients = array();\n //$i=0;\n if (mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_assoc($result)) {\n //$recipients = array_fill($i, 1, $row['email'].';');\n //$i++;\n $recipients .= $row['name'] . '<' . $row['email'] . '>;';\n }\n }\n }\n }\n $this->closeConnection();\n return $recipients;\n }", "public function recipients(){\n $user = User::whereHas('roles', function($q){\n $q->where('role_id', 3);\n })->get();\n\n return $user;\n }", "public function getTo()\n {\n return $this->_to;\n }", "public function getTo()\n {\n return $this->_to;\n }", "public function getTransferringTo()\n {\n return $this->transferringTo;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo() {\n return $this->to;\n }", "public function getGiftcardRecipientEmail();", "function getTo();", "public function recipients()\n {\n return $this->participants()->where('user_id', '!=', $this->user_id);\n }", "public function getMessageToUser($to)\n {\n $rowset = $this->tableGateway->select(function(Select $select) use ($to) {\n $select->where->equalTo('to', $to)\n ->or->equalTo('cc', $to)\n ->or->equalTo('bcc', $to);\n $select->order('id_message DESC');\n });\n return $rowset;\n }", "public function getToInfo() {\r\n\t\treturn $this->toInfo;\r\n\t}", "public function getTo() {\n\t\treturn $this->to;\n\t}", "public function getTo() {\n\t\treturn $this->to;\n\t}", "public function getAllRecipientAddresses()\n {\n }", "public function getRecipientState();", "public function getDataList()\n {\n //get all Tranfer Recipient\n\n $thePaystack = new Paystack();\n $theTransferRecipient = $thePaystack->listTransferRecipient(null, null);\n\n return Datatables::of($theTransferRecipient['data'])\n ->addColumn('action', function ($transferRecipient) {\n return '<button type=\"button\" class=\"btn btn-success btn-sm transfer_btn\"> <i class=\"fa fa-pencil\"></i>Transfer</button>'. ' <button type=\"button\" class=\"btn btn-info btn-sm\" onclick=\"alert('. $transferRecipient['id'] .');\"> <i class=\"fa fa-binoculars\"></i>Edit</button>';\n })\n ->make(true);\n }", "function getAddress(&$transferData){\n\t\n\tglobal $dz,$thisEntity;\n\t\n\t$username=$transferData['Username'];\n\t$reference=$transferData['Reference'];\n\t$title=$transferData['Title'];\n\t\n\t\n\t// Get the entity of the user being paid:\n\t$toPay=$dz->get_row('select `Entity` from `Root.Usernames` where `Username`=\"'.$username.'\"');\n\t\n\tif(!$toPay){\n\t\t// Username was not found.\n\t\terror('username/notfound');\n\t}\n\n\t// Is the entity the same as this one?\n\t$entityID=$toPay['Entity'];\n\n\t// Transaction delay, if one is applicable.\n\t// This will almost always be zero representing that a transaction is expected to be in the 2s limit.\n\t$delay='0';\n\n\tif($entityID==$thisEntity['ID']){\n\t\t\n\t\t// Yes! This is an internal transaction (i.e. within this bank). No addressing required.\n\t\t$toGroup=$thisEntity['Group'];\n\t\t// return null;\n\t}\n\t\n\t// This is a transaction between banks. We'll need an address to send to:\n\t$entityInfo=$dz->get_row('select `Group`,`Endpoint` from `Root.Entities` where ID='.$entityID);\n\t\n\tif(!$entityInfo){\n\t\t\n\t\t// This server has out-of-date root information.\n\t\tserverError();\n\t\t\n\t}\n\t\n\t// Got a from username? (Optional):\n\tif(isset($transferData['FromUsername'])){\n\t\t// Add it:\n\t\t$privText=',\"from\":\"'.$transferData['FromUsername'].'\",\"name\":\"'.$transferData['Name'].'\"';\n\t}else{\n\t\t$privText='';\n\t}\n\t\n\t// Send the username and reference pair to the username/send API.\n\t// In response we'll get an address to send to.\n\t$error;\n\t$remote=sendTo(\n\t\t$entityInfo['Endpoint'],\n\t\t'username/send',\n\t\t'{\"username\":\"'.$username.'\",\"reference\":\"'.escape($reference,false).'\",\"title\":\"'.escape($title,false).'\",\"items\":'.$transferData['ItemInformation'].$privText.'}',\n\t\t$error\n\t);\n\t\n\t// Did it error?\n\tif($error){\n\t\t\n\t\t// Remote server errored.\n\t\terror('remote/error',$error);\n\t\t\n\t}\n\t\n\t// Update the to group:\n\t$transferData['ToGroup']=$entityInfo['Group'];\n\t\n\t// JSON decode it:\n\t$remote=json_decode($remote,true);\n\t\n\t// Get the address info:\n\t$addrInfo=safe('address',VALID_ARRAY,$remote);\n\t\n\t// Optional delay info:\n\t$delay=safe('delay',VALID_NUMBER,$remote,true);\n\t\n\t// Get the status:\n\t$status=safe('status',VALID_ALPHA,$addrInfo);\n\t\n\tif($status!='OK'){\n\t\t\n\t\t// Remote server was unable to provide an address - try again shortly.\n\t\terror('remote/noaddr',$delay);\n\t\t\n\t}\n\t\n\t// Great - should have an address here:\n\t$address=safe('value',VALID_HEX,$addrInfo);\n\t\n\tif($delay){\n\t\t$transferData['Delay']=$delay;\n\t}\n\t\n\t$transferData['ToAddress']=$address;\n\t\n\treturn $address;\n\t\n}", "public function getReplyTo();", "public function getReplyTo();", "protected function getRecipientEmails()\n {\n return $this->recipients\n ->map(function($user) {\n return $user->{User::COLUMN_EMAIL};\n })\n ->toArray();\n }", "public function getRecipientAccountId()\n {\n return $this->recipientAccountId;\n }", "public function toInfo()\n {\n return $this->belongsTo(\\App\\Account::class, 'to', 'id');\n }", "public function getTransferId()\n {\n return $this->transfer_id;\n }", "public function getAllRecipientAddresses()\n {\n return $this->all_recipients;\n }", "public function getSentTo()\n {\n return $this->sentTo;\n }", "function block_get_user($to = USERID)\n\t{\n\t\tglobal $sql, $tp;\n\t\t$ret = array();\n\t\t$to = intval($to);\t\t// Precautionary\n\t\tif ($sql->db_Select_gen('SELECT pm.*, u.user_name FROM `#private_msg_block` AS pm LEFT JOIN `#user` AS u ON `pm`.`pm_block_from` = `u`.`user_id` WHERE pm_block_to = '.$to))\n\t\t{\n\t\t\twhile($row = $sql->db_Fetch(MYSQL_ASSOC))\n\t\t\t{\n\t\t\t\t$ret[] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "public function receiver()\n {\n return User::where('id', $this->receiver_id)->first();\n }", "public function getReplyTo()\n {\n }", "public function transfersto()\n {\n return $this->hasMany('Transfer', 'accountto_id');\n }", "public function getContact()\n {\n $userId = Yii::$app->user->id;\n\n if ($userId == $this->author_id) {\n return $this->recipient;\n } elseif ($userId == $this->recipient_id) {\n return $this->author;\n }\n\n }", "public function getRecipients()\r\n {\r\n return ['to' => $this->to, 'cc' => $this->cc, 'bcc' => $this->bcc];\r\n }", "public function person() {\n $personId = $_REQUEST['id'];\n $person = $this->tmdb->getPerson($personId);\n $imageUrl = $this->tmdb->getImageUrl($person['profile_path'], TMDb::IMAGE_PROFILE, 'w185');\n //$images = $this->tmdb->getPersonImages($personId);\n $credits = $this->tmdb->getPersonCredits($personId);\n $map = array('person' => $person, 'imageUrl' => $imageUrl, 'credits' => $credits);\n $this->reply($map);\n }", "public function listRecipients()\n {\n $recipients = $this->recipients;\n if (!count($recipients))\n return null;\n\n $recipients->transform(function ($recipient) {\n if (!$recipient->messagable) return FALSE;\n if (!$recipient->messagable->staff) return FALSE;\n\n return $recipient->messagable->staff;\n });\n\n return $recipients;\n }", "public function recipients()\n {\n return $this->belongsToMany('App\\Recipient');\n }", "function rlip_get_email_recipient($email) {\n global $DB;\n\n if ($result = $DB->get_record('user', array('email' => $email))) {\n //user exists, so use their user record\n return $result;\n }\n\n //fake user record for non-moodle recipient\n $result = new stdClass;\n $result->email = $email;\n\n return $result;\n}", "public function getTeacherRequests() {\n $sql = 'SELECT mail, id FROM user WHERE id IN (SELECT user_id FROM teacher_request)';\n $sth = $this->db->prepare($sql);\n $sth-> execute (array ());\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n\n }", "public function getFailedRecipients() {}", "public function test_single_recipient_endpoint()\n {\n $response = $this->json('GET',\n route('emails.recipient', 'iamhabbeboy@gmail.com')\n );\n $response->assertStatus(200);\n }", "public function getPeerInfo();", "public function getToAddress()\n {\n return $this->toAddress;\n }", "public function getTransferido() {\n return $this->transferido;\n }", "public function getToList(): string {\n\t\treturn $this->createEMailList($this->getTo());\n\t}", "public function getRecipients()\n\t{\n\t\t$me\t\t\t= $this->getService('com://admin/ninjaboard.model.people')->getMe();\n\t\t$table\t\t= $this->getTable();\n\t\t$params\t\t= $this->getService('com://admin/ninjaboard.model.settings')->getParams();\n\t\t$topic\t\t= $this->getService('com://site/ninjaboard.model.topics')->id($this->_state->topic)->getItem();\n\t\t$forum\t\t= $this->getService('com://site/ninjaboard.model.forums')->id($topic->forum_id)->getItem();\n\t\t$ids\t\t= array();\n\t\t\n\t\tif($params->email_notification_settings->auto_notify_admins == 'yes') {\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('id')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('users')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('sendEmail', '=', 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('id', '!=', $me->id);\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Recipients subscribed to this topic\n\t\tif($this->_state->topic)\n\t\t{\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('topic'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', '=', $this->_state->topic)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Recipients subscribed to this forum and/or parent forum(s)\n\t\tif($forum->id)\n\t\t{\n\t\t\t$forums = array_filter(explode('/', $forum->path));\n\t\t\t$forums[] = $forum->id;\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('forum'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', 'in', $forums)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Recipients subscribed to me\n\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('person'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', 'in', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t{\n\t\t\t// we most have access to this forum to get notifications\n\t\t\t$person = $this->getService('com://admin/ninjaboard.model.people')->id($id)->getItem();\n\n\t\t\t// check we have permission for this forum\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t->select('tbl.level AS level')\n\t\t\t\t\t\t\t->from('ninjaboard_assets AS tbl')\n\t\t\t\t\t\t\t->order('tbl.level', 'DESC')\n\t\t\t\t\t\t\t->limit(1)\n\t\t\t\t\t\t\t->where('tbl.name', '=', 'com_ninjaboard.forum.'.$forum->id.'.'.$person->ninjaboard_usergroup_id.'.forum');\n\n\t\t\t$result = $table->getDatabase()->select($query, KDatabase::FETCH_FIELD);\n\t\t\t$result = isset($result) ? $result : $person->forum_permissions;\n\n\t\t\tif (!$result) continue;\n\n\t\t\t$ids[$id] = $id;\n\n\t\t}\n\t\t\n\t\tif(!$ids) return array();\n\t\t\n\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select(array('name', 'email'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('users')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('id', 'in', $ids);\n\t\treturn $table->getDatabase()->select($query, KDatabase::FETCH_OBJECT_LIST);\n\t}", "private function recipients()\n {\n if (request('type') === 'bulk') {\n return $recipients = count(Contact::active()->where('group_id', request('recipients'))->pluck('mobile'));\n } elseif (request('type') === 'single') {\n return $recipients = 1;\n }\n }", "public function getDestination()\n {\n return $this->send('POST', 'getDestination');\n }", "public function getFrom();", "public function getFrom();", "public function getTo()\n {\n return $this->config['Destination']['ToAddresses'];\n }", "public function getReceiver()\n {\n return $this->user;\n }", "public function getMail()\n {\n if(Session::has('prac_id'))\n {\n $viewer = Practitioner::find(Session::get('prac_id'));\n }\n elseif(Auth::check())\n {\n $viewer = User::find(Auth::user()->id);\n }\n\n if(isset($viewer))\n {\n $conversations = Message::latest('created_at')->GetConversationReceiver($viewer->email)\n ->distinct()->lists('conv_id'); \n\n $conversationlist = array();\n\n foreach($conversations as $conversation_id)\n { \n $unreadcounter =0;\n $conversation = Conversation::find($conversation_id);\n\n if(($conversation->firstuser_email !== $viewer->email) && ($conversation->seconduser_email === $viewer->email))\n {\n $recipient_email = $conversation->firstuser_email;\n $practitioner = Practitioner::ValidateEmail($recipient_email)->first();\n\n if($practitioner === null)\n {\n $user = User::ValidateEmail($recipient_email)->first();\n\n if($user !== null)\n {\n $recipient = $user;\n }\n else\n {\n $recipient = null;\n }\n }\n else\n {\n $recipient = $practitioner;\n }\n\n }\n elseif(($conversation->seconduser_email !== $viewer->email) && ($conversation->firstuser_email === $viewer->email))\n { \n $recipient_email = $conversation->seconduser_email;\n $practitioner = Practitioner::ValidateEmail($recipient_email)->first();\n\n if($practitioner === null)\n {\n $user = User::ValidateEmail($recipient_email)->first();\n\n if($user !== null)\n {\n $recipient = $user;\n }\n else\n {\n $recipient = null;\n }\n }\n else\n {\n $recipient = $practitioner;\n }\n\n }\n else\n {\n $recipient_email = \"Error retrieving recipient email :(\";\n }\n \n $last_message = Message::latest('created_at')->GetMessageById($conversation_id)\n ->first();\n\n $last_msg_title = $last_message->title;\n $last_msg_content = $last_message->content;\n $last_msg_status = $last_message->status;\n $last_msg_time = $last_message->created_at->diffForHumans();\n $unreadcounter = count(Message::GetConversationReceiver($viewer->email)->GetMessageById($conversation_id)\n ->GetUnreadMessages()->lists('id'));\n\n \n $is_last_sender = true;\n if($last_message->receiver_email === $viewer->email)\n {\n $is_last_sender = false;\n }\n\n $has_unread = false;\n if(($unreadcounter > 0) AND ($is_last_sender === false))\n {\n $has_unread = true;\n }\n\n if($recipient !== null)\n {\n $recipient_name = $recipient->fname . \" \" . $recipient->sname;\n $recipient_email = $recipient->email;\n }\n else\n {\n $recipient_name ='Recipient no longer exists';\n $recipient_email = 'Recipient no longer exists';\n }\n\n $conversationlist[] = ['conv_id'=>$conversation_id,\n 'recipient_name'=>$recipient_name, \n 'recipient_email'=>$recipient_email,\n 'last_msg_title'=>$last_msg_title,\n 'last_msg_content'=>$last_msg_content,\n 'last_msg_time'=>$last_msg_time,\n 'last_msg_status'=>$last_msg_status,\n 'unreadcount'=>$unreadcounter,\n 'has_unread' =>$has_unread,\n 'is_last_sender' =>$is_last_sender];\n \n }\n }\n else\n {\n return null;\n } \n \n if(count($conversationlist) < 1)\n {\n return null;\n }\n else\n { \n return $conversationlist;\n }\n }", "function getCcRecipients($emailId) {\n // SELECT * FROM `email_recipients` WHERE `id_email` = %s AND `to_recipient` = 1\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT * FROM scuola.email_recipients WHERE id_email = %s AND cc_recipient = 1\", $emailId);\n\n $recipients = '';\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n } else {\n //$recipients = array();\n //$i=0;\n if (mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_assoc($result)) {\n //$recipients = array_fill($i, 1, $row['email'].';');\n //$i++;\n $recipients .= $row['name'] . '<' . $row['email'] . '>;';\n }\n }\n }\n }\n $this->closeConnection();\n return $recipients;\n }", "public function getAllRecipients()\n { \n $recipientlist = array();\n\n if(Session::has('prac_id'))\n {\n $practitionerlist = Practitioner::NotCurrent()->get();\n $clientlist = User::MyClient()->get();\n\n $allRecipients = $practitionerlist->merge($clientlist);\n\n foreach($allRecipients as $recipient)\n {\n $recipientlist[] = ['id'=>$recipient->id,\n 'name'=>$recipient->fname . \" \" . $recipient->sname,\n 'email'=>$recipient->email\n ];\n }\n\n }\n elseif(Auth::check())\n {\n $viewer = User::find(Auth::user()->id);\n $viewer_reports = Report::GetUserReports()->get();\n $owner_practitioner = Practitioner::GetThisPractitioner($viewer->prac_id)->get();\n\n foreach($viewer_reports as $report)\n { \n $shared_reports[] = $report->practitioners()->get();\n }\n\n $shared_reports[] = $owner_practitioner;\n\n foreach($shared_reports as $shared_report)\n {\n foreach($shared_report as $report_participants)\n {\n $recipientlist[] = ['id'=>$report_participants->id,\n 'name'=>$report_participants->fname . \" \" . $report_participants->sname,\n 'email'=>$report_participants->email\n ];\n }\n\n }\n \n }\n\n if(count($recipientlist) < 1)\n {\n return null;\n }\n else\n { \n return $recipientlist;\n }\n\n }", "public function getOneInformation(){\n\t\tuser_login_required();\n\n\t\t//Get conversation ID\n\t\t$conversationID = $this->getSafePostConversationID(\"conversationID\");\n\t\t\n\t\t//Try to get informations about the conversation\n\t\t$conversationsList = CS::get()->components->conversations->getList(userID, $conversationID);\n\n\t\t//Check for errors\n\t\tif($conversationsList === false)\n\t\t\tRest_fatal_error(500, \"An internal error occured\");\n\n\t\t//Check if a conversation was found\n\t\tif(count($conversationsList) < 1)\n\t\t\tRest_fatal_error(401, \"Users doesn't belong to the specified conversation,\".\n\t\t\t\" or the conversation doesn't exists !\");\n\n\t\t//Return conversation informations\n\t\treturn self::ConvInfoToAPI($conversationsList[0]);\n\t}", "public function getSenderAttribute()\n {\n return User::where('id', $this->sender_id)->first();\n }", "private function retrieveSender() : string {\n\n // Get min & max length of the whole sender information\n $senderInformationLength = $this->getSenderInformationLength();\n\n // Retrieve the sender information from email with regex\n $sender = $this->retrieveInformation($this->currentEmail, [\n self::REGEX_NEEDLE_START_SENDER,\n \".{\" . $senderInformationLength[\"min\"] . \",\" . $senderInformationLength[\"max\"] . \"}\"\n ], true,\"Sender information\",\n self::ATTRIBUTE_RETRIEVAL_SOURCE_NAME, true, 0);\n\n // Return sender information without whitespaces at end and beginning\n return trim($sender);\n }", "function getTransporterInfoById($userId)\n {\n $this->db->select('*');\n $this->db->from('tbl_document_manager');\n //$this->db->where('isDeleted', 0);\n $this->db->where('id', $userId);\n $query = $this->db->get();\n \n return $query->row();\n }", "public function findByRecipientID(string $id) : ?array\n {\n $resp = DB::table($this->TABLE)->where(self::SENDER_ID, $id)->orderBy(self::DATE, self::ASC)->get();\n return $this->loadMany($resp);\n }", "public function getSender();", "public function transfersfrom()\n {\n return $this->hasMany('Transfer', 'accountfrom_id');\n }", "function jx_get_transporterdetbyid($tranporter_id=0)\r\n\t\t{\r\n\t\t\t$user=$this->erpm->auth();\r\n\t\t\t$output = array();\r\n\t\t\t\r\n\t\t\t// Query to get tray details from tray id\r\n\t\t\t$this->db->where('id',$tranporter_id);\r\n\t\t\t$transport_det_res = $this->db->get('pnh_transporter_info');\r\n\t\t\tif($transport_det_res->num_rows())\r\n\t\t\t{\r\n\t\t\t\t$output['status'] = 'success';\r\n\t\t\t\t$output['transport_det'] = $transport_det_res->row_array();\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\t$output['status'] = 'error';\r\n\t\t\t\t$output['error'] = 'Invalid tray in reference';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo json_encode($output);\r\n\t\t}", "public function index()\n {\n //get all Tranfer Recipient\n\n return view('transferrecipients.index');\n }", "private function getTo(): ?array {\n\t\treturn $this->to;\n\t}" ]
[ "0.67464906", "0.67315483", "0.65200895", "0.6422163", "0.63442075", "0.63352466", "0.6281864", "0.6234124", "0.6234124", "0.6139458", "0.6136606", "0.60785323", "0.60658264", "0.60319126", "0.59834975", "0.59727174", "0.59590125", "0.5890167", "0.5884459", "0.58234155", "0.5813395", "0.5773541", "0.5773541", "0.5758941", "0.57151365", "0.5670317", "0.56602466", "0.5633172", "0.5632456", "0.56186754", "0.55662334", "0.5556741", "0.5548127", "0.55319005", "0.5525717", "0.5525717", "0.5513272", "0.54865074", "0.54865074", "0.54865074", "0.54865074", "0.54865074", "0.54865074", "0.5476866", "0.5445944", "0.5443809", "0.54297215", "0.54183966", "0.541523", "0.5407129", "0.5407129", "0.540652", "0.5403728", "0.539579", "0.5336336", "0.53122836", "0.53122836", "0.5297093", "0.5297038", "0.5296774", "0.5296189", "0.5295168", "0.5294112", "0.5290066", "0.5276846", "0.5244492", "0.5233472", "0.5231574", "0.5201376", "0.5196866", "0.5190053", "0.51852447", "0.5169101", "0.5142542", "0.51412964", "0.512908", "0.5115776", "0.5109905", "0.5108577", "0.5106163", "0.50809866", "0.50710076", "0.5070355", "0.5063987", "0.5063987", "0.5061681", "0.50525934", "0.505178", "0.50484884", "0.50465524", "0.50384927", "0.50382316", "0.5033607", "0.5031638", "0.5030195", "0.5021059", "0.50140846", "0.5011766", "0.50113744", "0.50083184" ]
0.5787235
21
Update transfer recipients available on your integration
public function update(string $id_or_code, string $name, $params = []): array { $params['name'] = $name; return $this->client->put("transferrecipient/{$id_or_code}", $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function withRecipients(array $recipients);", "function setRecipients($recipients) {\n\t\t$this->setData('recipients', $recipients);\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 setRecipients($recipients = array())\n\t{\n\t\t$this->vars['recipients'] = $recipients;\n\t}", "public function updateCompleteOwnersList()\n\t{\n\t\t$role = Role::where('name', 'Propietario')->first();\n\n\t\t$arregloUsuarios = $this->usersCompletedByRole($role);\n\n\t\t\n\n\t\ttry{\n\t\t\t$res = $this->client->request('PUT', 'https://api.sendgrid.com/v3/marketing/contacts', [\n\t\t\t\t//'headers' => ['Authorization' => 'Bearer '.env('SENDGRID_API_KEY'), 'Content-Type' => 'application/json'],\n\t\t\t\t'body' => json_encode([\n\t\t\t\t\t\t'list_ids' => [env('SENDGRID_ID_OWNERS')],\n\t\t\t\t\t\t'contacts' => $arregloUsuarios\n\t\t\t\t\t])\n\t\t\t]);\n\t\t}catch( \\Exception $e )\n\t\t{\n\t\t\tdd($e);\n\t\t}\n\t}", "public function unsetAdditionalRecipients(): void\n {\n $this->additionalRecipients = [];\n }", "public function withAddedRecipients(array $recipients);", "public function getAllRecipients() {}", "public function setRecipients(array $recipients)\n {\n $this->recipients = $recipients;\n }", "public function updateCompleteAgentsList()\n\t{\n\t\t$role = Role::where('name', 'Agente')->first();\n\n\t\t$arregloUsuarios = $this->usersCompletedByRole($role);\n\t\t\n\n\t\ttry{\n\t\t\t$res = $this->client->request('PUT', 'https://api.sendgrid.com/v3/marketing/contacts', [\n\t\t\t\t//'headers' => ['Authorization' => 'Bearer '.env('SENDGRID_API_KEY'), 'Content-Type' => 'application/json'],\n\t\t\t\t'body' => json_encode([\n\t\t\t\t\t\t'list_ids' => [env('SENDGRID_ID_AGENTS')],\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 setAdditionalRecipients(?array $additionalRecipients): void\n {\n $this->additionalRecipients['value'] = $additionalRecipients;\n }", "public function getRecipients();", "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 setAdditionalNotificationRecipients(?array $value): void {\n $this->getBackingStore()->set('additionalNotificationRecipients', $value);\n }", "public function cronNotifyRecipients()\n\t{\n\t\t// Check if notifications should be send.\n\t\tif (!$GLOBALS['TL_CONFIG']['avisota_send_notification'])\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->loadLanguageFile('avisota_subscription');\n\n\t\t$entityManager = EntityHelper::getEntityManager();\n\t\t$subscriptionRepository = $entityManager->getRepository('Avisota\\Contao:RecipientSubscription');\n\t\t$intCountSend = 0;\n\n\t\t$resendDate = $GLOBALS['TL_CONFIG']['avisota_notification_time'] * 24 * 60 * 60;\n\t\t$now = time();\n\n\t\t// Get all recipients.\n\t\t$queryBuilder = EntityHelper::getEntityManager()->createQueryBuilder();\n\t\t$queryBuilder\n\t\t\t\t->select('r')\n\t\t\t\t->from('Avisota\\Contao:Recipient', 'r')\n\t\t\t\t->innerJoin('Avisota\\Contao:RecipientSubscription', 's', 'WITH', 's.recipient=r.id')\n\t\t\t\t->where('s.confirmed=0')\n\t\t\t\t->andWhere('s.reminderCount < ?1')\n\t\t\t\t->setParameter(1, $GLOBALS['TL_CONFIG']['avisota_notification_count']);\n\t\t$queryBuilder->orderBy('r.email');\n\t\t\n\t\t// Execute Query.\n\t\t$query = $queryBuilder->getQuery();\n\t\t$integratedRecipients = $query->getResult();\n\t\t\n\t\t// Check each recipient with open subscription.\n\t\tforeach ($integratedRecipients as $integratedRecipient)\n\t\t{\n\t\t\t$subscriptions = $subscriptionRepository->findBy(array('recipient' => $integratedRecipient->id, 'confirmed' => 0), array('updatedAt' => 'asc'));\n\t\t\t$tokens = array();\n\t\t\t$blnNotify = false;\n\n\t\t\tforeach ($subscriptions as $subscription)\n\t\t\t{\n\t\t\t\t// Check if we are over the $resendDate date.\n\t\t\t\tif (($subscription->updatedAt->getTimestamp() + $resendDate) > $now)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Set some data.\n\t\t\t\t$blnNotify = true;\n\t\t\t\t$tokens[] = $subscription->getToken();\n\n\t\t\t\t// Update the subscription.\n\t\t\t\t$subscription->updatedAt = new \\Datetime();\n\t\t\t\t$subscription->reminderSent = new \\Datetime();\n\t\t\t\t$subscription->reminderCount = $subscription->reminderCount + 1;\n\n\t\t\t\t// Save.\n\t\t\t\t$entityManager->persist($subscription);\n\t\t\t}\n\n\t\t\t// Check if we have to send a notify and if we have a subscription module.\n\t\t\tif ($blnNotify && $subscription->getSubscriptionModule())\n\t\t\t{\n\t\t\t\t$subscription = $subscriptions[0];\n\n\t\t\t\t$parameters = array(\n\t\t\t\t\t'email' => $integratedRecipient->email,\n\t\t\t\t\t'token' => implode(',', $tokens),\n\t\t\t\t);\n\n\t\t\t\t$arrPage = $this->Database\n\t\t\t\t\t\t->prepare('SELECT * FROM tl_page WHERE id = (SELECT avisota_form_target FROM tl_module WHERE id = ?)')\n\t\t\t\t\t\t->limit(1)\n\t\t\t\t\t\t->execute($subscription->getSubscriptionModule())\n\t\t\t\t\t\t->fetchAssoc();\n\n\t\t\t\t$objNextPage = $this->getPageDetails($arrPage['id']);\n\t\t\t\t$strUrl = $this->generateFrontendUrl($objNextPage->row(), null, $objNextPage->rootLanguage);\n\n\t\t\t\t$url = $this->generateFrontendUrl($arrPage);\n\t\t\t\t$url .= (strpos($url, '?') === false ? '?' : '&');\n\t\t\t\t$url .= http_build_query($parameters);\n\n\t\t\t\t$newsletterData = array();\n\t\t\t\t$newsletterData['link'] = (object) array(\n\t\t\t\t\t\t\t'url' => \\Environment::getInstance()->base . $url,\n\t\t\t\t\t\t\t'text' => $GLOBALS['TL_LANG']['avisota_subscription']['confirmSubscription'],\n\t\t\t\t);\n\n\t\t\t\t// Try to send the email.\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->sendMessage($integratedRecipient, $GLOBALS['TL_CONFIG']['avisota_notification_mail'], $GLOBALS['TL_CONFIG']['avisota_default_transport'], $newsletterData);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exc)\n\t\t\t\t{\n\t\t\t\t\t$this->log(sprintf('Unable to send reminder to \"%s\" with error message - %s', $integratedRecipient->email, $exc->getMessage()), __CLASS__ . ' | ' . __FUNCTION__, TL_ERROR);\n\t\t\t\t}\n\n\t\t\t\t// Update recipient;\n\t\t\t\t$integratedRecipient->updatedAt = new \\DateTime();\n\n\t\t\t\t// Set counter.\n\t\t\t\t$intCountSend++;\n\t\t\t}\n\n\t\t\t// Send only 5 mails per run.\n\t\t\tif ($intCountSend >= 5)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$entityManager->flush();\n\t}", "public function setRecipients(?array $recipients): self\n {\n $this->initialized['recipients'] = true;\n $this->recipients = $recipients;\n\n return $this;\n }", "public function clearAllRecipients()\n {\n }", "public function testRecipients()\n {\n $recipient = $this->getMockBuilder(UserInterface::class)->getMock();\n $conversation = new Conversation();\n $this->assertEmpty($conversation->getRecipients());\n\n $conversation->addRecipient($recipient);\n $this->assertEquals(new ArrayCollection([$recipient]), $conversation->getRecipients());\n\n $conversation->removeRecipient($recipient);\n $this->assertEmpty($conversation->getRecipients());\n }", "function it_exchange_paypal_pro_addon_update_subscriber_id( $paypal_pro_id, $subscriber_id ) {\n\t$transactions = it_exchange_paypal_pro_addon_get_transaction_id( $paypal_pro_id );\n\tforeach( $transactions as $transaction ) { //really only one\n\t\tdo_action( 'it_exchange_update_transaction_subscription_id', $transaction, $subscriber_id );\n\t}\n}", "function get_recipients($string){\n\t\t$addresses = explode(', ', $string);\n\t\tforeach($addresses as $value){\n\t\t\t$element = count($this->to);\n\t\t\t$this->to[$element] = $value;\n\t\t}\n\t}", "public function updateCompleteCollateralsList()\n\t{\n\t\t$role = Role::where('name', 'Aval')->first();\n\n\t\t$arregloUsuarios = $this->usersCompletedByRole($role);\n\t\t\n\t\tprint_r($arregloUsuarios);die(\"h\");\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_COLLATERALS')],\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}", "function change_recipient() {\n\t\treturn \"email@address.com\";\n\t}", "public function send_subscriptions(){\r\n //send email to all those who have subscribed to posts from this author\r\n\r\n }", "function ihc_update_stripe_subscriptions(){\n\tglobal $wpdb;\n\t$data = $wpdb->get_results(\"SELECT id, txn_id, payment_data FROM \" . $wpdb->prefix . \"indeed_members_payments\n\t\t\t\t\t\t\t\t\tWHERE txn_id LIKE 'ch_%';\");\n\tif (count($data)){\n\n\t\t//loading stripe libs\n\t\trequire_once IHC_PATH . 'classes/stripe/init.php';\n\t\t$secret_key = get_option('ihc_stripe_secret_key');\n\t\t\\Stripe\\Stripe::setApiKey($secret_key);\n\n\t\tforeach ($data as $obj){\n\t\t\t$payment_data = json_decode($obj->payment_data);\n\t\t\tif (!empty($payment_data->customer)){\n\t\t\t\t$replace_txn_id = $payment_data->customer;\n\t\t\t} else {\n\t\t\t\t$stripe_obj = \\Stripe\\Charge::retrieve($obj->txn_id);\n\t\t\t\tif (!empty($stripe_obj->customer)){\n\t\t\t\t\t$replace_txn_id = $stripe_obj->customer;\n\t\t\t\t}\n\t\t\t\tunset($stripe_obj);\n\t\t\t}\n\t\t\tif (!empty($replace_txn_id)){\n\t\t\t\t$wpdb->query(\"UPDATE \" . $wpdb->prefix . \"indeed_members_payments\n\t\t\t\t\t\t\t\tSET txn_id='\" . $replace_txn_id . \"'\n\t\t\t\t\t\t\t\tWHERE id= '\" . $obj->id . \"';\n\t\t\t\t\t\t\");\n\t\t\t\tunset($replace_txn_id);\n\t\t\t}\n\t\t}//end foreach\n\t}\n}", "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 updateDeliveries()\n {\n $userId = Authorizer::getResourceOwnerId();\n $agent = Agent::where('user_id', $userId)->first();\n if(!$agent)\n return Response::json(\"Error\", 400);\n\n $deliveriesJSON = Input::get('deliveries');\n\n if(!empty($deliveriesJSON)) {\n\n $deliveries = json_decode($deliveriesJSON, true);\n\n if($deliveries !== null && count($deliveries) > 0)\n {\n foreach ($deliveries as $id => $updates)\n {\n $delivery = Delivery::find(intval($id));\n\n if($delivery)\n {\n // An agent can modify just his own deliveries\n if($delivery->agent_id != $agent->id)\n return Response::json(\"Error\", 403);\n\n // Estimated times\n\n $notifySender = false;\n $notifyRecipient = false;\n\n\n if(!empty($updates[\"estimated_pickup\"]))\n {\n if(static::validateDate($updates[\"estimated_pickup\"])){\n\n if($delivery->estimated_pickup != $updates[\"estimated_pickup\"])\n {\n if(static::dateDifference($delivery->estimated_pickup, $updates[\"estimated_pickup\"]) > 300)\n {\n $notifySender = true;\n }\n $delivery->estimated_pickup = $updates[\"estimated_pickup\"];\n }\n\n }\n }\n\n if(!empty($updates[\"estimated_delivery\"]))\n {\n if(static::validateDate($updates[\"estimated_delivery\"])){\n if ($delivery->estimated_delivery != $updates[\"estimated_delivery\"])\n {\n if(static::dateDifference($delivery->estimated_delivery, $updates[\"estimated_delivery\"]) > 300)\n {\n $notifyRecipient = true;\n }\n $delivery->estimated_delivery = $updates[\"estimated_delivery\"];\n }\n }\n }\n\n // Actual times\n if(!empty($updates[\"pickup_time\"]))\n {\n if(static::validateDate($updates[\"pickup_time\"]))\n {\n $delivery->pickup_time = $updates[\"pickup_time\"];\n\n if($delivery->state == 0) \n $delivery->state = 1;\n }\n }\n\n if(!empty($updates[\"delivery_time\"]))\n {\n if(static::validateDate($updates[\"delivery_time\"]))\n {\n $delivery->delivery_time = $updates[\"delivery_time\"];\n\n if($delivery->state < 2) \n $delivery->state = 2;\n }\n }\n\n // // Delivery state (explicit)\n // if($updates[\"state\"] != null)\n // {\n // $state = intval($updates[\"state\"]);\n // if($state < 0 || $state > 2)\n // return Response::json(\"Error\", 400);\n\n // $delivery->state = $state;\n // }\n\n $delivery->save();\n\n if($notifySender) {\n $estimated_pickup = (new DateTime($delivery->estimated_pickup))->format('H:i');\n Mail::queue('emails.updatesender', ['tracking_code' => $delivery->tracking_code, 'estimated_pickup' => $estimated_pickup], function($message) use($delivery)\n {\n $message->from('support@bikeponyexpress.me', 'BikePonyExpress');\n $message->to($delivery->sender_email)->subject('BikePonyExpress: Pickup time updated!');\n });\n }\n\n if($notifyRecipient) {\n $estimated_delivery = (new DateTime($delivery->estimated_delivery))->format('H:i');\n Mail::queue('emails.updaterecipient', ['tracking_code' => $delivery->tracking_code, 'estimated_delivery' => $estimated_delivery], function($message) use($delivery)\n {\n $message->from('support@bikeponyexpress.me', 'BikePonyExpress');\n $message->to($delivery->recipient_email)->subject('BikePonyExpress: Delivery time updated!');\n });\n }\n }\n else\n {\n return Response::json(\"Error\", 400);\n }\n }\n\n $updatedDeliveries = $agent->deliveries()->where('state', '<', 2)->orderBy('updated_at', 'desc')->get();\n return !$updatedDeliveries? Response::json(\"Error\", 400) : $updatedDeliveries;\n }\n }\n\n return Response::json(\"Error\", 400);\n }", "function updateInvites(array $sharees) {\n $this->carddavBackend->updateInvites($this->addressBookInfo['id'], $sharees);\n }", "public function transfer_to(Request $request, $customer_sender_id)\n {\n\n $customer = DB::select('SELECT * FROM customers WHERE id = ?', [$customer_sender_id]);\n\n //\n $rules = [\n\t\t\t'amount' => 'required|numeric|max:'.$customer[0]->balance,\n\t\t\t'recipient_customer_id' => 'required|numeric'\n\t\t];\n\n\t\t$validator = Validator::make($request->all(), $rules);\n\t\tif ($validator->fails()) {\n\t\t\treturn redirect()->back()->withErrors($validator)->withInput();\n\t\t};\n\n\n\n\n\n // If it gets validated correcty\n $transaction_id = DB::insert('INSERT INTO `transfers` \n (`sender_id`, `receiver_id`, `amount`)\n VALUES \n (?, ?, ?)', [\n $customer_sender_id, $request->recipient_customer_id, $request->amount\n ]);\n\n // if the transaction is successful\n if ($transaction_id > 0) {\n // SENDER gets amount SUBSTRACTED\n DB::update('UPDATE `customers` \n SET\n `balance` = `balance`-?\n WHERE `id` = ?', [\n $request->amount,\n $customer_sender_id\n ]);\n\n // RECIPIENT gets amount ADDED\n DB::update('UPDATE `customers` \n SET\n `balance` = `balance`+?\n WHERE `id` = ?', [\n $request->amount,\n $request->recipient_customer_id\n ]);\n }\n\n return redirect()->back()->with('message', 'Transaction finished successfully');\n }", "function addAdminsAsRecipients(){\n $sql = \"SELECT name FROM user WHERE is_admin = 1\";\n $db = new DB();\n $db->query( $sql );\n while( $row = $db->fetchRow()){\n $this->AddRecipient($row[\"name\"]);\n }\n }", "function do_update_additional_email($s_id,$fname,$lname,$email,$contacts_id) {\n\t# Dim some Vars:\n\t\tglobal $_DBCFG, $db_coin;\n\n\t# Do purge contact\n\t\t$query \t = \"UPDATE \".$_DBCFG['suppliers_contacts'].\" SET \";\n\t\t$query\t.= \"contacts_name_first='\".$db_coin->db_sanitize_data($fname).\"', \";\n\t\t$query\t.= \"contacts_name_last='\".$db_coin->db_sanitize_data($lname).\"', \";\n\t\t$query\t.= \"contacts_email='\".$db_coin->db_sanitize_data($email).\"' \";\n\t\t$query\t.= 'WHERE contacts_id='.$contacts_id.' AND contacts_s_id='.$s_id;\n\t\t$db_coin->db_query_execute($query) OR DIE(\"Unable to complete request\");\n\t\treturn $db_coin->db_query_affected_rows();\n}", "static public function ctrActualizarRecipientAll($id){\n\t\tif (isset($_POST[\"update\"])) {\t\t\t\n\n\t\t\tif (preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"password\"]) && preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"confirmPassword\"])){\n\t\t\t\t$encriptarPass=md5($_POST[\"password\"]);\n\t\t\t\t$photo =\"\";\t\t\t\t\t\n\n\t\t\t\t$datos =array(\"address\"=>$_POST[\"address\"],\n\t\t\t\t\t\"password\"=>$encriptarPass,\t\t\t\t\t\n\t\t\t\t\t\"photo\"\t=> $photo);\n\n\t\t\t\t$tabla=\"recipient\";\n\t\t\t\t$respuesta = ModeloRecipients::mdlActualizarRecipientAll($tabla,$id,$datos);\n\t\t\t\tif ($respuesta==\"ok\") {\n\n\t\t\t\t\t$url=Ruta::ctrRuta();\n\t\t\t\t\techo '<script> \n\t\t\t\t\tswal({\n\t\t\t\t\t\ttitle:\"Recipient update\",\n\t\t\t\t\t\ttext:\"Account has been successfully updated \",\n\t\t\t\t\t\ttipo:\"success\",\n\t\t\t\t\t\tconformButtonText:\"ok\",\n\t\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t\t},function(isConfirm){if(isConfirm){\twindow.location = \"'.$url.'login.php\";\t}}); </script>';\n\n\t\t\t\t}\t\t\t\n\t\t\t}else{\n\t\t\t\techo '<script> \n\t\t\t\tswal({\n\t\t\t\t\ttitle:\"Error\",\n\t\t\t\t\ttext:\"Failed to update recipient\",\n\t\t\t\t\ttipo:\"error\",\n\t\t\t\t\tconformButtonText:\"close\",\n\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t},function(isConfirm){if(isConfirm){history.back();}}); </script>';\n\t\t\t}\n\t\t}\n\n\t}", "public function update_sender()\n\t{\n\t\t$email = $this->input->post('email');\n\t\t$sms = $this->input->post('sms');\n\n\t\tif($email!=NULL){\n\t\t\t$data = array(\n\t\t\t\t'deposit' =>$this->input->post('deposit'),\n\t\t\t\t'transfer' =>$this->input->post('transfer'),\n\t\t\t\t'withdraw' =>$this->input->post('withdraw'),\n\t\t\t\t'payout' =>$this->input->post('payout'),\n\t\t\t\t'commission' =>$this->input->post('commission'),\n\t\t\t\t'team_bonnus' =>$this->input->post('team_bonnus'),\n\t\t\t);\n\n\t\t\t$this->db->where('method',$email)->update('sms_email_send_setup',$data);\n\t\t}\n\t\tif($sms!=NULL){\n\t\t\t$data = array(\n\t\t\t\t'deposit' =>$this->input->post('deposit'),\n\t\t\t\t'transfer' =>$this->input->post('transfer'),\n\t\t\t\t'withdraw' =>$this->input->post('withdraw'),\n\t\t\t\t'payout' =>$this->input->post('payout'),\n\t\t\t\t'commission' =>$this->input->post('commission'),\n\t\t\t\t'team_bonnus' =>$this->input->post('team_bonnus'),\n\t\t\t);\n\n\t\t\t$this->db->where('method',$sms)->update('sms_email_send_setup',$data);\n\t\t}\n\t\t$this->session->set_flashdata('message',display('update_successfully'));\n\t\tredirect('backend/dashboard/setting/email_sms_setting');\n\t}", "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 }", "function process_transfer($from_id, $to_id) {\n\t\tglobal $wpdb;\n\t\t$wpdb->query($wpdb->prepare(\"UPDATE {$wpdb->base_prefix}pro_sites_stripe_customers SET blog_id = %d WHERE blog_id = %d\", $to_id, $from_id) );\t\n\t}", "function getRecipients() {\n\t\treturn $this->getData('recipients');\n\t}", "public function addAdminToRecipients($recipients)\n {\n $users = $this->em->getRepository('AppBundle:User')->findUsersWithRolesMandatory(['ROLE_SUPER_ADMIN']);\n foreach ($users as $user) {\n array_push($recipients, $user);\n }\n return $recipients;\n }", "public function addActivatedBpContactsToGr()\n\t{\n\t\t$emails = get_option($this->GrOptionDbPrefix . 'bp_registered_emails');\n\t\tif ( ! empty($emails))\n\t\t{\n\t\t\t$emails_array = unserialize($emails);\n\t\t\tif (is_array($emails_array))\n\t\t\t{\n\t\t\t\tforeach ($emails_array as $k => $v)\n\t\t\t\t{\n\t\t\t\t\t$unset = false;\n\t\t\t\t\t$user = $this->getUserDetailsByEmail($v);\n\n\t\t\t\t\tif ( ! empty($user))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($user->activation_key == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($this->grApiInstance)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'bp_registration_campaign');\n\t\t\t\t\t\t\t\t$this->addContact($campaign, $user->display_name, $user->user_email, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$unset = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ((bool) ($this->getDateDiffWithCurrentDate($user->user_registered) >= $this->max_bp_unconfirmed_days) == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$unset = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($unset == true)\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($emails_array[$k]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tupdate_option($this->GrOptionDbPrefix . 'bp_registered_emails', serialize($emails_array));\n\t\t}\n\t}", "public function recipients()\n {\n return $this->belongsToMany('App\\Recipient');\n }", "function og_simplenews_manager_save_emails($form, &$form_state) {\n foreach ($form_state['values']['newsletters'] as $tid => $values) {\n if ($tid && is_numeric($tid)) {\n og_simplenews_save_subscriptions($tid, $values['emails']);\n }\n }\n}", "public function getRecipients()\n\t{\n\t\t$me\t\t\t= $this->getService('com://admin/ninjaboard.model.people')->getMe();\n\t\t$table\t\t= $this->getTable();\n\t\t$params\t\t= $this->getService('com://admin/ninjaboard.model.settings')->getParams();\n\t\t$topic\t\t= $this->getService('com://site/ninjaboard.model.topics')->id($this->_state->topic)->getItem();\n\t\t$forum\t\t= $this->getService('com://site/ninjaboard.model.forums')->id($topic->forum_id)->getItem();\n\t\t$ids\t\t= array();\n\t\t\n\t\tif($params->email_notification_settings->auto_notify_admins == 'yes') {\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('id')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('users')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('sendEmail', '=', 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('id', '!=', $me->id);\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Recipients subscribed to this topic\n\t\tif($this->_state->topic)\n\t\t{\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('topic'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', '=', $this->_state->topic)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Recipients subscribed to this forum and/or parent forum(s)\n\t\tif($forum->id)\n\t\t{\n\t\t\t$forums = array_filter(explode('/', $forum->path));\n\t\t\t$forums[] = $forum->id;\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('forum'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', 'in', $forums)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Recipients subscribed to me\n\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('person'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', 'in', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t{\n\t\t\t// we most have access to this forum to get notifications\n\t\t\t$person = $this->getService('com://admin/ninjaboard.model.people')->id($id)->getItem();\n\n\t\t\t// check we have permission for this forum\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t->select('tbl.level AS level')\n\t\t\t\t\t\t\t->from('ninjaboard_assets AS tbl')\n\t\t\t\t\t\t\t->order('tbl.level', 'DESC')\n\t\t\t\t\t\t\t->limit(1)\n\t\t\t\t\t\t\t->where('tbl.name', '=', 'com_ninjaboard.forum.'.$forum->id.'.'.$person->ninjaboard_usergroup_id.'.forum');\n\n\t\t\t$result = $table->getDatabase()->select($query, KDatabase::FETCH_FIELD);\n\t\t\t$result = isset($result) ? $result : $person->forum_permissions;\n\n\t\t\tif (!$result) continue;\n\n\t\t\t$ids[$id] = $id;\n\n\t\t}\n\t\t\n\t\tif(!$ids) return array();\n\t\t\n\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select(array('name', 'email'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('users')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('id', 'in', $ids);\n\t\treturn $table->getDatabase()->select($query, KDatabase::FETCH_OBJECT_LIST);\n\t}", "public function massRelayAction()\n {\n $offerIds = $this->getRequest()->getParam('offer');\n if (!is_array($offerIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('Please select offers.')\n );\n } else {\n try {\n foreach ($offerIds as $offerId) {\n $offer = Mage::getSingleton('mfb_myflyingbox/offer')->load($offerId)\n ->setRelay($this->getRequest()->getParam('flag_relay'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d offers were successfully updated.', count($offerIds))\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('mfb_myflyingbox')->__('There was an error updating offers.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function getAllRecipientAddresses()\n {\n }", "protected function removeRecipient()\n\t{\n\t\t$arrChannels = $this->Input->post('channels');\n\n\t\t// Check selection\n\t\tif (!is_array($arrChannels) || count($arrChannels) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['noChannels'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// Validate e-mail address\n\t\tif (!preg_match('/^\\w+([!#\\$%&\\'\\*\\+\\-\\/=\\?^_`\\.\\{\\|\\}~]*\\w+)*@\\w+([_\\.-]*\\w+)*\\.[a-z]{2,6}$/i', $this->Input->post('email', true)))\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['email'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t$arrSubscriptions = array();\n\n\t\t// Get active subscriptions\n\t\t$objSubscription = $this->Database->prepare(\"SELECT pid FROM tl_newsletter_recipients WHERE email=? AND active=?\")\n\t\t\t\t\t\t\t\t\t\t ->execute($this->Input->post('email', true), 1);\n\n\t\tif ($objSubscription->numRows)\n\t\t{\n\t\t\t$arrSubscriptions = $objSubscription->fetchEach('pid');\n\t\t}\n\n\t\t$arrRemove = array_intersect($arrChannels, $arrSubscriptions);\n\n\t\t// Return if there are no subscriptions to remove\n\t\tif (!is_array($arrRemove) || count($arrRemove) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['unsubscribed'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// Remove subscriptions\n\t\t$this->Database->prepare(\"DELETE FROM tl_newsletter_recipients WHERE email=? AND pid IN(\" . implode(',', $arrRemove) . \")\")\n\t\t\t\t\t ->execute($this->Input->post('email', true));\n\t\t\t\t\t \n\t\t// Remove member\n\t\t$arrRetain = array_diff($arrSubscriptions, $arrChannels);\n\t\tif (count($arrRetain))\n\t\t{\n\t\t\t$this->Database->prepare(\"UPDATE tl_member SET newsletter=? WHERE email=?\")->execute(serialize($arrRetain), $this->Input->post('email'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Delete only if member groups match\n\t\t\t$this->Database->prepare(\"DELETE FROM tl_member WHERE email=? AND groups=?\")->execute($this->Input->post('email'), $this->reg_groups);\n\t\t}\n\n\t\t// Confirmation e-mail\n\t\t$objEmail = new Email();\n\n\t\t// Get channels\n\t\t$objChannel = $this->Database->execute(\"SELECT title FROM tl_newsletter_channel WHERE id IN(\" . implode(',', $arrChannels) . \")\");\n\t\t\n\t\t// HOOK: post unsubscribe callback\n\t\tif (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && is_array($GLOBALS['TL_HOOKS']['removeRecipient']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->$callback[0]->$callback[1]($this->Input->post('email', true), $arrRemove, $objChannel->fetchEach('title'));\n\t\t\t}\n\t\t}\n\n\t\t$strText = str_replace('##domain##', $this->Environment->host, $this->nl_unsubscribe);\n\t\t$strText = str_replace(array('##channel##', '##channels##'), implode(\"\\n\", $objChannel->fetchEach('title')), $strText);\n\n\t\t$objEmail->from = $GLOBALS['TL_ADMIN_EMAIL'];\n\t\t$objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], $this->Environment->host);\n\t\t$objEmail->text = $strText;\n\n\t\t$objEmail->sendTo($this->Input->post('email', true));\n\t\tglobal $objPage;\n\n\t\t// Redirect to jumpTo page\n\t\tif (strlen($this->jumpTo) && $this->jumpTo != $objPage->id)\n\t\t{\n\t\t\t$objNextPage = $this->Database->prepare(\"SELECT id, alias FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($this->jumpTo);\n\n\t\t\tif ($objNextPage->numRows)\n\t\t\t{\n\t\t\t\t$this->redirect($this->generateFrontendUrl($objNextPage->fetchAssoc()));\n\t\t\t}\n\t\t}\n\n\t\t$_SESSION['UNSUBSCRIBE_CONFIRM'] = $GLOBALS['TL_LANG']['MSC']['nl_removed'];\n\t\t$this->reload();\n\t}", "function clearAllRecipients() {\n\t\t$this->setRecipients(array());\n\t\t$this->setCcs(array());\n\t\t$this->setBccs(array());\n\t}", "public function sendCopyTo()\n {\n if ($this->attachmentContainer->hasAttachments()) {\n foreach ($this->attachmentContainer->getAttachments() as $attachment) {\n $config = $this->helper->getConfig('pdfpro/general/'.$attachment->getData('config').'_email_attach');\n if ($config == \\Vnecoms\\PdfPro\\Model\\Source\\Attach::ATTACH_TYPE_BOTH ||\n $config == \\Vnecoms\\PdfPro\\Model\\Source\\Attach::ATTACH_TYPE_ADMIN) {\n $this->transportBuilder->addAttachment($attachment);\n }\n }\n $this->attachmentContainer->resetAttachments();\n }\n parent::sendCopyTo();\n $this->attachmentContainer->resetAttachments();\n }", "public function getFailedRecipients() {}", "public function setRecipient($value)\n {\n return $this->set('Recipient', $value);\n }", "public function setRecipient($value)\n {\n return $this->set('Recipient', $value);\n }", "public static function sendProfileUpdateEmail($row, $config)\n\t{\n\t\t$message = OSMembershipHelper::getMessages();\n\t\t$fieldSuffix = OSMembershipHelper::getFieldSuffix();\n\n\t\tif (strlen($message->{'profile_update_email_subject' . $fieldSuffix}))\n\t\t{\n\t\t\t$subject = $message->{'profile_update_email_subject' . $fieldSuffix};\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$subject = $message->profile_update_email_subject;\n\t\t}\n\n\t\tif (empty($subject))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (strlen(strip_tags($message->{'profile_update_email_body' . $fieldSuffix})))\n\t\t{\n\t\t\t$body = $message->{'profile_update_email_body' . $fieldSuffix};\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$body = $message->profile_update_email_body;\n\t\t}\n\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('*')\n\t\t\t->from('#__osmembership_plans')\n\t\t\t->where('id = ' . $row->plan_id);\n\n\t\tif ($fieldSuffix)\n\t\t{\n\t\t\tOSMembershipHelperDatabase::getMultilingualFields($query, array('title'), $fieldSuffix);\n\t\t}\n\n\t\t$db->setQuery($query);\n\t\t$plan = $db->loadObject();\n\n\t\tif ($plan->notification_emails)\n\t\t{\n\t\t\t$config->notification_emails = $plan->notification_emails;\n\t\t}\n\n\t\t$mailer = static::getMailer($config);\n\n\t\t$replaces = OSMembershipHelper::buildTags($row, $config);\n\n\t\t// Get latest subscription end date\n\t\t$query->clear();\n\t\t$query->select('MAX(to_date)')\n\t\t\t->from('#__osmembership_subscribers')\n\t\t\t->where('user_id = ' . $row->user_id)\n\t\t\t->where('plan_id = ' . $row->plan_id);\n\t\t$db->setQuery($query);\n\t\t$subscriptionEndDate = $db->loadResult();\n\t\tif (!$subscriptionEndDate)\n\t\t{\n\t\t\t$subscriptionEndDate = date($config->date_format);\n\t\t}\n\t\t$replaces['SUBSCRIPTION_END_DATE'] = $subscriptionEndDate;\n\t\t$profileUrl = JUri::root() . 'administrator/index.php?option=com_osmembership&task=subscriber.edit&cid[]=' . $row->profile_id;\n\t\t$replaces['profile_link'] = '<a href=\"' . $profileUrl . '\">' . $profileUrl . '</a>';\n\t\tforeach ($replaces as $key => $value)\n\t\t{\n\t\t\t$key = strtoupper($key);\n\t\t\t$subject = str_ireplace(\"[$key]\", $value, $subject);\n\t\t\t$body = str_ireplace(\"[$key]\", $value, $body);\n\t\t}\n\n\t\t$emails = explode(',', $config->notification_emails);\n\n\t\tstatic::send($mailer, $emails, $subject, $body);\n\t}", "function sendMembershipUpgradeEmails($row, $config) {\r\n\t\t$jconfig = new JConfig();\r\n\t\t$db = & JFactory::getDBO();\r\n\t\t$fromEmail = $jconfig->mailfrom;\r\n\t\t$fromName = $jconfig->fromname;\r\n\t\t$sql = \"SELECT * FROM #__osmembership_plans WHERE id=\".$row->plan_id ;\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$plan = $db->loadObject();\r\n\t\t\r\n\t\t//Get from plan title\r\n\t\t$sql = 'SELECT b.title FROM #__osmembership_upgraderules AS a INNER JOIN #__osmembership_plans AS b '\r\n\t\t\t.' ON a.from_plan_id = b.id '\r\n\t\t\t.' WHERE a.id='.$row->upgrade_option_id\r\n\t\t\t\t\r\n\t\t;\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$planTitle = $db->loadResult();\r\n\t\t\r\n\t\t\r\n\t\t//Need to over-ridde some config options\r\n\t\t$emailContent = OSMembershipHelper::getEmailContent($config, $row);\r\n\t\t$replaces = array() ;\r\n\t\t$replaces['plan_title'] = $planTitle ;\r\n\t\t$replaces['to_plan_title'] = $plan->title ;\r\n\t\t$replaces['first_name'] = $row->first_name ;\r\n\t\t$replaces['last_name'] = $row->last_name ;\r\n\t\t$replaces['organization'] = $row->organization ;\r\n\t\t$replaces['address'] = $row->address ;\r\n\t\t$replaces['address2'] = $row->address ;\r\n\t\t$replaces['city'] = $row->city ;\r\n\t\t$replaces['state'] = $row->state ;\r\n\t\t$replaces['zip'] = $row->zip ;\r\n\t\t$replaces['country'] = $row->country ;\r\n\t\t$replaces['phone'] = $row->phone ;\r\n\t\t$replaces['fax'] = $row->phone ;\r\n\t\t$replaces['email'] = $row->email ;\r\n\t\t$replaces['comment'] = $row->comment ;\r\n\t\t$replaces['amount'] = number_format($row->amount, 2) ;\r\n\t\t$replaces['discount_amount'] = number_format($row->discount_amount, 2) ;\r\n\t\t$replaces['tax_amount'] = number_format($row->tax_amount, 2) ;\r\n\t\t$replaces['gross_amount'] = number_format($row->gross_amount, 2) ;\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t$replaces['transaction_id'] = $row->transaction_id ;\r\n\t\tif ($row->payment_method) {\r\n\t\t\t$replaces['payment_method'] = JText::_(os_payments::loadPaymentMethod($row->payment_method)->title) ;\r\n\t\t}\r\n\t\r\n\t\r\n\t\t//Should we create map to custom fields\r\n\t\t$sql = 'SELECT field_id, field_value FROM #__osmembership_field_value WHERE subscriber_id = '.$row->id;\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$rowValues = $db->loadObjectList();\r\n\t\t$sql = 'SELECT a.id, a.name FROM #__osmembership_fields AS a WHERE a.published=1 AND (a.plan_id = 0 OR a.plan_id='.$row->plan_id.')';\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$rowFields = $db->loadObjectList();\r\n\t\t$fields = array() ;\r\n\t\tfor ($i = 0 , $n = count($rowFields) ; $i < $n ; $i++) {\r\n\t\t\t$rowField = $rowFields[$i] ;\r\n\t\t\t$fields[$rowField->id] = $rowField->name ;\r\n\t\t}\r\n\t\tfor ($i = 0 , $n = count($rowValues) ; $i < $n ; $i++) {\r\n\t\t\t$rowValue = $rowValues[$i] ;\r\n\t\t\t$replaces[$fields[$rowValue->field_id]] = $rowValue->field_value ;\r\n\t\t}\r\n\t\t\t\t\r\n\t\t$subject = $config->user_upgrade_email_subject;\t\t\r\n\t\t$subject = str_replace('[TO_PLAN_TITLE]', $plan->title, $subject) ;\r\n\t\t$subject = str_replace('[PLAN_TITLE]', $planTitle, $subject) ;\r\n\t\t\r\n\t\t$body = $config->user_upgrade_email_body ;\r\n\t\t$body = str_replace('[SUBSCRIPTION_DETAIL]', $emailContent, $body) ;\r\n\t\tforeach ($replaces as $key=>$value) {\r\n\t\t\t$key = strtoupper($key) ;\r\n\t\t\t$body = str_replace(\"[$key]\", $value, $body) ;\r\n\t\t}\r\n\t\tif (version_compare(JVERSION, '3.0', 'ge')) {\r\n\t\t\t$j3 = true ;\r\n\t\t\t$mailer = new JMail() ;\r\n\t\t} else {\r\n\t\t\t$j3 = false ;\r\n\t\t}\r\n\t\tif ($j3) \r\n\t\t\t$mailer->sendMail($fromEmail, $fromName, $row->email, $subject, $body, 1);\r\n\t\telse\t\r\n\t\t\tJUtility::sendMail($fromEmail, $fromName, $row->email, $subject, $body, 1);\r\n\t\t//Send emails to notification emails\r\n\t\tif ($config->notification_emails == '')\r\n\t\t\t$notificationEmails = $fromEmail;\r\n\t\telse\r\n\t\t\t$notificationEmails = $config->notification_emails;\r\n\t\t$notificationEmails = str_replace(' ', '', $notificationEmails);\r\n\t\t$emails = explode(',', $notificationEmails);\r\n\t\t$subject = $config->admin_upgrade_email_subject ;\r\n\t\t$subject = str_replace('[TO_PLAN_TITLE]', $plan->title, $subject) ;\r\n\t\t$subject = str_replace('[PLAN_TITLE]', $planTitle, $subject) ;\r\n\t\t$body = $config->admin_upgrade_email_body ;\r\n\t\t$body = str_replace('[SUBSCRIPTION_DETAIL]', $emailContent, $body);\r\n\t\tforeach ($replaces as $key=>$value) {\r\n\t\t\t$key = strtoupper($key) ;\r\n\t\t\t$body = str_replace(\"[$key]\", $value, $body) ;\r\n\t\t}\r\n\t\tfor ($i = 0, $n = count($emails); $i < $n ; $i++) {\r\n\t\t\t$email = $emails[$i];\r\n\t\t\tif ($j3) \r\n\t\t\t\t$mailer->sendMail($fromEmail, $fromName, $email, $subject, $body, 1);\r\n\t\t\telse\t\r\n\t\t\t\tJUtility::sendMail($fromEmail, $fromName, $email, $subject, $body, 1);\r\n\t\t}\r\n\t}", "function sendMembershipRenewalEmails($row, $config) {\r\n\t\t$jconfig = new JConfig();\r\n\t\t$db = & JFactory::getDBO();\r\n\t\t$fromEmail = $jconfig->mailfrom;\r\n\t\t$fromName = $jconfig->fromname;\r\n\t\t$sql = \"SELECT * FROM #__osmembership_plans WHERE id=\".$row->plan_id ;\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$plan = $db->loadObject();\r\n\t\tif ($row->renew_option_id) {\r\n\t\t\t$numberDays = $row->subscription_length ;\r\n\t\t} else {\r\n\t\t\t$sql = 'SELECT number_days FROM #__osmembership_renewrates WHERE id='.$row->renew_option_id ;\r\n\t\t\t$db->setQuery($sql) ;\r\n\t\t\t$numberDays = $db->loadResult();\r\n\t\t}\t\t\r\n\t\t//Need to over-ridde some config options\r\n\t\t$emailContent = OSMembershipHelper::getEmailContent($config, $row);\r\n\t\t$replaces = array() ;\r\n\t\t$replaces['plan_title'] = $plan->title ;\r\n\t\t$replaces['first_name'] = $row->first_name ;\r\n\t\t$replaces['last_name'] = $row->last_name ;\r\n\t\t$replaces['organization'] = $row->organization ;\r\n\t\t$replaces['address'] = $row->address ;\r\n\t\t$replaces['address2'] = $row->address ;\r\n\t\t$replaces['city'] = $row->city ;\r\n\t\t$replaces['state'] = $row->state ;\r\n\t\t$replaces['zip'] = $row->zip ;\r\n\t\t$replaces['country'] = $row->country ;\r\n\t\t$replaces['phone'] = $row->phone ;\r\n\t\t$replaces['fax'] = $row->phone ;\r\n\t\t$replaces['email'] = $row->email ;\r\n\t\t$replaces['comment'] = $row->comment ;\r\n\t\t$replaces['amount'] = number_format($row->amount, 2) ;\r\n\t\t$replaces['discount_amount'] = number_format($row->discount_amount, 2) ;\r\n\t\t$replaces['tax_amount'] = number_format($row->tax_amount, 2) ;\r\n\t\t$replaces['gross_amount'] = number_format($row->gross_amount, 2) ;\r\n\t\t$replaces['end_date'] = JHTML::_('date', $row->to_date, $config->date_format);\r\n\t\t$replaces['number_days'] = $numberDays ;\r\n\t\t\t\r\n\t\t$replaces['transaction_id'] = $row->transaction_id ;\r\n\t\tif ($row->payment_method) {\r\n\t\t\t$replaces['payment_method'] = JText::_(os_payments::loadPaymentMethod($row->payment_method)->title) ;\r\n\t\t}\r\n\t\t//Should we create map to custom fields\r\n\t\t$sql = 'SELECT field_id, field_value FROM #__osmembership_field_value WHERE subscriber_id = '.$row->id;\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$rowValues = $db->loadObjectList();\r\n\t\t$sql = 'SELECT a.id, a.name FROM #__osmembership_fields AS a WHERE a.published=1 AND (a.plan_id = 0 OR a.plan_id='.$row->plan_id.')';\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$rowFields = $db->loadObjectList();\r\n\t\t$fields = array() ;\r\n\t\tfor ($i = 0 , $n = count($rowFields) ; $i < $n ; $i++) {\r\n\t\t\t$rowField = $rowFields[$i] ;\r\n\t\t\t$fields[$rowField->id] = $rowField->name ;\r\n\t\t}\r\n\t\tfor ($i = 0 , $n = count($rowValues) ; $i < $n ; $i++) {\r\n\t\t\t$rowValue = $rowValues[$i] ;\r\n\t\t\t$replaces[$fields[$rowValue->field_id]] = $rowValue->field_value ;\r\n\t\t}\t\t\t\t\r\n\t\t$subject = $config->user_renew_email_subject ;\t\t\t\t\r\n\t\t$subject = str_replace('[PLAN_TITLE]', $plan->title, $subject) ;\r\n\t\t$body = $config->user_renew_email_body ;\r\n\t\t$body = str_replace('[SUBSCRIPTION_DETAIL]', $emailContent, $body) ;\r\n\r\n\t\t\r\n\t\tforeach ($replaces as $key=>$value) {\r\n\t\t\t$key = strtoupper($key) ;\r\n\t\t\t$body = str_replace(\"[$key]\", $value, $body) ;\r\n\t\t}\r\n\t\t\r\n\t\tif (version_compare(JVERSION, '3.0', 'ge')) {\r\n\t\t\t$j3 = true ;\r\n\t\t\t$mailer = new JMail() ;\r\n\t\t} else {\r\n\t\t\t$j3 = false ;\r\n\t\t}\r\n\t\tif ($j3) {\r\n\t\t\t$mailer->sendMail($fromEmail, $fromName, $row->email, $subject, $body, 1);\r\n\t\t} else {\r\n\t\t\tJUtility::sendMail($fromEmail, $fromName, $row->email, $subject, $body, 1);\r\n\t\t}\t\t\t\t\r\n\t\t//Send emails to notification emails\r\n\t\tif ($config->notification_emails == '')\r\n\t\t\t$notificationEmails = $fromEmail;\r\n\t\telse\r\n\t\t\t$notificationEmails = $config->notification_emails;\r\n\t\t$notificationEmails = str_replace(' ', '', $notificationEmails);\r\n\t\t$emails = explode(',', $notificationEmails);\r\n\t\t$subject = $config->admin_renw_email_subject ;\t\t\r\n\t\t$subject = str_replace('[PLAN_TITLE]', $plan->title, $subject) ;\r\n\t\t$body = $config->admin_renew_email_body ;\r\n\t\t$body = str_replace('[SUBSCRIPTION_DETAIL]', $emailContent, $body);\r\n\t\tforeach ($replaces as $key=>$value) {\r\n\t\t\t$key = strtoupper($key) ;\r\n\t\t\t$body = str_replace(\"[$key]\", $value, $body) ;\r\n\t\t}\r\n\t\tfor ($i = 0, $n = count($emails); $i < $n ; $i++) {\r\n\t\t\t$email = $emails[$i];\r\n\t\t\tif ($j3) {\r\n\t\t\t\t$mailer->sendMail($fromEmail, $fromName, $email, $subject, $body, 1);\r\n\t\t\t} else {\r\n\t\t\t\tJUtility::sendMail($fromEmail, $fromName, $email, $subject, $body, 1);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}", "public function testUpdateSiteMembershipRequestForPerson()\n {\n }", "public function clearRecipients()\n {\n $this->to = [];\n $this->cc = [];\n $this->bcc = [];\n $this->replyTo = [];\n }", "public function setGiftcardRecipientEmail($value);", "final public function notifyByUsers(array $recipients, $processAsync = false) {\n require_once 'Services/Notifications/classes/class.ilNotificationSystem.php';\n $this->beforeSendToUsers();\n ilNotificationSystem::sendNotificationToUsers($this, $recipients, $processAsync);\n $this->afterSendToUsers();\n }", "public function afterUpdate()\n {\n // $this->getDI()\n // ->getMail()\n // ->send([\"admin@gamanads.com\" => \"Admin GamanAds\"],\"Update Adspace\", 'updateadspace',\n // [ 'emailBody'=> \"Update Adspace : <b>$this->ad_url</b> from Client Id : <b>$this->client_id</b> Client Name: <b>$this->client_name</b>\"]);\n }", "function pdfbulletin_subscribers_form_submit($form, &$form_state) {\n $subscriptions = array();\n\n $emails = explode(\"\\n\", $form_state['values']['subscribers']);\n foreach ($emails as $email) {\n $email = trim($email);\n if (!empty($email) && valid_email_address($email)) {\n $subscriptions[$email] = $email;\n }\n }\n pdfbulletin_subscribers_save($form_state['values']['pdfbulletin']->nid, $subscriptions);\n drupal_set_message(t('Subscriptions saved'));\n}", "public function deleteBulkCampaignRecipients(Request $request)\n {\n $appStage = app_config('AppStage');\n if ($appStage == 'Demo') {\n return redirect('user/sms/campaign-reports')->with([\n 'message' => language_data('This Option is Disable In Demo Mode'),\n 'message_important' => true\n ]);\n }\n\n if ($request->has('data_ids')) {\n $all_ids = explode(',', $request->get('data_ids'));\n $recipients = count($all_ids);\n if ($request->has('campaign_id')) {\n\n\n $campaign = Campaigns::where('user_id', Auth::guard('client')->user()->id)->find($request->campaign_id);\n\n if (!$campaign) {\n return response()->json([\n 'status' => 'error',\n 'message' => 'Campaign info not found'\n ]);\n }\n\n $msg_type = $campaign->sms_type;\n\n if (isset($all_ids) && is_array($all_ids) && count($all_ids) > 0) {\n\n $cost = 0;\n foreach ($all_ids as $id) {\n $recipient = CampaignSubscriptionList::find($id);\n if ($recipient->status == 'queued') {\n\n $phone = $recipient->number;\n $c_phone = PhoneNumber::get_code($phone);\n\n $sms_cost = IntCountryCodes::where('country_code', $c_phone)->where('active', '1')->first();\n if ($sms_cost) {\n $phoneUtil = PhoneNumberUtil::getInstance();\n $phoneNumberObject = $phoneUtil->parse('+' . $phone, null);\n $area_code_exist = $phoneUtil->getLengthOfGeographicalAreaCode($phoneNumberObject);\n\n if ($area_code_exist) {\n $format = $phoneUtil->format($phoneNumberObject, PhoneNumberFormat::INTERNATIONAL);\n $get_format_data = explode(\" \", $format);\n $operator_settings = explode('-', $get_format_data[1])[0];\n\n } else {\n $carrierMapper = PhoneNumberToCarrierMapper::getInstance();\n $operator_settings = $carrierMapper->getNameForNumber($phoneNumberObject, 'en');\n }\n\n $get_operator = Operator::where('operator_setting', $operator_settings)->where('coverage_id', $sms_cost->id)->first();\n if ($get_operator) {\n\n $sms_charge = $get_operator->plain_price;\n\n if ($msg_type == 'plain' || $msg_type == 'unicode' || $msg_type == 'arabic') {\n $sms_charge = $get_operator->plain_price;\n }\n\n if ($msg_type == 'voice') {\n $sms_charge = $get_operator->voice_price;\n }\n\n if ($msg_type == 'mms') {\n $sms_charge = $get_operator->mms_price;\n }\n\n\n } else {\n $sms_charge = $sms_cost->plain_tariff;\n\n if ($msg_type == 'plain' || $msg_type == 'unicode' || $msg_type == 'arabic') {\n $sms_charge = $sms_cost->plain_tariff;\n }\n\n if ($msg_type == 'voice') {\n $sms_charge = $sms_cost->voice_tariff;\n }\n\n if ($msg_type == 'mms') {\n $sms_charge = $sms_cost->mms_tariff;\n }\n }\n\n $cost += $sms_charge * $recipient->amount;\n }\n }\n\n $recipient->delete();\n\n }\n\n\n $client = Client::find(Auth::guard('client')->user()->id);\n $client->sms_limit += $cost;\n $client->save();\n\n $campaign->total_recipient -= $recipients;\n $campaign->save();\n\n return response()->json([\n 'status' => 'success',\n 'message' => language_data('Contact deleted successfully')\n ]);\n\n } else {\n return response()->json([\n 'status' => 'error',\n 'message' => language_data('Recipients required')\n ]);\n }\n } else {\n return response()->json([\n 'status' => 'error',\n 'message' => 'Campaign info not found'\n ]);\n }\n } else {\n return response()->json([\n 'status' => 'error',\n 'message' => language_data('Invalid request')\n ]);\n }\n }", "function addToRecipientsList(array $data) {\n global $CFG_GLPI;\n\n $new_target = null;\n $new_lang = '';\n\n // Default USER TYPE is ANONYMOUS\n $notificationoption = ['usertype' => self::ANONYMOUS_USER];\n\n if (isset($data['language'])) {\n $new_lang = trim($data['language']);\n }\n $username = '';\n if (isset($data['name']) && !empty($data['name'])) {\n $username = $data['name'];\n }\n if (isset($data['users_id']) && ($data['users_id'] > 0)) {\n $user = new User();\n if (!$user->getFromDB($data['users_id'])\n || ($user->getField('is_deleted') == 1)\n || ($user->getField('is_active') == 0)\n || (!is_null($user->getField('begin_date'))\n && ($user->getField('begin_date') > $_SESSION[\"glpi_currenttime\"]))\n || (!is_null($user->getField('end_date'))\n && ($user->getField('end_date') < $_SESSION[\"glpi_currenttime\"]))) {\n // unknown, deleted or disabled user\n return false;\n }\n $filt = getEntitiesRestrictCriteria('glpi_profiles_users', '', $this->getEntity(),\n true);\n $prof = Profile_User::getUserProfiles($data['users_id'], $filt);\n if (!count($prof)) {\n // No right on the entity of the object\n return false;\n }\n if (empty($username)) {\n $username = formatUserName(0, $user->getField('name'), $user->getField('realname'),\n $user->getField('firstname'), 0, 0, true);\n }\n // It is a GLPI user :\n $notificationoption['usertype'] = self::GLPI_USER;\n if ($user->fields['authtype'] == Auth::LDAP\n || Auth::isAlternateAuth($user->fields['authtype'])\n || (($user->fields['authtype'] == Auth::NOT_YET_AUTHENTIFIED)\n && Auth::isAlternateAuth(Auth::checkAlternateAuthSystems()))) {\n $notificationoption['usertype'] = self::EXTERNAL_USER;\n }\n }\n\n // Pass user type as argument ? forced for specific cases\n if (isset($data['usertype'])) {\n $notificationoption['usertype'] = $data['usertype'];\n }\n\n $notificationoption = array_merge($this->addAdditionnalUserInfo($data),\n $notificationoption);\n\n $param = [\n 'language' => (empty($new_lang) ? $CFG_GLPI[\"language\"] : $new_lang),\n 'additionnaloption' => $notificationoption,\n 'username' => $username\n ];\n if (isset($data['users_id']) && $data['users_id']) {\n $param['users_id'] = $data['users_id'];\n }\n\n $eventclass = $this->event;\n $target_field = $eventclass::getTargetField($data, $param);\n if ($data[$target_field] !== null) {\n $param[$target_field] = $data[$target_field];\n $this->target[$data[$target_field]] = $param;\n }\n\n if (isset($data['users_id']) && $data['users_id']) {\n $this->recipient_data = [\n 'itemtype' => User::class,\n 'items_id' => $data['users_id'],\n ];\n Plugin::doHook('add_recipient_to_target', $this);\n unset($this->recipient_data);\n }\n }", "public function UpdateEmail()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$from = trim($_POST['fromemail']);\n\t\t\t$to = trim($_POST['toemail']);\n\n\t\t\t$update = array (\n\t\t\t\t'orders' => array (\n\t\t\t\t\t'ordbillemail',\n\t\t\t\t\t'ordshipemail',\n\t\t\t\t),\n\t\t\t\t'customers' => array (\n\t\t\t\t\t'custconemail',\n\t\t\t\t),\n\t\t\t\t'subscribers' => array (\n\t\t\t\t\t'subemail',\n\t\t\t\t),\n\t\t\t);\n\t\t\t$recordsUpdated = 0;\n\n\t\t\tforeach ($update as $table => $fields) {\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$updateData = array (\n\t\t\t\t\t\t$field => $to\n\t\t\t\t\t);\n\t\t\t\t\t$restriction = $field .\"='\".$GLOBALS['ISC_CLASS_DB']->Quote($from).\"'\";\n\t\t\t\t\t$GLOBALS['ISC_CLASS_DB']->UpdateQuery($table, $updateData, $restriction);\n\t\t\t\t\t$recordsUpdated += $GLOBALS['ISC_CLASS_DB']->NumAffected();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($recordsUpdated > 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedPlural'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} elseif ($recordsUpdated == 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedSingular'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} else {\n\t\t\t\t$message = GetLang('EmailCheckNoneUpdated');\n\t\t\t\t$status = MSG_ERROR;\n\t\t\t}\n\n\t\t\tFlashMessage($message, $status, 'index.php?ToDo=runAddon&addon=addon_emailchange');\n\t\t}", "function sendEmails($row, $config) {\r\n\t\tif ($row->act == 'upgrade') {\r\n\t\t\tOSMembershipHelper::sendMembershipUpgradeEmails($row, $config) ;\r\n\t\t\treturn ;\r\n\t\t} elseif ($row->act == 'renew') {\r\n\t\t\tOSMembershipHelper::sendMembershipRenewalEmails($row, $config) ;\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\t$jconfig = new JConfig();\r\n\t\t$db = & JFactory::getDBO();\r\n\t\t$fromEmail = $jconfig->mailfrom;\r\n\t\t$fromName = $jconfig->fromname;\r\n\t\t$sql = \"SELECT * FROM #__osmembership_plans WHERE id=\".$row->plan_id ;\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$plan = $db->loadObject();\r\n\t\t//Need to over-ridde some config options\r\n\t\t$emailContent = OSMembershipHelper::getEmailContent($config, $row);\r\n\t\t$replaces = array() ;\r\n\t\t$replaces['plan_title'] = $plan->title ;\r\n\t\t$replaces['first_name'] = $row->first_name ;\r\n\t\t$replaces['last_name'] = $row->last_name ;\r\n\t\t$replaces['organization'] = $row->organization ;\r\n\t\t$replaces['address'] = $row->address ;\r\n\t\t$replaces['address2'] = $row->address ;\r\n\t\t$replaces['city'] = $row->city ;\r\n\t\t$replaces['state'] = $row->state ;\r\n\t\t$replaces['zip'] = $row->zip ;\r\n\t\t$replaces['country'] = $row->country ;\r\n\t\t$replaces['phone'] = $row->phone ;\r\n\t\t$replaces['fax'] = $row->phone ;\r\n\t\t$replaces['email'] = $row->email ;\r\n\t\t$replaces['comment'] = $row->comment ;\r\n\t\t$replaces['amount'] = number_format($row->amount, 2) ;\r\n\t\t$replaces['discount_amount'] = number_format($row->discount_amount, 2) ;\r\n\t\t$replaces['tax_amount'] = number_format($row->tax_amount, 2) ;\r\n\t\t$replaces['gross_amount'] = number_format($row->gross_amount, 2) ;\r\n\t\t\t\t\t\t\t\t\r\n\t\t$replaces['from_date'] = JHTML::_('date', $row->from_date, $config->date_format);\r\n\t\t$replaces['to_date'] = JHTML::_('date', $row->to_date, $config->date_format);\r\n\t\t\r\n\t\t$replaces['transaction_id'] = $row->transaction_id ;\r\n\t\tif ($row->payment_method) {\r\n\t\t\t$replaces['payment_method'] = JText::_(os_payments::loadPaymentMethod($row->payment_method)->title) ;\r\n\t\t}\t\t\r\n\t\t//Should we create map to custom fields\r\n\t\t$sql = 'SELECT field_id, field_value FROM #__osmembership_field_value WHERE subscriber_id = '.$row->id;\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$rowValues = $db->loadObjectList();\r\n\t\t$sql = 'SELECT a.id, a.name FROM #__osmembership_fields AS a WHERE a.published=1 AND (a.plan_id = 0 OR a.plan_id='.$row->plan_id.')';\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$rowFields = $db->loadObjectList();\r\n\t\t$fields = array() ;\r\n\t\tfor ($i = 0 , $n = count($rowFields) ; $i < $n ; $i++) {\r\n\t\t\t$rowField = $rowFields[$i] ;\r\n\t\t\t$fields[$rowField->id] = $rowField->name ;\r\n\t\t}\r\n\t\tfor ($i = 0 , $n = count($rowValues) ; $i < $n ; $i++) {\r\n\t\t\t$rowValue = $rowValues[$i] ;\r\n\t\t\t$replaces[$fields[$rowValue->field_id]] = $rowValue->field_value ;\r\n\t\t}\r\n\t\t//Over-ridde email message\t\t\r\n\t\t$subject = $config->user_email_subject;\r\n\t\tif ($row->payment_method == 'os_offline') {\r\n\t\t\t$body = $config->user_email_body_offline ;\r\n\t\t} else {\r\n\t\t\t$body = $config->user_email_body ;\r\n\t\t}\r\n\t\t$subject = str_replace('[PLAN_TITLE]', $plan->title, $subject) ;\r\n\t\t$body = str_replace('[SUBSCRIPTION_DETAIL]', $emailContent, $body) ;\r\n\t\tforeach ($replaces as $key=>$value) {\r\n\t\t\t$key = strtoupper($key) ;\r\n\t\t\t$body = str_replace(\"[$key]\", $value, $body) ;\r\n\t\t}\t\t\r\n\t\tif (version_compare(JVERSION, '3.0', 'ge')) {\r\n\t\t\t$j3 = true ;\r\n\t\t\t$mailer = new JMail() ;\r\n\t\t} else {\r\n\t\t\t$j3 = false ;\r\n\t\t}\r\n\t\tif ($j3)\r\n\t\t\t$mailer->sendMail($fromEmail, $fromName, $row->email, $subject, $body, 1);\r\n\t\telse\r\n\t\t\tJUtility::sendMail($fromEmail, $fromName, $row->email, $subject, $body, 1);\r\n\t\t//Send emails to notification emails\r\n\t\tif ($config->notification_emails == '')\r\n\t\t\t$notificationEmails = $fromEmail;\r\n\t\telse\r\n\t\t\t$notificationEmails = $config->notification_emails;\r\n\t\t$notificationEmails = str_replace(' ', '', $notificationEmails);\r\n\t\t$emails = explode(',', $notificationEmails);\t\t\r\n\t\t$subject = $config->admin_email_subject ;\r\n\t\t$subject = str_replace('[PLAN_TITLE]', $plan->title, $subject) ;\r\n\t\t$body = $config->admin_email_body ;\r\n\t\t$body = str_replace('[SUBSCRIPTION_DETAIL]', $emailContent, $body);\r\n\t\tforeach ($replaces as $key=>$value) {\r\n\t\t\t$key = strtoupper($key) ;\r\n\t\t\t$body = str_replace(\"[$key]\", $value, $body) ;\r\n\t\t}\r\n\t\tfor ($i = 0, $n = count($emails); $i < $n ; $i++) {\r\n\t\t\t$email = $emails[$i];\r\n\t\t\tif ($j3)\r\n\t\t\t\t$mailer->sendMail($fromEmail, $fromName, $email, $subject, $body, 1);\r\n\t\t\telse\r\n\t\t\t\tJUtility::sendMail($fromEmail, $fromName, $email, $subject, $body, 1);\r\n\t\t}\r\n\t}", "public static function updateDeliver($db,$table_prefix,$receive_id,&$error)\n {\n $error = '';\n $output = [];\n \n $table_deliver = $table_prefix.'deliver';\n $table_item = $table_prefix.'deliver_item';\n \n $sql = 'SELECT COUNT(*) AS item_no,SUM(subtotal) AS subtotal,SUM(tax) AS tax,SUM(total) AS total '.\n 'FROM '.$table_item.' '.\n 'WHERE deliver_id = \"'.$db->escapeSql($deliver_id).'\" ';\n $totals = $db->readSqlRecord($sql);\n \n $sql = 'UPDATE '.$table_deliver.' '.\n 'SET item_no = \"'.$totals['item_no'].'\", '.\n 'subtotal = \"'.$totals['subtotal'].'\", '.\n 'tax = \"'.$totals['tax'].'\", '.\n 'total = \"'.$totals['total'].'\" '.\n 'WHERE deliver_id = \"'.$db->escapeSql($deliver_id).'\" ';\n $db->executeSql($sql,$error);\n \n if($error !== '') return false; else return true;\n }", "public function update(\n RestCompanyUnitAddressesRequestTransfer $restCompanyUnitAddressesRequestTransfer\n ): RestCompanyUnitAddressesResponseTransfer;", "public function update(Request $request, Deliveries $deliveries)\n {\n //\n }", "function fn_em_update_subscriber($subscriber_data, $subscriber_id = 0, $sync = true, $lang_code = CART_LANGUAGE, $company_id = null)\n{\n $invalid_emails = array();\n\n if (empty($subscriber_id)) {\n if (!empty($subscriber_data['email'])) {\n $company_condition = fn_em_get_company_condition();\n\n if (db_get_field(\"SELECT email FROM ?:em_subscribers WHERE email = ?s ?p\", $subscriber_data['email'], $company_condition) == '') {\n if (fn_validate_email($subscriber_data['email']) == false) {\n $invalid_emails[] = $subscriber_data['email'];\n } else {\n if (empty($subscriber_data['name'])) {\n $subscriber_data['name'] = '';\n }\n\n if (empty($subscriber_data['timestamp'])) {\n $subscriber_data['timestamp'] = time();\n }\n\n if (empty($subscriber_data['ip_address'])) {\n $ip = fn_get_ip();\n $subscriber_data['ip_address'] = fn_ip_to_db($ip['host']);\n }\n\n if (empty($subscriber_data['unsubscribe_key'])) {\n $subscriber_data['unsubscribe_key'] = md5(uniqid());\n }\n\n $subscriber_data['company_id'] = isset($company_id) ? $company_id : Registry::get('runtime.company_id');\n\n $subscriber_data['lang_code'] = $lang_code;\n $subscriber_id = db_query(\"INSERT INTO ?:em_subscribers ?e\", $subscriber_data);\n }\n } else {\n fn_set_notification('W', __('warning'), __('email_marketing.warning_email_exists', array(\n '[email]' => $subscriber_data['email']\n )));\n }\n }\n } else {\n db_query(\"UPDATE ?:em_subscribers SET ?u WHERE subscriber_id = ?i\", $subscriber_data, $subscriber_id);\n }\n\n if (!empty($invalid_emails)) {\n fn_set_notification('E', __('error'), __('error_invalid_emails', array(\n '[emails]' => implode(', ', $invalid_emails)\n )));\n } elseif ($sync) {\n $email = isset($subscriber_data['email']) ? $subscriber_data['email'] : '';\n $subscriber_data = fn_em_get_subscriber_data($email, $subscriber_id);\n $subscribed = EmailSync::instance()->subscribe(array(\n 'email' => $subscriber_data['email'],\n 'timestamp' => $subscriber_data['timestamp'],\n 'lang_code' => $subscriber_data['lang_code'],\n 'ip_address' => fn_ip_from_db($subscriber_data['ip_address']),\n 'name' => $subscriber_data['name']\n ));\n\n if ($subscribed == false) {\n fn_em_delete_subscribers(array($subscriber_id), false);\n $subscriber_id = false;\n }\n }\n\n return $subscriber_id;\n}", "public function testSendEmailToMultipleRecipients()\n {\n $client = $this->getClient();\n\n // Create the email definition\n $provisioner = new EmailDefinitionProvisioner();\n $provisioner->setContainer($this->container);\n\n $definition = $provisioner->provision(EmailDefinitionProvider::getTestModel());\n $definition = $client->createEmailDefinition($definition);\n\n $messageRequestBody = new SendEmailToMultipleRecipientsRequest([\n \"definitionKey\" => $definition->getDefinitionKey(),\n \"recipients\" => [\n new Recipient([\"contactKey\" => \"johnDoe@gmail.com\"]),\n new Recipient([\"contactKey\" => \"johnDoe2@gmail.com\"]),\n ]\n ]);\n\n // SUT\n $result = $client->sendEmailToMultipleRecipients($messageRequestBody);\n\n try {\n Assert::assertNotNull($result->getRequestId());\n } catch (ExpectationFailedException $e) {\n throw $e;\n } finally {\n $client->deleteEmailDefinition($definition->getDefinitionKey());\n $provisioner->deplete($definition);\n }\n }", "private function recipients()\n {\n if (request('type') === 'bulk') {\n return $recipients = count(Contact::active()->where('group_id', request('recipients'))->pluck('mobile'));\n } elseif (request('type') === 'single') {\n return $recipients = 1;\n }\n }", "public function sendUpdateBookingMailToParticipants(array $a_participants_ids) {\r\n\t\tforeach (array_unique($a_participants_ids) as $participant_id) {\r\n\t\t\t$this->composeUpdatingBookingMailForParticipant($participant_id);\r\n\t\t\tparent::sendMail(array( $participant_id ), array( 'system' ), is_numeric($participant_id));\r\n\t\t}\r\n\t}", "public function setRecipientUserId(?string $value): void {\n $this->getBackingStore()->set('recipientUserId', $value);\n }", "public function setToEmailAddress($toEmailAddress, $recipientName);", "public function actionBulkRestore() {\n\n if (Yii::$app->request->post('selection')) {\n\n $where = ['id' => Yii::$app->request->post('selection', []), 'sender_id' => Yii::$app->user->identity->id];\n $this->modelClass::updateAll(['status_del' => $this->modelClass::STATUS_DEL_NO, 'deleted_at' => NULL], $where);\n\n $whereVia = ['mailbox_id' => Yii::$app->request->post('selection', []), 'receiver_id' => Yii::$app->user->identity->id];\n $this->modelViaClass::updateAll(['status_del' => $this->modelClass::STATUS_DEL_NO, 'deleted_at' => NULL], $whereVia);\n }\n }", "public function setRecipient($recipient)\n {\n $this->recipient = (string) $recipient;\n }", "public function updateQuantity()\n {\n $this->load('itemAddressFiles');\n $quantity = 0;\n foreach ($this->itemAddressFiles as $addressFileLink) {\n $quantity += $addressFileLink->count;\n }\n $quantity += $this->mail_to_me;\n $this->quantity = $quantity;\n $this->save();\n $this->_calculateTotal();\n }", "public function actionSend(): void\n {\n $prizes = UserPrize::find()->alias('user_prize')->JoinWith(['prize','user'])\n ->where([\n 'user_prize.status' => UserPrize::STATUS_RECEIVED,\n 'prize_type' => Prize::TYPE_MONEY,\n ])\n ->limit(self::DEFAULT_NUMBER)\n ->all();\n\n if ($prizes) {\n $this->stdout(\\Yii::t('app', 'Sending {prizes} prize(s)...' . PHP_EOL,\n ['prizes' => count($prizes)]), Console::FG_GREEN);\n } else {\n $this->stdout(\\Yii::t('app', 'Nothing to send!' . PHP_EOL), Console::FG_YELLOW);\n }\n\n foreach ($prizes as $prize) {\n\n $prize->status = UserPrize::STATUS_SENT;\n $prize->save(false);\n\n $this->stdout(\\Yii::t('app', 'Sending {money} money to user {user}...', [\n 'money' =>$prize->quantity,\n 'user' => $prize->user->email\n ]));\n\n\n $this->stdout(\\Yii::t('app', ' [SENT]' . PHP_EOL), Console::FG_GREEN);\n }\n }", "public function update(Request $request, $id)\n {\n $input = Input::all();\n// dd($input);\n try {\n $message = Participant::findOrFail($id);\n $thread = Thread::where('id', '=', $message->thread_id)->get()->first();\n// $user = User::find($message->user_id);\n foreach ($input['recipients'] as $user_id) {\n if(Auth::getUser()->id == $user_id ) {\n $user = User::find($message->user_id);\n }\n else\n {\n $user = User::find($user_id);\n }\n }\n } catch (ModelNotFoundException $e) {\n Session::flash('error_message', 'The thread with ID: ' . $id . ' was not found.');\n return redirect('messages');\n }\n\n if ($user->isAnalyst() || $user->isAdmin() || $user->isExecutive() || $user->isManagement()) {\n if (isset($thread->loan_id) && $thread->loan_id != '') {\n if (Input::has('recipients')) {\n foreach ($input['recipients'] as $user_id) {\n $messages = Participant::Create([\n 'thread_id' => $thread->id,\n 'from_user_id' => Auth::getUser()->id,\n 'user_id' => -1,\n 'body' => $input['message'],\n 'source' => 'bank',\n ]);\n }\n }\n } else {\n if (Input::has('recipients')) {\n foreach ($input['recipients'] as $user_id) {\n\n $messages = Participant::Create([\n 'thread_id' => $thread->id,\n 'from_user_id' => Auth::getUser()->id,\n 'user_id' => -1,\n 'body' => $input['message'],\n 'source' => 'normal',\n ]);\n }\n }\n }\n } else {\n if (isset($thread->loan_id) && $thread->loan_id != '') {\n if (Input::has('recipients')) {\n foreach ($input['recipients'] as $user_id) {\n if(Auth::getUser()->id == $user_id ) {\n $messages = Participant::Create([\n 'thread_id' => $thread->id,\n 'from_user_id' => Auth::getUser()->id,\n 'user_id' => $message->user_id,\n 'body' => $input['message'],\n 'source' => 'bank',\n ]);\n }\n else {\n $messages = Participant::Create([\n 'thread_id' => $thread->id,\n 'from_user_id' => Auth::getUser()->id,\n 'user_id' => $user_id,\n 'body' => $input['message'],\n 'source' => 'bank',\n ]);\n }\n }\n }\n } else {\n\n if (Input::has('recipients')) {\n foreach ($input['recipients'] as $user_id) {\n if(Auth::getUser()->id == $user_id ) {\n $messages = Participant::Create([\n 'thread_id' => $thread->id,\n 'from_user_id' => Auth::getUser()->id,\n 'user_id' => $message->user_id,\n 'body' => $input['message'],\n 'source' => 'normal',\n ]);\n }\n else {\n $messages = Participant::Create([\n 'thread_id' => $thread->id,\n 'from_user_id' => Auth::getUser()->id,\n 'user_id' => $user_id,\n 'body' => $input['message'],\n 'source' => 'normal',\n ]);\n }\n }\n }\n }\n }\n\n if ($request->file('upload_file')) {\n $file = $request->file('upload_file');\n $directory = 'Threads';\n $originalFileName = $file->getClientOriginalName();\n $uploadedFileName = $directory. '/'. 'thread_' . $messages->id . '-' . $originalFileName;\n $oldFileName = null;\n\n if (isset($messages) && !empty($messages->upload_file)) {\n $oldFileName = $messages->upload_file;\n }\n\n $fileHelper = new FileHelper();\n\n $fileHelper->uploadFile($directory, $uploadedFileName, File::get($file), $oldFileName);\n $messages->upload_file = $uploadedFileName;\n $messages->save();\n }\n\n $sender = Auth::getUser();\n foreach ($input['recipients'] as $user_id) {\n $receiver = User::find($user_id);\n }\n\n if (isset($thread->loan_id) && $thread->loan_id != '') {\n $loan = Loan::find($thread->loan_id);\n if($sender->id == $message->user_id) {\n if ($user->isAnalyst()) {\n $loanStatus = LoansStatus::where('loan_id', '=', $thread->loan_id)->get()->first();\n if (isset($loanStatus) && count($loanStatus) > 0) {\n $loanStatus->niwas_query_status = 'N';\n $loanStatus->save();\n }\n } elseif ($user->isBankUser()) {\n $loanStatus = LoansBankAllocation::where('loan_id', '=', $thread->loan_id)->where('bank_id', '=', $user->bank_id)->get()->first();\n if (isset($loanStatus) && count($loanStatus) > 0) {\n $loanStatus->bank_query_status = 'N';\n $loanStatus->save();\n }\n }\n $thread->is_replied = '1';\n $thread->save();\n\n $this->sendMail('emails.querymail', array('from' => $sender->email, 'to' => $receiver->email, 'loanID' => $thread->loan_id, 'subject' => $input['subject'], 'bodyMessage' => $input['message']), $sender->email, 'Query Message From SMENiwas!');\n// $this->sendMail('emails.querymail', array('from' => $sender->email, 'to' => $receiver->email, 'loanID' => $thread->loan_id, 'subject' => $input['subject'], 'bodyMessage' => $input['message']), $receiver->email, 'Query Message From SMENiwas!');\n $confParam = new ConfigurableParameter();\n $message = $confParam->getParamValueOrDefault('sms_template', 'Received Query');\n if (isset($receiver)) {\n $userProfile = $receiver->userProfile();\n if (isset($userProfile) && isset($userProfile->contact1)) {\n $mobileNumber = $userProfile->contact1;\n $this->sendSMS($mobileNumber, $message);\n }\n }\n }\n }\n\n return redirect('messaging');\n }", "function pdfbulletin_sendtest_form_submit($form, &$form_state) {\n $subscriptions = array();\n\n $emails = explode(\"\\n\", $form_state['values']['subscribers']);\n foreach ($emails as $email) {\n $email = trim($email);\n if (!empty($email) && valid_email_address($email)) {\n $subscriptions[$email] = $email;\n }\n }\n \n $node = $form_state['values']['node'];\n $pdfbulletin = $node->pdfbulletin;\n $pdfbulletin->subscribers = $subscriptions;\n pdfbulletin_send_email($pdfbulletin, $node);\n\n drupal_set_message('Test message sent.');\n // @todo make this more redirect friendly\n drupal_goto('/pdfbulletin/' . $pdfbulletin->id . '/subscribers');\n}", "public function envoieallinterAction(Request $request)\n{\n /*$form = $this->createForm(MailingType::class, $mail);\n $form->handleRequest($request);*/\n $em = $this->getDoctrine()->getManager();\n $tomails = $em->getRepository(\"FrontBonPlanBundle:Newsletter\")->findAll();\n\n if ($request->getMethod()=='POST') {\n $subject = $request->get('subject');\n $mailtext = $request->get('mailtext');\n $arraymail=array();\n foreach ($tomails as $tomail){\n $arraymail[]=$tomail->getMailinter();\n }\n $message = \\Swift_Message::newInstance()\n ->setSubject($subject)\n ->setFrom('bonplan2info@gmail.com')\n ->setTo(/*array($tomails->getMailinter())*/$arraymail)\n ->setBody( $mailtext,'text/html'\n );\n $this->get('mailer')->send($message);\n echo'Mail send success';\n }\n\n return $this->render ('Newsletter/edit.html.twig');\n}", "protected function removeRecipient()\n\t{\n\t\t$arrChannels = $this->Input->post('channels');\n\t\t$arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240\n\n\t\t// Check the selection\n\t\tif (!is_array($arrChannels) || count($arrChannels) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['noChannels'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t$arrSubscriptions = array();\n\t\t\n\t\t$email = \\Idna::encodeEmail($this->Input->post('email', true));\n\t\t\n\t\t$subscriber = new Subscriber($email);\n\n\t\t// Get active subscriptions\n\t\t$objSubscription = $this->Database->prepare(\"SELECT pid FROM tl_newsletter_recipients WHERE email=? AND active=1\")\n\t\t\t\t\t\t\t\t\t\t ->execute($email);\n\n\t\tif ($objSubscription->numRows)\n\t\t{\n\t\t\t$arrSubscriptions = $objSubscription->fetchEach('pid');\n\t\t}\n\n\t\t$arrRemove = array_intersect($arrChannels, $arrSubscriptions);\n\n\t\t// Return if there are no subscriptions to remove\n\t\tif (!is_array($arrRemove) || count($arrRemove) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['unsubscribed'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// check for cleverreach support\n\t\t$objChannel = $this->Database->execute(\"SELECT id FROM tl_newsletter_channel WHERE cleverreach_active = 1 AND id IN(\" . implode(',', array_map('intval', $arrRemove)) . \")\");\n\n\t\t// TODO: multiple channel unsubscription\n\t\t$subscriber->getByChannel($arrRemove[0]);\n\n\t\t// Remove subscriptions\n\t\t$subscriber->remove($arrRemove);\n\t\t\n\t\t// optional Cleverreach Deletion\n\t\tif($objChannel->numRows > 0)\n\t\t{\n\t\t\t$subscriber->removeFromCR($objChannel->fetchEach('id'));\n\t\t}\n\n\t\t// Get channels\n\t\t$objChannels = $this->Database->execute(\"SELECT title FROM tl_newsletter_channel WHERE id IN(\" . implode(',', array_map('intval', $arrRemove)) . \")\");\n\t\t$arrChannels = $objChannels->fetchEach('title');\n\n\t\t// HOOK: post unsubscribe callback\n\t\tif (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && is_array($GLOBALS['TL_HOOKS']['removeRecipient']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->{$callback[0]}->{$callback[1]}($varInput, $arrRemove);\n\t\t\t}\n\t\t}\n\n\t\tglobal $objPage;\n\n\t\t// Redirect to jumpTo page\n\t\tif (strlen($this->jumpTo) && $this->jumpTo != $objPage->id)\n\t\t{\n\t\t\t$objNextPage = $this->Database->prepare(\"SELECT id, alias FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($this->jumpTo);\n\n\t\t\tif ($objNextPage->numRows)\n\t\t\t{\n\t\t\t\t$this->redirect($this->generateFrontendUrl($objNextPage->fetchAssoc()));\n\t\t\t}\n\t\t}\n\n\t\tif($subscriber->sendUnSubscribeMail($arrRemove))\n\t\t{\n\t\t\t$this->reload();\n\t\t}\n\t}", "public static function updateEmails()\n {\n // When inconsistency occurs, choose FB's data.\n $users = User::all();\n foreach($users as $user)\n {\n // If token doesn't exist locally, continue\n if(Token::where('user_id', $user->id)->count() == 0)\n continue;\n\n $token = Token::getLatestToken($user->id);\n\n if(Token::checkIfTokenExpired($token))\n continue;\n\n $FB_email = Helpers::getFacebookResources($token)->getEmail();\n\n $Local_email = $user->email;\n if(($FB_email !== $Local_email) && ($FB_email !== null))\n {\n $user->update(['email' => $FB_email]);\n }\n }\n }", "public function inviteUser()\r\n {\r\n Invite::instance()->from(Yii::$app->user->getIdentity())->about($this)->sendBulk($this->participantUsers);\r\n }", "function addBCC( $newRecipient ) {\n\t\t\t\t\n\t}", "public function addRecipients($recipients)\n {\n // modify post, adding base_uri as 'message' key\n $format = [];\n\n $recipients = is_array($recipients) ? $recipients : [$recipients];\n\n // format recipients for the API POST, waiting for an associative array\n // with to/message keys\n foreach ($recipients as $mail)\n {\n $format[] = [\n 'to' => $mail,\n 'message' => $this->url\n ];\n }\n\n return $this->_resource->client->recipients->post($format);\n }", "function sendUpdateEmail($email, $registrant)\n{\n $name = $_SESSION['ctst_name'];\n $subject = $name . \" registration information updated.\";\n $mailContent = $registrant['givenName'] . ' ' . $registrant['familyName'];\n $mailContent .= \":\\n\\n\";\n $mailContent .= \"Your information for the \" . $name . \" has been updated.\\n\";\n $mailContent .= \"\\nIf you did not edit your registration information, \" .\n \"please write to the administrator:\\n\";\n $mailContent .= \"mailto:\" . ADMIN_EMAIL . \"?subject=account%20compromised\\n\";\n $mailContent .= \"\\nright away, or simply reply to this note.\\n\";\n $mailContent .= automatedMessage($name);\n $headers = \"From: \" . ADMIN_EMAIL . \"\\r\\n\";\n do_email($email, $subject, $mailContent, $headers);\n}", "public function set_recipient( $id ) {\n\t\t$this->recipient_id = $id;\n\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_RECIPIENT_KEY, $id );\n\t}", "function addCC( $newRecipient ) {\n\t\t\t\t\n\t}", "public function testSendSmsToMultipleRecipients()\n {\n $client = $this->getClient();\n\n // Create the email definition\n $provisioner = new SmsDefinitionProvisioner();\n $provisioner->setContainer($this->container);\n\n $definition = $provisioner->provision(SmsDefinitionProvider::getTestModel());\n $definition = $client->createSmsDefinition($definition);\n\n $body = new SendSmsToMultipleRecipientsRequest([\n \"definitionKey\" => $definition->getDefinitionKey(),\n \"recipients\" => [\n new Recipient([\"contactKey\" => \"johnDoe@gmail.com\"]),\n new Recipient([\"contactKey\" => \"johnDoe2@gmail.com\"]),\n ]\n ]);\n\n // SUT\n $result = $client->sendSmsToMultipleRecipients($body);\n\n try {\n Assert::assertNotNull($result->getRequestId());\n } catch (ExpectationFailedException $e) {\n throw $e;\n } finally {\n $client->deleteSmsDefinition($definition->getDefinitionKey());\n $provisioner->deplete($definition);\n }\n }", "public function setRecipients($recipients)\n {\n if (! is_array($recipients)) {\n $this->recipients = explode(',', $recipients);\n } else {\n $this->recipients = $recipients;\n }\n\n return $this;\n }", "public static function sendMembershipRenewalEmails($mailer, $row, $plan, $config, $message, $fieldSuffix)\n\t{\n\t\tif ($row->renew_option_id == OSM_DEFAULT_RENEW_OPTION_ID)\n\t\t{\n\t\t\t$numberDays = $plan->subscription_length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$db = JFactory::getDbo();\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select('number_days')\n\t\t\t\t->from('#__osmembership_renewrates')\n\t\t\t\t->where('id = ' . $row->renew_option_id);\n\t\t\t$db->setQuery($query);\n\t\t\t$numberDays = $db->loadResult();\n\t\t}\n\n\t\t// Get list of fields\n\t\t$rowFields = OSMembershipHelper::getProfileFields($row->plan_id);\n\n\t\t$emailContent = OSMembershipHelper::getEmailContent($config, $row);\n\t\t$replaces = OSMembershipHelper::buildTags($row, $config);\n\t\t$replaces['plan_title'] = $plan->title;\n\t\t$replaces['number_days'] = $numberDays;\n\n\t\t// Use plan messages if needed\n\t\tif (strlen($plan->{'user_renew_email_subject' . $fieldSuffix}))\n\t\t{\n\t\t\t$message->{'user_renew_email_subject' . $fieldSuffix} = $plan->{'user_renew_email_subject' . $fieldSuffix};\n\t\t}\n\n\t\tif (strlen(strip_tags($plan->{'user_renew_email_body' . $fieldSuffix})))\n\t\t{\n\t\t\t$message->{'user_renew_email_body' . $fieldSuffix} = $plan->{'user_renew_email_body' . $fieldSuffix};\n\t\t}\n\n\t\tif (strlen($message->{'user_renew_email_subject' . $fieldSuffix}))\n\t\t{\n\t\t\t$subject = $message->{'user_renew_email_subject' . $fieldSuffix};\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$subject = $message->user_renew_email_subject;\n\t\t}\n\n\t\t$subject = str_replace('[PLAN_TITLE]', $plan->title, $subject);\n\n\t\tif (strlen(strip_tags($message->{'user_renew_email_body' . $fieldSuffix})))\n\t\t{\n\t\t\t$body = $message->{'user_renew_email_body' . $fieldSuffix};\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$body = $message->user_renew_email_body;\n\t\t}\n\n\t\t// Use offline payment email message if available\n\t\tif ($row->payment_method == 'os_offline' && $row->published == 0)\n\t\t{\n\t\t\tif (strlen(strip_tags($message->{'renew_thanks_message_offline' . $fieldSuffix})))\n\t\t\t{\n\t\t\t\t$body = $message->{'renew_thanks_message_offline' . $fieldSuffix};\n\t\t\t}\n\t\t\telseif (strlen(strip_tags($message->renew_thanks_message_offline)))\n\t\t\t{\n\t\t\t\t$body = $message->renew_thanks_message_offline;\n\t\t\t}\n\t\t}\n\n\t\t$body = str_replace('[SUBSCRIPTION_DETAIL]', $emailContent, $body);\n\t\t$body = str_replace('[SUBSCRIPTION_DETAIL_NEW]', $emailContent, $body);\n\n\t\tforeach ($replaces as $key => $value)\n\t\t{\n\t\t\t$key = strtoupper($key);\n\t\t\t$subject = str_ireplace(\"[$key]\", $value, $subject);\n\t\t\t$body = str_ireplace(\"[$key]\", $value, $body);\n\t\t}\n\n\t\tif ($config->activate_invoice_feature && $config->send_invoice_to_customer && OSMembershipHelper::needToCreateInvoice($row))\n\t\t{\n\t\t\tif (!$row->invoice_number)\n\t\t\t{\n\t\t\t\t$row->invoice_number = OSMembershipHelper::getInvoiceNumber($row);\n\t\t\t\t$row->store();\n\t\t\t}\n\t\t\tOSMembershipHelper::generateInvoicePDF($row);\n\t\t\t$mailer->addAttachment(JPATH_ROOT . '/media/com_osmembership/invoices/' . OSMembershipHelper::formatInvoiceNumber($row, $config) . '.pdf');\n\t\t}\n\n\t\tif (JMailHelper::isEmailAddress($row->email))\n\t\t{\n\t\t\tstatic::send($mailer, array($row->email), $subject, $body);\n\t\t\t$mailer->clearAllRecipients();\n\t\t}\n\n\t\tif (!$config->send_invoice_to_admin)\n\t\t{\n\t\t\t$mailer->clearAttachments();\n\t\t}\n\n\t\tif (!$config->disable_notification_to_admin)\n\t\t{\n\t\t\t$emails = explode(',', $config->notification_emails);\n\n\t\t\tif (strlen($message->{'admin_renw_email_subject' . $fieldSuffix}))\n\t\t\t{\n\t\t\t\t$subject = $message->{'admin_renw_email_subject' . $fieldSuffix};\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$subject = $message->admin_renw_email_subject;\n\t\t\t}\n\t\t\t$subject = str_replace('[PLAN_TITLE]', $plan->title, $subject);\n\n\t\t\tif (strlen(strip_tags($message->{'admin_renew_email_body' . $fieldSuffix})))\n\t\t\t{\n\t\t\t\t$body = $message->{'admin_renew_email_body' . $fieldSuffix};\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$body = $message->admin_renew_email_body;\n\t\t\t}\n\n\t\t\tif ($row->payment_method == 'os_creditcard')\n\t\t\t{\n\t\t\t\t$emailContent = OSMembershipHelper::getEmailContent($config, $row, true);\n\t\t\t}\n\t\t\t$body = str_replace('[SUBSCRIPTION_DETAIL]', $emailContent, $body);\n\t\t\t$body = str_replace('[SUBSCRIPTION_DETAIL_NEW]', $emailContent, $body);\n\t\t\tforeach ($replaces as $key => $value)\n\t\t\t{\n\t\t\t\t$key = strtoupper($key);\n\t\t\t\t$subject = str_ireplace(\"[$key]\", $value, $subject);\n\t\t\t\t$body = str_ireplace(\"[$key]\", $value, $body);\n\t\t\t}\n\n\t\t\t//We will need to get attachment data here\n\t\t\tif ($config->send_attachments_to_admin)\n\t\t\t{\n\t\t\t\tstatic::addAttachments($mailer, $rowFields, $replaces);\n\t\t\t}\n\n\t\t\tstatic::send($mailer, $emails, $subject, $body);\n\t\t}\n\t}", "public function activateRecipient($strEmail, $arrAdd, $arrCids)\n {\n global $objPage;\n\n if (!empty($arrAdd) && is_array($arrAdd) && !empty($arrCids) && is_array($arrCids))\n {\n foreach ($arrCids as $channelId)\n {\n $subscriberId = null;\n\n if (($objChannel = NewsletterChannelModel::findByPk($channelId)) !== null)\n {\n if ($objChannel->notifyOnSubscriptionActivation)\n {\n if (($objNotification = Notification::findByPk($objChannel->onSubscriptionActivationNotification)) !== null)\n {\n $subscriberId = null;\n\n // Fill newsletter channel token from tl_newsletter_channel\n $arrTokens = array();\n $arrRow = $objChannel->row();\n foreach ($arrRow as $k => $v)\n {\n $arrTokens['newsletter_' . $k] = html_entity_decode($v);\n }\n // Convert timestamp to date\n $arrTokens['newsletter_tstamp'] = Date::parse(Config::get('datimFormat'), $objChannel->tstamp);\n\n // Fill recipient token from tl_newsletter_recipients\n foreach ($arrAdd as $id)\n {\n if (($objSubscriber = NewsletterRecipientsModel::findByPk($id)) !== null)\n {\n if ($objSubscriber->pid === $objChannel->id)\n {\n $subscriberId = $objSubscriber->id;\n foreach ($objSubscriber->row() as $k => $v)\n {\n $arrTokens['recipient_' . $k] = html_entity_decode($v);\n }\n // Convert timestamps to date\n $arrTimestamps = array('tstamp', 'addedOn');\n foreach ($arrTimestamps as $k)\n {\n if ($arrTokens['recipient_' . $k] != '')\n {\n $arrTokens['recipient_' . $k] = Date::parse(Config::get('datimFormat'), $objSubscriber->{$k});\n }\n }\n }\n }\n }\n\n $blnSend = true;\n if ($objNotification !== null && ($objSubscriber = NewsletterRecipientsModel::findByPk($subscriberId) !== null))\n {\n // HOOK: add custom tokens\n if (isset($GLOBALS['TL_HOOKS']['beforeNotifyOnSubscriptionActivation']) && \\is_array($GLOBALS['TL_HOOKS']['beforeNotifyOnSubscriptionActivation']))\n {\n foreach ($GLOBALS['TL_HOOKS']['beforeNotifyOnSubscriptionActivation'] as $callback)\n {\n if ($blnSend)\n {\n $objHook = Controller::importStatic($callback[0]);\n // Pass $arrTokens by reference!\n $blnSend = $objHook->{$callback[1]}($arrTokens, $objSubscriber, $objChannel, $objNotification);\n }\n }\n }\n if ($blnSend)\n {\n $objNotification->send($arrTokens, $objPage->language);\n }\n }\n }\n }\n }\n }\n }\n }", "public function send() : array\n {\n return $this->sendRequest(self::URI_PATH, ['recipients' => $this->recipients]);\n }", "public function setPreserveRecipients($preserve_recipients)\n {\n $this->preserve_recipients = $this->message['preserve_recipients'] = $preserve_recipients;\n }", "public function send_availability($id, $recipients, $rounds, $sender);", "public function send()\n {\n if ($this->attachmentContainer->hasAttachments()) {\n foreach ($this->attachmentContainer->getAttachments() as $attachment) {\n //check type of invoice and configuration for attachment\n $config = $this->helper->getConfig('pdfpro/general/'.$attachment->getData('config').'_email_attach');\n if ($config == \\Vnecoms\\PdfPro\\Model\\Source\\Attach::ATTACH_TYPE_BOTH ||\n $config == \\Vnecoms\\PdfPro\\Model\\Source\\Attach::ATTACH_TYPE_CUSTOMER) {\n $this->transportBuilder->addAttachment($attachment);\n }\n }\n $this->attachmentContainer->resetAttachments();\n }\n parent::send();\n }", "public function getRecipients()\r\n {\r\n return ['to' => $this->to, 'cc' => $this->cc, 'bcc' => $this->bcc];\r\n }", "function addCurrentUserAsRecipient(){\n // $this->AddRecipient( SessionUser::getProperty(\"firstname\").\" \".SessionUser::getProperty(\"lastname\").\" <\".SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN.\">\" );\n $this->AddRecipient( SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN );\n }", "public function sendNotifications()\n {\n foreach ($this->recipients_messages as $recipientID => $recipientInfo) {\n $recipient = $this->recipients_addresses[$recipientID];\n if ($recipient && $recipient['email']) {\n $message = implode(chr(10) . chr(10), $recipientInfo['messages']);\n\n $subject = $this->mail_subject;\n\n $subject .= ' Statechange: ';\n\n if ($recipientInfo['num_undefined'] > 0) {\n $subject .= ' ' . $recipientInfo['num_undefined'] . ' Undefined';\n }\n if ($recipientInfo['num_ok'] > 0) {\n $subject .= ' ' . $recipientInfo['num_ok'] . ' OK';\n }\n if ($recipientInfo['num_error'] > 0) {\n $subject .= ' ' . $recipientInfo['num_error'] . ' Errors';\n }\n if ($recipientInfo['num_warning'] > 0) {\n $subject .= ' ' . $recipientInfo['num_warning'] . ' Warnings';\n }\n if ($recipientInfo['num_ack'] > 0) {\n $subject .= ' ' . $recipientInfo['num_ack'] . ' Acknowledged';\n }\n if ($recipientInfo['num_due'] > 0) {\n $subject .= ' ' . $recipientInfo['num_due'] . ' Due';\n }\n\n $this->sendMail($subject, $recipient['email'], $this->mail_from, $message);\n }\n }\n }", "public static function fp_rac_edit_mail_update_data() {\n\n check_ajax_referer('update-guest-email', 'rac_security');\n if (isset($_POST['id']) && $_POST['email']) {\n $row_id = $_POST['id'];\n $email_value = $_POST['email'];\n $cart_details = maybe_unserialize(get_post_meta($row_id, 'rac_cart_details', true));\n $cart_details[\"visitor_mail\"] = $email_value;\n $details = maybe_serialize($cart_details);\n update_post_meta($row_id, 'rac_cart_details', $details);\n }\n exit();\n }", "public function register_recipients($p)\n {\n $rcmail = rcmail::get_instance();\n \n if (!$rcmail->config->get('use_auto_abook', true)) {\n return;\n }\n \n $headers = $p['headers'];\n\n if (!class_exists('rcube_mime')) { // RC < 0.8 compatibility code\n $IMAP = new rcube_imap(null);\n $all_recipients = array_merge(\n $IMAP->decode_address_list($headers['To'], null, true, $headers['charset']),\n $IMAP->decode_address_list($headers['Cc'], null, true, $headers['charset']),\n $IMAP->decode_address_list($headers['Bcc'], null, true, $headers['charset'])\n );\n } else {\n $all_recipients = array_merge(\n rcube_mime::decode_address_list($headers['To'], null, true, $headers['charset']),\n rcube_mime::decode_address_list($headers['Cc'], null, true, $headers['charset']),\n rcube_mime::decode_address_list($headers['Bcc'], null, true, $headers['charset'])\n );\n }\n\n require_once dirname(__FILE__) . '/automatic_addressbook_backend.php';\n $CONTACTS = new automatic_addressbook_backend($rcmail->db, $rcmail->user->ID);\n \n foreach ($all_recipients as $recipient) {\n // Bcc and Cc can be empty\n if ($recipient['mailto'] != '') {\n\t\t\t\t// Added by Arpit Gupta on 28th January for autocomplete UTF8 Email IDs\n\t\t\t\t$utf8_domain = explode(\"@\", $recipient['mailto']);\n\t\t\t\t$recipient['mailto'] = $utf8_domain[0].\"@\".rcube_utils::idn_to_utf8($utf8_domain[1]);\n\t\t\t\t\n $contact = array(\n 'email' => $recipient['mailto'],\n 'name' => $recipient['name']\n );\n\n // use email address part for name\n if (empty($contact['name']) || $contact['name'] == $contact['email']) {\n $contact['name'] = ucfirst(preg_replace('/[\\.\\-]/', ' ',\n substr($contact['email'], 0, strpos($contact['email'], '@'))));\n }\n\n /* We only want to add the contact to the collected contacts\n * address book if it is not already in an addressbook, so we\n * first lookup in every address source.\n */\n $book_types = (array)$rcmail->config->get('autocomplete_addressbooks', 'sql');\n\n foreach ($book_types as $id) {\n $abook = $rcmail->get_address_book($id);\n $previous_entries = $abook->search('email', $contact['email'], false, false);\n \n if ($previous_entries->count) {\n break;\n }\n }\n if (!$previous_entries->count) {\n $plugin = $rcmail->plugins->exec_hook('contact_create', array('record' => $contact,\n 'source' => $this->abook_id));\n if (!$plugin['abort']) {\n $CONTACTS->insert($contact, false);\n }\n }\n }\n }\n }", "public function getRecipients($data)\n\t{\t\n\t\t// First of all check for test address in configuration\n\t\tif ($test_address[] = ComponentHelper::getParams('com_tkdclub')->get('email_test'))\n\t\t{\n\t\t\treturn $test_address;\n\t\t}\n\t\t\n\t\t$app = Factory::getApplication();\n\n\t\t// array for member recipients\n\t\t$member_recipients = array();\n\t\tarray_key_exists('active', $data) ? $member_recipients[] = 'active' : null;\n\t\tarray_key_exists('inactive', $data) ? $member_recipients[] = 'inactive' : null;\n\t\tarray_key_exists('supporter', $data) ? $member_recipients[] = 'support' : null;\n\n\t\t// Check for existing recipients\n\t\tif (empty($member_recipients) && !array_key_exists('newsletter', $data) && !is_numeric($data['event']))\n\t\t{\n\t\t\t$app->enqueueMessage(Text::_('COM_TKDCLUB_NO_RECIPIENTS_SELECTED'), 'error');\n\t\t\t$app->setUserState('com_tkdclub.email.data', $data);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\n\t\t// Go to database and fetch email addresses\n\t\t$db = $this->getDbo();\n\t\t$email_adresses = array();\n\n\t\t// query recipients from memberstable\n\t\tif (!empty($member_recipients))\n\t\t{\n\t\t\t$q_members = $db->getQuery(true);\n\t\t\t$q_members->select('DISTINCT ' . $db->quoteName('email'))->from('#__tkdclub_members');\n\t\t\t$query_string = '';\n\t\t\t$or = '';\n\t\t\tforeach ($member_recipients as $value) \n\t\t\t{\n\t\t\t\t$query_string .= $or . $db->quoteName('member_state') . ' = ' . $db->quote($value);\n\t\t\t\t$or = ' OR ';\n\t\t\t}\n\t\t\t$q_members->where('(' . $query_string . ')');\n\t\t\t$q_members->where('NOT ' . $db->quoteName('email') . ' = ' . $db->quote(''));\n\n\t\t\t$email_adresses = array_merge($email_adresses, $db->setQuery($q_members)->loadColumn());\n\t\t}\n\n\t\t// query recipients from newsletter table\n\t\tif (array_key_exists('newsletter', $data))\n\t\t{\n\t\t\t$q_subscribers = $db->getQuery(true);\n\t\t\t$q_subscribers->select('DISTINCT' . $db->quoteName('email'))->from($db->quoteName('#__tkdclub_newsletter_subscribers'));\n\t\t\t$q_subscribers->where('NOT ' . $db->quoteName('email') . ' = ' . $db->quote(''));\n\n\t\t\t$email_adresses = array_merge($email_adresses, $db->setQuery($q_subscribers)->loadColumn());\n\t\t}\n\n\t\t// query recipients of event\n\t\tif (is_numeric($data['event']))\n\t\t{\n\t\t\t$q_event_participants = $db->getQuery(true);\n\t\t\t$q_event_participants->select('DISTINCT' . $db->quoteName('email'))->from($db->quoteName('#__tkdclub_event_participants'));\n\t\t\t$q_event_participants->where($db->quoteName('event_id') . ' = ' . (int) $data['event']);\n\t\t\t$q_event_participants->where('NOT ' . $db->quoteName('email') . ' = ' . $db->quote(''));\n\t\t\t$q_event_participants->where($db->quoteName('published') . ' = ' . 1);\n\n\t\t\t$email_adresses = array_merge($email_adresses, $db->setQuery($q_event_participants)->loadColumn());\n\t\t}\n\n\t\treturn array_unique($email_adresses);\n\t}", "public function importRecipients()\n\t{\n\t\tif ($this->Input->get('key') != 'import')\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t// Import CSS\n\t\tif ($this->Input->post('FORM_SUBMIT') == 'tl_recipients_import')\n\t\t{\n\t\t\tif (!$this->Input->post('source') || !is_array($this->Input->post('source')))\n\t\t\t{\n\t\t\t\t$_SESSION['TL_ERROR'][] = $GLOBALS['TL_LANG']['ERR']['all_fields'];\n\t\t\t\t$this->reload();\n\t\t\t}\n\n\t\t\tforeach ($this->Input->post('source') as $strCsvFile)\n\t\t\t{\n\t\t\t\t$objFile = new File($strCsvFile);\n\n\t\t\t\tif ($objFile->extension != 'csv')\n\t\t\t\t{\n\t\t\t\t\t$_SESSION['TL_ERROR'][] = sprintf($GLOBALS['TL_LANG']['ERR']['filetype'], $objFile->extension);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Get separator\n\t\t\t\tswitch ($this->Input->post('separator'))\n\t\t\t\t{\n\t\t\t\t\tcase 'semicolon':\n\t\t\t\t\t\t$strSeparator = ';';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'tabulator':\n\t\t\t\t\t\t$strSeparator = '\\t';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'linebreak':\n\t\t\t\t\t\t$strSeparator = '\\n';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$strSeparator = ',';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$strFile = $objFile->getContent();\n\t\t\t\t$arrRecipients = trimsplit($strSeparator, $strFile);\n\n\t\t\t\tforeach ($arrRecipients as $strRecipient)\n\t\t\t\t{\n\t\t\t\t\t$this->Database->prepare(\"DELETE FROM tl_news_recipients WHERE pid=? AND email=?\")->execute($this->Input->get('id'), $strRecipient);\n\t\t\t\t\t$this->Database->prepare(\"INSERT INTO tl_news_recipients SET pid=?, tstamp=?, email=?, active=?\")->execute($this->Input->get('id'), time(), $strRecipient, 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsetcookie('BE_PAGE_OFFSET', 0, 0, '/');\n\t\t\t$this->redirect(str_replace('&key=import', '', $this->Environment->request));\n\t\t}\n\t\t\n\t\t$this->loadLanguageFile('tl_news_recipients');\n\n\t\t$objTree = new FileTree($this->prepareForWidget($GLOBALS['TL_DCA']['tl_news_recipients']['fields']['source'], 'source', null, 'source', 'tl_news_recipients'));\n\n\t\t// Return form\n\t\treturn '\n<div id=\"tl_buttons\">\n<a href=\"'.ampersand(str_replace('&key=import', '', $this->Environment->request)).'\" class=\"header_back\" title=\"'.specialchars($GLOBALS['TL_LANG']['MSC']['backBT']).'\">'.$GLOBALS['TL_LANG']['MSC']['backBT'].'</a>\n</div>\n\n<h2 class=\"sub_headline\">'.$GLOBALS['TL_LANG']['tl_news_recipients']['import'][1].'</h2>'.$this->getMessages().'\n\n<form action=\"'.ampersand($this->Environment->request, ENCODE_AMPERSANDS).'\" id=\"tl_recipients_import\" class=\"tl_form\" method=\"post\">\n<div class=\"tl_formbody_edit\">\n<input type=\"hidden\" name=\"FORM_SUBMIT\" value=\"tl_recipients_import\" />\n\n<div class=\"tl_tbox\">\n <h3><label for=\"separator\">'.$GLOBALS['TL_LANG']['MSC']['separator'][0].'</label></h3>\n <select name=\"separator\" id=\"separator\" class=\"tl_select\" onfocus=\"Backend.getScrollOffset();\">\n <option value=\"comma\">'.$GLOBALS['TL_LANG']['MSC']['comma'].'</option>\n <option value=\"semicolon\">'.$GLOBALS['TL_LANG']['MSC']['semicolon'].'</option>\n <option value=\"tabulator\">'.$GLOBALS['TL_LANG']['MSC']['tabulator'].'</option>\n <option value=\"linebreak\">'.$GLOBALS['TL_LANG']['MSC']['linebreak'].'</option>\n </select>'.(strlen($GLOBALS['TL_LANG']['MSC']['separator'][1]) ? '\n <p class=\"tl_help\">'.$GLOBALS['TL_LANG']['MSC']['separator'][1].'</p>' : '').'\n <h3><label for=\"source\">'.$GLOBALS['TL_LANG']['tl_news_recipients']['source'][0].'</label></h3>\n'.$objTree->generate().(strlen($GLOBALS['TL_LANG']['tl_news_recipients']['source'][1]) ? '\n <p class=\"tl_help\">'.$GLOBALS['TL_LANG']['tl_news_recipients']['source'][1].'</p>' : '').'\n</div>\n\n</div>\n\n<div class=\"tl_formbody_submit\">\n\n<div class=\"tl_submit_container\">\n<input type=\"submit\" name=\"save\" id=\"save\" class=\"tl_submit\" alt=\"import style sheet\" accesskey=\"s\" value=\"'.specialchars($GLOBALS['TL_LANG']['tl_news_recipients']['import'][0]).'\" /> \n</div>\n\n</div>\n</form>';\n\t}" ]
[ "0.62424624", "0.6029034", "0.59633404", "0.59594804", "0.5876986", "0.5787689", "0.5765268", "0.57298326", "0.5699732", "0.56401414", "0.55967236", "0.55508584", "0.5542988", "0.5519767", "0.55029315", "0.5493858", "0.5437589", "0.54101896", "0.5395796", "0.5387547", "0.53839856", "0.5318604", "0.52977145", "0.5283052", "0.52824074", "0.5281162", "0.5265169", "0.52396417", "0.5227859", "0.5218026", "0.5213022", "0.5211913", "0.5189875", "0.5167163", "0.51608115", "0.515624", "0.5151741", "0.5137479", "0.5128204", "0.5126624", "0.51096445", "0.51072216", "0.51048625", "0.5092346", "0.5084417", "0.50792396", "0.50633794", "0.50633794", "0.5058178", "0.5051449", "0.5049375", "0.50468856", "0.5042433", "0.5041396", "0.5025504", "0.50222087", "0.50139403", "0.501323", "0.50071675", "0.50056744", "0.500492", "0.49965093", "0.4991192", "0.49828148", "0.49822116", "0.49816722", "0.49772695", "0.49721858", "0.4972009", "0.49420553", "0.49392638", "0.49392626", "0.4937641", "0.49360827", "0.49356446", "0.49153382", "0.4914381", "0.49019885", "0.4900654", "0.4896931", "0.48884532", "0.48876753", "0.48866552", "0.48852083", "0.48731723", "0.4867664", "0.48650157", "0.48635885", "0.48588598", "0.48579147", "0.485189", "0.48450118", "0.48411942", "0.48400742", "0.4838709", "0.48337117", "0.4828558", "0.4824785", "0.4823812", "0.48232934" ]
0.4944313
69
Delete a transfer recipient (sets the transfer recipient to inactive)
public function delete(string $id_or_code): array { return $this->client->delete("transferrecipient/{$id_or_code}"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleting(ContactRecipient $contact_recipient)\n {\n //\n }", "public function deleteRecipient(\\Lelesys\\Plugin\\Newsletter\\Domain\\Model\\Recipient\\Person $person) {\n\t\t$this->newsletterService->deleteRelatedRecipients($person);\n\t\tif (is_subclass_of($person, '\\Lelesys\\Plugin\\Newsletter\\Domain\\Model\\Recipient\\Person') === TRUE) {\n\t\t\t$person->setSubscribedToNewsletter(FALSE);\n\t\t\t$this->update($person);\n\t\t} else {\n\t\t\t$this->delete($person);\n\t\t}\n\n\t\t$this->persistenceManager->persistAll();\n\t}", "protected function removeRecipient()\n\t{\n\t\t$arrChannels = $this->Input->post('channels');\n\n\t\t// Check selection\n\t\tif (!is_array($arrChannels) || count($arrChannels) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['noChannels'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// Validate e-mail address\n\t\tif (!preg_match('/^\\w+([!#\\$%&\\'\\*\\+\\-\\/=\\?^_`\\.\\{\\|\\}~]*\\w+)*@\\w+([_\\.-]*\\w+)*\\.[a-z]{2,6}$/i', $this->Input->post('email', true)))\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['email'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t$arrSubscriptions = array();\n\n\t\t// Get active subscriptions\n\t\t$objSubscription = $this->Database->prepare(\"SELECT pid FROM tl_newsletter_recipients WHERE email=? AND active=?\")\n\t\t\t\t\t\t\t\t\t\t ->execute($this->Input->post('email', true), 1);\n\n\t\tif ($objSubscription->numRows)\n\t\t{\n\t\t\t$arrSubscriptions = $objSubscription->fetchEach('pid');\n\t\t}\n\n\t\t$arrRemove = array_intersect($arrChannels, $arrSubscriptions);\n\n\t\t// Return if there are no subscriptions to remove\n\t\tif (!is_array($arrRemove) || count($arrRemove) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['unsubscribed'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// Remove subscriptions\n\t\t$this->Database->prepare(\"DELETE FROM tl_newsletter_recipients WHERE email=? AND pid IN(\" . implode(',', $arrRemove) . \")\")\n\t\t\t\t\t ->execute($this->Input->post('email', true));\n\t\t\t\t\t \n\t\t// Remove member\n\t\t$arrRetain = array_diff($arrSubscriptions, $arrChannels);\n\t\tif (count($arrRetain))\n\t\t{\n\t\t\t$this->Database->prepare(\"UPDATE tl_member SET newsletter=? WHERE email=?\")->execute(serialize($arrRetain), $this->Input->post('email'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Delete only if member groups match\n\t\t\t$this->Database->prepare(\"DELETE FROM tl_member WHERE email=? AND groups=?\")->execute($this->Input->post('email'), $this->reg_groups);\n\t\t}\n\n\t\t// Confirmation e-mail\n\t\t$objEmail = new Email();\n\n\t\t// Get channels\n\t\t$objChannel = $this->Database->execute(\"SELECT title FROM tl_newsletter_channel WHERE id IN(\" . implode(',', $arrChannels) . \")\");\n\t\t\n\t\t// HOOK: post unsubscribe callback\n\t\tif (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && is_array($GLOBALS['TL_HOOKS']['removeRecipient']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->$callback[0]->$callback[1]($this->Input->post('email', true), $arrRemove, $objChannel->fetchEach('title'));\n\t\t\t}\n\t\t}\n\n\t\t$strText = str_replace('##domain##', $this->Environment->host, $this->nl_unsubscribe);\n\t\t$strText = str_replace(array('##channel##', '##channels##'), implode(\"\\n\", $objChannel->fetchEach('title')), $strText);\n\n\t\t$objEmail->from = $GLOBALS['TL_ADMIN_EMAIL'];\n\t\t$objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], $this->Environment->host);\n\t\t$objEmail->text = $strText;\n\n\t\t$objEmail->sendTo($this->Input->post('email', true));\n\t\tglobal $objPage;\n\n\t\t// Redirect to jumpTo page\n\t\tif (strlen($this->jumpTo) && $this->jumpTo != $objPage->id)\n\t\t{\n\t\t\t$objNextPage = $this->Database->prepare(\"SELECT id, alias FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($this->jumpTo);\n\n\t\t\tif ($objNextPage->numRows)\n\t\t\t{\n\t\t\t\t$this->redirect($this->generateFrontendUrl($objNextPage->fetchAssoc()));\n\t\t\t}\n\t\t}\n\n\t\t$_SESSION['UNSUBSCRIBE_CONFIRM'] = $GLOBALS['TL_LANG']['MSC']['nl_removed'];\n\t\t$this->reload();\n\t}", "public function delete($sender) {\n\t\t$delete = ($sender ? \"r\" : \"s\") . \"_delete=1\";\n\t\t$statement = Registry::get(\"database\") -> query(\"UPDATE messages SET \" . $delete . \" WHERE id=?\");\n\t\t$statement -> bindParam(1, \t$this -> getId());\n\t\t$statement -> execute();\n\t}", "public function isRecipientDelete() {\n\t\treturn $this -> data['r_delete'];\n\t}", "public function destroy(TransferAmount $transferAmount)\n {\n //\n }", "public function delete_delete(){\n $response = $this->PersonM->delete_person(\n $this->delete('id')\n );\n $this->response($response);\n }", "protected function removeRecipient()\n\t{\n\t\t$arrChannels = $this->Input->post('channels');\n\t\t$arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240\n\n\t\t// Check the selection\n\t\tif (!is_array($arrChannels) || count($arrChannels) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['noChannels'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t$arrSubscriptions = array();\n\t\t\n\t\t$email = \\Idna::encodeEmail($this->Input->post('email', true));\n\t\t\n\t\t$subscriber = new Subscriber($email);\n\n\t\t// Get active subscriptions\n\t\t$objSubscription = $this->Database->prepare(\"SELECT pid FROM tl_newsletter_recipients WHERE email=? AND active=1\")\n\t\t\t\t\t\t\t\t\t\t ->execute($email);\n\n\t\tif ($objSubscription->numRows)\n\t\t{\n\t\t\t$arrSubscriptions = $objSubscription->fetchEach('pid');\n\t\t}\n\n\t\t$arrRemove = array_intersect($arrChannels, $arrSubscriptions);\n\n\t\t// Return if there are no subscriptions to remove\n\t\tif (!is_array($arrRemove) || count($arrRemove) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['unsubscribed'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// check for cleverreach support\n\t\t$objChannel = $this->Database->execute(\"SELECT id FROM tl_newsletter_channel WHERE cleverreach_active = 1 AND id IN(\" . implode(',', array_map('intval', $arrRemove)) . \")\");\n\n\t\t// TODO: multiple channel unsubscription\n\t\t$subscriber->getByChannel($arrRemove[0]);\n\n\t\t// Remove subscriptions\n\t\t$subscriber->remove($arrRemove);\n\t\t\n\t\t// optional Cleverreach Deletion\n\t\tif($objChannel->numRows > 0)\n\t\t{\n\t\t\t$subscriber->removeFromCR($objChannel->fetchEach('id'));\n\t\t}\n\n\t\t// Get channels\n\t\t$objChannels = $this->Database->execute(\"SELECT title FROM tl_newsletter_channel WHERE id IN(\" . implode(',', array_map('intval', $arrRemove)) . \")\");\n\t\t$arrChannels = $objChannels->fetchEach('title');\n\n\t\t// HOOK: post unsubscribe callback\n\t\tif (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && is_array($GLOBALS['TL_HOOKS']['removeRecipient']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->{$callback[0]}->{$callback[1]}($varInput, $arrRemove);\n\t\t\t}\n\t\t}\n\n\t\tglobal $objPage;\n\n\t\t// Redirect to jumpTo page\n\t\tif (strlen($this->jumpTo) && $this->jumpTo != $objPage->id)\n\t\t{\n\t\t\t$objNextPage = $this->Database->prepare(\"SELECT id, alias FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($this->jumpTo);\n\n\t\t\tif ($objNextPage->numRows)\n\t\t\t{\n\t\t\t\t$this->redirect($this->generateFrontendUrl($objNextPage->fetchAssoc()));\n\t\t\t}\n\t\t}\n\n\t\tif($subscriber->sendUnSubscribeMail($arrRemove))\n\t\t{\n\t\t\t$this->reload();\n\t\t}\n\t}", "public function delete_received_message() {\n\n $this->db->query(\"DELETE FROM message_recipient WHERE message_id = ?\", array(\n $this->id\n ));\n\n return ($this->db->error()) ? false : true;\n }", "public function destroy(MessageRecipient $messageRecipient)\n {\n if($messageRecipient->complains()->count()) {\n return redirect()->route('messageRecipient.index')->with('failure', \"This message recipient list has multple complains assigned to it. First unassign them before procedding to deletion.\");\n }\n try {\n $messageRecipient->delete();\n return redirect()->route('messageRecipient.index')->with('status', 'SMS Recipient has been deleted.');\n } catch (\\Exception $exception) {\n return redirect()->route('messageRecipient.index')->with('error', \"SMS recipient deletion failed. Reason: \" . $exception->getMessage());\n }\n }", "public function deleted(TenderParticipant $tenderParticipant)\n {\n //\n }", "public function destroy(Transfer $transfer, $id)\n {\n //DB::table('transfers')->where('id','=',$id)->delete();\n $data = Transfer::find($id);\n $data->delete();\n return redirect()->route('admin_transfers');\n }", "function delete(){\n\t\t$sql = \"DELETE FROM `tours` WHERE `id`='\".addslashes($this->id).\"'\";\n\n\t\t$this->connection->send_query($sql);\n\t}", "function markAsDeletedRecipient($msgid, $forceDeletion = false)\n{\n\treturn \\dal\\messages\\markAsDeleted($msgid, 'recipient', $forceDeletion);\n}", "public function setRecipient($recipient)\n {\n $this->recipient = (string) $recipient;\n }", "public function deactivate(): void\n {\n // Bail early if no recipients are set.\n if (empty($this->recipients)) {\n return;\n }\n\n if ($this->settings[Settings::PLUGIN_DEACTIVATED]) {\n $subject = __('BC Security deactivated', 'bc-security');\n\n $user = wp_get_current_user();\n if ($user->ID) {\n // Name the bastard that turned us off!\n $message = \\sprintf(\n __('User \"%s\" had just deactivated BC Security plugin on your website!', 'bc-security'),\n $user->user_login\n );\n } else {\n // No user means plugin has been probably deactivated via WP-CLI.\n // See: https://github.com/chesio/bc-security/issues/16#issuecomment-321541102\n $message = __('BC Security plugin on your website has been deactivated!', 'bc-security');\n }\n\n $this->notify($subject, $message);\n }\n }", "public function actionUserdelete()\n {\n $timeLimit = time() - 0;\n $deactivateRequests = DeactivateAccount::find()->where(['processingDate' => null])->andWhere('creationDate < '.$timeLimit)->all();\n\n foreach ($deactivateRequests as $request)\n {\n $user = $request->user;\n\n if ($user->last_login <= $request->creationDate+3)\n {\n $user->setScenario('status');\n $user->status = User::STATUS_DELETED;\n $user->save();\n\n Campaign::updateAll(['status' => Campaign::STATUS_DELETED], 'userId = :userId', [':userId' => $user->id]);\n }\n\n $request->setScenario('processing');\n $request->processingDate = time();\n $request->save();\n }\n }", "public function delete($transport_id) {\n\t\t$this->db->where ( 'transport_id', $transport_id );\n\t\t$this->db->trans_begin ();\n\t\t$this->db->delete ( self::TABLE_NAME );\n\t\t$logs = new Logs ( );\n\t\t$mywhere = 'where transport_id = ' . $transport_id;\n\t\t$myquery = $logs->sqldelete ( self::TABLE_NAME, $mywhere );\n\t\t$logs->write ( self::TABLE_NAME, 'DELETE', $myquery );\n\t\t\n\t\tif ($this->db->trans_status () === FALSE) {\n\t\t\t$this->db->trans_rollback ();\n\t\t} else {\n\t\t\t$this->db->trans_commit ();\n\t\t}\n\t\t\n\t}", "public function action_personDelete() {\r\n if ($this->validateEdit()) {\r\n\r\n try {\r\n // 2. usunięcie rekordu\r\n App::getDB()->delete(\"person\", [\r\n \"id\" => $this->form->id\r\n ]);\r\n Utils::addInfoMessage('Pomyślnie usunięto rekord');\r\n } catch (\\PDOException $e) {\r\n Utils::addErrorMessage('Wystąpił błąd podczas usuwania rekordu');\r\n if (App::getConf()->debug)\r\n Utils::addErrorMessage($e->getMessage());\r\n }\r\n }\r\n\r\n // 3. Przekierowanie na stronę listy osób\r\n App::getRouter()->forwardTo('personList');\r\n }", "public function deleteSubscriptions($id_person) {\n $this->db->where('ID_PERSON', $id_person);\n $this->db->delete($this->table);\n if ($this->db->affected_rows() > 0) {\n return true;\n }else{\n return false;\n }\n}", "public function recipient($recipient)\n {\n return $this->setProperty('recipient', $recipient);\n }", "public function unsubscribe($delete = FALSE);", "function delete($id) {\n $this->message = ORM::factory('message', $id);\n if ( ! $this->message->loaded)\n Event::run('system.404');\n if ( ! $this->message->is_allowed($this->user->id))\n Event::run('system.403');\n \n $this->message->delete($this->user->id);\n url::redirect('messages');\n }", "function deleteDestination($db, $id) {\n $query = $db->prepare(\"Select idUser From destination Where id = ?\");\n $query->execute(array($id));\n $row = $query->fetch();\n if (!$row) {\n return false;\n }\n $targetID = $row['idUser'];\n\n // Check if the original poster is the current user\n if ($_SESSION['userID'] === $targetID) {\n $query = $db->prepare(\"Delete From destination Where id = ?\");\n $query->execute(array($id));\n return $query !== false;\n }\n\n return false;\n}", "public function mpp_delete_subscriber(){\n $response = array();\n $response['success'] = false;\n $response['message'] = __( 'Error: Unable to delete subscriber.', 'masterpopups' );\n\n if( ! $this->is_valid_nonce( 'xbox_ajax_nonce' ) ){\n die();\n }\n\n if( ! isset( $_POST['email'] ) || ! isset( $_POST['audience_id'] ) ){\n wp_send_json( $response );\n }\n $audience = get_post( $_POST['audience_id'] );\n if( $audience ){\n $email = $_POST['email'];\n $subscribers = (array) get_post_meta( $audience->ID, 'mpp_subscribers', true );\n if( isset( $subscribers[$email] ) ){\n unset( $subscribers[$email] );\n update_post_meta( $audience->ID, 'mpp_subscribers', $subscribers );\n $total_subscribers = (int) get_post_meta( $audience->ID, 'mpp_total-subscribers', true );\n update_post_meta( $audience->ID, 'mpp_total-subscribers', --$total_subscribers );\n $response['success'] = true;\n $response['message'] = __( 'Subscriber successfully deleted.', 'masterpopups' );\n $response['total'] = $total_subscribers;\n }\n }\n wp_send_json( $response );\n }", "public function actionDeletemsg(){\n $user_id = \\Yii::$app->user->getID();\n $user = User::findIdentity($user_id);\n $result = true;\n if(isset($_GET['id'])){\n $id = (int) $_GET['id'];\n foreach (Message::find()->where('thread_id = ' . $id . ' AND (from_user = ' . $user_id . ' OR to_user = ' . $user_id . ') AND status != 0')->each() as $message) {\n if($message->status == 1){\n $message->status = $user_id;\n }else{\n $message->status = 0;\n }\n if($message->save()){\n $result = $result || true;\n }\n }\n if($result){\n echo \"true\";\n }else{\n echo \"false\";\n }\n }\n }", "public function delete(User $actor, Permission $permission)\n {\n // Only remove permission by programmer\n return false;\n }", "public function deleteCompanyUser(CompanyUserTransfer $companyUserTransfer): CompanyUserResponseTransfer;", "public function action_delete() {\n\t\t$id = $this->request->param('id');\n\t\tif($id) {\n\t\t\t$message = ORM::factory('Message', $id);\n\t\t\tif($message->loaded()) {\n\t\t\t\ttry {\n\t\t\t\t\t$message->delete();\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t$this->_set_msg('Could not delete message because another user is tied to it', 'error');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->redirect($this->request->referrer());\n\t\t}\n\t\t$this->_set_content('message_delete');\n\t}", "public function unsetAdditionalRecipients(): void\n {\n $this->additionalRecipients = [];\n }", "public function deleteEntityGrant($entityId, $recipientEntityId, $userId = NULL)\n {\n return $this->start()->uri(\"/api/entity\")\n ->urlSegment($entityId)\n ->urlSegment(\"grant\")\n ->urlParameter(\"recipientEntityId\", $recipientEntityId)\n ->urlParameter(\"userId\", $userId)\n ->delete()\n ->go();\n }", "function undoLastRecipient($id_email, $param) {\n if ($param == 'to') {\n $id_recipient = getMaxIdRecipient($id_email, $param);\n if ($id_recipient != null) {\n if ($this->connectToMySql()) {\n $query = sprintf(\"DELETE FROM scuola.email_recipients\n WHERE id_email = %s\n AND to_recipient = '1'\n AND id_recipient = %s\", $id_email, $id_recipient);\n\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }\n }\n $this->closeConnection();\n return $result;\n }\n } elseif ($param == 'cc') {\n $id_recipient = getMaxIdRecipient($id_email, $param);\n if ($id_recipient != null) {\n if ($this->connectToMySql()) {\n $query = sprintf(\"DELETE FROM scuola.email_recipients\n WHERE id_email = %s\n AND cc_recipient = '1'\n AND id_recipient = %s\", $id_email, $id_recipient);\n\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }\n }\n $this->closeConnection();\n return $result;\n }\n } elseif ($param == 'bcc') {\n $id_recipient = getMaxIdRecipient($id_email, $param);\n if ($id_recipient != null) {\n if ($this->connectToMySql()) {\n $query = sprintf(\"DELETE FROM scuola.email_recipients\n WHERE id_email = %s\n AND bcc_recipient = '1'\n AND id_recipient = %s\", $id_email, $id_recipient);\n\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }\n }\n $this->closeConnection();\n return $result;\n }\n } else\n return false;\n }", "public function deleteCampaignRecipient($id)\n {\n\n $appStage = app_config('AppStage');\n if ($appStage == 'Demo') {\n return redirect('user/sms/campaign-reports')->with([\n 'message' => language_data('This Option is Disable In Demo Mode'),\n 'message_important' => true\n ]);\n }\n\n $recipient = CampaignSubscriptionList::find($id);\n if ($recipient) {\n $campaign = Campaigns::where('campaign_id', $recipient->campaign_id)->where('user_id', Auth::guard('client')->user()->id)->first();\n if ($campaign) {\n\n $msg_type = $campaign->sms_type;\n\n if ($recipient->status == 'queued') {\n\n $phone = $recipient->number;\n $c_phone = PhoneNumber::get_code($phone);\n\n $sms_cost = IntCountryCodes::where('country_code', $c_phone)->where('active', '1')->first();\n if ($sms_cost) {\n $phoneUtil = PhoneNumberUtil::getInstance();\n $phoneNumberObject = $phoneUtil->parse('+' . $phone, null);\n $area_code_exist = $phoneUtil->getLengthOfGeographicalAreaCode($phoneNumberObject);\n\n if ($area_code_exist) {\n $format = $phoneUtil->format($phoneNumberObject, PhoneNumberFormat::INTERNATIONAL);\n $get_format_data = explode(\" \", $format);\n $operator_settings = explode('-', $get_format_data[1])[0];\n\n } else {\n $carrierMapper = PhoneNumberToCarrierMapper::getInstance();\n $operator_settings = $carrierMapper->getNameForNumber($phoneNumberObject, 'en');\n }\n\n $get_operator = Operator::where('operator_setting', $operator_settings)->where('coverage_id', $sms_cost->id)->first();\n if ($get_operator) {\n\n $sms_charge = $get_operator->plain_price;\n\n if ($msg_type == 'plain' || $msg_type == 'unicode' || $msg_type == 'arabic') {\n $sms_charge = $get_operator->plain_price;\n }\n\n if ($msg_type == 'voice') {\n $sms_charge = $get_operator->voice_price;\n }\n\n if ($msg_type == 'mms') {\n $sms_charge = $get_operator->mms_price;\n }\n\n\n } else {\n $sms_charge = $sms_cost->plain_tariff;\n\n if ($msg_type == 'plain' || $msg_type == 'unicode' || $msg_type == 'arabic') {\n $sms_charge = $sms_cost->plain_tariff;\n }\n\n if ($msg_type == 'voice') {\n $sms_charge = $sms_cost->voice_tariff;\n }\n\n if ($msg_type == 'mms') {\n $sms_charge = $sms_cost->mms_tariff;\n }\n }\n\n $cost = $sms_charge * $recipient->amount;\n\n $client = Client::find(Auth::guard('client')->user()->id);\n $client->sms_limit += $cost;\n $client->save();\n }\n }\n\n\n $campaign->total_recipient -= 1;\n $campaign->save();\n\n $recipient->delete();\n return redirect('user/sms/manage-campaign/' . $campaign->id)->with([\n 'message' => 'Recipient deleted successfully'\n ]);\n }\n return redirect('user/sms/campaign-reports')->with([\n 'message' => 'Campaign info not found',\n 'message_important' => true\n ]);\n }\n return redirect('user/sms/campaign-reports')->with([\n 'message' => 'Recipient info not found',\n 'message_important' => true\n ]);\n }", "public function delete()\n\t{\n\t\t$user = $this->session->get('user');\n\t\t$contributor_id = $user['id'];\n\t\t//$username = $userdata[0]['name'];\n\t\t//api request to delete account\n\t\t$json_result = Model_Contributors::delete_contributor(\"\", $contributor_id);\n\t\t$result = json_decode($json_result['http_status'], true);\n\t\t\n\t\tif($result == 204)\n\t\t{\n\t\t\tself::logout(true);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function destroy(Person $person)\n {\n $person->delete();\n\n return redirect('/users/' . $person->user_id)->with('success','Los datos personales de este usuario se ha eliminado correctamente');\n }", "public function delete($idPersonas);", "public function delete($receiving_id)\r\n\t{\r\n\t\t$this->db->trans_start();\r\n\t\t\r\n\t\t$this->db->delete($this->dbprefix.'s'.'_payments', array($this->dbprefix.'_id' => $receiving_id)); \r\n\t\t$this->db->delete($this->dbprefix.'s'.'_items_taxes', array($this->dbprefix.'_id' => $receiving_id)); \r\n\t\t$this->db->delete($this->dbprefix.'s'.'_items', array($this->dbprefix.'_id' => $receiving_id)); \r\n\t\t$this->db->delete($this->dbprefix.'s', array($this->dbprefix.'_id' => $receiving_id)); \r\n\t\t\r\n\t\t$this->db->trans_complete();\r\n\t\t\t\t\r\n\t\treturn $this->db->trans_status();\r\n\t}", "function delete_person($person_id)\n {\n return $this->db->delete('person',array('person_id'=>$person_id));\n }", "public function delete()\n {\n $table = $this->getTable();\n $where = $table->getAdapter()->quoteInto('subscriber_id = ?', $this->_subscriberId);\n $result = $table->delete($where);\n return $result;\n }", "function DeleteDepartment($TransferTo=null){\n\t\tif(!$this->GetDeptByID()){\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get people and objects that still belong to this department\n\t\t$dev=new Device();\n\t\t$cab=new Cabinet();\n\t\t$dev->Owner=$cab->AssignedTo=$this->DeptID;\n\t\t$person=new People();\n\t\t$devices=$dev->GetDevicesbyOwner();\n\t\t$cabinets=$cab->GetCabinetsByDept();\n\t\t$users=$person->GetPeopleByDepartment($this->DeptID);\n\n\t\tforeach($devices as $d){\n\t\t\t// We've designated a new owner for this equipment, zero is valid as they might be setting it to general\n\t\t\tif(!is_null($TransferTo)){\n\t\t\t\t$d->Owner=$TransferTo;\n\t\t\t\t$d->UpdateDevice();\n\t\t\t}else{\n\t\t\t\t// This option is not being provided but us at this time, maybe through the API\n\t\t\t\t$d->DeleteDevice();\n\t\t\t}\n\t\t}\n\n\t\tforeach($cabinets as $c){\n\t\t\t// We've designated a new owner for these cabinets, zero is valid as they might be setting it to general\n\t\t\tif(!is_null($TransferTo)){\n\t\t\t\t$c->AssignedTo=$TransferTo;\n\t\t\t\t$c->UpdateCabinet();\n\t\t\t}else{\n\t\t\t\t// This option is not being provided but us at this time, maybe through the API\n\t\t\t\t$c->DeleteCabinet();\n\t\t\t}\n\t\t}\n\n\t\tforeach($users as $p){\n\t\t\t// If we don't have a value over 0 then we're just removing this department and they won't be added to another group\n\t\t\tif(!is_null($TransferTo) && intval($TransferTo)>0){\n\t\t\t\t// Add this user into the new department\n\t\t\t\t$sql=\"INSERT INTO fac_DeptContacts SET DeptID=\".intval($TransferTo).\", ContactID=$p->PersonID;\";\n\t \t\t\t$this->exec($sql);\n\t\t\t}\n\t\t}\n\t\n\t\t// Clear any users from this department\n\t\t$sql=\"DELETE FROM fac_DeptContacts WHERE DeptID=$this->DeptID;\";\n\t\t$this->exec($sql);\n\n\t\t// By this point all devices, objects, and users should have been shoved into a new department so finish cleaning up.\n\t\t$sql=\"DELETE FROM fac_Department WHERE DeptID=$this->DeptID;\";\n\n\t\tif(!$this->exec($sql)){\n\t\t\tglobal $dbh;\n\t\t\t$info=$dbh->errorInfo();\n\n\t\t\terror_log(\"PDO Error: {$info[2]} SQL=$sql\");\n\t\t\treturn false;\n\t\t}\n\n\t\t(class_exists('LogActions'))?LogActions::LogThis($this):'';\n\t\treturn true;\n\t}", "public function destroy(DeliveryExecutive $deliveryExecutive,$id)\n {\n DeliveryExecutive::where('id',$id)->update(array('isDeleted'=>1));\n return redirect('executives')->withSuccess('Delivery Details Deleted Successfully.');\n }", "public function removeParticipant(AbstractConversationEntity $conversation, MessageUserInterface $participant);", "public function destroy(SmsRecipient $smsRecipient)\n {\n try {\n $smsRecipient->delete();\n } catch (\\Exception $e) {\n return redirect()->back()->with('failure', \"Deletion of $smsRecipient->name failed. Reason: \" . $e->getMessage());\n }\n return redirect()->route('smsRecipient.index')->with('status', \"SMS recipient $smsRecipient->name has been deleted.\");\n }", "function private_messages_delete( int $message_id ) : mixed\n{\n // Require users to be logged in to run this action\n user_restrict_to_users();\n\n // Sanitize the data\n $user_id = sanitize(user_get_id(), 'int', 1);\n $message_id = sanitize($message_id, 'int', 0);\n $timestamp = time();\n\n // Error: Message ID not found\n if(!database_row_exists('users_private_messages', $message_id))\n return __('users_message_not_found');\n\n // Fetch some data regarding the message\n $dmessage = mysqli_fetch_array(query(\" SELECT users_private_messages.deleted_by_recipient AS 'pm_deleted_r' ,\n users_private_messages.deleted_by_sender AS 'pm_deleted_s' ,\n users_private_messages.fk_users_recipient AS 'pm_recipient' ,\n users_private_messages.fk_users_sender AS 'pm_sender'\n FROM users_private_messages\n WHERE users_private_messages.id = '$message_id' \"));\n\n // Determine whether user is sender or recipient\n $user_is_sender = ((int)$dmessage['pm_sender'] === $user_id);\n\n // Error: Message is already deleted\n if(($user_is_sender && $dmessage['pm_deleted_s']) || (!$user_is_sender && $dmessage['pm_deleted_r']))\n return __('users_message_predeleted');\n\n // Error: Message does not belong to user\n if((int)$dmessage['pm_recipient'] !== $user_id && (int)$dmessage['pm_sender'] !== $user_id)\n return __('users_message_ownership');\n\n // If both sender and recipient deleted the message, or if the message is sent to self, hard delete it\n if((!$user_is_sender && $dmessage['pm_deleted_s']) || ($user_is_sender && $dmessage['pm_deleted_r']) || ((int)$dmessage['pm_recipient'] === (int)$dmessage['pm_sender']))\n query(\" DELETE FROM users_private_messages\n WHERE users_private_messages.id = '$message_id' \");\n\n // Otherwise soft delete it\n else if($user_is_sender)\n query(\" UPDATE users_private_messages\n SET users_private_messages.deleted_by_sender = 1\n WHERE users_private_messages.id = '$message_id' \");\n else\n query(\" UPDATE users_private_messages\n SET users_private_messages.deleted_by_recipient = 1 ,\n users_private_messages.read_at = '$timestamp'\n WHERE users_private_messages.id = '$message_id' \");\n\n // All went well, return NULL\n return NULL;\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}", "public function delete( $msgNum )\r\n {\r\n if ( $this->state != self::STATE_TRANSACTION )\r\n {\r\n throw new ezcMailTransportException( \"Can't call delete() on the POP3 transport when not successfully logged in.\" );\r\n }\r\n\r\n $this->connection->sendData( \"DELE {$msgNum}\" );\r\n $response = $this->connection->getLine();\r\n\r\n if ( !$this->isPositiveResponse( $response ) )\r\n {\r\n throw new ezcMailTransportException( \"The POP3 server could not delete the message: {$response}.\" );\r\n }\r\n }", "public function deleted(HoldAmount $holdAmount)\n {\n //\n }", "function delete($id=null) {\n\t\t\t\t\t$id=base64_decode($id);\n\t\t\t\t\t\n\t\t\t\t\t$this->SentBox->id = (int)$id;\n\t\t\t\t\t\n\t\t\t\t\t$this->SentBox->delete($id);\n\t\t\t\t\t\n\t\t\t\t\t//$this->Session->setFlash('The Sent item with id: '.$id.' from SentBox has been Deleted Successfully!!');\n\t\t\t\t\t\n\t\t\t\t\t$this->redirect(array('action'=>'index'));\n\t}", "function messageDelete(Message $message);", "function delete($id) {\n // Pull the CO Person ID, we'll need it for the redirect\n $model = $this->modelClass;\n $coPersonId = $this->$model->field('co_person_id', array($this->modelClass.'.id' => $id));\n \n $this->setViewVars(null, $coPersonId);\n \n parent::delete($id);\n }", "public function restNewslettersRecipientsRecipientIdDelete($recipient_id)\n {\n list($response) = $this->restNewslettersRecipientsRecipientIdDeleteWithHttpInfo($recipient_id);\n return $response;\n }", "public function destroy($id)\n {\n $bill_receive = auth()->user()->bill_receives()->findOrFail($id); \n $bill_receive->delete();\n\n Session::flash('success', 'Conta a receber deletada com sucesso');\n\n return redirect()->back();\n }", "public function delete($actividades_fuera);", "public function deleteAction(){\r\n\t\t$this->getHelper('viewRenderer')->setNoRender();\r\n\t\t$this->_helper->layout->disableLayout();\t\r\n\t\t$id = $this->_getParam('id');\r\n\t\t//\"UPDATE `user` SET `active`=abs(`active`-1) WHERE user_id='$id'\";\r\n\t\t$sql =\"DELETE FROM `user` WHERE `user_id` = '\".$id.\"'\";\r\n\t\t//echo $sql;die();\r\n\t\t$del = Zend_Registry::get(\"db\")->query($sql);\r\n\t\t\r\n\t\tif($del){\r\n\t\t\t$this->_flashMessenger->addMessage('Selected record deleted');\r\n\t\t\t$this->_redirect('/admin/user/');\t\r\n\t\t}\r\n\t}", "public function actionDelete($id)\n\n {\n \n MailStore::findOne($id)->delete();\n return $this->redirect(['sending']);\n \n\n }", "public function dokan_remove_bookable_person() {\n $post_data = wp_unslash( $_POST ); // phpcs:ignore\n\n // @codingStandardsIgnoreLine\n if ( ! isset( $post_data['action'] ) && $post_data['action'] != 'woocommerce_remove_bookable_person' ) {\n return;\n }\n if ( ! wp_verify_nonce( $post_data['security'], 'delete-bookable-person' ) ) {\n return;\n }\n\n wp_delete_post( intval( $post_data['person_id'] ) );\n exit;\n }", "public function delete( $deactivate = TRUE )\n\t{\n\t\tif( $deactivate )\n\t\t{\n\t\t\t$sql = \"\n\t\t\tUPDATE common_Articles\n\t\t\tSET active = 0\n\t\t\tWHERE article_id = \" . $this->m_article_id;\n\t\t\t$this->m_common->m_db->query( $sql, __FILE__, __LINE__ );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql = \"\n\t\t\tDELETE\n\t\t\tFROM common_ArticleToSection\n\t\t\tWHERE article_to_view_id IN ( \n\t\t\t\tSELECT article_to_view_id\n\t\t\t\tFROM common_ArticleToView\n\t\t\t\tWHERE article_id = \" . $this->m_article_id . \"\n\t\t\t)\";\n\t\t\t$this->m_common->m_db->query( $sql, __FILE__, __LINE__ );\n\t\t\t\n\t\t\t$sql = \"\n\t\t\tDELETE\n\t\t\tFROM common_ArticleToView\n\t\t\tWHERE article_id = \" . $this->m_article_id;\n\t\t\t$this->m_common->m_db->query( $sql, __FILE__, __LINE__ );\n\t\t\t\n\t\t\t$sql = \"\n\t\t\tDELETE\n\t\t\tFROM common_Articles\n\t\t\tWHERE article_id = \" . $this->m_article_id;\n\t\t\t$this->m_common->m_db->query( $sql, __FILE__, __LINE__ );\t\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t\t\n\t}", "public function sendAccountDeletedEmail(User $user): void;", "public function delete($id, $options = [])\n {\n $params = [];\n\n $params['transaction'] = 'fail';\n\n if ($creditcard === 'success') {\n $params['transaction'] = 'success';\n }\n\n return $this->gateway->commit('post', 'recipients', $params);\n }", "public function destroy($id)\n {\n $delete = role_priviledge::getPriviledge(3);\n\n if($delete == \"1\")\n {\n $record = contactus::findOrFail($id);\n $record->delete();\n \n Flash::success('ontactus was deleted successfully.');\n return redirect()->route('managecontactus.index');\n }\n else\n {\n Flash::warning('You dont have permission delete contactus.');\n return redirect()->route('managecontactus.index');\n }\n }", "public function delete($id, array $actor = [])\n {\n $tier = array_get($actor, 'tier', 0);\n $this->model->lowerOrEqualTier($tier);\n return parent::delete($id, $actor);\n }", "public function delete() {\r\n $page = $this->api->getParam('page', '1');\r\n $this->model->id = $_REQUEST['id'];\r\n $this->checkOwner();\r\n $message = 'Cannot Be Deleted';\r\n if ($this->model->delete()) {\r\n $message = 'Deleted Successfully';\r\n }\r\n $this->api->redirect('contact/home?message=' . $message . '&page=' . $page);\r\n }", "public function destroy(Person $person)\n {\n //\n }", "public function destroy(Person $person)\n {\n //\n }", "public function deleteTask ($taskId) {\r\n\t\t$db = new DB();\r\n\t\t$db->connect();\r\n\t\t\r\n\t\t$taskId = $db->esc($taskId);\r\n\t\t\r\n\t\t$sql = \"UPDATE `task` SET `active`='0' WHERE `id`=\".$taskId;\r\n\t\t$db->query($sql);\r\n\t}", "public function invited_task_remove_people_post()\n {\n $id = $this->post('task_id');\n $user_id = $this->post('user_id');\n \n $array = array(\n 'is_removed' => 1\n );\n $this->db->where('taskId',$id);\n $this->db->where('user_id',$user_id);\n $this->db->update('invite_people',$array);\n \n $response = array('success'=>true,'message'=>'People Removed Successfully');\n echo json_encode($response);\n }", "function delete($teamID) {\n\n if (!$this->correct_permissions('admin')) {\n redirect(base_url() . 'admin/team');\n }\n\n $this->spletka_m->team_m->delete($teamID);\n redirect(base_url() . 'admin/team');\n }", "public function destroy($id,$user = NULL)\n\t{\n\t\t\n\t\t$redirectTo = ( $user ? 'admin/users/'.$user : 'admin/adresses' );\n\t\t\n\t\tif ($this->adresse->delete($id))\n\t\t{\t\t\t\n\t\t\treturn Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'Adresse supprimé') ); \t\t\n\t\t}\t\n\t\t\n\t\treturn Redirect::to('admin/adresses/'.$id)->with( array('status' => 'danger' , 'message' => 'Problème avec la suppression') ); \n \n\t}", "protected function restNewslettersRecipientsRecipientIdDeleteRequest($recipient_id)\n {\n // verify the required parameter 'recipient_id' is set\n if ($recipient_id === null || (is_array($recipient_id) && count($recipient_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $recipient_id when calling restNewslettersRecipientsRecipientIdDelete'\n );\n }\n\n $resourcePath = '/rest/newsletters/recipients/{recipientId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($recipient_id !== null) {\n $resourcePath = str_replace(\n '{' . 'recipientId' . '}',\n ObjectSerializer::toPathValue($recipient_id),\n $resourcePath\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 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function action_delegationDelete() {\r\n if ($this->validateEdit()) {\r\n\r\n try {\r\n // 2. usunięcie rekordu\r\n App::getDB()->delete(\"delegation\", [\r\n \"id\" => $this->form->id\r\n ]);\r\n Utils::addInfoMessage('Pomyślnie usunięto rekord');\r\n } catch (\\PDOException $e) {\r\n Utils::addErrorMessage('Wystąpił błąd podczas usuwania rekordu');\r\n if (App::getConf()->debug)\r\n Utils::addErrorMessage($e->getMessage());\r\n }\r\n }\r\n\r\n // 3. Przekierowanie na stronę listy osób\r\n App::getRouter()->forwardTo('delegationList');\r\n }", "function delete($email) {\n return $this->delete_request($this->_subscribers_base_route.'.json?email='.urlencode($email));\n }", "public function deleted(Translation $translation);", "public function delete( $deactivate = TRUE )\n\t{\n\t\tif( $deactivate )\n\t\t{\n\t\t\t$sql = \"\n\t\t\tUPDATE common_Settings\n\t\t\tSET active = 0\n\t\t\tWHERE setting_id = \" . $this->m_setting_id;\n\t\t\t$this->m_common->m_db->query( $sql, __FILE__, __LINE__ );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql = \"\n\t\t\tDELETE\n\t\t\tFROM common_Settings\n\t\t\tWHERE setting_id = \" . $this->m_setting_id;\n\t\t\t$this->m_common->m_db->query( $sql, __FILE__, __LINE__ );\t\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t\t\n\t}", "public function delete($sessionID, $audience);", "public function delete() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"UPDATE users SET state='DELETED' WHERE id = ?\");\n\t\t$stmt->execute(array($this->id));\n\t}", "public function delete()\n {\n $user = new Task();\n $attributes = $this->request->body();\n\n if( $user->setAttributes($attributes)->delete() ) {\n // return ['status' => 'success']; // for ajax\n header(\"Location: /task/index\");\n exit;\n }\n\n return ['status' => 'cannot delete'];\n }", "public function delete(User $user, PrivateStream $privateStream)\n {\n //\n }", "public function delete_sended_message() {\n // First we delete the message from recipient table\n $this->delete_received_message();\n // Then we detach or actually delete the whole message from message table\n $this->db->query(\"DELETE FROM `message` WHERE id = ?\", array(\n $this->id\n ));\n\n return ($this->db->error()) ? false : true;\n }", "public function deleteAction(){\n \n $req=$this->getRequest();\n $user=Doctrine::getTable('Users')->find($req->getParam('id')); \n\n // Gli utenti developer non possono essere eliminati \n if ($user->Role->developer){\n $this->errors->addError(\"L'utente Developer non pu&ograve; essere cancellato.\");\n $this->emitSaveData();\n return;\n }\n \n $q=Doctrine_Query::create()\n ->delete()\n ->from('Users')\n ->addWhere('ID = ?',$this->getRequest()->getParam('id'))\n ->execute();\n \n $this->emitJson(array(\"success\"=>true));\n }", "public function eliminarCorreo(){\n\t\t$session = $this->session->userdata['logged_in'];\n\n\t\tif($session[\"is_loged\"] == true){\n\t\t$id = $session['user_id'];\n\t\t$cid = $_REQUEST['cid'];\n\n\t\t$this->load->model('model_correo','correo');\n\t\t$v = $this->correo->deleteEmail($cid,$id);\n\t\tif ($v == 1) {\n\t\t\t$urln = base_url().\"correo/vistaCorreo/\";\n\t\tredirect($urln);\n\t\t}else{\n\t\t\t$urln = base_url().\"correo/vistaCorreo/\";\n\t\tredirect($urln);\n\t\t}\n\t\t}else{\n\t\t\t$urln = base_url().\"user/loginUsuario\";\n\t\t\tredirect($urln);\n\t\t}\n\t}", "function delContact ($p) {\r\n\r\n\t// pre checks\r\n\tif (!isAdmin()) return false;\r\n\tif (!isset($p['user'])) return false;\r\n\tif (empty($p['user'])) return false;\r\n\r\n\t// security\r\n\t$userPrep = prepareDBValue($p['user']);\r\n\r\n\t// get contact id\r\n\t$dbResult = queryDB('select id from contacts where username=\\'' . $userPrep . '\\'');\r\n\tif (!isset($dbResult[0]['id'])) return false;\r\n\t$userID = $dbResult[0]['id'];\r\n\r\n\t// delete all notifications assigned to the posted contact\r\n\tqueryDB('delete from notifications_to_contacts where contact_id=\\'' . $userID . '\\'');\r\n\r\n\t// disable all notifications and change usernames of all notifications owned by this user\r\n\tqueryDB('update notifications set active=\\'0\\', username=\\'' . prepareDBValue('[' . $p['user'] . ']') . '\\' where username=\\'' . $userPrep . '\\'');\r\n\r\n\t// finally, delete the user\r\n\tqueryDB('delete from contacts where id=\\'' . $userID . '\\'');\r\n\r\n\treturn true;\r\n\r\n}", "public function destroy($person_id, $id)\n {\n $phone = $this->model->where(['person_id' => $person_id,'id' => $id])->first();\n $maskNumber = $phone->maskNumber;\n\n if( count($phone) != 1) return view('errors.404');\n\n if( $phone->delete() )\n session(['success' => \"o telefone [{$maskNumber}] foi removido com sucesso!\"]);\n else\n session(['error' => \"o telefone [{$maskNumber}] não foi removido!\"]);\n\n return redirect()->back();\n }", "public function deleteAction() {\r\n \t$id = intval($this->getInput('id'));\r\n \t$addressInfo = Gc_Service_UserAddress::getUserAddress($id);\r\n \t$webroot = Yaf_Application::app()->getConfig()->webroot;\n \tif (!$addressInfo || $addressInfo['user_id'] != $this->userInfo['id']) {\n \t\t$this->redirect($webroot.'/user/index/index');\n \t}\r\n \t$ret = Gc_Service_UserAddress::deleteUserAddress($id);\r\n \tif (!$ret) $this->output(-1, '操作失败.');\r\n \t$this->output(0, '操作成功.');\r\n }", "protected function deleteUser()\n {\n $userId = $this->request->variable('user_id',0);\n\n if($userId === 0)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'Invalid data supplied',\n 'error' => ['User ID was not supplied']\n ]);\n }\n\n // Determine if this user is an administrator\n $arrUserData = $this->auth->obtain_user_data($userId);\n $this->auth->acl($arrUserData);\n $isAdmin = $this->auth->acl_get('a_');\n\n if($isAdmin)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'User was not deleted because they are an admin',\n 'error' => ['phpBB admin accounts cannot be automatically deleted. Please delete via ACP.']\n ]);\n }\n\n user_delete('remove', $userId);\n\n // Send success response\n $this->sendResponse([\n 'status' => 'success',\n 'message' => 'phpBB user was deleted',\n 'data' => [\n 'user_id' => $userId\n ]\n ]);\n }", "public function deleted(PersonaParcela $personaParcela)\n {\n //\n }", "public function deleteContact(EmailAddress $email);", "public function setIsDeletedByParticipant(ParticipantInterface $participant, bool $isDeleted): self;", "public function destroy($receive_id)\n {\n Purchase::where('id','=', $receive_id)->delete();\n return redirect('receive')->with('succes', 'Receive Voucher Delete Successfully !!');\n }", "function delete($model,$human_name,$send_to, $user = null) {\n\t\tif(empty($this->_data['id'])||$model->load($this->_data['id'])===false) {\n\t\t\tFlash::Instance()->addError('The '.$human_name.' you tried to delete doesn\\'t exist');\n\t\t\tcall_user_func_array('sendTo',$send_to);\n\t\t\treturn;\n\t\t}\n\t\tif(!is_null($user)) {\n\t\t\t$can_delete = $user->canDelete($model);\n\t\t}\n\t\telse {\n\t\t\t$can_delete = $model->canDelete();\n\t\t}\n\t\tif(!$can_delete) {\n\t\t\tFlash::Instance()->addError('You don\\'t have permission to delete that '.$human_name);\n\t\t\tcall_user_func_array('sendTo',$send_to);\n\t\t\treturn;\n\t\t}\n\t\t$success = $model->delete();\n\t\tif($success!==false) {\n\t\t\tFlash::Instance()->addMessage($human_name.' successfully deleted');\n\t\t\tcall_user_func_array('sendTo',$send_to);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tFlash::Instance()->addError('There was an error deleting that '.$human_name);\n\t\t\tcall_user_func_array('sendTo',$send_to);\n\t\t\treturn;\n\t\t}\n\t}", "function removePerson(){\n\t\t \n\t\t $this->getMakeMetadata();\n\t\t $changesMade = false;\n\t\t $requestParams = $this->requestParams;\n\t\t if(isset($requestParams[\"uri\"]) && isset($requestParams[\"role\"])){\n\t\t\t\t\n\t\t\t\t$personURI = $requestParams[\"uri\"];\n\t\t\t\tif($requestParams[\"role\"] == \"creator\"){\n\t\t\t\t\t $persons = $this->rawCreators;\n\t\t\t\t\t unset($persons[$personURI]);\n\t\t\t\t\t $this->rawCreators = $persons;\n\t\t\t\t\t $changesMade = true;\n\t\t\t\t}\n\t\t\t\telseif($requestParams[\"role\"] == \"contributor\"){\n\t\t\t\t\t $persons = $this->rawContributors;\n\t\t\t\t\t unset($persons[$personURI]);\n\t\t\t\t\t $this->rawContributors = $persons;\n\t\t\t\t\t $changesMade = true;\n\t\t\t\t}\n\t\t\t\telseif($requestParams[\"role\"] == \"person\"){\n\t\t\t\t\t $persons = $this->rawLinkedPersons;\n\t\t\t\t\t unset($persons[$personURI]);\n\t\t\t\t\t $this->rawLinkedPersons = $persons;\n\t\t\t\t\t $changesMade = true;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t if($changesMade){\n\t\t\t\t$this->saveMetadata(); //save the results\n\t\t }\n\t\t return $changesMade;\n\t }", "public function delete($participant) {\r\r\n\r\r\n $query = \"DELETE FROM participant WHERE id_participant = ?\";\r\r\n\r\r\n try {\r\r\n $this->pdo->beginTransaction(); // Start transaction\r\r\n $qresult = $this->pdo->prepare($query); \r\r\n $qresult->execute(array($participant->getIdParticipant()));\r\r\n $this->pdo->commit(); // If all goes well the transaction is validated\r\r\n\r\r\n // $this->pdo = NULL;\r\r\n return $qresult->rowCount(); // Returns the number of rows affected by the last SQL exec()\r\r\n }\r\r\n catch(Exception $e) // In case of error\r\r\n {\r\r\n // The transaction is cancelled\r\r\n $this->pdo->rollback();\r\r\n\r\r\n // An error message is displayed\r\r\n print 'Tout ne s\\'est pas bien passé, voir les erreurs ci-dessous<br />';\r\r\n print 'Erreur : '.$e->getMessage().'<br />';\r\r\n print 'N° : '.$e->getCode();\r\r\n\r\r\n // Execution of the code is stopped\r\r\n die();\r\r\n }\t\r\r\n }", "public function destroy(Person $person)\n\t{\n\t\t//\n\t}", "public function destroy($bunch_id , $subscriber_id)\n {\n Subscriber::find($subscriber_id)->delete();\n\n return redirect()->route('subscriber.index',[$bunch_id]);\n }", "public function deleteUser($email,$telefon=''){\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n if (isAdmin($_SESSION[\"jog\"])) {\n try{\n if ($this->userModel->deleteUserByAdmin($telefon) && $this->userModel->deleteUserByAdmin0($email) && $this->userModel->deleteFromUserCartItems($email)) { \n flash('deleted','A '.$email.' felhasználó törlése sikeres volt!','alert alert-success');\n redirect('admins/userHandler');\n }else{\n flash('deleted','A '.$email.' felhasználó törlése sikertelen volt sajnos!','alert alert-danger');\n redirect('admins/userHandler');\n }\n }catch(PDOException $ex){\n flash('deleted',$ex->getMessage(),'alert alert-danger');\n redirect('admins/userHandler');\n }finally{\n flash('deleted', 'Egyéb hiba történt');\n redirect('admins/userHandler');\n }\n }else{\n redirect('index');\n }\n }\n }", "public function actionUserDelete()\n {\n $id = (int) Yii::app()->request->getParam(\"id\", 0 );\n if( !empty($id) )\n {\n $model = SubscribeUsers::fetch( $id );\n if( $model->id > 0 )$model->delete();\n }\n\n $this->redirect( SiteHelper::createUrl(\"/console/subscribe/users\" ) );\n }", "public function destroy($id)\n {\n $delete = User::find($id);\n $delete->is_activated = 2;\n $delete->save();\n\n return redirect()->back()->with('success',\"Member berhasil dihapus\");\n }", "public function destroy($id)\n {\n $message = $this->messages->find($id);\n $user = Auth::User()->id;\n\n if($message->user_to == $user) {\n $data = ['delete_to' => true];\n } else {\n $data = ['delete_from' => true];\n }\n\n if ( $this->messages->update($id, $data) ) {\n return response()->json([\n 'success' => true,\n 'message' => trans('app.message_deleted')\n ]);\n } else {\n return response()->json([\n 'success'=> false,\n 'message' => trans('app.error_again')\n ]);\n }\n }", "public function delete($email);", "public function deleted(Credit $credit)\n {\n\n }", "public function setRecipient($value)\n {\n return $this->set('Recipient', $value);\n }" ]
[ "0.6719267", "0.6487515", "0.6038654", "0.59279084", "0.5845702", "0.5830954", "0.5799752", "0.5581462", "0.5516855", "0.5417442", "0.5401751", "0.5397136", "0.5383052", "0.5374554", "0.53668064", "0.5324922", "0.53167313", "0.5295747", "0.5276387", "0.52681714", "0.5263413", "0.5250236", "0.5234293", "0.5221201", "0.5219605", "0.5195108", "0.51908153", "0.5187169", "0.5167546", "0.5150802", "0.51492566", "0.5139284", "0.51379406", "0.51340145", "0.51242673", "0.51207495", "0.5115252", "0.5114317", "0.51135594", "0.5104176", "0.50771546", "0.50621825", "0.5056131", "0.50528234", "0.5046048", "0.5037792", "0.50227255", "0.5019726", "0.5009928", "0.5007071", "0.5002868", "0.5002588", "0.49999654", "0.49869648", "0.49854138", "0.49843627", "0.4983376", "0.4982653", "0.49752823", "0.49724314", "0.4971134", "0.49675938", "0.4962683", "0.4962683", "0.49622843", "0.49564022", "0.49471277", "0.49471107", "0.49427652", "0.4940743", "0.49388143", "0.4936998", "0.49345922", "0.49345514", "0.49266714", "0.49256667", "0.4925098", "0.4922013", "0.4919966", "0.49197868", "0.49183485", "0.49101073", "0.49063146", "0.4904199", "0.4900256", "0.4897532", "0.4885193", "0.48851115", "0.4882647", "0.48818684", "0.488146", "0.4879928", "0.48739347", "0.4872398", "0.48690826", "0.48679963", "0.48674762", "0.48668432", "0.48665214", "0.48651084" ]
0.543793
9
Register any application services.
public function register() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n { \n // User Repository\n $this->app->bind('App\\Contracts\\Repository\\User', 'App\\Repositories\\User');\n \n // JWT Token Repository\n $this->app->bind('App\\Contracts\\Repository\\JSONWebToken', 'App\\Repositories\\JSONWebToken');\n \n $this->registerClearSettleApiLogin();\n \n $this->registerClearSettleApiClients();\n \n \n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }", "public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }", "public function register()\n {\n $this->registerRepositories();\n }", "public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }", "public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register()\n {\n $this->registerGraphQL();\n\n $this->registerConsole();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/telescope-error-service-client.php', 'telescope-error-service-client'\n );\n\n $this->registerStorageDriver();\n\n $this->commands([\n Console\\InstallCommand::class,\n Console\\PublishCommand::class,\n ]);\n }", "public function register()\n\t{\n\t\t$this->registerPasswordBroker();\n\n\t\t$this->registerTokenRepository();\n\t}", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n // $this->app->make('CheckStructureService');\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}", "public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerInertia();\n $this->registerLengthAwarePaginator();\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->app->bind(\n 'Toyopecas\\Repositories\\TopoRepository',\n 'Toyopecas\\Repositories\\TopoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ServicesRepository',\n 'Toyopecas\\Repositories\\ServicesRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\SobreRepository',\n 'Toyopecas\\Repositories\\SobreRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ProdutosRepository',\n 'Toyopecas\\Repositories\\ProdutosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register()\n {\n $this->registerRepositories();\n\n $this->pushMiddleware();\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel-base.php', 'laravel-base');\r\n\r\n $this->app->bind(UuidGenerator::class, UuidGeneratorService::class);\r\n\r\n }", "public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n 'Uhmane\\Repositories\\ContatosRepository', \n 'Uhmane\\Repositories\\ContatosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }", "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }", "public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }", "public function register()\n {\n $this->registerAdapterFactory();\n $this->registerDigitalOceanFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->registerAliases();\n }", "public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\UsersInterface',\n 'App\\Services\\UsersService'\n );\n $this->app->bind(\n 'App\\Contracts\\CallsInterface',\n 'App\\Services\\CallsService'\n );\n $this->app->bind(\n 'App\\Contracts\\ContactsInterface',\n 'App\\Services\\ContactsService'\n );\n $this->app->bind(\n 'App\\Contracts\\EmailsInterface',\n 'App\\Services\\EmailsService'\n );\n $this->app->bind(\n 'App\\Contracts\\PhoneNumbersInterface',\n 'App\\Services\\PhoneNumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\NumbersInterface',\n 'App\\Services\\NumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserNumbersInterface',\n 'App\\Services\\UserNumbersService'\n );\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerFriendsLog();\n $this->registerNotifications();\n $this->registerAPI();\n $this->registerMailChimpIntegration();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/awesio-auth.php', 'awesio-auth');\n\n $this->app->singleton(AuthContract::class, Auth::class);\n\n $this->registerRepositories();\n\n $this->registerServices();\n\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerMigrator();\n $this->registerArtisanCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/services.php', 'services'\n );\n }", "public function register()\n {\n $this->registerRateLimiting();\n\n $this->registerHttpValidation();\n\n $this->registerHttpParsers();\n\n $this->registerResponseFactory();\n\n $this->registerMiddleware();\n }", "public function register()\n {\n $this->registerConfig();\n $this->registerView();\n $this->registerMessage();\n $this->registerMenu();\n $this->registerOutput();\n $this->registerCommands();\n require __DIR__ . '/Service/ServiceProvider.php';\n require __DIR__ . '/Service/RegisterRepoInterface.php';\n require __DIR__ . '/Service/ErrorHandling.php';\n $this->registerExportDompdf();\n $this->registerExtjs();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerParser();\n }", "public function register()\n {\n $this->registerOtherProviders()->registerAliases();\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'jarvisPlatform');\n $this->app->bind('jarvis.auth.provider', AppAuthenticationProvider::class);\n $this->loadRoutes();\n }", "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGuard();\n $this->registerBladeDirectives();\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register(Providers\\ManagerServiceProvider::class);\n $this->app->register(Providers\\ValidationServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(ReviewService::class, function ($app) {\n return new ReviewService();\n });\n }", "public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('gameService', 'App\\Service\\GameService');\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }", "public function register()\n {\n $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function($app){\n return new ElasticsearchNedvizhimostsObserver(new Client());\n });\n\n // $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function()\n // {\n // return new ElasticsearchNedvizhimostsObserver(new Client());\n // });\n }", "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGeography();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n\n $this->countriesCache();\n }", "public function register()\n {\n $this->app->bind(CertificationService::class, function($app){\n return new CertificationService();\n });\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n \n $this->app->bind(\"App\\\\Services\\\\ILoginService\",\"App\\\\Services\\\\LoginService\");\n \n $this->app->bind(\"App\\\\Repositories\\\\IItemRepository\",\"App\\\\Repositories\\\\ItemRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IOutletRepository\",\"App\\\\Repositories\\\\OutletRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IInventoryRepository\",\"App\\\\Repositories\\\\InventoryRepository\");\n\t}", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }", "public function register()\n {\n App::bind('CreateTagService', function($app) {\n return new CreateTagService;\n });\n\n App::bind('UpdateTagService', function($app) {\n return new UpdateTagService;\n });\n }", "public function register()\n {\n $this->registerDomainLocalization();\n $this->registerDomainLocaleFilter();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }", "public function register()\n {\n $this->registerUserProvider();\n $this->registerGroupProvider();\n $this->registerNeo();\n\n $this->registerCommands();\n\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Neo', 'Wetcat\\Neo\\Facades\\Neo');\n });\n }", "public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CompanyInterface', \n 'App\\Repositories\\CompanyRepo'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\UtilityInterface', \n 'App\\Repositories\\UtilityRepo'\n );\n }", "public function register()\n {\n $this->registerPayment();\n\n $this->app->alias('image', 'App\\Framework\\Image\\ImageService');\n }", "public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }", "public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n App::bind('App\\Repositories\\ReserveProductRepositoryInterface','App\\Repositories\\ReserveProductRepository');\n App::bind('App\\Repositories\\Product_reserveRepositoryInterface','App\\Repositories\\Product_reserveRepository');\n App::bind('App\\Repositories\\Ordering_productRepositoryInterface','App\\Repositories\\Ordering_productRepository');\n App::bind('App\\Repositories\\OrderingRepositoryInterface','App\\Repositories\\OrderingRepository');\n App::bind('App\\Repositories\\UserUpdateSlipRepositoryInterface','App\\Repositories\\UserUpdateSlipRepository');\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->registerPublishing();\n }\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\MakeEndpointCommand::class,\n Console\\MakeControllerCommand::class,\n Console\\MakeRepositoryCommand::class,\n Console\\MakeTransformerCommand::class,\n Console\\MakeModelCommand::class,\n ]);\n }\n\n $this->registerFractal();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "public function register()\n {\n\n $config = $this->app['config']['cors'];\n\n $this->app->bind('Yocome\\Cors\\CorsService', function() use ($config){\n return new CorsService($config);\n });\n\n }", "public function register()\n {\n // Bind facade\n\n $this->registerRepositoryBibdings();\n $this->registerFacades();\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(\\Laravel\\Socialite\\SocialiteServiceProvider::class);\n }", "public function register()\n {\n\n\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\UserRepository',\n 'Onlinecorrection\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ClientRepository',\n 'Onlinecorrection\\Repositories\\ClientRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ProjectRepository',\n 'Onlinecorrection\\Repositories\\ProjectRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentRepository',\n 'Onlinecorrection\\Repositories\\DocumentRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderRepository',\n 'Onlinecorrection\\Repositories\\OrderRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderItemRepository',\n 'Onlinecorrection\\Repositories\\OrderItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentImageRepository',\n 'Onlinecorrection\\Repositories\\DocumentImageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\PackageRepository',\n 'Onlinecorrection\\Repositories\\PackageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\StatusRepository',\n 'Onlinecorrection\\Repositories\\StatusRepositoryEloquent'\n );\n\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->registerDataStore();\n\n $this->registerStorageFactory();\n\n $this->registerStorageManager();\n\n $this->registerSimplePhoto();\n }", "public function register()\n {\n // Default configuration file\n $this->mergeConfigFrom(\n __DIR__.'/Config/auzo_tools.php', 'auzoTools'\n );\n\n $this->registerModelBindings();\n $this->registerFacadesAliases();\n }", "public function register()\n {\n $this->app->bind(\\Cookiesoft\\Repositories\\CategoryRepository::class, \\Cookiesoft\\Repositories\\CategoryRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\BillpayRepository::class, \\Cookiesoft\\Repositories\\BillpayRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\UserRepository::class, \\Cookiesoft\\Repositories\\UserRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->app->singleton(ThirdPartyAuthService::class, function ($app) {\n return new ThirdPartyAuthService(\n config('settings.authentication_services'),\n $app['Laravel\\Socialite\\Contracts\\Factory'],\n $app['Illuminate\\Contracts\\Auth\\Factory']\n );\n });\n\n $this->app->singleton(ImageValidator::class, function ($app) {\n return new ImageValidator(\n config('settings.image.max_filesize'),\n config('settings.image.mime_types'),\n $app['Intervention\\Image\\ImageManager']\n );\n });\n\n $this->app->singleton(ImageService::class, function ($app) {\n return new ImageService(\n config('settings.image.max_width'),\n config('settings.image.max_height'),\n config('settings.image.folder')\n );\n });\n\n $this->app->singleton(RandomWordService::class, function ($app) {\n return new RandomWordService(\n $app['App\\Repositories\\WordRepository'],\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.number_of_words_to_remember')\n );\n });\n\n $this->app->singleton(WordRepository::class, function ($app) {\n return new WordRepository(config('settings.min_number_of_chars_per_one_mistake_in_search'));\n });\n\n $this->app->singleton(CheckAnswerService::class, function ($app) {\n return new CheckAnswerService(\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.min_number_of_chars_per_one_mistake')\n );\n });\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerJWT();\n $this->registerJWSProxy();\n $this->registerJWTAlgoFactory();\n $this->registerPayload();\n $this->registerPayloadValidator();\n $this->registerPayloadUtilities();\n\n // use this if your package has a config file\n // config([\n // 'config/JWT.php',\n // ]);\n }", "public function register()\n {\n $this->registerManager();\n $this->registerConnection();\n $this->registerWorker();\n $this->registerListener();\n $this->registerFailedJobServices();\n $this->registerOpisSecurityKey();\n }", "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('App\\Services\\TripService.php', function ($app) {\n return new TripService();\n });\n }", "public function register()\n {\n $this->registerUserComponent();\n $this->registerLocationComponent();\n\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }", "public function register()\n {\n $this->app->bind(FacebookMarketingContract::class,FacebookMarketingService::class);\n }", "public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n {\n $this->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }", "public function register()\n {\n\n\n\n $this->mergeConfigFrom(__DIR__ . '/../config/counter.php', 'counter');\n\n $this->app->register(RouteServiceProvider::class);\n\n\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__.'/../config/colissimo.php', 'colissimo');\r\n $this->mergeConfigFrom(__DIR__.'/../config/rules.php', 'colissimo.rules');\r\n $this->mergeConfigFrom(__DIR__.'/../config/prices.php', 'colissimo.prices');\r\n $this->mergeConfigFrom(__DIR__.'/../config/zones.php', 'colissimo.zones');\r\n $this->mergeConfigFrom(__DIR__.'/../config/insurances.php', 'colissimo.insurances');\r\n $this->mergeConfigFrom(__DIR__.'/../config/supplements.php', 'colissimo.supplements');\r\n // Register the service the package provides.\r\n $this->app->singleton('colissimo', function ($app) {\r\n return new Colissimo;\r\n });\r\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyService::class,\n \\App\\Services\\Survey\\SurveyService::class\n );\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyQuestionService::class,\n \\App\\Services\\Survey\\SurveyQuestionService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptService::class,\n \\App\\Services\\Survey\\SurveyAttemptService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptDataService::class,\n \\App\\Services\\Survey\\SurveyAttemptDataService::class\n );\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/atlas.php', 'atlas'\n );\n \n $this->app->singleton(CoreContract::class, Core::class);\n \n $this->registerFacades([\n 'Atlas' => 'Atlas\\Facades\\Atlas',\n ]);\n }", "public function register()\n {\n $this->app->bind(TelescopeRouteServiceContract::class, TelescopeRouteService::class);\n }", "public function register()\n {\n $this->registerRepositoryBindings();\n\n $this->registerInterfaceBindings();\n\n $this->registerAuthorizationServer();\n\n $this->registerResourceServer();\n\n $this->registerFilterBindings();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/faithgen-events.php', 'faithgen-events');\n\n $this->app->singleton(EventsService::class);\n $this->app->singleton(GuestService::class);\n }", "public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }" ]
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647", "0.71484524", "0.71337837", "0.7129424", "0.71231985", "0.7120174", "0.7103653", "0.71020955", "0.70977163", "0.7094701", "0.7092148", "0.70914364", "0.7088618", "0.7087278", "0.70827085", "0.70756096", "0.7075115", "0.70741326", "0.7071857", "0.707093", "0.7070619", "0.7067406", "0.7066438", "0.7061766", "0.70562875", "0.7051525", "0.7049684", "0.70467263", "0.7043264", "0.7043229", "0.70429426", "0.7042174", "0.7038729", "0.70384216", "0.70348704", "0.7034105", "0.70324445", "0.70282733", "0.7025024", "0.702349", "0.7023382", "0.702262", "0.7022583", "0.7022161", "0.702139", "0.7021084", "0.7020801", "0.7019928", "0.70180106", "0.7017351", "0.7011482", "0.7008627", "0.7007786", "0.70065045", "0.7006424", "0.70060986", "0.69992065", "0.699874", "0.69980377", "0.69980335", "0.6997871", "0.6996457", "0.69961494", "0.6994749", "0.6991596", "0.699025", "0.6988414", "0.6987274", "0.69865865", "0.69862866", "0.69848233", "0.6978736", "0.69779474", "0.6977697", "0.6976002", "0.69734764", "0.6972392", "0.69721776", "0.6970663", "0.6968296", "0.696758" ]
0.0
-1
Bootstrap any application services.
public function boot() { Paginator::useBootstrap(); // $this->app->singleton(Color::class, function ($app) { // return Color::find(3); // }); Schema::defaultStringLength(191); Response::macro('caps', function ($value) { return Response::make(strtoupper($value)); }); View::share('person_name', 'jigar'); Blade::withoutDoubleEncoding(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }", "public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }", "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }", "public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }", "public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }", "public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }", "public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }", "public function boot()\n {\n $this->app->singleton('LaraCurlService', function ($app) {\n return new LaraCurlService();\n });\n\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}", "public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }", "public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([\n __DIR__.'/../config/state-machine.php' => config_path('state-machine.php'),\n ], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('state-machine');\n }\n }\n }", "public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }", "public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }", "public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }", "public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }", "public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bindMethod([SendMailPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(MailService::class));\n });\n\n $this->app->bindMethod([ClearTokenPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(PasswordResetRepository::class));\n });\n\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService($app->make(HttpService::class));\n });\n }", "public function boot()\n {\n $this->makeRepositories();\n }", "public function boot(): void\n {\n $this->loadMiddlewares();\n }", "public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }", "public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }", "public function boot()\n {\n $this->app->bind(WeatherInterface::class, OpenWeatherMapService::class);\n $this->app->bind(OrderRepositoryInterface::class, EloquentOrderRepository::class);\n $this->app->bind(NotifyInterface::class, EmailNotifyService::class);\n }", "public function boot()\n {\n $this->app->bind(DateService::class,DateServiceImpl::class);\n $this->app->bind(DisasterEventQueryBuilder::class,DisasterEventQueryBuilderImpl::class);\n $this->app->bind(MedicalFacilityQueryBuilder::class,MedicalFacilityQueryBuilderImpl::class);\n $this->app->bind(RefugeCampQueryBuilder::class,RefugeCampQueryBuilderImpl::class);\n $this->app->bind(VictimQueryBuilder::class,VictimQueryBuilderImpl::class);\n $this->app->bind(VillageQueryBuilder::class,VillageQueryBuilderImpl::class);\n }", "public function boot()\n {\n\t\tif ( $this->app->runningInConsole() ) {\n\t\t\t$this->loadMigrationsFrom(__DIR__.'/migrations');\n\n//\t\t\t$this->publishes([\n//\t\t\t\t__DIR__.'/config/scheduler.php' => config_path('scheduler.php'),\n//\t\t\t\t__DIR__.'/console/CronTasksList.php' => app_path('Console/CronTasksList.php'),\n//\t\t\t\t__DIR__.'/views' => resource_path('views/vendor/scheduler'),\n//\t\t\t]);\n\n//\t\t\tapp('Revolta77\\ScheduleMonitor\\Conntroller\\CreateController')->index();\n\n//\t\t\t$this->commands([\n//\t\t\t\tConsole\\Commands\\CreateController::class,\n//\t\t\t]);\n\t\t}\n\t\t$this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $this->bootPackages();\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->load(__DIR__.'/../Console', Command::class));\n }\n }", "public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }", "public function boot()\n {\n // DEFAULT STRING LENGTH\n Schema::defaultStringLength(191);\n\n // PASSPORT\n Passport::routes(function (RouteRegistrar $router)\n {\n $router->forAccessTokens();\n });\n Passport::tokensExpireIn(now()->addDays(1));\n\n // SERVICES, REPOSITORIES, CONTRACTS BINDING\n $this->app->bind('App\\Contracts\\IUser', 'App\\Repositories\\UserRepository');\n $this->app->bind('App\\Contracts\\IUserType', 'App\\Repositories\\UserTypeRepository');\n $this->app->bind('App\\Contracts\\IApiToken', 'App\\Services\\ApiTokenService');\n $this->app->bind('App\\Contracts\\IModule', 'App\\Repositories\\ModuleRepository');\n $this->app->bind('App\\Contracts\\IModuleAction', 'App\\Repositories\\ModuleActionRepository');\n }", "public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }", "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerMigrations();\n $this->registerMigrationFolder();\n $this->registerConfig();\n }\n }", "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "public function boot(): void\n {\n $this->app->bind(Telegram::class, static function () {\n return new Telegram(\n config('services.telegram-bot-api.token'),\n new HttpClient()\n );\n });\n }", "public function boot()\n {\n\n if (! config('app.installed')) {\n return;\n }\n\n $this->loadRoutesFrom(__DIR__ . '/Routes/admin.php');\n $this->loadRoutesFrom(__DIR__ . '/Routes/public.php');\n\n $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');\n\n// $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'portfolio');\n\n $this->loadTranslationsFrom(__DIR__ . '/Resources/Lang/', 'contact');\n\n //Add menu to admin panel\n $this->adminMenu();\n\n }", "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }", "protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Larapex Livewire\n $this->mergeConfigFrom(__DIR__ . '/../configs/larapex-livewire.php', 'larapex-livewire');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larapex-livewire');\n\n $this->registerBladeDirectives();\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n $this->publishResources();\n }\n }", "public function boot()\n {\n // Bootstrap code here.\n $this->app->singleton(L9SmsApiChannel::class, function () {\n $config = config('l9smsapi');\n if (empty($config['token']) || empty($config['service'])) {\n throw new \\Exception('L9SmsApi missing token and service in config');\n }\n\n return new L9SmsApiChannel($config['token'], $config['service']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/l9smsapi.php' => config_path('l9smsapi.php'),\n ], 'config');\n }\n }", "public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}", "public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MultiAuthInstallCommand::class,\n ]);\n }\n }", "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }", "public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }", "public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }", "public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }", "public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}", "public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }", "public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }", "public function boot(): void\n {\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMixins();\n\n if ($this->app->runningInConsole()) {\n $this->offerPublishing();\n $this->registerMigrations();\n }\n }", "public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }", "public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }", "public function boot()\n {\n $this->bootForConsole();\n $this->loadRoutesFrom(__DIR__ . '/routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/./../resources/views', 'bakerysoft');\n }", "public function boot()\n {\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n $this->defineResources();\n $this->registerDependencies();\n }", "public function boot()\n {\n $this->app->bind(CustomersRepositoryInterface::class, CustomersRepository::class);\n $this->app->bind(CountryToCodeMapperInterface::class, CountryToCodeMapper::class);\n $this->app->bind(PhoneNumbersValidatorInterface::class, PhoneNumbersRegexValidator::class);\n $this->app->bind(CustomersFilterServiceInterface::class, CustomersFilterService::class);\n $this->app->bind(CacheInterface::class, CacheAdapter::class);\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([$this->configPath() => config_path('oauth.php')], 'oauth');\n }\n\n app()->bind(ClientToken::class, function () {\n return new ClientToken();\n });\n\n app()->bind(TokenParser::class, function () {\n return new TokenParser(\n app()->get(Request::class)\n );\n });\n\n app()->bind(OAuthClient::class, function () {\n return new OAuthClient(\n app()->get(Request::class),\n app()->get(ClientToken::class)\n );\n });\n\n app()->bind(AccountService::class, function () {\n return new AccountService(app()->get(OAuthClient::class));\n });\n }", "public function boot()\n {\n Client::observe(ClientObserver::class);\n $this->app->bind(ClientRepositoryInterface::class, function ($app) {\n return new ClientRepository(Client::class);\n });\n $this->app->bind(UserRepositoryInterface::class, function ($app) {\n return new UserRepository(User::class);\n });\n }", "public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n //\n }\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n }", "public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }", "public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }", "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipfinder.io/v1/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP-Torann',\n ],\n 'query' => [\n 'token' => $this->config('key'),\n ],\n ]);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }", "public function boot()\n {\n $app = $this->app;\n\n if (!$app->runningInConsole()) {\n return;\n }\n\n $source = realpath(__DIR__ . '/config/config.php');\n\n if (class_exists('Illuminate\\Foundation\\Application', false)) {\n // L5\n $this->publishes([$source => config_path('sniffer-rules.php')]);\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } elseif (class_exists('Laravel\\Lumen\\Application', false)) {\n // Lumen\n $app->configure('sniffer-rules');\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } else {\n // L4\n $this->package('chefsplate/sniffer-rules', null, __DIR__);\n }\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ControllerMakeCommand::class,\n ServiceMakeCommand::class,\n RepositoryMakeCommand::class,\n ModelMakeCommand::class,\n RequestRuleMakeCommand::class,\n ]);\n }\n }", "public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }", "public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }", "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/views', 'Counters');\n\n $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Counters');\n\n\n //To load migration files directly from the package\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n\n $this->app->booted(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('Counters', Counters::class);\n\n });\n\n $this->publishes([\n __DIR__ . '/../config/counter.php' => config_path('counter.php'),\n ], 'config');\n\n\n\n $this->publishes([\n __DIR__.'/../database/migrations/0000_00_00_000000_create_counters_tables.php' => $this->app->databasePath().\"/migrations/0000_00_00_000000_create_counters_tables.php\",\n ], 'migrations');\n\n\n if ($this->app->runningInConsole()) {\n $this->commands([\\Maher\\Counters\\Commands\\MakeCounter::class]);\n }\n\n\n }", "public function boot(Application $app)\n {\n\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }" ]
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.6896597", "0.6889767", "0.6886577", "0.6880688", "0.6875815", "0.6874972", "0.68696195", "0.6864291", "0.6864246", "0.68631536", "0.68599164", "0.6857919", "0.685537", "0.68552583", "0.68522125", "0.6839775", "0.683261", "0.6831196", "0.68272495", "0.68250644", "0.68241394", "0.68181944", "0.68132496", "0.68117976", "0.6811785", "0.6808445", "0.68066794", "0.680175", "0.68005246", "0.67994386", "0.67969066", "0.67912513", "0.67884964", "0.678574", "0.678558", "0.6783794", "0.67782456", "0.6773669", "0.6766658", "0.6766194", "0.67617613", "0.67611295", "0.6758855", "0.6756636", "0.6754412", "0.6751842", "0.6747439", "0.6744991", "0.67441815", "0.6743506", "0.67400324", "0.6739403", "0.6738356", "0.6738189", "0.6731425", "0.6730627", "0.67293024", "0.6726232", "0.67261064", "0.67192256", "0.6716676", "0.6716229", "0.671442", "0.6713091", "0.6702467", "0.66990495", "0.66913867", "0.6689953", "0.66861963", "0.66840357", "0.66826946", "0.6681548", "0.6680455", "0.6676407", "0.6675645", "0.6672465", "0.66722375", "0.66722375", "0.66722375", "0.66722375", "0.66722375" ]
0.0
-1
Injects Api config and directory to register to during bootstrap
public static function injectConf(IConfig $conf) { self::$conf = $conf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _initApi() {\n\t$this->bootstrap('Zend');\n\t$this->bootstrap('ApiRoutes');\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 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 $this->fullBoot('api', __DIR__.'/../');\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function configureApiPaths();", "private function setup_api() {\n\t\trequire_once 'includes/class-themeisle-ob-rest-server.php';\n\t\tif ( ! class_exists( 'Themeisle_OB_Rest_Server' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$api = new Themeisle_OB_Rest_Server();\n\t\t$api->init();\n\t\trequire_once 'includes/importers/helpers/trait-themeisle-ob.php';\n\t}", "public function register_api_routes( Config $config ) {\n\t\t\\AM\\Endpoint\\Example_Endpoint::init( $config );\n\t}", "public function boot()\n {\n $this->publishes([\n __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR .'config.php' => config_path('jsonapi.php'),\n ]);\n\n $this->configureJsonApiRequests();\n $this->registerExceptionHandler();\n }", "protected function registerApiDriver()\n {\n $this->app->singleton(\n EntriesRepository::class, ApiEntriesRepository::class\n );\n }", "public function _initConfig() {\r\n $this->config = Yaf\\Application::app()->getConfig();\r\n Yaf\\Registry::set(\"config\", $this->config);\r\n\r\n //申明, 凡是以Foo和Local开头的类, 都是本地类\r\n $this->loader = Yaf\\Loader::getInstance();\r\n $this->loader->registerLocalNamespace([\"fly\"]);\r\n }", "public function manually_load_api() {\n\t\tif ( ! class_exists( 'WP_JSON_Server' ) ) {\n\t\t\tadd_filter( 'json_url', 'set_url_scheme' );\n\n\t\t\trequire( dirname( __FILE__ ) . '/../vendor/wp-api/wp-api/plugin.php' );\n\n\t\t\tadd_action( 'wp_json_server_before_serve', array( $this, 'api_init' ) );\n\t\t}\n\t}", "private function initConfig() {\n\t\t$configLoader = new ConfigLoader($this->_env);\n\n /** set config to Di container */\n $this->_di->set('config', $configLoader, TRUE);\n $this->_config = $configLoader;\n\t}", "public function init()\n {\n require_once(__DIR__.'/controllers/AbstractAuthorizedApiController.php');\n }", "public function boot()\n {\n include __DIR__.'/LaravelApiManagers.php';\n $this->publishes([\n __DIR__ . '/config' => config_path('/'),\n __DIR__ . '/views' => base_path('resources/views/api_manager'),\n __DIR__ . '/host_keys' => base_path('resources/views/host_keys'),\n __DIR__ . '/controller' => base_path('app/Http/Controllers'),\n __DIR__ . '/middleware' => base_path('app/Http/Middleware'),\n __DIR__ . '/models' => base_path('app'),\n __DIR__ . '/migrations' => base_path('database/migrations'),\n\n ]);\n $this->commands('Jawaraegov\\LaravelApiManagers\\Commands\\RouteCommands');\n }", "public function boot()\n {\n $this->publishConfig(self::BASE_CONFIG_PATH);\n }", "public function boot()\n {\n // 合併套件設定檔\n $this->mergeConfigFrom(__DIR__ . '/../config/api_caller.php', 'api_caller');\n $this->mergeConfigFrom(__DIR__ . '/../config/api_caller_bridge.php', 'api_caller_bridge');\n $this->mergeConfigFrom(__DIR__ . '/../config/api_caller_category.php', 'api_caller_category');\n $this->mergeConfigFrom(__DIR__ . '/../config/api_caller_report_game_scope.php', 'api_caller_report_game_scope');\n\n $this->publishes([\n __DIR__ . '/../config/api_caller.php'\n => config_path('api_caller.php'),\n ]);\n\n $this->publishes([\n __DIR__ . '/../config/api_caller_category.php'\n => config_path('api_caller_category.php'),\n ]);\n\n $this->publishes([\n __DIR__ . '/../config/api_caller_report_game_scope.php'\n => config_path('api_caller_report_game_scope.php'),\n ]);\n\n // include helpers after 合併套件設定檔\n $this->includeHelpers();\n }", "public function boot()\n {\n if (env('API_STORE_URL')) {\n Client::configure([\n 'store_url' => env('API_STORE_URL'),\n 'username' => env('API_USERNAME'),\n 'api_key' => env('API_KEY'),\n ]);\n }\n }", "public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\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->loadViewsFrom(__DIR__ . '/views', 'Swagger'); // 视图目录指定\n //$this->setupRoutes($this->app->router);\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n $this->publishes([\n __DIR__ . '/config/swagger.php' => config_path('swagger.php'),\n __DIR__ . '/assets/' => public_path('swagger-ui/'),\n __DIR__ . '/Api.php' => app_path('Http/Controllers/Api.php'),\n __DIR__ . '/swagger_html.php' => public_path('swagger.php'),\n ]);\n }", "public function register()\n {\n foreach (glob(base_path('config/*.php')) as $file) {\n $this->app->configure(explode('.', basename($file))[0]);\n }\n }", "public function boot()\n {\n $source = realpath($raw = __DIR__ . '/../config') ?: $raw;\n $stubs = realpath($raw = __DIR__ . '/../stubs') ?: $raw;\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path()]);\n $this->publishes([$stubs => resource_path('stubs')]);\n foreach(scandir($stubs) as $dir) {\n if ($dir[0] != '.' && \\is_dir($stubs.'/'.$dir)) {\n $this->publishes([$stubs.'/'.$dir => resource_path('stubs/'.$dir)]);\n }\n }\n // 隐藏功能,把我的一些基础代码挪过去\n if (config('mvcs.base')) {\n $base = realpath($raw = __DIR__ . '/../examples/Base') ?: $raw;\n $this->publishes([$base => app_path('Base')]);\n foreach(scandir($base) as $dir) {\n if ($dir[0] != '.' && \\is_dir($base.'/'.$dir)) {\n $this->publishes([$base.'/'.$dir => app_path('Base/'.$dir)]);\n }\n }\n }\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('mvcs');\n }\n\n // $this->mergeConfigFrom($source, 'mvcs');\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 if ($this->app->runningInConsole()) {\n $this->commands([\n GenerateOpenAPIDocCommand::class,\n ]);\n }\n\n $source = __DIR__ . '/../config/openapi.php';\n\n $this->publishes([\n $source => config_path('openapi.php'),\n ]);\n\n $this->mergeConfigFrom(\n $source, 'openapi'\n );\n\n //Include routes\n $this->loadRoutesFrom(__DIR__.'/routes.php');\n }", "public function boot()\n {\n ResponseFactory::macro('jsonApi', function ($data = [], $success = true, $status = 200, array $headers = [], $options = 0) {\n return $this->json([\n 'success' => $success,\n 'status' => $status,\n 'message' => Response::$statusTexts[$status] ?? '',\n 'data' => $data,\n ], $status, $headers, $options);\n });\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "protected function installApiStack()\n {\n $fs = new Filesystem;\n $guard = $this->argument('guard');\n $pluralClass = Str::plural(Str::studly($guard));\n $singularClass = Str::singular(Str::studly($guard));\n\n // Module...\n $fs->ensureDirectoryExists(app_path(\"Modules/{$pluralClass}\"));\n $fs->copyDirectory(__DIR__ . '/../../../.stubs/api/src', app_path(\"Modules/{$pluralClass}\"));\n\n // Tests...\n $fs->ensureDirectoryExists(base_path(\"tests/Feature/{$pluralClass}\"));\n if ($this->option('pest')) {\n $fs->copyDirectory(__DIR__ . '/../../../.stubs/api/pest-tests/Feature', base_path(\"tests/Feature/{$pluralClass}\"));\n } else {\n $fs->copyDirectory(__DIR__ . '/../../../.stubs/api/tests/Feature', base_path(\"tests/Feature/{$pluralClass}\"));\n }\n\n // Conclude...\n $this->info(\"{$singularClass} guard successfully setup.\");\n\n $serviceProvider = \"App\\\\Modules\\\\{$pluralClass}\\\\{$singularClass}ServiceProvider::class\";\n\n $this->info(\"\\nRegister `{$serviceProvider}` in `config/app.php`\");\n }", "public function boot()\n {\n $this->app->bind(SwaggerDocsManager::class, function ($app) {\n return new SwaggerDocsManager($app['config']['laravel-swagger']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n GenerateSwaggerDocCommand::class,\n ]);\n }\n\n $source = __DIR__ . '/../config/laravel-swagger.php';\n\n $this->publishes([\n $source => config_path('laravel-swagger.php'),\n ]);\n\n $this->mergeConfigFrom(\n $source, 'laravel-swagger'\n );\n\n $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'laravel-swagger');\n }", "protected function registerServices()\n {\n\n $di = new FactoryDefault();\n\n /**\n * Read services\n */\n include CORE_PATH . \"/config/services.php\";\n\n /**\n * Get config service for use in inline setup below\n */\n $config = $di->getConfig();\n\n\n include CORE_PATH . '/config/loader.php';\n\n \n\n $this->setDI($di);\n }", "public function initialize()\n\t{\n\t\t/**\n\t\t * In the URI this module is prefixed by '/<%= module.slug %>'\n\t\t */\n\t\t$this->setPrefix('/<%= module.slug %>');\n\n\t\t/**\n\t\t * Configure the instance\n\t\t */\n\t\t$this->setPaths(\n\t\t\t[\n\t\t\t\t'module' => '<%= module.slug %>',\n\t\t\t\t'namespace' => '<%= project.namespace %>\\<%= module.namespace %>\\Controllers\\View\\\\',\n\t\t\t\t'controller' => 'index',\n\t\t\t\t'action' => 'index'\n\t\t\t]\n\t\t);\n\n\t\t/**\n\t\t * Default route: '<%= module.slug %>-api-root'\n\t\t */\n\t\t$this->addGet(\n\t\t\t'/api',\n\t\t\t[\n\t\t\t\t'namespace' => '<%= project.namespace %>\\<%= module.namespace %>\\Controllers\\API\\\\'\n\t\t\t]\n\t\t)->setName('<%= module.slug %>-api-root');\n\n\t\t/**\n\t\t * API Controller route: '<%= module.slug %>-api-controller'\n\t\t */\n\t\t$this->addGet(\n\t\t\t'/api/:controller',\n\t\t\t[\n\t\t\t\t'namespace' => '<%= project.namespace %>\\<%= module.namespace %>\\Controllers\\API\\\\',\n\t\t\t\t'controller' => 1\n\t\t\t]\n\t\t)->setName('<%= module.slug %>-api-controller');\n\n\t\t/**\n\t\t * API Action route: '<%= module.slug %>-api-action'\n\t\t */\n\t\t$this->addGet(\n\t\t\t'/api/:controller/:action/:params',\n\t\t\t[\n\t\t\t\t'namespace' => '<%= project.namespace %>\\<%= module.namespace %>\\Controllers\\API\\\\',\n\t\t\t\t'controller' => 1,\n\t\t\t\t'action' => 2,\n\t\t\t\t'params' => 3\n\t\t\t]\n\t\t)->setName('<%= module.slug %>-api-action');\n\n\t\t/**\n\t\t * Default route: '<%= module.slug %>-view-root'\n\t\t */\n\t\t$this->addGet(\n\t\t\t'/view',\n\t\t\t[\n\t\t\t\t'namespace' => '<%= project.namespace %>\\<%= module.namespace %>\\Controllers\\View\\\\'\n\t\t\t]\n\t\t)->setName('<%= module.slug %>-view-root');\n\n\t\t/**\n\t\t * View Controller route: '<%= module.slug %>-view-controller'\n\t\t */\n\t\t$this->addGet(\n\t\t\t'/view/:controller',\n\t\t\t[\n\t\t\t\t'namespace' => '<%= project.namespace %>\\<%= module.namespace %>\\Controllers\\View\\\\',\n\t\t\t\t'controller' => 1\n\t\t\t]\n\t\t)->setName('<%= module.slug %>-view-controller');\n\n\t\t/**\n\t\t * View Action route: '<%= module.slug %>-view-action'\n\t\t */\n\t\t$this->addGet(\n\t\t\t'/api/:controller/:action/:params',\n\t\t\t[\n\t\t\t\t'namespace' => '<%= project.namespace %>\\<%= module.namespace %>\\Controllers\\View\\\\',\n\t\t\t\t'controller' => 1,\n\t\t\t\t'action' => 2,\n\t\t\t\t'params' => 3\n\t\t\t]\n\t\t)->setName('<%= module.slug %>-view-action');\n\n\t\t/**\n\t\t * Add all <%= project.namespace %>\\<%= module.namespace %> specific routes here\n\t\t */\n\t}", "public function boot()\n {\n $this->publishes([\n __DIR__ . '/config/apimocker.php' => config_path('apimocker.php'),\n ], 'config');\n\n if (! $this->app->routesAreCached()) {\n require __DIR__ . '/routes.php';\n }\n }", "public function boot()\n {\n $this->publishes([\n __DIR__.'/../Config/api.php' => config_path('api.php'),\n ]);\n\n app('Illuminate\\Contracts\\Routing\\ResponseFactory')->macro('api', function()\n {\n return app('api');\n });\n if (env('APP_ENV') == 'local' && env('APP_DEBUG')) {\n \\DB::enableQueryLog();\n }\n }", "public static function boot(): void\n {\n if (defined('CONFIG_DIR') && file_exists(CONFIG_DIR . '/beanstalk.php')) {\n self::$beanstalk_config = require CONFIG_DIR . '/beanstalk.php';\n }\n }", "public function boot()\n {\n $configPath = __DIR__ . '/../config/' . $this->configName . '.php';\n\n $this->publishes([$configPath => config_path($this->configName . '.php')], 'impersonate');\n }", "private function include_rest_api() {\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/rest-api/class-wpcd-rest-api-controller-base.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/rest-api/class-wpcd-rest-api-controller-servers.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/rest-api/class-wpcd-rest-api-controller-sites.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/rest-api/class-wpcd-rest-api-controller-tasks.php';\n\n\t\t/**\n\t\t * Need to add new REST API controllers from an add-on?\n\t\t * Then this action hook MUST be used! Otherwise, weird\n\t\t * stuff will happen and you will not know why!\n\t\t *\n\t\t * Third parties that need to add a plugin to extend\n\t\t * the rest api by adding new controllers should\n\t\t * ensure that the filter a few lines above is used\n\t\t * to add the new controller to the array so that\n\t\t * they can be instantiated.\n\t\t */\n\t\tdo_action( 'wpcd_wpapp_include_rest_api' );\n\n\t\t// List of controllers to instantiate.\n\t\t// This list should be added to by other plugins adding their own rest api controllers.\n\t\t$controllers = apply_filters(\n\t\t\t\"wpcd_app_{$this->get_app_name()}_rest_api_controller_list\",\n\t\t\tarray(\n\t\t\t\tWPCD_REST_API_Controller_Servers::class,\n\t\t\t\tWPCD_REST_API_Controller_Sites::class,\n\t\t\t\tWPCD_REST_API_Controller_Tasks::class,\n\t\t\t)\n\t\t);\n\n\t\t// Loop through list and instantiate.\n\t\tforeach ( $controllers as $controller_class ) {\n\t\t\t$controller = new $controller_class();\n\t\t\t$this->rest_controllers[ $controller->get_name() ] = $controller;\n\t\t}\n\n\t}", "public function boot()\n {\n Storage::extend('gitlab', function ($app, $config) {\n $client = new Client(\n $config['access_token'],\n $config['project_id'],\n $config['branch'],\n $config['base_url']\n );\n\n return new Filesystem(new GitlabAdapter($client, '', $config['debug']));\n });\n }", "public function init() {\n parent::init();\n if (!is_object($this->api)) {\n $class = $this->api;\n $this->api = new $class;\n }\n $this->loadPlugins();\n }", "public function boot()\n {\n Response::macro('api', function($data = array(), $subject = '', $body = '', $status = 200, array $headers = array(), $options = 0)\n {\n $vars = get_class_vars('\\Illuminate\\Http\\Response');\n $data = [\n 'meta' => [\n 'status' => [\n 'code' => $status,\n 'desc' => $vars['statusTexts'][$status]\n ],\n 'msg' => [\n 'subj' => $subject,\n 'body' => $body\n ]\n ],\n 'result' => $data\n ]; \n\n return Response::json($data, $status, $headers, $options);\n });\n }", "protected function registerClasses()\n {\n //region Annotations\n AnnotationRegistry::registerLoader('class_exists');\n\n $this->app->singleton('app.annotation_reader', function (Application $app) {\n return new AnnotationReader;\n });\n //endregion\n\n //region Serializer\n $this->app->singleton('api.serializer', function (Application $app) {\n return $this->prepareSerializer()->build();\n });\n //endregion\n\n //region JSON Schema Constraint\n $this->app->singleton('api.schema.constraint', function (Application $app) {\n $fileRetriever = new FileGetContents;\n $fileRetriever->setBasePath(config(self::CONFIG_KEY . '.request.schema_path') . DIRECTORY_SEPARATOR);\n\n $retriever = (new UriRetriever)\n ->setUriRetriever($fileRetriever);\n\n $constraintFactory = new Factory(new SchemaStorage($retriever));\n $constraintFactory->setConfig(Constraint::CHECK_MODE_APPLY_DEFAULTS | Constraint::CHECK_MODE_COERCE_TYPES);\n\n return $constraintFactory;\n });\n //endregion\n\n //region JSON Schema Validator\n $this->app->singleton('api.schema.validator', function (Application $app) {\n return new Validator(\n $app->make('api.schema.constraint')\n );\n });\n //endregion\n\n //region RequestHandler\n $this->app->singleton(RequestHandler::class, function (Application $app) {\n $serializer = $this->prepareSerializer()\n ->configureListeners(function (EventDispatcher $dispatcher) use ($app) {\n $dispatcher->addSubscriber(\n new RequestDeserializationHandler(\n $app->make('api.schema.validator'),\n $app->make('purifier')\n )\n );\n })\n ->build();\n\n return new RequestHandler($serializer);\n });\n //endregion\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\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n $this->loadViewsFrom(__DIR__ . '/../views', 'docs');\n\n $this->bootCommands();\n $this->bootPublishes();\n $this->bootAnnotations();\n }", "protected function bootstrapContainer()\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n $this->instance(self::class, $this);\n\n $this->instance('path', $this->path());\n $this->instance('path.base', $this->basePath());\n $this->instance('path.config', $this->basePath('config'));\n $this->instance('path.database', $this->databasePath());\n $this->instance('path.storage', $this->storagePath());\n $this->instance('path.resources', $this->resourcePath());\n $this->instance('path.bootstrap', $this->bootstrapPath());\n\n $this->instance('env', $this->environment());\n\n $this->registerContainerAliases();\n\n $this->configure('app');\n $this->configure('view');\n }", "public function boot()\n {\n Route::patterns([\n 'id' => '^\\d+$',\n 'model' => '^\\d+$',\n ]);\n\n $this->loadRoutesFrom(__DIR__ . '/../Routes/api.php');\n\n parent::boot();\n }", "private function _initApiCommons()\n {\n // Disable debug information - Required to generate valid XML output\n //Configure::write('debug', 0);\n\n // Avoids render() call\n $this->disableLayout();\n $this->_helper->viewRenderer->setNoRender();\n\n // Instanciate Upload Module\n $this->uploadApi = new KwUploadAPI($this->apiSetup);\n }", "public static function init() {\n\t\tstatic::$apis = [\n\t\t\t'content' => new Content_API(),\n\t\t\t'contributors' => new Contributors_API(),\n\t\t\t'dashboards' => new Dashboards_API(),\n\t\t\t'options' => new Options_API(),\n\t\t\t'post_types' => new Post_Types_API(),\n\t\t\t'quick_cards' => new Quick_Cards_API(),\n\t\t];\n\n\t\tadd_action( 'rest_api_init', [__CLASS__, 'register_rest_routes'] );\n\n\t}", "public function boot()\n {\n $this->registerConfig();\n $this->registerViewComposers();\n\n $this->loadRoutesFrom(__DIR__ . '/../Http/routes.php');\n $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', config('openid.namespace'));\n $this->loadViewsFrom(__DIR__ . '/../Resources/views', config('openid.namespace'));\n\n $this->app->singleton('openid', function ($app) {\n return new Client();\n });\n\n $this->app->singleton('oauth2', function ($app) {\n return new Api();\n });\n }", "public function boot()\n {\n $this->loadConfig();\n\n parent::boot();\n }", "protected static function updateBootstrapping()\n {\n copy(__DIR__ . '/angular-stubs/main.ts', resource_path('assets/js/main.ts'));\n copy(__DIR__ . '/angular-stubs/app.module.ts', resource_path('assets/js/app.module.ts'));\n copy(__DIR__ . '/angular-stubs/environment.ts', resource_path('assets/js/environment.ts'));\n copy(__DIR__ . '/angular-stubs/tsconfig.json', resource_path('assets/js/tsconfig.json'));\n }", "protected function registerRoutes()\n {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n }", "public function register()\n {\n $this->mergeConfigFrom($this->getConfigFile(), 'allay');\n\n parent::register();\n\n $this->registerLumenResourceResolver();\n }", "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->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()\n {\n $this->publishes([\n __DIR__ . '/../config/cors.php' => config_path('cors.php')\n ], 'config');\n\n $hasApiTokensClass = HasApiTokens::class;\n $userClass = config('auth.providers.users.model');\n if (! array_key_exists($hasApiTokensClass, class_uses($userClass))) {\n throw new \\Exception(\"Use the trait $hasApiTokensClass for your auth provider user model ($userClass) class.\");\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/cors.php', 'cors');\n $this->defineRoutes();\n }", "public function boot()\n {\n require_once __DIR__ . '/../thirdparty/src/autoload.php';\n }", "public function boot() {\n\t\t$this->package('nrs/librarydirectory');\n\t\t$this->setConnection();\n\t\tinclude __DIR__.'/../../routes.php';\n\t\tinclude __DIR__.'/../../filters.php';\n\t}", "public function boot(Application $app)\n {\n $app->mount($app['api.mount_point'], $app['api']);\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/config/laravel-api-managers.php', 'laravel-api-managers'\n );\n }", "public static function load()\n {\n\n // guard to check whether to init the rest api\n if (false === strpos(($_ENV['SCHEDULE_BUILDER_API'] ?? ''), 'locations')) {\n return;\n }\n\n\n add_action('rest_api_init', function () {\n // an instance of this endpoint\n $endpoint = new LocationEndpoint();\n\n register_rest_route('/schedule-builder/', '/locations', [\n 'methods' => 'GET',\n 'callback' => [$endpoint, 'findAllLocations']\n ]);\n });\n\n }", "public function boot()\n {\n $this->publishes([\n sprintf('%s/config/%s.php', __DIR__, $this->name) => config_path(sprintf('%s.php', $this->name)),\n ]);\n\n Response::macro('xml', function (\\SimpleXMLElement $value) {\n return Response::make($value->asXML())\n ->header('Content-type', 'text/xml');\n });\n }", "public function boot()\n {\n // Modification for Mysql specified key is too long error\n Schema::defaultStringLength(191);\n if (isset($_SERVER['PHP_AUTH_USER'])) {\n Config::set('apiuser', User::where('username', $_SERVER['PHP_AUTH_USER'])->first()->id);\n }\n \n $this->app->register(\\Mpociot\\ApiDoc\\ApiDocGeneratorServiceProvider::class);\n }", "protected function registerBaseServices()\n {\n $container = $this->getContainer();\n\n $container->share('logger', function () use ($container) {\n return new Logger($container->get('config'));\n });\n\n $this->registerService(new Providers\\ConfigProvider());\n $this->registerService(new Providers\\FileSystemProvider());\n $this->registerService(new Providers\\ParserManagerProvider());\n $this->registerService(new Providers\\BackendProvider());\n }", "public function register()\n\t{\n $this->registerApi();\n\t}", "public function boot()\n {\n $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'ytmusicapi');\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/config.php' => config_path('ytmusicapi.php'),\n ], 'config');\n }\n }", "private function configureRoutes()\n {\n $this->files->copy(__DIR__ . '/../../stubs/routes/api.stub', base_path('routes/api.php'));\n }", "private function registerApiRoutes(): void\n {\n $detect = app(Detect::class);\n $monitor = app(Monitor::class);\n\n $type = Settings::TYPE__ROUTE_API_FILE;\n if (!$detect->resourceEnabled($type)) {\n return;\n }\n\n $monitor->startTimer('register ' . $type);\n\n foreach ($detect->getRouteApiFiles() as $path) {\n Route::middleware($detect->routeApiMiddleware())\n ->group($detect->basePath($path));\n }\n $monitor->incRegCount($type, count($detect->getRouteApiFiles()));\n\n $monitor->stopTimer('register ' . $type);\n }", "private function setupConfig()\n {\n $this->publishes([\n __DIR__ . '/config' => config_path(),\n ], 'config');\n\n $this->mergeConfigFrom(__DIR__ . '/../config/package-blueprint.php', 'package-blueprint');\n }", "public function boot()\n {\n //\n $this->publishes([\n __DIR__.'/_config/rest_resources.php' => config_path('rest_resources.php'),\n ]);\n }", "public static function registerCoreEndpoints() {\n\t\tif (\\UserConfig::$apiNamespace) {\n\t\t\tself::register(\\UserConfig::$apiNamespace, 'GET', new \\StartupAPI\\API\\v1\\User\\Get());\n\t\t\tself::register(\\UserConfig::$apiNamespace, 'GET', new \\StartupAPI\\API\\v1\\Accounts());\n\t\t}\n\t}", "public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }", "public function boot()\n {\n $this->publishes([\n __DIR__ . '/../config/swoole.php' => base_path('config/swoole.php')\n ], 'config');\n }", "public function bootPackages()\n {\n // Get the namespace of the current plugin to use in accessing the Config of the plugin\n $pluginNamespace = str_replace('\\\\', '.', strtolower(__NAMESPACE__));\n\n // Instantiate the AliasLoader for any aliases that will be loaded\n $aliasLoader = AliasLoader::getInstance();\n\n // Get the packages to boot\n $packages = Config::get($pluginNamespace . '::packages');\n\n // Boot each package\n foreach ($packages as $name => $options) {\n // Setup the configuration for the package, pulling from this plugin's config\n if (!empty($options['config']) && !empty($options['config_namespace'])) {\n Config::set($options['config_namespace'], $options['config']);\n }\n\n // Register any Service Providers for the package\n if (!empty($options['providers'])) {\n foreach ($options['providers'] as $provider) {\n App::register($provider);\n }\n }\n\n // Register any Aliases for the package\n if (!empty($options['aliases'])) {\n foreach ($options['aliases'] as $alias => $path) {\n $aliasLoader->alias($alias, $path);\n }\n }\n }\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n URL::forceScheme('https'); //强制 https\n JsonResource::withoutWrapping();// 资源返回不包裹在 data 里面\n $table = config('admin.extensions.config.table', 'admin_config');\n if (Schema::hasTable($table)) {\n Config::load();\n }\n Horizon::auth(function ($request) {\n return true;\n });\n }", "public function boot(): void\n {\n $detect = app(Detect::class);\n $monitor = app(Monitor::class);\n\n if ($detect->resourceEnabled(Settings::TYPE__ROUTE_API_FILE)) {\n $monitor->timerExists('register ' . Settings::TYPE__ROUTE_API_FILE);\n }\n if ($detect->resourceEnabled(Settings::TYPE__ROUTE_WEB_FILE)) {\n $monitor->timerExists('register ' . Settings::TYPE__ROUTE_WEB_FILE);\n }\n\n $this->routes(function () {\n $this->registerApiRoutes();\n $this->registerWebRoutes();\n });\n }", "public function bootstrap() : void\n {\n $includes = require_once 'autoload.php';\n\n $this->include($includes['shared']);\n\n if (is_admin()) {\n $this->include($includes['admin']);\n\n add_action('init', [$this->instantiate('Admin\\Settings'), 'init']);\n add_filter('plugin_action_links_' . plugin_basename(__FILE__), [$this, 'links']);\n } else {\n $this->include($includes['frontend']);\n\n add_action('rest_api_init', [$this->instantiate('Frontend\\Endpoint'), 'init']);\n }\n\n add_action('plugins_loaded', [$this, 'languages']);\n }", "public function serversInit()\n\t{\n\t\t$api_root=$this->getPath();\n\t\t$p=opendir($api_root);\n\t\twhile(false!==($d=readdir($p)))\n\t\t{\n\t\t\tif($d!='.' && $d!='..' && is_dir($api_root.'/'.$d))\n\t\t\t{\n\t\t\t\tif(file_exists($api_root.'/'.$d.'/init.php') && file_exists($api_root.'/'.$d.'/config.xml'))\n\t\t\t\t{\n\t\t\t\t\t$settings=@simplexml_load_file($api_root.'/'.$d.'/config.xml');\n\t\t\t\t\tif(!$settings){\n\t\t\t\t\t\t$this->setError('Not inited: '.$d.'; wrong config file.');\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t#die_r($settings->api->name);\n\t\t\t\t\t\t$this->registerEngine((String)$settings->api->name,$settings->api->protocols);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function init() {\n\n\t\tif ( ! $this->should_load() ) {\n\t\t\treturn;\n\t\t}\n\t\t$this->setup_admin();\n\t\t$this->setup_api();\n\t}", "public function boot()\n {\n $this->addPaths();\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/config.php' => config_path('jsonapi.php'),\n ], 'config');\n }\n }", "public function boot()\n {\n self::$packageLocation = dirname(__DIR__);\n\n $this->publishes(\n [\n self::$packageLocation . DIRECTORY_SEPARATOR . 'config'\n . DIRECTORY_SEPARATOR . 'repository.php' => config_path('repository.php')\n ],\n 'config'\n );\n\n // Register commands\n if ($this->app->runningInConsole()) {\n $this->commands(\n [\n InterfaceMakeCommand::class,\n RepositoryMakeCommand::class\n ]\n );\n }\n }", "protected function loadSharedServices()\n {\n $di = $this->getDI();\n\n $setup = $di->get('setup');\n $fs = $di->get('fs');\n\n $di->setShared('assets', 'Phalcon\\Assets\\Manager');\n $di->setShared('escaper', 'Phalcon\\Escaper');\n $di->setShared('request', 'Phalcon\\Http\\Request');\n $di->setShared('response', 'Phalcon\\Http\\Response');\n\n $di->setShared('config', 'Phalcana\\Config');\n $di->setShared('inflector', 'Phalcana\\Inflector');\n $di->setShared('arr', 'Phalcana\\Arr');\n $di->setShared('num', 'Phalcana\\Num');\n $di->setShared('tag', 'Phalcon\\Tag');\n $di->setShared('filter', 'Phalcon\\Filter');\n $di->setShared('text', 'Phalcana\\Text');\n $di->setShared('utf8', 'Phalcana\\UTF8');\n $di->setShared('file', 'Phalcana\\File');\n $di->setShared('date', 'Phalcana\\Date');\n $di->setShared('title', 'Phalcana\\Title');\n\n if (UTF8::$server_utf8 === null) {\n // Determine if this server supports UTF-8 natively\n UTF8::$server_utf8 = extension_loaded('mbstring');\n }\n\n /**\n * The URL component is used to generate all kind of urls in the application\n */\n $di->setShared('url', function () use ($setup) {\n $url = new Url();\n $url->setBaseUri($setup->base_url);\n $url->setStaticBaseUri($setup->static_base_url);\n\n return $url;\n });\n\n\n //Registering the view component\n $di->set('view', function () use ($fs) {\n $view = new View();\n $view->setViewsDir('app/views/');\n\n $view->setCascadeDefault(APPPATH.'views');\n $view->setCascadePaths($fs->getModules());\n\n\n $view->registerEngines(array(\n '.volt' => function ($view, $di) {\n\n $volt = new Volt($view, $di);\n\n\n $volt->setOptions(array(\n 'compiledPath' => APPPATH.'cache/',\n 'compiledSeparator' => '_',\n 'compileAlways' => \\Phalcana\\Phalcana::$mode >= \\Phalcana\\Phalcana::PRODUCTION,\n ));\n\n $compiler = $volt->getCompiler();\n\n new Filters($compiler);\n new Functions($compiler);\n\n\n return $volt;\n }\n ));\n\n return $view;\n });\n\n if (isset($setup->database)) {\n $di->set('modelsManager', 'Phalcon\\Mvc\\Model\\Manager');\n $di->set('modelsMetadata', 'Phalcon\\Mvc\\Model\\MetaData\\Memory');\n $di->setShared('db', function () use ($setup) {\n return new \\Phalcon\\Db\\Adapter\\Pdo\\Mysql($setup->database->toArray());\n });\n }\n }", "public function boot(): void\n {\n $this->mergeConfigFrom(__DIR__.'/../config/datatables-fractal.php', 'datatables-fractal');\n $this->publishAssets();\n\n $this->registerMacro();\n }", "public function boot() {\n// $this->mergeConfigFrom(__DIR__ . 'config/core.php', 'core');\n $coreModules = config('core.modules');\n\n foreach ($coreModules as $index => $module) {\n if ($module === true) {\n $routesDir = base_path('app/core/' . $index . '/routes.php');\n $this->loadRoutesFrom($routesDir);\n }\n }\n }", "public function boot(){\n\n\t\t$this->bootConfig();\n\n\t}", "protected function setUp()\n {\n $this->api_key = getenv('API_KEY');\n $this->api = new Api($this->api_key);\n }", "public function boot()\n {\n $this->publishes([\n __DIR__ . '/../config/getresponse.php' => config_path('getresponse.php')\n ]);\n }", "public function boot()\n {\n $this->publishes([$this->getConfigSource() => config_path('sinput.php')]);\n $this->loadRequestMacros();\n }", "public function boot()\n {\n $this->publishConfig();\n }", "public function boot()\n {\n parent::boot();\n\n $this->publishes([\n __DIR__.'/Config/config.php' => config_path('sanity.php'),\n ], 'config');\n\n $this->publishes([\n __DIR__.'/Config/phpcs.xml' => base_path('phpcs.xml'),\n ], 'config');\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n \\Sanity\\Commands\\SanityMock::class,\n \\Sanity\\Commands\\SanityReset::class,\n ]);\n }\n }", "protected function registerApiRoutes()\n {\n if (config('firefly.api.enabled')) {\n Route::group(config('firefly.api'), function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/api.php');\n });\n }\n }", "protected function init_api() {\n\t\tinclude_once dirname( __FILE__ ) . '/includes/class-coinbase-api-handler.php';\n\n\t\tCoinbase_API_Handler::$log = get_class( $this ) . '::log';\n\t\tCoinbase_API_Handler::$api_key = $this->get_option( 'api_key' );\n\t}", "abstract protected function loadConfiguration(): Swagger;", "public function boot()\n { \n $this->routes(); \n\n SnailServices::serving(function() {\n SnailServices::resources([\n Snail\\Zone::class,\n Snail\\City::class,\n Snail\\Food::class,\n Snail\\Menu::class,\n Snail\\Restaurant::class,\n Snail\\RestaurantType::class,\n ]);\n });\n\n \\Config::set('snail.path', '/api');\n }" ]
[ "0.71126467", "0.69415534", "0.69392544", "0.69214296", "0.69073725", "0.6560346", "0.6252544", "0.6247548", "0.62093", "0.61865205", "0.61359745", "0.61282855", "0.6107575", "0.6106786", "0.6054576", "0.6041389", "0.6040304", "0.6039748", "0.6029171", "0.6015021", "0.6007277", "0.5999116", "0.5997851", "0.5953159", "0.5941669", "0.5936209", "0.5931281", "0.59226483", "0.59183544", "0.5885864", "0.58847773", "0.58823496", "0.58797634", "0.5861088", "0.5833776", "0.5832749", "0.58297944", "0.58238035", "0.58213586", "0.5818419", "0.58155394", "0.58083934", "0.5807588", "0.58036137", "0.57972276", "0.57965225", "0.57924855", "0.57924354", "0.5784337", "0.57782674", "0.57744306", "0.5765873", "0.57635164", "0.5757308", "0.5754813", "0.5753685", "0.5753308", "0.57412237", "0.57399094", "0.5739209", "0.5738101", "0.5735615", "0.57292724", "0.57147324", "0.5710573", "0.570671", "0.5695945", "0.5692251", "0.5689799", "0.56835675", "0.56764215", "0.56749845", "0.56710184", "0.56710184", "0.56710184", "0.56710184", "0.56710184", "0.56710184", "0.56710184", "0.56710184", "0.5663685", "0.566023", "0.56601435", "0.5638873", "0.5636109", "0.56322944", "0.5628274", "0.56267524", "0.56251496", "0.5624603", "0.5619549", "0.56177115", "0.5617327", "0.56162846", "0.5611763", "0.5610464", "0.5609459", "0.5606396", "0.5598434", "0.55952847", "0.5595238" ]
0.0
-1
Returns a fully configured builder from a name. Can still be configured more if needed WARNING! Will return a fresh new Builder, not the one in DB exactly.
public static function fromName(MovieId $id, $name) { /* @var $em \Doctrine\ORM\EntityManager */ $em = ServiceDirectory::getInstance()->locate('EntityManager')->getConcreteService(); return static::fromBlueprint($id, $em->getRepository(__CLASS__)->findOneByName($name)->blueprint); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBuilder() {\n if (!isset($this->builder)) {\n if (empty($this->configuration['builder'])) {\n $this->builder = $this->builderManager->createInstance('standard', []);\n }\n else {\n $this->builder = $this->builderManager->createInstance($this->configuration['builder'], []);\n }\n }\n return $this->builder;\n }", "public function getBuilder()\n {\n $class = '\\ReneDeKat\\Quickbooks\\Builders\\\\'.$this->getClassName();\n\n return new $class($this);\n }", "public function getGridBuilder($name);", "public function getBuilder();", "protected function getBuilder()\n {\n return $this->builder;\n }", "public function createNamedBuilder($name, array $data = array(), array $options = array());", "public function builder()\n {\n return new Builder($this);\n }", "public function builder()\n {\n return $this->builder;\n }", "public function getBuilder()\n {\n return $this->builder;\n }", "public function getBuilder()\n {\n return $this->builder;\n }", "public function builder()\n {\n if ($this->parent) {\n return $this->parent->builder();\n }\n\n if (is_null($this->builder)) {\n $this->builder = new Builder($this);\n }\n\n return $this->builder;\n }", "public function getBuilder()\n {\n return $this->_builder;\n }", "public function createBuilder($name, $data = null);", "static public function builder(): Builder\n {\n return new Builder;\n }", "public function getGridBuilder($name)\n {\n if (!isset($this->serviceIds[$name])) {\n throw new \\InvalidArgumentException(sprintf('Invalid grid name \"%s\"', $name));\n }\n\n return $this->container->get($this->serviceIds[$name]);\n }", "public function newQueryBuilder()\n {\n return new Builder($this->config);\n }", "protected function newBuilder(): Builder\n {\n return $this->builder = $this->game_play->newQuery();\n }", "public static function builder() {\n\t\treturn new Builder();\n\t}", "public function builder()\n\t{\n\t\t$builder = new Builder($this->request);\n\t\treturn $builder;\n\t}", "public function db_builder() {\n\t\treturn $this->_db_builder;\n\t}", "public function getForm($name)\n {\n return $this->getFormBuilder()->createBuilder($name);\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) { $this->useDefaultSchemaGrammar(); }\n\n //return new Schema\\Builder($this);\n return new FBBuilder($this);\n }", "public static function create()\n {\n return new QueryConfigurationBuilder();\n }", "public static function builder() {\n return new self();\n }", "public static function build() {\n return new Builder();\n }", "public function getSchemaBuilder()\n {\n if ($this->schemaGrammar === null) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new Builder($this);\n }", "public static function connection($name=null)\n {\n if (static::isProxied()) {\n return new Builder(static::$app['db']->connection($name));\n } else {\n return parent::getFacadeAccessor();\n }\n }", "protected function newBaseQueryBuilder()\n {\n $conn = $this->getConnection();\n\n $grammar = $conn->getQueryGrammar();\n\n $builder = new Builder($conn, $grammar, $conn->getPostProcessor());\n\n if (isset($this->rememberFor)) {\n $builder->remember($this->rememberFor);\n }\n\n if (isset($this->rememberCacheTag)) {\n $builder->cacheTags($this->rememberCacheTag);\n }\n\n //if (isset($this->rememberCachePrefix)) {\n //ToDo: see if using server_hostname or whatever speeds this up\n $tenant = app(\\Hyn\\Tenancy\\Environment::class)->tenant();\n if(isset($tenant->id)){\n $set_tenant = $tenant->id;\n }else{\n $set_tenant = \"default\";\n }\n $builder->prefix($set_tenant);\n //}\n\n if (isset($this->rememberCacheDriver)) {\n $builder->cacheDriver($this->rememberCacheDriver);\n }\n\n return $builder;\n }", "public static function connection($name)\n {\n return static::$app['db']->connection($name)->getSchemaBuilder();\n }", "abstract public function getMockBuilder($className): MockBuilder;", "protected function createBuilder()\n\t{\n\t\treturn new Db_CompiledBuilder($this);\n\t}", "protected function getSchemaBuilder()\n {\n return $this->getConnection()->getSchemaBuilder();\n }", "public function builder()\n {\n return null;\n }", "public function createBuilder();", "public function getSchemaBuilder()\n {\n if ( is_null ( $this->schemaGrammar ) ) {\n $this->useDefaultSchemaGrammar ();\n }\n return new Schema\\Builder ( $this );\n }", "public function newBuilder()\n {\n $builder = new Builder;\n $builder->setModel($this);\n\n return $builder;\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new Schema\\Builder($this);\n }", "public function getSchemaBuilder(): SchemaBuilder\n {\n return $this->getContainer()[SchemaBuilder::class];\n }", "public function getSchemaBuilder() : BuilderInterface;", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new MySqlBuilder($this);\n }", "public function getBuilder()\n {\n $builder = new Query\\Builder($this->getKeys());\n $builder->setVisitors([\n new Visitors\\EqVisitor($builder),\n new Visitors\\NotEqVisitor($builder),\n new Visitors\\GtVisitor($builder),\n new Visitors\\GteVisitor($builder),\n new Visitors\\LtVisitor($builder),\n new Visitors\\LteVisitor($builder),\n new Visitors\\CtVisitor($builder),\n new Visitors\\SwVisitor($builder),\n new Visitors\\EwVisitor($builder),\n new Visitors\\AndVisitor($builder),\n new Visitors\\OrVisitor($builder),\n new Visitors\\NotInVisitor($builder),\n new Visitors\\InVisitor($builder),\n new Visitors\\NullVisitor($builder),\n new Visitors\\NotNullVisitor($builder),\n ]);\n\n return $builder;\n }", "public final function getBuilder()\n\t{\n\t\t// By now everything should be set\n\t\t\n\t\t// ensure that we have at least one primary key\n\t\t$pks = $this->getPrimaryKeys();\n\t\tif(empty($pks))\n\t\t{\n\t\t\tthrow new Db_Descriptor_MissingValueException('primary key', $this->getClass());\n\t\t}\n\t\t\n\t\t$b = $this->createBuilder();\n\t\t\n\t\t// let all the plugins have their way with the builder\n\t\tforeach($this->plugins as $p)\n\t\t{\n\t\t\t$p->editBuilder($b);\n\t\t}\n\t\t\n\t\treturn $b;\n\t}", "public function getSchemaBuilder()\n {\n return new Schema\\Builder($this);\n }", "protected function newBaseQueryBuilder() {\n\n\n\t\t\t$connection = $this->getConnection();\n\n\n\t\t\t// we resolve instance here using service container\n\t\t\treturn app(\\MehrIt\\LaraDbExt\\Query\\Builder::class, [\n\t\t\t\t'connection' => $connection,\n\t\t\t]);\n\t\t}", "protected function getWaiterConfig($name)\n {\n if (!$this->canBuild($name)) {\n throw new InvalidArgumentException('No waiter found matching \"' . $name . '\"');\n }\n\n // inflect the name if needed\n $name = isset($this->config[$name]) ? $name : $this->inflector->camel($name);\n $waiter = new WaiterConfig($this->config[$name]);\n $waiter['name'] = $name;\n\n // Always use __default__ as the basis if it's set\n if (isset($this->config['__default__'])) {\n $parentWaiter = new WaiterConfig($this->config['__default__']);\n $waiter = $parentWaiter->overwriteWith($waiter);\n }\n\n // Allow for configuration extensions\n if (isset($this->config[$name]['extends'])) {\n $waiter = $this->getWaiterConfig($this->config[$name]['extends'])->overwriteWith($waiter);\n }\n\n return $waiter;\n }", "protected static function factory($name = 'default')\n {\n if (!isset(self::$instance[$name])) {\n $configs = Frapi_Internal::getCachedDbConfig();\n\n self::$instance[$name] = new PDO(\n 'mysql:dbname='.$configs['db_database'].';host='.$configs['db_hostname'], \n $configs['db_username'], \n $configs['db_password']\n );\n }\n \n return self::$instance[$name];\n }", "public function getFormBuilder()\n {\n $this->formOptions['data_class'] = $this->getClass();\n\n $this->formOptions['allow_extra_fields'] = true;\n $this->formOptions['validation_groups'] = false;\n $this->formOptions['error_bubbling'] = false;\n\n $formBuilder = $this->getFormContractor()->getFormBuilder(\n $this->getUniqid(),\n $this->formOptions\n );\n\n $this->defineFormBuilder($formBuilder);\n\n return $formBuilder;\n }", "public static function builder(): SetAutoAttachRequestBuilder\n\t{\n\t\treturn new SetAutoAttachRequestBuilder();\n\t}", "protected function getTable(): Builder\n {\n return $this->connection->table($this->table);\n }", "public function getBuilderConfig()\n {\n return $this->builder_config;\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new SchemaBuilder($this);\n }", "public static function builder();", "protected function newBaseQueryBuilder()\n {\n $connection = $this->getConnection();\n\n $builder = in_array(self::class, config('autocache.models'))\n ? \\LaravelAutoCache\\Builder::class\n : \\Illuminate\\Database\\Query\\Builder::class;\n\n return new $builder($connection, $connection->getQueryGrammar(), $connection->getPostProcessor());\n }", "public function configureBuilder();", "public function getQueryBuilder(): QueryBuilder\n {\n if (! $this->tableName) {\n throw new \\Madj2k\\SoapApi\\Exception(\n 'No tableName set',\n 1690524569\n );\n }\n\n if (! $this->queryBuilder instanceof \\TYPO3\\CMS\\Core\\Database\\Query\\QueryBuilder) {\n\n /** @var \\TYPO3\\CMS\\Core\\Database\\ConnectionPool $connectionPool */\n $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);\n\n /** @var \\TYPO3\\CMS\\Core\\Database\\Query\\QueryBuilder $queryBuilder */\n $this->queryBuilder = $connectionPool->getQueryBuilderForTable($this->tableName);\n $this->queryBuilder->getRestrictions()->removeAll();\n }\n\n return $this->queryBuilder;\n }", "protected function createQueryBuilder()\n {\n $builder = new QueryBuilder();\n return $builder;\n }", "public static function adapter($name = null) {\n\t\tif (!$name) {\n\t\t\tif (!$names = array_keys(static::$_configurations)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$name = end($names);\n\t\t}\n\t\treturn parent::adapter($name);\n\t}", "final public function db($name = null)\n {\n is_null($name) && $name = $this->_db;\n\n if (is_array($name) && ($config = $name)) {\n return self::factory('Db', $name);\n }\n\n $regName = \"_\". APP_NAME .\"_db_{$name}\";\n if (!$db = Yaf_Registry::get($regName)) {\n $config = Handle_Config::load('database');\n if (!$config || !isset($config[$name])) {\n exit('Error: ' . $name . ' database config not exists.');\n }\n\n $config = $config[$name];\n $adapter = $config['adapter'];\n if (isset($config['masterslave']) && $config['masterslave']) {\n $config = array('adapter' => 'masterslave') + $config;\n } else {\n $config += array('adapter' => 'Pdo_Mysql');\n }\n\n $db = self::factory('Db', $config);\n $db->setAdapter($adapter);\n \n if (isset($this->debug)) {\n $db->debug = !!$this->debug;\n } else if (defined(\"SWITCH_SQL_LOG\")) {\n $db->debug = !!SWITCH_SQL_LOG;\n }\n\n Yaf_Registry::set($regName, $db);\n }\n\n return $db;\n }", "function hook_get_builder($hook, $arg) {\n return hook_get_builder_factory($hook, $arg)->getInstance();\n}", "public function newBuilder()\n {\n return new Builder();\n }", "private function createQueryBuilder(): QueryBuilder\n {\n $queryBuilder = new QueryBuilder();\n $queryBuilder->table(($this->model)::TABLE);\n $this->applyCriteria($queryBuilder);\n $this->applyQueryBuilderUses($queryBuilder);\n return $queryBuilder;\n }", "private function getBuilder(): \\LoyaltyCorp\\ApiDocumenter\\SchemaBuilders\\ObjectSchemaBuilder\n {\n $phpDocExtractor = new PhpDocExtractor();\n $reflectionExtractor = new ReflectionExtractor(\n null,\n null,\n null,\n true,\n ReflectionExtractor::ALLOW_PRIVATE |\n ReflectionExtractor::ALLOW_PROTECTED |\n ReflectionExtractor::ALLOW_PUBLIC\n );\n $propertyInfo = new PropertyInfoExtractor(\n [$reflectionExtractor],\n [$phpDocExtractor, $reflectionExtractor],\n [$phpDocExtractor],\n [],\n []\n );\n\n return new ObjectSchemaBuilder(\n new CamelCaseToSnakeCaseNameConverter(),\n new WrappedPropertyInfoExtractor($propertyInfo),\n new PropertyTypeToSchemaConverter(new OpenApiTypeResolver())\n );\n }", "protected function createCommandBuilder()\n {\n return new CFirebirdCommandBuilder($this);\n }", "public function getRequestBuilder()\n {\n return new RequestBuilder();\n }", "public function get(mixed $key): ?BuilderInterface;", "protected function newBaseQueryBuilder() {\n\n $connection = $this->getConnection();\n\n return new Builder(\n $connection, $connection->getQueryGrammar(), $connection->getPostProcessor()\n );\n }", "protected function builders() {\n return [\n DrupalCoreRecommendedBuilder::class,\n DrupalDevDependenciesBuilder::class,\n DrupalPinnedDevDependenciesBuilder::class,\n ];\n }", "protected function getConfigSchema(): MySqlBuilder\n {\n /* @noinspection PhpUndefinedMethodInspection */\n return \\Schema::connection('config_connection');\n }", "public function newQuery(): Builder\n {\n return new static($this->connection);\n }", "function get_instance_by_name($name) {\n\t\t$this->get_instance(\"\", \"$name\");\n\t\treturn $this;\n\t}", "public function build($driverName,$options=[])\n {\n if(!in_array($driverName, self::$supportDriverMap, true)) {\n throw new InvalidArgumentException(sprintf(\"Don't Support Driver:%s\", $driverName));\n }\n return $this->$driverName($options);\n }", "public function getBuilderFactory()\n {\n return $this->builderFactory;\n }", "public function getWidget($name){\n\t\t\t$class = null;\n\t\t\tif(is_file($this->config['widgetFolder'].$name.'.widget.php')){\n\t\t\t\trequire_once($this->config['widgetFolder'].$name.'.widget.php');\n\t\t\t\t$name = 'UIW_'.$name;\n\t\t\t\t$class = new $name();\n\t\t\t} \n\t\t\treturn $class;\n\t\t}", "public function save($name = null, $generate = -1)\n {\n if (null === $name) {\n $name = $this->getType();\n }\n\n if ($this->dogmatist->getLinkManager()->has($name)) {\n throw new BuilderException(\"A builder with the name '{$name}' already exists\");\n }\n\n $this->dogmatist->save($this, $name, $generate);\n return $this;\n }", "public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }", "public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }", "public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }", "public function getSchemaBuilder()\n {\n $builder = parent::getSchemaBuilder();\n $builder->blueprintResolver(function($table, $callback){\n return new Blueprint($table, $callback);\n });\n return $builder;\n }", "private function makeBuilder(ConfigDTO $configDTO, LogInterface $log): DatabaseBuilder\n {\n return (new BootRemoteBuildLaravel())\n ->log($log)\n ->ensureStorageDirsExist()\n ->makeNewBuilder($configDTO);\n }", "public function build()\n {\n if (empty($this->tables)) {\n throw new \\InvalidArgumentException('Please define your tables first using the tables() method');\n }\n\n if (empty($this->fields)) {\n throw new \\InvalidArgumentException('Please define your fields first using the fields() method');\n }\n\n $tables = $this->getTableCollection();\n $usedTables = new TableCollection();\n\n $fields = $this->getFieldCollection();\n $columns = $this->columns ? $this->columns : array('*');\n\n $this->criteria->build(\n $this->builder,\n $tables,\n $usedTables,\n $fields,\n $columns\n );\n\n return $this->builder;\n }", "private function getOrCreateQueryBuilder(QueryBuilder $queryBuilder = null): QueryBuilder\n {\n return $queryBuilder ?: $this->createQueryBuilder('a');\n }", "public function getPersistenceBuilder()\n {\n if (!$this->persistenceBuilder) {\n $this->persistenceBuilder = new PersistenceBuilder($this->dm, $this, $this->cmd);\n }\n return $this->persistenceBuilder;\n }", "public function getMockBuilder($className)\n {\n if (empty($this->unitTestCase)) {\n $this->unitTestCase = new FunctionalTestCase(get_class($this));\n }\n\n return new MockBuilder($this->unitTestCase, $className);\n }", "public function getConnection($name = ''): QueryBuilderInterface\n\t{\n\t\t// If the parameter is a string, use it as an array index\n\t\tif (is_scalar($name) && isset($this->connections[$name]))\n\t\t{\n\t\t\treturn $this->connections[$name];\n\t\t}\n\t\telse if (empty($name) && ! empty($this->connections)) // Otherwise, return the last one\n\t\t{\n\t\t\treturn end($this->connections);\n\t\t}\n\n\t\t// You should actually connect before trying to get a connection...\n\t\tthrow new InvalidArgumentException('The specified connection does not exist');\n\t}", "public function getDocumentBuilder()\n {\n return Document::query()\n ->where(function($query) {\n return $query->whereRaw($this->getExpandedQuery());\n });\n }", "public function createNamedFormBuilder($name = '', $data = null, array $options = array())\n\t{\n\t\treturn $this->getFormFactory()->createNamedBuilder($name, 'form', $data, $options);\n\t}", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new SQLiteBuilder($this);\n }", "public function createQueryBuilder($createFromConfig = false){\n if($createFromConfig){\n if(!is_a($this->config, 'Krillzip\\\\Diatheke\\\\Configuration')){\n throw new DiathekeException('Failed to create Querybuilder from no Configuration');\n }\n return new QueryBuilder($this->config);\n }else{\n return new QueryBuilder();\n }\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n $builder = new SQLiteBuilder($this);\n $builder->blueprintResolver(function ($table, $callback) {\n return new ExtendedBlueprint($table, $callback);\n });\n\n return $builder;\n }", "private function getOrCreateQueryBuilder(QueryBuilder $queryBuilder = null): QueryBuilder\n {\n return $queryBuilder ?: $this->createQueryBuilder('l');\n }", "private function createBuilder()\n {\n $class = get_class($this->data->getModel());\n\n $this->name = strtolower(class_basename($class));\n\n $result = $this->callEvent($class, [$class => $this->data]);\n\n if ($result instanceof $this->data) {\n $this->data = $result;\n }\n\n $this->makePaginator();\n }", "protected function buildClass($name)\n {\n $stub = $this->files->get($this->getStub());\n\n $table = $this->option('table');\n $prefix = $this->option('prefix');\n if (!$name || !$table) {\n $this->comment('Command: crud-model {name} {--table=} {--prefix=}');\n exit;\n }\n\n return $this->replaceNamespace($stub, $name)\n ->compile($stub, $table, $prefix)\n ->generate($stub)\n ->replaceClass($stub, $name);\n }", "protected function getQueryBuilder()\n {\n if (!$this->getOption('query_builder')) {\n return null;\n }\n\n if (!$this->queryBuilder) {\n $qb = $this->getOption('query_builder');\n\n if ($qb instanceof \\Closure) {\n $class = $this->getOption('class');\n $em = $this->getOption('em');\n $qb = $qb($em->getRepository($class));\n\n if (!$qb instanceof QueryBuilder) {\n throw new InvalidOptionsException(\n 'The closure in the option \"query_builder\" should return a QueryBuilder instance',\n array('query_builder'));\n }\n }\n\n $this->queryBuilder = $qb;\n }\n\n return $this->queryBuilder;\n }", "private function getOrCreateQueryBuilder(QueryBuilder $queryBuilder = null): QueryBuilder\n {\n return $queryBuilder ?: $this->createQueryBuilder('i');\n }", "public function getSchemaBuilder()\n\t{\n return $this->neoeloquent->getSchemaBuilder();\n\t}", "abstract protected function getWebBuildCommandBuilder() : WebBuildCommandBuilder;", "public function createQueryBuilder()\n {\n return new QueryBuilder($this->db);\n }", "public function build()\n {\n return new QueryConfiguration(\n $this->drawCall,\n $this->start,\n $this->length,\n $this->searchValue,\n $this->searchRegex,\n $this->columSearches,\n $this->columnOrders\n );\n }", "protected function build($name)\n {\n $stub = $this->files->get($this->getStub());\n\n return $this->replaceNamespace($stub, $name)->replaceClass($stub, $name);\n }", "public function find(string $finder, array $options = []): Builder;", "protected function newBaseQueryBuilder()\n {\n $connection = $this->getConnection();\n\n return new QueryBuilder($connection, $connection->getPostProcessor());\n }" ]
[ "0.7269407", "0.69374764", "0.6885849", "0.668842", "0.644913", "0.6404858", "0.6380517", "0.63577724", "0.63000286", "0.63000286", "0.6286895", "0.6261281", "0.6256552", "0.6236043", "0.6234523", "0.61169267", "0.61129147", "0.60911095", "0.6063921", "0.60483843", "0.6044646", "0.6029661", "0.5906443", "0.5893888", "0.5878259", "0.586065", "0.58596915", "0.58449674", "0.581035", "0.5771551", "0.5762005", "0.575762", "0.57523227", "0.57407504", "0.5733391", "0.57254916", "0.57141334", "0.56839997", "0.56791556", "0.56556934", "0.5641914", "0.56398135", "0.5628183", "0.56259227", "0.5625421", "0.55805635", "0.5553527", "0.5549867", "0.55002004", "0.5488327", "0.54839396", "0.5443696", "0.5437456", "0.543504", "0.5434559", "0.54243046", "0.5423695", "0.5411393", "0.54024774", "0.53948474", "0.53880876", "0.5370469", "0.5364286", "0.5357286", "0.5346942", "0.5340804", "0.533249", "0.5329788", "0.531855", "0.5315306", "0.53070724", "0.5304918", "0.5303411", "0.52998894", "0.529592", "0.529592", "0.529592", "0.5293683", "0.5276712", "0.5275481", "0.5272908", "0.5250514", "0.5250033", "0.52434045", "0.524195", "0.52347976", "0.52164674", "0.52052027", "0.5202323", "0.5199348", "0.5196489", "0.51926273", "0.51919913", "0.5175889", "0.5175645", "0.5174449", "0.51728636", "0.5165189", "0.5160454", "0.5142743", "0.51398015" ]
0.0
-1
Returns a fully configured builder from a blueprint. Can still be configured more if needed
public static function fromBlueprint(MovieId $id, $blueprint) { $decoded = @json_decode($blueprint, true); if (!$decoded) { throw new InvalidBlueprintException(sprintf('Blueprint not valid JSON: ' . $blueprint)); } if (!isset($decoded['details']) || !is_array($decoded['details'])) { throw new InvalidBlueprintException(sprintf('Blueprint does not contain the minimum fields: ' . $blueprint)); } $class = isset($decoded['builderclass']) ? $decoded['builderclass'] : __CLASS__; /* @var $builder \flims\movie\IBuilder */ $builder = new $class(new Movie($id)); if (isset($decoded['language']) && $decoded['language']) { $builder->setLanguage($decoded['language']); } if (isset($decoded['name']) && $decoded['name']) { $builder->setName($decoded['name']); } if (isset($decoded['providers']) && is_array($decoded['providers'])) { foreach ($decoded['providers'] as $providerCode) { $builder->addProvider($providerCode); } } foreach ($decoded['details'] as $detailArray) { $builder->addDetail($detailArray['code'], isset($detailArray['provider']) ? $detailArray['provider'] : null); } return $builder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBuilder() {\n if (!isset($this->builder)) {\n if (empty($this->configuration['builder'])) {\n $this->builder = $this->builderManager->createInstance('standard', []);\n }\n else {\n $this->builder = $this->builderManager->createInstance($this->configuration['builder'], []);\n }\n }\n return $this->builder;\n }", "public function getSchemaBuilder()\n {\n $builder = parent::getSchemaBuilder();\n $builder->blueprintResolver(function($table, $callback){\n return new Blueprint($table, $callback);\n });\n return $builder;\n }", "public function getBuilder();", "function hook_get_builder($hook, $arg) {\n return hook_get_builder_factory($hook, $arg)->getInstance();\n}", "public function getBuilder()\n {\n $class = '\\ReneDeKat\\Quickbooks\\Builders\\\\'.$this->getClassName();\n\n return new $class($this);\n }", "public function builder()\n {\n return $this->builder;\n }", "protected function getBuilder()\n {\n return $this->builder;\n }", "public function getBuilder()\n {\n return $this->builder;\n }", "public function getBuilder()\n {\n return $this->builder;\n }", "private function getBuilder(): \\LoyaltyCorp\\ApiDocumenter\\SchemaBuilders\\ObjectSchemaBuilder\n {\n $phpDocExtractor = new PhpDocExtractor();\n $reflectionExtractor = new ReflectionExtractor(\n null,\n null,\n null,\n true,\n ReflectionExtractor::ALLOW_PRIVATE |\n ReflectionExtractor::ALLOW_PROTECTED |\n ReflectionExtractor::ALLOW_PUBLIC\n );\n $propertyInfo = new PropertyInfoExtractor(\n [$reflectionExtractor],\n [$phpDocExtractor, $reflectionExtractor],\n [$phpDocExtractor],\n [],\n []\n );\n\n return new ObjectSchemaBuilder(\n new CamelCaseToSnakeCaseNameConverter(),\n new WrappedPropertyInfoExtractor($propertyInfo),\n new PropertyTypeToSchemaConverter(new OpenApiTypeResolver())\n );\n }", "public function getSchemaBuilder(): SchemaBuilder\n {\n return $this->getContainer()[SchemaBuilder::class];\n }", "public function getBuilder()\n {\n return $this->_builder;\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) { $this->useDefaultSchemaGrammar(); }\n\n //return new Schema\\Builder($this);\n return new FBBuilder($this);\n }", "public function builder()\n {\n return new Builder($this);\n }", "public function getSchemaBuilder() : BuilderInterface;", "public function getSchemaBuilder()\n {\n if ( is_null ( $this->schemaGrammar ) ) {\n $this->useDefaultSchemaGrammar ();\n }\n return new Schema\\Builder ( $this );\n }", "public function getSchemaBuilder()\n {\n if ($this->schemaGrammar === null) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new Builder($this);\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new Schema\\Builder($this);\n }", "public function getFormBuilder()\n {\n $this->formOptions['data_class'] = $this->getClass();\n\n $this->formOptions['allow_extra_fields'] = true;\n $this->formOptions['validation_groups'] = false;\n $this->formOptions['error_bubbling'] = false;\n\n $formBuilder = $this->getFormContractor()->getFormBuilder(\n $this->getUniqid(),\n $this->formOptions\n );\n\n $this->defineFormBuilder($formBuilder);\n\n return $formBuilder;\n }", "public function getSchemaBuilder()\n {\n return new Schema\\Builder($this);\n }", "protected function builders() {\n return [\n DrupalCoreRecommendedBuilder::class,\n DrupalDevDependenciesBuilder::class,\n DrupalPinnedDevDependenciesBuilder::class,\n ];\n }", "public function configureBuilder();", "protected function getSchemaBuilder()\n {\n return $this->getConnection()->getSchemaBuilder();\n }", "public static function builder() {\n\t\treturn new Builder();\n\t}", "public function builder()\n\t{\n\t\t$builder = new Builder($this->request);\n\t\treturn $builder;\n\t}", "function hook_get_builder_factory($hook, array $args = array()) {\n require_once 'src/classes/factories/EntityToolboxDependentHookBuilderFactory.inc';\n $args += array('hook' => $hook);\n $hook_info = entity_toolbox_hook_get_info($hook);\n $factoryClass = $hook_info['factory class'];\n $factory = new $factoryClass($args);\n\n return $factory;\n}", "static public function builder(): Builder\n {\n return new Builder;\n }", "public function builder()\n {\n return null;\n }", "public function builder()\n {\n if ($this->parent) {\n return $this->parent->builder();\n }\n\n if (is_null($this->builder)) {\n $this->builder = new Builder($this);\n }\n\n return $this->builder;\n }", "public function createBuilder();", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new SchemaBuilder($this);\n }", "public function getFormBuilder()\n {\n return $this['form.factory'];\n }", "public function getBuilderConfig()\n {\n return $this->builder_config;\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n $builder = new SQLiteBuilder($this);\n $builder->blueprintResolver(function ($table, $callback) {\n return new ExtendedBlueprint($table, $callback);\n });\n\n return $builder;\n }", "public static function builder() {\n return new self();\n }", "private function getContainerBuilder(): ContainerBuilder\n {\n if (null !== self::$containerBuilder) {\n return self::$containerBuilder;\n }\n\n $kernel = $this->getApplication()->getKernel();\n\n $buildContainer = \\Closure::bind(function () {\n return $this->buildContainer();\n }, $kernel, \\get_class($kernel));\n $container = $buildContainer();\n $container->getCompilerPassConfig()->setRemovingPasses([]);\n $container->compile();\n self::$containerBuilder = $container;\n\n return self::$containerBuilder;\n }", "public function getBuilderFactory()\n {\n return $this->builderFactory;\n }", "public static function getSchemaBuilder()\n {\n }", "public function integrate(FormBuilder $builder)\n {\n return $builder;\n }", "public function get_custom_format_builder_instance() {\n\n\t\tif ( ! isset( $this->custom_format_builder ) ) {\n\n\t\t\t$this->custom_format_builder = wc_customer_order_csv_export()->load_class( '/includes/admin/class-wc-customer-order-csv-export-admin-custom-format-builder.php', 'WC_Customer_Order_CSV_Export_Admin_Custom_Format_Builder' );\n\t\t}\n\n\t\treturn $this->custom_format_builder;\n\t}", "private function initBuilder()\n {\n $this->modx->loadClass('transport.modPackageBuilder', '', false, true);\n $this->builder = new \\modPackageBuilder($this->modx);\n }", "public function getSchemaBuilder()\n\t{\n return $this->neoeloquent->getSchemaBuilder();\n\t}", "public function db_builder() {\n\t\treturn $this->_db_builder;\n\t}", "public final function getBuilder()\n\t{\n\t\t// By now everything should be set\n\t\t\n\t\t// ensure that we have at least one primary key\n\t\t$pks = $this->getPrimaryKeys();\n\t\tif(empty($pks))\n\t\t{\n\t\t\tthrow new Db_Descriptor_MissingValueException('primary key', $this->getClass());\n\t\t}\n\t\t\n\t\t$b = $this->createBuilder();\n\t\t\n\t\t// let all the plugins have their way with the builder\n\t\tforeach($this->plugins as $p)\n\t\t{\n\t\t\t$p->editBuilder($b);\n\t\t}\n\t\t\n\t\treturn $b;\n\t}", "private function makeBuilder(ConfigDTO $configDTO, LogInterface $log): DatabaseBuilder\n {\n return (new BootRemoteBuildLaravel())\n ->log($log)\n ->ensureStorageDirsExist()\n ->makeNewBuilder($configDTO);\n }", "private function getBuilder(): RequestBuilder\n {\n return new RequestBuilder(new StreamFactory());\n }", "protected function createCommandBuilder()\n {\n return new CFirebirdCommandBuilder($this);\n }", "public function getFormFieldBuilder(): FormFieldBuilder;", "abstract protected function getWebBuildCommandBuilder() : WebBuildCommandBuilder;", "public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }", "public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }", "public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }", "protected function getVictoireWidget_WidgetFormBuilderService()\n {\n return $this->services['victoire_widget.widget_form_builder'] = new \\Victoire\\Bundle\\WidgetBundle\\Builder\\WidgetFormBuilder($this);\n }", "public static function build() {\n return new Builder();\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('graphql');\n\n //@formatter:off\n $rootNode\n ->children()\n ->arrayNode('schemas')\n ->requiresAtLeastOneElement()\n ->useAttributeAsKey('name')\n ->arrayPrototype()\n ->children()\n ->scalarNode('sdl')\n ->info('Path to the SDL graphql definition')\n ->end()\n ->scalarNode('route')\n ->defaultValue(self::DEFAULT_ROUTE)\n ->treatNullLike(self::DEFAULT_ROUTE)\n ->end()\n ->arrayNode('resolvers')\n ->useAttributeAsKey('type')\n ->isRequired()\n ->requiresAtLeastOneElement()\n ->beforeNormalization()\n ->always(function($resolvers){\n return $this->normalizeResolvers($resolvers);\n })\n ->end()\n ->prototype('scalar')->end()\n ->validate()\n ->always(function($resolvers){\n $this->validateResolvers($resolvers);\n return $resolvers;\n })\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n //@formatter:on\n\n return $treeBuilder;\n }", "public function getBuyerBuilder();", "public function newBuilder()\n {\n $builder = new Builder;\n $builder->setModel($this);\n\n return $builder;\n }", "public static function builder();", "public function getRequestBuilder()\n {\n return new RequestBuilder();\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new MySqlBuilder($this);\n }", "protected function newBuilder(): Builder\n {\n return $this->builder = $this->game_play->newQuery();\n }", "protected function createBuilder()\n\t{\n\t\treturn new Db_CompiledBuilder($this);\n\t}", "public function getBlueprint() {\n return $this->blueprint;\n }", "protected function newBaseQueryBuilder() {\n\n\n\t\t\t$connection = $this->getConnection();\n\n\n\t\t\t// we resolve instance here using service container\n\t\t\treturn app(\\MehrIt\\LaraDbExt\\Query\\Builder::class, [\n\t\t\t\t'connection' => $connection,\n\t\t\t]);\n\t\t}", "protected function entityFormBuilder() {\n if (!$this->entityFormBuilder) {\n $this->entityFormBuilder = $this->container()->get('entity.form_builder');\n }\n return $this->entityFormBuilder;\n }", "public function builder(FormInterface $form)\n {\n return $this->dispatch(new GetStandardFormBuilder($form));\n }", "public function getConfigTreeBuilder()\n {\n }", "public function get(mixed $key): ?BuilderInterface;", "abstract public function getMockBuilder($className): MockBuilder;", "public function getGridBuilder($name);", "function url(): URLBuilder\n\t{\n\t\tstatic $url;\n\n\t\tif($url === null)\n\t\t{\n\t\t\t$url = Application::instance()->getContainer()->get(URLBuilder::class);\n\t\t}\n\n\t\treturn $url;\n\t}", "public static function builder(): SetAutoAttachRequestBuilder\n\t{\n\t\treturn new SetAutoAttachRequestBuilder();\n\t}", "protected function getVictoireWidgetMap_BuilderService()\n {\n return $this->services['victoire_widget_map.builder'] = new \\Victoire\\Bundle\\WidgetMapBundle\\Builder\\WidgetMapBuilder($this->get('victoire_widget_map.contextual_view_warmer'), $this->get('victoire_widget_map.children_resolver'));\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new SQLiteBuilder($this);\n }", "public function describe()\n {\n # create new node builder\n $nodeBuilder = new NodeBuilder('weightSelectorBuilder',$this->eventDispatcher,$this->repo,$this->utilities,$this->generator,$this->locale,$this->database,$this->templateLoader);\n \n # bind this definition as the parent of nodebuilder\n $nodeBuilder->setParent($this);\n \n # return node builder to continue chain\n return $nodeBuilder;\n }", "public function testGetBuilder()\n\t{\n\t\t$serviceContainer = new TheServiceContainer();\n\t\t$container = new FeatureContainer($serviceContainer, $this->getWPDB());\n\t\t$this->assertTrue(is_object($serviceContainer->make(MySqlBuilder::class)));\n\t\t$this->assertTrue(is_object($container->getBuilder()));\n\n\t\t$this->assertTrue(\n\t\t\tis_a(\n\t\t\t\t$container->getBuilder(),\n\t\t\t\tBuilderInterface::class\n\t\t\t)\n\t\t);\n\n\t\t$this->assertEquals(\n\t\t\t$serviceContainer->make(MySqlBuilder::class),\n\t\t\t$container->getBuilder()\n\t\t);\n\t}", "function theme_build($module) {\n $instanceArgs = array(\n 'module' => $module,\n );\n $factoryArgs = array(\n 'instance_args' => $instanceArgs\n );\n $builder = hook_get_builder('theme', $factoryArgs);\n\n return $builder->build();\n}", "protected function builderManager() {\n return \\Drupal::service('plugin.manager.entity_template.builder');\n }", "public function newBuilder()\n {\n return new Builder();\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('deployer');\n\n $this->addServerSection($rootNode);\n $this->addFarmSection($rootNode);\n $this->addProjectSection($rootNode);\n\n return $treeBuilder;\n }", "public function createBuilder($name, $data = null);", "public function newQueryBuilder()\n {\n return new Builder($this->config);\n }", "public function builder(PapayaUiDialogFieldBuilderArray $builder = NULL) {\n if (isset($builder)) {\n $this->_builder = $builder;\n } elseif (NULL === $this->_builder) {\n $this->_builder = new PapayaUiDialogFieldBuilderArray($this, $this->_fields);\n }\n return $this->_builder;\n }", "public function getConfigTreeBuilder(): TreeBuilder\n {\n $treeBuilder = new TreeBuilder();\n $treeBuilder->root('s_redbull_api_doc')\n ->children()\n ->arrayNode('documentation')\n ->children()\n ->arrayNode('info')\n ->children()\n ->scalarNode('title')->end()\n ->scalarNode('description')->end()\n ->scalarNode('termsOfService')->end()\n ->arrayNode('contact')\n ->children()\n ->scalarNode('name')->end()\n ->scalarNode('url')->end()\n ->scalarNode('email')->end()\n ->end()\n ->end()\n ->arrayNode('license')\n ->children()\n ->scalarNode('name')->end()\n ->scalarNode('url')->end()\n ->end()\n ->end()\n ->scalarNode('version')->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "protected function build(Blueprint $blueprint)\n {\n $blueprint->build($this->getConnection(), $this->grammar);\n }", "protected static function getFacadeAccessor()\n {\n return \\MonthlyCloud\\Sdk\\Builder::class;\n }", "public function setBuilder($builder) {\n if ($builder instanceof DisplayBuilderInterface) {\n $this->builder = $builder;\n $this->configuration['builder'] = $builder->getPluginId();\n }\n elseif (is_string($builder)) {\n $this->builder = NULL;\n $this->configuration['builder'] = $builder;\n }\n else {\n throw new \\Exception(\"Builder must be a string or DisplayBuilderInterface object\");\n }\n\n return $this;\n }", "public function getConfigTreeBuilder(): TreeBuilder\n {\n $treeBuilder = new TreeBuilder('knp_gaufrette');\n if (method_exists($treeBuilder, 'getRootNode')) {\n $rootNode = $treeBuilder->getRootNode();\n } else {\n // BC for symfony/config < 4.2\n $rootNode = $treeBuilder->root('knp_gaufrette');\n }\n\n $rootNode\n ->ignoreExtraKeys()\n ->fixXmlConfig('factory', 'factories')\n ->children()\n ->arrayNode('factories')\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n // to stick with strict snake_case to make sure it works.\n if (method_exists(TreeBuilder::class, 'getRootNode')) {\n $treeBuilder = new TreeBuilder('meteo_concept_h_captcha');\n $rootNode = $treeBuilder->getRootNode();\n } else {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('meteo_concept_h_captcha');\n }\n\n $rootNode\n ->children()\n ->arrayNode('hcaptcha')\n ->info(\"The configuration value of your hCaptcha account (visit https://dashboard.hcaptcha.com to find them).\")\n ->children()\n ->scalarNode('site_key')\n ->info(\"The site key for this website.\")\n ->defaultValue(null)\n ->end()\n ->scalarNode('secret')\n ->info(\"The secret used to authenticate requests to hCaptcha verification endpoint.\")\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "protected function newBaseQueryBuilder()\n {\n $conn = $this->getConnection();\n\n $grammar = $conn->getQueryGrammar();\n\n $builder = new Builder($conn, $grammar, $conn->getPostProcessor());\n\n if (isset($this->rememberFor)) {\n $builder->remember($this->rememberFor);\n }\n\n if (isset($this->rememberCacheTag)) {\n $builder->cacheTags($this->rememberCacheTag);\n }\n\n //if (isset($this->rememberCachePrefix)) {\n //ToDo: see if using server_hostname or whatever speeds this up\n $tenant = app(\\Hyn\\Tenancy\\Environment::class)->tenant();\n if(isset($tenant->id)){\n $set_tenant = $tenant->id;\n }else{\n $set_tenant = \"default\";\n }\n $builder->prefix($set_tenant);\n //}\n\n if (isset($this->rememberCacheDriver)) {\n $builder->cacheDriver($this->rememberCacheDriver);\n }\n\n return $builder;\n }", "protected function getTable(): Builder\n {\n return $this->connection->table($this->table);\n }", "public function getBlueprintOrDefault($name)\n {\n if (!$this->getBlueprint($name)) {\n $this->blueprints[$name] = $this->getDefaultBlueprint($name);\n }\n \n return $this->blueprints[$name]->setFactory($this);\n }", "public function setFormBuilder(FormBuilder $form_builder): Form;", "public static function build(callable $builderConfiguration): Car\n {\n $builder = self::getBuilder();\n\n /**\n * The $builderConfiguration is the connection fron the outside world to the\n * transaction step: It adjusts the $builder object to have it set up in a\n * proper state.\n */\n $builderConfiguration($builder);\n\n /*\n * Kindly ask the builder to create a new object based on the current builder\n * configuration.\n */\n return $builder();\n }", "protected function getConfigSchema(): MySqlBuilder\n {\n /* @noinspection PhpUndefinedMethodInspection */\n return \\Schema::connection('config_connection');\n }", "public function createNamedBuilder($name, array $data = array(), array $options = array());", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder('chameleon_system_core');\n $root = $treeBuilder->getRootNode();\n $root->isRequired();\n\n $root\n ->children()\n ->scalarNode('vendor_dir')->end()\n ->scalarNode('redirectstrategy')\n ->defaultValue('registershutdown')\n ->end()\n ->scalarNode('query_modifier_order_by_class')->end()\n ->arrayNode('pdo')\n ->children()\n ->scalarNode('mysql_attr_init_command')->end()\n ->end()\n ->end()\n ->append($this->getCronjobConfig())\n ->append($this->getMailTargetTransformationServiceConfig())\n ->append($this->getMailerConfig())\n ->append($this->getGoogleMapsApiConfig())\n ->append($this->getBackendConfig())\n ->append($this->getModuleExecutionConfig())\n ->append($this->getResourceCollectionConfig())\n ;\n\n return $treeBuilder;\n }", "function componentBuilder() { $this->__construct(); }", "private function createBuilder()\n {\n $class = get_class($this->data->getModel());\n\n $this->name = strtolower(class_basename($class));\n\n $result = $this->callEvent($class, [$class => $this->data]);\n\n if ($result instanceof $this->data) {\n $this->data = $result;\n }\n\n $this->makePaginator();\n }", "protected function getFormBuilder(array $columns)\n {\n $form = $this->createFormBuilder();\n foreach ($columns as $param)\n $form = $form->add($param);\n return $form;\n }" ]
[ "0.7395622", "0.7126902", "0.68199986", "0.6604231", "0.6525403", "0.65143234", "0.64961666", "0.6472901", "0.6472901", "0.6418467", "0.6370209", "0.6362489", "0.62549376", "0.6190722", "0.6159018", "0.6040525", "0.6022956", "0.59819746", "0.59776586", "0.59774977", "0.5973472", "0.59565073", "0.593515", "0.5920662", "0.5916734", "0.59059167", "0.5887607", "0.5884357", "0.58547664", "0.58250034", "0.5806417", "0.5792893", "0.57528096", "0.57154053", "0.57142174", "0.56891006", "0.56612825", "0.5655135", "0.5599931", "0.55225706", "0.55077565", "0.5486151", "0.5485188", "0.5481731", "0.54714346", "0.5467716", "0.54667604", "0.54621685", "0.54538476", "0.54428446", "0.54428446", "0.54428446", "0.54186976", "0.5415217", "0.5392142", "0.53911126", "0.5380875", "0.5378524", "0.5365035", "0.5341112", "0.5321236", "0.530941", "0.53018206", "0.52988434", "0.5294529", "0.5282989", "0.52635455", "0.52607906", "0.5240357", "0.5204158", "0.52017677", "0.51955336", "0.5192546", "0.51865274", "0.51767147", "0.5176168", "0.5173956", "0.51688373", "0.5163024", "0.5145727", "0.51287866", "0.5126403", "0.5112053", "0.51083404", "0.50981134", "0.50970066", "0.5095354", "0.50806016", "0.5075513", "0.50707614", "0.50610393", "0.50557333", "0.5053286", "0.505141", "0.50400096", "0.5034739", "0.50158453", "0.49984714", "0.49872613", "0.49692833" ]
0.50666034
90
ISO 639 ("en") or IETF ("enUS") language code
public function setLanguage($langCode) { $this->language = $langCode; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getLocaleCode();", "public static function getDefaultLanguageCode() {\n\t\t$oSprache = UnzerCw_VersionHelper::getInstance()->getDb()->executeQuery(\"SELECT kSprache, cISO FROM tsprache WHERE cShopStandard = 'Y'\", 1);\n\t\tif($oSprache->kSprache > 0) {\n\t\t\treturn UnzerCw_VersionHelper::getInstance()->convertISO2ISO639($oSprache->cISO);\n\t\t}\n\t\telse {\n\t\t\treturn 'de';\n\t\t}\n\t}", "public function getCompatibleLanguageQuaderno() {\n $country = $this->getCountry();\n $spanishSpeaking = pais::getCountriesSpanishSpeaking();\n if (array_key_exists($country->getUID(), $spanishSpeaking)) {\n return 'ES';\n } else {\n switch ($country->getUID()) {\n case pais::PORTUGAL_CODE:\n return 'PT';\n break;\n case pais::FRANCE_CODE:\n return 'FR';\n break;\n default:\n return 'EN';\n }\n }\n\n return 'EN';\n }", "public function getLocaleCode()\n {\n return @$this->_server['HTTP_ACCEPT_LANGUAGE'];\n }", "private function getWindowsLanguageCode()\n {\n $languageID = $this->languageID;\n $languageID &= 0xff;\n\n // The low-order bytes specify the language, the high-order bytes specify the dialect. We just care about\n // the language. For the complete list, see: http://www.microsoft.com/globaldev/reference/lcid-all.mspx\n switch ($languageID) {\n case 0x09:\n return 'en';\n case 0x0c:\n return 'fr';\n case 0x07:\n return 'de';\n case 0x10:\n return 'it';\n case 0x13:\n return 'nl';\n case 0x1d:\n return 'sv';\n case 0x0a:\n return 'es';\n case 0x06:\n return 'da';\n case 0x16:\n return 'pt';\n case 0x14:\n return 'no';\n case 0x0d:\n return 'he';\n case 0x11:\n return 'ja';\n case 0x01:\n return 'ar';\n case 0x0b:\n return 'fi';\n case 0x08:\n return 'el';\n default:\n return null;\n }\n }", "abstract public function countryISOCode();", "public function getLanguageCode()\n {\n return str_replace('_', '-', $this->_code);\n }", "function languageISO()\r\n {\r\n if ( $this->LanguageISO != \"\" )\r\n return $this->LanguageISO;\r\n else\r\n return false;\r\n }", "function get_lang_locale() {\n\tglobal $lang_code;\n\t$localeMap = array(\n\t\t'ca' => 'ca_ES',\n\t\t'cs' => 'cs_CZ',\n\t\t'cy' => 'cy_GB',\n\t\t'da' => 'da_DK',\n\t\t'de' => 'de_DE',\n\t\t'eu' => 'eu_ES',\n\t\t'en' => 'en_US',\n\t\t'es' => 'es_ES',\n\t\t'fi' => 'fi_FI',\n\t\t'fr' => 'fr_FR',\n\t\t'gl' => 'gl_ES',\n\t\t'hu' => 'hu_HU',\n\t\t'it' => 'it_IT',\n\t\t'ja' => 'ja_JP',\n\t\t'ko' => 'ko_KR',\n\t\t'nb' => 'nb_NO',\n\t\t'nl' => 'nl_NL',\n\t\t'pl' => 'pl_PL',\n\t\t'pt' => 'pt_BR',\n\t\t'ro' => 'ro_RO',\n\t\t'ru' => 'ru_RU',\n\t\t'sk' => 'sk_SK',\n\t\t'sl' => 'sl_SI',\n\t\t'sv' => 'sv_SE',\n\t\t'th' => 'th_TH',\n\t\t'tr' => 'tr_TR',\n\t\t'ku' => 'ku_TR',\n\t\t'zh_CN' => 'zh_CN',\n\t\t'zh_TW' => 'zh_TW',\n\t\t'af' => 'af_ZA',\n\t\t'sq' => 'sq_AL',\n\t\t'hy' => 'hy_AM',\n\t\t'az' => 'az_AZ',\n\t\t'be' => 'be_BY',\n\t\t'bs' => 'bs_BA',\n\t\t'bg' => 'bg_BG',\n\t\t'hr' => 'hr_HR',\n\t\t'eo' => 'eo_EO',\n\t\t'et' => 'et_EE',\n\t\t'fo' => 'fo_FO',\n\t\t'ka' => 'ka_GE',\n\t\t'el' => 'el_GR',\n\t\t'hi' => 'hi_IN',\n\t\t'is' => 'is_IS',\n\t\t'id' => 'id_ID',\n\t\t'ga' => 'ga_IE',\n\t\t'jv' => 'jv_ID',\n\t\t'kk' => 'kk_KZ',\n\t\t'la' => 'la_VA',\n\t\t'lv' => 'lv_LV',\n\t\t'lt' => 'lt_LT',\n\t\t'mk' => 'mk_MK',\n\t\t'mg' => 'mg_MG',\n\t\t'ms' => 'ms_MY',\n\t\t'mt' => 'mt_MT',\n\t\t'mn' => 'mn_MN',\n\t\t'ne' => 'ne_NP',\n\t\t'rm' => 'rm_CH',\n\t\t'sr' => 'sr_RS',\n\t\t'so' => 'so_SO',\n\t\t'sw' => 'sw_KE',\n\t\t'tl' => 'tl_PH',\n\t\t'uk' => 'uk_UA',\n\t\t'uz' => 'uz_UZ',\n\t\t'vi' => 'vi_VN',\n\t\t'zu' => 'zu_ZA',\n\t\t'ar' => 'ar_AR',\n\t\t'he' => 'he_IL',\n\t\t'ur' => 'ur_PK',\n\t\t'fa' => 'fa_IR',\n\t\t'sy' => 'sy_SY',\n\t\t'gn' => 'gn_PY'\n\t);\n\treturn (check_value($localeMap[$lang_code])) ? $localeMap[$lang_code] : 'en_US';\n}", "public function getFixedLanguageCode() {\n\t\treturn LanguageFactory::fixLanguageCode($this->languageCode);\n\t}", "public function languageCode()\n {\n $languageObject = $this->languageObject();\n return ( $languageObject !== false ) ? $languageObject->attribute( 'locale' ) : false;\n }", "public function getLangcode() {\n }", "public function getLanguageCode();", "public function getLanguageIsoCode()\n {\n return $this->languageIsoCode;\n }", "protected function getTranslationCode()\n {\n $code = 'en';\n\n if (\\XLite\\Logic\\Import\\Importer::getLanguageCode()) {\n $code = \\XLite\\Logic\\Import\\Importer::getLanguageCode();\n\n } elseif (!\\XLite::isCacheBuilding()\n && \\XLite\\Core\\Session::getInstance()->getLanguage()\n ) {\n $code = \\XLite\\Core\\Session::getInstance()->getLanguage()->getCode();\n }\n\n return $code;\n }", "private function getLanguageCode()\n\t{\n\t\t$codes = [\n\t\t\t'en-CA', 'en-US', 'en-GB', 'es', 'es-AR', 'es-ES', 'es-MX', 'fr', 'fr-FR', 'fr-US', 'de', 'de-DE', 'ru', 'ru-MO', 'zh', 'zh-TW', 'zh-CN', 'zh-SG',\n\t\t];\n\n\t\treturn $codes[mt_rand(0, count($codes) - 1)];\n\t}", "public function getFromLanguage(): string;", "public static function iso31661Code(): string\n {\n return 'iso';\n }", "public function getLanguage()\n {\n return substr($this->server['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n }", "function httpbl_lang()\n {\n foreach(explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']) as $language)\n { if ($language=='fr') { return 'fr'; } }\n return 'en';\n }", "public function getLanguageCode() {\r\n\t\treturn ($this->jLanguageTable->sef!='') ? $this->jLanguageTable->sef : $this->jLanguageTable->lang_code;\r\n\t}", "public function getCode(): string\n {\n return $this->language;\n }", "function LanguageCodes() {\n\t\treturn [\n\t\t\t'en_US' => 'English',\n\t\t\t'da_DK' => 'Dansk',\n\t\t\t'de_DE' => 'Deutsch',\n\t\t\t'es_ES' => 'Español',\n\t\t\t'fr_FR' => 'Français',\n\t\t\t'hr_HR' => 'Hrvatski',\n\t\t\t'it_IT' => 'Italiano',\n\t\t\t'nl_NL' => 'Nederlands',\n\t\t\t'pt_BR' => 'Português (Brasil)',\n\t\t\t'pt_PT' => 'Português (Europa)',\n\t\t\t'ru_RU' => 'Русский',\n\t\t\t'he_IL' => 'עברית‬',\n\t\t\t'th_TH' => 'ภาษาไทย',\n\t\t\t'zh_TW' => '中文 (繁體)',\n\t\t\t'pl_PL' => 'Polski',\n\t\t];\n\t}", "final protected function get_language() {\n\t\tif (preg_match('/[a-z]{2}-[a-z]{2}/', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), $matches))\n\t\t\treturn $matches[0];\n\t\treturn false;\n\t}", "public function getLang() {\n\t\treturn substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);\n\t}", "function lang_encode_from_utf($strValue)\r\n{\r\n\tif(function_exists(\"iconv\"))\r\n\t\treturn iconv('UTF-8','Windows-1252',$strValue);\r\n\treturn $strValue;\r\n}", "function getPNlanguage()\n{\n\tpnBlockLoad('Core', 'thelang');\n// All entries use ISO 639-2/T\n\t$lang['ara'] = \"Arabic\";\n\t$lang['alb'] = \"Albanian\"; \n\t$lang['bul'] = \"Bulgarian\";\n\t$lang['zho'] = \"Chinese\";\n\t$lang['cat'] = \"Catalan\";\n\t$lang['ces'] = \"Czech\";\n\t$lang['hrv'] = \"Croatian HRV\";\n\t$lang['cro'] = \"Croatian CRO\";\n\t$lang['dan'] = \"Danish\";\n\t$lang['nld'] = \"Dutch\";\n\t$lang['eng'] = \"English\";\n\t$lang['epo'] = \"Esperanto\";\n\t$lang['est'] = \"Estonian\";\n\t$lang['fin'] = \"Finnish\";\n\t$lang['fra'] = \"French\";\n\t$lang['deu'] = \"German\";\n\t$lang['ell'] = \"Greek\";\n\t$lang['heb'] = \"Hebrew\";\n\t$lang['hun'] = \"Hungarian\";\n\t$lang['isl'] = \"Icelandic\";\n\t$lang['ind'] = \"Indonesian\";\n\t$lang['ita'] = \"Italian\";\n\t$lang['jpn'] = \"Japanese\";\n\t$lang['kor'] = \"Korean\";\n\t$lang['lav'] = \"Latvian\";\n\t$lang['lit'] = \"Lithuanian\";\n\t$lang['mas'] = \"Malay\";\n\t$lang['mkd'] = \"Macedonian\";\n\t$lang['nor'] = \"Norwegian\";\n\t$lang['pol'] = \"Polish\";\n\t$lang['por'] = \"Portuguese\";\n\t$lang['ron'] = \"Romanian\";\n\t$lang['rus'] = \"Russian\";\n\t$lang['slv'] = \"Slovenian\";\n\t$lang['spa'] = \"Spanish\";\n\t$lang['swe'] = \"Swedish\";\n\t$lang['tha'] = \"Thai\";\n\t$lang['tur'] = \"Turkish\";\n\t$lang['ukr'] = \"Ukrainian\";\n\t$lang['yid'] = \"Yiddish\";\n\n\treturn strtolower($lang[pnSessionGetVar('lang')]);\n}", "private function getMacintoshLanguageCode()\n {\n $languageID = $this->languageID;\n\n switch ($languageID) {\n case 0:\n return 'en';\n case 1:\n return 'fr';\n case 2:\n return 'de';\n case 3:\n return 'it';\n case 4:\n return 'nl';\n case 5:\n return 'sv';\n case 6:\n return 'es';\n case 7:\n return 'da';\n case 8:\n return 'pt';\n case 9:\n return 'no';\n case 10:\n return 'he';\n case 11:\n return 'ja';\n case 12:\n return 'ar';\n case 13:\n return 'fi';\n case 14:\n return 'el';\n default:\n return null;\n }\n }", "public function getLanguageCode()\n {\n return $this->language_code;\n }", "public function getLanguageCode()\n {\n return $this->language_code;\n }", "function JAPANIZE_languageToLangId($language) {\n $retval = '';\n \n $lang_mappings = array(\n 'afrikaans' => 'af',\n 'bosnian' => 'bs',\n 'bulgarian' => 'bg',\n 'catalan' => 'ca',\n 'chinese_simplified' => 'zh-cn',\n 'chinese_traditional' => 'zh',\n 'croatian' => 'hr',\n 'czech' => 'cs',\n 'danish' => 'da',\n 'dutch' => 'nl',\n 'english' => 'en',\n 'estonian' => 'et',\n 'farsi' => 'fa',\n 'finnish' => 'fi',\n 'french_canada' => 'fr-ca',\n 'french_france' => 'fr',\n 'german' => 'de',\n 'german_formal' => 'de',\n 'hebrew' => 'he',\n 'hellenic' => 'el',\n 'indonesian' => '',\n 'italian' => 'it',\n 'japanese' => 'ja',\n 'korean' => 'ko',\n 'norwegian' => 'no',\n 'polish' => 'pl',\n 'portuguese' => 'pt',\n 'portuguese_brazil' => 'pt-br',\n 'romanian' => 'ro',\n 'russian' => 'ru',\n 'slovak' => 'sk',\n 'slovenian' => 'sl',\n 'spanish' => 'es',\n 'spanish_argentina' => 'es',\n 'swedish' => 'sv',\n 'turkish' => 'tr',\n 'ukrainian' => 'uk',\n );\n\n if (isset($language)) {\n $lang = str_replace('_utf-8', '', $language);\n \n if (isset($lang_mappings[$lang])) {\n $retval = $lang_mappings[$lang];\n }\n }\n\n return $retval;\n}", "function guess_lang()\n\t{\n\n\t\t// The order here _is_ important, at least for major_minor matches.\n\t\t// Don't go moving these around without checking with me first - psoTFX\n\t\t$match_lang = array(\n\t\t\t'arabic'\t\t\t\t\t\t\t\t\t\t\t=> 'ar([_-][a-z]+)?',\n\t\t\t'bulgarian'\t\t\t\t\t\t\t\t\t\t=> 'bg',\n\t\t\t'catalan'\t\t\t\t\t\t\t\t\t\t\t=> 'ca',\n\t\t\t'czech'\t\t\t\t\t\t\t\t\t\t\t\t=> 'cs',\n\t\t\t'danish'\t\t\t\t\t\t\t\t\t\t\t=> 'da',\n\t\t\t'german'\t\t\t\t\t\t\t\t\t\t\t=> 'de([_-][a-z]+)?',\n\t\t\t'english'\t\t\t\t\t\t\t\t\t\t\t=> 'en([_-][a-z]+)?',\n\t\t\t'estonian'\t\t\t\t\t\t\t\t\t\t=> 'et',\n\t\t\t'finnish'\t\t\t\t\t\t\t\t\t\t\t=> 'fi',\n\t\t\t'french'\t\t\t\t\t\t\t\t\t\t\t=> 'fr([_-][a-z]+)?',\n\t\t\t'greek'\t\t\t\t\t\t\t\t\t\t\t\t=> 'el',\n\t\t\t'spanish_argentina'\t\t\t\t\t\t=> 'es[_-]ar',\n\t\t\t'spanish'\t\t\t\t\t\t\t\t\t\t\t=> 'es([_-][a-z]+)?',\n\t\t\t'gaelic'\t\t\t\t\t\t\t\t\t\t\t=> 'gd',\n\t\t\t'galego'\t\t\t\t\t\t\t\t\t\t\t=> 'gl',\n\t\t\t'gujarati'\t\t\t\t\t\t\t\t\t\t=> 'gu',\n\t\t\t'hebrew'\t\t\t\t\t\t\t\t\t\t\t=> 'he',\n\t\t\t'hindi'\t\t\t\t\t\t\t\t\t\t\t\t=> 'hi',\n\t\t\t'croatian'\t\t\t\t\t\t\t\t\t\t=> 'hr',\n\t\t\t'hungarian'\t\t\t\t\t\t\t\t\t\t=> 'hu',\n\t\t\t'icelandic'\t\t\t\t\t\t\t\t\t\t=> 'is',\n\t\t\t'indonesian'\t\t\t\t\t\t\t\t\t=> 'id([_-][a-z]+)?',\n\t\t\t'italian'\t\t\t\t\t\t\t\t\t\t\t=> 'it([_-][a-z]+)?',\n\t\t\t'japanese'\t\t\t\t\t\t\t\t\t\t=> 'ja([_-][a-z]+)?',\n\t\t\t'korean'\t\t\t\t\t\t\t\t\t\t\t=> 'ko([_-][a-z]+)?',\n\t\t\t'latvian'\t\t\t\t\t\t\t\t\t\t\t=> 'lv',\n\t\t\t'lithuanian'\t\t\t\t\t\t\t\t\t=> 'lt',\n\t\t\t'macedonian'\t\t\t\t\t\t\t\t\t=> 'mk',\n\t\t\t'dutch'\t\t\t\t\t\t\t\t\t\t\t\t=> 'nl([_-][a-z]+)?',\n\t\t\t'norwegian'\t\t\t\t\t\t\t\t\t\t=> 'no',\n\t\t\t'punjabi'\t\t\t\t\t\t\t\t\t\t\t=> 'pa',\n\t\t\t'polish'\t\t\t\t\t\t\t\t\t\t\t=> 'pl',\n\t\t\t'portuguese_brazil'\t\t\t\t\t\t=> 'pt[_-]br',\n\t\t\t'portuguese'\t\t\t\t\t\t\t\t\t=> 'pt([_-][a-z]+)?',\n\t\t\t'romanian'\t\t\t\t\t\t\t\t\t\t=> 'ro([_-][a-z]+)?',\n\t\t\t'russian'\t\t\t\t\t\t\t\t\t\t\t=> 'ru([_-][a-z]+)?',\n\t\t\t'slovenian'\t\t\t\t\t\t\t\t\t\t=> 'sl([_-][a-z]+)?',\n\t\t\t'albanian'\t\t\t\t\t\t\t\t\t\t=> 'sq',\n\t\t\t'serbian'\t\t\t\t\t\t\t\t\t\t\t=> 'sr([_-][a-z]+)?',\n\t\t\t'slovak'\t\t\t\t\t\t\t\t\t\t\t=> 'sv([_-][a-z]+)?',\n\t\t\t'swedish'\t\t\t\t\t\t\t\t\t\t\t=> 'sv([_-][a-z]+)?',\n\t\t\t'thai'\t\t\t\t\t\t\t\t\t\t\t\t=> 'th([_-][a-z]+)?',\n\t\t\t'turkish'\t\t\t\t\t\t\t\t\t\t\t=> 'tr([_-][a-z]+)?',\n\t\t\t'ukranian'\t\t\t\t\t\t\t\t\t\t=> 'uk([_-][a-z]+)?',\n\t\t\t'urdu'\t\t\t\t\t\t\t\t\t\t\t\t=> 'ur',\n\t\t\t'viatnamese'\t\t\t\t\t\t\t\t\t=> 'vi',\n\t\t\t'chinese_traditional_taiwan'\t=> 'zh[_-]tw',\n\t\t\t'chinese_simplified'\t\t\t\t\t=> 'zh',\n\t\t);\n\n\t\tif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))\n\t\t{\n\t\t\t$accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n\t\t\tfor ($i = 0; $i < sizeof($accept_lang_ary); $i++)\n\t\t\t{\n\t\t\t\t@reset($match_lang);\n\t\t\t\twhile (list($lang, $match) = each($match_lang))\n\t\t\t\t{\n\t\t\t\t\tif (preg_match('#' . $match . '#i', trim($accept_lang_ary[$i])))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (@file_exists(@$this->ip_realpath('language/lang_' . $lang)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $lang;\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\treturn 'english';\n\t}", "public function getHttpLanguage()\n {\n if (isset($this->_server['HTTP_ACCEPT_LANGUAGE'])) {\n if (preg_match('/([a-z]{2}-[a-zA-Z]{2})/', $this->_server['HTTP_ACCEPT_LANGUAGE'], $matches)) {\n list($language, $locale) = explode('-', $matches[1]);\n $languageCode = $language .'-'. strtoupper($locale);\n return $languageCode;\n }\n }\n return 'nl-Nl';\n }", "function format_code_lang($code = '')\n {\n }", "public function countryCode(): string\n {\n return $this->getData('CountryCodeISO3166A2');\n }", "private static function getLanguage()\n {\n if (isset($_COOKIE[\"language\"]))\n {\n return $_COOKIE[\"language\"];\n }\n else\n {\n // Default is Czech\n return \"cs\";\n }\n }", "public function language();", "public function language();", "public function countryCode();", "function determine_locale()\n {\n }", "function get_locale() {\n \n global $CONF;\n \n if( isset( $CONF ) ) {\n \t\t$supported_languages\t\t= $CONF['supported_languages'];\n } else {\n \t\t$supported_languages\t\t= array ('de', 'de_DE', 'en', 'en_US');\t\n }\n \n $lang_array \t\t\t\t\t\t= preg_split ('/(\\s*,\\s*)/', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n \n if (is_array ($lang_array)) {\n \n $lang_first \t\t\t\t\t= strtolower ((trim (strval ($lang_array[0]))));\n $lang_parts\t\t\t\t\t= explode( '-', $lang_array[0] );\n $count\t\t\t\t\t\t= count( $lang_parts );\n if( $count == 2 ) {\n \t\n \t\t$lang_parts[1]\t\t\t= strtoupper( $lang_parts[1] );\n \t\t$lang_first\t\t\t\t= implode( \"_\", $lang_parts );\n }\n \n if (in_array ($lang_first, $supported_languages)) {\n \n $lang \t\t\t\t\t\t= $lang_first;\n \n } else {\n \n $lang \t\t\t\t\t\t= $CONF['default_locale'];\n \n }\n \n } else {\n \n $lang\t\t\t\t\t\t\t = $CONF['default_locale'];\n \n }\n \n return $lang;\n}", "public function lang(): string;", "public function getLanguageCode()\n {\n return $this->languageCode;\n }", "protected function getLanguageCode($code)\n {\n // $code is in the form of 'xx-YY' where xx is the language code\n // and 'YY' a country code identifying a variant of the language.\n $lang_country = explode('-', $code);\n\n return $lang_country[0];\n }", "public function getLocaleCode() {\n if (!isset($this->_localeCode)) {\n $this->_localeCode = substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);\n }\n return $this->_localeCode;\n }", "function simplesamlphp_get_languages() {\n return array(\n 'no' => 'Bokmål', // Norwegian Bokmål\n 'nn' => 'Nynorsk', // Norwegian Nynorsk\n 'se' => 'Sámegiella', // Northern Sami\n 'sam' => 'Åarjelh-saemien giele', // Southern Sami\n 'da' => 'Dansk', // Danish\n 'en' => 'English',\n 'de' => 'Deutsch', // German\n 'sv' => 'Svenska', // Swedish\n 'fi' => 'Suomeksi', // Finnish\n 'es' => 'Español', // Spanish\n 'fr' => 'Français', // French\n 'it' => 'Italiano', // Italian\n 'nl' => 'Nederlands', // Dutch\n 'lb' => 'Lëtzebuergesch', // Luxembourgish\n 'cs' => 'Čeština', // Czech\n 'sl' => 'Slovenščina', // Slovensk\n 'lt' => 'Lietuvių kalba', // Lithuanian\n 'hr' => 'Hrvatski', // Croatian\n 'hu' => 'Magyar', // Hungarian\n 'pl' => 'Język polski', // Polish\n 'pt' => 'Português', // Portuguese\n 'pt-br' => 'Português brasileiro', // Portuguese\n 'ru' => 'русский язык', // Russian\n 'et' => 'eesti keel', // Estonian\n 'tr' => 'Türkçe', // Turkish\n 'el' => 'ελληνικά', // Greek\n 'ja' => '日本語', // Japanese\n 'zh' => '简体中文', // Chinese (simplified)\n 'zh-tw' => '繁體中文', // Chinese (traditional)\n 'ar' => 'العربية', // Arabic\n 'fa' => 'پارسی', // Persian\n 'ur' => 'اردو', // Urdu\n 'he' => 'עִבְרִית', // Hebrew\n 'id' => 'Bahasa Indonesia', // Indonesian\n 'sr' => 'Srpski', // Serbian\n 'lv' => 'Latviešu', // Latvian\n 'ro' => 'Românește', // Romanian\n 'eu' => 'Euskara', // Basque\n );\n}", "public function getLocale(): string;", "public function getLocale(): string;", "public function getLocale(): string;", "public function getLanguageCode()\n {\n return $this->getScopeConfig()->getValue(self::XML_LANGUAGE_CODE, \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }", "function get_html_lang()\n{\n try {\n $locale = Zend_Registry::get('Zend_Locale');\n } catch (Zend_Exception $e) {\n return 'en-US';\n }\n return str_replace('_', '-', $locale->toString());\n}", "public function getShortLanguage() {\n return substr($this->acceptLanguage, 0, 2);\n }", "public function getFallbackLocaleCode() {\n return null;\n }", "function getLocale();", "public function matchLanguage()\n\t{\n\t\t$pattern = '/^(?P<primarytag>[a-zA-Z]{2,8})'.\n '(?:-(?P<subtag>[a-zA-Z]{2,8}))?(?:(?:;q=)'.\n '(?P<quantifier>\\d\\.\\d))?$/';\n\t\t\n\t\tforeach (explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $lang) \n\t\t{\n\t\t\t$splits = array();\n\n\t\t\tif (preg_match($pattern, $lang, $splits)) \n\t\t\t{\n\t\t\t\t$language = $splits['primarytag'];\n\t\t\t\tif(isset($this->languages[$language]))\n\t\t\t\t\treturn $language;\n\t\t\t} \n\t\t\telse \n\t\t\t\treturn 'en';\n\t\t}\n\t\t\n\t\treturn 'en';\n\t}", "private function detectLanguage()\n {\n $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n\n switch (mb_strtolower($lang)) {\n case 'ru':\n return 'russian';\n\n default:\n return 'english';\n }\n }", "public function getLanguageIdentifier();", "public function getLanguageCode()\n {\n return $this->_languageCode;\n }", "public static function getLocaleEncoding()\n\t{\n\t\t/* Extracts codeset part from current LC_CTYPE locale:\n\t\t *\n\t\t * language[_territory][.codeset][@modifiers]\n\t\t *\n\t\t * where:\n\t\t *\n\t\t * language is the ISO639 code;\n\t\t * territory is the ISO3166 country code;\n\t\t * codeset is the encoding ID, like \"ISO-8859-1\" or\n\t\t * code page number under Windows;\n\t\t * modifiers are the format modifiers.\n\t\t */\n\t\t$ctype = setlocale(LC_CTYPE, 0 );\n\t\tif( $ctype === FALSE )\n\t\t\t# No locale set.\n\t\t\treturn NULL;\n\t\t\t\n\t\t$dot = strpos($ctype, \".\");\n\t\tif( $dot === FALSE )\n\t\t\t# No codeset part in locale.\n\t\t\treturn NULL;\n\t\t\n\t\t$codeset = substr($ctype, $dot + 1);\n\t\t# Remove optional modifies after \"@\":\n\t\t$at = strpos($codeset, \"@\");\n\t\tif( $at !== FALSE )\n\t\t\t$codeset = substr($codeset, 0, $at);\n\t\tif ( 'WIN' === substr( PHP_OS, 0, 3 ) ){\n\t\t\t// Windows - translate codeset no. to encoding:\n\t\t\tif( in_array($codeset, array(\"1251\", \"1252\", \"1254\"), true) ){\n\t\t\t\t// The MB extension names these \"Windows-*\".\n\t\t\t\t$encoding = \"Windows-$codeset\";\n\t\t\t} else if( in_array($codeset, array(\"932\", \"936\",\n\t\t\t\t\"950\", \"50220\", \"50221\", \"50222\", \"51932\", \"850\", \"866\"), true) ){\n\t\t\t\t// The MB extension names these \"CP*\".\n\t\t\t\t$encoding = \"CP$codeset\";\n\t\t\t} else {\n\t\t\t\t$encoding = \"CP$codeset\"; // just an attempt\n\t\t\t}\n\t\t} else {\n\t\t\t// Unix/Linux/MacOSX\n\t\t\t$encoding = $codeset;\n\t\t}\n\t\treturn $encoding;\n\t}", "protected function _getLanguageForLocale()\n {\n $locale = $this->worldpayhelper->getLocaleDefault();\n if (substr($locale, 3, 2) == 'NO') {\n return 'no';\n }\n return substr($locale, 0, 2);\n }", "public static function getLanguageLocale()\n {\n if (!is_array(self::$languages)) {\n self::checkLanguages();\n }\n\n $userLanguage = self::getLanguage();\n foreach (self::$languages as $language) {\n if (strlen($language) === 5 && strpos($language, $userLanguage) === 0) {\n $locale = substr($language, -2);\n break;\n }\n }\n\n if (!empty($locale)) {\n return $userLanguage . \"-\" . strtoupper($locale);\n } else {\n return $userLanguage;\n }\n }", "function default_lang()\n {\n $browser_lang = !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? strtok(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE']), ',') : '';\n $browser_lang = substr($browser_lang, 0,2);\n if(array_key_exists($browser_lang, $this->languages))\n return $browser_lang;\n else{\n reset($this->languages);\n return key($this->languages);\n }\n }", "public function getLanguage() {}", "function Code39 ($Asc)\n{\n switch ($Asc)\n {\n case ' ':\n return \"011000100\"; \n case '$':\n return \"010101000\"; \n case '%':\n return \"000101010\"; \n case '*':\n return \"010010100\"; // * Start/Stop\n case '+':\n return \"010001010\"; \n case '|':\n return \"010000101\"; \n case '.':\n return \"110000100\"; \n case '/':\n return \"010100010\"; \n\t\t\t\tcase '-':\n\t\t\t\t\t\treturn \"010000101\";\n case '0':\n return \"000110100\"; \n case '1':\n return \"100100001\"; \n case '2':\n return \"001100001\"; \n case '3':\n return \"101100000\"; \n case '4':\n return \"000110001\"; \n case '5':\n return \"100110000\"; \n case '6':\n return \"001110000\"; \n case '7':\n return \"000100101\"; \n case '8':\n return \"100100100\"; \n case '9':\n return \"001100100\"; \n case 'A':\n return \"100001001\"; \n case 'B':\n return \"001001001\"; \n case 'C':\n return \"101001000\";\n case 'D':\n return \"000011001\";\n case 'E':\n return \"100011000\";\n case 'F':\n return \"001011000\";\n case 'G':\n return \"000001101\";\n case 'H':\n return \"100001100\";\n case 'I':\n return \"001001100\";\n case 'J':\n return \"000011100\";\n case 'K':\n return \"100000011\";\n case 'L':\n return \"001000011\";\n case 'M':\n return \"101000010\";\n case 'N':\n return \"000010011\";\n case 'O':\n return \"100010010\";\n case 'P':\n return \"001010010\";\n case 'Q':\n return \"000000111\";\n case 'R':\n return \"100000110\";\n case 'S':\n return \"001000110\";\n case 'T':\n return \"000010110\";\n case 'U':\n return \"110000001\";\n case 'V':\n return \"011000001\";\n case 'W':\n return \"111000000\";\n case 'X':\n return \"010010001\";\n case 'Y':\n return \"110010000\";\n case 'Z':\n return \"011010000\";\n default:\n return \"011000100\"; \n }\n}", "public function get_language() {\n if (defined('WPLANG')) {\n $language = WPLANG;\n }\n\n if (empty($language)) {\n $language = get_option('WPLANG');\n }\n\n if (!empty($language)) {\n $languageParts = explode('_', $language);\n return $languageParts[0];\n }\n\n return 'en';\n }", "public function getLanguageCode() {\n return $this->languageCode;\n }", "public function getLocale();", "public function getLocale();", "abstract public function getLocaleName();", "public function getDefaultLanguageCode()\n {\n return $this->default_language_code;\n }", "public function getLanguage()\n\t{\n\t\t$language = isset($this->session->data['language']) ? $this->session->data['language'] : $this->config->get('config_language');\n\n\t\t$language_code = substr($language, 0, 2);\n\n\t\t$this->bootstrap();\n\n\t\t$is_available = @constant('\\Genesis\\API\\Constants\\i18n::' . strtoupper($language_code));\n\n\t\tif ($is_available) {\n\t\t\treturn strtolower($language_code);\n\t\t} else {\n\t\t\treturn 'en';\n\t\t}\n\t}", "public function getLanguageIsoCodeShop()\n {\n return $this->languageIsoCodeShop;\n }", "function _fbconnect_language_codes() {\n return array(\n 'af_ZA' => 'Afrikaans',\n 'ar_AR' => 'Arabic',\n 'ay_BO' => 'Aymara',\n 'az_AZ' => 'Azeri',\n 'be_BY' => 'Belarusian',\n 'bg_BG' => 'Bulgarian',\n 'bn_IN' => 'Bengali',\n 'bs_BA' => 'Bosnian',\n 'ca_ES' => 'Catalan',\n 'ck_US' => 'Cherokee',\n 'cs_CZ' => 'Czech',\n 'cy_GB' => 'Welsh',\n 'da_DK' => 'Danish',\n 'de_DE' => 'German',\n 'el_GR' => 'Greek',\n 'en_GB' => 'English (UK)',\n 'en_PI' => 'English (Pirate)',\n 'en_UD' => 'English (Upside Down)',\n 'en_US' => 'English (US)',\n 'eo_EO' => 'Esperanto',\n 'es_CL' => 'Spanish (Chile)',\n 'es_CO' => 'Spanish (Colombia)',\n 'es_ES' => 'Spanish (Spain)',\n 'es_LA' => 'Spanish',\n 'es_MX' => 'Spanish (Mexico)',\n 'es_VE' => 'Spanish (Venezuela)',\n 'et_EE' => 'Estonian',\n 'eu_ES' => 'Basque',\n 'fa_IR' => 'Persian',\n 'fb_FI' => 'Finnish (test)',\n 'fb_LT' => 'Leet Speak',\n 'fi_FI' => 'Finnish',\n 'fo_FO' => 'Faroese',\n 'fr_CA' => 'French (Canada)',\n 'fr_FR' => 'French (France)',\n 'ga_IE' => 'Irish',\n 'gl_ES' => 'Galician',\n 'gn_PY' => 'Guaraní',\n 'gu_IN' => 'Gujarati',\n 'he_IL' => 'Hebrew',\n 'hi_IN' => 'Hindi',\n 'hr_HR' => 'Croatian',\n 'hu_HU' => 'Hungarian',\n 'hy_AM' => 'Armenian',\n 'id_ID' => 'Indonesian',\n 'is_IS' => 'Icelandic',\n 'it_IT' => 'Italian',\n 'ja_JP' => 'Japanese',\n 'jv_ID' => 'Javanese',\n 'ka_GE' => 'Georgian',\n 'kk_KZ' => 'Kazakh',\n 'km_KH' => 'Khmer',\n 'kn_IN' => 'Kannada',\n 'ko_KR' => 'Korean',\n 'ku_TR' => 'Kurdish',\n 'la_VA' => 'Latin',\n 'li_NL' => 'Limburgish',\n 'lt_LT' => 'Lithuanian',\n 'lv_LV' => 'Latvian',\n 'mg_MG' => 'Malagasy',\n 'mk_MK' => 'Macedonian',\n 'ml_IN' => 'Malayalam',\n 'mn_MN' => 'Mongolian',\n 'mr_IN' => 'Marathi',\n 'ms_MY' => 'Malay',\n 'mt_MT' => 'Maltese',\n 'nb_NO' => 'Norwegian (bokmal)',\n 'ne_NP' => 'Nepali',\n 'nl_BE' => 'Dutch (België)',\n 'nl_NL' => 'Dutch',\n 'nn_NO' => 'Norwegian (nynorsk)',\n 'pa_IN' => 'Punjabi',\n 'pl_PL' => 'Polish',\n 'ps_AF' => 'Pashto',\n 'pt_BR' => 'Portuguese (Brazil)',\n 'pt_PT' => 'Portuguese (Portugal)',\n 'qu_PE' => 'Quechua',\n 'rm_CH' => 'Romansh',\n 'ro_RO' => 'Romanian',\n 'ru_RU' => 'Russian',\n 'sa_IN' => 'Sanskrit',\n 'se_NO' => 'Northern Sámi',\n 'sk_SK' => 'Slovak',\n 'sl_SI' => 'Slovenian',\n 'so_SO' => 'Somali',\n 'sq_AL' => 'Albanian',\n 'sr_RS' => 'Serbian',\n 'sv_SE' => 'Swedish',\n 'sw_KE' => 'Swahili',\n 'sy_SY' => 'Syriac',\n 'ta_IN' => 'Tamil',\n 'te_IN' => 'Telugu',\n 'tg_TJ' => 'Tajik',\n 'th_TH' => 'Thai',\n 'tl_PH' => 'Filipino',\n 'tl_ST' => 'Klingon',\n 'tr_TR' => 'Turkish',\n 'tt_RU' => 'Tatar',\n 'uk_UA' => 'Ukrainian',\n 'ur_PK' => 'Urdu',\n 'uz_UZ' => 'Uzbek',\n 'vi_VN' => 'Vietnamese',\n 'xh_ZA' => 'Xhosa',\n 'yi_DE' => 'Yiddish',\n 'zh_CN' => 'Simplified Chinese (China)',\n 'zh_HK' => 'Traditional Chinese (Hong Kong)',\n 'zh_TW' => 'Traditional Chinese (Taiwan)',\n 'zu_ZA' => 'Zulu',\n );\n}", "public function getLanguageCode()\n {\n return isset($this->LanguageCode) ? $this->LanguageCode : null;\n }", "public function locale();", "public function getLangcode(): string {\n return $this->langcode;\n }", "function detectaIdiomaNavegador()\n\t{\n\t\t//fwrite($pf,$_SERVER[\"HTTP_ACCEPT_LANGUAGE\"] . \"\\n\");\n\t\t//fclose($pf);\n\t\treturn substr($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"],0,2);\n\t}", "public function getCountryCode()\n {\n return substr($this->_code, -2);\n }", "public function getLanguage(): string\n {\n return $this->language;\n }", "public function getLanguage(): string\n {\n return $this->language;\n }", "public function getLocale() {}", "public static function langName($lang)\n {\n $langName = [\n\n 'af' => 'Afrikaans',\n 'ar' => 'Arabic',\n 'az' => 'Azerbaijani',\n 'bg' => 'Bulgarian',\n 'be' => 'Belarusian',\n 'bn' => 'Bengali',\n 'br' => 'Breton',\n 'bs' => 'Bosnian',\n 'ca' => 'Catalan',\n 'cs' => 'Czech',\n 'cy' => 'Welsh',\n 'da' => 'Danish',\n 'de' => 'German',\n 'el' => 'Greek',\n 'en' => 'English',\n 'en-gb' => 'British English',\n 'eo' => 'Esperanto',\n 'es' => 'Spanish',\n 'es-ar' => 'Argentinian Spanish',\n 'es-mx' => 'Mexican Spanish',\n 'es-ni' => 'Nicaraguan Spanish',\n 'es-ve' => 'Venezuelan Spanish',\n 'et' => 'Estonian',\n 'eu' => 'Basque',\n 'fa' => 'Persian',\n 'fi' => 'Finnish',\n 'fr' => 'French',\n 'fy-nl' => 'Frisian',\n 'ga' => 'Irish',\n 'gl' => 'Galician',\n 'he' => 'Hebrew',\n 'hi' => 'Hindi',\n 'hr' => 'Croatian',\n 'hu' => 'Hungarian',\n 'ia' => 'Interlingua',\n 'id' => 'Indonesian',\n 'is' => 'Icelandic',\n 'it' => 'Italian',\n 'ja' => 'Japanese',\n 'ka' => 'Georgian',\n 'kk' => 'Kazakh',\n 'km' => 'Khmer',\n 'kn' => 'Kannada',\n 'ko' => 'Korean',\n 'lb' => 'Luxembourgish',\n 'lt' => 'Lithuanian',\n 'lv' => 'Latvian',\n 'mk' => 'Macedonian',\n 'ml' => 'Malayalam',\n 'mn' => 'Mongolian',\n 'my' => 'Burmese',\n 'nb' => 'Norwegian Bokmal',\n 'ne' => 'Nepali',\n 'nl' => 'Dutch',\n 'nn' => 'Norwegian Nynorsk',\n 'os' => 'Ossetic',\n 'pa' => 'Punjabi',\n 'pl' => 'Polish',\n 'pt' => 'Portuguese',\n 'pt-br' => 'Brazilian Portuguese',\n 'ro' => 'Romanian',\n 'ru' => 'Russian',\n 'sk' => 'Slovak',\n 'sl' => 'Slovenian',\n 'sq' => 'Albanian',\n 'sr' => 'Serbian',\n 'sr-latn' => 'Serbian Latin',\n 'sv' => 'Swedish',\n 'sw' => 'Swahili',\n 'ta' => 'Tamil',\n 'te' => 'Telugu',\n 'th' => 'Thai',\n 'tr' => 'Turkish',\n 'tt' => 'Tatar',\n 'udm' => 'Udmurt',\n 'uk' => 'Ukrainian',\n 'ur' => 'Urdu',\n 'vi' => 'Vietnamese',\n 'zh-cn' => 'Simplified Chinese',\n 'zh-tw' => 'Traditional Chinese'\n ];\n\n return $langName[$lang];\n }", "public function inDanish()\n {\n return $this->getTranslationIn('da');\n }", "public function getCode()\r\r\n\t{\r\r\n\t\treturn \"\";#getCountryFromIP($this->ip,\"code\");\r\r\n\t}", "public function getLanguageNameByCode(string $code): string;", "protected function get_country_iso_code( $country_code ) {\r\n\t\t$result = '';\r\n\t\t$iso_codes = array(\r\n\t\t\t'AL' => '8',\r\n\t\t\t'DZ' => '12',\r\n\t\t\t'AS' => '16',\r\n\t\t\t'AD' => '20',\r\n\t\t\t'AO' => '24',\r\n\t\t\t'AI' => '660',\r\n\t\t\t'AG' => '28',\r\n\t\t\t'AR' => '32',\r\n\t\t\t'AM' => '51',\r\n\t\t\t'AW' => '533',\r\n\t\t\t'AU' => '36',\r\n\t\t\t'AT' => '40',\r\n\t\t\t'AZ' => '31',\r\n\t\t\t'BS' => '44',\r\n\t\t\t'BH' => '48',\r\n\t\t\t'BD' => '50',\r\n\t\t\t'BB' => '52',\r\n\t\t\t'BY' => '112',\r\n\t\t\t'BE' => '56',\r\n\t\t\t'BZ' => '84',\r\n\t\t\t'BJ' => '204',\r\n\t\t\t'BM' => '60',\r\n\t\t\t'BT' => '64',\r\n\t\t\t'BO' => '68',\r\n\t\t\t'BA' => '70',\r\n\t\t\t'BW' => '72',\r\n\t\t\t'BR' => '76',\r\n\t\t\t'BN' => '96',\r\n\t\t\t'BG' => '100',\r\n\t\t\t'BF' => '854',\r\n\t\t\t'BI' => '108',\r\n\t\t\t'KH' => '116',\r\n\t\t\t'CM' => '120',\r\n\t\t\t'CA' => '124',\r\n\t\t\t'CV' => '132',\r\n\t\t\t'KY' => '136',\r\n\t\t\t'CF' => '140',\r\n\t\t\t'TD' => '148',\r\n\t\t\t'CL' => '152',\r\n\t\t\t'CN' => '156',\r\n\t\t\t'CO' => '170',\r\n\t\t\t'KM' => '174',\r\n\t\t\t'CG' => '178',\r\n\t\t\t'CD' => '180',\r\n\t\t\t'CK' => '184',\r\n\t\t\t'CR' => '188',\r\n\t\t\t'CI' => '384',\r\n\t\t\t'HR' => '191',\r\n\t\t\t'CU' => '192',\r\n\t\t\t'CY' => '196',\r\n\t\t\t'CZ' => '203',\r\n\t\t\t'DK' => '208',\r\n\t\t\t'DJ' => '262',\r\n\t\t\t'DM' => '212',\r\n\t\t\t'DO' => '214',\r\n\t\t\t'EC' => '218',\r\n\t\t\t'EG' => '818',\r\n\t\t\t'SV' => '222',\r\n\t\t\t'GQ' => '226',\r\n\t\t\t'ER' => '232',\r\n\t\t\t'EE' => '233',\r\n\t\t\t'ET' => '231',\r\n\t\t\t'FK' => '238',\r\n\t\t\t'FO' => '234',\r\n\t\t\t'FJ' => '242',\r\n\t\t\t'FI' => '246',\r\n\t\t\t'FR' => '250',\r\n\t\t\t'GF' => '254',\r\n\t\t\t'PF' => '258',\r\n\t\t\t'GA' => '266',\r\n\t\t\t'GM' => '270',\r\n\t\t\t'GE' => '268',\r\n\t\t\t'DE' => '276',\r\n\t\t\t'GH' => '288',\r\n\t\t\t'GI' => '292',\r\n\t\t\t'GR' => '300',\r\n\t\t\t'GL' => '304',\r\n\t\t\t'GD' => '308',\r\n\t\t\t'GP' => '312',\r\n\t\t\t'GU' => '316',\r\n\t\t\t'GT' => '320',\r\n\t\t\t'GN' => '324',\r\n\t\t\t'GW' => '624',\r\n\t\t\t'GY' => '328',\r\n\t\t\t'HT' => '332',\r\n\t\t\t'VA' => '336',\r\n\t\t\t'HN' => '340',\r\n\t\t\t'HK' => '344',\r\n\t\t\t'HU' => '348',\r\n\t\t\t'IS' => '352',\r\n\t\t\t'IN' => '356',\r\n\t\t\t'ID' => '360',\r\n\t\t\t'IR' => '364',\r\n\t\t\t'IQ' => '368',\r\n\t\t\t'IE' => '372',\r\n\t\t\t'IL' => '376',\r\n\t\t\t'IT' => '380',\r\n\t\t\t'JM' => '388',\r\n\t\t\t'JP' => '392',\r\n\t\t\t'JO' => '400',\r\n\t\t\t'KZ' => '398',\r\n\t\t\t'KE' => '404',\r\n\t\t\t'KI' => '296',\r\n\t\t\t'KP' => '408',\r\n\t\t\t'KR' => '410',\r\n\t\t\t'KW' => '414',\r\n\t\t\t'KG' => '417',\r\n\t\t\t'LA' => '418',\r\n\t\t\t'LV' => '428',\r\n\t\t\t'LB' => '422',\r\n\t\t\t'LS' => '426',\r\n\t\t\t'LR' => '430',\r\n\t\t\t'LY' => '434',\r\n\t\t\t'LI' => '438',\r\n\t\t\t'LT' => '440',\r\n\t\t\t'LU' => '442',\r\n\t\t\t'MO' => '446',\r\n\t\t\t'MK' => '807',\r\n\t\t\t'MG' => '450',\r\n\t\t\t'MW' => '454',\r\n\t\t\t'MY' => '458',\r\n\t\t\t'MV' => '462',\r\n\t\t\t'ML' => '466',\r\n\t\t\t'MT' => '470',\r\n\t\t\t'MH' => '584',\r\n\t\t\t'MQ' => '474',\r\n\t\t\t'MR' => '478',\r\n\t\t\t'MU' => '480',\r\n\t\t\t'MX' => '484',\r\n\t\t\t'FM' => '583',\r\n\t\t\t'MD' => '498',\r\n\t\t\t'MC' => '492',\r\n\t\t\t'MN' => '496',\r\n\t\t\t'MS' => '500',\r\n\t\t\t'MA' => '504',\r\n\t\t\t'MZ' => '508',\r\n\t\t\t'MM' => '104',\r\n\t\t\t'NA' => '516',\r\n\t\t\t'NR' => '520',\r\n\t\t\t'NP' => '524',\r\n\t\t\t'NL' => '528',\r\n\t\t\t'AN' => '530',\r\n\t\t\t'NC' => '540',\r\n\t\t\t'NZ' => '554',\r\n\t\t\t'NI' => '558',\r\n\t\t\t'NE' => '562',\r\n\t\t\t'NG' => '566',\r\n\t\t\t'NU' => '570',\r\n\t\t\t'NF' => '574',\r\n\t\t\t'MP' => '580',\r\n\t\t\t'NO' => '578',\r\n\t\t\t'OM' => '512',\r\n\t\t\t'PK' => '586',\r\n\t\t\t'PW' => '585',\r\n\t\t\t'PA' => '591',\r\n\t\t\t'PG' => '598',\r\n\t\t\t'PY' => '600',\r\n\t\t\t'PE' => '604',\r\n\t\t\t'PH' => '608',\r\n\t\t\t'PN' => '612',\r\n\t\t\t'PL' => '616',\r\n\t\t\t'PT' => '620',\r\n\t\t\t'PR' => '630',\r\n\t\t\t'QA' => '634',\r\n\t\t\t'RE' => '638',\r\n\t\t\t'RO' => '642',\r\n\t\t\t'RU' => '643',\r\n\t\t\t'RW' => '646',\r\n\t\t\t'SH' => '654',\r\n\t\t\t'KN' => '659',\r\n\t\t\t'LC' => '662',\r\n\t\t\t'PM' => '666',\r\n\t\t\t'VC' => '670',\r\n\t\t\t'WS' => '882',\r\n\t\t\t'SM' => '674',\r\n\t\t\t'ST' => '678',\r\n\t\t\t'SA' => '682',\r\n\t\t\t'SN' => '686',\r\n\t\t\t'SC' => '690',\r\n\t\t\t'SL' => '694',\r\n\t\t\t'SG' => '702',\r\n\t\t\t'SK' => '703',\r\n\t\t\t'SI' => '705',\r\n\t\t\t'SB' => '90',\r\n\t\t\t'SO' => '706',\r\n\t\t\t'ZA' => '710',\r\n\t\t\t'ES' => '724',\r\n\t\t\t'LK' => '144',\r\n\t\t\t'SD' => '736',\r\n\t\t\t'SR' => '740',\r\n\t\t\t'SJ' => '744',\r\n\t\t\t'SZ' => '748',\r\n\t\t\t'SE' => '752',\r\n\t\t\t'CH' => '756',\r\n\t\t\t'SY' => '760',\r\n\t\t\t'TW' => '158',\r\n\t\t\t'TJ' => '762',\r\n\t\t\t'TZ' => '834',\r\n\t\t\t'TH' => '764',\r\n\t\t\t'TG' => '768',\r\n\t\t\t'TK' => '772',\r\n\t\t\t'TO' => '776',\r\n\t\t\t'TT' => '780',\r\n\t\t\t'TN' => '788',\r\n\t\t\t'TR' => '792',\r\n\t\t\t'TM' => '795',\r\n\t\t\t'TC' => '796',\r\n\t\t\t'TV' => '798',\r\n\t\t\t'UG' => '800',\r\n\t\t\t'UA' => '804',\r\n\t\t\t'AE' => '784',\r\n\t\t\t'GB' => '826',\r\n\t\t\t'US' => '840',\r\n\t\t\t'UY' => '858',\r\n\t\t\t'UZ' => '860',\r\n\t\t\t'VU' => '548',\r\n\t\t\t'VE' => '862',\r\n\t\t\t'VN' => '704',\r\n\t\t\t'VG' => '92',\r\n\t\t\t'VI' => '850',\r\n\t\t\t'WF' => '876',\r\n\t\t\t'EH' => '732',\r\n\t\t\t'YE' => '887',\r\n\t\t\t'ZM' => '894',\r\n\t\t\t'ZW' => '716',\r\n\t\t);\r\n\t\tif ( array_key_exists( $country_code, $iso_codes ) ) {\r\n\t\t\t$result = $iso_codes[ $country_code ];\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "public static function getLanguage() {\n\t\tglobal $current_user, $default_language;\n\t\tif (!empty($current_user) && !empty($current_user->column_fields['language'])) {\n\t\t\treturn $current_user->column_fields['language'];\n\t\t}\n\t\t// Fallback : Read the Accept-Language header of the request (really useful for login screen)\n\t\tif (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n\t\t\t//Getting all languages in an array\n\t\t\t$languages = Vtiger_LanguageExport::getAll();\n\t\t\t//Extracting locales strings from header\n\t\t\tpreg_match_all(\"/([a-z-]+)[,;]/i\", $_SERVER['HTTP_ACCEPT_LANGUAGE'], $locales);\n\t\t\t//Looping in found locales and test match against languages\n\t\t\tforeach ($locales[1] as $locale) {\n\t\t\t\tforeach ($languages as $code => $lang) {\n\t\t\t\t\t//First case insensitive comparison\n\t\t\t\t\tif (strcasecmp($code, $locale) === 0) {\n\t\t\t\t\t\treturn $code;\n\t\t\t\t\t}\n\t\t\t\t\t//Second case with replacing '-' by '_'\n\t\t\t\t\tif (strcasecmp($code, str_replace('-', '_', $locale)) === 0) {\n\t\t\t\t\t\treturn $code;\n\t\t\t\t\t}\n\t\t\t\t\t//Finally, try with short 2 letters country code\n\t\t\t\t\tif (strcasecmp(substr($code, 0, 2), $locale) === 0) {\n\t\t\t\t\t\treturn $code;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Last fallback : global configuration\n\t\treturn $default_language;\n\t}", "function get_locale(): string\n{\n $locale = \\Locale::acceptFromHttp(input_server('HTTP_ACCEPT_LANGUAGE'));\n if (!$locale) {\n $locale = 'en_US';\n }\n return $locale;\n}", "function getDefaultAddressFormatCode(string $languageId = LANGUAGE_ID): string\n{\n\tswitch ($languageId)\n\t{\n\t\tcase 'kz':\n\t\t\t$result = 'RU_2';\n\t\t\tbreak;\n\n\t\tcase 'de':\n\t\t\t$result = 'EU';\n\t\t\tbreak;\n\n\t\tcase 'en':\n\t\t\t$result = 'US';\n\t\t\tbreak;\n\n\t\t//case 'ru':\n\t\t//case 'by':\n\t\t//case 'ua':\n\t\tdefault:\n\t\t\t$result = 'RU';\n\t}\n\n\treturn $result;\n}", "function getBrowserLang() {\n\t\t$this->fillAcceptedLanguages();\n\n\t\t$wanted= env('HTTP_ACCEPT_LANGUAGE');\n\t\tif (isset ($wanted)) {\n\t\t\t$Languages= explode(\",\", $wanted);\n\t\t\t$SLanguages= array ();\n\t\t\tforeach ($Languages as $Key => $Language) {\n\t\t\t\t$Language= str_replace(\"-\", \"_\", $Language);\n\t\t\t\t$Language= explode(\";\", $Language);\n\t\t\t\tif (isset ($Language[1])) {\n\t\t\t\t\t$Priority= explode(\"q=\", $Language[1]);\n\t\t\t\t\t$Priority= $Priority[1];\n\t\t\t\t} else {\n\t\t\t\t\t$Priority= \"1.0\";\n\t\t\t\t}\n\t\t\t\t$SLanguages[]= array (\n\t\t\t\t\t'priority' => $Priority,\n\t\t\t\t\t'language' => $Language[0]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tforeach ($SLanguages as $key => $row) {\n\t\t\t\t$priority[$key]= $row['priority'];\n\t\t\t\t$language[$key]= $row['language'];\n\t\t\t}\n\n\t\t\tarray_multisort($priority, SORT_DESC, $language, SORT_ASC, $SLanguages);\n\n\t\t\t$ALangString= implode(\";\", $this->acceptedLanguages);\n\t\t\tforeach ($SLanguages as $A) {\n\t\t\t\t$key= array_search($A['language'], $this->acceptedLanguages);\n\t\t\t\tif ($key === FALSE) {\n\t\t\t\t\t$GenericLanguage= explode(\"_\", $A['language']);\n\t\t\t\t\t$pos1= strpos($ALangString, $GenericLanguage[0]);\n\t\t\t\t\tif (is_numeric($pos1)) {\n\t\t\t\t\t\t$key= $pos1 / 6;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (is_numeric($key) && (!isset ($Code))) {\n\t\t\t\t\t//$Code= $this->acceptedLanguages[$key];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn !empty ($Code) ? $this->getTldFromLanguage($Code) : '';\n\t}", "public function get_language()\n {\n }", "function languagelist()\n{\n\t // Need to ensure this is loaded for language defines\n\tpnBlockLoad('Core', 'thelang');\n\t// All entries use ISO 639-2/T\n\t// hilope - added all 469 languages available under ISO 639-2\n\t\n\t$lang['aar'] = _LANGUAGE_AAR; // Afar\n\t$lang['abk'] = _LANGUAGE_ABK; // Abkhazian\n\t$lang['ace'] = _LANGUAGE_ACE; // Achinese\n\t$lang['ach'] = _LANGUAGE_ACH; // Acoli\n\t$lang['ada'] = _LANGUAGE_ADA; // Adangme\n\t$lang['ady'] = _LANGUAGE_ADY; // Adyghe; Adygei\n\t$lang['afa'] = _LANGUAGE_AFA; // Afro-Asiatic (Other)\n\t$lang['afh'] = _LANGUAGE_AFH; // Afrihili\n\t$lang['afr'] = _LANGUAGE_AFR; // Afrikaans\n\t$lang['aka'] = _LANGUAGE_AKA; // Akan\n\t$lang['akk'] = _LANGUAGE_AKK; // Akkadian\n\t$lang['ale'] = _LANGUAGE_ALE; // Aleut\n\t$lang['alg'] = _LANGUAGE_ALG; // Algonquian languages\n\t$lang['amh'] = _LANGUAGE_AMH; // Amharic\n\t$lang['ang'] = _LANGUAGE_ANG; // English, Old\n\t$lang['apa'] = _LANGUAGE_APA; // Apache languages\n\t$lang['ara'] = _LANGUAGE_ARA; // Arabic\n\t$lang['arc'] = _LANGUAGE_ARC; // Aramaic\n\t$lang['arg'] = _LANGUAGE_ARG; // Aragonese\n\t$lang['arn'] = _LANGUAGE_ARN; // Araucanian\n\t$lang['arp'] = _LANGUAGE_ARP; // Arapaho\n\t$lang['art'] = _LANGUAGE_ART; // Artificial (Other)\n\t$lang['arw'] = _LANGUAGE_ARW; // Arawak\n\t$lang['asm'] = _LANGUAGE_ASM; // Assamese\n\t$lang['ast'] = _LANGUAGE_AST; // Asturian; Bable\n\t$lang['ath'] = _LANGUAGE_ATH; // Athapascan languages\n\t$lang['aus'] = _LANGUAGE_AUS; // Australian languages\n\t$lang['ava'] = _LANGUAGE_AVA; // Avaric\n\t$lang['ave'] = _LANGUAGE_AVE; // Avestan\n\t$lang['awa'] = _LANGUAGE_AWA; // Awadhi\n\t$lang['aym'] = _LANGUAGE_AYM; // Aymara\n\t$lang['aze'] = _LANGUAGE_AZE; // Azerbaijani\n\t$lang['bad'] = _LANGUAGE_BAD; // Banda\n\t$lang['bai'] = _LANGUAGE_BAI; // Bamileke languages\n\t$lang['bak'] = _LANGUAGE_BAK; // Bashkir\n\t$lang['bal'] = _LANGUAGE_BAL; // Baluchi\n\t$lang['bam'] = _LANGUAGE_BAM; // Bambara\n\t$lang['ban'] = _LANGUAGE_BAN; // Balinese\n\t$lang['bas'] = _LANGUAGE_BAS; // Basa\n\t$lang['bat'] = _LANGUAGE_BAT; // Baltic (Other)\n\t$lang['bej'] = _LANGUAGE_BEJ; // Beja\n\t$lang['bel'] = _LANGUAGE_BEL; // Belarusian\n\t$lang['bem'] = _LANGUAGE_BEM; // Bemba\n\t$lang['ben'] = _LANGUAGE_BEN; // Bengali\n\t$lang['ber'] = _LANGUAGE_BER; // Berber (Other)\n\t$lang['bho'] = _LANGUAGE_BHO; // Bhojpuri\n\t$lang['bih'] = _LANGUAGE_BIH; // Bihari\n\t$lang['bik'] = _LANGUAGE_BIK; // Bikol\n\t$lang['bin'] = _LANGUAGE_BIN; // Bini\n\t$lang['bis'] = _LANGUAGE_BIS; // Bislama\n\t$lang['bla'] = _LANGUAGE_BLA; // Siksika\n\t$lang['bnt'] = _LANGUAGE_BNT; // Bantu (Other)\n\t$lang['bod'] = _LANGUAGE_BOD; // Tibetan\n\t$lang['bos'] = _LANGUAGE_BOS; // Bosnian\n\t$lang['bra'] = _LANGUAGE_BRA; // Braj\n\t$lang['bre'] = _LANGUAGE_BRE; // Breton\n\t$lang['btk'] = _LANGUAGE_BTK; // Batak (Indonesia)\n\t$lang['bua'] = _LANGUAGE_BUA; // Buriat\n\t$lang['bug'] = _LANGUAGE_BUG; // Buginese\n\t$lang['bul'] = _LANGUAGE_BUL; // Bulgarian\n\t$lang['byn'] = _LANGUAGE_BYN; // Blin; Bilin\n\t$lang['cad'] = _LANGUAGE_CAD; // Caddo\n\t$lang['cai'] = _LANGUAGE_CAI; // Central American Indian (Other)\n\t$lang['car'] = _LANGUAGE_CAR; // Carib\n\t$lang['cat'] = _LANGUAGE_CAT; // Catalan; Valencian\n\t$lang['cau'] = _LANGUAGE_CAU; // Caucasian (Other)\n\t$lang['ceb'] = _LANGUAGE_CEB; // Cebuano\n\t$lang['cel'] = _LANGUAGE_CEL; // Celtic (Other)\n\t$lang['ces'] = _LANGUAGE_CES; // Czech\n\t$lang['cha'] = _LANGUAGE_CHA; // Chamorro\n\t$lang['chb'] = _LANGUAGE_CHB; // Chibcha\n\t$lang['che'] = _LANGUAGE_CHE; // Chechen\n\t$lang['chg'] = _LANGUAGE_CHG; // Chagatai\n\t$lang['chk'] = _LANGUAGE_CHK; // Chuukese\n\t$lang['chm'] = _LANGUAGE_CHM; // Mari\n\t$lang['chn'] = _LANGUAGE_CHN; // Chinook jargon\n\t$lang['cho'] = _LANGUAGE_CHO; // Choctaw\n\t$lang['chp'] = _LANGUAGE_CHP; // Chipewyan\n\t$lang['chr'] = _LANGUAGE_CHR; // Cherokee\n\t$lang['chu'] = _LANGUAGE_CHU; // Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic\n\t$lang['chv'] = _LANGUAGE_CHV; // Chuvash\n\t$lang['chy'] = _LANGUAGE_CHY; // Cheyenne\n\t$lang['cmc'] = _LANGUAGE_CMC; // Chamic languages\n\t$lang['cop'] = _LANGUAGE_COP; // Coptic\n\t$lang['cor'] = _LANGUAGE_COR; // Cornish\n\t$lang['cos'] = _LANGUAGE_COS; // Corsican\n\t$lang['cpe'] = _LANGUAGE_CPE; // Creoles and pidgins, English based (Other)\n\t$lang['cpf'] = _LANGUAGE_CPF; // Creoles and pidgins, French-based (Other)\n\t$lang['cpp'] = _LANGUAGE_CPP; // Creoles and pidgins,\n\t$lang['cre'] = _LANGUAGE_CRE; // Cree\n\t$lang['crh'] = _LANGUAGE_CRH; // Crimean Tatar; Crimean Turkish\n\t$lang['crp'] = _LANGUAGE_CRP; // Creoles and pidgins (Other)\n\t$lang['csb'] = _LANGUAGE_CSB; // Kashubian\n\t$lang['cus'] = _LANGUAGE_CUS; // Cushitic (Other)\n\t$lang['cym'] = _LANGUAGE_CYM; // Welsh\n\t$lang['dak'] = _LANGUAGE_DAK; // Dakota\n\t$lang['dan'] = _LANGUAGE_DAN; // Danish\n\t$lang['dar'] = _LANGUAGE_DAR; // Dargwa\n\t$lang['day'] = _LANGUAGE_DAY; // Dayak\n\t$lang['del'] = _LANGUAGE_DEL; // Delaware\n\t$lang['den'] = _LANGUAGE_DEN; // Slave (Athapascan)\n\t$lang['deu'] = _LANGUAGE_DEU; // German\n\t$lang['dgr'] = _LANGUAGE_DGR; // Dogrib\n\t$lang['din'] = _LANGUAGE_DIN; // Dinka\n\t$lang['div'] = _LANGUAGE_DIV; // Divehi\n\t$lang['doi'] = _LANGUAGE_DOI; // Dogri\n\t$lang['dra'] = _LANGUAGE_DRA; // Dravidian (Other)\n\t$lang['dsb'] = _LANGUAGE_DSB; // Lower Sorbian\n\t$lang['dua'] = _LANGUAGE_DUA; // Duala\n\t$lang['dum'] = _LANGUAGE_DUM; // Dutch, Middle\n\t$lang['dyu'] = _LANGUAGE_DYU; // Dyula\n\t$lang['dzo'] = _LANGUAGE_DZO; // Dzongkha\n\t$lang['efi'] = _LANGUAGE_EFI; // Efik\n\t$lang['egy'] = _LANGUAGE_EGY; // Egyptian (Ancient)\n\t$lang['eka'] = _LANGUAGE_EKA; // Ekajuk\n\t$lang['ell'] = _LANGUAGE_ELL; // Greek, Modern\n\t$lang['elx'] = _LANGUAGE_ELX; // Elamite\n\t$lang['eng'] = _LANGUAGE_ENG; // English\n\t$lang['enm'] = _LANGUAGE_ENM; // English, Middle\n\t$lang['epo'] = _LANGUAGE_EPO; // Esperanto\n\t$lang['est'] = _LANGUAGE_EST; // Estonian\n\t$lang['eus'] = _LANGUAGE_EUS; // Basque\n\t$lang['ewe'] = _LANGUAGE_EWE; // Ewe\n\t$lang['ewo'] = _LANGUAGE_EWO; // Ewondo\n\t$lang['fan'] = _LANGUAGE_FAN; // Fang\n\t$lang['fao'] = _LANGUAGE_FAO; // Faroese\n\t$lang['fas'] = _LANGUAGE_FAS; // Persian\n\t$lang['fat'] = _LANGUAGE_FAT; // Fanti\n\t$lang['fij'] = _LANGUAGE_FIJ; // Fijian\n\t$lang['fin'] = _LANGUAGE_FIN; // Finnish\n\t$lang['fiu'] = _LANGUAGE_FIU; // Finno-Ugrian (Other)\n\t$lang['fon'] = _LANGUAGE_FON; // Fon\n\t$lang['fra'] = _LANGUAGE_FRA; // French\n\t$lang['frm'] = _LANGUAGE_FRM; // French, Middle\n\t$lang['fro'] = _LANGUAGE_FRO; // French, Old\n\t$lang['fry'] = _LANGUAGE_FRY; // Frisian\n\t$lang['ful'] = _LANGUAGE_FUL; // Fulah\n\t$lang['fur'] = _LANGUAGE_FUR; // Friulian\n\t$lang['gaa'] = _LANGUAGE_GAA; // Ga\n\t$lang['gay'] = _LANGUAGE_GAY; // Gayo\n\t$lang['gba'] = _LANGUAGE_GBA; // Gbaya\n\t$lang['gem'] = _LANGUAGE_GEM; // Germanic (Other)\n\t$lang['gez'] = _LANGUAGE_GEZ; // Geez\n\t$lang['gil'] = _LANGUAGE_GIL; // Gilbertese\n\t$lang['gla'] = _LANGUAGE_GLA; // Gaelic; Scottish Gaelic\n\t$lang['gle'] = _LANGUAGE_GLE; // Irish\n\t$lang['glg'] = _LANGUAGE_GLG; // Galician\n\t$lang['glv'] = _LANGUAGE_GLV; // Manx\n\t$lang['gmh'] = _LANGUAGE_GMH; // German, Middle High\n\t$lang['goh'] = _LANGUAGE_GOH; // German, Old High\n\t$lang['gon'] = _LANGUAGE_GON; // Gondi\n\t$lang['gor'] = _LANGUAGE_GOR; // Gorontalo\n\t$lang['got'] = _LANGUAGE_GOT; // Gothic\n\t$lang['grb'] = _LANGUAGE_GRB; // Grebo\n\t$lang['grc'] = _LANGUAGE_GRC; // Greek, Ancient\n\t$lang['grn'] = _LANGUAGE_GRN; // Guarani\n\t$lang['guj'] = _LANGUAGE_GUJ; // Gujarati\n\t$lang['gwi'] = _LANGUAGE_GWI; // Gwich´in\n\t$lang['hai'] = _LANGUAGE_HAI; // Haida\n\t$lang['hat'] = _LANGUAGE_HAT; // Haitian; Haitian Creole\n\t$lang['hau'] = _LANGUAGE_HAU; // Hausa\n\t$lang['haw'] = _LANGUAGE_HAW; // Hawaiian\n\t$lang['heb'] = _LANGUAGE_HEB; // Hebrew\n\t$lang['her'] = _LANGUAGE_HER; // Herero\n\t$lang['hil'] = _LANGUAGE_HIL; // Hiligaynon\n\t$lang['him'] = _LANGUAGE_HIM; // Himachali\n\t$lang['hin'] = _LANGUAGE_HIN; // Hindi\n\t$lang['hit'] = _LANGUAGE_HIT; // Hittite\n\t$lang['hmn'] = _LANGUAGE_HMN; // Hmong\n\t$lang['hmo'] = _LANGUAGE_HMO; // Hiri Motu\n\t$lang['hrv'] = _LANGUAGE_HRV; // Croatian\n\t$lang['hsb'] = _LANGUAGE_HSB; // Upper Sorbian\n\t$lang['hun'] = _LANGUAGE_HUN; // Hungarian\n\t$lang['hup'] = _LANGUAGE_HUP; // Hupa\n\t$lang['hye'] = _LANGUAGE_HYE; // Armenian\n\t$lang['iba'] = _LANGUAGE_IBA; // Iban\n\t$lang['ibo'] = _LANGUAGE_IBO; // Igbo\n\t$lang['ido'] = _LANGUAGE_IDO; // Ido\n\t$lang['iii'] = _LANGUAGE_III; // Sichuan Yi\n\t$lang['ijo'] = _LANGUAGE_IJO; // Ijo\n\t$lang['iku'] = _LANGUAGE_IKU; // Inuktitut\n\t$lang['ile'] = _LANGUAGE_ILE; // Interlingue\n\t$lang['ilo'] = _LANGUAGE_ILO; // Iloko\n\t$lang['ina'] = _LANGUAGE_INA; // Interlingua (International Auxiliary Language Association)\n\t$lang['inc'] = _LANGUAGE_INC; // Indic (Other)\n\t$lang['ind'] = _LANGUAGE_IND; // Indonesian\n\t$lang['ine'] = _LANGUAGE_INE; // Indo-European (Other)\n\t$lang['inh'] = _LANGUAGE_INH; // Ingush\n\t$lang['ipk'] = _LANGUAGE_IPK; // Inupiaq\n\t$lang['ira'] = _LANGUAGE_IRA; // Iranian (Other)\n\t$lang['iro'] = _LANGUAGE_IRO; // Iroquoian languages\n\t$lang['isl'] = _LANGUAGE_ISL; // Icelandic\n\t$lang['ita'] = _LANGUAGE_ITA; // Italian\n\t$lang['jav'] = _LANGUAGE_JAV; // Javanese\n\t$lang['jbo'] = _LANGUAGE_JBO; // Lojban\n\t$lang['jpn'] = _LANGUAGE_JPN; // Japanese\n\t$lang['jpr'] = _LANGUAGE_JPR; // Judeo-Persian\n\t$lang['jrb'] = _LANGUAGE_JRB; // Judeo-Arabic\n\t$lang['kaa'] = _LANGUAGE_KAA; // Kara-Kalpak\n\t$lang['kab'] = _LANGUAGE_KAB; // Kabyle\n\t$lang['kac'] = _LANGUAGE_KAC; // Kachin\n\t$lang['kal'] = _LANGUAGE_KAL; // Kalaallisut; Greenlandic\n\t$lang['kam'] = _LANGUAGE_KAM; // Kamba\n\t$lang['kan'] = _LANGUAGE_KAN; // Kannada\n\t$lang['kar'] = _LANGUAGE_KAR; // Karen\n\t$lang['kas'] = _LANGUAGE_KAS; // Kashmiri\n\t$lang['kat'] = _LANGUAGE_KAT; // Georgian\n\t$lang['kau'] = _LANGUAGE_KAU; // Kanuri\n\t$lang['kaw'] = _LANGUAGE_KAW; // Kawi\n\t$lang['kaz'] = _LANGUAGE_KAZ; // Kazakh\n\t$lang['kbd'] = _LANGUAGE_KBD; // Kabardian\n\t$lang['kha'] = _LANGUAGE_KHA; // Khasi\n\t$lang['khi'] = _LANGUAGE_KHI; // Khoisan (Other)\n\t$lang['khm'] = _LANGUAGE_KHM; // Khmer\n\t$lang['kho'] = _LANGUAGE_KHO; // Khotanese\n\t$lang['kik'] = _LANGUAGE_KIK; // Kikuyu; Gikuyu\n\t$lang['kin'] = _LANGUAGE_KIN; // Kinyarwanda\n\t$lang['kir'] = _LANGUAGE_KIR; // Kirghiz\n\t$lang['kmb'] = _LANGUAGE_KMB; // Kimbundu\n\t$lang['kok'] = _LANGUAGE_KOK; // Konkani\n\t$lang['kom'] = _LANGUAGE_KOM; // Komi\n\t$lang['kon'] = _LANGUAGE_KON; // Kongo\n\t$lang['kor'] = _LANGUAGE_KOR; // Korean\n\t$lang['kos'] = _LANGUAGE_KOS; // Kosraean\n\t$lang['kpe'] = _LANGUAGE_KPE; // Kpelle\n\t$lang['krc'] = _LANGUAGE_KRC; // Karachay-Balkar\n\t$lang['kro'] = _LANGUAGE_KRO; // Kru\n\t$lang['kru'] = _LANGUAGE_KRU; // Kurukh\n\t$lang['kua'] = _LANGUAGE_KUA; // Kuanyama; Kwanyama\n\t$lang['kum'] = _LANGUAGE_KUM; // Kumyk\n\t$lang['kur'] = _LANGUAGE_KUR; // Kurdish\n\t$lang['kut'] = _LANGUAGE_KUT; // Kutenai\n\t$lang['lad'] = _LANGUAGE_LAD; // Ladino\n\t$lang['lah'] = _LANGUAGE_LAH; // Lahnda\n\t$lang['lam'] = _LANGUAGE_LAM; // Lamba\n\t$lang['lao'] = _LANGUAGE_LAO; // Lao\n\t$lang['lat'] = _LANGUAGE_LAT; // Latin\n\t$lang['lav'] = _LANGUAGE_LAV; // Latvian\n\t$lang['lez'] = _LANGUAGE_LEZ; // Lezghian\n\t$lang['lim'] = _LANGUAGE_LIM; // Limburgan; Limburger; Limburgish\n\t$lang['lin'] = _LANGUAGE_LIN; // Lingala\n\t$lang['lit'] = _LANGUAGE_LIT; // Lithuanian\n\t$lang['lol'] = _LANGUAGE_LOL; // Mongo\n\t$lang['loz'] = _LANGUAGE_LOZ; // Lozi\n\t$lang['ltz'] = _LANGUAGE_LTZ; // Luxembourgish; Letzeburgesch\n\t$lang['lua'] = _LANGUAGE_LUA; // Luba-Lulua\n\t$lang['lub'] = _LANGUAGE_LUB; // Luba-Katanga\n\t$lang['lug'] = _LANGUAGE_LUG; // Ganda\n\t$lang['lui'] = _LANGUAGE_LUI; // Luiseno\n\t$lang['lun'] = _LANGUAGE_LUN; // Lunda\n\t$lang['luo'] = _LANGUAGE_LUO; // Luo (Kenya and Tanzania)\n\t$lang['lus'] = _LANGUAGE_LUS; // lushai\n\t$lang['mad'] = _LANGUAGE_MAD; // Madurese\n\t$lang['mag'] = _LANGUAGE_MAG; // Magahi\n\t$lang['mah'] = _LANGUAGE_MAH; // Marshallese\n\t$lang['mai'] = _LANGUAGE_MAI; // Maithili\n\t$lang['mak'] = _LANGUAGE_MAK; // Makasar\n\t$lang['mal'] = _LANGUAGE_MAL; // Malayalam\n\t$lang['man'] = _LANGUAGE_MAN; // Mandingo\n\t$lang['map'] = _LANGUAGE_MAP; // Austronesian (Other)\n\t$lang['mar'] = _LANGUAGE_MAR; // Marathi\n\t$lang['mas'] = _LANGUAGE_MAS; // Masai\n\t$lang['mdf'] = _LANGUAGE_MDF; // Moksha\n\t$lang['mdr'] = _LANGUAGE_MDR; // Mandar\n\t$lang['men'] = _LANGUAGE_MEN; // Mende\n\t$lang['mga'] = _LANGUAGE_MGA; // Irish, Middle\n\t$lang['mic'] = _LANGUAGE_MIC; // Micmac\n\t$lang['min'] = _LANGUAGE_MIN; // Minangkabau\n\t$lang['mis'] = _LANGUAGE_MIS; // Miscellaneous languages\n\t$lang['mkd'] = _LANGUAGE_MKD; // Macedonian\n\t$lang['mkh'] = _LANGUAGE_MKH; // Mon-Khmer (Other)\n\t$lang['mlg'] = _LANGUAGE_MLG; // Malagasy\n\t$lang['mlt'] = _LANGUAGE_MLT; // Maltese\n\t$lang['mnc'] = _LANGUAGE_MNC; // Manchu\n\t$lang['mni'] = _LANGUAGE_MNI; // Manipuri\n\t$lang['mno'] = _LANGUAGE_MNO; // Manobo languages\n\t$lang['moh'] = _LANGUAGE_MOH; // Mohawk\n\t$lang['mol'] = _LANGUAGE_MOL; // Moldavian\n\t$lang['mon'] = _LANGUAGE_MON; // Mongolian\n\t$lang['mos'] = _LANGUAGE_MOS; // Mossi\n\t$lang['mri'] = _LANGUAGE_MRI; // Maori\n\t$lang['msa'] = _LANGUAGE_MSA; // Malay\n\t$lang['mul'] = _LANGUAGE_MUL; // Multiple languages\n\t$lang['mun'] = _LANGUAGE_MUN; // Munda languages\n\t$lang['mus'] = _LANGUAGE_MUS; // Creek\n\t$lang['mwr'] = _LANGUAGE_MWR; // Marwari\n\t$lang['mya'] = _LANGUAGE_MYA; // Burmese\n\t$lang['myn'] = _LANGUAGE_MYN; // Mayan languages\n\t$lang['myv'] = _LANGUAGE_MYV; // Erzya\n\t$lang['nah'] = _LANGUAGE_NAH; // Nahuatl\n\t$lang['nai'] = _LANGUAGE_NAI; // North American Indian\n\t$lang['nap'] = _LANGUAGE_NAP; // Neapolitan\n\t$lang['nau'] = _LANGUAGE_NAU; // Nauru\n\t$lang['nav'] = _LANGUAGE_NAV; // Navajo; Navaho\n\t$lang['nbl'] = _LANGUAGE_NBL; // Ndebele, South; South Ndebele\n\t$lang['nde'] = _LANGUAGE_NDE; // Ndebele, North; North Ndebele\n\t$lang['ndo'] = _LANGUAGE_NDO; // Ndonga\n\t$lang['nds'] = _LANGUAGE_NDS; // Low German; Low Saxon; German, Low; Saxon, Low\n\t$lang['nep'] = _LANGUAGE_NEP; // Nepali\n\t$lang['new'] = _LANGUAGE_NEW; // Newari; Nepal Bhasa\n\t$lang['nia'] = _LANGUAGE_NIA; // Nias\n\t$lang['nic'] = _LANGUAGE_NIC; // Niger-Kordofanian (Other)\n\t$lang['niu'] = _LANGUAGE_NIU; // Niuean\n\t$lang['nld'] = _LANGUAGE_NLD; // Dutch; Flemish\n\t$lang['nno'] = _LANGUAGE_NNO; // Norwegian Nynorsk; Nynorsk, Norwegian\n\t$lang['nob'] = _LANGUAGE_NOB; // Norwegian Bokmċl; Bokmċl, Norwegian\n\t$lang['nog'] = _LANGUAGE_NOG; // Nogai\n\t$lang['non'] = _LANGUAGE_NON; // Norse, Old\n\t$lang['nor'] = _LANGUAGE_NOR; // Norwegian\n\t$lang['nso'] = _LANGUAGE_NSO; // Sotho, Northern\n\t$lang['nub'] = _LANGUAGE_NUB; // Nubian languages\n\t$lang['nwc'] = _LANGUAGE_NWC; // Classical Newari; Old Newari; Classical Nepal Bhasa\n\t$lang['nya'] = _LANGUAGE_NYA; // Chichewa; Chewa; Nyanja\n\t$lang['nym'] = _LANGUAGE_NYM; // Nyamwezi\n\t$lang['nyn'] = _LANGUAGE_NYN; // Nyankole\n\t$lang['nyo'] = _LANGUAGE_NYO; // Nyoro\n\t$lang['nzi'] = _LANGUAGE_NZI; // Nzima\n\t$lang['oci'] = _LANGUAGE_OCI; // Occitan; Provençal\n\t$lang['oji'] = _LANGUAGE_OJI; // Ojibwa\n\t$lang['ori'] = _LANGUAGE_ORI; // Oriya\n\t$lang['orm'] = _LANGUAGE_ORM; // Oromo\n\t$lang['osa'] = _LANGUAGE_OSA; // Osage\n\t$lang['oss'] = _LANGUAGE_OSS; // Ossetian; Ossetic\n\t$lang['ota'] = _LANGUAGE_OTA; // Turkish, Ottoman\n\t$lang['oto'] = _LANGUAGE_OTO; // Otomian languages\n\t$lang['paa'] = _LANGUAGE_PAA; // Papuan (Other)\n\t$lang['pag'] = _LANGUAGE_PAG; // Pangasinan\n\t$lang['pal'] = _LANGUAGE_PAL; // Pahlavi\n\t$lang['pam'] = _LANGUAGE_PAM; // Pampanga\n\t$lang['pan'] = _LANGUAGE_PAN; // Panjabi; Punjabi\n\t$lang['pap'] = _LANGUAGE_PAP; // Papiamento\n\t$lang['pau'] = _LANGUAGE_PAU; // Palauan\n\t$lang['peo'] = _LANGUAGE_PEO; // Persian, Old\n\t$lang['phi'] = _LANGUAGE_PHI; // Philippine (Other)\n\t$lang['phn'] = _LANGUAGE_PHN; // Phoenician\n\t$lang['pli'] = _LANGUAGE_PLI; // Pali\n\t$lang['pol'] = _LANGUAGE_POL; // Polish\n\t$lang['pon'] = _LANGUAGE_PON; // Pohnpeian\n\t$lang['por'] = _LANGUAGE_POR; // Portuguese\n\t$lang['pra'] = _LANGUAGE_PRA; // Prakrit languages\n\t$lang['pro'] = _LANGUAGE_PRO; // Provençal, Old\n\t$lang['pus'] = _LANGUAGE_PUS; // Pushto\n\t$lang['qaa-qtz'] = _LANGUAGE_QAA_QTZ; // Reserved for local use\n\t$lang['que'] = _LANGUAGE_QUE; // Quechua\n\t$lang['raj'] = _LANGUAGE_RAJ; // Rajasthani\n\t$lang['rap'] = _LANGUAGE_RAP; // Rapanui\n\t$lang['rar'] = _LANGUAGE_RAR; // Rarotongan\n\t$lang['roa'] = _LANGUAGE_ROA; // Romance (Other)\n\t$lang['roh'] = _LANGUAGE_ROH; // Raeto-Romance\n\t$lang['rom'] = _LANGUAGE_ROM; // Romany\n\t$lang['ron'] = _LANGUAGE_RON; // Romanian\n\t$lang['run'] = _LANGUAGE_RUN; // Rundi\n\t$lang['rus'] = _LANGUAGE_RUS; // Russian\n\t$lang['sad'] = _LANGUAGE_SAD; // Sandawe\n\t$lang['sag'] = _LANGUAGE_SAG; // Sango\n\t$lang['sah'] = _LANGUAGE_SAH; // Yakut\n\t$lang['sai'] = _LANGUAGE_SAI; // South American Indian (Other)\n\t$lang['sal'] = _LANGUAGE_SAL; // Salishan languages\n\t$lang['sam'] = _LANGUAGE_SAM; // Samaritan Aramaic\n\t$lang['san'] = _LANGUAGE_SAN; // Sanskrit\n\t$lang['sas'] = _LANGUAGE_SAS; // Sasak\n\t$lang['sat'] = _LANGUAGE_SAT; // Santali\n\t$lang['sco'] = _LANGUAGE_SCO; // Scots\n\t$lang['scr'] = _LANGUAGE_SCR; // Serbo-Croatian\n\t$lang['sel'] = _LANGUAGE_SEL; // Selkup\n\t$lang['sem'] = _LANGUAGE_SEM; // Semitic (Other)\n\t$lang['sga'] = _LANGUAGE_SGA; // Irish, Old\n\t$lang['sgn'] = _LANGUAGE_SGN; // Sign Languages\n\t$lang['shn'] = _LANGUAGE_SHN; // Shan\n\t$lang['sid'] = _LANGUAGE_SID; // Sidamo\n\t$lang['sin'] = _LANGUAGE_SIN; // Sinhalese\n\t$lang['sio'] = _LANGUAGE_SIO; // Siouan languages\n\t$lang['sit'] = _LANGUAGE_SIT; // Sino-Tibetan (Other)\n\t$lang['sla'] = _LANGUAGE_SLA; // Slavic (Other)\n\t$lang['slk'] = _LANGUAGE_SLK; // Slovak\n\t$lang['slv'] = _LANGUAGE_SLV; // Slovenian\n\t$lang['sma'] = _LANGUAGE_SMA; // Southern Sami\n\t$lang['sme'] = _LANGUAGE_SME; // Northern Sami\n\t$lang['smi'] = _LANGUAGE_SMI; // Sami languages (Other)\n\t$lang['smj'] = _LANGUAGE_SMJ; // Lule Sami\n\t$lang['smn'] = _LANGUAGE_SMN; // Inari Sami\n\t$lang['smo'] = _LANGUAGE_SMO; // Samoan\n\t$lang['sms'] = _LANGUAGE_SMS; // Skolt Sami\n\t$lang['sna'] = _LANGUAGE_SNA; // Shona\n\t$lang['snd'] = _LANGUAGE_SND; // Sindhi\n\t$lang['snk'] = _LANGUAGE_SNK; // Soninke\n\t$lang['sog'] = _LANGUAGE_SOG; // Sogdian\n\t$lang['som'] = _LANGUAGE_SOM; // Somali\n\t$lang['son'] = _LANGUAGE_SON; // Songhai\n\t$lang['sot'] = _LANGUAGE_SOT; // Sotho, Southern\n\t$lang['spa'] = _LANGUAGE_SPA; // Spanish; Castilian\n\t$lang['sqi'] = _LANGUAGE_SQI; // Albanian\n\t$lang['srd'] = _LANGUAGE_SRD; // Sardinian\n\t$lang['srp'] = _LANGUAGE_SRP; // Serbian\n\t$lang['srr'] = _LANGUAGE_SRR; // Serer\n\t$lang['ssa'] = _LANGUAGE_SSA; // Nilo-Saharan (Other)\n\t$lang['ssw'] = _LANGUAGE_SSW; // Swati\n\t$lang['suk'] = _LANGUAGE_SUK; // Sukuma\n\t$lang['sun'] = _LANGUAGE_SUN; // Sundanese\n\t$lang['sus'] = _LANGUAGE_SUS; // Susu\n\t$lang['sux'] = _LANGUAGE_SUX; // Sumerian\n\t$lang['swa'] = _LANGUAGE_SWA; // Swahili\n\t$lang['swe'] = _LANGUAGE_SWE; // Swedish\n\t$lang['syr'] = _LANGUAGE_SYR; // Syriac\n\t$lang['tah'] = _LANGUAGE_TAH; // Tahitian\n\t$lang['tai'] = _LANGUAGE_TAI; // Tai (Other)\n\t$lang['tam'] = _LANGUAGE_TAM; // Tamil\n\t$lang['tat'] = _LANGUAGE_TAT; // Tatar\n\t$lang['tel'] = _LANGUAGE_TEL; // Telugu\n\t$lang['tem'] = _LANGUAGE_TEM; // Timne\n\t$lang['ter'] = _LANGUAGE_TER; // Tereno\n\t$lang['tet'] = _LANGUAGE_TET; // Tetum\n\t$lang['tgk'] = _LANGUAGE_TGK; // Tajik\n\t$lang['tgl'] = _LANGUAGE_TGL; // Tagalog\n\t$lang['tha'] = _LANGUAGE_THA; // Thai\n\t$lang['tig'] = _LANGUAGE_TIG; // Tigre\n\t$lang['tir'] = _LANGUAGE_TIR; // Tigrinya\n\t$lang['tiv'] = _LANGUAGE_TIV; // Tiv\n\t$lang['tkl'] = _LANGUAGE_TKL; // Tokelau\n\t$lang['tlh'] = _LANGUAGE_TLH; // Klingon; tlhlngan-Hol\n\t$lang['tli'] = _LANGUAGE_TLI; // Tlingit\n\t$lang['tmh'] = _LANGUAGE_TMH; // Tamashek\n\t$lang['tog'] = _LANGUAGE_TOG; // Tonga (Nyasa)\n\t$lang['ton'] = _LANGUAGE_TON; // Tonga (Tonga Islands)\n\t$lang['tpi'] = _LANGUAGE_TPI; // Tok Pisin\n\t$lang['tsi'] = _LANGUAGE_TSI; // Tsimshian\n\t$lang['tsn'] = _LANGUAGE_TSN; // Tswana\n\t$lang['tso'] = _LANGUAGE_TSO; // Tsonga\n\t$lang['tuk'] = _LANGUAGE_TUK; // Turkmen\n\t$lang['tum'] = _LANGUAGE_TUM; // Tumbuka\n\t$lang['tup'] = _LANGUAGE_TUP; // Tupi languages\n\t$lang['tur'] = _LANGUAGE_TUR; // Turkish\n\t$lang['tut'] = _LANGUAGE_TUT; // Altaic (Other)\n\t$lang['tvl'] = _LANGUAGE_TVL; // Tuvalu\n\t$lang['twi'] = _LANGUAGE_TWI; // Twi\n\t$lang['tyv'] = _LANGUAGE_TYV; // Tuvinian\n\t$lang['udm'] = _LANGUAGE_UDM; // Udmurt\n\t$lang['uga'] = _LANGUAGE_UGA; // Ugaritic\n\t$lang['uig'] = _LANGUAGE_UIG; // Uighur\n\t$lang['ukr'] = _LANGUAGE_UKR; // Ukrainian\n\t$lang['umb'] = _LANGUAGE_UMB; // Umbundu\n\t$lang['und'] = _LANGUAGE_UND; // Undetermined\n\t$lang['urd'] = _LANGUAGE_URD; // Urdu\n\t$lang['uzb'] = _LANGUAGE_UZB; // Uzbek\n\t$lang['vai'] = _LANGUAGE_VAI; // Vai\n\t$lang['ven'] = _LANGUAGE_VEN; // Venda\n\t$lang['vie'] = _LANGUAGE_VIE; // Vietnamese\n\t$lang['vol'] = _LANGUAGE_VOL; // Volapük\n\t$lang['vot'] = _LANGUAGE_VOT; // Votic\n\t$lang['wak'] = _LANGUAGE_WAK; // Wakashan languages\n\t$lang['wal'] = _LANGUAGE_WAL; // Walamo\n\t$lang['war'] = _LANGUAGE_WAR; // Waray\n\t$lang['was'] = _LANGUAGE_WAS; // Washo\n\t$lang['wen'] = _LANGUAGE_WEN; // Sorbian languages\n\t$lang['wln'] = _LANGUAGE_WLN; // Walloon\n\t$lang['wol'] = _LANGUAGE_WOL; // Wolof\n\t$lang['xal'] = _LANGUAGE_XAL; // Kalmyk\n\t$lang['xho'] = _LANGUAGE_XHO; // Xhosa\n\t$lang['yao'] = _LANGUAGE_YAO; // Yao\n\t$lang['yap'] = _LANGUAGE_YAP; // Yapese\n\t$lang['yid'] = _LANGUAGE_YID; // Yiddish\n\t$lang['yor'] = _LANGUAGE_YOR; // Yoruba\n\t$lang['ypk'] = _LANGUAGE_YPK; // Yupik languages\n\t$lang['zap'] = _LANGUAGE_ZAP; // Zapotec\n\t$lang['zen'] = _LANGUAGE_ZEN; // Zenaga\n\t$lang['zha'] = _LANGUAGE_ZHA; // Zhuang; Chuang\n\t$lang['zho'] = _LANGUAGE_ZHO; // Chinese\n\t$lang['znd'] = _LANGUAGE_ZND; // Zande\n\t$lang['zul'] = _LANGUAGE_ZUL; // Zulu\n\t$lang['zun'] = _LANGUAGE_ZUN; // Zuni\n\t// Non-ISO entries are written as x_[language name]\n\t$lang['x_all'] = _ALL; // all languages\n\t$lang['x_brazilian_portuguese'] = _LANGUAGE_X_BRAZILIAN_PORTUGUESE; // Brazilian Portuguese\n\t$lang['x_rus_koi8r'] = _LANGUAGE_X_RUS_KOI8R; // Russian KOI8-R\n\t// end of list\n\treturn $lang;\n}", "static public function english_name() : string {\n return \"Russian\";\n }", "public function getLocale($language)\n {\n // no locale in PrestaShop1.6 only languageCode that is en-en but we need en_EN\n if ($this->isPrestashop16()) {\n return $language->iso_code;\n } else {\n return $language->locale;\n }\n }", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLocale()\n {\n return 'en';\n }" ]
[ "0.7473767", "0.7335703", "0.73287725", "0.71348983", "0.69401884", "0.6936755", "0.6837978", "0.68221885", "0.6798937", "0.6798331", "0.6767085", "0.6766702", "0.67356557", "0.66731375", "0.66544557", "0.6646262", "0.65988415", "0.6579569", "0.65732574", "0.6568392", "0.6487608", "0.6475281", "0.6473367", "0.64640015", "0.6445979", "0.6441109", "0.6396137", "0.63388383", "0.63290244", "0.63290244", "0.6326059", "0.6325612", "0.6297215", "0.62862176", "0.6278026", "0.6272522", "0.62562495", "0.62562495", "0.6233335", "0.62297106", "0.62276584", "0.62245035", "0.62244254", "0.62227654", "0.6215313", "0.6212396", "0.6211341", "0.6211341", "0.6211341", "0.61985713", "0.6194541", "0.61812264", "0.61633223", "0.61450744", "0.61140776", "0.6108285", "0.61036927", "0.60932326", "0.60887825", "0.6076301", "0.6072016", "0.6070585", "0.60671437", "0.60667545", "0.6057944", "0.60483646", "0.6047497", "0.6047497", "0.6030266", "0.60225266", "0.60199636", "0.6018273", "0.5986345", "0.5977864", "0.5977433", "0.5972296", "0.5970984", "0.5965294", "0.5963692", "0.5963692", "0.5962708", "0.5961113", "0.59604305", "0.5956334", "0.5946194", "0.59448594", "0.5944214", "0.59419566", "0.59414977", "0.5940265", "0.59392816", "0.59370553", "0.5934709", "0.59296274", "0.59284174", "0.59284174", "0.59284174", "0.59284174", "0.59284174", "0.59284174", "0.5920014" ]
0.0
-1
Adds a provider for the details
public function addProvider($code) { $this->providerCodes[] = $code; $this->providerCodes = array_unique($this->providerCodes); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_provider($name, \\WP_Sitemaps_Provider $provider)\n {\n }", "public function provider( $provider ) {\n\n\t\tif ( is_string( $provider ) ) {\n\t\t\t$provider = $this->resolveProvider( $provider );\n\t\t}\n\n\t\t$this->providers[] = $provider;\n\t}", "public function addProvider($name, $provider) {\n $this->providers[$name] = $provider;\n }", "public function addServiceProvider($provider);", "public function addProvider(AuthenticationProviderInterface $provider, $provider_id, $priority = 0, $global = FALSE);", "private function registerProvider(ContextProvider $provider)\n {\n $this->providers[] = $provider;\n }", "public function addProvider(FixtureProviderInterface $provider, $order);", "public function createProvider();", "public static function add_providers() {\n\t\t$args = func_get_args();\n\t\tif($args) {\n\t\t\tif(is_array($args[0])) {\n\t\t\t\tself::$providers += $args[0];\n\t\t\t} elseif(count($args) == 2) {\n\t\t\t\tself::$providers[$args[0]] = $args[1];\n\t\t\t} else {\n\t\t\t\tuser_error(__METHOD__ . ' expects either an array of providers or a URL scheme and JSON API endpoint');\n\t\t\t}\n\t\t} else {\n\t\t\tuser_error(__METHOD__ . ' expects either an array of providers or a URL scheme and JSON API endpoint');\n\t\t}\n\t}", "private function add_provider_name_to_record( &$record, $provider_name ) {\n\n\t\tif ( isset( $record['post_id'] ) ) {\n\t\t\t$record['post_id'] = $provider_name . ':' . $record['post_id'];\n\t\t}\n\t\tif ( isset( $record['category_id'] ) ) {\n\t\t\t$record['category_id'] = $provider_name . ':' . $record['category_id'];\n\n\t\t}\n\t}", "public function addProvider(CategoryProviderInterface $provider, $id)\n {\n $this->providers[$id] = $provider;\n }", "public function add($alias, DataProviderInterface $provider);", "public static function provider($provider)\n {\n static::$data = $provider;\n }", "public function setProvider($provider);", "public function addProvider(string $providerKey, ProviderInterface $provider): void\n {\n if (!isset($this->providers[$providerKey])) {\n $this->providers[$providerKey] = $provider;\n }\n }", "private function add_provider_name_to_recordset( &$recordset, $provider_name ) {\n\t\tforeach ( $recordset as &$record ) {\n\t\t\t$this->add_provider_name_to_record( $record, $provider_name );\n\t\t}\n\t}", "public function addField(FieldDataProvider $provider)\n {\n $this->fields[] = $provider;\n return $this;\n }", "public function setProvider($provider = null);", "private function extend_provider($object = null)\n {\n // q->toggle_readonly(false) does not work so we need a new object\n $provider = new com_meego_devprogram_provider($object->guid);\n\n $provider->read_url = com_meego_devprogram_utils::get_url('provider_read', array ('provider_name' => $provider->name));\n $provider->update_url = com_meego_devprogram_utils::get_url('provider_update', array ('provider_name' => $provider->name));\n $provider->delete_url = com_meego_devprogram_utils::get_url('provider_delete', array ('provider_name' => $provider->name));\n $provider->join_url = com_meego_devprogram_utils::get_url('my_membership_create', array ('provider_name' => $provider->name));\n\n // if current user is owner then we can add more goodies\n $user = com_meego_devprogram_utils::get_current_user();\n\n $provider->number_of_members = false;\n\n $mvc = midgardmvc_core::get_instance();\n\n // set the can join flag to true by default\n $provider->can_join = true;\n\n // set management fflag to false by default\n $provider->can_manage = false;\n\n // can current user manage the provider\n if ( com_meego_devprogram_utils::is_current_user_creator_or_admin($object)\n || com_meego_devprogram_membutils::is_current_user_member_of_provider($object->id))\n {\n $provider->can_manage = true;\n $provider->can_join = false;\n\n // set the url for the membership list page\n $provider->list_memberships_url = com_meego_devprogram_utils::get_url('provider_members', array ('provider_name' => $provider->name));\n // set the approved number of members (all but the cancelled ones) of this provider\n $provider->number_of_members = count(com_meego_devprogram_membutils::get_memberships_by_provider($provider->id));\n // set the number of pending membership requests\n $provider->number_of_members = count(com_meego_devprogram_membutils::get_memberships_by_provider($provider->id));\n }\n\n // can the provider be deleted; ie. check if provider has devices that belong to open programs\n $provider->can_not_delete = com_meego_devprogram_provutils::has_provider_devices($object->id);\n\n return $provider;\n }", "protected function registerProvider( $provider ) {\n\n\t\tif ( method_exists( $provider, 'register' ) ) {\n\t\t\t$provider->register();\n\t\t}\n\t}", "protected function addProvider($fileInfo)\n\t{\n\t\t$className = $this->guessClassName($fileInfo);\n\n\t\tif (class_exists($className)) {\n\t\t\t$this->providers[] = $className;\n\t\t}\n\t}", "public function setProvider(string $provider)\n {\n $this->provider = $provider;\n }", "public function provider($provider)\n {\n return $this->setProperty('provider', $provider);\n }", "public function setProviderName($name);", "function wp_oembed_add_provider($format, $provider, $regex = \\false)\n {\n }", "public function addProvider(ProviderInterface $provider) \n {\n $this->providers[$provider->getId()] = $provider;\n\n return $this;\n }", "public function getProvider();", "public function getProvider();", "public function getProvider();", "public function created(Provider $provider)\n {\n //\n }", "public function get_provider($name)\n {\n }", "public function registerAdditionalProviders()\n {\n foreach ($this->providers as $provider) {\n $this->app->register($provider);\n }\n }", "protected function registerProviders() {\n\n\t\tforeach ( $this->getProviders() as $provider ) {\n\t\t\t$this->registerProvider( $provider );\n\t\t}\n\t}", "public function associateNewProvider($provider_user_id, $token, $data) {\n if ($this->userManager->addUserRecord($this->currentUser->id(), $provider_user_id, $token, $data)) {\n $this->response = $this->getPostLoginRedirection();\n\n return;\n }\n\n $this->messenger->addError($this->t('New provider could not be associated.'));\n $this->response = $this->getLoginFormRedirection();\n }", "public function setProvider(ProviderInterface $provider);", "public function register($provider) : ServiceProvider;", "public function addProviders() {\n\n $this->info('Add Providers to config/app.php');\n\n $path = base_path('config') . '/app.php';\n $configContents = file_get_contents($path);\n $add = false;\n\n $configContents = preg_replace_callback('/(\\'providers\\' => \\[)([\\s\\S]*?)(])/', function($matches) use (&$add) {\n\n $matches2 = $matches[2];\n\n if (strpos($matches2, 'Rairlie\\LockingSession\\LockingSessionServiceProvider') === false) {\n\n $matches2 = str_replace('Illuminate\\Session\\SessionServiceProvider', '// Illuminate\\Session\\SessionServiceProvider', $matches2);\n\n $matches2 = preg_replace_callback('/(Package Service Providers[\\s\\S]*?\\*\\/)([\\s\\S]*?)(\\/\\*)/', function($matches) {\n\n $return = $matches[1] . rtrim($matches[2]) . FormatHelper::NEW_LINE . FormatHelper::TAB . FormatHelper::TAB .\n 'Rairlie\\LockingSession\\LockingSessionServiceProvider::class,' . \n FormatHelper::NEW_LINE . FormatHelper::NEW_LINE . FormatHelper::TAB . FormatHelper::TAB . $matches[3];\n\n return $return;\n\n }, $matches2);\n\n $add = true;\n }\n\n $return = $matches[1] . $matches2 . $matches[3];\n \n return $return;\n\n }, $configContents);\n\n if ($add) {\n\n file_put_contents($path, $configContents);\n }\n else {\n\n $this->error(' #ERR1 [SKIP] ' . $path . ' already has providers');\n }\n }", "public function setDataProvider($providerName);", "public function provider()\n {\n return $this->hasMany(Provider::class);\n }", "public function addClientToProvider($provider, $client) {\n\n global $xoopsUser;\n\n $postdata = http_build_query(\n array(\n 'ptype' => 'add-client',\n 'provider_url' => $provider['provider_url'],\n 'provider_key' => $provider['provider_key'],\n 'client_url' => $client['client_url'],\n 'client_key' => $client['client_key'],\n 'client_addsite' => $client['client_addsite'],\n 'client_sitename' => $client['client_sitename'],\n 'client_slogan' => $client['client_slogan'],\n 'pcsubmitter' => ($xoopsUser->getVar('uname') . ' - ' . XOOPS_URL)\n )\n );\n \n $wgbacklinks = WgbacklinksHelper::getInstance();\n $result = $wgbacklinks->execExchangeData($provider['provider_url'], $postdata); \n \n return $result;\n }", "public function setProvider($provider)\n {\n if (!$provider instanceof ServiceProvider) {\n throw new InvalidArgumentException(\"ServiceProvider must be a subclass of 'EasyWeChat\\\\Support\\\\ServiceProvider\n .\");\n }\n\n $this->providers[] = $provider;\n }", "private function setProvider(object $provider): void\n {\n $this->provider = \\get_class($provider);\n }", "public function setProvider(?string $provider): self {\n $this->provider = $provider;\n return $this;\n }", "public function addItem(NumberProviderInterface $item);", "public function get_providers()\n {\n }", "final public function __construct(Provider $provider) {\n $this->_provider = $provider;\n }", "public function saveProvider($provider) {\n $provider->save();\n\n $providerAccount = $this->newProviderAccount($provider->id);\n $providerAccount->save();\n\n $provider->pch_provider_account_id = $providerAccount->id;\n $provider->save();\n }", "public function store(ProviderRequest $request)\n {\n Provider::create($request->validated());\n return;\n }", "public function with($provider);", "public function setProvider($provider) {\n $this->properties['provider'] = $provider;\n\n return $this;\n }", "public function getProvider($provider_id);", "public function setProvider($name) {\n $name = Database::secureInput($name);\n\n if (!is_string($name) || strlen($name) < 2 || strlen($name) > 100) {\n throw new InvalidArgumentException(\"\\\"provider\\\" is no string or its length is invalid\");\n }\n\n $this->provider = $name;\n }", "public function addHeaderProvider(ProviderInterface $headerProvider)\n {\n $this->headerProviders[] = $headerProvider;\n }", "public function offsetSet($name, $provider) {\n if (is_null($name)) {\n $this->providers[] = $provider;\n } else {\n $this->set($name, $provider);\n }\n }", "public function addRemoteIdentity($provider, $identifier);", "private function providers()\n {\n $this->register(new CorsServiceProvider());\n $this->register(new HmacServiceProvider());\n }", "public function addServices($provider)\n\t{\n\t\t$services = new $provider;\n\t\t$services = $services->register();\n\t\tforeach($services as $key => $item)\n\t\t\tContainer::registerClass( $key , $item );\n\t}", "public function provider()\n {\n return $this->belongsTo(Provider::class, 'provider_id');\n }", "abstract public function getProviders();", "public function create()\n {\n return view('admin.providers.create', compact('provider', 'addresses'));\n }", "public function register($provider)\n {\n if (!$provider instanceof ServiceProvider) {\n $provider = new $provider($this);\n }\n\n if (array_key_exists($providerName = get_class($provider), $this->loadedProviders)) {\n return;\n }\n\n $this->loadedProviders[$providerName] = $provider;\n\n if (method_exists($provider, 'register')) {\n $provider->register();\n }\n\n if ($this->booted) {\n $this->bootProvider($provider);\n }\n }", "protected function registerProviders() {\n $providers = $this->providers;\n foreach ($providers as $key => $value) {\n $this->app[$key] = $this->app->share(function($app) use ($value) {\n return new $value($app);\n });\n }\n }", "public function register(): void\n {\n $this->registerProviders(collect($this->providers));\n }", "public function registerConfiguredProviders()\n {\n __l('[App] registerConfiguredProviders');\n\n $manifestPath = $this->storagePath() . '/framework/services.json';\n\n (new ProviderRepository($this, new Filesystem, $manifestPath))\n ->load($this->get('config')['app.providers']);\n }", "public function provider($value): self\n {\n $this->provider = $value;\n \n return $this;\n }", "public function registerProvider(string $provider): void\n {\n if (!class_exists($provider)) {\n throw Exceptional::{'Implementation,NotFound'}(\n 'Service provider ' . $provider . ' could not be found'\n );\n }\n\n $provider = $this->newInstanceOf($provider);\n\n if (!$provider instanceof Provider) {\n throw Exceptional::{'Implementation'}(\n 'Service provider ' . $provider . ' does not implement DecodeLabs\\\\Pandora\\\\Provider'\n );\n }\n\n $this->registerProviderInstance($provider);\n }", "public function registerSMSProvider(string $name, SMSProvider $provider)\n {\n $this->smsProviders[$name] = $provider;\n }", "public function register($provider)\n {\n if (! $provider instanceof ServiceProvider) {\n $provider = new $provider($this);\n }\n\n if (array_key_exists($providerName = get_class($provider), $this->loadedProviders)) {\n return;\n }\n\n $this->loadedProviders[$providerName] = $provider;\n\n if (method_exists($provider, 'register')) {\n $provider->register();\n }\n\n if ($this->booted) {\n $this->bootProvider($provider);\n }\n }", "public function show(Provider $provider)\n {\n //\n }", "public function show(Provider $provider)\n {\n //\n }", "public function store(StoreProviderRequest $request)\n {\n\n $user = Auth::user();\n\n if ($user->provider != null) return $this->errorForbidden();\n // dd($request->all());\n\n $user->update(['type' => 'provider']);\n\n $provider = Provider::create(array_merge($request->all(),['user_id' => $user->id]) );\n $provider->categories()->attach($request->categories_ids);\n $provider->countries()->attach($request->countries_ids);\n\n if($request->logo){\n $logo = upload($request->logo, 'providers');\n $provider->update(['logo' => $logo]);\n }\n if($request->video){\n $video = upload($request->video, 'providers');\n $provider->update(['video' => $video]);\n }\n\n return $this->respondWithItem(new ProviderLargeResource($provider), 'provider created');\n\n }", "protected function persisteProviderData(Provider $provider)\n {\n $driver = $this->getDriver();\n\n $params = $this->processParams($provider);\n\n if ($driver->rowExistsInDatabase('provider', $provider->getId())) {\n /** actualizar */\n $driver->update('provider', $params['provider'], ['id' => $provider->getId()]);\n } else {\n /** insertar */\n $driver->insert('provider', $params['provider']);\n }\n $this->persistentity()->persistData($params['provider_address'], 'id', 'provider_address', 'id');\n return true;\n }", "public function store(CreateProviderRequest $request)\n\t{\n\t \n\t\tProvider::create($request->all());\n\n\t\treturn redirect()->route('admin.provider.index');\n\t}", "protected function markAsRegistered($provider)\n {\n $class = get_class($provider);\n //$this['events']->fire($class, [$provider]);\n\n $this->serviceProviders[] = $provider;\n\n $this->loadedProviders[ $class ] = TRUE;\n }", "public static function register(ServiceProvider $provider) {\n\t\tProfiler::recordAsset('Service providers', get_class($provider), function() use ($provider) {\n\t\t\tstatic::container()->register($provider);\n\t\t});\n\t}", "protected function registerProviders()\n\t{\n\t\tforeach ($this->providers as $provider) {\n\t\t\t$this->app->register($provider);\n\n\t\t}\n\t}", "public function edit(Provider $provider)\n {\n //\n }", "public function attach(WidgetProvider $provider): void\n {\n $this->attached = $provider;\n }", "protected function registerProviders()\n {\n foreach (config('app.providers') as $provider) {\n (new $provider($this))->register();\n }\n }", "protected function setSupportedProviders()\n {\n $this->addSupportedReadProvider(new RESTAPI\\D7RefineryServerNew());\n }", "public function registerConfiguredProviders(): void\n {\n (new ProviderRepository($this, new Filesystem, $this->getCachedServicesPath()))\n ->load($this['config']['services.providers']);\n }", "public function getProvider(): ProviderInterface;", "protected function registerServiceProviders()\n {\n foreach($this->providers as $provider)\n {\n // check if the provider class exists\n if (class_exists($provider))\n {\n // register this service provider, and Instantiate it.\n $service = new $provider($this);\n\n // check if the service provider has a boot method.\n if (method_exists($service, 'register')) {\n $service->register();\n }\n\n // save the active provider so that we can call it later.\n $this->activeProviders[$provider] = $service;\n }\n }\n }", "public function getProviders();", "public function getProviders();", "protected function setSupportedProviders()\n {\n $this->addSupportedReadProvider(new RESTAPI\\D7RefineryServerCurrent());\n }", "protected function registerProviders()\n {\n parent::registerProviders();\n\n $this->register(new ServiceControllerServiceProvider());\n $this->register(\n new CorsServiceProvider(),\n [\n 'cors.allowOrigin' => implode(' ', $this['config']['cors']['origins']),\n 'cors.allowCredentials' => true,\n ]\n );\n\n $this->register(new RoutingServiceProvider());\n }", "public function createProvider($type, $name, array $credentials)\n {\n $this->requestWithErrorHandling('post', '/api/teams/'.Helpers::config('team').'/providers', [\n 'type' => $type,\n 'name' => $name,\n 'meta' => $credentials,\n ]);\n }", "public function store(ProviderRequest $request)\n {\n $validated=$request->validated();\n $provider = Provider::create($validated);\n\n return ProviderResource::collection($provider);\n }", "public function registerProviders(string ...$providers): void\n {\n foreach ($providers as $provider) {\n $this->registerProvider($provider);\n }\n }", "public function init_provider($provider)\n {\n $this->provider = $provider;\n $this->client = new \\GuzzleHttp\\Client([\n 'base_uri' => $this->helper->endpoint,\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n 'Auth' => (\n $this->provider['user_id'] . ':' . sha1($this->helper->timestamp . $this->provider['secret_key']) . ':' . $this->helper->timestamp\n )\n ]\n ]);\n }", "public function setServiceProvider($name, ServiceProviderInterface $provider);", "public function handleProviderCallback($provider)\n {\n\n\n //$socialiteUserObject = Socialite::driver($provider)->stateless()->user();\n $socialiteUserObject = Socialite::driver($provider)->user();\n\n //keresés JSON mezőben\n //HA TALÁLUNK A FACEBOOK ID ALAPJÁN CUSTOMER\n $customer = Customer::where([\n 'social->' . $provider . '->id' => $socialiteUserObject->getId(),\n ])->first();\n\n\n //Mivel a Modelben array-jé castoltuk a social atrributútumot, ezért ő tömbként visekedik.\n // dd($customer->social['facebook']['id']);\n if (!$customer) {\n //HA FACEBOOK ID ALAPJÁN NINCS, AKKOR EMAIL ALAPJÁN\n $customer = Customer::where('email', 'LIKE', $socialiteUserObject->getEmail())->first();\n if (!$customer) {\n //HA EMAIL ALAPJÁN SINCS, AKKOR LÉTREHOZZUK\n $customer = $this->createNewCustomer($socialiteUserObject);\n }\n }\n //$customer->social->facebook->token = $socialiteUserObject->token;\n $socialArray = [\n $provider => [\n 'id' => $socialiteUserObject->getId(),\n 'token' => $socialiteUserObject->token\n ]\n ];\n\n $customer->social = $socialArray;\n $customer->save();\n\n auth()->guard('customer')->loginUsingId($customer->id);\n\n return redirect()->route('customers.index');\n }", "public function registerProvider($class, array $options = []);", "public function setProviders($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->providers = $arr;\n\n return $this;\n }", "public function provider()\n {\n return $this->belongsTo('Deploy\\Models\\Provider');\n }", "protected function markAsRegistered($provider)\n {\n $this->serviceProviders[] = $provider;\n \n $this->loadServiceProviders[getClass($provider, true)] = true;\n }", "public function provider($key);", "function provider($label, $id)\n{\n return array(\n 'label' => $label,\n 'id' => $id,\n 'url' => './auth/' . $id\n );\n}", "public function pushHttpProvider(DataProviderContract $provider): void;" ]
[ "0.7642347", "0.7285289", "0.7117194", "0.71078515", "0.686752", "0.6707226", "0.6630531", "0.66121453", "0.66102266", "0.64996415", "0.64943093", "0.64040303", "0.63838714", "0.6374066", "0.6344751", "0.6235419", "0.62257105", "0.61992896", "0.6165743", "0.6138291", "0.61382544", "0.61360544", "0.6135197", "0.6096257", "0.6088029", "0.6082272", "0.59986097", "0.59986097", "0.59986097", "0.5994734", "0.5980558", "0.5980084", "0.59705275", "0.595496", "0.59537953", "0.5894426", "0.58909553", "0.5858648", "0.5843857", "0.5841074", "0.582754", "0.58209056", "0.5816742", "0.57962203", "0.57855713", "0.57824117", "0.5781711", "0.57416165", "0.57407385", "0.57115185", "0.5705482", "0.5698391", "0.5697152", "0.5694747", "0.5679772", "0.5655872", "0.5646956", "0.564155", "0.56356347", "0.56305295", "0.56300086", "0.5629995", "0.56282073", "0.56111157", "0.56036043", "0.5599627", "0.5589232", "0.55828935", "0.55777025", "0.55777025", "0.55775094", "0.55763656", "0.5553405", "0.5550093", "0.5542446", "0.55422676", "0.5532925", "0.55076975", "0.55003935", "0.54982007", "0.5496316", "0.54646134", "0.54411185", "0.5438087", "0.5438087", "0.5429834", "0.5422741", "0.5417213", "0.54116106", "0.5407168", "0.5406304", "0.53959024", "0.539335", "0.5387202", "0.538353", "0.53822774", "0.5379838", "0.5364859", "0.5352097", "0.5346061" ]
0.6088415
24
Adds a detail type needed, and force its provider if wanted. This will immediately trigger the retrieval of the detail
public function addDetail($detailCode, $providerCode = null) { $this->detailsAdded[] = array('code' => $detailCode, 'provider' => $providerCode); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDetail(?string $detail): void\n {\n $this->detail = $detail;\n }", "function detail()\n {\n }", "abstract public function load($Type, $Key, $DetailLevel);", "public function setDetail($detail)\n {\n $this->detail = $detail;\n }", "public function setDetail($var)\n {\n GPBUtil::checkString($var, True);\n $this->detail = $var;\n\n return $this;\n }", "function fill_in_additional_detail_fields()\n {\n parent::fill_in_additional_detail_fields();\n $this->project_name = $this->_get_project_name($this->project_id);\n $this->resource_name = $this->getResourceName();\n }", "private function addDetailRecord(DetailRecord $detailRecord, DescriptiveRecord $descriptiveRecord)\n {\n // Record Type\n $line = $detailRecord->getRecordType();\n\n // BSB\n $line .= $detailRecord->getBsb();\n\n // Account Number\n $line .= str_pad($detailRecord->getAccountNumber(), 9, ' ', STR_PAD_LEFT);\n\n // Indicator\n $line .= $detailRecord->getIndicator() ?: ' ';\n\n // Transaction Code\n $line .= $detailRecord->getTransactionCode();\n\n // Transaction Amount\n $line .= str_pad($detailRecord->getAmount(), 10, '0', STR_PAD_LEFT);\n\n // Account Name\n $line .= str_pad($detailRecord->getAccountName(), 32, ' ', STR_PAD_RIGHT);\n\n // Lodgement Reference\n $line .= str_pad($detailRecord->getReference(), 18, ' ', STR_PAD_RIGHT);\n\n // Trace BSB\n $line .= $descriptiveRecord->getBsb();\n\n // Trace Account Number\n $line .= str_pad($descriptiveRecord->getAccountNumber(), 9, ' ', STR_PAD_LEFT);\n\n // Remitter Name\n $line .= str_pad($detailRecord->getRemitter(), 16, ' ', STR_PAD_RIGHT);\n\n // Withholding amount\n $line .= str_pad($detailRecord->getTaxWithholding(), 8, '0', STR_PAD_LEFT);\n\n $this->addLine($line);\n }", "public function setDetail( $value ) {\r\n\t\t$this->detail = $value;\r\n\t}", "private function addDetail()\n { \n $params = array();\n $params['db_link'] = $this->db;\n $params['ticket_id'] = $_REQUEST['ticket_id'];\n $Tickets = new Tickets($params);\n \n if($_REQUEST['changed_status'] != 0)\n {\n \n $Tickets->setStatus($_REQUEST['changed_status']);\n $Tickets->update();\n //save log \n $this->saveLog($_REQUEST['changed_status'], $_REQUEST['ticket_id'], null);\n }\n \n $data = array();\n $data['subject'] = stripslashes(trim($_REQUEST['subject']));\n $data['notes'] = stripslashes(trim($_REQUEST['notes']));\n $data['user_id'] = $_SESSION['LOGIN_USER']['userId'];\n \n //$Tickets = new Tickets($params);\n $details_id = $Tickets->addDetails($data);\n\n if($details_id)\n {\n $files = $this->getUploadedFiles();\n $this->saveAttachments($files, $_REQUEST['ticket_id'], $details_id);\n }\n \n //Send Email To resolvers, source, etc.\n $this->sendEmail($_REQUEST['ticket_id'], $data['subject']);\n \n \n \n echo '[{\"isError\":0, \"message\":\"Details added Successfully.\"}]';\n exit;\n }", "public function setup_types()\n {\n }", "abstract public function store($Type, $Key, $DetailLevel, $Props);", "public static function geoCart_initSteps_addOtherDetails()\n {\n //Possible enhancement: perhaps show final fee table on other detail page?\n return false;\n }", "public function addToAdditionalDetail(\\Sabre\\UpdateReservation\\StructType\\AdditionalDetailType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\Sabre\\UpdateReservation\\StructType\\AdditionalDetailType) {\n throw new \\InvalidArgumentException(sprintf('The AdditionalDetail property can only contain items of \\Sabre\\UpdateReservation\\StructType\\AdditionalDetailType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->AdditionalDetail[] = $item;\n return $this;\n }", "public function setDefaultTypeData(){\n if(\n is_object($this->source) &&\n is_object($this->target)\n ){\n if(\n $this->source->isAbyss() ||\n $this->target->isAbyss()\n ){\n $this->scope = 'abyssal';\n $this->type = ['abyssal'];\n }else{\n $routeController = new Route();\n $route = $routeController->searchRoute($this->source->systemId, $this->target->systemId, 1);\n\n if($route['routePossible']){\n $this->scope = 'stargate';\n $this->type = ['stargate'];\n }else{\n $this->scope = 'wh';\n $this->type = ['wh_fresh'];\n }\n }\n }\n }", "public function setNeedDetail($var)\n {\n GPBUtil::checkBool($var);\n $this->NeedDetail = $var;\n\n return $this;\n }", "public function addMealType(){\n \t$id = $this->formValueForKey(\"mealTypeSelection\");\n \t\n \t$foundMealType = BLGenericRecord::recordMatchingKeyAndValue(\"MealType\", \"id\", $id);\n \t$this->currentRecipe()->addMealType($foundMealType);\n }", "public function createNew($iType, $iTypeDetail, $oDetails)\n\t{\n\t\t$oDataAccess\t= DataAccess::getDataAccess();\n\t\tif (!$oDataAccess->TransactionStart())\n\t\t{\n\t\t\t// Failure!\n\t\t\treturn \tarray(\n\t\t\t\t\t\t\"Success\"\t=> false,\n\t\t\t\t\t\t\"Message\"\t=> Employee::getForId(Flex::getUserId())->isGod() ? 'There was an error accessing the database' : ''\n\t\t\t\t\t);\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t// Check permissions\n\t\t\tif (!AuthenticatedUser()->UserHasPerm(array(PERMISSION_OPERATOR, PERMISSION_OPERATOR_EXTERNAL)))\n\t\t\t{\n\t\t\t\tthrow new JSON_Handler_FollowUp_Exception('You do not have permission to create Follow-Ups.');\n\t\t\t}\n\t\t\t\n\t\t\t$bIsOnceOff\t= isset($oDetails->sDueDateTime);\n\t\t\t$aErrors\t= array();\n\t\t\t\n\t\t\t// Validate input\n\t\t\tif (!is_numeric($oDetails->iCategory))\n\t\t\t{\n\t\t\t\t$aErrors[]\t= 'Invalid Category.';\n\t\t\t}\n\t\t\t\n\t\t\tif ($bIsOnceOff)\n\t\t\t{\n\t\t\t\t// Once off\n\t\t\t\tif (!is_numeric(strtotime($oDetails->sDueDateTime)))\n\t\t\t\t{\n\t\t\t\t\t$aErrors[]\t= 'Invalid Due Date.';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Recurring\n\t\t\t\tif (!is_numeric(strtotime($oDetails->sStartDateTime)))\n\t\t\t\t{\n\t\t\t\t\t$aErrors[]\t= 'Invalid Start Date.';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_null($oDetails->sEndDateTime) && !is_numeric(strtotime($oDetails->sEndDateTime)))\n\t\t\t\t{\n\t\t\t\t\t$aErrors[]\t= 'Invalid End Date.';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_numeric($oDetails->iRecurrenceMultiplier))\n\t\t\t\t{\n\t\t\t\t\t$aErrors[]\t= 'Invalid Recurrence Multiplier.';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_numeric($oDetails->iRecurrencePeriod))\n\t\t\t\t{\n\t\t\t\t\t$aErrors[]\t= 'Invalid Recurrence Period.';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Validate the type detail\n\t\t\tswitch ($iType)\n\t\t\t{\n\t\t\t\tcase FOLLOWUP_TYPE_NOTE:\n\t\t\t\t\tif (!Note::getForId($iTypeDetail))\n\t\t\t\t\t{\n\t\t\t\t\t\t$aErrors[]\t= 'Invalid Note identifier supplied.';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase FOLLOWUP_TYPE_ACTION:\n\t\t\t\t\tif (!Action::getForId($iTypeDetail))\n\t\t\t\t\t{\n\t\t\t\t\t\t$aErrors[]\t= 'Invalid Action identifier supplied.';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase FOLLOWUP_TYPE_TICKET_CORRESPONDENCE:\n\t\t\t\t\tif (!Ticketing_Correspondance::getForId($iTypeDetail))\n\t\t\t\t\t{\n\t\t\t\t\t\t$aErrors[]\t= 'Invalid Ticketing Correspondance identifier supplied.';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif (count($aErrors) > 0)\n\t\t\t{\n\t\t\t\t// Return validation errors\n\t\t\t\treturn \tarray(\n\t\t\t\t\t\t\t\"Success\"\t\t\t=> false,\n\t\t\t\t\t\t\t\"aValidationErrors\"\t=> $aErrors\n\t\t\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Create fup/recurring fup\n\t\t\t\tif ($bIsOnceOff)\n\t\t\t\t{\n\t\t\t\t\t// Once off/single follow-up\n\t\t\t\t\t$oFollowUp\t\t\t\t\t\t\t= new FollowUp();\n\t\t\t\t\t$oFollowUp->assigned_employee_id\t= Flex::getUserId();\n\t\t\t\t\t$oFollowUp->created_datetime\t\t= DataAccess::getDataAccess()->getNow();\n\t\t\t\t\t$oFollowUp->due_datetime\t\t\t= $oDetails->sDueDateTime;\n\t\t\t\t\t$oFollowUp->followup_type_id\t\t= $iType;\n\t\t\t\t\t$oFollowUp->followup_category_id\t= $oDetails->iCategory;\n\t\t\t\t\t$oFollowUp->save();\n\t\t\t\t\t\n\t\t\t\t\t// Create link to type detail\n\t\t\t\t\tswitch ($iType)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase FOLLOWUP_TYPE_NOTE:\n\t\t\t\t\t\t\t$oFollowUpNote\t\t\t\t= new FollowUp_Note();\n\t\t\t\t\t\t\t$oFollowUpNote->followup_id\t= $oFollowUp->id;\n\t\t\t\t\t\t\t$oFollowUpNote->note_id\t\t= $iTypeDetail;\n\t\t\t\t\t\t\t$oFollowUpNote->save();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase FOLLOWUP_TYPE_ACTION:\n\t\t\t\t\t\t\t$oFollowUpAction\t\t\t\t= new FollowUp_Action();\n\t\t\t\t\t\t\t$oFollowUpAction->followup_id\t= $oFollowUp->id;\n\t\t\t\t\t\t\t$oFollowUpAction->action_id\t\t= $iTypeDetail;\n\t\t\t\t\t\t\t$oFollowUpAction->save();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase FOLLOWUP_TYPE_TICKET_CORRESPONDENCE:\n\t\t\t\t\t\t\t$oFollowUpTicketingCorrespondence\t\t\t\t\t\t\t\t= new FollowUp_Ticketing_Correspondence();\n\t\t\t\t\t\t\t$oFollowUpTicketingCorrespondence->followup_id\t\t\t\t\t= $oFollowUp->id;\n\t\t\t\t\t\t\t$oFollowUpTicketingCorrespondence->ticketing_correspondence_id\t= $iTypeDetail;\n\t\t\t\t\t\t\t$oFollowUpTicketingCorrespondence->save();\n\t\t\t\t\t\t\tbreak;\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// Recurring followup\n\t\t\t\t\t$oFollowUpRecurring\t\t\t\t\t\t\t\t\t= new FollowUp_Recurring();\n\t\t\t\t\t$oFollowUpRecurring->assigned_employee_id\t\t\t= Flex::getUserId();\n\t\t\t\t\t$oFollowUpRecurring->created_datetime\t\t\t\t= DataAccess::getDataAccess()->getNow();\n\t\t\t\t\t$oFollowUpRecurring->start_datetime\t\t\t\t\t= $oDetails->sStartDateTime;\n\t\t\t\t\t\n\t\t\t\t\tif (is_null($oDetails->sEndDateTime))\n\t\t\t\t\t{\n\t\t\t\t\t\t// No end date given, set to 9999-12-31 23:59:59 (the end of time)\n\t\t\t\t\t\t$oFollowUpRecurring->end_datetime\t= END_OF_TIME;\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// Use end date given\n\t\t\t\t\t\t$oFollowUpRecurring->end_datetime\t= $oDetails->sEndDateTime;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$oFollowUpRecurring->followup_type_id\t\t\t\t= $iType;\n\t\t\t\t\t$oFollowUpRecurring->followup_category_id\t\t\t= $oDetails->iCategory;\n\t\t\t\t\t$oFollowUpRecurring->recurrence_multiplier\t\t\t= $oDetails->iRecurrenceMultiplier;\n\t\t\t\t\t$oFollowUpRecurring->followup_recurrence_period_id\t= $oDetails->iRecurrencePeriod;\n\t\t\t\t\t$oFollowUpRecurring->save();\n\t\t\t\t\t\n\t\t\t\t\t// Create link to type detail\n\t\t\t\t\tswitch ($iType)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase FOLLOWUP_TYPE_NOTE:\n\t\t\t\t\t\t\t$oFollowUpRecurringNote\t\t\t\t\t\t\t= new FollowUp_Recurring_Note();\n\t\t\t\t\t\t\t$oFollowUpRecurringNote->followup_recurring_id\t= $oFollowUpRecurring->id;\n\t\t\t\t\t\t\t$oFollowUpRecurringNote->note_id\t\t\t\t= $iTypeDetail;\n\t\t\t\t\t\t\t$oFollowUpRecurringNote->save();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase FOLLOWUP_TYPE_ACTION:\n\t\t\t\t\t\t\t$oFollowUpRecurringAction\t\t\t\t\t\t\t= new FollowUp_Recurring_Action();\n\t\t\t\t\t\t\t$oFollowUpRecurringAction->followup_recurring_id\t= $oFollowUpRecurring->id;\n\t\t\t\t\t\t\t$oFollowUpRecurringAction->action_id\t\t\t\t= $iTypeDetail;\n\t\t\t\t\t\t\t$oFollowUpRecurringAction->save();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase FOLLOWUP_TYPE_TICKET_CORRESPONDENCE:\n\t\t\t\t\t\t\t$oFollowUpRecurringTicketingCorrespondence\t\t\t\t\t\t\t\t= new FollowUp_Recurring_Ticketing_Correspondence();\n\t\t\t\t\t\t\t$oFollowUpRecurringTicketingCorrespondence->followup_recurring_id\t\t= $oFollowUpRecurring->id;\n\t\t\t\t\t\t\t$oFollowUpRecurringTicketingCorrespondence->ticketing_correspondence_id\t= $iTypeDetail;\n\t\t\t\t\t\t\t$oFollowUpRecurringTicketingCorrespondence->save();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Commit db transaction\n\t\t\t\t$oDataAccess->TransactionCommit();\n\t\t\t\t\n\t\t\t\treturn\tarray(\"Success\"\t=> true);\n\t\t\t}\n\t\t}\n\t\tcatch (JSON_Handler_FollowUp_Exception $oException)\n\t\t{\n\t\t\t$oDataAccess->TransactionRollback();\n\t\t\t\n\t\t\treturn \tarray(\n\t\t\t\t\t\t\"Success\"\t=> false,\n\t\t\t\t\t\t\"Message\"\t=> $oException->getMessage()\n\t\t\t\t\t);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$oDataAccess->TransactionRollback();\n\t\t\t\n\t\t\treturn \tarray(\n\t\t\t\t\t\t\"Success\"\t=> false,\n\t\t\t\t\t\t\"Message\"\t=> Employee::getForId(Flex::getUserId())->isGod ? $e->getMessage() : 'There was an error creating the new follow-up'\n\t\t\t\t\t);\n\t\t}\n\t}", "public function getDetail();", "function register_field_type_info($info)\n {\n }", "public function addType($type);", "function SetUpDetailParms() {\n\n\t\t// Get the keys for master table\n\t\tif (isset($_GET[EW_TABLE_SHOW_DETAIL])) {\n\t\t\t$sDetailTblVar = $_GET[EW_TABLE_SHOW_DETAIL];\n\t\t\t$this->setCurrentDetailTable($sDetailTblVar);\n\t\t} else {\n\t\t\t$sDetailTblVar = $this->getCurrentDetailTable();\n\t\t}\n\t\tif ($sDetailTblVar <> \"\") {\n\t\t\t$DetailTblVar = explode(\",\", $sDetailTblVar);\n\t\t\tif (in_array(\"a_purchases\", $DetailTblVar)) {\n\t\t\t\tif (!isset($GLOBALS[\"a_purchases_grid\"]))\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"] = new ca_purchases_grid;\n\t\t\t\tif ($GLOBALS[\"a_purchases_grid\"]->DetailEdit) {\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->CurrentMode = \"edit\";\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->CurrentAction = \"gridedit\";\n\n\t\t\t\t\t// Save current master table to detail table\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->setCurrentMasterTable($this->TableVar);\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->setStartRecordNumber(1);\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->Supplier_ID->FldIsDetailKey = TRUE;\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->Supplier_ID->CurrentValue = $this->Supplier_Number->CurrentValue;\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->Supplier_ID->setSessionValue($GLOBALS[\"a_purchases_grid\"]->Supplier_ID->CurrentValue);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (in_array(\"a_stock_items\", $DetailTblVar)) {\n\t\t\t\tif (!isset($GLOBALS[\"a_stock_items_grid\"]))\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"] = new ca_stock_items_grid;\n\t\t\t\tif ($GLOBALS[\"a_stock_items_grid\"]->DetailEdit) {\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->CurrentMode = \"edit\";\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->CurrentAction = \"gridedit\";\n\n\t\t\t\t\t// Save current master table to detail table\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->setCurrentMasterTable($this->TableVar);\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->setStartRecordNumber(1);\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->Supplier_Number->FldIsDetailKey = TRUE;\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->Supplier_Number->CurrentValue = $this->Supplier_Number->CurrentValue;\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->Supplier_Number->setSessionValue($GLOBALS[\"a_stock_items_grid\"]->Supplier_Number->CurrentValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function add($userid, $type)\r\n {\r\n $getInfo = $this->get($userid);\r\n\r\n $getInfo[$type] = $type;\r\n\r\n $this->update($userid, $getInfo);\r\n }", "public function setDetail($val)\n {\n $this->_propDict[\"detail\"] = $val;\n return $this;\n }", "public function record(string $type, Model $subject, ?Authenticatable $author): void;", "public function onTickettypesAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "protected function setup_metadata() {\n\t\tif ( $this->get_meta_type() ) {\n\t\t\t$this->fill( $this->get_metadata() );\n\t\t}\n\t}", "protected function preSave($detail, $extra) {\n $address = $this->address_library->checkDuplicate($extra);\n \n // Save the address first, set new ID in $detail.\n if( ! isset($address->id) )\n $addr = $this->address_model->insert($address);\n else\n $addr = $this->address_model->update($address);\n if ( $addr === FALSE ) {\n UIMessage::addError('Failed to save address');\n return FALSE;\n }\n \n // Save address in session\n $_SESSION[$this->sessionKey('address')] = $addr;\n \n // Store address ID in recruiter entity\n $detail->address_id = $addr->id;\n \n return $detail;\n }", "function set_detail($string) {\n $this->detail = $string;\n return true;\n }", "protected function _addGeneralInfo($object) {\n\t\t$storeId = $object->getStoreId();\n\t\t$this->_setCompanyCode($storeId);\n $this->_request->setDetailLevel(DetailLevel::$Document);\n $this->_request->setDocDate(date('Y-m-d'));\n $this->_request->setExemptionNo('');\n \t$this->_request->setDiscount(0.00); //cannot be used in Magento\n \t$this->_request->setSalespersonCode(Mage::helper('avatax')->getSalesPersonCode($storeId));\n \t$this->_request->setLocationCode(Mage::helper('avatax')->getLocationCode($storeId));\n\t\t$this->_request->setCountry(Mage::getStoreConfig('shipping/origin/country_id', $storeId));\n\t\t$this->_request->setCurrencyCode(Mage::app()->getStore()->getBaseCurrencyCode());\n\t\t$this->_addCustomer($object);\n\t\tif($object instanceof Mage_Sales_Model_Order && $object->getIncrementId()) {\n\t\t\t$this->_request->setReferenceCode('Magento Order #' . $object->getIncrementId());\n\t\t}\n\t}", "public function addResource($type, $object = null, ?\\SetaPDF_Core_Document $document = null) {}", "protected function onAfterGetItem(&$record)\n\t{\n\t\tparent::onAfterGetItem($record);\n\n\t\tif (FOFPlatform::getInstance()->isBackend())\n\t\t{\n\t\t\tif ( ! is_null($record))\n\t\t\t{\n\t\t\t\t$record->assignedTickettypes = $this->getAssignedTickettypes($record->conferenceplus_coupon_id);\n\n\t\t\t\t$record->tickettypes = $this->getTickettypes();\n\t\t\t}\n\t\t}\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}", "public function testCreateDetail()\n {\n $d = new Detail([\n 'key' => 'key',\n 'value' => 'value',\n 'price' => 23,\n 'detailable_id' => 1,\n 'detailable_type' => 'App\\Model\\Product',\n ]);\n\n $this->assertEquals('key', $d->key);\n\n }", "public function setDetails($var)\n {\n GPBUtil::checkString($var, True);\n $this->details = $var;\n\n return $this;\n }", "abstract public function getDetails();", "abstract public function admin_add($type, $uri, Page $page);", "public function afterSave(Model $Model, $created, $options = array()) {\n\n\t\t// simplify model params\n\t\t$Model->data['Params'] = $Model->Behaviors->Params->paramsToArray($Model,\n\t\t\t$Model->data['Type']['params']);\n\n\t\tif (isset($Model->data['Params']['detail']) && $Model->data['Params']['detail']) {\n\t\t\t$alias = $Model->data['Type']['alias'];\n\t\t\t$detailModelName = Inflector::classify($alias) . 'Detail';\n\t\t\t$tableName = Inflector::tableize($detailModelName);\n\n\t\t\t// make sure setting has the Type listed\n\t\t\t$Setting = ClassRegistry::init('Settings.Setting');\n\t\t\t$setting = $Setting->find('first', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'key' => 'Details.hookTypes',\n\t\t\t\t),\n\t\t\t));\n\t\t\tif (strlen($setting['Setting']['value']) > 0) {\n\t\t\t\t$hookTypes = explode(',',$setting['Setting']['value']);\n\t\t\t} else {\n\t\t\t\t$hookTypes = array();\n\t\t\t}\n\n\t\t\tif (!in_array($alias,$hookTypes)) {\n\t\t\t\t$hookTypes[] = $alias;\n\t\t\t\t$setting['Setting']['value'] = implode(',',$hookTypes);\n\t\t\t\t$Setting->save($setting);\n\t\t\t}\n\t\t\t// make sure details table exists\n\t\t\t$dataSource = ConnectionManager::getDataSource('default');\n\t\t\t$dbName = $dataSource->config['database'];\n\t\t\t$tables = $Model->query(\n\t\t\t\t\"select TABLE_NAME \".\n\t\t\t\t\"from INFORMATION_SCHEMA.TABLES \".\n\t\t\t\t\"where TABLE_SCHEMA='{$dbName}'\"\n\t\t\t);\n\t\t\tConfigure::write('Cache.disable',true);\n\t\t\tclearCache(null, 'models', null);\n\t\t\t$tables = Hash::extract($tables, '{n}.TABLES.TABLE_NAME');\n\t\t\tif (!in_array($tableName, $tables)) {\n\t\t\t\t$Model->query(\n\t\t\t\t\t\"create table {$tableName} (\".\n\t\t\t\t\t\"`id` int(10) not null auto_increment, \".\n\t\t\t\t\t\"`node_id` int(10) default null, \".\n\t\t\t\t\t\"primary key (`id`))\"\n\t\t\t\t);\n\t\t\t\tDetailsUtility::resetSource($Model, $detailModelName);\n\t\t\t}\n\t\t}\n\n\t}", "private function set_details() {\n if ($this->type != 'delivery') {\n $meetup = $this->retrieve([\n 'where' => [\n 'id' => $this->type,\n ],\n 'table' => 'meetups'\n ]);\n \n $this->time = \"{$meetup[0]['day']} {$meetup[0]['start_time']} - {$meetup[0]['end_time']}\";\n\n $this->update([\n 'time' => $this->time,\n ]);\n }\n }", "public function lazyload_meta_callback($check, $object_id, $meta_key, $single, $meta_type)\n {\n }", "public function testAddTypeAndIdOnly()\n {\n $this->document->addToData($resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n null, // attributes\n new Link('peopleSelfUrl/'), // self url\n [], // links for resource\n null // meta when primary resource\n ), new stdClass(), false));\n $this->document->setResourceCompleted($resource);\n\n $expected = <<<EOL\n {\n \"data\" : {\n \"type\" : \"people\",\n \"id\" : \"123\"\n }\n }\nEOL;\n $this->check($expected);\n }", "function acf_register_field_type_info($info)\n{\n}", "abstract public function register_type();", "public function setDetails( $details ) {\n return $this->_set( 'details', $details );\n }", "public function __construct($details)\n {\n $this->details = $details;\n }", "public function __construct($details)\n {\n $this->details = $details;\n }", "public function __construct($details)\n {\n $this->details = $details;\n }", "public function __construct($details)\n {\n $this->details = $details;\n }", "function onShowDetail(&$pr, &$ds) {\n\t$hotel = $this->dTable->detailed($this->entryId)->execute()->getFirst();\n\n\t$this->dsDb->add(\"Hotel\",$hotel->toArray(true));\n\n\t$fn = $this->name() . \"/show.xml\";\n\t$pr->loadPage( $fn );\n }", "public function add(string $key, mixed $value, mixed $type = null): void;", "protected function _afterStore($record, & $data)\n\t{\n\t\tparent::_afterStore($record, $data);\n\n\t\t// Assign (a) chosen types to custom field or (b) all types if field is core\n\t\t$types = ! empty($data['tid'])\n\t\t\t? $data['tid']\n\t\t\t: array();\n\n\t\t$this->_assignTypesToField($types);\n\t}", "public function save($id = null) {\n if(empty($id)){\n if ($this->request->is('post')) {\n $this->Supplier->create();\n if ($this->Supplier->saveAssociated($this->request->data)) { //Magic saveAssociated function\n $this->Flash->success(__('Service Supplier has been saved.'));\n return $this->redirect(array('action' => 'index'));\n } else {\n $this->Flash->error(__(' could not be saved.'));\n }\n }else{\n $this->request->data['Article']['unit_id'] = 12;\n $this->request->data['Article']['type_id'] = 11;\n }\n // Fetch Types from table\n $types = $this->Supplier->Article->Type->find('list');\n $this->set(compact('types'));\n \n }\n // Edit\n if(!empty($id)){\n if (!$this->Supplier->exists($id)) {\n throw new NotFoundException(__('Invalid '));\n }\n $this->Supplier->id = $id; //key for updating refers to id !\n if ($this->request->is(array('post', 'put'))) {\n if ($this->Supplier->Article->save($this->request->data) && $this->Supplier->save($this->request->data)) {\n $this->Flash->success(__(' Service Supplier has been edited.'));\n return $this->redirect(array('action' => 'index'));\n } else {\n $this->Flash->error(__('This could not be saved.'));\n }\n } else {\n $options = array('conditions' => array('Supplier.' . $this->Supplier->primaryKey => $id));\n $this->request->data = $this->Supplier->find('first', $options);\n }\n }\n \n\n // Set status and rating\n $this->set('status', $this->Supplier->status);\n $this->set('rating', $this->Supplier->rating);\n //Set type and Unit\n $listTypes = $this->Supplier->Article->Type->find('list');\n $this->set('listTypes', $listTypes);\n $listUnits = $this->Supplier->Article->Unit->find('list');\n $this->set('listUnits',$listUnits);\n }", "function get_detail() {\n return $this->detail;\n }", "public function setDetail($value)\n {\n return $this->set('Detail', $value);\n }", "public function setDetail($value)\n {\n return $this->set('Detail', $value);\n }", "public function setDetail($value)\n {\n return $this->set('Detail', $value);\n }", "public function hookListingDetailsBeforeMetaData()\n {\n global $lang, $cat_bread_crumbs, $listing_data, $rlListingTypes;\n\n $this->prepareListingLocationData();\n\n $meta = array('meta_description', 'meta_keywords', 'meta_title');\n foreach ($meta as $area) {\n $pattern_found = false;\n\n foreach (array_reverse($cat_bread_crumbs) as $category) {\n if ($lang['categories+listing_' . $area . '+' . $category['Key']]) {\n $this->adaptLocString($lang['categories+listing_' . $area . '+' . $category['Key']]);\n $pattern_found = true;\n break;\n }\n }\n }\n\n // Search in general category\n if (!$pattern_found && $general_id = $rlListingTypes->types[$listing_data['Cat_type']]['Cat_general_cat']) {\n $general_key = $GLOBALS['rlDb']->getOne('Key', \"`ID` = {$general_id}\", 'categories');\n\n foreach ($meta as $area) {\n if ($lang['categories+listing_' . $area . '+' . $general_key]) {\n $this->adaptLocString($lang['categories+listing_' . $area . '+' . $general_key]);\n }\n }\n }\n }", "public function pushDetailsItem($fields)\n {\n $defaults = array(\n 'id' => '',\n 'name' => ''\n );\n $this->data['ecommerce']['detail']['products'][] = $this->getDefaults($fields, $defaults);\n }", "private function update_type($new_type) { \n\n\t\tif ($this->_update_item('type',$new_type,'50')) { \n\t\t\t$this->type = $new_type;\n\t\t}\n\n\t}", "function SetUpDetailParms() {\n\n\t\t// Get the keys for master table\n\t\tif (isset($_GET[EW_TABLE_SHOW_DETAIL])) {\n\t\t\t$sDetailTblVar = $_GET[EW_TABLE_SHOW_DETAIL];\n\t\t\t$this->setCurrentDetailTable($sDetailTblVar);\n\t\t} else {\n\t\t\t$sDetailTblVar = $this->getCurrentDetailTable();\n\t\t}\n\t\tif ($sDetailTblVar <> \"\") {\n\t\t\t$DetailTblVar = explode(\",\", $sDetailTblVar);\n\t\t\tif (in_array(\"jurnald\", $DetailTblVar)) {\n\t\t\t\tif (!isset($GLOBALS[\"jurnald_grid\"]))\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"] = new cjurnald_grid;\n\t\t\t\tif ($GLOBALS[\"jurnald_grid\"]->DetailAdd) {\n\t\t\t\t\tif ($this->CopyRecord)\n\t\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->CurrentMode = \"copy\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->CurrentMode = \"add\";\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->CurrentAction = \"gridadd\";\n\n\t\t\t\t\t// Save current master table to detail table\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->setCurrentMasterTable($this->TableVar);\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->setStartRecordNumber(1);\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->jurnal_id->FldIsDetailKey = TRUE;\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->jurnal_id->CurrentValue = $this->id->CurrentValue;\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->jurnal_id->setSessionValue($GLOBALS[\"jurnald_grid\"]->jurnal_id->CurrentValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function applyDetailSettings()\n {\n $this->applyBrowseSettings(true);\n }", "public function addDetail(Detail $detail) {\n $this->details[] = $detail->toArray();\n\n return $this;\n }", "public function setDetail($detail)\n {\n $this->detail = $detail;\n return $this;\n }", "public function testAddNoteType()\n {\n $this->_instance->addNoteType($this->_objects['noteType']);\n \n // find our note type\n $testNoteType = $this->_instance->getNoteTypeByName($this->_objects['noteType']->name);\n \n $this->assertEquals($this->_objects['noteType']->name, $testNoteType->name);\n $this->assertEquals(1, $testNoteType->is_user_type, 'user type not set');\n }", "public function store(DetailRequest $request)\n {\n // dd($request);\n $detail = new Detail;\n\n $detail->phone = $request->phone;\n $detail->address = $request->address;\n $detail->bank_account = $request->bank_account;\n $detail->pib = $request->pib;\n $detail->description = $request->description;\n $detail->user_id = $request->user_id;\n\n $detail->save();\n\n return response(['message' => 'details created']);\n }", "public function canAddFieldsToTCATypeAfterExistingOnes() {}", "protected function setupResultObject()\n {\n $browserData = $this->detectByType();\n foreach ($browserData as $key => $value) {\n if ($key === 'originalInfo') {\n $this->setAttributes($value);\n continue;\n }\n Tools::runSetter($this->resultObject, $key, $value);\n }\n $this->additionalInfo = $browserData;\n }", "public function addNew($data, $type)\n {\n $add = $type === 'add' ? new Delivery : Delivery::find($type);\n $add->store_id = isset($data['user_id']) ? $data['user_id'] : 0;\n $add->name = isset($data['name']) ? $data['name'] : null;\n $add->phone = isset($data['phone']) ? $data['phone'] : null;\n $add->status = isset($data['status']) ? $data['status'] : 0;\n $add->start_time = isset($data['start_time']) ? $data['start_time'] : null;\n $add->end_time = isset($data['end_time']) ? $data['end_time'] : null;\n $add->address = isset($data['address']) ? $data['address'] : null;\n\n if (isset($data['password'])) {\n $add->password = bcrypt($data['password']);\n $add->shw_password = $data['password'];\n }\n\n $add->save();\n }", "public function generalDetails(GeneralDetailRequest $request, Product $product)\n {\n $product = $this->product->find($product->id);\n $product->code = $request->code;\n $product->heading = $request->heading;\n $product->key_word = $request->key_word;\n $product->qty = $request->qty;\n $product->delivery_places = json_encode($request->delivery_places);\n $product->delivery_duration = $request->delivery_duration;\n $product->status = 'Pending';\n $product->save();\n return ['success'=> true];\n }", "protected function get_meta_type()\n {\n }", "protected function get_meta_type()\n {\n }", "protected function get_meta_type()\n {\n }", "protected function get_meta_type()\n {\n }", "function edit_additional_field($details) {\r\n\t\t$sql = \"UPDATE sys_man_additional_fields SET field_name = ?, field_type = ?, field_placement = ?, group_id = ? WHERE field_id = ?\";\r\n\t\t$data = array(\"$details->field_name\", \"$details->field_type\", \"$details->field_placement\", \"$details->group_id\", \"$details->field_id\");\r\n\t\t$sql = $this->clean_sql($sql);\r\n\t\t$query = $this->db->query($sql, $data);\r\n\t\treturn;\r\n\t}", "private function add_provider_name_to_record( &$record, $provider_name ) {\n\n\t\tif ( isset( $record['post_id'] ) ) {\n\t\t\t$record['post_id'] = $provider_name . ':' . $record['post_id'];\n\t\t}\n\t\tif ( isset( $record['category_id'] ) ) {\n\t\t\t$record['category_id'] = $provider_name . ':' . $record['category_id'];\n\n\t\t}\n\t}", "public function notify($type, \\Phalcon\\Mvc\\CollectionInterface $model){ }", "function VehicleDetails(){\n\t\tparent::getVehicleDetails();\n\t\t$this -> addVehicleDetails();\n\t}", "public function addType()\r\n\t{\r\n\t\tif(isset($_SESSION['auth']) && $_SESSION['users']['niveau'] == 3){\r\n\t\tif(isset($_POST['dataF'])){\r\n\t\t\t$spe = str_replace('&', '=', $_POST['dataF']);\r\n\t\t\t$data = $this->convertArray($spe);\r\n\t\t\t//print_r($data);die();\r\n\t\t\t$spec = $this->model('type');\r\n\t\t\t$id = $spec->addType($data);\r\n\t\t\tif($id){\r\n\t\t\t\techo json_encode(['SUCCESS'=>true]);\r\n\t\t\t}else{\r\n\t\t\t\techo json_encode(['SUCCESS'=>true]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t}else{\r\n\t\t\t$this->view('login',['page'=>'Speciality','msg'=>'you should to connect first']);\r\n\t\t}\r\n\t}", "protected function get_additional_fields($object_type = \\null)\n {\n }", "function setDetails( $details )\n {\n die ('abstract class - subclass must implement this function. '. __CLASS__.'::'.__FUNCTION__); \n }", "public function getDataWithTypeField() {}", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }" ]
[ "0.51184493", "0.50700694", "0.5054234", "0.50342345", "0.49757957", "0.49343193", "0.49278972", "0.49188855", "0.4907965", "0.4834612", "0.4817876", "0.48065704", "0.4796246", "0.47501257", "0.47166702", "0.47040308", "0.46998608", "0.4690585", "0.4665448", "0.4646389", "0.46248662", "0.462428", "0.45960528", "0.45850623", "0.4560686", "0.4557775", "0.45453468", "0.45396486", "0.4532914", "0.4518994", "0.45085394", "0.45061094", "0.45057786", "0.44933122", "0.44869345", "0.44825605", "0.4477194", "0.4475993", "0.44717744", "0.4471405", "0.44587556", "0.44548792", "0.44526577", "0.44455314", "0.44455314", "0.44455314", "0.44455314", "0.44329256", "0.44287154", "0.44283643", "0.44183448", "0.44166198", "0.44153625", "0.44153625", "0.44153625", "0.44043663", "0.43940848", "0.43873394", "0.4380988", "0.4379273", "0.43775725", "0.43745977", "0.43668845", "0.43637407", "0.43623334", "0.4359597", "0.43554756", "0.43430278", "0.43412426", "0.43412426", "0.43412426", "0.43412426", "0.43388054", "0.4334444", "0.43292344", "0.43239957", "0.4322309", "0.4315192", "0.43151832", "0.42988002", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387", "0.4297387" ]
0.0
-1
Fills all the details of a movie
protected function fillMovie() { $providers = array(); foreach (array_unique($this->providerCodes) as $pc) { $provider = $this->getProviderFromCode($pc); if ($provider->providesForLanguage($this->getLanguage())) { $providers[$pc] = $this->getProviderFromCode($pc); } } $detailsByProvider = array(); foreach ($this->detailsAdded as $detailArr) { if ($detailArr['provider']) { if (!isset($providers[$detailArr['provider']])) { $providers[$detailArr['provider']] = $this->getProviderFromCode($detailArr['provider']); } isset($detailsByProvider[$detailArr['provider']]) || $detailsByProvider[$detailArr['provider']] = array(); $detailsByProvider[$detailArr['provider']][] = $detailArr['code']; } else { foreach ($providers as $provider) { if ($provider->provides($detailArr['code'])) { isset($detailsByProvider[$provider->getCode()]) || $detailsByProvider[$provider->getCode()] = array(); $detailsByProvider[$provider->getCode()][] = $detailArr['code']; break; } } } } foreach ($detailsByProvider as $providerCode => $detailCodes) { $providers[$providerCode]->fillMovie($this->getLanguage(), $this->movie, $detailCodes); } return $this->movie; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fillMovie($language, IMovie $movie, array $details)\r\n {\r\n }", "public function show($movieid)\n {\n \n //$movie = Movie::find(1);\n //$movie->cinema()->attach(3);\n\n\n $movie = Movie::find($movieid);\n\n foreach ($movie->cinema as $cinema) {\n echo $cinema->name;\n \n }\n\n \n }", "function filmdata(){\r\n\tglobal $pdo;\r\n\tglobal $movie;\r\n\tglobal $movie_id;\r\n\tglobal $favoriettext;\r\n\t\t//ophalen genres\r\n\t$sql = \"SELECT genre_name FROM Movie m JOIN movie_genre g on m.movie_id = g.movie_id where m.movie_id = \".$movie_id.\";\";\r\n\t$genres = $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC) or die(print_r($pdo->errorInfo(), true));\r\n\t\t//ophalen directors\r\n\t$sql = \"SELECT p.firstname, p.lastname FROM Movie m JOIN Movie_Director d ON m.movie_id = d.movie_id JOIN Person p ON d.person_id = p.person_id WHERE d.movie_id = \".$movie_id.\" ORDER BY p.firstname ASC;\";\r\n\t$directors = $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t//ophalen actors\r\n\t$sql = \"SELECT p.firstname, p.lastname FROM Movie m JOIN Movie_Cast c ON m.movie_id = c.movie_id JOIN Person p ON c.person_id = p.person_id WHERE c.movie_id = \".$movie_id.\" ORDER BY p.firstname ASC;\";\r\n\t$actors = $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t//lengte van film in uren berekenen\r\n\t$filmlengte = date('G\\u\\u\\r i\\M\\i\\n', mktime(0,$movie[0]['duration']));\r\n\t\t//cover_image vullen\r\n\tif(!isset($movie[0]['cover_image'])){\r\n\t\t$movie[0]['cover_image'] = \"placeholder.png\";\r\n\t}\r\n\t\t//trailer URL vullen\r\n\tif(!isset($movie[0]['URL'])){\r\n\t\t$movie[0]['URL'] = 'https://www.youtube.com/embed/ponurLICAoM';\r\n\t}\r\n\t\t//genres formatten\r\n\tif($genres){\r\n\t\t$formattedgenres = \"\";\r\n\t\tforeach($genres as $genre){\r\n\t\t\t$formattedgenres = $formattedgenres.implode(\" \", $genre).\", \";\r\n\t\t}\r\n\t\t$formattedgenres = rtrim($formattedgenres, \", \");\r\n\t}\r\n\t\t//directors array formatten\r\n\tif($directors){\r\n\t\t$formatteddirectors = \"\";\r\n\t\tforeach($directors as $director){\r\n\t\t\t$formatteddirectors = $formatteddirectors.implode(\" \", $director).\", \";\r\n\t\t}\r\n\t\t$formatteddirectors = rtrim($formatteddirectors, \", \");\r\n\t}\r\n\t\t//actors array formatten\r\n\tif($actors){\r\n\t\t$formattedactors = \"\";\r\n\t\tforeach($actors as $actor){\r\n\t\t\t$formattedactors = $formattedactors.implode(\" \", $actor).\", \";\r\n\t\t}\r\n\t\t$formattedactors = rtrim($formattedactors, \", \");\r\n\t}\r\n\t\t//printen waardes\r\n\techo '<div class=\"movie-flex\">';\r\n\techo '<h1>'.$movie[0]['title'].'</h1>';\r\n\techo '<h3>('.$movie[0]['publication_year'].')</h3>';\r\n\techo '<br>';\r\n\techo '<form action=\"#\" method=\"post\"><input class=\"button\" id=\"submit\" type=\"submit\" name=\"favoriet\" width=\"20\" height=\"10\" value=\"'.$favoriettext.'\"/></form>';\r\n\techo '</div>';\r\n\techo '<p> '.$filmlengte.' | '.$formattedgenres.' | '.$movie[0]['publication_year'].'</p>';\r\n\techo '<div class=\"movie-flex\">';\r\n\techo '<a href=\"data/image_data/'.$movie[0]['cover_image'].'\"><img src=\"data/image_data/'.$movie[0]['cover_image'].'\" height=\"200\" width=\"150\" alt=\"The Matrix\"></a>';\r\n\techo '<div class=\"movieinformation-flex\">';\r\n\techo '<p id=\"description\">'.$movie[0]['description'].'</p>';\r\n\tif(isset($formatteddirectors)){\r\n\t\techo '<p>Directors: '.$formatteddirectors.'.</p>';\r\n\t}\r\n\tif(isset($formattedactors)){\r\n\t\techo '<p>Actors: '.$formattedactors.'.</p>';\r\n\t}\r\n\techo '<button class=\"button\" style=\"width:100px;height:50px\"><a style=\"text-decoration=none;\" href=\"afspelen.php?movie_id='.$movie_id.'\">Afspelen</a></button>';\r\n\techo '</div>';\r\n\techo '</div>';\r\n\techo '<div id=\"trailer\">';\r\n\techo '<iframe width=\"420\" height=\"315\" src=\"'.$movie[0]['URL'].'\"></iframe>';\r\n\techo '</div>';\r\n}", "function setInfo() {\n //Sanatize using Regex\n $santizied=$this->sanitize($this->rawTitle);\n \n \n //IMDB API Options\n $plot='full'; //Plot format Full or Simple\n $limit=1; //Number of results\n \n $reply=file_get_contents('http://imdbapi.org/?title='.$santizied.'&type=json&plot='.$plot.'&episode=0&limit='.$limit.'&yg=0&mt=M&lang=en-US&offset=&aka=simple&release=simple');\n $obj = json_decode($reply,true);\n\t\t\n\n \n if (@is_null($obj[0]['title'])) { \n $this->download=false;\n }\n else { \n $this->title=$obj[0]['title'];\n $this->time=$obj[0]['runtime'][0];\n $this->genres=$obj[0]['genres'];\n $this->rating=$obj[0]['rating'];\n $this->plot=$obj[0]['plot_simple'];\n $this->director=$obj[0]['directors'][0];\n $this->casts=$obj[0]['actors'];\n $this->year=$obj[0]['year'];\n\t\t\t $this->imdbid=$obj[0]['imdb_id'];\n //TODO: Uncomment this\n //$this->poster=$obj[0]['poster'];\n\t\t\t $this->poster=$this->thePoster($obj[0]['poster']);\n //$this->poster='http://localhost:8080/wordpress/wp-content/uploads/2013/01/d.jpg';\n \n $this->download=TRUE;\n\n } \n \n\n }", "public function show(movie $movie)\n {\n //\n }", "public function show(movie $movie)\n {\n //\n }", "function retrieve_details() {\n\n// 11/25 - this shit needs work...\n \n\t/**\n\t * step 1\n\t * \n\t * retrieve all movies with an imdb_id but no details\n\t */\n\tini_set(\"max_execution_time\", \"300\");\n\t$sql_all = \"SELECT * FROM mr_movie_details WHERE imdb_id > 0 AND date_updated <=> NULL\";\n\t$res_all = mysql_query( $sql_all );\n\n\t// End the script if there are no new movies\n\tif ( mysql_num_rows( $res_all ) > 0 ) {\n\n\t\t/**\n\t\t * step 2\n\t\t *\n\t\t * retrieve all imdb_info and update db\n\t\t */\n\t\n\t\twhile ( $r = mysql_fetch_array( $res_all ) ) {\n\t\n\t\t\t$imdbid = $r['imdb_id'];\n\t\t\t$movie_id = $r['movie_id'];\n\t\t\t$filename = $r['filename'];\n\t\t\n\t\t\t$movie = new imdb( $imdbid );\n\t\t\t$movie->setid( $imdbid );\n\t\t\t\n\t\t\t$title = $movie->title();\n\t\t\t$year = $movie->year();\n\t\t\t$runtime = $movie->runtime();\n\t\t\t$genre = $movie->genre();\n//\t\t\t$genreID \t= get_genre_id( $genre );\n\t\t\t$all_genres = $movie->genres();\n\t\t\t$mpaar \t\t= $movie->mpaa ();\n\t\t\t$tagline\t= $movie->tagline();\n\t\t\t$directors\t= $movie->director();\n\t\t\t$producers\t= $movie->producer();\n\t\t\t$writers\t= $movie->writing();\n\t\t\t$cast\t\t= $movie->cast();\n\t\t\t//$plot \t\t= $movie->plot();\n\t\t\t//$short_plot = substr( $plot[0], 0, 255 );\n\t\t\t\n\n\n\t\t\tif ( strlen( $plot[0] ) > 255 )\n\t\t\t\t$short_plot .= ' [...]';\n\t\t\t\n\t\t\tif ( check_genre( $genre ) == FALSE )\n\t\t\t\tadd_genre( $genre );\n\t\n\t\t\tforeach ( $all_genres as $g ) {\n\t\t\t\tif ( check_genre( $g ) == FALSE )\n\t\t\t\t\tadd_genre( $g );\n\t\n\t\t\t\t// Update movie_genres\n\t\t\t\t$mg_sql = \"INSERT INTO mr_movie_genres (movie_id, genre_id) VALUES \".\n\t\t\t\t\t\" ($movie_id, \". get_genre_id( $g ) .\")\";\n\t\n\t\t\t\t$mg_res = mysql_query( $mg_sql );\n\t\t\t}\n\n/*\n\t\n\t\t\t$theVersion = get_version( substr( $filename, 0, strlen( $filename ) - 4 ) );\n\t\t\t//echo \"Version: $theVersion\";\n\t\t\t//echo $theVersion;\n\t\t\tif ( !check_version( $theVersion ) ) \n\t\t\t\tif ( !add_new_version( $theVersion ) )\n\t\t\t\t\techo \"<p>Couln't add $theVersion version to database.</p>\\n\";\n\t\t\t\t\n\t\t\t$theVersionID = get_version_id( $theVersion );\n*/\t\t\t\n\t\t\t\n// -- THIS NEEDS TO BE EDITED..\n\n\t\t\t$md_sql =\t'UPDATE mr_movie_details SET '.\n\t\t\t\t\t\t' date_updated = NOW(), '.\n\t\t\t\t\t\t' title = '. format_sql( $title ). ', '.\n\t\t\t\t\t\t' year = '. format_sql( $year ). ', '.\n\t\t\t\t\t\t' runtime = '. format_sql( $runtime ). ', '.\n\t\t\t\t\t\t' mpaa_rating = '. format_sql( $mpaar['USA'] ). ', '.\n\t\t\t\t\t\t' tagline = '. format_sql( trim( $tagline ) ) . ' '.\n\t\t\t\t\t\t\" WHERE movie_id = $movie_id LIMIT 1\";\n\n\n\t\t\t$producersSQL = \"INSERT INTO mr_movie_producers (movie_id, producer_id, producer_role) VALUES \";\n\t\t\tfor ( $i = 0; $i < count( $producers ); $i++ ) {\n\t\t\t\t$checkSQL = \"SELECT * FROM mr_producers WHERE producer_name LIKE \". format_sql( trim( $producers[$i]['name'] ), TRUE );\n\t\t\t\t$checkRES = mysql_query( $checkSQL );\n\t\t\t\tif ( mysql_num_rows( $checkRES ) == 0 ) {\n\t\t\t\t\tmysql_query( \"INSERT INTO mr_producers (producer_name) VALUES (\". format_sql( trim( $producers[$i]['name'] ) ) .\")\" );\n\t\t\t\t} else {\n\t\t\t\t\twhile ( $r = mysql_fetch_array( $checkRES ) ) {\n\t\t\t\t\t\t$producer_id = $r['producer_id'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$producersSQL .= \"( $movie_id, $producer_id, \". format_sql( trim( $producers[$i]['role'] ) ) .\"), \";\n\t\t\t}\n\t\t\t$producersSQL = substr( $producersSQL, 0, -2 );\n\t\t\t//echo $producersSQL;\n\t\t\t@mysql_query( $producersSQL );// or die(\"Couldn't add producers! \");\n\n $writersSQL = \"INSERT INTO mr_movie_writers (movie_id, writer_id) VALUES \";\n for ( $i = 0; $i < count( $writers ); $i++ ) {\n $checkSQL = \"SELECT * FROM mr_writers WHERE writer_name LIKE \". format_sql( trim( $writers[$i]['name'] ), TRUE );\n $checkRES = mysql_query( $checkSQL );\n if ( mysql_num_rows( $checkRES ) == 0 ) {\n mysql_query( \"INSERT INTO mr_writers (writer_name) VALUES (\". format_sql( trim( $writers[$i]['name'] ) ) .\")\" );\n } else {\n while ( $r = mysql_fetch_array( $checkRES ) ) {\n $writer_id = $r['writer_id'];\n }\n }\n $writersSQL .= \"( $movie_id, $writer_id ), \";\n }\n $writersSQL = substr( $writersSQL, 0, -2 );\n //echo $writersSQL;\n\t\t\t@mysql_query( $writersSQL );// or die(\"Couldn't add writers!\");\n\n $directorsSQL = \"INSERT INTO mr_movie_directors (movie_id, director_id) VALUES \";\n for ( $i = 0; $i < count( $directors ); $i++ ) {\n $checkSQL = \"SELECT * FROM mr_directors WHERE director_name LIKE \". format_sql( trim( $directors[$i]['name'] ), TRUE );\n $checkRES = mysql_query( $checkSQL );\n if ( mysql_num_rows( $checkRES ) == 0 ) {\n mysql_query( \"INSERT INTO mr_directors (director_name) VALUES (\". format_sql( trim( $directors[$i]['name'] ) ) .\")\" );\n } else {\n while ( $r = mysql_fetch_array( $checkRES ) ) {\n $director_id = $r['director_id'];\n }\n }\n $directorsSQL .= \"( $movie_id, $director_id ), \";\n }\n $directorsSQL = substr( $directorsSQL, 0, -2 );\n //echo $directorsSQL;\n\t\t\t@mysql_query( $directorsSQL );// or die(\"Couldn't add directors!\");\n\n\n $castSQL = \"INSERT INTO mr_movie_actors (movie_id, actor_id, actor_role) VALUES \";\n for ( $i = 0; $i < count( $cast ); $i++ ) { \n $checkSQL = \"SELECT * FROM mr_actors WHERE actor_name LIKE \". format_sql( trim( $cast[$i]['name'] ), TRUE );\n $checkRES = mysql_query( $checkSQL );\n if ( mysql_num_rows( $checkRES ) == 0 ) {\n mysql_query( \"INSERT INTO mr_actors (actor_name) VALUES (\". format_sql( trim( $cast[$i]['name'] ) ) .\")\" );\n } else {\n while ( $r = mysql_fetch_array( $checkRES ) ) {\n $actor_id = $r['actor_id'];\n }\n }\n $castSQL .= \"( $movie_id, $actor_id, \". format_sql( trim( $cast[$i]['role'] ) ) .\"), \";\n }\n $castSQL = substr( $castSQL, 0, -2 );\n //echo $castSQL;\n\t\t\t@mysql_query( $castSQL );// or die(\"Couldn't add cast!\");\n\n\n// directors, writers, cast\n\n\t\n\t\t\t$ratingSQL = \"INSERT INTO mr_movie_ratings (movie_id) VALUES ($movie_id)\";\n\t\t\t$ratingRes = mysql_query( $ratingSQL );\n\t\n\t\t\t$m_sql = \"UPDATE movies SET \".\n\t\t\t\t\" have_details = 'Y', \".\n\t\t\t\t\" version_id = $theVersionID \".\n\t\t\t\t\" WHERE movie_id = $movie_id\";\n\t\n\t\t\t//echo $m_sql;\n\t\t\t\n\t\t\t$md_res = mysql_query( $md_sql );\n//\t\t\t$m_res = mysql_query( $m_sql );\n\t\n\t\t\t$html['msg'] .= \"<div id=\\\"message\\\" class=\\\"updated\\\"><p>Info for <b>$title</b> added to database!</p></div>\\n\";\n\t\n\t\t}\n\t\t\n\t\t$html['main'] .= \"<p>Go <a href=\\\"{$_SERVER['PHP_SELF']}\\\">Home</a>.</p>\\n\";\n\t} else {\n\t\t$html['main'] .= \"<p>There are no movies with IMDB IDs but without details downloaded.</p>\\n\";\n\t}\n\t\n\treturn $html;\n}", "private function setUpFilmListData($film){\n $this->film = [\n 'id' => $film->Id,\n 'title' => $film->Title,\n 'poster' => null,\n 'genre' => $film->Genre,\n 'rating' => [\n 'rate' => $film->Rating,\n 'reason' => $film->Content\n ],\n 'status' => $film->Status,\n ];\n }", "public function show(Movie $movie)\n {\n //\n }", "public function show(Movie $movie)\n {\n //\n }", "public function run()\n {\n $movies =[\n [\n 'title'=> 'Il padrino',\n 'release'=> '1972'\n ],\n [\n 'title'=>'Gravity',\n 'release'=>'2013'\n ]\n ];\n\n foreach ($movies as $movie) {\n $nuovo_film = new Movie();\n $nuovo_film->fill($movie);\n $nuovo_film->save();\n }\n\n }", "public function __construct($movie)\n {\n $this->movie = $movie;\n }", "function getMovieInformation($movie)\n{\n if($movie != \"\") {\n $OMDB_API_KEY = '99842c57';\n $omdbUrl = \"http://www.omdbapi.com?s=$movie&apikey=$OMDB_API_KEY&type=movie\";\n $movie = file_get_contents($omdbUrl);\n\n $movieDetails =json_decode($movie, true);\n\n \n if(count($movieDetails['Search'])) {\n $movieList = $movieDetails['Search'];\n // Pick the first movie\n $movie = $movieList[0];\n $movieTitle = $movie[\"Title\"];\n $movieYear = $movie[\"Year\"];\n $moviePoster = $movie[\"Poster\"];\n\n sendFulfillmentResponse($movieTitle, $movieYear, $moviePoster, true);\n } else {\n sendFulfillmentResponse(null, null, null, false);\n }\n } else {\n sendFulfillmentResponse(null, null, null, false);\n }\n \n}", "public function run()\n {\n //\n $movies = [\n ['mov_id'=>901,'mov_title'=>'Vertigo','mov_year'=>1958,'mov_time'=>128,'mov_lang'=>'English','mov_dt_rel'=>'1958-08-24','mov_rel_country'=>'UK'],\n ['mov_id'=>902,'mov_title'=>'The Innocents','mov_year'=>1961,'mov_time'=>100,'mov_lang'=>'English','mov_dt_rel'=>'1962-02-19','mov_rel_country'=>'SW'],\n ['mov_id'=>903,'mov_title'=>'Lawrence of Arabia','mov_year'=>1962,'mov_time'=>216,'mov_lang'=>'English','mov_dt_rel'=>'1962-12-11','mov_rel_country'=>'UK'],\n ['mov_id'=>904,'mov_title'=>'The Deer Hunter','mov_year'=>1978,'mov_time'=>183,'mov_lang'=>'English','mov_dt_rel'=>'1979-03-08','mov_rel_country'=>'UK'],\n ['mov_id'=>905,'mov_title'=>'Amadeus','mov_year'=>1984,'mov_time'=>160,'mov_lang'=>'English','mov_dt_rel'=>'1985-01-07','mov_rel_country'=>'UK'],\n ['mov_id'=>906,'mov_title'=>'Blade Runner','mov_year'=>1982,'mov_time'=>117,'mov_lang'=>'English','mov_dt_rel'=>'1982-09-09','mov_rel_country'=>'UK'],\n ['mov_id'=>907,'mov_title'=>'Eyes Wide Shut','mov_year'=>1999,'mov_time'=>159,'mov_lang'=>'English','mov_dt_rel'=>null,'mov_rel_country'=>'UK'],\n ['mov_id'=>908,'mov_title'=>'The Usual Suspects','mov_year'=>1995,'mov_time'=>106,'mov_lang'=>'English','mov_dt_rel'=>'1995-08-25','mov_rel_country'=>'UK'],\n ['mov_id'=>909,'mov_title'=>'Chinatown','mov_year'=>1974,'mov_time'=>130,'mov_lang'=>'English','mov_dt_rel'=>'1974-08-09','mov_rel_country'=>'UK'],\n ['mov_id'=>910,'mov_title'=>'Boogie Nights','mov_year'=>1997,'mov_time'=>155,'mov_lang'=>'English','mov_dt_rel'=>'1998-02-16','mov_rel_country'=>'UK'],\n ['mov_id'=>911,'mov_title'=>'Annie Hall','mov_year'=>1977,'mov_time'=>93,'mov_lang'=>'English','mov_dt_rel'=>'1977-04-20','mov_rel_country'=>'USA'],\n ['mov_id'=>912,'mov_title'=>'Princess Mononoke','mov_year'=>1997,'mov_time'=>134,'mov_lang'=>'Japanese','mov_dt_rel'=>'2001-10-19','mov_rel_country'=>'UK'],\n ['mov_id'=>913,'mov_title'=>'The Shawshank Redemption','mov_year'=>1994,'mov_time'=>142,'mov_lang'=>'English','mov_dt_rel'=>'1995-02-17','mov_rel_country'=>'UK'],\n ['mov_id'=>914,'mov_title'=>'American Beauty','mov_year'=>1999,'mov_time'=>122,'mov_lang'=>'English','mov_dt_rel'=>null,'mov_rel_country'=>'UK'],\n ['mov_id'=>915,'mov_title'=>'Titanic','mov_year'=>1997,'mov_time'=>194,'mov_lang'=>'English','mov_dt_rel'=>'1998-01-23','mov_rel_country'=>'UK'],\n ['mov_id'=>916,'mov_title'=>'Good Will Hunting','mov_year'=>1997,'mov_time'=>126,'mov_lang'=>'English','mov_dt_rel'=>'1998-06-03','mov_rel_country'=>'UK'],\n ['mov_id'=>917,'mov_title'=>'Deliverance','mov_year'=>1972,'mov_time'=>109,'mov_lang'=>'English','mov_dt_rel'=>'1982-10-05','mov_rel_country'=>'UK'],\n ['mov_id'=>918,'mov_title'=>'Trainspotting','mov_year'=>1996,'mov_time'=>94,'mov_lang'=>'English','mov_dt_rel'=>'1996-02-23','mov_rel_country'=>'UK'],\n ['mov_id'=>919,'mov_title'=>'The Prestige','mov_year'=>2006,'mov_time'=>130,'mov_lang'=>'English','mov_dt_rel'=>'2006-11-10','mov_rel_country'=>'UK'],\n ['mov_id'=>920,'mov_title'=>'Donnie Darko','mov_year'=>2001,'mov_time'=>113,'mov_lang'=>'English','mov_dt_rel'=>null,'mov_rel_country'=>'UK'],\n ['mov_id'=>921,'mov_title'=>'Slumdog Millionaire','mov_year'=>2008,'mov_time'=>120,'mov_lang'=>'English','mov_dt_rel'=>'2009-01-09','mov_rel_country'=>'UK'],\n ['mov_id'=>922,'mov_title'=>'Aliens','mov_year'=>1986,'mov_time'=>137,'mov_lang'=>'English','mov_dt_rel'=>'1986-08-29','mov_rel_country'=>'UK'],\n ['mov_id'=>923,'mov_title'=>'Beyond the Sea','mov_year'=>2004,'mov_time'=>118,'mov_lang'=>'English','mov_dt_rel'=>'2004-11-26','mov_rel_country'=>'UK'],\n ['mov_id'=>924,'mov_title'=>'Avatar','mov_year'=>2009,'mov_time'=>162,'mov_lang'=>'English','mov_dt_rel'=>'2009-12-17','mov_rel_country'=>'UK'],\n ['mov_id'=>926,'mov_title'=>'Seven Samurai','mov_year'=>1954,'mov_time'=>207,'mov_lang'=>'Japanese','mov_dt_rel'=>'1954-04-26','mov_rel_country'=>'JP'],\n ['mov_id'=>927,'mov_title'=>'Spirited Away','mov_year'=>2001,'mov_time'=>125,'mov_lang'=>'Japanese','mov_dt_rel'=>'2003-09-12','mov_rel_country'=>'UK'],\n ['mov_id'=>928,'mov_title'=>'Back to the Future','mov_year'=>1985,'mov_time'=>116,'mov_lang'=>'English','mov_dt_rel'=>'1985-12-04','mov_rel_country'=>'UK'],\n ['mov_id'=>925,'mov_title'=>'Braveheart','mov_year'=>1995,'mov_time'=>178,'mov_lang'=>'English','mov_dt_rel'=>'1995-09-08','mov_rel_country'=>'UK'],\n ];\n\n DB::table('movie')->insert($movies);\n\n }", "public function movie_list() {\n $data[\"movies\"] = $this->Movie->findAll();\n\n // Capa de la Vista\n $view['body'] = $this->load->view(\"core/movies/list\", $data, TRUE);\n $view['title'] = \"Listado de películas\";\n $this->parser->parse('core/templates/body', $view);\n }", "public function detailAction()\n {\n $movieId = $this->dispatcher->getParam('id');\n\n $content = $this->api->get(self::API_ROUTE_MOVIE_CRUD . '/' . $movieId);\n\n if($content instanceof AppError) {\n $this->view->setVar('errors', $content->getMessage());\n } else {\n $this->view->setVar('movie', $content->movie);\n $this->view->setVar('genres', $content->genres);\n $this->view->setVar('videos', $content->videos);\n $this->view->setVar('isFavorite', $content->isFavorite);\n }\n }", "function movieinit() { \n\t$make = make_movies();\n\t//if ( !$make ) \n\t\t//die ( \"Error! Could not fetch movie list from media server!\" );\n\t\n\t$new \t\t\t= get_new();\n\t$num_new \t\t= count( $new );\n\t\n\t$no_imdbid\t\t= get_no_imdbid();\n\t$num_no_imdbid\t= count( $no_imdbid );\n\t\n\t$no_details\t\t= get_no_details();\n\t$num_no_details\t= count( $no_details );\n\t\n\tif ( $num_new > 0 ) {\n\t\t$html .= \"<p>There are $num_new new movies. Click \".\n\t\t\t\t \"<a href=\\\"{$_SERVER['PHP_SELF']}?step=2\\\">here</a>\".\n\t\t\t\t \" to add them to the database.</p>\\n\";\n\t} else {\n\t\t$html .= \"<p>There are no new movies.</p>\\n\";\t\n\t}\n\t\n\t\n\tif ( $num_no_imdbid > 0 ) {\n\t\t$html .= \"<p>There are $num_no_imdbid movies without IMDB IDs. Click \".\n\t\t\t\t \"<a href=\\\"{$_SERVER['PHP_SELF']}?step=3\\\">here</a>\".\n\t\t\t\t \" to get IMDB IDs for these titles.<br />\\n\".\n\t\t\t\t \"<strong>Note:</strong> This can take several minutes depending on the number \".\n\t\t\t\t \" of movies to lookup.</p>\";\n\t} else {\n\t\t$html .= \"<p>There are no movies without IMDB IDs.</p>\\n\";\t\n\t}\n\t\n\t\n\tif ( $num_no_details > 0 ) {\n\t\t$html .= \"<p>There are $num_no_details movies with IMDB IDs but without details downloaded. Click \".\n\t\t\t\t \"<a href=\\\"{$_SERVER['PHP_SELF']}?step=5\\\">here</a>\".\n\t\t\t\t \" to get details for these movies.</p>\\n\";\n\t} else {\n\t\t$html .= \"<p>There are no movies with IMDB IDs but without details downloaded.</p>\\n\";\t\n\t}\n\t\n\tif ( ( $num_new + $num_no_imdbid + $num_no_details ) == 0 )\n\t\t$html .= \"<p><strong>Go home! There's nothing to do here!</strong></p>\\n\";\n\t\n\treturn $html;\n\n}", "public function run()\n {\n $movies = [\n [\n 'title' => 'Pulp Fiction',\n 'plot' => 'lorem ipsum',\n 'release' => '1994',\n ],\n [\n 'title' => 'Guerre Stellari',\n 'plot' => 'lorem ipsum',\n 'release' => '1977',\n ],\n [\n 'title' => 'E.T. - L\\'extra-terrestre',\n 'plot' => 'lorem ipsum',\n 'release' => '1982',\n ],\n ];\n\n foreach ($movies as $movie) {\n $new_movie = new Movie();\n $new_movie->fill($movie);\n $new_movie->save();\n }\n\n }", "private function printMovieInHtml($movie) {\r\n\t\t//print_r($movie);\r\n\t\t$title = $movie['title'];\r\n\t\t$tagline = $movie['tagline'];\r\n\t\t$plot = $movie['plot'];\r\n\t\tif (empty($movie['thumbpath'])) {\r\n\t\t\t$thumbpath = _MOVIE_PHOTO_FOLDER_.\"default.jpg\";\r\n\t\t} else {\r\n\t\t\t$thumbpath = _MOVIE_PHOTO_FOLDER_.$movie['thumbpath'];\r\n\t\t}\r\n\t\t$director = $movie['director'];\r\n\t\t$studio = $movie['studio'];\r\n\t\t$genre = $movie['genre'];\r\n\t\t$classification = $movie['classification'];\r\n\t\t$rental_period = $movie['rental_period'];\r\n\t\t$year = $movie['year'];\r\n\t\t$DVD_rental_price = $movie['DVD_rental_price'];\r\n\t\t$DVD_purchase_price = $movie['DVD_purchase_price'];\r\n\t\t$numDVD = $movie['numDVD'];\r\n\t\t$numDVDout = $movie['numDVDout'];\r\n\t\t$BluRay_rental_price = $movie['BluRay_rental_price'];\r\n\t\t$BluRay_purchase_price = $movie['BluRay_purchase_price'];\r\n\t\t$numBluRay = $movie['numBluRay'];\r\n\t\t$numBluRayOut = $movie['numBluRayOut'];\r\n\t\t$movie_id = $movie['movie_id'];\r\n\t\t//\r\n\t\t$checked = ''; //check the movie checkbox if the movie is previously selected\r\n\t\tif (!empty($_SESSION['checked_movies'])) {\r\n\t\t\t$checked_movies = $_SESSION['checked_movies'];\r\n\t\t\tif (isset($checked_movies[$movie_id]))\r\n\t\t\t$checked = 'checked';\r\n\t\t}\r\n\t\tprint \"\r\n\t\t<div class='movie_card'>\r\n\t\t<div class='title'>\r\n\t\t<input type='submit' value='Edit' onclick='editMovieClick($movie_id);'>\r\n\t\t<input type='submit' value='Delete' onclick='deleteMovieClick($movie_id);'>\r\n\t\t<input type='checkbox' id='id_check' value='$movie_id' onclick='movieCheckClick(this);' $checked>\r\n\t\t$title\r\n\t\t</div>\r\n\t\t<div class='photo_container'>\r\n\t\t<img src= '$thumbpath' alt='movie photo' class='photo'>\r\n\t\t</div>\r\n\t\t<div class='content'>\r\n\t\t<b>DVD_rental_price: \\$$DVD_rental_price</b><br>\r\n\t\tDirector: $director<br>\r\n\t\tStudio: $studio<br>\r\n\t\tYear: $year<br>\r\n\t\tClassification: $classification<br>\r\n\t\tGenre: $genre<br>\r\n\t\t</div>\r\n\t\t</div>\r\n\t\t\";\r\n\t}", "public function movie_show($movie_id = null) {\n // por el metodo de HTTP\n\n if ($movie_id == null) {\n show_404();\n }\n\n $movie = $this->Movie->find($movie_id);\n\n if (!is_object($movie)) {\n show_404();\n }\n\n $vdata[\"name\"] = $movie->name;\n $vdata[\"year\"] = $movie->year;\n $vdata[\"description\"] = $movie->description;\n $vdata[\"image\"] = $movie->image;\n\n // Capa de la Vista\n $view['body'] = $this->load->view(\"core/movies/show\", $vdata, TRUE);\n $view['title'] = \"Mostrar película: \" . $movie->name;\n $this->parser->parse('core/templates/body', $view);\n }", "function showMoviesByActor($actor_name, $dataConnection) {\n // Query to find out what movies actor name in\n $query = \"SELECT movie_id FROM movie_actor_view\n WHERE actor_name = '\".$actor_name.\"'\n ORDER BY actor_name\";\n \n // run the query \n $result = $dataConnection->query($query);\n \n // Check if there is a match\n if ($result->num_rows > 0) {\n // Print number of results\n echo '<div id=\"resultsTag\">Showing '.$result->num_rows.' results for '.$actor_name.'....</div>';\n // Loop through each row\n while ($row = $result->fetch_assoc()) {\n // Query database for movie in row\n $movieQuery = \"SELECT * FROM movie\n INNER JOIN genre \n ON movie.genre_id=genre.genre_id\n INNER JOIN director\n ON movie.director_id=director.director_id\n INNER JOIN studio\n ON movie.studio_id=studio.studio_id\n WHERE movie_id = \".$row['movie_id'];\n \n $movieResult = $dataConnection->query($movieQuery); // Run query\n $row = $movieResult->fetch_assoc(); // Get result as array\n \n // Get an array of actors from row\n $actors = getMovieActors($row['movie_id'], $dataConnection);\n \n // Crate html output from page\n echo '<div class=\"movieFieldSetContainer\">';\n echo '<fieldset class=\"movieFieldSet\">';\n echo '<legend>'.$row['title'].'</legend>';\n echo '<a href=\"images/movie_images/'.$row['thumbpath'].'\" target=\"_blank\">';\n echo '<img class=\"movieThumbnail\" src=\"images/movie_images/'.$row['thumbpath'].'\" width=\"105\" height=\"150\"/>';\n echo '</a>';\n echo '<div class=\"movieInfoField\"><label id=\"rentalType\">'.$row['rental_period'].' Rental</label></div>';\n echo '<div class=\"movieInfoField\"><label>Genre: </label>'.$row['genre_name'].'</div>';\n echo '<div class=\"movieInfoField\"><label>Year:</label> '.$row['year'].'</div>';\n echo '<div class=\"movieInfoField\"><label>Director:</label> '.$row['director_name'].'</div>';\n echo '<div class=\"movieInfoField\"><label>Classification:</label> '.$row['classification'].'</div>';\n echo '<div class=\"movieInfoField\"><label>Starring:</label> '.join(', ', $actors).'</div>';\n echo '<div class=\"movieInfoField\"><label>Studio:</label> '.$row['studio_name'].'</div>';\n echo '<div class=\"movieInfoField\"><label>Tagline:</label> '.$row['tagline'].'</div>';\n echo '<div class=\"movieInfoField\"><label>Description:</label></div>';\n echo '<div class=\"movieDescription\">'.$row['plot'].'</div>';\n echo '<div class=\"movieInfoField\"><label>Rental:</label> DVD - $'.$row['DVD_rental_price'].' BluRay - $'.$row['BluRay_rental_price'].'</div>';\n echo '<div class=\"movieInfoField\"><label>Purchase:</label> DVD - $'.$row['DVD_purchase_price'].' BluRay - $'.$row['BluRay_purchase_price'].'</div>';\n echo '<div class=\"movieInfoField\"><label>Availability:</label> DVD - '.$row['numDVD'].' BluRay - '.$row['numBluRay'].'</div>';\n // If logged in add cart button\n if ($_SESSION['isLoggedIn']) {\n echo '<form action=\"booking.php\" method=\"post\">';\n echo '<input type=\"hidden\" name=\"title\" value=\"'.$row['title'].'\" />'; // Hidden field to contain title of movie\n echo '<input type=\"hidden\" name=\"movie_id\" value=\"'.$row['movie_id'].'\" />'; // Hidden field to contain id of movie\n // Check if movie already in cart\n if (in_array($row['movie_id'], $_SESSION['cartMovies'])) {\n echo '<input class=\"movieButtonOut\" name=\"book\" type=\"submit\" disabled=\"\" value=\"In Cart\" />';\n } else {\n // Check if cart is not full\n if (!($_SESSION['numberInCart'] >= 5)) {\n // Check if in stock\n if ($row['numDVD'] > 0 || $row['numBluRay'] > 0) {\n // Check if both dvd and blueray in stock\n if ($row['numDVD'] > 0 and $row['numBluRay'] > 0) {\n echo '<input class=\"movieButton\" name=\"book\" type=\"submit\" value=\"Add to Cart\" />';\n }\n // Check if dvd in stock but blueray out\n if ($row['numDVD'] > 0 and $row['numBluRay'] == 0) {\n echo '<input class=\"movieButton\" name=\"book\" type=\"submit\" value=\"Only DVD\" />';\n }\n // Check if BluRay in stock but dvd out\n if ($row['numDVD'] == 0 and $row['numBluRay'] > 0) {\n echo '<input class=\"movieButton\" name=\"book\" type=\"submit\" value=\"Only BluRay\" />';\n }\n } else {\n echo '<input class=\"movieButtonOut\" name=\"book\" type=\"submit\" disabled=\"\" value=\"Out\" />';\n }\n } else {\n echo '<input class=\"movieButtonOut\" name=\"book\" type=\"submit\" disabled=\"\" value=\"Cart Full\" />';\n }\n }\n\n\n\n echo '</form>';\n }\n\n echo '</fieldset>';\n echo '</div>';\n \n \n \n }\n } else {\n echo 'Actor \"'.$actor_name.'\" not found in database...'; // Display message that actor not found in databse\n }\n }", "private function __construct() { \n $this->movieData = $this->generateTable();\n\n }", "public function show(Movies $movies)\n {\n //\n }", "public function updateXXXInfo($xxxmovie)\n\t{\n\n\t\t$res = false;\n\t\t$this->whichclass = '';\n\n\t\t$iafd = new \\IAFD();\n\t\t$iafd->searchTerm = $xxxmovie;\n\n\t\tif ($iafd->findme() !== false) {\n\n\t\t\tswitch($iafd->classUsed) {\n\t\t\t\tcase \"ade\":\n\t\t\t\t\t$mov = new \\ADE();\n\t\t\t\t\t$mov->directLink = (string)$iafd->directUrl;\n\t\t\t\t\t$res = $mov->getDirect();\n\t\t\t\t\t$res['title'] = $iafd->title;\n\t\t\t\t\t$res['directurl'] = (string)$iafd->directUrl;\n\t\t\t\t\t$this->whichclass = $iafd->classUsed;\n\t\t\t\t\t$this->pdo->log->doEcho($this->pdo->log->primary(\"Fetching XXX info from IAFD -> Adult DVD Empire\"));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif ($res === false) {\n\n\t\t\t$this->whichclass = \"aebn\";\n\t\t\t$mov = new \\AEBN();\n\t\t\t$mov->cookie = $this->cookie;\n\t\t\t$mov->searchTerm = $xxxmovie;\n\t\t\t$res = $mov->search();\n\n\t\t\tif ($res === false) {\n\t\t\t\t$this->whichclass = \"ade\";\n\t\t\t\t$mov = new \\ADE();\n\t\t\t\t$mov->searchTerm = $xxxmovie;\n\t\t\t\t$res = $mov->search();\n\t\t\t}\n\n\t\t\tif ($res === false) {\n\t\t\t\t$this->whichclass = \"pop\";\n\t\t\t\t$mov = new \\Popporn();\n\t\t\t\t$mov->cookie = $this->cookie;\n\t\t\t\t$mov->searchTerm = $xxxmovie;\n\t\t\t\t$res = $mov->search();\n\t\t\t}\n\n\t\t\t// Last in list as it doesn't have trailers\n\t\t\tif ($res === false) {\n\t\t\t\t$this->whichclass = \"adm\";\n\t\t\t\t$mov = new \\ADM();\n\t\t\t\t$mov->cookie = $this->cookie;\n\t\t\t\t$mov->searchTerm = $xxxmovie;\n\t\t\t\t$res = $mov->search();\n\t\t\t}\n\n\n\t\t\t// If a result is true getAll information.\n\t\t\tif ($res !== false) {\n\t\t\t\tif ($this->echooutput) {\n\n\t\t\t\t\tswitch ($this->whichclass) {\n\t\t\t\t\t\tcase \"aebn\":\n\t\t\t\t\t\t\t$fromstr = \"Adult Entertainment Broadcast Network\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"ade\":\n\t\t\t\t\t\t\t$fromstr = \"Adult DVD Empire\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"pop\":\n\t\t\t\t\t\t\t$fromstr = \"PopPorn\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"adm\":\n\t\t\t\t\t\t\t$fromstr = \"Adult DVD Marketplace\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$fromstr = null;\n\t\t\t\t\t}\n\t\t\t\t\t$this->pdo->log->doEcho($this->pdo->log->primary(\"Fetching XXX info from: \" . $fromstr));\n\t\t\t\t}\n\t\t\t\t$res = $mov->getAll();\n\t\t\t} else {\n\t\t\t\t// Nothing was found, go ahead and set to -2\n\t\t\t\treturn -2;\n\t\t\t}\n\t\t}\n\n\t\t$mov = array();\n\n\t\t$mov['trailers'] = (isset($res['trailers'])) ? serialize($res['trailers']) : '';\n\t\t$mov['extras'] = (isset($res['extras'])) ? serialize($res['extras']) : '';\n\t\t$mov['productinfo'] = (isset($res['productinfo'])) ? serialize($res['productinfo']) : '';\n\t\t$mov['backdrop'] = (isset($res['backcover'])) ? $res['backcover'] : 0;\n\t\t$mov['cover'] = (isset($res['boxcover'])) ? $res['boxcover'] : 0;\n\t\t$res['cast'] = (isset($res['cast'])) ? join(\",\", $res['cast']) : '';\n\t\t$res['genres'] = (isset($res['genres'])) ? $this->getgenreid($res['genres']) : '';\n\t\t$mov['title'] = html_entity_decode($res['title'], ENT_QUOTES, 'UTF-8');\n\t\t$mov['plot'] = (isset($res['sypnosis'])) ? html_entity_decode($res['sypnosis'], ENT_QUOTES, 'UTF-8') : '';\n\t\t$mov['tagline'] = (isset($res['tagline'])) ? html_entity_decode($res['tagline'], ENT_QUOTES, 'UTF-8') : '';\n\t\t$mov['genre'] = html_entity_decode($res['genres'], ENT_QUOTES, 'UTF-8');\n\t\t$mov['director'] = (isset($res['director'])) ? html_entity_decode($res['director'], ENT_QUOTES, 'UTF-8') : '';\n\t\t$mov['actors'] = html_entity_decode($res['cast'], ENT_QUOTES, 'UTF-8');\n\t\t$mov['directurl'] = html_entity_decode($res['directurl'], ENT_QUOTES, 'UTF-8');\n\t\t$mov['classused'] = $this->whichclass;\n\n\t\t$check = $this->pdo->queryOneRow(sprintf('SELECT id FROM xxxinfo WHERE title = %s',\t$this->pdo->escapeString($mov['title'])));\n\t\t$xxxID = 0;\n\t\tif(isset($check['id'])){\n\t\t$xxxID = $check['id'];\n\t\t}\n\n\t\tif($check === false OR $xxxID > 0){\n\n\t\t// Update Current XXX Information - getXXXCovers.php\n\t\tif($xxxID > 0){\n\t\t\t$this->update($check['id'], $mov['title'], $mov['tagline'], $mov['plot'], $mov['genre'], $mov['director'], $mov['actors'], $mov['extras'], $mov['productinfo'], $mov['trailers'], $mov['directurl'], $mov['classused']);\n\t\t\t$xxxID = $check['id'];\n\t\t}\n\n\t\t// Insert New XXX Information\n\t\tif($check === false){\n\t\t\t$xxxID = $this->pdo->queryInsert(\n\t\t\t\tsprintf(\"\n\t\t\t\t\tINSERT INTO xxxinfo\n\t\t\t\t\t\t(title, tagline, plot, genre, director, actors, extras, productinfo, trailers, directurl, classused, cover, backdrop, createddate, updateddate)\n\t\t\t\t\tVALUES\n\t\t\t\t\t\t(%s, %s, COMPRESS(%s), %s, %s, %s, %s, %s, %s, %s, %s, 0, 0, NOW(), NOW())\",\n\t\t\t\t\t$this->pdo->escapeString($mov['title']),\n\t\t\t\t\t$this->pdo->escapeString($mov['tagline']),\n\t\t\t\t\t$this->pdo->escapeString($mov['plot']),\n\t\t\t\t\t$this->pdo->escapeString(substr($mov['genre'], 0, 64)),\n\t\t\t\t\t$this->pdo->escapeString($mov['director']),\n\t\t\t\t\t$this->pdo->escapeString($mov['actors']),\n\t\t\t\t\t$this->pdo->escapeString($mov['extras']),\n\t\t\t\t\t$this->pdo->escapeString($mov['productinfo']),\n\t\t\t\t\t$this->pdo->escapeString($mov['trailers']),\n\t\t\t\t\t$this->pdo->escapeString($mov['directurl']),\n\t\t\t\t\t$this->pdo->escapeString($mov['classused'])\n\t\t\t\t)\n\t\t\t);\n\t\t\t}\n\n\t\t\tif ($xxxID > 0) {\n\n\t\t\t\t// BoxCover.\n\t\t\t\tif (isset($mov['cover'])) {\n\t\t\t\t\t$mov['cover'] = $this->releaseImage->saveImage($xxxID . '-cover', $mov['cover'], $this->imgSavePath);\n\t\t\t\t}\n\n\t\t\t\t// BackCover.\n\t\t\t\tif (isset($mov['backdrop'])) {\n\t\t\t\t\t$mov['backdrop'] = $this->releaseImage->saveImage($xxxID . '-backdrop', $mov['backdrop'], $this->imgSavePath, 1920, 1024);\n\t\t\t\t}\n\n\t\t\t\t$this->pdo->queryExec(sprintf('UPDATE xxxinfo SET cover = %d, backdrop = %d WHERE id = %d', $mov['cover'], $mov['backdrop'], $xxxID));\n\n\t\t\t} else {\n\t\t\t\t$xxxID = -2;\n\t\t\t}\n\n\t\t}\n\n\t\tif ($this->echooutput) {\n\t\t\t$this->pdo->log->doEcho(\n\t\t\t\t$this->pdo->log->headerOver(($xxxID !== false ? 'Added/updated XXX movie: ' : 'Nothing to update: ')) .\n\t\t\t\t$this->pdo->log->primary($mov['title'])\n\t\t\t);\n\t\t}\n\n\t\treturn $xxxID;\n\t}", "function InsertMovie($imdb_id,&$ret_title,$seen,$mediatype){\n\t\n\t$imdb_set_fields = array('md5','title','subtitle','language','diskid','mediatype','comment','disklabel',\n 'imdbID','year','imgurl','director','actors','runtime','country','plot','filename',\n 'filesize','filedate','audio_codec','video_codec','video_width','video_height','istv',\n 'custom1','custom2','custom3','custom4');\n\t\t\t \n\t//fetching all the data\n\t$imdbdata=engineGetData($imdb_id);\n\tif ($imdbdata['title']=='') return 0;\n\t//sorting needed things\n\t\n\t//genres--------------------------\n $genres = array();\n $gnames = $imdbdata['genres'];\n if (isset($gnames))\n {\n foreach ($gnames as $gname)\n {\n // check if genre is found- otherwise fail silently\n if (is_numeric($genre = getGenreId($gname)))\n {\n $genres[] = $genre;\n }\n }\n }\n\t//--------------------------------\n\t\n\t//actors\n\t$actors = $imdbdata['cast'];\n\t\n\t//movie owner---------------------\n\tif (check_permission(PERM_WRITE, $_COOKIE['VDBuserid'])){\n\t\t$owner_id = $_COOKIE['VDBuserid'];\n\t}else{\n\t\t$owner_id=0;\n\t}\n\t//--------------------------------\n\n\t//cover\n\t$imgurl = $imdbdata['coverurl'];\n\t\n \t// lookup all other fields\n \tforeach (array_keys($imdbdata) as $name){\n\t\tif (in_array($name, array('coverurl', 'genres', 'cast', 'id'))) continue;\n\t\t$$name = $imdbdata[$name];\n\t}\n\n\t//year\n\tif (empty($year)) $year = '0000';\n\t\n\t// set owner\n \tif (!empty($owner_id))\n \t$SETS = 'owner_id = '.escapeSQL($owner_id);\n\n\t$imdbID=$imdb_id;\n \t// update all fields according to list\n \tforeach ($imdb_set_fields as $name){\n \t// sanitize input\n \t$$name = removeEvilTags($$name);\n\n \t// make sure no formatting contained in basic data\n \tif (in_array($name, array('title', 'subtitle'))){\n \t\t$$name = trim(strip_tags($$name));\n\n \t\t// string leading articles?\n \t\tif ($config['removearticles']){\n \t\tforeach ($articles as $article){\n \t\t\tif (preg_match(\"/^$article+/i\", $$name)){\n \t\t\t$$name = trim(preg_replace(\"/(^$article)(.+)/i\", \"$2, $1\", $$name));\n \t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t}\n \t}\n\n \t$SET = \"$name = '\".escapeSQL($$name).\"'\";\n\n \tif (empty($$name)){\n \t\tif (in_array($name, $db_null_fields))\n \t\t$SET = \"$name = NULL\";\n \telseif (in_array($name, $db_zero_fields))\n \t$SET = \"$name = 0\";\n \t}\n\t\t\n \tif ($SETS) $SETS .= ', ';\n \t$SETS .= $SET;\n \t}\n\n\t//inserting into database--------------------\n\t$INSERT = 'INSERT INTO '.TBL_DATA.' SET '.$SETS.', created = NOW()';\n\t//print_r($INSERT);\n\t//echo \"<br><br>\";\n\t$id = runSQL($INSERT);\n\t// save genres\n setItemGenres($id, $genres);\n\t//-------------------------------------------\n\t\n\t// insert userseen data\n\t$INSERTSEEN = 'INSERT INTO `userseen` (`video_id`, `user_id`) VALUES ('.$id.','.$owner_id.')';\n\trunSQL($INSERTSEEN);\n\t$ret_title=$title;\n\treturn 1;\n}", "function create_movie_lists() {\n\t\tforeach($movie_list as $current_movie) {\n\t\t\tmake_one_movie_list($current_movie);\n\t\t}\n\t}", "public function show(Movie $movie)\n {\n //show one movie\n dd(\"show\");\n }", "public function update(Request $request, $id)\n {\n //\n \n $movie = \\App\\models\\Movies::find($id);\n $data = $this->validate($request, [\n 'title' => 'required|unique:movies,title,' .$id,\n 'description' => 'required',\n 'release_date' => 'sometimes',\n 'duration' => 'sometimes|integer',\n ]);\n\n\n $movie = Movies::where('id', $id)\n ->update([\n 'title' => $data['title'],\n 'description' => $data['description'],\n 'release_date' => $data['release_date'],\n 'duration' => $data['duration'],\n ]);\n\n $movie = \\App\\models\\Movies::find($id);\n\n\n\n if ($request->actors) {\n $movie->actors()->detach();\n foreach ($request->actors as $actor) {\n $actor = \\App\\models\\Actors::find($actor);\n $movie->actors()->attach($actor);\n }\n }elseif (!$request->actors){\n $movie->actors()->detach();\n }\n\n if ($request->genres) {\n $movie->genres()->detach();\n foreach ($request->genres as $genre) {\n $genre = \\App\\models\\Genres::find($genre);\n $movie->genres()->attach($genre);\n }\n }elseif (!$request->genres){\n $movie->genres()->detach();\n }\n\n if ($request->tags) {\n $movie->tags()->detach();\n foreach ($request->tags as $tag) {\n $tag = \\App\\models\\Tags::find($tag);\n $movie->tags()->attach($tag);\n }\n }elseif (!$request->tags){\n $movie->tags()->detach();\n }\n\n\n\n if($request->hasFile('poster_path')){\n if (photos::where('path', $movie->poster_path)->get()[0]->id > 0) {\n $icon = photos::where('path', $movie->poster_path)->get()[0]->id;\n photos::destroy($icon);\n }\n $file = request()->file('poster_path');\n $fileName = md5($file->getClientOriginalName() . time()) . \".\" . $file->getClientOriginalExtension();\n $file->move('./uploads/movie/icon/', $fileName);\n $path = '/uploads/movie/icon/'.$fileName;\n photos::create(['path'=>$path]);\n $movie = Movies::find($id);\n $movie->poster_path = $path;\n $movie->save();\n }\n\n return redirect('/control/movies');\n }", "public function show($id)\n {\n try {\n $movie = \\App\\Movie::find($id);\n $movie_genres = $movie->genres;\n $movie_screens = $movie->screens;\n } catch (\\Throwable $th) {\n error_log($th);\n }\n $movie = [\n 'movie'=>$movie,\n 'genres'=>$movie_genres,\n 'screens'=>$movie_screens\n ];\n return $movie;\n }", "function bgs_Movies_init() {\n\t\n}", "function get_movies( $query )\n{\n log_error('get_movies');\n $html = get_html($query);\n\n $results = array();\n\n foreach($html->find('#movie_results .theater') as $div) {\n log_error('found a theatre');\n $result = array();\n\n //$theatre_id = $div->find('h2 a',0)->getAttribute('href');\n $theatre_info = $div->find('.info',0)->innertext;\n\n //$result['theatre_id'] = substr( $theatre_id, (strrpos($theatre_id, 'tid=')+4) );\n $result['theatre_name'] = $div->find('.name',0)->innertext;\n\n $pos_info = strrpos( $theatre_info, '<a');\n if( $pos_info !== false )\n $result['theatre_info'] = substr( $theatre_info, 0, strrpos( $theatre_info, '<a'));\n else\n $result['theatre_info'] = $theatre_info;\n\n $result['movies'] = array();\n foreach($div->find('.movie') as $movie) {\n log_error('found a movie - '.$movie->find('.name a',0)->innertext);\n\n $movie_id = $movie->find('.name a',0)->getAttribute('href');\n $movie_id = substr( $movie_id, (strrpos($movie_id, 'mid=')+4) );\n\n log_error('obtained movie_id: '.$movie_id);\n\n $info_raw = $movie->find('.info',0)->innertext;\n $pos = strpos($info_raw, ' - <a');\n\n if( $pos !== false ){\n $info = substr( $info_raw, 0, $pos);\n\n $trailer = urldecode($movie->find('.info a', 0)->getAttribute('href'));\n $trailer = substr($trailer, 7);\n $trailer = substr($trailer, 0, strpos($trailer, '&'));\n }\n else {\n $trailer = '';\n }\n\n // showtimes\n $times = array();\n // echo 'movie: '.$movie->find('.name a',0)->innertext.'<br>';\n // echo $movie->find('.times',0)->childNodes(0);\n foreach($movie->find('.times > span') as $time) {\n // echo 'time: '.$time->innertext.'<br>';\n // echo 'attr: '.$time->getAttribute('style').'<br>';\n\n if( trim($time->getAttribute('style')) != 'padding:0' )\n {\n $time_strip = strip_tags($time->innertext);\n $time_strip = str_replace('&nbsp', '', $time_strip);\n $time_strip = str_replace(' ', '', $time_strip);\n //$time_strip = html_entity_decode($time_strip);\n //echo 'a:'.$time_strip.'<br>';\n /*$pos_time = false;\n $pos_time = strrpos($time->innertext, '-->');\n if( $pos_time !== false ){\n $showtime = substr($time->innertext, $pos_time+3);\n //echo $showtime.'<br>';\n }*/\n //echo $time;\n array_push( $times, $time_strip );\n }\n }\n\n array_push($result['movies'], array(\n 'id' => $movie_id,\n 'name' => $movie->find('.name a',0)->innertext,\n 'info' => $info, // (does <a> exist) ? (yes) : (no)\n 'time' => $times,\n 'trailer' => $trailer\n ));\n }\n\n $results[] = $result;\n }\n\n return $results;\n}", "public function index()\r\n {\r\n // Case movie detail\r\n if (!empty($_GET['id'])) {\r\n $this->model->id['col'] = 'id_movie';\r\n $this->model->id['val'] = $_GET['id'];\r\n \r\n $detail = $this->model->read();\r\n \r\n if (!empty($detail)) {\r\n $detail[0]->id_genre = $this->model->hasOne(Genre::class, $detail[0]->id_genre)[0]->name;\r\n $detail[0]->id_publisher = $this->model->hasOne(publisher::class, $detail[0]->id_publisher)[0]->name;\r\n }\r\n\r\n $this->render('detail', ['movie' => !empty($detail) ? $detail[0] : 'id is invalid']);\r\n exit;\r\n }\r\n \r\n // Case searoching for movie\r\n if (!empty($this->params['search'])) {\r\n\r\n // time to pagination\r\n\r\n // to serach for a movie\r\n // get query \r\n // display results\r\n // if search result is one then go to detail page (by redirecting) else go to index page\r\n // $this->model->params['WHERE'] => \"title LIKE '%\" . $this->model->params['search'] . \"%'\";\r\n\r\n $this->render('index', ['movies' => $this->model->read()]);\r\n exit;\r\n } \r\n\r\n \r\n \r\n // pagination\r\n $offset = 20;\r\n $p = isset($_GET['p']) ? ($_GET['p'] - 1) * $offset : 0;\r\n $this->model->params = [\r\n 'LIMIT' => $p . ', ' . $offset\r\n ];\r\n\r\n $this->render('index', ['movies' => $this->model->read()]);\r\n }", "function movieArray(){\n $movieObject = [\n 'ACT' => [\n 'title' => \"The Girl in the Spiders Web\",\n 'rating' => \"MA15+\",\n 'description' => \"Lisbeth Salander, the cult figure and title character of the acclaimed Millennium book series created by Stieg Larsson, will return to the screen in The Girl in the Spider’s Web, a first-time adaptation of the recent global bestseller. Golden Globe winner Claire Foy, the star of “The Crown,” will play the outcast vigilante defender under the direction of Fede Alvarez, the director of 2016’s breakout thriller Don’t Breathe; the screenplay adaptation is by Steven Knight and Fede Alvarez & Jay Basu.\",\n 'poster' => \"girl_in_the_spiders_web.png\",\n 'trailer' => \"https://www.youtube.com/embed/XKMSP9OKspQ?controls=0\",\n 'sessions' => [\n 'wednesday' => '9PM',\n 'thursday' => '9PM',\n 'friday' => '9PM',\n 'saturday' => '6PM',\n 'sunday' => '6PM'\n ]\n ],\n 'RMC' => [\n 'title' => \"A Star Is Born\",\n 'rating' => \"M\",\n 'description' => \"In this new take on the tragic love story, he plays seasoned musician Jackson Maine, who discovers—and falls in love with—struggling artist Ally (Gaga). She has just about given up on her dream to make it big as a singer... until Jack coaxes her into the spotlight. But even as Ally’s career takes off, the personal side of their relationship is breaking down, as Jack fights an ongoing battle with his own internal demons.\",\n 'poster' => \"a_star_is_born.png\",\n 'trailer' => \"https://www.youtube.com/embed/nSbzyEJ8X9E?controls=0\",\n 'sessions' => [\n 'monday' => '6PM',\n 'tuesday' => '6PM',\n 'saturday' => '3PM',\n 'sunday' => '3PM'\n ]\n ],\n 'ANM' => [\n 'title' => \"Ralph Breaks the Internet\",\n 'rating' => \"PG\",\n 'description' => \"Ralph Breaks the Internet: Wreck-It Ralph 2” leaves Litwak’s video arcade behind, venturing into the uncharted, expansive and thrilling world of the internet—which may or may not survive Ralph’s wrecking. Video game bad guy Ralph (voice of John C. Reilly) and fellow misfit Vanellope von Schweetz (voice of Sarah Silverman) must risk it all by traveling to the world wide web in search of a replacement part to save Vanellope’s video game, Sugar Rush.\",\n 'poster' => \"ralph_breaks_the_internet.png\",\n 'trailer' => \"https://www.youtube.com/embed/_BcYBFC6zfY?controls=0\",\n 'sessions' => [\n 'monday' => '12PM',\n 'tuesday' => '12PM',\n 'wednesday' => '6PM',\n 'thursday' => '6PM',\n 'friday' => '6PM',\n 'saturday' => '12PM',\n 'sunday' => '12PM'\n ]\n ],\n 'AHF' => [\n 'title' => \"Boy Erased\",\n 'rating' => \"MA15+\",\n 'description' => \" “Boy Erased” tells the story of Jared (Hedges), the son of a Baptist pastor in a small American town, who is outed to his parents (Kidman and Crowe) at age 19. Jared is faced with an ultimatum: attend a conversion therapy program – or be permanently exiled and shunned by his family, friends, and faith. Boy Erased is the true story of one young man’s struggle to find himself while being forced to question every aspect of his identity.\",\n 'poster' => \"boy_erased.png\",\n 'trailer' => \"https://www.youtube.com/embed/-B71eyB_Onw?controls=0\",\n 'sessions' => [\n 'wednesday' => '12PM',\n 'thursday' => '12PM',\n 'friday' => '12PM',\n 'saturday' => '9PM',\n 'sunday' => '9PM'\n ]\n ]\n ];\n return $movieObject;\n}", "function add_movie($info){\n\t$db= $GLOBALS['db']; \n\textract($info);\n\t$submitted= $db->query(\"INSERT INTO movies VALUES('', '$title', '$year_released', '$synopsis', '$was_novel', '$studioID', '$timestamp')\");\n\techo \"<h3>The movie $title was submitted!</h3>\"; \n}", "public static function render_movie_list($movies) {\n ?>\n <div class=\"row\" style=\"margin-top: 30px\">\n <div class=\"one-full column\">\n <h4>\n Movie List - <?php echo count($movies) ?> results<?php if(isset($_POST['search'])) echo ' - Search term: '.$_POST['search']; ?>\n <a href=\"MovieInfo.php\" class=\"button-primary u-pull-right\">Add Movie</a>\n </h4>\n \n </div> \n </div>\n\n <?php \n self::render_movies_rows($movies);\n ?>\n \n <?php\n }", "public function moviesByYear() {\n $model = $this->model;\n $request = $this->request;\n $movies = $this->getAndSetCache(\n \\CacheVars::NAMESPACE_PAGE,\n \\CacheVars::KEY_MOVIES_DATA . \"_by_year_{$this->request->year}\",\n function() use($model, $request) {\n return $model->getMoviesByYear($request->year);\n }\n );\n $this->view->addParameter(\"movies\", $movies);\n }", "function nt_fn_fetch_movie_info()\r\n{\r\n\tif(!current_user_can('manage_options')){\r\n\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\r\n\t}//end if user is allowed.\r\n\t\r\n\t\r\n\tglobal $rottenTomatoes;\r\n\tif(isset($_POST['movie_id'])) {\r\n\t\t\t\r\n\t// Movie ID Loop \t\t\r\n foreach($_POST['movie_id'] as $mId) {\r\n\t\t\r\n\t\t$movie_id = $mId;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$result = $rottenTomatoes->getMovieInfo($movie_id);\r\n\t\t\t$search_results = json_decode(json_encode($result),false);\r\n\t\t\t\r\n\t\t\tif (!isset($search_results->title))\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create post object\r\n\t\t\t$movie_post = array(\r\n\t\t\t\t'post_title' => $search_results->title,\r\n\t\t\t\t'post_content' => $search_results->synopsis,\r\n\t\t\t\t'post_status' => 'publish',\r\n\t\t\t\t'post_author' => 1,\r\n\t\t\t\t'post_category' => array(),\r\n\t\t\t\t'post_type' \t => 'movies'\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$exist_data = get_page_by_title($search_results->title, 'OBJECT', 'movies');\r\n\t\t\tif ($exist_data)\r\n\t\t\t{\r\n\t\t\t\t$movie_post['ID'] = $exist_data->ID;\r\n\t\t\t\twp_update_post($movie_post);\r\n\t\t\t\t$post_id = $exist_data->ID;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Insert the post into the database\r\n\t\t\t\t$post_id = wp_insert_post($movie_post, null );\r\n\t\t\t}\r\n\t\t\t// Upload poster\r\n\t\t\t$image_url = str_replace(\"_tmb\",\"_ori\",$search_results->posters->original);\r\n\t\t\t$upload_dir = wp_upload_dir();\r\n\t\t\t$image_data = file_get_contents($image_url);\r\n\t\t\t$filename = basename($image_url);\r\n\t\t\tif(wp_mkdir_p($upload_dir['path']))\r\n\t\t\t{\r\n\t\t\t\t$file = $upload_dir['path'] . '/' . $filename;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$file = $upload_dir['basedir'] . '/' . $filename;\r\n\t\t\t}\r\n\t\t\tfile_put_contents($file, $image_data);\r\n\t\t\t\r\n\t\t\t$wp_filetype = wp_check_filetype($filename);\r\n\t\t\t\r\n\t\t\t$attachment = array(\r\n\t\t\t\t'post_mime_type' => $wp_filetype['type'],\r\n\t\t\t\t'post_title' => sanitize_file_name($filename),\r\n\t\t\t\t'post_content' => '',\r\n\t\t\t\t'post_status' => 'inherit'\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$attach_id = wp_insert_attachment( $attachment, $file, $post_id );\r\n\t\t\t\r\n\t\t\trequire_once(ABSPATH . 'wp-admin/includes/image.php');\r\n\t\t\t$attach_data = wp_generate_attachment_metadata( $attach_id, $file );\r\n\t\t\t\r\n\t\t\twp_update_attachment_metadata( $attach_id, $attach_data );\r\n\t\t\t\r\n\t\t\tset_post_thumbnail( $post_id, $attach_id );\r\n\t\t\t\r\n\t\t\t// Create genres\r\n\t\t\t$terms = array();\r\n\t\t\tif(isset($search_results->genres)){\r\n\t\t\t\tforeach($search_results->genres as $term):\r\n\t\t\t\t\t$t_exists = term_exists( $term, 'genres' );\r\n\t\t\t\t\tif($t_exists==\"\"):\r\n\t\t\t\t\t\t$t = wp_insert_term( $term, 'genres' );\r\n\t\t\t\t\t\t$terms[] = $t['term_id'];\r\n\t\t\t\t\telse:\r\n\t\t\t\t\t\t$terms[] = $t_exists['term_id'];\r\n\t\t\t\t\tendif;\r\n\t\t\t\tendforeach;\r\n\t\t\t\t\r\n\t\t\t\t//add genres\r\n\t\t\t\twp_set_post_terms( $post_id, $terms, 'genres' );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create cast\r\n\t\t\t$castterms = array();\r\n\t\t\tif(isset($search_results->genres)){\r\n\t\t\t\tforeach($search_results->abridged_cast as $castterm):\r\n\t\t\t\t\t$t_exists = term_exists( $castterm->name, 'cast' );\r\n\t\t\t\t\tif($t_exists==\"\"):\r\n\t\t\t\t\t\t$t = wp_insert_term( $castterm->name, 'cast');\r\n\t\t\t\t\t\t$castterms[] = $t['term_id'];\r\n\t\t\t\t\telse:\r\n\t\t\t\t\t\t$castterms[] = $t_exists['term_id'];\r\n\t\t\t\t\tendif;\r\n\t\t\t\tendforeach;\r\n\t\t\t\t\r\n\t\t\t\t//add cast\r\n\t\t\t\twp_set_post_terms( $post_id, $castterms, 'cast' );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$director = array();\r\n\t\t\tforeach(json_decode(json_encode($search_results->abridged_directors), true) as $direct)\r\n\t\t\t{\r\n\t\t\t\t$director[] = $direct['name'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tupdate_post_meta( $post_id, 'directed_by', implode(\",\",$director));\r\n\t\t\t//add release data\r\n\t\t\tupdate_post_meta( $post_id, 'year', $search_results->year);\r\n\t\t\tupdate_post_meta( $post_id, 'release_date', $search_results->release_dates->theater);\r\n\t\t\tupdate_post_meta( $post_id, 'on_dvd', $search_results->release_dates->dvd);\r\n\t\t\tupdate_post_meta( $post_id, 'critics_rating', $search_results->ratings->critics_rating);\r\n\t\t\tupdate_post_meta( $post_id, 'critics_score', $search_results->ratings->critics_score);\r\n\t\t\tupdate_post_meta( $post_id, 'audience_rating', $search_results->ratings->audience_rating);\r\n\t\t\tupdate_post_meta( $post_id, 'audience_score', $search_results->ratings->audience_score);\r\n\t\t\tupdate_post_meta( $post_id, 'studio', $search_results->studio);\r\n\t\t\tupdate_post_meta( $post_id, 'url', $search_results->links->alternate);\r\n\t\t\t$msg = \"Updated Successfully\";\r\n\t\t} catch (Exception $e) {\r\n\t\t\t$msg = \"Update Failed\"; \r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t} // End mID Foreach Loop\r\n\t\r\n\t} // End POST If Condition\r\n if (isset( $msg) && !empty($msg)):\r\n \techo '<div class=\"updated fade\"><p>' . __($msg) . '</p></div>';\t\t\t\r\n endif;\r\n?>\r\n\r\n<div class=\"wrap\">\r\n <h2>Get Movie Info</h2>\r\n <form method=\"POST\" id=\"frmMovies\" name=\"frmMovies\" action=\"\" enctype=\"multipart/form-data\">\r\n <div class=\"movie_container\" style=\"margin-top:10px;\">\r\n <div class=\"tablenav top\">\r\n <div class=\"alignleft actions bulkactions\">\r\n <label>Movie ID:</label>\r\n <input type=\"text\" name=\"get_movie_id\" id=\"get_movie_id\" placeholder=\"Enter Movie Id\" />\r\n <label for=\"imdb_id\">\r\n <input type=\"checkbox\" name=\"imdb_id\" id=\"imdb_id\" value=\"yes\" />\r\n <span>IMDB ID</span> </label>\r\n <input type=\"submit\" disabled=\"disabled\" style=\"display:none;\" />\r\n <input type=\"button\" name=\"get_movies\" id=\"get_movies\" class=\"button\" value=\"Apply\" />\r\n </div>\r\n <div class=\"alignright actions bulkactions\">\r\n <input type=\"button\" value=\"Import\" class=\"button-primary action\" id=\"import\" name=\"import\" />\r\n </div>\r\n </div>\r\n <table id=\"tbl_movie_list\" class=\"wp-list-table widefat fixed pages\">\r\n <thead>\r\n <tr>\r\n <th style=\"\" class=\"manage-column column-cb check-column\" id=\"cb\" scope=\"col\"><label for=\"cb-select-all-1\" class=\"screen-reader-text\">Select All</label>\r\n <input type=\"checkbox\" id=\"cb-select-all-1\"></th>\r\n <th scope=\"col\">Thumbnail</th>\r\n <th scope=\"col\">Title</th>\r\n <th scope=\"col\">Year</th>\r\n <th scope=\"col\">In Theater</th>\r\n <th scope=\"col\">Ratings</th>\r\n </tr>\r\n </thead>\r\n <tbody id=\"the-list\">\r\n </tbody>\r\n </table>\r\n </div>\r\n <div class=\"loader\" style=\"margin:10% auto;display:none;\" align=\"center\"><img src=\"<?php echo plugins_url( 'images/loading.gif', dirname(__FILE__) ) ?>\" /></div>\r\n </form>\r\n</div>\r\n<?php global $RTApiKey;?>\r\n<script type=\"text/javascript\">\r\n// construct the uri with our apikey\r\njQuery(document).ready(function() {\t\r\n\tjQuery(\"#get_movie_id\").focus();\r\n\t\r\n\tjQuery(\"#get_movie_id\").keyup(function(e) {\r\n jQuery(\"#get_movie_id\").css(\"border-color\",\"\"); \r\n });\r\n\t\r\n\tvar apikey = \"<?php echo $RTApiKey;?>\";\r\n\tvar baseUrl = \"http://api.rottentomatoes.com/api/public/v1.0/\";\t\r\n\t// Get Movies\r\n\tjQuery(\"#get_movies\").click(function(e) {\t\r\n\t\tjQuery(\"#tbl_movie_list #the-list\").html('');\r\n\t\tvar mSearch = jQuery(\"#get_movie_id\").val();\r\n\t\tif(mSearch!='')\r\n\t\t{\r\n\t\t\tsuburl = 'movies/'+mSearch+'.json?';\r\n\t\t\tif(jQuery(\"#imdb_id:checked\").length==1)\r\n\t\t\t{\r\n\t\t\t\tsuburl = 'movie_alias.json?id='+mSearch+'&type=imdb&';\r\n\t\t\t}\r\n\t\t\tvar moviesUrl = baseUrl+suburl+'page_limit=50&apikey=' + apikey;\r\n\t\t\t// send off the query\r\n\t\t\tjQuery.jsonp({\r\n\t\t\t\turl: moviesUrl,\r\n\t\t\t\tcallbackParameter: \"callback\",\r\n\t\t\t\tsuccess: searchCallback,\r\n\t\t\t\terror:function(){\r\n\t\t\t\t\tjQuery(\"#tbl_movie_list #the-list\").html('<tr class=\"no-items\"><td colspan=\"6\" class=\"colspanchange\">Account Inactive.</td></tr>');\r\n\t\t\t\t},\r\n\t\t\t\tbeforeSend: function( xhr ) {\r\n\t\t\t\t\tjQuery(\".loader\").show();\r\n\t\t\t\t},\r\n\t\t\t\tcomplete: function (XMLHttpRequest, textStatus) {\r\n\t\t\t\t\tjQuery(\".loader\").hide(); //this was fired\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tjQuery(\"#get_movie_id\").css(\"border-color\",\"red\").focus();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t});\r\n\t\r\n\t// Import Movies\r\n\tjQuery(\"#import\").click(function(e) {\t\t\t\r\n\t\tjQuery(\"#frmMovies\").submit();\r\n\t\treturn true;\r\n\t});\r\n\t\r\n\tjQuery(document).on(\"click\",\".import\",function(e) {\r\n\t\tjQuery(\"input[type=checkbox]:input[value=\"+jQuery(this).attr(\"rel\")+\"]\").attr(\"checked\",\"true\");\r\n\t\tjQuery(\"#import\").trigger(\"click\");\r\n });\r\n});\r\n\t \r\n// Get Movies callback for when we get back the results\r\nfunction searchCallback(data) {\r\n\tif(data.error)\r\n\t{\r\n\t\tjQuery(\"#tbl_movie_list #the-list\").html('<tr class=\"no-items\"><td colspan=\"6\" class=\"colspanchange\">'+data.error+'</td></tr>');\r\n\t}\r\n\telse if(data.link_template)\t\r\n\t{\r\n\t\tjQuery(\"#tbl_movie_list #the-list\").html('<tr class=\"no-items\"><td colspan=\"6\" class=\"colspanchange\">Could not find a movie with the specified id</td></tr>');\r\n\t}\r\n\telse\r\n\t{\r\n\t\tvar tbldata = \"\";\r\n\t\tvar movie = data;\r\n\t\t//jQuery(\".displaying-num\").html(data.length+\" item(s)\");\r\n\t\tvar cls =\"alternate\";\r\n\t\ttbldata += '<tr class=\"'+cls+'\"><th class=\"check-column\" scope=\"row\"><input type=\"checkbox\" value=\"'+movie.id+'\" name=\"movie_id[]\" id=\"cb-select-2\"></th><td><img src=\"' + movie.posters.thumbnail + '\" /></td><td>'+movie.title+'<div class=\"row-actions\"> | <span class=\"import\"><a title=\"Import this Movie\" href=\"javascript:void(0);\" class=\"import\" rel=\"'+movie.id+'\">Import</a></span></div></td><td>'+movie.year+'</td><td>'+movie.release_dates.theater+'</td><td>'+movie.ratings.critics_score+'%</td></tr>';\r\n\t}\r\n\tjQuery(\"#tbl_movie_list #the-list\").html(tbldata);\r\n}\r\n</script>\r\n<?php\r\n}", "public function getMovies()\n {\n $movie = Movie::with('genres', 'cast', 'crew', 'licensors', 'producers', 'studios', 'reviews');\n $getters = Input::get();\n \n // Add offset/limit\n $movie->offset( (@$getters['index'] * @$getters['pageSize']) ?: 0);\n $movie->limit(@$getters['pageSize'] ?: 15);\n\n // Return items\n return $movie->get();\n }", "public function getFilmInfo($day)\n\t{\n\n\t\tswitch ($day->getName())\n\t\t{\n\t\t\tcase 'Friday':\n\t\t\t\t$day =\"01\";\n\t\t\t\tbreak;\n\t\t\tcase 'Saturday':\n\t\t\t\t$day =\"02\";\n\t\t\t\tbreak;\n\t\t\tcase 'Sunday':\n\t\t\t\t$day =\"03\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//TODO : Do something.\n\t\t\t\tbreak;\n\t\t}\n\n\n\t\t$url =$this->cinemaLink;\n\t\t$data = $this->curl->curlGetReq($url);\n\t\t//Get all selects of movie exc. disabled w text instruction.\n\t\t$query = \"//select[@id ='movie']/option[not(text() = '--- Välj film ---')]\";\n\t\t$select = $this->curl->getDOMData($data,$query);\t\n\t\t\n\t\t//\n\n\t\t//Get the number of movies\n\t\t$numberOfMovies = $select->length;\n\t\t\n\t\t//add date query to the URL\n\t\t$url .=\"check?day=\".$day;\n\t\t/* Iterate through all movies, add them to url, get\n\t\t* and extract times \n\t\t*/\n\t\t$movieTimeRepository = new availableTimeRepository();\n\n\t\tfor($i =1; $i < $numberOfMovies+1; $i++)\n\t\t{\n\t\t\t//get the name of the movie\n\t\t\t$movieName = $select[$i-1]->nodeValue;\n\t\t\t//create a new movieTime object\n\t\t\t$movieTime = new availableTime($movieName);\n\t\t\t//get the times and availability for each movie\n\t\t\t//example of URL with movieQuery: http://localhost:8080/cinema/check?day=02&movie=01\n\t\t\t$movieQuery= ($i <10)? \"&movie=0\".$i: \"&movie=\".$i;\n\t\t\t$data = $this->curl->curlGetReq($url.$movieQuery);\n\t\t\t//decode it and iterate the data\n\t\t\t$movieData =json_decode($data,true);\n\t\t\t\n\t\t\tforeach ($movieData as $movieInfo)\n\t\t\t{\t\n\t\t\t\t//if the status ==1 ==true,it's available\n\t\t\t\tif($movieInfo['status'])\n\t\t\t\t{\t//save the available time to corresponding movie obj.\n\t\t\t\t\t$movieTime->addTime($movieInfo['time']);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$movieTimeRepository->add($movieTime);\n\n\n\t\t}\t\t\n\t\n\t\treturn $movieTimeRepository;\n\t\t\n\t}", "public function edit(Movie $movie)\n {\n //load my change movie form\n $genres = DB::table('genres')->orderBy('description')->get();\n return view('movies.edit', ['movie'=>$movie,'genres'=>$genres] );\n }", "function gatherMovieInfoFromPost( $params ) \n\t{\n\t\tif (!empty($params['localdbid']))\n\t\t\t$movieinfo['localdbid'] = $params['localdbid'];\n\t\t$movieinfo['filepath'] = $params['filepath'];\n\t\t$movieinfo['duration'] = $params['duration'];\n\t\t$movieinfo['title'] = $params['title'];\n\t\t$movieinfo['imdbid'] = $params['imdbid'];\n\t\t$movieinfo['original_title'] = $params['original_title'];\n\t\t$movieinfo['year'] = $params['year'];\n\t\t$movieinfo['mpaa'] = $params['mpaa'];\n\t\t$movieinfo['director'] = $params['director'];\n\t\t$movieinfo['writers'] = $params['writers'];\n\t\t$movieinfo['tagline'] = $params['tagline'];\n\t\t$movieinfo['genres'] = $params['genres'];\n\t\t$movieinfo['overview'] = $params['overview'];\n\t\t$movieinfo['plot'] = $params['overview'];\n\t\t$movieinfo['actors'] = $params['actors'];\n\t\t$movieinfo['thumb'] = isset($params['thumb']) ? urldecode($params['thumb']) : '';\n\t\t$movieinfo['allthumbs'] = urldecode($params['allthumbs']);\n\n\t\treturn $movieinfo;\n\t}", "function gatherMovieInfo($moviefile, $moviedbid)\n\t{\n\t\t$movieinfo['filepath'] = $moviefile;\n\t\t$movieinfo['moviedbid'] = $moviedbid;\n\n\t\t\n\t\tif ($moviedbid == \"0\") {\n\t\t\t//\n\t\t\t// adding as a custom movie with no moviedb link. Like a home movie.\n\t\t\t//\n\t\t\t$info = pathinfo($moviefile);\n\t\t\t$title = basename($moviefile,'.'.$info['extension']);\n\t\t\t\n\t\t\t$movieinfo['title'] = $title;\n\t\t\t$movieinfo['original_title'] = $title;\n\t\t\t$movieinfo['genres'] = 'Home Movies';\n\t\t}\n\t\telse\n\t\t{\n\t\t\n\t\t\t// get runtime from file\n\t\t\t$meta= new getID3();\n\t\t\t$file = $meta->analyze($moviefile);\n\t\t\t$duration = $file['playtime_seconds'];\n\t\t\t$movieinfo['duration'] = round($duration / 60);\n\n\t\t\t$moviedbinfo = getAPI3Result(\"movie/\" . $moviedbid, \"append_to_response=casts,releases,images\");\n\n\t//\t\t$movieinfo['duration'] = $moviedbinfo['runtime'];\n\t\t\t$movieinfo['title'] = $moviedbinfo['title'];\n\t\t\t$movieinfo['imdbid'] = $moviedbinfo['imdb_id'];\n\t\t\t$movieinfo['original_title'] = $moviedbinfo['original_title'];\n\t\t\t$movieinfo['year'] = substr($moviedbinfo['release_date'],0,4);\n\t\t\t$movieinfo['mpaa'] = getUSRating($moviedbinfo);\n\t\t\t$movieinfo['director'] = getDirector($moviedbinfo);\n\t\t\t$movieinfo['writers'] = getWriters($moviedbinfo);\n\t\t\t$movieinfo['tagline'] = $moviedbinfo['tagline'];\n\t\t\t$movieinfo['genres'] = getGenres($moviedbinfo);\n\t\t\t$movieinfo['overview'] = $moviedbinfo['overview'];\n\t\t\t$movieinfo['plot'] = $moviedbinfo['overview'];\n\t\t\t$movieinfo['actors'] = getActors($moviedbinfo);\n\t\t\t$movieinfo['moviedbruntime'] = $moviedbinfo['runtime'];\n\n\t\t\t$config = getAPI3Result(\"configuration\");\n\n\t\t\t// get the thumbnails\n\t\t\t$thumbnails = \"\";\n\t\t\tforeach($moviedbinfo['images'][\"posters\"] as $poster) {\n\t\t\t\t$fullpath = $config['images']['base_url'] . \"original\" . $poster['file_path'];\n\t\t\t\tif (empty($movieinfo['thumb'])) $movieinfo['thumb'] = $fullpath;\n\t\t\t\t$thumbnails .= \"<thumb>\" . $fullpath . \"</thumb>\";\n\t\t\t}\t\t\t\t\n\t\t\t$movieinfo['allthumbs'] = $thumbnails;\n\t\t}\n\t\t\n\t\treturn $movieinfo;\n\n\t}", "public function show(Film $film)\n {\n //\n }", "public function show(Film $film)\n {\n //\n }", "public function run()\n {\n $movieData = json_decode(Storage::get('movies.json'), true);\n\n $creditJson = json_decode(Storage::get('credits.json'), true);\n $creditData = [];\n\n foreach ($creditJson as $key => $object) {\n $id = $object['id'];\n unset($object['id']);\n $creditData[$id] = $object;\n }\n\n foreach ($movieData as $key => &$object) {\n $id = $object['id'];\n $object['cast'] = $creditData[$id]['cast'];\n $object['crew'] = $creditData[$id]['crew'];\n }\n\n function movieAdder($movieItem)\n {\n try {\n $dataArr = [\n 'id' => $movieItem['id'],\n 'title' => $movieItem['title'],\n 'genres' => $movieItem['genres'],\n 'runtime' => $movieItem['runtime'],\n 'release_date' => $movieItem['release_date'],\n 'adult' => $movieItem['adult'],\n 'revenue' => $movieItem['revenue'],\n 'budget' => $movieItem['budget'],\n 'status' => $movieItem['status'],\n 'tagline' => $movieItem['tagline'],\n 'poster_path' => $movieItem['poster_path'],\n 'backdrop_path' => $movieItem['backdrop_path'],\n 'video' => $movieItem['video'],\n 'vote_count' => $movieItem['vote_count'],\n 'vote_average' => $movieItem['vote_average'],\n 'production_companies' => $movieItem['production_companies'],\n 'cast' => $movieItem['cast'],\n 'crew' => $movieItem['crew'],\n 'overview' => $movieItem['overview'],\n ];\n\n $movie = Movie::create($dataArr);\n } catch (Exception $e) {\n }\n }\n\n array_map('movieAdder', $movieData);\n }", "function showForm( $movieinfo )\n\t{\n\t\tglobal $API_KEY;\n\t\tglobal $REDIRECT_MEDIA_BASE;\n\t\tglobal $message;\n\n\t\tprint \"<form method=POST action='addmovie.php'>\";\n\n\t\tif (!empty($movieinfo['localdbid']))\n\t\t\tprint(\"<input type=\\\"hidden\\\" name=\\\"localdbid\\\" value=\\\"\" . urlencode($movieinfo['localdbid']) . \"\\\"/>\");\n\n\t\tprint \"<div class='leftcontent scroll-y editform'>\";\n\t\tprint \"<div style='padding:15px;'>\";\n\t\tprint \"<span class='formlabel' style=\\\"display:inline-block\\\">Title</span><input size=50 type=\\\"text\\\" name=\\\"title\\\" value=\\\"\" . \n\t\t\t\t\thtmlspecialchars($movieinfo['title']) . \"\\\" />\\n\";\n\n\n\n\n\t\tprint \"<br/><span class='formlabel' style=\\\"display:inline-block;\\\">Original Title</span><input type=\\\"text\\\" size=50 name=\\\"original_title\\\" value=\\\"\" . \n\t\t\t\t\thtmlspecialchars($movieinfo['original_title']) . \"\\\" />\\n\";\n\n\t\tprint \"<span class='formLabel'>Year</span> <input type=\\\"text\\\" size=4 name=\\\"year\\\" value=\\\"\" . \n\t\t\t\t\thtmlspecialchars($movieinfo['year']) . \"\\\" />\\n\";\n\n\n\t\tprint \"<br/><span class='formlabel' style=\\\"display:inline-block;\\\">Director</span><input size=50 type=\\\"text\\\" name=\\\"director\\\" value=\\\"\" . \n\t\t\t\t\thtmlspecialchars($movieinfo['director']) . \"\\\" />\\n\";\n\n\t\tprint \"<span class='formLabel'>MPAA</span> <input type=\\\"text\\\" size=5 name=\\\"mpaa\\\" value=\\\"\" . \n\t\t\t\t\thtmlspecialchars($movieinfo['mpaa']) . \"\\\" />\\n\";\n\n\n\t\tprint \"<br/><span class='formlabel' style=\\\"display:inline-block;\\\">Writers</span><input size=50 type=\\\"text\\\" name=\\\"writers\\\" value=\\\"\" . \n\t\t\t\t\thtmlspecialchars($movieinfo['writers']) . \"\\\" />\\n\";\n\n\t\tprint \"<span class='formLabel'>IMDB id</span> <input type=\\\"text\\\" size=10 name=\\\"imdbid\\\" value=\\\"\" . \n\t\t\t\t\thtmlspecialchars($movieinfo['imdbid']) . \"\\\" />\\n\";\n\n\n\t\tprint \"<br/><span class='formlabel' style=\\\"display:inline-block;\\\">Tagline</span><input size=50 type=\\\"text\\\" name=\\\"tagline\\\" value=\\\"\" . \n\t\t\t\t\thtmlspecialchars($movieinfo['tagline']) . \"\\\" />\\n\";\n\n\t\tprint \"<span class='formLabel'>Runtime</span> <input type=\\\"text\\\" size=4 name=\\\"duration\\\" value=\\\"\" . $movieinfo['duration'] . \"\\\" />\\n\";\n\t\tif( isset($movieinfo['moviedbruntime']) && $movieinfo['moviedbruntime'] != $movieinfo['duration']) \n\t\t\tprint \"(\" . $movieinfo['moviedbruntime'] . \")\";\n\n\n\t\tprint \"<br/><span class='formlabel' style=\\\"display:inline-block;\\\" title='Separate with /'>Genres</span><input size=50 type=\\\"text\\\" name=\\\"genres\\\" value=\\\"\" . \n\t\t\t\t\thtmlspecialchars($movieinfo['genres']) . \"\\\" />\\n\";\n\n\n\t\tprint \"<br/><span class='formlabel' style=\\\"display:inline-block;width:100px\\\">File Path</span><input size=50 type=\\\"text\\\" name=\\\"filepath\\\" value=\\\"\" . \n\t\t\t\t\t$movieinfo['filepath'] . \"\\\" />\\n\";\n\n\t\t\n\t\tprint \"<br/><div style=\\\"display:inline-block;padding:10px\\\">\";\n\t\tprint \"Overview<BR><textarea style=\\\"width:400px;height:200px\\\" name=\\\"overview\\\">\" .\n\t\t\t\t\thtmlspecialchars($movieinfo['overview']) . \n\t\t\t \"</textarea><br/>\\n\";\n\t\tprint \"</div>\";\n\n\t\tprint \"<div style=\\\"display:inline-block;padding:10px\\\">\";\n\t\tprint \"Cast<br/><textarea style=\\\"width:400px;height:200px\\\" name=\\\"actors\\\">\" .\n\t\t\t\t\thtmlspecialchars($movieinfo['actors']) . \n\t\t\t \"</textarea>\\n\";\n\t\tprint \"</div><br/>\";\n\n\t\tif (!empty($movieinfo['localdbid']))\n\t\t\tprint \"<input type=\\\"submit\\\" value=\\\"Save Changes\\\" />\\n\";\n\t\telse \n\t\t\tprint \"<input type=\\\"submit\\\" value=\\\"Add\\\" />\\n\";\n\n\n\t\tprint \"<br/>\";\n\n\t\tprint '<div class=\"message\">' . $message . '</div>';\n\t\t\n\t\tprint \"</div></div>\";\n\n\t\tob_flush();\n\t\tflush();\n\t\tprint \"<div class=\\\"thumbscroller\\\" style='padding:10px;'>\";\n\t\tprint \"<h1>Thumbnail</h1>\";\n\t\t$xmlthumbs = new SimpleXMLElement( \"<thumbs>\" . $movieinfo['allthumbs'] . \"</thumbs>\");\n\n\t\t$cnt = $xmlthumbs->thumb->count(); \n\t\t$found = false;\n\t\tfor( $i=0; $i<$cnt; $i++ ) {\n\t\t\t$url = $xmlthumbs->thumb[$i];\n\t\t\t\n\t\t\tprint \"<div style=\\\"float:left;margin:10px\\\"><label for=\\\"img\" . $i . \"\\\"><IMG height=\\\"256\\\" src=\\\"\" . $url . \"?api_key=\" . $API_KEY . \n\t\t\t \"\\\"/></label><BR>\";\n\t\t\tprint \"<input type=\\\"radio\\\" name=\\\"thumb\\\" id=\\\"img\" . $i . \"\\\" value=\\\"\" . urlencode($url) . \"\\\"\" ;\n\t\t\tif (isset($movieinfo['thumb']) && $url == $movieinfo['thumb']) {\n\t\t\t\tprint \" checked=checked\";\n\t\t\t\t$found = true;\n\t\t\t}\n\t\t\tprint \"/>&nbsp;Choose</div>\";\n\t\t}\n\t\tif (!$found && isset($movieinfo['localdbid'])) {\n\t\t\t//\n\t\t\t// display the current one on file.\n\t\t\t//\n\t\t\t$url = $REDIRECT_MEDIA_BASE . $movieinfo['localdbid'] . \".jpg\";\n\t\t\tprint \"<div style=\\\"float:left;margin:10px\\\"><label for=\\\"img\" . $i . \"\\\"><img height=\\\"256\\\" src=\\\"\" . $url . \"\\\"/></label><br>\";\n\t\t\tprint \"<input type=\\\"radio\\\" name=\\\"thumb\\\" id=\\\"img\" . $i . \"\\\" value=\\\"\\\"\" ;\n\t\t\tprint \"checked=checked />&nbsp;Choose</div>\";\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tprint \"<input type='hidden' name='allthumbs' value='\". urlencode($movieinfo['allthumbs']) . \"'/>\";\n\t\n\t\tprint \"</div></form>\";\t\n\t}", "private static function render_movie_card($movie) {\n ?>\n <div class=\"one-half column\" style=\"padding: 10px;border: 1px solid lightgray;\">\n <div class=\"one-full column\">\n <img style=\"float: left;height: 250px;width: 150px;margin-right: 20px;\" \n src=\"<?php echo $movie->getPosterURL(); ?>\" \n alt=\"<?php echo $movie->getTitle(); ?> Poster\"\n title=\"<?php echo $movie->getTitle(); ?> Poster\" />\n <p><b>\n <a href=\"MovieInfo.php?movieid=<?php echo $movie->getMovieID(); ?>\">\n <?php echo $movie->getTitle(); ?>\n </a>\n </b></p>\n <p><b>Runtime:</b> <?php echo $movie->getRuntime(); ?> minutes</p>\n <p><b>Genres:</b> <?php echo $movie->getGenres(); ?></p>\n <p><b>Rating:</b> <?php echo $movie->getRatingFormated(); ?><?php if($movie->getReviewNumber() > 1) echo ' ('.$movie->getReviewNumber().' Reviews)'; ?></p>\n <p><b>Cast:</b> <?php echo $movie->getCrew(); ?></p>\n </div>\n </div>\n <?php\n }", "public function setRegisteredMovieId(string $movieId): void;", "function movies_crew() {\n if (empty($this->crewsfilms)) $this->filmograf($this->crewsfilms,\"miscellaneousX20crew\");\n return $this->crewsfilms;\n }", "public function create()\n {\n // $movie = \\App\\models\\Movies::find(1);\n // $genre = \\App\\models\\Genres::find(1);\n // $movie->genres()->attach($genre);\n // return ;\n\n return view('control.movies.create');\n }", "public function edit(movie $movie)\n {\n //\n }", "public function edit(movie $movie)\n {\n //\n }", "public function __construct($movieDetails, $similarMovies)\n {\n $this->movieDetails = $movieDetails;\n $this->similarMovies = $similarMovies;\n // $this->reviews = $reviews;\n // $this->genres = $genres;\n }", "public function type_movie_list() {\n\n // Capa de Modelo, carga la data \n $data[\"types_movie\"] = $this->Type_movie->findAll();\n\n // Capa de la Vista\n $view['body'] = $this->load->view(\"core/types_movie/list\", $data, TRUE);\n $view['title'] = \"Listado de tipos de películas\";\n $this->parser->parse('core/templates/body', $view);\n }", "public function doMovieSearch()\n {\n if ( !preg_match( \"/^(.*)(19|20)[0-9]{2}/\", $this->Release, $matches ) )\n {\n $variables = array( 'status' => 'ko', 'message' => 'unable to extract the movie name' );\n }\n else\n {\n $movieTitle = $matches[1];\n\n $scraper = new MkvManagerScraperSubsynchro();\n $movies = array_map(\n function( $movie ) {\n $movie['id'] = str_replace( array( '/', '.' ), array( '|', '~' ), $movie['id'] );\n return $movie;\n },\n $scraper->searchMovies( $movieTitle )\n );\n\n $variables = array( 'status' => 'ok', 'movies' => $movies );\n }\n\n $result = new ezcMvcResult();\n $result->variables += $variables;\n\n return $result;\n }", "public static function addMovie()\n {\n // Instantiate Movie model\n $model = new Movie();\n\n // Get provided movie title and format as an associative array\n $movie = Request();\n\n // Insert data to movies table\n $model->movie_title = $movie['movie_title'];\n $model->movie_format = $movie['movie_format'];\n $model->save();\n\n // Define success_message to display on movies view\n $success_message = '<div class=\"alert alert-success margin-bottom-30\"><strong>Movie has been added successfully.</strong></div>';\n\n // Get updated list of movies to return with view\n self::getMovies();\n\n // Return list of movies and success message with movies view\n return view('movies', ['success_message' => $success_message], ['return_array' => self::$return_array]);\n }", "public function run()\n {\n $movies = \\App\\Movie::all();\n $genres = \\App\\Genre::get('id');\n\n foreach ($movies as $movie) {\n $movie->genres()->attach($genres->random(rand(3,5))->pluck('id'));\n }\n }", "public function movies()\n {\n return $this->morphedByMany('App\\Movie', 'source_genre');\n }", "public function get_collated_movie_list_with_details() {\n $movies = $this->movies;\n $error_messages = array();\n\n foreach ($this->movie_providers as $provider_name => $provider) {\n\n list($movies[$provider_name], $new_error_messages) = $this->cache_logic_get_movies_list_by_provider_keyed_by_name_and_year($provider_name);\n $error_messages = array_merge($error_messages, $new_error_messages);\n }\n\n foreach ($movies as $provider_name => $provider_movies) {\n foreach ($provider_movies as $name_and_year => $movie) {\n $id = $movie->ID;\n list($movie, $error_messages) = $this->cache_logic_get_movie_details_by_provider_and_id($provider_name, $id);\n $name_and_year = $movie->get_display_name();\n $movies[$provider_name][$name_and_year] = $movie;\n }\n }\n\n $all_movies = $this->collate_multiple_provider_movie_lists_by_name_and_year($movies);\n\n return $all_movies;\n }", "public static function render_movie_detail($movie, $review, $reviewMessage, $reviewMessageSeverity) {\n ?>\n <!-- Movie Infos Fields-->\n <div class=\"row\" style=\"margin-top: 30px\">\n <div class=\"one-full column\">\n <img style=\"float: left;height: 250px;width: 150px;margin-right: 20px;\" \n src=\"<?php echo $movie->getPosterURL(); ?>\"\n alt=\"<?php echo $movie->getTitle(); ?> Poster\"\n title=\"<?php echo $movie->getTitle(); ?> Poster\" />\n <h4>\n <?php echo $movie->getTitle(); ?> \n <a href=\"MovieInfo.php?movieid=<?php echo $movie->getMovieID(); ?>&action=edit\" class=\"button-primary u-pull-right\">Edit Movie</a>\n </h4> \n <p><b>Runtime:</b> <?php echo $movie->getRuntime(); ?> minutes</p>\n <p><b>Genres:</b> <?php echo $movie->getGenres(); ?></p>\n <p><b>Reviews:</b> <?php echo $movie->getReviewNumber(); ?></p>\n <p><b>Rating:</b> <?php echo $movie->getRatingFormated(); ?></p>\n </div> \n </div>\n <div class=\"row\" style=\"margin-top: 30px\"> \n <div class=\"one-full column\">\n <p><b>Directors:</b> <?php echo $movie->getDirectors(); ?></p>\n <p><b>Cast:</b> <?php echo $movie->getCrew(); ?></p>\n <p><b>Summary:</b> <?php echo $movie->getSummary(); ?></p>\n <p><b>Awards:</b> <?php echo $movie->getAwards(); ?></p>\n </div> \n </div>\n <!-- Current User's review on this movie -->\n <div class=\"row\" style=\"margin-top: 30px\"> \n <div class=\"one-full column\">\n <?php\n if($review->getRating() > 0) { // if user already reviewed this movie, show review\n ?> \n <form id=\"delete_review_form\" method=\"POST\" action=\"<?php echo $_SERVER['PHP_SELF']; ?>\">\n <b>Your Review: <?php echo $review->getRating(); ?> Stars.</b>\n <input type=\"hidden\" name=\"userID\" value=\"<?php echo $review->getUserID(); ?>\" >\n <input type=\"hidden\" name=\"movieID\" value=\"<?php echo $review->getMovieID(); ?>\" >\n <input type=\"hidden\" name=\"action\" value=\"delete_review\" >\n <a style=\"float:right;\" href=\"javascript:document.getElementById('delete_review_form').submit();\">Delete Review</a> \n </form>\n <p><?php echo $review->getReview(); ?></p> \n <?php\n } else { // if user haven't reviewed this movie, show form for user to leave a review\n ?> \n <div class=\"u-full-width\">\n <b>Leave a Review:</b>\n <form action=\"<?php echo $_SERVER[\"PHP_SELF\"]; ?>\" method=\"POST\">\n <input type=\"hidden\" name=\"userID\" value=\"<?php echo $review->getUserID(); ?>\" >\n <input type=\"hidden\" name=\"movieID\" value=\"<?php echo $review->getMovieID(); ?>\" >\n <input type=\"hidden\" name=\"action\" value=\"review\" >\n <div class=\"u-full-width\">\n <b>Rating: </b>\n <input type=\"radio\" name=\"rating\" value=\"1\" style=\"margin-left: 20px;\"> 1\n <input type=\"radio\" name=\"rating\" value=\"2\" style=\"margin-left: 20px;\"> 2\n <input type=\"radio\" name=\"rating\" value=\"3\" style=\"margin-left: 20px;\" checked> 3\n <input type=\"radio\" name=\"rating\" value=\"4\" style=\"margin-left: 20px;\"> 4\n <input type=\"radio\" name=\"rating\" value=\"5\" style=\"margin-left: 20px;\"> 5\n </div>\n <div class=\"u-full-width\">\n <label for=\"review\">Review: </label>\n \n <textarea rows = \"10\" cols = \"50\" class=\"u-full-width\" name=\"review\"></textarea>\n </div>\n <div class=\"u-full-width\">\n <input class=\"button-primary u-pull-right\" type=\"submit\" value=\"Leave Review\">\n </div>\n </form>\n </div>\n <?php\n }\n ?>\n </div> \n </div>\n <?php\n // If there is a message for review form, show here\n if($reviewMessage != null && $reviewMessage != \"\") {\n self::messagearea($reviewMessage, $reviewMessageSeverity);\n }\n ?>\n <?php\n }", "public function edit(Movie $movie)\n {\n //\n }", "public function edit(Movie $movie)\n {\n //\n }", "public function edit(Movie $movie)\n {\n //\n }", "public function edit(Movie $movie)\n {\n //\n }", "public function edit(Movie $movie)\n {\n //\n }", "public function listmovies() {\n $movies = Movie::all();\n require_once('view/admin/movie/listmovies.php');\n }", "public function showMovies($movie_array) {\r\n\t\tif (!empty($movie_array)) {\r\n\t\t\tforeach ($movie_array as $movie) {\r\n\t\t\t\t$this->printMovieInHtml($movie);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static public function fillFirms()\n {\n $params = [\n 'vehicle_model_types' => [0, 1, 2],\n 'avail_only' => false\n ];\n\n $res = json_decode(self::get('/v2/company', $params));\n Log::info('fillFirms res =' . print_r($res, 1));\n\n foreach ($res->companies as $firmInfo) {\n $firm = Firms::firstOrNew(['title' => $firmInfo->company_name]);\n\n $firm->title = mb_strtolower($firmInfo->company_name);\n $firm->id = $firmInfo->company_id;\n //dd($firm);\n $firm->save();\n }\n }", "public function run()\n {\n $film = array(\n array(\n 'name' => 'Tangled',\n 'description' => 'Rapunzel, an innocent, young girl, is locked up by her overly protective mother. Her wish to escape into the world outside finally comes true when she meets the good-hearted thief, Flynn.',\n 'release_date' => '2011-01-21',\n 'rating' => '3',\n 'ticket_price' => '20.0',\n 'country' => 'United States of America',\n 'photo' => 'test',\n 'slug' => 'tangled',\n 'created_by' => '1',\n 'created_at' => Carbon::now(),\n 'updated_by' => 1,\n 'updated_at' => Carbon::now()\n ),\n array(\n 'name' => 'Wonder',\n 'description' => 'WONDER tells the incredibly inspiring and heartwarming story of August Pullman, a boy with facial differences.',\n 'release_date' => '2017-11-14',\n 'rating' => '4',\n 'ticket_price' => '22.50',\n 'country' => 'United States of America',\n 'photo' => 'test',\n 'slug' => 'wonder',\n 'created_by' => '1',\n 'created_at' => Carbon::now(),\n 'updated_by' => 1,\n 'updated_at' => Carbon::now()\n ),\n array(\n 'name' => 'Titanic',\n 'description' => 'Seventeen-year-old Rose hails from an aristocratic family and is set to be married. When she boards the Titanic, she meets Jack Dawson, an artist, and falls in love with him.',\n 'release_date' => '1997-11-18',\n 'rating' => '3',\n 'ticket_price' => '12.50',\n 'country' => 'United States of America',\n 'photo' => 'test',\n 'slug' => 'titanic',\n 'created_by' => '1',\n 'created_at' => Carbon::now(),\n 'updated_by' => 1,\n 'updated_at' => Carbon::now()\n )\n );\n DB::table('films')->insert($film);\n }", "public function setVideoMovie($attributes = []);", "function testMovie2(): void\n {\n // https://www.imdb.com/title/tt0481536/\n\n Global $config;\n $config['http_header_accept_language'] = 'en-US,en;q=0.9';\n\n $id = '0481536';\n $data = engineGetData($id, 'imdb', false);\n $this->assertNotEmpty($data);\n\n // $this->printData($data);\n\n $this->assertNotContains('istv', $data);\n $this->assertMatchesRegularExpression('/After being mistaken for terrorists and thrown into Guantánamo Bay, stoners Harold and Kumar escape and return to the U.S./', $data['plot']);\n }", "public function modify($id){\n if($_SESSION['user'] == null || $_SESSION['user']->getIdRol() != 1){\n header(\"HTTP/1.1 403\"); \n return;\n }\n\n $genres = $this->genreDaos->getAll(); \n $years = array_column($this->movieDaos->getMoviesYear(),'year');\n $cinemas = $this->cinemaDaos->getAllWithRooms();\n \n //check if form was sent\n if(isset($_POST['movieId'], $_POST['roomId'], $_POST['time'], $_POST['cinemaId'])){\n $idMovie = $_POST['movieId'];\n $date = $_POST['time'];\n $idRoom = $_POST['roomId'];\n $idCinema = $_POST['cinemaId'];\n \n $show = new Show($idMovie, $idRoom, $date);\n $show->setId($_POST['id']);\n $cinema = $this->cinemaDaos->getById($idCinema);\n $room = $this->roomDaos->getById($idRoom);\n\n //check for empty fields\n if ($idMovie == null){\n $error = 'Por favor, seleccione una película';\n require_once(VIEWS_PATH . \"header.php\");\n require_once(VIEWS_PATH . \"addShow.php\");\n require_once(VIEWS_PATH . \"footer.php\");\n \n } else {\n //modify show in db\n $this->showDaos->modify($show);\n //back to index\n $this->index();\n\n }\n } else {\n \n //get show, cinema and room from id\n $show = $this->showDaos->getById($id);\n $room = $this->roomDaos->getById($show->getIdRoom());\n $cinemaShow = $this->cinemaDaos->getById($room->getIdCinema());\n \n\n $date = $show->getDatetime();\n\n //php to html date format\n $date = str_replace(' ', 'T', $date);\n \n //show not found\n if(empty($show)){\n $this->index();\n return;\n }\n \n require_once(VIEWS_PATH . \"header.php\");\n require_once(VIEWS_PATH . \"addShow.php\");\n require_once(VIEWS_PATH . \"footer.php\");\n }\n\n }", "function gatherMovieInfoFromLocal( $db, $localdbid ) \n\t{\n\t\t$movie = $db->querySingle($select = \"SELECT * FROM movieview WHERE idMovie='\" . $localdbid . \"'\", true);\n\n\t\t$movieinfo['localdbid'] = $localdbid;\n\t\tif ($movie)\n\t\t{\n\t\t\t$movieinfo['filepath'] = $movie['strPath'] . $movie['strFileName'];\n\t\t\t$movieinfo['duration'] = $movie['c11'];\n\t\t\t$movieinfo['title'] = $movie['c00'];\n\t\t\t$movieinfo['imdbid'] = $movie['c09'];\n\t\t\t$movieinfo['original_title'] = $movie['c16'];\n\t\t\t$movieinfo['year'] = $movie['c07'];\n\t\t\t$movieinfo['mpaa'] = $movie['c12'];\n\t\t\t$movieinfo['director'] = $movie['c15'];\n\t\t\t$movieinfo['writers'] = $movie['c06'];\n\t\t\t$movieinfo['tagline'] = $movie['c03'];\n\t\t\t$movieinfo['genres'] = $movie['c14'];\n\t\t\t$movieinfo['overview'] = $movie['c01'];\n\t\t\t$movieinfo['plot'] = $movie['c02'];\n\t\t\t$movieinfo['allthumbs'] = $movie['c08'];\n\t\t\t\n\n\t\t\tif (preg_match('/\\<thumb\\>(?P<thumb>.*)\\<\\/thumb\\>/', $movieinfo['allthumbs'], $matches)) {\n\t\t\t\t$movieinfo['thumb'] = $matches['thumb'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$movieinfo['thumb'] = '';\n\t\t\t}\n\t\n\t\t\t$actors = $db->query(\"SELECT * FROM actorlinkmovie JOIN actors ON actorlinkmovie.idActor=actors.idActor WHERE idMovie='\" . $localdbid . \"'\");\n\t\t\t$movieinfo['actors'] = \"\";\n\t\t\twhile ($actor = $actors->fetchArray()) {\n\t\t\t\tif (!empty($movieinfo['actors'] )) $movieinfo['actors'] .= \" /\\n\";\n\t\t\t\t$movieinfo['actors'] .= $actor['strActor'] . \" AS \" . $actor['strRole'];\n\t\t\t}\n\t\t\t$actors->finalize();\n\t\t}\n\n\n\t\treturn $movieinfo;\n\t}", "public function updateMovie($data) {\n\n\t\t$this->dbAdapter->dbOpen();\n\t\t// var_dump($data);\n\t\t$this->dbAdapter->updateMovie($data);\n\t\t$this->dbAdapter->dbClose();\n\t\t$this->error = $this->dbAdapter->lastError();\n\t\t\n\t}", "function testLoadMetadata() {\n $v = $this->loadMovie(\"FakeMovie1/FakeMovie1.mp4\");\n $v->loadMetadata(true);\n\n $this->assertEqual($v->title, \"Fake Movie 1\");\n $this->assertEqual($v->plot, \"This is the plot for the fake movie 1.\");\n $this->assertEqual($v->year, \"1992-11-25\");\n $this->assertEqual($v->mpaa, \"PG\");\n $this->assertEqual(count($v->actorList), 3);\n\n $v = $this->loadMovie(\"BarrenMovie/BarrenMovie.mp4\");\n $this->assertEqual($v->title, \"BarrenMovie\");\n $this->assertEqual($v->plot, \"\");\n $this->assertEqual($v->year, \"\");\n $this->assertEqual($v->mpaa, \"N/A\");\n $this->assertEqual(count($v->actorList), 0);\n }", "function display_movie_meta_box( $movie ) {\n\t$movie_rating = intval( get_post_meta( $movie->ID, 'movie_rating', true ) );\n\t$movie_year = esc_html( get_post_meta( $movie->ID, 'movie_year', true ) );\n\t?>\n\t<table>\n\t\t<tr>\n\t\t\t<td style=\"width: 100%\">Movie Year </td>\n\t\t\t<td><input type=\"text\" size=\"80\" name=\"movie_year\" value=\"<?php echo $movie_year; ?>\" /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style=\"width: 150px\">Movie Rating</td>\n\t\t\t<td>\n\t\t\t\t<select style=\"width: 100px\" name=\"movie_rating\">\n\t\t\t\t<?php\n\t\t\t\t\tfor ( $rating = 5; $rating >= 1; $rating -- ) {\n\t\t\t\t?>\n\t\t\t\t\t<option value=\"<?php echo $rating; ?>\" <?php echo selected( $rating, $movie_rating ); ?>>\n\t\t\t\t<?php echo $rating; ?> stars <?php } ?>\n\t\t\t\t</select>\n\t\t\t</td>\n\t\t\t</tr>\n\t</table>\n<?php\n\t}", "public function moviesAndSeriesByGenre() {\n $model = $this->model;\n $request = $this->request;\n $genre = $this->getAndSetCache(\n \\CacheVars::NAMESPACE_PAGE,\n \\CacheVars::KEY_MOVIES_DATA . \"_by_genre_{$this->request->genre}\",\n function() use($model, $request) {\n return $model->getByGenre($request->genre);\n }\n );\n\n if (count($genre[\"movie\"]) + count($genre[\"serie\"]) > 0) {\n $this->view->addParameter(\"movies\", $genre[\"movie\"]);\n $this->view->addParameter(\"series\", $genre[\"serie\"]);\n } else {\n $this->view->addParameter(\"error\", \"Nothing found :/\");\n }\n }", "public function findAll() {\n $sql = \"select * from movie order by mov_title\";\n $result = $this->getDb()->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $movies = array();\n foreach ($result as $row) {\n $movieId = $row['mov_id'];\n $movies[$movieId] = $this->buildDomainObject($row);\n }\n return $movies;\n }", "public function GetMovie($id)\n {\n try \n { \n $query = \"SELECT * FROM \" . $this->tableName . \" where id=$id;\";\n $this->connection = Connection::GetInstance();\n $resultSet = $this->connection->Execute($query);\n\n $movie = new Movie();\n \n foreach ($resultSet as $row) {\n $movie->setId($row[\"id\"]);\n $movie->setAdult($row[\"adult\"]);\n $movie->setName($row[\"movieName\"]);\n $movie->setSummary($row[\"summary\"]);\n $movie->setLanguage($row[\"movieLanguage\"]);\n $movie->setImage($row[\"dir_image\"]);\n $movie->setReleaseDate($row[\"releaseDate\"]);\n $arrayGenres = $this->MoviesxGenresDAO->GetGenresByMovieId($id);\n $aux = array();\n foreach($arrayGenres as $genreId)\n {\n array_push($aux, $genreId[\"idGenre\"]);\n }\n $movie->setGenres($aux);\n $movie->setRuntime($row[\"runtime\"]);\n // $movie->setPlayingNow($row[\"playingNow\"]);\n }\n \n } catch (Exception $ex) {\n throw $ex;\n } \n\n return $movie;\n }", "private function pc()\n {\n // 動画フォルダデータを取得する。\n $total = $this->MovieFolder->getAllMovieFolderData($this->userInfo['user_seq']);\n // 0件なら初期フォルダを登録する。\n if (count($total) == 0) {\n // フォルダIDを生成する。\n $movieFolderTbl = TableRegistry::get('MovieFolder');\n $nextId = $movieFolderTbl->selectNextId($this->userInfo['user_seq']);\n // 初期フォルダ生成\n $this->MovieFolder->insertFolderData($nextId, $this->userInfo['user_seq']);\n // 動画フォルダデータを再取得する。\n $total = $this->MovieFolder->getAllMovieFolderData($this->userInfo['user_seq']);\n }\n $modify = array();\n for ($i = 0; $i < count($total); $i++) {\n $openFlg = false;\n $movieTbl = TableRegistry::get('MovieContents');\n $movieContents = $movieTbl->getContentsByMovie($this->userInfo['user_seq'], $total[$i]['movie_folder_id']);\n $openStatusTbl = TableRegistry::get('OpenStatus');\n $openStatusFolder = $openStatusTbl->getAllOrderByOpenStatus($this->userInfo['user_seq'], $total[$i]['movie_folder_id'], '4');\n //ステータス設定\n if (count($openStatusFolder) > 0) {\n $openFlg = true;\n }\n if (count($movieContents) != 0 && $openFlg == false) {\n for ($j = 0; $j < count($movieContents); $j++) {\n $openStatusMovie = $openStatusTbl->getAllOrderByOpenStatus($this->userInfo['user_seq'], $movieContents[$j]['movie_contents_id'], '5');\n if (count($openStatusMovie) > 0) {\n $openFlg = true;\n break;\n }\n }\n }\n $moviePreviewData = $this->PageControl->pageCtl(null, $movieContents, 5);\n $data = $moviePreviewData['show_data'];\n $modify[$total[$i]['movie_folder_id']]['movie'] = $data;\n $total[$i]['open_status'] = $openFlg;\n }\n\n $this->set(\"contents\", $modify);\n $this->set('movieFolderList', $total);\n }", "public function create()\n {\n //load new movie form\n $genres = DB::table('genres')->orderBy('description')->get();\n return view('movies.create',['genres'=>$genres]);\n }", "public function run()\n {\n\n \t$movies = Movies::get();\n\n \tforeach ($movies as $movie) {\n\n \t$path = 'https://api.themoviedb.org/3/movie/'. $movie->id .'/credits?api_key=3d666046197bc35f402080e836eaaa66';\n\n $json = json_decode(file_get_contents($path), true);\n\n\n\n foreach ($json['cast'] as $seedas) {\n\n\t\t$actorPath = 'https://api.themoviedb.org/3/person/'. $seedas['id'] .'?api_key=3d666046197bc35f402080e836eaaa66';\n $actorJson = json_decode(file_get_contents($actorPath), true);\n\n if (empty($actorJson['birthday'])) {\n \t$birthday = '0000-00-00';\n } else {\n \t$birthday = $actorJson['birthday'];\n }\n\n if (empty($actorJson['deathday'])) {\n \t$deathday = '0000-00-00';\n } else {\n \t$deathday = $actorJson['deathday'];\n }\n\n DB::table('actors')->insert([\n \t'name' => $actorJson['name'],\n \t'bithday' => $birthday,\n \t'deathday' => $deathday,\n \t'user_id' => '2',\n \t'actor_api_id' => $seedas['id']\n ]);\n }\n }\n }", "public function run()\n {\n DB::table('movies')->insert([\n ['title' => 'Goblin', 'genre_id' => 1, 'photo' => 'Goblin', 'description' => 'Kim Shin (Gong Yoo) is a decorated military general during the Goryeo Dynasty who is betrayed by the jealous king he served. When Kim Shin is faced with death instead of honor after fighting a mighty battle, God turns Kim Shin into a goblin instead, tasked with protecting certain people from a life of misery.', 'rating' => 5],\n ['title' => 'Oh My Venus', 'genre_id' => 1, 'photo' => 'Venus', 'description' => 'Young-ho is a personal trainer of Hollywood stars in America where he uses the alias John Kim. After a Hollywood scandal with a famous actress puts the spotlight on him, Young-ho returns to Korea to wait for the scandal to die down. On the plane back to Korea, Young-ho saves Kang Joo-eun after she suddenly collapses.', 'rating' => 4.5],\n ['title' => 'Cheese in the Trap', 'genre_id' => 1, 'photo' => 'Cheese', 'description' => 'The drama focuses on the life and relationships of a group of university students, particularly the difficult relationship between hard-working scholarship student Hong Seol (Kim Go-eun) and her deceptively kind senior, Yoo Jung (Park Hae-jin).', 'rating' => 3.5],\n ['title' => 'The K2', 'genre_id' => 1, 'photo' => 'K2', 'description' => 'The K2 tells the story of a bodyguard (Ji Chang Wook) who is dedicated to his country but is betrayed by it. When seeking revenge, he becomes involved with a woman (Yoona) who is the secret daughter of a presidential candidate.', 'rating' => 4],\n ['title' => \"It's Okay to Not Be Okay\", 'genre_id' => 1, 'photo' => 'Okay', 'description' => \"Moon Gang-tae (Kim Soo-hyun) lives with his autistic older brother Moon Sang-tae (Oh Jung-se). They frequently moves from town to town, ever since Sang-tae witnessed their mother's murder. Gang-Tae takes up jobs as a caretaker in a psychiatric ward at every place they settle in. While working in a hospital, he meets a famous children's book writer Ko Moon-young (Seo Ye-ji),who some people suggest has antisocial personality disorder.\", 'rating' => 4.9],\n ['title' => 'Masha and the Bear', 'genre_id' => 2, 'photo' => 'Masha', 'description' => 'The show focuses on the adventures of a little girl named Masha and a fatherly bear that always keeps her safe from disasters.', 'rating' => 5],\n ['title' => 'Oggy and the Cockroaches', 'genre_id' => 2, 'photo' => 'Oggy', 'description' => 'Oggy, an anthropomorphic cat, would prefer to spend his days watching television and eating, but is continuously pestered by three roaches: Joey, Marky and Dee Dee.', 'rating' => 4],\n ['title' => 'Bernard', 'genre_id' => 2, 'photo' => 'Bernard', 'description' => 'The show centers on a curious polar bear named Bernard, whose bumbling slapstick antics and clumsiness typically result in the bear being knocked unconscious or being severely injured by the end of an episode, Bernard almost does not speak, but he does communicate through guttural sounds.', 'rating' => 5],\n ['title' => 'Tom and Jerry', 'genre_id' => 2, 'photo' => 'Tom', 'description' => 'Series of comedy short films created in 1940 by William Hanna and Joseph Barbera. Best known for its 161 theatrical short films by Metro-Goldwyn-Mayer, the series centers on the rivalry between the titular characters of a cat named Tom and a mouse named Jerry.', 'rating' => 5],\n ['title' => 'Smallville', 'genre_id' => 3, 'photo' => 'Smallville', 'description' => 'A young Clark Kent struggles to find his place in the world as he learns to harness his alien powers for good and deals with the typical troubles of teenage life in Smallville, Kansas.', 'rating' => 3],\n ['title' => 'Arrow', 'genre_id' => 3, 'photo' => 'Arrow', 'description' => 'Arrow follows billionaire playboy Oliver Queen (Stephen Amell), who claimed to have spent five years shipwrecked on Lian Yu, a mysterious island in the North China Sea, before returning home to Starling City (later renamed \"Star City\") to fight crime and corruption as a secret vigilante whose weapon of choice is a bow and arrow.', 'rating' => 5],\n ['title' => 'Friends', 'genre_id' => 3, 'photo' => 'Friends', 'description' => 'Ross Geller, Rachel Green, Monica Geller, Joey Tribbiani, Chandler Bing, and Phoebe Buffay are six 20 something year olds living in New York City. Over the course of 10 years, these friends go through family, love, drama, friendship, and comedy.', 'rating' => 5],\n ['title' => 'Daredevil', 'genre_id' => 3, 'photo' => 'Daredevil', 'description' => 'A blind lawyer by day, vigilante by night. Matt Murdock fights the crime of New York as Daredevil.', 'rating' => 4.3]\n ]);\n }", "public function getAll() {\n\t\t$sql = <<<SQL\nselect * from $this->tableName\norder by rating desc, title asc\nSQL;\n\n\t\t$stmt = $this->pdo()->prepare($sql);\n\t\t$stmt->execute();\n\n\t\t$movies = array();\n\t\tforeach($stmt as $row) {\n\t\t\t$movies[] = new Movie($row);\n\t\t}\n\n\t\treturn $movies;\n\t}", "public function parts(){\n\t\t$parts = array();\n\t\tforeach($this->data['parts'] as $index => $part){\n\t\t\t$parts[$part->id] = new Movie($part->id);\n\t\t}\n\t\treturn $parts;\n\t}", "public function index(Movie $movie)\n {\n $fractal = new Manager();\n $resource = new Collection($movie->actors, function ($x) {\n return [\n 'id' => $x->id,\n 'actor_name' => $x->name,\n 'character_name' => $x->pivot->character_name,\n ];\n\n });\n return response($fractal->createData($resource)->toJson(), 200);\n }", "public static function getMovies()\n {\n // Instantiate Movie model\n $model = new Movie();\n\n // Get all movies from table\n self::$return_array['movies'] = $model::orderby('movie_title', 'asc')->get();\n\n // Return movies view with list of all movies\n return view('movies', ['return_array' => self::$return_array]);\n }", "public function Step4($modernLanguagesFlipped) {\n if (isset($_POST['imdbid']) && is_numeric($_POST['imdbid'])) {\n $movie = new imdb($_POST['imdbid']);\n $movie->setid($_POST['imdbid']);\n \n $db = new MDB();\n \n $cast = $movie->cast();\n $i = 0;\n \n // Insert all castmemebers\n while(list($key, $value) = each($cast)) {\n $db->insertCast($_POST['imdbid'], $value['imdb'], AddMovie::utf8ify($value['name']), ++$i);\n \n if ($i > MAXNAMES)\n break;\n }\n \n $directors = $movie->director();\n $writers = $movie->writing();\n $producers = $movie->producer();\n \n $crew = array_merge($directors, $writers, $producers);\n $i = 0;\n \n // Insert all crewmemebers\n while(list($key, $value) = each($crew)) {\n $db->insertCrew($_POST['imdbid'], $value['imdb'], AddMovie::utf8ify($value['name']), ++$i);\n \n if ($i > MAXNAMES)\n break;\n }\n \n $genres = implode(',', $movie->genres());\n $year = $movie->year();\n $runtime = $movie->runtime();\n \n if ($runtime == null) {\n $runtime = 1;\n if (isset($_POST['runtime']) && is_numeric($_POST['runtime']))\n $runtime = $_POST['runtime'];\n }\n \n $title = AddMovie::utf8ify($movie->title());\n $aka = $movie->alsoknow();\n $englishTitle = '';\n $rating = 1;\n \n if (is_numeric($_POST['rating']))\n $rating = $_POST['rating'];\n \n if ($_POST['english-title'] != 'none') {\n $englishTitle = AddMovie::utf8ify($aka[$_POST['english-title']]['title']);\n $englishTitle = substr($englishTitle, 1, strrpos($englishTitle, '\"') - 1);\n }\n \n $language = 'en';\n if (strlen($_POST['language']) == 2)\n $language = $_POST['language'];\n \n $success = $db->insertMovie($_POST['imdbid'], $title, $englishTitle, $language, $genres, $year, $runtime, $rating);\n \n if ($success)\n header('Location: ./?message=add-success');\n else\n header('Location: ./?message=add-error');\n exit();\n }\n else\n AddMovie::Step1('invalid-id');\n }", "public static function Movies() {\n //en el cual selecionamos la tabla movies\n //hacemos un join q nos diga q la tabla genres.id de la tabla genres sea igual a el movies.genre_id de la tabla movies\n //despues q nos selecione todos los campos de la tabla movies y de la tabla genres su genres.genre\n //y por ultimos q nos obtenga la consulta\n return DB::table(\"movies\")\n ->join(\"genres\", \"genres.id\", \"=\", \"movies.genre_id\")\n ->select(\"movies.*\", \"genres.genre\")\n ->get();\n }", "public function createDemoAction()\n\t{\n\t\t// First, reset the previous demo movies\n\t\t$this->resetDemoAction();\n\t\t\n\t\t// Second, add new ones\n\t\t$this->createOrderStatusesAction();\n\n\t\t$em = $this->getDoctrine()->getManager();\n\t\tforeach ($this->demo_movie_list as list($title, $genre_list, $description, $actors, $coverArt, $videoUri, $price)) \n\t\t{\n\t\t\t$movie = new Movie();\n\t\t\t$movie->setTitle($title);\n\t\t\t$movie->setDescription($description);\n\t\t\t$movie->setActors($actors);\n\t\t\t$movie->setCoverArt($coverArt);\n\t\t\t$movie->setVideoUri($videoUri);\n\t\t\t$movie->setPrice((float)$price);\n\t\t\t$em->persist($movie);\n\t\t\t\t\n\t\t\tforeach ($genre_list as $gname)\n\t\t\t{\n\t\t\t\t$genre = $em->getRepository('UekMovieBundle:Genre')->findOneByName($gname);\n\t\t\t\tif ($genre == null)\n\t\t\t\t{\n\t\t\t\t\t$genre = new Genre();\n\t\t\t\t\t$genre->setName($gname);\n\t\t\t\t\t$em->persist($genre);\n\t\t\t\t\t$em->flush();\n\t\t\t\t}\n\n\t\t\t\t$movie->addGenre($genre);\n\t\t\t}\n\t\t}\n\n\t\t$em->flush();\n\t\t\n\t\tif ($this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) \n\t\t{\n\t\t\t$movies = $em->getRepository('UekMovieBundle:Movie')->findAll();\n\t\t\tforeach ($movies as $movie)\n\t\t\t{\n\t\t\t\tif (rand(0, 1) == 1)\n\t\t\t\t{\n\t\t\t\t\t$this->addReviewAction($movie->getId());\n\t\t\t\t}\n\t\t\t\tif (rand(0, 2) == 1)\n\t\t\t\t{\n\t\t\t\t\t$this->addOrderAction($movie->getId());\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$this->addPaidOrderAction($movie->getId());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->redirect($this->generateUrl('uek_homepage'));\n\t}", "public function run()\n {\n $filmData = [\n [\n \"name\" => \"The Conjuring\",\n \"slug\" => \\Str::slug(\"The Conjuring\"),\n \"description\" => \"The Warrens investigate a murder that may be linked to a demonic possession.\",\n \"country\" => \"USA\",\n \"cover_image\" => \"https://m.media-amazon.com/images/M/MV5BNmE3Njc4OTktM2M3NC00Y2RlLWFmZDEtODNiZDQ4NGE5OTE2XkEyXkFqcGdeQXVyMTA3MDk2NDg2.V1_SY500_CR10,40,340,500.jpg\",\n \"release_date\" => \"2021-06-04\",\n \"rating\" => rand(1,5),\n \"ticket_price\" => '580.00'\n ],\n [\n \"name\" => \"Triumph\",\n \"slug\" => \\Str::slug(\"Triumph\"),\n \"description\" => \"Inspired by a real story, a determined high school senior strives to be a wrestler one last time despite having cerebral palsy and goes to extreme lengths, crushing obstacles and inspiring others along his journey to prove his abilities.\",\n \"country\" => \"USA\",\n \"cover_image\" => \"https://m.media-amazon.com/images/M/MV5BNzFjZjEyZTEtZGI2Yi00ZWE5LWI5MmUtNWFiMGJiYmYxYzU4XkEyXkFqcGdeQXVyMTY5NTkwNDk@.V1_SY500_CR10,40,340,500.jpg\",\n \"release_date\" => \"2021-04-30\",\n \"rating\" => rand(1,5),\n \"ticket_price\" => '550.00'\n ],\n [\n \"name\" => \"Buckskin\",\n \"slug\" => \\Str::slug(\"Buckskin\"),\n \"description\" => \"Set in 1820, a Texan fur trapper journeys into the mysterious Buckskin woods in the hopes of saving a lost young boy.\t\",\n \"country\" => \"USA\",\n \"cover_image\" => \"https://m.media-amazon.com/images/M/MV5BNDEzMjk5ZDAtNzFhMC00MTAyLWFhYzMtZDg1Mjk4NDlkZWIxXkEyXkFqcGdeQXVyNDAxOTQxMjk@.V1_SY500_CR10,40,340,500.jpg\",\n \"release_date\" => \"2021-06-11\",\n \"rating\" => rand(1,5),\n \"ticket_price\" => '500.00'\n ],\n [\n \"name\" => \"Rogue Hostage\",\n \"slug\" => \\Str::slug(\"Rogue Hostage\"),\n \"description\" => \"Single father and former Marine Kyle Snowden, on a routine stop for his job in Child Protective Services, Kyle finds himself and a group of innocent customers trapped inside his stepfather's store.\",\n \"country\" => \"USA\",\n \"cover_image\" => \"https://m.media-amazon.com/images/M/MV5BMDY0YjVhMjMtY2U4Yy00NjNkLTlmMzYtMmVmYTA4M2IzOTAzXkEyXkFqcGdeQXVyMTEyNDk3MjY3.V1_SY500_CR10,40,340,500.jpg\",\n \"release_date\" => \"2021-06-11\",\n \"rating\" => rand(1,5),\n \"ticket_price\" => '510.00'\n ],\n [\n \"name\" => \"Infinite\",\n \"slug\" => \\Str::slug(\"Infinite\"),\n \"description\" => \"A sci-fi, action adaption that examines the concept of reincarnation through remarkable visuals and well-established characters who need to use their memories and past learnt skills to ensure the future is protected from Infinites that seek to end all life on the planet.\",\n \"country\" => \"USA\",\n \"cover_image\" => \"https://m.media-amazon.com/images/M/MV5BZTU5MmY0ZjctYTNlOS00MDIyLWJkZTAtNzBiOTkyNWI5MGY2XkEyXkFqcGdeQXVyNTc4MjczMTM@.V1_SY500_CR10,40,340,500.jpg\",\n \"release_date\" => \"2021-06-10\",\n \"rating\" => rand(1,5),\n \"ticket_price\" => '510.00'\n ]\n ];\n\n \\DB::table(\"films\")->insert($filmData);\n }", "public function GetAll()\n {\n try {\n $movieList = array();\n $query = \"SELECT * FROM \" . $this->tableName . \";\";\n $this->connection = Connection::GetInstance();\n $resultSet = $this->connection->Execute($query);\n\n foreach ($resultSet as $row) {\n $movie = new Movie();\n $movie->setId($row[\"id\"]);\n $movie->setName($row[\"movieName\"]);\n $movie->setSummary($row[\"summary\"]);\n $movie->setLanguage($row[\"movieLanguage\"]);\n $movie->setImage($row[\"dir_image\"]);\n $movie->setReleaseDate($row[\"releaseDate\"]);\n //$movie->setGenres($this->GetGenres($row[\"id_movie_api\"]));\n $movie->setRuntime($row[\"runtime\"]);\n array_push($movieList, $movie);\n }\n return $movieList;\n\n } catch (Exception $ex) {\n throw $ex;\n }\n }", "function moviePage( $title ) {\n\n if ((isset ($title))){\n // $id_checked = (int)($id);\n $media = Movie::displayMovie($title);\n require_once(\"view/movieView.php\");\n }\n}", "public function getDetails($id) {\n $return = null;\n $actor = DB::table('actors')->where('id', $id)->first();\n\n $otherMovies = DB::table('actors')\n ->join('movie_actor', 'actors.id', '=', 'movie_actor.actor_id')\n ->join('movies', 'movie_actor.movie_id', '=', 'movies.id')\n ->where('actors.id', $id)\n ->select('movies.id', 'movies.title')\n ->get();\n\n $budget = DB::table('actors')\n ->join('movie_actor', 'actors.id', '=', 'movie_actor.actor_id')\n ->join('movies', 'movie_actor.movie_id', '=', 'movies.id')\n ->where('actors.id', $id)\n ->select('movies.id', 'movies.title', 'movies.budget')\n ->orderBy('movies.budget', 'desc')\n ->limit(1)\n ->first();\n\n $gross = DB::table('actors')\n ->join('movie_actor', 'actors.id', '=', 'movie_actor.actor_id')\n ->join('movies', 'movie_actor.movie_id', '=', 'movies.id')\n ->where('actors.id', $id)\n ->select('movies.id', 'movies.title', 'movies.gross')\n ->orderBy('movies.gross', 'desc')\n ->limit(1)\n ->first();\n\n $return['db_movies'] = $otherMovies;\n $return['biggest_budget'] = $budget;\n $return['biggest_gross'] = $gross;\n $return['details'] = $actor;\n return json_encode($return);\n }", "function CreateMovie($param) {\n $c = new MoviesModel($param);\n if($c->getName() != 'null' & $c->getd_id() != 'null'){\n $column=\"name, d_id\";\n $values=\":name, :d_id\";\n $execute = array(\n \"name\"=> $c->getName(),\n \"d_id\"=> $c->getd_id());\n $update = $this->db->create_new_row($this->table_name, $column, $values, $execute);\n return $this->checkIsWasGood($update);\n }else{\n return \"d_id is \" . $c->getd_id() . \"name is \" . $c->getName();\n }\n }", "public function run()\n {\n DB::table('movies')->insert([\n \n [\n 'genre_id' => '1',\n 'title' => 'Who Are You: School 2015',\n 'photo' => 'photo/whoareyou.jpg',\n 'description' => 'After losing her memory in an accident, a bullied high school orphan finds herself in the place of an identical-looking girl who\\'s gone missing.',\n 'rating' => '81', \n ],\n [\n 'genre_id' => '1',\n 'title' => 'Crash Landing On You',\n 'photo' => 'photo/cloy.jpg',\n 'description' => 'A paragliding mishap drops a South Korean heiress in North Korea -- and into the life of an army officer, who decides he will help her hide.',\n 'rating' => '87', \n ],\n [\n 'genre_id' => '1',\n 'title' => 'Oh My Ghost',\n 'photo' => 'photo/ohmyghost.jpg',\n 'description' => 'Na Bong Sun may be a skilled sous chef, but she lacks the self-esteem to shine professionally and socially. Beyond her cooking talents, however, is an uncanny ability to communicate with ghosts. One day, her mystic senses go out of control when the seductive ghost of Shin Soon Ae possesses her. Imbued with a fiery new \"personality,\" Bong Sun starts turning heads, including that of Kang Sun Woo, the hottest chef in town and Bong Sun\\'s secret crush!',\n 'rating' => '82', \n ],\n \n \n [\n 'genre_id' => '1',\n 'title' => 'Secret Garden',\n 'photo' => 'photo/secretgarden.jpg',\n 'description' => 'A wealthy man and a poor stunt girl fall in love. But things get complicated when their souls become inexplicably swapped and dark secrets surface.',\n 'rating' => '80', \n ],\n [\n 'genre_id' => '2',\n 'title' => 'Digimon Adventure',\n 'photo' => 'photo/digimonadv.jpg',\n 'description' => 'Two children receive a strange egg that hatches into their very first Digimon, leading to the night that would change their lives forever.',\n 'rating' => '80', \n ],\n [\n 'genre_id' => '2',\n 'title' => 'Fate/Zero',\n 'photo' => 'photo/fatez.jpg',\n 'description' => 'War of the Holy Grail - Pursuing the power of the \"Holy Grail\" which grants a miracle, this is a contest in which seven magi summon seven Heroic Spirits to compete for it. In that battle whose conclusion was postponed three times, now, the fourth war commenced again. Entrusting their dearest wish of victory, the magi joined the battleground called \"Fuyuki\", but amongst them, there was a man who was always alone, and could not find out the meaning behind his fights. His name was Kotomine Kirei. Not comprehending the guidance of fate, Kirei was lost, and had kept questioning. Why someone like his was given the Command Seals. However, the fate of his fights crossed Kirei\\'s path with a nemesis by chance. That person is - Emiya Kiritsugu. A man who was sterner than anyone else, more merciless than anyone else, and who sought the miracle of the Holy Grail.',\n 'rating' => '81', \n ],\n [\n 'genre_id' => '2',\n 'title' => 'Ping Pong the Animation',\n 'photo' => 'photo/pingpong.jpg',\n 'description' => 'Despite having drastically different personalities, high school boys Peco and Smile have been friends since childhood. Now, they’re both talented members of a table tennis club—but what happens when these sports lovers have to go up against each other in tournaments?',\n 'rating' => '87', \n ],\n [\n 'genre_id' => '2',\n 'title' => 'Hina Festival',\n 'photo' => 'photo/hina.jpg',\n 'description' => 'One night, a strange object falls on the head of Nitta, a member of the yakuza. Inside the box is a strange young girl named Hina. She has tremendous supernatural powers, and Nitta finds himself reluctantly taking her in. Her powers can come in handy for his yakuza business, but he also runs the risk of her using them on him! Not to mention, if she doesn\\'t use her powers, she will eventually go berserk and destroy everything around her. Nitta and Hina\\'s strange life together is just beginning...',\n 'rating' => '82', \n ],\n \n [\n 'genre_id' => '3',\n 'title' => 'Opera Van Java',\n 'photo' => 'photo/ovj.png',\n 'description' => 'Opera Van Java (disingkat OVJ) adalah acara komedi yang ditayangkan di Trans7. Ide acaranya adalah pertunjukan wayang orang versi modern. Dilakonkan oleh komedian ternama seperti Parto Patrio, Denny Cagur, Mpok Alpa, Rina Nose, Anwar Sanjaya Pigano, serta Ferdians Setiadi berperang tawa bersama para bintang tamu.',\n 'rating' => '80', \n ],\n [\n 'genre_id' => '3',\n 'title' => 'Indonesian Idol',\n 'photo' => 'photo/idol.jpg',\n 'description' => 'Indonesian Idol, berjudul Special Season Indonesian Idol: A New Chapter untuk musim kesebelas, adalah suatu ajang pencarian bakat yang diadopsi dari Pop Idol dengan sponsor dari FremantleMedia yang bekerjasama dengan RCTI. Ajang ini merupakan pencarian idola di bidang tarik suara. Indonesian Idol telah menjadi acara realitas terbesar di Indonesia. Setelah kemunculan Indonesian Idol, banyak acara realitas lain yang ditayangkan. Ajang pencarian bakat ini diadakan setiap 2 tahun sekali sejak 2008 pada tahun yang bertepatan dengan Kejuaraan Eropa UEFA, Olimpiade Musim Panas, Piala Dunia FIFA dan Olimpiade Musim Dingin.',\n 'rating' => '87', \n ],\n [\n 'genre_id' => '3',\n 'title' => 'Ini Talk Show',\n 'photo' => 'photo/initalk.jpg',\n 'description' => 'Ini Talkshow adalah acara talkshow/gelar wicara yang dikemas dengan suasana santai. Membahas persoalan hangat yang ada di masyarakat dengan cara sederhana. Di acara ini juga akan memperlihatkan suasana rumah dan karakter-karakter yang ada di rumah tersebut. Di dalam acara ini, pemain-pemain juga bermain peran atau berakting sekaligus menanyakan bintang tamu dan persoalan di masyarakat. Acara ini terkenal karena ada nyanyian Teh Asoy Geboy, Teh Bohay, Teh Sundul, Teh Anggika serta Kopi Dapet Minta dalam beberapa segmen acara ini.',\n 'rating' => '83', \n ],\n [\n 'genre_id' => '3',\n 'title' => 'Super Deal Indonesia',\n 'photo' => 'photo/superd.jpg',\n 'description' => 'Super Deal adalah sebuah acara kuis Indonesia berdasarkan lisensi dari Let\\'s Make a Deal asal Amerika Serikat, milik FremantleMedia yang sekarang bernama Fremantle , yang terspektakuler di Indonesia.',\n 'rating' => '78', \n ],\n ]);\n }", "public function moviesByDirectorCount() {\n $model = $this->model;\n $request = $this->request;\n $movies = $this->getAndSetCache(\n \\CacheVars::NAMESPACE_PAGE,\n \\CacheVars::KEY_MOVIES_DATA . \"_by_director_count_{$this->request->count}\",\n function() use($model, $request) {\n return $model->getMoviesByDirectorCount($request->count);\n }\n );\n $this->view->addParameter(\"directors\", $movies);\n }", "public function show($id)\n {\n $movies = movies::where('id', $id)->first();\n return view('moviedetails')->with('movie',$movies);\n }", "private static function render_movies_rows($movies) { \n if (count($movies) > 0) { \n for ($i=0; $i<count($movies); $i++) {\n // Since each movie card takes half width of row, render 2 movie cards for each row\n if($i % 2 == 0) echo '<div class=\"row\" style=\"margin-top: 30px\">';\n $movie = $movies[$i];\n self::render_movie_card($movie);\n if($i % 2 != 0) echo '</div>';\n }\n } else {\n self::messagearea(\"There is no movie to display.\");\n } \n }", "public function get_movie_list($limit=NULL, $offset='', $order=array('field' => 'mrelease_date', 'sort' => 'DESC')) {\n\n $query = $this->make_query('mtitle\n , user_id\n , mtitle_identifier\n , msinopsis\n , mtags\n , mrelease_date'\n , 'srt_movie'\n , array()\n , $limit\n , $offset\n , $order);\n\n if ($query->num_rows() > 0) {\n foreach ($query->result() as $value) {\n $user_id = $value->user_id;\n $key_identifi = $value->mtitle_identifier;\n\n $query2 = $this->make_query('username, email', 'users', array('id =' => $user_id));\n\n $thepizzais = trim($value->mtags);\n $pieces = explode(\" \", $thepizzais);\n if (count($pieces) === 5) {\n $show_tags = '<i class=icon-tags></i>\n <span class=label>' . $pieces[0] . '</span>\n <span class=label>' . $pieces[1] . '</span>\n <span class=label>' . $pieces[2] . '</span>\n <span class=label>' . $pieces[3] . '</span>\n <span class=label>' . $pieces[4] . '</span>\n ';\n } elseif (count($pieces) === 4) {\n $show_tags = '<i class=icon-tags></i>\n <span class=label>' . $pieces[0] . '</span>\n <span class=label>' . $pieces[1] . '</span>\n <span class=label>' . $pieces[2] . '</span>\n <span class=label>' . $pieces[3] . '</span>\n ';\n } elseif (count($pieces) === 3) {\n $show_tags = '<i class=icon-tags></i>\n <span class=label>' . $pieces[0] . '</span>\n <span class=label>' . $pieces[1] . '</span>\n <span class=label>' . $pieces[2] . '</span>\n ';\n } elseif (count($pieces) === 2) {\n $show_tags = '<i class=icon-tags></i>\n <span class=label>' . $pieces[0] . '</span>\n <span class=label>' . $pieces[1] . '</span>\n ';\n } elseif (count($pieces) === 1) {\n $show_tags = '<i class=icon-tag></i>\n <span class=label>' . $pieces[0] . '</span>\n ';\n }\n\n foreach ($query2->result() as $key) {\n $username = $key->username;\n $profile_pic = $this->gravatar->get_gravatar($key->email);\n }\n\n $release_date = dnull_to_default($value->mrelease_date);\n if (!$release_date) {\n $release_date = strftime('%d/%b/%Y', strtotime\n ($value->mrelease_date));\n }\n $wordtime = $this->wordtime->relative_date(strtotime($value->mrelease_date));\n $this->table->add_row(\n '<blockquote class=pull-left>\n <div class=rata_kiri scroll-pane><i class=\"icon-question-sign\"></i>\n <h3><abbr title=attribute>'\n . anchor('data/detail/' . $value->mtitle_identifier, $value->mtitle . '</abbr>') . '\n ' . word_limiter($value->msinopsis, 25) . '</div>\n <small><div class=rata_kiri>' . $show_tags . ' <i class=icon-time></i>' . $wordtime .\n \"<small>\n <div class=pagination>\n <ul>\n <li><a href=#><i class=icon-heart></i><b>\" . $this->hits->get_hits_view($key_identifi) . \"</b></a></li>\n <li><a href=#><i class=icon-comment></i><b>\" . $this->hits->get_hits_lilcomment($key_identifi) . \"</b></a></li>\n <li><a href=#><i class=icon-check></i><b>\" . $this->hits->get_hits_answer($key_identifi) . \"</b></a></li>\n </ul>\n </div>\n <img src='$profile_pic' width='35' title='user picture' alt='user picture' />\" . 'Designer @<cite title=\"Source Title\">Kodepath</cite>\n </small></div></small>\n </blockquote>');\n $this->output_table .=$this->table->generate();\n $this->output_table .='<br/>';\n $this->table->clear();\n }\n return $this->output_table;\n } else {\n return FALSE;\n }\n }" ]
[ "0.70193374", "0.65045065", "0.63706875", "0.63516825", "0.6139351", "0.6139351", "0.61233366", "0.6091071", "0.60364866", "0.60364866", "0.5865793", "0.5847809", "0.5833303", "0.58295316", "0.58291733", "0.5813628", "0.5699936", "0.56737334", "0.5650831", "0.56423134", "0.5614994", "0.5613501", "0.5610432", "0.5609954", "0.55974936", "0.55942404", "0.55775243", "0.55500937", "0.5548303", "0.55215144", "0.5507627", "0.55013776", "0.5477654", "0.54709166", "0.54407126", "0.542027", "0.54090005", "0.53980756", "0.5391378", "0.5382135", "0.5374627", "0.5366572", "0.5357357", "0.5357357", "0.5326745", "0.5325389", "0.5319172", "0.5305185", "0.53030694", "0.52966434", "0.5289539", "0.5289539", "0.52887815", "0.5273813", "0.52729577", "0.52724266", "0.52712786", "0.5270808", "0.5254569", "0.5253679", "0.52515626", "0.52515626", "0.52515626", "0.52515626", "0.52515626", "0.5247311", "0.5240727", "0.5239113", "0.5227852", "0.5226298", "0.52089286", "0.5196045", "0.51957905", "0.51772213", "0.51749337", "0.51647085", "0.51632166", "0.51617503", "0.5157483", "0.51463854", "0.51462525", "0.51398456", "0.51366323", "0.5130262", "0.5130138", "0.5129135", "0.5121158", "0.51191443", "0.51020086", "0.509415", "0.5087973", "0.5083393", "0.5078189", "0.50775456", "0.5072315", "0.5071064", "0.5069743", "0.50660497", "0.5060824", "0.5059488" ]
0.6958899
1
Instantiate a provider from its code
protected function getProviderFromCode($code) { return Directory::getInstance()->locate($code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createProvider();", "public function resolveProvider($provider)\n {\n return new $provider($this);\n }", "protected function resolveProvider( $provider ) {\n\n\t\treturn new $provider( $this );\n\t}", "public function resolveProviderClass($provider)\n {\n return new $provider($this);\n }", "public function resolveProviderClass($provider)\n {\n return new $provider($this);\n }", "public function resolveProviderClass($provider)\n {\n return new $provider($this);\n }", "protected function getProvider($provider) : Provider\n {\n if (is_string($provider)) {\n $provider = new $provider;\n }\n\n return $provider;\n }", "public static function factory($type)\n {\n if (! static::existsProvider($type)) {\n throw new \\InvalidArgumentException(\"Data provider {$type} does not exists\", 500);\n }\n\n $providerClass = __NAMESPACE__.'\\\\DataProviders\\\\' . ucfirst($type) . \"Provider\";\n\n return new $providerClass();\n }", "public function make($code);", "public function getProvider();", "public function getProvider();", "public function getProvider();", "public function factory($provider, $address, $api_key = '')\r\n {\r\n require_once dirname(__FILE__) . '/Geocoding/Provider/'.ucfirst($provider).'.php';\r\n $class = 'Services_Geocoding_Provider_' . ucfirst($provider);\r\n return new $class($address, $api_key);\r\n }", "protected function createProvider()\n {\n $this->provider = new Keycloak(\n [\n 'authServerUrl' => $this->config->get('authServerUrl'),\n 'realm' => $this->config->get('realm'),\n 'clientId' => $this->config->get('clientId'),\n 'clientSecret' => $this->config->get('clientSecret'),\n 'redirectUri' => $this->getRedirectUrl()\n ]\n );\n\n return $this->provider;\n }", "public function getProvider(): ProviderInterface;", "public function buildProvider($provider, $config)\n {\n return new $provider(\n $this->app['request'],\n $config['auth_token']\n );\n }", "public function addProvider($code)\r\n {\r\n $this->providerCodes[] = $code;\r\n $this->providerCodes = array_unique($this->providerCodes);\r\n \r\n return $this;\r\n }", "public function instantiateProvider($serviceProvider)\n {\n return new $serviceProvider();\n }", "final public function __construct(Provider $provider) {\n $this->_provider = $provider;\n }", "public function create($name) {\n if ($this->connection === null) {\n if (!is_callable($this->provider)) {\n throw new \\Exception(\"Unable to instantiate provider.\");\n }\n\n $this->connection = call_user_func($this->provider);\n }\n\n return new $name($this->connection);\n }", "protected function __construct() {\n $this->providers = array();\n \n $this->register_provider('logger', 'php', 'Support_Resources_LoggerProvider',\n new Support_Resources_DefaultLoggerProvider(), true);\n $this->register_provider('config data', 'php', 'Support_Resources_ConfigProvider',\n new Support_Resources_DefaultConfigProvider(), true);\n $this->register_provider('template engine', 'php', 'Support_Resources_TemplateProvider',\n new Support_Resources_DefaultTemplateProvider(), true);\n $this->register_provider('db connection', 'pdo', 'Support_Resources_DBProvider',\n new Support_Resources_DefaultDBProvider(), true);\n $this->register_provider('cache', 'null', 'Support_Resources_CacheProvider',\n new Support_Resources_DefaultCacheProvider(), true);\n }", "public function instantiate($className);", "public static function buildProvider($key, $config)\n {\n $class = ucfirst($config['type']);\n if (class_exists('\\\\PHPCensor\\\\Security\\\\Authentication\\\\UserProvider\\\\' . $class)) {\n $class = '\\\\PHPCensor\\\\Security\\\\Authentication\\\\UserProvider\\\\' . $class;\n }\n\n return new $class($key, $config);\n }", "public function newInstance();", "public function newInstance();", "public function __construct($code = null);", "private static function _instantiateThisObject() {\r\n $className = get_called_class();\r\n return new $className();\r\n }", "private function getProvider($providerName, array $config = null)\n {\n $config = $config ?: $this->getProviderConfig($providerName);\n\n $provider = new $config['class'](array(\n 'clientId' => $config['clientId'],\n 'clientSecret' => $config['clientSecret'],\n 'redirectUri' => $config['redirectUri']\n ));\n\n return $provider;\n }", "public function getProvider( \\Aimeos\\MShop\\Techie\\Item\\Iface $item, string $type ) : \\Aimeos\\MShop\\Techie\\Provider\\Iface\n\t{\n\t\t$type = ucwords( $type );\n\t\t$names = explode( ',', $item->getProvider() );\n\n\t\tif( ctype_alnum( $type ) === false ) {\n\t\t\tthrow new \\Aimeos\\MShop\\Techie\\Exception( sprintf( 'Invalid characters in type name \"%1$s\"', $type ) );\n\t\t}\n\n\t\tif( ( $provider = array_shift( $names ) ) === null ) {\n\t\t\tthrow new \\Aimeos\\MShop\\Techie\\Exception( sprintf( 'Provider in \"%1$s\" not available', $item->getProvider() ) );\n\t\t}\n\n\t\tif( ctype_alnum( $provider ) === false ) {\n\t\t\tthrow new \\Aimeos\\MShop\\Techie\\Exception( sprintf( 'Invalid characters in provider name \"%1$s\"', $provider ) );\n\t\t}\n\n\t\t$classname = '\\Aimeos\\MShop\\Techie\\Provider\\\\' . $type . '\\\\' . $provider;\n\n\t\tif( class_exists( $classname ) === false ) {\n\t\t\tthrow new \\Aimeos\\MShop\\Techie\\Exception( sprintf( 'Class \"%1$s\" not available', $classname ) );\n\t\t}\n\n\t\t$context = $this->getContext();\n\t\t$config = $context->getConfig();\n\t\t$provider = new $classname( $context, $item );\n\n\t\tself::checkClass( \\Aimeos\\MShop\\Techie\\Provider\\Factory\\Iface::class, $provider );\n\n\t\t$decorators = $config->get( 'mshop/slider/provider/' . $item->getType() . '/decorators', [] );\n\n\t\t$provider = $this->addTechieDecorators( $item, $provider, $names );\n\t\treturn $this->addTechieDecorators( $item, $provider, $decorators );\n\t}", "public function __construct($providerMethod)\n {\n $this->providerMethod = $providerMethod;\n }", "public function setProvider($provider);", "function __construct($code=0){\n\t\tif($code){\n\t\t\t$this->code= $code;\n\t\t\t$this->load();\n\t\t}\n\t}", "public function setProviderCode($providerCode)\n {\n $this->providerCode = $providerCode;\n\n return $this;\n }", "public function getProvider($provider_id);", "public function load_provider($conf, $repo_path, $repos_name) {\n @$name = isset($conf['data provider'])? $conf['data provider'] : $conf['data_engine'];\n Frx::plugins('FrxDataSource');\n // Instantiate the path\n if (class_exists($name)) {\n $o = new $name($conf, $repo_path, $repos_name);\n return $o;\n }\n else {\n Frx::error('Data provider not found for ' . $conf['title']);\n }\n }", "public function provider($value): self\n {\n $this->provider = $value;\n \n return $this;\n }", "public static function createFromCode($code)\r\n {\r\n return new static(null, (int) $code);\r\n }", "public static function createFromData(PaymentProviderInterface $provider)\n {\n $payment = new static(\n $provider->getSeller(),\n $provider->getAmount(),\n $provider->getCurrency(),\n $provider->getDescription(),\n $provider->getId()\n );\n\n return $payment;\n }", "public function create(string $className, Collector $collector, Provider $provider) {\n if (!$this->match($className)) {\n throw new Exception('Construct of class \"'.$className.'\" is\\'t accessible.');\n }\n\n $definition = $collector->get($className, self::METHOD);\n $arguments = $this->buildArguments($definition, $provider);\n\n $reflection = new ReflectionClass($className);\n return $reflection->newInstanceArgs($arguments);\n }", "public function init_provider($provider)\n {\n $this->provider = $provider;\n $this->client = new \\GuzzleHttp\\Client([\n 'base_uri' => $this->helper->endpoint,\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n 'Auth' => (\n $this->provider['user_id'] . ':' . sha1($this->helper->timestamp . $this->provider['secret_key']) . ':' . $this->helper->timestamp\n )\n ]\n ]);\n }", "private static function initProvider($credentials = [])\n {\n return new Provider([\n 'clientId' => isset($credentials['applicationId']) ? $credentials['applicationId'] : null,\n 'clientSecret' => isset($credentials['secret']) ? $credentials['secret'] : null,\n 'redirectUri' => isset($credentials['callbackUrl']) ? $credentials['callbackUrl'] : null\n ]);\n }", "public function __construct($code)\n {\n $this->code = $code;\n }", "public function __construct($code)\n {\n $this->code = $code;\n }", "function &factory($driver, $params = array())\n {\n if (is_array($driver)) {\n list($app, $driver) = $driver;\n }\n\n $driver = basename($driver);\n if ($driver == 'none') {\n $class = 'Horde_Token';\n } else {\n $class = 'Horde_Token_' . $driver;\n }\n if (!class_exists($class)) {\n if (!empty($app)) {\n require_once $app . '/lib/Token/' . $driver . '.php';\n } else {\n include_once 'Horde/Token/' . $driver . '.php';\n }\n }\n\n if (class_exists($class)) {\n $token = new $class($params);\n } else {\n /* If driver class doesn't exist or the driver is not\n * available just default to the parent class, and it is\n * not necessary to warn about degraded service. */\n $token = new Horde_Token($params);\n }\n\n return $token;\n }", "public function newInstance(): object;", "public function __construct($sp_id) {\n $this->providerID = $sp_id;\n }", "public function __construct() {\n\t\t$this->providers = array(\n\t\t\t'ngg' => new ShoutemNGGDao(),\n\t\t\t'flag' => new ShoutemFlaGalleryDao(),\n\t\t);\n\t}", "public function get_provider($name)\n {\n }", "public function __construct($code)\n\t{\n\t\t$this->code = $code;\n\t}", "protected function _getApiTypeInstance($code)\n {\n $typeConfig = $this->_getApiTypeConfig($code);\n $instance = Mage::getSingleton($typeConfig->getClass());\n\n if (!$instance) {\n throw new Klarna_Kco_Model_Api_Exception(\n sprintf('API class \"%s\" does not exist!', $typeConfig->getClass())\n );\n }\n\n return $instance;\n }", "private function _createCreator(Provider $provider = null): Creator {\n $provider = ($provider ?? new Provider());\n return new Creator(new Collector(new Resolver()), $provider);\n }", "static public function factory($config) {}", "public function provider($key);", "public function getServiceProvider($provider);", "public static function getInstance ( $provider , KSchedularTaskConfig $taskConfig , KalturaProvisionJobData $data = null)\r\n\t{\r\n\t\t$engine = null;\r\n\t\t\r\n\t\tswitch ($provider )\r\n\t\t{\r\n\t\t\tcase KalturaSourceType::AKAMAI_LIVE:\r\n\t\t\t\t$engine = new KProvisionEngineAkamai( $taskConfig , $data);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KalturaSourceType::AKAMAI_UNIVERSAL_LIVE:\r\n\t\t\t\t$engine = new KProvisionEngineUniversalAkamai($taskConfig, $data);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$engine = KalturaPluginManager::loadObject('KProvisionEngine', $provider, array($taskConfig));\r\n\t\t}\r\n\t\t\r\n\t\treturn $engine;\r\n\t}", "private static function precall_getInstance(){\n $in = func_get_args();\n $reflect = new \\ReflectionClass(__CLASS__);\n return $reflect->newInstanceArgs($in);\n }", "public function setProvider(ProviderInterface $provider);", "public function loadService(\\Phalconry\\Di\\ServiceProviderInterface $provider);", "public function getProviderClass(): ?string;", "public function __construct(string $code)\n {\n $this->code = $code;\n }", "public static function provider($provider)\n {\n static::$data = $provider;\n }", "public static function instantiate($description, $type);", "public static function factory($type)\n {\n if (include_once 'Drivers/' . $type . '.php') {\n $classname = 'Driver_' . $type;\n return new $classname;\n } else {\n throw new Exception('Driver not found');\n }\n }", "public function setProvider($provider = null);", "protected function createServiceProvider()\n {\n $moduleServiceProviderPath = $this->path(\"Providers/ModuleServiceProvider.php\");\n $content = File::get($moduleServiceProviderPath);\n\n $types = $this->option('type');\n\n if ($types == 'all') {\n $types = 'admin,site';\n }\n $types = explode(',', $types);\n\n $stringTypes = json_encode($types);\n\n // replace Route list\n $content = str_ireplace(\"ROUTES_LIST\", $stringTypes, $content);\n\n // replace module name\n $content = str_ireplace(\"ModuleName\", $this->moduleName, $content);\n $content = str_ireplace(\"ClassName\", Str::singular($this->moduleName), $content);\n $serviceProviderName = Str::singular($this->moduleName) .'ServiceProvider';\n $serviceProviderDirectory = $this->modulePath(\"Providers\");\n\n $this->checkDirectory($serviceProviderDirectory);\n $this->createFile(\"$serviceProviderDirectory/{$serviceProviderName}.php\", $content, 'ServiceProvider');\n $this->updateServiceProviderConfig();\n }", "public static function getInstance()\n {\n if (self::$instance === null) {\n $config = Config::getInstance()->get(\n 'php-censor.security.auth_providers',\n [\n 'internal' => [\n 'type' => 'internal'\n ]\n ]\n );\n\n $providers = [];\n foreach ($config as $key => $providerConfig) {\n $providers[$key] = self::buildProvider($key, $providerConfig);\n }\n self::$instance = new self($providers);\n }\n\n return self::$instance;\n }", "public static function getProvider()\n {\n return self::$provider;\n }", "public function with($provider);", "public function setProvider(?string $provider): self {\n $this->provider = $provider;\n return $this;\n }", "public function load_service_provider_object( $provider ) {\n\n\t\tif ( empty( $this->providers_list[ $provider ] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$class_name = $this->providers_list[ $provider ]['class'];\n\t\t$filename = $this->providers_list[ $provider ]['file'];\n\n\t\tif ( ! class_exists( $class_name ) ) {\n\n\t\t\t$provider_class_path = dirname( __FILE__ ) . \"/providers/$filename\";\n\n\t\t\tif ( ! file_exists( $provider_class_path ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t/** @noinspection PhpIncludeInspection */\n\t\t\tinclude $provider_class_path;\n\t\t}\n\n\t\t$this->set_service( new $class_name );\n\n\t\treturn true;\n\t}", "function __construct($service) {\n // return new $class;\n }", "public function it_can_be_instantiated()\n {\n $expectations = [\n \\Illuminate\\Support\\ServiceProvider::class,\n \\Dawson\\Youtube\\YoutubeServiceProvider::class,\n ];\n\n foreach ($expectations as $expected) {\n $this->assertInstanceOf($expected, $this->provider);\n }\n }", "function __construct($code = 0)\r\n {\r\n $this->code = $code;\r\n }", "public static function factory($type, array $config = array())\n\t{\n\t\t$class = 'Authorizenet_'.ucfirst($type);\n\t\treturn new $class($config);\n\t}", "public static abstract function createInstance();", "protected function instantiate()\n\t{\n\t\t$class = get_class($this);\n\t\t$model = new $class(null);\n\t\treturn $model;\n\t}", "public function processProvider($type);", "public static function get_class($code)\n {\n }", "public function create(string $class);", "function code ( $arguments = \"\" ) {\n $arguments = func_get_args ();\n $rc = new ReflectionClass('tcode');\n return $rc->newInstanceArgs ( $arguments );\n}", "public function instantiateProvider (UnitTester $I){\n\n $I->wantTo('Instantiate DoctrineProvider');\n\n $provider = $this->factory->getProvider();\n\n $types = $provider->getTypes();\n\n $I->assertEquals(19, count($types));\n\n $userType = $provider->getType('User');\n\n $I->assertNotNull($userType);\n $I->assertEquals(\"User\", $userType->name); // Test the name annotation property\n\t\t$I->assertEquals(\"A User\", $userType->description); // Test the description annotation property\n\n $projectType = $provider->getType('Project');\n\n $I->assertNotNull($projectType);\n\t\t$I->assertEquals(\"Project\", $projectType->name); // Test the name annotation property\n\t\t$I->assertEquals(\"A Project\", $projectType->description); // Test the description annotation property\n\n $schema = $this->factory->getGraphQLSchema($provider);\n\n\t\t$result = \\GraphQL\\GraphQL::execute(\n\t\t\t$schema,\n\t\t\t\"{\n\t\t\t __schema{\n\t\t\t\ttypes{\n\t\t\t\t name\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\",\n\t\t\tnull,\n\t\t\tnew GraphContext(),\n\t\t\tnull\n\t\t);\n\n\t\t$types = array();\n\t\tforeach($result['data']['__schema']['types'] as $type){\n\t\t\tarray_push($types, $type[\"name\"]);\n\t\t}\n\n\t\t$I->assertContains('User', $types);\n\t\t$I->assertContains('User__List', $types);\n\t\t$I->assertContains('Project', $types);\n\t\t$I->assertContains('Project__List', $types);\n\n\t\t$result2 = \\GraphQL\\GraphQL::execute(\n\t\t\t$schema,\n\t\t\t\"query testQuery{\n\t\t\t\tUser{\n\t\t\t\t\titems{\n\t\t\t\t\t\tid\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\",\n\t\t\tnull,\n\t\t\tnew GraphContext(),\n\t\t\tnull\n\t\t);\n\n\t\t$I->assertEquals(0, count($result2[\"data\"][\"User\"][\"items\"]));\n\n }", "function _new($classe)\n{\n return new $classe($bdd, $ObjetBDDParam);\n}", "private function initVarProvider()\n {\n $this->provider = $this->confMap[ 'provider' ];\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'Map provider is: ' . $this->provider;\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n switch ( true )\n {\n case( $this->provider == 'GoogleMaps' ):\n break;\n case( $this->provider == 'Open Street Map' ):\n break;\n default:\n $header = 'FATAL ERROR!';\n $text = 'Unexpeted value : TypoScript property map.provider is \"' . $this->provider . '\".';\n $this->pObj->drs_die( $header, $text );\n }\n return;\n }", "private function createInstance($class, $key)\n {\n $injector = call_user_func($this->injector);\n if (! $injector instanceof InjectorInterface) {\n throw new NoInjectorReturn;\n }\n /** @var $injector Injector */\n $aopFileDir = $injector->getAopClassDir();\n /** @var $injector Injector */\n $this->removeAopFiles($aopFileDir);\n $instance = $injector->getInstance($class);\n $this->cache->save($key, $aopFileDir);\n $this->cache->save(\"{$key}{$class}\", $instance);\n\n // post injection\n call_user_func_array($this->initialization, [$instance, $injector]);\n\n return $instance;\n }", "public function getProviderCode()\n {\n return $this->providerCode;\n }", "public function run()\n {\n Provider::factory(10)->create();\n }", "private function createServiceProvider($type=\"neweb\", $activity='') {\n return $this->cashFlow->createProvider($type, $activity);\n }", "public function create() {\n\t\t$implementationClassName = 'Imagine\\\\' . $this->settings['driver'] . '\\Imagine';\n\t\treturn new $implementationClassName();\n\t}", "public function __construct(string $code = '')\n {\n $this->code = $code;\n }", "public function __construct(string $code = '')\n {\n $this->code = $code;\n }", "function new_instance($class)\n {\n }", "public function registerProvider($class, array $options = []);", "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function loadByCode($code)\n {\n $this->_requestedCode = $code;\n\n return $this->load($code, 'code');\n }", "public static function factory($api) {\n\t\tif(!self::$initialized) {\n\t\t\tthrow new \\Exception('Phoo not initialized (call Phoo::Initialize() in your auth file)');\n\t\t}\n\t\t$class = \"\\\\Phoo\\\\\".ucfirst($api);\n\t\treturn new $class(self::$partner_code, self::$secret_code);\n\t}", "static function newobj($type /* ... */){\n if(is_null($type)) return;\n\n $ar = func_get_args();\n $type = array_shift($ar); // remove type/object\n \n try{\n // get the asked class\n if(is_string($type)) $cls = defnz(self::$decode_table,$type,'opc_item_' . $type);\n else if (is_object($type)) $cls = get_class($type);\n else throw new Exception('invalid type: ' . strval($type));\n \n // check this class 8exists, implements opi_item\n if(!class_exists($cls)) \n\tthrow new Exception('unknown class: ' . $cls);\n else if(!in_array('opi_item',class_implements($cls)))\n\tthrow new Exception('not able to handle: ' . $cls);\n \n } catch (Exception $ex) {\n trigger_error('error creating a opc_item: ' . $ex->getMessage(),E_USER_WARNING);\n return NULL;\n }\n \n // crate and call init with the other arguments\n $res = new $cls();\n call_user_func_array(array(&$res,'init'),$ar);\n return $res;\n }", "function &factory($type)\n {\n $classfile = \"format/{$type}.class.php\";\n if (include_once $classfile) {\n $class = \"{$type}_format\";\n if (class_exists($class)) {\n $object = & new $class($options);\n return $object;\n } else {\n COM_errorLog(\"report.class - Unable to instantiate class $class from $classfile\");\n }\n } else {\n COM_errorLog(\"report.class - Unable to include file: $classfile\");\n }\n\n }", "public function provider( $provider ) {\n\n\t\tif ( is_string( $provider ) ) {\n\t\t\t$provider = $this->resolveProvider( $provider );\n\t\t}\n\n\t\t$this->providers[] = $provider;\n\t}", "public function getInstance(stubBaseReflectionClass $type, stubBaseReflectionClass $impl, stubInjectionProvider $provider);", "public function createInstance($processor);" ]
[ "0.751583", "0.64998776", "0.64950675", "0.64513314", "0.64513314", "0.64513314", "0.6449042", "0.6317752", "0.6256277", "0.6166271", "0.6166271", "0.6166271", "0.6062262", "0.6031031", "0.6010689", "0.6008716", "0.6001766", "0.60002667", "0.5975127", "0.5853479", "0.583922", "0.57867354", "0.5770215", "0.5694829", "0.5694829", "0.5650884", "0.561638", "0.5597584", "0.5592495", "0.55554533", "0.55540174", "0.5541952", "0.55282277", "0.55105263", "0.54933536", "0.5488176", "0.5476652", "0.54486334", "0.54262894", "0.5403275", "0.53847843", "0.5360178", "0.5360178", "0.5347274", "0.5339908", "0.5334493", "0.53284097", "0.5317603", "0.5316453", "0.5311498", "0.53061193", "0.52929777", "0.5278787", "0.52716583", "0.5271405", "0.52598625", "0.5252551", "0.5239447", "0.5237987", "0.5236407", "0.5221701", "0.52200973", "0.51999533", "0.5198917", "0.5191036", "0.5182882", "0.5179094", "0.5176862", "0.51729167", "0.5162228", "0.5156832", "0.5156791", "0.515634", "0.5147456", "0.5143748", "0.5138323", "0.513337", "0.51305467", "0.51228493", "0.51200646", "0.51168805", "0.511302", "0.51109254", "0.5107872", "0.51024467", "0.5094424", "0.5093678", "0.5089909", "0.50859195", "0.50859195", "0.5071205", "0.506933", "0.5067274", "0.50648195", "0.5062655", "0.5060147", "0.5058143", "0.50563926", "0.5049527", "0.5049077" ]
0.61606055
12
Determine if the user is authorized to make this request.
public function authorize() { switch ($this->method()) { case 'POST': return true; case 'GET': default: { return false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.7717961
35
Get the validation rules that apply to the request.
public function rules() { $request = Request::all(); switch ($this->method()) { case 'POST': //create if (Request::has('id')) { //更新 return [ 'title' => 'bail|required|string|max:30', 'api' => 'nullable|unique:auth_rules,api,' . $request['id'] . '|string|max:200', 'pid' => 'required|array', ]; } else { return [ 'title' => 'bail|required|string|max:30', 'api' => 'nullable|unique:auth_rules|string|max:200', 'pid' => 'required|array', ]; } case 'GET': default: { return []; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8343546", "0.8014665", "0.7937206", "0.7926811", "0.7923615", "0.7905433", "0.7861068", "0.7791027", "0.77841467", "0.77639014", "0.77372813", "0.7733606", "0.77110046", "0.7692483", "0.76856923", "0.7683318", "0.7683318", "0.7683318", "0.7683318", "0.7683318", "0.7683318", "0.76759267", "0.7671764", "0.76669997", "0.7658313", "0.76424056", "0.76314425", "0.76299816", "0.7617575", "0.7610898", "0.760748", "0.7602764", "0.7599495", "0.7598348", "0.75924945", "0.7592167", "0.7588475", "0.7581675", "0.75560045", "0.75556475", "0.7551787", "0.7546985", "0.7542093", "0.7537384", "0.75370705", "0.75301105", "0.7518624", "0.75159705", "0.75089574", "0.7506592", "0.7505938", "0.7499879", "0.7496097", "0.7495033", "0.74930423", "0.7491216", "0.74904597", "0.7489752", "0.74876916", "0.74876636", "0.74802196", "0.747963", "0.74696404", "0.7463791", "0.7462722", "0.7461719", "0.74595535", "0.74555475", "0.7453959", "0.7453909", "0.74509215", "0.7448826", "0.74418545", "0.74413", "0.74357206", "0.74357104", "0.74347955", "0.74308217", "0.7428876", "0.742377", "0.7420234", "0.7415896", "0.74148333", "0.7414047", "0.7412942", "0.74114394", "0.7405532", "0.7405127", "0.74048644", "0.74014634", "0.73909056", "0.73841065", "0.7373293", "0.7371715", "0.7369096", "0.73621505", "0.7355512", "0.73455215", "0.7344044", "0.73436797", "0.73358494" ]
0.0
-1
Ma propre fonction de traitement des balises ouvrantes
function fonctionBaliseOuvrante($parseur, $nomBalise, $tableauAttributs) { // En fait... nous nous conteterons de mémoriser le nom de la balise // afin d'en tenir compte dans la fonction "fonctionTexte" global $derniereBaliseRencontree; $derniereBaliseRencontree = $nomBalise; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AfficheBatiment(batiment &$batiment, personnage &$oJoueur = NULL, maison &$oMaison = NULL){\r\n\t$ImgSize = 'height';\r\n\t$txt = NULL;\r\n\r\n\t$contenu = 'Ne peut rien contenir';\r\n\t\r\n\t$chkPositionJoueur = false;\r\n\t$nbLigne = 3;\r\n\t\r\n\tif(!is_null($oJoueur)){\t\r\n\t\t$chkPositionJoueur\t\t= $oJoueur->GetCoordonnee() == $batiment->GetCoordonnee();\r\n\t}\r\n\t\r\n\t$chkMarche = false;\r\n\t\r\n\t$lstBatimentAvecEsclaves = array(ferme::ID_BATIMENT, potager::ID_BATIMENT, mine::ID_BATIMENT, carriere::ID_BATIMENT, scierie::ID_BATIMENT);\r\n\r\n\tswitch($batiment->GetIDType()){\r\n\t\tcase maison::ID_BATIMENT:\r\n\t\t\t$ImgSize = 'width';\r\n\t\t\tif($chkPositionJoueur){\r\n\t\t\t\t$contenu = '<p>Ne peut rien contenir.</p>';\r\n\t\t\t\t$chkOptions = false;\r\n\t\t\t}else{\r\n\t\t\t\t$contenu = '<p>Si ici que vous devez vous placer pour vous inscrire ou valider une quête.</p>';\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t/* case 'bank':\r\n\t\t\t$contenu = $batiment->AfficheContenu($oJoueur);\r\n\t\t\tbreak; */\r\n\t\tcase scierie::ID_BATIMENT:\r\n\t\tcase ferme::ID_BATIMENT:\r\n\t\tcase mine::ID_BATIMENT :\r\n\t\tcase potager::ID_BATIMENT:\r\n\t\tcase carriere::ID_BATIMENT:\r\n\t\t\t$ImgSize = 'width';\r\n\t\t\tif(!is_null($oJoueur)){\t$contenu = $batiment->AfficheContenu($oJoueur);}\r\n\t\t\tbreak;\r\n\t\tcase marche::ID_BATIMENT:\r\n\t\t\tif($chkPositionJoueur){\r\n\t\t\t\t$chkMarche = true;\r\n\t\t\t}else{\r\n\t\t\t\t$contenu = '<p>Vous devez vous placez sur son emplacement pour afficher les transactions disponibles.</p>';\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n\tif(in_array($batiment->GetIDType(), $lstBatimentAvecEsclaves))\r\n\t{\r\n\t\t$arLignes[3] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>'\r\n\t\t.(!is_null($oJoueur)?\r\n\t\t$batiment->AfficheAchatEsclave($oJoueur)\r\n\t\t:'Possibilité d\\'acheter des esclaves pour augmenter sa production')\r\n\t\t.'</td>\r\n\t\t\t</tr>';\r\n\t\t$nbLigne++;\r\n\t}\r\n\t\r\n\tif(!is_null($oJoueur))\r\n\t{\r\n\t\t$arLignes[2] = '\r\n\t\t\t<tr><td>'.$batiment->AfficheOptionAmeliorer($oJoueur, $oMaison).'</td></tr>';\r\n\t\t$arLignes[4] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>'\r\n\t\t\t\t\t.'<img alt=\"Barre status\" src=\"./fct/fct_image.php?type=statusetat&amp;value='.$batiment->GetEtat().'&amp;max='.$batiment->GetEtatMax().'\" />'\r\n\t\t\t\t\t.'<br />'\r\n\t\t\t\t\t.$batiment->AfficheOptionReparer($oJoueur)\r\n\t\t\t\t.'</td>\r\n\t\t\t</tr>';\r\n\t\t$arLignes[7] = '\r\n\t\t\t<tr><td>'.$contenu.'</td></tr>';\r\n\t\r\n\t\t$nbLigne+=3;\r\n\t\t\r\n\t\tif($batiment->GetIDType() == marche::ID_BATIMENT)\r\n\t\t{\r\n\t\t\t$arLignes[8] = '\r\n\t\t\t<tr><td>'.$batiment->AfficheTransactions($oJoueur).'</td></tr>';\r\n\t\t\t\r\n\t\t\t$nbLigne++;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$arLignes[5] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<ul style=\"list-style-type:none; padding:0px; text-align:center; margin:0px;\">\r\n\t\t\t\t\t\t<li style=\"display:inline;\">'.AfficheIcone(objArmement::TYPE_ATTAQUE).' : '.(is_null($batiment->GetAttaque())?'0':$batiment->GetAttaque()).'</li>\r\n\t\t\t\t\t\t<li style=\"display:inline; margin-left:40px;\">'.AfficheIcone(objArmement::TYPE_DISTANCE).' : '.(is_null($batiment->GetDistance())?'0':$batiment->GetDistance())\t.'</li>\r\n\t\t\t\t\t\t<li style=\"display:inline; margin-left:40px;\">'.AfficheIcone(objArmement::TYPE_DEFENSE).' : '.(is_null($batiment->GetDefense())?'0':$batiment->GetDefense()).'</li>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>';\r\n\t$arLignes[6] = '\r\n\t\t\t<tr><td>'.$batiment->GetDescription().'</td></tr>';\r\n\t$arLignes[1] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td rowspan=\"'.$nbLigne.'\" style=\"width:400px;\">\r\n\t\t\t\t\t<img alt=\"'.$batiment->GetType().'\" src=\"./img/batiments/'.$batiment->GetType().'.png\" width=\"400px\" onmouseover=\"montre(\\''.CorrectDataInfoBulle($batiment->GetDescription()).'\\');\" onmouseout=\"cache();\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<th>'\r\n\t\t\t\t\t.(!is_null($oJoueur)?\r\n\t\t\t\t\t\t'<a name=\"'.str_replace(',', '_', $batiment->GetCoordonnee()).'\">'\r\n\t\t\t\t\t\t:NULL)\r\n\t\t\t\t\t.$batiment->GetNom((!is_null($oJoueur)?$oJoueur->GetCivilisation():personnage::CIVILISATION_GAULOIS)).(!is_null($oJoueur)?' ('.$batiment->GetNiveau().' / '.$batiment->GetNiveauMax().')':NULL)\r\n\t\t\t\t\t.(!is_null($oJoueur)?\r\n\t\t\t\t\t\t'</a>'\r\n\t\t\t\t\t\t:NULL)\r\n\t\t\t\t.'</th>\r\n\t\t\t</tr>';\r\n\t\r\n\t//on trie par keys\r\n\tksort($arLignes);\r\n\t\r\n\treturn implode('', $arLignes);\r\n}", "public function boleta()\n\t{\n\t\t//\n\t}", "function luas_alas_balok($nilai1, $nilai2) {\n\t\n\t\n\t\n\t\n\t}", "public function obtenerViajesplusAbonados();", "public function findBatiments($language) {\r\n $select = $this->_createSelectQuery();\r\n // batiment\r\n $select->field('id', $this->_tableName);\r\n $select->field('nom_' . $language, $this->_tableName, 'nom');\r\n $select->field('description_' . $language, $this->_tableName, 'description');\r\n $select->field('image', $this->_tableName);\r\n $select->field('niveau', $this->_tableName);\r\n $select->field('cout', $this->_tableName);\r\n $select->field('entretien', $this->_tableName);\r\n $select->field('duree_construction', $this->_tableName);\r\n $select->field('duree_recolte', $this->_tableName);\r\n $select->field('duree_hospitalisation', $this->_tableName);\r\n $select->field('cout_hospitalisation', $this->_tableName);\r\n $select->field('gain', $this->_tableName);\r\n $select->field('capacite', $this->_tableName);\r\n $select->field('visibilite', $this->_tableName);\r\n $select->field('id_prev', $this->_tableName);\r\n // Batiment Suivant\r\n $select->field('id', 'batiment_suivant', 'id_next');\r\n // type_batiment 1\r\n $select->field('id', 'type1_batiment', 'id_type1');\r\n $select->field('id_parent', 'type1_batiment', 'id_parent_type1');\r\n $select->field('nom_' . $language, 'type1_batiment', 'nom_type1');\r\n $select->field('is_unique', 'type1_batiment', 'is_unique_type1');\r\n // type_batiment 2\r\n $select->field('id', 'type2_batiment', 'id_type2');\r\n $select->field('id_parent', 'type2_batiment', 'id_parent_type2');\r\n $select->field('nom_' . $language, 'type2_batiment', 'nom_type2');\r\n $select->field('is_unique', 'type2_batiment', 'is_unique_type2');\r\n // From et jointures\r\n $select->from($this->_tableName);\r\n $select->innerJoin('type_batiment', array('batiment.id_type = type1_batiment.id'), 'type1_batiment');\r\n $select->leftJoin('type_batiment', array('type1_batiment.id_parent = type2_batiment.id'), 'type2_batiment');\r\n $select->leftJoin('batiment', array('batiment_suivant.id_prev = batiment.id'), 'batiment_suivant');\r\n // Ordre\r\n $select->order('batiment.niveau');\r\n\r\n return $this->_mapper->buildObjectsFromRows($this->_selectAll($select));\r\n }", "public function getBanyakSoal();", "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 bancos($periodo,$ejer,$moneda){\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,sum(m.Importe) importe,m.TipoMovto,c.description,p.relacionExt,p.concepto\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=\".$moneda.\" and p.idejercicio=\".$ejer.\" and c.`main_father`=conf.CuentaBancos and p.idtipopoliza!=3\n\t\t\tand m.IdPoliza=p.id and p.idperiodo in (\".$periodo.\",\".($periodo-=1).\") and p.activo=1 and m.Activo=1\n\t\t\tgroup by m.Cuenta,m.TipoMovto\");\n\t\t\treturn $sql;\n\t\t}", "public function abono();", "function calculer_boucle($id_boucle, &$boucles) {\n\n\t// gerer les statuts si declares pour cette table\n\t/*\n\t$table_statut[nom_table][] = array(\n\t\t'champ'=>'statut', // champ de la table sur lequel porte le filtrage par le statut\n\t\t'publie'=>'publie', // valeur ou liste de valeurs, qui definissent l'objet comme publie.\n\t\t'previsu'=>'publie,prop', // valeur ou liste de valeurs qui sont visibles en previsu\n\t\t'post_date'=>'date', // un champ de date pour la prise en compte des post_dates, ou rien sinon\n\t 'exception'=>'statut', // liste des modificateurs qui annulent le filtrage par statut\n\t // si plusieurs valeurs : array('statut','tout','lien')\n\t);\n\n\tPour 'publier' ou 'previsu', si la chaine commence par un \"!\" on exclu au lieu de filtrer sur les valeurs donnees\n\tsi la chaine est vide, on ne garde rien si elle est seulement \"!\" on n'exclu rien\n\n\tSi le statut repose sur une jointure, 'champ' est alors un tableau du format suivant :\n\t'champ'=>array(\n\t array(table1, cle1),\n\t ...\n\t array(tablen, clen),\n\t champstatut\n\t )\n\n\tchampstatut est alors le champ statut sur la tablen\n\tdans les jointures, clen peut etre un tableau pour une jointure complexe : array('id_objet','id_article','objet','article')\t \n\t*/\n\n\t$boucle = &$boucles[$id_boucle];\n\t$id_table = $boucle->id_table;\n\t$table_sql = $boucle->from[$id_table];\n\tif (isset($GLOBALS['table_statut'][$table_sql])){\n\t\tforeach($GLOBALS['table_statut'][$table_sql] as $s){\n\t\t\t// Restreindre aux elements publies si pas de {statut} ou autre dans les criteres\n\t\t\t$filtrer = true;\n\t\t\tif (isset($s['exception'])) {\n\t\t\t\tforeach(is_array($s['exception'])?$s['exception']:array($s['exception']) as $m) {\n\t\t\t\t\tif (isset($boucle->modificateur[$m]) OR isset($boucle->modificateur['criteres'][$m])) {\n\t\t\t\t\t\t$filtrer = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($filtrer) {\n\t\t\t\tif (is_array($s['champ'])){\n\t\t\t\t\t$statut = preg_replace(',\\W,','',array_pop($s['champ'])); // securite\n\t\t\t\t\t$jointures = array();\n\t\t\t\t\tforeach($s['champ'] as $j) {\n\t\t\t\t\t\t$jointures[] = array('',array($id=reset($j)),end($j));\n\t\t\t\t\t}\n\t\t\t\t\t$jointures[0][0] = $id_table;\n\t\t\t\t\tif (!array_search($id, $boucle->from)){\n\t\t\t\t\t\tfabrique_jointures($boucle, $jointures, true, $boucle->show, $id_table);\n\t\t\t\t\t}\n\t\t\t\t\t// trouver l'alias de la table d'arrivee qui porte le statut\n\t\t\t\t\t$id = array_search($id, $boucle->from);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$id = $id_table;\n\t\t\t\t\t$statut = preg_replace(',\\W,','',$s['champ']); // securite\n\t\t\t\t}\n\t\t\t\t$mstatut = $id .'.'.$statut;\n\n\t\t\t\tif (!$GLOBALS['var_preview']) {\n\t\t\t\t\tif (isset($s['post_date']) AND $s['post_date']\n\t\t\t\t\t\tAND $GLOBALS['meta'][\"post_dates\"] == 'non'){\n\t\t\t\t\t\t$date = $id.'.'.preg_replace(',\\W,','',$s['post_date']); // securite\n\t\t\t\t\t\tarray_unshift($boucle->where,\"quete_condition_postdates('$date')\");\n\t\t\t\t\t}\n\t\t\t\t\tarray_unshift($boucle->where,calculer_where_statut($mstatut,$s['publie']));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tarray_unshift($boucle->where,calculer_where_statut($mstatut,$s['previsu']));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\n\t$boucles[$id_boucle] = pipeline('post_boucle', $boucles[$id_boucle]);\n\n\t// en mode debug memoriser les premiers passages dans la boucle,\n\t// mais pas tous, sinon ca pete.\n\tif (_request('var_mode_affiche') != 'resultat') \n\t\t$trace = '';\n\telse {\n\t\t$trace = $boucles[$id_boucle]->descr['nom'] . $id_boucle;\n\t\t$trace = \"if (count(@\\$GLOBALS['debug_objets']['resultat']['$trace'])<3)\n\t \\$GLOBALS['debug_objets']['resultat']['$trace'][] = \\$t0;\";\n\t}\n\treturn ($boucles[$id_boucle]->type_requete == 'boucle')\n\t? calculer_boucle_rec($id_boucle, $boucles, $trace) \n\t: calculer_boucle_nonrec($id_boucle, $boucles, $trace);\n}", "function en_rojo($anio){\n $ar=array();\n $ar['anio']=$anio;\n $sql=\"select sigla,descripcion from unidad_acad \";\n $sql = toba::perfil_de_datos()->filtrar($sql);\n $resul=toba::db('designa')->consultar($sql);\n $ar['uni_acad']=$resul[0]['sigla'];\n $res=$this->get_totales($ar);//monto1+monto2=gastado\n $band=false;\n $i=0;\n $long=count($res);\n while(!$band && $i<$long){\n \n if(($res[$i]['credito']-($res[$i]['monto1']+$res[$i]['monto2']))<-50){//if($gaste>$resul[$i]['cred']){\n $band=true;\n }\n \n $i++;\n }\n return $band;\n \n }", "public function bernafas()\n \t{\n \t\techo 'Bernafas menggunakan hidung, '.PHP_EOL;\n \t}", "public function plus_abonados();", "public function belum_bayar()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('tbl_transaksi');\n\t\t$this->db->where(\n\t\t\t'id_pelanggan',\n\t\t\t$this->session->userdata('id_pelanggan'),\n\t\t);\n\t\t$this->db->where('status_order=0');\n\n\n\t\t$this->db->order_by('id_transaksi', 'desc');\n\t\treturn $this->db->get()->result();\n\t}", "function geraClassesBDBase(){\n # Abre o template da classe BD e armazena conteudo do modelo\n $modelo = Util::getConteudoTemplate('class.ModeloBDBase.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $copiaModelo = $modelo;\n $nomeClasse\t = $this->getCamelMode(ucfirst((string)$aTabela['NOME']));\n $objetoClasse = \"\\$o$nomeClasse\";\n # varre a estrutura dos campos da tabela em questao\n $aCampoInsert = $aValorInsert = $aCampoUpdate = $aChaveWhere = $aCampoConsulta = $aFKCampo = array();\n $aChaveAltera = $aChave = $aChaveWhereSel = $aChaveWhereDel = $aFKJoin = $aVerificaPK = array();\n \n $i = 2;\n\n foreach($aTabela as $oCampo){\n $nomeCampo = (string)$oCampo->NOME;\n\n # recupera valores a serem substituidos no modelo\n $aCampoInsert[] = $nomeCampo;\n if((int)$oCampo->CHAVE == 1){\n $aChaveWhere[] = \"$nomeCampo = {\\$reg['$nomeCampo']}\";\n $aChaveWhereSel[] = (string)$aTabela['NOME'].\".$nomeCampo = \\$$nomeCampo\";\n $aChaveWhereDel[] = \"$nomeCampo = \\$$nomeCampo\";\n $aChave[] = \"\\$$nomeCampo\";\n $aVerificaPK[] = $nomeCampo;\n $aChaveAltera[] = \"\\$cv == \\\"$nomeCampo\\\"\";\n if((string)$oCampo->FKTABELA != ''){\n $aCampoUpdate[] = \"$nomeCampo = \\\".\\$reg['$nomeCampo'].\\\"\";\n }\n }\n else{\n $aCampoUpdate[] = ((string)$oCampo->FKTABELA != '') ? \n \"$nomeCampo = \\\".\\$reg['$nomeCampo'].\\\"\" : \n \"$nomeCampo = '\\\".\\$reg['$nomeCampo'].\\\"'\";\t\t\t\t\n }\n\n if((string)$oCampo->FKTABELA != ''){\n $aValorInsert[] = (preg_match(\"#[dD]ata.*[Cc]adastro#is\", $nomeCampo)) ? \"\\\".\\$oConexao->data_cadastro_padrao.\\\"\" : \"\\\".\\$reg['$nomeCampo'].\\\"\";\n $tabelaFK = ((string)$aTabela['SCHEMA'] != \"\") ? (string)$aTabela['SCHEMA'].\".\".(string)$oCampo->FKTABELA : (string)$oCampo->FKTABELA;\n $aFKJoin[] = \"$tabelaFK \\n\\t\\t\\t\\t\\ton (\".(string)$aTabela['NOME'].\".$nomeCampo = \".(string)$oCampo->FKTABELA.\".\".(string)$oCampo->FKCAMPO.\")\";\n \n $i++;\n }\n else{\n $aValorInsert[] = ((int)$oCampo->CHAVE == 1) ? \n \"\\\".\\$reg['$nomeCampo'].\\\"\" : \n \"'\\\".\\$reg['$nomeCampo'].\\\"'\";\n }\n\n // =========== Montagem dos Campos da Consulta =============\n if((int)$oCampo->CHAVE != 1){\n $aCampoConsulta[] = (string)$aTabela['NOME'].\".$nomeCampo like '\\$valor'\";\n }\t\n }\n # =========== Monta demais valores a serem substituidos ========\n $aCampoInsert = join($aCampoInsert, \",\\n\\t\\t\\t\\t\\t\");\n $aValorInsert = join($aValorInsert, \",\\n\\t\\t\\t\\t\\t\");\n $aCampoUpdate = join($aCampoUpdate, \",\\n\\t\\t\\t\\t\\t\");\n $aChaveWhere = join($aChaveWhere, \" \\n\\t\\t\\t\\t\\tand \");\n $aChaveWhereSel = join($aChaveWhereSel, \" \\n\\t\\t\\t\\t\\tand \");\n $aChaveWhereDel = join($aChaveWhereDel, \" \\n\\t\\t\\t\\t\\tand \");\n $sCampoConsulta = join($aCampoConsulta, \" \\n\\t\\t\\t\\t\\tor \");\n $aChave = join($aChave,\t \",\");\n $aColuna = $this->getCamposSelect((string)$aTabela['NOME']);\n $aColuna = join($aColuna, \",\\n\\t\\t\\t\\t\\t\");\n\n $tabelaJoin = (((string)$aTabela['SCHEMA'] != \"\") ? (string)$aTabela['SCHEMA'].\".\".(string)$aTabela['NOME'] : (string)$aTabela['NOME']);\n\n $sVerificaPK = NULL;\n foreach($aVerificaPK as $v){\n $sVerificaPK .= \"\\t\\t\\$reg['$v'] = (\\$reg['$v'] != '') ? \\$reg['$v'] : \\\"null\\\";\\n\";\n }\n\n if(count($aFKJoin) > 0){\n $tabelaJoin .= \" \\n\\t\\t\\t\\tleft join \".join($aFKJoin,\"\\n\\t\\t\\t\\tleft join \");\n }\n \n $nomeTabela = (((string)$aTabela['SCHEMA'] != \"\") ? (string)$aTabela['SCHEMA'].\".\".(string)$aTabela['NOME'] : (string)$aTabela['NOME']);\n $chavesWhereConsulta = (($sCampoConsulta!='') ? $sCampoConsulta : '1=1');\n $sChaveAltera = (count($aChaveAltera)>0) ? \"if(\".implode(\" || \", $aChaveAltera).\") continue;\" : \"\";\n \n # ======== Substitui todas os parametros pelas variaveis ja processadas ==========\n $copiaModelo = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo);\n $copiaModelo = str_replace('%%VERIFICA_PK%%', $sVerificaPK, $copiaModelo);\n $copiaModelo = str_replace('%%OBJETO_CLASSE%%', $objetoClasse, $copiaModelo);\n $copiaModelo = str_replace('%%TABELA%%', $nomeTabela, $copiaModelo);\n $copiaModelo = str_replace('%%CAMPOS_INS%%', $aCampoInsert, $copiaModelo);\n $copiaModelo = str_replace('%%VAL_CAMPOS_INS%%', $aValorInsert, $copiaModelo);\n $copiaModelo = str_replace('%%CAMPOS_UPD%%', $aCampoUpdate, $copiaModelo);\n $copiaModelo = str_replace('%%CHAVES_WHERE%%', $aChaveWhere, $copiaModelo);\n $copiaModelo = str_replace('%%LISTA_CHAVES%%', $aChave, $copiaModelo);\n $copiaModelo = str_replace('%%CHAVES_WHERE_SEL%%', $aChaveWhereSel, $copiaModelo);\n $copiaModelo = str_replace('%%CHAVES_WHERE_DEL%%', $aChaveWhereDel, $copiaModelo);\n $copiaModelo = str_replace('%%TABELA_JOIN%%', $tabelaJoin, $copiaModelo);\n $copiaModelo = str_replace('%%CHAVES_WHERE_CONS%%', $chavesWhereConsulta, $copiaModelo);\n $copiaModelo = str_replace('%%COLUNAS%%', $aColuna, $copiaModelo); //Por Enquanto\n $copiaModelo = str_replace('%%CAMPOS_CHAVE_ALTERAR%%', $sChaveAltera, $copiaModelo);\n \n\n unset($sCampoConsulta);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes/core/bdbase\";\n if(!file_exists($dir)) \n mkdir($dir);\n $fp = fopen(\"$dir/class.$nomeClasse\".\"BDBase.php\",\"w\");\n fputs($fp,$copiaModelo); \n fclose($fp);\n }\n return true;\n }", "public\n function getThongbao()\n {\n// $tinChuaDoc = DuyetBai::all()->where('status', 0)->count();\n// Carbon::setLocale('vi');\n// if ($baiDuyet != null) {\n// for ($i = 0; $i < count($baiDuyet); $i++) {\n// $baiDuyet[$i]['created_at'] = Carbon::parse($baiDuyet[$i]['created_at'])->diffForHumans(null, null, true, 2);\n// $baiDuyet[$i]['get_nha_tuyen_dung']['tai_khoan'] = NhaTuyenDung::query()->find($baiDuyet[$i]['get_nha_tuyen_dung']['id'])->getTaiKhoan->toArray();\n// $baiDuyet[$i]['trang_thai_xem_tin'] = DuyetBai::query()->where('bai_dang_id', $baiDuyet[$i]['id'])->first('status');\n// }\n//\n// $data['duyet_tin'] = $baiDuyet;\n// $data['tin_chua_doc'] = $tinChuaDoc;\n// }\n\n return [];\n }", "function bultoSimilar($bulto,$manifiesto)\n {\n $sql=<<<sql\n select bul_ref\n from manembxbulto\n where manemb_id=$manifiesto\nsql;\n\n $rs=&$this->con->Execute($sql);\n $cad=\"\";\n $sep=\",\";\n while(!$rs->EOF)\n {\n $cad.=\"'\".$rs->fields[0].\"'\".$sep;\n $rs->MoveNext();\n }\n \n //recuperar bultos quedados de igual origen y destino\n $oManEmb=new c_manifiesto_embarque($this->con,$this->usu_audit);\n $oManEmb->info($manifiesto);\n $sql=<<<sql\n select distinct(bq.bul_ref)\n from manembxbultoqueda bq, manembxbultoreal br\n where\n bq.bul_ref<>br.bul_ref\n and bq.manemb_id in \n (\n select distinct manemb_id from manifiesto_embarque\n where manemb_origen='$oManEmb->manemb_origen' and manemb_destino='$oManEmb->manemb_destino' ) \nsql;\n $rs=&$this->con->Execute($sql);\n while(!$rs->EOF)\n {\n $cad.=\"'\".$rs->fields[0].\"'\".$sep; \n $rs->MoveNext(); \n }\n $cad=substr($cad,0,(strlen($cad)-1));\n return($cad);\n }", "public function data_blok()\n {\n $data = ['aktif' => 'blok',\n 'data_blok' => $this->M_prospektus->tampil_data_blok(),\n 'kawasan' => $this->M_prospektus->get_data_kawasan()->result_array()\n ];\n\n $this->template->load('template','prospektus/V_data_blok', $data);\n }", "function logo ()\n {\n global $connection;\n $sql = \"SELECT * FROM slike_logo sl ORDER BY sl.putanja_logo DESC LIMIT 0,1\";\n $sum = $connection->query($sql)->fetchAll();\n foreach($sum as $item) :\n echo \"<a href='index.php?page=pocetna'><img src=$item->putanja_logo alt=$item->ime_slike title='NanoSoft DeLux' width='177' height='106'/></a>\";\n endforeach;\n }", "public function bersuara()\n {\n return \"DARAWET ANJING DAWET\";\n }", "private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}", "function blocs_BarreTypo($tr) {\r\n\treturn $tr.'<tr><td>'._T('couteauprive:blocs:nom').' (en projet)</td></tr>';\r\n}", "function get_arbo($id_pere, $Indic, $Level, $id_item, $BgColor, $Mode=0, $ShowInd=0, $ShowNum=0, $FilterNum=\"\", $sql_filter=\"\", $with_user_rights=1) {\r\n\tglobal $nb, $txt_color_lien, $nb_table;\r\n\tglobal $idItem, $table_style, $navID;\r\n\tglobal $ses_profil_user, $arr_user_nav_right;\r\n \r\n\t$nb++;\r\n\r\n\t$StrSQLFils = \"Select id__nav, COALESCE( tn._nav, _nav._nav ) as _nav, selected,_type_nav.libelle from \"._CONST_BO_CODE_NAME.\"nav\";\r\n\t//Patch SBA pour la gestion mutlilingue\r\n\t$StrSQLFils.= \" LEFT JOIN trad__nav tn on tn.id__\"._CONST_BO_CODE_NAME.\"nav = _nav.id__nav and tn.id__langue = \".$_SESSION['ses_langue'];\r\n\t// Patch DRO : Affichage des type de nav\r\n\t$StrSQLFils .= \" LEFT JOIN _type_nav ON _type_nav.id__type_nav = _nav.id__type_nav\";\r\n\t\r\n\t$StrSQLFils .= \" where id_\"._CONST_BO_CODE_NAME.\"nav_pere = \".$id_pere;\r\n\t$StrSQLFils .= $sql_filter;\r\n\t\r\n\t$hsv = get_hsv_color($BgColor);\r\n\t$txt_color_lien = \"LienNoir\";\r\n\t$FontColorStyle = \"color=black\";\r\n\r\n\tif (($Mode==1 || $Mode==3) && $Level==0) {\r\n\r\n\t\tif ($Mode==3) { ?>\r\n\t\t\t<script language=\"JavaScript\">\r\n\t\t function expand_and_collapse(mode) {\r\n\t\t\t if (document.all) {\r\n\t\t\t \tfor (var i=0; i < document.all.length; i++) {\r\n\t\t\t \tif (document.all(i).tagName == 'TABLE' && document.all(i).id != '') {\r\n\t\t\t \tif (mode=='expand') {\r\n\t\t\t \tdocument.all(i).style.display = 'block';\r\n\t\t\t }else {\r\n\t\t\t\t\t\t\t\tif (document.all(i).id.substring(document.all(i).id.lastIndexOf(\"_\")+1, document.all(i).id.length) > 1) {\r\n\t\t\t \tdocument.all(i).style.display = 'none';\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t\t\t}else if (document.all(i).tagName == 'IMG' && document.all(i).id != '') {\r\n\t\t\t if (mode=='expand') {\r\n\t\t\t\t\t\t\t\tdocument.all(i).src = 'images/moins.gif';\r\n\t\t\t }else {\r\n\t\t\t\t\t\t\t\tif (document.all(i).id.substring(document.all(i).id.lastIndexOf(\"_\")+1, document.all(i).id.length) > 1) {\r\n\t\t\t \tdocument.all(i).src = 'images/plus.gif';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t </script>\r\n\t \t<table cellspacing=\"1\" cellpadding=\"2\" border=\"0\" width=\"250\">\r\n\t <tr><td colspan=\"2\"></td><td align=\"right\">\r\n\t <table border=\"0\" cellpadding=\"1\" cellspacing=\"0\">\r\n\t <tr>\r\n\t <td>&nbsp;<img style=\"cursor:pointer\" alt=\"Fermer tous\" onClick=\"expand_and_collapse('collapse')\" hspace=10 src='images/moins.gif'>\r\n\t <img style=\"cursor:pointer\" alt=\"Ouvrir tous\" onClick=\"expand_and_collapse('expand')\" hspace=10 src='images/plus.gif'>\r\n\t\t\t</td>\r\n\t </tr>\r\n\t </table>\r\n\t </td></tr>\r\n<?\r\n\t $traitement_fin = \"</table>\";\r\n\t\t}else { ?>\r\n\t\t\t<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\">\r\n\t\t\t<tr>\r\n\t\t\t<td bgcolor=\"<?=$BgColor?>\">\r\n\t\t\t<b style=\"<?=$FontColorStyle?>\" >Arborescence du site</b>\r\n\t\t\t</td>\r\n\t\t\t</tr>\r\n<?\t\t\t$traitement_fin = \"</table>\";\r\n\t\t}\r\n\t}\r\n\r\n\tif ((($Mode==1 || $Mode==3))&&($_SESSION['ses_profil_user']>2)) {\r\n\t\t$StrSQLFils .= \" and \"._CONST_BO_CODE_NAME.\"nav.selected=1\";\r\n\t}\r\n\t// Patch DRO : Affichage des type de nav\r\n\t$StrSQLFils .= \" ORDER BY _type_nav.ordre, _nav.ordre, id_\"._CONST_BO_CODE_NAME.\"nav\";\r\n\t//$StrSQLFils .= \" order by ordre, id_\"._CONST_BO_CODE_NAME.\"nav\";\r\n\r\n\t//echo($StrSQLFils);\r\n\r\n//\t*** => Execution de la requete\r\n\t$RstMessageFils = mysql_query($StrSQLFils);\r\n\r\n\tif (mysql_num_rows($RstMessageFils)) {\r\n\t\t$Level++; //On compte les niveau\r\n\r\n\t\tif ($Mode==3) { \r\n\t\t\t$nb_table++;\r\n\t\t\techo \"<tr><td valign=top></td><td colspan=2 width='100%'>\\n\\n<table id='table_\".$nb_table.\"_\".$Level.\"' \".$table_style.\" border=0 cellpadding=0 cellspacing=1 bgcolor=\\\"\".get_inter_color($BgColor,0.5).\"\\\" width='100%'>\";\r\n\t }\r\n\t\r\n\t\tfor ($i=1;$i<=@mysql_num_rows($RstMessageFils);$i++) {\r\n\t\t\t$id_bo_nav = mysql_result($RstMessageFils,$i-1,\"id_\"._CONST_BO_CODE_NAME.\"nav\");\r\n\t\t\t\r\n\t\t\t//SBA 061229 \r\n\t\t\t$url_page = get_url_nav_bo($id_bo_nav);\r\n\t\t\t//$url_page = (mysql_result($RstMessageFils,$i-1,\"url_page\")!=\"\"?mysql_result($RstMessageFils,$i-1,\"url_page\"):_URL_PAGE_PAR_DEFAUT);\r\n\t\t\t$nom = $ArrayPuce[$Level].\"&nbsp;\";\r\n\t \t\r\n\t\t\t// affichage des menus non selectionné comme affiché pour l'admin\r\n\t\t\t$cache=0;\r\n\t\t\tif ((mysql_result($RstMessageFils,$i-1,\"\"._CONST_BO_CODE_NAME.\"nav.selected\"))==0) {\r\n\t\t\t\t$cache=1;\r\n\t\t\t\tif ($Mode!=0) {\r\n\t\t\t\t\t$nom.=\"<i><u>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t \t\r\n\t\t\t$nom.=(coupe_espace(@mysql_result($RstMessageFils,$i-1,\"\"._CONST_BO_CODE_NAME.\"nav\"),60));\r\n\t\t\t\t\r\n\t\t\tif (((mysql_result($RstMessageFils,$i-1,\"\"._CONST_BO_CODE_NAME.\"nav.selected\"))==0)&&($Mode!=0)) {\r\n\t\t\t\t$nom.=\"</u></i>&nbsp;&nbsp;<img src='images/pasvu.gif' width=17 height=14 border=0 valign=baseline alt='Non visible'>\";\r\n\t\t\t\t$cache=1;\r\n\t\t\t}\r\n\t \r\n\t\t\tif (is_array($id_item) && in_array($id_bo_nav,$id_item)) {\r\n\t\t\t\t$Selected = \"Selected\";\r\n\t\t\t}elseif ($id_bo_nav == $id_item) {\r\n\t\t\t\t$Selected = \"Selected\";\r\n\t\t\t}else {\r\n\t\t\t\t$Selected = \"\";\r\n\t\t\t}\r\n\t\r\n\t\t\t$Ind=$Indic.$i.\".\";\r\n\t\r\n\t\t\t//Affichage ou non de l'indentation\r\n\t\t\tif ($ShowInd == 1) {\r\n\t\t\t\t$Indentation = str_repeat(\"&nbsp;&nbsp;\",($Level));\r\n\t\t\t}\r\n\t\r\n\t\t\t//Affichage ou non de la numerotation\r\n\t\t\tif ($ShowNum == 1) {\r\n\t\t $Numerotation = $Ind;\r\n\t\t\t}\r\n\t\r\n\t\t\tif (is_array($arr_user_nav_right) && in_array($id_bo_nav,$arr_user_nav_right)) {\r\n\t\t\t\t$allow = 1;\r\n\t\t\t}elseif ($id_bo_nav == $id_item) {\r\n\t\t $allow = 1;\r\n\t\t\t}else {\r\n\t\t\t\t$allow = 0;\r\n\t\t\t}\r\n\t\r\n //POUR L'ADMINISTRATEUR\r\n if ($_SESSION['ses_profil_user']<=2) \r\n {\r\n\t\t\t\t$allow = 1;\r\n\t\t\t\t$cache=0;\r\n\t\t\t}\r\n\t\r\n\t\t\tif (!$cache) { \r\n\t\t\t\t// ajout du flag with_user_rights\r\n\t\t\t\tif (($Mode==0)||($Mode==4)) {\r\n\t\t\t if (($allow == 1)||($with_user_rights == 0)) {\r\n\t\t\t\t\t\tif ($Mode==0) {\r\n\t\t\t\t\t\t\techo \"<option style=\\\"\".$FontColorStyle.\";background-color:\".$BgColor.\"\\\" value=\".$id_bo_nav.\" \".$Selected.\">\".$Indentation.$Numerotation.$nom.\"</option>\\n\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\techo \"<option style=\\\"\".$FontColorStyle.\";background-color:\".$BgColor.\"\\\" value=\\\"\"._CONST_APPLI_PATH.$url_page.\"\\\" \".$Selected.\">\".$Indentation.$Numerotation.$nom.\"&nbsp;&nbsp;&nbsp;</option>\\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif ($Mode==0) {\r\n\t\t\t\t\t\t\techo \"<optgroup style=\\\"\".$FontColorStyle.\";background-color:\".$BgColor.\"\\\" value=\".$id_bo_nav.\" \".$Selected.\" label=\\\"\".$Indentation.$Numerotation.$nom.\"\\\">\\n\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\techo \"<optgroup style=\\\"\".$FontColorStyle.\";background-color:\".$BgColor.\"\\\" value=\\\"\"._CONST_APPLI_PATH.$url_page.\"\\\" \".$Selected.\" label=\\\"\".$Indentation.$Numerotation.$nom.\"&nbsp;&nbsp;\\\">\\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}elseif ($Mode==2) {\r\n\t\t\t\t\techo \"<option style=\\\"\".$FontColorStyle.\";background-color:\".$BgColor.\"\\\" value=\\\"id_bo_nav=\".$id_bo_nav.\"\\\" \".$Selected.\">\".$Indentation.$Numerotation.$nom.\"</option>\\n\";\r\n\t\r\n\t\t\t\t}elseif ($Mode==3) {\r\n\t\t\t\t\tif ($idItem==$id_bo_nav){\r\n\t\t\t\t\t\t$color = get_reverse_color($MenuBgColor);\r\n\t\t\t\t\t\t$nom = \"<!-- <span class=navActiveState>&gt;</span> -->\".$nom.\"<!-- <span class=navActiveState>&lt;</span> -->\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$color = $BgColor;\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t //Expand and Collapse\r\n\t\t\t\t\t$strsqlfils = \"Select count(*) as nbe from \"._CONST_BO_CODE_NAME.\"nav where id_\"._CONST_BO_CODE_NAME.\"nav_pere = \".intval($id_bo_nav);\r\n\t\t\t\t\t$RS_nbe = mysql_query($strsqlfils);\r\n\t\t\t\t\t$nb_fils = mysql_result($RS_nbe,0,\"nbe\");\r\n\t\t\r\n\t\t\t\t // on determine si le niveau courant a au moins 1 fils autorisé pour le user connecté\r\n\t\t\t\t // cela permet de determiner si il faut dérouler l'arbo ou pas\t \r\n\t\t\t \r\n\t\t\t unset($has_a_fils_allowed);\t \r\n\t\t\t\t $has_a_fils_allowed = 0;\r\n\t\t\t \t \t \r\n\t\t\t\t $childID = Array();\r\n\t\t\t\t $array_fils = Array();\r\n\t\t\t \r\n\t\t\t\t reset($childID);\r\n\t\t\t\t reset($array_fils);\r\n\t\t\t \r\n\t\t\t\t unset($GLOBALS['array_fils']);\r\n\t\t\t \t \r\n\t\t\t\t $childID = get_bo_item_fils($id_bo_nav); \t \t \r\n\t\t\t\t \t\t \t\t \r\n\t\t \t\t for ($r=0; $r < count($childID) ;$r++) {\r\n\t\t\t\t\t\tif (in_array($childID[$r],$arr_user_nav_right) ) {\r\n\t\t\t\t\t\t\t$has_a_fils_allowed=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tunset($childID);\r\n\t\t\t\t\tunset($GLOBALS['array_fils']);\r\n\t\t\t \r\n\t\t\t\t\tif ( ($Level < 0 || in_array($id_bo_nav, $navID)) || ($_REQUEST['Home']==1) ||( ($_REQUEST['viewTask']==1) && (($allow == 1) || ($has_a_fils_allowed ==1)) ) ) {\r\n\t\t\t\t\t\t$table_style = \"style='display:block'\";\r\n\t\t\r\n\t\t\t\t\t\tif ($nb_fils>0) {\r\n\t\t\t\t $img_collapse = \"<img id='img_nav_\".intval($nb_table+1).\"_\".intval($Level+1).\"' vspace=3 hspace=3 style='cursor:pointer' src='images/moins.gif' border='0' onclick=\\\"switch_img(this);show_item('table_\".intval($nb_table+1).\"_\".intval($Level+1).\"');\\\">\";\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t$img_collapse = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t }else {\r\n\t\t\t\t\t\t$table_style = \"style='display:none'\";\r\n\t\t\r\n\t\t\t\t\t\tif ($nb_fils>0) {\r\n\t\t\t\t\t\t\t$img_collapse = \"<img id='img_nav_\".intval($nb_table+1).\"_\".intval($Level+1).\"' vspace=3 hspace=3 style='cursor:pointer' src='images/plus.gif' border='0' onclick=\\\"switch_img(this);show_item('table_\".intval($nb_table+1).\"_\".intval($Level+1).\"');\\\">\";\r\n\t\t\t\t }else {\r\n\t\t\t\t\t\t\t$img_collapse = \"\";\r\n\t\t\t \t}\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\tif ($allow == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Patch DRO : Affichage des type de nav\r\n\t\t\t\t\t\tif ( $Level == 1 )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif ( $i > 1 )\r\n\t\t\t\t\t\t\t\t$old_type_nav = @mysql_result ( $RstMessageFils, $i-2, \"_type_nav.libelle\" );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t$old_type_nav = \"\";\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$type_nav = @mysql_result ( $RstMessageFils, $i-1, \"_type_nav.libelle\" );\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tif ( $type_nav != $old_type_nav )\r\n\t\t\t\t\t\t\t\techo ( \"<tr><td colspan=\\\"3\\\" class=\\\"type_nav\\\">\".coupe_espace( $type_nav, 60 ).\"</td></tr>\\n\" );\r\n\t\t\t\t\t\t}\t\r\n\r\n\t\t\t\t\t\techo \"<tr><td style=\\\"color:black\\\" bgcolor=\\\"\".$color.\"\\\" align=center valign=top >\".$img_collapse.\"</td><td style=\\\"color:black\\\" bgcolor=\\\"\".$color.\"\\\" align=left valign=top >\".$Numerotation.\"</td><td style=\\\"color:black\\\" bgcolor=\\\"\".$color.\"\\\" width='100%'>\".\"&nbsp;\".$Indentation.\"\".\"<a href=\\\"bo.php?TableDef=3&idItem=\".$id_bo_nav.\"\\\" class=\\\"\".$txt_color_lien.\"\\\">\".str_replace(\"&nbsp;\",\"\",$nom).\"</a></td></tr>\\n\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\techo \"<tr><td style=\\\"color:#6E6E6E\\\" bgcolor=\\\"\".$color.\"\\\" align=center valign=top >\".$img_collapse.\"</td><td style=\\\"color:#6E6E6E\\\" bgcolor=\\\"\".$color.\"\\\" align=left valign=top >\".$Numerotation.\"</td><td style=\\\"color:#6E6E6E\\\" bgcolor=\\\"\".$color.\"\\\" width='100%'>\".\"&nbsp;\".$Indentation.str_replace(\"&nbsp;\",\"\",$nom).\"</td></tr>\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\techo \"<tr><td style=\\\"\".$FontColorStyle.\"\\\" bgcolor=\\\"\".$BgColor.\"\\\" nowrap>\".$Indentation.$Numerotation.$nom.\"</td></tr>\\n\";\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tget_arbo($id_bo_nav, $Ind, $Level, $id_item, get_inter_color($BgColor,0.6), $Mode, $ShowInd, $ShowNum, $FilterNum, $sql_filter, $with_user_rights);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t if ($Mode==3) {\r\n\t\t\techo \"</table>\\n\\n</td></tr>\";\r\n\t }\r\n\t}\r\n\r\n\techo $traitement_fin;\r\n}", "function HitungUlangBIPOTPMB($PMBID) {\r\n $pmb = GetFields('pmb', \"KodeID='\".KodeID.\"' and PMBID\", $PMBID, '*');\r\n // Hitung Total BIPOT & Pembayaran\r\n $TotalBiaya = GetaField(\"bipotmhsw bm\r\n left outer join bipot2 b2 on bm.BIPOT2ID = b2.BIPOT2ID\",\r\n \"bm.PMBMhswID = 0 and bm.KodeID = '\".KodeID.\"'\r\n and bm.NA = 'N'\r\n and bm.TahunID = '$pmb[PMBPeriodID]' and bm.PMBID\", $PMBID,\r\n \"sum(bm.TrxID * bm.Jumlah * bm.Besar)\")+0;\r\n $TotalBayar = GetaField('bayarmhsw',\r\n \"PMBMhswID = 0 and KodeID = '\".KodeID.\"'\r\n and NA = 'N'\r\n and TahunID = '$pmb[PMBPeriodID]' and PMBID\", $PMBID,\r\n \"sum(Jumlah)\")+0;\r\n // Update data PMB\r\n $s = \"update pmb\r\n set TotalBiaya = $TotalBiaya,\r\n TotalBayar = $TotalBayar\r\n where KodeID = '\".KodeID.\"'\r\n and PMBID = '$PMBID' \r\n limit 1\";\r\n $r = _query($s);\r\n //echo \"<pre>$s</pre>\";\r\n}", "function phpmv_ajouterBoutons($boutons_admin) {\n\t\tif ($GLOBALS['connect_statut'] == \"0minirezo\" && $GLOBALS[\"connect_toutes_rubriques\"]\n\t\tAND $GLOBALS[\"options\"]==\"avancees\") {\n\t\t\tif ($GLOBALS['meta'][\"activer_statistiques\"] == 'non') {\n\t\t\t\t$start = array_slice($boutons_admin,0,4);\n\t\t\t\t$end = array_slice($boutons_admin,4);\n\t\t\t\t// pas de stat SPIP -> creer le menu\n\t\t\t\t$start['statistiques_visites']=\n\t\t\t\t new Bouton('statistiques-48.png', 'icone_statistiques_visites','?exec=phpmv');\n\t\t\t\t$boutons_admin = array_merge($start,$end);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$boutons_admin['statistiques_visites']->sousmenu[\"phpmv\"]= new Bouton(\n\t\t\t\t\"../\"._DIR_PLUGIN_PHPMV.\"img_pack/phpmv-logo.png\", // icone\n\t\t\t\t_L(\"PHPMyVisites\") //titre\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $boutons_admin;\n\t}", "public function eedijalan($bau){\n return $bau.' banget';\n }", "function siguienteEstadoBoleta(){\r\n $this->procedimiento='leg.ft_boleta_garantia_dev_ime';\r\n $this->transaccion='LG_POBODEV_IME';\r\n $this->tipo_procedimiento='IME';\r\n \r\n //Define los parametros para la funcion\r\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4'); \r\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\r\n\t\t$this->setParametro('id_anexo','id_anexo','int4');\r\n\t\t\r\n\t\t\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "public function test_medio_boleto_trasbordo_normal(){\n $tiempo = new Tiempo();\n $tiempo->avanzar(36000);\n $medio_boleto = new Tarjeta_Medio_Boleto( Null );\n $colectivo = new Colectivo( 'mixta', '133', 420 );\n $colectivo2 = new Colectivo( 'mixta', '102', 421 );\n\t\t\n $medio_boleto->recargar( 50.0 );\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n\t\t\n $this->assertEquals( $boleto->getValor() , $this->getCostoMedioBoleto() );\n\t\t\n $tiempo->avanzar( 300 );\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo2 , $tiempo );\n $this->assertEquals( $boleto->getValor(), $this->getCostoTransbordo() );\n }", "public static function BaoCaoTheoDanhGia($tu_ngay,$den_ngay,$diaBanIdAllArray,$loai_baocao)\n {\n $tuNgay = DonThuTable::ConvertFormatDate($tu_ngay);\n $denNgay = DonThuTable::ConvertFormatDate($den_ngay);\n\n if($loai_baocao ==\"KhieuNai\")\n {\n $donthu_id = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->where('loaidon',1)\n ->pluck('donthuid');\n }\n else\n {\n $donthu_id = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->where('loaidon',2)\n ->pluck('donthuid');\n }\n\n\n //data dung\n\n $data_dung_id = DB::table('ketquagiaiquyet')\n ->whereIn('donthuid',$donthu_id)\n ->where('danhgiadonthu',DUNG)\n ->pluck('donthuid');\n\n $data_dung = DB::table('donthu')\n ->whereIn('donthuid',$data_dung_id)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n ->get();\n\n //dung mot phan\n $data_motphan_id = DB::table('ketquagiaiquyet')\n ->whereIn('donthuid',$donthu_id)\n ->where('danhgiadonthu',DUNG_MOT_PHAN)\n ->pluck('donthuid');\n\n $dung_mot_phan = DB::table('donthu')\n ->whereIn('donthuid',$data_motphan_id)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n ->get();\n\n //data sai\n $data_sai_id = DB::table('ketquagiaiquyet')\n ->whereIn('donthuid',$donthu_id)\n ->where('danhgiadonthu',SAI)\n ->pluck('donthuid');\n\n $data_sai = DB::table('donthu')\n ->whereIn('donthuid',$data_sai_id)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n ->get();\n\n $array_danhgia = array(\n 'dung'=>$data_dung,\n 'dung_mot_phan'=>$dung_mot_phan,\n 'sai'=>$data_sai\n );\n\n return $array_danhgia;\n }", "public function test_medio_boleto_trasbordo_plus(){\n $tiempo = new Tiempo();\n $tiempo->avanzar( 36000 );\n $medio_boleto = new Tarjeta_Medio_Boleto( Null );\n $colectivo = new Colectivo( 'mixta', '133', 420 );\n $colectivo2 = new Colectivo( 'mixta', '102', 421 );\n $medio_boleto->recargar( 50.0 );\n\t\t\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n $this->assertEquals( $boleto->getValor(), $this->getCostoMedioBoleto() );\n\t\t\n $medio_boleto->gastarPlus();\n $medio_boleto->gastarPlus();\n $tiempo->avanzar( 300 );\n\t\t\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo2 , $tiempo );\n $this->assertEquals( $boleto->getValor(), $this->getCostoViaje()*2 );\n }", "function bestillingAvBrod($type, $antall, $tidspunkt){\r\n //Kunden får oversikt over alle brøene som er tilgjengelig\r\n\r\n //kunden får oversikt over hvor mange brød man kan bestillinger\r\n\r\n //Kunden velger tidspunkt nå brød skal hentes.\r\n\r\n //Informasjon sendes mot database i tabellen som man trenger.\r\n }", "function ler($nome) {\n $x = 1;\n\t while($x < $this->bd[0][0] && !$this->str_igual($nome, $this->bd[$x][2])) {$x++;}\n if($x >= $this->bd[0][0]) {return 0;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\nreturn 1;\n }", "public function get_barbe(){ return $this->_barbe;}", "public function buscarInstrucoesDoBoleto($arrDados)\n {\n\n\t\t$db = new Database();\n\t\t$arrRetorno = array();\n\t\t$strSQL = '';\n\t\t$this->instrucoes = array('');\n\t\tif($this->status != 'Atrasado'){\n\t\t \n\t\t $desc = $this->desconto;\n\t\t $desc = str_replace(',','.',$desc);\n\t\t \n\t\t // if((float)$desc > 0){\n\t\t // $this->instrucoes[] = 'At� o vencimento, desconto de '.String::formataMoeda($this->desconto); \n\t\t // }\n\t\t\t\n\t\t\t//$this->instrucoes[] = utf8_decode('Em qualquer banco at� o vencimento');\n\t\t\t\n\t\t\t$strSQL = \"SELECT ecm.PERCENTUAL AS ind_multa,\n\t\t\t\t\t\teci.PROPORCIONAL AS ind_comissao,\n\t\t\t\t\t\teci.DATAVIGOR\n\t\t\t\t\t\tFROM GVDASA.FIN_ESTRUTURCORRECAO ec\n\t\t\t\t\t\tINNER JOIN GVDASA.FIN_TIPOTITULO tti ON tti.CODIGOESTRUTURACORRECAO = ec.CODIGOESTRUTURACORRECAO\n\t\t\t\t\t\tINNER JOIN GVDASA.FIN_TITULO titu ON tti.CODIGOTIPOTITULO = titu.CODIGOTIPOTITULO\n\t\t\t\t\t\tINNER JOIN GVDASA.FIN_ESTRMULTA ecm ON ecm.CODIGOESTRUTURACORRECAO = ec.CODIGOESTRUTURACORRECAO\n\t\t\t\t\t\tINNER JOIN GVDASA.FIN_ESTRINDICE eci ON eci.CODIGOESTRUTURACORRECAO = ec.CODIGOESTRUTURACORRECAO\n\t\t\t\t\t\twhere titu.CODIGOTITULO = \".$arrDados['TITULO'];\n\t\t\t// Executa a consulta\n\t\t\t$arrRetorno = $db->querySqlServer($strSQL,'consultar','fetchRow');\n\n\t\t\t$valorMulta = number_format((($this->valor * (int)$arrRetorno['ind_multa']) / 100),2); \n\t\t\t$jurosDiario = number_format(((((int)$arrRetorno['ind_comissao']/30) * $this->valor)/100),2);\n\t\t\t\n\t\t\t// Monta mensagem a ser enviada\n\t\t\t$msg = \"Após vencimento cobrar multa de R$ \".$valorMulta.\" + juros diário de R$ \".$jurosDiario.\" + IGPM\";\n\t\t\t$msg .= \"<br>\";\n\t\t\t$msg .= \"Este título está disponível no portal acadêmico, acesse https://portal.unilasalle.edu.br\";\n\t\t\t$msg .= \"<br>\";\n\t\t\t$msg .= \"Pelo portal acadêmico efetue a emissão e atualização do boleto. Maiores informações (51) 3476-8500\";\n\t\t\t$msg .= \"<br>\";\n\t\t\t$msg .= \"Sr CAIXA não aceitar este título após \".$arrDados['DATA_LIMITE_PAG'];\n\t\t\t//$msg = utf8_decode($msg);\n\t\t\t// Insere no Array\n\t\t\tarray_push($this->instrucoes,$msg);\n\t\t}\n\n\t\tif($this->status == 'Atrasado'){\n\t\t\t// Monta mensagem a ser enviada\n\t\t\t$msg = \"Não receber após \".$this->dataVencimento->format('d/m/Y');\n\t\t\t$msg .= \"<br>\";\n\t\t\t$msg .= \"Vencimento original: \".$this->vencimentoParcela->format('d/m/Y');\n\t\t\t//$msg = utf8_decode($msg);\n\t\t\t// Insere no Array\n\t\t\tarray_push($this->instrucoes,$msg);\n\t\t}\t\n\t}", "public function ulB(){ return $this->ulB; }", "function draw_y ($image, $black, $grey, $light_grey, $tab) // affiche les infos de l'axe des ordonnees\n\t{\n\t\tImageTTFText ($image, 10, 0, 3, 20, $grey, $this->path, $this->yname);\n\n\t\t//l'origine\n\t\tImageTTFText ($image, 10, 0, 0, $this->y(0) + 3, $black, $this->path, 0);\n\n\t\t$nb_draw = floor($this->ref_height / 30);\n\t\t$i = $this->max_y / $nb_draw;\n\t\t$stop = $nb_draw * $i;\n\n\t\t// affiche les reperes en fonction de la hauteur de l'axe\n\t\t$compt = 0;\n\t\twhile($i <= $stop)\n\t\t{\n\t\t\t$compt++;\nimageline($image, $this->x(0) - 5, $this->y($i), $this->x(0), $this->y($i), $black);\nimageline($image, $this->x(0) + 1, $this->y($i), $this->pic_width - 30, $this->y($i), $light_grey);\nImageTTFText ($image, 10, 0, 0, $this->y($i) + 3, $black, $this->path, $i);\n\t\t\t$i += $this->max_y / $nb_draw;\n\t\t\t\n\t\t}\n\t\tif ($compt == 1)\n\t\t{\n\t\t\t$i -= $this->max_y / $nb_draw;\nimageline($image, $this->x(0) - 5, $this->y($i/2), $this->x(0), $this->y($i/2), $black);\nimageline($image, $this->x(0) + 1, $this->y($i/2), $this->pic_width - 30, $this->y($i/2), $light_grey);\nImageTTFText ($image, 10, 0, 0, $this->y($i/2) + 3, $black, $this->path, $i/2);\n\t\t}\n\t}", "function stocks_pre_boucle($boucle) {\n $id_table = $boucle->id_table;\n\n //Savoir si on consulté la table organisations_liens\n if ($jointure = array_keys($boucle->from, 'spip_stocks')) {\n //Vérifier qu'on est bien dans le cas d'une jointure automatique\n if (isset($boucle->join[$jointure[0]])\n and isset($boucle->join[$jointure[0]][3])\n and $boucle->join[$jointure[0]]\n and $boucle->join[$jointure[0]][3]\n ) {\n //Le critere ON de la jointure (index 3 dans le tableau de jointure) est incompléte\n //on fait en sorte de retomber sur ses pattes, en indiquant l'objet à joindre\n $boucle->join[$jointure[0]][3] = \"'L1.objet='.sql_quote('\".objet_type($id_table).\"')\";\n\t\t}\n }\n\n return $boucle;\n}", "function barra($nombre, $porcentaje)\n{\n\t$ancho = 1;\n\n\t//LARGO M�IMO\n\t$largo = 10;\n?>\n<table width=\"40%\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#E9E9E9\">\n<tr id=\"trtitulogris\">\n<td colspan=\"2\"><?php echo $nombre; ?></td>\n</tr>\n<tr>\n<td width=\"70%\"><img src=\"../../../../imagenes/punto.gif\" height=\"<?php echo $largo ?>\" width=\"<?php echo $porcentaje ?>%\" style=\"color:#FEF7ED\"></td>\n<td width=\"30%\"><?php echo round($porcentaje,1).\" %\"; ?></td>\n</tr>\n</table>\n<br>\n<?php\n}", "public function get_obat()\n {\n $q = $this->db->get(\"tb_obat\");\n return $q;\n }", "public function test_medio_boleto_trasbordo_CUVP(){\n $tiempo = new Tiempo();\n $tiempo->avanzar( 36000 );\n $medio_boleto = new Tarjeta_Medio_Boleto( Null );\n $colectivo = new Colectivo( 'mixta', '133', 420 );\n $colectivo2 = new Colectivo( 'mixta', '102', 421 );\n\t\t\n $medio_boleto->recargar( 50.0 );\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n\t\t\n $this->assertEquals( $boleto->getValor(), $this->getCostoMedioBoleto() );\n $medio_boleto->gastarPlus();\n\t\t\n $tiempo->avanzar( 300 );\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo2 , $tiempo );\n\t\t\n $this->assertEquals( $boleto->getValor(), $this->getCostoViaje() );\n }", "public function test_medio_boleto_viaje_plus(){\n $tiempo = new Tiempo();\n $tiempo->avanzar(36000);\n $medio_boleto = new Tarjeta_Medio_Boleto( Null );\n $colectivo = new Colectivo( 'mixta', '133', 420 );\n\t\t\n $this->assertEquals( $medio_boleto->getViajesPlus(), 2 );\n\t\t\n $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n $this->assertEquals( $medio_boleto->getViajesPlus(), 1 );\n\t\t\n $medio_boleto->gastarPlus();\n $this->assertEquals( $medio_boleto->getViajesPlus(), 0 );\n\t\t\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n $this->assertEquals( $boleto->getTipoBoleto(), 'Saldo Insuficiente' );\n }", "function barra($nombre, $porcentaje) {\n $ancho = 1;\n\n //LARGO MÍNIMO\n $largo = 10;\n ?>\n <table width=\"50%\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#E9E9E9\">\n <tr id=\"trtitulogris\">\n <td colspan=\"2\"><?php echo $nombre; ?></td>\n </tr>\n <tr>\n <td width=\"70%\"><img src=\"../../../../imagenes/punto.gif\" height=\"<?php echo $largo ?>\" width=\"<?php echo $porcentaje ?>%\" style=\"color:#FEF7ED\"></td>\n <td width=\"30%\"><?php echo round($porcentaje, 1) . \" %\"; ?></td>\n </tr>\n </table>\n <br>\n <?php\n }", "function obtiene_bebidas_menu($valor=1){\n /**\n * guardamos la consulta en $sql obtiene todos las tuplas de la tabla\n * ejecutamos la consulta en php obtenemos una tabla con los resultados\n * en el for convertimos a cada tupla en un objeto y añadimos al array $objetos uno a uno\n * retornamos un array con todas las tuplas como objetos\n */\n try {\n $sql=\"SELECT * FROM \".Bebidas::TABLA[0].\" WHERE tipo = 'zumo' and estado = $valor or tipo = 'refresco_con_gas' and estado = $valor or tipo = 'refresco_sin_gas' and estado = $valor\";\n $resultado=$this->conexion->query($sql);\n $objetos=array();\n\n while ($fila=$resultado->fetch_object()){\n $objetos[]=$fila;\n //echo 'fila = '. var_dump($fila);\n }\n\n /*\n for($x=0;$x<$resultado->field_count;$x++){\n $objetos[$x]=$resultado[$x]->fetch_object();\n }*/\n return $objetos;\n } catch (Exception $ex) {\n echo 'error '.$ex;\n }\n \n \n }", "public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $this->getIme() . \"<br>Prezime: \" . $this->getPrezime() . \"<br>Godina rodjenja: \" . $this->getGodRodj() . \"<br>\";\n }", "public static function AbilitaSbloccate($PG){\n\n\t\t$sbloccate\t\t=$PG->Sbloccate()->get();\n\n\t\t// trova abilità disponibili per l'acquisto\n\t\t$possessed = $PG['Abilita'];\n\t\t// trova le abilità eventualmente escluse da quelle acquistabili da una abilità già posseduta\n\t\t$escluse=array();\n\t\tforeach ($possessed as $pos){\n\t\t\t$escab=$pos->Esclusi;\n\t\t\t$esc=INtools::select_column($escab,'ID');\n\t\t\tforeach ($esc as $escid){\n\t\t\t\tarray_push($escluse,$escid);\n\t\t\t}\n\t\t}\n\t\t$possessed = $possessed->lists('ID');\n\n\t\t$categorie = $PG['Categorie']->lists('Categoria');\n\n\t\t$categorie_poss=$categorie;\n\t\tarray_push($categorie_poss,'Speciali');\n\t\tarray_push($categorie_poss,'Innate');\n\t\tarray_push($categorie_poss,'Spiriti');\n\t\t\n\t\tif (empty($sbloccate)) $sbloccate=array();\n\t\tif (empty($possessed)) $possessed=array();\n\t\tif (empty($categorie)) $categorie=array();\n\t\t$all_ab = Abilita::all();\n\t\t#cartellino potere supplementare, aggiungilo se è già stato preso 1 volta, ma meno di 8 volte.\n\t\tif (in_array(57,$possessed)) {\n\t\t\t$cc=array_count_values($possessed);\n\t\t\t$cart_pot_supl=$cc[57];\n\t\t\t} else {\n\t\t\t\t$cart_pot_supl=0;\n\t\t\t}\n\t\t\t\n\t\tforeach ($all_ab as $ab){\n\n\t\t\t $reqab=$ab->Requisiti;\n\t\t\t $req=INtools::select_column($reqab,'ID');\n\n\t\t\t \n\t\t\t // se l'abilità è nelle categorie giuste, non è già stata\n\t\t\t //acquistata, oppure è stata sbloccata, allora aggiungi alla lista\n\t\t\t if (array_intersect($req,$possessed)==$req &\n\t\t\t\t in_array($ab['Categoria'],$categorie) &\n\t\t\t\t (!in_array($ab['ID'],$possessed) | in_array('Mistiche',$categorie) &$ab['ID']==57 & $cart_pot_supl<8) &\n\t\t\t\t !in_array($ab['ID'],$escluse) ) {\n\t\t\t\t$sbloccate[]=$ab;\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t// controllo se ho le abilità conoscenza profonda //\n\t\t// e confini della conoscenza. In base alla loro descrizione,\n\t\t// aggiungo o meno abilità alla lista\t\t\t\n\t\t$hasConoscProf=in_array(36,$possessed);\n\t\t$hasConoscConf=in_array(37,$possessed);\n\t\t\n\t\t$num_generiche=0;\n\t\t$fuori_categoria=0;\n\t\tforeach ($PG['Abilita'] as $ab){\n\t\t\tif ($ab['Generica']==1 & !in_array($ab['Categoria'],$categorie_poss)){\n\t\t\t\t\t$num_generiche++;\n\t\t\t\t}\n\t\t}\n\t\t\n\t\tforeach ($PG['Abilita'] as $ab){\n\t\t\tif (!in_array($ab['Categoria'],$categorie_poss)){\n\t\t\t\t$fuori_categoria++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// conoscenza profonda\n\t\t$generiche=Abilita::where('Generica','=','1')->get();\n\t\tif ((!$hasConoscProf & $num_generiche<1)|($hasConoscProf & $num_generiche<2)) {\n\t\t\tforeach ($generiche as $ab){\n\t\t\t\tif (!in_array($ab['ID'],$possessed)){\n\t\t\t\t\t$sbloccate[]=$ab;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//confini della conoscenza\n\t\tif (($hasConoscConf & $fuori_categoria<=1)|($hasConoscConf & $hasConoscProf & $fuori_categoria<=2)) {\n\t\t\tforeach ($all_ab as $ab){\n\t\t\t\tif (!in_array($ab['ID'],$possessed) & !in_array($ab['Categoria'],array('Speciali','Innate','Spiriti'))){\n\t\t\t\t\t$sbloccate[]=$ab;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t//converto in un array adatto a un SELECT input\n\t\t$selSbloccate=array();\n\t\tforeach($sbloccate as $sbloccata){\n\t\t\t$selSbloccate[$sbloccata->ID]=$sbloccata->Ability.' ('.$sbloccata->PX.'px)';\n\t\t\t}\n\t\treturn INtools::array_unshift_assoc($selSbloccate,'0','');\n\t}", "public function bExamen_l(){\r\n\t\t $c=0;\r\n $sql=\"select * from texamen where descripcion like'$this->descripcion%' and tipo='LABORATORIO' \";\r\n\t\t$cursor=parent::ejecuta_sql($sql);\t\t \r\n\t\tif($row= parent::proxima_tupla($cursor))\r\n\t\t {\r\n\t\t\t DO{\r\n\t\t\t \t$fila[$c][1]=$row[\"id_examen\"];\r\n\t\t\t\t$fila[$c][2]=$row[\"descripcion\"];\r\n\t\t\t\t$fila[$c][3]=$row[\"tipo\"];\r\n\t\t\t\t$c++;\r\n\t\t\t\t}while($row= parent::proxima_tupla($cursor));\r\n\t\t }\t\t\r\n\t\tif ( $fila>0 )\r\n\t\t\treturn $fila;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t\t\t\r\n\t\t\tparent::cerrar_bd();\r\n }", "public static function BaoCaoTheoLoaiDon($tu_ngay,$den_ngay,$diaBanIdAllArray,$donthu)\n {\n $tuNgay = DonThuTable::ConvertFormatDate($tu_ngay);\n $denNgay = DonThuTable::ConvertFormatDate($den_ngay);\n\n $phanloai = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->get();\n\n $loaidon = DB::table('loaidon')->get();\n\n $bao_cao_theo_loai_don = array();\n for($i = 0;$i <count($loaidon);$i++)\n {\n $loaidon_id = $loaidon[$i]->loaidonid;\n $loaidon_name = $loaidon[$i]->tenloaidon;\n\n $count_have =0;\n $count_dif =0;\n $bao_cao_da_phan_loai = array();\n $bao_cao_chua_phan_loai = array();\n for($j = 0;$j<count($phanloai);$j++)\n {\n $ngaynhan = $donthu[$j]->ngaynhan;\n if($tuNgay<=$ngaynhan && $ngaynhan<=$denNgay)\n {\n if($phanloai[$j]->loaidon == $loaidon_id)\n {\n $bao_cao_da_phan_loai[$count_have] = $donthu[$j];\n $count_have++;\n }\n elseif($phanloai[$j]->loaidon == null)\n {\n $bao_cao_chua_phan_loai[$count_dif] = $donthu[$j];\n $count_dif++;\n }\n }\n }\n $bao_cao_theo_loai_don[$i] = array(\n 'loaidon_id'=>$loaidon_id,\n 'ten_loaidon'=>$loaidon_name,\n 'sodon_co_loaidon'=>$count_have,\n 'sodon_chua_co_loaidon'=>$count_dif,\n 'donthu_co_loaidon'=>$bao_cao_da_phan_loai,\n 'donthu_chua_co_loaidon'=>$bao_cao_chua_phan_loai\n );\n }\n\n return $bao_cao_theo_loai_don;\n }", "public function Atak ($obronca){\n\t\t\t\n\t\t\t$agility = $obronca->getAgility();\n\t\t\t\n\t\t\tif ($obronca->getDefense()){ //warunek sprawdzający, czy gracz użył obrony\n\t\t\t\t$agility *= 1.5; //zwiększenie zręczności o 50% \n\t\t\t\t$obronca->setDefense(false); //wyłączenie obrony (w następnej turze zręczność będzie wynosiła 100% maksymalnej wartości)\n\t\t\t}\n\t//określenie współczynnika skuteczności ataku\t\t\n\t\t\t$sk = (($this->getAgility() - $agility) / $agility ) * 100;\n\t\t\t\t\n\t\t\t\tif ($sk>90) //ograniczenie skrajności (nie będzie mniej niż 10% a więcej niż 90%)\n\t\t\t\t\t$sk=90;\n\t\t\t\telse if($sk<10)\n\t\t\t\t\t$sk=10;\n\t\t\t\t\n\t//warunek odpowiedzialny za skuteczność ataku. \n //jeśli skuteczność ataku jest większa lub równa wylosowanej liczbie to atak się powiedzie \t\n\t\t\t\tif ($sk>=rand(1,100)){\n\t\t\t\t\t$obronca->setHP($obronca->getHP()-$this->getStrength());\n\t\t\t\t\techo 'Atak sie powiodl, zabral '.$this->getStrength().' HP, pozostalo zycia '.$obronca->getHP().' z '.$obronca->getMaxHP().'.', PHP_EOL;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo \"Atak chybil o wlos!\", PHP_EOL;\n\t\t\t\t\n\t\t\t$this->setPunktyAkcji($this->getPunktyAkcji()-1);\t //zmniejsze punktów akcji o 1 (koszt ataku)\n\t\t}", "public function alimentar()\n {\n }", "function cariPosisi($batas){\nif(empty($_GET['halgalerifoto'])){\n\t$posisi=0;\n\t$_GET['halgalerifoto']=1;\n}\nelse{\n\t$posisi = ($_GET['halgalerifoto']-1) * $batas;\n}\nreturn $posisi;\n}", "function listarBoletaGarantiaDevuelta(){\r\n\t\t$this->procedimiento='leg.ft_boleta_garantia_dev_sel';\r\n\t\t$this->transaccion='LG_POBODEV_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\t\t\t\t\r\n\t\t$this->captura('id_anexo','int4');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('agencia','varchar');\r\n\t\t$this->captura('nro_documento','varchar'); \r\n\t\t$this->captura('fecha_desde','date');\r\n\t\t$this->captura('fecha_fin_uso','date');\r\n\t\t$this->captura('moneda','varchar');\r\n\t\t$this->captura('asegurado','numeric');\r\n\t\t$this->captura('estado','varchar');\r\n\t\t$this->captura('codigo_noiata','varchar');\r\n\t\t$this->captura('codigo','varchar');\r\n\t\t$this->captura('fecha_hasta','date');\r\n\t\t$this->captura('fecha_corte','date');\r\n\t\t$this->captura('codigo_int','varchar');\r\n\t\t$this->captura('fecha_notif','date');\r\n\t\t$this->captura('tipo','varchar');\r\n\t\t$this->captura('numero','varchar');\r\n\t\t$this->captura('tipo_agencia','varchar');\r\n\t\t$this->captura('banco','varchar');\r\n\t\t$this->captura('usr_reg','varchar');\r\n\t\t$this->captura('usr_mod','varchar');\r\n\t\t$this->captura('id_usuario_reg','int4');\r\n\t\t$this->captura('id_usuario_mod','int4');\r\n\t\t$this->captura('observaciones','text');\r\n\t\t$this->captura('id_agencia','int4');\r\n\t\t$this->captura('estado_contrato','varchar');\r\n\t\t$this->captura('id_proceso_wf','integer');\r\n\t\t$this->captura('id_estado_wf','integer');\r\n\t\t$this->captura('nro_hoja_ruta','integer');\r\n\t\t$this->captura('id_contrato','integer');\r\n\t\t$this->captura('id_gestion','integer');\r\n\t\t$this->captura('gestion','integer');\r\n\t\t$this->captura('id_proveedor','integer');\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\t\t\r\n\t\t//echo($this->consulta);exit;\r\n\t\t$this->ejecutarConsulta();\r\n\t\t\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "public static function generarCodBarras()\n {\n $ultimocod = Producto::orderBy(\"codigobarra\", \"DESC\")->first()->codigobarra;\n if ($ultimocod == null && strlen($ultimocod) == 0) {\n $ultimocod = 0;\n }\n $ultimocod++;\n $lista = Producto::where(\"codigobarra\", \"=\", \"\")->orderBy(\"nombre\", \"ASC\")->get();\n foreach ($lista as $key => $producto) {\n $producto->codigobarra = str_pad($ultimocod, 5, '0', STR_PAD_LEFT);\n $producto->barcode = DNS1D::getBarcodeHTML($producto->codigobarra, 'C128', 2, 40, 'black');\n $producto->save();\n $ultimocod++;\n }\n }", "public function listeBatiments()\n\t{\n\t\t$adapter = $this->tableGateway->getAdapter ();\n\t\t$sql = new Sql ( $adapter );\n\t\t$select = $sql->select ();\n\t\t$select->from(array('bat'=>'batiment'));\n\t\t$select->columns(array ('IdBatiment'=>'id_batiment', 'IdSalle'=>'intitule'));\n\t\t$select->join(array('s'=>'salle'), 's.id_batiment = bat.id_batiment', array('*'));\n\t\t$select->join(array('l'=>'lit'), 'l.id_salle = s.id_salle', array('*'))\n\t\t->where(array('disponible'=> 0));\n\t\t$select->order('bat.id_batiment ASC');\n\t\t$stmt = $sql->prepareStatementForSqlObject($select);\n\t\t$result = $stmt->execute();\n\t\tforeach ($result as $data) {\n\t\t\t$options[$data['IdBatiment']] = $data['IdSalle'];\n\t\t}\n\t\treturn $options;\n\t}", "public function rebobinar() {\n\t\treturn $this->irA(0);\n\t}", "public function bExamen_e(){\r\n\t\t $c=0;\r\n $sql=\"select * from texamen where descripcion like'$this->descripcion%' and tipo='ESPECIALES' \";\r\n\t\t$cursor=parent::ejecuta_sql($sql);\t\t \r\n\t\tif($row= parent::proxima_tupla($cursor))\r\n\t\t {\r\n\t\t\t DO{\r\n\t\t\t \t$fila[$c][1]=$row[\"id_examen\"];\r\n\t\t\t\t$fila[$c][2]=$row[\"descripcion\"];\r\n\t\t\t\t$fila[$c][3]=$row[\"tipo\"];\r\n\t\t\t\t$c++;\r\n\t\t\t\t}while($row= parent::proxima_tupla($cursor));\r\n\t\t }\t\t\r\n\t\tif ( $fila>0 )\r\n\t\t\treturn $fila;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t\t\t\r\n\t\t\tparent::cerrar_bd();\r\n }", "public function berekenInkoopWaarde() {\n //var_dump(['aantal'=>$this->aantal, 'waarde'=>$this->artikel->verkoopprijs]);\n return $this->aantal * $this->artikel->inkoopprijs;\n }", "private function CsomagHozzaadasa()\r\n {\r\n foreach (Lap::Nevkeszlet() as $nev)\r\n {\r\n foreach (Lap::Szinkeszlet() as $szin)\r\n {\r\n $this->lapok[]=new Lap($szin,$nev);\r\n }\r\n }\r\n }", "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}", "public function tampil_data_blok()\n {\n \t$this->db->from('blok as b');\n \t$this->db->join('kawasan as k', 'k.id_kawasan = b.id_kawasan', 'inner');\n\n \treturn $this->db->get();\n }", "function kategoriberatbadan($g, $bb, $tb){\n\tif($g == \"Wanita\"){\n\t\tif(bmi($bb,$tb) < 18 ){\n\t\t\t$ket = \"Under Weight / Kurus dan saran dari kami sebaiknya mulai menambah berat badan dan mengkonsumsi makanan berkarbohidrat di imbangi dengan olah raga.\";\n\t\t}elseif (bmi($bb,$tb) >=18 && bmi($bb,$tb) <=25) {\n\t\t\t$ket = \"Normal Weight / Normal dan berat badan anda termasuk kategori ideal.\";\n\t\t}elseif (bmi($bb,$tb) > 25 && bmi($bb,$tb) <=27) {\n\t\t\t$ket = \"Over Weight / Kegemukan dan anda sudah masuk kategori gemuk. Saran dari kami sebaiknya hindari makanan berlemak dan mulailah meningkatkan olahraga seminggu minimal 2 kali.\";\n\t\t}elseif (bmi($bb,$tb) > 27) {\n\t\t\t$ket= \"Obesitas dan saran dari kami sebaiknya segera membuat program menurunkan berat badan karena anda termasuk kategori obesitas/ terlalu gemuk dan tidak baik bagi kesehatan.\";\n\t\t}\n\t}elseif ($g == \"Pria\") {\n\t\tif(bmi($bb,$tb) < 17 ){\n\t\t\t$ket = \"Under Weight / Kurus dan saran dari kami tambah konsumsi makanan berkalori.\";\n\t\t}elseif (bmi($bb,$tb) >= 17 && bmi($bb,$tb) <=23) {\n\t\t\t$ket = \"Normal Weight / Normal dan selamat berat badan anda termasuk ideal.\";\n\t\t}elseif (bmi($bb,$tb) > 23 && bmi($bb,$tb) <=27) {\n\t\t\t$ket = \"Over Weight / Kegemukan dan harus waspada.\";\n\t\t}elseif (bmi($bb,$tb) > 27) {\n\t\t\t$ket = \"Obesitas dan saran dari kami sebaiknya memulai program menurunkan berat badan agar lebih ideal.\";\n\t\t}\n\t}\nreturn $ket;\n}", "public function bExamen_i(){\r\n\t\t $c=0;\r\n $sql=\"select * from texamen where descripcion like'$this->descripcion%' and tipo='IMAGEN' \";\r\n\t\t$cursor=parent::ejecuta_sql($sql);\t\t \r\n\t\tif($row= parent::proxima_tupla($cursor))\r\n\t\t {\r\n\t\t\t DO{\r\n\t\t\t \t$fila[$c][1]=$row[\"id_examen\"];\r\n\t\t\t\t$fila[$c][2]=$row[\"descripcion\"];\r\n\t\t\t\t$fila[$c][3]=$row[\"tipo\"];\r\n\t\t\t\t$c++;\r\n\t\t\t\t}while($row= parent::proxima_tupla($cursor));\r\n\t\t }\t\t\r\n\t\tif ( $fila>0 )\r\n\t\t\treturn $fila;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t\t\t\r\n\t\t\tparent::cerrar_bd();\r\n }", "function cariPosisi($batas){\nif(empty($_GET['halkategoriberita'])){\n\t$posisi=0;\n\t$_GET['halkategoriberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halkategoriberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function cita_biblica($objeto)\n{\n return $objeto->libro->nombre . ' ' . $objeto->numero_capitulo . ': ' . $objeto->numero_versiculo;\n}", "public function calculManquant()\n {\n $q = 'UPDATE releve_manquant SET mois_complet=\"Abscence Totale\" WHERE status=0';\n $this->pdo->exec($q);\n $query = \"SELECT * FROM releve_manquant where status=1\";\n $prep = $this->pdo->query($query);\n $datas = $prep->fetchAll(\\PDO::FETCH_ASSOC);\n foreach ($datas as $d) {\n $Objdossier = $this->getDoctrine()->getManager()->getRepository('AppBundle:Dossier')\n ->createQueryBuilder('d')\n ->where('d.id = :id')\n ->setParameter('id', $d['dossier_id'])\n ->getQuery()\n ->getOneOrNullResult();\n $complet = $this->getDoctrine()->getRepository('AppBundle:TbimagePeriode')\n ->getAnneeMoisExercices($Objdossier, $d['exercice']);\n $moisc = $complet->ms;\n $moisc = array_reverse($moisc);\n $manq = explode(',', $d['mois']);\n $lib = \"Incomplet\";\n $test1 = true;\n $test2 = true;\n $test3 = true;\n $test4 = true;\n $rest1 = false;\n $rest2 = false;\n $rest3 = false;\n $manq = array_map('trim', $manq);\n if (sizeof($moisc) > 3) {\n if (sizeof($manq) == 1) {\n if (in_array($moisc[0], $manq)) {\n $lib = \"m-1\";\n }\n } else if (sizeof($manq) == 2) {\n if (in_array($moisc[0], $manq) && in_array($moisc[1], $manq)) {\n $lib = \"m-2\";\n }\n } else if (sizeof($manq) == 3) {\n if (in_array($moisc[0], $manq) && in_array($moisc[1], $manq) && in_array($moisc[2], $manq)) {\n $lib = \"m-3\";\n }\n } else if (sizeof($manq) == 4) {\n if (in_array($moisc[0], $manq) && in_array($moisc[1], $manq) && in_array($moisc[2], $manq) && in_array($moisc[3], $manq)) {\n $lib = \"m-4\";\n }\n }\n }\n $q = 'UPDATE releve_manquant SET mois_complet=\"' . $lib . '\" WHERE id=' . $d['id'];\n $this->pdo->exec($q);\n }\n }", "public function luas()\n {\n return $this->panjang * $this->lebar;\n }", "public function bemFoiReavaliacao() {\n\n if ($this->lBemReavaliadao == null) {\n\n $this->lBemReavaliadao = false;\n if ($this->getTotalDeReavaliacoes() > 0) {\n $this->lBemReavaliadao = true;\n }\n }\n return $this->lBemReavaliadao;\n }", "private function butacas_ocupadas($ProximaObraNombre,$ProximaObraMes,$ProximaObraAnyo){\n\t\t//las butacas reservadas de las sesiones en el mes analizado\n\t\t$reservas=Reserva::whereHas('sesion', function ($query) use ($ProximaObraNombre,$ProximaObraMes,$ProximaObraAnyo) {\n \t\t$query->where('nombre_obra', $ProximaObraNombre);\n \t\t$query->where(\"inicio\",\">=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-01\")->where(\"inicio\",\"<=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-31\");\n\t\t})->get();\n\t\t//las butacas bloqueadas aun no reservadas en el mes analizado\n\t\t$butacas=Butaca::whereHas('sesion', function ($query) use ($ProximaObraNombre,$ProximaObraMes,$ProximaObraAnyo) {\n \t\t$query->where('nombre_obra', $ProximaObraNombre);\n \t\t$query->where(\"inicio\",\">=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-01\")->where(\"inicio\",\"<=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-31\");\n\t\t})->get();\n\n\t\t$data[\"butacas_ocupadas_dia\"]=[];\n\t\tforeach ($reservas as $reserva) {\n\t\t\t$dia=Carbon::parse($reserva->sesion->inicio)->format('d');\n\t\t\t$dia=(int)$dia;\n\n\t\t\tif(isset($data[\"butacas_ocupadas_dia\"][$dia])){\n\t\t\t\t$data[\"butacas_ocupadas_dia\"][$dia]+=$reserva->num_butacas;\n\t\t\t}else{\n\t\t\t\t$data[\"butacas_ocupadas_dia\"][$dia]=$reserva->num_butacas;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tforeach ($butacas as $butaca) {\n\t\t\t$dia=Carbon::parse($butaca->sesion->inicio)->format('d');\n\t\t\t$dia=(int)$dia;\n\n\t\t\tif(isset($data[\"butacas_ocupadas_dia\"][$dia])){\n\t\t\t\t$data[\"butacas_ocupadas_dia\"][$dia]++;\n\t\t\t}else{\n\t\t\t\t$data[\"butacas_ocupadas_dia\"][$dia]=1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $data[\"butacas_ocupadas_dia\"];\n }", "function printAktivitetBoks($aktivitet)\n{\n if (eksistererAktivitet($aktivitet)) {\n $akt = hentAktivitet($aktivitet);\n $pris = $akt->Pris > 0 ? $akt->Pris . \"kr\" : \"Gratis!\";\n $dato = new Carbon\\Carbon($akt->Dato);\n $dato = $dato->diffForHumans();\n $prisFarge = $akt->Pris > 0 ? \"Pris Rod\" : \"Pris\";\n\n if ($akt->Statisk === 1)\n $dato = \"<img class='Ikoner' src='img/ikon_lock.png' alt='Statisk aktiviet'/>\";\n ?>\n <div class=\"AktivitetLitenBoks\">\n \n <a class=\"LinkBeskrivelse\" href=\"?side=aktivitet&id=<?= tryggPrint($aktivitet) ?>\">\n <img class=\"bildeBoks\" src=\"<?= tryggPrint($akt->Bilde) ?>\" onerror=\"this.src='img/default_aktivitet.png'\"/>\n \n <div class=\"bildeBoksLag\"></div>\n <div class=\"Beskrivelse\"><?= tryggPrint($akt->Beskrivelse) ?></div>\n </a>\n <div class=\"Tittel\"><b><?= tryggPrint($akt->Tittel) ?></b></div>\n <a class=\"link\" href=\"?side=bruker&id=<?= tryggPrint($akt->Bruker) ?>\">\n <div class=\"Utgiver\">\n <b><?= tryggPrint($akt->Bruker) ?></b>\n <img class=\"Ikoner\" src=\"<?= hentBrukerBildeEx($akt->Bruker) ?>\"</img>\n </div>\n </a>\n <div class=\"Dato\"><?= $dato ?></div>\n <div class=\"Likes\">\n <b><?= tryggPrint(antallStemmer($aktivitet)) ?></b>\n <img class=\"Ikoner\" src=\"img/ikon_hjerte.png\" alt=\"Antall likes\"</img>\n </div>\n \n <div class=\"<?=$prisFarge?>\"><?= $pris ?></div>\n </div>\n\n <?php\n } else {\n echo \"Fant ikke aktivtet: \" . $aktivitet;\n }\n}", "function spiplistes_listes_boite_abonnements ($id_liste, $statut_liste, $tri, $debut, $script_retour) {\n\n\t$boite_abonnements = \"\"\n\t\t. \"<div id='\" . _SPIPLISTES_ID_GROSSE_BOITE . \"' class='verdana1'>\\n\"\n\t\t. spiplistes_listes_boite_abonnes($id_liste, $statut_liste, $tri, $debut, $script_retour)\n\t\t. spiplistes_listes_boite_elligibles ($id_liste, $statut_liste, $tri, $debut)\n\t\t. \"</div>\\n\"\n\t\t;\n\treturn($boite_abonnements);\n}", "function listarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_sel';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('id_cuenta_bancaria_boa','int4');\n\t\t$this->captura('banco','int4');\n\t\t$this->captura('cuenta','varchar');\n\t\t$this->captura('desc_cuenta','varchar');\n\t\t$this->captura('moneda','int4');\n\t\t$this->captura('tipo_cuenta','bpchar');\n\t\t$this->captura('estado_cuenta','bpchar');\n\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('desc_cuenta_banco','varchar');\n\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function bolsista($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$l,$m,$n,$o,$p,$q,$r,$s,$t,$u,$v,$x,$z,$y,$w,$a1){\r\n\t\t$fBolsista = new fachada_bolsista();\r\n\t\t$oBolsista = $fBolsista->bolsista($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$l,$m,$n,$o,$p,$q,$r,$s,$t,$u,$v,$x,$z,$y,$w,$a1);\r\n\t\treturn $oBolsista;\r\n\t}", "function cariPosisi($batas){\nif(empty($_GET['halpengajar'])){\n\t$posisi=0;\n\t$_GET['halpengajar']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengajar']-1) * $batas;\n}\nreturn $posisi;\n}", "function geraClassesBD(){\n # Abre o template da classe BD e armazena conteudo do modelo\n $modelo = Util::getConteudoTemplate('class.ModeloBD.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $nomeTabela = ucfirst((string)$aTabela['NOME']);\n $nomeClasse = $this->getCamelMode($nomeTabela);\n $modeloTemp = NULL;\n $copiaModelo = $modelo;\n\n # substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo = str_replace('%%NOME_CLASSE%%',$nomeClasse,$copiaModelo);\n\n # Complementos adicionais para classes especificas\n switch($nomeClasse){\n case 'Grupoprograma':\n case 'Modulo':\n case 'Programa':\n case 'Usuario':\n case 'Usuariogrupo':\n $modeloTemp = Util::getConteudoTemplate(\"class.Modelo.$nomeClasse\".\"BD.php\");\t\t\t\n $copiaModelo = str_replace('%%COMPLEMENTO%%',$modeloTemp,$copiaModelo);\n break;\n\n default: \n $copiaModelo = str_replace('%%COMPLEMENTO%%','',$copiaModelo);\t\n break;\n }\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes/bd\";\n if(!file_exists($dir)) \n mkdir($dir);\n $fp = fopen(\"$dir/class.$nomeClasse\".\"BD.php\",\"w\");\n fputs($fp, $copiaModelo);\n fclose($fp);\n }\n return true;\t\n }", "function cariPosisi($batas){\nif(empty($_GET['halpengumuman'])){\n\t$posisi=0;\n\t$_GET['halpengumuman']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengumuman']-1) * $batas;\n}\nreturn $posisi;\n}", "function modelo_inmueble($r, $cantidad_inmuebles)\n{\n for ($i = 0; $i < $cantidad_inmuebles; $i++) {\n $imagen = existeImagen(($r[$i]['foto1']));\n $codigo = str_ireplace(\"108-\", \"\", $r[$i]['Codigo_Inmueble']);\n $api = $r[$i];\n $descripcion = $api['descripcionlarga'];\n $limite_de_cadena = 90;\n // recortar cadena\n if (strlen($descripcion) >= $limite_de_cadena) {\n $descripcion = substr($descripcion, 0, $limite_de_cadena) . '...';\n } else {\n $descripcion = $descripcion . '...';\n }\n echo '\n <div class=\"property-block col-12 col-sm-6 col-lg-4 col-xl-4\">\n <div class=\"inner-box\">\n <div class=\"image\">\n <a href=\"detalle-inmueble.php?co=' . $codigo . '\"><img src=\"' . $imagen . '\" alt=\"\"></a>\n <div class=\"sale\">' . $api['Gestion'] . '</div>\n <div class=\"price\">';\n if ($api['Gestion'] == 'Arriendo/venta') {\n echo '$' . $api['Canon'] . ' <br>$' . $api['Venta'];\n } else if ($api['Gestion'] == 'Arriendo') {\n echo '$' . $api['Canon'];\n } else {\n echo '$' . $api['Venta'];\n }\n echo ' </div>\n </div>\n <div class=\"lower-content\">\n <div class=\"upper-box\" style=\"min-height: 9.3rem;\">\n <h3><a href=\"images/no_image.png\">' . $api['Tipo_Inmueble'] . '</a></h3>\n <div class=\"location\"><span class=\"icon flaticon-location-pin\"></span> ' . $api['Barrio'] . ', ' . $api['Ciudad'] . '</div>\n <div class=\"text-justify\">' . $descripcion . '</div>\n </div>\n <div class=\"lower-box clearfix\">\n <ul class=\"row justify-content-center\">\n <li class=\"col-auto\"><span class=\"icon flaticon-squares\"></span>' . $api['AreaConstruida'] . 'm<sup>2</sup></li>\n <li class=\"col-auto\"><span class=\"icon flaticon-bed-1\"></span>' . $api['Alcobas'] . '</li>\n <li class=\"col-auto\"><span class=\"icon flaticon-bathtube-with-shower\"></span>' . $api['banios'] . '</li>\n <li class=\"col-auto\"><span class=\"icon flaticon-garage\"></span>' . $api['garaje'] . '</li>\n <li class=\"col-auto\">Codigo: ' . $codigo . '</li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n\n ';\n }\n}", "public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }", "public function reativar($sObservacao = null) {\n\n if (empty($this->iCodigoBem)) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.bem_nao_existe_base_de_dados'));\n }\n if (!db_utils::inTransaction()) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.sem_transacao'));\n }\n\n if (!$this->isBaixado()) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.bem_nao_esta_baixado'));\n }\n $oDaoBensBaixa = new cl_bensbaix();\n $oDaoBensBaixa->excluir($this->getCodigoBem());\n if ($oDaoBensBaixa->erro_status == 0) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.erro_reativar_bem', (object)array(\"erro_msg\" => $oDaoBensBaixa->erro_msg)));\n }\n\n $oDataAtual = new DBDate(date('Y-m-d', db_getsession(\"DB_datausu\")));\n $oInstit = new Instituicao(db_getsession(\"DB_instit\"));\n $lIntegracaoFinanceiro = ParametroIntegracaoPatrimonial::possuiIntegracaoPatrimonio($oDataAtual, $oInstit);\n\n $aNotas = $this->getNotasFiscais();\n\n $lRealizouLancamento = false;\n foreach ($aNotas as $oNota) {\n\n /**\n * realiza lancamentos contabens do bem\n * caso o desdobramento da nota do bem esteja no grupo 9 (bem permante)\n */\n if (!empty($oNota) && $this->verificaSituacaoNota() && $oNota->getValorLiquidado() == 0) {\n\n $oGrupo = GrupoContaOrcamento::getGrupoConta($oNota->getDesdobramento(), db_getsession(\"DB_anousu\"));\n if (!empty($oGrupo) && $oGrupo->getCodigo() == 9) {\n\n $sObs = \"Estorno do Lançamento em liquidação do tombamento do bem {$this->getCodigoBem()}.\";\n\n if ($lIntegracaoFinanceiro) {\n\n $nValor = $this->getValorAquisicao();\n if (count($aNotas) > 1) {\n $nValor = $this->getValorItemNota($oNota->getCodigoNota());\n }\n\n $oProcessarLancamento = new stdClass();\n $oProcessarLancamento->iCodigoDotacao = $oNota->getEmpenho()->getDotacao()->getCodigo();\n $oProcessarLancamento->iCodigoElemento = $oNota->getDesdobramento();\n $oProcessarLancamento->iCodigoNotaLiquidacao = $oNota->getCodigoNota();\n $oProcessarLancamento->iFavorecido = $oNota->getEmpenho()->getCgm()->getCodigo();\n $oProcessarLancamento->iNumeroEmpenho = $oNota->getEmpenho()->getNumero();\n $oProcessarLancamento->sObservacaoHistorico = $sObs;\n $oProcessarLancamento->nValorTotal = $nValor;\n $oProcessarLancamento->oClassificacao = $this->getClassificacao();\n $oProcessarLancamento->oGrupo = $oGrupo;\n\n LancamentoEmpenhoEmLiquidacao::processar($oProcessarLancamento);\n $lRealizouLancamento = true;\n }\n }\n }\n }\n\n if (USE_PCASP && !$lRealizouLancamento && $lIntegracaoFinanceiro ) {\n\n /**\n * Realiza acerto nas contas de depreciação e classificação, caso seja necessário\n */\n $oBemAcertoContaClassificacao = new BemAcertoContaClassificacao();\n $oDBData = new DBDate( date(\"d/m/Y\", db_getsession(\"DB_datausu\")) );\n\n $oBemDepreciacao = BemDepreciacao::getInstance($this);\n $nValorAtual = $this->nValorAquisicao;\n\n if (!empty($oBemDepreciacao)) {\n $nValorAtual = $oBemDepreciacao->getValorAtual();\n }\n\n if ($nValorAtual != 0) {\n $oLancamentoauxiliarBem = new LancamentoAuxiliarBem();\n $oLancamentoauxiliarBem->setValorTotal($nValorAtual);\n $oLancamentoauxiliarBem->setBem($this);\n $oLancamentoauxiliarBem->setObservacaoHistorico($sObservacao);\n $oLancamentoauxiliarBem->setEstorno(true);\n $oEventoContabil = new EventoContabil(702, db_getsession('DB_anousu'));\n $aLancamentos = $oEventoContabil->getEventoContabilLancamento();\n $oLancamentoauxiliarBem->setHistorico($aLancamentos[0]->getHistorico());\n $oEventoContabil->executaLancamento($oLancamentoauxiliarBem);\n }\n }\n }", "public function get_pago_boleta_cobro($codigo, $cuenta = '', $banco = '', $alumno = '', $referencia = '', $periodo = '', $carga = '', $programado = '', $empresa = '', $fini = '', $ffin = '', $orderby = '', $facturado = ''){\n $pensum = $this->pensum;\n\n $sql= \"SELECT *, \";\n $sql.= \" (SELECT CONCAT(alu_nombre,' ',alu_apellido) FROM app_alumnos WHERE alu_cui = pag_alumno ORDER BY alu_cui LIMIT 0 , 1) as alu_nombre_completo,\";\n $sql.= \" (SELECT alu_nit FROM app_alumnos WHERE alu_cui = pag_alumno ORDER BY alu_cui LIMIT 0 , 1) as alu_nit,\";\n $sql.= \" (SELECT alu_cliente_nombre FROM app_alumnos WHERE alu_cui = pag_alumno ORDER BY alu_cui LIMIT 0 , 1) as alu_cliente_nombre,\";\n $sql.= \" (SELECT bol_motivo FROM boletas_boleta_cobro WHERE bol_codigo = pag_programado AND pag_alumno = pag_alumno ORDER BY pag_referencia LIMIT 0 , 1) as bol_motivo,\";\n $sql.= \" (SELECT bol_fecha_pago FROM boletas_boleta_cobro WHERE bol_codigo = pag_programado ORDER BY pag_referencia LIMIT 0 , 1) as bol_fecha_pago,\";\n $sql.= \" (SELECT bol_monto FROM boletas_boleta_cobro WHERE bol_codigo = pag_programado ORDER BY pag_referencia LIMIT 0 , 1) as bol_monto,\";\n $sql.= \" (SELECT bol_descuento FROM boletas_boleta_cobro WHERE bol_codigo = pag_programado ORDER BY pag_referencia LIMIT 0 , 1) as bol_descuento,\";\n $sql.= \" (SELECT bol_tipo FROM boletas_boleta_cobro WHERE bol_codigo = pag_programado ORDER BY bol_tipo LIMIT 0 , 1) as bol_tipo,\";\n ///-- INSCRIPCION\n $sql.= \" (SELECT CONCAT(alu_nombre,' ',alu_apellido) FROM inscripcion_alumnos WHERE alu_cui_new = pag_alumno ORDER BY alu_cui_new LIMIT 0 , 1) as inscripcion_nombre_completo,\";\n $sql.= \" (SELECT alu_nit FROM inscripcion_alumnos WHERE alu_cui_new = pag_alumno ORDER BY alu_cui_new LIMIT 0 , 1) as inscripcion_nit,\";\n $sql.= \" (SELECT alu_cliente_nombre FROM inscripcion_alumnos WHERE alu_cui_new = pag_alumno ORDER BY alu_cui_new LIMIT 0 , 1) as inscripcion_cliente_nombre,\";\n //--subqueryes de facturas y recibos\n $sql.= \" (SELECT fac_numero FROM boletas_factura_boleta WHERE fac_pago = pag_codigo AND fac_sucursal = cueb_sucursal AND fac_situacion = 1 ORDER BY fac_numero LIMIT 0 , 1) as fac_numero,\";\n $sql.= \" (SELECT fac_serie FROM boletas_factura_boleta WHERE fac_pago = pag_codigo AND fac_sucursal = cueb_sucursal AND fac_situacion = 1 ORDER BY fac_serie LIMIT 0 , 1) as fac_serie,\";\n $sql.= \" (SELECT ser_numero FROM boletas_factura_boleta,vnt_serie WHERE fac_serie = ser_codigo AND fac_pago = pag_codigo AND fac_sucursal = cueb_sucursal AND fac_situacion = 1 ORDER BY ser_numero LIMIT 0 , 1) as fac_serie_numero,\";\n $sql.= \" (SELECT rec_numero FROM boletas_recibo_boleta WHERE rec_pago = pag_codigo AND rec_situacion = 1 ORDER BY rec_numero LIMIT 0 , 1) as rec_numero,\";\n $sql.= \" (SELECT rec_serie FROM boletas_recibo_boleta WHERE rec_pago = pag_codigo AND rec_situacion = 1 ORDER BY rec_serie LIMIT 0 , 1) as rec_serie,\";\n $sql.= \" (SELECT ser_numero FROM boletas_recibo_boleta,vnt_serie_recibo WHERE rec_serie = ser_codigo AND rec_pago = pag_codigo AND rec_situacion = 1 ORDER BY ser_numero LIMIT 0 , 1) as rec_serie_numero,\";\n //-- subquery grado\n $sql.= \" (SELECT TRIM(gra_descripcion) FROM academ_grado, academ_grado_alumno\";\n $sql.= \" WHERE gra_pensum = $pensum\";\n $sql.= \" AND graa_pensum = gra_pensum\";\n $sql.= \" AND graa_nivel = gra_nivel\";\n $sql.= \" AND graa_grado = gra_codigo\";\n $sql.= \" AND graa_alumno = pag_alumno ORDER BY graa_grado DESC LIMIT 0 , 1) AS alu_grado_descripcion,\";\n //-- subquery seccion\n $sql.= \" (SELECT TRIM(sec_descripcion) FROM academ_secciones,academ_seccion_alumno\";\n $sql.= \" WHERE seca_pensum = $pensum\";\n $sql.= \" AND seca_pensum = sec_pensum\";\n $sql.= \" AND seca_nivel = sec_nivel\";\n $sql.= \" AND seca_grado = sec_grado\";\n $sql.= \" AND seca_seccion = sec_codigo\";\n $sql.= \" AND seca_alumno = pag_alumno ORDER BY seca_seccion LIMIT 0 , 1) AS alu_seccion_descripcion\";\n //--\n $sql.= \" FROM boletas_pago_boleta, fin_cuenta_banco, fin_banco, fin_moneda, fin_tipo_cuenta\";\n $sql.= \" WHERE pag_cuenta = cueb_codigo\";\n $sql.= \" AND pag_banco = cueb_banco\";\n $sql.= \" AND cueb_banco = ban_codigo\";\n $sql.= \" AND cueb_tipo_cuenta = tcue_codigo\";\n $sql.= \" AND cueb_moneda = mon_id\";\n //$sql.= \" AND pag_situacion != 1\";\n if (strlen($codigo)>0) {\n $sql.= \" AND pag_codigo = $codigo\";\n }\n if (strlen($cuenta)>0) {\n $sql.= \" AND pag_cuenta = $cuenta\";\n }\n if (strlen($banco)>0) {\n $sql.= \" AND pag_banco = $banco\";\n }\n if (strlen($alumno)>0) {\n $sql.= \" AND pag_alumno = '$alumno'\";\n }\n if (strlen($referencia)>0) {\n $sql.= \" AND pag_referencia = '$referencia'\";\n }\n if (strlen($periodo)>0) {\n $sql.= \" AND pag_periodo_fiscal = $periodo\";\n }\n if (strlen($carga)>0) {\n $sql.= \" AND pag_carga = '$carga'\";\n }\n if (strlen($programado)>0) {\n $sql.= \" AND pag_programado = '$programado'\";\n }\n if (strlen($empresa)>0) {\n $sql.= \" AND cueb_sucursal = $empresa\";\n }\n if ($fini != \"\" && $ffin != \"\") {\n $fini = $this->regresa_fecha($fini);\n $ffin = $this->regresa_fecha($ffin);\n $sql.= \" AND pag_fechor BETWEEN '$fini 00:00:00' AND '$ffin 23:59:00'\";\n }\n if (strlen($facturado)>0) {\n $sql.= \" AND pag_facturado = $facturado\";\n }\n if (strlen($orderby)>0) {\n switch ($orderby) {\n case 1: $sql.= \" ORDER BY ban_codigo ASC, cueb_tipo_cuenta ASC, cueb_codigo ASC, pag_alumno ASC, pag_referencia ASC\"; break;\n case 2: $sql.= \" ORDER BY pag_fechor ASC, ban_codigo ASC, cueb_tipo_cuenta ASC, cueb_codigo ASC, pag_alumno ASC\"; break;\n case 3: $sql.= \" ORDER BY pag_alumno ASC, pag_referencia ASC, pag_fechor ASC\"; break;\n case 4: $sql.= \" ORDER BY bol_tipo ASC, cueb_codigo ASC, pag_alumno ASC, pag_fechor ASC, pag_referencia ASC\"; break;\n default: $sql.= \" ORDER BY ban_codigo ASC, cueb_tipo_cuenta ASC, cueb_codigo ASC, pag_alumno ASC, bol_referencia ASC\"; break;\n }\n } else {\n $sql.= \" ORDER BY ban_codigo ASC, cueb_tipo_cuenta ASC, cueb_codigo ASC, pag_alumno ASC, pag_referencia ASC\";\n }\n\n $result = $this->exec_query($sql);\n //echo $sql.\"<br><br>\";\n return $result;\n }", "function get_arbo_light($id_pere, $Indic, $Level, $id_item, $BgColor, $Mode=0, $ShowInd=0, $ShowNum=0, $FilterNum=\"\", $sql_filter=\"\", $with_user_rights=1) {\r\n\tglobal $nb, $txt_color_lien, $nb_table;\r\n\tglobal $idItem, $table_style, $navID;\r\n\tglobal $ses_profil_user, $arr_user_nav_right;\r\n \r\n\t$nb++;\r\n\r\n\tif ($id_pere!=1) {\r\n\t\t$chaine = \"select _nav, id__nav_pere from _nav where id__nav=\".$id_pere;\r\n\t\t$RS = mysql_query($chaine);\r\n\r\n\t\t$id__nav_pere = mysql_result($RS,0,\"id__nav_pere\");\r\n\t\techo(\"<tr><td colspan=2 width='100%'><b>&nbsp;&nbsp;>>&nbsp\".mysql_result($RS,0,\"_nav\").\"</b><br></td></tr>\");\r\n\t}\r\n\r\n\t$StrSQLFils = \"Select * from \"._CONST_BO_CODE_NAME.\"nav where id_\"._CONST_BO_CODE_NAME.\"nav_pere = \".$id_pere;\r\n\t$StrSQLFils .= $sql_filter;\r\n\t\r\n\t$hsv = get_hsv_color($BgColor);\r\n\t$txt_color_lien = \"LienNoir\";\r\n\t$FontColorStyle = \"color=black\";\r\n\r\n\t$StrSQLFils .= \" order by ordre, id_\"._CONST_BO_CODE_NAME.\"nav\";\r\n\r\n\r\n//\t*** => Execution de la requete\r\n\t$RstMessageFils = mysql_query($StrSQLFils);\r\n\r\n\tif (mysql_num_rows($RstMessageFils)) {\r\n\t\t$Level++; //On compte les niveau\r\n\r\n\t\tif ($Mode==3) { \r\n\t\t\t$nb_table++;\r\n\t\t\techo \"<tr><td colspan=2 width='100%'>\\n\\n<table id='table_\".$nb_table.\"_\".$Level.\"' \".$table_style.\" border=0 cellpadding=0 cellspacing=1 bgcolor=\\\"\".get_inter_color($BgColor,0.5).\"\\\" width='100%'>\";\r\n\t }\r\n\t\r\n\t\tfor ($i=1;$i<=@mysql_num_rows($RstMessageFils);$i++) {\r\n\t\t\t$id_bo_nav = mysql_result($RstMessageFils,$i-1,\"id_\"._CONST_BO_CODE_NAME.\"nav\");\r\n\t\t\t$nom = $ArrayPuce[$Level].\"&nbsp;\";\r\n\t \t\r\n\t\t\t// affichage des menus non selectionné comme affiché pour l'admin\r\n\t\t\t$cache=0;\r\n\t\t\tif ((mysql_result($RstMessageFils,$i-1,\"\"._CONST_BO_CODE_NAME.\"nav.selected\"))==0) {\r\n\t\t\t\t$cache=1;\r\n\t\t\t\tif ($Mode!=0) {\r\n\t\t\t\t\t$nom.=\"<i><u>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t \t\r\n\t\t\t$nom.=(coupe_espace(@mysql_result($RstMessageFils,$i-1,\"\"._CONST_BO_CODE_NAME.\"nav\"),60));\r\n\t\t\t\t\r\n\t\t\tif (((mysql_result($RstMessageFils,$i-1,\"\"._CONST_BO_CODE_NAME.\"nav.selected\"))==0)&&($Mode!=0)) {\r\n\t\t\t\t$nom.=\"</u></i>&nbsp;&nbsp;<img src='images/pasvu.gif' width=17 height=14 border=0 valign=baseline alt='Non visible'>\";\r\n\t\t\t\t$cache=1;\r\n\t\t\t}\r\n\t \r\n\t\t\tif (is_array($id_item) && in_array($id_bo_nav,$id_item)) {\r\n\t\t\t\t$Selected = \"Selected\";\r\n\t\t\t}elseif ($id_bo_nav == $id_item) {\r\n\t\t\t\t$Selected = \"Selected\";\r\n\t\t\t}else {\r\n\t\t\t\t$Selected = \"\";\r\n\t\t\t}\r\n\t\r\n\t\t\t$Ind=$Indic.$i.\".\";\r\n\t\r\n\t\t\t//Affichage ou non de l'indentation\r\n\t\t\tif ($ShowInd == 1) {\r\n\t\t\t\t$Indentation = str_repeat(\"&nbsp;&nbsp;\",($Level));\r\n\t\t\t}\r\n\t\r\n\t\t\t//Affichage ou non de la numerotation\r\n\t\t\tif ($ShowNum == 1) {\r\n\t\t $Numerotation = $Ind;\r\n\t\t\t}\r\n\t\r\n\t\t\tif (is_array($arr_user_nav_right) && in_array($id_bo_nav,$arr_user_nav_right)) {\r\n\t\t\t\t$allow = 1;\r\n\t\t\t}elseif ($id_bo_nav == $id_item) {\r\n\t\t $allow = 1;\r\n\t\t\t}else {\r\n\t\t\t\t$allow = 0;\r\n\t\t\t}\r\n\t\r\n\t\t\tif (($_SESSION['ses_profil_user']<=2) || ($Mode == 0)) {\r\n\t\t\t\t$allow = 1;\r\n\t\t\t\t$cache=0;\r\n\t\t\t}\r\n\t\r\n\t\t\tif (!$cache) { \r\n\t\t\t\t// ajout du flag with_user_rights\r\n\t\t\t\tif (($Mode==0)||($Mode==4)) {\r\n\t\t\t if (($allow == 1)||($with_user_rights == 0)) {\r\n\t\t\t\t\t\tif ($Mode==0) {\r\n\t\t\t\t\t\t\techo \"<option style=\\\"\".$FontColorStyle.\";background-color:\".$BgColor.\"\\\" value=\".$id_bo_nav.\" \".$Selected.\">\".$Indentation.$Numerotation.$nom.\"</option>\\n\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\techo \"<option style=\\\"\".$FontColorStyle.\";background-color:\".$BgColor.\"\\\" value=\\\"\".$url_page.\"?Rub=\".$id_bo_nav.\"\\\" \".$Selected.\">\".$Indentation.$Numerotation.$nom.\"</option>\\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif ($Mode==0) {\r\n\t\t\t\t\t\t\techo \"<optgroup style=\\\"\".$FontColorStyle.\";background-color:\".$BgColor.\"\\\" value=\".$id_bo_nav.\" \".$Selected.\" label=\\\"\".$Indentation.$Numerotation.$nom.\"\\\">\\n\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\techo \"<optgroup style=\\\"\".$FontColorStyle.\";background-color:\".$BgColor.\"\\\" value=\\\"\".$url_page.\"?Rub=\".$id_bo_nav.\"\\\" \".$Selected.\" label=\\\"\".$Indentation.$Numerotation.$nom.\"\\\">\\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}elseif ($Mode==2) {\r\n\t\t\t\t\techo \"<option style=\\\"\".$FontColorStyle.\";background-color:\".$BgColor.\"\\\" value=\\\"id_bo_nav=\".$id_bo_nav.\"\\\" \".$Selected.\">\".$Indentation.$Numerotation.$nom.\"</option>\\n\";\r\n\t\r\n\t\t\t\t}elseif ($Mode==3) {\r\n\t\t\t\t\tif ($idItem==$id_bo_nav){\r\n\t\t\t\t\t\t$color = get_reverse_color($MenuBgColor);\r\n\t\t\t\t\t\t$nom = \"<!-- <span class=navActiveState>&gt;</span> -->\".$nom.\"<!-- <span class=navActiveState>&lt;</span> -->\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$color = $BgColor;\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t //Expand and Collapse\r\n\t\t\t\t\t$strsqlfils = \"Select count(*) as nbe from \"._CONST_BO_CODE_NAME.\"nav where id_\"._CONST_BO_CODE_NAME.\"nav_pere = \".intval($id_bo_nav);\r\n\t\t\t\t\t$RS_nbe = mysql_query($strsqlfils);\r\n\t\t\t\t\t$nb_fils = mysql_result($RS_nbe,0,\"nbe\");\r\n\t\t\r\n \r\n\t\t\t\t\tif ($nb_fils>0) {\r\n\t\t\t $img_collapse = \"<a href='javascript:getArboFils(\".$id_bo_nav.\");'><img id='img_nav_\".intval($nb_table+1).\"_\".intval($Level+1).\"' vspace=3 hspace=3 style='cursor:pointer' src='images/plus.gif' border='0'></a>\";\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\t$img_collapse = \"\";\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\tif ($allow == 1) {\r\n\t\t\t\t\t\techo \"<tr><td style=\\\"color:black\\\" bgcolor=\\\"\".$color.\"\\\" align=center valign=top >\".$img_collapse.\"</td><td style=\\\"color:black\\\" bgcolor=\\\"\".$color.\"\\\" align=left valign=top >\".$Numerotation.\"</td><td style=\\\"color:black\\\" bgcolor=\\\"\".$color.\"\\\" width='100%'>\".\"&nbsp;\".$Indentation.\"\".\"<a href=\\\"bo.php?TableDef=3&idItem=\".$id_bo_nav.\"&idFils=\".$id_pere.\"\\\" class=\\\"\".$txt_color_lien.\"\\\">\".str_replace(\"&nbsp;\",\"\",$nom).\"</a></td></tr>\\n\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\techo \"<tr><td style=\\\"color:#6E6E6E\\\" bgcolor=\\\"\".$color.\"\\\" align=center valign=top >\".$img_collapse.\"</td><td style=\\\"color:#6E6E6E\\\" bgcolor=\\\"\".$color.\"\\\" align=left valign=top >\".$Numerotation.\"</td><td style=\\\"color:#6E6E6E\\\" bgcolor=\\\"\".$color.\"\\\" width='100%'>\".\"&nbsp;\".$Indentation.str_replace(\"&nbsp;\",\"\",$nom).\"</td></tr>\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\techo \"<tr><td style=\\\"\".$FontColorStyle.\"\\\" bgcolor=\\\"\".$BgColor.\"\\\" nowrap>\".$Indentation.$Numerotation.$nom.\"</td></tr>\\n\";\r\n\t\t\t\t}\r\n\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t if ($Mode==3) {\r\n\t\t\techo \"</table>\\n\\n</td></tr>\";\r\n\t }\r\n\t}\r\n\r\n\tif ($id_pere!=1) {\r\n\t\techo(\"<tr><td colspan=2 width='100%' align='right'><a href='javascript:navRetour(\".$id__nav_pere.\")'>Retour</a><br><br></td></tr>\");\r\n\t}\r\n\techo $traitement_fin;\r\n}", "function beratbadanideal($tb, $g){\n\tif($g == \"Pria\" && $tb >= 160 ||$g == \"Wanita\" && $tb >= 150){\n\t\t$bbi = beratbadanormal($tb) - (0.1 * beratbadanormal($tb));\n\t}else if($g == \"Pria\" && $tb < 160 || $g == \"Wanita\" && $tb < 150){\n\t\t$bbi = beratbadanormal($tb) - 1;\n\t}\n\treturn $bbi;\n}", "function valid_codigo_barras_boletos($codigobarras, $tipo){\r\n\t$codigobarras = removeformat($codigobarras);\r\n\tif($tipo == \"B\"){\r\n\t\t$valido = TRUE;\r\n\t\t$bloco1 = substr($codigobarras, 0, 10);\r\n\t\t$bloco2 = substr($codigobarras, 10, 11);\r\n\t\t$bloco3 = substr($codigobarras, 21, 11);\r\n\t\tif(strlen($bloco1) == 10){\r\n\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco1, 0, 9));\r\n\t\t\t$valido = ($digitobloco == substr($bloco1, 9, 1));\r\n\t\t}\r\n\t\tif($valido && strlen($bloco2) == 11){\r\n\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco2, 0, 10));\r\n\t\t\t$valido = ($digitobloco == substr($bloco2, 10, 1));\r\n\t\t}\r\n\t\tif($valido && strlen($bloco3) == 11){\r\n\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco3, 0, 10));\r\n\t\t\t$valido = ($digitobloco == substr($bloco3, 10, 1));\r\n\t\t}\r\n\t\tif($valido && strlen($codigobarras) == 47){\r\n\t\t\t$bancofavorecido = substr($codigobarras, 0, 3);\r\n\t\t\t$moeda = substr($codigobarras, 3, 1);\r\n\t\t\t$fatorvencimento = substr($codigobarras, 33, 4);\r\n\t\t\t$valortitulo = substr($codigobarras, 37, 10);\r\n\t\t\t$campolivre = substr($codigobarras, 4, 5).substr($codigobarras, 10, 10).substr($codigobarras, 21, 10);\r\n\t\t\t$digitogeral = substr($codigobarras, 32, 1);\r\n\t\t\t$digitogeralcalculado = calcula_digito_mod11($bancofavorecido.$moeda.$fatorvencimento.$valortitulo.$campolivre);\r\n\t\t\t$valido = ($digitogeral == $digitogeralcalculado);\r\n\t\t}\r\n\t\treturn $valido;\r\n\t}elseif($tipo == \"C\"){\r\n\t\t$valido = TRUE;\r\n\t\t$bloco1 = substr($codigobarras, 0, 12);\r\n\t\t$bloco2 = substr($codigobarras, 12, 12);\r\n\t\t$bloco3 = substr($codigobarras, 24, 12);\r\n\t\t$bloco4 = substr($codigobarras, 36, 12);\r\n\t\tif(strlen($bloco1) == 12){\r\n\t\t\t$digitobloco = calcula_digito_mod11(substr($bloco1, 0, 11));\r\n\t\t\t$valido = ($digitobloco == substr($bloco1, 11, 1));\r\n\t\t\tif(!$valido){\r\n\t\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco1, 0, 11));\r\n\t\t\t\t$valido = ($digitobloco == substr($bloco1, 11, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($valido && strlen($bloco2) == 12){\r\n\t\t\t$digitobloco = calcula_digito_mod11(substr($bloco2, 0, 11));\r\n\t\t\t$valido = ($digitobloco == substr($bloco2, 11, 1));\r\n\t\t\tif(!$valido){\r\n\t\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco2, 0, 11));\r\n\t\t\t\t$valido = ($digitobloco == substr($bloco2, 11, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($valido && strlen($bloco3) == 12){\r\n\t\t\t$digitobloco = calcula_digito_mod11(substr($bloco3, 0, 11));\r\n\t\t\t$valido = ($digitobloco == substr($bloco3, 11, 1));\r\n\t\t\tif(!$valido){\r\n\t\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco3, 0, 11));\r\n\t\t\t\t$valido = ($digitobloco == substr($bloco3, 11, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($valido && strlen($bloco4) == 12){\r\n\t\t\t$digitobloco = calcula_digito_mod11(substr($bloco4, 0, 11));\r\n\t\t\t$valido = ($digitobloco == substr($bloco4, 11, 1));\r\n\t\t\tif(!$valido){\r\n\t\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco4, 0, 11));\r\n\t\t\t\t$valido = ($digitobloco == substr($bloco4, 11, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $valido;\r\n\t}else{\r\n\t\treturn FALSE;\r\n\t}\r\n}", "function lebih($slug) {\n\n\t\t/* ---- PREPARE VARIABLE ------*/\n\t\t$arr_slug\t\t= explode('_', $slug);\n\t\t$pegawai_result = $this->db->get_where('pegawai', array('id_pegawai' => $arr_slug[1]))->result();\n\t\t$pegawai \t\t= $pegawai_result['0']->nama_pegawai;\n\t\t$jabatan\t\t= $pegawai_result['0']->jabatan_pegawai;\n\t\t$nip \t\t= $pegawai_result['0']->nip_pegawai;\n\t\t$surat_result \t= $this->db->get_where('data_rinci', array('id_surat' => $arr_slug[0],\n\t\t\t'id_pegawai' => $arr_slug[1]))->result();\n\t\t$nomor \t\t\t= $surat_result['0']->nomor;\n\n\t\t//Get data rinci\n\t\t$data_rinci_all\t= $this->db->get_where('data_rinci',\n\t\t\tarray('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$id_tiket = $data_rinci_all['0']->id_tiket;\n\t\t$id_transport2 = $data_rinci_all['0']->id_transport2;\n\t\t\t\n\t\t//get data uang tiket\n\t\tif ($id_tiket == 0) {\n\t\t\t$sbu_tiket = 0;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$transport2 = $this->db->get_where('biaya_transport',array('id' => $id_transport2))->result();\n\t\t\t$rute = $transport2['0']->provinsi;\n\n\t\t} else {\n\t\t\t$tiket_result = $this->db->get_where('tiket_pesawat',array('id' => $id_tiket))->result();\n\t\t\t$sbu_tiket = $tiket_result['0']->biaya_tiket;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$rute = $tiket_result['0']->rute;\n\t\t}\n\n\t\t//get real pengeluaran untuk tiket\n\t\t$r_tiket_result = $this->db->get_where('spd_rampung', array('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$r_tiket = $r_tiket_result != NULL ? $r_tiket_result['0']->tiket : 0;\n\n\t\t$ppk \t\t\t= $this->db->get_where('pejabat_administratif',\n\t\t\tarray('jabatan' => 'Pejabat Pembuat Komitmen'))->result();\n\t\t$nama_ppk \t\t\t\t= $ppk['0']->nama;\n\t\t$nip_ppk \t\t\t\t= $ppk['0']->nip;\n\n\t\t$var_tgl_skrg = $this->tanggal_indo(date('Y').'-'.date('m').'-'.date('d'), '-');\n\t\t$var_tgl_surat \t= $this->tanggal_indo($surat_result['0']->tgl_surat,'/');\n\n\t\t/* -----------------------------*/\n\t\tif(empty($r_tiket_result)) {\n\t\t\techo \"<script> \t\n \talert('Anda belum mengisi SPD Rampung!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\n\t\tif($sbu_tiket<$r_tiket) {\n\t\t\t$pdf = new PDF_MC_Table('p','mm','A4');\n\t\t\t$pdf->AddPage();\n\t\t\t$pdf->SetFont('Arial','B',14);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->MultiCell(0,25,\"SURAT PERNYATAAN\",0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(25,7,'',0,0);\n\t\t\t$pdf->MultiCell(0,6,\"Yang bertandatangan di bawah ini :\",0,'L');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Nama',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$pegawai,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'NIP',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$nip,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Jabatan',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$jabatan,0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Berdasarkan Surat Tugas Nomor:'.$nomor.' tanggal '.$var_tgl_surat.' dengan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sesungguhnya bahwa : input alasan lebih here',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'1. Tiket '.$rute.' (PP) dengan jumlah tiket pesawat di bawah ini melebihi dengan',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'SBU tahun '.date('Y').', meliputi :',0,1);\n\t\t\t$pdf->Ln();\n\n\t\t\t//here is table\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'No.',1,0,'C',0);\n\t\t\t$pdf->Cell(70,5,'Uraian',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Nilai SBU',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Pengeluaran Rill',1,0,'C',0);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\n\t\t\t$counterrr = 1;\n\t\t\t\t$pdf->SetWidths(array(10, 70, 40, 40));\n\t\t\t\tfor($i=0;$i<1;$i++) {\n\t\t\t\t\t$pdf->Row(array($counterrr,\"Tiket Pesawat \".$rute. \" (PP)\",\"Rp \".$sbu_tiket_ena, \"Rp \".number_format($r_tiket,2,',','.')));\n\t\t\t\t\t$counterrr++;\n\t\t\t\t}\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'','LB',0,'L',0);\n\t\t\t$pdf->Cell(70,5,'Jumlah','LRB',0,'C',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Ln();\n\t\t\t\n\t\t\t//end of table\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'2. Bahwa tiket '.$rute.' (PP) dengan jumlah uang tersebut pada angka (1)',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'melebihi jumlah SBU dan benar - benar dikeluarkan dengan bukti rill kuitansi tiket',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Perjalanan Dinas dimaksud.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Demikian pernyataan ini kami buat dengan sebenarnya, untuk dipergunakan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sebagaimana mestinya.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t//Footer Surat\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(10,6,\"\",0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'L');\n\t\t\t$pdf->Cell(15,6,'',0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'R');\n\t\t\t$pdf->Cell(20,6,'',0,0,'C');\n\t\t\t$pdf->MultiCell(60,6,'Jakarta, '.$var_tgl_skrg,0,'R');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(18,6,'',0,0,'L');\n\t\t\t$pdf->MultiCell(55,6,'Mengetahui/Menyetujui',0,'R');\n\t\t\t$pdf->Cell(100,6,'Pejabat Pembuat Komitmen',0, 0,'C');\n\t\t\t$pdf->MultiCell(50,6,'Pelaksana SPD',0,'R');\n\t\t\t$pdf->Cell(100,6,' Pusat Data Informasi dan Humas',0, 0,'C');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','BU',12);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(100,6,$nama_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,$pegawai,0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(100,6,\"NIP. \".$nip_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,'NIP. '.$nip,0,'C');\n\n\t\t\t//Cetak gans\n\t\t\t$filename = \"Lebih - \".$arr_slug[0].\" - \".$pegawai.$this->extension;\n\t\t\t$pdf->setTitle($filename);\n\t\t\t$pdf->Output(\"I\", $filename);\n\t\t} else {\n\t\t\techo \"<script> \t\n \talert('Tidak bisa mencetak karena biaya tiket tidak lebih dari SBU!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\t}", "function cc_ho_vetrina($agenzia, $rif){\n\tglobal $invetrina;\n\t\n\t// $agenzia qua è il numero interno di Cometa\n\tif( isset( $invetrina[$agenzia] ) ){\t\t\n\t\t\n\t\tif ($invetrina[$agenzia]['imm'] == $rif) {\n\t\t\t// questo immobile è in vetrina\n\t\t\t$vetrina = '1';\n\t\t\tcc_import_immobili_error_log($rif.\" è in vetrina\");\n\t\t\t\n\t\t\t// vediamo se è lo stesso di quello che era già in vetrina o meno\n\t\t\t$oldrif = cc_get_rif_vetrina( substr($rif, 0, 2) );\n\t\t\tcc_import_immobili_error_log(\"oldrif: \".$oldrif);\n\t\t\t\n\t\t\t// se l'immobile attualemnte in vetrina non è questo tolgo quello attuale da vetrina\n\t\t\tif($oldrif != $rif) {\n\t\t\t\tcc_updateVetrina($oldrif); \n\t\t\t\tcc_import_immobili_error_log(\"Tolgo vetrina da \".$oldrif);\n\t\t\t}\n\t\t}else{\n\t\t\t$vetrina = '0';\n\t\t}\t\t\n\t\n\t}else{\n\t\t$vetrina = '0';\n\t}\n\t\n\treturn $vetrina;\n}", "public function getBairro()\n\t{\n\t\t/**\n\t\t * retorna bairro.\n\t\t * @return bairro\n\t\t */\t\t\n\t\treturn $this->bairro;\n\t}", "public function AggiornaPrezzi(){\n\t}", "public function getBoletoInformation()\n {\n return array(\n '341' => 'Itau',\n '033' => 'Santander',\n '237' => 'Bradesco',\n '001' => 'Banco do Brasil',\n '399' => 'HSBC ',\n '104' => 'Caixa',\n '745' => 'CitiBank'\n );\n }", "public function getBarang_get(){\n $res = $this->api_model->getBarang();\n $this->response($res, 200);\n }", "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "public function bimbingan_kolokium_lanjut()\n {\n $nomor = Auth::user()->id;\n $dosen = Dosen::where('user_id', $nomor)->get();\n\n // Ambil id mhs dari yang memilih sebagai dosen 1 (raw data dari pembimbing)\n $mhs_dosen1_id = Pembimbing::where('dosen1_id', $dosen[0]->id)->pluck('mhs_id');\n if ($mhs_dosen1_id->count() !== 0) {\n $mhs_dosen1_id_array = $mhs_dosen1_id->toArray();\n $mhs_dosen1_name = Mahasiswa::whereIN('id', $mhs_dosen1_id)->pluck('name')->toArray();\n $data_proposal_dosen1 = Proposal_lanjut::whereIN('mhs_id', $mhs_dosen1_id_array)\n ->where('check1', 0)\n ->whereIN('sender', $mhs_dosen1_name)\n ->orderBy('updated_at', 'asc')\n ->get();\n if ($data_proposal_dosen1->count() !== 0) {\n $data_proposal_dosen1_array = $data_proposal_dosen1->pluck('mhs_id')->toArray();\n $mhs_dosen1 = Mahasiswa::whereIn('id', $data_proposal_dosen1_array)->orderByRaw('FIELD(id, ' . implode(',', $data_proposal_dosen1_array) . ')')->get();\n } else {\n $mhs_dosen1 = 'empty';\n $data_proposal_dosen1 = 'empty';\n }\n } else {\n $mhs_dosen1_id = 'empty';\n $mhs_dosen1 = 'empty';\n $data_proposal_dosen1 = 'empty';\n }\n\n $mhs_dosen2_id = Pembimbing::where('dosen2_id', $dosen[0]->id)->pluck('mhs_id');\n if ($mhs_dosen2_id->count() !== 0) {\n $mhs_dosen2_id_array = $mhs_dosen2_id->toArray();\n $mhs_dosen2_name = Mahasiswa::whereIN('id', $mhs_dosen2_id)->pluck('name')->toArray();\n $data_proposal_dosen2 = Proposal_lanjut::whereIN('mhs_id', $mhs_dosen2_id_array)\n ->where('check2', 0)\n ->whereIN('sender', $mhs_dosen2_name)\n ->orderBy('updated_at', 'asc')\n ->get();\n if ($data_proposal_dosen2->count() !== 0) {\n $data_proposal_dosen2_array = $data_proposal_dosen2->pluck('mhs_id')->toArray();\n $mhs_dosen2 = Mahasiswa::whereIn('id', $data_proposal_dosen2_array)->orderByRaw('FIELD(id, ' . implode(',', $data_proposal_dosen2_array) . ')')->get();\n } else {\n $mhs_dosen2 = 'empty';\n $data_proposal_dosen2 = 'empty';\n }\n } else {\n $mhs_dosen2_id = 'empty';\n $mhs_dosen2 = 'empty';\n $data_proposal_dosen2 = 'empty';\n }\n return view('dosen.bimbingan_kolokium_lanjut', compact('mhs_dosen1', 'data_proposal_dosen1', 'mhs_dosen2', 'data_proposal_dosen2'));\n }", "public function buscarBancos() {\r\n return $this->find(\"b_estatus = 'activa'\");\r\n }", "public function getIdArbol()\n {\n $imprime = array();\n $idmayor = array();\n $idmenor = array();\n\n $query = '';\n $datos = '';\n $query = \"SELECT * FROM IVRC_arbol \";\n $output = ''; \n // $output .= \" \n // <label class='text-success'>Datos IVRC_arbol</label> \n // <table class='table table-bordered'> \n // <tr> \n // <th>Id</th>\n // </tr> \n // \"; \n $consulta = $this->db->query($query);\n if(isset($consulta))\n {\n $respuesta = $consulta->fetch_all(MYSQLI_ASSOC);\n \n foreach($respuesta as $row)\n {\n if($row['id_sub'] != 0)\n {\n $idmayor[] = $row['id'];\n }\n else\n {\n $idmenor[] = $row['id'];\n }\n }\n \n \n for($i = 0; $i < count($idmenor); $i++)\n {\n // para solo almacenar los 2 primeros id\n if($idmenor[$i] < 3)\n {\n $imprime[] = $idmenor[$i];\n }\n }\n // almaceno todos los id con id_sub = 2\n for($a = 0; $a < count($idmayor); $a++)\n $imprime[] = $idmayor[$a];\n\n for($b = 0; $b < count($idmenor); $b++)\n {\n // para solo almacenar los 2 ultimos id con id_sub = 0\n if($idmenor[$b] > 2)\n {\n $imprime[] = $idmenor[$b];\n }\n }\n // mostrar la tabla con los id ordenados\n for($z = 0; $z < count($imprime); $z++)\n {\n $output .= ' \n <tr> \n <td>'.$imprime[$z].'</td> \n </tr>\n ';\n }\n }\n // $output .= '</table>'; \n return $output;\n }", "function palabraDescubierta($coleccionLetras){\n \n /*>>> Completar el cuerpo de la función, respetando lo indicado en la documentacion <<<*/\n}", "function baretat($id){\n{\n\tif ($id == 1)\n\t{\n\t\techo \"Rage : $OFFSET_RAGE; / $OFFSET_RAGE_MAX\";\n\t}\n\telseif ($id == 4)\n\t{\n\t\techo \"Energie : $OFFSET_ENER / $OFFSET_ENER_MAX\";\n\t}\n\telseif ($id == 6)\n\t{\n\t\techo \"P. Runique : 0 / 0\";\n\t}\n\telseif ($id == 2 || ($id) == 3 || ($id) == 5 || ($id) == 7 || ($id) == 8 || ($id) == 9 || ($id) == 11)\n\t{\n\t\techo \"Mana : $OFFSET_MANA / $OFFSET_MANA_MAX\";\n\t}\n}\n}", "function modelo_inmueble2($r)\n{\n for ($i = 0; $i < count($r); $i++) {\n $imagen = existeImagen(($r[$i]['foto1']));\n $codigo = str_ireplace(\"108-\", \"\", $r[$i]['Codigo_Inmueble']);\n $api = $r[$i];\n $descripcion = $api['descripcionlarga'];\n $limite_de_cadena = 90;\n // recortar cadena\n if (strlen($descripcion) >= $limite_de_cadena) {\n $descripcion = substr($descripcion, 0, $limite_de_cadena) . '...';\n } else {\n $descripcion = $descripcion . '<br>...';\n }\n echo '\n <div class=\"property-block col-12 col-sm-6 col-lg-4 col-xl-4\">\n <div class=\"inner-box\">\n <div class=\"image\">\n <a href=\"detalle-inmueble.php?co=' . $codigo . '\"><img src=\"' . $imagen . '\" alt=\"\"></a>\n <div class=\"sale\">' . $api['Gestion'] . ' </div>\n <div class=\"price\">$';\n if ($api['Gestion'] == 'Arriendo') {\n echo $api['Canon'];\n } else if ($api['Gestion'] == 'Venta') {\n echo $api['Venta'];\n } else {\n echo $api['Canon'] . '/ $' . $api['Venta'];\n }\n echo ' </div>\n </div>\n <div class=\"lower-content\">\n <div class=\"upper-box\" style=\"min-height: 9.3rem;\">\n <h3><a href=\"images/no_image.png\">' . $api['Tipo_Inmueble'] . '</a></h3>\n <div class=\"location\"><span class=\"icon flaticon-location-pin\"></span> ' . $api['Barrio'] . ', ' . $api['Ciudad'] . '</div>\n <div class=\"text-justify\">' . $descripcion . '</div>\n </div>\n <div class=\"lower-box clearfix\">\n <ul class=\"row justify-content-center\">\n <li class=\"col-auto\"><span class=\"icon flaticon-squares\"></span>' . $api['AreaConstruida'] . 'm<sup>2</li>\n <li class=\"col-auto\"><span class=\"icon flaticon-bed-1\"></span>' . $api['Alcobas'] . '</li>\n <li class=\"col-auto\"><span class=\"icon flaticon-bathtube-with-shower\"></span>' . $api['banios'] . '</li>\n <li class=\"col-auto\"><span class=\"icon flaticon-garage\"></span>' . $api['garaje'] . '</li>\n <li class=\"col-auto\">Codigo: ' . $codigo . '</li>\n </ul>\n </div>\n </div>\n </div>\n</div>\n ';\n }\n}", "function cariPosisi($batas){\nif(empty($_GET[halaman])){\n\t$posisi=0;\n\t$_GET[halaman]=1;\n}\nelse{\n\t$posisi = ($_GET[halaman]-1) * $batas;\n}\nreturn $posisi;\n}", "public function Zapis_vsechny_kolize_v_zaveru_formulare ($pole, $idcka_skolizi, $iducast, $formular){\r\n //zapise kolize formulare \r\n self::Zapis_kolize_formulare($pole,$idcka_skolizi, $iducast, $formular);\r\n //-----------------------------------------------------------------------------\r\n \r\n \r\n //a zjisti a zapise kolize ucastnika pro vsechny formulare \r\n $vsechny_kolize_ucastnika_pole = self::Najdi_kolize_vsechny($iducast);\r\n //echo \"<br>**Vsechny kolize_pole v Zapis_vsechny_kolize..... **\";\r\n //var_dump($vsechny_kolize_ucastnika_pole);\r\n \r\n //znevalidneni vsech kolizi pro ucastnika \r\n self::Znevalidni_kolize_ucastnika_vsechny($iducast);\r\n foreach($vsechny_kolize_ucastnika_pole as $jedna_kolize){\r\n if ($jedna_kolize->kolize_nastala) {\r\n $jedna_kolize->Zapis_jednu_kolizi();\r\n } \r\n }\r\n \r\n}", "public function get_atletas_talla_ropa_buzo() {\n return $this->atletas_talla_ropa_buzo;\n }", "public function berekenOppervlakte() {\n $opp_grondvlak = Figuur::$PI * $this->y * $this->y;\n $opp_mantel = 2 * Figuur::$PI * $this->y * $this->x;\n $opp_totaal = $opp_grondvlak + $opp_grondvlak + $opp_mantel;\n\n return \"De uitgerekende oppervlakte van de cilinder is: \" . $opp_totaal;\n }" ]
[ "0.6521705", "0.63838285", "0.6132068", "0.6096647", "0.60042334", "0.59531045", "0.56768554", "0.566073", "0.5623001", "0.56204915", "0.55686605", "0.5561826", "0.5528007", "0.55179983", "0.55133736", "0.54806364", "0.5472016", "0.54577416", "0.5448641", "0.54456735", "0.5429369", "0.54192764", "0.5416537", "0.5415539", "0.54075015", "0.53979546", "0.53860694", "0.5385851", "0.53825915", "0.5378239", "0.5376661", "0.5369807", "0.53695107", "0.53557086", "0.53541505", "0.5349278", "0.5342365", "0.53385127", "0.53272843", "0.5325684", "0.5323788", "0.5313733", "0.531163", "0.5309857", "0.5305376", "0.529743", "0.52940315", "0.5286759", "0.52773464", "0.52759415", "0.52754587", "0.52740955", "0.52740955", "0.5272515", "0.5271471", "0.527089", "0.5264396", "0.52589136", "0.5257523", "0.5255936", "0.52492315", "0.5244616", "0.5241813", "0.52232903", "0.5222868", "0.5218374", "0.521794", "0.5215976", "0.5205635", "0.5205632", "0.51987153", "0.51892877", "0.5188803", "0.5186836", "0.518031", "0.51796865", "0.5173309", "0.51688737", "0.51676047", "0.5165663", "0.51651394", "0.51544505", "0.51484877", "0.5143939", "0.51360697", "0.5135989", "0.51343054", "0.5122745", "0.51217467", "0.51165825", "0.51163363", "0.51137733", "0.51030916", "0.5102457", "0.51005393", "0.5099326", "0.50987303", "0.5096196", "0.50924593", "0.5090508" ]
0.52609503
57
Ma propre fonction de traitement des balises fermantes
function fonctionBaliseFermante($parseur, $nomBalise) { global $derniereBaliseRencontree; global $titre; global $lien; global $description; switch ($nomBalise) { case "ITEM" : // nous quittons un bloc item // nous pouvons afficher le titre de l'article echo "<tr><td height='28'><a href=\"$lien\" target='_blank'>".$titre."</a></td></tr>"; echo "<tr><td>$description</td></tr>"; // et on oublie $titre = ""; $lien = ""; $description = ""; break; } // On oublie la dernière balise rencontrée // et tout le reste $derniereBaliseRencontree = ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cs_safebalises($texte) {\r\n\t$texte = trim($texte);\r\n\t// ouvre/supprime la premiere balise trouvee fermee (attention aux modeles SPIP)\r\n\tif(preg_match(',^(.*)</([a-z]+)>,Ums', $texte, $m) && !preg_match(\",<$m[2][ >],\", $m[1])) \r\n\t\t$texte = strlen($m[1])?\"<$m[2]>$texte\":trim(substr($texte, strlen($m[2])+3));\r\n\t// referme/supprime la derniere balise laissee ouverte (attention aux modeles SPIP)\r\n\tif(preg_match(',^(.*)[ >]([a-z]+)<,Ums', $rev = strrev($texte), $m) && !preg_match(\",>$m[2]/<,\", $m[1])) \r\n\t\t$texte = strrev(strlen($m[1])?\">$m[2]/<$rev\":trim(substr($rev, strlen($m[2])+2)));\r\n\t// balises <p|span|div> a traiter\r\n\tforeach(array('span', 'div', 'p') as $b) {\r\n\t\t// ouvrante manquante\r\n\t\tif(($fin = strpos($texte, \"</$b>\")) !== false)\r\n\t\t\tif(!preg_match(\",<{$b}[ >],\", substr($texte, 0, $fin)))\r\n\t\t\t\t$texte = \"<$b>$texte\";\r\n\t\t// fermante manquante\r\n\t\t$texte = strrev($texte);\r\n\t\tif(preg_match(',[ >]'.strrev(\"<{$b}\").',', $texte, $reg)) {\r\n\t\t\t$fin = strpos(substr($texte, 0, $deb = strpos($texte, $reg[0])), strrev(\"</$b>\"));\r\n\t\t\tif($fin===false || $fin>$deb) $texte = strrev(\"</$b>\").$texte;\r\n\t\t}\r\n\t\t$texte = strrev($texte);\r\n\t}\r\n\treturn $texte;\r\n}", "function AfficheBatiment(batiment &$batiment, personnage &$oJoueur = NULL, maison &$oMaison = NULL){\r\n\t$ImgSize = 'height';\r\n\t$txt = NULL;\r\n\r\n\t$contenu = 'Ne peut rien contenir';\r\n\t\r\n\t$chkPositionJoueur = false;\r\n\t$nbLigne = 3;\r\n\t\r\n\tif(!is_null($oJoueur)){\t\r\n\t\t$chkPositionJoueur\t\t= $oJoueur->GetCoordonnee() == $batiment->GetCoordonnee();\r\n\t}\r\n\t\r\n\t$chkMarche = false;\r\n\t\r\n\t$lstBatimentAvecEsclaves = array(ferme::ID_BATIMENT, potager::ID_BATIMENT, mine::ID_BATIMENT, carriere::ID_BATIMENT, scierie::ID_BATIMENT);\r\n\r\n\tswitch($batiment->GetIDType()){\r\n\t\tcase maison::ID_BATIMENT:\r\n\t\t\t$ImgSize = 'width';\r\n\t\t\tif($chkPositionJoueur){\r\n\t\t\t\t$contenu = '<p>Ne peut rien contenir.</p>';\r\n\t\t\t\t$chkOptions = false;\r\n\t\t\t}else{\r\n\t\t\t\t$contenu = '<p>Si ici que vous devez vous placer pour vous inscrire ou valider une quête.</p>';\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t/* case 'bank':\r\n\t\t\t$contenu = $batiment->AfficheContenu($oJoueur);\r\n\t\t\tbreak; */\r\n\t\tcase scierie::ID_BATIMENT:\r\n\t\tcase ferme::ID_BATIMENT:\r\n\t\tcase mine::ID_BATIMENT :\r\n\t\tcase potager::ID_BATIMENT:\r\n\t\tcase carriere::ID_BATIMENT:\r\n\t\t\t$ImgSize = 'width';\r\n\t\t\tif(!is_null($oJoueur)){\t$contenu = $batiment->AfficheContenu($oJoueur);}\r\n\t\t\tbreak;\r\n\t\tcase marche::ID_BATIMENT:\r\n\t\t\tif($chkPositionJoueur){\r\n\t\t\t\t$chkMarche = true;\r\n\t\t\t}else{\r\n\t\t\t\t$contenu = '<p>Vous devez vous placez sur son emplacement pour afficher les transactions disponibles.</p>';\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n\tif(in_array($batiment->GetIDType(), $lstBatimentAvecEsclaves))\r\n\t{\r\n\t\t$arLignes[3] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>'\r\n\t\t.(!is_null($oJoueur)?\r\n\t\t$batiment->AfficheAchatEsclave($oJoueur)\r\n\t\t:'Possibilité d\\'acheter des esclaves pour augmenter sa production')\r\n\t\t.'</td>\r\n\t\t\t</tr>';\r\n\t\t$nbLigne++;\r\n\t}\r\n\t\r\n\tif(!is_null($oJoueur))\r\n\t{\r\n\t\t$arLignes[2] = '\r\n\t\t\t<tr><td>'.$batiment->AfficheOptionAmeliorer($oJoueur, $oMaison).'</td></tr>';\r\n\t\t$arLignes[4] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>'\r\n\t\t\t\t\t.'<img alt=\"Barre status\" src=\"./fct/fct_image.php?type=statusetat&amp;value='.$batiment->GetEtat().'&amp;max='.$batiment->GetEtatMax().'\" />'\r\n\t\t\t\t\t.'<br />'\r\n\t\t\t\t\t.$batiment->AfficheOptionReparer($oJoueur)\r\n\t\t\t\t.'</td>\r\n\t\t\t</tr>';\r\n\t\t$arLignes[7] = '\r\n\t\t\t<tr><td>'.$contenu.'</td></tr>';\r\n\t\r\n\t\t$nbLigne+=3;\r\n\t\t\r\n\t\tif($batiment->GetIDType() == marche::ID_BATIMENT)\r\n\t\t{\r\n\t\t\t$arLignes[8] = '\r\n\t\t\t<tr><td>'.$batiment->AfficheTransactions($oJoueur).'</td></tr>';\r\n\t\t\t\r\n\t\t\t$nbLigne++;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$arLignes[5] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<ul style=\"list-style-type:none; padding:0px; text-align:center; margin:0px;\">\r\n\t\t\t\t\t\t<li style=\"display:inline;\">'.AfficheIcone(objArmement::TYPE_ATTAQUE).' : '.(is_null($batiment->GetAttaque())?'0':$batiment->GetAttaque()).'</li>\r\n\t\t\t\t\t\t<li style=\"display:inline; margin-left:40px;\">'.AfficheIcone(objArmement::TYPE_DISTANCE).' : '.(is_null($batiment->GetDistance())?'0':$batiment->GetDistance())\t.'</li>\r\n\t\t\t\t\t\t<li style=\"display:inline; margin-left:40px;\">'.AfficheIcone(objArmement::TYPE_DEFENSE).' : '.(is_null($batiment->GetDefense())?'0':$batiment->GetDefense()).'</li>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>';\r\n\t$arLignes[6] = '\r\n\t\t\t<tr><td>'.$batiment->GetDescription().'</td></tr>';\r\n\t$arLignes[1] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td rowspan=\"'.$nbLigne.'\" style=\"width:400px;\">\r\n\t\t\t\t\t<img alt=\"'.$batiment->GetType().'\" src=\"./img/batiments/'.$batiment->GetType().'.png\" width=\"400px\" onmouseover=\"montre(\\''.CorrectDataInfoBulle($batiment->GetDescription()).'\\');\" onmouseout=\"cache();\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<th>'\r\n\t\t\t\t\t.(!is_null($oJoueur)?\r\n\t\t\t\t\t\t'<a name=\"'.str_replace(',', '_', $batiment->GetCoordonnee()).'\">'\r\n\t\t\t\t\t\t:NULL)\r\n\t\t\t\t\t.$batiment->GetNom((!is_null($oJoueur)?$oJoueur->GetCivilisation():personnage::CIVILISATION_GAULOIS)).(!is_null($oJoueur)?' ('.$batiment->GetNiveau().' / '.$batiment->GetNiveauMax().')':NULL)\r\n\t\t\t\t\t.(!is_null($oJoueur)?\r\n\t\t\t\t\t\t'</a>'\r\n\t\t\t\t\t\t:NULL)\r\n\t\t\t\t.'</th>\r\n\t\t\t</tr>';\r\n\t\r\n\t//on trie par keys\r\n\tksort($arLignes);\r\n\t\r\n\treturn implode('', $arLignes);\r\n}", "public function EncabezadoFBM2() {\t\r\n\t\t$ancho = 256;\r\n\t\t$fs = 10;\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t$this->SetDrawColor(0, 0, 0);\r\n\t\t\r\n\t\t$text = 'Página '.$this->PageNo().' de {nb}';\r\n\t\t$this->SetFont('Arial','',8);\r\n\t\t$this->Celda(100, 6, \"C.M.S.= U.B.M. - 14(17-12-2007)\", 0, 0, '');\r\n\t\t$this->Celda($ancho-100, 6, $text, 0, 1, 'R', true);\r\n\t\t$y1 = $this->getY();\r\n\t\t$x1 = $this->getX();\r\n\t\t$this->Celda(80, 25, '', 1, 0, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$x2 = $this->getX();\r\n\t\t$this->Celda($ancho-80, 25, '', 1, 1, '', true);\r\n\t\t$this->setY($y1);\r\n\t\t$this->setX($x1);\r\n\t\t$this->Image( 'images/logo_medium.png', 21, 17, 78 );\r\n\t\t$this->setY($y2+5);\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Formato( 'Helvetica', 'B', 11 );\r\n\t\t$this->Celda($ancho-85, 6, 'Formulario B.M.2', 0, 1, 'C', true);\r\n\t\t$this->Formato( 'Helvetica', '', 9 );\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Celda($ancho-85, 8, 'Relación de Movimiento de Bienes', 0, 1, 'C', true);\r\n\t\t\r\n\t\t$this->Ln(8);\r\n\t\t$y = $this->getY();\r\n\t\t$x = $this->getX();\r\n\t\t$this->Celda($ancho, 26, '', 1, 1, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$this->setY($y+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 5, '1. Estado: ', 0, 0, '', true);\r\n\t\t$this->Celda($ancho-25, 5, $this->capitalizar($this->header['estado']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setY($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 5, '2. Municipio: ', 0, 0, '', true);\r\n\t\t$this->Celda(50, 5, strtoupper($this->header['municipio']), 'B', 0, '', true);\r\n\t\t$this->Celda(56, 5, '3. Unidad de Trabajo o Dependencia: ', 0, 0, '', true);\r\n\t\t$this->Celda(126, 5, $this->capitalizar($this->header['dependencia']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setY($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 5, '4. Servicio: ', 0, 0, '', true);\r\n\t\t$this->Celda(100, 5, 'CONTRALORIA MUNICIPAL DE SUCRE', 'B', 0, '', true);\r\n\t\t$this->Celda(35, 5, '5. Periodo de la cuenta: ', 0, 0, '', true);\r\n\t\t$this->Celda(96, 5, $this->capitalizar($this->header['fecha']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setY($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(30, 5, '6. Direccion o Lugar: ', 0, 0, '', true);\r\n\t\t$this->Celda(221, 5, $this->capitalizar($this->header['direccion']), 'B', 0, '', true);\r\n\t\t$this->setY($y2);\r\n\t}", "public function EncabezadoFBM1() {\t\r\n\t\t$fs = 10;\r\n\t\t$ancho = 256;\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t$this->SetDrawColor(0, 0, 0);\r\n\t\t\r\n\t\t$text = 'Página '.$this->PageNo().' de {nb}';\r\n\t\t$this->SetFont('Arial','',8);\r\n\t\t$this->Celda(100, 6, 'C.M.S.= U.B.M. - 07(09-08-2010)', 0, 0, '');\r\n\t\t\t\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->Celda(156, 6, $text, 0, 1, 'R', true);\r\n\t\t$y1 = $this->getY();\r\n\t\t$x1 = $this->getX();\r\n\t\t$this->Celda(80, 23, '', 1, 0, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$x2 = $this->getX();\r\n\t\t$this->Celda($ancho-80, 23, '', 1, 1, '', true);\r\n\t\t$this->setY($y1);\r\n\t\t$this->setX($x1);\r\n\t\t$this->Image( 'images/logo_medium.png', 21, 17, 68 );\r\n\t\t$this->setY($y2+5);\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Formato( 'Helvetica', 'B', 11 );\r\n\t\t$this->Celda($ancho-84, 6, 'FORMULARIO B.M.1', 0, 1, 'C', true);\r\n\t\t$this->Formato( 'Helvetica', '', 9 );\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Celda($ancho-84, 8, 'INVENTARIO DE BIENES MUEBLES', 0, 1, 'C', true);\r\n\t\t\r\n\t\t$fs = 8;\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t$this->SetDrawColor(0, 0, 0);\r\n\t\t$this->Ln(6);\r\n\t\t\r\n\t\t$y = $this->getY();\r\n\t\t$x = $this->getX();\r\n\t\t$this->Celda(256, 28, '', 1, 1, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$this->setY($y+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(30, 5, '1. Entidad Propietaria: ', 0, 0, '', true);\r\n\t\t$this->Celda(215, 5, 'MUNICIPIO SUCRE', 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setX($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 5, '2. Servicio: ', 0, 0, '', true);\r\n\t\t$this->Celda(225, 5, $this->capitalizar($this->header['servicio']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setX($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(50, 5, '3. Unidad de Trabajo o Dependencia: ', 0, 0, '', true);\r\n\t\t$this->Celda(195, 5, $this->capitalizar($this->header['dependencia']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setX($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 5, '4. Estado: ', 0, 0, '', true);\r\n\t\t$this->Celda(120, 5, $this->capitalizar($this->header['estado']), 'B', 0, '', true);\r\n\t\t$this->Celda(20, 5, '5. Municipio: ', 0, 0, '', true);\r\n\t\t$this->Celda(85, 5, $this->capitalizar($this->header['municipio']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setX($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(30, 5, '6. Direccion o Lugar: ', 0, 0, '', true);\r\n\t\t$this->Celda(110, 5, $this->capitalizar($this->header['direccion']), 'B', 0, '', true);\r\n\t\t$this->Celda(20, 5, '7. Fecha: ', 0, 0, '', true);\r\n\t\t$this->Celda(85, 5, $this->capitalizar($this->header['fecha']), 'B', 0, '', true);\r\n\t\t$this->setY($y2);\r\n\t}", "public function EncabezadoFBM3() {\t\r\n\t\t$ancho = 256;\r\n\t\t$fs = 10;\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t$this->SetDrawColor(0, 0, 0);\r\n\t\t\r\n\t\t//$text = 'Página '.$this->PageNo().' de {nb}';\r\n\t\t$this->SetFont('Arial','',8);\r\n\t\t$this->Celda(100, 6, \"C.M.S.= U.B.M. - 14(17-12-2007)\", 0, 1, '');\r\n\t\t//$this->Celda($ancho-100, 6, $text, 0, 1, 'R', true);\r\n\t\t$y1 = $this->getY();\r\n\t\t$x1 = $this->getX();\r\n\t\t$this->Celda(80, 25, '', 1, 0, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$x2 = $this->getX();\r\n\t\t$this->Celda($ancho-108, 25, '', 1, 0, '', true);\r\n\t\t$y3 = $this->getY();\r\n\t\t$x3 = $this->getX();\r\n\t\t$this->Celda(28, 25, '', 1, 1, '', true);\r\n\t\t$y4 = $this->getY();\r\n\t\t$x4 = $this->getX();\r\n\t\t\t\r\n\t\t$this->setY($y1);\r\n\t\t$this->setX($x1);\r\n\t\t$this->Image( 'images/logo_medium.png', 21, 17, 78 );\r\n\t\t$this->setY($y2+5);\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Formato( 'Helvetica', 'B', 11 );\r\n\t\t$this->Celda($ancho-115, 6, 'Formulario B.M.3', 0, 1, 'C', true);\r\n\t\t$this->Formato( 'Helvetica', '', 9 );\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Celda($ancho-115, 8, 'RELACION DE BIENES MUEBLES FALTANTES', 0, 1, 'C', true);\r\n\t\t$this->setY($y3);\r\n\t\t$this->setX($x3);\r\n\t\t$this->Celda(28, 8, 'HOJA Nro.', 1, 1, 'C', true);\r\n\t\t$this->setX($x3);\r\n\t\t$this->Celda(28, 17, $this->PageNo(), 1, 1, 'C', true);\r\n\t\t$this->setY($y4);\r\n\t\t$this->setX($x4);\r\n\t\t\r\n\t\t$this->Ln(2);\r\n\t\t$y = $this->getY();\r\n\t\t$x = $this->getX();\r\n\t\t$this->Celda($ancho, 26, '', 1, 1, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$this->setY($y+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 10, '1. Entidad:', 0, 0, '', true);\r\n\t\t$xt = $this->getX();\r\n\t\t$this->Celda(20, 5, 'Estado ', 0, 0, '', true);\r\n\t\t$this->Celda($ancho-111, 5, $this->capitalizar($this->header['estado']), 'B', 1, '', true);\r\n\t\t$this->setX($xt);\r\n\t\t$this->Celda(20, 5, 'Municipio ', 0, 0, '', true);\r\n\t\t$this->Celda($ancho-110, 5, strtoupper($this->header['municipio']), 'B', 0, '', true);\r\n\t\t$xt = $this->getX();\r\n\t\t$this->Ln();\r\n\t\t$yt = $this->getY();\r\n\t\t\r\n\t\t$this->setY($y);\r\n\t\t$this->setX($xt);\r\n\t\t$this->Celda(69, 6, '4. Identificación del Comprobante', 1, 1, 'C', true);\r\n\t\t$this->setX($xt);\r\n\t\t$this->Celda(44, 6.5, 'Codigo Concepto Movimiento', 1, 0, '', true);\r\n\t\t$this->Celda(25, 6.5, '60', 1, 1, 'C', true);\r\n\t\t$this->setX($xt);\r\n\t\t$this->Celda(44, 6.75, 'Numero de Comprobante', 1, 0, '', true);\r\n\t\t$this->Celda(25, 6.75, $this->header['comprobante'], 1, 1, 'C', true);\r\n\t\t$this->setX($xt);\r\n\t\t$this->Celda(44, 6.75, 'Fecha de la Operacion', 1, 0, '', true);\r\n\t\t$this->Celda(25, 6.75, $this->header['fecha'], 1, 1, 'C', true);\r\n\t\t\r\n\t\t$this->setY($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(40, 5, '2. Unidad de Trabajo: ', 0, 0, '', true);\r\n\t\t$this->Celda($ancho-111, 5, $this->capitalizar($this->header['dependencia']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setY($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(40, 5, '3. Unidad Administrativa: ', 0, 0, '', true);\r\n\t\t$this->Celda($ancho-111, 5, $this->capitalizar($this->header['adm']), 'B', 1, '', true);\r\n\t\t$this->Ln();\r\n\t}", "function luas_alas_balok($nilai1, $nilai2) {\n\t\n\t\n\t\n\t\n\t}", "public function bemFoiReavaliacao() {\n\n if ($this->lBemReavaliadao == null) {\n\n $this->lBemReavaliadao = false;\n if ($this->getTotalDeReavaliacoes() > 0) {\n $this->lBemReavaliadao = true;\n }\n }\n return $this->lBemReavaliadao;\n }", "function Feriados1($ano, $posicao) {\n $dia = 86400;\n $datas = array();\n $datas['pascoa'] = easter_date($ano);\n $datas['sexta_santa'] = $datas['pascoa'] - (2 * $dia);\n $datas['carnaval'] = $datas['pascoa'] - (47 * $dia);\n $datas['corpus_cristi'] = $datas['pascoa'] + (60 * $dia);\n $feriados = array(\n '01/01',\n '02/02', // Navegantes\n date('d/m', $datas['carnaval']),\n date('d/m', $datas['sexta_santa']),\n date('d/m', $datas['pascoa']),\n '21/04',\n '01/05',\n date('d/m', $datas['corpus_cristi']),\n '07/09',\n '20/09', // Revolução Farroupilha \\m/\n '12/10',\n '02/11',\n '15/11',\n '25/12',\n );\n\n return $feriados[$posicao] . \"/\" . $ano;\n}", "function cariPosisi($batas){\nif(empty($_GET['halgalerifoto'])){\n\t$posisi=0;\n\t$_GET['halgalerifoto']=1;\n}\nelse{\n\t$posisi = ($_GET['halgalerifoto']-1) * $batas;\n}\nreturn $posisi;\n}", "function beratbadanideal($tb, $g){\n\tif($g == \"Pria\" && $tb >= 160 ||$g == \"Wanita\" && $tb >= 150){\n\t\t$bbi = beratbadanormal($tb) - (0.1 * beratbadanormal($tb));\n\t}else if($g == \"Pria\" && $tb < 160 || $g == \"Wanita\" && $tb < 150){\n\t\t$bbi = beratbadanormal($tb) - 1;\n\t}\n\treturn $bbi;\n}", "function fibonacci2 (int $jmlBilangan) {\n $fibonacci = \"\";\n $satuBilanganSebelumnya = 0;\n $duaBilanganSebelumnya = 1;\n\n if ($jmlBilangan < 0) {\n return $fibonacci; # langsung hentikan fungsi disini\n }\n\n for ($i = 0; $i <$jmlBilangan; $i++) {\n if ($i < 1) {\n $bilangan = $i;\n } else {\n $bilangan = $satuBilanganSebelumnya + $duaBilanganSebelumnya;\n\n # update variabel untuk bilangan sebelumnya\n $duaBilanganSebelumnya = $satuBilanganSebelumnya;\n $satuBilanganSebelumnya = $bilangan;\n }\n # tambahkan bilangan ke dalam string\n $fibonacci .= \"{$bilangan}, \";\n }\n return $fibonacci;\n}", "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function kalorinormal($g, $tb){\n\tif($g == \"Pria\"){\n\t\t$kb = beratbadanideal($tb, $g) * 30;\n\t}else if($g == \"Wanita\"){\n\t\t$kb = beratbadanideal($tb, $g) * 25;\n\t}\nreturn $kb;\n}", "function cariPosisi($batas){\nif(empty($_GET['halpengumuman'])){\n\t$posisi=0;\n\t$_GET['halpengumuman']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengumuman']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halpengajar'])){\n\t$posisi=0;\n\t$_GET['halpengajar']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengajar']-1) * $batas;\n}\nreturn $posisi;\n}", "function checkOblig(&$falta, &$f, $oblig) {\r\n# versio obligatoris en formulari\r\n foreach (explode(\"#\", $oblig) as $cm) {\r\n if (!$f[$cm])\r\n $falta[$cm][] = 'oblig';\r\n }\r\n return count($falta);\r\n}", "function kaloriaktivitas($av, $tb, $g){\n\tif($av == \"Ringan\"){\n\t\t$kba = kalorinormal($g, $tb) * 0.2;\n\t}else if($av == \"Sedang\"){\n\t\t$kba = kalorinormal($g, $tb) * 0.3;\n\t}else if($av == \"Berat\"){\n\t\t$kba = kalorinormal($g, $tb) * 0.5;\n\t}\nreturn $kba;\n}", "public function bernafas()\n \t{\n \t\techo 'Bernafas menggunakan hidung, '.PHP_EOL;\n \t}", "public function findBatiments($language) {\r\n $select = $this->_createSelectQuery();\r\n // batiment\r\n $select->field('id', $this->_tableName);\r\n $select->field('nom_' . $language, $this->_tableName, 'nom');\r\n $select->field('description_' . $language, $this->_tableName, 'description');\r\n $select->field('image', $this->_tableName);\r\n $select->field('niveau', $this->_tableName);\r\n $select->field('cout', $this->_tableName);\r\n $select->field('entretien', $this->_tableName);\r\n $select->field('duree_construction', $this->_tableName);\r\n $select->field('duree_recolte', $this->_tableName);\r\n $select->field('duree_hospitalisation', $this->_tableName);\r\n $select->field('cout_hospitalisation', $this->_tableName);\r\n $select->field('gain', $this->_tableName);\r\n $select->field('capacite', $this->_tableName);\r\n $select->field('visibilite', $this->_tableName);\r\n $select->field('id_prev', $this->_tableName);\r\n // Batiment Suivant\r\n $select->field('id', 'batiment_suivant', 'id_next');\r\n // type_batiment 1\r\n $select->field('id', 'type1_batiment', 'id_type1');\r\n $select->field('id_parent', 'type1_batiment', 'id_parent_type1');\r\n $select->field('nom_' . $language, 'type1_batiment', 'nom_type1');\r\n $select->field('is_unique', 'type1_batiment', 'is_unique_type1');\r\n // type_batiment 2\r\n $select->field('id', 'type2_batiment', 'id_type2');\r\n $select->field('id_parent', 'type2_batiment', 'id_parent_type2');\r\n $select->field('nom_' . $language, 'type2_batiment', 'nom_type2');\r\n $select->field('is_unique', 'type2_batiment', 'is_unique_type2');\r\n // From et jointures\r\n $select->from($this->_tableName);\r\n $select->innerJoin('type_batiment', array('batiment.id_type = type1_batiment.id'), 'type1_batiment');\r\n $select->leftJoin('type_batiment', array('type1_batiment.id_parent = type2_batiment.id'), 'type2_batiment');\r\n $select->leftJoin('batiment', array('batiment_suivant.id_prev = batiment.id'), 'batiment_suivant');\r\n // Ordre\r\n $select->order('batiment.niveau');\r\n\r\n return $this->_mapper->buildObjectsFromRows($this->_selectAll($select));\r\n }", "function personnaliser_bandeau_bas_fin($flux){\n\tif (defined('_PERSO_BANDEAU_BAS_FIN'))\n\t\treturn afficher_noisettes(_PERSO_BANDEAU_BAS_FIN, $flux, false);\n}", "function cariPosisi($batas){\nif(empty($_GET['halkategoriberita'])){\n\t$posisi=0;\n\t$_GET['halkategoriberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halkategoriberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function text_arabic($sura,$aya,$text){\n\t\t$table_per_kata\t= get_table(\"SELECT * FROM terjemah_kata WHERE sura='$sura' \n\t\t\t\t\t\t\t\t\tAND aya='$aya'\");\n\t\t// inisialisasi\n\t\t$arr_terjemah = array();\n\t\tforeach($table_per_kata as $j => $row_per_kata){\n\t\t\t$m = $j+1;\n\t\t\t$arr_terjemah[$m] \t\t= $row_per_kata[indonesia]; \n\t\t\t$arr_arab_harokat[$m] \t= $row_per_kata[arab_harokat]; \n\t\t}\n\t\t\n\t\t// explode aya text into word\n\t\t$arr_kata_arab\t= explode(\" \",$text);\n\t\t\n\t\t//menampilkan tiap kata beserta terjemahnya\n\t\t/*echo \"\n\t\t<pre>\n\t\t$sura:$aya \";*/\n\t\t\n\t\t$m = 1;\n\t\tforeach($arr_kata_arab as $k => $kata_arab){\n\t\t\t$event_aya_word =\"\";\n\t\t\t//menampilkan terjemahan per kata\n\t\t\t//echo \"$kata_arab {$arr_arab[$m]}<br>\";\n\t\t\tif($kata_arab==$arr_arab_harokat[$m] ){\n\t\t\t\t$output .= \"\n\t\t\t\t<span id='terjemah_{$sura}_{$aya}_{$m}' \n\t\t\t\t\tstyle='visibility:hidden;position:absolute;width:0px;height:0px;' >\n\t\t\t\t\t{$arr_terjemah[$m]}\n\t\t\t\t</span>\n\t\t\t\t\";\n\t\t\t\t$event_aya_word =\"\n\t\t\t\tonmousemove='move_terjemah($sura,$aya,$m,event)' \n\t\t\t\tonmouseout='hide_terjemah($sura,$aya,$m)'\n\t\t\t\t\";\n\t\t\t\t\n\t\t\t\t$id_kata = \"kata_{$sura}_{$aya}_{$m}\";\n\t\t\t\t$m++;\n\t\t\t}\n\t\t\t//menampilkan kata arab\n\t\t\t$output .= \"\n\t\t\t<span \n\t\t\t\tid='$id_kata'\n\t\t\t\tclass='aya_word'\n\t\t\t\t$event_aya_word >\n\t\t\t\t\".repair_ar($kata_arab).\"\n\t\t\t</span>\n\t\t\t\";\n\t\t}\n\t\treturn $output;\n\t}", "function HitungUlangBIPOTPMB($PMBID) {\r\n $pmb = GetFields('pmb', \"KodeID='\".KodeID.\"' and PMBID\", $PMBID, '*');\r\n // Hitung Total BIPOT & Pembayaran\r\n $TotalBiaya = GetaField(\"bipotmhsw bm\r\n left outer join bipot2 b2 on bm.BIPOT2ID = b2.BIPOT2ID\",\r\n \"bm.PMBMhswID = 0 and bm.KodeID = '\".KodeID.\"'\r\n and bm.NA = 'N'\r\n and bm.TahunID = '$pmb[PMBPeriodID]' and bm.PMBID\", $PMBID,\r\n \"sum(bm.TrxID * bm.Jumlah * bm.Besar)\")+0;\r\n $TotalBayar = GetaField('bayarmhsw',\r\n \"PMBMhswID = 0 and KodeID = '\".KodeID.\"'\r\n and NA = 'N'\r\n and TahunID = '$pmb[PMBPeriodID]' and PMBID\", $PMBID,\r\n \"sum(Jumlah)\")+0;\r\n // Update data PMB\r\n $s = \"update pmb\r\n set TotalBiaya = $TotalBiaya,\r\n TotalBayar = $TotalBayar\r\n where KodeID = '\".KodeID.\"'\r\n and PMBID = '$PMBID' \r\n limit 1\";\r\n $r = _query($s);\r\n //echo \"<pre>$s</pre>\";\r\n}", "function cariPosisi($batas){\nif(empty($_GET[halaman])){\n\t$posisi=0;\n\t$_GET[halaman]=1;\n}\nelse{\n\t$posisi = ($_GET[halaman]-1) * $batas;\n}\nreturn $posisi;\n}", "function pembagiankalori($tb, $g){\n\n\t$kbp = jumlahkalori($tb, $g, $av, $u) * 0.2;\n\t$kbr1 = jumlahkalori($tb, $g, $av, $u) * 0.1;\n\t$kbs = jumlahkalori($tb, $g, $av, $u) * 0.25;\n\t$kbr2 = jumlahkalori($tb, $g, $av, $u) * 0.1;\n\t$kbm = jumlahkalori($tb, $g, $av, $u) * 0.25;\n\t$kbr3 = jumlahkalori($tb, $g, $av, $u) * 0.1;\n\n\treturn array($kbp, $kbr1, $kbs, $kbr2, $kbm, $kbr3);\n}", "function bultoSimilar($bulto,$manifiesto)\n {\n $sql=<<<sql\n select bul_ref\n from manembxbulto\n where manemb_id=$manifiesto\nsql;\n\n $rs=&$this->con->Execute($sql);\n $cad=\"\";\n $sep=\",\";\n while(!$rs->EOF)\n {\n $cad.=\"'\".$rs->fields[0].\"'\".$sep;\n $rs->MoveNext();\n }\n \n //recuperar bultos quedados de igual origen y destino\n $oManEmb=new c_manifiesto_embarque($this->con,$this->usu_audit);\n $oManEmb->info($manifiesto);\n $sql=<<<sql\n select distinct(bq.bul_ref)\n from manembxbultoqueda bq, manembxbultoreal br\n where\n bq.bul_ref<>br.bul_ref\n and bq.manemb_id in \n (\n select distinct manemb_id from manifiesto_embarque\n where manemb_origen='$oManEmb->manemb_origen' and manemb_destino='$oManEmb->manemb_destino' ) \nsql;\n $rs=&$this->con->Execute($sql);\n while(!$rs->EOF)\n {\n $cad.=\"'\".$rs->fields[0].\"'\".$sep; \n $rs->MoveNext(); \n }\n $cad=substr($cad,0,(strlen($cad)-1));\n return($cad);\n }", "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halhasilkelulusansiswa'])){\n\t$posisi=0;\n\t$_GET['halhasilkelulusansiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['halhasilkelulusansiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "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 getBanglaDate($date) {\r\n\r\n$engArray = array (\r\n1,2,3,4,5,6,7,8,9,0, 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'am', 'pm', 'th', 'st', 'rd', 'th', 'Sat', 'Sun', 'Mon', 'Tue', 'Tues', 'Wed', 'Thurs', 'Thu', 'Fri', 'Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'\r\n);\r\n$bangArray = array (\r\n\t'১','২','৩','৪','৫','৬','৭','৮','৯','০',\r\n\t'জানুয়ারি', 'ফেব্রুয়ারি', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর',\r\n\t'সকাল', 'দুপুর', '-এ', '-এ', '-এ', '-এ', 'শনি', 'রবি', 'সোম', 'মঙ্গল', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'বৃহস্পতি', 'শুক্র', 'শনিবার', 'রবিবার',\r\n\t'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার'\r\n);\r\n\r\n\t$converted = str_replace($engArray, $bangArray, $date);\r\n \treturn $converted;\r\n}", "function perolehan_medali($arr){\n // Kode kamu di sini\n}", "public function ambilData() {\n // read file & get the data (file_get_contents)\n $data = file_get_contents($this->file);\n $this->daftar_barang = json_decode($data, true);\n $this->daftar_barang = array_values($this->daftar_barang);\n }", "public function bExamen_l(){\r\n\t\t $c=0;\r\n $sql=\"select * from texamen where descripcion like'$this->descripcion%' and tipo='LABORATORIO' \";\r\n\t\t$cursor=parent::ejecuta_sql($sql);\t\t \r\n\t\tif($row= parent::proxima_tupla($cursor))\r\n\t\t {\r\n\t\t\t DO{\r\n\t\t\t \t$fila[$c][1]=$row[\"id_examen\"];\r\n\t\t\t\t$fila[$c][2]=$row[\"descripcion\"];\r\n\t\t\t\t$fila[$c][3]=$row[\"tipo\"];\r\n\t\t\t\t$c++;\r\n\t\t\t\t}while($row= parent::proxima_tupla($cursor));\r\n\t\t }\t\t\r\n\t\tif ( $fila>0 )\r\n\t\t\treturn $fila;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t\t\t\r\n\t\t\tparent::cerrar_bd();\r\n }", "public function bExamen_i(){\r\n\t\t $c=0;\r\n $sql=\"select * from texamen where descripcion like'$this->descripcion%' and tipo='IMAGEN' \";\r\n\t\t$cursor=parent::ejecuta_sql($sql);\t\t \r\n\t\tif($row= parent::proxima_tupla($cursor))\r\n\t\t {\r\n\t\t\t DO{\r\n\t\t\t \t$fila[$c][1]=$row[\"id_examen\"];\r\n\t\t\t\t$fila[$c][2]=$row[\"descripcion\"];\r\n\t\t\t\t$fila[$c][3]=$row[\"tipo\"];\r\n\t\t\t\t$c++;\r\n\t\t\t\t}while($row= parent::proxima_tupla($cursor));\r\n\t\t }\t\t\r\n\t\tif ( $fila>0 )\r\n\t\t\treturn $fila;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t\t\t\r\n\t\t\tparent::cerrar_bd();\r\n }", "public function Bali_map()\n\t{\n\t\t$this->template = view::factory('templates/Gmap')\n\t\t\t->set('lang', url::lang())\n\t\t\t->set('website_name', Kohana::lang('website.name'))\n\t\t\t->set('website_slogan', Kohana::lang('website.slogan'))\n\t\t\t->set('webpage_title', Kohana::lang('nav.'.str_replace('_', ' ', url::current())))\n\t\t\t->set('map_options', Kohana::config('Gmap.maps.Bali'))\n\t\t\t->set('map_markers', Kohana::config('Gmap.markers.Bali'))\n\t\t\t->set('map_icon_path', url::base().skin::config('images.Gmap.path'));\n\t}", "public function bExamen_e(){\r\n\t\t $c=0;\r\n $sql=\"select * from texamen where descripcion like'$this->descripcion%' and tipo='ESPECIALES' \";\r\n\t\t$cursor=parent::ejecuta_sql($sql);\t\t \r\n\t\tif($row= parent::proxima_tupla($cursor))\r\n\t\t {\r\n\t\t\t DO{\r\n\t\t\t \t$fila[$c][1]=$row[\"id_examen\"];\r\n\t\t\t\t$fila[$c][2]=$row[\"descripcion\"];\r\n\t\t\t\t$fila[$c][3]=$row[\"tipo\"];\r\n\t\t\t\t$c++;\r\n\t\t\t\t}while($row= parent::proxima_tupla($cursor));\r\n\t\t }\t\t\r\n\t\tif ( $fila>0 )\r\n\t\t\treturn $fila;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t\t\t\r\n\t\t\tparent::cerrar_bd();\r\n }", "public function getBanyakSoal();", "function cariPosisi($batas){\nif(empty($_GET['haldatasiswa'])){\n\t$posisi=0;\n\t$_GET['haldatasiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['haldatasiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "function terbilang($bilangan) {\n\n\t\t$angka = array('0','0','0','0','0','0','0','0','0','0',\n\t\t\t'0','0','0','0','0','0');\n\t\t$kata = array('','satu','dua','tiga','empat','lima',\n\t\t\t'enam','tujuh','delapan','sembilan');\n\t\t$tingkat = array('','ribu','juta','milyar','triliun');\n\n\t\t$panjang_bilangan = strlen($bilangan);\n\n\t\t/* pengujian panjang bilangan */\n\t\tif ($panjang_bilangan > 15) {\n\t\t\t$kalimat = \"Diluar Batas\";\n\t\t\treturn $kalimat;\n\t\t}\n\n\t\t/* mengambil angka-angka yang ada dalam bilangan,\n dimasukkan ke dalam array */\n\t\tfor ($i = 1; $i <= $panjang_bilangan; $i++) {\n\t\t\t$angka[$i] = substr($bilangan,-($i),1);\n\t\t}\n\n\t\t//only for debugging\n\t\t//var_dump ($angka);\n\n\t\t$i = 1;\n\t\t$j = 0;\n\t\t$kalimat = \"\";\n\n\n\t\t/* mulai proses iterasi terhadap array angka */\n\t\twhile ($i <= $panjang_bilangan) {\n\n\t\t\t$subkalimat = \"\";\n\t\t\t$kata1 = \"\";\n\t\t\t$kata2 = \"\";\n\t\t\t$kata3 = \"\";\n\n\t\t\t/* untuk ratusan */\n\t\t\tif ($angka[$i+2] != \"0\") {\n\t\t\t\tif ($angka[$i+2] == \"1\") {\n\t\t\t\t\t$kata1 = \"seratus\";\n\t\t\t\t} else {\n\t\t\t\t\t$kata1 = $kata[$angka[$i+2]] . \" ratus\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* untuk puluhan atau belasan */\n\t\t\tif ($angka[$i+1] != \"0\") {\n\t\t\t\tif ($angka[$i+1] == \"1\") {\n\t\t\t\t\tif ($angka[$i] == \"0\") {\n\t\t\t\t\t\t$kata2 = \"sepuluh\";\n\t\t\t\t\t} elseif ($angka[$i] == \"1\") {\n\t\t\t\t\t\t$kata2 = \"sebelas\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$kata2 = $kata[$angka[$i]] . \" belas\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$kata2 = $kata[$angka[$i+1]] . \" puluh\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* untuk satuan */\n\t\t\tif ($angka[$i] != \"0\") {\n\t\t\t\tif ($angka[$i+1] != \"1\") {\n\t\t\t\t\t$kata3 = $kata[$angka[$i]];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* pengujian angka apakah tidak nol semua,\n lalu ditambahkan tingkat */\n\t\t\tif (($angka[$i] != \"0\") OR ($angka[$i+1] != \"0\") OR\n\t\t\t\t($angka[$i+2] != \"0\")) {\n\t\t\t\t$subkalimat = \"$kata1 $kata2 $kata3 \" . $tingkat[$j] . \" \";\n\t\t\t}\n\n\t\t\t/* gabungkan variabe sub kalimat (untuk satu blok 3 angka)\n ke variabel kalimat */\n\t\t\t$kalimat = $subkalimat . $kalimat;\n\t\t\t$i = $i + 3;\n\t\t\t$j = $j + 1;\n\n\t\t}\n\n\t\t/* mengganti satu ribu jadi seribu jika diperlukan */\n\t\tif (($angka[5] == \"0\") AND ($angka[6] == \"0\")) {\n\t\t\t$kalimat = str_replace(\"satu ribu\",\"seribu\",$kalimat);\n\t\t}\n\n\t\treturn trim($kalimat);\n\n\t}", "public function terbilang($angka) {\n $angka = floatval($angka);\n if ($angka < 12) {\n return $this->_bilangan[$angka];\n } else if ($angka < 20) {\n return $this->_bilangan[$angka - 10] . ' Belas';\n } else if ($angka < 100) {\n $hasil_bagi = (int)($angka / 10);\n $hasil_mod = $angka % 10;\n return trim(sprintf('%s Puluh %s', $this->_bilangan[$hasil_bagi], $this->_bilangan[$hasil_mod]));\n } else if ($angka < 200) {\n return sprintf('Seratus %s', self::terbilang($angka - 100));\n } else if ($angka < 1000) {\n $hasil_bagi = (int)($angka / 100);\n $hasil_mod = $angka % 100;\n return trim(sprintf('%s Ratus %s', $this->_bilangan[$hasil_bagi], self::terbilang($hasil_mod)));\n } else if ($angka < 2000) {\n return trim(sprintf('Seribu %s', self::terbilang($angka - 1000)));\n } else if ($angka < 1000000) {\n $hasil_bagi = intval($angka / 1000);\n $hasil_mod = $angka % 1000;\n return sprintf('%s Ribu %s', self::terbilang($hasil_bagi), self::terbilang($hasil_mod));\n } else if ($angka < 1000000000) {\n $hasil_bagi = intval($angka / 1000000);\n $hasil_mod = $angka % 1000000;\n return trim(sprintf('%s Juta %s', self::terbilang($hasil_bagi), self::terbilang($hasil_mod)));\n } else if ($angka < 1000000000000) {\n $hasil_bagi = intval($angka / 1000000000);\n $hasil_mod = fmod($angka, 1000000000);\n return trim(sprintf('%s Milyar %s', self::terbilang($hasil_bagi), self::terbilang($hasil_mod)));\n } else if ($angka < 1000000000000000) {\n $hasil_bagi = $angka / 1000000000000;\n $hasil_mod = fmod($angka, 1000000000000);\n return trim(sprintf('%s Triliun %s', self::terbilang($hasil_bagi), self::terbilang($hasil_mod)));\n } else {\n return false;\n }\n }", "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}", "public function update_bildpfade() \r\n\t{\r\n\t\tglobal $db, $msg;\r\n\t\t$msg[] = 'message'; $msg[] = $GLOBALS['TEXTE']['FRAGMENTE'];\t\t\r\n\t\t$newmedia = '/media_'.WEBSITE.'/';\r\n\t\t$fragmente = $this->alle_fragmente_laden();\r\n\t\tif (count($fragmente) > 0) {\r\n\t\t\twhile ($row = $fragmente->fetchRow(MDB2_FETCHMODE_ASSOC)) \r\n\t\t\t{\r\n\t\t\t\t$seite = $row['name'];\r\n\t\t\t\t$content = $row['content'];\r\n\t\t\t\tif (stristr($content,'<img') || stristr($content,'href')) \r\n { \r\n $content = str_replace('/media/',$newmedia,$row['content']); \r\n // funktioniert noch nicht!! \r\n // $content = $this->links_replace($newmedia,$row['content']); \r\n /* Update nur, falls noetig! */\r\n if ($content != $row['content'])\r\n {\r\n $update = 'UPDATE '.$this->mPrefix.'fragmente SET';\r\n $update .= ' content=\"'.$db->escape($content).'\"';\r\n $update .= ' WHERE frag_id = '.$row[frag_id];\r\n $affected =& $db->exec($update);\r\n if (PEAR::isError($affected))\r\n {\r\n $msg[] = 'error'; $msg[] = sprintf($GLOBALS['MESSAGES']['MSG_FRGMNT_NICHT_GESPEICHERT'], $seite);\r\n } else {\r\n $msg[] = 'success'; $msg[] = sprintf($GLOBALS['MESSAGES']['MSG_FRGMNT_GESPEICHERT'], $seite);\r\n }\r\n } else {\r\n $msg[] = 'neutral'; $msg[] = 'OK: '. $seite;\r\n }\r\n } else {\r\n $msg[] = 'neutral'; $msg[] = 'OK: '. $seite;\t\t\t\t\t\t\r\n }\r\n\t\t\t}\r\n\t\treturn $msg;\r\n\t\t}\t\r\n\t}", "public function inFrisian()\n {\n return $this->getTranslationIn('fy');\n }", "function formlit_alt($f)\n{\n $suchmuster = \"/<llink:(.\\d+)>/\";\n $tref = preg_match_all($suchmuster, $f['in'], $treffer);\n for ($i = 0; $i < count($treffer[0]); $i++) {\n $id = $treffer[1][$i];\n $li = getlit($id);\n $f['in'] = $li['text'];\n }\n\n\n $text = $f['verfasser_vorname'];\n if ($text != '') $text = ', ' . $text;\n $hg = '';\n if ($f['code'] == 'H') $hg = ' (Hg.)';\n if ($f['verfasser_name']) $text = $f['verfasser_name'] . $text . $hg . ': ';\n if ($f['code'] == 'U') {\n $f['titel'] = preg_replace(\"/http:\\/\\/(.*)/\", \"<a href=\\\"http://\\$1\\\">http://\\$1</a>, \", $f['titel']);\n $text .= $f['titel'];\n } else {\n $text .= $f['titel'] . ', ';\n }\n\n if ($f['in']) $text .= 'in: ' . $f['in'] . ', ';\n if ($f['ort']) $text .= $f['ort'] . ' ';\n if ($f['code'] == 'T') {\n if ($f['nummer']) $text .= $f['nummer'] . ' ';\n if ($f['jahr']) $text .= $f['jahr'];\n } else {\n if ($f['jahr']) $text .= $f['jahr'];\n if ($f['nummer']) $text .= ', ' . $f['nummer'];\n }\n if ($f['seite']) {\n if ($text[strlen($text) - 1] != ' ') $text .= ', ';\n $text .= $f['seite'];\n }\n if ($text[strlen($text) - 1] != '.') $text .= '.';\n $f['text'] = $text;\n return ($f);\n}", "public function bersuara()\n {\n return \"DARAWET ANJING DAWET\";\n }", "function hapusawalan1($kata){\n if(substr($kata,0,4)==\"meng\"){\n if(substr($kata,4,1)==\"e\"||substr($kata,4,1)==\"u\"){\n $kata = \"k\".substr($kata,4);\n }else{\n $kata = substr($kata,4);\n }\n }else if(substr($kata,0,4)==\"meny\"){\n $kata = \"ny\".substr($kata,4);\n }else if(substr($kata,0,3)==\"men\"){\n $kata = substr($kata,3);\n }else if(substr($kata,0,3)==\"mem\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"p\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,2)==\"me\"){\n $kata = substr($kata,2);\n }else if(substr($kata,0,4)==\"peng\"){\n if(substr($kata,4,1)==\"e\" || substr($kata,4,1)==\"a\"){\n $kata = \"k\".substr($kata,4);\n }else{\n $kata = substr($kata,4);\n }\n }else if(substr($kata,0,4)==\"peny\"){\n $kata = \"s\".substr($kata,4);\n }else if(substr($kata,0,3)==\"pen\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"t\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,3)==\"pem\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"p\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,2)==\"di\"){\n $kata = substr($kata,2);\n }else if(substr($kata,0,5)==\"keter\"){\n $kata = substr($kata,5);\n }else if(substr($kata,0,3)==\"ter\"){\n $kata = substr($kata,3);\n }else if(substr($kata,0,2)==\"ke\"){\n $kata = substr($kata,2);\n }\n return $kata;\n }", "public function mencari_tf($data=array())\n{\n\tfor ($i=0; $i <count($data) ; $i++) { \n\n\t\t// if ($i==0) {\n\t\t\t$term_query[$i] = array_unique($data[$i][1]);//menghilangkan data kembar dari data query form\n\t\t// }\n\t}\n\n\t$j=0;\n\tfor ($k=0; $k <count($term_query) ; $k++) { \n\t\tforeach ($term_query[$k] as $value) {\n\t\t\t$query[$j] = $value;\n\t\t\t$j++;\n\t\t}\n\t}\n\n\t$term_unik = array_unique($query);\n\n\t$b = 0;\n\tforeach ($term_unik as $value1) {\n\t\t$term_urut[$b]= $value1;\n\t\t$b++;\n\t}\n\t\n\t//batas term\n\n\t//mencari tf\n\tfor ($m=0; $m <count($data) ; $m++) { \n\t\tfor ($n=0; $n <count($term_urut) ; $n++) { \n\t\t// foreach ($term_query as $kunci => $isi) {\n\t\t\t\t$angka = (in_array($term_urut[$n], $data[$m][1])) ? 1 : 0 ;\n\t\t\t\t// $tf[$m][$n]=array(\"index_term\"=>$n,\"nilai_tf\"=>$angka);\n\t\t\t\t$tf[$m][$n]=array(\"nilai_tf\"=>$angka);\n\t\t\t// }\n\t\t}\t\t\n\t}//batas mencari tf\n\treturn $tf;\n}", "public function similarity($id_lbb_aktif = 3) // $id_lbb_aktif adalah lbb yang sedang dilihat dan dicari nilai kemiripan terhapat lbb lain\n {\n $tabel_tf_idf_balik = $this->tabel_tf_idf_balik();\n $rata_term = $this->rata_term();\n $similarity = [];\n\n\n foreach ($tabel_tf_idf_balik as $id_lbb => $row){\n $sim_atas = 0;\n $bawah1 = 0;\n $bawah2 = 0;\n $sim_bawah = 0;\n\n if ($id_lbb == $id_lbb_aktif){ // $id_lbb_aktif adalah LBB yang dicari kemiripannya dengan LBB lain\n continue;\n }\n\n foreach ($row as $term_aktivitas => $tf_idf){\n//\n if ($tf_idf == 0 || $tabel_tf_idf_balik[$id_lbb_aktif][$term_aktivitas] == 0){\n continue;\n }\n\n $sim_atas = $sim_atas + (($tf_idf-$rata_term[$term_aktivitas])*($tabel_tf_idf_balik[$id_lbb_aktif][$term_aktivitas]-$rata_term[$term_aktivitas]));\n $bawah1 = $bawah1 + (pow($tf_idf-$rata_term[$term_aktivitas],2));\n $bawah2 = $bawah2 + (pow($tabel_tf_idf_balik[$id_lbb_aktif][$term_aktivitas]-$rata_term[$term_aktivitas], 2));\n $sim_bawah = sqrt($bawah1)*sqrt($bawah2);\n }\n////\n if ($sim_bawah == 0){ //similarity bawah bernilai 0 terjadi karena tidak ada bisa dicari nilai kemiripan lbb aktif dengan lbb n lainnya\n continue;\n }\n\n $similarity [$id_lbb] = $sim_atas / $sim_bawah;\n }\n// arsort($similarity);\n return $similarity;\n }", "function kategoriberatbadan($g, $bb, $tb){\n\tif($g == \"Wanita\"){\n\t\tif(bmi($bb,$tb) < 18 ){\n\t\t\t$ket = \"Under Weight / Kurus dan saran dari kami sebaiknya mulai menambah berat badan dan mengkonsumsi makanan berkarbohidrat di imbangi dengan olah raga.\";\n\t\t}elseif (bmi($bb,$tb) >=18 && bmi($bb,$tb) <=25) {\n\t\t\t$ket = \"Normal Weight / Normal dan berat badan anda termasuk kategori ideal.\";\n\t\t}elseif (bmi($bb,$tb) > 25 && bmi($bb,$tb) <=27) {\n\t\t\t$ket = \"Over Weight / Kegemukan dan anda sudah masuk kategori gemuk. Saran dari kami sebaiknya hindari makanan berlemak dan mulailah meningkatkan olahraga seminggu minimal 2 kali.\";\n\t\t}elseif (bmi($bb,$tb) > 27) {\n\t\t\t$ket= \"Obesitas dan saran dari kami sebaiknya segera membuat program menurunkan berat badan karena anda termasuk kategori obesitas/ terlalu gemuk dan tidak baik bagi kesehatan.\";\n\t\t}\n\t}elseif ($g == \"Pria\") {\n\t\tif(bmi($bb,$tb) < 17 ){\n\t\t\t$ket = \"Under Weight / Kurus dan saran dari kami tambah konsumsi makanan berkalori.\";\n\t\t}elseif (bmi($bb,$tb) >= 17 && bmi($bb,$tb) <=23) {\n\t\t\t$ket = \"Normal Weight / Normal dan selamat berat badan anda termasuk ideal.\";\n\t\t}elseif (bmi($bb,$tb) > 23 && bmi($bb,$tb) <=27) {\n\t\t\t$ket = \"Over Weight / Kegemukan dan harus waspada.\";\n\t\t}elseif (bmi($bb,$tb) > 27) {\n\t\t\t$ket = \"Obesitas dan saran dari kami sebaiknya memulai program menurunkan berat badan agar lebih ideal.\";\n\t\t}\n\t}\nreturn $ket;\n}", "public function query_kali_dokumen($tfkaliidf= array())\n{\n\t$jmlharray = count($tfkaliidf)-1;\n\tfor ($i=1; $i <=$jmlharray ; $i++) { \n\t\tfor ($j=0; $j <count($tfkaliidf[0]) ; $j++) { \n\t\t\t$hasil_kali[$i-1][$j]=$tfkaliidf[0][$j]*$tfkaliidf[$i][$j];\n\t\t}\n\t}\n\treturn $hasil_kali;\n}", "function maladies($p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$mal){\n $lop1 = json_decode($p1,true);\n $lop2 = json_decode($p2,true);\n $lop3 = json_decode($p3,true);\n $lop4 = json_decode($p4,true);\n $lop5 = json_decode($p5,true);\n $lop6 = json_decode($p6,true);\n $lop7 = json_decode($p7,true);\n $lop8 = json_decode($p8,true);\n\n $this->SetFont('Arial','',15);\n $this->Cell(0,6,\"Tableau de frequence des maladies \");\n $this->Ln();\n\n $this->SetFont('Times','B',12);\n $x_axis=$this->getx();\n $this->hcell(10,10,$x_axis,\"Num\");\n $x_axis=$this->getx();\n $this->fcell(58,10,$x_axis,\"Tranches / Maladies\");\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'0-11 mois');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'1-4 ans');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'5-14 ans');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'15-19 ans');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'20-24 ans');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'25-49 ans');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'50-59 ans');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'60 ans et plus');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'Totals');\n\n $this->Ln();\n $itera = 0;\n $totals = 0;\n foreach($lop1 as $k=>$v){\n $somme = $lop1[$k]+$lop2[$k]+$lop3[$k]+$lop4[$k]+$lop5[$k]+$lop6[$k]+$lop7[$k]+$lop8[$k];\n if($somme > 0){\n $this->SetFont('Times','',10);\n $x_axis=$this->getx();\n $this->hcell(10,10,$x_axis,$itera+1);\n $x_axis=$this->getx();\n $this->ecell(58,10,$x_axis,utf8_decode($mal[$itera]));\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop1[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop2[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop3[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop4[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop5[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop6[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop7[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop8[$k]);\n $this->SetFont('Times','B',13);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$somme);\n $this->Ln();\n $itera +=1; \n $totals += $somme;\n }\n }\n $this->SetFont('Times','B',13);\n $x_axis=$this->getx();\n $this->ecell(180,10,$x_axis,'Totals');\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$totals);\n $this->Ln();\n $this->Ln();\n }", "function blocs_rempl($texte) {\r\n\tif (strpos($texte, '<')===false) return $texte;\r\n\t// balises blocs|visible|invisible : il faut un callback pour analyser l'interieur du texte\r\n\treturn preg_replace_callback(',<(bloc#?|visible#?|invisible#?|blocintertitre#?)([0-9]*)>(.*?)</\\1\\2>,ms', 'blocs_callback', $texte);\r\n}", "function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }", "function traiteFichierLieuDMF($t_filename,$t_idno_prefix,$nb_lignes_vides=0,$ligne_limite=0) {\n\tglobal $pn_locale_id, $VERBOSE, $DEBUG;\n\tglobal $vn_list_item_type_concept,$vn_list_item_label_synonym,$vn_place_other;\n\tglobal $t_list;\n\t\n\t$result= 0;\n\t$row = 1;\n\t$parent = array ();\n\t$nb_tab_pre=0;\n\t\n\t$explode_separator_array = array();\n\t$explode_separator_array[1][\"separator\"]=\" = \";\n\t$explode_separator_array[1][\"label_type\"]=$vn_list_item_label_synonym;\n\t\n\tprint \"traitement des lieux\\n\";\n\t\n\tif (($handle = fopen($t_filename, \"r\")) !== FALSE) {\n\t\t$contenu_fichier = file_get_contents($t_filename);\n\t\t$total=substr_count($contenu_fichier, \"\\n\");\n\t\t$contenu_fichier=\"\";\n\t\t\n\t\t$data=\"\";\n\t $parent_selected=1;\t\t\t\t\n\t\t\n\t while (($data = fgets($handle)) !== FALSE) {\n\t\t\t$libelle = str_replace(\"\\t\", \"\", $data);\n\t\t\t$libelle = str_replace(\"\\r\\n\", \"\", $libelle);\n\t\t\t\n\t\t\t// comptage du nb de tabulation pour connaître le terme parent\n\t\t\t$nb_tab = substr_count($data,\"\\t\");\n\t $row++;\n\t \n\t // Si aucune information n'est à afficher, on affiche une barre de progression\n\t if ((!$DEBUG) && (!$VERBOSE)) {\n\t \tshow_status($row, $total);\n\t }\n\t \n\t if (($row > $nb_lignes_vides + 1) && ($libelle !=\"\")) {\n\t\t \n\t\t if ($row == $ligne_limite) {\n\t\t \tprint \"limite atteinte : \".$ligne_limite.\" \\n\";\n\t\t \tbreak;\n\t\t \t//die();\n\t\t }\n\t\n\t\t\t\t// si plus d'une tabulation\n\t\t\t\tif (($nb_tab_pre != $nb_tab) && ($nb_tab > 0)) {\n\t\t\t\t\t$parent_selected=$parent[$nb_tab - 1];\n\t\t\t\t} elseif ($nb_tab == 0) {\n\t\t\t\t\t$parent_selected=1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// débuggage\n\t\t\t\tif ($DEBUG) print \"(\".$parent_selected.\") \".$nb_tab.\" \".$libelle;\n\t\t\t\t\n\t\t\t\t// insertion dans la liste\n\t\t\t\tif ($vn_place_id=getPlaceID($libelle, $t_idno_prefix.\"_\".($row-$nb_lignes_vides), $vn_place_other, $parent_selected, $explode_separator_array)) {\n\t\t\t\t} else {\n\t\t\t\t\tprint \"PLACE CREATION FAILED : \".$libelle.\" \";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\n\t\t $parent[$nb_tab]=$vn_place_id;\n\t\t\t\t\n\t }\n\t \n\t $nb_tab_pre=$nb_tab;\n\t }\n\t fclose($handle);\n\t \tif ($VERBOSE) { print \"dmf_\".$t_idno_prefix.\" treated.\\n\";}\n\t \t$result = true;\n\t} else {\n\t\tprint \"le fichier n'a pu être ouvert.\";\n\t\t$result=false;\n\t} \n\treturn $result;\t\n}", "function halamanf3($jum)\n{// function halaman() - mula\n $mula = '<div style=\"background-color: #fffaf0; color:black;text-align:center\">';\n $tamat = '</div>';\n $page = $jum['page'];\n // Tentukan had query berasaskan nombor halaman semasa.\n //$jum['dari'] = (($jum['page'] * $jum['max']) - $jum['max']); \n // Tentukan bilangan halaman. $jum['muka_surat'] \n\t$jum['max'] = 30; // ubahsuai bil max untuk cetakf3\n\t$muka_surat = ceil($jum['bil_semua'] / $jum['max']);\n $bil_semua = $jum['bil_semua'];\n $baris_max = $jum['max'];\n \n $url = dpt_url(); // sepatutnya kawalan/semua/30/1/amin/\n $class = ( !isset($url[0]) ) ? null : $url[0]; //'kawalan'; \n $fungsi = 'cetakf3'; //( !isset($url[1]) ) ? null : $url[1]; //'semua'; \n $batch = ( !isset($url[2]) ) ? null : $url[2]; //'30'; \n $item = ( !isset($url[3]) ) ? null : $url[3]; //'30'; \n $ms = ( !isset($url[4]) ) ? null : $url[4]; //'ms'; \n //$fe = ( !isset($url[4]) ) ? null : $url[4]; //'fe'; \n \n //return \"\\$batch:$batch|\\$bil_semua:$bil_semua|\\$baris_max:$baris_max|\\$muka_surat:$muka_surat\";\n\t\n\t$senarai = URL . \"$class/$fungsi/$batch/$baris_max/\";\n $halaman = \"\\n$mula\\r\" \n\t\t. '<ul class=\"pagination pagination-sm\">' \n\t\t. \"\\r<li><a>Bil:($bil_semua) ms($muka_surat)- Papar halaman</a></li>\";\n \n if($page > 1) // Bina halaman sebelum\n $halaman .= \"\\r<li><a href='$senarai\" . ($page-1) . \"'>&laquo;</a></li>\";\n for($i = 1; $i <= $muka_surat; $i++) // Bina halaman terkini\n {$halaman .= ($page==$i)? \"\\r<li><a href='$senarai$i'>($i)</a></li>\" : \n\t\t\"\\r<li><a href='$senarai$i'>$i</a></li>\";}\n if($page < $muka_surat) // Bina halaman akhir\n $halaman .= \"\\r<li><a href='$senarai\" . ($page+1) . \"'>&raquo;</a></li>\";\n \n $halaman .= \"\\n</ul>\\n$tamat\";\n\n return $halaman;\n\t\n}", "function imagepsfreefont($font_index)\n{\n}", "public function belum_bayar()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('tbl_transaksi');\n\t\t$this->db->where(\n\t\t\t'id_pelanggan',\n\t\t\t$this->session->userdata('id_pelanggan'),\n\t\t);\n\t\t$this->db->where('status_order=0');\n\n\n\t\t$this->db->order_by('id_transaksi', 'desc');\n\t\treturn $this->db->get()->result();\n\t}", "function cariPosisi($batas){\nif(empty($_GET['halproduk'])){\n\t$posisi=0;\n\t$_GET['halproduk']=1;\n}\nelse{\n\t$posisi = ($_GET['halproduk']-1) * $batas;\n}\nreturn $posisi;\n}", "function barra($nombre, $porcentaje)\n{\n\t$ancho = 1;\n\n\t//LARGO M�IMO\n\t$largo = 10;\n?>\n<table width=\"40%\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#E9E9E9\">\n<tr id=\"trtitulogris\">\n<td colspan=\"2\"><?php echo $nombre; ?></td>\n</tr>\n<tr>\n<td width=\"70%\"><img src=\"../../../../imagenes/punto.gif\" height=\"<?php echo $largo ?>\" width=\"<?php echo $porcentaje ?>%\" style=\"color:#FEF7ED\"></td>\n<td width=\"30%\"><?php echo round($porcentaje,1).\" %\"; ?></td>\n</tr>\n</table>\n<br>\n<?php\n}", "public function medidasFijas($alto,$ancho){\r\n\t\t$this->ancho_imagen_copia=$ancho;\r\n\t\t$this->alto_imagen_copia=$alto;\r\n\t}", "public function EncabezadoFBM5() {\t\r\n\t\t$ancho = 256;\r\n\t\t$fs = 10;\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t$this->SetDrawColor(0, 0, 0);\r\n\t\t\r\n\t\t$text = 'Página '.$this->PageNo().' de {nb}';\r\n\t\t$this->SetFont('Arial','',8);\r\n\t\t//$this->Celda(100, 6, \"C.M.S.= U.B.M. - 14(17-12-2007)\", 0, 0, '');\r\n\t\t$this->Celda($ancho, 6, $text, 0, 1, 'R', true);\r\n\t\t$y1 = $this->getY();\r\n\t\t$x1 = $this->getX();\r\n\t\t$this->Celda(80, 25, '', 1, 0, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$x2 = $this->getX();\r\n\t\t$this->Celda($ancho-80, 25, '', 1, 1, '', true);\r\n\t\t$this->setY($y1);\r\n\t\t$this->setX($x1);\r\n\t\t//$this->Image( 'images/logo_medium.png', 21, 17, 78 );\r\n\t\t$this->setY($y2+5);\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Formato( 'Helvetica', 'B', 11 );\r\n\t\t$this->Celda($ancho-85, 6, $this->header['title'], 0, 1, 'C', true);\r\n\t\t$this->Formato( 'Helvetica', '', 9 );\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Celda($ancho-85, 8, $this->header['title2'], 0, 1, 'C', true);\r\n\t}", "function conversion($monto, $tasa, $moneda_transaccion, $moneda_proveedor)\n{\n\n if ($moneda_transaccion != $moneda_proveedor) {\n if ($moneda_proveedor == 'Dólares' && $moneda_transaccion == 'Bolívares') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Dólares' && $moneda_transaccion == 'Pesos') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Bolívares' && $moneda_transaccion == 'Dólares') {\n $monto_pago = $monto / $tasa;\n }\n\n if ($moneda_proveedor == 'Bolívares' && $moneda_transaccion == 'Pesos') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Pesos' && $moneda_transaccion == 'Bolívares') {\n $monto_pago = $monto / $tasa;\n }\n\n if ($moneda_proveedor == 'Pesos' && $moneda_transaccion == 'Dólares') {\n $monto_pago = $monto / $tasa;\n }\n } else {\n $monto_pago = $monto;\n }\n\n return $monto_pago;\n}", "function ver_buscar_mapa($fid_string=\" \",$presenta=0,$idmapa=0,$intensidad){\n \n $plantilla = new DmpTemplate(\"../../../plantillas/stakeholder/mapa/ver_mapa.html\");\n \n //echo \"intensidad : $intensidad\";\n \n if($intensidad>0){\n $plantilla->iniciaBloque(\"intensidad\");\n }\n \n $imapa = new imapa();\n \n $result1 = $imapa->get_mapa();\n \n $nombres = array();\n \n $count=0;\n \n $modo=0;\n \n $color=array(\"#B19CD9\",\"#FF6961\",\"#77DD77\",\"#CFCFC4\",\"#FDFD96\");\n \n $stroke=array(\"#966FD6\",\"#C23B22\",\"#03C03C\",\"#836953\",\"#FFB347\");\n \n while($mapa= mysql_fetch_array($result1)){\n $count++;\n \n $plantilla->iniciaBloque(\"mapa\");\n $plantilla->reemplazaEnBloque(\"idmapa\", $mapa[idgis_mapa],\"mapa\");\n $plantilla->reemplazaEnBloque(\"nombre\", $mapa[nombre],\"mapa\");\n \n if( $mapa[idgis_mapa]==$idmapa || ( $mapa[predeterminado]>0 && $idmapa==0 ) ){\n \n $plantilla->reemplazaEnBloque(\"selected\", \"selected\",\"mapa\");\n \n $plantilla->reemplaza(\"frontera\", $mapa[frontera]);\n $plantilla->reemplaza(\"enfoque\", $mapa[enfoque]);\n $plantilla->reemplaza(\"resolucion\", $mapa[resolucion]);\n $plantilla->reemplaza(\"proyeccion\", $mapa[proyeccion]);\n $plantilla->reemplaza(\"unidad\", $mapa[unidad]);\n\n $i=0;\n $nombre=\"\";\n $result2 = $imapa->get_capa_mapa($mapa[idgis_mapa]);\n while($capa= mysql_fetch_array($result2)){\n $nombre=$capa[nombre];\n $nombres[$nombre]=$nombre;\n if($modo>0){\n $plantilla->iniciaBloque(\"capa\");\n $plantilla->reemplazaEnBloque(\"i\", $i, \"capa\");\n\n $plantilla->reemplazaEnBloque(\"nombre\", $nombre, \"capa\");\n\n\n $plantilla->reemplazaEnBloque(\"proyeccion\", $capa[proyeccion], \"capa\");\n if($capa[base]>0){\n $plantilla->reemplazaEnBloque(\"base\", \"true\", \"capa\");\n }else{\n \n $plantilla->reemplazaEnBloque(\"base\", \"false\", \"capa\");\n }\n }else{\n $plantilla->iniciaBloque(\"gml\"); \n $plantilla->reemplazaEnBloque(\"i\", $i, \"gml\");\n $plantilla->reemplazaEnBloque(\"nombre\", $nombre, \"gml\");\n $plantilla->reemplazaEnBloque(\"color\", $color[($i%5)], \"gml\");\n $plantilla->reemplazaEnBloque(\"stroke\", $stroke[($i%5)], \"gml\");\n if($capa[base]>0){\n $plantilla->reemplazaEnBloque(\"base\", \"true\", \"gml\");\n }else{ \n $plantilla->reemplazaEnBloque(\"base\", \"false\", \"gml\");\n }\n } \n $i++;\n }\n $capas=\" \";\n\n foreach ($nombres as $nombre){\n $capas .= $nombre.\",\";\n }\n\n\n $capas = substr($capas, 0, -1);\n\n\n $plantilla->reemplaza(\"i\", $i);\n $plantilla->reemplaza(\"nombre\", $nombre);\n $plantilla->reemplaza(\"capas\", $capas);\n $plantilla->reemplaza(\"fid_string\", $fid_string);\n \n }\n \n \n }\n \n if($count==0){\n $plantilla = new DmpTemplate(\"../../../plantillas/stakeholder/mapa/no_mapa.html\");\n }\n \n if($presenta>0){\n $plantilla->presentaPlantilla();\n }else{\n return $plantilla->getPlantillaCadena();\n }\n \n}", "function calculaFrete($peso, $comprimento, $altura, $largura, $cep) {\n \n//\n// echo '<br />';\n\n\n $servico = array(\n 40010 => 'Expresso', //SEDEX sem contrato.\n 40045 => 'SEDEX a Cobrar, sem contrato.',\n 40126 => 'SEDEX a Cobrar, com contrato.',\n 40215 => 'SEDEX 10, sem contrato.',\n 40290 => 'SEDEX Hoje, sem contrato.',\n 40096 => 'SEDEX com contrato.',\n 40436 => 'SEDEX com contrato.',\n 40444 => 'SEDEX com contrato',\n 40568 => 'SEDEX com contrato.',\n 40606 => 'SEDEX com contrato.',\n 41106 => 'Normal', //PAC sem contrato\n 41068 => 'PAC com contrato.',\n 81019 => 'e-SEDEX, com contrato.',\n 81027 => 'e-SEDEX Prioritário, com conrato.',\n 81035 => 'e-SEDEX Express, com contrato.',\n 81868 => '(Grupo 1) e-SEDEX, com contrato.',\n 81833 => '(Grupo 2) e-SEDEX, com contrato.',\n 81850 => '(Grupo 3) e-SEDEX, com contrato.',\n );\n\n $peso = ($peso != \"0\" || $peso != \"0.00\" || $peso != \"0.0\") ? $peso : 1;\n $comprimento = ($comprimento != \"0\" || $comprimento != \"0.00\" || $comprimento != \"0.0\") ? $comprimento : 16;\n $altura = ($altura != \"0\" || $altura != \"0.00\" || $altura != \"0.0\") ? $altura : 2;\n $largura = ($largura != \"0\" || $largura != \"0.00\" || $largura != \"0.0\") ? $largura : 11;\n \n\n $data['nCdEmpresa'] = '';\n $data['sDsSenha'] = '';\n $data['sCepOrigem'] = $cep;\n $data['sCepDestino'] = '26015-005';\n $data['nVlPeso'] = $peso;\n $data['nCdFormato'] = '1';\n $data['nVlComprimento'] = $comprimento;\n $data['nVlAltura'] = $altura;\n $data['nVlLargura'] = $largura;\n $data['nVlDiametro'] = '0';\n $data['sCdMaoPropria'] = 'n';\n $data['nVlValorDeclarado'] = '0';\n $data['sCdAvisoRecebimento'] = 'n';\n $data['StrRetorno'] = 'xml';\n $data['nCdServico'] = '40010,41106';\n $data = http_build_query($data);\n\n $url = 'http://ws.correios.com.br/calculador/CalcPrecoPrazo.aspx';\n\n $curl = curl_init($url . '?' . $data);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($curl);\n $result = simplexml_load_string($result);\n $linhas = array();\n\n $i = 0;\n foreach ($result->cServico as $row) {\n\n if ($row->Erro !== '0') {\n $descricaoServico = $servico[(int) $row->Codigo];\n\n $linha = array('codigo' => (string) $row->Codigo, 'servico' => $descricaoServico, 'valor' => (string) $row->Valor, 'prazoEntrega' => (string) $row->PrazoEntrega);\n\n $linhas[] = json_decode(json_encode((array) $linha), TRUE);\n }\n }\n\n return $linhas;\n}", "function berekening(){\n\n\tstatic $kapitaal = 100000;\n\t$rentevoet = 0.08;\n\t$periode = 10;\n\n\tstatic $result = array();\n\n\tstatic $jaren = 1;\n\n\tif ($jaren <= $periode) {\n\n\t\t$rente = floor($kapitaal*$rentevoet);\n\t\t\t\n\t\t$kapitaal = $kapitaal + $rente;\n\n\t\t$result[ ] = 'Na '.$jaren.' jaar heeft Hans '.$kapitaal.'€ op zijn rekening staan. (waarvan '.$rente.'€ rente is)';\n\n\t\t++$jaren;\n\n\t\tberekening();\n\n\t} else {\n\n\t\treturn $result;\n\n\t}\n\t\n\n}", "function traiteFichierDMF($t_filename,$t_idno_prefix,$t_list_description,$nb_lignes_vides=0,$ligne_limite=0) {\n\tglobal $pn_locale_id, $VERBOSE, $DEBUG;\n\tglobal $vn_list_item_type_concept,$vn_list_item_label_synonym;\n\tglobal $t_list;\n\t\n\t$result= 0;\n\t$row = 1;\n\t$parent = array ();\n\t$nb_tab_pre=0;\n\t\n\t$explode_separator_array = array();\n\t$explode_separator_array[1][\"separator\"]=\" = \";\n\t$explode_separator_array[1][\"label_type\"]=$vn_list_item_label_synonym;\n\t\n\tif (($handle = fopen($t_filename, \"r\")) !== FALSE) {\n\t\tif (!$vn_list_id=getListID($t_list,\"dmf_\".$t_idno_prefix,$t_list_description)) {\n\t\t\tprint \"Impossible de trouver la liste dmf_\".$t_idno_prefix.\" !.\\n\";\n\t\t\tdie();\n\t\t} else {\n\t\t\tprint \"Liste dmf_\".$t_idno_prefix.\" : $vn_list_id\\n\";\n\t\t} \n\t\t$contenu_fichier = file_get_contents($t_filename);\n\t\t$total=substr_count($contenu_fichier, \"\\n\");\n\t\t$contenu_fichier=\"\";\n\t\t\n\t\t$data=\"\";\n\t $parent_selected=0;\t\t\t\t\n\t\t\n\t while (($data = fgets($handle)) !== FALSE) {\n\t\t\t$libelle = str_replace(\"\\t\", \"\", $data);\n\t\t\t$libelle = str_replace(\"\\r\\n\", \"\", $libelle);\n\t\t\t\n\t\t\t// comptage du nb de tabulation pour connaître le terme parent\n\t\t\t$nb_tab = substr_count($data,\"\\t\");\n\t $row++;\n\t \n\t // Si aucune information n'est à afficher, on affiche une barre de progression\n\t if ((!$DEBUG) && (!$VERBOSE)) {\n\t \tshow_status($row, $total);\n\t }\n\t \n\t if (($row > $nb_lignes_vides + 1) && ($libelle !=\"\")) {\n\t\t \n\t\t if ($row == $ligne_limite) {\n\t\t \tprint \"limite atteinte : \".$ligne_limite.\" \\n\";\n\t\t \tbreak;\n\t\t \t//die();\n\t\t }\n\t\n\t\t\t\t// si plus d'une tabulation\n\t\t\t\tif (($nb_tab_pre != $nb_tab) && ($nb_tab > 0)) {\n\t\t\t\t\t$parent_selected=$parent[$nb_tab - 1];\n\t\t\t\t} elseif ($nb_tab == 0) {\n\t\t\t\t\t$parent_selected=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// débuggage\n\t\t\t\tif ($DEBUG) print \"(\".$parent_selected.\") \".$nb_tab.\" \".$libelle;\n\t\t\t\t\n\t\t\t\t// insertion dans la liste\n\t\t\t\tif ($vn_item_id=getItemID($t_list,$vn_list_id,$vn_list_item_type_concept,$t_idno_prefix.\"_\".($row-$nb_lignes_vides),$libelle,\"\",1,0, $parent_selected, null, $explode_separator_array )) {\n\t\t\t\t\t//if ($VERBOSE) print \"LIST ITEM CREATED : \".$libelle.\"\";\n\t\t\t\t} else {\n\t\t\t\t\tprint \"LIST ITEM CREATION FAILED : \".$libelle.\" \";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\n\t\t\t\t//print $nb_tab_pre.\" \".$nb_tab.\" - parent :\".$parent_selected.\" \".$lexutil;\n\t\t\t\t// si au moins 1 tabulation, conservation de l'item pour l'appeler comme parent\n\t\t\t\t// $vn_item_id=$nb_tab;\n\t\t $parent[$nb_tab]=$vn_item_id;\n\t\t\t\t\n\t }\n\t \n\t $nb_tab_pre=$nb_tab;\n\t }\n\t fclose($handle);\n\t \tif ($VERBOSE) { print \"dmf_\".$t_idno_prefix.\" treated.\\n\";}\n\t \t$result = true;\n\t} else {\n\t\tprint \"le fichier n'a pu être ouvert.\";\n\t\t$result=false;\n\t} \n\treturn $result;\t\n}", "function cariPosisi($batas){\nif(empty($_GET['haldownload'])){\n\t$posisi=0;\n\t$_GET['haldownload']=1;\n}\nelse{\n\t$posisi = ($_GET['haldownload']-1) * $batas;\n}\nreturn $posisi;\n}", "function fct_liste_fleurs ($mescriteres) {\nglobal $connexion, $poids_criteres, $gamme;\n\t$sql = \"SELECT * FROM fiche_\".$gamme.\" WHERE visible_index = 1 \";\n $result = mysql_query($sql, $connexion);\n\tif (!$result) {\n\t\t$liste_fleurs = \"<p><strong>La liste des fleurs n'est pas disponible pour le moment ; veuillez rÚessayer ultÚrieurement.</strong></p>\";\n\t} else {\n\t\t$nbTrouve = mysql_num_rows($result);\n\t\tif ($nbTrouve <= 0) {\n\t\t\t$liste_fleurs = \"<p><strong>La liste des fleurs n'est pas disponible pour le moment ; veuillez rÚessayer ultÚrieurement.</strong></p>\";\n\t\t} else {\n\t\t\t$poids_toutes_fleurs = array();\n\t\t\t$infos_toutes_fleurs = array();\n\t\t\twhile ($unefleur = mysql_fetch_assoc($result)) {\n\t\t\t\t$poids_fleur = 0;\n\t\t\t\t$unefleur['debbug_poids'] = \"\";\n\t\t\t\t// calcul poids de chaque critere\n\t\t\t\tforeach ($poids_criteres as $libelle => $poids) {\n\t\t\t\t\t$refcritere = substr($libelle, 0, 3);\n\t\t\t\t\t$codecritere = $mescriteres[$refcritere]['code'];\n\t\t\t\t\tif ($codecritere >= 0) {\n\t\t\t\t\t\tswitch ($libelle) {\n\t\t\t\t\t\t\tcase \"fleur\":\n\t\t\t\t\t\t\t\t$valcritere = ($poids[$codecritere][$unefleur['kod_coul_fleurs']]) * 1.3;\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] = \"fle=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"feuille\":\n\t\t\t\t\t\t\t\t$valcritere = $poids[$codecritere][$unefleur['kod_feuille']];\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] .= \", feu=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"milieu\":\n\t\t\t\t\t\t\t\t$valcritere = $poids[$codecritere][$unefleur['kod_milieu']];\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] .= \", mil=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"altitude\":\n\t\t\t\t\t\t\t\t$valcritere = $poids[$codecritere][$unefleur['kod_alt']];\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] .= \", alt=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"port\":\n\t\t\t\t\t\t\t\t$valcritere = $poids[$codecritere][$unefleur['kod_port']];\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] .= \", por=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// poids critere taille\n\t\t\t\t$codecritere = $mescriteres['tai']['code'];\n\t\t\t\t$poids_taille = fct_calcul_proximite_taille($unefleur['taillemin'], $unefleur['taillelmax'], $codecritere );\n\t\t\t\t$poids_fleur = $poids_fleur + $poids_taille;\n\t\t\t\t$unefleur['debbug_poids'] .= \", tai=\".floor($poids_taille);\n\t\t\t\t// poids critere invisible mois floraison\n\t\t\t\t$mois_observation = date(\"n\");\n\t\t\t\t$intervalle = $unefleur['kod_mois_flore2'] - $unefleur['kod_moisfolre1'];\n\t\t\t\t$poids_mois = 0;\n\t\t\t\tif ($intervalle > 0) {\n\t\t\t\t\t// mois observation comprise entre debut et fin de floraison\n\t\t\t\t\tif (($mois_observation >= $unefleur['kod_moisfolre1']) && ($mois_observation <= $unefleur['kod_mois_flore2'])) {\n\t\t\t\t\t\t$poids_mois = 3;\n\t\t\t\t\t} else { // mois observation = 1 mois precedent ou 1 mois suivant pÚriode de floraison\n\t\t\t\t\t\t$mois_suivant = fmod(($unefleur['kod_mois_flore2']+1), 12);\n\t\t\t\t\t\t$mois_precedent = fmod((12+$unefleur['kod_moisfolre1']-1), 12);\n\t\t\t\t\t\tif ($mois_precedent == 0) $mois_precedent = 12;\n\t\t\t\t\t\tif (($mois_observation == $mois_precedent) || ($mois_observation == $mois_suivant)) {\n\t\t\t\t\t\t\t$poids_mois = 2;\n\t\t\t\t\t\t} else { // mois observation = 2 mois precedent ou 2 mois suivant pÚriode de floraison\n\t\t\t\t\t\t\t$mois_suivant = fmod(($unefleur['kod_mois_flore2']+2), 12);\n\t\t\t\t\t\t\t$mois_precedent = fmod((12+$unefleur['kod_moisfolre1']-2), 12);\n\t\t\t\t\t\t\tif ($mois_precedent == 0) $mois_precedent = 12;\n\t\t\t\t\t\t\tif (($mois_observation == $mois_precedent) || ($mois_observation == $mois_suivant)) $poids_mois = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$poids_fleur = $poids_fleur + $poids_mois;\n\t\t\t\t$unefleur['debbug_poids'] .= \", mois=\".floor($poids_mois);\n\t\t\t\t// enregistre\n\t\t\t\t$poids_toutes_fleurs[$unefleur['numId']] = $poids_fleur;\n\t\t\t\t$infos_toutes_fleurs[$unefleur['numId']] = $unefleur;\n\t\t\t} // fin while\n\t\t\t// trie selon le poids le plus lourd\n\t\t\tarsort($poids_toutes_fleurs);\n\t\t\tif (count($poids_toutes_fleurs) > 30) $nbaffichage = 30;\n\t\t\telse $nbaffichage = count($poids_toutes_fleurs);\n\t\t\t$liste_fleurs = \"\";\n\t\t\t$liste_encours = \"\";\n\t\t\t$cpt = 0;\n\t\t\tforeach ($poids_toutes_fleurs as $ref => $poids) {\nif($poids==0)break;//on affiche pas les arbres sans rapport\n\t\t\t\t$infos_fleur_encours = $infos_toutes_fleurs[$ref];\n\t\t\t\t// recupere photo\n\t\t\t\t$sqlphoto = 'SELECT * FROM diapo_'.$gamme.' WHERE nomFic LIKE \"'.$infos_fleur_encours['racinenomfic'].'%\" and auteur ='.\"'feuille'\";\n\t\t\t\t$result = mysql_query($sqlphoto, $connexion);\n\t\t\t\t$photofleur = mysql_fetch_assoc($result);\n\t\t\t\t$lien_fiche = '<a href=\"fiche_'.$infos_fleur_encours['racinenomfic'].'.html\">';\n\t\t\t\t$liste_encours .= '<div class=\"unefleur\">'.\"\\n\";\n\t\t\t\t$liste_encours .= '<a href=\"fiche_'.$infos_fleur_encours['racinenomfic'].'.html\">';\n\t\t\t\t$liste_encours .= '<img src=\"phototheque/vignette_'.$gamme.'/'.$photofleur['nomFic'].'.jpg\" border=\"0\"><br />'.\"\\n\";\n\t\t\t\t$liste_encours .= $infos_fleur_encours['nc'].\"<br /> (\".$infos_fleur_encours['ns'].\")\".\"\\n\";\n\t\t\t\t$liste_encours .= '</a>';\n\t\t\t\t// pour activer le systeme de debbug des poids des criteres\n\t\t\t\t// if ($infos_fleur_encours['debbug_poids'] != \"\") $liste_encours .= '<br />----------<br />'.$infos_fleur_encours['debbug_poids'];\n\t\t\t\t$liste_encours .= '</div>'.\"\\n\";\n\t\t\t\t$cpt ++;\n\t\t\t\tif (fmod($cpt, 3) == 0) {\n\t\t\t\t\t$liste_fleurs .= '<div class=\"lignefleurs\">'.\"\\n\";\n\t\t\t\t\t$liste_fleurs .= $liste_encours;\n\t\t\t\t\t$liste_fleurs .= '</div>'.\"\\n\";\n\t\t\t\t\t$liste_encours = \"\";\n\t\t\t\t}\n\t\t\t\tif ($cpt >= $nbaffichage) break;\n\t\t\t}\n\t\t}\n\t}\nif( $liste_fleurs==\"\") $liste_fleurs = \"<div class='lignefleurs'> $liste_encours </div> \";\n \treturn $liste_fleurs;\n}", "function filets_creer_icone_barre($file, $num=-1) {\n\tstatic $icones_barre;\n\trep_icones_barre($icones_barre);\n\tdefine_IMG_GD_MAX_PIXELS();\n\t// la config \"Methode de fabrication des vignettes\" doit etre renseignee pour 'image_reduire'\n\tif($num<0) {\n\t\tlist($w) = @getimagesize($file);\n\t\t$file = filtrer('image_recadre', $file, floor($w/4), 40, '');\n\t\t$file = filtrer('image_reduire', $file, 19, 19);\n\t\t$file = filtrer('image_recadre', $file, 16, 16, 'left');\n\t} else {\n\t\t$file = image_typo(\"_{$num}_\", 'couleur=00BFFF', 'taille=9', 'police=dustismo.ttf');\n\t\t$file = filtrer('image_recadre', $file, 16, 10, 'bottom');\n\t}\n\t$nom = basename($src = extraire_attribut($file, 'src'));\n\t@copy($src, $icones_barre.$nom);\n\treturn $nom;\n}", "function kaloriusia($u, $tb, $g){\n\tif($u <=39){\n\t\t$kbu = \"0 kkal \";\n\t}else if($u >=40 && $u <= 59){\n\t\t$kbu = kalorinormal($g, $tb) * 0.05;\n\t}else if($u >=60 && $u <= 69){\n\t\t$kbu = kalorinormal($g, $tb) * 0.1;\n\t}else if($u >69){\n\t\t$kbu = kalorinormal($g, $tb) * 0.2;\n\t}\nreturn $kbu;\n}", "function lookup_markings($germ, $antimicrobic) {\n\t\n\t\t// $t_germ is the germ to look for (w/o any spaces)\n\t\t$t_germ = str_replace(' ', '', $germ);\n\t\t$t_antimicrobic = str_replace(' ', '', $antimicrobic);\n\t\t\n\t\t$objPHPExcel = PHPExcel_IOFactory::load($GLOBALS['config']['markings']);\n\t\t$highestRow = $objPHPExcel->getActiveSheet()->getHighestRow();\n\t\t\n\t\t$r=2;\n\t\twhile ( $r <= $highestRow ) {\n\t\t\t// $c_germ is the germ read from current line (w/o any spaces)\n\t\t\t$c_germ = $objPHPExcel->getActiveSheet()->getCell('C' . $r)->getValue();\n\t\t\t$c_germ = str_replace(' ', '', $c_germ);\n\n\t\t\tif (strcasecmp($c_germ, $t_germ) == 0) {\n\n\t\t\t\t$c_antimicrobic = $objPHPExcel->getActiveSheet()->getCell('B' . $r)->getValue();\n\t\t\t\t$c_antimicrobic = str_replace(' ', '', $c_antimicrobic);\n\t\t\t\t\n\t\t\t\tif (strcasecmp($c_antimicrobic, $t_antimicrobic) == 0) {\n\t\t\t\t\t$out['blue'] = $objPHPExcel->getActiveSheet()->getCell('D' . $r)->getValue();\n\t\t\t\t\t$out['blue'] = str_replace('.', ',', $out['blue']);\n\t\t\t\t\t$out['bp'] = $objPHPExcel->getActiveSheet()->getCell('E' . $r)->getValue();\n\t\t\t\t\t$out['bp'] = str_replace('.', ',', $out['bp']);\n\t\t\t\t\t\n\t\t\t\t\tif ($out['blue'] == '')\n\t\t\t\t\t\tUtils::log('Valore WT non trovato per ' . $antimicrobic . ' - ' . $germ);\n\t\t\t\t\tif ($out['bp'] == '')\n\t\t\t\t\t\tUtils::log('Valore BP non trovato per ' . $antimicrobic . ' - ' . $germ);\n\t\t\t\t\t\n\t\t\t\t\treturn $out;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$r++;\n\t\t}\n\t}", "public function getFontFile2() {}", "public function rutaImageFly()\n {\n\n // primero vemos a que galeria pertenece\n $galeria = ORM::factory( 'Galeria', $this->galeria );\n\n return( $galeria->rutaImageFly().$this->imagen );\n\n }", "public function getFilial(){\n $query = $this->connect->prepare(\"SELECT B.FILIAL FILIALORIGEM, \n C.FILIAL FILIALDESTINO\n FROM OP_VIAGEM A\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL B ON B.VIAGEM = A.HANDLE AND B.EHINICIOVIAGEM = 'S'\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL C ON C.VIAGEM = A.HANDLE AND C.EHTERMINOVIAGEM = 'S'\n WHERE A.HANDLE = '$this->handle' \");\n $query->execute();\n $dataSet = $query->fetch(PDO::FETCH_ASSOC);\n\n $this->filialDestino = $dataSet['FILIALDESTINO'];\n $this->filialOrigem = $dataSet['FILIALORIGEM'];\n }", "function Del_Derivation_Suffixes($kata){\n\t\t$kataAsal = $kata;\n\t\tif (preg_match('/(i|an)\\z/i', $kata)) { // Cek Suffixes\n\t\t\t$__kata = preg_replace('/(i|an)\\z/i', '', $kata);\n\t\t\tif ($this->cekKamus($__kata)) { // Cek Kamus\n\t\t\t\treturn $__kata;\n\t\t\t} else if (preg_match('/(kan)\\z/i', $kata)) {\n\t\t\t\t$__kata = preg_replace('/(kan)\\z/i', '', $kata);\n\t\t\t\tif ($this->cekKamus($__kata)) {\n\t\t\t\t\treturn $__kata;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*– Jika Tidak ditemukan di kamus –*/\n\t\t}\n\t\treturn $kataAsal;\n\t}", "public function bloaf()\n\t{\n\t\tif (preg_match('/^([a-f0-9]{32}) - \\(\\d+\\/\\d+\\) - \"[a-f0-9]{32}.+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[10/17] - \"EGk13kQ1c8.part09.rar\" - 372.48 MB <-> usenet-space-cowboys.info <-> powered by secretusenet.com <-> yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' - \\d+[,.]\\d+ [mMkKgG][bB] .+? usenet-space.+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(Neu bei Bitfighter vom 23-07-2013) - \"01 - Sido - Bilder Im Kopf.mp3\" yEnc\n\t\tif (preg_match('/^\\((.+?)\\) - \".+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //(2/8) \"Mike.und.Molly.S01E22.Maennergespraeche.GERMAN.DL.DUBBED.720p.BluRay.x264-TVP.part1.rar\" - 1023,92 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //4y (PW) [@ usenet-4all.info - powered by ssl.news -] [27,35 GB] [001/118] \"1f8867bb6f89491793d3.part001.rar\" yEnc\n\t\tif (preg_match('/^.+? (-|\\(PW\\))\\s+\\[.+? -\\] \\[\\d+[,.]\\d+ [mMkKgG][bB]\\] \\[\\d+\\/\\d+\\] \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Bennos Special Tools DVD - Die Letzte <> DRM <><> PW <> - (002/183) \"Bennos Special Tools DVD - Die Letzte.nfo\" - 8,28 GB - yEnc\n\t\tif (preg_match('/^(\\[[A-Za-z]+\\]\\.)?([a-zA-Z0-9].+?)([\\^<> ]+give-me-all\\.org[\\^<> ]+|[\\^<> ]+)DRM[\\^<> ]+.+? - \\(\\d+\\/\\d+\\)\\s+\".+?\" - .+? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//(1/9) - CyberLink.PhotoDirector.4.Ultra.4.0.3306.Multilingual - \"CyberLink.PhotoDirector.4.Ultra.4.0.3306.Multilingual.par2\" - 154,07 MB - yEnc\n\t\t//(1/5) - Mac.DVDRipper.Pro.4.0.8.Mac.OS.X- \"Mac.DVDRipper.Pro.4.0.8.Mac.OS.X.rar\" - 24,12 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - (.+?) ?- \".+?\" - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[3/3 Helene Fischer - Die Biene Maja 2013 MP3 Helene Fischer - Die Biene Maja 2013 MP3.mp3.vol0+1.PAR2\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+ (.+?)\\..+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //Uploader.Presents-Mutter.und.Sohn.German.2013.DVDRiP.x264-XFi[01/27]\"xf-mutterusohn.nfo\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-(.+)[\\(\\[]\\d+\\/\\d+[\\)\\]]\".+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "public function BuscPrep($busca){\n\n #Passa as palavras da string de pesquisa para caixa baixa, pois deve se adequar as palavras do arquivo.txt\n $this->keyWords = strtolower($busca);\n\n $this->keyWords = explode(' ',$this->keyWords);\n\n\n $this->artPrepText = \"a,à,adeus,agora,aí,ainda,além,algo,algumas,alguns,ali,ano,anos,antes,ao,aos,apenas,apoio,após,aquela,aquelas,aquele,aqueles,aqui,aquilo,área,as,às,assim,até,atrás,através,baixo,bastante,bem,boa,boas,bom,bons,breve,cá,cada,catorze,cedo,cento,certamente,certeza,cima,cinco,coisa,com,como,conselho,contra,custa,da,dá,dão,daquela,daquelas,daquele,daqueles,dar,das,de,debaixo,demais,dentro,depois,desde,dessa,dessas,desse,desses,desta,destas,deste,destes,deve,deverá,dez,dezanove,dezasseis,dezassete,dezoito,dia,diante,diz,dizem,dizer,do,dois,dos,doze,duas,dúvida,e,é,ela,elas,ele,eles,em,embora,entre,era,és,essa,essas,esse,esses,esta,está,estão,estar,estas,estás,estava,este,estes,esteve,estive,estivemos,estiveram,estiveste,estivestes,estou,eu,exemplo,farão,falta,favor,faz,fazeis,fazem,fazemos,fazer,fazes,fez,fim,final,foi,fomos,for,foram,forma,foste,fostes,fui,geral,grande,grandes,grupo,há,hoje,hora,horas,isso,isto,já,lá,lado,local,logo,longe,lugar,maior,maioria,mais,mal,mas,máximo,me,meio,menor,menos,mês,meses,meu,meus,mil,minha,minhas,momento,muito,muitos,na,nada,não,naquela,naquelas,naquele,naqueles,nas,nem,nenhuma,nessa,nessas,nesse,nesses,nesta,nestas,neste,nestes,nível,no,noite,nome,nos,nós,nossa,nossas,nosso,nossos,nova,novas,nove,novo,novos,num,numa,número,nunca,o,obra,obrigada,obrigado,oitava,oitavo,oito,onde,ontem,onze,os,ou,outra,outras,outro,outros,para,parece,parte,partir,paucas,pela,pelas,pelo,pelos,perto,pode,pôde,podem,poder,põe,põem,ponto,pontos,por,porque,porquê,posição,possível,possivelmente,posso,pouca,pouco,poucos,primeira,primeiras,primeiro,primeiros,própria,próprias,próprio,próprios,próxima,próximas,próximo,próximos,puderam,quais,qual,quando,quanto,quarta,quarto,quatro,que,quê,quem,quer,quereis,querem,queremas,queres,quero,questâo,quinta,quinto,quinze,relação,sabe,sabem,são,se,segunda,segundo,sei,seis,sem,sempre,ser,seria,sete,sétima,sétimo,seu,seus,sexta,sexto,sim,sistema,sob,sobre,sois,somos,sou,sua,suas,tal,talvez,também,tanta,tantas,tanto,tão,tarde,te,tem,têm,temos,tendes,tenho,tens,ter,terceira,terceiro,teu,teus,teve,tive,tivemos,tiveram,tiveste,tivestes,toda,todas,todo,todos,trabalho,trás,treze,tu,tua,tuas,tudo,um,uma,umas,uns,vai,vais,vão,vários,vem,vêm,vens,ver,vez,vezes,viagem,vindo,vinte,você,vocês,vos,vós,vossa,vossas,vosso,vossos,zero\";\n\n #transforma a string recolhida do texto em array\n $this->artPrepArray = explode(',',$this->artPrepText);\n\n #retira as palavras de artigo e preposição da string de pesquisa do usuário.\n #PS: Para cada posição do array de pesquisa, sera executado outro laço no array de preposições\n for($i=0; $i < count($this->keyWords); $i++){\n\n for($j = 0; $j < count($this->artPrepArray); $j++){\n\n #compara se alguma palavra da \"string de pesquiva\" equivale a alguma palavra da lista de preposições.\n if( $this->keyWords[$i] == $this->artPrepArray[$j] ){\n\n #caso verdadeiro exclui a posição em que a palavra se encontra no array de pesquisa feita pelo usuário.\n unset($this->keyWords[$i]);\n\n #atualiza quantidades de posição do array de pesquisa\n $this->keyWords = array_values($this->keyWords);\n #Decrementa a posição após a exclusão de uma posição.\n //if($i>0){$i--;}\n }\n\n }\n\n }\n\n return $this->keyWords;\n\n }", "function analyze_nucleotide($row, $i)\n {\n $props = get_object_vars($row);\n\n $extreme_case = false;\n foreach ($props as $key => $value) {\n\n if (array_key_exists($key,$this->low_is_good)) {\n if ($value > $this->avg[$key]) {\n $extreme_case = true;\n break;\n }\n } else {\n if ($value < $this->avg[$key]) {\n $extreme_case = true;\n break;\n }\n\n }\n\n\n // high b values are bad, so we highlight them\n// $pos = strpos($key,'iso');\n// if ( $pos != false and $value > $this->avg[$key] ) {\n// $extreme_case = true;\n// break;\n// }\n// if ( array_key_exists($key,$this->avg) and $value < $this->avg[$key] ) {\n// $extreme_case = true;\n// break;\n// }\n }\n\n if ($extreme_case == true) {\n return array(\n $i,\n $this->make_checkbox($row->loop_id,$row->nt_ids),\n '<a class=\"pdb\">' . substr($row->nt_id,0,4) . '</a> ' . substr($row->nt_id,10),\n anchor_popup(site_url(array('motif/view/0.5',$row->motif_id)),$row->motif_id,array('width'=>'1000')),\n $this->make_label($row->sfcheck_correlation,'sfcheck_correlation'),\n $this->make_label($row->sfcheck_correlation_side_chain,'sfcheck_correlation_side_chain'),\n $this->make_label($row->sfcheck_real_space_R,'sfcheck_real_space_R'),\n $this->make_label($row->sfcheck_real_space_R_side_chain,'sfcheck_real_space_R_side_chain'),\n $this->make_label($row->sfcheck_connect,'sfcheck_connect'),\n $this->make_label($row->sfcheck_shift,'sfcheck_shift'),\n $this->make_label($row->sfcheck_shift_side_chain,'sfcheck_shift_side_chain'),\n $this->make_label($row->sfcheck_density_index_main_chain,'sfcheck_density_index_main_chain'),\n $this->make_label($row->sfcheck_density_index_side_chain,'sfcheck_density_index_side_chain'),\n $this->make_label($row->sfcheck_B_iso_main_chain,'sfcheck_B_iso_main_chain'),\n $this->make_label($row->sfcheck_B_iso_side_chain,'sfcheck_B_iso_side_chain'),\n $this->make_label($row->mapman_correlation,'mapman_correlation'),\n $this->make_label($row->mapman_real_space_R,'mapman_real_space_R'),\n $this->make_label($row->mapman_Biso_mean,'mapman_Biso_mean'),\n $this->make_label($row->mapman_occupancy_mean,'mapman_occupancy_mean')\n );\n } else {\n return array();\n }\n\n }", "function ler($nome) {\n $x = 1;\n\t while($x < $this->bd[0][0] && !$this->str_igual($nome, $this->bd[$x][2])) {$x++;}\n if($x >= $this->bd[0][0]) {return 0;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\nreturn 1;\n }", "function formlit($f, $url = true)\n{\n $suchmuster = \"/<llink:(.\\d+)>/\";\n $tref = preg_match_all($suchmuster, $f['in'], $treffer);\n for ($i = 0; $i < count($treffer[0]); $i++) {\n $id = $treffer[1][$i];\n $li = getlit($id);\n $f['in'] = $li['text'];\n }\n\n\n $text = $f['verfasser_vorname'];\n if ($text != '') $text = ', ' . $text;\n $hg = '';\n if ($f['code'] == 'H') $hg = ' (Hg.)';\n if ($f['verfasser_name']) $text = $f['verfasser_name'] . $text . $hg . ': ';\n if ($f['titel']) $text .= $f['titel'] . ', ';\n\n if ($f['in']) $text .= 'in: ' . $f['in'] . ', ';\n if ($f['ort']) {\n if ($f['verlag']) {\n $text .= $f['ort'] . ', ';\n } else {\n $text .= $f['ort'] . ' ';\n }\n }\n if ($f['verlag']) $text .= $f['verlag'] . ' ';\n if ($f['code'] == 'T') {\n if ($f['nummer']) $text .= $f['nummer'] . ' ';\n if ($f['jahr']) $text .= $f['jahr'];\n } else {\n if ($f['jahr']) $text .= $f['jahr'];\n if ($f['nummer']) $text .= ', ' . $f['nummer'];\n }\n\n if ($f['code'] == 'U' and $url) {\n if ($text[strlen($text) - 1] != ' ') $text .= ', ';\n $f['url'] = preg_replace(\"/http:\\/\\/(.*)/\", \"<a href=\\\"http://\\$1\\\" target=\\\"_new\\\">\\$1</a> \", $f['url']);\n $text .= $f['url'];\n }\n\n if ($f['seite']) {\n if ($text[strlen($text) - 1] != ' ') $text .= ', ';\n $text .= $f['seite'];\n }\n if ($text[strlen($text) - 1] != '.') $text .= '.';\n $f['text'] = clean_entry($text);\n return ($f);\n}", "public function inAfrikaans()\n {\n return $this->getTranslationIn('af');\n }", "public function bungabunga()\n\t{\n\t\t//(3/9) - \"Microsoft Frontpage 2003 - 4 Town-Up from Kraenk.rar.par2\" - 181,98 MB - yEnc\n\t\tif (preg_match('/^[\\[(]\\d+\\/\\d+[\\])] - \"([A-Z0-9].{2,}?)' . $this->e0 .\n\t\t\t\t\t ' - \\d+[.,]\\d+ [kKmMgG][bB]( -)? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "function formatMetarTaf($metar,$replace) {\n $result = preg_replace('/((PROB[0-9]{2} +(.*?) +)|(FM[0-9]{6}|TEMPO|BECMG))/',\"$replace$1\",$metar);\n\n return $result;\n }", "public function pemrosesanSeleksiUnit()\n {\necho(\"<br/><br/>**********HASIL FILTERING TOKEN / ENTITY*********<br/><br/>\");\n //pemfilteran berdasarkan pilihan kriteria.\n if(Pembantu::gunakanLemma($this->penanda_filter_token_entity)) // gunakan pemfilteran token.\n {\nPembantu::cetakDebug(\"Gunakan Filter Token<br/>\");\n $totalUnit = count($this->array_objek_unit);\n for($i=0; $i < $totalUnit; $i++)\n {\n $this->array_hasil_filtering[$i] = $this->filterArrayToken($this->array_objek_unit[$i]);\necho(\"Hasil untuk file \" . $this->array_objek_unit[$i]->nama . \" :: \" . json_encode($this->array_hasil_filtering[$i]) . \"<br/><br/>\");\n }\n }\n else // gunakan pemfilteran entity.\n {\nPembantu::cetakDebug(\"Gunakan Filter Entity<br/>\");\n $totalUnit = count($this->array_objek_unit);\n for($i=0; $i < $totalUnit; $i++)\n {\n $this->array_hasil_filtering[$i] = $this->filterArrayEntity($this->array_objek_unit[$i]);\necho(\"Hasil untuk file \" . $this->array_objek_unit[$i]->nama . \" :: \" . json_encode($this->array_hasil_filtering[$i]) . \"<br/><br/>\");\n }\n }\n\necho \"<br/><br/>**********HASIL PERHITUNGAN FREKUENSI KEMUNCULAN TOKEN PADA TIAP UNIT STRING*********<br/><br/>\";\n //Hitung Frekuensi kemunculan token berdasarkan string unit.\n $totalHasil = count($this->array_hasil_filtering);\n $this->array_freq_hasil_filtering = array();\n $isMultipleEDU = false;\n $jumlahUnitString = count($this->array_objek_unit[0]->array_unit_string[0]); //menentukan apakah double EDU atau triple EDU.\n\n if($this->penanda_unit_string == Umum::UNIT_STRING_DOUBLE_EDU || $this->penanda_unit_string == Umum::UNIT_STRING_TRIPLE_EDU) // jika unit string adalah double EDU atau Triple EDU\n {\n $isMultipleEDU = true;\n }\n\n for($i=0; $i<$totalHasil;$i++)\n {\n $totalUnitString = count($this->array_objek_unit[$i]->array_unit_string); // jumlah unit string.\n $this->array_freq_hasil_filtering[$i] = array();\n $awalIdxNER = 0;\n\n //abou 25-08-2013 : unused\n// $idxAwalUnitSebelumnya = 0;\n// $jumlahKataUnitSebelumnya = 0;\n// $jumlahKataUnitSebelumnya_akhir = 0; //khusus triple EDU\n\necho(\"Total UnitString = $totalUnitString<br/>\");\n for($j=0;$j<$totalUnitString;$j++)\n {\n $this->array_freq_hasil_filtering[$i][$j] = array();\n $jumlahToken = count($this->array_hasil_filtering[$i]);\n $indexAkhirPencarian = count($this->array_objek_unit[$i]->array_unit_string[$j]);\n\n /*\n * abou 25-08-2013 : Tidak perlu digunakan, NER dan POS sudah tersimpan sesuai urutan per kata dalam array unit string.\n * \n if($isMultipleEDU) //aboubakr 20120916 : tentukan awalIdxkata tiap unitnya\n {\n if($this->array_objek_unit[$i]->array_unit_string[$j][0][0] != 'NULL')\n {\n $awalIdxNER = $idxAwalUnitSebelumnya;\n }\n else\n {\n $awalIdxNER = $idxAwalUnitSebelumnya + $jumlahKataUnitSebelumnya;\n }\n\n //aboubakr 20120916 : Hitung jumlah kata Unit sebelumnya\n // jika akhirnya tidak NULL\n if($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1][0] != 'NULL')\n {\n $jumlahKataUnitSebelumnya_akhir = count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1]);\n\n $idxAwalUnitSebelumnya += $jumlahKataUnitSebelumnya;\n if($this->penanda_unit_string == Umum::UNIT_STRING_TRIPLE_EDU) // aboubakr 20120916 : tambahan untuk triple EDU.\n {\n $jumlahKataUnitSebelumnya = count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-2]);\n $jumlahKataUnitSebelumnya += count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1]);\n }\n else\n {\n $jumlahKataUnitSebelumnya = count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1]); // aboubakr 20120916 : hitung jumlah kata unit terakhir, karena tidak null.\n }\n }\n else // unit terakhir NULL.\n {\n $jumlahKataUnitSebelumnya = count($this->array_objek_unit[$i]->array_unit_string[$j][0]); // aboubakr 20120916 : hitung jumlah kata unit awal, karena unit terakhir null. Dipastikan ada.\n if($this->penanda_unit_string == Umum::UNIT_STRING_TRIPLE_EDU) // aboubakr 20120916 : tambahan untuk triple EDU.\n {\n $jumlahKataUnitSebelumnya += count($this->array_objek_unit[$i]->array_unit_string[$j][1]); // aboubakr 20120916 : tambahkan untuk triple edu.\n }\n }\n//echo \"Unit ke-$j -> \" . $this->array_objek_unit[$i]->array_unit_string[$j][0][0] . \" :: idxSebelum = $idxAwalUnitSebelumnya , jumlahKataSebelum = $jumlahKataUnitSebelumnya , awalIndex = $awalIdxNER<br/>\";\n }\n */\n \n//Pembantu::cetakDebug(\"[abouDebug] NER Array \" . json_encode($this->array_objek_unit[$i]->array_ner) . \"<br/>\");//suspect 18022013 : ga dicek di fungsi hitungKata!!!\n \n $arrayUnitStringMultiEDU = array(); //abou 25-08-2013 : gunakan sebagai iterator awalIdxNER.\n for($k = 0; $k < $jumlahToken; $k++)\n {\n if($isMultipleEDU) // jika unit string adalah double EDU atau Triple EDU\n {\n if($k==0) //abou 25-08-2013 : cukup sekali proses, gunakan untuk sisa token.\n {\n $totalKataDalamUnit = 0;\n for($x=0;$x<$jumlahUnitString;$x++)\n {\n $jumlahTokenUnitString = count($this->array_objek_unit[$i]->array_unit_string[$j][$x]);\n\n for($y=0;$y<$jumlahTokenUnitString;$y++)\n {\n $totalKataDalamUnit++;\n if($this->array_objek_unit[$i]->array_unit_string[$j][$x][$y] != 'NULL')\n {\n array_push($arrayUnitStringMultiEDU, $this->array_objek_unit[$i]->array_unit_string[$j][$x][$y]);\n }\n }\n }\n }\n\n//Pembantu::cetakDebug(\"Kata Dicari : \" . $this->array_hasil_filtering[$i][$k] . \" , array target cari sampai index ke-$indexAkhirPencarian : \" . json_encode($arrayUnitStringMultiEDU) . \"<br/>\"); \n //16062013 : Pisahkan untuk pengecekan NER dan POS. Jika Filter yang digunakan filter NER, supply array NER untuk parameter ke 3, otherwise, supply array POS.\n if($this->penanda_filter_token_entity > Umum::FILTER_MASK_POS)\n {\n //$this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_ner,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_ner_unit,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n }\n else\n {\n //$this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_pos,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_pos_unit,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n }\n }\n else // untuk selain multiple EDU.\n {\n//Pembantu::cetakDebug(\"Kata Dicari : \" . $this->array_hasil_filtering[$i][$k] . \" array target cari sampai index ke-$indexAkhirPencarian <br/>\");\n if($this->penanda_filter_token_entity > Umum::FILTER_MASK_POS)\n {\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$this->array_objek_unit[$i]->array_unit_string[$j],$this->array_objek_unit[$i]->array_ner,$awalIdxNER,$this->penanda_filter_token_entity,0,$indexAkhirPencarian,false);\n }\n else\n {\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$this->array_objek_unit[$i]->array_unit_string[$j],$this->array_objek_unit[$i]->array_pos,$awalIdxNER,$this->penanda_filter_token_entity,0,$indexAkhirPencarian,false);\n }\n }\n }\n\n if(!$isMultipleEDU) //aboubakr 20120916 : jika bukan multiple EDU.\n {\n $awalIdxNER += $indexAkhirPencarian;\n }\n else\n {\n $awalIdxNER += count($arrayUnitStringMultiEDU);\n }\n }\nPembantu::cetakDebug(\"Hasil Frekuensi Untuk File - \" . $this->array_objek_unit[$i]->nama . \" ==> \" . json_encode($this->array_freq_hasil_filtering[$i]) . \"<br/><br/>\");\n }\n\n// Tulis hasil modul seleksi unit.\n $akhiranNamaFile = \"\";\n if($this->penanda_unit_string == Umum::UNIT_STRING_DOKUMEN)\n {\n $akhiranNamaFile = Umum::AKHIRAN_TABEL_FREQ_DOC;\n }\n else if($this->penanda_unit_string == Umum::UNIT_STRING_SENTENCE)\n {\n $akhiranNamaFile = Umum::AKHIRAN_TABEL_FREQ_STC;\n }\n else\n {\n $akhiranNamaFile = Umum::AKHIRAN_TABEL_FREQ_EDU;\n }\n\n if(!is_dir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_TOKEN))\n {\n mkdir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_TOKEN,0777,true); //buat folder keluaran 1. \n }\n if(!is_dir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE))\n {\n mkdir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE,0777,true); //buat folder keluaran 2.\n }\n// mkdir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE_TR,0,true); //buat folder keluaran 2 - transpose. No Need\n for($i=0;$i<$totalHasil;$i++)\n {\n TulisHasil::tuliskanHasilSeleksiUnit(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_TOKEN . $this->array_objek_unit[$i]->nama . Umum::AKHIRAN_HASIL_SELEKSI_UNIT,$this->array_hasil_filtering[$i],false);\n TulisHasil::tuliskanTabelFrekuensiSeleksiUnit(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE . $this->array_objek_unit[$i]->nama . $akhiranNamaFile, $this->array_freq_hasil_filtering[$i],false);\n// TulisHasil::tuliskanTabelFrekuensiSeleksiUnit(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE_TR . $this->array_objek_unit[$i]->nama . $akhiranNamaFile, $this->array_freq_hasil_filtering[$i],true);\n }\n }", "function mettre_text_en_gras($mot_rechercher,$plage)\n{\n $array_tmp = array();\n \n $index = 0;\n $count_char = 0;\n $b_fin = false;\n\n settype($mot_rechercher, \"string\");\n \n $array_tmp[$index] = $plage;\n \n if(contient_chiffre($mot_rechercher))\n { \n if(strlen($mot_rechercher) > 1)\n {\n while($b_fin == false)\n {\n for($y=0;$y<strlen($array_tmp[$index]);$y++)\n {\n if(isset($mot_rechercher[0]) && $mot_rechercher[0] === $array_tmp[$index][$y])\n {\n for($v=0;$v<strlen($mot_rechercher);$v++)\n {\n if\n (\n isset($mot_rechercher[$v]) && \n isset($array_tmp[$index][$v + $y]) && \n $mot_rechercher[$v] === $array_tmp[$index][$v + $y]\n )\n {\n $count_char++;\n \n if($count_char === strlen($mot_rechercher))\n {\n $b_fin = false;\n $array_tmp[$index + 1] = \"\";\n\n for($x=0;$x<$y;$x++)\n {\n $array_tmp[$index + 1] .= $array_tmp[$index][$x];\n }\n $array_tmp[$index + 1] .= '<span class=\"warning_message\">' . strtoupper($mot_rechercher) . \"</span>\";\n\n for($x=$y+strlen($mot_rechercher);$x<strlen($array_tmp[$index]);$x++)\n {\n $array_tmp[$index + 1] .= $array_tmp[$index][$x];\n }\n $index++;\n }\n }\n }\n }\n else\n {\n $count_char = 0;\n $b_fin = true;\n }\n }\n }\n }\n }\n \n return $array_tmp[$index];\n}", "function toPersen($total,$pembagi){\t\n $hasil = empty($pembagi) ? 0 : round(($total)/($pembagi)*100,2);\n\treturn $hasil;\n}", "static function Del_Derivation_Suffixes($kata){\n $kataAsal = $kata;\n if(preg_match('/(i|an)\\z/i',$kata)){ // Cek Suffixes\n $__kata = preg_replace('/(i|an)\\z/i','',$kata);\n if(self::cekKamus($__kata)){ // Cek Kamus\n return $__kata;\n }else if(preg_match('/(kan)\\z/i',$kata)){\n $__kata = preg_replace('/(kan)\\z/i','',$kata);\n if(self::cekKamus($__kata)){\n return $__kata;\n }\n }\n /*– Jika Tidak ditemukan di kamus –*/\n }\n return $kataAsal;\n }", "function DesplegarGraficaMarca($ancho,$alto,$valores)\n {\n \n echo \"<div style='background-color:#F8E6E0; \n border-style:solid; \n border-width:1px; \n border-color:#E0F8E0; \n position: relative; \n width:$ancho; \n height:$alto;\n top:50%;\n left:13%;'>\\n\";\n echo $Zapatos;\n $maximovalor=0.0; //\n $nbarras=0; //\n foreach($valores as $nom => $val) // <-- En este ciclo \n { // buscamos el\n if($val>$maximovalor) $maximovalor=$val; // numero de barras \n $nbarras++; // y el máximo valor.\n } // \n \n $alturatexto = 20;\n $anchobarra=$ancho / $nbarras;\n $escala=($alto-$alturatexto)/$maximovalor; \n $i=0;\n// Ciclo que imprime cada una de las barras \n foreach($valores as $nom => $val)\n {\n $leftB= intval($i*$anchobarra);\n $widthB=$anchobarra-25; \n $topB=($alto-$alturatexto) - ($val * $escala);\n $heightB=($alto-$alturatexto)-$topB; \n // Aquí se pintan las barras\n echo \"<div style=' \n background: -webkit-linear-gradient(orange, pink);\n background: -moz-linear-gradient(orange, pink);\n background: -o-linear-gradient(orange, pink);;\n border-style:solid; \n border-width:1px;\n border-color:black;\n position:absolute;\n width:$widthB;\n height:$heightB;\n left:$leftB;\n top:$topB'>\\n\"; \n // Colocamos el valor dentro de la barra \n echo \"<center><b><label style='color:#A45FA1'>$val </label></b></center>\"; \n echo \"</div>\";\n $topT=($alto-$alturatexto);\n // Definimos un area transparente que contendrá la leyenda de abajo\n echo \"<div style='position:absolute;\n width:$widthB;\n height:$alturatexto;\n left:$leftB;\n top:$topT'>\\n\"; \n echo \"<center> <label style='color:blue'>$nom</label> </center>\";\n echo \"</div>\"; \n $i++;\n } \n echo \"</div>\"; \n }", "public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }", "function pegaPaises()\n {\n $lista_paises = array(\"AF\" => \"Afghanistan\",\n \"AL\" => \"Albania\",\n \"DZ\" => \"Algeria\",\n \"AS\" => \"American Samoa\",\n \"AD\" => \"Andorra\",\n \"AO\" => \"Angola\",\n \"AI\" => \"Anguilla\",\n \"AQ\" => \"Antarctica\",\n \"AG\" => \"Antigua And Barbuda\",\n \"AR\" => \"Argentina\",\n \"AM\" => \"Armenia\",\n \"AW\" => \"Aruba\",\n \"AU\" => \"Australia\",\n \"AT\" => \"Austria\",\n \"AZ\" => \"Azerbaijan\",\n \"BS\" => \"Bahamas\",\n \"BH\" => \"Bahrain\",\n \"BD\" => \"Bangladesh\",\n \"BB\" => \"Barbados\",\n \"BY\" => \"Belarus\",\n \"BE\" => \"Belgium\",\n \"BZ\" => \"Belize\",\n \"BJ\" => \"Benin\",\n \"BM\" => \"Bermuda\",\n \"BT\" => \"Bhutan\",\n \"BO\" => \"Bolivia\",\n \"BA\" => \"Bosnia And Herzegowina\",\n \"BW\" => \"Botswana\",\n \"BV\" => \"Bouvet Island\",\n \"BR\" => \"Brazil\",\n \"IO\" => \"British Indian Ocean Territory\",\n \"BN\" => \"Brunei Darussalam\",\n \"BG\" => \"Bulgaria\",\n \"BF\" => \"Burkina Faso\",\n \"BI\" => \"Burundi\",\n \"KH\" => \"Cambodia\",\n \"CM\" => \"Cameroon\",\n \"CA\" => \"Canada\",\n \"CV\" => \"Cape Verde\",\n \"KY\" => \"Cayman Islands\",\n \"CF\" => \"Central African Republic\",\n \"TD\" => \"Chad\",\n \"CL\" => \"Chile\",\n \"CN\" => \"China\",\n \"CX\" => \"Christmas Island\",\n \"CC\" => \"Cocos (Keeling) Islands\",\n \"CO\" => \"Colombia\",\n \"KM\" => \"Comoros\",\n \"CG\" => \"Congo\",\n \"CD\" => \"Congo, The Democratic Republic Of The\",\n \"CK\" => \"Cook Islands\",\n \"CR\" => \"Costa Rica\",\n \"CI\" => \"Cote D'Ivoire\",\n \"HR\" => \"Croatia (Local Name: Hrvatska)\",\n \"CU\" => \"Cuba\",\n \"CY\" => \"Cyprus\",\n \"CZ\" => \"Czech Republic\",\n \"DK\" => \"Denmark\",\n \"DJ\" => \"Djibouti\",\n \"DM\" => \"Dominica\",\n \"DO\" => \"Dominican Republic\",\n \"TP\" => \"East Timor\",\n \"EC\" => \"Ecuador\",\n \"EG\" => \"Egypt\",\n \"SV\" => \"El Salvador\",\n \"GQ\" => \"Equatorial Guinea\",\n \"ER\" => \"Eritrea\",\n \"EE\" => \"Estonia\",\n \"ET\" => \"Ethiopia\",\n \"FK\" => \"Falkland Islands (Malvinas)\",\n \"FO\" => \"Faroe Islands\",\n \"FJ\" => \"Fiji\",\n \"FI\" => \"Finland\",\n \"FR\" => \"France\",\n \"FX\" => \"France, Metropolitan\",\n \"GF\" => \"French Guiana\",\n \"PF\" => \"French Polynesia\",\n \"TF\" => \"French Southern Territories\",\n \"GA\" => \"Gabon\",\n \"GM\" => \"Gambia\",\n \"GE\" => \"Georgia\",\n \"DE\" => \"Germany\",\n \"GH\" => \"Ghana\",\n \"GI\" => \"Gibraltar\",\n \"GR\" => \"Greece\",\n \"GL\" => \"Greenland\",\n \"GD\" => \"Grenada\",\n \"GP\" => \"Guadeloupe\",\n \"GU\" => \"Guam\",\n \"GT\" => \"Guatemala\",\n \"GN\" => \"Guinea\",\n \"GW\" => \"Guinea-Bissau\",\n \"GY\" => \"Guyana\",\n \"HT\" => \"Haiti\",\n \"HM\" => \"Heard And Mc Donald Islands\",\n \"VA\" => \"Holy See (Vatican City State)\",\n \"HN\" => \"Honduras\",\n \"HK\" => \"Hong Kong\",\n \"HU\" => \"Hungary\",\n \"IS\" => \"Iceland\",\n \"IN\" => \"India\",\n \"ID\" => \"Indonesia\",\n \"IR\" => \"Iran (Islamic Republic Of)\",\n \"IQ\" => \"Iraq\",\n \"IE\" => \"Ireland\",\n \"IL\" => \"Israel\",\n \"IT\" => \"Italy\",\n \"JM\" => \"Jamaica\",\n \"JP\" => \"Japan\",\n \"JO\" => \"Jordan\",\n \"KZ\" => \"Kazakhstan\",\n \"KE\" => \"Kenya\",\n \"KI\" => \"Kiribati\",\n \"KP\" => \"Korea, Democratic People's Republic Of\",\n \"KR\" => \"Korea, Republic Of\",\n \"KW\" => \"Kuwait\",\n \"KG\" => \"Kyrgyzstan\",\n \"LA\" => \"Lao People's Democratic Republic\",\n \"LV\" => \"Latvia\",\n \"LB\" => \"Lebanon\",\n \"LS\" => \"Lesotho\",\n \"LR\" => \"Liberia\",\n \"LY\" => \"Libyan Arab Jamahiriya\",\n \"LI\" => \"Liechtenstein\",\n \"LT\" => \"Lithuania\",\n \"LU\" => \"Luxembourg\",\n \"MO\" => \"Macau\",\n \"MK\" => \"Macedonia, Former Yugoslav Republic Of\",\n \"MG\" => \"Madagascar\",\n \"MW\" => \"Malawi\",\n \"MY\" => \"Malaysia\",\n \"MV\" => \"Maldives\",\n \"ML\" => \"Mali\",\n \"MT\" => \"Malta\",\n \"MH\" => \"Marshall Islands\",\n \"MQ\" => \"Martinique\",\n \"MR\" => \"Mauritania\",\n \"MU\" => \"Mauritius\",\n \"YT\" => \"Mayotte\",\n \"MX\" => \"Mexico\",\n \"FM\" => \"Micronesia, Federated States Of\",\n \"MD\" => \"Moldova, Republic Of\",\n \"MC\" => \"Monaco\",\n \"MN\" => \"Mongolia\",\n \"MS\" => \"Montserrat\",\n \"MA\" => \"Morocco\",\n \"MZ\" => \"Mozambique\",\n \"MM\" => \"Myanmar\",\n \"NA\" => \"Namibia\",\n \"NR\" => \"Nauru\",\n \"NP\" => \"Nepal\",\n \"NL\" => \"Netherlands\",\n \"AN\" => \"Netherlands Antilles\",\n \"NC\" => \"New Caledonia\",\n \"NZ\" => \"New Zealand\",\n \"NI\" => \"Nicaragua\",\n \"NE\" => \"Niger\",\n \"NG\" => \"Nigeria\",\n \"NU\" => \"Niue\",\n \"NF\" => \"Norfolk Island\",\n \"MP\" => \"Northern Mariana Islands\",\n \"NO\" => \"Norway\",\n \"OM\" => \"Oman\",\n \"PK\" => \"Pakistan\",\n \"PW\" => \"Palau\",\n \"PA\" => \"Panama\",\n \"PG\" => \"Papua New Guinea\",\n \"PY\" => \"Paraguay\",\n \"PE\" => \"Peru\",\n \"PH\" => \"Philippines\",\n \"PN\" => \"Pitcairn\",\n \"PL\" => \"Poland\",\n \"PT\" => \"Portugal\",\n \"PR\" => \"Puerto Rico\",\n \"QA\" => \"Qatar\",\n \"RE\" => \"Reunion\",\n \"RO\" => \"Romania\",\n \"RU\" => \"Russian Federation\",\n \"RW\" => \"Rwanda\",\n \"KN\" => \"Saint Kitts And Nevis\",\n \"LC\" => \"Saint Lucia\",\n \"VC\" => \"Saint Vincent And The Grenadines\",\n \"WS\" => \"Samoa\",\n \"SM\" => \"San Marino\",\n \"ST\" => \"Sao Tome And Principe\",\n \"SA\" => \"Saudi Arabia\",\n \"SN\" => \"Senegal\",\n \"SC\" => \"Seychelles\",\n \"SL\" => \"Sierra Leone\",\n \"SG\" => \"Singapore\",\n \"SK\" => \"Slovakia (Slovak Republic)\",\n \"SI\" => \"Slovenia\",\n \"SB\" => \"Solomon Islands\",\n \"SO\" => \"Somalia\",\n \"ZA\" => \"South Africa\",\n \"GS\" => \"South Georgia, South Sandwich Islands\",\n \"ES\" => \"Spain\",\n \"LK\" => \"Sri Lanka\",\n \"SH\" => \"St. Helena\",\n \"PM\" => \"St. Pierre And Miquelon\",\n \"SD\" => \"Sudan\",\n \"SR\" => \"Suriname\",\n \"SJ\" => \"Svalbard And Jan Mayen Islands\",\n \"SZ\" => \"Swaziland\",\n \"SE\" => \"Sweden\",\n \"CH\" => \"Switzerland\",\n \"SY\" => \"Syrian Arab Republic\",\n \"TW\" => \"Taiwan\",\n \"TJ\" => \"Tajikistan\",\n \"TZ\" => \"Tanzania, United Republic Of\",\n \"TH\" => \"Thailand\",\n \"TG\" => \"Togo\",\n \"TK\" => \"Tokelau\",\n \"TO\" => \"Tonga\",\n \"TT\" => \"Trinidad And Tobago\",\n \"TN\" => \"Tunisia\",\n \"TR\" => \"Turkey\",\n \"TM\" => \"Turkmenistan\",\n \"TC\" => \"Turks And Caicos Islands\",\n \"TV\" => \"Tuvalu\",\n \"UG\" => \"Uganda\",\n \"UA\" => \"Ukraine\",\n \"AE\" => \"United Arab Emirates\",\n \"GB\" => \"United Kingdom\",\n \"US\" => \"United States\",\n \"UM\" => \"United States Minor Outlying Islands\",\n \"UY\" => \"Uruguay\",\n \"UZ\" => \"Uzbekistan\",\n \"VU\" => \"Vanuatu\",\n \"VE\" => \"Venezuela\",\n \"VN\" => \"Viet Nam\",\n \"VG\" => \"Virgin Islands (British)\",\n \"VI\" => \"Virgin Islands (U.S.)\",\n \"WF\" => \"Wallis And Futuna Islands\",\n \"EH\" => \"Western Sahara\",\n \"YE\" => \"Yemen\",\n \"YU\" => \"Yugoslavia\",\n \"ZM\" => \"Zambia\",\n \"ZW\" => \"Zimbabwe\");\n\n\n return $lista_paises;\n }", "function bestillingAvBrod($type, $antall, $tidspunkt){\r\n //Kunden får oversikt over alle brøene som er tilgjengelig\r\n\r\n //kunden får oversikt over hvor mange brød man kan bestillinger\r\n\r\n //Kunden velger tidspunkt nå brød skal hentes.\r\n\r\n //Informasjon sendes mot database i tabellen som man trenger.\r\n }", "public function luas()\n {\n return $this->panjang * $this->lebar;\n }", "public function calculManquant()\n {\n $q = 'UPDATE releve_manquant SET mois_complet=\"Abscence Totale\" WHERE status=0';\n $this->pdo->exec($q);\n $query = \"SELECT * FROM releve_manquant where status=1\";\n $prep = $this->pdo->query($query);\n $datas = $prep->fetchAll(\\PDO::FETCH_ASSOC);\n foreach ($datas as $d) {\n $Objdossier = $this->getDoctrine()->getManager()->getRepository('AppBundle:Dossier')\n ->createQueryBuilder('d')\n ->where('d.id = :id')\n ->setParameter('id', $d['dossier_id'])\n ->getQuery()\n ->getOneOrNullResult();\n $complet = $this->getDoctrine()->getRepository('AppBundle:TbimagePeriode')\n ->getAnneeMoisExercices($Objdossier, $d['exercice']);\n $moisc = $complet->ms;\n $moisc = array_reverse($moisc);\n $manq = explode(',', $d['mois']);\n $lib = \"Incomplet\";\n $test1 = true;\n $test2 = true;\n $test3 = true;\n $test4 = true;\n $rest1 = false;\n $rest2 = false;\n $rest3 = false;\n $manq = array_map('trim', $manq);\n if (sizeof($moisc) > 3) {\n if (sizeof($manq) == 1) {\n if (in_array($moisc[0], $manq)) {\n $lib = \"m-1\";\n }\n } else if (sizeof($manq) == 2) {\n if (in_array($moisc[0], $manq) && in_array($moisc[1], $manq)) {\n $lib = \"m-2\";\n }\n } else if (sizeof($manq) == 3) {\n if (in_array($moisc[0], $manq) && in_array($moisc[1], $manq) && in_array($moisc[2], $manq)) {\n $lib = \"m-3\";\n }\n } else if (sizeof($manq) == 4) {\n if (in_array($moisc[0], $manq) && in_array($moisc[1], $manq) && in_array($moisc[2], $manq) && in_array($moisc[3], $manq)) {\n $lib = \"m-4\";\n }\n }\n }\n $q = 'UPDATE releve_manquant SET mois_complet=\"' . $lib . '\" WHERE id=' . $d['id'];\n $this->pdo->exec($q);\n }\n }", "function tache_debut_fin($tache_tmp, $aff_text_infobulle=false)\r\n{\r\n\tif($tache_tmp[\"date_debut\"]!=\"\" || $tache_tmp[\"date_fin\"]!=\"\")\r\n\t{\r\n\t\t////\tAffichage de la période ou date en mode texte\r\n\t\tglobal $trad;\r\n\t\tif($tache_tmp[\"date_debut\"]!=\"\" && $tache_tmp[\"date_fin\"]!=\"\")\t{ $tache_debut_fin = temps($tache_tmp[\"date_debut\"], \"normal\", $tache_tmp[\"date_fin\"], true); }\r\n\t\telseif($tache_tmp[\"date_debut\"]!=\"\")\t\t\t\t\t\t\t{ $tache_debut_fin = temps($tache_tmp[\"date_debut\"], \"normal\", \"\", true); }\r\n\t\telseif($tache_tmp[\"date_fin\"]!=\"\")\t\t\t\t\t\t\t\t{ $tache_debut_fin = $trad[\"fin\"].\" : \".temps($tache_tmp[\"date_fin\"], \"normal\", \"\", true); }\r\n\r\n\t\t////\tAffichage infobulle\r\n\t\tif($aff_text_infobulle==true)\t{ return $tache_debut_fin; }\r\n\t\t////\tBarre de statut du temps\r\n\t\telseif($tache_tmp[\"date_debut\"]!=\"\" && $tache_tmp[\"date_fin\"]!=\"\" && substr($tache_tmp[\"date_debut\"],0,10)!=substr($tache_tmp[\"date_fin\"],0,10))\r\n\t\t{\r\n\t\t\t// Barre d'avancement : (now-debut / fin-debut)*100\r\n\t\t\t$pourcent = round( ((time()-strtotime($tache_tmp[\"date_debut\"])) / (strtotime($tache_tmp[\"date_fin\"])-strtotime($tache_tmp[\"date_debut\"]))) * 100);\r\n\t\t\tif($pourcent<0) $pourcent = 0;\r\n\t\t\t$tache_retardee = tache_retardee($tache_tmp);\r\n\t\t\t$couleur_pourcent = ($tache_retardee==true) ? \"rouge\" : \"jaune\";\r\n\t\t\t// Texte\r\n\t\t\t$txt_barre = \"<img src=\\\"\".PATH_TPL.\"module_tache/date.png\\\" /> \".temps($tache_tmp[\"date_debut\"],\"plugin\",$tache_tmp[\"date_fin\"],true);\r\n\t\t\t$txt_infobulle = \"<img src=\\\"\".PATH_TPL.\"module_tache/date.png\\\" /> &nbsp; \".$tache_debut_fin;\r\n\t\t\tif($tache_retardee==true)\t$txt_infobulle .= \"<br /><br /><img src=\\\"\".PATH_TPL.\"divers/important.png\\\" /> &nbsp; \".$trad[\"TACHE_avancement_retard\"].\" (\".$tache_tmp[\"avancement\"].\" %)\";\r\n\t\t\t// Resultat\r\n\t\t\treturn status_bar($pourcent, $txt_barre, $txt_infobulle, $couleur_pourcent, \"width:150px;\").\" &nbsp; &nbsp;\";\r\n\t \t}\r\n\t \t////\tAffichage texte\r\n\t\telse { return $tache_debut_fin.\"<img src=\\\"\".PATH_TPL.\"divers/separateur.gif\\\" />\"; }\r\n\t}\r\n}", "function fonctionBaliseOuvrante($parseur, $nomBalise, $tableauAttributs)\r\n {\r\n // En fait... nous nous conteterons de mémoriser le nom de la balise\r\n // afin d'en tenir compte dans la fonction \"fonctionTexte\"\r\n\r\n global $derniereBaliseRencontree;\r\n\r\n $derniereBaliseRencontree = $nomBalise;\r\n }", "static function Del_Derivation_Prefix($kata){\n $kataAsal = $kata;\n\n /* —— Tentukan Tipe Awalan ————*/\n if(preg_match('/^(di|[ks]e)/',$kata)){ // Jika di-,ke-,se-\n $__kata = preg_replace('/^(di|[ks]e)/','',$kata);\n\n if(self::cekKamus($__kata)){\n return $__kata;\n }\n\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n\n if(preg_match('/^(diper)/',$kata)){ //diper-\n $__kata = preg_replace('/^(diper)/','',$kata);\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n\n }\n\n if(preg_match('/^(ke[bt]er)/',$kata)){ //keber- dan keter-\n $__kata = preg_replace('/^(ke[bt]er)/','',$kata);\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n }\n\n }\n\n if(preg_match('/^([bt]e)/',$kata)){ //Jika awalannya adalah \"te-\",\"ter-\", \"be-\",\"ber-\"\n\n $__kata = preg_replace('/^([bt]e)/','',$kata);\n if(self::cekKamus($__kata)){\n return $__kata; // Jika ada balik\n }\n\n $__kata = preg_replace('/^([bt]e[lr])/','',$kata);\n if(self::cekKamus($__kata)){\n return $__kata; // Jika ada balik\n }\n\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n }\n\n if(preg_match('/^([mp]e)/',$kata)){\n $__kata = preg_replace('/^([mp]e)/','',$kata);\n if(self::cekKamus($__kata)){\n return $__kata; // Jika ada balik\n }\n $__kata__ =self::Del_Derivation_Suffixes($__kata);\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n\n if(preg_match('/^(memper)/',$kata)){\n $__kata = preg_replace('/^(memper)/','',$kata);\n if(self::cekKamus($kata)){\n return $__kata;\n }\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n }\n\n if(preg_match('/^([mp]eng)/',$kata)){\n $__kata = preg_replace('/^([mp]eng)/','',$kata);\n if(self::cekKamus($__kata)){\n return $__kata; // Jika ada balik\n }\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n\n $__kata = preg_replace('/^([mp]eng)/','k',$kata);\n if(self::cekKamus($__kata)){\n return $__kata; // Jika ada balik\n }\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n }\n\n if(preg_match('/^([mp]eny)/',$kata)){\n $__kata = preg_replace('/^([mp]eny)/','s',$kata);\n if(self::cekKamus($__kata)){\n return $__kata; // Jika ada balik\n }\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n }\n\n if(preg_match('/^([mp]e[lr])/',$kata)){\n $__kata = preg_replace('/^([mp]e[lr])/','',$kata);\n if(self::cekKamus($__kata)){\n return $__kata; // Jika ada balik\n }\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n }\n\n if(preg_match('/^([mp]en)/',$kata)){\n $__kata = preg_replace('/^([mp]en)/','t',$kata);\n if(self::cekKamus($__kata)){\n return $__kata; // Jika ada balik\n }\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n\n $__kata = preg_replace('/^([mp]en)/','',$kata);\n if(self::cekKamus($__kata)){\n return $__kata; // Jika ada balik\n }\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n }\n\n if(preg_match('/^([mp]em)/',$kata)){\n $__kata = preg_replace('/^([mp]em)/','',$kata);\n if(self::cekKamus($__kata)){\n return $__kata; // Jika ada balik\n }\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n\n $__kata = preg_replace('/^([mp]em)/','p',$kata);\n if(self::cekKamus($__kata)){\n return $__kata; // Jika ada balik\n }\n\n $__kata__ = self::Del_Derivation_Suffixes($__kata);\n if(self::cekKamus($__kata__)){\n return $__kata__;\n }\n }\n }\n return $kataAsal;\n }", "private function calculateBelfioreCode()\n {\n return strtoupper($this->subject->getBelfioreCode());\n }", "function MigrationTexteGras($matches)\r\n\t{\r\n\t\tif (count($matches) < 2)\r\n\t\t\treturn $matches[0];\r\n\t\treturn '(b)\"'.$matches[1].'\"';\r\n\t}", "function fast_plugin_affiche_milieu($flux){\r\n\t$flux['data'] .= flux_data_fast_plugin('milieu');\r\n\treturn $flux;\r\n}" ]
[ "0.5773403", "0.5493565", "0.5439727", "0.5312592", "0.52906406", "0.52731436", "0.5252427", "0.5213641", "0.5202269", "0.5198771", "0.5185749", "0.5172346", "0.5172346", "0.5172295", "0.5146751", "0.51398635", "0.51237476", "0.5120498", "0.5100045", "0.50782317", "0.50674254", "0.50522494", "0.50494707", "0.50426847", "0.50300986", "0.5025095", "0.5014289", "0.50115657", "0.5010941", "0.50053406", "0.49987125", "0.4996319", "0.49941805", "0.4990442", "0.4969968", "0.4967276", "0.4943873", "0.49425817", "0.49364313", "0.49362367", "0.49321982", "0.49257606", "0.49152067", "0.49037465", "0.48943183", "0.48838547", "0.48758468", "0.4855108", "0.48528066", "0.48235786", "0.48214957", "0.48202893", "0.48202345", "0.48190925", "0.48176363", "0.48171166", "0.48129374", "0.48125654", "0.48103097", "0.48101553", "0.48045942", "0.48027903", "0.47898135", "0.47812536", "0.47732794", "0.47560272", "0.47523895", "0.47514993", "0.47468477", "0.47401872", "0.47388658", "0.47339505", "0.4732729", "0.4728472", "0.47220528", "0.47214696", "0.47187594", "0.4714902", "0.47105783", "0.47100955", "0.4704354", "0.47039896", "0.4703301", "0.4702696", "0.46999156", "0.46995488", "0.46973842", "0.4697221", "0.46920413", "0.46915165", "0.46822262", "0.46749997", "0.46713662", "0.466996", "0.46630952", "0.46625012", "0.46578935", "0.46556774", "0.46531844", "0.4647748" ]
0.50381637
24
A basic test example.
public function testBasicTest() { $response = $this->get('/dangthi'); $response->assertStatus(200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testExample()\n {\n }", "public function test() {\n \t\n\t\tprint_r('hello stef');\n \t\n }", "public function testBasicExample()\n {\n $this->assertTrue(true);\n }", "public function testBasicExample()\n {\n $this->assertEquals(1, 1);\n }", "function test_sample() {\n\n\t\t$this->assertTrue( true );\n\n\t}", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('TROLOLOLO');\n }", "public function testBasicTest()\n {\n\n }", "public function testExample()\n {\n dump(\"testExample\");\n $this->assertTrue(true);\n }", "public function testExample()\n\t{\n\t\t$this->assertTrue(true);\n\t}", "public function testExample()\n {\n //this test is empty as we have not yet decided if we want to use dusk\n\n // $this->get('/')\n // ->click('About')\n // ->seePageIs('/about');\n }", "function testSample() {\n\t\t$this->assertTrue( true );\n\t}", "public function test() {\n\n\t}", "public static function test() {\r\n echo 'this is a test';\r\n }", "public function testExample()\n {\n $this->assertTrue(true);\n \n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n // lets make it risky to destroy the green\n }", "public function testBasicExample()\n\t{\n \t$response = $this->call('GET', '/');\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t}", "public function testExample()\n {\n $this->visit('ticket')\n ->see('Listado de Tickets')\n ->seeLink('Ver Ticket') \n ->visit('ticket/1')\n ->see('Quod et autem sed')\n ->seeLink('Ver todos los tickets')\n ->click('Ver todos los tickets')\n ->see('Listado de Tickets')\n ->seeLink('Agregar un ticket', 'ticket/crear');\n }", "function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Login to Airtel Sales Force System');\n });\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('API tester');\n }", "public function testExample()\n {\n $response = $this->get('/api/test/');\n\n $response->assertStatus(200);\n }", "public function testBasicExample()\n\t{\n\t\t$response = $this->call('GET', '/');\n\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t}", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('URL Notes');\n }", "public function testBasicTest()\n {\n $response = $this->get('/test');\n\n $response->assertStatus(200);\n\n $response->assertSeeText('小粽子');\n\n }", "function test_sampleme() {\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue( true );\n\t}", "public function testBasic()\n {\n $this->assertEquals(1, 1);\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/news/create')\n ->type('title', '123')\n ->type('text', 'test123')\n ->press('Добавить новость')\n\n ->assertSee('Мало букв в поле Заголовок');\n });\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('html');\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visitRoute('subscription', ['id' => '1'])\n ->radio('gender', 'L')\n ->type('fullName', 'GHF')\n ->type('birthdate', '04/24/1999')\n ->type('phone', '088177552')\n ->type('address', 'Bandung')\n ->press('Submit');\n });\n }", "public function testExample(): void\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->browse(function ($browser , $second) {\n $browser->visit('/')\n //->assertVueContains('name','sina','@editor');\n ->assertVue('name','sina','@editor');\n // ->pause(3000)\n // ->click('.test');\n // ->assertSee('Register')\n // ->value('#name' , 'sina')\n // ->value('#email' , Str::random(10).'@gmail.com')\n // ->value('#password' , '123456789')\n // ->value('#password-confirm' , '123456789')\n // ->click('button[type=\"submit\"]')\n // ->assertPathIs('/home')\n // ->refresh()\n // ->script('alert(\"ok\")');\n });\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->with('.special-text', function ($text) {\n $text->assertSee('title1');\n });\n\n // 確認商品數量\n $browser->click('.check_product')\n ->waitForDialog(5)\n ->assertDialogOpened('商品數量充足')\n ->acceptDialog();\n\n // 設定中斷點\n eval(\\Psy\\sh());\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(\"admin123@gilacoding.com\")\n ->visit(\"/home\");\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('React JS examples');\n });\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Laravel');\n });\n }", "public function testBasicExample()\n {\n $response = $this->call('GET', '/');\n\n $this->assertResponseOk();\n }", "public function test_example()\n {\n $this->assertTrue(true);\n }", "public function test_example()\n {\n $this->assertTrue(true);\n }", "public function test_example()\n {\n $this->assertTrue(true);\n }", "public function test_example()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->visit('/')\n ->see('WELCOME');\n }" ]
[ "0.7977854", "0.77753335", "0.76435244", "0.7610687", "0.754975", "0.75405073", "0.75393844", "0.74867696", "0.74400353", "0.7432722", "0.7412231", "0.73547494", "0.73383486", "0.7337478", "0.7308627", "0.7305436", "0.72681046", "0.7260569", "0.72460294", "0.7215908", "0.71952444", "0.7174572", "0.71719897", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7167066", "0.715222", "0.7132968", "0.7123071", "0.7119535", "0.70886546", "0.70870566", "0.70733815", "0.7068619", "0.7050562", "0.7045842", "0.7031207", "0.7030824", "0.7030337", "0.70302093", "0.70302093", "0.70302093", "0.70302093", "0.70291555" ]
0.7109628
86
Crea el modulo admin si es un proyecto modular y copia los archivos
public function initBackend() { try { $isModular = $this->_util->isModular(); $profile = $this->_loadProfile(self::NO_PROFILE_THROW_EXCEPTION); $moduleName = 'admin'; $modulesDirectory = $profile->search('modulesDirectory'); if ($isModular && !$modulesDirectory->search(array('moduleDirectory' => array('moduleName' => $moduleName)))) { $moduleResources = Zend_Tool_Project_Provider_Module::createResources($this->_loadedProfile, $moduleName); $enabledFilter = new Zend_Tool_Project_Profile_Iterator_EnabledResourceFilter($moduleResources); foreach (new RecursiveIteratorIterator($enabledFilter, RecursiveIteratorIterator::SELF_FIRST) as $resource) { $resource->create(); } //replace function $this->_storeProfile() $projectProfileFile = $this->_loadedProfile->search('ProjectProfileFile'); $projectProfileFile->getContext()->save(); //actualizamos el bootstrap by reflection $path = 'application' . DIRECTORY_SEPARATOR . 'Bootstrap.php'; $generator = Zend_CodeGenerator_Php_File::fromReflectedFileName($path); $class = $generator->getClass(); $method = new Zend_CodeGenerator_Php_Method(array( 'name' => '_initAutoloader' . ucfirst($moduleName), 'visibility' => 'protected', 'body' => '$autoloader = new Zend_Application_Module_Autoloader(array(' . "\n" . ' \'namespace\' => \'' . ucfirst($moduleName) . '_\',' . "\n" . ' \'basePath\' => dirname(__FILE__) . \'/modules/' . $moduleName . '\'));' . "\n" . 'return $autoloader;' . "\n" )); $class->setMethod($method); $file = new Zend_CodeGenerator_Php_File(); $file->setClass($class); file_put_contents('application' . DIRECTORY_SEPARATOR . 'Bootstrap.php', $file->generate()); } //copiamos lo directorios necesarios $this->_directory->enable($isModular); //creamos el login $this->_login->create(); //actualizamos el bootstrap $this->_updateBootstrap(); } catch (Exception $e) { throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n Console::clearScreenBeforeCursor();\n\n $moduleName = $this->prompt(\"Enter the name of the module you like to generate:\");\n\n $newName = preg_replace(\"/[^a-z]/\", \"\", strtolower($moduleName));\n\n if ($newName !== $moduleName) {\n if (!$this->confirm(\"We have changed the name to '{$newName}'. Do you want to proceed with this name?\")) {\n return $this->outputError('Abort by user.');\n } else {\n $moduleName = $newName;\n }\n }\n\n $appModulesFolder = Yii::$app->basePath . DIRECTORY_SEPARATOR . 'modules';\n $moduleFolder = $appModulesFolder . DIRECTORY_SEPARATOR . $moduleName;\n\n if (file_exists($moduleFolder)) {\n return $this->outputError(\"The folder \" . $moduleFolder . \" exists already.\");\n }\n\n $folders = [\n 'basePath' => $moduleFolder,\n 'adminPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin',\n 'adminAwsPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'aws',\n 'adminMigrationPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'migrations',\n 'frontendPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend',\n 'frontendBlocksPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'blocks',\n 'frontendControllersPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'controllers',\n 'frontendViewsPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'views',\n 'modelsPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'models',\n ];\n\n $ns = 'app\\\\modules\\\\'.$moduleName;\n\n foreach ($folders as $folder) {\n FileHelper::createDirectory($folder);\n }\n\n $contents = [\n $moduleFolder. DIRECTORY_SEPARATOR . 'README.md' => $this->renderReadme($folders, $moduleName, $ns),\n $moduleFolder. DIRECTORY_SEPARATOR . 'admin/Module.php' => $this->renderAdmin($folders, $moduleName, $ns),\n $moduleFolder. DIRECTORY_SEPARATOR . 'frontend/Module.php' => $this->renderFrontend($folders, $moduleName, $ns),\n ];\n\n foreach ($contents as $fileName => $content) {\n FileHelper::writeFile($fileName, $content);\n }\n\n return $this->outputSuccess(\"Module files has been created successfully. Check the README file to understand how to add the module to your config.\");\n }", "public function installModules()\n\t{\n\t$mainframe =& JFactory::getApplication();\n// \t$lang = JFactory::getLanguage(); \n// $languages = JLanguageHelper::getLanguages('lang_code');\n $db =& JFactory::getDBO();\n $query = $db->getQuery(true);\n $type = \"language\";\n $query->select('a.element');\n $query->from('#__extensions AS a');\n $type = $db->Quote($type);\n\t$query->where('(a.type = '.$type.')');\n\t$query->group('a.element');\n $db->setQuery($query);\n $langlist = $db->loadObjectList();\n \n echo 'Copy Administration Modules language(s) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br>';\n\t\t$src=JPATH_ADMINISTRATOR.DS.'components'.DS.'com_joomleague'.DS.'modules';\n\t\t$dest=JPATH_ADMINISTRATOR.DS.'modules';\n\t\t$modules = JFolder::folders($src);\n\t\t\n \t\tforeach ( $langlist as $key )\n {\n echo 'Copy Administration Modules language( '.$key->element.' ) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br>'; \n foreach ($modules as $module)\n\t\t{\n\t\tif ( JFolder::exists($src.DS.$module.DS.'language'.DS.$key->element) )\n\t\t{\n\t\t\tJFolder::copy($src.DS.$module.DS.'language'.DS.$key->element, JPATH_ADMINISTRATOR.DS.'language'.DS.$key->element, '', true);\n\t\techo ' - <span style=\"color:green\">'.JText::_('Success -> '.$module.' - '.$key->element).'</span><br />';\n }\n }\n\t\t}\n\n\t\t//echo ' - <span style=\"color:green\">'.JText::_('Success').'</span><br />';\n\t\techo 'Copy Administration Module(s)';\n\t\tJFolder::copy($src, $dest, '', true);\n\t\techo ' - <span style=\"color:green\">'.JText::_('Success').'</span><br />';\n//\t\techo 'Copy Site Module(s) language(s) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a>';\n\t\t$src=JPATH_SITE.DS.'components'.DS.'com_joomleague'.DS.'modules';\n\t\t$dest=JPATH_SITE.DS.'modules';\n\t\t$modules = JFolder::folders($src);\n\t\t\n\t\tforeach ( $langlist as $key )\n {\n echo 'Copy Site Module(s) language( '.$key->element.' ) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br>';\n foreach ($modules as $module)\n\t\t{\n\t\tif ( JFolder::exists($src.DS.$module.DS.'language'.DS.$key->element) )\n\t\t{\n\t\t\tJFolder::copy($src.DS.$module.DS.'language'.DS.$key->element, JPATH_SITE.DS.'language'.DS.$key->element, '', true);\n echo ' - <span style=\"color:green\">'.JText::_('Success -> '.$module.' - '.$key->element).'</span><br />';\n\t\t}\n }\n\t\t}\n\n\t\t//echo ' - <span style=\"color:green\">'.JText::_('Success').'</span><br />';\n\t\techo 'Copy Site Module(s)';\n\t\tJFolder::copy($src, $dest, '', true);\n\t\techo ' - <span style=\"color:green\">'.JText::_('Success').'</span><br />';\n \n /*\n $title = 'JL2 diddipoeler GitHub Commits Module';\n\t\t$tblModules = JTable::getInstance('module');\n\t\t$tblModules->load(array('title'=>$title));\n\t\t$tblModules->title\t\t\t= $title;\n\t\t$tblModules->module\t\t\t= 'mod_joomleague_github';\n\t\t$tblModules->position \t\t= 'cpanel';\n\t\t$tblModules->published \t\t= 1;\n\t\t$tblModules->client_id \t\t= 1;\n\t\t$tblModules->ordering \t\t= 1;\n\t\t$tblModules->access \t\t= 3;\n\t\t$tblModules->language \t\t= '*';\n\t\t$tblModules->publish_up\t\t= '2000-00-00 00:00:00';\n\t\t$tblModules->params \t\t= '{\"username\":\"diddipoeler\",\"repo\":\"joomleague-2-komplettpaket\",\"count\":15,\"relativeTime\":\"1\",\"layout\":\"_:default\",\"moduleclass_sfx\":\"\",\"cache\":\"1\",\"cache_time\":\"900\",\"cachemode\":\"static\"}';\n\n\t\tif (!$tblModules->store()) {\n\t\t\techo $tblModules->getError().'<br />';\n\t\t}\n\t\t$db = JFactory::getDBO();\n\t\t$query = 'INSERT INTO #__modules_menu (moduleid,menuid) VALUES ('.$tblModules->id.',0)';\n\t\t$db->setQuery($query);\n\t\tif (!$db->query())\n\t\t{\n\t\t\t//echo $db->getErrorMsg().'<br />';\n\t\t}\n\t\n\t\t// Initialise variables\n\t\t$conf = JFactory::getConfig();\n\t\t$dispatcher = JDispatcher::getInstance();\n\n\t\t$options = array(\n\t\t\t'defaultgroup' => ($tblModules->module) ? $tblModules->module : (isset($this->option) ? $this->option : JRequest::getCmd('option')),\n\t\t\t'cachebase' => ($tblModules->client_id) ? JPATH_ADMINISTRATOR . '/cache' : $conf->get('cache_path', JPATH_SITE . '/cache'));\n\n\t\t$cache = JCache::getInstance('callback', $options);\n\t\t$cache->clean();\n\n\t\t// Trigger the onContentCleanCache event.\n\t\t$dispatcher->trigger('onContentCleanCache', $options);\n */\n \n \n \n\t}", "public function createnewwebAction(){\n\t\t//$this->_appName = $this->getLine(\"please input the name for your project folder:\");\n\t\t$this->handleLocation();\n\t\t$this->copyweb(dirname(__FILE__).DIRECTORY_SEPARATOR.\"templateApp\".DIRECTORY_SEPARATOR,$this->_location);\n\t\t$this->setpermission();\n\t\t$this->ConfigWeb();\n\t\techo \" web installed successfully\\n\";\n\t}", "private function appCopy()\n {\n global $boot;\n\n $boot->eol(1);\n $boot->echo('Adding Project: ' . $this->newName);\n\n foreach ($this->data as $n => $data) {\n $path = $this->rootDir . $data->generatePath;\n $boot->mkdir($path);\n $file = $this->rootDir . $data->generate;\n $content = '';\n\n if (!empty($data->templatePath)) {\n $content = file_get_contents($this->rootDir . $data->templatePath . $data->template);\n\n if (!empty($data->replace)) {\n $content = strtr($content, $data->replace);\n }\n file_put_contents($file, $content);\n }\n\n// $t = 1;\n\n if ($data->dirOnly && $data->sourceDir) {\n ZFileHelper::copyDirectory($this->rootDir . $data->sourceDir, $path);\n\n $source_path = ZFileHelper::findFiles($path);\n if (!empty($data->replace)) {\n foreach ($source_path as $inner_path) {\n $content = file_get_contents($inner_path);\n $content = strtr($content, $data->replace);\n file_put_contents($inner_path, $content);\n }\n }\n\n /*if (!$data->affectFileToo)\n continue;*/\n\n\n }\n\n }\n }", "public function addAdminAssets() {}", "public function initFromEasyAdmin() {\n $read_path = app_path() . '/EasyAdmin/';\n $write_path = app_path() . '/EasyApi/';\n\n $files = scandir($read_path);\n\n\n foreach($files as $file) {\n if (pathinfo($file, PATHINFO_EXTENSION) === 'php') {\n $file_contents = file_get_contents($read_path . $file) or die(\"Unable to open file!\");\n $write_contents = str_replace('EasyAdmin', 'EasyApi', $file_contents);\n $write_contents = str_replace(\"'create'\", \" //'create'\", $write_contents);\n $write_contents = str_replace(\"'update'\", \" //'update'\", $write_contents);\n $write_contents = str_replace(\"'delete'\", \" //'delete'\", $write_contents);\n $write_contents = str_replace(\"\\n 'seed'\", \"\", $write_contents);\n if (!file_exists($write_path)) mkdir($write_path, 0777, true);\n file_put_contents($write_path . $file, $write_contents) or die(\"Unable to write to file!\");\n }\n }\n }", "function createBaseFiles( $moduleManager ) \n {\n \n $templatePath = $this->values[ ModuleCreator::KEY_PATH_RAD_ROOT ] . 'data/';\n $modulePath = $this->values[ ModuleCreator::KEY_PATH_MODULE_ROOT ];\n \n $moduleName = $moduleManager->getModuleName();\n \n // get app_Module template and save in new Module\n $appFileName = $templatePath.ModuleCreator::FILE_APP_MODULE;\n $appFileContents = file_get_contents( $appFileName );\n if ($appFileContents) {\n \n $appFileContents = $this->replaceCommonTags( $appFileContents );\n \n // Replace Module Description\n $tagModuleDesc = ModuleCreator::TAG_MODULE_DESCRIPTION;\n $moduleDesc = $moduleManager->getModuleDescription();\n $appFileContents = str_replace($tagModuleDesc, $moduleDesc, $appFileContents );\n \n \n // Check for is common look and fill in options\n if ($moduleManager->isCommonLook()) {\n \n $clObjectCreation = ' /** protected $pageCommonDisplay [OBJECT] The display object for the common page layout. */\n protected $pageCommonDisplay;' . \"\\n\\n\".ModuleCreator::TAG_MODULE_OBJECT_VAR;\n $clObjectLoading = ' // load the common page layout object\n $this->pageCommonDisplay = new CommonDisplay( $this->modulePathRoot, $this->pathToRoot, $this->viewer);' ; //.\"\\n\\n\".ModuleCreator::TAG_MODULE_OBJECT_LOAD;\n $clObjectDisplay = ' // wrap current page\\'s html in the common html of the module\n $content = $this->pageCommonDisplay->getHTML( $content );';\n \n } else {\n \n $clObjectCreation = ModuleCreator::TAG_MODULE_OBJECT_VAR;\n $clObjectLoading = ModuleCreator::TAG_MODULE_OBJECT_LOAD;\n $clObjectDisplay = '';\n \n }\n \n // Replace Common Look Object Declaration\n $tagCreationObject = ModuleCreator::TAG_MODULE_OBJECT_VAR;\n $appFileContents = str_replace($tagCreationObject, $clObjectCreation, $appFileContents );\n \n // Replace Common Look Object creation\n $tagObjectLoad = ModuleCreator::TAG_MODULE_OBJECT_LOAD;\n $appFileContents = str_replace($tagObjectLoad, $clObjectLoading, $appFileContents );\n \n // Replace Common Look HTML wrapping\n $tagCommonHTML = ModuleCreator::TAG_MODULE_COMMON_HTML;\n $appFileContents = str_replace($tagCommonHTML, $clObjectDisplay, $appFileContents );\n \n \n $name = $this->values[ ModuleCreator::KEY_PATH_APP_NAME ];\n file_put_contents( $name, $appFileContents);\n \n } else {\n \n echo \"Couldn't Open [\".$appFileName.\"]<br>\";\n exit;\n }\n \n \n /*\n * Create Include File\n */\n $inclFileName = $templatePath.ModuleCreator::FILE_INCL_MODULE;\n $inclFileContents = file_get_contents( $inclFileName );\n if ($inclFileContents) {\n \n $inclFileContents = $this->replaceCommonTags( $inclFileContents );\n \n // if module shares a CommonLook then\n if ($moduleManager->isCommonLook()) {\n \n $clInclude = '// Common Display Object:\n// ----------------------\n// This object provides a common layout for the pages in this module. The \n// related templated file is stored in /'.ModuleCreator::PATH_TEMPLATES.'obj_CommonDisplay.php\nrequire_once( \\''.ModuleCreator::PATH_OBJECT_BL.'obj_CommonDisplay.php\\');';\n \n } else {\n \n $clInclude = '';\n \n }\n \n // Replace CommonDisplay Tag\n $tagCommonDisplay = ModuleCreator::TAG_INCLUDE_COMMON;\n $inclFileContents = str_replace($tagCommonDisplay, $clInclude, $inclFileContents );\n \n $name = $this->values[ ModuleCreator::KEY_PATH_INCLUDE_NAME ];\n file_put_contents( $name, $inclFileContents);\n \n } else {\n \n echo \"Couldn't Open [\".$inclFileName.\"]<br>\";\n exit;\n } \n \n \n \n /*\n * Now if Module uses a Common Look, then add CommonDisplay \n * objects.\n */\n // if module shares a CommonLook then\n if ($moduleManager->isCommonLook()) {\n \n \n /*\n * Create CommonDisplay Object\n */\n $cdFileName = $templatePath.ModuleCreator::PATH_OBJECT_BL.ModuleCreator::FILE_COMMON_OBJ;\n $cdFileContents = file_get_contents( $cdFileName );\n if ($cdFileContents) {\n \n $cdFileContents = $this->replaceCommonTags( $cdFileContents );\n \n $name = $modulePath.ModuleCreator::PATH_OBJECT_BL.'obj_CommonDisplay.php';\n file_put_contents( $name, $cdFileContents);\n \n\n } else {\n echo \"Couldn't Open [\".$cdFileName.\"]<br>\";\n exit;\n } \n \n \n /*\n * Create CommonDisplay Template\n */\n $cdtFileName = $templatePath.ModuleCreator::PATH_TEMPLATES.ModuleCreator::FILE_COMMON_OBJ;\n $cdtFileContents = file_get_contents( $cdtFileName );\n if ($cdtFileContents) {\n \n $cdtFileContents = $this->replaceCommonTags( $cdtFileContents );\n \n $name = $modulePath.ModuleCreator::PATH_TEMPLATES.'obj_CommonDisplay.php';\n file_put_contents( $name, $cdtFileContents);\n \n\n } else {\n echo \"Couldn't Open [\".$cdtFileName.\"]<br>\";\n exit;\n }\n \n \n } // end if common look\n \n \n /*\n * Create Tool_Setup File\n */\n $toolFileName = $templatePath.ModuleCreator::FILE_TOOL_SETUP;\n $toolFileContents = file_get_contents( $toolFileName );\n if ($toolFileContents) {\n \n $toolFileContents = $this->replaceCommonTags( $toolFileContents);\n \n // Replace Module Root Path\n $tagModuleRootPath = ModuleCreator::TAG_PATH_MODULE_ROOT;\n $path = ModuleCreator::PATH_MODULE_ROOT;\n $toolFileContents = str_replace($tagModuleRootPath, $path, $toolFileContents );\n \n $preName = 'app_';\n if ($moduleManager->isCore() ) {\n $preName = '';\n }\n \n $tag = ModuleCreator::TAG_TOOL_CORE_PRE;\n $toolFileContents = str_replace($tag, $preName, $toolFileContents );\n \n \n // if module shares a CommonLook then\n if ($moduleManager->isCommonLook()) {\n\n $clInclude = '// Create CommonDisplay labels \n $labelManager->addPage( CommonDisplay::MULTILINGUAL_PAGE_KEY );\n/*\n //\n // Use this section to create your common page label information:\n //\n $labelManager->addLabel( \"[Title]\", \"Title\", \"en\" );\n $labelManager->addLabel( \"[Instr]\", \"Instructions\", \"en\" );\n*/';\n $clInclude .= \"\\n\\n\\n\".ModuleCreator::TAG_TOOL_PAGE_LABEL; \n \n } else {\n \n $clInclude = ModuleCreator::TAG_TOOL_PAGE_LABEL;\n \n }\n \n // Replace CommonDisplay Tag\n $tagPageLabel = ModuleCreator::TAG_TOOL_PAGE_LABEL;\n $toolFileContents = str_replace($tagPageLabel, $clInclude, $toolFileContents );\n \n $name = $this->values[ ModuleCreator::KEY_PATH_SETUP_NAME ];\n file_put_contents( $name, $toolFileContents);\n \n \n } else {\n \n echo \"Couldn't Open [\".$toolFileName.\"]<br>\";\n exit;\n } \n \n \n \n \n \n \n \n //////////////////\n //////////////////\n \n \n \n \n /*\n * Create db_backup.sh File\n */\n $dbFileName = $templatePath.ModuleCreator::FILE_DB_BACKUP;\n $dbFileContents = file_get_contents( $dbFileName );\n if ($dbFileContents) {\n \n $dbFileContents = $this->replaceCommonTags( $dbFileContents);\n \n // Replace [USERID] tag\n $tagUserID = '[USERID]';\n $user = SITE_DB_USER;\n $dbFileContents = str_replace($tagUserID, $user, $dbFileContents );\n \n \n // Replace [DATABASE] tag\n $tagDatabase = '[DATABASE]';\n $dbName = SITE_DB_NAME;\n $dbFileContents = str_replace($tagDatabase, $dbName, $dbFileContents );\n \n \n $moduleID = $moduleManager->getModuleID();\n $daObjList = new DAObjList( $moduleID );\n \n $nameList = '';\n \n $daObjList->setFirst();\n while( $daObj = $daObjList->getNext() ) {\n \n $nameList .= $daObj->getDBTableName().' ';\n }\n \n // Replace [TABLELIST] tag\n $tagTableList = '[TABLELIST]';\n $dbFileContents = str_replace($tagTableList, $nameList, $dbFileContents );\n \n $name = $this->values[ ModuleCreator::KEY_PATH_MODULE_ROOT ].'db_backup.sh';\n file_put_contents( $name, $dbFileContents);\n \n \n } else {\n \n echo \"Couldn't Open [\".$dbFileName.\"]<br>\";\n exit;\n } \n \n \n }", "function NaviModule() {\n $dir = BASE_DIR . \"/modules/\";\n $modules = array();\n\n $sql = $GLOBALS['db']->Query(\"SELECT ModulName,ModulPfad FROM \" . PREFIX . \"_module WHERE Status = '1' ORDER BY ModulName ASC\");\n while($row = $sql->fetchrow()) {\n $modul['AdminEdit'] = 0;\n if(!include($dir . $row->ModulPfad . \"/modul.php\")) {\n echo \"Ошибка доступа к файлам модуля \" . $row->ModulPfad . \"<br />\";\n } elseif (($modul['AdminEdit'] == 1) && cp_perm('mod_' . $row->ModulPfad)) {\n array_push($modules, $row);\n }\n }\n $GLOBALS['tmpl']->assign('modules', $modules);\n}", "function Create($name, $description, $create_folders = true)\n\t{\n\t\trequire_once('RC_Format.php');\n\t\tglobal $wpdb;\n\t\t\n\t\t$special_chars = array (' ','`','\"','\\'','\\\\','/',\" \",\"#\",\"$\",\"%\",\"^\",\"&\",\"*\",\"!\",\"~\",\"‘\",\"\\\"\",\"’\",\"'\",\"=\",\"?\",\"/\",\"[\",\"]\",\"(\",\")\",\"|\",\"<\",\">\",\";\",\"\\\\\",\",\");\n\t\t$name = str_replace($special_chars,'',$name);\n\n\t\t//Make sure the module doesn't already exist\n\t\t$sql = \"SELECT * FROM \" . RC_CWP_TABLE_MODULES .\n\t\t\t\" WHERE name = '\" . $name . \"'\";\n\t\tif ($wpdb->get_row($sql))\treturn -1;\n\n\t\t$sql = sprintf(\n\t\t\t\"INSERT INTO \" . RC_CWP_TABLE_MODULES .\n\t\t\t\" (name, description)\" .\n\t\t\t\" values\" .\n\t\t\t\" (%s, %s)\", \n\t\t\tRC_Format::TextToSql($name),\n\t\t\tRC_Format::TextToSql($description)\n\t\t);\n\t\t\t\n\t\t$wpdb->query($sql);\n\n\t\tFlutterLayoutBlock::UpdateAllModulesSettings();\n\t\t$customWriteModuleId = $wpdb->insert_id;\n\n\t\tif ($create_folders == false)\n\t\t\treturn $customWriteModuleId;\n\n\t\t// Create template folder\n\t\t$moduleTemplateFolder = dirname(__FILE__).\"/modules/\".$name;\n\t\tif (@mkdir($moduleTemplateFolder, 0777)){\n\t\t\t@chmod($moduleTemplateFolder, 0777);\n\t\t\tif (mkdir($moduleTemplateFolder.'/templates', 0777)){\n\t\t\t\t@chmod($moduleTemplateFolder.'/templates', 0777);\n\t\t\t\tif (mkdir($moduleTemplateFolder.'/templates/default', 0777)){\t\n\t\t\t\t\t@chmod($moduleTemplateFolder.'/templates/default', 0777);\n\t\t\t\t\tRCCWP_CustomWriteModule::CreateTemplateFiles($moduleTemplateFolder.'/templates/default/small', $name);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Create basic configuration file \n\t\t\t$configurationFileContent = \n<<<EOF\n\t<?xml version=\"1.0\"?>\n\t<canvas>\n\t\t<function>\n\t\t\t<author>\n\t\t\tFlutter\n\t\t\t</author>\n\t\t\t<description>\n\t\t\tThis is module $name.\n\t\t\t</description>\n\t\t\t<variables>\n\t\t\t\t<variable>\n\t\t\t\t\t<name>\n\t\t\t\t\tthe_text\n\t\t\t\t\t</name>\n\t\t\t\t\t<description>\n\t\t\t\t\tText to display (HTML allowed)\n\t\t\t\t\t</description>\n\t\t\t\t\t<type>\n\t\t\t\t\tTextarea\n\t\t\t\t\t</type>\n\t\t\t\t\t<default>\n\t\t\t\t\t<![CDATA[<p>This is some text generated by $name module. </p>]]>\n\t\t\t\t\t</default>\n\t\t\t\t</variable>\n\t\t\t</variables>\n\t\t</function>\n\t</canvas>\nEOF;\n\n\t\n\t\t\tfile_put_contents ($moduleTemplateFolder.\"/configure.xml\", $configurationFileContent);\t\n\t\t\t@chmod($moduleTemplateFolder.\"/configure.xml\", 0666);\n\t\t}\n\t\t\n\t\treturn $customWriteModuleId;\n\t}", "function Tareas_admin_new()\n{\n\tif (!SecurityUtil::checkPermission('Tareas::', '::', ACCESS_ADMIN)) {\n\t\treturn LogUtil::registerPermissionError();\n\t}\n \t//Lenguaje\n\t$dom = ZLanguage::getModuleDomain('Tareas');\n\t\n\t// Obtener todas las variables del modulo\n\t$modvars = pnModGetVar('Tareas');\n\t\n\t$prioridades = explode(\"/\", $modvars['prioridad']);\n\t$estados \t = explode(\"/\", $modvars['estado']);\n\t\n\t// Construimos y devolvemos la Vista\n\t$render = & pnRender::getInstance('Tareas');\n\t//Pasamos variables a plantilla\n\t$render->assign('prioridades', $prioridades);\n\t$render->assign('estados', $estados);\n\n\treturn $render->fetch('Tareas_admin_new.htm');\n \n}", "static function crear( toba_modelo_instancia $instancia, $nombre, $usuarios_a_vincular , $dir_inst_proyecto=null)\n\t{\n\t\t//- 1 - Controles\n\t\t$dir_template = toba_dir() . self::template_proyecto;\n\t\tif ( $nombre == 'toba' ) {\n\t\t\tthrow new toba_error(\"INSTALACIÓN: No es posible crear un proyecto con el nombre 'toba'\");\n\t\t}\n\t\tif ( self::existe( $nombre ) ) {\n\t\t\ttoba_logger::instancia()->error(\"INSTALACIÓN: Ya existe una carpeta con el nombre '$nombre' en la carpeta 'proyectos'\");\n\t\t\tthrow new toba_error(\"INSTALACIÓN: Ya existe una carpeta con el nombre especificado en la carpeta 'proyectos'\");\n\t\t}\n\t\ttry {\n\n\t\t\t//- 2 - Modificaciones en el sistema de archivos\n\t\t\t$dir_proyecto = (is_null($dir_inst_proyecto)) ? $instancia->get_path_proyecto($nombre): $dir_inst_proyecto;\n\t\t\t$url_proyecto = $instancia->get_url_proyecto($nombre);\n\n\t\t\t// Creo la CARPETA del PROYECTO\n\t\t\t$excepciones = array();\n\t\t\t$excepciones[] = $dir_template.'/www/aplicacion.produccion.php';\n\t\t\ttoba_manejador_archivos::copiar_directorio( $dir_template, $dir_proyecto, $excepciones);\n\n\t\t\t// Modifico los archivos\n\t\t\t$editor = new toba_editor_archivos();\n\t\t\t$editor->agregar_sustitucion( '|__proyecto__|', $nombre );\n\t\t\t$editor->agregar_sustitucion( '|__instancia__|', $instancia->get_id() );\n\t\t\t$editor->agregar_sustitucion( '|__toba_dir__|', toba_manejador_archivos::path_a_unix( toba_dir() ) );\n\t\t\t$editor->agregar_sustitucion( '|__version__|', '1.0.0');\n\t\t\t$editor->procesar_archivo( $dir_proyecto . '/www/aplicacion.php' );\n\n\t\t\t$modelo = $dir_proyecto . '/php/extension_toba/modelo.php';\n\t\t\t$comando = $dir_proyecto . '/php/extension_toba/comando.php';\n\t\t\t$editor->procesar_archivo($comando);\n\t\t\t$editor->procesar_archivo($modelo);\n\t\t\t$editor->procesar_archivo($dir_proyecto.'/www/rest.php');\n\t\t\t$editor->procesar_archivo($dir_proyecto.'/www/servicios.php');\n\n\t\t\trename($modelo, str_replace('modelo.php', $nombre.'_modelo.php', $modelo));\n\t\t\trename($comando, str_replace('comando.php', $nombre.'_comando.php', $comando));\n\t\t\t$ini = $dir_proyecto.'/proyecto.ini';\n\t\t\t$editor->procesar_archivo($ini);\n\n\t\t\t// Asocio el proyecto a la instancia\n\t\t\t$instancia->vincular_proyecto( $nombre, $dir_inst_proyecto, $url_proyecto);\n\n\t\t\t//- 3 - Modificaciones en la BASE de datos\n\t\t\t$db = $instancia->get_db();\n\t\t\ttry {\n\t\t\t\t$db->abrir_transaccion();\n\t\t\t\t$db->retrasar_constraints();\n\t\t\t\t$db->ejecutar( self::get_sql_metadatos_basicos( $nombre ) );\n\t\t\t\t$sql_version = self::get_sql_actualizar_version( toba_modelo_instalacion::get_version_actual(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$nombre);\n\t\t\t\t$db->ejecutar($sql_version);\n\t\t\t\tforeach( $usuarios_a_vincular as $usuario ) {\n\t\t\t\t\tself::do_vincular_usuario($db, $nombre, $usuario, array('admin'));\n\t\t\t\t}\n\t\t\t\t$db->cerrar_transaccion();\n\t\t\t} catch ( toba_error $e ) {\n\t\t\t\t$db->abortar_transaccion();\n\t\t\t\t$txt = 'PROYECTO : Ha ocurrido un error durante la carga de METADATOS del PROYECTO. DETALLE: ';\n\t\t\t\ttoba_logger::instancia()->error($txt . $e->getMessage());\n\t\t\t\tthrow new toba_error( $txt );\n\t\t\t}\n\t\t} catch ( toba_error $e ) {\n\t\t\t// Borro la carpeta creada\n\t\t\tif ( is_dir( $dir_proyecto ) ) {\n\t\t\t\t$instancia->desvincular_proyecto( $nombre );\n\t\t\t\ttoba_manejador_archivos::eliminar_directorio( $dir_proyecto );\n\t\t\t}\n\t\t\tthrow $e;\n\t\t}\n\t}", "function bit_admin_page() {\n\t//Creates admin page\n}", "public function run()\n {\n $modules = [\n [\n 'name' => 'Роли',\n 'slug' => 'organization_roles',\n 'is_default' => true,\n 'permissions' => [\n [\n 'name' => 'control',\n 'label' => 'Настройка',\n ]\n ]\n ],\n [\n 'name' => 'Новости',\n 'slug' => 'news',\n 'is_default' => false,\n 'permissions' => [\n [\n 'name' => 'create_news',\n 'label' => 'Создание'\n ],\n [\n 'name' => 'publish_news',\n 'label' => 'Публикация'\n ],\n ],\n ],\n [\n 'name' => 'Мероприятия',\n 'slug' => 'events',\n 'is_default' => false,\n 'permissions' => [\n [\n 'name' => 'create_event',\n 'label' => 'Создание'\n ],\n [\n 'name' => 'publish_event',\n 'label' => 'Публикация'\n ],\n [\n 'name' => 'check_event_applications',\n 'label' => 'Обработка заявок'\n ],\n ],\n ],\n [\n 'name' => 'Вакансии',\n 'slug' => 'vacancies',\n 'is_default' => false,\n 'permissions' => [\n [\n 'name' => 'create_vacancy',\n 'label' => 'Создание'\n ],\n [\n 'name' => 'publish_vacancy',\n 'label' => 'Публикация'\n ],\n [\n 'name' => 'check_vacancy_applications',\n 'label' => 'Обработка заявок'\n ],\n ],\n ],\n [\n 'name' => 'Программы',\n 'slug' => 'programs',\n 'is_default' => false,\n 'permissions' => [\n [\n 'name' => 'create_program',\n 'label' => 'Создание'\n ],\n [\n 'name' => 'publish_program',\n 'label' => 'Публикация'\n ],\n [\n 'name' => 'check_program_applications',\n 'label' => 'Обработка заявок'\n ],\n ],\n ],\n [\n 'name' => 'Корпоративные инновации',\n 'slug' => 'corp_innovation',\n 'is_default' => false,\n 'permissions' => [\n [\n 'name' => 'check_crop_innovation_applications',\n 'label' => 'Обработка заявок'\n ],\n ]\n ],\n [\n 'name' => 'HubSpace',\n 'slug' => 'hub_space',\n 'is_default' => false,\n 'permissions' => [\n [\n 'name' => 'check_hub_space_applications',\n 'label' => 'Обработка заявок'\n ]\n ],\n ],\n [\n 'name' => 'R&D центры',\n 'slug' => 'r_and_d',\n 'is_default' => false,\n 'permissions' => [\n [\n 'name' => 'check_r_and_d_applications',\n 'label' => 'Обработка заявок'\n ]\n ]\n ],\n [\n 'name' => 'База знаний',\n 'slug' => 'resources',\n 'is_default' => false,\n 'permissions' => [\n [\n 'name' => 'Добавление, изменение и удаление',\n 'label' => 'curd',\n ]\n ]\n ],\n [\n 'name' => 'Smart Store',\n 'slug' => 'smart_store',\n 'is_default' => false,\n 'permissions' => [\n [\n 'name' => 'smart_store_curd',\n 'label' => 'Обработка заявок',\n ]\n ]\n ],\n [\n 'name' => 'Smart store отправка задачи',\n 'slug' => 'smart_store_send_problem',\n 'is_default' => false,\n 'permissions' => []\n ],\n [\n 'name' => 'Smart store отправка решении',\n 'slug' => 'smart_store_send_solution',\n 'is_default' => false,\n 'permissions' => []\n ],\n [\n 'name' => 'Технологические лаборатории',\n 'slug' => 'teh_laboratories',\n 'is_default' => false,\n 'permissions' => [\n [\n 'name' => 'teh_laboratories_crud',\n 'label' => 'Добавление, изменение и удаление'\n ]\n ],\n ],\n [\n 'name' => 'Гранты',\n 'slug' => 'grants',\n 'is_default' => false,\n 'permissions' => [\n [\n 'name' => 'grants_control',\n 'label' => 'Управление',\n ]\n ]\n ],\n [\n 'name' => 'Участники AstanaHub',\n 'slug' => 'astanahub_members',\n 'is_default' => false,\n 'permissions' => [\n [\n 'name' => 'astana_hub_members_control',\n 'label' => 'Участники AstanaHub'\n ]\n ]\n ],\n ];\n\n foreach ($modules as $module) {\n $m = \\App\\Module::where('slug', $module['slug'])->first();\n if (!$m) {\n $m = \\App\\Module::create([\n 'slug' => $module['slug'],\n 'name' => $module['name'],\n 'is_default' => $module['is_default'],\n ]);\n }\n foreach ($module['permissions'] as $permission) {\n $p = $m->permissions()->where('name', $permission['name'])->first();\n if (!$p) {\n $p = $m->permissions()->create([\n 'name' => $permission['name'],\n 'label' => $permission['label']\n ]);\n }\n }\n }\n }", "private function insertCloneFolder()\n {\n global $boot;\n $coreIP = $boot->env('coreIP');\n\n if (file_exists($this->rootDir . \"/inserts/$this->oldName\")) ZFileHelper::copyDirectory($this->rootDir . \"/inserts/$this->oldName\", $this->rootDir . \"/inserts/$this->newName\");\n\n $sub_dirs = glob($this->rootDir . \"/inserts/$this->newName/*\");\n\n foreach ($sub_dirs as $dir) {\n if ($dir !== null && is_file($dir)) {\n $content = file_get_contents($dir);\n $replace = [\n $this->oldName => $this->newName\n ];\n $content = strtr($content, $replace);\n file_put_contents($dir, $content);\n }\n }\n\n $newdb = $this->dbname;\n $data = require $this->rootDir . '/configs/data/' . $this->oldName . '.php';\n $source = $data['components']['db']['dbName'];\n\n $file = $this->rootDir . '/configs/data/' . $this->newName . '.php';\n $file_content = file_get_contents($file);\n $replace = [\n $source => $newdb\n ];\n\n $content = strtr($file_content, $replace);\n file_put_contents($file, $content);\n\n }", "public function run()\n {\n\n $root = new Role;\n $root->name = 'root';\n $root->display_name = 'Súper Administrador';\n $root->description = 'Visualiza todos los módulos de la plataforma.';\n $root->save();\n\n $security_module = new \\Logistic\\Module;\n $security_module->name = 'security';\n $security_module->save();\n $cutomers_module = new \\Logistic\\Module;\n $cutomers_module->name = 'customers';\n $cutomers_module->save();\n $purchase_module = new \\Logistic\\Module;\n $purchase_module->name = 'purchases';\n $purchase_module->save();\n\n $submodule_module = new \\Logistic\\Submodule;\n $submodule_module->name = 'modules';\n $submodule_module->module_id = $security_module->id;\n $submodule_module->save();\n\n $submodule_submodules = new \\Logistic\\Submodule;\n $submodule_submodules->name = 'submodules';\n $submodule_submodules->module_id = $security_module->id;\n $submodule_submodules->save();\n\n $submodule_users = new \\Logistic\\Submodule;\n $submodule_users->name = 'users';\n $submodule_users->module_id = $security_module->id;\n $submodule_users->save();\n\n $submodule_roles = new \\Logistic\\Submodule;\n $submodule_roles->name = 'roles';\n $submodule_roles->module_id = $security_module->id;\n $submodule_roles->save();\n\n $submodule_permissions = new \\Logistic\\Submodule;\n $submodule_permissions->name = 'permissions';\n $submodule_permissions->module_id = $security_module->id;\n $submodule_permissions->save();\n\n $submodule_companies = new \\Logistic\\Submodule;\n $submodule_companies->name = 'companies';\n $submodule_companies->module_id = $cutomers_module->id;\n $submodule_companies->save();\n\n $submodule_business_unities = new \\Logistic\\Submodule;\n $submodule_business_unities->name = 'business_unities';\n $submodule_business_unities->module_id = $cutomers_module->id;\n $submodule_business_unities->save();\n\n $submodule_products = new \\Logistic\\Submodule;\n $submodule_products->name = 'products';\n $submodule_products->module_id = $cutomers_module->id;\n $submodule_products->save();\n\n $submodule_purchase_order = new \\Logistic\\Submodule;\n $submodule_purchase_order->name = 'purchase_order';\n $submodule_purchase_order->module_id = $purchase_module->id;\n $submodule_purchase_order->save();\n\n\n $permissions = [\n\n 'modules' => [\n [\n 'name' => 'view-module',\n 'display_name' => 'Visualizar Módulo',\n 'description' => 'Permite visualizar los módulos de la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_module->id,\n ],\n [\n 'name' => 'create-module',\n 'display_name' => 'Crear Módulo',\n 'description' => 'Permite crear módulos en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_module->id,\n ],\n [\n 'name' => 'edit-module',\n 'display_name' => 'Editar Módulo',\n 'description' => 'Permite editar módulos en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_module->id,\n ],\n [\n 'name' => 'delete-module',\n 'display_name' => 'Eliminar Módulo',\n 'description' => 'Permite eliminar módulos en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_module->id,\n ],\n [\n 'name' => 'restore-module',\n 'display_name' => 'Restaurar Módulo',\n 'description' => 'Permite restaurar módulos eliminados en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_module->id,\n ],\n ],\n 'submodules' => [\n [\n 'name' => 'view-submodule',\n 'display_name' => 'Visualizar Submódulo',\n 'description' => 'Permite visualizar los submódulos de la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_submodules->id\n ],\n [\n 'name' => 'create-submodule',\n 'display_name' => 'Crear Submódulo',\n 'description' => 'Permite crear submódulos en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_submodules->id\n ],\n [\n 'name' => 'edit-submodule',\n 'display_name' => 'Editar Submódulo',\n 'description' => 'Permite editar submódulos en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_submodules->id\n ],\n [\n 'name' => 'delete-submodule',\n 'display_name' => 'Eliminar Submódulo',\n 'description' => 'Permite eliminar submódulos en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_submodules->id\n ],\n [\n 'name' => 'restore-submodule',\n 'display_name' => 'Restaurar Submódulo',\n 'description' => 'Permite restaurar submódulos eliminados en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_submodules->id\n ],\n [\n 'name' => 'attach-roles',\n 'display_name' => 'Asignar Roles',\n 'description' => 'Permite asignar roles a los usuarios de la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_submodules->id\n ],\n ],\n 'users' => [\n [\n 'name' => 'view-users',\n 'display_name' => 'Visualizar Usuarios',\n 'description' => 'Permite visualizar los usuarios de la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_users->id\n ],\n [\n 'name' => 'create-users',\n 'display_name' => 'Crear Usuarios',\n 'description' => 'Permite crear usuarios en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_users->id\n ],\n [\n 'name' => 'edit-users',\n 'display_name' => 'Editar Usuarios',\n 'description' => 'Permite editar usuarios en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_users->id\n ],\n [\n 'name' => 'delete-users',\n 'display_name' => 'Eliminar Usuarios',\n 'description' => 'Permite eliminar usuarios en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_users->id\n ],\n [\n 'name' => 'restore-users',\n 'display_name' => 'Restaurar Usuarios',\n 'description' => 'Permite restaurar usuarios eliminados en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_users->id\n ],\n ],\n 'roles' => [\n [\n 'name' => 'view-roles',\n 'display_name' => 'Visualizar Roles',\n 'description' => 'Permite visualizar los roles de la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_roles->id\n ],\n [\n 'name' => 'create-roles',\n 'display_name' => 'Crear Roles',\n 'description' => 'Permite crear roles en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_roles->id\n ],\n [\n 'name' => 'edit-roles',\n 'display_name' => 'Editar Roles',\n 'description' => 'Permite editar roles en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_roles->id\n ],\n [\n 'name' => 'delete-roles',\n 'display_name' => 'Eliminar Roles',\n 'description' => 'Permite eliminar roles en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_roles->id\n ],\n [\n 'name' => 'restore-roles',\n 'display_name' => 'Restaurar Roles',\n 'description' => 'Permite restaurar roles eliminados en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_roles->id\n ],\n [\n 'name' => 'attach-permissions',\n 'display_name' => 'Asignar Permisos',\n 'description' => 'Permite asignar permisos a los roles de la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_roles->id\n ],\n ],\n 'permissions' => [\n [\n 'name' => 'view-permissions',\n 'display_name' => 'Visualizar Permisos',\n 'description' => 'Permite visualizar los permisos de la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_permissions->id\n ],\n [\n 'name' => 'create-permissions',\n 'display_name' => 'Crear Permisos',\n 'description' => 'Permite crear permisos en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_permissions->id\n ],\n [\n 'name' => 'edit-permissions',\n 'display_name' => 'Editar Permisos',\n 'description' => 'Permite editar permisos en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_permissions->id\n ],\n [\n 'name' => 'delete-permissions',\n 'display_name' => 'Eliminar Permisos',\n 'description' => 'Permite eliminar permisos en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_permissions->id\n ],\n [\n 'name' => 'restore-permissions',\n 'display_name' => 'Restaurar Permisos',\n 'description' => 'Permite restaurar permisos eliminados en la aplicación.',\n 'module_id' => $security_module->id,\n 'submodule_id' => $submodule_permissions->id\n ],\n ],\n\n 'companies' => [\n [\n 'name' => 'view-companies',\n 'display_name' => 'Visualizar Compañías',\n 'description' => 'Permite visualizar las compañías de la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_companies->id\n ],\n [\n 'name' => 'create-companies',\n 'display_name' => 'Crear Compañías',\n 'description' => 'Permite crear compañías en la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_companies->id\n ],\n [\n 'name' => 'edit-companies',\n 'display_name' => 'Editar Compañías',\n 'description' => 'Permite editar compañías en la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_companies->id\n ],\n [\n 'name' => 'delete-companies',\n 'display_name' => 'Eliminar Compañías',\n 'description' => 'Permite eliminar compañías en la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_companies->id\n ],\n [\n 'name' => 'restore-companies',\n 'display_name' => 'Restaurar Compañías',\n 'description' => 'Permite restaurar compañías eliminados en la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_companies->id\n ],\n ],\n 'business-unities' => [\n [\n 'name' => 'view-business-unities',\n 'display_name' => 'Visualizar Unidades de Negocio',\n 'description' => 'Permite visualizar las unidades de negocio de la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_business_unities->id,\n ],\n [\n 'name' => 'create-business-unities',\n 'display_name' => 'Crear Unidades de Negocio',\n 'description' => 'Permite crear unidades de negocio en la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_business_unities->id,\n ],\n [\n 'name' => 'edit-business-unities',\n 'display_name' => 'Editar Unidades de Negocio',\n 'description' => 'Permite editar unidades de negocio en la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_business_unities->id,\n ],\n [\n 'name' => 'delete-business-unities',\n 'display_name' => 'Eliminar Unidades de Negocio',\n 'description' => 'Permite eliminar unidades de negocio en la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_business_unities->id,\n ],\n [\n 'name' => 'restore-business-unities',\n 'display_name' => 'Restaurar Unidades de Negocio',\n 'description' => 'Permite restaurar unidades de negocio eliminados en la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_business_unities->id,\n ],\n ],\n 'products' => [\n [\n 'name' => 'view-products',\n 'display_name' => 'Visualizar Productos',\n 'description' => 'Permite visualizar los productos de la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_products->id\n ],\n [\n 'name' => 'create-products',\n 'display_name' => 'Crear Productos',\n 'description' => 'Permite crear productos en la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_products->id\n ],\n [\n 'name' => 'edit-products',\n 'display_name' => 'Editar Productos',\n 'description' => 'Permite editar productos en la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_products->id\n ],\n [\n 'name' => 'delete-products',\n 'display_name' => 'Eliminar Productos',\n 'description' => 'Permite eliminar productos en la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_products->id\n ],\n [\n 'name' => 'restore-products',\n 'display_name' => 'Restaurar Productos',\n 'description' => 'Permite restaurar productos eliminados en la aplicación.',\n 'module_id' => $cutomers_module->id,\n 'submodule_id' => $submodule_products->id\n ],\n ],\n\n 'purchase-order' => [\n [\n 'name' => 'view-purchase-order',\n 'display_name' => 'Visualizar Ordenes de Compra',\n 'description' => 'Permite visualizar las ordenes de compra de la aplicación.',\n 'module_id' => $purchase_module->id,\n 'submodule_id' => $submodule_purchase_order->id\n ],\n [\n 'name' => 'create-purchase-order',\n 'display_name' => 'Crear Ordenes de Compra',\n 'description' => 'Permite crear ordenes de compra en la aplicación.',\n 'module_id' => $purchase_module->id,\n 'submodule_id' => $submodule_purchase_order->id\n ],\n [\n 'name' => 'edit-purchase-order',\n 'display_name' => 'Editar Ordenes de Compra',\n 'description' => 'Permite editar ordenes de compra en la aplicación.',\n 'module_id' => $purchase_module->id,\n 'submodule_id' => $submodule_purchase_order->id\n ],\n [\n 'name' => 'delete-purchase-order',\n 'display_name' => 'Eliminar Ordenes de Compra',\n 'description' => 'Permite eliminar ordenes de compra en la aplicación.',\n 'module_id' => $purchase_module->id,\n 'submodule_id' => $submodule_purchase_order->id\n ],\n [\n 'name' => 'restore-purchase-order',\n 'display_name' => 'Restaurar Ordenes de Compra',\n 'description' => 'Permite restaurar ordenes de compra eliminados en la aplicación.',\n 'module_id' => $purchase_module->id,\n 'submodule_id' => $submodule_purchase_order->id\n ],\n ],\n ];\n $modules = [\n [\n 'name' => 'view-security-module',\n 'display_name' => 'Módulo de seguridad',\n 'description' => 'Visualizar el módulo de seguridad',\n 'module_id' => $security_module->id\n ],\n [\n 'name' => 'view-customers-module',\n 'display_name' => 'Módulo de clientes',\n 'description' => 'Visualizar el módulo de clientes',\n 'module_id' => $cutomers_module->id\n ],\n [\n 'name' => 'view-purchase-module',\n 'display_name' => 'Módulo de compras',\n 'description' => 'Visualizar el módulo de compras',\n 'module_id' => $purchase_module->id\n ],\n ];\n\n $security = new Permission;\n $security->fill( $modules[0] );\n $security->save();\n\n $customers = new Permission;\n $customers->fill( $modules[1] );\n $customers->save();\n\n $purchase = new Permission;\n $purchase->fill( $modules[2] );\n $purchase->save();\n\n $modules_view = new Permission;\n $modules_view->fill($permissions['modules'][0]);\n $modules_view->save();\n $modules_create = new Permission;\n $modules_create->fill($permissions['modules'][1]);\n $modules_create->save();\n $modules_edit = new Permission;\n $modules_edit->fill($permissions['modules'][2]);\n $modules_edit->save();\n $modules_delete = new Permission;\n $modules_delete->fill($permissions['modules'][3]);\n $modules_delete->save();\n $modules_restore = new Permission;\n $modules_restore->fill($permissions['modules'][4]);\n $modules_restore->save();\n\n $submodules_view = new Permission;\n $submodules_view->fill($permissions['submodules'][0]);\n $submodules_view->save();\n $submodules_create = new Permission;\n $submodules_create->fill($permissions['submodules'][1]);\n $submodules_create->save();\n $submodules_edit = new Permission;\n $submodules_edit->fill($permissions['submodules'][2]);\n $submodules_edit->save();\n $submodules_delete = new Permission;\n $submodules_delete->fill($permissions['submodules'][3]);\n $submodules_delete->save();\n $submodules_restore = new Permission;\n $submodules_restore->fill($permissions['submodules'][4]);\n $submodules_restore->save();\n\n $users_view = new Permission;\n $users_view->fill($permissions['users'][0]);\n $users_view->save();\n $users_create = new Permission;\n $users_create->fill($permissions['users'][1]);\n $users_create->save();\n $users_edit = new Permission;\n $users_edit->fill($permissions['users'][2]);\n $users_edit->save();\n $users_delete = new Permission;\n $users_delete->fill($permissions['users'][3]);\n $users_delete->save();\n $users_restore = new Permission;\n $users_restore->fill($permissions['users'][4]);\n $users_restore->save();\n\n $roles_view = new Permission;\n $roles_view->fill($permissions['roles'][0]);\n $roles_view->save();\n $roles_create = new Permission;\n $roles_create->fill($permissions['roles'][1]);\n $roles_create->save();\n $roles_edit = new Permission;\n $roles_edit->fill($permissions['roles'][2]);\n $roles_edit->save();\n $roles_delete = new Permission;\n $roles_delete->fill($permissions['roles'][3]);\n $roles_delete->save();\n $roles_restore = new Permission;\n $roles_restore->fill($permissions['roles'][4]);\n $roles_restore->save();\n\n $permissions_module_view = new Permission;\n $permissions_module_view->fill($permissions['permissions'][0]);\n $permissions_module_view->save();\n $permissions_module_create = new Permission;\n $permissions_module_create->fill($permissions['permissions'][1]);\n $permissions_module_create->save();\n $permissions_module_edit = new Permission;\n $permissions_module_edit->fill($permissions['permissions'][2]);\n $permissions_module_edit->save();\n $permissions_module_delete = new Permission;\n $permissions_module_delete->fill($permissions['permissions'][3]);\n $permissions_module_delete->save();\n $permissions_module_restore = new Permission;\n $permissions_module_restore->fill($permissions['permissions'][4]);\n $permissions_module_restore->save();\n\n $companies_view = new Permission;\n $companies_view->fill($permissions['companies'][0]);\n $companies_view->save();\n $companies_create = new Permission;\n $companies_create->fill($permissions['companies'][1]);\n $companies_create->save();\n $companies_edit = new Permission;\n $companies_edit->fill($permissions['companies'][2]);\n $companies_edit->save();\n $companies_delete = new Permission;\n $companies_delete->fill($permissions['companies'][3]);\n $companies_delete->save();\n $companies_restore = new Permission;\n $companies_restore->fill($permissions['companies'][4]);\n $companies_restore->save();\n\n $business_unities_view = new Permission;\n $business_unities_view->fill($permissions['business-unities'][0]);\n $business_unities_view->save();\n $business_unities_create = new Permission;\n $business_unities_create->fill($permissions['business-unities'][1]);\n $business_unities_create->save();\n $business_unities_edit = new Permission;\n $business_unities_edit->fill($permissions['business-unities'][2]);\n $business_unities_edit->save();\n $business_unities_delete = new Permission;\n $business_unities_delete->fill($permissions['business-unities'][3]);\n $business_unities_delete->save();\n $business_unities_restore = new Permission;\n $business_unities_restore->fill($permissions['business-unities'][4]);\n $business_unities_restore->save();\n\n $products_view = new Permission;\n $products_view->fill($permissions['products'][0]);\n $products_view->save();\n $products_create = new Permission;\n $products_create->fill($permissions['products'][1]);\n $products_create->save();\n $products_edit = new Permission;\n $products_edit->fill($permissions['products'][2]);\n $products_edit->save();\n $products_delete = new Permission;\n $products_delete->fill($permissions['products'][3]);\n $products_delete->save();\n $products_restore = new Permission;\n $products_restore->fill($permissions['products'][4]);\n $products_restore->save();\n\n $purchase_order_view = new Permission;\n $purchase_order_view->fill($permissions['purchase-order'][0]);\n $purchase_order_view->save();\n $purchase_order_create = new Permission;\n $purchase_order_create->fill($permissions['purchase-order'][1]);\n $purchase_order_create->save();\n $purchase_order_edit = new Permission;\n $purchase_order_edit->fill($permissions['purchase-order'][2]);\n $purchase_order_edit->save();\n $purchase_order_delete = new Permission;\n $purchase_order_delete->fill($permissions['purchase-order'][3]);\n $purchase_order_delete->save();\n $purchase_order_restore = new Permission;\n $purchase_order_restore->fill($permissions['purchase-order'][4]);\n $purchase_order_restore->save();\n\n $root_permissions = [\n //Modules\n $security,\n $customers,\n $purchase,\n //Submodules\n $modules_view,\n $modules_create,\n $modules_edit,\n $modules_delete,\n $modules_restore,\n $submodules_view,\n $submodules_create,\n $submodules_edit,\n $submodules_delete,\n $submodules_restore,\n $users_view,\n $users_create,\n $users_edit,\n $users_delete,\n $users_restore,\n $roles_view,\n $roles_create,\n $roles_edit,\n $roles_delete,\n $roles_restore,\n $permissions_module_view,\n $permissions_module_create,\n $permissions_module_edit,\n $permissions_module_delete,\n $permissions_module_restore,\n $companies_view,\n $companies_create,\n $companies_edit,\n $companies_delete,\n $companies_restore,\n $business_unities_view,\n $business_unities_create,\n $business_unities_edit,\n $business_unities_delete,\n $business_unities_restore,\n $products_view,\n $products_create,\n $products_edit,\n $products_delete,\n $products_restore,\n $purchase_order_view,\n $purchase_order_create,\n $purchase_order_edit,\n $purchase_order_delete,\n $purchase_order_restore,\n ];\n\n $root->attachPermissions( $root_permissions );\n\n factory( \\Logistic\\User::class )->create([\n 'email' => 'root@app.com',\n 'company_id' => \\Logistic\\Company::query()->first(['id'])->id\n ])->attachRole($root);\n }", "function sed_mafiran_add_modules( $modules ){\n\n global $sed_pb_modules;\n\n $module_name = \"themes/mafiran/site-editor/modules/posts/posts.php\";\n $modules[$module_name] = $sed_pb_modules->get_module_data(get_stylesheet_directory() . '/site-editor/modules/posts/posts.php', true, true);\n\n $module_name = \"themes/mafiran/site-editor/modules/mafiran-products/mafiran-products.php\";\n $modules[$module_name] = $sed_pb_modules->get_module_data(get_stylesheet_directory() . '/site-editor/modules/mafiran-products/mafiran-products.php', true, true);\n \n return $modules;\n\n}", "function anuncios_admin() {\n\t\tinclude('anuncios_admin.php');\n\t}", "public function install() {\n\t\t$this->load->model( 'user/user_group' );\n\t\t// access - modify pavomenu edit\n\t\t$this->model_user_user_group->addPermission( $this->user->getId(), 'access', 'extension/module/pavomenu/menu' );\n\t\t$this->model_user_user_group->addPermission( $this->user->getId(), 'modify', 'extension/module/pavomenu/menu' );\n\t\t// END ADD USER PERMISSION\n\n\t\t// CREATE TABLES\n\t\t// menu\n\t\t$this->db->query(\"\n\t\t\tCREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"pavomenu` (\n\t\t\t\t`menu_id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t`uniqid_id` varchar(255) DEFAULT NULL,\n\t\t\t\t`name` varchar(255) DEFAULT NULL\n\t\t\t\tPRIMARY KEY (`menu_id`)\n\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;\n\t\t\");\n\t\t$this->db->query(\"\n\t\t\tCREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"pavomenu_item` (\n\t\t\t\t`menu_item_id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t`menu_parent_id` int(11) NULL,\n\t\t\t\t`uniqid_id` varchar(255) DEFAULT NULL,\n\t\t\t\t`name` varchar(255) DEFAULT NULL\n\t\t\t\tPRIMARY KEY (`menu_id`)\n\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;\n\t\t\");\n\t\t// DEFAULT OPTIONS\n\n\t}", "function admin_add() {\n\t\tif (!empty($this->data)) {\n\t\t\t$this->Project->create();\n\t\t\t$status = $this->Project->saveAll($this->data);\n\t\t\tif ($status) {\n\t\t\t\t$name = Set::classicExtract($this->data, 'Upload.0.file.name');\n\t\t\t\tif(empty($name)){\n\t\t\t\t\t$this->Session->setFlash(__('The project has been saved', true));\n\t\t\t\t\t$this->redirect(array('action'=>'dashboard', $this->Project->getLastInsertId()));\n\t\t\t\t}else{\n\t\t\t\t\t$this->redirect(array(\n\t\t\t\t\t\t'action' => 'add_members', \n\t\t\t\t\t\t'admin' => true, \n\t\t\t\t\t\t$this->Project->getLastInsertId(),\n\t\t\t\t\t\t$this->Project->Upload->getLastInsertId()\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The project could not be saved. Please, try again.', true));\n\t\t\t}\n\t\t}else{\n\t\t\t//make it so that the person who's creating is one of the admin by default.\n\t\t\t$this->data['Admin']['Admin'] = array($this->Auth->user('id'));\n\t\t}\n\t\t$admins = $this->Project->Admin->find('list');\n\t\t\n\t\t\n\t\t$this->set(compact('admins'));\n\t}", "public function cloneAction()\n {\n $form = new ModuleForm('install');\n $this->view()->assign('form', $form);\n if ($this->request->isPost()) {\n $post = $this->request->getPost();\n $form->setData($post);\n $form->setInputFilter(new ModuleFilter);\n if ($form->isValid()) {\n $values = $form->getData();\n return array(\n 'status' => 1,\n 'data' => $values,\n );\n }\n\n $messages = $form->getMessages();\n $message = array();\n foreach ($messages as $key => $msg) {\n $message[$key] = array_values($msg);\n }\n return array(\n 'status' => 0,\n 'message' => $message,\n );\n } else {\n $directory = _get('directory');\n $meta = Pi::service('module')->loadMeta($directory, 'meta');\n $form->setData(array(\n 'directory' => $directory,\n 'name' => $directory,\n 'title' => $meta['title'],\n ));\n }\n $form->setAttribute(\n 'action',\n $this->url('', array('action' => 'clone'))\n );\n $this->view()->assign('title', __('Module installation'));\n $this->view()->setTemplate('system:component/form-popup');\n }", "function ShowAddModule()\n {\n $jbModule = new Block($this->Core, \"jbModule\") ;\n \n //Nom\n $tbName = new TextBox(\"tbNameModule\");\n $tbName->PlaceHolder = $this->Core->GetCode(\"Name\");\n $jbModule->AddNew($tbName);\n \n //Action\n $action = new AjaxAction(\"Ide\",\"AddModule\");\n $action->AddArgument(\"App\", \"Ide\");\n $action->AddArgument(\"Projet\", Request::GetPost(\"Projet\"));\n $action->ChangedControl = \"jbModule\";\n $action->AddControl($tbName->Id);\n \n //Bouton de sauvegarde\n $btnCreate = new Button(BUTTON);\n $btnCreate->CssClass = \"btn btn-primary\";\n $btnCreate->Value = $this->Core->GetCode(\"Save\");\n $btnCreate->OnClick = $action;\n $jbModule->AddNew($btnCreate);\n \n return $jbModule->Show();\n }", "public function run()\n {\n $oldModules=DB::table('adm_teises')->distinct('module')->get();\n foreach ($oldModules as $oldModule)\n {\n $alreadyExists=Permission::where('name',$oldModule->module)->first();\n if(empty($alreadyExists))\n {\n $modulePermision = Permission::create(['guard_name' => 'admin', 'name' => $oldModule->module]);\n\n }\n }\n }", "public function executeCopy()\n {\n $role = RolePeer::retrieveByPk($this->getRequestParameter('id'));\n $this->forward404Unless($role);\n\n try\n {\n $role2 = new Role();\n \n $role2->setCod('change');\n $role2->setXml($role->getXml());\n $role2->setDisplay($role->getDisplay());\n \n $langs = sfConfig::get('app_lang_array', array('es'));\n foreach($langs as $lang){\n\t$role->setCulture($lang);\n\t$role2->setCulture($lang);\n\t$role2->setName($role->getName());\n\t$role2->setText($role->getText());\n }\n \n $this->msg_alert = array('info', $this->getContext()->getI18N()->__(\"Rol copiado\"));\n $role2->save();\n }\n catch (Exception $e){\n $this->msg_alert = array('error', $this->getContext()->getI18N()->__(\"Código del rol repetido\"));\n };\n\n\n return $this->renderComponent('roles', 'list');\n }", "function install($data='') {\r\n @umask(0);\r\n if (!Is_Dir(ROOT.\"./cms/products/\")) {\r\n mkdir(ROOT.\"./cms/products/\", 0777);\r\n }\r\n parent::install();\r\n }", "function aman_create_page() {\n\trequire_once(get_template_directory() . '/inc/templates/aman-admin.php');\n}", "function addAdminMenu()\n\t{\n\t\tglobal $tpl, $tree, $rbacsystem, $lng;\n\n\t\tinclude_once(\"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$gl = new ilGroupedListGUI();\n\n\t\t$objects = $tree->getChilds(SYSTEM_FOLDER_ID);\n\t\tforeach($objects as $object)\n\t\t{\n\t\t\t$new_objects[$object[\"title\"].\":\".$object[\"child\"]]\n\t\t\t\t= $object;\n\t\t\t//have to set it manually as translation type of main node cannot be \"sys\" as this type is a orgu itself.\n\t\t\tif($object[\"type\"] == \"orgu\")\n\t\t\t\t$new_objects[$object[\"title\"].\":\".$object[\"child\"]][\"title\"] = $lng->txt(\"obj_orgu\");\n\t\t}\n\n\t\t// add entry for switching to repository admin\n\t\t// note: please see showChilds methods which prevents infinite look\n\t\t$new_objects[$lng->txt(\"repository_admin\").\":\".ROOT_FOLDER_ID] =\n\t\t\tarray(\n\t\t\t\t\"tree\" => 1,\n\t\t\t\t\"child\" => ROOT_FOLDER_ID,\n\t\t\t\t\"ref_id\" => ROOT_FOLDER_ID,\n\t\t\t\t\"depth\" => 3,\n\t\t\t\t\"type\" => \"root\",\n\t\t\t\t\"title\" => $lng->txt(\"repository_admin\"),\n\t\t\t\t\"description\" => $lng->txt(\"repository_admin_desc\"),\n\t\t\t\t\"desc\" => $lng->txt(\"repository_admin_desc\"),\n\t\t\t);\n\n//$nd = $tree->getNodeData(SYSTEM_FOLDER_ID);\n//var_dump($nd);\n\t\t$new_objects[$lng->txt(\"general_settings\").\":\".SYSTEM_FOLDER_ID] =\n\t\t\tarray(\n\t\t\t\t\"tree\" => 1,\n\t\t\t\t\"child\" => SYSTEM_FOLDER_ID,\n\t\t\t\t\"ref_id\" => SYSTEM_FOLDER_ID,\n\t\t\t\t\"depth\" => 2,\n\t\t\t\t\"type\" => \"adm\",\n\t\t\t\t\"title\" => $lng->txt(\"general_settings\"),\n\t\t\t);\n\t\tksort($new_objects);\n\n\t\t// determine items to show\n\t\t$items = array();\n\t\tforeach ($new_objects as $c)\n\t\t{\n\t\t\t// check visibility\n\t\t\tif ($tree->getParentId($c[\"ref_id\"]) == ROOT_FOLDER_ID && $c[\"type\"] != \"adm\" &&\n\t\t\t\t$_GET[\"admin_mode\"] != \"repository\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// these objects may exist due to test cases that didnt clear\n\t\t\t// data properly\n\t\t\tif ($c[\"type\"] == \"\" || $c[\"type\"] == \"objf\" ||\n\t\t\t\t$c[\"type\"] == \"xxx\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$accessible = $rbacsystem->checkAccess('visible,read', $c[\"ref_id\"]);\n\t\t\tif (!$accessible)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($c[\"ref_id\"] == ROOT_FOLDER_ID &&\n\t\t\t\t!$rbacsystem->checkAccess('write', $c[\"ref_id\"]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($c[\"type\"] == \"rolf\" && $c[\"ref_id\"] != ROLE_FOLDER_ID)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$items[] = $c;\n\t\t}\n\n\t\t$titems = array();\n\t\tforeach ($items as $i)\n\t\t{\n\t\t\t$titems[$i[\"type\"]] = $i;\n\t\t}\n\t\t// admin menu layout\n\t\t$layout = array(\n\t\t\t1 => array(\n\t\t\t\t\"adn\" =>\n\t\t\t\t\tarray(\"xaad\", \"xaec\",\"xaed\", \"xaes\", \"xaep\", \"xacp\", \"xata\", \"xamd\", \"xast\"),\n\t\t\t\t\"basic\" =>\n\t\t\t\t\tarray(\"adm\", \"stys\", \"adve\", \"lngf\", \"hlps\", \"accs\", \"cmps\", \"extt\"),\n\t\t\t\t\"user_administration\" =>\n\t\t\t\t\tarray(\"usrf\", 'tos', \"rolf\", \"auth\", \"ps\", \"orgu\"),\n\t\t\t\t\"learning_outcomes\" =>\n\t\t\t\t\tarray(\"skmg\", \"cert\", \"trac\")\n\t\t\t),\n\t\t\t2 => array(\n\t\t\t\t\"user_services\" =>\n\t\t\t\t\tarray(\"pdts\", \"prfa\", \"nwss\", \"awra\", \"cadm\", \"cals\", \"mail\"),\n\t\t\t\t\"content_services\" =>\n\t\t\t\t\tarray(\"seas\", \"mds\", \"tags\", \"taxs\", 'ecss', \"pays\", \"otpl\"),\n\t\t\t\t\"maintenance\" =>\n\t\t\t\t\tarray('sysc', \"recf\", 'logs', \"root\")\n\t\t\t),\n\t\t\t3 => array(\n\t\t\t\t\"container\" =>\n\t\t\t\t\tarray(\"reps\", \"crss\", \"grps\", \"prgs\"),\n\t\t\t\t\"content_objects\" =>\n\t\t\t\t\tarray(\"bibs\", \"blga\", \"chta\", \"excs\", \"facs\", \"frma\",\n\t\t\t\t\t\t\"lrss\", \"mcts\", \"mobs\", \"svyf\", \"assf\", \"wbrs\", \"wiks\")\n\t\t\t)\n\t\t);\n\n\t\t// now get all items and groups that are accessible\n\t\t$groups = array();\n\t\tfor ($i = 1; $i <= 3; $i++)\n\t\t{\n\t\t\t$groups[$i] = array();\n\t\t\tforeach ($layout[$i] as $group => $entries)\n\t\t\t{\n\t\t\t\t$groups[$i][$group] = array();\n\t\t\t\t$entries_since_last_sep = false;\n\t\t\t\tforeach ($entries as $e)\n\t\t\t\t{\n\t\t\t\t\tif ($e == \"---\" || $titems[$e][\"type\"] != \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($e == \"---\" && $entries_since_last_sep)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[$i][$group][] = $e;\n\t\t\t\t\t\t\t$entries_since_last_sep = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($e != \"---\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[$i][$group][] = $e;\n\t\t\t\t\t\t\t$entries_since_last_sep = true;\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\n\t\tinclude_once(\"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$gl = new ilGroupedListGUI();\n\n\t\tfor ($i = 1; $i <= 3; $i++)\n\t\t{\n\t\t\tif ($i > 1)\n\t\t\t{\n//\t\t\t\t$gl->nextColumn();\n\t\t\t}\n\t\t\tforeach ($groups[$i] as $group => $entries)\n\t\t\t{\n\t\t\t\tif (count($entries) > 0)\n\t\t\t\t{\n\t\t\t\t\t$gl->addGroupHeader($lng->txt(\"adm_\".$group));\n\n\t\t\t\t\tforeach ($entries as $e)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($e == \"---\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$gl->addSeparator();\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$path = ilObject::_getIcon(\"\", \"tiny\", $titems[$e][\"type\"]);\n\t\t\t\t\t\t\t$icon = ($path != \"\")\n\t\t\t\t\t\t\t\t? ilUtil::img($path).\" \"\n\t\t\t\t\t\t\t\t: \"\";\n\n\t\t\t\t\t\t\tif ($_GET[\"admin_mode\"] == \"settings\" && $titems[$e][\"ref_id\"] == ROOT_FOLDER_ID)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$gl->addEntry($icon.$titems[$e][\"title\"],\n\t\t\t\t\t\t\t\t\t\"ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=\".\n\t\t\t\t\t\t\t\t\t$titems[$e][\"ref_id\"].\"&amp;admin_mode=repository\",\n\t\t\t\t\t\t\t\t\t\"_top\", \"\", \"\", \"mm_adm_rep\",\n\t\t\t\t\t\t\t\t\tilHelp::getMainMenuTooltip(\"mm_adm_rep\"),\n\t\t\t\t\t\t\t\t\t\"bottom center\", \"top center\", false);\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$gl->addEntry($icon.$titems[$e][\"title\"],\n\t\t\t\t\t\t\t\t\t\"ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=\".\n\t\t\t\t\t\t\t\t\t$titems[$e][\"ref_id\"].\"&amp;cmd=jump\",\n\t\t\t\t\t\t\t\t\t\"_top\", \"\", \"\", \"mm_adm_\".$titems[$e][\"type\"],\n\t\t\t\t\t\t\t\t\tilHelp::getMainMenuTooltip(\"mm_adm_\".$titems[$e][\"type\"]),\n\t\t\t\t\t\t\t\t\t\"bottom center\", \"top center\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//$gl->addSeparator();\n\n\t\t$tpl->setLeftNavContent(\"<div id='adn_adm_side_menu'>\".$gl->getHTML().\"</div>\");\n\t}", "public function copyFiles() {\n\n $customAction = File::get(__DIR__.'/../Services/stub/config/customAction.php.stub');\n\n $dbexporter = File::get(__DIR__.'/../Services/stub/config/dbexporter.php.stub');\n\n $pathCustom = config_path().'/customAction.php';\n\n $pathDbExporter = config_path().'/dbexporter.php';\n\n $this->createFile($pathCustom,$customAction);\n\n $this->createFile($pathDbExporter,$dbexporter);\n\n }", "public function run()\n {\n Perfile::create([\n 'nombre_perfil' => 'Administrador',\n 'descripcion' => 'admin del sistema | control total',\n 'habilitado' => true,\n 'activo' => true \n ]);\n }", "public function register_admin_menu(){\r\n $all_modules = HW_TGM_Module_Activation::get_register_modules();\r\n $module = $this->_option('module');\r\n $name = $module->module_name;\r\n $label = isset($all_modules[$name])? $all_modules[$name]['name'] : $name;\r\n\r\n $this->add_help_content(self::load_settings_page_hook_slug(HW_Module_Settings_page::PAGE_SLUG) ,$name , $label);\r\n }", "public function indexAdmin()\n {\n $nodos = $this->mdlnodo->consultarnodos();\n require APP . 'view/_templates/headeradminodos.php';\n require APP . 'view/proyecto/admin/index.php';\n\t\t require APP . 'view/_footer/footeradminnodos.php';\n }", "public function install() {\n $strReturn = \"\";\n\n $strReturn .= \"Creating picture upload folder\\n\";\n if(!is_dir(_realpath_._filespath_.\"/images/upload\"))\n mkdir(_realpath_._filespath_.\"/images/upload\", 0777, true);\n\n $strReturn .= \"Creating new picture repository\\n\";\n $objRepo = new class_module_mediamanager_repo();\n\n if($this->strContentLanguage == \"de\")\n $objRepo->setStrTitle(\"Hochgeladene Bilder\");\n else\n $objRepo->setStrTitle(\"Picture uploads\");\n\n $objRepo->setStrPath(_filespath_.\"/images/upload\");\n $objRepo->setStrUploadFilter(\".jpg,.png,.gif,.jpeg\");\n $objRepo->setStrViewFilter(\".jpg,.png,.gif,.jpeg\");\n $objRepo->updateObjectToDb();\n $objRepo->syncRepo();\n\n $strReturn .= \"ID of new repo: \".$objRepo->getSystemid().\"\\n\";\n\n $strReturn .= \"Setting the repository as the default images repository\\n\";\n $objSetting = class_module_system_setting::getConfigByName(\"_mediamanager_default_imagesrepoid_\");\n $objSetting->setStrValue($objRepo->getSystemid());\n $objSetting->updateObjectToDb();\n\n $strReturn .= \"Creating file upload folder\\n\";\n if(!is_dir(_realpath_._filespath_.\"/public\"))\n mkdir(_realpath_._filespath_.\"/public\", 0777, true);\n\n $strReturn .= \"Creating new file repository\\n\";\n $objRepo = new class_module_mediamanager_repo();\n\n if($this->strContentLanguage == \"de\")\n $objRepo->setStrTitle(\"Hochgeladene Dateien\");\n else\n $objRepo->setStrTitle(\"File uploads\");\n\n $objRepo->setStrPath(_filespath_.\"/downloads\");\n $objRepo->setStrUploadFilter(\".zip,.pdf,.txt\");\n $objRepo->setStrViewFilter(\".zip,.pdf,.txt\");\n $objRepo->updateObjectToDb();\n $objRepo->syncRepo();\n $strReturn .= \"ID of new repo: \".$objRepo->getSystemid().\"\\n\";\n\n $strReturn .= \"Setting the repository as the default files repository\\n\";\n $objSetting = class_module_system_setting::getConfigByName(\"_mediamanager_default_filesrepoid_\");\n $objSetting->setStrValue($objRepo->getSystemid());\n $objSetting->updateObjectToDb();\n\n\n return $strReturn;\n }", "function createModule() \n {\n // load Module manager\n $moduleID = $this->values[ ModuleCreator::KEY_MODULE_ID ];\n $moduleManager = new RowManager_ModuleManager( $moduleID );\n \n $this->storeCommonVariables( $moduleManager );\n \n \n // if Module manager is not created then\n if (!$moduleManager->isCreated()) {\n \n // create Module Directory\n $directoryName = '';\n if ( !$moduleManager->isCore() ) {\n $directoryName = 'app_';\n }\n $directoryName .= $moduleManager->getModuleName();\n $this->createDirectory( $directoryName );\n \n // Create Base Files\n $this->createBaseFiles( $moduleManager );\n \n // update created status\n $moduleManager->setCreated();\n \n } else {\n \n // make sure variable info is updated\n \n }// end if\n \n \n // process StateVar info\n $this->processStateVarInfo( $moduleID );\n \n // process Data Access Object info\n $this->processDataAccessObjectInfo( $moduleID );\n \n // process Page Object info\n $this->processPageInfo( $moduleID );\n \n // process Page Transitions (form) info\n $this->processTransition( $moduleID );\n \n \n }", "function add_new_perm()\n\t{\n\t\t$this->ipsclass->input['new_perm_name'] = trim($this->ipsclass->input['new_perm_name']);\n\n\t\tif ($this->ipsclass->input['new_perm_name'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Необходимо ввести имя\");\n\t\t}\n\n\t\t$copy_id = $this->ipsclass->input['new_perm_copy'];\n\n\t\t//-----------------------------------------\n\t\t// UPDATE DB\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->do_insert( 'forum_perms', array( 'perm_name' => $this->ipsclass->input['new_perm_name'] ) );\n\n\t\t$new_id = $this->ipsclass->DB->get_insert_id();\n\n\t\tif ( $copy_id != 'none' )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Add new mask to forum accesses\n\t\t\t//-----------------------------------------\n\n\t\t\t$old_id = intval($copy_id);\n\n\t\t\tif ( ($new_id > 0) and ($old_id > 0) )\n\t\t\t{\n\t\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'id, permission_array', 'from' => 'forums' ) );\n\t\t\t\t$get = $this->ipsclass->DB->simple_exec();\n\n\t\t\t\twhile( $f = $this->ipsclass->DB->fetch_row($get) )\n\t\t\t\t{\n\t\t\t\t\t$d_str = \"\";\n\t\t\t\t\t$d_arr = unserialize(stripslashes( $f['permission_array'] ) );\n\n\t\t\t\t\t$perms = unserialize(stripslashes( $f['permission_array'] ) );\n\n\t\t\t\t\tforeach( array( 'read_perms', 'reply_perms', 'start_perms', 'upload_perms', 'show_perms', 'download_perms' ) as $perm_bit )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $perms[ $perm_bit ] != '*')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( preg_match( \"/(^|,)\".$old_id.\"(,|$)/\", $perms[ $perm_bit ]) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$d_arr[ $perm_bit ] = $this->clean_perms( $perms[ $perm_bit ] ) . \",\".$new_id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Do we have anything to save?\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\tif ( count($d_arr) > 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$string = addslashes(serialize( $d_arr ) );\n\n\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t// Sure?..\n\t\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\t\tif ( strlen($string) > 5)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->ipsclass->DB->do_update( 'forums', array( 'permission_array' => $string ), 'id='.$f['id'] );\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\n\t\t//-----------------------------------------\n\t\t// Recache forums\n\t\t//-----------------------------------------\n\n\t\trequire_once( ROOT_PATH.'sources/action_admin/forums.php' );\n\t\t$ad_forums = new ad_forums();\n\t\t$ad_forums->ipsclass =& $this->ipsclass;\n\t\t$ad_forums->recache_forums();\n\n\t\t$this->ipsclass->main_msg = \"Маска доступа «{$this->ipsclass->input['new_perm_name']}» добавлена.\";\n\t\t$this->permsplash();\n\t}", "public static function wpide_create_new() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n\t\t//setup wp_filesystem api\r\n\t\tglobal $wp_filesystem;\r\n $url = wp_nonce_url('admin.php?page=wpide','plugin-name-action_wpidenonce');\r\n $form_fields = null; // for now, but at some point the login info should be passed in here\r\n if (false === ($creds = request_filesystem_credentials($url, FS_METHOD, false, false, $form_fields) ) ) {\r\n // no credentials yet, just produced a form for the user to fill in\r\n return true; // stop the normal page form from displaying\r\n }\r\n\t\tif ( ! WP_Filesystem($creds) ) \r\n\t\t return false;\r\n\t\t\r\n\t $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ); \r\n \r\n\t\t//check all required vars are passed\r\n\t\tif (strlen($_POST['path'])>0 && strlen($_POST['type'])>0 && strlen($_POST['file'])>0){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$filename = sanitize_file_name( $_POST['file'] );\r\n\t\t\t$path = $_POST['path'];\r\n\t\t\t\r\n\t\t\tif ($_POST['type'] == \"directory\"){\r\n\t\t\t\t\r\n\t\t\t\t$write_result = $wp_filesystem->mkdir($root . $path . $filename, FS_CHMOD_DIR);\r\n\t\t\t\t\r\n\t\t\t\tif ($write_result){\r\n\t\t\t\t\tdie(\"1\"); //created\r\n\t\t\t\t}else{\r\n\t\t\t\t\techo \"Problem creating directory\" . $root . $path . $filename;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else if ($_POST['type'] == \"file\"){\r\n\t\t\t\t\r\n //write the file\r\n\t\t\t\t$write_result = $wp_filesystem->put_contents(\r\n\t\t\t\t\t$root . $path . $filename,\r\n\t\t\t\t\t'',\r\n\t\t\t\t\tFS_CHMOD_FILE // predefined mode settings for WP files\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\tif ($write_result){\r\n\t\t\t\t\tdie(\"1\"); //created\r\n\t\t\t\t}else{\r\n\t\t\t\t\techo \"Problem creating file \" . $root . $path . $filename;\r\n\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\r\n\t\t\t//print_r($_POST);\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t}\r\n\t\techo \"0\";\r\n\t\tdie(); // this is required to return a proper result\r\n\t}", "protected static function _processModule()\n {\n //Pour la ligne de commandes\n global $argv;\n\t\t\n // Nom du module à installer\n $module_name = Tools::getValue('module_name');\n\n // Action à effectuer : Par défaut installation\n $action = Tools::getValue('action', 'install');\n\n // Flag pour permettre d'installer le module via github\n $github = Tools::getValue('github', false);\n\n //Gestion via la ligne de commande\n if ($argv) {\n $endOfLine = \"\\n\";\n $allowsKeys = array('module_name','action','github');\n\n foreach ($argv as $arg) {\n $arguments = explode('=', $arg);\n if (in_array($arguments[0], $allowsKeys)) {\n ${$arguments[0]} = $arguments[1];\n }\n }\n\t\t\t\n\t\t\tif ( self::$verbose )\n\t\t\t\techo 'Lancement via la ligne de commande '.self::$endOfLine;\n }\n\n // Si l'action demandéé n'est pas autorisée , on affiche un message d'erreur\n if (!in_array($action, self::$modulesActionsAllowed)) {\n exit('Erreur : action demandée non autorisée'.self::$endOfLine);\n }\n\n //Si le module est disponible sur github\n if ($github) {\n echo 'Tentative de récupération du module depuis github'.self::$endOfLine;\n echo 'Url du dépôt : '.$github.$endOfLine;\n //@ToDO : Récupérer les messages d'erreur + vérifier que shell_exec est autorisé\n shell_exec('git clone '.$github.' '._PS_MODULE_DIR_.$module_name);\n }\n\n if ($module = Module::getInstanceByName($module_name)) {\n\n // Pour les actions enable / disable : il faut s'assurer que le module est installé\n if (($action == 'enable' || $action == 'disable') && !Module::isInstalled($module->name)) {\n exit('Erreur : le module '.$module_name.' n\\'est pas installé. Il ne peut pas être activé / désactivé '.self::$endOfLine);\n }\n\t\t\t\n\t\t\t//Affichage du statut du module (Installé ou non )\n\t\t\tif ( $action =='status' ) {\n\t\t\t\tif ( Module::isInstalled($module->name) )\n\t\t\t\t{\n\t\t\t\t\tif ( self::$verbose )\n\t\t\t\t\t\techo 'Le module '.$module->name.' est bien installé'.self::$endOfLine;\n\t\t\t\t\telse\n\t\t\t\t\t\techo 1;\n\t\t\t\t} else {\n\t\t\t\t\tif ( self::$verbose )\n\t\t\t\t\t\techo 'Le module '.$module->name.' n\\'est pas installé'.self::$endOfLine;\n\t\t\t\t\telse\n\t\t\t\t\t\techo 0;\n\t\t\t\t}\n\t\t\t\texit();\t\n\t\t\t}\n\n // Exécution de l'action du module\n try {\n $module->$action();\n } catch (PrestashopException $e) {\n echo $e->getMessage();\n exit();\n }\n\t\t\t\n\t\t\tif ( self::$verbose )\n\t\t\t\techo 'Module '.$module_name.' action : '.$action.' effectuée avec succès'.self::$endOfLine;\n\t\t\t\t\n } else {\n echo 'Erreur le module '.$module_name.' n\\'existe pas'.self::$endOfLine;\n }\n }", "function gazette1_admin() {\n // Generates html for admin page view\n include('admin/gazette1_import_admin.php');\n}", "protected function initAdminDirectory()\n {\n if (is_dir($this->installPath())) {\n $this->line('<error>' . $this->installPath() . ' directory already exists !</error> ');\n\n return;\n }\n\n $this->makeDir($this->installPath());\n\n $this->makeDir($this->installPath('Controllers'));\n\n $this->createRoutesFile();\n\n $this->createBootstrapFile();\n\n $this->createControllers();\n\n $this->line('<info>Installing huztw-admin!</info>');\n }", "public function crear_carpeta_banco(){\n\t\t\t$x = $this->consultar_id();\n\t\t\tif(file_exists(\"../Process/BANCO\")){\n\t\t\t\t$destino = \"../Process/BANCO/\".$x;\n\t\t\t\tmkdir($destino);\n\t\t\t\t$destino = \"../Process/BANCO/\".$x.\"/DOCUMENTOS\";\n\t\t\t\tmkdir($destino);\n\t\t\t}else{\n\t\t\t\t$destino = \"../Process/BANCO\";\n\t\t\t\tmkdir($destino);\n\t\t\t\t$destino = \"../Process/BANCO/\".$x;\n\t\t\t\tmkdir($destino);\n\t\t\t\t$destino = \"../Process/BANCO/\".$x.\"/DOCUMENTOS\";\n\t\t\t\tmkdir($destino);\n\t\t\t}\n\t\t}", "protected function taskCopy(): void\n {\n try {\n $directory = $this->getDirectory();\n if (!$directory) {\n throw new RuntimeException('Not Found', 404);\n }\n\n $object = $this->getObject();\n if (!$object || !$object->exists() || !is_callable([$object, 'createCopy'])) {\n throw new RuntimeException('Not Found', 404);\n }\n\n // Pages are a special case.\n $parent = $object instanceof PageInterface ? $object->parent() : $object;\n $authorized = $parent instanceof FlexAuthorizeInterface\n ? $parent->isAuthorized('create', 'admin', $this->user)\n : $directory->isAuthorized('create', 'admin', $this->user);\n\n if (!$authorized || !$parent) {\n throw new RuntimeException($this->admin::translate('PLUGIN_ADMIN.INSUFFICIENT_PERMISSIONS_FOR_TASK') . ' copy.',\n 403);\n }\n\n if ($object instanceof PageInterface && is_array($this->data)) {\n $data = $this->data;\n $blueprints = $this->admin->blueprints('admin/pages/move');\n $blueprints->validate($data);\n $data = $blueprints->filter($data, true, true);\n // Hack for pages\n $data['name'] = $data['name'] ?? $object->template();\n $data['ordering'] = (int)$object->order() > 0;\n $data['order'] = null;\n if (isset($data['title'])) {\n $data['header']['title'] = $data['title'];\n unset($data['title']);\n }\n\n $object->order(false);\n $object->update($data);\n }\n\n $object = $object->createCopy();\n\n $this->admin->setMessage($this->admin::translate('PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_COPY_SUCCESS'));\n\n $this->setRedirect($this->getFlex()->adminRoute($object));\n\n } catch (RuntimeException $e) {\n $this->admin->setMessage($this->admin::translate(['PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_COPY_FAILURE', $e->getMessage()]), 'error');\n $this->setRedirect($this->referrerRoute->toString(true), 302);\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 run()\n {\n $manageUser = new Permission();\n $manageUser->name = 'Админка';\n $manageUser->slug = 'admin.panel';\n $manageUser->description = 'Доступ в админку';\n $manageUser->save();\n\n $manageUser = new Permission();\n $manageUser->name = 'Список пользователей';\n $manageUser->slug = 'admin.user.list';\n $manageUser->description = '';\n $manageUser->save();\n\n $manageUser = new Permission();\n $manageUser->name = 'Править польозвателей';\n $manageUser->slug = 'admin.user.edit';\n $manageUser->description = '';\n $manageUser->save();\n\n $manageUser = new Permission();\n $manageUser->name = 'Список ролей';\n $manageUser->slug = 'admin.role.list';\n $manageUser->description = '';\n $manageUser->save();\n\n $manageUser = new Permission();\n $manageUser->name = 'Править роли';\n $manageUser->slug = 'admin.role.edit';\n $manageUser->description = '';\n $manageUser->save();\n\n $manageUser = new Permission();\n $manageUser->name = 'Список прав';\n $manageUser->slug = 'admin.permission.list';\n $manageUser->description = '';\n $manageUser->save();\n\n $manageUser = new Permission();\n $manageUser->name = 'Править права';\n $manageUser->slug = 'admin.permission.edit';\n $manageUser->description = '';\n $manageUser->save();\n\n Permission::insert([\n ['slug' => 'admin.role.create', 'name' => 'Создать роль'],\n ['slug' => 'admin.role.delete', 'name' => 'Удалить роль'],\n ['slug' => 'admin.activity.list', 'name' => 'Список активности'],\n ['slug' => 'admin.social-badge.list', 'name' => 'Список социальных сетей'],\n ['slug' => 'admin.social-badge.edit', 'name' => 'Править список социальных сетей'],\n ]\n );\n }", "public function run()\n {\n $Admin = (new Admin);\n $Admin->setName('Admin');\n $Admin->setEmail('admin@admin.com');\n $Admin->setPassword('123456');\n $Admin->save();\n $Role = new Role();\n $Role->setName('Admin');\n $Role->save();\n $Role->refresh();\n $Permissions = [\n 'Admins',\n 'Roles',\n 'Permissions',\n 'Settings',\n 'Faq',\n 'Categories',\n 'SubCategories',\n 'Countries',\n 'Cities',\n 'Advertisements',\n 'Orders',\n 'Customers',\n 'Providers',\n 'Tickets',\n ];\n $Settings = [\n 'privacy'=>[\n 'name'=>'Privacy Policy',\n 'name_ar'=>'سياسة الخصوصية',\n 'value'=>'Privacy Policy',\n 'value_ar'=>'سياسة الخصوصية',\n 'key'=>'privacy',\n 'type'=>Constant::SETTING_TYPE['Page'],\n ],\n 'about'=>[\n 'name'=>'About Us',\n 'name_ar'=>'من نحن',\n 'value'=>'About Us',\n 'value_ar'=>'من نحن',\n 'key'=>'about',\n 'type'=>Constant::SETTING_TYPE['Page'],\n ],\n 'terms'=>[\n 'name'=>'Terms And Conditions',\n 'name_ar'=>'الشروط والأحكام',\n 'value'=>'Terms And Conditions',\n 'value_ar'=>'الشروط والأحكام',\n 'key'=>'terms',\n 'type'=>Constant::SETTING_TYPE['Page'],\n ],\n 'facebook'=>[\n 'name'=>'Facebook',\n 'name_ar'=>'حساب الفيسبوك',\n 'value'=>'',\n 'value_ar'=>'',\n 'key'=>'facebook',\n 'type'=>Constant::SETTING_TYPE['Values'],\n ],\n 'instagram'=>[\n 'name'=>'Instagram',\n 'name_ar'=>'حساب الانستقرام',\n 'value'=>'',\n 'value_ar'=>'',\n 'key'=>'instagram',\n 'type'=>Constant::SETTING_TYPE['Values'],\n ],\n 'email'=>[\n 'name'=>'Email',\n 'name_ar'=>'البريد الالكتروني',\n 'value'=>'',\n 'value_ar'=>'',\n 'key'=>'email',\n 'type'=>Constant::SETTING_TYPE['Values'],\n ],\n 'mobile'=>[\n 'name'=>'Mobile',\n 'name_ar'=>'رقم الجوال',\n 'value'=>'',\n 'value_ar'=>'',\n 'key'=>'mobile',\n 'type'=>Constant::SETTING_TYPE['Values'],\n ],\n 'holding_period'=>[\n 'name'=>'Holding Period',\n 'name_ar'=>'فترة الحجز',\n 'value'=>'10',\n 'value_ar'=>'10',\n 'key'=>'holding_period',\n 'type'=>Constant::SETTING_TYPE['Values'],\n ],\n 'commission'=>[\n 'name'=>'Commission',\n 'name_ar'=>'العمولة',\n 'value'=>'2',\n 'value_ar'=>'2',\n 'key'=>'commission',\n 'type'=>Constant::SETTING_TYPE['Values'],\n ],\n ];\n foreach ($Settings as $setting){\n $Setting = new Setting();\n $Setting->setKey($setting['key']);\n $Setting->setName($setting['name']);\n $Setting->setNameAr($setting['name_ar']);\n $Setting->setValue($setting['value']);\n $Setting->setValueAr($setting['value_ar']);\n $Setting->setType($setting['type']);\n $Setting->save();\n }\n foreach ($Permissions as $permission){\n $Permission = new Permission;\n $Permission->setName($permission);\n $Permission->save();\n }\n foreach (Permission::all() as $permission){\n $RolePermission = new RolePermission();\n $RolePermission->setPermissionId($permission->getId());\n $RolePermission->setRoleId($Role->getId());\n $RolePermission->save();\n }\n foreach (Role::all() as $role){\n $ModelRole = new ModelRole();\n $ModelRole->setModelId($Admin->getId());\n $ModelRole->setRoleId($role->getId());\n $ModelRole->save();\n }\n foreach (Permission::all() as $permission){\n $ModelPermission = new ModelPermission();\n $ModelPermission->setModelId($Admin->getId());\n $ModelPermission->setPermissionId($permission->getId());\n $ModelPermission->save();\n }\n Artisan::call('passport:install');\n }", "public function actionAdmin() {\n\t\ttry {\n\t\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.structure.controllers');\n\t\t\t$this->setCurrentNode($this->currentContent->node);\n\t\t\t$content = new FormContent();\n\t\t\t$content->targetContentId = $this->currentContent->contentId;\n\t\t\t$content->selected = false;\n\n\t\t\t$contentCriteriaBuilder = new CriteriaBuilder('content');\n\t\t\t$contentCriteriaBuilder->filterBy('contentId', $this->currentContent->contentId);\n\n\t\t\t$this->render('admin', array(\n\t\t\t\t'breadcrumb' => $this->buildBreadcrumb($this->currentContent->contentId),\n\t\t\t\t'mainMenu' => $this->buildMainMenu(2, 4),\n\t\t\t\t'content'=>$content,\n\t\t\t\t'sourceContent'=>$this->currentContent,\n\t\t\t\t'node' => $this->currentNode,\n\t\t\t\t'contentsDataProvider' => $contentCriteriaBuilder->getActiveDataProvider(array('pagination' => false))\n\t\t\t));\n\t\t} catch(\\Exception $e) {\n\t\t\t\\Yii::log('Error in '.__METHOD__.'():'.$e->getMessage(), \\CLogger::LEVEL_ERROR, 'sweelix.yii1.admin.structure.controllers');\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function installPlugins()\n\t{\n $mainframe =& JFactory::getApplication();\n// \t$lang = JFactory::getLanguage(); \n// $languages = JLanguageHelper::getLanguages('lang_code');\n \n $db =& JFactory::getDBO();\n $query = $db->getQuery(true);\n $type = \"language\";\n $query->select('a.element');\n $query->from('#__extensions AS a');\n $type = $db->Quote($type);\n\t$query->where('(a.type = '.$type.')');\n\t$query->group('a.element');\n $db->setQuery($query);\n $langlist = $db->loadObjectList();\n \n//\t\techo 'Copy Plugin(s) language(s) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a>';\n\t\t$src=JPATH_SITE.DS.'components'.DS.'com_joomleague'.DS.'plugins';\n\t\t$dest=JPATH_SITE.DS.'plugins';\n\t\t$groups = JFolder::folders($src);\n \n foreach ( $langlist as $key )\n {\n echo 'Copy Plugin(s) language( '.$key->element.' ) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br />';\n\t\tforeach ($groups as $group)\n\t\t{\n\t\t\t$plugins = JFolder::folders($src.DS.$group);\n\t\t\tforeach ($plugins as $plugin)\n\t\t\t{\n if ( JFolder::exists($src.DS.$group.DS.$plugin.DS.'language'.DS.$key->element) )\n\t\t{\n\t\t\t\tJFolder::copy($src.DS.$group.DS.$plugin.DS.'language'.DS.$key->element, JPATH_ADMINISTRATOR.DS.'language'.DS.$key->element, '', true);\n\t\techo ' - <span style=\"color:green\">'.JText::_('Success -> '.$group.' - '.$plugin.' - '.$key->element).'</span><br />';\n }\n \t}\n\t\t}\n }\n\t\t//echo ' - <span style=\"color:green\">'.JText::_('Success').'</span><br />';\n\t\techo 'Copy Plugin(s)';\n\t\tJFolder::copy($src, $dest, '', true);\n\t\techo ' - <span style=\"color:green\">'.JText::_('Success').'</span><br />';\n\t}", "function modules($accion, $id = false){\n\t\t\tif($_POST){\n\t\t\t\t$codigo \t=\t$this->administration_model->setModule($this->input->post(), $_SESSION['pos_user_id'], $accion);\n\t\t\t\tif ($codigo > 0) {\n\t\t\t\t\tif ($accion == \"crear\") { $_SESSION['ok'] = \"REGÍSTRO CREADO EXITOSAMENTE\"; }else\n\t\t\t\t\tif ($accion == \"editar\") { $_SESSION['ok'] = \"REGÍSTRO ACTUALIZADO EXITOSAMENTE\"; }\n\t\t\t\t}else{ $_SESSION['error'] = \"OCURRIO UN PROBLEMA, POR FAVOR INTENTE DE NUEVO\"; }\n\t\t\t\tredirect(base_url('administration/modules/crear'));\n\n\t\t\t}else if($id){\n\t\t\t\t$this->data[\"title\"] \t= \t\"Editar Módulo\";\n\t\t\t\t$this->data[\"accion\"] \t= \t\"editar\";\n\n\t\t\t\t$this->data[\"vista\"] \t= \t\"modules/administration/modules\";\n\n\t\t\t\t$this->data[\"row\"]\t\t= \t$this->administration_model->getModule($id);\n\t\t\t\t$this->data[\"status\"]\t= \t$this->administration_model->getModuleStatus();\n\t\t\t\t$this->data[\"module\"]\t= \t$this->STR_model->getModuleClassification();\n\n\t\t\t}else if($accion == \"crear\"){\n\t\t\t\t$this->data[\"title\"] \t= \t\"Crear Módulo\";\n\t\t\t\t$this->data[\"accion\"] \t= \t\"crear\";\n\t\t\t\t$this->data[\"focus\"] \t= \t\"pos_module_name\";\n\t\t\t\t$this->data[\"vista\"] \t= \t\"modules/administration/modules\";\n\t\t\t\t$this->data[\"status\"]\t= \t$this->administration_model->getModuleStatus();\n\t\t\t\t$this->data[\"module\"]\t= \t$this->STR_model->getModuleClassification();\n\n\t\t\t}else{\n\t\t\t\t$this->data[\"result\"]\t= \t$this->administration_model->getModule();\n\t\t\t\t$this->data[\"vista\"]\t=\t\"modules/administration/modules_maintenance\";\n\t\t\t}\n\n\t\t\tif (isset($_SESSION['ok'])) { \t$this->data[\"ok\"] = $_SESSION['ok']; unset($_SESSION['ok']); }\n\t\t\tif (isset($_SESSION['error'])){ $this->data[\"error\"] = $_SESSION['error']; unset($_SESSION['error']); }\n\n\t\t\t$this->load->view(\"templates/template_main\", $this->data);\n\t\t}", "public function run()\n {\n $editAdmin = new Permission();\n $editAdmin->name = 'edit-admin';\n $editAdmin->display_name = 'Edit admin';\n $editAdmin->description = 'create\\delete\\edit admin';\n $editAdmin->save();\n }", "public function executeCreate()\n {\n $this->role = new Role();\n\n $this->role->setDisplay(false); //poner el que sea por defecto\n\n $this->langs = sfConfig::get('app_lang_array', array('es'));\n\n $this->setTemplate('edit');\n }", "public function run()\n {\n CoreModule::create([\n 'id' => 1,\n 'name' => 'User',\n 'descripcion' => 'Create Users',\n 'id_group' => '1',\n 'links' => 'admin/user/index',\n 'file' => 'users.php',\n 'image' => 'users.png',\n 'visible' => 1\n ]);\n\n CoreModule::create([\n 'id' => 2,\n 'name' => 'Profile',\n 'descripcion' => 'Create Profiles',\n 'id_group' => '1',\n 'links' => 'admin/profile/index',\n 'file' => 'profile.php',\n 'image' => 'profile.png',\n 'visible' => 1\n ]);\n\n\n CoreModule::create([\n 'id' => 3,\n 'name' => 'SystemLog',\n 'descripcion' => 'View Log',\n 'id_group' => '1',\n 'links' => 'admin/log/index',\n 'file' => 'log.php',\n 'image' => 'log.png',\n 'visible' => 1\n ]);\n\n CoreModule::create([\n 'id' => 4,\n 'name' => 'Locations',\n 'descripcion' => 'Create Locations',\n 'id_group' => '2',\n 'links' => 'art/location/index',\n 'file' => 'log.php',\n 'image' => 'log.png',\n 'visible' => 1\n ]);\n CoreModule::create([\n 'id' => 5,\n 'name' => 'Artist',\n 'descripcion' => 'Create Artist',\n 'id_group' => '2',\n 'links' => 'art/artist/index',\n 'file' => 'obra.php',\n 'image' => 'obra.png',\n 'visible' => 1\n ]);\n\n CoreModule::create([\n 'id' => 6,\n 'name' => 'ArtWorks',\n 'descripcion' => 'Create ArtWorks',\n 'id_group' => '2',\n 'links' => 'art/obra/index',\n 'file' => 'obra.php',\n 'image' => 'obra.png',\n 'visible' => 1\n ]);\n\n\n CoreModule::create([\n 'id' => 7,\n 'name' => 'Stats',\n 'descripcion' => 'View Artworks Summary',\n 'id_group' => '2',\n 'links' => 'admin/log/summary',\n 'file' => 'summary.php',\n 'image' => 'summary.png',\n 'visible' => 1\n ]);\n }", "function INSTALL($e) { $s=$im='';\n\n\nif($GLOBALS['admin']) {\n\n$GLOBALS['article']['template']='blank';\n\n\nSTYLES(\"mod\",\"\n.iDIR,.iYES,.iNON,.iDEL,.iUPD,.iADD { cursor:pointer; clear:left;float:left; }\n.iNON {color: #aaa}\n.iDEL {color: red}\n.iYES,.iUPD {color: green}\n.iADD {color: rgb(0,255,0)}\n.iNON,.iSS {text-decoration:line-through}\n.iNON:before,.iNON:after,.iSS:before,.iSS:after {content:' '}\n.iYES,.iOK {text-decoration:none}\n\n.iDIR {font-weight: bold; float:left; valign:top; }\n.iT {float:left;margin-top:20pt;}\n\n.p1 { color: #3F3F3F; text-decoration: line-through; background: #DFDFDF; } /* вычеркнутый */\n.p2 { background: #FFD0C0; } /* вставленный */\n\n\");\n\n $upgrade=gglob($GLOBALS['host_module'].\"install/*.php\");\n foreach($upgrade as $l) { $xi=explode('/',$l); $m=array_pop($xi);\n\t\t$im.=\"'$m',\";\n\t\t$s.=\"<div class='mod' id='module__$m'>\".$m.\"</div>\";\n\t}\n\nSCRIPTS(\"mod\",\"\nvar install_modules_n=0;\nfunction check_mod_do() { if(typeof install_modules[install_modules_n] == 'undefined') { install_modules_n=0; return; }\n\tvar m=install_modules[install_modules_n++];\n\tzabil('module__'+m,'<img src='+www_design+'img/ajax.gif>'+vzyal('module__'+m));\n\tmajax('module.php',{mod:'INSTALL',a:'testmod',module:m});\n}\nvar install_modules=[\".trim($im,',').\"];\n\nvar timestart;\nfunction dodo(module,allwork,time,skip,aram) {\n\tif(skip) {\n\t\tvar timenow = new Date();\n\t\tvar t=timenow.getTime()-timestart.getTime();\n\t\tvar e=parseInt((t/skip)*allwork)-t;\n\t\tzabilc('timet',' &nbsp; &nbsp; &nbsp; осталось: '+pr_time(e)+' сек');\n\t} else { timestart = new Date(); }\n\tvar ara={mod:'INSTALL',a:'do',module:module,allwork:allwork,time:time,skip:skip};\n\tif(typeof(aram)=='object') for(var i in aram) ara[i]=aram[i];\n\tmajax('module.php',ara);\n}\n\nfunction pr_time(t) { var N=new Date(); N.setTime(t); var s=pr00(N.getUTCSeconds());\n\tif(N.getUTCMinutes()) s=pr00(N.getUTCMinutes())+':'+s;\n\tif(N.getUTCHours()) s=pr00(N.getUTCHours())+':'+s;\n\treturn s;\n} function pr00(n){return ((''+n).length<2?'0'+n:n)}\n\n\npage_onstart.push('check_mod_do()');\n\n\");\n\n}\n\nreturn \"<table width=100% style='border: 1px dotted red'>\n<tr valign=top>\n\t<td>\n\t\t\n\t\t<div id='mesto_module'>$s</div>\n\t</td>\n\t<td width='100%'><div id='mesto_otvet'>\".admin_login().\"</div></td>\n</tr></table>\";\n\n}", "function com_install() {\n\tglobal $mosConfig_absolute_path;\n\tmkdir($mosConfig_absolute_path . '/mambots/ajax');\n}", "public function admin_init() {}", "private function iniciar_perfil_mda(){\n\t\trequire_once 'inc/clases/procesos/fechas.class.php';\n\t\trequire_once 'inc/clases/procesos/sql_anuncios.class.php';\n\t\trequire_once 'inc/clases/mda/show_master.class.php';\n\t\trequire_once 'inc/clases/mda/pedidos.class.php';\n\t\trequire_once 'inc/clases/config/perfil_config.class.php';\n\n\t\t$this->Modulos = new Modulos();\n\t}", "private function tbl_permisos_modulos() {\r\n\t\t\t$this->permisos_modulo = $this->esquema->createTable('PERMISOS_MODULOS');\r\n\t\t\t$this->permisos_modulo->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Modulo'\r\n\t\t\t));\r\n\t\t\t$this->permisos_modulo->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombre del Modulo'\r\n\t\t\t));\r\n\t\t\t$this->permisos_modulo->addColumn('ESTADO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Estado del Modulo [ID de la tabla ESTADOS]'\r\n\t\t\t));\r\n\t\t\t$this->permisos_modulo->setPrimaryKey(array('ID'));\r\n\t\t\t$this->permisos_modulo->addForeignKeyConstraint($this->estados, array('ESTADO'), array('ID'), $this->opcForeign);\r\n\t\t}", "public function crearadmin()\n {\n //busca en la tabla usuarios los campos donde el alias sea igual a admin si no encuentra nada devuelve null\n $usuarios = R::findOne('usuarios', 'alias=?', [\n \"admin\"\n ]);\n \n \n // ok es igual a true siempre y cuando usuarios sea distinto de null\n $ok = ($usuarios == null );\n if ($ok) {\n // crea la tabla usuarios\n $usuarios = R::dispense('usuarios');\n //crea los campos de la tabla usuarios\n $usuarios->nombre=\"admin\";\n $usuarios->primer_apellido=\"admin\";\n $usuarios->segundo_apellido=\"admin\";\n $usuarios-> fecha_nacimiento=\"1998/03/12\";\n $usuarios->fecha_de_registro=date('Y-m-d');\n $usuarios->email=\"admin@gmail.com\";\n $usuarios->telefono=\"6734687\";\n $usuarios->contrasena=password_hash(\"admin\", PASSWORD_DEFAULT);\n $usuarios->confirmar_contrasena=password_hash(\"admin\", PASSWORD_DEFAULT);\n $usuarios->alias=\"admin\";\n $usuarios->foto = null;\n //almacena los datos en la tabla usuarios\n R::store($usuarios);\n \n \n \n \n }\n \n \n \n \n \n \n }", "function onBeforeWrite() {\n\t\tparent::onBeforeWrite();\n\t\tif ($this->owner->AssetsFolderID == 0) {\n\t\t\t$className = $this->owner->ClassName;\n\t\t\t$translatedClassName = singleton($className)->i18n_singular_name();\n\t\t\t//BTW: this will probably only work in English admin anyway\n\t\t\tif ($this->owner->Title != \"New $translatedClassName\") {\n\t\t\t\t\n\t\t\t\t$url = null;\n\t\t\t\t//check if the page we're having is implementing the UploadDirRulesInterface\n\t\t\t\t//for rule customization\n\t\t\t\tif($this->owner instanceof UploadDirRulesInterface) {\n\t\t\t\t\t$url = $this->owner->getCalcAssetsFolderDirectory();\n\t\t\t\t} else {\n\t\t\t\t\t//else use the default settings\n\t\t\t\t\t$base = UploadDirRules::site_upload_directory();\n\t\t\t\t\t$pageUrlPart = UploadDirRules::page_directory_part($this->owner);\n\t\t\t\t\t$url = \"$base/pages/$pageUrlPart\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($url) {\n\t\t\t\t\t//this creates the directory, and attaches it to the page\n\t\t\t\t\t//- without saving it (see: false) - as this is called on \"onBeforeWrite\",\n\t\t\t\t\t//and we're expecting the saving to be taking place just after this is called\n\t\t\t\t\t$dirObj = $this->owner->FindOrMakeAssetsFolder($url, false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function opcion__compilar_perfiles()\n {\n $param = $this->get_parametros();\n $id = isset($param[\"-p\"]) ? $param[\"-p\"] : $this->get_id_proyecto_actual(true);\n\n try {\n $proyecto = $this->get_proyecto($id);\n $path = $proyecto->get_dir_generales_compilados();\n if (!\\file_exists($path) || !\\is_writable($path)) {\n $this->consola->error('ATENCION!!: Considere ejecutar el comando compilar para abarcar todos los metadatos'. PHP_EOL);\n throw new toba_error('No existe o no es accesible la carpeta de metadatos compilados!!'. PHP_EOL);\n }\n toba_manejador_archivos::crear_arbol_directorios($path);\n $proyecto->compilar_metadatos_generales_grupos_acceso(true);\n } catch ( toba_error $e ) {\n\t\t$this->consola->error( \"PROYECTO $id: Ha ocurrido un error durante la compilacion:\\n\".$e->getMessage());\n exit(-1);\n }\n }", "public function run()\n {\n\n Module::create([\n 'name' => 'Dashboard',\n 'idparent' => '0',\n 'name_router' => 'Dashboard',\n 'icono' => 'fa fa-dashboard',\n 'name_template' => 'Dashboard',\n 'type' => 'menu',\n 'orden' => '1',\n ]);\n Module::create([\n 'name' => 'Administracion',\n 'idparent' => '0',\n 'name_router' => null,\n 'icono' => 'fa fa-sitemap',\n 'name_template' => 'ADMINISTRACIÓN',\n 'type' => 'menu',\n 'orden' => '1',\n ]);\n Module::create([\n 'name' => 'Gestion de Bienes',\n 'idparent' => '0',\n 'name_router' => null,\n 'icono' => 'fa fa-folder-open',\n 'name_template' => 'GESTIÓN DE BIENES',\n 'type' => 'menu',\n 'orden' => '1',\n ]);\n Module::create([\n 'name' => 'Maestros',\n 'idparent' => '0',\n 'name_router' => null,\n 'icono' => 'fa fa-file-text',\n 'name_template' => 'MAESTROS',\n 'type' => 'menu',\n 'orden' => '1',\n ]); \n \n // roles\n Module::create([\n 'name' => 'Seguridad',\n 'idparent' => '0',\n 'name_router' => null,\n 'icono' => 'fa fa-unlock-alt',\n 'name_template' => 'SEGURIDAD',\n 'type' => 'menu',\n 'orden' => '1',\n ]);\n Module::create([\n 'name' => 'Reportes',\n 'idparent' => '0',\n 'name_router' => null,\n 'icono' => '',\n 'name_template' => 'REPORTES',\n 'type' => 'menu',\n 'orden' => '1',\n ]);\n Module::create([\n 'name' => 'Empresas',\n 'idparent' => '2',\n 'name_router' => 'Empresas',\n 'icono' => 'fa fa-circle-o',\n 'name_template' => 'Empresas',\n 'type' => 'option',\n 'orden' => '1',\n ]);\n Module::create([\n 'name' => 'Sedes',\n 'idparent' => '2',\n 'name_router' => 'Sedes',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Sedes',\n 'type' => 'option',\n 'orden' => '2',\n ]); \n Module::create([\n 'name' => 'Areas',\n 'idparent' => '2',\n 'name_router' => 'Areas',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Areas',\n 'type' => 'option',\n 'orden' => '3',\n ]);\n\n // bienes\n Module::create([\n 'name' => 'Ubicaciones',\n 'idparent' => '2',\n 'name_router' => 'Ubicaciones',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Ubicaciones',\n 'type' => 'option',\n 'orden' => '4',\n ]);\n Module::create([\n 'name' => 'Empleados',\n 'idparent' => '2',\n 'name_router' => 'Empleados',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Empleados',\n 'type' => 'option',\n 'orden' => '5',\n ]);\n Module::create([\n 'name' => 'Proveedores',\n 'idparent' => '2',\n 'name_router' => 'Proveedores',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Proveedores',\n 'type' => 'option',\n 'orden' => '6',\n ]);\n Module::create([\n 'name' => 'Bienes',\n 'idparent' => '3',\n 'name_router' => 'EmpresaBienes',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Bienes',\n 'type' => 'option',\n 'orden' => '1',\n ]); \n Module::create([\n 'name' => 'Grupos',\n 'idparent' => '3',\n 'name_router' => 'Grupos',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Grupos',\n 'type' => 'option',\n 'orden' => '2',\n ]); \n \n // mantenimientos\n Module::create([\n 'name' => 'Clases',\n 'idparent' => '3',\n 'name_router' => 'Clases',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Clases',\n 'type' => 'option',\n 'orden' => '3',\n ]);\n Module::create([\n 'name' => 'Traslados',\n 'idparent' => '3',\n 'name_router' => 'Traslados',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Traslados',\n 'type' => 'option',\n 'orden' => '4',\n ]);\n Module::create([\n 'name' => 'Bajas',\n 'idparent' => '3',\n 'name_router' => 'Bajas',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Bajas',\n 'type' => 'option',\n 'orden' => '5',\n ]);\n Module::create([\n 'name' => 'Mantenimientos',\n 'idparent' => '3',\n 'name_router' => 'Mantenimientos',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Mantenimientos',\n 'type' => 'option',\n 'orden' => '6',\n ]); \n Module::create([\n 'name' => 'Tipos Ingresos',\n 'idparent' => '4',\n 'name_router' => 'Tipoingresos',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Tipos Ingresos',\n 'type' => 'option',\n 'orden' => '1',\n ]); \n \n // bajas\n Module::create([\n 'name' => 'Documentos',\n 'idparent' => '4',\n 'name_router' => 'Documentos',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Documentos',\n 'type' => 'option',\n 'orden' => '2',\n ]);\n Module::create([\n 'name' => 'Garantias',\n 'idparent' => '4',\n 'name_router' => 'Garantias',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Garantias',\n 'type' => 'option',\n 'orden' => '3',\n ]);\n Module::create([\n 'name' => 'Cuentas',\n 'idparent' => '4',\n 'name_router' => 'Cuentas',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Cuentas',\n 'type' => 'option',\n 'orden' => '4',\n ]);\n Module::create([\n 'name' => 'Roles',\n 'idparent' => '5',\n 'name_router' => 'Roles',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Roles',\n 'type' => 'option',\n 'orden' => '1',\n ]); \n Module::create([\n 'name' => 'Usuarios',\n 'idparent' => '5',\n 'name_router' => 'Usuarios',\n 'icono' => 'fa fa-circle-o', \n 'name_template' => 'Usuarios',\n 'type' => 'option',\n 'orden' => '2',\n ]);\n }", "public function crear()\n {\n //\n return view('admin.permiso.crear');\n }", "public function create_module() {\n\t\t$context = [];\n\t\t$this->climate->green()->out( 'Creating new Module…' );\n\n\t\t$context['name'] = null;\n\t\t$filename_module = null;\n\t\twhile ( $context['name'] == null || file_exists( $filename_module ) ) {\n\t\t\t$input = $this->climate->green()->input( \"What will your Module be called?\\r\\n>\" );\n\t\t\t$context['name'] = trim( $input->prompt() );\n\n\t\t\tif ( $context['name'] == null ) {\n\t\t\t\t$this->climate->error( Emoji::pileOfPoo() . ' Please give a name for this Module!' );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$context['name'] = Utility::modulize( $context['name'] );\n\t\t\t$context['id'] = strtolower( Utility::normalize( $context['name'] ) );\n\t\t\t$context['name_view'] = Utility::viewize( $context['name'] );\n\t\t\t$context['name_acf'] = Utility::acfize( $context['name'] );\n\n\t\t\t$filename_module = $GLOBALS['sloth']->container->get( 'path.theme' ) . DS . 'Module' . DS . $context['name'] . '.php';\n\t\t\tif ( file_exists( $filename_module ) ) {\n\t\t\t\t$this->climate->error( Emoji::pileOfPoo() . ' ' . sprintf( 'A module called %s exists!',\n\t\t\t\t\t\t$context['name'] ) );\n\t\t\t}\n\t\t}\n\n\t\t$input = $this->climate->green()->confirm( 'Do you want to use your module with Layotter?' );\n\t\t$context['layotter'] = $input->confirmed() ? [] : false;\n\n\t\tif ( is_array( $context['layotter'] ) ) {\n\t\t\t$input = $this->climate->green()->input( \"Please give a comprehensive title for your module.\\r\\n>\" );\n\t\t\t$context['layotter']['title'] = trim( $input->prompt() );\n\n\t\t\t$input = $this->climate->green()->input( \"Please give a short description of what this module will do.\\r\\n>\" );\n\t\t\t$context['layotter']['description'] = trim( $input->prompt() );\n\n\t\t\t$input = $this->climate->green()->input( \"Please choose an icon for this module.\\r\\n(choose from http://fontawesome.io/icons/)\\r\\n>\" );\n\t\t\t$context['layotter']['icon'] = trim( $input->prompt() );\n\t\t}\n\t\t/*\n\t\t\t\t$input = $this->climate->green()->confirm( 'Do you want me to create a sass file for this module?' );\n\t\t\t\t$context['sass'] = $input->confirmed();\n\n\t\t\t\t$input = $this->climate->green()->confirm( 'Do you want me to create a JavaScript file for this module?' );\n\t\t\t\t$context['js'] = $input->confirmed();\n\t\t*/\n\n\t\t# write it to file\n\t\t$view = View::make( 'Scaffold.Module.Class' );\n\t\tfile_put_contents( $filename_module, $view->with( $context )->render() );\n\n\t\t$filename_view = $GLOBALS['sloth']->container->get( 'path.theme' ) . DS . 'View' . DS . 'Module' . DS . $context['name_view'] . '.twig';\n\t\t$view = View::make( 'Scaffold.Module.View' );\n\t\tfile_put_contents( $filename_view, $view->with( $context )->render() );\n\n\n\t\t$sass_dir = DIR_ROOT . DS . 'src' . DS . 'sass' . DS;\n\t\tif ( ! is_dir( $sass_dir ) ) {\n\t\t\t$sass_dir = DIR_ROOT . DS . 'src' . DS . 'scss' . DS;\n\t\t}\n\n\t\t$filename_sass = $sass_dir . 'modules' . DS . '_' . $context['name_view'] . '.scss';\n\t\tif ( ! is_dir( dirname( $filename_sass ) ) ) {\n\t\t\tmkdir( dirname( $filename_sass ), 0777, true );\n\t\t}\n\t\t$view = View::make( 'Scaffold.Module.Sass' );\n\t\tfile_put_contents( $filename_sass, $view->with( $context )->render() );\n\n\n\t\t$filename_sass_bundle = $sass_dir . 'bundle.scss';\n\t\tfile_put_contents( $filename_sass_bundle,\n\t\t\tsprintf( \"\\n@import 'modules/%s';\", $context['name_view'] ),\n\t\t\tFILE_APPEND );\n\n\t\tif ( $context['layotter'] ) {\n\t\t\t$filename_acf = $GLOBALS['sloth']->container->get( 'path.theme' ) . DS . 'acf-json' . DS . $context['name_acf'] . '.json';\n\t\t\tif ( file_exists( $filename_acf ) ) {\n\t\t\t\t$this->climate->info( Emoji::thinkingFace() . ' ' . sprintf( 'A Field Group %s exists. Skipping scaffolding!',\n\t\t\t\t\t\t$context['name_acf'] ) );\n\t\t\t} else {\n\t\t\t\t$view = View::make( 'Scaffold.Module.Acf' );\n\t\t\t\t$data = json_decode( $view->with( $context + [ 'now' => time() ] )->render() );\n\t\t\t\tif ( json_last_error() != JSON_ERROR_NONE ) {\n\t\t\t\t\tthrow new \\Exception( 'Seems your scaffold is not correct json!' );\n\t\t\t\t}\n\t\t\t\tfile_put_contents( $filename_acf, json_encode( $data ) );\n\t\t\t}\n\t\t}\n\n\t\t$this->climate->info( sprintf( 'Module %s created!', $context['name'] ) );\n\t}", "private function mprofil() {\n\t\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t\t$this->_ctrlAdmin->userProfil();\n\t}", "public function install(){\r\n\r\n\t\t$this->load->library('module_installer');\r\n\r\n\t\t$lang_avail = $this->config->item('lang_avail');\r\n\t\t\r\n\t\t$data['dbprefix'] = $this->db->dbprefix;\r\n\t\t\t\r\n\t\t\r\n\t\t//echo \" FLAG1 \";\r\n\t\t\t\t\r\n\t\tforeach($lang_avail AS $langcode=>$language){ \r\n\t\t\r\n\t\t\t$data['langcode'] = $langcode;\r\n\t\t\r\n\t\t\t$this->module_installer->process_file(dirname(dirname(__FILE__)) . \"/install/mydata.sql\",$data);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t// now copy any required css or js fles to the assets folder\r\n\t\t$this->module_installer->copy_assets(\"/custom_modules/\" . $this->router->class);\r\n\r\n\t\t\r\n\t}", "function subidaFichero($bd,$usuario,$entrada){\n if(isset($_FILES['imagen']['name']) && strlen ($_FILES['imagen']['name'])>0) {\n $dir_subida = $usuario . \"/\";\n ///////////NO TENGO PERMISOS DE CREAR CARPETAS!!!!!!!\n if ( !is_dir($dir_subida) && is_writable(\"../redsocial\")) {\n mkdir($dir_subida,0755, true);\n }else\n $dir_subida=\"img/\";\n $path = $_FILES['imagen']['name'];\n $ext = pathinfo($path, PATHINFO_EXTENSION);\n $fichero_subido = $dir_subida . $usuario . date(\"Ymd_Hm\").\".\".$ext;\n /////NO TENGO PERMISOS PARA SUBIR ARCHIVOS!!!!\n if(is_writable($dir_subida)) {\n if (!move_uploaded_file($_FILES['imagen']['tmp_name'], $fichero_subido)) {\n echo \"Problema de ataque de subida de ficheros!.\\n\";\n }\n }\n $imagen = new Imagen(null, $fichero_subido, $entrada->getId());\n $daoImagenes = new Imagenes($bd);\n $daoImagenes->addImagen($imagen, $entrada);\n return $fichero_subido;\n }\n\n}", "private function adminContentArea(): void {\n global $security;\n global $media_admin;\n global $media_manager;\n\n // Prepare Query\n if(($absolute = MediaManager::absolute($_GET[\"path\"] ?? DS)) === null) {\n $absolute = PATH_UPLOADS_PAGES;\n $relative = DS;\n } else {\n $relative = MediaManager::relative($absolute);\n }\n\n // Load Main Content Modal\n include \"admin\" . DS . \"modal.php\";\n\n // Load Modals\n \trequire \"admin\" . DS . \"modal-folder.php\";\n if(PAW_MEDIA_PLUS) {\n require \"admin\" . DS . \"modal-search.php\";\n }\n }", "public function manage()\n {\n global $template;\n\n $template->set_filename('plugin_admin_content', dirname($this->getFileLocation()).\"/admin/amm_admin.tpl\");\n\n $pluginInfo=array(\n 'AMM_VERSION' => \"<i>\".$this->getPluginName().\"</i> \".l10n('gmaps_release').AMM_VERSION,\n 'PATH' => AMM_PATH\n );\n\n $template->assign('plugin', $pluginInfo);\n $template->assign('AMM_BODY_PAGE', '<p class=\"warnings\">'.sprintf(l10n('g002_gpc_not_up_to_date'),AMM_GPC_NEEDED, GPC_VERSION).'</p>');\n $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');\n }", "public function adminAction()\n {\n //$this->cryptCollabs();\n return $this->render('PPEGSBBundle:Default:admin.html.twig');\n }", "public function create(){\n require_once 'views/layouts users/header.php';\n require_once 'views/admin/create.php';\n require_once 'views/layouts users/footer.php';\n }", "public function addPage($app)\n\t{\n\t\t// check if te same title with dashes exists\n\t\t// if exists append 1 or 2 or whatever\n\t\t// the title added should be added as alias\n\t\t// the route should also be same as the title.\n\t\t// the content of the page should be added to a new file. if no content then just create a file\n\t\t// save draft only save the page \n\t\t// publish would display the page also\n\t\t\n\t\t$cms_page = new CMS_PAGE($app->get('DB'));\n\n\t\t$app->get('POST')['title'] = strtolower(str_replace(' ','-',$app->get('POST')['title']));\n\n\t\tif(!($cms_page->findIf(\"title = '{$app->get('POST')['title']}'\"))) {\n\n\t\t// \t$values = array_merge( $app->get('POST'), \n\t\t// \t\tarray(\n\t\t// \t\t\t'filename' => md5($app->get('POST')['title']),\n\t\t// \t\t\t'route' => '/'.strtolower($app->get('POST')['title'])\n\t\t// \t\t\t)\n\t\t// \t\t);\n\t\t\n\t\t// \t$added = $cms_page->addNew($values);\n\t\t\t\n\t\t// \tif($added) {\n\t\t// \t\tif(!file_exists($app->get('UI').\"website/\".$values['filename'].\".html\"))\n\t\t// \t\t\t$file = fopen($app->get('UI').\"website/\".$values['filename'].\".html\",\"w\");\n\t\t// \t\telse\n\t\t// \t\t\techo \"The File already exists\";\n\t\t// \t}\n\t\t// \tfclose($file);\n\t\t// }\n\t}\n\tpublic function showEditForm($app)\n\t{\n\t\t$cms_page = new CMS_PAGE($app->get('DB'));\n\t\t$cms_pages = $cms_page->getById($app->get('PARAMS.id'));\n\t\t$app->set('DATA',$cms_pages[0]);\n\n\t\t$app->set('CMS_PAGE',\\View::instance()->render('website/'.$app->get('DATA')['filename'].\".html\"));\n\n\t\t//echo $app->get('CMS_PAGE');\n\n\t\techo \\Template::instance()->render('admin/cms/editPage.html');\n\t}\n\tpublic function editPage($app)\n\t{\n\t// \t$cms_page = new CMS_PAGE($app->get('DB'));\n\t// \t$app->post\t\n\t}\n\tpublic function deletePage()\n\t{\n\t\t$cms_page = new CMS_PAGE($app->get('DB'));\n\t\t$cms_page->delete();\n\t}\n\tpublic function updatePage($app)\n\t{\n\t\t$cms_page = new CMS_PAGE($app->get('DB'));\n\t\t$updated = $cms_page->updateStatus($app->get('PARAMS'));\n\n\t\tif($updated)\n\t\t\t$app->reroute('@admin_cms');\n\t}\n\tpublic function __toString()\n\t{\n\t\treturn __CLASS__;\n\t}\n}", "public function create(){\n \t//solo los administradores pueden listar preguntas\n // if(!Login::isAdmin())\n // throw new Exception(\"Debes ser administrador\");\n \t//recupera la lista de modulos\n $modulos=Modulo::get();\n\n //cagar los usuarios\n $usuario=Login::getUsuario();\n\n require_once 'view/pregunta/form_new.php';\n }", "public function copyForm($id){\n $id = nxb_decode($id);\n $form = Form::findOrFail($id);\n $template_id = $form->template_id;\n \n //New form creation database\n $new_form = $form->replicate();\n $new_form->name = \"Copy of \".$new_form->name;\n $new_form->linkto = 0;\n $template_id = $new_form->template_id;\n //Save form\n $success = $new_form->save();\n //AWS storage media\n $disk = getStorageDisk();\n $directoryIteams = $disk->allFiles(\"admin/template_$template_id/form/$id\");\n if ($directoryIteams) {\n $field_replacer = $new_form->fields;\n foreach($directoryIteams as $item) {\n $new_loc = str_replace(\"admin/template_$template_id/form/$id\", \"admin/template_$template_id/form/$new_form->id\", $item);\n $success = $disk->copy($item, $new_loc);\n }\n $field_replacer = str_replace(\"admin\\/template_$template_id\\/form\\/$id\", \"admin\\/template_$template_id\\/form\\/$new_form->id\", $field_replacer);\n //Save form\n $form = Form::findOrFail($new_form->id);\n $form->fields = $field_replacer;\n $form->update();\n }\n \n //Local folder copy and storage\n //$OldDirectory = public_path().'/'.PATH_UPLOAD_FORMS.\"master_temp_$template_id/form_$id/\";\n //$NewDirectory = public_path().'/'.PATH_UPLOAD_FORMS.\"master_temp_$template_id/form_$new_form->id/\";\n //$success =xcopy($OldDirectory, $NewDirectory);\n\n if($success){\n \\Session::flash('message', 'Your Form has been Copied successfully');\n }else{\n \\Session::flash('message', 'Your Form has been Copied But there is some error in saving the image files');\n }\n \n return redirect()->action(\n 'admin\\AdminController@edit', ['id' =>$template_id]\n );\n }", "private function publishModule()\n {\n $from = base_path('vendor/typicms/things/src');\n $to = base_path('Modules/' . $this->module);\n\n if ($this->files->isDirectory($from)) {\n $this->publishDirectory($from, $to);\n } else {\n $this->error(\"Can’t locate path: <{$from}>\");\n }\n }", "function add_from_tab_content () {\n require_once dirname(__FILE__).'/templates/form-tab-content.php';\n }", "public function admin() {\n\t\tinclude_once(\"paywithafacebookpost_admin.php\");\n\t}", "function execModule() {\n if ($this->hasPerm(1, TRUE)) {\n include_once(dirname(__FILE__).\"/papaya_calendar.php\");\n $calendar = new papaya_calendar;\n $calendar->module = &$this;\n $calendar->images = &$this->images;\n $calendar->msgs = &$this->msgs;\n $calendar->authUser = &$this->authUser;\n $calendar->layout = &$this->layout;\n $calendar->showEdit = TRUE;\n $calendar->initialize('cal', $this->authUser->userId);\n $calendar->execute();\n $calendar->getXML();\n }\n }", "public function moduleAddEditTemplates() {\n \t$out = '';\n \t$modules = Application::availableModules();\n \tforeach($modules as $module) {\n \t\tif($object = DataObject::create($module)) {\n \t\t\t$out .= $object->moduleAddScreen().\"\\n\";\n \t\t\t$out .= $object->moduleEditScreen().\"\\n\";\n \t\t}\n \t}\n \treturn $out;\n }", "public function crear(){\n\t\t$this->archivo = fopen($this->nombre , \"w+\");\n\t}", "public function showAddProduct() {\n Page::$title = 'Admin - Upload';\n require(APP_NON_WEB_BASE_DIR . 'views/upload.php');\n }", "public function add(){\n echo \"Add a module !\\n\";\n }", "protected function prepend_admin()\n\t{\n\t\tl10n::set(__DIR__.'/locales/'.$this->okt->user->language.'/admin');\n\n\t\t# on détermine si on est actuellement sur ce module\n\t\t$this->onThisModule();\n\n\t\t# on ajoutent un item au menu admin\n\t\tif (!defined('OKT_DISABLE_MENU'))\n\t\t{\n\t\t\t$this->okt->page->estimateSubMenu = new htmlBlockList(null,adminPage::$formatHtmlSubMenu);\n\t\t\t$this->okt->page->mainMenu->add(\n\t\t\t\t__('m_estimate_menu_Estimates'),\n\t\t\t\t'module.php?m=estimate',\n\t\t\t\tON_ESTIMATE_MODULE,\n\t\t\t\t30,\n\t\t\t\t$this->okt->checkPerm('estimate'),\n\t\t\t\tnull,\n\t\t\t\t$this->okt->page->estimateSubMenu,\n\t\t\t\t$this->url().'/icon.png'\n\t\t\t);\n\t\t\t\t$this->okt->page->estimateSubMenu->add(\n\t\t\t\t\t__('m_estimate_menu_Estimates_list'),\n\t\t\t\t\t'module.php?m=estimate&amp;action=index',\n\t\t\t\t\tON_ESTIMATE_MODULE && (!$this->okt->page->action || $this->okt->page->action === 'index' || $this->okt->page->action === 'estimate'),\n\t\t\t\t\t1\n\t\t\t\t);\n\t\t\t\t$this->okt->page->estimateSubMenu->add(\n\t\t\t\t\t__('m_estimate_menu_Products'),\n\t\t\t\t\t'module.php?m=estimate&amp;action=products',\n\t\t\t\t\tON_ESTIMATE_MODULE && ($this->okt->page->action === 'products' || $this->okt->page->action === 'product'),\n\t\t\t\t\t2,\n\t\t\t\t\t$this->okt->checkPerm('estimate_products')\n\t\t\t\t);\n\t\t\t\t$this->okt->page->estimateSubMenu->add(\n\t\t\t\t\t__('m_estimate_menu_Accessories'),\n\t\t\t\t\t'module.php?m=estimate&amp;action=accessories',\n\t\t\t\t\tON_ESTIMATE_MODULE && ($this->okt->page->action === 'accessories' || $this->okt->page->action === 'accessory'),\n\t\t\t\t\t3,\n\t\t\t\t\t$this->config->enable_accessories && $this->okt->checkPerm('estimate_accessories')\n\t\t\t\t);\n\t\t\t\t$this->okt->page->estimateSubMenu->add(\n\t\t\t\t\t__('c_a_menu_configuration'),\n\t\t\t\t\t'module.php?m=estimate&amp;action=config',\n\t\t\t\t\tON_ESTIMATE_MODULE && ($this->okt->page->action === 'config'),\n\t\t\t\t\t10,\n\t\t\t\t\t$this->okt->checkPerm('estimate_config')\n\t\t\t\t);\n\t\t}\n\t}", "protected function getEditModule() {}", "function bau_ein_upload_link_in_der_adminbar() {\n\n global $wp_admin_bar;\n \n if (current_user_can( 'manage_options' ) ) {\n \n $wp_admin_bar->add_menu( array(\n\t\t'id' => 'medien-hochladen',\n\t\t'title' => 'Medien hochladen',\n\t\t'href' => admin_url( 'media-new.php')\n\t));\n}\n}", "function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Menu.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Menu::showMenu($error);\n return;\n }\n // see if we need to do anything to the db\n if(isset($_REQUEST['newadmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->department_id = $_REQUEST['department_id'];\n $admin->username = $_REQUEST['username'];\n $admin->save();\n }else if (isset($_REQUEST['deladmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->id = $_REQUEST['id'];\n $admin->delete();\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }", "function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Menu.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Menu::showMenu($error);\n return;\n }\n // see if we need to do anything to the db\n if(isset($_REQUEST['newadmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->department_id = $_REQUEST['department_id'];\n $admin->username = $_REQUEST['username'];\n $admin->save();\n }else if (isset($_REQUEST['deladmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->id = $_REQUEST['id'];\n $admin->delete();\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }", "public function run()\n {\n $module = new Module;\n $module->title = \"users\";\n $module->parent_id = NULL;\n $module->save();\n\n $module = new Module;\n $module->title = \"quizzes\";\n $module->parent_id = NULL;\n $module->save();\n\n $module = new Module;\n $module->title = \"system\";\n $module->parent_id = NULL;\n $module->save();\n\n $module = new Module;\n $module->title = \"types\";\n $module->parent_id = get_module_id('system');\n $module->save();\n\n $module = new Module;\n $module->title = \"languages\";\n $module->parent_id = get_module_id('system');\n $module->save();\n\n $module = new Module;\n $module->title = \"names\";\n $module->parent_id = get_module_id('system');\n $module->save();\n\n $module = new Module;\n $module->title = \"categories\";\n $module->parent_id = get_module_id('quizzes');\n $module->save();\n\n $module = new Module;\n $module->title = \"questions\";\n $module->parent_id = get_module_id('quizzes');\n $module->save();\n\n $module = new Module;\n $module->title = \"choices\";\n $module->parent_id = get_module_id('quizzes.questions');\n $module->save();\n }", "public function run()\n {\n //\n// \\App\\Permission::create([\n// 'name'=>'Module Sản phẩm',\n// 'des'=>'',\n// 'key_code'=>'',\n// 'parent_id'=> 0\n// ]);\n }", "function dashboard_admin_buildContent($data,$db) {\n\t//$url = 'http://localhost/proprietary/version/'; // base url for version \n\t$url = 'https://sitesense.org/dev/version/'; // base url for version \n\t// modules versions contact\n\t$statement = $db->prepare('getEnabledModules','admin_modules'); // modules don't register versions until they're enabled, so this function is borderline useless if you get every module\n\t$statement->execute();\n\t$modules = $statement->fetchAll();\n\t$moduleQuery = array();\n\tforeach($modules as $module){\n\t\tif(file_exists('modules/'.$module['name'].'/README.md')&&dashboard_parse_readme('modules/'.$module['name'].'/README.md')){\n\t\t\t$moduleQuery[$module['shortName']]=$module['version'];\n\t\t}\n\t}\n\t$statement=$db->prepare('getEnabledPlugins','plugins');\n\t$statement->execute();\n\twhile($fetch=$statement->fetch(PDO::FETCH_ASSOC)){\n\t\tif(file_exists('plugins/'.$module['name'].'/README.md')&&dashboard_parse_readme('modules/'.$module['name'].'/README.md')){\n\t\t\tif(file_exists('plugins/'.$fetch['name'].'/install.php')){\n\t\t\t\tcommon_include('plugins/'.$fetch['name'].'/install.php');\n\t\t\t}\n\t\t\tif(function_exists($fetch['name'].'_settings')){\n\t\t\t\t$settings=call_user_func($fetch['name'].'_settings');\n\t\t\t\tif(isset($settings['version'])){\n\t\t\t\t\t$moduleQuery[$fetch['name']]=$settings['version'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t$moduleQuery = http_build_query(array('modules'=>$moduleQuery));\n\t$moduleQuery = rawurldecode($moduleQuery);\n\t$moduleUrl = $url . 'modules?' . $moduleQuery;\n\tif(isset($data->version)){\n\t\t$moduleUrl .= '&core='.$data->version;\n\t}\n\t$ch = curl_init($moduleUrl);\n\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$data->output['moduleUpdates'] = curl_exec($ch);\n\t$data->output['moduleUpdates'] = json_decode($data->output['moduleUpdates'],TRUE);\n\n\t// sitesense version contact\n $info['SiteSense Version'] = $data->version;\n\t$info['Server time']=strftime('%B %d, %Y, %I:%M:%S %p');\n\t$info['Server Signature']=$_SERVER['SERVER_SIGNATURE'];\n\t$info['Server Name']=$_SERVER['SERVER_NAME'];\n\t$info['Server Address']=$_SERVER['SERVER_ADDR'];\n\t$info['Gateway Interface']=$_SERVER['GATEWAY_INTERFACE'];\n\t$info['Server Protocol']=$_SERVER['SERVER_PROTOCOL'];\n\t$info['PHP Version']=phpversion().'</td></tr><tr><td colspan=\"2\">\n\t\t<img src=\"'.$_SERVER['PHP_SELF'].'?='.php_logo_guid().'\" alt=\"PHP Logo\" />';\n\t$info['Zend Version']=zend_version().'</td></tr><tr><td colspan=\"2\">\n\t\t<img src=\"'.$_SERVER['PHP_SELF'].'?='.zend_logo_guid().'\" alt=\"Zend Logo\" />';\n\t$info['Host OS']=PHP_OS;\n\t$data->output['secondSidebar']='\n\t<table class=\"sysInfo\">\n\t\t<caption>System Info</caption>\n\t\t';\n\tforeach ($info as $title => $value) {\n\t\tif (is_array($value)) {\n\t\t\t$data->output['secondSidebar'].='<tr>\n\t\t\t<th colspan=\"2\" class=\"section\">'.$title.'</th>';\n\t\t\tforeach ($value as $subTitle => $subValue) {\n\t\t\t\t$data->output['secondSidebar'].='<tr>\n\t\t\t<th>'.$subTitle.'</th>\n\t\t\t<td>'.$subValue.'</td>\n\t\t</tr>';\n\t\t\t}\n\t\t} else {\n\t\t\t$data->output['secondSidebar'].='<tr>\n\t\t\t<th>'.$title.'</th>\n\t\t\t<td>'.$value.'</td>\n\t\t</tr>';\n\t\t}\n\t}\n\t$data->output['secondSidebar'].='\n\t</table>';\n\t$data->output['pageTitle']='About This CMS -';\n\t//-----Call Home-----//\n\t$field = array(\n\t\t'version' => $data->version,\n\t\t'host' => $data->domainName . $data->linkRoot,\n\t\t'removeAttribution' => $data->settings['removeAttribution'],\n\t\t'serverName' => $info['Server Name'],\n\t\t'serverAddress' => $info['Server Address'],\n\t\t'gatewayInterface' => $info['Gateway Interface'],\n\t\t'serverProtocol' => $info['Server Protocol'],\n\t\t'phpVersion' => phpversion(),\n\t\t'zendVersion' => zend_version()\n\t);\n\t\n\t$ch = curl_init($url);\n\tcurl_setopt($ch,CURLOPT_POST,true);\n\tcurl_setopt($ch,CURLOPT_POSTFIELDS,$field);\n\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n\t$data->output['result'] = curl_exec($ch);\n\t$data->output['result'] = json_decode($data->output['result'],TRUE);\n\n\t/* \n\t *\n\t * 0 = Attribution\n\t * 1 = Version\n\t**/\n\t// Update Attribution Setting In The DB\n\t$statement = $db->prepare('updateSettings','admin_settings');\n\t$statement->execute(array(\n\t\t':name' => 'removeAttribution',\n\t\t':value' => $data->output['result']['removeAttribution']\n\t));\n\t// Push Across All Languages...\n\tcommon_updateAcrossLanguageTables($data,$db,'settings',array('name'=>'removeAttribution'),array('value'=>$data->output['result']['removeAttribution']));\n\t\n}", "public function addEditProduct() {\n $vmAdd = ProductsVM::getAddEditInstance();\n $vm = ProductsVM::getCategoryInstance($vmAdd->category->id);\n Page::$title = 'Admin - Upload' . $vm->category->name;\n require(APP_NON_WEB_BASE_DIR . 'views/upload.php'); //old ref require(APP_NON_WEB_BASE_DIR . 'views/adminProductList.php');\n }", "public function updateModuleFile() {\n\t\t$module = Yii::app()->db->createCommand(\"SELECT * FROM {$this->_moduleTableName} WHERE enabled=1\")->queryAll();\n\n\t\tif(count($module) > 0) {\n\t\t\t$config = \"<?php \\n\";\n\t\t\t$config .= \"return array(\\n\\t'modules' => array(\\n\";\n\t\t\t$i = 1;\n\t\t\tforeach($module as $val) {\n\t\t\t\tif($i !== count($module))\n\t\t\t\t\t$config .= \"\\t\\t'\" . $val['name'] . \"',\\n\";\n\t\t\t\telse\n\t\t\t\t\t$config .= \"\\t\\t'\" . $val['name'] . \"'\\n\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$config .= \"\\t),\\n);\";\n\n\t\t}else {\n\t\t\t$config = \"<?php \\n\";\n\t\t\t$config .= \"return array(\\n\\t'modules' => array(\\n\";\n\t\t\t$config .= \"\\t),\\n);\";\n\t\t}\n\n\t\t$fileHandle = @fopen(Yii::getPathOfAlias('application.config').'/module_addon.php', 'w');\n\t\t@fwrite($fileHandle, $config, strlen($config));\n\t\t@fclose($fileHandle);\n\t}", "public function actionPermissions()\n {\n FileHelper::createDirectory(Yii::getAlias('@webroot/css'));\n FileHelper::createDirectory(Yii::getAlias('@webroot/js'));\n\n foreach (['@webroot/assets', '@webroot/uploads', '@runtime'] as $path) {\n try {\n chmod(Yii::getAlias($path), 0777);\n } catch (\\Exception $e) {\n $this->stderr(\"Failed to change permissions for directory \\\"{$path}\\\": \" . $e->getMessage());\n $this->stdout(PHP_EOL);\n }\n }\n }", "public function run()\n {\n \n //Création de module\n $module = Module::create(['module_name' => 'Administration','module_description' => 'Module de gestion de l\\'administration']);\n\n //Création d'utilisateur Admin\n\n $admin = User::create([\n 'name' => 'Administrateur',\n 'username' => 'admin',\n 'birth_date' => Carbon::createFromFormat('d/m/Y', '31/07/2019')->format('Y-m-d'),\n 'email' => 'admin@admin.com',\n 'photo' => null,\n 'phone' => '00225 01080900',\n 'password' => Hash::make('admin'),\n 'password_changed' => 1,\n 'status' => 1,\n 'created_at' => Carbon::now(),\n ]);\n\n\n //Création de profil d'administration\n\n $profile = Profile::create([\n 'profile_name'=> 'Administrateur',\n 'profile_status' => 1,\n 'profile_address_redirection'=> 'dashboard',\n 'profile_addr_redirect_link_name' => 'Tableau de board',\n 'profile_description'=> strtoupper('Tableau de bord de l\\'application'),\n 'created_at' => Carbon::now(),\n ]);\n\n\n //Attribution du profile Administration à l'utilisateur admin\n\n $admin->profiles()->save(\n $profile,\n [\n 'profile_opened_at' => Carbon::now(),\n 'profile_user_status' => 1\n ]\n );\n\n //Génération des permissions et affectation au profil Admin\n\n $entities = array('module', 'permission','profile', 'user');//Les entités ou tables pour lesquelles on génère les permissions\n $permissions = array('view', 'create', 'edit','manage_permission');\n $entities_permission_description = array(\n 'module' => array(\n 'access_to' => 'Donner acces au menu des gestion des modules',\n 'view' => 'Lister les modules',\n 'create' => 'Ajouter de nouveaux modules',\n 'edit' => 'Modifier les modules'\n ),\n 'permission' => array(\n 'access_to' => 'Donner acces au menu des gestion des permissions',\n 'view' => 'Lister les permissions',\n 'create' => 'Ajouter de nouvelles permissions',\n 'edit' => 'Modifier les permissions'\n ),\n 'profile' => array(\n 'access_to' => 'Donner acces au menu des gestion des profiles',\n 'view' => 'Lister les profils',\n 'create' => 'Ajouter de nouveaux profils',\n 'edit' => 'Modifier les profils',\n 'permission_to_manage' => 'Gerer les permissions liees aux profils',\n ),\n 'user' => array(\n 'access_to' => 'Donner acces au menu des gestion des utilisateurs',\n 'view' => 'Lister les utilisateurs',\n 'create' => 'Ajouter de nouveaux utilisateurs',\n 'edit' => 'Modifier les iformations relatives aux utilisateurs'\n ),\n\n );\n\n //Créer les permissions pour chacune des entités tout en les affectant au profil admin\n\n foreach($entities_permission_description as $entity => $permissions){\n\n foreach($permissions as $permission => $permission_description){\n $privilege = Page::create([\n 'page_code' => $permission.'_'.$entity,\n 'page_description' =>$permission_description,\n 'module_id' => $module->id\n ]);\n\n $privilege->profiles()->save($profile, ['profile_page_status' => 1, 'page_allocate_to_profile_at' => Carbon::now()]);\n }\n }\n\n }", "public function admin_index() {\n\n\t\t\t/*get all data from table \"modules\"*/\n\t\t\t$modules=$this->Module->find(\"all\");\n\n\t\t\t/*set variables of page*/\n\t\t\t$this->set(\"title\", \"Gestion\");\n\t\t\t$this->set(\"legend\", \"Modules manager\");\n\t\t\t$this->set(\"modules\", $modules);\n\t\t\t}", "function remi_theme_create_page()\n{\n require_once ( get_template_directory() . '/inc/templates/remi-admin.php' );\n}", "public function createHtaccessFile() {\n $oModule = oxNew(Module::class);\n $oConfig = $this->getConfig();\n // get modules path\n $sModulesDir = $oConfig->getModulesDir();\n // get cache path\n $sCacheDir = $oConfig->getConfigParam('sCompileDir');\n // check if the default .htaccess file is in config folder\n if(file_exists($sModulesDir.$oModule->getModulePath('suaboclearcache').'/Config/.htaccess.tmp')) {\n // copy .htaccess to cache folder\n copy($sModulesDir . $oModule->getModulePath('suaboclearcache') . '/Config/.htaccess.tmp', $sCacheDir . '/.htaccess');\n }\n }", "public function install()\n {\n $logger = $this->container->get('logger');\n $userName = $this->container->get('zikula_users_module.current_user')->get('uname');\n \n // Check if upload directories exist and if needed create them\n try {\n $container = $this->container;\n $uploadHelper = new \\MU\\FilesModule\\Helper\\UploadHelper(\n $container->get('translator.default'),\n $container->get('filesystem'),\n $container->get('session'),\n $container->get('logger'),\n $container->get('zikula_users_module.current_user'),\n $container->get('zikula_extensions_module.api.variable'),\n $container->getParameter('datadir')\n );\n $uploadHelper->checkAndCreateAllUploadFolders();\n } catch (\\Exception $exception) {\n $this->addFlash('error', $exception->getMessage());\n $logger->error('{app}: User {user} could not create upload folders during installation. Error details: {errorMessage}.', ['app' => 'MUFilesModule', 'user' => $userName, 'errorMessage' => $exception->getMessage()]);\n \n return false;\n }\n // create all tables from according entity definitions\n try {\n $this->schemaTool->create($this->listEntityClasses());\n } catch (\\Exception $exception) {\n $this->addFlash('error', $this->__('Doctrine Exception') . ': ' . $exception->getMessage());\n $logger->error('{app}: Could not create the database tables during installation. Error details: {errorMessage}.', ['app' => 'MUFilesModule', 'errorMessage' => $exception->getMessage()]);\n \n return false;\n }\n \n // set up all our vars with initial values\n $this->setVar('allowedExtensions', 'pdf,doc,docx,odt');\n $this->setVar('maxSize', '200k');\n $this->setVar('onlyParent', false);\n $this->setVar('specialCollectionMenue', false);\n $this->setVar('collectionEntriesPerPage', 10);\n $this->setVar('linkOwnCollectionsOnAccountPage', true);\n $this->setVar('fileEntriesPerPage', 10);\n $this->setVar('linkOwnFilesOnAccountPage', true);\n $this->setVar('showOnlyOwnEntries', false);\n $this->setVar('moderationGroupForCollections', 2);\n $this->setVar('moderationGroupForFiles', 2);\n $this->setVar('allowModerationSpecificCreatorForCollection', false);\n $this->setVar('allowModerationSpecificCreationDateForCollection', false);\n $this->setVar('allowModerationSpecificCreatorForFile', false);\n $this->setVar('allowModerationSpecificCreationDateForFile', false);\n $this->setVar('enabledFinderTypes', 'collection###file');\n \n // add default entry for category registry (property named Main)\n $categoryHelper = new \\MU\\FilesModule\\Helper\\CategoryHelper(\n $this->container->get('translator.default'),\n $this->container->get('request_stack'),\n $logger,\n $this->container->get('zikula_users_module.current_user'),\n $this->container->get('zikula_categories_module.category_registry_repository'),\n $this->container->get('zikula_categories_module.api.category_permission')\n );\n $categoryGlobal = $this->container->get('zikula_categories_module.category_repository')->findOneBy(['name' => 'Global']);\n if ($categoryGlobal) {\n $categoryRegistryIdsPerEntity = [];\n $entityManager = $this->container->get('doctrine.orm.default_entity_manager');\n \n $registry = new CategoryRegistryEntity();\n $registry->setModname('MUFilesModule');\n $registry->setEntityname('CollectionEntity');\n $registry->setProperty($categoryHelper->getPrimaryProperty('Collection'));\n $registry->setCategory($categoryGlobal);\n \n try {\n $entityManager->persist($registry);\n $entityManager->flush();\n } catch (\\Exception $exception) {\n $this->addFlash('warning', $this->__f('Error! Could not create a category registry for the %entity% entity. If you want to use categorisation, register at least one registry in the Categories administration.', ['%entity%' => 'collection']));\n $logger->error('{app}: User {user} could not create a category registry for {entities} during installation. Error details: {errorMessage}.', ['app' => 'MUFilesModule', 'user' => $userName, 'entities' => 'collections', 'errorMessage' => $exception->getMessage()]);\n }\n $categoryRegistryIdsPerEntity['collection'] = $registry->getId();\n }\n \n // initialisation successful\n return true;\n }", "public function clone()\n {\n Az::debug($this->newName, 'cloning directories');\n $this->load(self::mode['clone']);\n\n $this->appCopy();\n\n // updating /service/ALL/App.php and\n // launch norms\n Az::$app->smart->service->serviceAdd($this->newName);\n\n Az::debug($this->newName, 'cloning DB & tables');\n $this->createDb();\n\n Az::debug($this->newName, 'excuting insert apply cmd');\n $this->insertCreateFunc();\n $this->insertCloneFolder();\n $this->insertApplyFunc();\n $this->fillDb();\n\n Az::debug($this->newName, 'excuting page run cmd');\n $this->callPageRunCmd();\n\n Az::debug($this->newName, 'adding domain name into hosts');\n $this->addDomainNameIntoHosts();\n\n Az::debug($this->newName, 'updating nginx');\n $this->updateNgnix(false);\n }", "public function addnew()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'component', 'create')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\tif (!empty($_FILES['fupload']['tmp_name'])) {\n\t\t\t\t$exp = explode('.', $_FILES['fupload']['name']);\n\t\t\t\t$componentName = $this->postring->seo_title($exp[0]).'-'.rand(000000,999999).'-popoji.'.$exp[1];\n\t\t\t\t$componentType = $this->postring->valid($_POST['type'], 'xss');\n\t\t\t\tif ($componentType == 'component') {\n\t\t\t\t\t$folderinstall = 'component';\n\t\t\t\t} else {\n\t\t\t\t\t$folderinstall = 'widget';\n\t\t\t\t}\n\t\t\t\tif (in_array($exp[1], array('zip'))) {\n\t\t\t\t\tmove_uploaded_file($_FILES['fupload']['tmp_name'], '../'.DIR_CON.'/uploads/'.$componentName);\n\t\t\t\t\tif (file_exists('../'.DIR_CON.'/'.$folderinstall.'/'.strtolower($this->postring->valid($_POST['component'], 'xss')))) {\n\t\t\t\t\t\tunlink('../'.DIR_CON.'/uploads/'.$componentName);\n\t\t\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_3'], 'admin.php?mod=component');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$archive = new PoPclZip('../'.DIR_CON.'/uploads/'.$componentName);\n\t\t\t\t\t\tif ($archive->extract(PCLZIP_OPT_PATH, '../'.DIR_CON.'/'.$folderinstall.'/'.strtolower($this->postring->valid($_POST['component'], 'xss'))) == 0) {\n\t\t\t\t\t\t\tunlink('../'.DIR_CON.'/uploads/'.$componentName);\n\t\t\t\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_3'], 'admin.php?mod=component');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'component' => strtolower($this->postring->valid($_POST['component'], 'xss')),\n\t\t\t\t\t\t\t'type' => $this->postring->valid($_POST['type'], 'xss'),\n\t\t\t\t\t\t\t'datetime' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$query_component = $this->podb->insertInto('component')->values($data);\n\t\t\t\t\t\t$query_component->execute();\n\t\t\t\t\t\tunlink('../'.DIR_CON.'/uploads/'.$componentName);\n\t\t\t\t\t\tif (file_exists('../'.DIR_CON.'/'.$folderinstall.'/'.strtolower($this->postring->valid($_POST['component'], 'xss')).'/install.php')) {\n\t\t\t\t\t\t\t$this->poflash->success($GLOBALS['_']['component_message_1'], 'admin.php?mod=component&act=install&folder='.strtolower($this->postring->valid($_POST['component'], 'xss')));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->poflash->success($GLOBALS['_']['component_message_1'], 'admin.php?mod=component');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_3'], 'admin.php?mod=component');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_3'], 'admin.php?mod=component');\n\t\t\t}\n\t\t}\n\t\t?>\n\t\t<div class=\"block-content\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<?=$this->pohtml->headTitle($GLOBALS['_']['component_addnew']);?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<?=$this->pohtml->formStart(array('method' => 'post', 'action' => 'route.php?mod=component&act=addnew', 'enctype' => true, 'autocomplete' => 'off'));?>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t\t\t\t\t\t<?=$this->pohtml->inputText(array('type' => 'text', 'label' => $GLOBALS['_']['component_title'], 'name' => 'component', 'id' => 'component', 'mandatory' => true, 'options' => 'required'));?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t$item = array();\n\t\t\t\t\t\t\t\t\t\t\t$item[] = array('value' => 'component', 'title' => 'Component');\n\t\t\t\t\t\t\t\t\t\t\t$item[] = array('value' => 'widget', 'title' => 'Widget');\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<?=$this->pohtml->inputSelect(array('id' => 'type', 'label' => $GLOBALS['_']['component_type'], 'name' => 'type', 'mandatory' => true), $item);?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t\t\t\t<?=$this->pohtml->inputText(array('type' => 'file', 'label' => $GLOBALS['_']['component_browse_file'], 'name' => 'fupload', 'id' => 'fupload', 'mandatory' => true));?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?=$this->pohtml->formAction();?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?=$this->pohtml->formEnd();?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "public function createContentAndCopyDraftPage() {}", "function save_module($module)\n\t{\n\t\t$this->insertIntoAttachment($this->id,$module);\n\t}", "public function backup($type, $mod_name) {\r\r\n\t\t\r\r\n\t\tswitch ($type) {\r\r\n\t\t\tcase 'module':\r\r\n\t\t\t\t$table = DB_PREFIX.'rgen_modules';\r\r\n\t\t\t\t$table_theme = DB_PREFIX.'rgen_modules_customize';\r\r\n\t\t\t\t$table_layout = DB_PREFIX.'layout_module';\r\r\n\t\t\t\t$table_setting = DB_PREFIX.'setting';\r\r\n\r\r\n\t\t\t\t/*======================*/\r\r\n\t\t\t\t$output = '';\r\r\n\t\t\t\t\r\r\n\t\t\t\t$output .= \"-- ------------------------------------\" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- \" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- Module - \" . $mod_name . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- \" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- ------------------------------------\" . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\t/*======================*/\r\r\n\t\t\t\t// Module data\r\r\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM `\" .$table. \"` WHERE `section` LIKE '%\".$mod_name.\"%'\");\r\r\n\t\t\t\t$field_keys = array('store_id', 'group', 'section', 'key', 'value');\r\r\n\t\t\t\t$output .= \"DELETE FROM `\" .$table. \"` WHERE `section` LIKE '%\" .$mod_name. \"%';\" . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\tif (sizeof($query->rows) > 0) {\r\r\n\t\t\t\t\tforeach ($query->rows as $row_value) {\r\r\n\t\t\t\t\t\t$output .= $this->dbProcess($row_value, $field_keys, $table);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\t/*======================*/\r\r\n\t\t\t\t// Theme data\r\r\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM `\" .$table_theme. \"` WHERE `key` LIKE '%\".$mod_name.\"%'\");\r\r\n\t\t\t\t$field_keys = array('store_id', 'group', 'section', 'key', 'value');\r\r\n\t\t\t\t$output .= \"\\n\\n\".\"DELETE FROM `\" .$table_theme. \"` WHERE `key` LIKE '%\" .$mod_name. \"%';\" . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\tif (sizeof($query->rows) > 0) {\r\r\n\t\t\t\t\tforeach ($query->rows as $row_value) {\r\r\n\t\t\t\t\t\t$output .= $this->dbProcess($row_value, $field_keys, $table_theme);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\t/*======================*/\r\r\n\t\t\t\t// Layout data\r\r\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM `\" .$table_layout. \"` WHERE `code` LIKE '%\".$mod_name.\"%'\");\r\r\n\t\t\t\t$field_keys = array('layout_id', 'code', 'position', 'sort_order');\r\r\n\t\t\t\t$output .= \"\\n\\n\".\"DELETE FROM `\" .$table_layout. \"` WHERE `code` LIKE '%\" .$mod_name. \"%';\" . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\tif (isset($query->rows) && sizeof($query->rows) > 0) {\r\r\n\t\t\t\t\tforeach ($query->rows as $row_value) {\r\r\n\t\t\t\t\t\t$output .= $this->dbProcess($row_value, $field_keys, $table_layout);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\t/*======================*/\r\r\n\t\t\t\t// Settings data\r\r\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM `\" .$table_setting. \"` WHERE `code` LIKE '%\".$mod_name.\"%'\");\r\r\n\t\t\t\t$field_keys = array('store_id', 'code', 'key', 'value', 'serialized');\r\r\n\t\t\t\t$output .= \"\\n\\n\".\"DELETE FROM `\" .$table_setting. \"` WHERE `code` LIKE '%\" .$mod_name. \"%';\" . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\tif (isset($query->rows) && sizeof($query->rows) > 0) {\r\r\n\t\t\t\t\tforeach ($query->rows as $row_value) {\r\r\n\t\t\t\t\t\t$output .= $this->dbProcess($row_value, $field_keys, $table_setting);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t\t\r\r\n\t\t\t\treturn $output;\r\r\n\t\t\t\tbreak;\r\r\n\r\r\n\t\t\tcase 'theme':\r\r\n\t\t\t\t$table = DB_PREFIX.'rgen_theme';\r\r\n\t\t\t\t$table_setting = DB_PREFIX.'rgen_settings';\r\r\n\r\r\n\t\t\t\t$output = '';\r\r\n\t\t\t\t\r\r\n\t\t\t\t$output .= \"-- ------------------------------------\" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- \" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- R.Gen theme setting\" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- \" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- ------------------------------------\" . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM \" . $table . \" WHERE `group` = 'rgen_theme'\");\r\r\n\t\t\t\t$field_keys = array('store_id', 'group', 'section', 'key', 'value');\r\r\n\t\t\t\t$output .= 'TRUNCATE TABLE `' . $table . '`;' . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\tif (sizeof($query->rows) > 0) {\r\r\n\t\t\t\t\tforeach ($query->rows as $row_value) {\r\r\n\t\t\t\t\t\t$output .= $this->dbProcess($row_value, $field_keys, $table);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM \" . $table_setting . \" WHERE `group` = 'rgen_settings'\");\r\r\n\t\t\t\t$field_keys = array('store_id', 'group', 'section', 'key', 'value');\r\r\n\t\t\t\t$output .= \"\\n\\n\".'TRUNCATE TABLE `' . $table_setting . '`;' . \"\\n\\n\";\r\r\n\t\t\t\t\r\r\n\t\t\t\tif (sizeof($query->rows) > 0) {\r\r\n\t\t\t\t\tforeach ($query->rows as $row_value) {\r\r\n\t\t\t\t\t\t$output .= $this->dbProcess($row_value, $field_keys, $table_setting);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\treturn $output;\r\r\n\t\t\t\tbreak;\r\r\n\t\t}\r\r\n\t}", "public function actionCreate()\n {\n $model = new Module();\n\n if ($model->load(Yii::$app->request->post()) && $model->save(false)) {\n $generator = new Generator([\n 'moduleID' => $model->name,\n 'moduleClass' => $model->class,\n 'bootstrap' => $model->is_bootstrap,\n 'default' => $model->is_main,\n ]);\n\n if ($generator->validate()) {\n $files = $generator->generate();\n $results = '';\n $answers = [];\n\n if ( !empty($files) ) {\n foreach ($files as $file) {\n $answers[$file->id] = true;\n }\n $generator->save($files, $answers, $results);\n }\n }\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "function forum_perms()\n\t{\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя изменить ID группы, попытайтесь снова\");\n\t\t}\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->page_title = \"Управление масками доступа\";\n\t\t$this->ipsclass->admin->page_detail = \"В этой секции вы можете изменить выбранную маску доступа.\";\n\t\t$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=permsplash', 'Управление масками доступа' );\n\t\t$this->ipsclass->admin->nav[] = array( '', 'Добавление/изменение масок доступа' )\t\t;\n\n\t\t$this->ipsclass->admin->page_detail .= \"<br />Для разрешения выполнения действия поставьте галочку, для запрета выполнения действия просто не ставьте или уберите галочку.\n\t\t\t\t\t\t\t <br />Атрибут &laquo;<b>Глобальный</b>&raquo; означает, что все маски доступа имеют права на выполнение этого действия, поэтому изменить этот параметр здесь нельзя.\n\t\t\t\t\t\t\t <br />Категории имеют настройки доступа только на просмотр, потому что остальные действия просто не применимы для категорий.\";\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => \"perm_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t$group = $this->ipsclass->DB->fetch_row();\n\n\t\t$gid = $group['perm_id'];\n\t\t$gname = $group['perm_name'];\n\n\t\t//-----------------------------------------\n\t\t//| EDIT NAME\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'donameedit' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'act' , 'group' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'id' , $gid ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 4 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t), \"nameForm\" );\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Изменение названия: \".$group['perm_name'] );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Название маски</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"perm_name\", $gname )\n\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form(\"Изменить\");\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\n\t\t//-----------------------------------------\n\t\t//| MAIN FORM\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dofedit' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'act' , 'group' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'id' , $gid ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 4 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) \t);\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Форум\" , \"25%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Просмотр форума<br /><input id='show' type='checkbox' onclick='checkcol(\\\"show\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Чтение тем<br /><input id='read' type='checkbox' onclick='checkcol(\\\"read\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Ответ в темы<br /><input id='reply' type='checkbox' onclick='checkcol(\\\"reply\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Создание тем<br /><input id='start' type='checkbox' onclick='checkcol(\\\"start\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Загрузка файлов<br /><input id='upload' type='checkbox' onclick='checkcol(\\\"upload\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Скачивание файлов<br /><input id='download' type='checkbox' onclick='checkcol(\\\"download\\\", this.checked );' />\" , \"10%\" );\n\n\t\t$forum_data = $this->forumfunc->ad_forums_forum_data();\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Параметры доступа: \".$group['perm_name'] );\n\n\t\tforeach( $forum_data as $r )\n\t\t{\n\t\t\t$show = \"\";\n\t\t\t$read = \"\";\n\t\t\t$start = \"\";\n\t\t\t$reply = \"\";\n\t\t\t$upload = \"\";\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['show_perms'] == '*')\n\t\t\t{\n\t\t\t\t$show = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['show_perms'] ) )\n\t\t\t{\n\t\t\t\t$show = \"<center><input type='checkbox' name='show_\".$r['id'].\"' id='show_\".$r['id'].\"' onclick=\\\"obj_checked('show', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$show = \"<center><input type='checkbox' name='show_\".$r['id'].\"' id='show_\".$r['id'].\"' onclick=\\\"obj_checked('show', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['read_perms'] == '*')\n\t\t\t{\n\t\t\t\t$read = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['read_perms'] ) )\n\t\t\t{\n\t\t\t\t$read = \"<center><input type='checkbox' name='read_\".$r['id'].\"' id='read_\".$r['id'].\"' onclick=\\\"obj_checked('read', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$read = \"<center><input type='checkbox' name='read_\".$r['id'].\"' id='read_\".$r['id'].\"' onclick=\\\"obj_checked('read', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['start_perms'] == '*')\n\t\t\t{\n\t\t\t\t$start = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['start_perms'] ) )\n\t\t\t{\n\t\t\t\t$start = \"<center><input type='checkbox' name='start_\".$r['id'].\"' id='start_\".$r['id'].\"' onclick=\\\"obj_checked('start', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$start = \"<center><input type='checkbox' name='start_\".$r['id'].\"' id='start_\".$r['id'].\"' onclick=\\\"obj_checked('start', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['reply_perms'] == '*')\n\t\t\t{\n\t\t\t\t$reply = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['reply_perms'] ) )\n\t\t\t{\n\t\t\t\t$reply = \"<center><input type='checkbox' name='reply_\".$r['id'].\"' id='reply_\".$r['id'].\"' onclick=\\\"obj_checked('reply', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$reply = \"<center><input type='checkbox' name='reply_\".$r['id'].\"' id='reply_\".$r['id'].\"' onclick=\\\"obj_checked('reply', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['upload_perms'] == '*')\n\t\t\t{\n\t\t\t\t$upload = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['upload_perms'] ) )\n\t\t\t{\n\t\t\t\t$upload = \"<center><input type='checkbox' name='upload_\".$r['id'].\"' id='upload_\".$r['id'].\"' onclick=\\\"obj_checked('upload', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$upload = \"<center><input type='checkbox' name='upload_\".$r['id'].\"' id='upload_\".$r['id'].\"' onclick=\\\"obj_checked('upload', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['download_perms'] == '*')\n\t\t\t{\n\t\t\t\t$download = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['download_perms'] ) )\n\t\t\t{\n\t\t\t\t$download = \"<center><input type='checkbox' name='download_\".$r['id'].\"' id='download_\".$r['id'].\"' onclick=\\\"obj_checked('download', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$download = \"<center><input type='checkbox' name='download_\".$r['id'].\"' id='download_\".$r['id'].\"' onclick=\\\"obj_checked('download', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\tif ( $r['root_forum'] )\n\t\t\t{\n\t\t\t\t$css = 'tablerow4';\n\t\t\t\t$download = $upload = $reply = $start = $read = \"<center>Не&nbsp;используется</center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$css = '';\n\t\t\t}\n\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='float:right;width:auto;'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t<input type='button' id='button' value='+' onclick='checkrow({$r['id']},true)' />&nbsp;<input type='button' id='button' value='-' onclick='checkrow({$r['id']},false)' />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <b>\".$r['depthed_name'].\"</b>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#ecd5d8; padding:4px;'>\".$show.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#dbe2de; padding:4px;'>\".$read.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#dbe6ea; padding:4px;'>\".$reply.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#d2d5f2; padding:4px;'>\".$start.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#ece6d8; padding:4px;'>\".$upload.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#dfdee9; padding:4px;'>\".$download.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t) ,$css );\n\n\t\t}\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form(\"Обновить настройки доступа\");\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t$this->ipsclass->html .= $this->html->permissions_js();\n\n\t\t$this->ipsclass->admin->output();\n\t}", "public function admin_create($type='page', $viewContext=null) {\n\t\t$this->_render['layout'] = 'admin';\n\t\t\n\t\tif(empty($type)) {\n\t\t\t$type = 'page';\n\t\t}\n\t\t$this->_render['template'] = $type . '/admin_create';\n\t\t\n\t\t// For front-end editing via modal with iframe...or any other special purpose that requires separate templates.\n\t\tif(!empty($viewContext) && is_string($viewContext)) {\n\t\t\t$cfg = Libraries::get();\n\t\t\t// layout\n\t\t\tarray_unshift($this->_render['paths']['layout'], $cfg['app']['path'] . '/views/_libraries/blackprint/layouts/' . $viewContext . '/{:layout}.{:type}.php', '{:library}/views/layouts/' . $viewContext . '/{:layout}.{:type}.php');\n\t\t\t\n\t\t\t// template\n\t\t\tarray_unshift($this->_render['paths']['template'], $cfg['app']['path'] . '/views/_libraries/blackprint/{:controller}/' . $viewContext . '/{:template}.{:type}.php', '{:library}/views/{:controller}/' . $viewContext . '/{:template}.{:type}.php');\n\t\t}\n\n\t\t$contentTypes = Content::contentTypes();\n\t\t$contentConfig = Content::contentConfig($type);\n\t\t$document = Content::create();\n\n\t\t// If data was passed, set some more data and save\n\t\tif ($this->request->data) {\n\t\t\t// CSRF\n\t\t\tif(!RequestToken::check($this->request)) {\n\t\t\t\tRequestToken::get(array('regenerate' => true));\n\t\t\t} else {\n\t\t\t\t$now = new MongoDate();\n\t\t\t\t$this->request->data['created'] = $now;\n\t\t\t\t$this->request->data['modified'] = $now;\n\n\t\t\t\t$this->request->data['_ownerId'] = (isset($this->request->user['_id'])) ? $this->request->user['_id']:null;\n\t\t\t\t$this->request->data['_ownerId'] = (isset($this->request->user['id'])) ? $this->request->user['id']:$this->request->data['_ownerId'];\n\n\t\t\t\t// Set the pretty URL that gets used by a lot of front-end actions.\n\t\t\t\t$this->request->data['url'] = $this->_generateUrl(array('model' => 'blackprint\\models\\Content'));\n\n\t\t\t\t// Set the content type (\"page\" by default)\n\t\t\t\t$this->request->data['_type'] = isset($type) ? $type:'page';\n\t\t\t\t\n\t\t\t\t// If there were file(s) passed.\n\t\t\t\tif(isset($this->request->data['files'])) {\n\t\t\t\t\t$failedFiles = array();\n\t\t\t\t\t$storedFiles = array();\n\n\t\t\t\t\tif(!$contentConfig['files']['allow']) {\n\t\t\t\t\t\tunset($this->request->data['files']);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$allowedExtensions = explode(',', $contentConfig['files']['extensions']);\n\n\t\t\t\t\t\t// Ensure it's in a multi-dimensional array so we can loop and not need to do if/else.\n\t\t\t\t\t\t// Ideally, the template would use the form helper and specify 'files[]' as the field name,\n\t\t\t\t\t\t// but in case that didn't happen, ensure the loop will work for what was passed.\n\t\t\t\t\t\tif(isset($this->request->data['files']['error'])) {\n\t\t\t\t\t\t\t$this->request->data['files'] = array($this->request->data['files']);\n\t\t\t\t\t\t\t// ...Or use 'Filedata' in place of 'files' if set (Agile Uploader's default - this is just convenience).\n\t\t\t\t\t\t} elseif(isset($this->request->data['Filedata'])) {\n\t\t\t\t\t\t\tif(isset($this->request->data['Filedata']['error'])) {\n\t\t\t\t\t\t\t\t$this->request->data['files'] = array($this->request->data['Filedata']);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->request->data['files'] = $this->request->data['Filedata'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// The 'files' field is not saved on the content document. Instead, a '_files' field is used.\n\t\t\t\t\t\t// This avoids inadvertent conflicts and other issues. This '_files' field is also formatted in a different way.\n\t\t\t\t\t\t// It holds a reference to the file in GridFS along with the original file name, upload date, etc.\n\t\t\t\t\t\t$this->request->data['_files'] = !empty($document->_files) ? $document->_files->data():array();\n\n\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\tforeach($this->request->data['files'] as $k => $v) {\n\t\t\t\t\t\t\t// Only handle as many as set by 'limit' in the config (default is one - zero is unlimited).\n\t\t\t\t\t\t\tif($i < $contentConfig['files']['limit'] || $contentConfig['files']['limit'] == 0) {\n\t\t\t\t\t\t\t\t// Again, ensure what was passed will work...\n\t\t\t\t\t\t\t\tif(isset($v['error'])) {\n\t\t\t\t\t\t\t\t\tif($v['error'] != UPLOAD_ERR_OK) {\n\t\t\t\t\t\t\t\t\t\t$v['errorMessage'] = 'Failed to upload.';\n\t\t\t\t\t\t\t\t\t\t$failedFiles[] = array($k => $v);\n\t\t\t\t\t\t\t\t\t\tunset($this->request->data['files'][$k]);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// If it came in ok...\n\t\t\t\t\t\t\t\t\t\t$ext = substr(strrchr($v['name'],'.'),1);\n\t\t\t\t\t\t\t\t\t\t$originalFilename = $v['name'];\n\n\t\t\t\t\t\t\t\t\t\t// Check if it's an allowed type (of if \"*\" was passed in the allowed extensions which would allow everything).\n\t\t\t\t\t\t\t\t\t\tif(!in_array($ext, $allowedExtensions) || in_array('*', $allowedExtensions)) {\n\t\t\t\t\t\t\t\t\t\t\t$v['errorMessage'] = 'File type not allowed.';\n\t\t\t\t\t\t\t\t\t\t\t$failedFiles[] = array($k => $v);\n\t\t\t\t\t\t\t\t\t\t\tunset($this->request->data['files'][$k]);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t// Check if it's within the max file size allowed.\n\t\t\t\t\t\t\t\t\t\t\tif($v['size'] > $contentConfig['files']['maxSize']) {\n\t\t\t\t\t\t\t\t\t\t\t\t$v['errorMessage'] = 'File size too large.';\n\t\t\t\t\t\t\t\t\t\t\t\t$failedFiles[] = array($k => $v);\n\t\t\t\t\t\t\t\t\t\t\t\tunset($this->request->data['files'][$k]);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t// Passed all checks? Store it.\n\t\t\t\t\t\t\t\t\t\t\t\t$gridFileId = Asset::store(\n\t\t\t\t\t\t\t\t\t\t\t\t\t$v['tmp_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'filename' => (string)uniqid(php_uname('n') . '.') . '.'.$ext,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'originalFilename' => $originalFilename,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fileExt' => $ext,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'created' => $now\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t// If saved...\n\t\t\t\t\t\t\t\t\t\t\t\tif ($gridFileId) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Ensure the GridFS file document association is only saved once to the content document.\n\t\t\t\t\t\t\t\t\t\t\t\t\t// ...And on each association, add some data that may be useful before/without doing a second query to the GridFS collection.\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->request->data['_files'][(string)$gridFileId] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// This is the 'filename' seen publicly...There are routes that use the MongoId and extension to load the file.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'name' => (string)$gridFileId . '.' . $ext,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'originalFilename' => $originalFilename,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fileExt' => $ext,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'created' => $now\n\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$storedFiles[] = array($k => $v);\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Failed to store to GridFS\n\t\t\t\t\t\t\t\t\t\t\t\t\t$v['errorMessage'] = 'File failed to save, please try again.';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$failedFiles[] = array($k => $v);\n\t\t\t\t\t\t\t\t\t\t\t\t\tunset($this->request->data['files'][$k]);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Don't save data to this field...Especially not binary file data.\n\t\t\t\t\tunset($this->request->data['files']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->request->data['_ownerId'] = (isset($this->request->user['_id'])) ? $this->request->user['_id']:null;\n\t\t\t\t$this->request->data['_ownerId'] = (isset($this->request->user['id'])) ? $this->request->user['id']:$this->request->data['_ownerId'];\n\n\t\t\t\t$publicIdConflict = false;\n\t\t\t\t$requestedPublicId = '';\n\t\t\t\tif(isset($this->request->data['_publicId']) && !empty($this->request->data['_publicId'])) {\n\t\t\t\t\t$requestedPublicId = $this->request->data['_publicId'];\n\t\t\t\t\t$publicIdConflict = Content::find('count', array('fields' => array('_publicId'), 'conditions' => array('_id' => array('$ne' => $document->_id), '_publicId' => $this->request->data['_publicId'])));\n\t\t\t\t\tif($publicIdConflict) {\n\t\t\t\t\t\t$this->request->data['_publicId'] = '!___conflict___!';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$redirect = false;\n\t\t\t\tif(isset($this->request->data['__redirect'])) {\n\t\t\t\t\t$redirect = $this->request->data['__redirect'];\n\t\t\t\t\tunset($this->request->data['__redirect']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Save\n\t\t\t\tif($document->save($this->request->data)) {\n\t\t\t\t\tFlashMessage::write('The content has been created successfully.');\n\t\t\t\t\t\n\t\t\t\t\t// Special redirect if the form has passed one, for example...edit and return to the form.\n\t\t\t\t\tif($redirect) {\n\t\t\t\t\t\t// If we want to jump specifically to the update action.\n\t\t\t\t\t\tif(substr($redirect, 0, 6) == 'update') {\n\t\t\t\t\t\t\t$redirectQueryParams = explode('?', $redirect);\n\t\t\t\t\t\t\t$redirectArgs = explode('/', $redirectQueryParams[0]);\n\t\t\t\t\t\t\t$redirectArgs[0] = $document->_id; // overwrite the 'update' it isn't a necessary argument\n\t\t\t\t\t\t\t$redirect = Router::match(array('admin' => true, 'library' => 'blackprint', 'controller' => 'content', 'action' => 'update', 'args' => $redirectArgs));\n\t\t\t\t\t\t\tif(isset($redirectQueryParams[1])) {\n\t\t\t\t\t\t\t\t$redirect .= '?' . $redirectQueryParams[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $this->redirect($redirect);\n\t\t\t\t\t}\n\t\t\t\t\t$this->redirect(array('library' => 'blackprint', 'controller' => 'content', 'action' => 'index', 'admin' => true));\n\t\t\t\t} else {\n\t\t\t\t\tFlashMessage::write('The content could not be created, please try again.');\n\t\t\t\t\t// change back the requseted _publicId if there was a conflict...this is a little bit hacky for validation\n\t\t\t\t\tif(isset($this->request->data['_publicId']) && $this->request->data['_publicId'] == '!___conflict___!') {\n\t\t\t\t\t\t$document->_publicId = $requestedPublicId;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->set(compact('document', 'contentTypes', 'contentConfig'));\n\t}" ]
[ "0.6278238", "0.6244876", "0.6132575", "0.60590386", "0.5992881", "0.5921626", "0.5908221", "0.58465964", "0.5836053", "0.5826525", "0.58154345", "0.58128035", "0.57515347", "0.574795", "0.5735785", "0.5735281", "0.56228757", "0.5608001", "0.56041986", "0.558474", "0.5554273", "0.5542576", "0.5541288", "0.55256826", "0.5514603", "0.55097055", "0.5487266", "0.54657346", "0.5464807", "0.5462575", "0.54501337", "0.54210335", "0.5417842", "0.54162294", "0.5409373", "0.54033977", "0.5399126", "0.5390201", "0.53842944", "0.5373887", "0.53655255", "0.53511834", "0.53478026", "0.5346724", "0.5343955", "0.5339592", "0.533463", "0.53269136", "0.5326406", "0.5321155", "0.5312922", "0.5308144", "0.5307194", "0.52966493", "0.5293106", "0.52898866", "0.5286938", "0.52836025", "0.52819747", "0.52757156", "0.5272309", "0.5270184", "0.526619", "0.52649915", "0.52640235", "0.5264007", "0.52605724", "0.52513295", "0.52452046", "0.52349985", "0.5234708", "0.52339125", "0.52319646", "0.5220785", "0.5218532", "0.52183336", "0.5213574", "0.5213173", "0.5212016", "0.52111316", "0.5210441", "0.5210441", "0.5209587", "0.52092797", "0.5207935", "0.51980966", "0.5195762", "0.5195641", "0.5193949", "0.5190371", "0.5189658", "0.5185177", "0.51843834", "0.51826686", "0.51778394", "0.5175898", "0.5175851", "0.51731247", "0.51598734", "0.51596767", "0.5159171" ]
0.0
-1
Returns base for shortcode
public function getBase() { return $this->base; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shortcode() {\n\t\t\treturn \"\";\n\t\t}", "function base_tag($path = null) {\n if(!empty($path)) $path = trim($path, '/').\"/\";\n return $this->context->tag('base', array('href' => $this->base_url().\"/$path\")).\"\\n\";\n }", "public function getBase(): string\n {\n return $this->base;\n }", "public function getShortcode();", "public function generate_short_code_content($atts)\n {\n $short_code_atts = shortcode_atts(array(), $atts);\n\n ob_start();\n\n $this->cyl_locate_template_part('shortcode/colorYourLife.php', []);\n\n return ob_get_clean();\n }", "function ngwp_echo_base_tag($prefix = '')\n\t{\n\t\techo '<base href=\"' . $prefix . '/' . ICL_LANGUAGE_CODE . '/\" />';\n\t}", "public function get_shortcode() {\n\t\t$args = array();\n\t\tforeach ($this->args as $k => $v) {\n\t\t\t// Only include info if it's not the default... save space and easier to read shortcodes\n\t\t\tif (isset($this->defaults[$k]) && $this->defaults[$k] != $v) { // && (!empty($this->defaults[$k]) && !empty($v))) {\n\t\t\t\tif ( !empty($v) ) {\n\t\t\t\t\tif ( is_array($v) ) {\n\t\t\t\t\t\t$args[] = $k.'=\"'.implode(',', $v).'\"';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$args[] = $k.'=\"'.$v.'\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Direct filtering on a field\n\t\t\telseif (!isset($this->defaults[$k])) {\n\t\t\t\t$args[] = $k.'=\"'.$v.'\"';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$args = implode(' ', $args);\n\t\tif (!empty($args)) {\n\t\t\t$args = ' '.$args;\n\t\t}\n\t\treturn '[summarize-posts'.$args.']';\n\t}", "function full_image_shortcode_init($atts, $content = null) {\n $return_string = '<div class=\"full-image\">'.$content.'</div>';\n return $return_string;\n}", "function pt_shortcode( $atts )\n\t\t{\n\t\t\treturn $this->pt_show_blc_front();\n\t\t}", "public abstract function do_shortcode( $atts, $content, $tag );", "function plugin_starter_shortcode_1() {\r\n\t// This is just for showing that the shortcut works\r\n\treturn '<div class=\"starter-test\">This is the output of this shortcode</div>';\r\n}", "protected function plugin_base() {\n\t\treturn $this->plugin( 'base' );\n\t}", "public function processShortcode($atts) {\n\t\t\n\t\textract(shortcode_atts(array(\n \t\t'request' => 'blank'\n\t\t), $atts));\n\t\t\n\t\t$content = self::processRequest($request);\n\t\t\n\t\treturn \"<!--BEGIN: onxshop_start --><div class='onxshop_wordpress'>{$content}</div><!-- END: onxshop_end -->\";\n \n\t}", "function btn_shortcode( $atts, $content = null ) {\n $a = shortcode_atts( array(\n 'href' => '#'\n ), $atts );\n \n return '<a class=\"button\" href=\"' . esc_attr($a['href']) . '\">' . $content . '</a>';\n}", "function 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 html5_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "function endcore_socialbuttons_shortcode($atts, $content = null) {\n if(is_admin()) {\n return;\n }\n\n\tob_start();\t\n\tget_template_part('parts/stuff/code', 'social');\n\t$output = ob_get_contents();\n\tob_end_clean();\n\treturn $output;\n}", "public static function base($href)\n {\n return static::tag('base', null, array('href' => $href) );\n }", "public function base()\n {\n return $this->string;\n }", "function shortcode ( $content ) {\n return short_code ( $content );\n}", "protected function _getBase ()\n {\n global $config;\n return $config->current['BASE'];\n }", "function base_url() {\r\necho \"<base href=\" . get_site_url() . \">\";\r\n}", "function html5_shortcode_demo( $atts, $content = null ) {\n return '<div class=\"shortcode-demo\">' . do_shortcode( $content ) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "protected function get_name() {\n\t\treturn 'stravaapi_shortcode';\n\t}", "function button_shortcode($atts, $content = NULL) {\n $a = shortcode_atts( array(\n 'class' => ''\n ), $atts );\n $content = '<span class=\"button '.$class.'\">'.$content.'</span>';\n return $content;\n}", "function add_shortcode( $atts, $content, $name ) {\n\n\t\tif ( ! $this->validate_shortcode( $atts, $content, $name ) ) {\n return '';\n }\n\n\t\t$options = $this->set_options( $atts );\n\n\t\tob_start();\n\n\t\t?><div id=\"<?php echo esc_attr($options['selector']); ?>\" class=\"<?php if(isset($options['classes'])) echo esc_attr($options['classes']); ?>\" <?php do_action(\"oxygen_vsb_component_attr\", $options, $this->options['tag']); ?>><?php echo do_shortcode( $content ); ?></div><?php\n\n\t\treturn ob_get_clean();\n\t}", "function shortcode_template( $atts, $content = null ) {\r\n\t\t\tglobal $mpc_ma_options;\r\n\t\t\tif ( ! defined( 'MPC_MASSIVE_FULL' ) || ( defined( 'MPC_MASSIVE_FULL' ) && $mpc_ma_options[ 'single_js_css' ] !== '1' ) ) {\r\n\t\t\t\t$this->enqueue_shortcode_scripts();\r\n\t\t\t}\r\n\r\n\t\t\t$atts = shortcode_atts( array(\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'preset' => '',\r\n\t\t\t\t'content_preset' => '',\r\n\t\t\t\t'style' => 'horizontal',\r\n\t\t\t\t'space' => '',\r\n\t\t\t\t'fullwidth' => '',\r\n\r\n\t\t\t\t'padding_css' => '',\r\n\t\t\t\t'margin_css' => '',\r\n\t\t\t\t'border_css' => '',\r\n\r\n\t\t\t\t'icon_type' => 'icon',\r\n\t\t\t\t'icon' => '',\r\n\t\t\t\t'icon_character' => '',\r\n\t\t\t\t'icon_image' => '',\r\n\t\t\t\t'icon_image_size' => 'thumbnail',\r\n\t\t\t\t'icon_preset' => '',\r\n\t\t\t\t'icon_color' => '#333333',\r\n\t\t\t\t'icon_size' => '',\r\n\r\n\t\t\t\t'icon_margin_css' => '',\r\n\t\t\t\t'icon_animation' => 'none',\r\n\r\n\t\t\t\t'background_type' => 'color',\r\n\t\t\t\t'background_color' => '',\r\n\t\t\t\t'background_image' => '',\r\n\t\t\t\t'background_image_size' => 'large',\r\n\t\t\t\t'background_repeat' => 'no-repeat',\r\n\t\t\t\t'background_size' => 'initial',\r\n\t\t\t\t'background_position' => 'middle-center',\r\n\t\t\t\t'background_gradient' => '#83bae3||#80e0d4||0;100||180||linear',\r\n\r\n\t\t\t\t'animation_in_type' => 'none',\r\n\t\t\t\t'animation_in_duration' => '300',\r\n\t\t\t\t'animation_in_delay' => '0',\r\n\t\t\t\t'animation_in_offset' => '100',\r\n\r\n\t\t\t\t'animation_loop_type' => 'none',\r\n\t\t\t\t'animation_loop_duration' => '1000',\r\n\t\t\t\t'animation_loop_delay' => '1000',\r\n\t\t\t\t'animation_loop_hover' => '',\r\n\t\t\t), $atts );\r\n\r\n\t\t\t$styles = $this->shortcode_styles( $atts );\r\n\t\t\t$css_id = $styles[ 'id' ];\r\n\r\n\t\t\t$icon = MPC_Parser::icon( $atts );\r\n\t\t\t$animation = MPC_Parser::animation( $atts );\r\n\r\n\t\t\t$classes = $animation != '' ? ' mpc-animation' : '';\r\n\t\t\t$classes .= $atts[ 'fullwidth' ] != '' ? ' mpc-fullwidth' : '';\r\n\t\t\t$classes .= $atts[ 'style' ] == 'horizontal' ? ' mpc-style--horizontal' : ' mpc-style--vertical';\r\n\t\t\t$classes .= ' ' . esc_attr( $atts[ 'class' ] );\r\n\r\n\t\t\t$separator_classes = $icon[ 'class' ] == '' && $icon[ 'content' ] == '' ? ' mpc-empty' : '';\r\n\r\n\t\t\tglobal $mpc_button_separator;\r\n\t\t\t$mpc_button_separator = '<span class=\"mpc-button-separator-wrap\"><span class=\"mpc-button-separator-box\"><span class=\"mpc-button-separator ' . $icon[ 'class' ] . $separator_classes . '\">' . $icon[ 'content' ] . '</span></span></span>';\r\n\r\n\t\t\t$return = '<div id=\"' . $css_id . '\" class=\"mpc-button-set mpc-init' . $classes . '\"' . $animation . ( $atts[ 'icon_animation' ] != 'none' ? ' data-animation=\"' . esc_attr( $atts[ 'icon_animation' ] ) . '\"' : '' ) . '>';\r\n\t\t\t\t$return .= do_shortcode( $content );\r\n\t\t\t$return .= '</div>';\r\n\r\n\t\t\t$mpc_button_separator = null;\r\n\r\n\t\t\tglobal $mpc_frontend;\r\n\t\t\tif ( $mpc_frontend ) {\r\n\t\t\t\t$return .= '<style>' . $styles[ 'css' ] . '</style>';\r\n\t\t\t}\r\n\r\n\t\t\treturn $return;\r\n\t\t}", "public function base_url(){\n return $this->plugin_url() . 'base/';\n }", "function get_base()\n\t{\n\t\t$site_url = get_site_option('siteurl');\n\t\t$base = trim(preg_replace('#https?://[^/]+#ui', '', $site_url), '/');\n\n\t\t// @since 1.3.0 - guess min dir to check for any dir that we have to\n\t\t// remove from the base\n\t\t$this->_guess_min_dir();\n\n\t\t$this->base = !empty($this->remove_from_base)\n\t\t\t? preg_replace('#^' . $this->remove_from_base . '/?#ui', '', $base, 1)\n\t\t\t: $base;\n\t}", "public function shortcode_template() {\n\t\treturn 'templates/shortcodes/projects.php';\n\t}", "public function getBase() {\n\t\t\t\n\t\t\treturn $this->tag;\n\t\t\t\n\t\t}", "function mr_megaresult_shortcode_handler( $attrs, $content=null) {\n return \"look, a shortcode!\";\n}", "function initialize_shortcode() {\n\tif ( ! ( shortcode_exists( shortcode_slug ) ) ) {\n\t\tadd_shortcode( shortcode_slug, __NAMESPACE__ . '\\\\replacement' );\n\t}\n}", "function add_shortcode( $atts, $content = null, $name = null ) {\n\n\t\tif ( ! $this->validate_shortcode( $atts, $content, $name ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$options = $this->set_options( $atts );\n\n\t\tob_start();\n\t\t\n\t\t?><div id=\"<?php echo esc_attr($options['selector']); ?>\" class=\"<?php echo esc_attr($options['classes']); ?>\" <?php do_action(\"oxygen_vsb_component_attr\", $options, $this->options['tag']); ?>><iframe scrolling=\"no\" frameborder=\"no\" src=\"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/<?php echo $options[\"soundcloud_track_id\"]; ?>&amp;color=<?php echo urlencode($options[\"soundcloud_color\"]); ?>&amp;auto_play=<?php echo urlencode($options[\"soundcloud_auto_play\"]); ?>&amp;hide_related=<?php echo urlencode($options[\"soundcloud_hide_related\"]); ?>&amp;show_comments=<?php echo urlencode($options[\"soundcloud_show_comments\"]); ?>&amp;show_user=true&amp;show_reposts=false&amp;show_teaser=true&amp;visual=true\"></iframe></div><?php\n\n\t\treturn ob_get_clean();\n\t}", "function register_block_core_shortcode()\n {\n }", "function render_block_core_shortcode($attributes, $content)\n {\n }", "function htheme_instagram_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_instagram($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "public static function get( $atts ) {\n\t\treturn UR_Shortcodes::shortcode_wrapper( array( __CLASS__, 'output' ), $atts );\n\t}", "function shortcode_btn ( $atts, $content = \"\" ) {\n\t$a = shortcode_atts( array(\n\t\t'link' => \"#\",\n\t\t'type' => \"default\",\n\t\t'target' => \"\",\n\t\t'class' => \"\",\n\t\t'title' => \"\",\n\t), $atts );\n\t\n\treturn '<a class=\"btn btn-' . $a['type'] . ' ' . $a['class'] . '\" href=\"' . $a['link'] . '\" title=\"' . $a['title'] . '\" ' . (empty($a['target']) ? '' : 'target=\"' . $a['target'] . '\"') . '>' . do_shortcode( $content ) . '</a>';\n}", "function shortcodes_xh_version()\n{\n global $pth;\n\n return '<h1>Shortcodes_xh</h1>'.\"\\n\"\n\t. tag('img src=\"'.$pth['folder']['plugins'].'shortcodes_xh/help/ShortCode_XH.png\" style=\"float: left; margin: 0 20px 20px 0\"')\n\t. '<p>This plugin is to use the familiar <a href=\"https://codex.wordpress.org/Shortcode_API\" target=\"_blank\">WordPress shortcode syntax</a> in CMSimple_XH.</p>'\n\t. '<p>Version: '.SHORTCODES_XH_VERSION.'</p>'.\"\\n\"\n\t. '<p>Copyright &copy; 2015 <a href=\"http://cmsimple-jp.org\" target=\"_blank\">cmsimple-jp.org</a></p>'.\"\\n\"\n\t. '<p>Original <a href=\"https://github.com/Badcow/Shortcodes\" target=\"_blank\">Badcow/Shortcodes Latest commit 5 Apr 2015</a></p>'\n\t. '<p style=\"text-align: justify\">'\n\t. '<b>License</b>'. tag('br') . \"\\n\"\n\t. ' Art License Terms : <a href=\"http://creativecommons.org/licenses/by-sa/4.0/\" target=\"_blank\">Creative Commons License </a> . Detail <a href=\"https://github.com/Badcow/Shortcodes\" target=\"_blank\">https://github.com/Badcow/Shortcodes</a>'. tag('br').\"\\n\"\n\t. ' Software License terms : <a href=\"http://www.gnu.org/licenses/\" target=\"_blank\">GPLv3.</a>';\n}", "function hello_shortcode($atts, $content = null, $tag){\n //put $atts in $a..\n $a = shortcode_atts(array(\n 'class' => 'no_class'\n ), $atts);\n\n return \"<div class='small=12 panel rounded \" . $a['class'] . \"'>\" . $content . \"</div>\";\n}", "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 shortcode_insert_button()\n\t\t{\n\t\t\t$this->config['version']\t\t= '1.0';\n\t\t\t$this->config['is_fullwidth']\t= 'yes';\n\t\t\t$this->config['self_closing']\t= 'no';\n\t\t\t$this->config['base_element']\t= 'yes';\n\n\t\t\t$this->config['name']\t\t\t= __( 'Fullwidth Button', 'avia_framework' );\n\t\t\t$this->config['tab']\t\t\t= __( 'Content Elements', 'avia_framework' );\n\t\t\t$this->config['icon']\t\t\t= AviaBuilder::$path['imagesURL'] . 'sc-button.png';\n\t\t\t$this->config['order']\t\t\t= 84;\n\t\t\t$this->config['target']\t\t\t= 'avia-target-insert';\n\t\t\t$this->config['shortcode']\t\t= 'av_button_big';\n\t\t\t$this->config['tooltip']\t\t= __( 'Creates a colored button that stretches across the full width', 'avia_framework' );\n\t\t\t$this->config['tinyMCE']\t\t= array( 'tiny_always' => true );\n\t\t\t$this->config['preview']\t\t= true;\n\t\t\t$this->config['disabling_allowed'] = true;\n\t\t\t$this->config['id_name']\t\t= 'id';\n\t\t\t$this->config['id_show']\t\t= 'yes';\n\t\t}", "function ground_shortcode_button( $atts, $content = null ) {\n\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\t'link' => '',\n\t\t\t'target' => '_self',\n\t\t\t'class' => 'button',\n\t\t),\n\t\t$atts,\n\t\t'button'\n\t);\n\n\treturn '<a href=\"' . esc_html( $atts['link'] ) . '\" class=\"' . esc_html( $atts['class'] ) . '\" target=\"' . esc_html( $atts['target'] ) . '\">' . esc_html( $content ) . '</a>';\n\n}", "public function base()\n {\n return $this->base;\n }", "function block_shortcode($atts) {\r\n extract(shortcode_atts(array(\r\n\t\t'url' \t=> 'https://www.google.com/',\r\n\t\t'image'\t=> get_stylesheet_directory_uri().'/assets/img/feature_img_swf.png',\r\n\t\t'text'\t=> 'Run A Startup',\r\n\t\t'color'\t=> '#186677',\r\n\t\t), $atts, 'block_shortcode'));\r\n\t\r\n return \r\n\t\t\t'<div class=\"col-md-3 col-lg-3 col-sm-6 col-xs-6 cd-block-row\">\r\n\t\t\t\t<a href=\"'.$url.'\">\r\n\t\t\t\t\t<div id=\"cd-block-id\" class=\"cd-block\">\r\n\t\t\t\t\t\t<img id=\"block-img\" src=\"'.$image.'\" alt=\"\" />\r\n\t\t\t\t\t\t<p style=\"color:'.$color.';\">'.$text.'</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</a>\r\n\t\t\t</div>'\r\n\t;\r\n}", "public function base( $options ){\r\n\t\tif( $this->requiresAdding( 'base' ) ) {\r\n\t\t\t$this->setAdded( 'base' );\r\n\t\t\treturn '<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=\"https://platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>';\r\n\t\t}\r\n\t\treturn '';\r\n\t}", "public function add_short_code()\n {\n add_shortcode('colorYourLife', array($this, 'generate_short_code_content'));\n }", "function jetpack_shortcode_instagram( $atts ) {\n\tglobal $wp_embed;\n\n\tif ( empty( $atts['url'] ) ) {\n\t\treturn '';\n\t}\n\n\treturn $wp_embed->shortcode( $atts, $atts['url'] );\n}", "function add_shortcode( $atts, $content, $name ) {\n\n\t\tif (! $this->validate_shortcode( $atts, $content, $name ) ) {\n return '';\n }\n\n\t\t$options = $this->set_options( $atts );\n\n\t\tob_start();\n\n\t\tif ( is_active_sidebar( $options[\"sidebar_id\"] ) ) {\n\t\t\tdynamic_sidebar( $options[\"sidebar_id\"] );\n\t\t}\n\t\telse {\n\t\t\techo \"No active \\\"\".$options[\"sidebar_id\"].\"\\\" sidebar\";\n\t\t}\n\n\t\treturn ob_get_clean();\n\t}", "function child_shortcode() {\nreturn get_bloginfo('stylesheet_directory');\n}", "public function getBase()\n {\n return $this->base;\n }", "public function getBase()\n {\n return $this->base;\n }", "public function getBase()\n {\n return $this->base;\n }", "function snappy_basedir($typeDir)\t{\r\n\t$newCI =& get_instance();\r\n\t$baseDir = $newCI->config->slash_item('base_url');\r\n\t$sourceDir = 'web/' . 'assets/';\r\n\treturn $baseDir.$sourceDir.$typeDir;\r\n}", "function Twiloop_url_base()\n{\n $url_base = '';\n $url_base = strrpos($_SERVER['PHP_SELF'], '/', -4)+1;\n $url_base = substr($_SERVER['PHP_SELF'], 0, $url_base);\n $url_base = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$url_base;\n return $url_base;\n}", "public function getBase() {\n return $this->base;\n }", "public function getBase() {\n return $this->base;\n }", "public function getBase()\n\t{\n\t\treturn $this->base;\n\t}", "function standard_button( $atts, $content = null ) {\n\textract( shortcode_atts(\n\t\tarray(\n\t\t\t'url' => '',\n\t\t), $atts )\n\t);\n\n\treturn '<div><a class=\"page-btn \" href=\"' . $url . '\" target=\"_blank\">' . $content . '</a></div>';\n}", "function trebi_shortcode_handler($atts, $content=null, $code=\"\") {\n\t\t\t\n\t\t\t$ifstart = '<iframe src=\"https://portali.3bmeteo.com/3bm_meteo.php?';\n\t\t\t$ifend = '</iframe>';\n\t\t\t\n\t\t\tswitch ($code) {\n/* BLOCCO A (A1, A2, A3) */\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=xssmall&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"200\" height=\"220\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-a1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'xssmall',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc((int)$loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"200\" height=\"175\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=lsmall&new=1&c1=999999&c2=ffffff&b1=93c1db&b2=f0f0f0&b3=2a7fae\" width=\"195\" height=\"340\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-a2':\n\t\t\t\t\textract( shortcode_atts( array(\n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lsmall',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'c1' => '999999', \n\t\t\t\t\t 'c2' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => 'f0f0f0', \n\t\t\t\t\t 'b3' => '2a7fae',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&c2='.$c2.'&b1='.$b1.'&b2='.$b2.'&b3='.$b3.'\" width=\"185\" height=\"330\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=lbigor&new=1&c1=ffffff&c2=888888&b1=93c1db&b2=3a8ebd&b3=f0f0f0\" width=\"455\" height=\"195\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-a3':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lbigor',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'c2' => '888888',\n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd', \n\t\t\t\t\t 'b3' => 'f0f0f0',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&c2='.$c2.'&b1='.$b1.'&b2='.$b2.'&b3='.$b3.'\" width=\"455\" height=\"195\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* Blocco B (B1, B2) */\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=treale&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"195\" height=\"202\" frameborder=\"0\"></iframe>*/\n\t\t\t\tcase 'trebi-b1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'treale',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"195\" height=\"165\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&p=1&tm=ssmall&new=1&c1=ffffff&c2=aaaaaa&b1=93c1db&b2=3a8ebd&b3=f0f0f0\" width=\"245\" height=\"405\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-b2':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'p' => '1',\n\t\t\t\t\t 'tm' => 'ssmall',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'c2' => 'aaaaaa',\n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd', \n\t\t\t\t\t 'b3' => 'f0f0f0',\t\t\t\t\t \n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&p='.$p.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&c2='.$c2.'&b1='.$b1.'&b2='.$b2.'&b3='.$b3.'\" width=\"245\" height=\"380\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* BLOCCO C (C1, C2) */\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=lbig&new=1&c1=777777&c2=FFFFFF&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"460\" height=\"405\" frameborder=\"0\"></iframe>*/\n\t\t\t\tcase 'trebi-c1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lbig',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'c1' => '777777', \n\t\t\t\t\t 'c2' => 'FFFFFF',\n\t\t\t\t\t 'c3' => '93C1DB', \n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&c2='.$c2.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"460\" height=\"380\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=oraxora&c1=FFFFFF&c2=777777&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"455\" height=\"505\" frameborder=\"0\"></iframe>*/\n\t\t\t\tcase 'trebi-c2':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'oraxora',\n\t\t\t\t\t 'c1' => 'FFFFFF', \n\t\t\t\t\t 'c2' => '777777',\n\t\t\t\t\t 'c3' => '93C1DB',\n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&c2='.$c2.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"455\" height=\"500\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* BLOCCO D (D1, D2) */\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?idreg=1&new=1&tm=msmall&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"190\" height=\"310\" frameborder=\"0\"></iframe> */\t\n\t\t\t\tcase 'trebi-d1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'idreg' => '1',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'tm' => 'msmall',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlRegione($idreg);\n\t\t\t\t\treturn $ifstart.'idreg='.$idreg.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"190\" height=\"300\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?idreg=1&tm=msmacro&c1=FFFFFF&c2=555555&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"660\" height=\"542\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-d2':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'idreg' => '1',\n\t\t\t\t\t 'tm' => 'msmacro',\n\t\t\t\t\t 'c1' => 'FFFFFF', \n\t\t\t\t\t 'c2' => '555555',\n\t\t\t\t\t 'c3' => '93C1DB',\n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlRegione($idreg);\n\t\t\t\t\treturn $ifstart.'idreg='.$idreg.'&tm='.$tm.'&c1='.$c1.'&c2='.$c2.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"660\" height=\"515\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* BLOCCO E (E1, E2) */\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?loc=6&tm=lsmari&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"190\" height=\"260\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-e1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lsmari',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"190\" height=\"260\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?loc=6&tm=lmari&c1=FFFFFF&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"460\" height=\"390\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-e2':\n\t\t\t\t\textract( shortcode_atts( array(\n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lmari',\n\t\t\t\t\t 'c1' => 'FFFFFF', \n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t 'c3' => '93C1DB',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"460\" height=\"380\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* BLOCCO F (F1, F2) */\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?idreg=1&tm=mmari&c1=FFFFFF&c2=555555&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"650\" height=\"515\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-f1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'idreg' => '1', \n\t\t\t\t\t 'tm' => 'mmari',\n\t\t\t\t\t 'c1' => 'FFFFFF',\n\t\t\t\t\t 'c2' => '555555',\n\t\t\t\t\t 'c3' => '93C1DB', \n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlRegione($idreg);\n\t\t\t\t\treturn $ifstart.'idreg='.$idreg.'&tm='.$tm.'&c1='.$c1.'&c2='.$c2.'&b1='.$b1.'&b2='.$b2.'&c3='.$c3.'\" width=\"650\" height=\"515\" frameborder=\"0\">'.$ifend.$wloc;\n/* BLOCCO G (G1, G2) */\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?loc=6&tm=lsneve&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"190\" height=\"235\" frameborder=\"0\"></iframe> */\t\n\t\t\t\tcase 'trebi-g1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lsneve',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"210\" height=\"240\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?loc=6&tm=lneve&c1=FFFFFF&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"490\" height=\"425\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-g2':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lneve',\n\t\t\t\t\t 'c1' => 'FFFFFF', \n\t\t\t\t\t 'c3' => '93C1DB', \n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"490\" height=\"420\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "private function wrap_in_shortcode ($content, $atts)\n {\n $params = empty ($atts['params']) ? '' : \" params=\\\"{$atts['params']}\\\"\";\n $params .= empty ($atts['stringparams']) ? '' : \" stringparams=\\\"{$atts['stringparams']}\\\"\";\n return \"[{$this->shortcode} xml=\\\"{$atts['xml']}\\\" xslt=\\\"{$atts['xslt']}\\\"$params]\\n\" .\n \"$content\\n[/{$this->shortcode}]\";\n }", "public function shortcode($atts) {\n global $wpdb;\n if (isset($atts['slug'])) {\n $q=$wpdb->prepare(\n \"SELECT id \".\n \"FROM {$wpdb->prefix}h5p_contents \".\n \"WHERE slug=%s\",\n $atts['slug']\n );\n $row=$wpdb->get_row($q,ARRAY_A);\n\n if ($wpdb->last_error) {\n return sprintf(__('Database error: %s.', $this->plugin_slug), $wpdb->last_error);\n }\n\n if (!isset($row['id'])) {\n return sprintf(__('Cannot find H5P content with slug: %s.', $this->plugin_slug), $atts['slug']);\n }\n\n $atts['id']=$row['id'];\n }\n\n $id = isset($atts['id']) ? intval($atts['id']) : NULL;\n $content = $this->get_content($id);\n if (is_string($content)) {\n // Return error message if the user has the correct cap\n return current_user_can('edit_h5p_contents') ? $content : NULL;\n }\n\n // Log view\n new H5P_Event('content', 'shortcode',\n $content['id'],\n $content['title'],\n $content['library']['name'],\n $content['library']['majorVersion'] . '.' . $content['library']['minorVersion']);\n\n return $this->add_assets($content);\n }", "function c4_social_connect($atts,$content=null){\r\n ob_start();\r\n $attr=extract(shortcode_atts(array(\r\n 'href'=>'#',\r\n 'sname'=>'facebook',\r\n 'target'=>'_blank',\r\n 'class'=>''\r\n\r\n\r\n ),$atts));\r\n\r\n return '<a class=\"'.$class.'\" href=\" '.$href.'\"target=\"'.$target.'\">'.$sname.'</a>';\r\n ?>\r\n<?php\r\nreturn ob_get_clean();\r\n}", "public function getBase() {}", "public function renderShortcode(ShortcodeAttributes $atts, $content);", "function echotheme_jquerycycle_shortcode( $atts ){\n\tob_start();\n\tget_template_part('part', 'jquerycycle-gallery');\n\treturn ob_get_clean();\n}", "function Kaya_dropcap( $atts, $content = null ) {\r\n return '<span class=\"dropcap\">' . do_shortcode($content) . '</span>';\r\n}", "public function getShortcodeReplace();", "function crumble_stdDrop($atts, $content = null) {\r\n\treturn '<span class=\"dropcap\">' . do_shortcode ( $content ) . '</span>';\r\n}", "function vslider_short_code($atts) {\r\n\tob_start();\r\n extract(shortcode_atts(array(\r\n\t\t\"name\" => ''\r\n\t), $atts));\r\n\tvslider($name);\r\n\t$output = ob_get_clean();\r\n\treturn $output;\r\n}", "function KwWowHead($atts, $content = null) {\r\n extract(shortcode_atts(array( \"name\" => '', \"url\" => '', \"class\" => ''), $atts));\r\n\t\treturn '<a class=\"'.$class.'\" href=\"'.$url.'\">'.$name.'</a>';\r\n}", "function handle_shortcode( ) {\n\n\tenqueue_files();\n\n\treturn get_location_content( );\n\n}", "function get_base_url() {\n return $this->base_url;\n }", "public function get_base( $type ) : string {\n switch ( $type ) {\n case 'name':\n return $this->get_basename();\n case 'path':\n return $this->get_base_path();\n case 'url':\n return $this->get_base_url();\n default:\n return '';\n }\n }", "public function getBaseUrl() : string\n {\n return $this->base;\n }", "function scratch_SC_lead( $atts , $content = null ) {\n\t\n\t$output = '';\n\t\n\textract( shortcode_atts(\n\t\tarray(\n\t\t),\n\t\t$atts\n\t));\n\t\n\t$output .= '<p class=\"lead\">';\n\t\t$output .= do_shortcode( $content );\n\t$output .= '</p>';\n\t\n\treturn $output;\n\n}", "function tweetbutton_shortcode($atts) {\r\n\tglobal $tweetbutton_defaults;\r\n\t$args = shortcode_atts($tweetbutton_defaults, $atts);\r\n\treturn get_tweetbutton_button($args);\r\n}", "function shortcode_karaja( $atts, $content = null ) {\n return '<div class=\"lingua-kr\">'.$content.'</div>';\n}", "public function create_shortcodes() {\n \n }", "protected function get_parent_shortcode() {\r\n return 'owp_fs';\r\n }", "public static function base()\n {\n\n static $base = false;\n\n if ($base === false) {\n\n $base = Config::get('monstra.base_url');\n\n // Try to autodetect base url if its not configured\n if ($base === '' && isset($_SERVER['HTTP_HOST'])) {\n\n $protocol = Request::isSecure() ? 'https' : 'http';\n\n $script = $_SERVER['SCRIPT_NAME'];\n\n $base = rtrim($protocol . '://' . $_SERVER['HTTP_HOST'] . str_replace(basename($script), '', $script), '/');\n }\n\n // Add index.php?\n !Config::get('monstra.clean_urls') && $base .= '/index.php';\n }\n\n return $base;\n }", "function base_url(){\n $url = BASE_URL;\n return $url;\n }", "function add_shortcode_interface() {\n\tob_start();\n?>\n\t<a href=\"#TB_inline?width=600&height=700&inlineId=select-shortcode-form\" class=\"thickbox button\" id=\"add-shortcode\" title=\"Add Shortcode\">Add Shortcode</a>\n<?php\n\techo ob_get_clean();\n}", "function nooshin_a_text_icon_shortcode( $atts, $content = null ) {\n //set default attributes and values\n $values = shortcode_atts( array(\n 'url' \t=> '#',\n 'target'\t=> '_self',\n 'icon'=>'fab fa-telegram',\n ), $atts );\n\n $result = '<p><i class=\" mr-1 '. $values['icon'] .'\"></i>';\n if($values['url']!='#' and $values['url']!=\"\"){\n $result=$result.'<a class=\" text-dark\" href=\"'. esc_attr($values['url']) .'\" target=\"'. esc_attr($values['target']) .'\">'. $content .'</a></p>';\n }\n else{\n $result=$result.$content .'</p>';\n }\n return $result;\n\n}", "function render_sc_myShortcode( $context ) {\n\tob_start();\n\t?>\n<div>Some: <?=$context['disp1']?></div>\n<div>Another: <?=$context['disp2']?></div>\n<?php\n\treturn ob_get_clean();\n}", "function crumble_adsense( $atts, $content = null ) {\r\n\textract( shortcode_atts( array(\r\n\t\t'float' => 'left',\r\n\t\t'ad_client' => 'pub-XXXXXXXXXXX',\r\n\t\t'ad_slot' => 'XXXXXXXXXX',\r\n\t\t'ad_width' => '250',\r\n\t\t'ad_height' => '250'\r\n\r\n\t), $atts ) );\r\n\t\r\n\t$code = '<div class=\"adsense-'. $float . '\">\r\n\t\t<script type=\"text/javascript\"><!--\r\n \t\tgoogle_ad_client = \"' . $ad_client . '\";\r\n \t\tgoogle_ad_slot = \"' . $ad_slot . '\";\r\n \t\tgoogle_ad_width = ' . $ad_width . ';\r\n \t\tgoogle_ad_height = ' . $ad_height .';\r\n \t\t//-->\r\n \t\t</script>\r\n \t\t<script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>\r\n\t\t</div>';\r\n\t\t\t\t\t\r\n\treturn $code;\r\n}", "function ts_get_main_page_builder_content($content)\r\n{\r\n\tglobal $post;\r\n\t\r\n\tif ($post -> post_type != 'page')\r\n\t{\r\n\t\treturn $content;\r\n\t}\r\n\t$page_builder = get_post_meta($post -> ID,'page_builder_content',true);\r\n\treturn $content. do_shortcode($page_builder);\r\n}", "function base_url(){\n return BASE_URL;\n }", "function shortcode_map() {\r\n\t\t\tif ( ! function_exists( 'vc_map' ) ) {\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\r\n\t\t\t$base = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_preset',\r\n\t\t\t\t\t'heading' => __( 'Style Preset', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'preset',\r\n\t\t\t\t\t'tooltip' => MPC_Helper::style_presets_desc(),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t\t'shortcode' => $this->shortcode,\r\n\t\t\t\t\t'wide_modal' => true,\r\n\t\t\t\t\t'description' => __( 'Choose preset or create new one.', 'mpc' ),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_content',\r\n\t\t\t\t\t'heading' => __( 'Content Preset', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'content_preset',\r\n\t\t\t\t\t'tooltip' => MPC_Helper::content_presets_desc(),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t\t'shortcode' => $this->shortcode,\r\n\t\t\t\t\t'extended' => true,\r\n\t\t\t\t\t'description' => __( 'Choose preset or create new one.', 'mpc' ),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'dropdown',\r\n\t\t\t\t\t'heading' => __( 'Style', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'style',\r\n\t\t\t\t\t'admin_label' => true,\r\n\t\t\t\t\t'tooltip' => __( 'Select buttons set style:<br><b>Horizontal</b>: horizontal buttons side by side;<br><b>Vertical</b>: vertical buttons one under the other.', 'mpc' ),\r\n\t\t\t\t\t'value' => array(\r\n\t\t\t\t\t\t__( 'Horizontal', 'mpc' ) => 'horizontal',\r\n\t\t\t\t\t\t__( 'Vertical', 'mpc' ) => 'vertical',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'std' => 'horizontal',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_text',\r\n\t\t\t\t\t'heading' => __( 'Separator Space', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'space',\r\n\t\t\t\t\t'tooltip' => __( 'Define separator space between buttons. Adds additional space on sides of separator to prevent it from overlapping button content.', 'mpc' ),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t\t'addon' => array(\r\n\t\t\t\t\t\t'icon' => 'dashicons dashicons-leftright',\r\n\t\t\t\t\t\t'align' => 'prepend',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'label' => 'px',\r\n\t\t\t\t\t'validate' => true,\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'heading' => __( 'Full Width', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'fullwidth',\r\n\t\t\t\t\t'tooltip' => __( 'Check to stretch buttons to 100% width of their container.', 'mpc' ),\r\n\t\t\t\t\t'value' => array( __( 'Enable', 'mpc' ) => 'true' ),\r\n\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t);\r\n\r\n\t\t\t$icon_animation = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_animation',\r\n\t\t\t\t\t'heading' => __( 'Animation Effect', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'icon_animation',\r\n\t\t\t\t\t'tooltip' => __( 'Choose one of the animation types. You can apply the animation to the preview box on the right with the <b>Refresh</b> button.', 'mpc' ),\r\n\t\t\t\t\t'value' => MPC_Snippets::$animations_loop_list,\r\n\t\t\t\t\t'std' => 'none',\r\n\t\t\t\t\t'group' => __( 'Separator', 'mpc' ),\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-12 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t);\r\n\r\n\t\t\t$margin = MPC_Snippets::vc_margin();\r\n\t\t\t$animation = MPC_Snippets::vc_animation();\r\n\t\t\t$class = MPC_Snippets::vc_class();\r\n\r\n\t\t\t$background = MPC_Snippets::vc_background( array( 'group' => __( 'Separator', 'mpc' ) ) );\r\n\t\t\t$border = MPC_Snippets::vc_border( array( 'group' => __( 'Separator', 'mpc' ) ) );\r\n\t\t\t$padding = MPC_Snippets::vc_padding( array( 'group' => __( 'Separator', 'mpc' ) ) );\r\n\t\t\t$icon_margin = MPC_Snippets::vc_margin( array( 'prefix' => 'icon', 'group' => __( 'Separator', 'mpc' ) ) );\r\n\t\t\t$icon = MPC_Snippets::vc_icon( array( 'group' => __( 'Separator', 'mpc' ) ) );\r\n\r\n\t\t\t$params = array_merge( $base, $margin, $icon, $icon_animation, $background, $border, $padding, $icon_margin, $animation, $class );\r\n\r\n\t\t\treturn array(\r\n\t\t\t\t'name' => __( 'Buttons Set', 'mpc' ),\r\n\t\t\t\t'description' => __( 'Buttons with separator', 'mpc' ),\r\n\t\t\t\t'base' => 'mpc_button_set',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'icon' => 'mpc-shicon-buttons-set',\r\n\t\t\t\t'category' => __( 'MPC', 'mpc' ),\r\n\t\t\t\t'as_parent' => array( 'only' => 'mpc_button, mpc_lightbox' ),\r\n\t\t\t\t'content_element' => true,\r\n\t\t\t\t\"js_view\" => 'VcColumnView',\r\n\t\t\t\t'params' => $params,\r\n\t\t\t);\r\n\t\t}", "function tz_one_third( $atts, $content = null ) {\n return '<div class=\"one_third\">' . do_shortcode($content) . '</div>';\n}", "function echotheme_nivoslider_shortcode($atts)\n{\n\tob_start();\n\tget_template_part('part', 'nivo-slider');\n\treturn ob_get_clean();\n}", "protected function getShortcodeName()\n {\n return 'instagram';\n }", "function address_shortcode() {\n ob_start();\n get_template_part('address');\n return ob_get_clean();\n}", "function clientbox_shortcode_helper($image){\n return '[client logo=\"' . get_static_uri($image) . '\"]';\n}", "public function __construct() {\n\n global $canvys;\n\n // Allowed background image settings\n $overlay_opacity_options = array(\n 'none' => __( 'None, do not display an overlay color', 'canvys' ),\n );\n\n for ( $i=10; $i<=90; $i+=10 ) {\n $overlay_opacity_options[$i] = $i . '%';\n }\n\n $min_height_options = array( 'none' => __( 'None, let the content dictate the height', 'canvys' ) );\n for ($i=5;$i<=100;$i+=5 ) {\n $min_height_options[$i] = $i.'%';\n }\n\n $this->config = array(\n\n // Handle will be used to use this shortcode\n 'handle' => 'cv_section',\n\n // Whether or not this is a shortcode composer element\n 'composer_element' => false,\n\n // Whether or not this is a template builder element\n 'builder_element' => true,\n\n // Used by the template builder to determine where module can be dropped\n 'drop_target' => 0,\n\n // Used by the template builder to determine where module can have other\n // modules dropped inside of it\n 'drop_zone' => 1,\n\n // Title will be used to identify this shortcode\n 'title' => __( 'Content Section', 'canvys' ),\n\n // Icon will be used to represent this shortcode in composer/builder\n // List of available icons can be found in icons.json\n 'icon' => 'progress-0',\n\n // Whether or not shortcode is self closing\n 'self_closing' => false,\n\n // If shortcode is not self closing, specify its default content\n 'default_content' => null,\n\n // Specify whether or not content is directly editable\n 'content_editor' => false,\n\n // Specify whether or not the content is composed of another shortcode\n 'content_element' => false,\n\n // Provide an explanation of what this shortcode does\n 'explanation' => __( 'Full screen content sections are the foundation for your pages content, they provide the background images, color schemes, and the perfect way to divide the content of your page and add some organization. Content sections can contain any number or row modules which can be used to further organize your content.', 'canvys' ),\n\n // Array of shortcode settings and their respective attributes\n 'attributes' => array(\n\n new CV_Shortcode_Text_Control( 'id', array(\n 'title' => __( 'Section ID', 'canvys' ),\n 'description' => __( 'Set the ID attribute for this section, this allows you to apply unique styles to this section with CSS or to link to this section in the creation of a one page website.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'color_scheme', array(\n 'title' => __( 'Color Scheme', 'canvys' ),\n 'description' => __( 'This will control the control scheme for the section itself and all of the modules placed inside of it. These different color schemes can be edited by navigating to Appearance > Color Scheme.', 'canvys' ),\n 'default' => 'main',\n 'options' => array(\n 'main' => __( 'Main Content', 'canvys' ),\n 'alternate' => __( 'Alternate Content', 'canvys' ),\n 'header' => __( 'Header', 'canvys' ),\n 'footer' => __( 'Footer', 'canvys' ),\n 'socket' => __( 'Socket', 'canvys' ),\n 'white' => __( 'All White Content (For sections with dark backgrounds)', 'canvys' ),\n 'black' => __( 'All Black Content (For sections with light backgrounds)', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'bg_source', array(\n 'title' => __( 'Background Source', 'canvys' ),\n 'description' => __( 'Specify how the background of this section should be dislayed.', 'canvys' ),\n 'default' => 'default',\n 'options' => array(\n 'default' => __( 'Default background', 'canvys' ),\n 'color' => __( 'Custom color', 'canvys' ),\n 'preset' => __( 'Preset pattern', 'canvys' ),\n 'image' => __( 'Custom image', 'canvys' ),\n 'video' => __( 'HTML5 video', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_BG_Pattern_Control( 'bg_preset_pattern', array(\n 'title' => __( 'Preset Patterns', 'canvys' ),\n 'description' => __( 'Select a preset pattern to use as the background for this section.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Color_Control( 'bg_color', array(\n 'title' => __( 'Background Color', 'canvys' ),\n 'description' => __( 'Specify a custom background color to be used for this section, leave this blank to use the default background color.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Image_Control( 'bg_image', array(\n 'title' => __( 'Background Image', 'canvys' ),\n 'description' => __( 'The background image for this section. This will be displayed on top of the background color.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'bg_style', array(\n 'title' => __( 'Background Image Style', 'canvys' ),\n 'description' => __( 'Whether or not the background image should be tiled, or cover the section completely. Tiled will display the image at its actual size but it will repeat to fill the section. Cover will (potentially) increase or decrease either the width or height of the image to ensure that it will cover the section, please note that the image will be scaled proportionately.', 'canvys' ),\n 'default' => 'cover',\n 'options' => array(\n 'cover' => __( 'Cover', 'canvys' ),\n 'tile' => __( 'Tiled', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'bg_attachment', array(\n 'title' => __( 'Background Image Attachment', 'canvys' ),\n 'description' => __( 'This will dictate how the image should behave as the page is scrolled. Scroll will allow the background image to scroll normally with the rst of the page, while fixed will leave the image fixed in place as the page scrolles for what is commonly reffered to as a \"parrallax\" effect.', 'canvys' ),\n 'default' => 'scroll',\n 'options' => array(\n 'scroll' => __( 'Scroll', 'canvys' ),\n 'fixed' => __( 'Fixed', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Image_Control( 'bg_video_fallback', array(\n 'title' => __( 'HTML5 Video Background Fallback Image', 'canvys' ),\n 'description' => __( 'Select an image to be used as the background on devices that dont fully support HTML5 video elements. Please note that this inlcudes nearly all mobile devices and tablets.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_File_Control( 'bg_video_webm', array(\n 'title' => __( 'HTML5 Video Background .webm file', 'canvys' ),\n 'description' => __( 'Specify the webm file to use for the video background.', 'canvys' ),\n 'file_type' => 'video',\n ) ),\n\n new CV_Shortcode_File_Control( 'bg_video_ogv', array(\n 'title' => __( 'HTML5 Video Background .ogv file', 'canvys' ),\n 'description' => __( 'Specify the ogv file to use for the video background.', 'canvys' ),\n 'file_type' => 'video',\n ) ),\n\n new CV_Shortcode_File_Control( 'bg_video_mp4', array(\n 'title' => __( 'HTML5 Video Background .mp4 file', 'canvys' ),\n 'description' => __( 'Specify the mp4 file to use for the video background.', 'canvys' ),\n 'file_type' => 'video',\n ) ),\n\n new CV_Shortcode_Select_Control( 'bg_scrolling', array(\n 'title' => __( 'Scrolling Background Direction', 'canvys' ),\n 'description' => __( 'Enable scrolling background effect for this section. Keep in mind this works best with background images that tile perfectly.', 'canvys' ),\n 'default' => 'none',\n 'options' => array(\n 'none' => __( 'No scrolling effect', 'canvys' ),\n 'top' => array(\n 'label' => __( 'Upwards', 'canvys' ),\n 'options' => array(\n 'up-left' => __( 'Up Left', 'canvys' ),\n 'up' => __( 'Up', 'canvys' ),\n 'up-right' => __( 'Up Right', 'canvys' ),\n ),\n ),\n 'middle' => array(\n 'label' => __( 'Horizontal', 'canvys' ),\n 'options' => array(\n 'left' => __( 'Left', 'canvys' ),\n 'right' => __( 'Right', 'canvys' ),\n ),\n ),\n 'bottom' => array(\n 'label' => __( 'Downwards', 'canvys' ),\n 'options' => array(\n 'down-left' => __( 'Down Left', 'canvys' ),\n 'down' => __( 'Down', 'canvys' ),\n 'down-right' => __( 'Down Right', 'canvys' ),\n ),\n ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'bg_scrolling_speed', array(\n 'title' => __( 'Scrolling Background Speed', 'canvys' ),\n 'description' => __( 'Specify how quickly the background should scroll.', 'canvys' ),\n 'default' => 'normal',\n 'options' => array(\n 'slow' => __( 'Slow', 'canvys' ),\n 'normal' => __( 'Normal', 'canvys' ),\n 'fast' => __( 'Fast', 'canvys' ),\n 'very-fast' => __( 'very Fast', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'overlay_opacity', array(\n 'title' => __( 'Background Overlay Opacity', 'canvys' ),\n 'description' => __( 'Specify whether or not a color should be overlayed on top of the section background, and at what opacity.', 'canvys' ),\n 'default' => 'none',\n 'options' => $overlay_opacity_options,\n ) ),\n\n new CV_Shortcode_Color_Control( 'overlay_color', array(\n 'title' => __( 'Background Overlay Color', 'canvys' ),\n 'description' => __( 'Specify a color to be overlayed on top of the section background.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'sidebar_layout', array(\n 'title' => __( 'Sidebar Layout', 'canvys' ),\n 'description' => __( 'The layout of this section, if you use either left or right sidebar you will be able to shoose which sidebar is displayed.', 'canvys' ),\n 'default' => 'no-sidebar',\n 'options' => array(\n 'no-sidebar' => __( 'No sidebar', 'canvys' ),\n 'sidebar-right' => __( 'Right Sidebar', 'canvys' ),\n 'sidebar-left' => __( 'Left Sidebar', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Sidebar_Select_Control( 'sidebar', array(\n 'title' => __( 'Sidebar', 'canvys' ),\n 'description' => __( 'The sidebar to be displayed.', 'canvys' ),\n 'default' => 'sidebar',\n ) ),\n\n new CV_Shortcode_Select_Control( 'parallax', array(\n 'title' => __( 'Enable Parallax', 'canvys' ),\n 'description' => __( 'Enable parallax scrolling effect for this sections content', 'canvys' ),\n 'default' => 'false',\n 'options' => array(\n 'false' => __( 'No parallax effect', 'canvys' ),\n 'true' => __( 'Yes, enable parallax scrolling', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'min_height', array(\n 'title' => __( 'Minimum Height', 'canvys' ),\n 'description' => __( 'The mimimun height of the section (if specified) will be based on a percentage of total screen height.', 'canvys' ),\n 'default' => 'none',\n 'options' => $min_height_options,\n ) ),\n\n new CV_Shortcode_Select_Control( 'stretched', array(\n 'title' => __( 'Stretched Content', 'canvys' ),\n 'description' => __( 'Allow the content of this section to stretch to the size of the layout.', 'canvys' ),\n 'default' => 'false',\n 'options' => array(\n 'false' => __( 'No, do not enable stretched content', 'canvys' ),\n 'free' => __( 'yes, stretched with side padding', 'canvys' ),\n 'stretched' => __( 'yes, stretched without side padding', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'border_top', array(\n 'title' => __( 'Top Border', 'canvys' ),\n 'description' => __( 'Specify how the top border should be styled', 'canvys' ),\n 'default' => 'none',\n 'options' => array(\n 'none' => __( 'No special styling', 'canvys' ),\n 'border' => __( 'Simple line border', 'canvys' ),\n 'shadow' => __( 'Faint inner shadow', 'canvys' ),\n 'shadow-border' => __( 'Line border & shadow', 'canvys' ),\n 'arrow' => __( 'Arrow pointing up', 'canvys' ),\n 'arrow-border' => __( 'Arrow pointing up & border', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'border_bottom', array(\n 'title' => __( 'Bottom Border', 'canvys' ),\n 'description' => __( 'Specify how the bottom border should be styled', 'canvys' ),\n 'default' => 'none',\n 'options' => array(\n 'none' => __( 'No special styling', 'canvys' ),\n 'border' => __( 'Simple line border', 'canvys' ),\n 'shadow' => __( 'Faint inner shadow', 'canvys' ),\n 'shadow-border' => __( 'Line border & shadow', 'canvys' ),\n 'arrow' => __( 'Arrow pointing down', 'canvys' ),\n 'arrow-border' => __( 'Arrow pointing down & border', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'padding_top', array(\n 'title' => __( 'Top Padding', 'canvys' ),\n 'description' => __( 'The empty space above the content in this section.', 'canvys' ),\n 'default' => 'normal',\n 'options' => array(\n 'none' => __( 'None', 'canvys' ),\n 'less' => __( 'Less', 'canvys' ),\n 'normal' => __( 'Normal', 'canvys' ),\n 'more' => __( 'More', 'canvys' ),\n 'much-more' => __( 'Much More', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'padding_bottom', array(\n 'title' => __( 'Bottom Padding', 'canvys' ),\n 'description' => __( 'The empty space below the content in this section.', 'canvys' ),\n 'default' => 'normal',\n 'options' => array(\n 'none' => __( 'None', 'canvys' ),\n 'less' => __( 'Less', 'canvys' ),\n 'normal' => __( 'Normal', 'canvys' ),\n 'more' => __( 'More', 'canvys' ),\n 'much-more' => __( 'Much More', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'visibility', array(\n 'title' => __( 'Visibility', 'canvys' ),\n 'description' => __( 'Which devices this section should be visible on. This is great for optimizing your website for all devices. Please note that this setting is not applicable when full page content sliding is active.', 'canvys' ),\n 'default' => 'all',\n 'options' => $canvys['visibility_options'],\n ) ),\n\n new CV_Shortcode_Dev_Control( 'forced_height', array(\n 'default' => null,\n ) ),\n\n new CV_Shortcode_Dev_Control( 'class', array(\n 'default' => null,\n ) ),\n\n ),\n );\n }" ]
[ "0.72766167", "0.65827596", "0.65737575", "0.63273996", "0.6323596", "0.6322295", "0.627058", "0.6262859", "0.6241826", "0.62233835", "0.61790216", "0.6156796", "0.6142567", "0.6130922", "0.61308235", "0.6099143", "0.60919636", "0.6080755", "0.6079034", "0.6068103", "0.60660416", "0.6054623", "0.6037722", "0.60306805", "0.6013522", "0.59956795", "0.59848905", "0.5981302", "0.5974876", "0.59718066", "0.5968903", "0.5960673", "0.594816", "0.5945524", "0.59444445", "0.5913358", "0.590833", "0.588731", "0.588508", "0.5867965", "0.5863527", "0.5840232", "0.58400136", "0.5826277", "0.5819459", "0.5819012", "0.57851666", "0.5774775", "0.5765489", "0.576207", "0.57473403", "0.5738498", "0.5738498", "0.5738498", "0.5732466", "0.5732167", "0.5727353", "0.5727353", "0.5724858", "0.5714953", "0.57030857", "0.5700703", "0.5694871", "0.56911665", "0.5689636", "0.5688586", "0.5686554", "0.5684376", "0.56806266", "0.56767076", "0.5664402", "0.56613684", "0.5657113", "0.5645166", "0.5643308", "0.5637575", "0.56345844", "0.5632524", "0.5632115", "0.56300527", "0.56283325", "0.5624579", "0.56241643", "0.5622973", "0.5622684", "0.56174344", "0.5616513", "0.56127864", "0.5611323", "0.56087947", "0.56051487", "0.5604977", "0.5601169", "0.5599721", "0.5599168", "0.55974966" ]
0.5814214
50
Maps shortcode to Visual Composer
public function vcMap() { if(function_exists('vc_map')) { vc_map( array( 'name' => esc_html__('Album Player', 'qode-music'), 'base' => $this->base, 'category' => esc_html__('by QODE MUSIC','qode-music'), 'icon' => 'icon-wpb-album-player extended-custom-icon-qode', 'allowed_container_element' => 'vc_row', 'params' => array( array( 'type' => 'dropdown', 'heading' => esc_html__('Type','qode-music'), 'param_name' => 'type', 'value' => array( esc_html__('Standard','qode-music') => 'standard', esc_html__('Compact','qode-music') => 'compact', esc_html__('Simple','qode-music') => 'simple' ), 'admin_label' => true ), array( 'type' => 'dropdown', 'heading' => esc_html__('Album','qode-music'), 'param_name' => 'album', 'value' => $this->getAlbums(), 'admin_label' => true, 'save_always' => true ), array( 'type' => 'dropdown', 'heading' => esc_html__('Content In Grid','qode-music'), 'param_name' => 'full_width_bg', 'value' => array( esc_html__('Yes','qode-music') => 'yes', esc_html__('No','qode-music') => 'no' ), 'admin_label' => true, 'save_always' => true ), array( 'type' => 'colorpicker', 'heading' => esc_html__('Player Background Color','qode-music'), 'param_name' => 'bg_color', 'dependency' => array('element' => 'skin','value'=> 'transparent'), ), array( 'type' => 'colorpicker', 'heading' => esc_html__('Play Button Background Color','qode-music'), 'param_name' => 'play_bg_color', 'dependency' => array('element' => 'skin','value'=> 'transparent'), ), array( 'type' => 'colorpicker', 'heading' => esc_html__('Navigation Buttons Background Color','qode-music'), 'param_name' => 'nav_bg_color', 'dependency' => array('element' => 'skin','value'=> 'transparent'), ), array( 'type' => 'dropdown', 'heading' => esc_html__('Skin','qode-music'), 'param_name' => 'skin', 'value' => array( esc_html__('Light','qode-music') => 'light', esc_html__('Dark','qode-music') => 'dark', esc_html__('Transparent','qode-music') => 'transparent' ), 'admin_label' => true, 'save_always' => true ) ) ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shortcode_map() {\r\n\t\t\tif ( ! function_exists( 'vc_map' ) ) {\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\r\n\t\t\t$base = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_preset',\r\n\t\t\t\t\t'heading' => __( 'Style Preset', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'preset',\r\n\t\t\t\t\t'tooltip' => MPC_Helper::style_presets_desc(),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t\t'shortcode' => $this->shortcode,\r\n\t\t\t\t\t'wide_modal' => true,\r\n\t\t\t\t\t'description' => __( 'Choose preset or create new one.', 'mpc' ),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_content',\r\n\t\t\t\t\t'heading' => __( 'Content Preset', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'content_preset',\r\n\t\t\t\t\t'tooltip' => MPC_Helper::content_presets_desc(),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t\t'shortcode' => $this->shortcode,\r\n\t\t\t\t\t'extended' => true,\r\n\t\t\t\t\t'description' => __( 'Choose preset or create new one.', 'mpc' ),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'dropdown',\r\n\t\t\t\t\t'heading' => __( 'Style', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'style',\r\n\t\t\t\t\t'admin_label' => true,\r\n\t\t\t\t\t'tooltip' => __( 'Select buttons set style:<br><b>Horizontal</b>: horizontal buttons side by side;<br><b>Vertical</b>: vertical buttons one under the other.', 'mpc' ),\r\n\t\t\t\t\t'value' => array(\r\n\t\t\t\t\t\t__( 'Horizontal', 'mpc' ) => 'horizontal',\r\n\t\t\t\t\t\t__( 'Vertical', 'mpc' ) => 'vertical',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'std' => 'horizontal',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_text',\r\n\t\t\t\t\t'heading' => __( 'Separator Space', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'space',\r\n\t\t\t\t\t'tooltip' => __( 'Define separator space between buttons. Adds additional space on sides of separator to prevent it from overlapping button content.', 'mpc' ),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t\t'addon' => array(\r\n\t\t\t\t\t\t'icon' => 'dashicons dashicons-leftright',\r\n\t\t\t\t\t\t'align' => 'prepend',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'label' => 'px',\r\n\t\t\t\t\t'validate' => true,\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'heading' => __( 'Full Width', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'fullwidth',\r\n\t\t\t\t\t'tooltip' => __( 'Check to stretch buttons to 100% width of their container.', 'mpc' ),\r\n\t\t\t\t\t'value' => array( __( 'Enable', 'mpc' ) => 'true' ),\r\n\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t);\r\n\r\n\t\t\t$icon_animation = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_animation',\r\n\t\t\t\t\t'heading' => __( 'Animation Effect', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'icon_animation',\r\n\t\t\t\t\t'tooltip' => __( 'Choose one of the animation types. You can apply the animation to the preview box on the right with the <b>Refresh</b> button.', 'mpc' ),\r\n\t\t\t\t\t'value' => MPC_Snippets::$animations_loop_list,\r\n\t\t\t\t\t'std' => 'none',\r\n\t\t\t\t\t'group' => __( 'Separator', 'mpc' ),\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-12 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t);\r\n\r\n\t\t\t$margin = MPC_Snippets::vc_margin();\r\n\t\t\t$animation = MPC_Snippets::vc_animation();\r\n\t\t\t$class = MPC_Snippets::vc_class();\r\n\r\n\t\t\t$background = MPC_Snippets::vc_background( array( 'group' => __( 'Separator', 'mpc' ) ) );\r\n\t\t\t$border = MPC_Snippets::vc_border( array( 'group' => __( 'Separator', 'mpc' ) ) );\r\n\t\t\t$padding = MPC_Snippets::vc_padding( array( 'group' => __( 'Separator', 'mpc' ) ) );\r\n\t\t\t$icon_margin = MPC_Snippets::vc_margin( array( 'prefix' => 'icon', 'group' => __( 'Separator', 'mpc' ) ) );\r\n\t\t\t$icon = MPC_Snippets::vc_icon( array( 'group' => __( 'Separator', 'mpc' ) ) );\r\n\r\n\t\t\t$params = array_merge( $base, $margin, $icon, $icon_animation, $background, $border, $padding, $icon_margin, $animation, $class );\r\n\r\n\t\t\treturn array(\r\n\t\t\t\t'name' => __( 'Buttons Set', 'mpc' ),\r\n\t\t\t\t'description' => __( 'Buttons with separator', 'mpc' ),\r\n\t\t\t\t'base' => 'mpc_button_set',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'icon' => 'mpc-shicon-buttons-set',\r\n\t\t\t\t'category' => __( 'MPC', 'mpc' ),\r\n\t\t\t\t'as_parent' => array( 'only' => 'mpc_button, mpc_lightbox' ),\r\n\t\t\t\t'content_element' => true,\r\n\t\t\t\t\"js_view\" => 'VcColumnView',\r\n\t\t\t\t'params' => $params,\r\n\t\t\t);\r\n\t\t}", "public function vc_map_shortcode() {\n\t\t\tvc_map( array(\n\t\t\t\t'name' => _x( 'Social Icons', 'backend', 'vc-elements-pt' ),\n\t\t\t\t'base' => $this->shortcode_name(),\n\t\t\t\t'category' => _x( 'Content', 'backend', 'vc-elements-pt' ),\n\t\t\t\t'icon' => get_template_directory_uri() . '/vendor/proteusthemes/visual-composer-elements/assets/images/pt.svg',\n\t\t\t\t'as_parent' => array( 'only' => 'pt_vc_social_icon' ),\n\t\t\t\t'content_element' => true,\n\t\t\t\t'js_view' => 'VcColumnView',\n\t\t\t\t'params' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'heading' => _x( 'Open link in new tab', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'new_tab',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t) );\n\t\t}", "function add_shortcode( $atts, $content = null, $name = null ) {\n\n\t\tif ( ! $this->validate_shortcode( $atts, $content, $name ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$options = $this->set_options( $atts );\n\n\t\tob_start();\n\t\t\n\t\t?><div id=\"<?php echo esc_attr($options['selector']); ?>\" class=\"<?php echo esc_attr($options['classes']); ?>\" <?php do_action(\"oxygen_vsb_component_attr\", $options, $this->options['tag']); ?>><iframe scrolling=\"no\" frameborder=\"no\" src=\"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/<?php echo $options[\"soundcloud_track_id\"]; ?>&amp;color=<?php echo urlencode($options[\"soundcloud_color\"]); ?>&amp;auto_play=<?php echo urlencode($options[\"soundcloud_auto_play\"]); ?>&amp;hide_related=<?php echo urlencode($options[\"soundcloud_hide_related\"]); ?>&amp;show_comments=<?php echo urlencode($options[\"soundcloud_show_comments\"]); ?>&amp;show_user=true&amp;show_reposts=false&amp;show_teaser=true&amp;visual=true\"></iframe></div><?php\n\n\t\treturn ob_get_clean();\n\t}", "public function vc_map_shortcode() {\n\t\t\tvc_map( array(\n\t\t\t\t'name' => _x( 'Facebook Box', 'backend', 'vc-elements-pt' ),\n\t\t\t\t'base' => $this->shortcode_name(),\n\t\t\t\t'category' => _x( 'Social', 'backend', 'vc-elements-pt' ),\n\t\t\t\t'icon' => get_template_directory_uri() . '/vendor/proteusthemes/visual-composer-elements/assets/images/pt.svg',\n\t\t\t\t'params' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => _x( 'Title', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'title',\n\t\t\t\t\t\t'value' => 'Facebook',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => _x( 'FB Page to like', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'description' => _x( 'Input the whole FB page url. Example: https://www.facebook.com/ProteusThemes', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'fb_page_url',\n\t\t\t\t\t\t'value' => 'https://www.facebook.com/ProteusThemes',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => _x( 'Width', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'description' => _x( 'Input width in pixels. Min: 180, Max: 500', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'width',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => _x( 'Height', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'description' => _x( 'Input height in pixels. Min: 70', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'height',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'heading' => _x( 'Options', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'checkbox_options',\n\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t'Hide Cover Photo' => 'hide_cover',\n\t\t\t\t\t\t\t'Hide Friend\\'s Faces' => 'show_facepile',\n\t\t\t\t\t\t\t'Show Page Posts' => 'show_posts',\n\t\t\t\t\t\t\t'Use Small Header' => 'small_header',\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}", "function TS_VCSC_RegisterAllShortcodes() {\r\n\t\t\tif ($this->TS_VCSC_PluginSupport == \"true\") {\r\n\t\t\t\t// Standard Elements\r\n\t\t\t\tforeach ($this->TS_VCSC_Visual_Composer_Elements as $ElementName => $element) {\r\n\t\t\t\t\tif ($this->TS_VCSC_Visual_Composer_Elements[$ElementName]['active'] == \"true\") {\r\n\t\t\t\t\t\tif ($element['type'] == 'internal') {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (($this->TS_VCSC_VCFrontEditMode == \"true\") || (is_admin() == false) || ($this->TS_VCSC_PluginAJAX == \"true\") || ($this->TS_VCSC_PluginAlways == \"true\")) {\r\n\t\t\t\t\t\t\t\trequire_once($this->shortcode_dir.'ts_vcsc_shortcode_' . $element['file'] . '.php');\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Load Inter-Dependent Shortocdes\r\n\t\t\t\tif ((($this->TS_VCSC_Visual_Composer_Elements['TS Icon Info Box']['active'] == \"true\") || ($this->TS_VCSC_Visual_Composer_Elements['TS Panel Flip']['active'] == \"true\")) && ($this->TS_VCSC_Visual_Composer_Elements['TS Creative Link']['active'] == \"false\")) {\r\n\t\t\t\t\tif (($this->TS_VCSC_VCFrontEditMode == \"true\") || (is_admin() == false) || ($this->TS_VCSC_PluginAJAX == \"true\") || ($this->TS_VCSC_PluginAlways == \"true\")) {\r\n\t\t\t\t\t\trequire_once($this->shortcode_dir.'ts_vcsc_shortcode_' . $this->TS_VCSC_Visual_Composer_Elements['TS Creative Link']['file'] . '.php');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t// Demo Elements\r\n\t\t\t\tforeach ($this->TS_VCSC_Visual_Composer_Demos as $ElementName => $element) {\r\n\t\t\t\t\tif ($this->TS_VCSC_Visual_Composer_Demos[$ElementName]['active'] == \"true\") {\r\n\t\t\t\t\t\tif (($this->TS_VCSC_VCFrontEditMode == \"true\") || (is_admin() == false) || ($this->TS_VCSC_PluginAJAX == \"true\") || ($this->TS_VCSC_PluginAlways == \"true\")) {\r\n\t\t\t\t\t\t\trequire_once($this->shortcode_dir.'ts_vcsc_shortcode_' . $element['file'] . '.php');\r\n\t\t\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// Extended Row + Columns + Iconicum\r\n\t\t\t\tif (($this->TS_VCSC_VCFrontEditMode == \"true\") || (is_admin() == false) || ($this->TS_VCSC_PluginAJAX == \"true\") || ($this->TS_VCSC_PluginAlways == \"true\")) {\r\n\t\t\t\t\t// Extended Row Settings\r\n\t\t\t\t\tif ($this->TS_VCSC_UseExtendedRows == \"true\") {\r\n\t\t\t\t\t\trequire_once($this->shortcode_dir . 'ts_vcsc_shortcode_row.php');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Extended Column Settings\r\n\t\t\t\t\tif ($this->TS_VCSC_UseExtendedColumns == \"true\") {\r\n\t\t\t\t\t\trequire_once($this->shortcode_dir . 'ts_vcsc_shortcode_column.php');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// bbPress Elements\r\n\t\t\t\tif ($this->TS_VCSC_bbPressActive == \"true\") {\r\n\t\t\t\t\t// Shortcodes Defined by bbPress itself\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "function add_shortcode() {\n\t\tadd_shortcode( 'contact-form', array( 'Grunion_Contact_Form', 'parse' ) );\n\t\tadd_shortcode( 'contact-field', array( 'Grunion_Contact_Form', 'parse_contact_field' ) );\n\t}", "function shortcode_map() {\r\n\t\t\tif ( !function_exists( 'vc_map' ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t$base = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_preset',\r\n\t\t\t\t\t'heading' => __( 'Main Preset', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'preset',\r\n\t\t\t\t\t'tooltip' => MPC_Helper::style_presets_desc(),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t\t'shortcode' => $this->shortcode,\r\n\t\t\t\t\t'description' => __( 'Choose preset or create new one.', 'mpc' ),\r\n\t\t\t\t),\r\n\t\t\t);\r\n\r\n\t\t\t/* Properties List */\r\n\t\t\t$properties = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_divider',\r\n\t\t\t\t\t'title' => __( 'List of Properties', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'properties_divider',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_split',\r\n\t\t\t\t\t'heading' => __( 'Properties', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'properties',\r\n\t\t\t\t\t'admin_label' => true,\r\n\t\t\t\t\t'tooltip' => __( 'Define properties values. Each new line will be a separate property.', 'mpc' ),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'dropdown',\r\n\t\t\t\t\t'heading' => __( 'Transform', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'properties_font_transform',\r\n\t\t\t\t\t'tooltip' => __( 'Select properties transform style.', 'mpc' ),\r\n\t\t\t\t\t'value' => array(\r\n\t\t\t\t\t\t'' => '',\r\n\t\t\t\t\t\t__( 'Capitalize', 'mpc' ) => 'capitalize',\r\n\t\t\t\t\t\t__( 'Small Caps', 'mpc' ) => 'small-caps',\r\n\t\t\t\t\t\t__( 'Uppercase', 'mpc' ) => 'uppercase',\r\n\t\t\t\t\t\t__( 'Lowercase', 'mpc' ) => 'lowercase',\r\n\t\t\t\t\t\t__( 'None', 'mpc' ) => 'none',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-6 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'dropdown',\r\n\t\t\t\t\t'heading' => __( 'Alignment', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'properties_font_align',\r\n\t\t\t\t\t'tooltip' => __( 'Select properties alignment.', 'mpc' ),\r\n\t\t\t\t\t'value' => array(\r\n\t\t\t\t\t\t'' => '',\r\n\t\t\t\t\t\t__( 'Left', 'mpc' ) => 'left',\r\n\t\t\t\t\t\t__( 'Right', 'mpc' ) => 'right',\r\n\t\t\t\t\t\t__( 'Center', 'mpc' ) => 'center',\r\n\t\t\t\t\t\t__( 'Justify', 'mpc' ) => 'justify',\r\n\t\t\t\t\t\t__( 'Default', 'mpc' ) => 'inherit',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-6 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'colorpicker',\r\n\t\t\t\t\t'heading' => __( 'Color', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'properties_font_color',\r\n\t\t\t\t\t'tooltip' => __( 'Define properties color.', 'mpc' ),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column',\r\n\t\t\t\t),\r\n\t\t\t);\r\n\r\n\t\t\t$properties_even_background = MPC_Snippets::vc_background( array( 'prefix' => 'prop_even', 'subtitle' => __( 'Even Properties', 'mpc' ) ) );\r\n\r\n\t\t\t$class = MPC_Snippets::vc_class();\r\n\r\n\t\t\t$params = array_merge(\r\n\t\t\t\t$base,\r\n\r\n\t\t\t\t$properties,\r\n\t\t\t\t$properties_even_background,\r\n\t\t\t\t$class\r\n\t\t\t);\r\n\r\n\t\t\treturn array(\r\n\t\t\t\t'name' => __( 'Pricing Legend', 'mpc' ),\r\n\t\t\t\t'description' => __( 'Pricing table legend', 'mpc' ),\r\n\t\t\t\t'base' => 'mpc_pricing_legend',\r\n\t\t\t\t'as_child' => array( 'only' => 'mpc_pricing_box' ),\r\n\t\t\t\t'content_element' => true,\r\n//\t\t\t\t'icon' => mpc_get_plugin_path( __FILE__ ) . '/assets/images/icons/mpc-pricing-box.png',\r\n\t\t\t\t'icon' => 'mpc-shicon-pricing-legend',\r\n\t\t\t\t'category' => __( 'MPC', 'mpc' ),\r\n\t\t\t\t'params' => $params,\r\n\t\t\t);\r\n\t\t}", "function pt_shortcode( $atts )\n\t\t{\n\t\t\treturn $this->pt_show_blc_front();\n\t\t}", "function handleShortcode($atts = [], $content = null, $tag = '') {\n\n if (is_admin()){\n return;\n }\n \n $vueRootUrl = plugin_dir_url( __FILE__ ) . 'dist';\n $vueFileRoot = plugin_dir_path( __FILE__) . 'dist';\n\n $jsCore = ['bootstrap.min.js', 'jquery-3.3.1.min.js', 'popper.min.js'];\n\n // Find the build files\n $jsMatches = glob(plugin_dir_path( __FILE__) . 'dist/js/*.*.js');\n $cssMatches = glob(plugin_dir_path( __FILE__) . 'dist/css/*.*.css');\n\n // Bring in core dependencies first\n\n $isLocal = true;\n\n if ($isLocal){\n\n //wp_deregister_script('jquery');\n\n //wp_register_script('actiontracker_vuecore_jquery', $vueRootUrl . '/js/jquery-3.3.1.min.js', false, null, true);\n\n wp_register_script('actiontracker_vuecore_popper', $vueRootUrl . '/js/popper.min.js', false, null, true);\n wp_register_script('actiontracker_vuecore_bootstrap4', $vueRootUrl . '/js/bootstrap.min.js', false, null, true);\n \n foreach ($jsMatches as $i => $jsItem) {\n if (!in_array(basename($jsItem), $jsCore)){\n $url = $vueRootUrl . '/js/' . basename($jsItem);\n $name = \"actiontracker_vuejs_\".$i;\n if (!wp_script_is($name, 'enqueued')){\n //print_r('BUILD JS: ' . $jsItem . '<br/>');\n wp_register_script($name, $url);\n wp_enqueue_script($name); \n }\n }\n }\n \n foreach ($cssMatches as $i => $cssItem) { \n $url = $vueRootUrl . '/css/' . basename($cssItem);\n $name = \"actiontracker_vuecss_\".$i;\n if (!wp_script_is($name, 'enqueued')){\n //print_r('CSS JS: ' . $i . '<br/>');\n wp_register_style($name, $url);\n wp_enqueue_style($name); \n }\n \n }\n\n }\n else {\n\n wp_register_script('actiontracker_vuecore_popper', 'http://app.actiontracker.org/js/popper.min.js', false, null, true);\n wp_register_script('actiontracker_vuecore_bootstrap4', 'http://app.actiontracker.org/js/bootstrap.min.js', false, null, true);\n \n //wp_enqueue_script('actiontracker_vuecore_jquery');\n wp_enqueue_script('actiontracker_vuecore_popper');\n wp_enqueue_script('actiontracker_vuecore_bootstrap4');\n \n }\n\n\n \n \n\n /*\n\n */\n \n // Handle short code params\n\n if (array_key_exists('view', $atts)) {\n $str = \"<div class='actionTrackerVuePlugin' view='\".$atts['view'].\"'>You need Javascript for this feature, sorry.</div>\"; \n }\n else {\n $str = \"<div class='actionTrackerVuePlugin' view='all'>You need Javascript for this feature, sorry.</div>\"; \n }\n\n return $str;\n }", "function initialize_shortcode() {\n\tif ( ! ( shortcode_exists( shortcode_slug ) ) ) {\n\t\tadd_shortcode( shortcode_slug, __NAMESPACE__ . '\\\\replacement' );\n\t}\n}", "public function add_short_code()\n {\n add_shortcode('colorYourLife', array($this, 'generate_short_code_content'));\n }", "function wpaddons_shortcode( $atts ) {\n\n\t// Register and enqueues styles\n\tadd_action( 'wp_enqueue_scripts', array( 'WP_Addons_IO', 'enqueue_styles' ) );\n\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\t'debug_mode' => 0,\n\t\t\t'plugin' => '',\n\t\t\t'view' => 'cover-grid-third',\n\t\t),\n\t\t$atts,\n\t\t'wpaddons'\n\t);\n\n\t// Load wpAddons SDK\n\t//require_once plugin_dir_path( __FILE__ ) . '/wpaddons-io-sdk/wpaddons-io-sdk.php';\n\n\t// Set addon parameters\n\t$plugin_data = array(\n\t\t'parant_plugin_slug' => $atts['plugin'],\n\t\t'view' => plugin_dir_path( __FILE__ ) . 'wpaddons-io-sdk/view/' . $atts['view'] . '.php',\n\t);\n\n\t// Initiate addons\n\tnew WP_Addons_IO( $plugin_data );\n\n}", "function vslider_short_code($atts) {\r\n\tob_start();\r\n extract(shortcode_atts(array(\r\n\t\t\"name\" => ''\r\n\t), $atts));\r\n\tvslider($name);\r\n\t$output = ob_get_clean();\r\n\treturn $output;\r\n}", "function add_shortcode( $atts, $content, $name ) {\n\n\t\tif ( ! $this->validate_shortcode( $atts, $content, $name ) ) {\n return '';\n }\n\n\t\t$options = $this->set_options( $atts );\n\n\t\tob_start();\n\n\t\t?><div id=\"<?php echo esc_attr($options['selector']); ?>\" class=\"<?php if(isset($options['classes'])) echo esc_attr($options['classes']); ?>\" <?php do_action(\"oxygen_vsb_component_attr\", $options, $this->options['tag']); ?>><?php echo do_shortcode( $content ); ?></div><?php\n\n\t\treturn ob_get_clean();\n\t}", "public function googleMapsShortcode($atts)\n {\n $atts = shortcode_atts(array(\n 'lat' => null,\n 'lng' => null,\n 'adres' => null,\n 'postcode' => null,\n 'canvas' => 'mapsHeader_canvas',\n 'label' => 'onze locatie',\n 'zoom' => '15',\n 'scrollwheel' => 'false',\n 'disableDefaultUI' => 'true',\n ), $atts);\n\n $script = '<script type=\"text/javascript\">';\n\n // enque the script\n wp_enqueue_script('maps-key', '//maps.googleapis.com/maps/api/js?key=' . MAPS_API_KEY . '&amp;sensor=false', array(), '1.0.0', true);\n\n if ($atts['lat'] != null && $atts['lng'] != null) {\n // use the given lat and long to render the map\n $script .= \"jQuery(document).ready(function($) {\n var gMaps = new GoogleMaps();\n\n gMaps.renderMap('\" . $atts['canvas'] . \"', '\" .\n $atts['lat'] . \"', '\" .\n $atts['lng'] . \"', '\" .\n $atts['label'] . \"', '\" .\n $atts['disableDefaultUI'] . \"', '\" .\n $atts['scrollwheel'] . \"', '\" .\n $atts['zoom'] . \"' );\n });\";\n } else if ($atts['adres'] != null && $atts['postcode'] != null) {\n $script .= \"jQuery(document).ready(function($) {\n var gMaps = new GoogleMaps();\n gMaps.geocode('\" . str_replace(' ', '+', get_option('adres')) . \"', '\" . str_replace(' ', '', get_option('adres')) . \"', '\" . $atts['canvas'] . \"' , '\" . $atts['label'] . \"' , true);\n });\";\n } else {\n // check if lat/lon ar filled in\n if (!get_option('latitude') || !get_option('longitude')) {\n $url = 'https://maps.googleapis.com/maps/api/geocode/json?address=' . str_replace(' ', '+', get_option('adres')) . '+' . str_replace(' ', '+', get_option('postcode')) . '&key=' . MAPS_API_KEY;\n $geocode = file_get_contents($url);\n\n $output = json_decode($geocode);\n\n $lat = $output->results[0]->geometry->location->lat;\n $lng = $output->results[0]->geometry->location->lng;\n update_option('latitude', $lat);\n update_option('longitude', $lng);\n\n //use the lat/lon form the information page\n $script .= \"jQuery(document).ready(function($) {\n var gMaps = new GoogleMaps();\n gMaps.geocode('\" . str_replace(' ', '+', get_option('adres')) . \"', '\" . str_replace(' ', '', get_option('postcode')) . \"', '\" . $atts['canvas'] . \"' , '\" . $atts['label'] . \"' , true);\n });\";\n } else {\n // use the given lat and long to render the map\n $script .= \"jQuery(document).ready(function($) {\n var gMaps = new GoogleMaps();\n gMaps.renderMap('\" .\n $atts['canvas'] . \"', '\" .\n get_option('latitude') . \"', '\" .\n get_option('longitude') . \"', '\" .\n $atts['label'] . \"', '\" .\n $atts['disableDefaultUI'] . \"', '\" .\n $atts['scrollwheel'] . \"', '\" .\n $atts['zoom'] . \"' );\n });\";\n }\n }\n\n $script .= \"</script>\";\n return '<div id=\"mapsHeader_canvas\">Vul de correcte adres gegevens in...</div>' . $script;\n }", "public function Map_Visual_Composer() {\r\n if (!vcff_allow_field_vc_shortcodes()) { return; }\r\n // Retrieve the focused post id\r\n $vcff_supports = vcff_get_library('vcff_supports');\r\n // Retrieve the list of contexts\r\n $contexts = $vcff_supports->contexts;\r\n // If no contexts were returned\r\n if (!$contexts || !is_array($contexts)) { return; }\r\n // Loop through each mapped field\r\n foreach ($contexts as $_type => $_context) {\r\n // Default vc settings\r\n $vc_params = array(\r\n \"name\" => $_context['title'],\r\n \"icon\" => \"icon-ui-splitter-horizontal\",\r\n \"base\" => $_context['type'],\r\n 'category' => __('Form Controls', VCFF_NS),\r\n );\r\n // Merge the vc params\r\n $vc_params = array_merge_recursive($vc_params,$_context['vc_map']); \r\n // Run the params through a filter\r\n $vc_params = apply_filters('vcff_support_vc_params',$vc_params,$_context);\r\n // Map the field to visual composer\r\n vc_map($vc_params); \r\n }\r\n // Fire the vc init action\r\n do_action('vcff_supports_vc_init',$this);\r\n }", "public function create_shortcodes() {\n \n }", "function gmap_shortcode( $atts ) {\n // Attributes\n extract( shortcode_atts(\n array(\n 'localisation' => 'lyra',\n ), $atts )\n );\n $args = array(\n 'id' => \"sc-lyra\",\n 'lattitude' => \"43.5414097\",\n 'longitude' => \"1.5165507000000389\",\n 'zoom' => 16,\n 'address' => addslashes('109 rue de l\\'innovation, Labége'),\n 'map_text' => addslashes('Lyra Network'),\n );\n $jsMap = gmap_obj($args);\n return $jsMap.'<div id=\"sc-lyra\" class=\"gmap\"></div>';\n}", "public function wpdocs_add_custom_shortcode() {\n\t\t\tadd_shortcode( 'fitts_quiz', array( $this, 'fitts_plugin_shortcode' ) );\n\t\t}", "public function shortcode() {\n\t\t\treturn \"\";\n\t\t}", "protected function get_name() {\n\t\treturn 'stravaapi_shortcode';\n\t}", "function plugin_starter_shortcode_1() {\r\n\t// This is just for showing that the shortcut works\r\n\treturn '<div class=\"starter-test\">This is the output of this shortcode</div>';\r\n}", "function shortcode ( $content ) {\n return short_code ( $content );\n}", "public abstract function do_shortcode( $atts, $content, $tag );", "public function __construct() {\n\n $this->config = array(\n\n // Handle will be used to use this shortcode\n 'handle' => 'cv_button',\n\n // Whether or not this is a shortcode composer element\n 'composer_element' => true,\n\n // Whether or not this is a template builder element\n 'builder_element' => false,\n\n // Used by the template builder to determine where module can be dropped\n 'drop_target' => 2,\n\n // Used by the template builder to determine where module can have other\n // modules dropped inside of it\n 'drop_zone' => false,\n\n // Title will be used to identify this shortcode\n 'title' => __( 'Button', 'canvys' ),\n\n // Icon will be used to represent this shortcode in composer/builder\n // List of available icons can be found in icons.json\n 'icon' => 'link',\n\n // Whether or not shortcode is self closing\n 'self_closing' => true,\n\n // If shortcode is not self closing, specify its default content\n 'default_content' => null,\n\n // Specify whether or not content is directly editable\n 'content_editor' => false,\n\n // Specify whether or not the content is composed of another shortcode\n 'content_element' => false,\n\n // Array of shortcode settings and their respective attributes\n 'attributes' => array(\n\n new CV_Shortcode_Text_Control( 'text', array(\n 'title' => __( 'Text', 'canvys' ),\n 'description' => __( 'Specify the text for this button, if left blank the button will not be displayed.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Link_Control( 'url', array(\n 'title' => __( 'URL', 'canvys' ),\n 'description' => __( 'Specify the URL for this button.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'size', array(\n 'title' => __( 'Size', 'canvys' ),\n 'description' => __( 'Specify the size for this button.', 'canvys' ),\n 'default' => 'standard',\n 'options' => array(\n 'small' => __( 'Small', 'canvys' ),\n 'medium' => __( 'Medium', 'canvys' ),\n 'large' => __( 'Large', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'style', array(\n 'title' => __( 'Style', 'canvys' ),\n 'description' => __( 'Specify the style for this button.', 'canvys' ),\n 'default' => 'ghost',\n 'options' => array(\n 'ghost' => __( 'Ghost', 'canvys' ),\n 'filled' => __( 'Filled', 'canvys' ),\n 'glassy' => __( 'Glassy', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'color', array(\n 'title' => __( 'Color', 'canvys' ),\n 'description' => __( 'Specify the color for this button.', 'canvys' ),\n 'default' => 'content',\n 'options' => array(\n 'theme_colors' => array(\n 'label' => __( 'Theme Colors', 'canvys' ),\n 'options' => array(\n 'content' => __( 'Normal Content', 'canvys' ),\n 'headers' => __( 'Headers', 'canvys' ),\n 'accent' => __( 'Accent', 'canvys' ),\n 'focused' => __( 'Accent Focused', 'canvys' ),\n ),\n ),\n 'preset_colors' => array(\n 'label' => __( 'Preset Colors', 'canvys' ),\n 'options' => array(\n 'green' => __( 'Green', 'canvys' ),\n 'blue' => __( 'Blue', 'canvys' ),\n 'red' => __( 'Red', 'canvys' ),\n ),\n ),\n 'custom_color' => array(\n 'label' => __( 'Select Custom', 'canvys' ),\n 'options' => array(\n 'custom' => __( 'Custom Color', 'canvys' ),\n ),\n ),\n ),\n ) ),\n\n new CV_Shortcode_Color_Control( 'custom_color', array(\n 'title' => __( 'Custom Color', 'canvys' ),\n 'description' => __( 'Specify a custom color to use for this button.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'icon_position', array(\n 'title' => __( 'Icon Position', 'canvys' ),\n 'description' => __( 'Specify whether or not this button should have an icon, and where it should be placed.', 'canvys' ),\n 'default' => 'none',\n 'options' => array(\n 'none' => __( 'No Icon', 'canvys' ),\n 'after' => __( 'After the button', 'canvys' ),\n 'before' => __( 'Before the button', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Icon_Control( 'icon', array(\n 'title' => __( 'Icon', 'canvys' ),\n 'description' => __( 'Specify an icon to be displayed within this button.', 'canvys' ),\n ) ),\n\n ),\n\n );\n }", "function themesflat_shortcode_register_assets() {\t\t\n\t\twp_enqueue_style( 'vc_extend_shortcode', plugins_url('assets/css/shortcodes.css', __FILE__), array() );\t\n\t\twp_enqueue_style( 'vc_extend_style', plugins_url('assets/css/shortcodes-3rd.css', __FILE__),array() );\n\t\twp_register_script( 'themesflat-carousel', plugins_url('assets/3rd/owl.carousel.js', __FILE__), array(), '1.0', true );\n\t\twp_register_script( 'themesflat-flexslider', plugins_url('assets/3rd/jquery.flexslider-min.js', __FILE__), array(), '1.0', true );\t\t\n\t\twp_register_script( 'themesflat-manific-popup', plugins_url('assets/3rd/jquery.magnific-popup.min.js', __FILE__), array(), '1.0', true );\t\t\n\t\twp_register_script( 'themesflat-counter', plugins_url('assets/3rd/jquery-countTo.js', __FILE__), array(), '1.0', true );\n\t\twp_enqueue_script( 'flat-shortcode', plugins_url('assets/js/shortcodes.js', __FILE__), array(), '1.0', true );\n\t\twp_register_script( 'themesflat-google', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyCIm1AxfRgiI_w36PonGqb_uNNMsVGndKo&v=3.7', array(), '1.0', true );\n\t\twp_register_script( 'themesflat-gmap3', plugins_url('assets/3rd/gmap3.min.js', __FILE__), array(), '1.0', true );\t\n\t}", "function html5_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "function add_shortcode($tag, $callback)\n {\n }", "function mr_megaresult_shortcode_handler( $attrs, $content=null) {\n return \"look, a shortcode!\";\n}", "function acf_shortcode($atts)\n{\n}", "function hello_shortcode($atts, $content = null, $tag){\n //put $atts in $a..\n $a = shortcode_atts(array(\n 'class' => 'no_class'\n ), $atts);\n\n return \"<div class='small=12 panel rounded \" . $a['class'] . \"'>\" . $content . \"</div>\";\n}", "function html5_shortcode_demo( $atts, $content = null ) {\n return '<div class=\"shortcode-demo\">' . do_shortcode( $content ) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "function shortcode_template( $atts, $content = null ) {\r\n\t\t\tglobal $mpc_ma_options;\r\n\t\t\tif ( ! defined( 'MPC_MASSIVE_FULL' ) || ( defined( 'MPC_MASSIVE_FULL' ) && $mpc_ma_options[ 'single_js_css' ] !== '1' ) ) {\r\n\t\t\t\t$this->enqueue_shortcode_scripts();\r\n\t\t\t}\r\n\r\n\t\t\t$atts = shortcode_atts( array(\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'preset' => '',\r\n\t\t\t\t'content_preset' => '',\r\n\t\t\t\t'style' => 'horizontal',\r\n\t\t\t\t'space' => '',\r\n\t\t\t\t'fullwidth' => '',\r\n\r\n\t\t\t\t'padding_css' => '',\r\n\t\t\t\t'margin_css' => '',\r\n\t\t\t\t'border_css' => '',\r\n\r\n\t\t\t\t'icon_type' => 'icon',\r\n\t\t\t\t'icon' => '',\r\n\t\t\t\t'icon_character' => '',\r\n\t\t\t\t'icon_image' => '',\r\n\t\t\t\t'icon_image_size' => 'thumbnail',\r\n\t\t\t\t'icon_preset' => '',\r\n\t\t\t\t'icon_color' => '#333333',\r\n\t\t\t\t'icon_size' => '',\r\n\r\n\t\t\t\t'icon_margin_css' => '',\r\n\t\t\t\t'icon_animation' => 'none',\r\n\r\n\t\t\t\t'background_type' => 'color',\r\n\t\t\t\t'background_color' => '',\r\n\t\t\t\t'background_image' => '',\r\n\t\t\t\t'background_image_size' => 'large',\r\n\t\t\t\t'background_repeat' => 'no-repeat',\r\n\t\t\t\t'background_size' => 'initial',\r\n\t\t\t\t'background_position' => 'middle-center',\r\n\t\t\t\t'background_gradient' => '#83bae3||#80e0d4||0;100||180||linear',\r\n\r\n\t\t\t\t'animation_in_type' => 'none',\r\n\t\t\t\t'animation_in_duration' => '300',\r\n\t\t\t\t'animation_in_delay' => '0',\r\n\t\t\t\t'animation_in_offset' => '100',\r\n\r\n\t\t\t\t'animation_loop_type' => 'none',\r\n\t\t\t\t'animation_loop_duration' => '1000',\r\n\t\t\t\t'animation_loop_delay' => '1000',\r\n\t\t\t\t'animation_loop_hover' => '',\r\n\t\t\t), $atts );\r\n\r\n\t\t\t$styles = $this->shortcode_styles( $atts );\r\n\t\t\t$css_id = $styles[ 'id' ];\r\n\r\n\t\t\t$icon = MPC_Parser::icon( $atts );\r\n\t\t\t$animation = MPC_Parser::animation( $atts );\r\n\r\n\t\t\t$classes = $animation != '' ? ' mpc-animation' : '';\r\n\t\t\t$classes .= $atts[ 'fullwidth' ] != '' ? ' mpc-fullwidth' : '';\r\n\t\t\t$classes .= $atts[ 'style' ] == 'horizontal' ? ' mpc-style--horizontal' : ' mpc-style--vertical';\r\n\t\t\t$classes .= ' ' . esc_attr( $atts[ 'class' ] );\r\n\r\n\t\t\t$separator_classes = $icon[ 'class' ] == '' && $icon[ 'content' ] == '' ? ' mpc-empty' : '';\r\n\r\n\t\t\tglobal $mpc_button_separator;\r\n\t\t\t$mpc_button_separator = '<span class=\"mpc-button-separator-wrap\"><span class=\"mpc-button-separator-box\"><span class=\"mpc-button-separator ' . $icon[ 'class' ] . $separator_classes . '\">' . $icon[ 'content' ] . '</span></span></span>';\r\n\r\n\t\t\t$return = '<div id=\"' . $css_id . '\" class=\"mpc-button-set mpc-init' . $classes . '\"' . $animation . ( $atts[ 'icon_animation' ] != 'none' ? ' data-animation=\"' . esc_attr( $atts[ 'icon_animation' ] ) . '\"' : '' ) . '>';\r\n\t\t\t\t$return .= do_shortcode( $content );\r\n\t\t\t$return .= '</div>';\r\n\r\n\t\t\t$mpc_button_separator = null;\r\n\r\n\t\t\tglobal $mpc_frontend;\r\n\t\t\tif ( $mpc_frontend ) {\r\n\t\t\t\t$return .= '<style>' . $styles[ 'css' ] . '</style>';\r\n\t\t\t}\r\n\r\n\t\t\treturn $return;\r\n\t\t}", "public function processShortcode($atts) {\n\t\t\n\t\textract(shortcode_atts(array(\n \t\t'request' => 'blank'\n\t\t), $atts));\n\t\t\n\t\t$content = self::processRequest($request);\n\t\t\n\t\treturn \"<!--BEGIN: onxshop_start --><div class='onxshop_wordpress'>{$content}</div><!-- END: onxshop_end -->\";\n \n\t}", "function track_shortcode($atts, $content=null){\n\textract(shortcode_atts(array(\n\t\t'kind' => '',\n\t\t'src' => '',\n\t\t'srclang' => '',\n\t\t'label' => '',\n\t\t'default' => ''\n\t), $atts));\n\t\n\tif($kind)\n\t\t$kind = \" kind='\" . $kind . \"'\";\n\t\n\tif($src)\n\t\t$src = \" src='\" . $src . \"'\";\n\t\n\tif($srclang)\n\t\t$srclang = \" srclang='\" . $srclang . \"'\";\n\t\n\tif($label)\n\t\t$label = \" label='\" . $label . \"'\";\n\t\n\tif($default == \"true\" || $default == \"default\")\n\t\t$default = \" default\";\n\telse\n\t\t$default = \"\";\n\t\n\t$track = \"\n\t\t<track\" . $kind . $src . $srclang . $label . $default . \" />\n\t\";\n\t\n\treturn $track;\n}", "function pm_team_shortcode( $atts, $content = null) {\n\textract(shortcode_atts(array(\n\t\t'member_name'\t => '',\n\t\t'designation'\t => '',\n\t\t'member_image'\t => '',\n\t\t'member_desc'\t => '',\n\t\t'image_alt'\t => '',\n\t\t'team_fb' => '',\n\t\t'team_tr' => '',\n\t\t'team_gp' => '',\n\t\t'team_ld' => '',\n\t\t'team_sk' => '',\n\t\t'class'\t => '',\n\t), $atts));\n\n\t$result = '';\n\n\tob_start(); \n\n\t// Assigning a master css class and hooking into KC\n\t$master_class = apply_filters( 'kc-el-class', $atts );\n\t$master_class[] = 'pm-team';\n\n\t// Retrieving user define classes\n\t$classes = array( 'mob-bgrid-whole group' );\n\t(!empty($class)) ? $classes[] = $class : ''; ?>\n\n\t<div class=\"<?php echo esc_attr( implode( ' ', $master_class ) ); ?>\">\n\t\t<div id=\"team-wrapper\" class=\"<?php echo esc_attr( implode( ' ', $classes ) ); ?>\">\n\t\t\t<div class=\"bgrid member\">\n\t\t\t\t<div class=\"member-header\">\n\t\t\t\t\t<div class=\"member-pic\">\n\t\t\t\t\t\t<img src=\"<?php echo esc_url( $member_image ); ?>\" alt=\"<?php if( !empty( $image_alt ) ): echo esc_html( $image_alt ); else: echo esc_html( $member_name ); endif; ?>\"/> \t \t\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"member-name\">\n\t\t\t\t\t\t<h3> <?php echo esc_html( $member_name ); ?> </h3>\n\t\t\t\t\t\t<span> <?php echo esc_html( $designation ); ?> </span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\t\t\t\t\t\t\t\n\t\t\t\t<div><?php echo esc_html( $member_desc ); ?></div> \n\t\t\t\t<ul class=\"member-social\">\n\t\t\t\t\t<?php \n\t\t\t\t\tif( ! empty( $team_fb ) ) : ?>\n\t\t\t\t\t<li><a href=\"<?php echo esc_url( $team_fb ); ?>\"><i class=\"fa fa-facebook\"></i></a></li>\n\t\t\t\t\t<?php endif; //End fb\n\t\t\t\t\tif( ! empty( $team_tr ) ) : ?>\t\n\t\t\t\t\t<li><a href=\"<?php echo esc_url( $team_tr ); ?>\"><i class=\"fa fa-twitter\"></i></a></li>\n\t\t\t\t\t<?php endif; //End tr\n\n\t\t\t\t\tif( ! empty( $team_gp ) ) : ?>\t\n\t\t\t\t\t<li><a href=\"<?php echo esc_url( $team_gp ); ?>\"><i class=\"fa fa-google-plus\"></i></a></li>\n\t\t\t\t\t<?php endif; //End tr\n\n\t\t\t\t\tif( ! empty( $team_ld ) ) : ?>\t\n\t\t\t\t\t<li><a href=\"<?php echo esc_url( $team_ld ); ?>\"><i class=\"fa fa-linkedin\"></i></a></li>\n\t\t\t\t\t<?php endif; //End tr\n\n\t\t\t\t\tif( ! empty( $team_sk ) ) : ?>\t\n\t\t\t\t\t<li><a href=\"<?php echo esc_url( $team_sk ); ?>\"><i class=\"fa fa-skype\"></i></a></li>\n\t\t\t\t<?php endif; ?>\t\n\t\t\t</ul>\n\t\t</div> <!-- /member -->\n\t</div> <!-- /team-wrapper -->\n</div> <!-- /pm-team -->\n\t<?php \n\t$result .= ob_get_clean();\n\treturn $result;\n\n}", "public function __construct() {\n\n $this->config = array(\n\n // Handle will be used to use this shortcode\n 'handle' => 'cv_icon_box_child',\n\n // Whether or not this is a shortcode composer element\n 'composer_element' => false,\n\n // Whether or not this is a template builder element\n 'builder_element' => true,\n\n // Used by the template builder to determine where module can be dropped\n 'drop_target' => 3,\n\n // Used by the template builder to determine where module can have other\n // modules dropped inside of it\n 'drop_zone' => false,\n\n // Title will be used to identify this shortcode\n 'title' => __( 'Icon Box', 'canvys' ),\n\n // Icon will be used to represent this shortcode in composer/builder\n // List of available icons can be found in icons.json\n 'icon' => 'info-circled',\n\n // Whether or not shortcode is self closing\n 'self_closing' => false,\n\n // If shortcode is not self closing, specify its default content\n 'default_content' => null,\n\n // Specify whether or not content is directly editable\n 'content_editor' => true,\n\n // Specify whether or not the content is composed of another shortcode\n 'content_element' => false,\n\n // Array of shortcode settings and their respective attributes\n 'attributes' => array(\n\n new CV_Shortcode_Text_Control( 'title', array(\n 'title' => __( 'Title', 'canvys' ),\n 'description' => __( 'Icon Box Title, will default to \"Check this out\" if left blank.', 'canvys' ),\n 'placeholder' => __( 'Check this out', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Link_Control( 'url', array(\n 'title' => __( 'Icon Box Link', 'canvys' ),\n 'description' => __( 'Wrap this icon box in a link. <strong>Do not use this setting if you plan on placing a link within the content of this icon box.</strong>', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Color_Control( 'icon_color', array(\n 'title' => __( 'Icon Color', 'canvys' ),\n 'description' => __( 'Specify a custom color to use for the icon, if none is specified the default color will be used.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Icon_Control( 'icon', array(\n 'title' => __( 'Icon', 'canvys' ),\n 'description' => __( 'Select the icon for this icon box.', 'canvys' ),\n ) ),\n\n ),\n\n );\n }", "public function __construct() {\n\n global $canvys;\n\n // Allowed background image settings\n $overlay_opacity_options = array(\n 'none' => __( 'None, do not display an overlay color', 'canvys' ),\n );\n\n for ( $i=10; $i<=90; $i+=10 ) {\n $overlay_opacity_options[$i] = $i . '%';\n }\n\n $min_height_options = array( 'none' => __( 'None, let the content dictate the height', 'canvys' ) );\n for ($i=5;$i<=100;$i+=5 ) {\n $min_height_options[$i] = $i.'%';\n }\n\n $this->config = array(\n\n // Handle will be used to use this shortcode\n 'handle' => 'cv_section',\n\n // Whether or not this is a shortcode composer element\n 'composer_element' => false,\n\n // Whether or not this is a template builder element\n 'builder_element' => true,\n\n // Used by the template builder to determine where module can be dropped\n 'drop_target' => 0,\n\n // Used by the template builder to determine where module can have other\n // modules dropped inside of it\n 'drop_zone' => 1,\n\n // Title will be used to identify this shortcode\n 'title' => __( 'Content Section', 'canvys' ),\n\n // Icon will be used to represent this shortcode in composer/builder\n // List of available icons can be found in icons.json\n 'icon' => 'progress-0',\n\n // Whether or not shortcode is self closing\n 'self_closing' => false,\n\n // If shortcode is not self closing, specify its default content\n 'default_content' => null,\n\n // Specify whether or not content is directly editable\n 'content_editor' => false,\n\n // Specify whether or not the content is composed of another shortcode\n 'content_element' => false,\n\n // Provide an explanation of what this shortcode does\n 'explanation' => __( 'Full screen content sections are the foundation for your pages content, they provide the background images, color schemes, and the perfect way to divide the content of your page and add some organization. Content sections can contain any number or row modules which can be used to further organize your content.', 'canvys' ),\n\n // Array of shortcode settings and their respective attributes\n 'attributes' => array(\n\n new CV_Shortcode_Text_Control( 'id', array(\n 'title' => __( 'Section ID', 'canvys' ),\n 'description' => __( 'Set the ID attribute for this section, this allows you to apply unique styles to this section with CSS or to link to this section in the creation of a one page website.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'color_scheme', array(\n 'title' => __( 'Color Scheme', 'canvys' ),\n 'description' => __( 'This will control the control scheme for the section itself and all of the modules placed inside of it. These different color schemes can be edited by navigating to Appearance > Color Scheme.', 'canvys' ),\n 'default' => 'main',\n 'options' => array(\n 'main' => __( 'Main Content', 'canvys' ),\n 'alternate' => __( 'Alternate Content', 'canvys' ),\n 'header' => __( 'Header', 'canvys' ),\n 'footer' => __( 'Footer', 'canvys' ),\n 'socket' => __( 'Socket', 'canvys' ),\n 'white' => __( 'All White Content (For sections with dark backgrounds)', 'canvys' ),\n 'black' => __( 'All Black Content (For sections with light backgrounds)', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'bg_source', array(\n 'title' => __( 'Background Source', 'canvys' ),\n 'description' => __( 'Specify how the background of this section should be dislayed.', 'canvys' ),\n 'default' => 'default',\n 'options' => array(\n 'default' => __( 'Default background', 'canvys' ),\n 'color' => __( 'Custom color', 'canvys' ),\n 'preset' => __( 'Preset pattern', 'canvys' ),\n 'image' => __( 'Custom image', 'canvys' ),\n 'video' => __( 'HTML5 video', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_BG_Pattern_Control( 'bg_preset_pattern', array(\n 'title' => __( 'Preset Patterns', 'canvys' ),\n 'description' => __( 'Select a preset pattern to use as the background for this section.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Color_Control( 'bg_color', array(\n 'title' => __( 'Background Color', 'canvys' ),\n 'description' => __( 'Specify a custom background color to be used for this section, leave this blank to use the default background color.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Image_Control( 'bg_image', array(\n 'title' => __( 'Background Image', 'canvys' ),\n 'description' => __( 'The background image for this section. This will be displayed on top of the background color.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'bg_style', array(\n 'title' => __( 'Background Image Style', 'canvys' ),\n 'description' => __( 'Whether or not the background image should be tiled, or cover the section completely. Tiled will display the image at its actual size but it will repeat to fill the section. Cover will (potentially) increase or decrease either the width or height of the image to ensure that it will cover the section, please note that the image will be scaled proportionately.', 'canvys' ),\n 'default' => 'cover',\n 'options' => array(\n 'cover' => __( 'Cover', 'canvys' ),\n 'tile' => __( 'Tiled', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'bg_attachment', array(\n 'title' => __( 'Background Image Attachment', 'canvys' ),\n 'description' => __( 'This will dictate how the image should behave as the page is scrolled. Scroll will allow the background image to scroll normally with the rst of the page, while fixed will leave the image fixed in place as the page scrolles for what is commonly reffered to as a \"parrallax\" effect.', 'canvys' ),\n 'default' => 'scroll',\n 'options' => array(\n 'scroll' => __( 'Scroll', 'canvys' ),\n 'fixed' => __( 'Fixed', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Image_Control( 'bg_video_fallback', array(\n 'title' => __( 'HTML5 Video Background Fallback Image', 'canvys' ),\n 'description' => __( 'Select an image to be used as the background on devices that dont fully support HTML5 video elements. Please note that this inlcudes nearly all mobile devices and tablets.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_File_Control( 'bg_video_webm', array(\n 'title' => __( 'HTML5 Video Background .webm file', 'canvys' ),\n 'description' => __( 'Specify the webm file to use for the video background.', 'canvys' ),\n 'file_type' => 'video',\n ) ),\n\n new CV_Shortcode_File_Control( 'bg_video_ogv', array(\n 'title' => __( 'HTML5 Video Background .ogv file', 'canvys' ),\n 'description' => __( 'Specify the ogv file to use for the video background.', 'canvys' ),\n 'file_type' => 'video',\n ) ),\n\n new CV_Shortcode_File_Control( 'bg_video_mp4', array(\n 'title' => __( 'HTML5 Video Background .mp4 file', 'canvys' ),\n 'description' => __( 'Specify the mp4 file to use for the video background.', 'canvys' ),\n 'file_type' => 'video',\n ) ),\n\n new CV_Shortcode_Select_Control( 'bg_scrolling', array(\n 'title' => __( 'Scrolling Background Direction', 'canvys' ),\n 'description' => __( 'Enable scrolling background effect for this section. Keep in mind this works best with background images that tile perfectly.', 'canvys' ),\n 'default' => 'none',\n 'options' => array(\n 'none' => __( 'No scrolling effect', 'canvys' ),\n 'top' => array(\n 'label' => __( 'Upwards', 'canvys' ),\n 'options' => array(\n 'up-left' => __( 'Up Left', 'canvys' ),\n 'up' => __( 'Up', 'canvys' ),\n 'up-right' => __( 'Up Right', 'canvys' ),\n ),\n ),\n 'middle' => array(\n 'label' => __( 'Horizontal', 'canvys' ),\n 'options' => array(\n 'left' => __( 'Left', 'canvys' ),\n 'right' => __( 'Right', 'canvys' ),\n ),\n ),\n 'bottom' => array(\n 'label' => __( 'Downwards', 'canvys' ),\n 'options' => array(\n 'down-left' => __( 'Down Left', 'canvys' ),\n 'down' => __( 'Down', 'canvys' ),\n 'down-right' => __( 'Down Right', 'canvys' ),\n ),\n ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'bg_scrolling_speed', array(\n 'title' => __( 'Scrolling Background Speed', 'canvys' ),\n 'description' => __( 'Specify how quickly the background should scroll.', 'canvys' ),\n 'default' => 'normal',\n 'options' => array(\n 'slow' => __( 'Slow', 'canvys' ),\n 'normal' => __( 'Normal', 'canvys' ),\n 'fast' => __( 'Fast', 'canvys' ),\n 'very-fast' => __( 'very Fast', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'overlay_opacity', array(\n 'title' => __( 'Background Overlay Opacity', 'canvys' ),\n 'description' => __( 'Specify whether or not a color should be overlayed on top of the section background, and at what opacity.', 'canvys' ),\n 'default' => 'none',\n 'options' => $overlay_opacity_options,\n ) ),\n\n new CV_Shortcode_Color_Control( 'overlay_color', array(\n 'title' => __( 'Background Overlay Color', 'canvys' ),\n 'description' => __( 'Specify a color to be overlayed on top of the section background.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'sidebar_layout', array(\n 'title' => __( 'Sidebar Layout', 'canvys' ),\n 'description' => __( 'The layout of this section, if you use either left or right sidebar you will be able to shoose which sidebar is displayed.', 'canvys' ),\n 'default' => 'no-sidebar',\n 'options' => array(\n 'no-sidebar' => __( 'No sidebar', 'canvys' ),\n 'sidebar-right' => __( 'Right Sidebar', 'canvys' ),\n 'sidebar-left' => __( 'Left Sidebar', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Sidebar_Select_Control( 'sidebar', array(\n 'title' => __( 'Sidebar', 'canvys' ),\n 'description' => __( 'The sidebar to be displayed.', 'canvys' ),\n 'default' => 'sidebar',\n ) ),\n\n new CV_Shortcode_Select_Control( 'parallax', array(\n 'title' => __( 'Enable Parallax', 'canvys' ),\n 'description' => __( 'Enable parallax scrolling effect for this sections content', 'canvys' ),\n 'default' => 'false',\n 'options' => array(\n 'false' => __( 'No parallax effect', 'canvys' ),\n 'true' => __( 'Yes, enable parallax scrolling', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'min_height', array(\n 'title' => __( 'Minimum Height', 'canvys' ),\n 'description' => __( 'The mimimun height of the section (if specified) will be based on a percentage of total screen height.', 'canvys' ),\n 'default' => 'none',\n 'options' => $min_height_options,\n ) ),\n\n new CV_Shortcode_Select_Control( 'stretched', array(\n 'title' => __( 'Stretched Content', 'canvys' ),\n 'description' => __( 'Allow the content of this section to stretch to the size of the layout.', 'canvys' ),\n 'default' => 'false',\n 'options' => array(\n 'false' => __( 'No, do not enable stretched content', 'canvys' ),\n 'free' => __( 'yes, stretched with side padding', 'canvys' ),\n 'stretched' => __( 'yes, stretched without side padding', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'border_top', array(\n 'title' => __( 'Top Border', 'canvys' ),\n 'description' => __( 'Specify how the top border should be styled', 'canvys' ),\n 'default' => 'none',\n 'options' => array(\n 'none' => __( 'No special styling', 'canvys' ),\n 'border' => __( 'Simple line border', 'canvys' ),\n 'shadow' => __( 'Faint inner shadow', 'canvys' ),\n 'shadow-border' => __( 'Line border & shadow', 'canvys' ),\n 'arrow' => __( 'Arrow pointing up', 'canvys' ),\n 'arrow-border' => __( 'Arrow pointing up & border', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'border_bottom', array(\n 'title' => __( 'Bottom Border', 'canvys' ),\n 'description' => __( 'Specify how the bottom border should be styled', 'canvys' ),\n 'default' => 'none',\n 'options' => array(\n 'none' => __( 'No special styling', 'canvys' ),\n 'border' => __( 'Simple line border', 'canvys' ),\n 'shadow' => __( 'Faint inner shadow', 'canvys' ),\n 'shadow-border' => __( 'Line border & shadow', 'canvys' ),\n 'arrow' => __( 'Arrow pointing down', 'canvys' ),\n 'arrow-border' => __( 'Arrow pointing down & border', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'padding_top', array(\n 'title' => __( 'Top Padding', 'canvys' ),\n 'description' => __( 'The empty space above the content in this section.', 'canvys' ),\n 'default' => 'normal',\n 'options' => array(\n 'none' => __( 'None', 'canvys' ),\n 'less' => __( 'Less', 'canvys' ),\n 'normal' => __( 'Normal', 'canvys' ),\n 'more' => __( 'More', 'canvys' ),\n 'much-more' => __( 'Much More', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'padding_bottom', array(\n 'title' => __( 'Bottom Padding', 'canvys' ),\n 'description' => __( 'The empty space below the content in this section.', 'canvys' ),\n 'default' => 'normal',\n 'options' => array(\n 'none' => __( 'None', 'canvys' ),\n 'less' => __( 'Less', 'canvys' ),\n 'normal' => __( 'Normal', 'canvys' ),\n 'more' => __( 'More', 'canvys' ),\n 'much-more' => __( 'Much More', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'visibility', array(\n 'title' => __( 'Visibility', 'canvys' ),\n 'description' => __( 'Which devices this section should be visible on. This is great for optimizing your website for all devices. Please note that this setting is not applicable when full page content sliding is active.', 'canvys' ),\n 'default' => 'all',\n 'options' => $canvys['visibility_options'],\n ) ),\n\n new CV_Shortcode_Dev_Control( 'forced_height', array(\n 'default' => null,\n ) ),\n\n new CV_Shortcode_Dev_Control( 'class', array(\n 'default' => null,\n ) ),\n\n ),\n );\n }", "function flex_video_shortcode($atts, $content = NULL) {\n $a = shortcode_atts( array(\n 'aspect' => ''\n ), $atts );\n $aspect = ($a['aspect'] == 'standard') ? '' : 'widescreen';\n $content = '<div class=\"flexvideo '.$aspect.'\">'.$content.'</div>';\n return $content;\n}", "public static function shortcodeUI()\n\t{\n\t\t// Shortcake required\n\t\tif ( ! function_exists( 'shortcode_ui_register_for_shortcode' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// id only\n\t\t// avoids an unchecked Shortcake input checkbox requiring a shortcode output\n\t\tshortcode_ui_register_for_shortcode(\n\t\t\tself::SHORTCODE_TAG,\n\t\t\tarray(\n\t\t\t\t'label' => esc_html( static::featureName() ),\n\t\t\t\t'listItemImage' => 'dashicons-twitter',\n\t\t\t\t'attrs' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'attr' => 'id',\n\t\t\t\t\t\t'label' => 'ID',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'pattern' => '[0-9]+',\n\t\t\t\t\t\t\t'placeholder' => '560070183650213889',\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}", "public function vpup_shortcode( $atts )\n {\n // enqueue our vue scripts.\n wp_enqueue_script( 'vpup-dist' );\n wp_enqueue_script( 'vpup-dist-chunks' );\n\n // Check our cart.\n $should_redirect = $this->vpup_set_cart();\n\n // Redirect to cart if needed. \n $this->vpup_redirect_to_cart( $should_redirect );\n\n // Localize data to vue.\n $vue_atts = esc_attr( json_encode( [\n 'siteURL' => VPUP_URL,\n 'url' => get_site_url()\n ] ) );\n\n // Output our mountable div and pass in our $vue_atts\n return \"<div id='vpup-app' data-vpup-atts='{$vue_atts}'></div>\";\n }", "function register_vc_add_on(){\r\n\r\n vc_map( array(\r\n \"name\" => $this->name,\r\n \"base\" => $this->id,\r\n \"icon\" => $this->icon,\r\n \"description\" => $this->description,\r\n \"weight\" => 1,\r\n\r\n \"wrapper_height\"=> 'full',\r\n\r\n \"category\" => __( 'BetterMag Addons', 'better-studio' ),\r\n \"params\" => array(\r\n\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Title', 'better-studio' ),\r\n \"param_name\" => 'title',\r\n \"value\" => $this->defaults['title'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"heading\" => __( 'Show Title?', 'better-studio'),\r\n \"param_name\" => 'show_title',\r\n \"value\" => $this->defaults['show_title'],\r\n ),\r\n array(\r\n 'heading' => __( 'Instructions', 'better-studio' ),\r\n 'param_name' => 'help',\r\n 'type' => 'bf_info',\r\n 'value' => __('<ol>\r\n <li>Copy the link to you facebook page</li>\r\n <li>Paste it in the \"Link to you Facebook page\" input box below</li>\r\n </ol>\r\n ', 'better-studio' ),\r\n 'state' => 'open',\r\n 'info-type' => 'help',\r\n 'section_class' => 'widefat',\r\n ),\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Link to you Facebook page', 'better-studio' ),\r\n \"param_name\" => 'url',\r\n \"value\" => $this->defaults['url'],\r\n ),\r\n array(\r\n \"type\" => 'bf_select',\r\n \"heading\" => __( 'Style', 'better-studio' ),\r\n \"param_name\" => 'style',\r\n 'section_class' => 'style-floated-left',\r\n \"admin_label\" => true,\r\n \"options\" => array(\r\n 'light' => __( 'Light Schema', 'better-studio' ),\r\n 'dark' => __( 'Style Schema', 'better-studio' ),\r\n ),\r\n \"value\" => $this->defaults['style'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Show Posts?', 'better-studio' ),\r\n \"param_name\" => 'show_posts',\r\n \"value\" => $this->defaults['show_posts'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Show faces?', 'better-studio' ),\r\n \"param_name\" => 'show_faces',\r\n \"value\" => $this->defaults['show_faces'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Show Header?', 'better-studio' ),\r\n \"param_name\" => 'show_header',\r\n \"value\" => $this->defaults['show_header'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Show Border?', 'better-studio' ),\r\n \"param_name\" => 'show_border',\r\n \"value\" => $this->defaults['show_border'],\r\n ),\r\n\r\n\r\n )\r\n ) );\r\n\r\n }", "public function vc_map_shortcode() {\n\t\t\tvc_map( array(\n\t\t\t\t'name' => _x( 'Opening Time', 'backend', 'vc-elements-pt' ),\n\t\t\t\t'base' => $this->shortcode_name(),\n\t\t\t\t'category' => _x( 'Content', 'backend', 'vc-elements-pt' ),\n\t\t\t\t'icon' => get_template_directory_uri() . '/vendor/proteusthemes/visual-composer-elements/assets/images/pt.svg',\n\t\t\t\t'params' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'holder' => 'div',\n\t\t\t\t\t\t'heading' => _x( 'Title', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'title',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'lined_textarea',\n\t\t\t\t\t\t'heading' => _x( 'Days and Hours', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'description' => _x( 'Enter values for opening times - <em>opened</em> or <em>closed</em>|<em>opening time</em>|<em>closing time</em>. Divide value sets with linebreak \"Enter\" (Example: opened|8:00|16:00).', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'days_hours',\n\t\t\t\t\t\t'rows' => '7',\n\t\t\t\t\t\t'value' => 'opened|8:00|16:00,opened|11:00|19:00,opened|8:00|16:00,closed,opened|11:00|19:00,closed,closed',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => _x( 'Separator between hours', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'separator',\n\t\t\t\t\t\t'value' => ' - ',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => _x( 'Text used for closed days', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'closed',\n\t\t\t\t\t\t'value' => _x( 'CLOSED', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => _x( 'Text below the timetable for additional info (for example lunch time)', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'text_below',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t) );\n\t\t}", "function shortcode_insert_button()\n {\n $this->config['name']\t\t\t= __('Carousel With Thumbnails', 'swedenWp' );\n $this->config['tab']\t\t\t= __('Content Elements', 'swedenWp' );\n $this->config['icon']\t\t\t= swedenBuilder::$path['imagesURL'].\"sc-postslider.png\";\n $this->config['order']\t\t\t= 2;\n $this->config['target']\t\t\t= 'avia-target-insert';\n $this->config['shortcode'] \t\t= 'sw_thumb_nav_carousel';\n $this->config['shortcode_nested'] = array('sw_thumb_carousel_slide');\n $this->config['tooltip'] \t = __('Display a carousel element with thumb navigation', 'swedenWp' );\n }", "public function getShortcode();", "public function register_shortcode() {\n add_shortcode( 'reveal', array( &$this, 'do_shortcode' ) );\n }", "public function __construct() {\n\n $this->config = array(\n\n // Handle will be used to use this shortcode\n 'handle' => 'cv_blog',\n\n // Whether or not this is a shortcode composer element\n 'composer_element' => true,\n\n // Whether or not this is a template builder element\n 'builder_element' => true,\n\n // Used by the template builder to determine where module can be dropped\n 'drop_target' => 1,\n\n // Used by the template builder to determine where module can have other\n // modules dropped inside of it\n 'drop_zone' => false,\n\n // Title will be used to identify this shortcode\n 'title' => __( 'Blog', 'canvys' ),\n\n // Icon will be used to represent this shortcode in composer/builder\n // List of available icons can be found in icons.json\n 'icon' => 'th-list',\n\n // Whether or not shortcode is self closing\n 'self_closing' => true,\n\n // If shortcode is not self closing, specify its default content\n 'default_content' => null,\n\n // Specify whether or not content is directly editable\n 'content_editor' => false,\n\n // Specify whether or not the content is composed of another shortcode\n 'content_element' => false,\n\n // Provide an explanation of what this shortcode does\n 'explanation' => __( 'Display your posts in a complete blog, please note that it is best practice to have onl yone of these elements per page.', 'canvys' ),\n\n // Array of shortcode settings and their respective attributes\n 'attributes' => array(\n\n new CV_Shortcode_Select_Control( 'style', array(\n 'title' => __( 'Blog Style', 'canvys' ),\n 'description' => __( 'Select the style for this blog', 'canvys' ),\n 'default' => 'standard',\n 'options' => array(\n 'standard' => __( 'Standard', 'canvys' ),\n 'boxed' => __( 'Boxed', 'canvys' ),\n 'minimal' => __( 'Minimal', 'canvys' ),\n 'masonry' => __( 'Masonry', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'masonry_columns', array(\n 'title' => __( 'Number of Columns', 'canvys' ),\n 'description' => __( 'Specify how many columns should be used to display your posts.', 'canvys' ),\n 'default' => '3',\n 'options' => array(\n '2' => __( '2 Columns', 'canvys' ),\n '3' => __( '3 Columns', 'canvys' ),\n '4' => __( '4 Columns', 'canvys' ),\n '5' => __( '5 Columns', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Text_Control( 'per_page', array(\n 'title' => __( 'Posts Per Page', 'canvys' ),\n 'description' => __( 'Enter the number of posts to be displayed per page, enter a number only. Default is to display all posts on one page.', 'canvys' ),\n 'placeholder' => 'All Posts',\n ) ),\n\n new CV_Shortcode_Select_Control( 'pagination', array(\n 'title' => __( 'Page Pagination', 'canvys' ),\n 'description' => __( 'Enable pagination when applicable.', 'canvys' ),\n 'default' => 'true',\n 'options' => array(\n 'true' => __( 'yes, enable pagination', 'canvys' ),\n 'false' => __( 'No, disable pagination', 'canvys' ),\n ),\n ) ),\n\n ),\n\n );\n }", "public function getShortcodeReplace();", "function vc_mapping(){\n if(function_exists ('vc_map')){\n vc_map( \n array(\n 'base' => 'WIDGET_HTML_SCROLL_BOTTOM',\n 'name' =>__( \"SCROLL DOWN \", 'js_composer' ),\n 'class' => '',\n 'icon' =>'iw-default',// 'icon-heart',\n 'params' => array(array(\n \"type\" => \"colorpicker\",\n \"holder\" => \"Couleur du widget\",\n \"class\" => \"\",\n \"heading\" => \"Couleur\",\n \"param_name\" => \"couleur\",\n \"value\" => __( \"#fff\", \"my-text-domain\" ),\n \"description\" => \"La couleur pour personnaliser le kit\" \n )\n )\n ) \n );\n }\n }", "public function get_shortcode() {\n\t\t$args = array();\n\t\tforeach ($this->args as $k => $v) {\n\t\t\t// Only include info if it's not the default... save space and easier to read shortcodes\n\t\t\tif (isset($this->defaults[$k]) && $this->defaults[$k] != $v) { // && (!empty($this->defaults[$k]) && !empty($v))) {\n\t\t\t\tif ( !empty($v) ) {\n\t\t\t\t\tif ( is_array($v) ) {\n\t\t\t\t\t\t$args[] = $k.'=\"'.implode(',', $v).'\"';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$args[] = $k.'=\"'.$v.'\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Direct filtering on a field\n\t\t\telseif (!isset($this->defaults[$k])) {\n\t\t\t\t$args[] = $k.'=\"'.$v.'\"';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$args = implode(' ', $args);\n\t\tif (!empty($args)) {\n\t\t\t$args = ' '.$args;\n\t\t}\n\t\treturn '[summarize-posts'.$args.']';\n\t}", "function htheme_map_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_map($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "public static function showWebformShortCode($atts)\n\t{\n\t\t$params = shortcode_atts(array(\n\t\t\t'url' => 'null',\n\t\t\t'css' => 'on',\n\t\t\t'center' => 'off',\n\t\t\t'center_margin' => '200',\n\t\t\t'variant' => ''\n\t\t), $atts);\n\n\t\t$div_start = $div_end = '';\n\t\tif ($params['center'] == 'on')\n\t\t{\n\t\t\t$div_start = '<div style=\"margin-left: auto; margin-right: auto; width: ' . $params['center_margin'] . 'px;\">';\n\t\t\t$div_end = '</div>';\n\t\t}\n\n\t\t$css = ($params['css'] == \"off\") ? htmlspecialchars(\"&css=1\") : \"\";\n\n\t\t$variant_maps = array('A' => 0, 'B' => 1, 'C' => 2, 'D' => 3, 'E' => 4, 'F' => 5, 'G' => 6, 'H' => 7);\n\t\t$params['variant'] = strtoupper($params['variant']);\n\t\t$variant = (in_array($params['variant'], array_keys($variant_maps))) ? htmlspecialchars(\"&v=\" . $variant_maps[$params['variant']]) : \"\";\n\n\t\t$params['url'] = self::replaceHttpsToHttpIfSslOn($params['url']);\n\n\t\treturn $div_start . '<script type=\"text/javascript\" src=\"' . $params['url'] . $css . $variant . '\"></script>' . $div_end;\n\t}", "public function shortcode_template() {\n\t\treturn 'templates/shortcodes/projects.php';\n\t}", "function display_json_shortcode($atts ){\n $a = shortcode_atts( array(\n 'base_uri' => 'https://api.creol.ucf.edu/test.aspx',\n 'group' => 1\n ), $atts );\n\n $result = build_uri_string_directory($a);\n $json_string = curl_url($result);\n $json_obj = jsonifyier($json_string);\n layout_people($json_obj);\n}", "public function register_shortcodes(){\n\t\tadd_shortcode('upcoming_post_preview', array($this,'shortcode_display'));\n\t}", "function shortcode_karaja( $atts, $content = null ) {\n return '<div class=\"lingua-kr\">'.$content.'</div>';\n}", "public function renderShortcode(ShortcodeAttributes $atts, $content);", "function button_shortcode($atts, $content = NULL) {\n $a = shortcode_atts( array(\n 'class' => ''\n ), $atts );\n $content = '<span class=\"button '.$class.'\">'.$content.'</span>';\n return $content;\n}", "public function generate_short_code_content($atts)\n {\n $short_code_atts = shortcode_atts(array(), $atts);\n\n ob_start();\n\n $this->cyl_locate_template_part('shortcode/colorYourLife.php', []);\n\n return ob_get_clean();\n }", "function iron_icon_shortcode( $atts ) {\n $a = shortcode_atts( array(\n\t\t'icon' => '',\n\t\t'color' => '',\n\t\t'size' => 24\n ), $atts );\n\t\n\t$icon = explode(':',$a['icon']);\n\tif(empty($icon[1])) {\n\t\t$icon[1] = $icon[0];\n\t\t$icon[0] = 'iron';\n\t} elseif($icon[0] === 'icons')\n\t\t$icon[0] = 'iron';\n\t\t\n\t$icon_svg = plugins_url(\"icons/{$icon[0]}.svg\",__FILE__);\t\n\t$color = empty($a['color']) ? 'currentColor' : $a['color'];\n\t$style = \" style=\\\"fill:{$color}\\\"\";\t\n\t\n\t$size = 0+$a['size'];\n\t$s = $size / 24;\n\t\n\t$uses = \"<use x='0' y='0' transform='scale($s)' xlink:href='{$icon_svg}#{$icon[1]}' $style/>\";\n return \"<svg width='$size' height='$size' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>$uses</svg>\";\n}", "function foliamaptool_shortcodes($atts='') {\r\n\t\tglobal $id;\r\n\r\n\t\tif (is_feed())\r\n\t\t\treturn;\r\n\r\n\t\t$map = get_post_meta($id, '_mapp_map', true);\r\n\t\t$pois = get_post_meta($id, '_mapp_pois', true);\r\n\r\n\t\t$result = $this->map($map, $pois, false);\r\n\r\n\t\treturn $result;\r\n\t}", "public function shortcode($atts) {\n global $wpdb;\n if (isset($atts['slug'])) {\n $q=$wpdb->prepare(\n \"SELECT id \".\n \"FROM {$wpdb->prefix}h5p_contents \".\n \"WHERE slug=%s\",\n $atts['slug']\n );\n $row=$wpdb->get_row($q,ARRAY_A);\n\n if ($wpdb->last_error) {\n return sprintf(__('Database error: %s.', $this->plugin_slug), $wpdb->last_error);\n }\n\n if (!isset($row['id'])) {\n return sprintf(__('Cannot find H5P content with slug: %s.', $this->plugin_slug), $atts['slug']);\n }\n\n $atts['id']=$row['id'];\n }\n\n $id = isset($atts['id']) ? intval($atts['id']) : NULL;\n $content = $this->get_content($id);\n if (is_string($content)) {\n // Return error message if the user has the correct cap\n return current_user_can('edit_h5p_contents') ? $content : NULL;\n }\n\n // Log view\n new H5P_Event('content', 'shortcode',\n $content['id'],\n $content['title'],\n $content['library']['name'],\n $content['library']['majorVersion'] . '.' . $content['library']['minorVersion']);\n\n return $this->add_assets($content);\n }", "function handle_shortcode( ) {\n\n\tenqueue_files();\n\n\treturn get_location_content( );\n\n}", "function khLess_shortcodes_init()\n{\n function khLess_shortcode($atts = [], $content = null)\n {\n get_template_part('template', 'schedule');\n }\n\n add_shortcode('khLess', 'khLess_shortcode');\n}", "function googlemap_shortcode( $atts ) {\n extract(shortcode_atts(array(\n 'width' => '98%',\n 'height' => '300',\n\t\t'lat' => '',\n\t\t'lng' =>'',\n\t\t'zoom' => '13',\n\t\t'pancontrol' => 'Yes',\n\t\t'zoomcontrol'=> 'Yes',\n\t\t'maptypecontrol'=> 'Yes',\n\t\t'scalecontrol'=> 'Yes',\n\t\t'streetviewcontrol'=> 'Yes',\n\t\t'overviewmapcontrol'=> 'Yes'\n ), $atts));\n\n $pancontrol = ($pancontrol == 'Yes') ? 'true' : '';\n $zoomcontrol = ($zoomcontrol == 'Yes') ? 'true' : '';\n $maptypecontrol = ($maptypecontrol == 'Yes') ? 'true' : '';\n $scalecontrol = ($scalecontrol == 'Yes') ? 'true' : '';\n $streetviewcontrol = ($streetviewcontrol == 'Yes') ? 'true' : '';\n $overviewmapcontrol = ($overviewmapcontrol == 'Yes') ? 'true' : '';\n\n $rand = rand(1,100) * rand(1,100);\n\n return '<script src=\"http://maps.googleapis.com/maps/api/js?key=&sensor=false\" type=\"text/javascript\"></script>\n \n \n <div class=\"map_api\" id=\"map_canvas_'.esc_attr($rand).'\" style=\"width:'. $width .'; height:'. $height .'px\"></div>\n <script type=\"text/javascript\">\n function initialize() {\n var myLatlng = new google.maps.LatLng('.$lat.','. $lng .'); \n var mapOptions = {\n center: myLatlng,\n zoom: '. $zoom .',\n panControl: '. $pancontrol .',\n zoomControl: '. $zoomcontrol .',\n mapTypeControl: '. $maptypecontrol .',\n scaleControl: '. $scalecontrol .',\n streetViewControl: '. $streetviewcontrol .',\n overviewMapControl: '. $overviewmapcontrol .',\n mapTypeId: google.maps.MapTypeId.ROADMAP\n };\n var map = new google.maps.Map(document.getElementById(\"map_canvas_'.$rand.'\"),\n mapOptions);\n var marker = new google.maps.Marker({\n position: myLatlng\n });\n \n marker.setMap(map); \n }initialize();\n </script>\n ';\n\n}", "function pm_services_box_shortcode( $atts, $content = null) {\n\textract(shortcode_atts(array(\n\t\t'service_title'\t=> '',\n\t\t'service_desc'\t=> '',\n\t\t'services_icon'\t=> '',\n\t\t'class'\t\t\t=> '',\n\t), $atts));\n\n\t$result = '';\n\n\tob_start(); \n\n\t// Assigning a master css class and hooking into KC\n\t$master_class = apply_filters( 'kc-el-class', $atts );\n\t$master_class[] = 'pm-service';\n\n\t// Retrieving user define classes\n\t$classes = array( 'row' );\n\t(!empty($class)) ? $classes[] = $class : ''; ?>\n\n\t<div class=\"<?php echo esc_attr( implode( ' ', $master_class ) ); ?>\">\n <div class=\"<?php echo esc_attr( implode( ' ', $classes ) ); ?>\">\n\t \t<div class=\"service-list bgrid-third s-bgrid-half mob-bgrid-whole\">\n\t \t\t<div class=\"pm-bgrid\">\n\t <div class=\"icon-part\">\n\t \t<span class=\"<?php echo esc_attr( $services_icon ); ?>\"></span>\n\t </div>\n\t <h3><?php echo esc_html( $service_title ); ?></h3>\n\t <div class=\"service-content\">\t \n\t\t <p> <?php echo esc_html( $service_desc ); ?> </p> \n\t </div> \n\t </div> <!-- /bgrid --> \n\t \t</div> <!-- /service-list -->\n </div> <!-- /row --> \n </div> <!-- /services --> \t\t\n\n\t<?php \n\t$result .= ob_get_clean();\n\treturn $result;\n\n}", "function uvasomcme_register_shortcodes(){\n add_shortcode( 'uvasomcmecourselist', 'uvasomcmecourses_do_loop' );\n add_shortcode('uvasomcmecourse','uvasomcmecourse_single');\n}", "function googleMap_tag_generator( $contact_form, $args = '' ) {\n $args = wp_parse_args( $args, array() );\n\t\tinclude( plugin_dir_path( __FILE__ ) . '/partials/cf7-tag-display.php');\n\t}", "function echotheme_flexslider_shortcode($atts)\n{\n\tob_start();\n\tget_template_part('part', 'flexslider-gallery');\n\treturn ob_get_clean();\n}", "function iframevideoShortcode( $atts, $content = null, $tag = '' ){\n\t$atts = array_change_key_case( (array)$atts, CASE_LOWER );\n\n\t$output = '<div class=\"iframe-video-wrapper\">' . $content . '</div>';\n\treturn $output;\n}", "function block_shortcode($atts) {\r\n extract(shortcode_atts(array(\r\n\t\t'url' \t=> 'https://www.google.com/',\r\n\t\t'image'\t=> get_stylesheet_directory_uri().'/assets/img/feature_img_swf.png',\r\n\t\t'text'\t=> 'Run A Startup',\r\n\t\t'color'\t=> '#186677',\r\n\t\t), $atts, 'block_shortcode'));\r\n\t\r\n return \r\n\t\t\t'<div class=\"col-md-3 col-lg-3 col-sm-6 col-xs-6 cd-block-row\">\r\n\t\t\t\t<a href=\"'.$url.'\">\r\n\t\t\t\t\t<div id=\"cd-block-id\" class=\"cd-block\">\r\n\t\t\t\t\t\t<img id=\"block-img\" src=\"'.$image.'\" alt=\"\" />\r\n\t\t\t\t\t\t<p style=\"color:'.$color.';\">'.$text.'</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</a>\r\n\t\t\t</div>'\r\n\t;\r\n}", "function tz_one_third( $atts, $content = null ) {\n return '<div class=\"one_third\">' . do_shortcode($content) . '</div>';\n}", "function pgm_register_shortcodes(){\n add_shortcode('pgm_form','pgm_form_shortcode');\n}", "function dt_shortcode_admin() {\r\n $rel_theme_url = explode( $_SERVER['SERVER_NAME'], get_template_directory_uri() );\r\n if( isset($rel_theme_url[1]) )\r\n $rel_theme_url = $rel_theme_url[1];\r\n else\r\n $rel_theme_url = str_replace( site_url(), '', get_template_directory_uri() );\r\n\r\n wp_localize_script(\r\n 'custom_quicktags',\r\n 'dt_admin',\r\n array(\r\n 'themeurl'\t=> $rel_theme_url\r\n )\r\n );\r\n }", "function add_shortcode_interface() {\n\tob_start();\n?>\n\t<a href=\"#TB_inline?width=600&height=700&inlineId=select-shortcode-form\" class=\"thickbox button\" id=\"add-shortcode\" title=\"Add Shortcode\">Add Shortcode</a>\n<?php\n\techo ob_get_clean();\n}", "function ssc_location_shortcode( $atts ) {\n\textract( shortcode_atts( array(\n\t\t'sites' => get_current_blog_id(),\n\t\t'hours' => 'hide',\n\t\t'map' => 'hide',\n\t\t'address' => 'show'\n\t\t), $atts ) );\n\tif ( $sites == 'all' ) {\n\t\t$site_list = get_blog_list( 0, 'all' );\n\t}\n\telse {\n\t\t$site_list = array($sites);\n\t}\n\tob_start();\n\tif ( $map == 'show' ) {\n\t\t$pageURL = 'http';\n if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"];\n }\n include_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n if ( is_plugin_active( 'osm/osm.php' ) ) {\n \t//echo $pageURL;\n \t echo do_shortcode( '[osm_map marker_file=\"'.$pageURL.'/marker/marker.php?sites='.$sites.'\" zoom=\"3\" width=\"600\" height=\"450\" lat=\"34.37\" long=\"-88.375\" ]' );\n \t}\n\t}\n echo '<ul class=\"site-list\">';\n foreach ( $site_list as $blog ) {\n \techo '<li>';\n \t$site_contacts = get_site_contacts( $blog['blog_id'] );\t\n \tif ( $address == 'show') {\n \techo '<h4><a href=\"' . $site_contacts[$blog['blog_id']]['path'] .'\">' . $site_contacts[$blog['blog_id']]['name'] . '</a></h4>';\n \techo '<address>' . $site_contacts[$blog['blog_id']]['street'] . '<br>';\n \t echo $site_contacts[$blog['blog_id']]['city'] . ', ' . $site_contacts[$blog['blog_id']]['state'] . ' ' . $site_contacts[$blog['blog_id']]['zip'] . '</address>';\n \t echo '<p><a href=\"tel:' . $site_contacts[$blog['blog_id']]['phone'] . '\">' . $site_contacts[$blog['blog_id']]['phone'] . '</a></p>';\n \t}\n \tif ( $hours == 'show' ) {\n $site_hours = get_site_hours( $blog );\n echo '<dl>';\n $current_day = '';\n foreach ( $site_hours[$blog['blog_id']] as $hours_val ) {\n \t$day = explode('_', $hours_val['name'] );\n \t$title = explode( ' ', $hours_val['title'] );\n \tif ( $day[1] == 'open' ) {\n \techo '<dt>' . $title[0] . '</dt>';\n \tif ( $hours_val['value'] ) {\n \t\techo '<dd>' . $hours_val['value'];\n \t\t$current_day = $day[0];\n \t}\n \telse {\n \t\techo '<dd>Closed</dd>';\n \t}\n }\n elseif ( $day[1] == 'close' && $day[0] == $current_day ) {\n \techo ' - ' . $hours_val['value'] .'</dd>';\n }\n else {\n \techo '</dd>';\n }\n } // Hours sites loop\n /**/\n echo '</dl>';\n\t }\n \techo '</li>';\n } // end sites loop\n echo '</ul>';\t \n $output = ob_get_clean();\n return $output;\n}", "public function vcMap() {\n\t\tif(function_exists('vc_map')) {\n\n\t\t\tvc_map( array(\n\t\t\t\t\t'name' => esc_html__('Album', 'qode-music'),\n\t\t\t\t\t'base' => $this->base,\n\t\t\t\t\t'category' => esc_html__('by QODE MUSIC','qode-music'),\n\t\t\t\t\t'icon' => 'icon-wpb-album extended-custom-icon-qode',\n\t\t\t\t\t'allowed_container_element' => 'vc_row',\n\t\t\t\t\t'params' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\n\t\t\t\t\t\t\t'heading'\t\t=> esc_html__('Album','qode-music'),\n\t\t\t\t\t\t\t'param_name' \t=> 'album',\n\t\t\t\t\t\t\t'value' \t\t=> $this->getAlbums(),\n\t\t\t\t\t\t\t'admin_label' \t=> true,\n\t\t\t\t\t\t\t'save_always' \t=> true\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t\t'heading' => esc_html__('Album Skin','qode-music'),\n\t\t\t\t\t\t\t'param_name' => 'album_skin',\n\t\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t\tesc_html__('Default','qode-music')\t\t=> '',\n\t\t\t\t\t\t\t\tesc_html__('Dark','qode-music') \t\t=> 'dark',\n\t\t\t\t\t\t\t\tesc_html__('Light','qode-music') \t\t=> 'light'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'admin_label' => true\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t\t'heading' => esc_html__('Title Tag','qode-music'),\n\t\t\t\t\t\t\t'param_name' => 'title_tag',\n\t\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t\t'' => '',\n\t\t\t\t\t\t\t\t'h2'\t=> 'h2',\n\t\t\t\t\t\t\t\t'h3'\t=> 'h3',\n\t\t\t\t\t\t\t\t'h4'\t=> 'h4',\n\t\t\t\t\t\t\t\t'h5'\t=> 'h5',\n\t\t\t\t\t\t\t\t'h6'\t=> 'h6'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'admin_label' => true\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "function btn_shortcode( $atts, $content = null ) {\n $a = shortcode_atts( array(\n 'href' => '#'\n ), $atts );\n \n return '<a class=\"button\" href=\"' . esc_attr($a['href']) . '\">' . $content . '</a>';\n}", "function quasar_call_portfolio_shortcode($atts=null){\n\t\tif(!$atts) return;\n\t\t\n\t\tif(!function_exists('rockthemes_make_swiperslider_shortcode') && $atts['use_swiper_for_thumbnails'] === 'true'){\n\t\t\t$atts['use_swiper_for_thumbnails'] = 'false';\n\t\t}\n\t\t\n\t\tif(function_exists('rockthemes_shortcode_make_portfolio')){\n\t\t\techo rockthemes_shortcode_make_portfolio($atts);\n\t\t}\n\t\t\n\t\treturn;\n\t}", "function shortcodes_enqueue() {\n\t\twp_enqueue_script('flavour_shortcodes', get_template_directory_uri().'/Flavour/shortcodes.js');\n\t\twp_enqueue_style('flavour_shortcodes', get_template_directory_uri().'/Flavour/shortcodes.css');\n\t}", "function add_shortcode( $atts, $content, $name ) {\n\n\t\tif (! $this->validate_shortcode( $atts, $content, $name ) ) {\n return '';\n }\n\n\t\t$options = $this->set_options( $atts );\n\n\t\tob_start();\n\n\t\tif ( is_active_sidebar( $options[\"sidebar_id\"] ) ) {\n\t\t\tdynamic_sidebar( $options[\"sidebar_id\"] );\n\t\t}\n\t\telse {\n\t\t\techo \"No active \\\"\".$options[\"sidebar_id\"].\"\\\" sidebar\";\n\t\t}\n\n\t\treturn ob_get_clean();\n\t}", "function htheme_launch_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_content_launch($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "function trebi_shortcode_handler($atts, $content=null, $code=\"\") {\n\t\t\t\n\t\t\t$ifstart = '<iframe src=\"https://portali.3bmeteo.com/3bm_meteo.php?';\n\t\t\t$ifend = '</iframe>';\n\t\t\t\n\t\t\tswitch ($code) {\n/* BLOCCO A (A1, A2, A3) */\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=xssmall&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"200\" height=\"220\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-a1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'xssmall',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc((int)$loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"200\" height=\"175\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=lsmall&new=1&c1=999999&c2=ffffff&b1=93c1db&b2=f0f0f0&b3=2a7fae\" width=\"195\" height=\"340\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-a2':\n\t\t\t\t\textract( shortcode_atts( array(\n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lsmall',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'c1' => '999999', \n\t\t\t\t\t 'c2' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => 'f0f0f0', \n\t\t\t\t\t 'b3' => '2a7fae',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&c2='.$c2.'&b1='.$b1.'&b2='.$b2.'&b3='.$b3.'\" width=\"185\" height=\"330\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=lbigor&new=1&c1=ffffff&c2=888888&b1=93c1db&b2=3a8ebd&b3=f0f0f0\" width=\"455\" height=\"195\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-a3':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lbigor',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'c2' => '888888',\n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd', \n\t\t\t\t\t 'b3' => 'f0f0f0',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&c2='.$c2.'&b1='.$b1.'&b2='.$b2.'&b3='.$b3.'\" width=\"455\" height=\"195\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* Blocco B (B1, B2) */\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=treale&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"195\" height=\"202\" frameborder=\"0\"></iframe>*/\n\t\t\t\tcase 'trebi-b1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'treale',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"195\" height=\"165\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&p=1&tm=ssmall&new=1&c1=ffffff&c2=aaaaaa&b1=93c1db&b2=3a8ebd&b3=f0f0f0\" width=\"245\" height=\"405\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-b2':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'p' => '1',\n\t\t\t\t\t 'tm' => 'ssmall',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'c2' => 'aaaaaa',\n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd', \n\t\t\t\t\t 'b3' => 'f0f0f0',\t\t\t\t\t \n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&p='.$p.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&c2='.$c2.'&b1='.$b1.'&b2='.$b2.'&b3='.$b3.'\" width=\"245\" height=\"380\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* BLOCCO C (C1, C2) */\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=lbig&new=1&c1=777777&c2=FFFFFF&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"460\" height=\"405\" frameborder=\"0\"></iframe>*/\n\t\t\t\tcase 'trebi-c1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lbig',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'c1' => '777777', \n\t\t\t\t\t 'c2' => 'FFFFFF',\n\t\t\t\t\t 'c3' => '93C1DB', \n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&c2='.$c2.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"460\" height=\"380\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=oraxora&c1=FFFFFF&c2=777777&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"455\" height=\"505\" frameborder=\"0\"></iframe>*/\n\t\t\t\tcase 'trebi-c2':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'oraxora',\n\t\t\t\t\t 'c1' => 'FFFFFF', \n\t\t\t\t\t 'c2' => '777777',\n\t\t\t\t\t 'c3' => '93C1DB',\n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&c2='.$c2.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"455\" height=\"500\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* BLOCCO D (D1, D2) */\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?idreg=1&new=1&tm=msmall&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"190\" height=\"310\" frameborder=\"0\"></iframe> */\t\n\t\t\t\tcase 'trebi-d1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'idreg' => '1',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'tm' => 'msmall',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlRegione($idreg);\n\t\t\t\t\treturn $ifstart.'idreg='.$idreg.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"190\" height=\"300\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?idreg=1&tm=msmacro&c1=FFFFFF&c2=555555&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"660\" height=\"542\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-d2':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'idreg' => '1',\n\t\t\t\t\t 'tm' => 'msmacro',\n\t\t\t\t\t 'c1' => 'FFFFFF', \n\t\t\t\t\t 'c2' => '555555',\n\t\t\t\t\t 'c3' => '93C1DB',\n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlRegione($idreg);\n\t\t\t\t\treturn $ifstart.'idreg='.$idreg.'&tm='.$tm.'&c1='.$c1.'&c2='.$c2.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"660\" height=\"515\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* BLOCCO E (E1, E2) */\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?loc=6&tm=lsmari&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"190\" height=\"260\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-e1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lsmari',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"190\" height=\"260\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?loc=6&tm=lmari&c1=FFFFFF&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"460\" height=\"390\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-e2':\n\t\t\t\t\textract( shortcode_atts( array(\n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lmari',\n\t\t\t\t\t 'c1' => 'FFFFFF', \n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t 'c3' => '93C1DB',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"460\" height=\"380\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* BLOCCO F (F1, F2) */\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?idreg=1&tm=mmari&c1=FFFFFF&c2=555555&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"650\" height=\"515\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-f1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'idreg' => '1', \n\t\t\t\t\t 'tm' => 'mmari',\n\t\t\t\t\t 'c1' => 'FFFFFF',\n\t\t\t\t\t 'c2' => '555555',\n\t\t\t\t\t 'c3' => '93C1DB', \n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlRegione($idreg);\n\t\t\t\t\treturn $ifstart.'idreg='.$idreg.'&tm='.$tm.'&c1='.$c1.'&c2='.$c2.'&b1='.$b1.'&b2='.$b2.'&c3='.$c3.'\" width=\"650\" height=\"515\" frameborder=\"0\">'.$ifend.$wloc;\n/* BLOCCO G (G1, G2) */\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?loc=6&tm=lsneve&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"190\" height=\"235\" frameborder=\"0\"></iframe> */\t\n\t\t\t\tcase 'trebi-g1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lsneve',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"210\" height=\"240\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?loc=6&tm=lneve&c1=FFFFFF&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"490\" height=\"425\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-g2':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lneve',\n\t\t\t\t\t 'c1' => 'FFFFFF', \n\t\t\t\t\t 'c3' => '93C1DB', \n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"490\" height=\"420\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "function zp_shortcode_label(){\r\n\r\n$zp_shortcode_label = array(\r\n\t// Acccordion \r\n\t'accordion' => array(\r\n\t\t'menu' => __('Accordion','drone' ),\r\n\t\t'header_title' => __( 'Insert Accordion Shortcode','drone'),\r\n\t\t'content' => array()\r\n\t),\r\n\t// Team\r\n\t'team' => array(\r\n\t\t'menu' => __('Team','drone' ),\r\n\t\t'header_title' => __( 'Insert Team Shortcode','drone'),\r\n\t\t'content' => array(\t)\r\n\t),\r\n\t// Blog \r\n\t'blog' => array(\r\n\t\t'menu' => __('Blog','drone' ),\r\n\t\t'header_title' => __( 'Insert Blog Shortcode','drone'),\r\n\t\t'content' => array()\r\n\t),\r\n\t\r\n\t// Buttons \r\n\t'buttons' => array(\r\n\t\t'menu' => __('Button','drone' ),\r\n\t\t'header_title' => __( 'Insert Button Shortcode','drone'),\r\n\t\t'content' => array(\r\n\t\t\t'type' => array(\r\n\t\t\t\t'label' => __( 'Type','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Select type for buttons.','drone' ),\r\n\t\t\t\t'values' => array( 'btn-default', 'btn-primary', 'btn-success', 'btn-info','btn-warning','btn-danger','btn-inverse' )\r\n\t\t\t),\r\n\t\t\t'size' => array(\r\n\t\t\t\t'label' => __( 'Size','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Select button size.','drone' ),\r\n\t\t\t\t'values' => array( 'Large', 'Medium', 'Small','Extra Small' )\r\n\t\t\t),\r\n\t\t\t'outline' => array(\r\n\t\t\t\t'label' => __( 'Outline Style','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Select true if you want to have an outline button.','drone' ),\r\n\t\t\t\t'values' => array( 'True', 'False')\r\n\t\t\t),\r\n\t\t\t'button_link' => array(\r\n\t\t\t\t'label' => __( 'Button Link','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add button link.','drone' )\r\n\t\t\t),\r\n\t\t\t'button_label' => array(\r\n\t\t\t\t'label' => __( 'Button Name','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add button name.','drone' )\r\n\t\t\t),\r\n\t\t\t'button_target' => array(\r\n\t\t\t\t'label' => __( 'Link Target','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Select button link target.','drone' ),\r\n\t\t\t\t'values' => array( '_blank', '_self', '_top', '_parent' )\r\n\t\t\t)\r\n\t\t)\r\n\t),\r\n\t// Portfolio \r\n\t'portfolio' => array(\r\n\t\t'menu' => __('Portfolio','drone' ),\r\n\t\t'header_title' => __( 'Insert Portfolio Shortcode','drone'),\r\n\t\t'content' => array(\r\n\t\t\t'preselect_cat' => array(\r\n\t\t\t\t'label' => __( 'Pre-select Category','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Category that will be loaded first in portfolio section. Leave empty to display all items.','drone' ),\r\n\t\t\t),\r\n\t\t\t'lightbox' => array(\r\n\t\t\t\t'label' => __( 'Enable Lightbox','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Select true to enable portfolio lightbox, false to enable portfolio link.','drone' ),\r\n\t\t\t\t'values' => array( 'True', 'False')\r\n\t\t\t)\r\n\t\t)\r\n\t),\r\n\t// Testimonial \r\n\t'testimonial' => array(\r\n\t\t'menu' => __('Testimonial','drone' ),\r\n\t\t'header_title' => __( 'Insert Testimonial Shortcode','drone'),\r\n\t\t'content' => array()\r\n\t),\r\n\t// Services \r\n\t'services' => array(\r\n\t\t'menu' => __('Service','drone' ),\r\n\t\t'header_title' => __( 'Insert Service Shortcode','drone'),\r\n\t\t'content' => array()\r\n\t),\r\n\t// Progress Bar \r\n\t'progress' => array(\r\n\t\t'menu' => __('Progress Bar','drone' ),\r\n\t\t'header_title' => __( 'Insert Progress Bar Shortcode','drone'),\r\n\t\t'content' => array()\r\n\t),\r\n\t// Columns \r\n\t'columns' => array(\r\n\t\t'menu' => __('Columns','drone' ),\r\n\t\t'header_title' => __( 'Insert column Shortcode','drone'),\r\n\t\t'content' => array(\t),\r\n\t\t'submenu' => array(\r\n\t\t\t'one_half' => __('One Half','drone' ),\r\n\t\t\t'one_third' => __('One Third','drone' ),\r\n\t\t\t'one_fourth' => __('One Fourth','drone' ),\r\n\t\t\t'column_grid_1' => __('Column Grid 1','drone' ),\r\n\t\t\t'column_grid_2' => __('Column Grid 2','drone' ),\r\n\t\t\t'column_grid_3' => __('Column Grid 3','drone' ),\r\n\t\t\t'column_grid_4' => __('Column Grid 4','drone' ),\r\n\t\t\t'column_grid_5' => __('Column Grid 5','drone' ),\r\n\t\t\t'column_grid_6' => __('Column Grid 6','drone' ),\r\n\t\t\t'column_grid_7' => __('Column Grid 7','drone' ),\r\n\t\t\t'column_grid_8' => __('Column Grid 8','drone' ),\r\n\t\t\t'column_grid_9' => __('Column Grid 9','drone' ),\r\n\t\t\t'column_grid_10' => __('Column Grid 10','drone' ),\r\n\t\t\t'column_grid_11' => __('Column Grid 11','drone' ),\r\n\t\t\t'column_grid_12' => __('Column Grid 12','drone' ),\r\n\t\t)\r\n\r\n\t),\r\n\t// Tabs \r\n\t'tab' => array(\r\n\t\t'menu' => __('Tab','drone' ),\r\n\t\t'header_title' => __( 'Insert Tab Shortcode','drone'),\r\n\t\t'content' => array(\r\n\t\t\t'id1' => array(\r\n\t\t\t\t'label' => __( 'First Tab ID','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add first tab ID. This must be unique and one word only.','drone' )\r\n\t\t\t),\r\n\t\t\t'title1' => array(\r\n\t\t\t\t'label' => __( 'First Tab Title','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add first tab title.','drone' )\r\n\t\t\t),\r\n\t\t\t'content1' => array(\r\n\t\t\t\t'label' => __( 'First Tab Content','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add first tab content.','drone' )\r\n\t\t\t),\r\n\t\t\t'id2' => array(\r\n\t\t\t\t'label' => __( 'Second Tab ID','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add second tab ID. This must be unique and one word only.','drone' )\r\n\t\t\t),\r\n\t\t\t'title2' => array(\r\n\t\t\t\t'label' => __( 'Second Tab Title','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add second tab title.','drone' )\r\n\t\t\t),\r\n\t\t\t'content2' => array(\r\n\t\t\t\t'label' => __( 'Second Tab Content','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add second tab content.','drone' )\r\n\t\t\t),\r\n\t\t\t'id3' => array(\r\n\t\t\t\t'label' => __( 'Third Tab ID','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add third tab ID. This must be unique and one word only.','drone' )\r\n\t\t\t),\r\n\t\t\t'title3' => array(\r\n\t\t\t\t'label' => __( 'Third Tab Title','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add third tab title.','drone' )\r\n\t\t\t),\r\n\t\t\t'content3' => array(\r\n\t\t\t\t'label' => __( 'Third Tab Content','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add third tab content.','drone' )\r\n\t\t\t),\r\n\t\t\t\r\n\t\t)\r\n\t),\r\n\t// Client Carousel\r\n\t'client_carousel' => array(\r\n\t\t'menu' => __('Client Carousel','drone' ),\r\n\t\t'header_title' => __( 'Insert Client Carousel Shortcode','drone'),\r\n\t\t'content' => array(\r\n\t\t\t'name' => array(\r\n\t\t\t\t'label' => __( 'Add Carousel Name','drone' ),\r\n\t\t\t\t'tooltip' => __( 'This serves as carousel ID. It must be unique and avoid using spaces. Ex. \"client_carousel\".','drone' )\r\n\t\t\t)\t\t\t\r\n\t\t)\r\n\t),\r\n\t// Slider\r\n\t'slider' => array(\r\n\t\t'menu' => __('Slider','drone' ),\r\n\t\t'header_title' => __( 'Insert Slider Shortcode','drone'),\r\n\t\t'content' => array(\t)\r\n\t)\r\n);\r\n\r\nreturn $zp_shortcode_label;\r\n}", "public function __construct() {\n\n $this->config = array(\n\n // Handle will be used to use this shortcode\n 'handle' => 'cv_progress_task',\n\n // Whether or not this is a shortcode composer element\n 'composer_element' => false,\n\n // Whether or not this is a template builder element\n 'builder_element' => true,\n\n // Used by the template builder to determine where module can be dropped\n 'drop_target' => 3,\n\n // Used by the template builder to determine where module can have other\n // modules dropped inside of it\n 'drop_zone' => false,\n\n // Title will be used to identify this shortcode\n 'title' => __( 'Task', 'canvys' ),\n\n // Icon will be used to represent this shortcode in composer/builder\n // List of available icons can be found in icons.json\n 'icon' => 'tasks',\n\n // Whether or not shortcode is self closing\n 'self_closing' => true,\n\n // If shortcode is not self closing, specify its default content\n 'default_content' => null,\n\n // Specify whether or not content is directly editable\n 'content_editor' => false,\n\n // Specify whether or not the content is composed of another shortcode\n 'content_element' => false,\n\n // Array of shortcode settings and their respective attributes\n 'attributes' => array(\n\n new CV_Shortcode_Text_Control( 'title', array(\n 'title' => __( 'Title', 'canvys' ),\n 'description' => __( 'Specify the title of this task.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Number_Control( 'progress', array(\n 'title' => __( 'Progress Percentage', 'canvys' ),\n 'description' => __( 'Specify the percentage completed for this task, enter a numeric value only.', 'canvys' ),\n 'placeholder' => '0 - 100',\n ) ),\n\n new CV_Shortcode_Color_Control( 'color', array(\n 'title' => __( 'Custom Color', 'canvys' ),\n 'description' => __( 'Specify a custom color to be used for this task, if none is specified te default color will be used.', 'canvys' ),\n ) ),\n\n ),\n );\n }", "public function run(){\n\t\tparent::run();\n\n\t\tadd_shortcode(\"wb_legal_name\", function(){\n\t\t\tob_start();\n\t\t\t$company = empty(\\Waboot\\functions\\get_option($this->name.'_company_name')) ? \"Company Name\" : \\Waboot\\functions\\get_option($this->name.'_company_name');\n\t\t\techo $company;\n\t\t\t$return_string = trim( preg_replace( \"|[\\r\\n\\t]|\", \"\", ob_get_clean() ) );\n\t\t\treturn $return_string;\n\t\t});\n\t\tadd_shortcode(\"wb_legal_address\", function(){\n\t\t\tob_start();\n\t\t\t$address = empty(\\Waboot\\functions\\get_option($this->name.'_address')) ? \"Company Address\" : \\Waboot\\functions\\get_option($this->name.'_address');\n\t\t\techo $address;\n\t\t\t$return_string = trim( preg_replace( \"|[\\r\\n\\t]|\", \"\", ob_get_clean() ) );\n\t\t\treturn $return_string;\n\t\t});\n\t\tadd_shortcode(\"wb_legal_mail\", function(){\n\t\t\tob_start();\n\t\t\t$mail = empty(\\Waboot\\functions\\get_option($this->name.'_mail')) ? \"Company Mail\" : \\Waboot\\functions\\get_option($this->name.'_mail');\n\t\t\techo $mail;\n\t\t\t$return_string = trim( preg_replace( \"|[\\r\\n\\t]|\", \"\", ob_get_clean() ) );\n\t\t\treturn $return_string;\n\t\t});\n\t\tadd_shortcode(\"wb_legal_tel\", function(){\n\t\t\tob_start();\n\t\t\t$tel = empty(\\Waboot\\functions\\get_option($this->name.'_tel')) ? \"Company Tel\" : \\Waboot\\functions\\get_option($this->name.'_tel');\n\t\t\techo $tel;\n\t\t\t$return_string = trim( preg_replace( \"|[\\r\\n\\t]|\", \"\", ob_get_clean() ) );\n\t\t\treturn $return_string;\n\t\t});\n\t\tadd_shortcode(\"wb_legal_siteurl\", function(){\n\t\t\tob_start();\n\t\t\t$siteurl = empty(\\Waboot\\functions\\get_option($this->name.'_siteurl')) ? preg_replace('/http:\\/\\//', '', get_home_url()) : \\Waboot\\functions\\get_option($this->name.'_siteurl');\n\t\t\techo $siteurl;\n\t\t\t$return_string = trim( preg_replace( \"|[\\r\\n\\t]|\", \"\", ob_get_clean() ) );\n\t\t\treturn $return_string;\n\t\t});\n\t\tadd_shortcode(\"wb_legal_rep\", function(){\n\t\t\tob_start();\n\t\t\t$siteurl = empty(\\Waboot\\functions\\get_option($this->name.'_rep')) ? \"Company Legal Representative\" : \\Waboot\\functions\\get_option($this->name.'_rep');\n\t\t\techo $siteurl;\n\t\t\t$return_string = trim( preg_replace( \"|[\\r\\n\\t]|\", \"\", ob_get_clean() ) );\n\t\t\treturn $return_string;\n\t\t});\n\t}", "function render_block_core_shortcode($attributes, $content)\n {\n }", "public function handleShortcodes($attr, $content)\r\n {\r\n $this->mapNum++;\r\n $mapInfo = $this->getMapDetails($attr, $content);\r\n if (function_exists('json_encode')) {\r\n \t$json = json_encode($mapInfo);\r\n } else {\r\n\t\t\trequire_once('json_encode.php');\r\n \t$json = Zend_Json_Encoder::encode($mapInfo);\r\n\t\t}\r\n\r\n return <<<mapCode\r\n<div id='map_{$this->mapNum}' style='width:{$mapInfo->width}; height:{$mapInfo->height};' class='googleMap'></div>\r\n<div id='dir_{$this->mapNum}'></div>\r\n<script type=\"text/javascript\">\r\n//<![CDATA[\r\nif (GBrowserIsCompatible()) {\r\n wpGMaps.wpNewMap({$this->mapNum}, {$json});\r\n}\r\n//]]>\r\n</script>\r\nmapCode;\r\n }", "function render_sc_myShortcode( $context ) {\n\tob_start();\n\t?>\n<div>Some: <?=$context['disp1']?></div>\n<div>Another: <?=$context['disp2']?></div>\n<?php\n\treturn ob_get_clean();\n}", "function wpestate_shortcodes(){\n wpestate_register_shortcodes();\n wpestate_tiny_short_codes_register();\n add_filter('widget_text', 'do_shortcode');\n}", "function register_shortcodes(){\n\n\t\t$this->shortcodes = new WordpressConnectShortCodes();\n\n\t}", "public function wppcShortcode($atts)\n\t\t\t{\n\t\t\t\t// Shortcode default atributes\n\t\t\t\t$atts = shortcode_atts(array('id' => 1), $atts);\n\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$contest = $wpdb->get_row('SELECT * FROM '.WPPC_TABLE_ALL_CONTESTS.' WHERE id='.$atts['id']);\n\t\t\t\t$contestWinners = unserialize($contest->contest_winners);\n\t\t\t\t?>\n\n\t\t\t\t<div id=\"wppc-contest\">\n\t\t\t\t\t<div id=\"wppc-main\">\n\t\t\t\t\t\t<div id=\"contest-tabs\" style=\"display: inline;\">\n\t\t\t\t\t\t\t<ul id=\"contest-nav\" style=\"margin-bottom: 20px; margin-top: 20px;\">\n\t\t\t\t\t\t\t\t<?php if ($contest->contest_about != ''): ?><li style=\"display: inline; margin-right: 2rem;\" <?php if ($contest->start_date > date('Y-m-d h:m:s', time())): ?>class=\"ui-state-default ui-corner-top ui-tabs-active ui-state-active\"<?php endif; ?>><a href=\"#contest-about\">About</a></li><?php endif; ?>\n\t\t\t\t\t\t\t\t<?php if ($contest->start_date <= date('Y-m-d h:m:s', time())): ?><li style=\"display: inline; margin-right: 2rem;\" class=\"ui-state-default ui-corner-top ui-tabs-active ui-state-active\"><a href=\"#contest-photo-gallery\">Photo Gallery</a></li><?php endif; ?>\n\t\t\t\t\t\t\t\t<?php if ($contestWinners['text'] != ''): ?><li style=\"display: inline; margin-right: 2rem;\"><a href=\"#contest-winners\">Winners</a></li><?php endif; ?>\n\t\t\t\t\t\t\t\t<?php if ($contest->contest_rules != ''): ?><li style=\"display: inline; margin-right: 2rem;\"><a href=\"#contest-rules\">Rules</a></li><?php endif; ?>\n\t\t\t\t\t\t\t\t<?php if ($contest->contest_prizes != ''): ?><li style=\"display: inline; margin-right: 2rem;\"><a href=\"#contest-prizes\">Prizes</a></li><?php endif; ?>\n\t\t\t\t\t\t\t\t<?php if ($contest->start_date <= date('Y-m-d h:m:s', time()) && date('Y-m-d h:m:s', time()) <= date('Y-m-d', strtotime('+1 day' , strtotime($contest->end_registration)))): ?><li style=\"display: inline; margin-right: 2rem;\"><a href=\"#contest-entry-form\">Entry form</a></li><?php endif; ?>\n\t\t\t\t\t\t\t\t<?php if ($contest->contest_contact != ''): ?><li style=\"display: inline; margin-right: 2rem;\"><a href=\"#contest-contact\">Contact</a></li><?php endif; ?>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- Contest about -->\n\t\t\t\t\t\t\t<?php if ($contest->contest_about != ''): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-about\">';\n\t\t\t\t\t\t\t\t\t<?php echo $this->formatContent($contest->contest_about); ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<!-- Contest photo gallery -->\n\t\t\t\t\t\t\t<?php if ($contest->start_date <= date('Y-m-d h:m:s', time())): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-photo-gallery\">\n\t\t\t\t\t\t\t\t\t<?php echo $contest->contest_photo_gallery; ?>\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t$totalDays = (strtotime($contest->end_registration) - strtotime($contest->start_date)) / (60*60*24);\n\t\t\t\t\t\t\t\t\t\t$weeks = $totalDays % 7 != 0 ? $totalDays / 7 + 1 : $totalDays / 7;\n\t\t\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t\t\t\t<!-- Contest filters -->\n\t\t\t\t\t\t\t\t\t<div id=\"wppc-filters\" class=\"row\" style=\"margin-top:20px; margin-bottom: 20px;\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" value=\"<?php echo $contest->id ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t<select name=\"wppc-weeks\" id=\"wppc-weeks\" class=\"form-control wppc-select-filter\">\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"week-all\">All weeks</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($week = 1; $week <= $weeks; $week ++)\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"week-'.$week.'\">Week '.$week.'</option>';\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-md-3 col-md-offset-1\">\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" value=\"<?php echo $contest->id ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t<select name=\"wppc-points\" id=\"wppc-points\" class=\"form-control wppc-select-filter\">\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-all\">All points</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-0\">0 points</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-1\">1 point</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-2\">2 points</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-3\">3 points</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-4\">4 points</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-5\">5 points</option>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<?php if ($contest->photos_mobile_allowed > 0): ?>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-md-3 col-md-offset-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" value=\"<?php echo $contest->id ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" value=\"mobile-only\" class=\"btn btn-primary\" id=\"wppc-button-filter\">Mobile only</button>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<!-- Contest photos -->\n\t\t\t\t\t\t\t\t\t<div id=\"wppc-photos\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t$wpDir = wp_upload_dir();\n\t\t\t\t\t\t\t\t\t\t\t$contestDir = $wpDir['baseurl'].'/wppc-photos/wppc-photos-'.$contest->id.'/';\n\n\t\t\t\t\t\t\t\t\t\t\t// Get all photos for this contest\n\t\t\t\t\t\t\t\t\t\t\t$contestPhotos = $wpdb->get_results('SELECT * FROM '.WPPC_TABLE_CONTESTS_ENTRIES.' WHERE contest_id='.$contest->id.' AND visible=1');\n\n\t\t\t\t\t\t\t\t\t\t\t// Shuffle photos\n\t\t\t\t\t\t\t\t\t\t\tshuffle($contestPhotos);\n\n\t\t\t\t\t\t\t\t\t\t\t// Get points\n\t\t\t\t\t\t\t\t\t\t\t$contestPoints = array($contest->first_point, $contest->second_point, $contest->third_point, $contest->forth_point, $contest->fifth_point);\n\n\t\t\t\t\t\t\t\t\t\t\t$this->displayContestPhotos($contestPhotos, $contest->contest_name, $contest->end_vote, $contestDir, $contestPoints, get_permalink(get_the_id()), $contest->contest_social_description, $this->photosPerPage);\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?> \n\n\t\t\t\t\t\t\t<!-- Contest winners -->\n\t\t\t\t\t\t\t<?php if ($contestWinners['text'] != ''): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-winners\">\n\t\t\t\t\t\t\t\t\t<?php echo $contestWinners['text'] ?>\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<h2>First prize</h2>\n\t\t\t\t\t\t\t\t\t\t<?php $firstWinner = $wpdb->get_row(\"SELECT * FROM WPPC_TABLE_CONTESTS_ENTRIES WHERE contest_id='\".$atts['id'].\"' AND photo_id=\".$contestWinners['first-winner'], ARRAY_A); ?>\n\t\t\t\t\t\t\t\t\t\t<a class=\"group1\" href=\"<?php echo $contestDir ?>medium/<?php echo $firstWinner['competitor_photo'] ?>\" title=\"\">\n\t\t\t\t\t\t\t\t\t\t\t<img src=\"<?php echo $contestDir ?>medium/<?php echo $firstWinner['competitor_photo'] ?>\" alt=\"<?php echo $firstWinner['photo_name'] ?>\" />\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"no-padding-left col-md-6\">\n\t\t\t\t\t\t\t\t\t\t\t<h2>Second prize</h2>\n\t\t\t\t\t\t\t\t\t\t\t<?php $secondWinner = $wpdb->get_row(\"SELECT * FROM WPPC_TABLE_CONTESTS_ENTRIES WHERE contest_id='\".$atts['id'].\"' AND photo_id=\".$contestWinners['second-winner'], ARRAY_A); ?>\n\t\t\t\t\t\t\t\t\t\t\t<a class=\"group1\" href=\"<?php echo $contestDir ?>medium/<?php echo $secondWinner['competitor_photo'] ?>\" title=\"\" style=\"background-image: url('<?php echo $contestDir ?>medium/<?php echo $secondWinner['competitor_photo'] ?>'); position: relative; float: left; width: 100%; height: 300px; background-position: 50% 50%; background-repeat: no-repeat; background-size: cover;\">\n\t\t\t\t\t\t\t\t\t\t\t\t<!-- <img src=\"<?php echo $contestDir ?>medium/<?php echo $secondWinner['competitor_photo'] ?>\" alt=\"<?php echo $secondWinner['photo_name'] ?>\" /> -->\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"no-padding-right col-md-6\">\n\t\t\t\t\t\t\t\t\t\t\t<h2>Third prize</h2>\n\t\t\t\t\t\t\t\t\t\t\t<?php $thirdWinner = $wpdb->get_row(\"SELECT * FROM WPPC_TABLE_CONTESTS_ENTRIES WHERE contest_id='\".$atts['id'].\"' AND photo_id=\".$contestWinners['third-winner'], ARRAY_A); ?>\n\t\t\t\t\t\t\t\t\t\t\t<a class=\"group1\" href=\"<?php echo $contestDir ?>medium/<?php echo $thirdWinner['competitor_photo'] ?>\" title=\"\" style=\"background-image: url('<?php echo $contestDir ?>medium/<?php echo $thirdWinner['competitor_photo'] ?>'); position: relative; float: left; width: 100%; height: 300px; background-position: 50% 50%; background-repeat: no-repeat; background-size: cover;\">\n\t\t\t\t\t\t\t\t\t\t\t\t<!-- <img src=\"<?php echo $contestDir ?>medium/<?php echo $thirdWinner['competitor_photo'] ?>\" alt=\"<?php echo $thirdWinner['photo_name'] ?>\" /> -->\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<h2>Our favorites</h2>\n\t\t\t\t\t\t\t\t\t\t<?php foreach ($contestWinners['our-favorites'] as $photoID): ?>\n\t\t\t\t\t\t\t\t\t\t\t<?php $photo = $wpdb->get_row(\"SELECT * FROM WPPC_TABLE_CONTESTS_ENTRIES WHERE contest_id='\".$atts['id'].\"' AND photo_id=\".$photoID, ARRAY_A); ?>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"group1\" href=\"<?php echo $contestDir ?>medium/<?php echo $photo['competitor_photo'] ?>\" title=\"\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"<?php echo $contestDir ?>thumbs/<?php echo $photo['competitor_photo'] ?>\" alt=\"<?php echo $photo['photo_name'] ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<!-- Contest rules -->\n\t\t\t\t\t\t\t<?php if ($contest->contest_rules != ''): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-rules\">\n\t\t\t\t\t\t\t\t\t<div id=\"rules-tabs\">\n\t\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t\t<li style=\"display: inline; margin-right: 2rem;\"><a href=\"#en-rules\"><img style=\"max-width: 30px;\" src=\"<?php echo WPPC_URI.'img/flags/uk-flag.png' ?>\" /></a></li>\n\t\t\t\t\t\t\t\t\t\t\t<li style=\"display: inline; margin-right: 2rem;\"><a href=\"#ro-rules\"><img style=\"max-width: 30px;\" src=\"<?php echo WPPC_URI.'img/flags/ro-flag.png' ?>\" /></a></li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t<?php $rules = unserialize($contest->contest_rules); ?>\n\t\t\t\t\t\t\t\t\t\t<div id=\"en-rules\"><?php echo $rules['en'] ?></div>\n\t\t\t\t\t\t\t\t\t\t<div id=\"ro-rules\"><?php echo $rules['ro'] ?></div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<!-- Contest prizes -->\n\t\t\t\t\t\t\t<?php if ($contest->contest_prizes != ''): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-prizes\">\n\t\t\t\t\t\t\t\t\t<?php echo $this->formatContent($contest->contest_prizes); ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<!-- Contest entry form -->\n\t\t\t\t\t\t\t<?php if ($contest->start_date <= date('Y-m-d h:m:s', time()) && date('Y-m-d h:m:s', time()) <= date('Y-m-d', strtotime('+1 day' , strtotime($contest->end_registration)))): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-entry-form\">\n\t\t\t\t\t\t\t\t\t<?php $this->setEntryForm($contest->id, $contest->contest_entry_form); ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<!-- Contest contact -->\n\t\t\t\t\t\t\t<?php if ($contest->contest_contact != ''): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-contact\">\n\t\t\t\t\t\t\t\t\t<?php echo $contest->contest_contact; ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t</div> <!-- end contest-tabs -->\n\t\t\t\t\t</div> <!-- end wppc-main -->\n\n\t\t\t\t\t<div id=\"wppc-sidebar\">\n\t\t\t\t\t\t<?php /* Follow us */ setFollowUs(); ?>\n\t\t\t\t\t\t<br/><br/>\n\t\t\t\t\t\t<?php echo $contest->contest_sidebar ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}", "function ground_shortcode_map( $atts, $content = null ) {\n\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\t'width' => '640',\n\t\t\t'height' => '480',\n\t\t\t'src' => '',\n\t\t\t'ratio' => '',\n\t\t),\n\t\t$atts,\n\t\t'map'\n\t);\n\n\tif ( ! isset( $atts['ratio'] ) ) {\n\t\treturn '<iframe frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"' . esc_html( $atts['src'] ) . '&amp;output=embed\"></iframe>';\n\t} else {\n\t\treturn '<div class=\"ratio-' . esc_html( $atts['ratio'] ) . '\"><iframe width=\"' . esc_html( $atts['width'] ) . '\" height=\"' . esc_html( $atts['height'] ) . '\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"' . esc_html( $atts['src'] ) . '&amp;output=embed\"></iframe></div>';\n\t}\n\n}", "function new_project( $atts ){\n\n$a = shortcode_atts( array(\n 'project_name' => 'Projekt Name',\n 'tag_name' => 'Tag Name',\n 'color' => 'grey',\n 'project_descr' => 'Beschreibung'\n), $atts );\n\n$project_name = $a['project_name'];\n$tag_name = $a['tag_name'];\n$color = $a['color'];\n$project_descr = $a['project_descr'];\n\necho '<div class=\"card horizontal\" style=\"margin-bottom: 6vh;\">\n<div class=\"card-stacked\" >\n <div class=\"card-content\">\n <div class=\"row\">\n <div class=\"col s12 m12 l5\">\n <div style=\"text-align: center\">\n <div style=\"margin-bottom: 3vh;\">\n <h3 class=\"thin\">' . $project_name . '</h3>\n </div>\n <div class=\"divider\" style=\"margin: 3vh;\"> </div>\n <div style=\"padding: 5vh;\">\n <span class=\"light\">' . \n $project_descr . \n '</span>\n </div>\n </div>\n </div>\n <div class=\"col s12 m12 l7\">\n <div id=\"' . $tag_name . '-carousel\" class=\"' . $color . ' carousel carousel-slider\" data-indicators=\"true\">\n <div class=\"hide-on-small-only carousel-fixed-item right row\">\n <div class=\"col m1 offset-m10\" style=\"background-color: rgba(255,255,255,0.7);\">\n <i class=\"center material-icons waves-effect waves-light\" onclick=\"$(\\'#' . $tag_name . '-carousel\\').carousel(\\'prev\\');\">chevron_left</i>\n </div>\n <div class=\"col m1\" style=\"background-color: rgba(255,255,255,0.7);\">\n <i class=\"center material-icons waves-effect waves-light\" onclick=\"$(\\'#' . $tag_name . '-carousel\\').carousel(\\'next\\');\">chevron_right</i>\n </div>\n </div>';\n\necho do_shortcode(\"[ic_add_posts tag='$tag_name' template='single_project_template.php' showposts='3']\");\n\necho '</div>\n </div>\n </div>\n </div>\n</div>\n</div>';\n}", "protected function add_VcMap($params, $name='', $shortcode='', $show_settings=true){\n\t\t// \t$name = str_replace($namespace. '\\\\','', get_class($this) );\n if(!$name) $name = 'Magiccart ' . ucfirst($this->_class);\n \tif(!$shortcode) $shortcode = 'magiccart_' . strtolower($this->_class);\n // $html_template = plugin_dir_path(__DIR__) . 'Magiccart/Composer/view/frontend/templates/vc_template.php';\n \t$this->_vcSetting = array(\n \t\t\t'name' => $name,\n \t\t\t'base' => $shortcode,\n \t\t\t'category' => __( 'Magiccart', 'alothemes' ),\n 'is_container' => false,\n \t\t\t'params'\t => $params,\n 'icon' => get_template_directory_uri() . \"/images/logo.png\",\n 'show_settings_on_create' => $show_settings,\n // 'html_template' => locate_template('templates/vc_row-header.php') ,\n\n \t);\n \n vc_map($this->_vcSetting);\n }", "function shortcode_template( $atts, $content = null ) {\r\n\t\t\tglobal $MPC_Shortcode, $mpc_ma_options;\r\n\t\t\tif ( ! defined( 'MPC_MASSIVE_FULL' ) || ( defined( 'MPC_MASSIVE_FULL' ) && $mpc_ma_options[ 'single_js_css' ] !== '1' ) ) {\r\n\t\t\t\t$this->enqueue_shortcode_scripts();\r\n\t\t\t}\r\n\r\n\t\t\t$atts = shortcode_atts( array(\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'preset' => '',\r\n\r\n\t\t\t\t/* General */\r\n\t\t\t\t'properties' => '',\r\n\t\t\t\t'properties_font_color' => '',\r\n\t\t\t\t'properties_font_align' => '',\r\n\t\t\t\t'properties_font_transform' => '',\r\n\t\t\t\t'prop_padding_css' => '',\r\n\r\n\t\t\t\t'prop_even_background_type' => 'color',\r\n\t\t\t\t'prop_even_background_color' => '',\r\n\t\t\t\t'prop_even_background_image' => '',\r\n\t\t\t\t'prop_even_background_image_size' => 'large',\r\n\t\t\t\t'prop_even_background_repeat' => 'no-repeat',\r\n\t\t\t\t'prop_even_background_size' => 'initial',\r\n\t\t\t\t'prop_even_background_position' => 'middle-center',\r\n\t\t\t\t'prop_even_background_gradient' => '#83bae3||#80e0d4||0;100||180||linear',\r\n ), $atts );\r\n\r\n\t\t\t/* Prepare */\r\n\t\t\t$styles = $this->shortcode_styles( $atts );\r\n\t\t\t$css_id = $styles[ 'id' ];\r\n\t\t\t$MPC_Shortcode[ 'pricing' ][ 'style' ] .= $styles[ 'css' ];\r\n\r\n\t\t\t$animation = MPC_Parser::animation( $atts );\r\n\t\t\t$properties = explode( '|||', $atts[ 'properties' ] );\r\n\r\n\t\t\t/* Fonts Presets */\r\n\t\t\t$title_classes = $MPC_Shortcode[ 'pricing' ][ 'presets' ][ 'title' ] != '' ? ' mpc-typography--' . $MPC_Shortcode[ 'pricing' ][ 'presets' ][ 'title' ] : '';\r\n\t\t\t$price_classes = $MPC_Shortcode[ 'pricing' ][ 'presets' ][ 'price' ] != '' ? ' mpc-typography--' . $MPC_Shortcode[ 'pricing' ][ 'presets' ][ 'price' ] : '';\r\n\t\t\t$props_classes = $MPC_Shortcode[ 'pricing' ][ 'presets' ][ 'prop' ] != '' ? ' mpc-typography--' . $MPC_Shortcode[ 'pricing' ][ 'presets' ][ 'prop' ] : '';\r\n\r\n\t\t\t/* Prepare Parts */\r\n\t\t\t$title = $MPC_Shortcode[ 'pricing' ][ 'disable' ][ 'title' ] == '' ? '<div class=\"mpc-pricing__title' . $title_classes . '\">&nbsp;</div>' : '';\r\n\t\t\t$price = $MPC_Shortcode[ 'pricing' ][ 'disable' ][ 'price' ] == '' ? '<div class=\"mpc-pricing__price' . $price_classes . '\">&nbsp;</div>' : '';\r\n\r\n\t\t\t$props = '<div class=\"mpc-pricing__properties' . $props_classes . '\">';\r\n\t\t\tforeach( $properties as $property ) {\r\n\t\t\t\t$props .= '<div class=\"mpc-pricing__property\">' . $property . '</div>';\r\n\t\t\t}\r\n\t\t\t$props .= '</div>';\r\n\r\n\t\t\t/* Shortcode classes | Animation | Layout */\r\n\t\t\t$classes = $animation != '' ? ' mpc-animation' : '';\r\n\t\t\t$classes .= ' ' . esc_attr( $atts[ 'class' ] );\r\n\r\n\t\t\t/* Shortcode Output */\r\n\t\t\t$return = '<div id=\"' . $css_id . '\" class=\"mpc-pricing-column mpc-pricing-legend' . $classes . '\" ' . $animation . '>';\r\n\t\t\t\t$return .= $title . $price . $props;\r\n\t\t\t$return .= '</div>';\r\n\r\n\t\t\t$MPC_Shortcode[ 'pricing' ][ 'parts' ][ 'legend' ] = $return;\r\n\r\n\t\t\tglobal $mpc_frontend;\r\n\t\t\tif ( $mpc_frontend ) {\r\n\t\t\t\t$css = '<style>' . $styles[ 'css' ] . '</style>';\r\n\r\n\t\t\t\treturn $css;\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t}", "function mattu_portfolio_register_shortcodes() {\n\tadd_shortcode('portfolio_items', 'mattu_portfolio_items_shortcode' );\n}", "public function GrJsShortcodes()\n\t{\n\t\t$GrOptionDbPrefix = 'GrIntegrationOptions_';\n\t\t$api_key = get_option($GrOptionDbPrefix . 'api_key');\n\t\t$api_url = get_option($GrOptionDbPrefix . 'api_url');\n\t\t$api_domain = get_option($GrOptionDbPrefix . 'api_domain');\n\n\t\t$webforms = null;\n\t\t$forms = null;\n\t\t$campaingns = null;\n\t\tif ( !empty($api_key))\n\t\t{\n\t\t\t$api = new GetResponseIntegration($api_key, $api_url, $api_domain, is_ssl());\n\t\t\t$webforms = $api->getWebforms(array('sort' => array('name' => 'asc')));\n\t\t\t$forms = $api->getForms(array('sort' => array('name' => 'asc')));\n\t\t\t$api_key = 'true';\n\t\t\t$campaingns = $api->getCampaigns(); // for 3.8 version\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$api_key = 'false';\n\t\t}\n\n\t\tif (strlen($api_domain) > 0)\n\t\t{\n\t\t\t$webforms = $this->setGetResponse360domainToWebFormUrl($webforms, $api_domain);\n\t\t\t$forms = $this->setGetResponse360domainToWebFormUrl($forms, $api_domain);\n\t\t}\n\n\t\t$webforms = json_encode($webforms);\n\t\t$forms = json_encode($forms);\n\t\t$campaingns = json_encode($campaingns); // for 3.8 version\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tvar my_webforms = <?php echo $webforms; ?>;\n\t\t\tvar my_forms = <?php echo $forms; ?>;\n\t\t\tvar my_campaigns = <?php echo $campaingns; // for 3.8 version ?>;\n\t\t\tvar text_forms = '<?php echo __('New Forms', 'Gr_Integration'); ?>';\n\t\t\tvar text_webforms = '<?php echo __('Old Web Forms', 'Gr_Integration'); ?>';\n\t\t\tvar text_no_forms = '<?php echo __('No Forms', 'Gr_Integration'); ?>';\n\t\t\tvar text_no_webforms = '<?php echo __('No Web Forms', 'Gr_Integration'); ?>';\n\t\t\tvar api_key = <?php echo $api_key; ?>;\n\t\t</script>\n\t\t<?php\n\t}", "function bbboing_oik_add_shortcodes() { \r\n bw_add_shortcode( 'bbboing', 'bbboing_sc', oik_path( \"bbboing.inc\", \"bbboing\" ), false );\r\n}", "function unique_register_shortcodes() {\r\n\r\n\t/* Adds the [entry-mood] shortcode. */\r\n\tadd_shortcode( 'entry-mood', 'unique_entry_mood_shortcode' );\r\n\r\n\t/* Adds the [entry-views] shortcode. */\r\n\tadd_shortcode( 'entry-views', 'unique_entry_views_shortcode' );\r\n}" ]
[ "0.69741356", "0.6955404", "0.68054503", "0.6779604", "0.67185044", "0.6704786", "0.66726476", "0.6641282", "0.6622062", "0.66150075", "0.65910774", "0.6578295", "0.65373695", "0.6536184", "0.653225", "0.6517163", "0.64931536", "0.6486561", "0.6478741", "0.64619046", "0.6435991", "0.64344746", "0.6347628", "0.63402337", "0.63289243", "0.63289183", "0.6328713", "0.63100576", "0.6298482", "0.6285299", "0.626569", "0.6263182", "0.62630296", "0.6235562", "0.6232901", "0.6214665", "0.62098086", "0.61881495", "0.61807334", "0.61702347", "0.61678934", "0.6157043", "0.6152005", "0.6150804", "0.6145997", "0.6142229", "0.61313194", "0.6126268", "0.6118046", "0.61071897", "0.61004883", "0.6099632", "0.6091946", "0.60881877", "0.6087706", "0.60870546", "0.6086154", "0.6068083", "0.6067106", "0.60661507", "0.6065977", "0.6048431", "0.6044074", "0.60386634", "0.6037942", "0.6022772", "0.60218763", "0.60195315", "0.6019261", "0.6014114", "0.60079896", "0.59889966", "0.59883636", "0.59855354", "0.59719896", "0.597111", "0.59703463", "0.59671074", "0.5964749", "0.59600013", "0.59589964", "0.5957266", "0.59537446", "0.5948405", "0.594061", "0.59403133", "0.5935995", "0.59353787", "0.5935354", "0.5933021", "0.592887", "0.5926601", "0.5903543", "0.5900398", "0.58919466", "0.5888871", "0.58866894", "0.58783966", "0.5878141", "0.58780587" ]
0.6106136
50
Returns the number of elements in the repository.
public function count();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count()\n {\n return count($this->entities);\n }", "public function count()\n {\n return count($this->entities);\n }", "public function numOfPages(): int\n {\n return count($this->repository);\n }", "public function count() : int {\n return count($this->elements);\n }", "public function count(): int {\n return count($this->toArray());\n }", "public function count(): int\n {\n return \\count($this->elements);\n }", "public function count()\n {\n return $this->items()->count();\n }", "public function count(): int\n {\n return count($this->elements);\n }", "public function count(): int {\n return count($this->items);\n }", "public function count(): int\n {\n return count( $this->toArray() );\n }", "public function count()\n {\n return $this->size();\n }", "public function size(): int {\n\t\treturn $this->count();\n\t}", "public function count(): int\n\t{\n\t\treturn count($this->all());\n\t}", "public function count()\r\n {\r\n return count($this->items);\r\n }", "final public function count(): int\n {\n return count($this->all());\n }", "public function size()\n {\n return count($this->getCollection());\n }", "public function count()\n\t{\n\t\treturn count($this->items);\n\t}", "public function count()\n\t{\n\t\treturn count($this->items);\n\t}", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->elements);\n }", "public function count()\n {\n return count($this->elements);\n }", "public function size()\n {\n return Iterators::size($this->iterator());\n }", "public function count() {\n return count($this->list);\n }", "public function count()\n {\n return $this->items->count();\n }", "public function count()\n {\n return $this->items->count();\n }", "public function count() : int\n {\n return count($this->entries);\n }", "public function count()\n {\n return count($this->entries);\n }", "public function count() : int\n {\n return count($this->items);\n }", "public function count() : int\n {\n return count($this->items);\n }", "public function count(): int\n {\n return \\count($this->container);\n }", "public function count()\n\t{\n\t\treturn count( $this->items );\n\t}", "public function size()\n {\n return count($this->items);\n }", "public function count() {\n\t\treturn sizeof($this->elements);\n\t}", "public function size()\n {\n return $this->count;\n }", "public function count()\n {\n return $this->iterator->count();\n }", "public function count()\n {\n return count($this->_elements);\n }", "public function count() {\r\n return count($this->objects);\r\n }", "public function count() {\n return count( $this->items );\n }", "public function count()\n {\n return count($this->list);\n }", "public function count() {\n return count($this->_items);\n\n }", "public function count(): int\n {\n return count($this->items);\n }", "public function count()\n\t{\n\t\treturn count($this->list);\n\t}", "public function count()\n {\n return count($this->_items);\n }", "public function count(): int\n {\n // TODO: Implement count() method.\n return count($this->toArray());\n }", "public function count(): int\n {\n return $this->items->count();\n }", "public function count(): int\n\t{\n\t\treturn count($this->items);\n\t}", "public function count()\n {\n $this->buffer();\n\n // Armazena quantos registro possui o array\n $this->count = count($this->toArray());\n\n // Retorna para o primeiro elemento\n $this->rewind();\n\n // Retorna a quantidade de dados\n return $this->count;\n }", "public function count() {\n\t\treturn count($this->getData());\n\t}", "public function count() {\n return count( $this->list );\n }", "public function count(): int\n {\n return iterator_count($this->getItemsWithChanges());\n }", "public function count(): int\n {\n return iterator_count($this->items);\n }", "public function count()\n\t{\n\t\treturn $this->getCount();\n\t}", "public function size(): int\n {\n return count($this->elements);\n }", "public function count() \r\n {\r\n return sizeof($this->elements);\r\n }", "public function countEntities(): int;", "public function count(): int\n {\n return count($this->collection);\n }", "public function count() {\n\t\treturn $this->length();\n\t}", "public function itemCount(): int;", "public function count(): int\n {\n return $this->getIterator()->count();\n }", "public function count() {\n\t\treturn count($this->data);\n\t}", "public function count() {\r\n\t\treturn count($this->collection);\r\n\t}", "public function count()\n {\n return count($this->collection);\n }", "public function count(): int\n {\n return count($this->data);\n }", "public function count()\n\t{\n\t\treturn $this->all()->count();\n\t}", "public function count()\n {\n return count($this->container);\n }", "public function count()\n\t{\n\t\treturn $this->filesRepository->count();\n\t}", "public function count() {\n\t\treturn count($this->array);\n\t}", "public function count()\r\n {\r\n return count($this->data);\r\n }", "public function size() \n {\n return count($this->_entries);\n }", "public function count()\n {\n return $this->size;\n }", "public function size() {\n return n(count($this->value()));\n }", "function count()\r\n {\r\n return(count($this->items));\r\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return sizeof($this->getData());\n }", "public function count()\n {\n return $this->getCount();\n }", "public function count()\n {\n return $this->client->count($this->compile())['count'];\n }", "public function len()\n {\n return count($this->list);\n }", "public function count(): int\n {\n $arr = $this->all();\n $this->items = (fn(): Generator => yield from $arr)();\n\n return count($arr);\n }", "public function count() {\n return $this->size;\n }", "public function count()\n {\n return $this->__size;\n }", "public function count() {\r\n return count($this->data);\r\n }", "public function count()\n {\n $this->setIteratorFilter(self::FLIST_NOCONTAINER | self::FLIST_UNSUB);\n return count(iterator_to_array($this));\n }", "public function count()\n {\n return $this->length();\n }", "#[\\ReturnTypeWillChange]\n public function count() {\n return count($this->all());\n }", "public function getCount()\n {\n if (! isset($this->count)) {\n $this->count = (int)$this->getXPath($this->getDom())->query($this->getCountQuery())->item(0)->value;\n }\n return $this->count;\n }", "public function count() {\r\n if (is_null($this->objectcount)) {\r\n $this->fetchData();\r\n }\r\n return $this->objectcount;\r\n }", "public function count() {\n\t\treturn count($this->_data);\n\t}", "public function count()\n {\n return count($this->countable);\n }", "public function count()\n {\n return count( $this->data );\n }", "public function length()\n {\n return count($this->list);\n }" ]
[ "0.77458006", "0.77458006", "0.7661418", "0.7607865", "0.7599315", "0.75933325", "0.756401", "0.75561655", "0.75551313", "0.7544442", "0.7533666", "0.753051", "0.7520524", "0.7512368", "0.7499793", "0.7493801", "0.74929607", "0.74929607", "0.74831736", "0.74831736", "0.74831736", "0.74831736", "0.74831736", "0.74831736", "0.74831736", "0.74831736", "0.74803144", "0.74803144", "0.7462925", "0.7456337", "0.7451289", "0.7451289", "0.745119", "0.7450513", "0.7447941", "0.7447941", "0.7445918", "0.7441442", "0.7439568", "0.7437614", "0.7426572", "0.74264055", "0.74234545", "0.74176216", "0.741543", "0.74094266", "0.7407916", "0.7401924", "0.7397772", "0.7386742", "0.7381281", "0.7375033", "0.73744386", "0.7361969", "0.7361382", "0.73612875", "0.7354991", "0.73458487", "0.73211443", "0.7315392", "0.7309356", "0.7307645", "0.7306153", "0.7302151", "0.7288708", "0.7284388", "0.7282824", "0.72747844", "0.726681", "0.72633755", "0.7256969", "0.72561234", "0.72524047", "0.725135", "0.7246713", "0.72447956", "0.7244157", "0.724304", "0.72396386", "0.723711", "0.723711", "0.723711", "0.723711", "0.723711", "0.72280365", "0.7227875", "0.7224459", "0.7216784", "0.7214718", "0.7208039", "0.7204911", "0.7201745", "0.7200004", "0.7196728", "0.719538", "0.7185256", "0.71838695", "0.71827877", "0.71790296", "0.71727586", "0.71699196" ]
0.0
-1
Returns all elements of the repository.
public function getAll();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }", "public function all()\n {\n return $this->repository->all();\n }", "public function all()\n {\n return $this->repository->all();\n }", "public function getAll()\n\t{\n\t\treturn $this->getMyRepository()->findAll();\n\t}", "public function all()\n {\n return $this->repository->findAll();\n }", "public function all(): array\n {\n return $this->repository;\n }", "public function retrieve()\n {\n return $this->getRepository()->findAll();\n }", "public function findAll() {}", "public function findAll() {}", "public function findAll() {}", "public function getAll()\n {\n return $this->get();\n }", "public function list()\n {\n return $this->repo->getAll();\n ;\n }", "public function all(){\r\n return $this->items;\r\n }", "public function get_all ();", "public function all()\n {\n return $this->driver->all();\n }", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function all()\n {\n return $this->resource::collection(\n $this->repository->all()\n );\n }", "public function getAll()\n {\n return iterator_to_array($this->repository->findAll());\n }", "public function getAll()\r\n\t{\r\n\t\treturn $this->findAll();\r\n\t}", "public function findAll();", "public function findAll();", "public function findAll();", "public function findAll();", "public function findAll();", "public function findAll();", "public function findAll();", "public function findAll();", "public abstract function getAll();", "public static function getAll() {}", "public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }", "public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }", "public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }", "public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }", "public function getAll()\n {\n return $this->findAll();\n }", "public function all()\n {\n return $this->service->all();\n }", "public function all() {\n\t\treturn $this->items;\n\t}", "public function findAll() : array;", "public function findAll() : array;", "public function get_all () {\r\n\t\treturn $this->_data;\r\n\t}", "protected function all()\n\t{\n\t\treturn $this->items;\n\t}", "function all()\n\t{\n\t\treturn $this->_data;\n\t}", "public function getAll()\n {\n \tif(!$this->isEmpty()){\n \t\treturn $this->items;\n \t}\n }", "public function getAll()\n {\n return $this->all;\n }", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection;", "public function getAll()\n {\n return parent::getAll();\n }", "public function getAll()\n {\n return parent::getAll();\n }", "public function getAll()\n {\n return parent::getAll();\n }", "public function getAll()\n {\n return parent::getAll();\n }", "public function findAll()\n {\n }", "public function getAll() {\n\t\treturn $this->data;\n\t}", "public static function &getAll(): array\n {\n return self::getInstance()->elements;\n }", "public function getAll()\n\t{\n\t\treturn $this->all;\n\t}", "public function findAll()\n {\n return $this->getRepository()->findAll();\n }", "public function findAll()\n {\n return $this->getRepository()->findAll();\n }", "public function findAll()\n {\n return $this->getRepository()->findAll();\n }", "abstract public function getAll();", "abstract public function getAll();", "abstract public function getAll();", "public function getAll()\n\t{\n\t\treturn $this->data;\n\t}", "function all() {\n\t\t$results = array();\n\t\twhile ($result = $this->fetch())\n\t\t\t$results[] = $result;\n\t\treturn $results;\n\t}", "public function getAll(): array;", "public function getAll(): array;", "public function getAll(): array;", "public function getAll()\n {\n return $this->wrapper(\n $this->model->getAll()\n );\n }", "public static function getAll();", "public static function getAll();", "public function getAll() : Collection;", "public function all()\n\t{\n\t\treturn $this->items;\n\t}", "public function findAll()\r\n {\r\n }", "public final function get_all()\n {\n }", "public function all()\n {\n return $this->items;\n }", "public function all()\n {\n return $this->items;\n }" ]
[ "0.77735764", "0.7596138", "0.7596138", "0.75692165", "0.75590867", "0.75051934", "0.73777574", "0.7286902", "0.7286902", "0.7286873", "0.72807235", "0.7244199", "0.7229226", "0.7205025", "0.71865684", "0.71863306", "0.71863306", "0.7186322", "0.7186322", "0.7186322", "0.71840185", "0.7182062", "0.71329516", "0.7114599", "0.7114599", "0.7114599", "0.7114599", "0.7114599", "0.7114599", "0.7114599", "0.7114599", "0.71144295", "0.71015096", "0.7073899", "0.7070732", "0.7070732", "0.7070732", "0.7047751", "0.70417327", "0.70377517", "0.7022219", "0.7022219", "0.7020158", "0.7004706", "0.699054", "0.69904804", "0.6972841", "0.6972083", "0.6972083", "0.6972083", "0.6972083", "0.69626105", "0.69626105", "0.69626105", "0.69626105", "0.6954827", "0.6952802", "0.6948613", "0.69457746", "0.6945202", "0.6945202", "0.6945202", "0.69421464", "0.69421464", "0.69421464", "0.6939458", "0.69299346", "0.692855", "0.692855", "0.692855", "0.692747", "0.69263774", "0.69263774", "0.69248587", "0.6921254", "0.6919435", "0.69147354", "0.69115525", "0.69115525" ]
0.7037549
59
Returns one element from the repository.
public function get($id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findOne()\r\n {\r\n $records = $this->find(1);\r\n \r\n return isset($records[0]) ? $records[0] : null;\r\n }", "public function first(){\n return $this->find(1);\n }", "public function single()\n {\n $this->executeQuery($this->statement);\n return $this->fetch($this->statement);\n }", "protected function getOne()\n {\n $statement = $this->connection->query($this->sqlToString());\n return $this->fetch($statement);\n }", "public function first()\n\t{\n\t\treturn $this->find()->first();\n\t}", "public function findOne() {\n return parent::findOne();\n }", "public function fetchOne() {\r\n\t\t$data = $this->fetch();\r\n\r\n\t\t$this->freeResult();\r\n\r\n\t\treturn $data ? current($data) : null;\r\n\t}", "final public function first()\n {\n $queryBuilder = $this->createQueryBuilder();\n $queryBuilder->selectAll();\n $queryBuilder->limit(1);\n\n return $this->fetchOne($queryBuilder);\n }", "public function first()\n {\n return $this->results()[0];\n }", "public function first()\n {\n return $this->results()[0];\n }", "public function single() {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }", "public function first()\n {\n return $this->take(1)->get()->first();\n }", "public function getOne($id)\n {\n return $this->repository->find($id);\n }", "public function first() {\n\t\treturn $this->execute()->first();\n\t}", "public function first() {\n\t\treturn $this->items[0];\n\t}", "public function single()\n\t{\n\t\t$this->execute();\n\t\treturn $this->stm->fetch(PDO::FETCH_OBJ);\n\t}", "public function getOne()\n\t{\n\t\tif ($this->count() > 0)\n\t\t{\n\t\t\t$this->seek(0);\n\t\t\treturn $this->current();\n\t\t} else\n\t\t\treturn null;\n\t}", "static function first() {\n list($record) = self::collection(null, \"id LIMIT 1\");\n return isset($record) ? $record : null;\n }", "public function first()\n {\n return $this->all()->first();\n }", "public function first()\n {\n $collection = $this->get();\n return count($collection) ? $collection[0] : null;\n }", "public function first()\n {\n $result = $this->limit(1)->get();\n\n return $result[0] ?? null;\n }", "public function first()\n\t{\n\t\tif ($this->count()) {\n\t\t\treturn $this->_items[0];\n\t\t}\n\t}", "public function single()\n {\n if($this->length()==1)\n {\n return $this->getAt(0);\n }\n throw new \\LengthException();\n }", "public function first() {\n\n\t\treturn $this->search[0];\n\n\t}", "public function first()\n {\n if (!$this->_result) {\n $this->limit(1);\n }\n\n return $this->all()->first();\n }", "public function get_one($id)\n {\n }", "public function one($id);", "public function single(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetch(PDO::FETCH_OBJ);\n\t}", "final public function first()\n {\n $items = $this->all();\n if (count($items) === 0) {\n return null;\n }\n return reset($items);\n }", "public function single(){\r\n $this->execute();\r\n return $this->stmt->fetch(PDO::FETCH_OBJ);\r\n }", "public function findFirst();", "public function first()\n {\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function fetchSingle() {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }", "public function first() {\n if (count($this->items) > 0) {\n return $this->items[0];\n }\n else\n return null;\n }", "public function getFirst()\r\n {\r\n return $this->dao->select('*')->from(TABLE_COMPANY)->orderBy('id')->limit(1)->fetch();\r\n }", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function findFirst() {\r\n\t\t$aux = $this->fetchAllPg(1);\r\n\t\tif($aux == null)\r\n\t\t\treturn null;\r\n\t\treturn $aux[0];\r\n\t}", "public function findOneById() {\n foreach($this->storageAdapters as $adapter) {\n if(is_callable(array($adapter, \"findOneById\"))) {\n $args = func_get_args();\n\n if(empty($args)) {\n throw new \\InvalidArgumentException(\"findOneById expects at least one id\");\n }\n\n return call_user_func_array(array($adapter, \"findOneById\"), $args);\n }\n }\n }", "public function getFirst();", "public function getOne(){\n\n $pedido = $this->db->query(\"SELECT * FROM pedidos WHERE id = {$this->getId()}\");\n\n \n return $pedido->fetch_object();\n }", "public function getOne(){\n //hacemos la consulta y lo guardamos en una variable\n $producto=$this->db->query(\"SELECT * FROM pedidos where id={$this->getId()};\");\n //devolvemos un valor en especifico y lo comvertimos a un objeto completamente usable.\n return $producto->fetch_object();\n }", "public function findOneEntity()\n {\n $company = $this->em->getRepository('APICoreBundle:Company')->findOneBy([\n 'title' => 'Test Company'\n ]);\n\n if ($company instanceof Company) {\n return $company;\n }\n\n return $this->createEntity();\n }", "public function first()\n {\n return $this->retrieveOrCreateQueryInstance()->firstOrFail();\n }", "public function First()\n {\n return $this->Results()[0];\n }", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function single()\n {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_ASSOC);\n }", "public function first()\n {\n foreach ($this->items as $currentItem) {\n return $currentItem;\n }\n }", "public function first()\n {\n if($this->_results) {\n return $this->_results[0];\n }\n return null;\n }", "public function getFirst() {}", "public function findOne($type = null)\n {\n $entities = $this->find($type, 0, 1);\n\n return current($entities);\n }", "public function getOne($id) {\n\n }", "public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function findOne(int $id);", "public function first(){\n\n //using the above (results) method here\n return $this->results()[0]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "public function getOne() {\n $prepareStatement = $this->pdo->prepare($this->sql);\n $prepareStatement->execute($this->param);\n\n Connection::disconnect();\n\n if ($this->fetch !== PDO::FETCH_CLASS) {\n if (1 == $prepareStatement->columnCount())\n return $prepareStatement->fetch(PDO::FETCH_COLUMN);\n return $prepareStatement->fetch($this->fetch);\n }\n\n return $prepareStatement->fetchObject();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function getOne(){\n\n $categoria = $this->db->query(\"SELECT * from categorias WHERE id_categoria = '{$this->getIdCategoria()}'\");\n\n return $categoria->fetch_object();\n }", "public function first(){\n $this->execute();\n if(count($this->results) > 0){\n return current($this->results);\n } else {\n return null;\n }\n }", "public function getOne($id)\n {\n return $this->find(\"id\", $id);\n }" ]
[ "0.7305984", "0.72669834", "0.70941126", "0.70825887", "0.70736575", "0.7050957", "0.7024758", "0.70119107", "0.7010476", "0.69935787", "0.697207", "0.6969838", "0.69304466", "0.69214016", "0.69132966", "0.6893124", "0.6882882", "0.68231547", "0.6815629", "0.6814386", "0.68139184", "0.6770207", "0.6760574", "0.6758208", "0.67419666", "0.673822", "0.67327636", "0.6712811", "0.6712435", "0.6709305", "0.670628", "0.66887516", "0.6676517", "0.66591895", "0.6656358", "0.66459775", "0.66459775", "0.66459775", "0.66459775", "0.66459775", "0.66459775", "0.66459775", "0.66459775", "0.66361284", "0.6634744", "0.6625724", "0.66208965", "0.6601033", "0.6598928", "0.6572717", "0.6564405", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6522094", "0.6512514", "0.6511355", "0.65103036", "0.65057886", "0.6505217", "0.6503563", "0.6489377", "0.64509714", "0.6447035", "0.6442716", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6438338", "0.6434299", "0.6434007", "0.6428834" ]
0.0
-1
Returns one element from the repository based on given criterias.
public function getBy(array $criteria);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOneBy(array $criteria);", "abstract protected function findOneBy(array $criteria);", "public static function findOne($condition);", "public function findOneBy($criteria);", "public function findOneBy(array $criteria);", "public function findOneBy(array $criteria);", "public function findOneBy(array $criteria);", "public function findOneBy(array $criteria)\n {\n return $this->getRepository()->findOneBy($criteria);\n }", "public function findOne(array $criteria = array())\n {\n $persister = $this->_entityManager->getEntityPersister($this->_entityName);\n\n return $persiter->loadOne($criteria);\n }", "function findOne(\n\t\t$criteria=NULL,$order=NULL,$limit=NULL,$offset=NULL,$ttl=0) {\n\t\tlist($result)=\n\t\t\t$this->find($criteria,$order,$limit,$offset,$ttl)?:array(NULL);\n\t\treturn $result;\n\t}", "function get_one_by( $conds = array()) {\n\n\t\t// where clause\n\t\t$this->custom_conds( $conds );\n\n\t\t// query the record\n\t\t$query = $this->db->get( $this->table_name );\n\n\t\tif ( $query->num_rows() == 1 ) {\n\t\t// if there is one row, return the record\n\t\t\treturn $query->row();\n\t\t} else {\n\t\t// if there is no row or more than one, return the empty object\n\t\t\t return $this->get_empty_object( $this->table_name );\n\t\t\t\n\t\t}\n\n\t}", "public function findOneBy(array $criteria)\n {\n return $this->faqRepository->findOneBy($criteria);\n }", "public function findOne(array $conditions);", "public function findOneBy(array $conditions, array $orderBy = null, array $extras = array());", "public function searchOne(array $cond = array())\n {\n $options = array(\n 'count' => 1,\n 'offset' => 0\n );\n\n $result = $this->search($cond, $options);\n\n if ($result['total'] != 1) {\n throw new NotFoundException($result['total'] . ' matching items found');\n }\n\n return $result->getFirstResult();\n }", "public abstract function findFirst(): Optional;", "public function findOneByExpr($expr, array $orderings = [])\n {\n $entities = $this->findByExpr($expr, $orderings);\n\n if (count($entities) > 0) {\n return $entities[0];\n }\n\n return null;\n }", "public static function findOne($condition)\n {\n return static::find()->one($condition);\n }", "public function find($primaryValue);", "public function find(callable $predicate): Maybe;", "public function findOneBy(array $criteria)\n {\n $params = compact('criteria');\n $params['om'] = $this->getObjectManager();\n $this->events()->trigger(__FUNCTION__ . '.pre', $this, $params);\n $model = $this->getDoctrineRepository()->findOneBy($criteria);\n $this->events()->trigger(__FUNCTION__ . '.post', $this, array(\n 'model' => $model,\n 'om' => $this->getObjectManager())\n );\n return $model;\n }", "public function getBy(array $where): ?IEntity;", "public function findOneBy(array $criteria, array $orderBy = null)\n {\n return $this->getRepository()->findOneBy($criteria, $orderBy);\n }", "public function getItem($criteria, $params)\n {\n return $this->remember(function () use ($criteria, $params) {\n return $this->repository->getItem($criteria, $params);\n });\n }", "public function findOneBy(array $criteria)\n {\n $documents = $this->findBy($criteria, array(), 1);\n\n if ($documents instanceof ArrayCollection && count($documents)) {\n return $documents->first();\n }\n\n return null;\n }", "public function get() {\n\t\t$numArgs = func_num_args();\n\t\t$results = null;\n\t\tif($numArgs == 0){\n\t\t\t$results = $this->limit(1);\n\t\t}else{\n\t\t\t$results = $this->filter(func_get_args())->limit(1);\n\t\t}\n\t\t\n\t\t// Return the first element of the query, if there is no elements\n\t\t// an OutOfRangeException exception is raised\n\t\ttry{\n\t\t\treturn $results[0];\n\t\t}catch(\\OutOfRangeException $e){\n\t\t\tthrow new \\OutOfRangeException(\"Unable to get object in this query. There are no objects that comply with your filter.\");\n\t\t}\n\t}", "public function findOneBy(array $criteria)\r\n {\r\n }", "public function findOneBy($conditions = array(), $hydration = self::ML_HYDRATION_MODEL){\n\n $conditions['limit'] = 1;\n\n $res = $this->findBy($conditions, $hydration);\n return $res ? current($res) : null;\n\n }", "public function findFirst();", "public function findOne(array $where);", "public function get(array $selectors = [], array $conditions = []): ?Object;", "public function findOneBy($criteria)\n {\n if (!$this->isRepositoryReadable()) {\n throw $this->createNotReadableException();\n }\n\n return $this->trigger(__FUNCTION__, [\n 'criteria' => $criteria,\n ]);\n }", "public function findBy($value);", "public static function findOne($condition)\n {\n $object = Server::$container->make(get_called_class(), [get_called_class()]);\n $conn = self::getMongoReadConn($object);\n $collection = $conn->selectCollection($object->getDBName(), $object->getCollectionName());\n if (isset($condition[\"_id\"])) {\n if (!is_object($condition[\"_id\"])) {\n $condition[\"_id\"] = new ObjectID($condition[\"_id\"]);\n }\n }\n // var_dump($conn);\n $res = $collection->findOne($condition);\n // var_dump($res);\n return $object;\n }", "public function findOne($criteria, $or = false, $adapterType = null) {\n return $this->_find($criteria, 'findOne', $or, $adapterType);\n }", "public function findOneBy(Criteria $criteria, array $orderBy = null, $limit = null, $offset = null)\n {\n $entities = $this->findBy($criteria, $orderBy, $limit, $offset);\n\n if (count($entities) > 0) {\n return $entities[0];\n }\n\n return null;\n }", "public function first() {\n\n\t\treturn $this->search[0];\n\n\t}", "public static function findOne($params=''){\n\t\t$activeModel = EntityManager::getEntityInstance(get_called_class());\n\t\t$arguments = func_get_args();\n\t\treturn call_user_func_array(array($activeModel, 'findFirst'), $arguments);\n\t}", "public function get($identifier, array $criteria = array());", "public function find($criteria) {\n if (is_numeric($criteria)) {\n $data = $this->getDao()->find($criteria)->current();\n }\n if (null === $data) {\n return null;\n }\n return $this->create($data);\n }", "public function get(array $criterias = array())\n\t{\n\t\t$sql = \"SELECT * FROM \"\n\t\t\t. static::$_table\n\t\t\t. (!empty($criterias) ? \" WHERE \" : \"\");\n\n\t\t$where = array();\n\t\tforeach ($criterias as $name => $value) {\n\t\t\t$where[] = $name . \" = :\" . $name;\n\t\t}\n\n\t\t$sql .= implode(\" AND \", $where);\n\n\t\t$stmt = $this->_execute($sql, $criterias)[0];\n\t\treturn $stmt->fetchAll();\n\t}", "public abstract function findHolderBy(array $criteria);", "public function findOne($type = null)\n {\n $entities = $this->find($type, 0, 1);\n\n return current($entities);\n }", "function _get_by($field, $value = array())\r\n\t{\r\n\t\tif (isset($value[0]))\r\n\t\t{\r\n\t\t\t$this->where($field, $value[0]);\r\n\t\t}\r\n\r\n\t\treturn $this->get();\r\n\t}", "public function first(callable $predicate): Option;", "public static function findFirst($parameters=null) {}", "public function findOneBy(array $criteria)\n {\n if (isset($criteria['prefix'])) {\n $keys = $this->filesystem->listKeys($criteria['prefix']);\n } else {\n $keys = $this->filesystem->listKeys();\n }\n\n foreach ($keys[$this->getKey()] as $element) {\n $element = $this->filesystem->get($element);\n $object = $this->createObject($element);\n\n //check prefix\n if (isset($criteria['prefix']) && $criteria['prefix'].basename($element->getKey()) !== $element->getKey()) {\n continue;\n }\n\n //check suffix\n if (isset($criteria['suffix']) && !preg_match($criteria['suffix'], strtolower($element->getKey()))) {\n continue;\n }\n\n if (isset($criteria['slug']) && $object->getSlug() != $criteria['slug']) {\n continue;\n }\n\n return $this->invokeEvent($object);\n }\n }", "public function singleGet($filters = array(), $options = array()) {\n\t\t$oCollection = $this->Get($filters, $options);\n\t\treturn $oCollection->getItem();\n\t}", "function find_first($conditions = array(), $model = FALSE)\n {\n $results = $this->object->select()->where_and($conditions)->limit(1, 0)->run_query();\n if ($results) {\n return $model ? $this->object->convert_to_model($results[0]) : $results[0];\n } else {\n return NULL;\n }\n }", "public function findOne(string $conditions, FindOptions $options = new FindOptions()): Result\n {\n $data = $this->repository->find(conditions: $conditions, options: $options);\n $data = array_slice(array: $data, offset: 0, length: 1);\n return new Result(data: $data);\n }", "abstract public function findBy($attributes, $value);", "public function find(\n\t\t$_criteria=NULL,\n\t\t$_order=NULL,\n\t\t$_limit=NULL,\n\t\t$_ttl=0) {\n\t\t\treturn $this->lookup('*',$_criteria,NULL,$_order,$_limit,$_ttl);\n\t}", "public function findFirst($req){\n\t\treturn current($this->find($req));\n\t}", "public static function findOne($filter = NULL){\n \n $results = self::find($filter, 1);\n if(!empty($results)){\n return $results[0];\n }\n \n return NULL;\n }", "public function getOne()\n {\n // se houver id retorna o objeto\n if (!empty($this->data['id'])) {\n return $this;\n }\n\n if (count($this->data)) {\n\n $results = array();\n\n $criterio = new TCriteria();\n\n foreach ($this->data as $prop => $value) {\n\n $criterio->add(new TFilter($prop, '=', $value));\n\n }\n\n $results = $this->getList($criterio);\n\n return is_object($results[0]) ? $results[0] : false;\n\n }\n\n throw new \\Exception('O metodo getOne, precisa que um campo chave seja preenchido');\n\n\n }", "public function findOne()\r\n {\r\n $records = $this->find(1);\r\n \r\n return isset($records[0]) ? $records[0] : null;\r\n }", "public abstract function fetchCriteriaValue($criteria);", "public abstract function getCriteriaFrom($criteria);", "public function find(): ?object {\n\t\tforeach ( $this->filter_item_keys() as $item_key ) {\n\t\t\tif ( ! isset( $this->items[ $item_key ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$item = $this->filter_item( $this->items[ $item_key ] );\n\n\t\t\tif ( $item ) {\n\t\t\t\treturn $item;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public static function findFirst($parameters = null);", "public function findOneBy(array $arguments)\n {\n return $this\n ->getRepository()\n ->findOneBy($arguments);\n }", "public static function findOne($condition) {\n $table = static::$table;\n $one = Base::getInstance()->query(\"SELECT * FROM {$table} WHERE {$condition} LIMIT 1\");\n if ($one !== false) {\n return $one->fetchObject();\n } \n return false;\n }", "protected function findOneByOrFail(array $criteria): object\n {\n $entity = $this->repository->findOneBy($criteria);\n\n if ($entity !== null) {\n return $entity;\n }\n\n throw $this->entityNotFoundException($criteria);\n }", "public function findOneBy($params)\n\t{\n\t}", "public function firstMatch(callable $predicate)\n {\n return $this->filter($predicate)->first();\n }", "public function findBy($field, $value)\n {\n return $this->model->where($field, $value)->firstOrFail();\n }", "public static function findOneBy($params)\n {\n try {\n $query = self::filterParams($params);\n $execute = self::executeQuery($query,$params);\n $result = self::fetchQuery($execute);\n return !empty($result) ? $result[0] : null;\n } catch (\\Throwable $th) {\n print_r($th->getMessage());\n return null;\n }\n }", "public function findOne(array $condition)\n {\n $row = $this->getTable()->where($condition)->fetch();\n if ($row == null) {\n return null;\n }\n\n $entityClassName = $this->getEntityClassName();\n return $entityClassName::create($this, $row);\n }", "public function first(){\n return $this->find(1);\n }", "public static function find($primary = NULL, $conditions = NULL)\n\t{\n\t\treturn self::em()->getRepository(static::class)->find($primary, $conditions);\n\t}", "function findone($key,$val) {\n\t\treturn ($data=$this->find($key,$val))?$data[0]:FALSE;\n\t}", "abstract public function findBy($criteria);", "public function findOneBy(array $criteria = [], array $params = [])\n {\n $params['limit'] = 1;\n $collection = $this->findBy($criteria, $params);\n if (count($collection) > 1) {\n throw new Exception(__METHOD__ . ' : More than one result found');\n } elseif (count($collection) == 0) {\n return null;\n } else {\n return $collection[0];\n }\n }", "public function findOneEntity()\n {\n $company = $this->em->getRepository('APICoreBundle:Company')->findOneBy([\n 'title' => 'Test Company'\n ]);\n\n if ($company instanceof Company) {\n return $company;\n }\n\n return $this->createEntity();\n }", "public function find(callable $filter)\n {\n foreach ($this->rows as $row) {\n if ($filter($row) === true) {\n return $row;\n }\n }\n }", "public function findOne($params = array()) {\n\n\t\t$datas = $this->find($params);\n\n\t\tif ($datas){\n\t\t\treturn $datas[0];\n\t\t}\n\t\treturn FALSE;\n\t}", "public static function findBy($criteria, $operator = null, $value = null)\n {\n if (! is_array($criteria) && ($operator == null && $value == null))\n {\n throw new \\UnexpectedValueException(\"Criteria should be an array! Or use the shorthand syntax\");\n }\n\n // Return result\n return static::query()->where($criteria, $operator, $value)->one();\n }", "public function findBy($field, $value, $operator = '=');", "public function getOne(){\n $categorias = $this ->db->query(\"SELECT * FROM categorias WHERE id={$this->getId()}\");\n return $categorias->fetch_object(); //devuelvo un objeto ya utilizable\n }", "public static function findFirst($parameters = null){\n\t\treturn parent::findFirst($parameters);\n\t}", "public function findOneBy(array $criteria, array $orderBy = null)\n {\n // Before callback method call\n if (method_exists($this, 'beforeFindOneBy')) {\n $this->beforeFindOneBy($criteria, $orderBy);\n }\n\n $entity = $this->getRepository()->findOneBy($criteria, $orderBy);\n\n // After callback method call\n if (method_exists($this, 'afterFindOneBy')) {\n $this->afterFindOneBy($criteria, $orderBy, $entity);\n }\n\n return $entity;\n }", "public function get($filter)\n\t{\n\t\tforeach($this->items as $item)\n\t\t{\n\t\t\tif(is_string($filter) and $item->name == $filter)\n\t\t\t{\n\t\t\t\treturn $item;\n\t\t\t}\n\n\t\t\tif($filter instanceof Closure and $filter($item) == true)\n\t\t\t{\n\t\t\t\treturn $item;\n\t\t\t}\n\n\t\t\tif( ! is_null($item->get($filter)))\n\t\t\t{\n\t\t\t\treturn $item;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function first(): OptionalInterface;", "public function getOne($id)\n {\n return $this->repository->find($id);\n }", "public function getFirst($where, $params)\r {\r $params['limit'] = 1;\r $post = $this->getCollection($where, $params);\r return (!empty($post[0])) ? $post[0] : false;\r }", "public function findOneBy($conditions = [], $order = [])\n {\n return $this->productCategoriesDao->findOneBy($conditions, $order);\n }", "public function findOne($ids, $conditions = array(), $hydration = self::ML_HYDRATION_MODEL){\n\n $conditions['limit'] = 1;\n\n $res = $this->find($ids, $conditions, $hydration);\n return $res ? current($res) : null;\n\n }", "public function findTagBy(array $criteria)\n {\n return $this->repo->findOneBy($criteria);\n }", "public function getOne(){\n\n $categoria = $this->db->query(\"SELECT * from categorias WHERE id_categoria = '{$this->getIdCategoria()}'\");\n\n return $categoria->fetch_object();\n }", "public function getCriterion()\n {\n return $this->hasOne(MgfSelectionCriteria::className(), ['id' => 'criterion_id']);\n }", "public function findFirstWhere(string $column, string $operator, $value): ?Model;", "public function findOneBy(array $criteria = null)\n {\n $sql = $this->getBaseSelect();\n $sql = $this->applyCriteria($sql, $criteria);\n $sql .= ';';\n\n $recordsArr = $this->app['dbs']['mysql_read']->fetchAssoc($sql);\n if (!$recordsArr) {\n return null;\n }\n\n return $this->convertArrayToObject($recordsArr);\n }", "protected function getOne()\n {\n $statement = $this->connection->query($this->sqlToString());\n return $this->fetch($statement);\n }", "public abstract function findOperationBy(array $criteria);", "public function findOneById() {\n foreach($this->storageAdapters as $adapter) {\n if(is_callable(array($adapter, \"findOneById\"))) {\n $args = func_get_args();\n\n if(empty($args)) {\n throw new \\InvalidArgumentException(\"findOneById expects at least one id\");\n }\n\n return call_user_func_array(array($adapter, \"findOneById\"), $args);\n }\n }\n }", "final public function first()\n {\n $queryBuilder = $this->createQueryBuilder();\n $queryBuilder->selectAll();\n $queryBuilder->limit(1);\n\n return $this->fetchOne($queryBuilder);\n }", "public static function getBy($params = array()) {\n\t\treturn self::_getDao()->getBy($params);\n\t}", "public function getFirst()\r\n {\r\n return $this->dao->select('*')->from(TABLE_COMPANY)->orderBy('id')->limit(1)->fetch();\r\n }", "public function firstMatch(array $conditions);", "function getOne($_sTable, $_mWhere = NULL, $_bConnectWhereArrayWithOrInsteadOfAnd = FALSE) {\n $aTemp = get($_sTable, $_mWhere, $_bConnectWhereArrayWithOrInsteadOfAnd);\n return count($aTemp) > 0 ? $aTemp[0] : NULL;\n}" ]
[ "0.67963624", "0.6685386", "0.6620057", "0.6531235", "0.64608383", "0.64608383", "0.64608383", "0.63076925", "0.62640595", "0.6194622", "0.6162171", "0.60813546", "0.59881914", "0.5976802", "0.59438604", "0.59010196", "0.5894498", "0.58860445", "0.58709157", "0.5859798", "0.5827815", "0.5813919", "0.5802514", "0.5747597", "0.5746536", "0.5739031", "0.57380456", "0.5725256", "0.56990486", "0.5665222", "0.5612868", "0.5595276", "0.5578148", "0.55667925", "0.55624455", "0.55368036", "0.55142146", "0.5505378", "0.54792625", "0.5473273", "0.5463548", "0.54626495", "0.5458649", "0.5453539", "0.54507565", "0.54501945", "0.5449536", "0.54479444", "0.54118294", "0.5381567", "0.5381363", "0.53809935", "0.5371592", "0.5370483", "0.53634423", "0.53561234", "0.53552336", "0.53528434", "0.53494287", "0.53489226", "0.5328251", "0.5319484", "0.53175086", "0.5299118", "0.5298626", "0.52984244", "0.52943", "0.5294119", "0.52938396", "0.5289756", "0.5286156", "0.5280439", "0.5263821", "0.52634233", "0.52587664", "0.52578646", "0.525192", "0.52496886", "0.52494675", "0.52463776", "0.5240357", "0.52372164", "0.52310383", "0.5226265", "0.52248645", "0.52192163", "0.52147084", "0.52128065", "0.5209297", "0.5205237", "0.52050877", "0.52044827", "0.51912916", "0.5188306", "0.51882493", "0.51805323", "0.51785797", "0.51768756", "0.51746696", "0.5172886" ]
0.58113384
22
Selects all elements from a selectable that match the expression and returns a new collection containing these elements.
public function matching(Criteria $criteria);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function selectAll()\n {\n $retourne = parent::selectAll();\n return $retourne;\n }", "public function selectAll();", "public static function toSelectCollection(): Collection\n {\n return collect(self::toArray())->mapWithKeys(function ($value, $text) {\n return [\n $value => [\n 'text' => self::getDescription($value),\n 'value' => $value,\n ],\n ];\n });\n }", "static function select($collection, $function)\n {\n return Ruby::wrap(array_filter($collection, $function));\n }", "public function getSelections()\n {\n if ($this->_aList === null && $this->oxselectlist__oxvaldesc->value) {\n $this->_aList = false;\n $aList = oxRegistry::getUtils()->assignValuesFromText($this->oxselectlist__oxvaldesc->getRawValue(), $this->getVat());\n foreach ($aList as $sKey => $oField) {\n if ($oField->name) {\n $this->_aList[$sKey] = oxNew(\"oxSelection\", getStr()->strip_tags($oField->name), $sKey, false, $this->_aList === false ? true : false);\n }\n }\n }\n\n return $this->_aList;\n }", "public function selectorElements()\n {\n if ($this->isReference() && $this->getProject() !== null) {\n return $this->getRef($this->getProject())->selectorElements();\n }\n\n return $this->selectorsList;\n }", "public function fewSelection()\n {\n $selection = func_num_args() > 0 ? func_get_args() : $this->fewSelection;\n\n return call_user_func_array([$this, 'select'], $selection);\n }", "public function findMulti(string $selector): SimpleXmlDomNodeInterface\n {\n return new self();\n }", "public function children ($selector = null) { \r\n\t\t\r\n\t\t$l = new XDTNodeList();\r\n\t\t\tforeach ($this as $node) \r\n\t\t\t\tforeach ($node->childNodes as $child) $l->add($child);\r\n\t\t\t\r\n\t\tif (!isset($selector)) return $l;\r\n\t\t\r\n\t\t$this->xml_query = $l;\r\n\t\treturn $this->select($selector, null, XDT::SELECT_FILTER);\r\n\t}", "public function getChildren($selector = 'all') {\r\n\t\tif ($selector == 'all') return $this->children;\r\n\t\t$rslt = array();\r\n\t\t$attrs = $this->parseSelector($selector);\r\n\t\tforeach($this->children as $child) {\r\n\t\t\tif ($child->matchAttrs($attrs)) {\r\n\t\t\t\t$rslt[] = $child;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $rslt;\r\n\t}", "final function select($selector = '*', DOMElement $context = null, $flag = XDT::SELECT_DESTROY) {\r\n\t\t\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\t/** ================ SELECTION FLAG ======================= **/\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\tswitch ($flag) {\r\n\t\t\tcase XDT::SELECT_DESTROY: $this->xml_query = null; break;\r\n\t\t\tcase XDT::SELECT_FILTER: ; break;\r\n\t\t}\r\n\t\t\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\t/** ================ SELECTION CONTEXT ==================== **/\r\n\t\t/** ------------------------------------------------------- **/\r\n\t if (isset($context)) {\r\n\t \t$all = $context->getElementsByTagName('*');\r\n\t \t$l = new XDTNodeList();\r\n\t \tforeach ($all as $node) {\r\n\t \t\t$l->add($node);\r\n\t \t}\r\n\t \t$this->xml_query = $l;\r\n\t\t //$this->xml_query = new XDTNodeList($context);\r\n\t\t //$this->xml_query = $this->xml_query->find(); \r\n\t\t}\r\n\t\t\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\t/** ================ SELECT MULTIPLE ====================== **/\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\tif (preg_match('/[,]/', $selector)) return $this->mSelect($selector);\r\n\t\t\r\n\t\t$selector = $this->parse($selector); // Convert selector to code logic\r\n\t\t\r\n\t\t$chunks = preg_split('/[\\s>+]/', $selector, -1, PREG_SPLIT_NO_EMPTY);\r\n\t\t$glues = preg_split('/[^\\s>+]/', $selector, -1, PREG_SPLIT_NO_EMPTY);\r\n\t\t\r\n\t\tif (empty($glues)) return $this->query($selector);\r\n\t\t\r\n\t\t$this->xml_query = $this->query($chunks[0]);\r\n\t\t\r\n\t\tfor ($index = 1; $index < count($chunks); $index++) {\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Cast query result to NodeList.\r\n\t\t\t */\r\n\t\t\tif (is_object($this->xml_query) AND get_class($this->xml_query) === 'DOMElement') {\r\n\t\t\t\t$this->xml_query = new XDTNodeList($this->xml_query);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tswitch (trim($glues[$index-1])) {\r\n\t\t\t\tcase '': // Select descendent elements\r\n\t\t\t\t\t\r\n\t\t\t\t\t$list = new XDTNodeList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ($this->xml_query as $node) \r\n\t\t\t\t\t\tforeach ($node->getElementsByTagName('*') as $n) $list->add($n);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->xml_query = $list;\r\n\t\t\t\t\t$this->xml_query = $this->query($chunks[$index]); break;\r\n\t\t\t\tcase '>': // Select children elements\r\n\t\t\t\t \r\n\t\t\t\t $list = new XDTNodeList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ($this->xml_query as $node) {\r\n\t\t\t\t\t\tforeach ($node->childNodes as $child) {\r\n\t\t\t\t\t\t\tif ($child->nodeType == 3) continue;\r\n\t\t\t\t\t\t\t$list->add($child);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$this->xml_query = $list; \r\n\t\t\t\t\t$this->xml_query = $this->query($chunks[$index]); break;\r\n\t\t\t\tcase '+': // Select adjacent-element\r\n\t\t\t\t \r\n\t\t\t\t\t$list = new XDTNodeList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ($this->xml_query as $node) {\r\n\t\t\t\t\t\tforeach ($node->parentNode->childNodes as $child) {\r\n\t\t\t\t\t\t\tif ($child->nodeType == 3) continue;\r\n\t\t\t\t\t\t\t$list->add($child);\r\n\t\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$this->xml_query = $list;\r\n\t\t\t\t\t$this->xml_query = $this->query($chunks[$index]); break;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (is_object($this->xml_query) AND get_class($this->xml_query) === 'DOMElement') {\r\n\t\t\t$this->xml_query = new XDTNodeList($this->xml_query);\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->xml_query;\r\n\t}", "static public function SelectAll()\n {\n }", "public function createSelector()\n {\n $o = new SelectSelector();\n $this->appendSelector($o);\n\n return $o;\n }", "public function selectAnyElements ( ) {\n\n return $this->getStream()->selectAnyElements();\n }", "public function find ($selector = null) {\r\n\t\t\r\n\t\tif (!isset($selector) OR $this->length === 0) return $this;\r\n\t\t\r\n\t\t$l = new XDTNodeList();\r\n\t\t\r\n\t\tforeach ($this as $node) {\r\n\t\t\t\r\n\t\t\tforeach ($this->select($selector, $node) as $n) $l->add($n);\r\n\t\t}\r\n\t\t\r\n\t\treturn $l;\r\n\t}", "public function selectMany($select=null)\n {\n $select = LambdaUtils::toSelectCallable($select);\n\n $result = array();\n foreach($this as $key => $record)\n {\n $temp = call_user_func($select, $record, $key);\n if(is_array($temp) || $temp instanceof \\Iterator)\n {\n foreach($temp as $tempitem)\n {\n $result[] = $tempitem;\n }\n }\n else\n {\n $result[] = $temp;\n }\n }\n return new ArrayList($result);\n }", "public function selectAll()\n {\n\n }", "public function createContainsRegexp()\n {\n $o = new ContainsRegexpSelector();\n $this->appendSelector($o);\n\n return $o;\n }", "public function filter ($selector = null) {\r\n\t\t\r\n\t\tif (!isset($selector) OR $this->length === 0) return $this;\r\n\t\t\r\n\t\t$this->xml_query = $this;\r\n\t\treturn $this->select($selector, null, XDT::SELECT_FILTER);\r\n\t}", "public function createContains()\n {\n $o = new ContainsSelector();\n $this->appendSelector($o);\n\n return $o;\n }", "public static function select($refs = false) {\n $select = new Selection(__CLASS__);\n \n if ($refs !== false)\n $select->loadReferences($refs !== false, $refs == 'deep');\n \n return $select;\n }", "public static function initSelection( array $selected=array() )\r\n\t{\r\n\t\t// $selected = an array of region_code strings in the format country_isocode_2||region_code\r\n\t\tif (empty($this)) {\r\n\t\t\t$model = new static();\r\n\t\t} else {\r\n\t\t\t$model = clone $this;\r\n\t\t}\r\n\r\n\t\t$ids = array();\r\n\t\tforeach ($selected as $rc) {\r\n\t\t\t$exploded = explode('||', $rc);\r\n\t\t\t$record = $model->collection()->findOne( array('country_isocode_2'=>$exploded[0], 'code'=>$exploded[1] ), array('_id'=>1) );\r\n\t\t\tif (!empty($record['_id'])) {\r\n\t\t\t\t$ids[] = $record['_id'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!empty($ids)) {\r\n\t\t\treturn self::forSelection( array('_id'=>array('$in'=>$ids ) ) );\r\n\t\t}\r\n\r\n\t\treturn array();\r\n\t}", "public function select($rows){\r\n if(\\is_array($rows)){\r\n $this->select = array_merge($rows, $this->select);\r\n }else{\r\n array_push($this->select, $rows);\r\n }\r\n return $this;\r\n }", "public function findElements($selector = 'all') {\r\n\t\t$attrs = $this->parseSelector($selector);\r\n\t\t$result = array();\r\n\t\tforeach($this->children as $child) {\r\n\t\t\tif ($child->matchSelector($attrs)) {\r\n\t\t\t\t$result[] = $child;\r\n\t\t\t}\r\n\t\t\t$childElements = $child->findElements($selector);\r\n\t\t\tforeach($childElements as $elem) {\r\n\t\t\t\t$result[] = $elem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "public function select($fields): self\n\t{\n\t\t$this->select = array_merge(\n\t\t\t$this->select,\n\t\t\tArr::wrap($fields)\n\t\t);\n\n\t\treturn $this;\n\t}", "public function selectCollection(Query\\Select $query): Collection\n {\n /** @var Collection<TEntity> $collection */\n $collection = new Collection($this->db);\n\n $result = $this->select($query);\n\n $collection->fromIterable($result);\n\n return $collection;\n }", "public function getSelectable() {}", "public function select($columns, ...$params): Selection\n {\n $this->selection->select($columns, ...$params);\n return $this;\n }", "public function select()\n\t{\n\t\treturn call_user_func_array([$this->queryFactory->__invoke('select'), 'select'], func_get_args());\n\t}", "public function selectAllForms();", "public function fetchCollection(Select $select)\n {\n $rows = $this->gateway->fetchRows($select);\n if ($rows) {\n return $this->newCollection($rows);\n }\n return array();\n }", "public function select()\n\t{\n\t\t$this->_query['select'] = func_get_args();\n\n\t\treturn $this;\n\t}", "public function getChildren()\n\t{\n\t\treturn new static($this->getInnerIterator()->getChildren(), $this->excludeMasks);\n\t}", "public function select_iterator ( SelectReadyInterface $select, $fetch_class, $collection )\n {\n $stmt = $this->_driver->prepare($select->getSQL());\n $stmt->setFetchMode(PDO::FETCH_CLASS, get_class($fetch_class));\n $stmt->execute($select->getWhereValues());\n $result = $stmt->fetchAll();\n\n $collection->setItens($result);\n\n return $collection;\n\n }", "public function select(string $blade, array $queryParams = []): SelectResultCollection;", "private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }", "public function selectAll() {\n\t\treturn $this->select(array_keys($this->table->columns));\n\t}", "public function select();", "public function select();", "public function select();", "public function addSelect($expression)\n\t{\n\t\tif (!is_string($expression)) {\n\t\t\tthrow new InvalidArgumentException('Select expression has to be a string.');\n\t\t}\n\t\t$this->dirty();\n\t\t$this->select[] = $expression;\n\t\t$this->pushArgs('select', array_slice(func_get_args(), 1));\n\t\treturn $this;\n\t}", "public function selectMany(callable $function);", "public function map($sel, $callback)\n\t{\n\n\t\t$nodes = pq($sel);\n\t\t$this->data = [];\n\t\tforeach ($nodes as $node) {\n\t\t\t// node is a domelement\n\t\t\t$node = pq($node);\n\t\t\t$datum = $this->$callback($node);\n\t\t\t$this->data[] = $datum;\n\t\t}\n// $this->data = $data;\n\n\t\treturn $this;\n\t}", "public function select($selectData = '*')\n {\n \t \n \t foreach (explode(',',$selectData) as $data) {\n if (!in_array($data, $this->_selectStack)) {\n $this->_selectStack[] = $this->clean($data);\n } \n \t }\n \n return $this;\n }", "public function query(array $selector) {\r\n\t\t$index =& $this->_cursor;\r\n\t\t$count =& $this->_length;\r\n\r\n\t\tforeach ($selector as $key) {\r\n\t\t\tfor ($index = $count - 1; $index > -1; $index -= 1) {\r\n\t\t\t\tswitch ($key) {\r\n\t\t\t\t\tcase self::KEY_EACH :\r\n\t\t\t\t\t\t$this->_each();\r\n\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tcase self::KEY_PARENT :\r\n\t\t\t\t\t\t$this->_parent();\r\n\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tdefault : $this->_one($key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->_cursor = 0;\r\n\r\n\t\treturn $this;\r\n\t}", "public function select($selector, $selectKey = false)\n {\n if (\\Sledgehammer\\is_closure($selector)) {\n $closure = $selector;\n } elseif (is_array($selector)) {\n $closure = function ($item) use ($selector) {\n $target = [];\n PropertyPath::map($item, $target, $selector);\n\n return $target;\n };\n } else {\n $closure = PropertyPath::compile($selector);\n }\n if ($selectKey === null) {\n $index = 0;\n } elseif ($selectKey !== false && is_string($selectKey)) {\n $selectKey = PropertyPath::compile($selectKey);\n }\n $items = [];\n foreach ($this as $key => $item) {\n if ($selectKey === null) {\n $key = $index;\n ++$index;\n } elseif ($selectKey !== false) {\n $key = $selectKey($item);\n }\n $items[$key] = $closure($item, $key);\n }\n\n return new self($items);\n }", "public function findAll($selector, $locator)\n {\n if ('named' === $selector) {\n $items = $this->findAll('named_exact', $locator);\n if (empty($items)) {\n $items = $this->findAll('named_partial', $locator);\n }\n\n return $items;\n }\n\n $xpath = $this->getSession()->getSelectorsHandler()->selectorToXpath($selector, $locator);\n $currentXpath = $this->getXpath();\n $expressions = array();\n\n // Regex to find union operators not inside brackets.\n $pattern = '/\\|(?![^\\[]*\\])/';\n\n // If the parent current xpath contains a union we need to wrap it in parentheses.\n if (preg_match($pattern, $currentXpath)) {\n $currentXpath = '(' . $currentXpath . ')';\n }\n\n // Split any unions into individual expressions.\n foreach (preg_split($pattern, $xpath) as $expression) {\n $expression = trim($expression);\n // add parent xpath before element selector\n if (0 === strpos($expression, '/')) {\n $expression = $currentXpath.$expression;\n } else {\n $expression = $currentXpath.'/'.$expression;\n }\n $expressions[] = $expression;\n }\n\n $xpath = implode(' | ', $expressions);\n\n return $this->getSession()->getDriver()->find($xpath);\n }", "public function filter()\n {\n $domDoc = new DOMDocument();\n @$domDoc->loadHTML($this->_input);\n $editableElements = $this->findEditableElements($domDoc);\n \n foreach ($editableElements as $value) {\n $element = $value['element'];\n $data = $value['data'];\n\n // filter boolean for mysql\n $data['isGlobal'] = ($data['isGlobal']) ? 1 : 0;\n\n // query database for content\n $contentTable = new Hobo_Db_Table_Content();\n $data['routeName'] = Zend_Controller_Front::getInstance()->getRouter()->getCurrentRouteName();\n $row = $contentTable->selectLatest($data);\n \n if (! empty($row->content)) {\n // remove any children\n while ($element->hasChildNodes()){\n $element->removeChild($element->childNodes->item(0));\n } \n // inject content\n $fragment = $domDoc->createDocumentFragment(); // create fragment\n $fragment->appendXML($row->content);\n $element->appendChild($fragment); \n }\n }\n\n return $domDoc->saveHTML();\n }", "public function select()\n {\n return new QueryProxy('select', $this);\n }", "public function select($expression)\n\t{\n\t\tif (!($expression === NULL || is_string($expression))) {\n\t\t\tthrow new InvalidArgumentException('Select expression has to be a string or NULL.');\n\t\t}\n\t\t$this->dirty();\n\t\t$this->select = $expression === NULL ? NULL : [$expression];\n\t\t$this->args['select'] = array_slice(func_get_args(), 1);\n\t\treturn $this;\n\t}", "function selectAll() {\n $query = $this->getStatement(\n \"SELECT * FROM `$this->table` WHERE 1 ORDER BY id\"\n );\n $query->execute();\n return $query->fetchAll();\n }", "protected function selectContentRowsToConvert() {\n \n $select = '*';\n $from = 'tt_content';\n $where = 'list_type = \"pt_gsashop_pi2\"';\n $where .= ' AND pi_flexform = \"\"';\n $groupBy = '';\n $orderBy = '';\n $limit = '';\n \n // exec query using TYPO3 DB API\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select, $from, $where, $groupBy, $orderBy, $limit);\n trace(tx_pttools_div::returnLastBuiltSelectQuery($GLOBALS['TYPO3_DB'], $select, $from, $where, $groupBy, $orderBy, $limit));\n if ($res == false) {\n throw new tx_pttools_exception('Query failed', 1, $GLOBALS['TYPO3_DB']->sql_error());\n }\n \n $rows = array();\n while ($a_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){\n $rows[] = $a_row; \n }\n $GLOBALS['TYPO3_DB']->sql_free_result($res);\n \n trace($a_row); \n return $rows;\n }", "public function select(array $fields = [])\n {\n $this->selectedFields = [];\n $this->selectedFields = array_unique(array_merge($this->selectedFields, $fields));\n return $this;\n }", "public function selectAll($where) {\r\n $this->db->where($where);\r\n return $this->db->get($this->_table)->result();\r\n }", "public function select($columns)\n\t{\n\t\tif (is_array($columns)) {\n\t\t\t$this->_select = array_unique(array_merge($this->_select, $columns));\n\t\t}\n\t\telse {\n\t\t\t$this->_select = array_unique(array_merge($this->_select, array($columns)));\n\t\t}\n\n\t\treturn $this;\n\t}", "public function select()\n {\n return curl_multi_select( $this->mh );\n }", "public function fetchAll()\n {\n $result = $this->select();\n return $result;\n }", "public function querySelect($sql, $fields = NULL, $fetchMode = NULL) : Collection;", "public function getSelect();", "public function getSelect();", "public function getAllProducerToSelect()\n {\n return $this->all()->toSelect('id', 'translation.name', $this->getCurrentLanguage());\n }", "public function hydrate(): Collection\n\t{\n\t\t$className = get_class($this->model);\n\n\t\treturn $this->getRaw()->map(fn ($row) => (new $className())->forceFill($row));\n\t}", "public function select(string $columns, array $where = [], int $fetch_mode = PDO::FETCH_ASSOC) : self {\n $this->query_builder->resetProperties();\n $this->query_builder->setMode('select');\n $this->query_builder->setColumns($columns);\n\n if (!empty($where)) {\n $this->query_builder->setWhere($where);\n $where = $this->formatWhereData($where);\n }\n\n try {\n $stmt = parent::prepare($this->query_builder->getQuery());\n $stmt->execute($where);\n $this->results = $stmt->fetchAll($fetch_mode);\n } catch (PDOException $e) {\n $this->pdo_exception = $e;\n $this->query_failed = true;\n }\n\n return $this;\n }", "protected function selectAll()\n {\n // up our entity. for the moment, we've prepared a view in the database to make this selection\n // as easy as possible, but we'll need to break that up later to be sure that we can insert new\n // actions.\n\n $properties = MatrixActionsEntity::getProperties();\n array_walk($properties, [$this, \"ticker\"]);\n\n $original_db = $this->db->getDatabase();\n $this->db->setDatabase(\"dashifen_shadowlab\");\n $actions = $this->db->getResults($properties,\n \"matrix_actions INNER JOIN books USING (book_id)\",\n [], [\"matrix_action\"]);\n\n $this->db->setDatabase($original_db);\n\n return $actions;\n }", "public function getProductSelections();", "public function selectAll()\n {\n return $this->contractor->all(['name', 'id']);\n }", "public function getForSelect()\n {\n return $this->all()->lists('full_name', 'id')->all();\n }", "public function select($fields);", "public function selectAll() {\n\t\t\tif(!$this->selectAllStatement->execute()) return false; // if the query didn't execute, return false\n\t\t\t$result = $this->selectAllStatement->get_result(); // frees memory\n\t\t\t$resultArray = $result->fetch_all(MYSQLI_ASSOC);\n\t\t\treturn $resultArray;\n\t\t}", "public function selectAll() {\n\t\t\tif(!$this->selectAllStatement->execute()) return false; // if the query didn't execute, return false\n\t\t\t$result = $this->selectAllStatement->get_result(); // frees memory\n\t\t\t$resultArray = $result->fetch_all(MYSQLI_ASSOC);\n\t\t\treturn $resultArray;\n\t\t}", "public function select( $select ) {\n $args = func_get_args();\n\n $this->_type = self::TYPE_SELECT;\n\n foreach( $args AS $arg ) {\n $this->_select[] = $arg;\n }\n\n return $this;\n }", "public function all() : Collection;", "public function newSelect()\n {\n return $this->newInstance('Select');\n }", "private function extendSelector($matches, $selectorPath, $replacementSelector){\n\n $currentSelectorPathIndex = 0;\n $currentSelectorPathElementIndex = 0;\n $path = array();\n $selectorPath_len = count($selectorPath);\n\n for($matchIndex = 0, $matches_len = count($matches); $matchIndex < $matches_len; $matchIndex++ ){\n\n\n $match = $matches[$matchIndex];\n $selector = $selectorPath[ $match['pathIndex'] ];\n\n $firstElement = new Less_Tree_Element(\n $match['initialCombinator'],\n $replacementSelector->elements[0]->value,\n $replacementSelector->elements[0]->index,\n $replacementSelector->elements[0]->currentFileInfo\n );\n\n if( $match['pathIndex'] > $currentSelectorPathIndex && $currentSelectorPathElementIndex > 0 ){\n $last_path = end($path);\n $last_path->elements = array_merge( $last_path->elements, array_slice( $selectorPath[$currentSelectorPathIndex]->elements, $currentSelectorPathElementIndex));\n $currentSelectorPathElementIndex = 0;\n $currentSelectorPathIndex++;\n }\n\n $newElements = array_merge(\n array_slice($selector->elements, $currentSelectorPathElementIndex, ($match['index'] - $currentSelectorPathElementIndex) ) // last parameter of array_slice is different than the last parameter of javascript's slice\n , array($firstElement)\n , array_slice($replacementSelector->elements,1)\n );\n\n if( $currentSelectorPathIndex === $match['pathIndex'] && $matchIndex > 0 ){\n $last_key = count($path)-1;\n $path[$last_key]->elements = array_merge($path[$last_key]->elements,$newElements);\n }else{\n $path = array_merge( $path, array_slice( $selectorPath, $currentSelectorPathIndex, $match['pathIndex'] ));\n $path[] = new Less_Tree_Selector( $newElements );\n }\n\n $currentSelectorPathIndex = $match['endPathIndex'];\n $currentSelectorPathElementIndex = $match['endPathElementIndex'];\n if( $currentSelectorPathElementIndex >= count($selectorPath[$currentSelectorPathIndex]->elements) ){\n $currentSelectorPathElementIndex = 0;\n $currentSelectorPathIndex++;\n }\n }\n\n if( $currentSelectorPathIndex < $selectorPath_len && $currentSelectorPathElementIndex > 0 ){\n $last_path = end($path);\n $last_path->elements = array_merge( $last_path->elements, array_slice($selectorPath[$currentSelectorPathIndex]->elements, $currentSelectorPathElementIndex));\n $currentSelectorPathIndex++;\n }\n\n $slice_len = $selectorPath_len - $currentSelectorPathIndex;\n $path = array_merge($path, array_slice($selectorPath, $currentSelectorPathIndex, $slice_len));\n\n return $path;\n }", "public function selectElements ( $E = null ) {\n\n return $this->getStream()->selectElements($E);\n }", "public function select_all()\n {\n // TODO: Limit to id_user\n $query = $this->db->get($this->table);\n return $query;\n }", "public function selectMultiple() {\n $suffix = $this->formQuerySuffix();\n $select = $this->outerJoin ? $this->tableName : null;\n $arrs = $this->table->selectMultiple($suffix, $select);\n $class = $this->className;\n $result = array();\n\n foreach ($arrs as $key => $arr) {\n DBRecord::$fromPostData = false;\n $obj = new $class($arr);\n DBRecord::$fromPostData = true;\n\n $pass = true;\n foreach ($this->filters as $filterMethod => $params) {\n if (!call_user_func_array(array($obj, $filterMethod), $params)) $pass = false;\n }\n if ($this->indexBy) {\n $index = $this->indexBy;\n if (method_exists($obj, $index)) {\n $key = call_user_func(array($obj, $index));\n } else {\n $key = $obj->$index;\n }\n }\n if ($this->map) {\n $index = $this->map;\n if (method_exists($obj, $index)) {\n $obj = call_user_func(array($obj, $index));\n } else {\n $obj = $obj->$index;\n }\n }\n if ($pass) $result[$key] = $obj;\n }\n\n\n return $result;\n }", "public function select()\r\n\t{\r\n\t\t$this->clear();\r\n\t\t$where = null;\r\n\t\t// no args, so I'm searching for ALL... or doing a specific search\r\n\t\tif(func_num_args() === 0\r\n\t\t || ($where = call_user_func_array(array($this->obj, 'buildWhere'), func_get_args())))\r\n\t\t{\r\n\t\t\t$query = 'SELECT *\r\n\t\t\t\tFROM '.$this->obj->buildFrom();\r\n\t\t\t// pass args to where generator\r\n\t\t\tif($where)\r\n\t\t\t{\r\n\t\t\t\t$query .= ' WHERE '.$where;\r\n\t\t\t}\r\n\t\t\t$results = $this->site->db->query($query);\r\n\t\t\t$success = ($results->num_rows > 0);\r\n\t\t\twhile($row = $results->fetch_assoc())\r\n\t\t\t{\r\n\t\t\t\t$obj = new $this->obj->__CLASS__($this->obj->site);\r\n\t\t\t\tif($obj->loadRow($row))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->push($obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $success;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function getAll()\n\t{\n\t\treturn new Collection($this->items);\n\t}", "public function select($perifericos);", "protected function select($fields) {\n\t\t$this->selected_fields = $fields;\n\t\treturn $this;\n\t}", "public function select(string ...$fields): self\n {\n $this->select = $fields;\n return $this;\n }", "public function collection() {\n \t$db = $this->db;\n\t\t$sql = $this->sql();\n\t\t$rows = $db::execute($sql);\n\t\t$model = $this->model;\n\t\treturn new \\Collection($model::arrayFactoryFromRows($rows));\n\t}", "public function addSelect($fields)\n {\n if (func_num_args() > 1) {\n $fields = func_get_args();\n } elseif (!is_array($fields)) {\n $fields = [$fields];\n }\n foreach ($fields as $idx => $field) {\n $this->selectField($field, is_numeric($idx) ? null : $idx);\n }\n\n return $this;\n }", "public function get_selectable_columns()\n\t{\n\t\treturn array();\n\t}", "public function getSelectedCustomersCollection()\n\t{\n\t\t$collection = Mage::getModel('customer/customer')->getCollection()\n\t\t\t->addAttributeToFilter('fvets_salesrep',array(\"finset\"=>array($this->getId())));\n\t\t;\n\t\treturn $collection;\n\t}", "public function select()\n {\n return $this->_db->factory('select', $this);\n }", "public function find($selector);", "protected function fetchElementNodes()\n {\n $elements = [];\n\n foreach ($this->map as $query) {\n $list = $this->document->xpath($query);\n\n if (0 == count($list)) {\n continue;\n }\n\n foreach ($list as $node) {\n $elements[] = new HtmlNode($node, $this->document->getDocument());\n }\n }\n\n return $elements;\n }", "public function getSelectors() {\n return $this->_selectors;\n }", "protected function selectAll()\n {\n $result = $this->db->newQuery('select', $this->table)\n ->makeStatement()\n ->FetchAll();\n\n return ($result) ?: null;\n }", "protected function _stripSelections()\n {\n foreach ($this->getItems() as $option) {\n $option->setSelections(array());\n }\n $this->_selectionsAppended = false;\n return $this;\n }", "public function select($fields) {\n\t\tif($fields === null) {\n\t\t\tunset($this->query['select']);\n\t\t\treturn $this;\n\t\t}\n\t\t$this->setParam($fields, 'select');\n\t\treturn $this;\n\t}", "function selectItems($select, $from, $where = 1, $value = array(), $order = 1, $limit = NULL){\n\t\tglobal $con;\n\t\t$limit = $limit != NULL ? ' LIMIT ' . $limit : '';\n\n\t\t$stmt = $con->prepare('SELECT ' . $select . ' FROM ' . $from . ' WHERE ' . $where . ' ORDER BY ' . $order . ' ' . $limit);\n\t\t$stmt->execute($value);\n\t\treturn $stmt->fetchAll();\n\t}", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection;", "private function internalQuerySelectorAll($selector, $preferredLimit = null)\n {\n $walkChildren = function($element, $tagName, $callback) use (&$walkChildren) { // $walkChildren is a lot faster than $this->getElementsByTagName('*') for 300+ elements\n if ($tagName !== null) {\n $children = $element->getElementsByTagName($tagName);\n foreach ($children as $child) {\n if ($callback($child) === true) {\n return true;\n }\n }\n } else {\n foreach ($element->childNodes as $child) {\n if ($child instanceof \\DOMElement) {\n if ($callback($child) === true) {\n return true;\n }\n if ($walkChildren($child, $tagName, $callback) === true) {\n return true;\n }\n }\n }\n }\n };\n\n $getElementById = function($id, $tagName) use (&$walkChildren) {\n if ($this instanceof \\DOMDocument) {\n $element = $this->getElementById($id);\n if ($element && ($tagName === null || $element->tagName === $tagName)) {\n return $element;\n }\n } else {\n $foundElement = null;\n $walkChildren($this, $tagName, function($element) use ($id, &$foundElement) {\n if ($element->attributes->length > 0 && $element->getAttribute('id') === $id) {\n $foundElement = $element;\n return true;\n }\n });\n return $foundElement;\n }\n return null;\n };\n\n $matches = null;\n if ($selector === '*') { // all\n $result = [];\n $walkChildren($this, null, function($element) use (&$result, $preferredLimit) {\n $result[] = $element;\n if ($preferredLimit !== null && sizeof($result) >= $preferredLimit) {\n return true;\n }\n });\n return new \\IvoPetkov\\HTML5DOMNodeList($result);\n } elseif (preg_match('/^[a-z0-9\\-]+$/', $selector) === 1) { // tagname\n $result = [];\n $walkChildren($this, $selector, function($element) use (&$result, $preferredLimit) {\n $result[] = $element;\n if ($preferredLimit !== null && sizeof($result) >= $preferredLimit) {\n return true;\n }\n });\n return new \\IvoPetkov\\HTML5DOMNodeList($result);\n } elseif (preg_match('/^([a-z0-9\\-]*)(\\[.+\\])$/', $selector, $matches) === 1) { // tagname[target] or [target] // Available values for targets: attr, attr=\"value\", attr~=\"value\", attr|=\"value\", attr^=\"value\", attr$=\"value\", attr*=\"value\"\n $attributeSelectors = explode('][', substr($matches[2], 1, -1));\n foreach ($attributeSelectors as $i => $attributeSelector) {\n $attributeSelectorMatches = null;\n if (preg_match('/^(.+?)(=|~=|\\|=|\\^=|\\$=|\\*=)\\\"(.+)\\\"$/', $attributeSelector, $attributeSelectorMatches) === 1) {\n $attributeSelectors[$i] = [\n 'name' => $attributeSelectorMatches[1],\n 'value' => $attributeSelectorMatches[3],\n 'operator' => $attributeSelectorMatches[2]\n ];\n } else {\n $attributeSelectors[$i] = [\n 'name' => $attributeSelector\n ];\n }\n }\n $result = [];\n $tagName = strlen($matches[1]) > 0 ? $matches[1] : null;\n $walkChildren($this, $tagName, function($element) use (&$result, $preferredLimit, $attributeSelectors) {\n if ($element->attributes->length > 0) {\n foreach ($attributeSelectors as $attributeSelector) {\n $isMatch = false;\n $attributeValue = $element->getAttribute($attributeSelector['name']);\n if (isset($attributeSelector['value'])) {\n $valueToMatch = $attributeSelector['value'];\n switch ($attributeSelector['operator']) {\n case '=':\n if ($attributeValue === $valueToMatch) {\n $isMatch = true;\n }\n break;\n case '~=':\n $words = preg_split(\"/[\\s]+/\", $attributeValue);\n if (array_search($valueToMatch, $words) !== false) {\n $isMatch = true;\n }\n break;\n\n case '|=':\n if ($attributeValue === $valueToMatch || strpos($attributeValue, $valueToMatch . '-') === 0) {\n $isMatch = true;\n }\n break;\n\n case '^=':\n if (strpos($attributeValue, $valueToMatch) === 0) {\n $isMatch = true;\n }\n break;\n\n case '$=':\n if (substr($attributeValue, -strlen($valueToMatch)) === $valueToMatch) {\n $isMatch = true;\n }\n break;\n\n case '*=':\n if (strpos($attributeValue, $valueToMatch) !== false) {\n $isMatch = true;\n }\n break;\n }\n } else {\n if ($attributeValue !== '') {\n $isMatch = true;\n }\n }\n if (!$isMatch) {\n return;\n }\n }\n $result[] = $element;\n if ($preferredLimit !== null && sizeof($result) >= $preferredLimit) {\n return true;\n }\n }\n });\n return new \\IvoPetkov\\HTML5DOMNodeList($result);\n } elseif (preg_match('/^([a-z0-9\\-]*)#(.+)$/', $selector, $matches) === 1) { // tagname#id or #id\n $tagName = strlen($matches[1]) > 0 ? $matches[1] : null;\n $idSelector = $matches[2];\n $element = $getElementById($idSelector, $tagName);\n if ($element) {\n return new \\IvoPetkov\\HTML5DOMNodeList([$element]);\n }\n return new \\IvoPetkov\\HTML5DOMNodeList();\n } elseif (preg_match('/^([a-z0-9\\-]*)\\.(.+)$/', $selector, $matches) === 1) { // tagname.classname, .classname, tagname.classname.classname2, .classname.classname2\n $tagName = strlen($matches[1]) > 0 ? $matches[1] : null;\n $result = [];\n $classesSelector = explode('.', $matches[2]);\n if (!empty($classesSelector)) {\n $walkChildren($this, $tagName, function($element) use (&$result, $classesSelector, $preferredLimit) {\n if ($element->attributes->length > 0) {\n $classAttribute = $element->getAttribute('class');\n $allClassesFound = true;\n foreach ($classesSelector as $classSelector) {\n if (!($classAttribute === $classSelector || strpos($classAttribute, $classSelector . ' ') === 0 || substr($classAttribute, -(strlen($classSelector) + 1)) === ' ' . $classSelector || strpos($classAttribute, ' ' . $classSelector . ' ') !== false)) {\n $allClassesFound = false;\n break;\n }\n }\n if ($allClassesFound) {\n $result[] = $element;\n if ($preferredLimit !== null && sizeof($result) >= $preferredLimit) {\n return true;\n }\n }\n }\n });\n }\n return new \\IvoPetkov\\HTML5DOMNodeList($result);\n }\n throw new \\InvalidArgumentException('Unsupported selector (' . $selector . ')');\n }", "public static function elements()\n {\n $coll = self::getArgs(func_get_args());\n if (empty($coll)) {\n throw new \\InvalidArgumentException();\n }\n return self::choose(0, count($coll) - 1)\n ->bindGen(function (RoseTree $rose) use ($coll) {\n return self::pureGen($rose->fmap(\n function ($index) use ($coll) {\n return $coll[$index];\n }\n ));\n });\n }", "public function elements()\n {\n return parent::elements();\n }" ]
[ "0.60830617", "0.60004103", "0.5734199", "0.5401254", "0.52489716", "0.52396595", "0.51845986", "0.5182533", "0.5181108", "0.51714635", "0.5137433", "0.5065882", "0.50510085", "0.50073326", "0.49446702", "0.49301252", "0.49139813", "0.49079818", "0.48970947", "0.4896432", "0.48927382", "0.48843232", "0.48491263", "0.4818297", "0.47930178", "0.47752747", "0.47677982", "0.47593206", "0.475852", "0.4751498", "0.4751369", "0.47496256", "0.47399735", "0.47393587", "0.47389695", "0.4738048", "0.47178578", "0.46912804", "0.46912804", "0.46912804", "0.466561", "0.4660155", "0.46501473", "0.4650083", "0.46446496", "0.4633193", "0.46310148", "0.4624843", "0.46185488", "0.46172222", "0.46156386", "0.4612513", "0.4609262", "0.46041235", "0.46028486", "0.4591657", "0.45910558", "0.45860097", "0.45852005", "0.45852005", "0.45819196", "0.45727068", "0.45724967", "0.456802", "0.456624", "0.45653778", "0.4562425", "0.45610556", "0.45473775", "0.45473775", "0.45244", "0.45058095", "0.4503969", "0.44886696", "0.4474458", "0.44721523", "0.44682428", "0.44671044", "0.44630373", "0.44582155", "0.4457183", "0.4454287", "0.44524723", "0.44506043", "0.44447955", "0.44447538", "0.4442294", "0.44392782", "0.44390708", "0.44375506", "0.44260475", "0.4423058", "0.44202954", "0.44165075", "0.44075018", "0.44075018", "0.44075018", "0.44075018", "0.44004428", "0.43967938", "0.4393832" ]
0.0
-1
this is used for storing authentication in the session
public function refreshUser(UserInterface $user) { // but in this example, the token is sent in each request, // so authentication can be stateless. Throwing this exception // is proper to make things stateless throw new UnsupportedUserException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storeAuth($login, $password)\n{\n$this->session->set(USER_LOGIN_VAR, $login);\n$this->session->set(USER_PASSW_VAR, $password);\n// Create a session variable to use to confirm sessions\n$hashKey = md5($this->hashKey . $login . $password);\n$this->session->set('login_hash', $hashKey);\n}", "private function sessionLogin() {\r\n $this->uid = $this->sess->getUid();\r\n $this->email = $this->sess->getEmail();\r\n $this->fname = $this->sess->getFname();\r\n $this->lname = $this->sess->getLname();\r\n $this->isadmin = $this->sess->isAdmin();\r\n }", "public function store() {\n\t\t$_SESSION['puserauth'] = serialize($this);\n\t}", "public function storeSession() {}", "function authenticate_session()\n\t{\n\t\tglobal $_CONFIG;\n\n\t\t$cookie_host = $_CONFIG->auth_domain;\n\t\t$cookie_path = $_CONFIG->auth_path__or('/');\n\t\t$cookie_life = $_CONFIG->auth_lifetime__or(60*60*24*30);\n\t\t$cookie_name = $_CONFIG->auth_cookie_name__or(WARP_COOKIE_NAME);\n\t\t$cookie_salt = $_CONFIG->auth_cookie_salt__or(WARP_COOKIE_SALT);\n\n\t\t$password = get_config_password();\n\t\t$_SESSION['password'] = $password;\n\n\t\treturn setcookie($cookie_name, sha1($password.$cookie_salt), time()+$cookie_life, $cookie_path, $cookie_host);\n\t}", "public function authUser(){\n if(!isset($this->sessionBool) || empty($this->sessionBool)){\n die($this->alerts->ACCESS_DENIED);\n }else{\n if(!$this->sessionBool){\n die($this->alerts->ACCESS_DENIED);\n }\n } \n }", "private function loginWithSessionData()\n { \n $this->user_name = $_SESSION['user_name'];\n $this->user_email = $_SESSION['user_email'];\n\n // set logged in status to true, because we just checked for this:\n //if(!empty($_SESSION['user_name']) && ($_SESSION['user_logged_in'] == 1)\n // when we called this method (in the constructor)\n $this->user_is_logged_in = true;\n \n if($_SESSION['user_privileges'] == 1)\n $this->user_admin = true;\n }", "public function login( )\n\t\t{\n\t\t\treturn $this->get_session();\n\t\t}", "abstract protected function auth();", "public function storeSessionData() {}", "public function storeSessionData() {}", "public function authenticateCredential()\n {\n $sessionToken = $this->login();\n $this->credential->setSessionToken($sessionToken);\n }", "function user_login ($user_details) {\n //\n // For security reasons, the password is not stored as it is only required\n // during authentication and not for further identification.\n // Clear the session\n $_SESSION = array();\n $_SESSION['user'] = $user_details;\n $_SESSION['is_user_authenticated'] = true;\n}", "public function getSession() {}", "function login()\n\t{\n\t\t$GLOBALS['appshore']->session->createSession();\n\n\t\t$GLOBALS['appshore_data']['layout'] = 'auth';\n\t\t\n\t\t// define next action\n\t\t$result['action']['auth'] = 'login';\n\n\t\t// if a query_string was passed without being auth we keep it to deliver it later\n\t\tif( strpos( $_SERVER[\"QUERY_STRING\"], 'op=') !== false )\n\t\t\t$result['nextop'] = base64_encode($_SERVER[\"QUERY_STRING\"]);\n\t\t\t\n\t\treturn $result;\n\t}", "function auth_get()\n{\n return session_get(auth_namespace(), true);\n}", "private function auth() {\n // If the user has previously been authenticated\n if(isset($_SESSION['adminUsername']) && isset($_SESSION['adminPassword'])) {\n $this->admin->username = $_SESSION['adminUsername'];\n $this->admin->password = $_SESSION['adminPassword'];\n $auth = $this->admin->get(1);\n\n if($this->admin->password == $auth['password']) {\n $logged = true;\n }\n }\n // If the user has long term login enabled\n elseif(isset($_COOKIE['adminUsername']) && isset($_COOKIE['adminToken'])) {\n $this->admin->username = $_COOKIE['adminUsername'];\n $this->admin->rememberToken = $_COOKIE['adminToken'];\n $auth = $this->admin->get(2);\n\n if($this->admin->rememberToken == $auth['remember_token'] && !empty($auth['remember_token'])) {\n $_SESSION['adminUsername'] = $this->admin->username;\n $this->setPassword($auth['password']);\n $logged = true;\n }\n }\n // If the user is authenticating\n else {\n $auth = $this->admin->get(0);\n\n // Set the sessions\n $_SESSION['adminUsername'] = $this->admin->username;\n $this->setPassword($this->admin->password);\n\n if(password_verify($this->admin->password, $auth['password'])) {\n if($this->admin->rememberToken) {\n $this->admin->renewToken();\n }\n session_regenerate_id();\n $logged = true;\n }\n }\n\n if(isset($logged)) {\n $_SESSION['isAdmin'] = true;\n return $auth;\n }\n\n return false;\n }", "protected function loginAuthenticate(){\n\n\t\t\n\t}", "function auth_set($sess)\n{\n _app('auth', $sess);\n session_set(auth_namespace(), $sess, true);\n}", "public function init()\n {\n if (!$_SESSION[$this->cookie_prefix . '_user']) {\n $email = '';\n $password = '';\n \n if ($_COOKIE[$this->cookie_prefix . '_email'] and $_COOKIE[$this->cookie_prefix . '_password']) {\n $email = $_COOKIE[$this->cookie_prefix . '_email'];\n $password = $_COOKIE[$this->cookie_prefix . '_password'];\n } elseif ($_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW']) { //check for basic authentication\n $email = $_SERVER['PHP_AUTH_USER'];\n $password = md5($this->secret_phrase . $_SERVER['PHP_AUTH_PW']);\n }/* elseif ($_GET['auth_user'] and $_GET['auth_pw']) {\n $email = $_GET['auth_user'];\n $password = md5($this->secret_phrase . $_GET['auth_pw']);\n }*/\n \n if ($email and $password and table_exists($this->table)) {\n $result = sql_query('SELECT * FROM ' . $this->table . \" WHERE\n \t\t\t\temail='\" . escape($email) . \"'\n \t\t\t\", 1);\n \n if ($result && $password == md5($this->secret_phrase . $result['password'])) {\n $_SESSION[$this->cookie_prefix . '_email'] = $result['email'];\n $_SESSION[$this->cookie_prefix . '_password'] = $result['password'];\n }\n }\n }\n\n //check if logged in\n if ($_SESSION[$this->cookie_prefix . '_user'] and time() < $_SESSION[$this->cookie_prefix . '_expires']) {\n $this->user = $_SESSION[$this->cookie_prefix . '_user'];\n } elseif ($_SESSION[$this->cookie_prefix . '_email'] and $_SESSION[$this->cookie_prefix . '_password'] and table_exists($this->table)) {\n $this->load();\n }\n\n if ($_GET['u']) {\n $_SESSION['request'] = $_GET['u'];\n }\n }", "abstract public function persistSessionToken() ;", "function Session() {\n $sesskey = $_COOKIE['FortissimoSession'];\n if (! $sesskey) {\n # they don't have one, so let's ignore\n return;\n }\n\n # try to parse their cookie\n $ct = sscanf($sesskey, \"%d %s %d\", $sessid, $auth, $exptime);\n\n # return if bad cookie, or they say it's expired, or the auth length is wrong or bad sessid\n if ($ct != 3 || $exptime < time() || strlen($auth) != 64 || $sessid <= 0) {\n return;\n }\n\n # okay, so try loading it\n global $ft;\n $row = $ft->dbh->_select_row_as_object('SELECT * FROM tbl:sessions WHERE sessid = ? AND sesskey = ?',\n array($sessid, $auth));\n $userid = $row->userid;\n if (is_null($userid) || $userid <= 0 || $row->exptime < time()) {\n return;\n }\n\n # get the user this refers to\n $this->user = new User($userid);\n }", "public function init_credentials()\n\t{\n\t\tif($this->get_session('admin') != null)\n\t\t{\n\t\t\t$this->credentials['admin'] \t\t\t= $this->get_session('admin');\n\t\t\t$this->credentials['grupo_admin'] \t\t= $this->get_session('admin_grupo');\n\t\t\t$this->credentials['permissoes_admin'] \t= $this->get_session('admin_permissoes');\n\t\t\t\n\t\t\t$this->credentials['workspace_id'] \t\t= $this->get_session('workspace_id');\n\t\t\t$this->credentials['workspace_nome']\t= $this->get_session('workspace_nome');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->credentials = null;\n\t\t}\n\t}", "public function authentication()\n {\n }", "public function regenerateSession(){\n $authToken=$_COOKIE[self::COOKIENAME];\n if ($authToken){\n $authToken=base64_decode($authToken);\n $iv = substr($authToken,0,self::IVLEN);\n $crypted = substr($authToken,self::IVLEN);\n $token = openssl_decrypt($crypted, self::ALG, self::AESKEY,OPENSSL_RAW_DATA,$iv);\n if ($token===false){\n $this->__destruct();\n die('Decryption error');\n }\n\t $token = json_decode($token,true);\n\t $username=$token[\"loggedUser\"];\n\t // shoutout error if decryption failed\n\n // if user exists in backend storage\n if ($this->userExists($username)){\n $this->loggedUser=$username;\n $this->authToken=$_COOKIE[self::COOKIENAME];\n // reset cookie (to set new expiration date)\n $this->setAuthCookie();\n }\n else\n // logout if user does not exists in backend storage\n $this->logOut();\n }\n // no cookie - logout\n else $this->logOut();\n }", "public function getSession();", "public function use_authentication()\n {\n }", "function sessionManager($id, $email, $pwd, $accessLevel, $userType){\n\t\t\t$sessionData = array('userID'=>$id,'email'=>$email, 'password'=>$pwd,'accessLevel'=>$accessLevel,'userType'=>$userType,'logged_in' => TRUE);\n\t\t\t$this->session->set_userdata($sessionData);\n\t\t}", "public static function sessionData(): object {\n return Session::instance()->get(AccessControl::SESSION_AUTH_KEY);\n }", "private function check_login(){\n if (isset($_SESSION['email'])){\n $this->email=$_SESSION['email'];\n\t\t\t$this->role=$_SESSION['role'];\n\t\t\t$this->id=$_SESSION['id'];\n $this->signed_in=true;\n }\n else{\n unset($this->email);\n $this->signed_in=false;\n }\n }", "public function doAuthentication();", "public function setAuthenticated();", "private function createSession()\n {\n session_regenerate_id(TRUE);\n $this->session = array();\n $this->session['legit'] = $this->sessionHash();\n $this->session['id'] = $this->userId;\n if (!$this->userId) {\n $this->voidCookie();\n }\n }", "abstract protected function getSession();", "private static function login() {\n if ( !self::validatePost() ) {\n return;\n }\n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $result = Database::getUser($_POST['email'],$password);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n $_SESSION['user']['id'] = $result[0]['id'];\n $_SESSION['user']['email'] = $result[0]['email'];\n $_SESSION['user']['nickname'] = $result[0]['nickname'];\n $_SESSION['user']['verified'] = $result[0]['verified'];\n $_SESSION['user']['moderator'] = $result[0]['moderator'];\n $_SESSION['user']['supermoderator'] = $result[0]['supermoderator'];\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n }", "function authenticated() {\n return $_SESSION['auth'] == md5(config('security.password.hash') . $_SESSION['user']['id']);\n}", "public static function authenticate($data = null)\n {\n $_SESSION[\"authenticated\"] = true;\n if (is_array($data)) {\n foreach ($data as $key => $value) {\n $_SESSION[$key] = $value;\n }\n }\n }", "public function login (){\n\n $dao = DAOFactory::getUsuarioDAO(); \n $GoogleID = $_POST['GoogleID']; \n $GoogleName = $_POST['GoogleName']; \n $GoogleImageURL = $_POST['GoogleImageURL']; \n $GoogleEmail = $_POST['GoogleEmail'];\n $usuario = $dao->queryByGoogle($GoogleID); \n if ($usuario == null){\n $usuario = new Usuario();\n $usuario->google = $GoogleID;\n $usuario->nombre = $GoogleName;\n $usuario->avatar = $GoogleImageURL;\n $usuario->correo = $GoogleEmail;\n print $dao->insert($usuario);\n $_SESSION[USUARIO] = serialize($usuario);\n //$usuario = unserialize($_SESSION[USUARIO]);\n } else {\n $_SESSION[USUARIO] = serialize($usuario);\n }\n }", "public function login() {\n $this->db->sql = 'SELECT * FROM '.$this->db->dbTbl['users'].' WHERE username = :username LIMIT 1';\n\n $user = $this->db->fetch(array(\n ':username' => $this->getData('un')\n ));\n\n if($user['hash'] === $this->hashPw($user['salt'], $this->getData('pw'))) {\n $this->sessionId = md5($user['id']);\n $_SESSION['user'] = $user['username'];\n $_SESSION['valid'] = true;\n $this->output = array(\n 'success' => true,\n 'sKey' => $this->sessionId\n );\n } else {\n $this->logout();\n $this->output = array(\n 'success' => false,\n 'key' => 'WfzBq'\n );\n }\n\n $this->renderOutput();\n }", "public function auth(){\n\t\terror_reporting(E_ALL);\n\t\tif($this->input->post())\n\t\t{\n\t\t\t$postdata = escape_post_strings($this->input->post());\n\t\t\tif(array_key_exists('login_token',get_session_var()))\n\t\t\t{\n\t\t\t\tif($postdata['login_token'] === get_session_var('login_token'))\n\t\t\t\t{\n\t\t\t\t\t$dologin = $this->aauth->login($postdata['email'],$postdata['password']);\t\n\t\t\t\t\tif($dologin && $this->aauth->is_loggedin()) {\n\t\t\t\t\t\t$this->createsession(get_session_var('user_id'));\n\t\t\t\t\t\tredirect('home');\n\t\t\t\t\t}\t\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->aauth->error('Please enter correct email and password.',TRUE);\n\t\t\t\t\t\tredirect('login');\n\t\t\t\t\t}\n\t\t\t\t} redirect('login');\t\n\t\t\t} else redirect('login');\t\n\t\t}\n\t\telse\n\t\tredirect('login');\t\n\t}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function auth(){\n if(empty($_COOKIE[\"utoken\"])){\n $cookie_value = $this->uuid();\n $this->utoken = $cookie_value;\n $this->setHeader($this->utoken);\n }else{\n $this->utoken = $_COOKIE[\"utoken\"];\n $this->setHeader($this->utoken);\n }\n }", "public function storeSessionTokenInRegistry() {}", "function authenticateUser() {\n\t\tif(!isset($_SESSION[\"authenticated\"])) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\telse{\n\t\t\t//checking session variable has info \n\t\t\tif($_SESSION[\"authenticated\"] != true){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\n\t}", "private function login(){\n \n }", "private function setSession()\n {\n try\n {\n # Get the Populator object and set it to a local variable.\n $populator=$this->getPopulator();\n # Get the User object and set it to a local variable.\n $user_obj=$populator->getUserObject();\n\n # Set the form URL's to a variable.\n $form_url=$populator->getFormURL();\n # Set the current URL to a variable.\n $current_url=FormPopulator::getCurrentURL();\n # Check if the current URL is already in the form_url array. If not, add the current URL to the form_url array.\n if(!in_array($current_url, $form_url)) $form_url[]=$current_url;\n\n # Create a session that holds all the POST data (it will be destroyed if it is not needed.)\n $_SESSION['form']['password']=\n array(\n 'EmailPassword'=>$populator->getEmailPassword(),\n 'FormURL'=>$form_url\n );\n }\n catch(Exception $e)\n {\n throw $e;\n }\n }", "public function __construct() {\n session_start();\n $this->check_stored_login();\n }", "function __construct(){\r\n if(isset($_SESSION['login']) && $_SESSION['login'] == 'true' && isset($_SESSION['username'])){\r\n $this->username = $_SESSION['username'];\r\n $this->login = $_SESSION['login'];\r\n $this->email = $_SESSION['email'];\r\n $this->credential = $_SESSION['credential'];\r\n $this->picture = $_SESSION['picture'];\r\n $this->academy = $_SESSION['fullname'];\r\n }\r\n }", "protected function Auth()\n {\n if( !$this->Validate() ){\n throw new Exception(\"The connection could not be validated\");\n }\n\n $search = $_GET[\"openid_identity\"];\n $steamid = substr($search, strrpos($search, '/') + 1);\n \n $infos = $this->GetInfos($steamid);\n \n $infos = $this->ParseData($infos);\n\n $_SESSION[\"user\"] = $infos;\n\n $url = $this->redirectParams[\"openid.return_to\"];\n\n header(\"Location: $url\");\n exit(); \n }", "private function check_stored_login() {\n if(isset($_SESSION['admin_id'])) {\n $this->admin_id = $_SESSION['admin_id'];\n $this->username = $_SESSION['username'];\n $this->user_level = $_SESSION['user_level'];\n $this->last_login = $_SESSION['last_login'];\n }\n }", "public function login($data){\r\n foreach($data as $key => $val){\r\n $_SESSION[$key] = $val;\r\n }\r\n $_SESSION[\"ZingLoggedIn\"] = true;\r\n return $this;\r\n }", "function assignBackAuth() {\n AuthComponent::$sessionKey = 'Auth.Admin';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.store_id' => $this->Session->read('admin_store_id'), 'User.role_id' => 3, 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "function persistsession(){\n\tglobal $config;\n\n\t$has_session = isset($_SESSION[$config->sesskey]);\n\t$has_cookie = (isset($_COOKIE[$config->sesskeycookiename]) and $_COOKIE[$config->sesskeycookiename]!= '');\n\tif(!$has_session and $has_cookie){\n\t\t//perform login from cookie\n\t\t$cookieparts=explode(\"|\",$_COOKIE[$config->sesskeycookiename]);\n\t\t//cookie should contain encrypt(password)|encrypt(roleid)|username|md5(http_user_agent)|lang|encrypt(orgid)\n\t\tif(count($cookieparts)==6){\n\t\t\t$orgid_enc = trim($cookieparts[5]);\n\t\t\t$lang = trim($cookieparts[4]);\n\t\t\t$remoteuseragent = trim($cookieparts[3]);\n\t\t\t$username = trim($cookieparts[2]);\n\t\t\t$roleid_enc = trim($cookieparts[1]);\n\t\t\t$password = trim($cookieparts[0]);\n\t\t\trequire_once(\"EnDecryptText.php\");\n\t\t\t$EnDecryptText = new EnDecryptText();\n\t\t\trequire_once(\"api-functions.php\");\n\t\t\t//only if cookie has correct data, do login. otherwise, unlog user.\n\t\t\tif(do_auth($username,$EnDecryptText->Decrypt_Text($password)) and $remoteuseragent==md5($_SERVER[\"HTTP_USER_AGENT\"])){\n\t\t \t\t//restore session\n\t\t \t\t$_SESSION[$config->sesskey] = $username;\n\t\t \t\t$_SESSION[$config->sesskey.\"pw\"] = $password;\n\t\t \t\t$_SESSION[$config->sesskey.\"rl\"] = $roleid_enc;\n\t\t\t\t\t$_SESSION[$config->sesskey.\"or\"] = $orgid_enc;\n\t\t \t\t$_SESSION[$config->sesskey.\"lang\"] = $lang;\n\t\t\t} else {\n\t\t\t\t//destroy cookies\n\t\t\t\tsetcookie($config->sesskeycookiename, \"\", time() - $config->cookie_lifetime);\n\t\t\t\t//destroy session\n\t\t\t\tsession_unset();\n\t\t\t\tsession_destroy();\n\t\t\t}\n\t\t}\n\t}\n}", "private function setUserPass(){\n if($this->_request->get(login_user)){\n $this->_user = $this->_request->get(login_user);\n }else{\n $this->_user = $this->getCookie();\n }\n $this->_pass = $this->_request->get('login-password');\n }", "private function initialize_session($passed_credentials)\n\t{\t\t\n\t\t$get_row=$passed_credentials;\n\t\t$get_row=$get_row['0'];\n\t\t$id=$get_row->id;\n\t\t$username=$get_row->email;\t\t\t\n\t\t$newdata = array('admin'=>array(\n\t\t\t\t'id' => $id,\n\t\t\t\t'email'=> $username,\n\t\t\t\t'role'=>'admin',\n\t\t\t\t'logged_in' => TRUE\t\t\t\t\n\t\t));\n\t\t$this->session->set_userdata($newdata);\t \n\t}", "function token_set($name) {\r\n\t$session=Zend_Auth::getInstance()->getStorage();\r\n\t$token=auth();\r\n\t$session->set($name,$token);\r\n\r\n\treturn $token;\r\n}", "public function auth_user()\n {\n //echo $this->id;\n //echo $this->username. ' is authenticated';\n }", "protected function setSessionCookie() {}", "protected function _connection() {\n\n\t\tif ($this->cookie->exists('user') === false && $this->cookie->exists('token') === false) {\n\t\t\t\n\t\t\tif (count($_POST) && isset($_POST['email']) && isset($_POST['password'])) {\n\t\t\t\t\n\t\t\t\t$oUser = new User;\n\t\t\t\t$oUserEntity = $oUser->findOneByemail($_POST['email']);\n\n\t\t\t\tif (count($oUserEntity) > 0 && md5($_POST['password']) === $oUserEntity->get_password()) {\n\n\t\t\t\t\t$this->cookie->set('user', $_POST['email'], 86400);\n\t\t\t\t\t$this->cookie->set('id', $oUserEntity->get_id(), 86400);\n\t\t\t\t\t$this->cookie->set('token', md5($_POST['email'].self::PRIVATE_KEY_FOR_TOKEN), 86400);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->cookie->exists('user') && $this->cookie->exists('token')) {\n\t\t\t\n\t\t\tif (md5($this->cookie->get('user').self::PRIVATE_KEY_FOR_TOKEN) != $this->cookie->get('token')) {\n\t\t\t\t\n\t\t\t\t$this->cookie->set('user', null, 0);\n\t\t\t\t$this->cookie->set('id', null, 0);\n\t\t\t\t$this->cookie->set('token', null, 0);\n\t\t\t}\n\t\t}\n\t}", "public static function getSession(){\n return \\Illuminate\\Auth\\Guard::getSession();\n }", "public function setSession(){\n if( $this->status === True ){\n $_SESSION['username'] = $this->username;\n $_SESSION['userlvl'] = $this->userlevel;\n $_SESSION['status'] = True;\n }else{\n $_SESSION['status'] = False;\n }\n }", "protected function initializeSession() {}", "public function signInAction()\n {\n $userData = $this->manager->findOneBy(['username' => $this->httpParameters['login']]);\n\n //If no user were found, redirects\n if(empty($userData))\n {\n $this->response->redirect('/auth',HttpResponse::WRONG_LOGIN);\n }\n\n //Instantiates the user\n $user = new User($userData);\n\n //Checks if typed password matches user's password\n if($this->passwordMatch($this->httpParameters['loginPassword'],$user,'/auth'))\n {\n //Sets the user instance as a the new $_SESSION['user']\n $_SESSION['user'] = $user;\n\n $this->response->redirect('/admin');\n }\n }", "public function getSessionAuthToken();", "public function authUser()\n {\n //я не знаю почему, что эти функции возвращают пустые строки...\n //$login = mysql_real_escape_string($_POST['login']);\n //$password = mysql_real_escape_string($_POST['password']);\n $login = $_POST['login'];\n $password = $_POST['password'];\n if(DBunit::checkLoginPassword($login, $password)){\n DBunit::createUserSession(DBunit::getUser($login, $password));\n return true;\n }\n else {\n return false;\n }\n }", "function AuthenticatorHelper(){\n $this->db = new DatabaseHelper();\n $this->logger = new Logger();\n \n if($_POST['login']){\n $username = $_POST['login']['username'];\n $password = $_POST['login']['password'];\n \n if($user = $this->login($username, $password) ){\n // $user being a user db row\n $_SESSION['user'] = $user;\n }\n else {\n $this->logger->setLog('notification', \"Attempted login failed, user name:<strong>$username</strong> password:<strong>$password</strong>\");\n $this->logger->sendEmail();\n $this->logout();\n }\n }\n if( $_GET['logout'] == 'yes' ) {\n $this->logout();\n }\n \n }", "function assignFrontAuth() {\n AuthComponent::$sessionKey = 'Auth.User';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.merchant_id' => $this->Session->read('merchant_id'), 'User.role_id' => array('4', '5'), 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "private function assign_auth_values(){\n\t\t$is_authenticated = AuthManager::is_authenticated();\n\t\t$this->assign('batl_is_logged', $is_authenticated);\n\t\tif($is_authenticated && $this->is_db_available()){\n\t\t\t// check if logged in local server\n\t\t\t$this->assign('batl_is_admin', AuthManager::is_current_user_admin());\n\t\t\t$this->assign('batl_current_user', AuthManager::get_user_infos());\n\n\t\t}else{\n\t\t\t// check if logged in on FB\n\t\t\t/*$facebook_manager = new FacebookService();\n\t\t\t$batl_current_user = AuthManager::get_user_profile($facebook_manager);\n\t\t\t$this->assign('batl_current_user', $batl_current_user);\n\t\t\t$this->assign('fbloginouturl', AuthManager::get_loginout_url($facebook_manager,$batl_current_user));*/\n\t\t}\n\t}", "public function login(){\n\t\t$this->user = $this->user->checkCredentials();\n\t\t$this->user = array_pop($this->user);\n\t\tif($this->user) {\n\t\t\t$_SESSION['id'] = $this->user['id'];\n\t\t\t$_SESSION['name'] = $this->user['name'];\n\t\t\t$_SESSION['admin'] = $this->user['admin'];\n\t\t\t$this->isAdmin();\n\t \t\theader('location: ../view/home.php');\n\t \t\texit;\n\t \t}\n\t\t$dados = array('msg' => 'Usuário ou senha incorreto!', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/login.php');\n \t\texit;\n\t}", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "public function save() {\n FPCAuthentication_Result::startSession();\n $_SESSION[self::FPC_LOGIN_RESULT_KEY] = $this->toArray();\n return $this;\n }", "protected function loginIfRequested() {}", "private function getSession() {\n\t\t//read session file and fill the array\n\t\tif (file_exists ( self::SESSION_FILE )) {\n\t\t\t$this->session = unserialize ( file_get_contents ( self::SESSION_FILE ) );\n\t\t}\n\t\t\n\t\t//If the last session has expired, remove the session\n\t\tif (isset ( $this->session ) && $this->session ['lastlogin'] + (10 * 60) <= time ()) {\n\t\t\tunset ( $this->session );\n\t\t\t$this->updateSession ();\n\t\t}\n\t}", "public function Authentication(){\n if($_SESSION['account'] == NULL){\n // neu khong co nghia la chua dang nhap\n // t chuyen huong ve login\n header(\"location:login\");\n }\n }", "public function authenticate() {\n\t\t \n\t\t$db = db_connect();\n $query= \"SELECT * FROM users WHERE username=:username AND password=:password\";\n $statement=$db->prepare($query);\n $statement->execute(array(\n 'username' => $_POST['username'],'password' => $_POST['password']\n ));\n $count=$statement->rowCount();\n if($count>0){\n $_SESSION['username']=$_POST['username'];\n $_SESSION['is authenticated']= true;\n\t\t}\n }", "public function saveToSession()\n {\n $_SESSION[PMF_SESSION_CURRENT_USER] = $this->getUserId();\n }", "public function authenticate();", "public function authenticate();", "public function authenticate();", "function vtws_extendSession(){\n\t\tglobal $adb,$API_VERSION,$application_unique_key;\n\t\tif(isset($_SESSION[\"authenticated_user_id\"]) && $_SESSION[\"app_unique_key\"] == $application_unique_key){\n\t\t\t$userId = $_SESSION[\"authenticated_user_id\"];\n\t\t\t$sessionManager = new SessionManager();\n\t\t\t$sessionManager->set(\"authenticatedUserId\", $userId);\n\t\t\t$crmObject = VtigerWebserviceObject::fromName($adb,\"Users\");\n\t\t\t$userId = vtws_getId($crmObject->getEntityId(),$userId);\n\t\t\t$vtigerVersion = vtws_getVtigerVersion();\n\t\t\t$resp = array(\"sessionName\"=>$sessionManager->getSessionId(),\"userId\"=>$userId,\"version\"=>$API_VERSION,\"vtigerVersion\"=>$vtigerVersion);\n\t\t\treturn $resp;\n\t\t}else{\n\t\t\tthrow new WebServiceException(WebServiceErrorCode::$AUTHFAILURE,\"Authencation Failed\");\n\t\t}\n\t}", "public function login();", "public function login();", "public function rememberExtendsSession();", "private function storeSessionData($username, $password,$level)\n\t\t{\n\t\t $_SESSION['auth_username'] = $username;\n\t\t\t$_SESSION['auth_password'] = $this->useHash ? $password : sha1($password . $this->salt);\n\t\t\t$_SESSION['auth_level'] = $level;\n\t\t\tsetcookie('auth_username', $_SESSION['auth_username'], time()+60*60*24*30, '/', $this->domain);\n\t\t\tsetcookie('auth_password', $_SESSION['auth_password'], time()+60*60*24*30, '/', $this->domain);\n\t\t}", "public function addToSession() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n $s->$key = $this->getId();\n if ($s->$key === null) {\n Log::warn(\"Adding null user ID to session\");\n }\n $this->setAuthed(true);\n }", "public function actionAuthenticateSession(){\n $this->pageTitle= $this->genTitlePage('Authenticate Session');\n $result='';\n $moduleName ='authenticatesession';\n\n if(isset($_POST['Username']) && isset($_POST['Password'])){\n $username = $_POST['Username'];\n $password = $_POST['Password'];\n $result = $this->_AuthenticateSession($username, $password, $moduleName);\n }\n \n $this->render($moduleName, array('result'=>$result));\n }", "public function auth()\n {\n\n if (Auth::attempt(['email' => $this->request->header('email'), 'password' => $this->request->header('password')])) {\n $this->user = Auth::user();\n\n } else {\n echo json_encode(['error' => 'Unauthorised']);\n die();\n }\n }", "function loginUser($username) {\r\n $_SESSION[\"currentUser\"] = $username;\r\n $_SESSION['authenticated'] = TRUE;\r\n}", "public function login(){\n\n if(isset($_POST)){\n \n /* identificar al usuario */\n /* consulta a la base de datos */\n $usuario = new Usuario();\n \n $usuario->setEmail($_POST[\"email\"]);\n $usuario->setPassword($_POST[\"password\"]);\n \n $identity = $usuario->login();\n \n\n if($identity && is_object($identity)){\n \n $_SESSION[\"identity\"]= $identity;\n\n if($identity->rol == \"admin\"){\n var_dump($identity->rol);\n\n $_SESSION[\"admin\"] = true;\n }\n }else{\n $_SESSION[\"error_login\"] = \"identificacion fallida\";\n }\n\n\n /* crear una sesion */\n \n }\n /* redireccion */\n header(\"Location:\".base_url);\n\n }", "public function __construct()\n {\n $this->sessionKey = \"WebsiteUserManager\";\n }", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function authenticate() {}", "function isAuthenticated(){\n return Session::has('SESSION_USER_NAME') ? true:false;\n}", "private function __construct() \n {\n \n\t\t$this->_storage = new Tg_Auth_Storage_Session();\n\t\t$this->_adapter = new Tg_Auth_Adapter_User();\n\t\t$this->_auth = Zend_Auth::getInstance();\n $this->_auth->setStorage($this->_storage);\n }", "public function setUserToLoggedIn($result) {\n // this is dangerous and lazy but will be fine for the assignment.\n $_SESSION['is_logged_in'] = true;\n $_SESSION['user_id'] = $result->id;\n $_SESSION['username'] = $result->username;\n $_SESSION['membership'] = $result->membership;\n $_SESSION['avatar'] = $result->avatar;\n $_SESSION['created_at'] = $result->created_at;\n }", "public function autenticar($usr,$pwd) {\n $pwd=\"'\".$pwd.\"'\";\n $sql= 'SELECT * FROM empleados WHERE (\"idEmpleado\" = '.$usr.') AND (dni = '.$pwd.');';\n $empleado=\"\";\n $result = pg_query($sql);\n\n if ($result){\n $registro = pg_fetch_object($result);\n $empleado = $registro->nombres . \" \" . $registro->apellido;\n session_start(); //una vez que se que la persona que se quiere loguear es alguien autorizado inicio la sesion\n //cargo en la variable de sesion los datos de la persona que se loguea\n $_SESSION[\"idEmpleado\"]=$registro->idEmpleado;\n $_SESSION[\"dni\"]=$registro->dni;\n $_SESSION[\"fechaInicio\"]=$registro->fechaInicio;\n $_SESSION[\"nombres\"]=$registro->nombres;\n $_SESSION[\"apellido\"]=$registro->apellido;\n $_SESSION[\"i_lav\"]=$registro->i_lav;\n $_SESSION[\"f_lav\"]=$registro->f_lav;\n $_SESSION[\"i_s\"]=$registro->i_s;\n $_SESSION[\"f_s\"]=$registro->f_s;\n $_SESSION[\"i_d\"]=$registro->i_d;\n $_SESSION[\"f_d\"]=$registro->f_d;\n //$_SESSION[\"iex_lav\"]=$registro->iex_lav;\n //$_SESSION[\"fex_lav\"]=$registro->fex_lav;\n }\n return $empleado;\n }", "public static function saveUserSession(){\n\t\t$_SESSION['user']=self::$_leuser;\n\t}", "protected function retrieveSessionToken() {}" ]
[ "0.7472246", "0.74618715", "0.739473", "0.71393836", "0.70302844", "0.7022269", "0.6923185", "0.67911065", "0.6754701", "0.67312956", "0.67280674", "0.67131346", "0.66287434", "0.6613576", "0.6606817", "0.65989614", "0.656954", "0.65607333", "0.6547734", "0.6517558", "0.65156007", "0.6504547", "0.6499961", "0.6498753", "0.6481052", "0.647479", "0.6474371", "0.6455708", "0.6452504", "0.6440785", "0.6440722", "0.6435971", "0.64225644", "0.6415898", "0.641226", "0.64102066", "0.64083004", "0.6407863", "0.6401929", "0.6394652", "0.6393286", "0.6393286", "0.6393286", "0.6393286", "0.63818115", "0.63814557", "0.6372977", "0.6367298", "0.6364904", "0.635973", "0.6357903", "0.634548", "0.6344287", "0.634358", "0.6337026", "0.63344", "0.6329619", "0.63207394", "0.632052", "0.6305695", "0.6292134", "0.6288624", "0.62854177", "0.6284413", "0.62836653", "0.626998", "0.6267056", "0.6264601", "0.6253298", "0.6250784", "0.624229", "0.62371475", "0.62314844", "0.62227523", "0.6217139", "0.6212258", "0.6209573", "0.6206658", "0.6205494", "0.6194466", "0.6194466", "0.6194466", "0.6180622", "0.61805093", "0.61805093", "0.61779577", "0.61743534", "0.617002", "0.61691535", "0.6160703", "0.6159784", "0.6157042", "0.6154632", "0.6151524", "0.61512953", "0.61483777", "0.61480445", "0.61462766", "0.61458975", "0.6144673", "0.6144461" ]
0.0
-1
Met en place le service
public function processApi() { if($this->securedRest){ if(!isset($this->requestSecure) || !isset($this->requestPublicKey)){ $this->response('Utilisateur non authentifié', 401); } if(!$this->verifyKeys($this->requestPublicKey, $this->requestSecure)){ $this->response('Utilisateur non authentifié', 401); } } $func = $this->_method; if ((int) method_exists($this, $func) > 0){ $this->$func(); }else{ $this->response('', 404); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function service();", "abstract protected function getService();", "public function service()\n {\n }", "function service();", "public function exampleService()\n {\n }", "public function __construct()\r\n\t{\r\n\t\t// Services dont have constructors Apparently\r\n\t\t//parent::__construct();\r\n\t\t//\r\n\r\n\t}", "public function setService(){\n if($this->getRecord()->getRecordType() === \"yt\"){\n $this->service = new YoutubeService();\n }\n if($this->getRecord()->getRecordType() === \"gm\"){\n $this->service = new GoogleMapService();\n }\n }", "public function testCreateService()\n {\n\n }", "public function registerServices(){\n }", "function IslandoraService() { \n $this->config_data = get_listener_config_data();\n $this->location = $this->config_data['location']; \n $config_file = file_get_contents($this->location . '/config.xml'); \n try{\n $this->config = simplexml_load_string($config_file);\n } catch (Exception $e)\n {\n error_log(\"microservices soap server failed to open the listeners config file\");\n }\n $this->services = $this->config_data['services'];\n $this->log = new Logging();\n $this->log->lfile($this->config->log->file);\n\n }", "public function __construct()\n {\n $this->demoService = new DemoService();\n }", "protected function serviceAccessGates()\n {\n //\n }", "abstract protected function getService($id);", "public function index()\n\t{\n\t\t$this->our_services();\n\t}", "private function registerServices() {\n // Modules\n $this->addService('modules', 'MyTravel\\Core\\Service\\Modules::setService');\n // Routing\n $this->addService('routing', 'MyTravel\\Core\\Service\\Routing::setService');\n // Event dispatcher\n $this->serviceContainer\n ->register('events', 'Symfony\\Component\\EventDispatcher\\EventDispatcher');\n // Database\n $this->addService('db', 'MyTravel\\Core\\Service\\Db::setService');\n // Access\n $this->addService('access', 'MyTravel\\Core\\Service\\Access::setService');\n }", "public function __construct()\n {\n $this->services = [];\n }", "public function testUpdateService()\n {\n\n }", "protected abstract function resolveService();", "function startService()\n {\n\n $this->service_link = $this->_openService($this->url . '/' . $this->service_name . $this->wsdl);\n\n }", "private function initializeServices()\n {\n $this->emailManager = $this->getService('mycp.service.email_manager');\n $this->translatorService = $this->getService('translator');\n $this->securityService = $this->getService('Secure');\n $this->router = $this->getService('router');\n }", "public function __construct()\n {\n $this->service = new ComicService();\n }", "public function run_service()\n\t{\n\t\t// Route the API task\n\t\t$this->_route_api_task();\n\t}", "protected function callService ()\n\t{\n\t\t$this->protocol->callService( $this->data ) ;\n\t}", "public function init() {\n $registry = Zend_Registry::getInstance();\n\t $this->view->basePath = $registry->get('basepath'); \n\t $this->adm_listtabel_serv = adm_dds_service::getInstance();\n\t $this->adm_listdata_serv = adm_dds_service::getInstance();\n\t $this->adm_ntablesearch_serv = adm_dds_service::getInstance();\n\t $this->adm_tabeldtl_serv = adm_dds_service::getInstance();\n\t $this->adm_ndatasearch_serv = adm_dds_service::getInstance();\n\t $this->adm_datadtl_serv = adm_dds_service::getInstance();\n }", "public function do_service() {\n $this->params_wrapper->check();\n $this->params_wrapper->wrap();\n $xml_content = XMLBuilder::buildXML($this->params_wrapper->getWrappedParameters());\n $sympa_client = new SympaPLClient();\n $main_robot_name = strtolower($this->params_wrapper->getWrappedParameter(SympaRemoteConstants::INPUT_RNE)).\".\".$this->config->sympa_main_domain;\n\n\t\t$operation = $this->params_wrapper->getWrappedParameter(SympaRemoteConstants::INPUT_OPERATION);\n\t\t$this->log->LogDebug(\"Operation : \" . $operation);\n\t\tswitch ($operation) {\n\t\t\tcase \"CREATE\":\n\t\t\t\t$sympa_client->createListWithXML($xml_content, $this->params_wrapper->getWrappedParameter(SympaPLClient::ARGUMENT_FAMILLE), $main_robot_name);\n\t\t\t\tbreak;\n\t\t\tcase \"UPDATE\":\n\t\t\t\t$sympa_client->updateListWithXML($xml_content, $this->params_wrapper->getWrappedParameter(SympaPLClient::ARGUMENT_FAMILLE), $main_robot_name);\n\t\t\t\tbreak;\n\t\t\tcase \"CLOSE\":\n\t\t\t\t$listname = $this->params_wrapper->getWrappedParameter(SympaRemoteConstants::INPUT_LIST_NAME_TO_CLOSE);\n\t\t\t\t$sympa_client->closeList($listname);\n\t\t\t\tbreak;\n\t\t}\n }", "public function manager();", "public function __construct($service) {\n $this->service = $service;\n }", "public function __construct()\n {\n $this->Service = new ContactsService();\n $this->GroupService = new GroupService();\n }", "public function __construct() {\n $this->oUserService = new UserService();\n $this->oArticleService = new ArticleService();\n $this->oLeagueService = new LeagueService();\n// $this->oTeamService = new TeamService();\n// $this->oMatchService = new MatchService(); \n }", "public function getServiceInfo() {}", "abstract function get_crud_service();", "public function __construct() {\n\n parent::__construct();\n load_class('Service', 'core');\n $this->_ci_service_paths = array(APPPATH);\n }", "public function transactService()\n {\n $data['liste_serv'] = $this->serviceModels->getService();\n $this->views->setData($data);\n $param['serv'] = $this->paramPOST['fk_service'];\n\n if (isset($this->paramPOST[\"datedeb\"]) & isset($this->paramPOST[\"datefin\"])) {\n\n $param['datedeb'] = Utils::date_aaaa_mm_jj($this->paramPOST['datedeb']) ;\n $param['datefin'] = Utils::date_aaaa_mm_jj($this->paramPOST['datefin']);\n\n }else{\n $param['datedeb'] = date('Y-m-d');\n $param['datefin'] = date('Y-m-d');\n }\n\n $this->views->setData($param);\n $this->views->getTemplate('reporting/transactService');\n }", "public function getServiceLocator();", "public function __construct() {\n $this->atom = \\Drupal::service('ngdata.atomic.atom');\n $this->molecule = \\Drupal::service('ngdata.atomic.molecule');\n $this->organism = \\Drupal::service('ngdata.atomic.organism');\n $this->template = \\Drupal::service('ngdata.atomic.template');\n\n // $this->entityService = \\Drupal::service('ngdata.entity');\n }", "public function onStart()\n {\n }", "public function init()\n {\n $this->_service = new App_Services_User();\n }", "public function getServices();", "public function obtener()\n {\n }", "function External_service()\r\n\t{\r\n\t\tparent::PUB_Controller();\r\n\t\t$this->load->model('merchant/query_model');\r\n\r\n\t}", "public function testUpdateServiceData()\n {\n\n }", "public function onStart();", "public function servicos() {\n $this->load_template('servicos');\n }", "public function registerServices($di)\n {\n // echo \"admin module registerServices....\";\n\n require_once '../apps/admin/config/services.php';\n }", "public function hooks() {\n $service = new Service($this->license_base);\n add_action('admin_menu', array($this, 'register_license_page'));\n add_action('admin_enqueue_scripts', array($this, 'admin_scripts'), 10);\n // Validate service\n add_action('wp_ajax_validate_service', array($service, 'validate_service'), 10);\n }", "public function init()\n {\n /*\n * service component, data provider\n */\n // parent::init();\n }", "public function __construct()\n {\n parent::__construct();\n $this->payoutService = new PayoutService();\n $this->winningService = new WinningService();\n }", "public function __construct()\n {\n $this->Seat_Service = new Seat();\n $this->Permission_Service = new Permission();\n $this->User_Service = new UserService();\n $this->Contace_Service = new ContactList(); \n $this->Assessment_Service = new Assessment(); \n $this->Report_Service = new Report(); \n $this->student_paravalue_repo = new StudentParaValue();\n $this->student_para_repo = new StudentParameter(); \n $this->Utils = new Utils();\n }", "public function onStart() {\r\n\r\n }", "public function run()\n {\n $services = [\n [\"type\" =>'wifi'],\n [\"type\" =>'posto auto'],\n [\"type\" =>'piscina'],\n [\"type\" =>'sauna'],\n [\"type\" =>'vista mare'],\n [\"type\" =>'reception']\n ];\n \n foreach($services as $service){\n $newService = new Service;\n $newService -> fill($service) -> save();\n }\n }", "function servicio($link)\r\n\t{\r\n\t\t$this->enlace = $link;\r\n\t}", "public function service()\n {\n return $this->service;\n }", "private function initService() {\n\t\t/** check if config->service exists */\n\t\t$config = $this->_config->get('config');\n\t\tif (!property_exists($config, 'service')) {\n\t\t\tthrow new Exception('Configuration file requires \"service\" filed');\n\t\t}\n\n $services = $config->service->toArray();\n\n /** inject service into Di container */\n foreach ($services as $name => $options) {\n \t$bootstarp = $this;\n \t$shared = $options['shared'] ? : FALSE;\n\n \t$this->_di->set($name, function() use ($bootstarp, $options) {\n \t\tif (!class_exists($options['lib'])) {\n \t\t\tthrow new Exception('Class \"' . $options['lib'] .'\" is not found');\n \t\t}\n\n \t\t/** check if there is a specify config file */\n \t\t$config = NULL;\n \t\tif (!empty($options['config'])) {\n\t\t\t\t\t/** get config */\n\t\t\t\t\t$config = $bootstarp->_config->get($options['config'])->toArray();\n \t\t}\n\n \t\t/** check if the class implements with the interface iService */\n \t\t$instance = new $options['lib']();\n \t\tif (!$instance instanceof iService) {\n \t\t\tthrow new Exception('class ' . $options['lib'] . ' not implements with interface iService');\n \t\t}\n\n \t\t/** init service */\n \t\treturn $instance->init($config);\n \t}, $shared);\n }\n\t}", "public function run()\n {\n //\n SystemService::create([\n 'nombre' => 'La carta mozo'\n ]);\n SystemService::create([\n 'nombre' => 'Delivery'\n ]);\n SystemService::create([\n 'nombre' => 'Reservas'\n ]);\n SystemService::create([\n 'nombre' => 'Marketing'\n ]);\n }", "public function service($request,$response,$utilities);", "public function run()\n {\n Service::create([\n 'name'=>'consultation'\n ]);\n Service::create([\n 'name'=>'operation'\n ]);\n }", "public function init()\n {\n try {\n $id = $this->getIdOrName();\n $client = KongClient::getInstance();\n $res = $client->getService($id);\n dd($res);\n } catch (\\Exception $e) {\n dump($e->getMessage());\n }\n }", "private function load_services() {\n\t\tforeach ( $this->get_services() as $service_classname ) {\n\t\t\t$this->load_service( $service_classname );\n\t\t}\n\t}", "function __construct()\n {\n if (AhpMethod::first() == null) {\n $ahp_method_service = new AhpMethodService();\n $ahp_method_service->recalculateAhpValues();\n }\n\n // Generate wp method values\n if (WpMethod::first() == null) {\n $wp_method_service = new WpMethodService();\n $wp_method_service->recalculateWpValues();\n }\n }", "public function getServices(): array;", "protected function index() {\n\t\t$service = new Model_Service();\n\t\t//$service->set('active',true);\n\t\t$this->payload->services = $service->find();\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->randTimeService = new RandTimeHadistService();\n }", "public function startup();", "public function __construct()\n {\n // Dependencies automatically resolved by service container...\n }", "function main()\t{\n\t\t$obj_new_film= new film_service();\n\t\t$obj_new_film->save_film();\n\n\t\t$this->resultat= $obj_new_film->resultat;\n\t}", "public function createServiceObjects() \n {\n var_dump('jj', Ini::$serviceConnections);\n //if (!empty(Ini::$serviceConnections)) \n //{\n foreach (Ini::$serviceConnections as $connectionName => $connectionDetail) \n {\n Ini::loadModule(Sysutils::Ucase($connectionDetail->type) . 'Service', 'Services', '\\Sys');\n $fqClassname = '\\\\Sys\\\\'. Sysutils::Ucase($connectionDetail->type) . 'Service';\n $this->autoLoadedServices[$connectionName] = array('url' => $connectionDetail->url, 'type' => $connectionDetail->type);\n $this->{$connectionName} = new $fqClassname($connectionDetail->url);\n }\n \n //}\n }", "public function __construct()\n {\n $this->Service = new GroupService();\n }", "public function init()\n {\n $this->wxService = new WxService();\n parent::init();\n }", "protected function getStageService() {}", "protected function service()\n {\n return new Service();\n }", "public function __construct()\n {\n\n $this->postService = new PostService();\n $this->categoryService = new CategoryService();\n }", "public function __construct(LookupService $lookupService) {\r\n\t $this->lookupService = $lookupService; \t\r\n\t}", "public function service()\r\n {\r\n return $this->service;\r\n }", "protected function registerServices()\n {\n\n $di = new FactoryDefault();\n\n /**\n * Read services\n */\n include CORE_PATH . \"/config/services.php\";\n\n /**\n * Get config service for use in inline setup below\n */\n $config = $di->getConfig();\n\n\n include CORE_PATH . '/config/loader.php';\n\n \n\n $this->setDI($di);\n }", "public function __construct()\n {\n $this->jobService = new JobService();\n }", "protected function handler ($SVC) {}", "public function __construct()\n {\n $this->botService = new BotService();\n }", "public function run()\n\t\t{\n\t\t\tswitch ($_GET['act']) {\n\t\t\t\tcase 'create':\n\t\t\t\t\t//Crear \n\t\t\t\t\t$this->create();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'lists':\n\t\t\t\t\t//Crear \n\t\t\t\t\t$this->lists();\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'listsDetails':\n\t\t\t\t\t//Crear \n\t\t\t\t\t$this->listsDetails();\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'get':\n\t\t\t\t\t//Obtener una Remision\n\t\t\t\t\t$this->getRemision();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'getFolio':\n\t\t\t\t\t$this->getFolio();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\techo $this->json_encode(array('error'=>SERVICIO_INEXISTENTE,'data'=>NULL,'mensaje'=>'Este servicio no está disponible'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA DE SERVICIO INEXISTENTE\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function processApi(){\r\n\t\t\t$service = explode(\"/\", $_GET['x']);\r\n\t\t\t$this->entity = ucfirst($service[0]);\r\n\t\t\t$this->methode = $service[1];\r\n\t\t\t$func = $this->methode.$this->entity;\r\n\t\t\t$this->addLog('--'.$this->methode.$this->entity);\r\n\t\t\tif((int)method_exists($this,$func) > 0)\r\n\t\t\t\t$this->$func();\r\n\t\t\telse\r\n\t\t\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\r\n\t\t\t\t\r\n\t\t}", "function getCacheServices();", "function __construct()\n\t{\n\t\t$this->customerService = new CustomerService;\n\t\tparent::__construct();\n\t}", "private function public_hooks()\n\t{\n\t}", "private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }", "protected static function register() {}", "public function callServiceType ()\n\t\t{\n\t\t\t/* get meta data from META.inf */\n\t\t\t$this->result['meta'] = self::getMetaData ();\n\t\t\tif ( $this->t != null ) {\n\t\t\tif ( strtoupper ( $this->t ) == 'NAME' ){ self::getName ();} \n\t\t\telse if ( strtoupper ( $this->t ) == 'LASTCON' ) { self::getLastConnection (); } \n\t\t\telse if ( strtoupper ( $this->t ) == 'PUBLICIP' ) { self::getIPPublic(); } \n\t\t\telse if ( strtoupper ( $this->t ) == 'PORT' ) { self::getPort (); } \n\t\t\telse if ( strtoupper ( $this->t ) == 'CERT' ) { self::getUserCertExpire ();} \n\t\t\telse if ( strtoupper ( $this->t ) == 'NETMASK' ) { self::getGatewayServer ('netmask');} \n\t\t\telse if ( strtoupper ( $this->t ) == 'GATEWAY' ) { self::getGatewayServer ('gateway'); } \n\t\t\telse if ( strtoupper ( $this->t ) == 'SERVPROCESS' ) { self::getOVPNProcess (); } \n\t\t\telse if ( strtoupper ( $this->t ) == 'ROUTING' ) { self::getRouteInfo (); }\n\t\t\telse if ( strtoupper ( $this->t ) == 'IP' ) { self::getClientIP (); }\n\t\t\telse if ( strtoupper ( $this->t ) == 'STATUS' ) { self::getConnectStatus (); }\n\t\t\telse if ( strtoupper ( $this->t ) == 'SUCCESS' ) { self::pushEvents (\"success\"); }\n\t\t\telse if ( strtoupper ( $this->t ) == 'ERROR' ) { self::pushEvents (\"error\"); }\n\t\t\telse if ( strtoupper ( $this->t ) == 'DSPEVENTS' ) { self::getEvents (); }\n\t\t\telse $this->result['data'] = \"Invalid parameter\"; }\n\n\t\t\treturn self::uniConvert ();\n\t\t}", "protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('translation.loader.csv' => function () {\n return ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->services['translation.loader.csv'] = new \\Symfony\\Component\\Translation\\Loader\\CsvFileLoader()) && false ?: '_'};\n }, 'translation.loader.dat' => function () {\n return ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->services['translation.loader.dat'] = new \\Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader()) && false ?: '_'};\n }, 'translation.loader.ini' => function () {\n return ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->services['translation.loader.ini'] = new \\Symfony\\Component\\Translation\\Loader\\IniFileLoader()) && false ?: '_'};\n }, 'translation.loader.json' => function () {\n return ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->services['translation.loader.json'] = new \\Symfony\\Component\\Translation\\Loader\\JsonFileLoader()) && false ?: '_'};\n }, 'translation.loader.mo' => function () {\n return ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->services['translation.loader.mo'] = new \\Symfony\\Component\\Translation\\Loader\\MoFileLoader()) && false ?: '_'};\n }, 'translation.loader.php' => function () {\n return ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader()) && false ?: '_'};\n }, 'translation.loader.po' => function () {\n return ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader()) && false ?: '_'};\n }, 'translation.loader.qt' => function () {\n return ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->services['translation.loader.qt'] = new \\Symfony\\Component\\Translation\\Loader\\QtFileLoader()) && false ?: '_'};\n }, 'translation.loader.res' => function () {\n return ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->services['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader()) && false ?: '_'};\n }, 'translation.loader.xliff' => function () {\n return ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->services['translation.loader.xliff'] = new \\Symfony\\Component\\Translation\\Loader\\XliffFileLoader()) && false ?: '_'};\n }, 'translation.loader.yml' => function () {\n return ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->services['translation.loader.yml'] = new \\Symfony\\Component\\Translation\\Loader\\YamlFileLoader()) && false ?: '_'};\n })), new \\Symfony\\Component\\Translation\\Formatter\\MessageFormatter(new \\Symfony\\Component\\Translation\\MessageSelector()), 'en', array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yaml', 1 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => ($this->targetDirs[0].'/translations'), 'debug' => true, 'resource_files' => array('af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.af.xlf')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ar.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ar.xlf')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.az.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.az.xlf')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.bg.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.bg.xlf')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ca.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ca.xlf')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.cs.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.cs.xlf')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cy.xlf')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.da.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.da.xlf')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.de.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.de.xlf')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.el.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.el.xlf')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.en.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.en.xlf')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.es.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.es.xlf')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.et.xlf')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.eu.xlf')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fa.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fa.xlf')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fi.xlf')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fr.xlf')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.gl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.gl.xlf')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.he.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.he.xlf')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hr.xlf')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hu.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hu.xlf')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hy.xlf')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.id.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.id.xlf')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.it.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.it.xlf')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ja.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ja.xlf')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lb.xlf')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lt.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lt.xlf')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lv.xlf')), 'mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.mn.xlf')), 'nb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nb.xlf')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nl.xlf')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nn.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.no.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.no.xlf')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pl.xlf')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt.xlf')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_BR.xlf')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ro.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ro.xlf')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ru.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ru.xlf')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sk.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sk.xlf')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sl.xlf')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sq.xlf')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Cyrl.xlf')), 'sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Latn.xlf')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sv.xlf')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.th.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.th.xlf')), 'tl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.tl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tl.xlf')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tr.xlf')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.uk.xlf')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.vi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.vi.xlf')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.zh_CN.xlf')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf')), 'pt_PT' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ua.xlf')))));\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->getConfigCacheFactoryService()) && false ?: '_'});\n $instance->setFallbackLocales(array(0 => 'en'));\n\n return $instance;\n }", "protected function getExtractionServices() {}", "private function __di_init_service_route () {\n $this->route = $this->constant(new GoDiService_Route_Property($this));\n }", "function MostrarPaginaIngresarServicio()\n {\n if ($this->admin) {\n $this->viewservices->ingresarServicio();\n } else {\n header(\"Location: \" . BASE_URL);\n }\n }", "public function mostrarservicios(){\n $mostrarservicios = $this->mostrar();\n require '../inicio/servicios.php';\n }", "public function startServices()\n\t{\n\t\t/** store service connections for use, as needed, by the application */\n\t\t$this->service_connection = array();\n\n\t\t/** store connection messages */\n\t\t$this->message = array();\n\n\t\t/** start services in this sequence */\n\t\t$services = simplexml_load_file(CONFIGURATION_FOLDER . '/Application/services.xml');\n\n\t\tforeach ($services->service as $item) {\n\t\t\t$connectionSucceeded = true;\n\t\t\t$connection = '';\n\n\t\t\t/** class name */\n\t\t\t$entry = (string)$item . 'Service';\n\t\t\t$folder = (string)$item;\n\t\t\t$serviceClass = 'Molajo\\\\Service\\\\Services\\\\' . $folder . '\\\\' . $entry;\n\n\t\t\t/** method name */\n\t\t\t$serviceMethod = 'getInstance';\n\n\t\t\t/** trap errors for missing class or method */\n\t\t\tif (class_exists($serviceClass)) {\n\t\t\t\tif (method_exists($serviceClass, $serviceMethod)) {\n\n\t\t\t\t} else {\n\t\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t\t$connection = $serviceClass . '::' . $serviceMethod . ' Class Method does not exist';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t$connection = $serviceClass . ' Class does not exist';\n\t\t\t}\n\n\t\t\t/** make service connection */\n\t\t\tif ($connectionSucceeded == true) {\n\t\t\t\ttry {\n\t\t\t\t\t$connection = $serviceClass::$serviceMethod();\n\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t\t$connection = 'Fatal Error: ' . $e->getMessage();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/** store connection or error message */\n\t\t\tif ($connectionSucceeded == false) {\n\t\t\t\techo 'service failed for ' . $entry . '<br />';\n\t\t\t}\n\t\t\t$this->set($entry, $connection, $connectionSucceeded);\n\n\t\t}\n\n\t\tforeach ($this->message as $message) {\n\t\t\tServices::Profiler()->set($message, LOG_OUTPUT_SERVICES, VERBOSE);\n\t\t}\n\n\t\treturn true;\n\t}", "public function configureService ()\n {\n $config = $this->app->config('github');\n $this->url = sprintf('https://api.github.com/users/%s/events/public', $config['handle']);\n $this->configureHeaders();\n }", "public function init()\r\n\t{\r\n\t\tif(!$this->_adminService){\r\n\t\t\t$this->_adminService = new Application_Service_Administrator();\r\n\t\t}\r\n\t}", "protected abstract function service(Response $response);", "public function renderServices()\n {\n $this->template->services = $this->projectManager->getServices();\n }", "public function __construct(GifsService $gifsService)\n {\n \n $this->gifsService = $gifsService;\n }", "public function __construct() {\n // extensions, you'll need to inject services using this constructor\n }", "function __construct() {\n\t\t$this->Inject();\n\t}", "protected function loadServices()\n {\n $di = $this->getDI();\n\n // Register the dispatcher setting a Namespace for controllers\n $di->setShared('dispatcher', function () {\n\n\n $dispatcher = new Dispatcher();\n $dispatcher->setDefaultNamespace('Phalcana\\Controllers');\n\n $listener = new Dispatch;\n $events = new Manager();\n $events->attach('dispatch', $listener);\n $dispatcher->setEventsManager($events);\n\n return $dispatcher;\n });\n\n $di->setShared('router', $this->loadRoutes(new Router(false)));\n }", "protected function registered()\n {\n //\n }", "public function services(): ServicesContract;" ]
[ "0.8166007", "0.7823667", "0.7573031", "0.729442", "0.68822557", "0.6762326", "0.6548002", "0.6545137", "0.65385634", "0.6515591", "0.64594483", "0.643159", "0.6401087", "0.63955814", "0.6387503", "0.63802147", "0.636766", "0.63477737", "0.63015497", "0.62818193", "0.62755334", "0.6270784", "0.62658715", "0.6199527", "0.6191985", "0.61776507", "0.61478233", "0.61361885", "0.61338574", "0.6101252", "0.6100861", "0.6095871", "0.6092896", "0.6071875", "0.6053525", "0.60465044", "0.6033907", "0.6031555", "0.60303384", "0.5993471", "0.5990706", "0.59877855", "0.5980757", "0.59803784", "0.5969252", "0.5969064", "0.5948187", "0.5945298", "0.5943069", "0.59352267", "0.5934654", "0.5923495", "0.5918706", "0.59154975", "0.59124297", "0.59086305", "0.5894103", "0.5888734", "0.58876234", "0.58842444", "0.5879647", "0.58679724", "0.58639354", "0.5863405", "0.585836", "0.5856221", "0.58461887", "0.5841034", "0.5834791", "0.58239627", "0.58168375", "0.58097196", "0.58091897", "0.58051807", "0.5802438", "0.58019334", "0.57986844", "0.57958597", "0.57909715", "0.57899886", "0.578273", "0.5781814", "0.57652485", "0.5763655", "0.57588863", "0.5752721", "0.57511246", "0.5750222", "0.57429975", "0.5724115", "0.5724058", "0.57183653", "0.5718135", "0.5717182", "0.5708049", "0.5706801", "0.5700336", "0.5684541", "0.5684174", "0.5678762", "0.5676493" ]
0.0
-1
Compare deux valeurs HMAC
private function compareHMAC($a, $b){ if (!is_string($a) || !is_string($b)) { return false; } $len = strlen($a); if ($len !== strlen($b)) { return false; } $status = 0; for ($i = 0; $i < $len; $i++) { $status |= ord($a[$i]) ^ ord($b[$i]); } return $status === 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verify_webhook($data, $hmac_header)\n{\n $calculated_hmac = base64_encode(hash_hmac('sha256', $data, SHOPIFY_APP_SECRET, true));\n return hash_equals($hmac_header, $calculated_hmac);\n}", "public function testHMAC() {\n\t\t$base_string = 'GET&http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacation.jpg%26oauth_consumer_key%3Ddpf'\n\t\t\t. '43f3p2l4k3l03%26oauth_nonce%3Dkllo9940pd9333jh%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestam'\n\t\t\t. 'p%3D1191242096%26oauth_token%3Dnnch734d00sl2jdk%26oauth_version%3D1.0%26size%3Doriginal';\n\n\t\t// test 1\n\t\t$consumer_secret = 'kd94hf93k423kf44';\n\t\t$token_secret = 'pfkkdhi9sl3r4s00';\n\t\t$signature = Auth_OAuth_SignatureMethod_HMAC_SHA1::signature($base_string, $consumer_secret, $token_secret);\n\t\t$this->assertEquals('tR3+Ty81lMeYAr/Fid0kMTYa/WM=', $signature);\n\t\t$this->assertTrue(Auth_OAuth_SignatureMethod_HMAC_SHA1::verify($base_string, $consumer_secret, $token_secret, $signature));\n\t\t$this->assertFalse(Auth_OAuth_SignatureMethod_HMAC_SHA1::verify($base_string, $consumer_secret, $token_secret, 'foo'));\n\n\t\t// test 2\n\t\t$consumer_secret = 'kd94h+93k%23kf44';\n\t\t$token_secret = 'pfkkdh/9sl3r4&00';\n\t\t$signature = Auth_OAuth_SignatureMethod_HMAC_SHA1::signature($base_string, $consumer_secret, $token_secret);\n\t\t$this->assertEquals('UCASL/lr96TeEnnnkTSTH2dJN40=', $signature);\n\t\t$this->assertTrue(Auth_OAuth_SignatureMethod_HMAC_SHA1::verify($base_string, $consumer_secret, $token_secret, $signature));\n\t\t$this->assertFalse(Auth_OAuth_SignatureMethod_HMAC_SHA1::verify($base_string, $consumer_secret, $token_secret, 'foo'));\n\t}", "public function testHmac(): void\n {\n $hasher = $this->createHasher();\n\n $this->assertEquals(\n '304692bc0cd231dc337107a7964752858a78140e9696b1ffc2e9a646961ed812' .\n 'f890395480b7c2e8650d55c7d0b0bfe4551b5ce52fae0d73ee5e2c0b0609e164',\n $hasher->hmac($this->secret, 'my message')\n );\n\n $this->assertNotEquals(\n '304692bc0cd231dc337107a7964752858a78140e9696b1ffc2e9a646961ed812' .\n 'f890395480b7c2e8650d55c7d0b0bfe4551b5ce52fae0d73ee5e2c0b0609e164',\n $hasher->hmac('foo', 'my message')\n );\n\n $this->assertNotEquals(\n '304692bc0cd231dc337107a7964752858a78140e9696b1ffc2e9a646961ed812' .\n 'f890395480b7c2e8650d55c7d0b0bfe4551b5ce52fae0d73ee5e2c0b0609e164',\n $hasher->hmac($this->secret, 'some other message')\n );\n }", "public function testManualHMAC() {\n\t\t$base_string = 'GET&http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacation.jpg%26oauth_consumer_key%3Ddpf'\n\t\t\t. '43f3p2l4k3l03%26oauth_nonce%3Dkllo9940pd9333jh%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestam'\n\t\t\t. 'p%3D1191242096%26oauth_token%3Dnnch734d00sl2jdk%26oauth_version%3D1.0%26size%3Doriginal';\n\t\t$key = 'kd94hf93k423kf44&pfkkdhi9sl3r4s00';\n\t\t$hmac = HMAC_Test::test_manual_hmac('sha1', $base_string, $key);\n\n\t\t$this->assertEquals('tR3+Ty81lMeYAr/Fid0kMTYa/WM=', base64_encode($hmac));\n\t}", "public function testValidateHmac(): void\n {\n $hasher = $this->createHasher();\n\n $this->assertTrue(\n $hasher->validHmac(\n 'my message',\n '304692bc0cd231dc337107a7964752858a78140e9696b1ffc2e9a646961ed812' .\n 'f890395480b7c2e8650d55c7d0b0bfe4551b5ce52fae0d73ee5e2c0b0609e164',\n $this->secret\n )\n );\n\n $this->assertFalse(\n $hasher->validHmac(\n 'my message',\n '304692bc0cd231dc337107a7964752858a78140e9696b1ffc2e9a646961ed812' .\n 'f890395480b7c2e8650d55c7d0b0bfe4551b5ce52fae0d73ee5e2c0b0609e164',\n 'foo'\n )\n );\n\n $this->assertFalse(\n $hasher->validHmac(\n 'some other message',\n '304692bc0cd231dc337107a7964752858a78140e9696b1ffc2e9a646961ed812' .\n 'f890395480b7c2e8650d55c7d0b0bfe4551b5ce52fae0d73ee5e2c0b0609e164',\n $this->secret\n )\n );\n }", "function check_signature(){\n $nonce = $_GET['nonce'];\n $token = 'hello';\n $timestamp = $_GET['timestamp'];\n $signature = $_GET['signature'];\n $echostr = $_GET['echostr'];\n $arr = array($nonce,$token,$timestamp);\n sort($arr);\n $str = sha1(implode($arr));\n if($str == $signature && $echostr){\n echo $echostr;\n }else{\n response();\n }\n}", "function sloodle_custom_hmac($algo, $data, $key, $raw_output = false)\n {\n $algo = strtolower($algo);\n $pack = 'H'.strlen($algo('test'));\n $size = 64;\n $opad = str_repeat(chr(0x5C), $size);\n $ipad = str_repeat(chr(0x36), $size);\n\n if (strlen($key) > $size) {\n $key = str_pad(pack($pack, $algo($key)), $size, chr(0x00));\n } else {\n $key = str_pad($key, $size, chr(0x00));\n }\n\n for ($i = 0; $i < strlen($key) - 1; $i++) {\n $opad[$i] = $opad[$i] ^ $key[$i];\n $ipad[$i] = $ipad[$i] ^ $key[$i];\n }\n\n $output = $algo($opad.pack($pack, $algo($ipad.$data)));\n\n return ($raw_output) ? pack($pack, $output) : $output;\n }", "public function getHmacKey()\n {\n return $this->getParameter('hmacKey2') ?: $this->getParameter('hmacKey1');\n }", "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n \n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "function salt_hmac($size1=4,$size2=6) {\n$hprand = rand(4,6); $i = 0; $hpass = \"\";\nwhile ($i < $hprand) {\n$hspsrand = rand(1,2);\nif($hspsrand!=1&&$hspsrand!=2) { $hspsrand=1; }\nif($hspsrand==1) { $hpass .= chr(rand(48,57)); }\nif($hspsrand==2) { $hpass .= chr(rand(65,70)); }\n++$i; } return $hpass; }", "public function checkHash()\n {\n $config = $this->getDI()->get('config');\n $connect_string = sprintf('http://%s:%s@%s:%s/', $config->eunod->user, $config->eunod->pass, $config->eunod->host, $config->eunod->port);\n $coind = new jsonRPCClient($connect_string);\n\n return $coind->verifymessage($this->masternode_address, $this->signed_msg, $this->telegram_username);\n }", "public static function hashHmacAlgos()\n {\n if (function_exists('hash_hmac_algos'))\n {\n return (array) \\hash_hmac_algos();\n }\n return self::hashAlgos();\n }", "private function hash_validation() { //check hash\n\n\t\t$testMode = getRequest('ik_pw_via');\n\n\t\tif(isset($testMode) && $testMode == 'test_interkassa_test_xts'){\n\t\t\t$secretKey = $this->object->test_key;\n\t\t} else {\n\t\t\t$secretKey = $this->object->secret_key;\n\t\t}\n\n\t\t$data = array();\n\n\t\tforeach ($_REQUEST as $key => $value) {\n if (!preg_match('/ik_/', $key)) continue;\n $data[$key] = $value;\n }\n\n\t\t$ik_sign = $data['ik_sign'];\n\t\t$sign = $this->createSign($data,$secretKey);\n\n\t\t$this->wrlog(\"hash: \".$sign);\n\t\t$this->wrlog(\"ik_sign: \".$ik_sign);\n\t\treturn $sign == $ik_sign ? true : false;\n\t}", "private function checkSignature()\n {\n\n\n\n if (!defined(\"self::TOKEN\")) {\n throw new \\Exception('TOKEN is not defined!');\n }\n\n $signature = $this->getRequest()->get('signature');\n $timestamp = $this->getRequest()->get('timestamp');\n $nonce = $this->getRequest()->get('nonce');\n\n $token = self::TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n $logger = $this->get('logger');\n $logger->error($signature.'==='.$tmpStr);\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "public function testTokenHashHandling()\n {\n $token = $this->changeMailHelper->getToken();\n $tokenHash1 = $this->changeMailHelper->getTokenHash($token);\n $tokenHash2 = $this->changeMailHelper->getTokenHash($token);\n\n $this->assertEquals($tokenHash1, $tokenHash2, 'Token should be equal.');\n }", "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "private function checkSignature()\n {\n \tif (!defined(\"TOKEN\")) {\n \t\tthrow new Exception('TOKEN is not defined!');\n \t}\n\n \t$signature = $_GET[\"signature\"];\n \t$timestamp = $_GET[\"timestamp\"];\n \t$nonce = $_GET[\"nonce\"];\n\n \t$token = TOKEN;\n \t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n \tsort($tmpArr, SORT_STRING);\n \t$tmpStr = implode( $tmpArr );\n \t$tmpStr = sha1( $tmpStr );\n\n \tif( $tmpStr == $signature ){\n \t\treturn true;\n \t}else{\n \t\treturn false;\n \t}\n }", "protected function hmac($data, $key)\n {\n }", "function hmac_sha1($key, $data)\n{\n if (strlen($key) > 64) {\n $key = str_pad(sha1($key, true), 64, chr(0));\n }\n if (strlen($key) < 64) {\n $key = str_pad($key, 64, chr(0));\n }\n\n // Outter and Inner pad\n $opad = str_repeat(chr(0x5C), 64);\n $ipad = str_repeat(chr(0x36), 64);\n\n // Xor key with opad & ipad\n for ($i = 0; $i < strlen($key); $i++) {\n $opad[$i] = $opad[$i] ^ $key[$i];\n $ipad[$i] = $ipad[$i] ^ $key[$i];\n }\n\n return sha1($opad.sha1($ipad.$data, true));\n}", "function check_api_token($token) {\n /* format (2) : crypt (1) : ccrypt( create_api_token('glynthom', '50') , 'AES-256-OFB', 'en' ) ) */\n\n if (strlen(utf8_decode( $token )) === 60) {\n \n switch (true) {\n case (strlen(utf8_decode( $token )) === 120):\n $token = ccrypt( $token , 'AES-256-OFB', 'de' );\n case (strlen(utf8_decode( $token )) === 60):\n break;\n }\n\n $token = explode(\"-\", $token);\n $token[0] = strlen(utf8_decode( $token[0] ));\n /* name de-crunch, figure out upad length compensation */\n\n switch (true) {\n case ( !isset($token[3]) ):\n case ( !isset($token[1]) ):\n case ( !isset($token[6]) ): \n return 'token is invalid, error';\n break; \n }\n\n switch (true) {\n case ($token[0] === 32): // max user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 30): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' ); \n break;\n case ($token[0] === 28): // user pad \n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' ); \n break;\n case ($token[0] === 26): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' ); \n break;\n case ($token[0] === 24): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 22): // username \n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 20): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' ); \n break;\n case ($token[0] === 18): // user pad \n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 16): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 14): // user pad \n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 12): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' ); \n break;\n case ($token[0] === 10): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' ); \n break;\n case ($token[0] === 8): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 6): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 4): // min user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n }\n\n /* number de-crunch figure out pad length compensation */\n\n /* if ( isset($token[6]) ) { */\n $nlen = strlen(utf8_decode( $token[6] ));\n\n switch (true) {\n case ($nlen === 10): // max 100 000\n $token[5] = ccrypt( $token[5], 'AES-256-OFB', 'de' );\n break;\n case ($nlen === 8): // 10 000 \n $token[5] = ccrypt( $token[5], 'AES-256-OFB', 'de' );\n break;\n case ($nlen === 6): // 1 000 \n $token[5] = ccrypt( $token[5], 'AES-256-OFB', 'de' );\n break;\n case ($nlen === 4): // 100\n $token[5] = ccrypt( $token[5], 'AES-256-OFB', 'de' );\n break;\n case ($nlen === 2): // 50 public access\n $token[5] = ccrypt( $token[5], 'AES-256-OFB', 'de' );\n break;\n\n case ($nlen > 10):\n case ($nlen < 2):\n $token[3] = 'token is '; $token[1] = 'invalid'; $token[5] = 'error';\n break;\n }\n\n } else { $token[3] = 'token is '; $token[1] = 'invalid'; $token[5] = 'error';}\n\n /* final sanity check */\n\n $options = array('options' => array('min_range' => 0));\n\n switch (true) {\n\n case ( !preg_match('/^[A-Za-z0-9_]{1,15}$/', ($token[3] . $token[1]) ) ):\n return 'token is invalid, error';\n break;\n case ( filter_var($token[5], FILTER_VALIDATE_INT, $options) === FALSE ):\n return 'token is invalid, error';\n break;\n\n }\n \n return $token[3] . $token[1] . ',' .$token[5];\n\n}", "public function getHash(): string\n {\n return hash_hmac('sha256', $this->token, Config::SECRET_KEY);\n }", "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n \n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "function hmac_sha1($key, $data)\n{\n if (strlen($key) > 64) {\n $key = str_pad(sha1($key, true), 64, chr(0));\n }\n if (strlen($key) < 64) {\n $key = str_pad($key, 64, chr(0));\n }\n\n // Outter and Inner pad\n $opad = str_repeat(chr(0x5C), 64);\n $ipad = str_repeat(chr(0x36), 64);\n\n // Xor key with opad & ipad\n for ($i = 0; $i < strlen($key); $i++) {\n $opad[$i] = $opad[$i] ^ $key[$i];\n $ipad[$i] = $ipad[$i] ^ $key[$i];\n }\n\n return sha1($opad.sha1($ipad.$data, true));\n}", "function test($test_hash, $refToken)\n{\n $getResp = simpleGet($refToken);\n $metaResp = metaGet($refToken);\n // echo $getResp;\n // echo \"<br>\";\n // echo $metaResp;\n $respEx = explode(\",\", $getResp);\n $metaEx = explode(\",\", $metaResp);\n $hash = substr($respEx[0], 11);\n $capD = substr($respEx[1], 11);\n $cap = rtrim($capD, \"}\");\n $metaExEx = explode(\"\\\"\", $metaEx[1]);\n $time = $metaExEx[7];\n //$date = $getResp[\"X-ALTR-METADATA\"];\n //$cap = rtrim($getResp);\n //$irlcap = strstr(strstr($cap, \"caption\" ), \":\");\n //$toke = ltrim(strstr(strstr($getResp, \"\\\":\"), \" ,\", true), \"\\\":\");\n\n //echo \"<br/><br/>\".$cap.\"<br/><br/>\";\n //echo \"<br/><br/>\".$toke.\"<br/><br/>\";\n //var_dump($getResp);\n\n echo\"<br/><br/>key image: \". $hash ;\n echo\"<br/>new image: \". $test_hash ;\n if ($hash - $test_hash == 0){\n echo \" <br/><h1>this is the same image. <br.> Date of upload: \".$time;\n echo \"</h1><br/><br/><h2>Artist's words:<blockquote></h2>\".$cap.\"</blockquote>\";\n return true;\n }else{\n echo \"<br><br><h1>this isn't the picture the token points to. It's different.</h1>\";\n return false;\n }\n}", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private function getHmac($t_data, $t_finalKey) {\n // Return the HMAC'd hash.\n return hash_hmac($this->hmacAlgo, $t_data, $t_finalKey, TRUE);\n }", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = $this->_token;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function dsq_hmacsha1($data, $key) {\n $blocksize=64;\n $hashfunc='sha1';\n if (strlen($key)>$blocksize)\n $key=pack('H*', $hashfunc($key));\n $key=str_pad($key,$blocksize,chr(0x00));\n $ipad=str_repeat(chr(0x36),$blocksize);\n $opad=str_repeat(chr(0x5c),$blocksize);\n $hmac = pack(\n 'H*',$hashfunc(\n ($key^$opad).pack(\n 'H*',$hashfunc(\n ($key^$ipad).$data\n )\n )\n )\n );\n return bin2hex($hmac);\n}", "private function checkSignature()\n\t{\n\t\tif (!defined(\"TOKEN\")) {\n\t\t\tthrow new Exception('TOKEN is not defined!');\n\t\t}\n\n\t\t$signature = $_GET[\"signature\"];\n\t\t$timestamp = $_GET[\"timestamp\"];\n\t\t$nonce = $_GET[\"nonce\"];\n\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n\t\t// use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getHash() : string {\n\t\t// sha256 = 64 characters\n\t\treturn hash_hmac('sha256', $this->token, getenv('ENCRYPTION_KEY'));\n\t}", "function _hmac_md5($data, $key='') {\n if(extension_loaded('mhash')) \n {\n if($key== '') \n $mhash=mhash(MHASH_MD5,$data);\n else \n $mhash=mhash(MHASH_MD5,$data,$key);\n return $mhash;\n }\n if(!$key) \n return pack('H*',md5($data));\n \n $key = str_pad($key,64,chr(0x00));\n if(strlen($key) > 64) \n $key = pack(\"H*\",md5($key));\n \n $k_ipad = $key ^ str_repeat(chr(0x36), 64) ;\n $k_opad = $key ^ str_repeat(chr(0x5c), 64) ;\n /*** get it recursive. ***/\n $hmac=hmac_md5($k_opad . pack(\"H*\",md5($k_ipad . $data)));\n return $hmac;\n}", "function bwm_hmac($key, $data, $hash = 'md5', $blocksize = 64) {\r\n if (strlen($key)>$blocksize) {\r\n $key = pack('H*', $hash($key));\r\n }\r\n $key = str_pad($key, $blocksize, chr(0));\r\n $ipad = str_repeat(chr(0x36), $blocksize);\r\n $opad = str_repeat(chr(0x5c), $blocksize);\r\n return $hash(($key^$opad) . pack('H*', $hash(($key^$ipad) . $data)));\r\n}", "function validateInterkassaResp($post_in)\n{\n\t$key_to_sort = $post_in;\n\t$ik_co_id = $key_to_sort['ik_co_id'];\n\t$ik_sign = $key_to_sort['ik_sign'];\n\t$ik_am = $key_to_sort['ik_am'];\n\t$ik_inv_st = $key_to_sort['ik_inv_st'];\n\n\t// Forming a digital signature\n\tunset($key_to_sort['ik_sign']);\n\tksort($key_to_sort, SORT_STRING);\n\n\t// Add to the array \"secret key\"\n\tarray_push($key_to_sort, 'XRZxzNbDsQYzsWm2');\n\n\t// Concatenate values ​​by a \":\"\n\t$signString = implode(':', $key_to_sort);\n\n\t// Take the MD5 hash in binary form by\n\t$sign = base64_encode(md5($signString, true));\n\n\t// Validate kassa results\n\tif(\n\t\t$ik_co_id == '5370b755bf4efccb31ad6f90' AND \n\t\t$ik_inv_st == 'success' AND \n\t\t$ik_sign == $sign\n\t)\n\t{\n\t\treturn $ik_am;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "function checkSignature($encodingAesKey,$token,$corpId)\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"msg_signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n $echoStr = $_GET[\"echostr\"]; \n $token = TOKEN;\n $wxcpt = new WXBizMsgCrypt($token, $encodingAesKey, $corpId);\n $errCode = $wxcpt->VerifyURL($signature, $timestamp, $nonce, $echoStr, $sEchoStr);\n if ($errCode == 0) {\n //\n // 验证URL成功,将sEchoStr返回\n //HttpUtils.SetResponce($sEchoStr);\n echo $sEchoStr;\n return true;\n } else {\n print(\"ERR: \" . $errCode . \"\\n\\n\");\n return false;\n }\n }", "function verifyJWT($algo,$token,$key){\n list($headerEncoded,$payloadEncoded,$signatureEncoded) = explode('.',$token);\n if($algo == null){\n $header = Decode::json_degenerator($headerEncoded);\n //var_dump($headerEncoded);\n $algo = json_decode($header);\n if($algo->alg == \"HS256\"){\n $algo = 'sha256';\n }elseif($algo->alg == \"HS384\"){\n $algo = 'sha384';\n }elseif($algo->alg == \"HS512\"){\n $algo = 'sha512';\n }else{\n throw new Exception(\"Undefined \\\"Algorithm used in decoding\\\" type passed, please check if you are passing Array type only. For more, plase refer to the manual.\", 1);\n }\n }\n if($key == null){\n $key = $this->secretkey;\n }\n $receive = $headerEncoded.'.'.$payloadEncoded;\n $rawsignature = hash_hmac($algo,$receive,$key,true);\n $rawsignature = str_replace('=', '', strtr(base64_encode($rawsignature), '+/', '-_'));\n if($rawsignature == $signatureEncoded){\n return true;\n }\n else{\n return false;\n }\n }", "public function checkSignature() {\n\t\tif (! defined ( \"TOKEN\" )) {\n\t\t\tthrow new Exception ( 'TOKEN is not defined!' );\n\t\t}\n\t\t\n\t\t$signature = $_GET [\"signature\"];\n\t\t$timestamp = $_GET [\"timestamp\"];\n\t\t$nonce = $_GET [\"nonce\"];\n\t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array (\n\t\t\t\t$token,\n\t\t\t\t$timestamp,\n\t\t\t\t$nonce \n\t\t);\n\t\t// use SORT_STRING rule\n\t\tsort ( $tmpArr, SORT_STRING );\n\t\t$tmpStr = implode ( $tmpArr );\n\t\t$tmpStr = sha1 ( $tmpStr );\n\t\t\n\t\tif ($tmpStr == $signature) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n // 接收参数\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\n // 把参数 压如数组\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n\n // use SORT_STRING rule\n // 字典序排序\n\t\tsort($tmpArr, SORT_STRING);\n\n // 切割数组\n\t\t$tmpStr = implode( $tmpArr );\n // 哈希加密\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n // 判断 加密后参数 对比 传递来的加密签名\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function checkSignature()\n\t{\n\t\tif (!defined(\"TOKEN\")) {\n\t\t\tthrow new Exception('TOKEN is not defined!');\n\t\t}\n\t\n\t\t$signature = $_GET[\"signature\"];\n\t\t$timestamp = $_GET[\"timestamp\"];\n\t\t$nonce = $_GET[\"nonce\"];\n\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n\t\t// use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function verify () {\n// $aop->alipayrsaPublicKey='MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjUzhXrdJ7GDsgJ59fMLlk7hyYrXkkeGwnYD/eO2HBZh39Y9gTfLJ61Yogc7keOn2uAnZY/zBlw3n+T6mb6/5JYFgvXQi8Qzeh6BkBrNnROu+k4PjhmSbORJFoLrrIxDnsYkQ995kYYhpbS0yf2Al++55v4SrD3/YoVBhWPcRg4xI0QD94FLwhCmcCkft/ILRtUxQk2QeVPLSesvMx2mmUK2L2x2hFA8ewRoGmUdG2Fu9YFIxk//16RI+H7KI8LaoXoVDqHobPae9p0ACE7k9G5vs/cYuikSMKu+lnxghte1jNO+CqrvTP4Pes/mW4e7CEMCTAmEnsXLUrQ6FpfKMcQIDAQAB';\n return $this->aop->rsaCheckV1($_POST, NULL, \"RSA2\");\n }", "private function checkSignature($token)\r\n {\r\n /*if (!defined(\"TOKEN\")) {\r\n throw new Exception('TOKEN is not defined!');\r\n }*/\r\n\r\n $signature = $_GET[\"signature\"];\r\n $timestamp = $_GET[\"timestamp\"];\r\n $nonce = $_GET[\"nonce\"];\r\n\r\n //$token = TOKEN;\r\n $tmpArr = array($token, $timestamp, $nonce);\r\n // use SORT_STRING rule\r\n sort($tmpArr, SORT_STRING);\r\n $tmpStr = implode( $tmpArr );\r\n $tmpStr = sha1( $tmpStr );\r\n\r\n if( $tmpStr == $signature ){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n $logfile = fopen(\"./log/token_log\", \"a\");\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function verifyWebhook($source)\n {\n $hMac_header = $_SERVER['HTTP_X_SHOPIFY_HMAC_SHA256'];\n $data = file_get_contents('php://input');\n $calculated_hMac = base64_encode(hash_hmac('sha256', $data, $this->shopifySecret, true));\n $result = ($hMac_header == $calculated_hMac);\n if (!$result) {\n Log::error(\"ShopifyApi.verifyWebhook is FALSE for $source, hMac_header = $hMac_header,\n Input = $data\");\n }\n return $result;\n }", "function payment_sign($query, $api_key) {\n $clear_text = '';\n ksort($query);\n foreach ($query as $key => $value) {\n if (substr($key, 0, 2) === \"x_\") {\n $clear_text .= $key . $value;\n }\n }\n $hash = hash_hmac(\"sha256\", $clear_text, $api_key);\n return str_replace('-', '', $hash);\n }", "private function amazon_hmac($stringToSign) \n {\n // helper function binsha1 for amazon_hmac (returns binary value of sha1 hash)\n if (!function_exists('binsha1'))\n { \n if (version_compare(phpversion(), \"5.0.0\", \">=\")) { \n function binsha1($d) { return sha1($d, true); }\n } else { \n function binsha1($d) { return pack('H*', sha1($d)); }\n }\n }\n\n global $aws_secret;\n\n if (strlen($aws_secret) == 40)\n $aws_secret = $aws_secret.str_repeat(chr(0), 24);\n\n $ipad = str_repeat(chr(0x36), 64);\n $opad = str_repeat(chr(0x5c), 64);\n\n $hmac = binsha1(($aws_secret^$opad).binsha1(($aws_secret^$ipad).$stringToSign));\n return base64_encode($hmac);\n }", "public function test_generate_key_random()\n {\n $key1 = GuestToken::generate_key();\n $key2 = GuestToken::generate_key();\n $this->assertNotEquals($key1, $key2);\n }", "function sha1_hmac($key, $data, $blockSize = 64, $opad = 0x5c, $ipad = 0x36) {\n\tif (strlen($key) > $blockSize) {\n\t\t$key = sha1($key, true);\n\t}\n\t// Keys shorter than blocksize are right, zero-padded (concatenated)\n\t$key = str_pad($key,$blockSize,chr(0x00),STR_PAD_RIGHT);\n\t$o_key_pad = $i_key_pad = '';\n\tfor($i = 0;$i < $blockSize;$i++) {\n\t\t$o_key_pad .= chr(ord(substr($key, $i, 1)) ^ $opad);\n\t\t$i_key_pad .= chr(ord(substr($key, $i, 1)) ^ $ipad);\n\t}\n\treturn sha1($o_key_pad.sha1($i_key_pad.$data,true));\n}", "function hkdfForHmacSha256($sharedKey, $message) {\n\t\t $hash = hash_hkdf(self::HASHING_ALGORITHM, $sharedKey, self::HASH_CODE_LENGTH, $message);\n\n\t\t return strtr(base64_encode($hash), '+/', '-_');\n }", "private static function calculateSha256Signature($hmacKey, $params)\n {\n $escapeVal = function ($val) {\n return str_replace(':', '\\\\:', str_replace('\\\\', '\\\\\\\\', $val));\n };\n\n // Generate the signing data string\n $signData = implode(\":\", array_map($escapeVal, array_values($params)));\n\n // base64-encode the binary result of the HMAC computation\n $merchantSig = base64_encode(hash_hmac('sha256', $signData, pack(\"H*\", $hmacKey), true));\n\n return $merchantSig;\n }", "private function hash_signature ($data) {\n return hash_hmac('sha256', $data, $this->secret);\n }", "protected function md5_hmac($data, $key)\n\t{\n\t\t$key = str_pad(strlen($key) <= 64 ? $key : pack('H*', md5($key)), 64, chr(0x00));\n\t\treturn md5(($key ^ str_repeat(chr(0x5c), 64)) . pack('H*', md5(($key ^ str_repeat(chr(0x36), 64)) . $data)));\n\t}", "function hmac_md5($key, $data)\n{\n if (strlen($key) > 64) {\n $key = str_pad(sha1($key, true), 64, chr(0));\n }\n if (strlen($key) < 64) {\n $key = str_pad($key, 64, chr(0));\n }\n\n // Outter and Inner pad\n $opad = str_repeat(chr(0x5C), 64);\n $ipad = str_repeat(chr(0x36), 64);\n\n // Xor key with opad & ipad\n for ($i = 0; $i < strlen($key); $i++) {\n $opad[$i] = $opad[$i] ^ $key[$i];\n $ipad[$i] = $ipad[$i] ^ $key[$i];\n }\n print \"md5 of ipad.data: \" . md5($ipad.$data) . \"\\n\";\n print \"md5 of full hash: \" . md5($opad.md5($ipad.$data, true)) . \"\\n\";\n print \"md5 of just opad: \" . md5($opad) . \"\\n\";\n\n return md5($opad.md5($ipad.$data, true));\n}", "public function testValidSignature()\n {\n $authId = key($this->keys);\n $authSecret = reset($this->keys);\n $timestamp = 1432075982;\n\n $headers = [\n 'Content-Type' => 'text/plain',\n 'X-Authorization-Timestamp' => $timestamp,\n 'Authorization' => 'acquia-http-hmac realm=\"Pipet service\",'\n . 'id=\"' . $authId . '\",'\n . 'nonce=\"d1954337-5319-4821-8427-115542e08d10\",'\n . 'version=\"2.0\",'\n . 'headers=\"\",'\n . 'signature=\"MRlPr/Z1WQY2sMthcaEqETRMw4gPYXlPcTpaLWS2gcc=\"',\n ];\n $request = new Request(\n 'GET',\n 'https://example.acquiapipet.net/v1.0/task-status/133?limit=10',\n $headers\n );\n\n $authenticator = new MockRequestAuthenticator(\n new MockKeyLoader($this->keys),\n null,\n $timestamp\n );\n\n $key = $authenticator->authenticate($request);\n\n $this->assertInstanceOf(KeyInterface::class, $key);\n $this->assertEquals($authId, $key->getId());\n $this->assertEquals($authSecret, $key->getSecret());\n }", "function sign($param,$key){\n\n $sign = \"\";\n foreach($param as $k => $v){\n $sign .= $k.\"=\".$v.\"&\";\n }\n\n $sign .= \"key=\".$key;\n $sign = strtoupper(md5($sign));\n return $sign;\n\n}", "private function __check_security($sha1params, $token, $sha1separator = \"#\"){\r\n\t$sha1string = $sha1separator;\r\n\tfor ($i=0;$i<count($sha1params);$i++){\r\n\t $sha1string .= $sha1params[$i].$sha1separator;\r\n\t}\r\n\t$sha1string .= $this->shared_key.$sha1separator;\r\n\t\r\n\tif ($token != sha1($sha1string)){\r\n\t $this->throwXmlError('Unable to Authenticate');\r\n\t}\r\n }", "function HmacMd5($data,$key) \r\n{\r\n # Creates an md5 HMAC. \r\n # Eliminates the need to install mhash to compute a HMAC\r\n # Hacked by Lance Rushing(NOTE: Hacked means written)\r\n \r\n #需要配置环境支持iconv,否则中文参数不能正常处理\r\n $key = iconv(\"GBK\",\"UTF-8\",$key); \r\n $data = iconv(\"GBK\",\"UTF-8\",$data);\r\n \r\n $b = 64; # byte length for md5 \r\n if (strlen($key) > $b) { \r\n $key = pack(\"H*\",md5($key)); \r\n } \r\n $key = str_pad($key, $b, chr(0x00)); \r\n $ipad = str_pad('', $b, chr(0x36)); \r\n $opad = str_pad('', $b, chr(0x5c)); \r\n $k_ipad = $key ^ $ipad ; \r\n $k_opad = $key ^ $opad; \r\n \r\n return md5($k_opad . pack(\"H*\",md5($k_ipad . $data)));\r\n \r\n}", "protected static function verifyHMAC(\n $expected_hmac,\n $message,\n #[\\SensitiveParameter]\n $key\n )\n {\n $message_hmac = \\hash_hmac(Core::HASH_FUNCTION_NAME, $message, $key, true);\n return Core::hashEquals($message_hmac, $expected_hmac);\n }", "function getEncodedSignature($hostName,$digestEncoded,$SS_KEY,$path)\r\n{\r\n $signatureString = \"host: \".$hostName.\"\\n(request-target): post \".$path.\"\\n\".\"digest: SHA-256=\".$digestEncoded.\"\\n\".\"v-c-merchant-id: starlock01\";\r\n $signatureByteString = utf8_encode($signatureString);\r\n $decodeKey = base64_decode($SS_KEY);\r\n $signature = base64_encode(hash_hmac(\"sha256\", $signatureByteString,\r\n $decodeKey, true));\r\n return $signature;\r\n}", "private function validMac(array $payload, $key)\n {\n $mac = hash_hmac('sha256', $payload['iv'] . $payload['str'], $key);\n return $mac == $payload['mac'];\n }", "protected static function hashEquals($a, $b) {\n if (function_exists('hash_equals'))\n return hash_equals($a, $b);\n\n $nonce = openssl_random_pseudo_bytes(32);\n return hash_hmac(self::HASH_ALGORITHM, $a, $nonce) === hash_hmac(self::HASH_ALGORITHM, $b, $nonce);\n }", "protected function hmacsha1($key, $data)\n {\n\treturn base64_encode(hash_hmac('SHA1', $data, $key, true));\n }", "public function hash();", "private function getHmacSize() {\n\t// Make a dummy hash and figure out how big it is.\n\t// Note: there's a different way to do this, but I'm doing\n\t// this way so when the config changes the system can\n\t// dynamically adjust.\n\treturn strlen($this->getHmac(\"X\", $this->getHash(\"Y\")));\n }", "function decode($input, $key = '')\n {\n $key = empty($key) ? config('env.APP_KEY') : $key;\n $charset = hash_hmac('sha256', $key, 'abcdefgopqrsthigklmnuvwxyz');\n\n $head = substr($input, 0, 2);\n $tail = substr($input, -2);\n $encoded = substr($input, 2, -2);\n if(strlen($encoded) % 2 !== 0) return false;\n $encoded = hex2bin($encoded);\n\n $len_str = mb_strlen($encoded);\n while(mb_strlen($charset) < $len_str)\n {\n $charset .= $charset;\n }\n $origin = $encoded ^ $charset;\n\n $mac = hash_hmac('sha256', $origin, $key);\n if($head == substr($mac, 0, 2) and $tail == substr($mac, -2))\n {\n return $origin;\n }\n else\n {\n return false;\n }\n }", "function DiferentKeys($keys_home, $keys_sync) {\r\n \tif (count($keys_home) != count($keys_sync)) {\r\n \treturn true;\r\n }\r\n\r\n for ($i = 0; $i < count($keys_home); $i++) {\r\n \tif ($keys_home[$i] != $keys_sync[$i]) {\r\n \treturn true;\r\n }\r\n }\r\n\r\n return false;\r\n }", "function setSig() {\n if (sfConfig::get(\"sf_private_key\") !='') {\n \n $hash = md5(rand_str());\n $this -> context ->getLogger()->debug(\"{Theater Token Class} HASH:: \".$hash);\n putLog(\"USER:: \".$this -> sessionVar(\"user_id\").\" | MESSAGE:: TOKEN HASH:: \".$hash);\n \n $expires = strtotime(now());\n $this -> context ->getLogger()->debug(\"{Theater Token Class} EXPIRES:: \".$expires);\n putLog(\"USER:: \".$this -> sessionVar(\"user_id\").\" | MESSAGE:: TOKEN EXPIRES:: \".$expires);\n \n $code = setUserOrderTicket();\n $this -> seat -> setAudienceHmacKey( $code );\n $this -> seat -> save();\n $this -> context ->getLogger()->debug(\"{Theater Token Class} CODE:: \".$code);\n putLog(\"USER:: \".$this -> sessionVar(\"user_id\").\" | MESSAGE:: TOKEN CODE:: \".$code);\n \n /*\n\t\t\t$enc_date = encryptCookie($code, $hash.\"=\".strtotime(now()));\n $this -> context ->getLogger()->debug(\"{Theater Token Class} HMAC_SIG:: \".$enc_date);\n putLog(\"USER:: \".$this -> sessionVar(\"user_id\").\" - TOKEN HMAC_SIG:: \".$enc_date);\n \n $this -> token_raw = $hash . \"|\" . strtotime(now()) . \"|\" . $enc_date;\n $this -> context ->getLogger()->debug(\"{Theater Token Class} Set Token:: \".$this -> token_raw);\n putLog(\"USER:: \".$this -> sessionVar(\"user_id\").\" - TOKEN RAW:: \".$this -> token_raw);\n \n $this -> token = encryptCookie($code,$this -> token_raw);\n $this -> context ->getLogger()->debug(\"{Theater Token Class} Set Coookie:: \".$this -> token);\n putLog(\"USER:: \".$this -> sessionVar(\"user_id\").\" - SET COOKIE:: \".$this -> token);\n */\n \n $this -> setCookieVar( \"csth\", $code, 7 );\n return $this -> token;\n \n }\n \n }", "static function controlHash($mixed){\n\t\t$data = json_encode($mixed);\n\t\tif(json_last_error()!=JSON_ERROR_NONE) $data = $mixed;\n\t\treturn sha1(md5($data).APP_CONTROL_SECRET);\n\t}", "function hash_equals ($a, $b) {\n\t\t$a_length = strlen($a);\n\t\tif ($a_length !== strlen($b)) { return false; }\n\n\t\t$result = 0;\n\t\tfor ($i = 0; $i < $a_length; $i++) {\n\t\t\t$result |= ord($a[$i]) ^ ord($b[$i]);\n\t\t}\n\n\t\treturn $result === 0;\n\t}", "function hookGenerate($hook){\r\n return 'ig_sig_key_version=4&signed_body=' . hash_hmac('sha256', $hook, '5bd86df31dc496a3a9fddb751515cc7602bdad357d085ac3c5531e18384068b4') . '.' . urlencode($hook);\r\n}", "function onesignin_client_hash($data) {\n if (is_array($data)) {\n $data = implode(':', $data);\n }\n $hash = base64_encode(hash('sha512', $data, TRUE));\n return strtr($hash, array('+' => '-', '/' => '_', '=' => ''));\n}", "protected function hmac($data, $key)\n {\n if (function_exists('hash_hmac')) {\n return hash_hmac('md5', $data, $key);\n }\n\n // The following borrowed from\n // http://php.net/manual/en/function.mhash.php#27225\n\n // RFC 2104 HMAC implementation for php.\n // Creates an md5 HMAC.\n // Eliminates the need to install mhash to compute a HMAC\n // by Lance Rushing\n\n $bytelen = 64; // byte length for md5\n if (strlen($key) > $bytelen) {\n $key = pack('H*', md5($key));\n }\n $key = str_pad($key, $bytelen, chr(0x00));\n $ipad = str_pad('', $bytelen, chr(0x36));\n $opad = str_pad('', $bytelen, chr(0x5c));\n $k_ipad = $key ^ $ipad;\n $k_opad = $key ^ $opad;\n\n return md5($k_opad . pack('H*', md5($k_ipad . $data)));\n }", "public function ChecksigVectors()\n {\n $ec = EcAdapterFactory::getAdapter(new Math(), EccFactory::getSecgCurves()->generator256k1());\n $privateKey = PrivateKeyFactory::fromHex('4141414141414141414141414141414141414141414141414141414141414141', false, $ec);\n\n $standard = ScriptFactory::defaultFlags();\n\n $vectors = [];\n\n // Pay to pubkey hash that succeeds\n $s0 = ScriptFactory::scriptPubKey()->payToPubKeyHash($privateKey->getPublicKey());\n $vectors[] = [\n true,\n $ec,\n $standard, // flags\n $privateKey, // privKey\n $s0,\n null, // redeemscript,\n ];\n\n // Pay to pubkey that succeeds\n $s1 = ScriptFactory::create()->push($privateKey->getPublicKey()->getBuffer())->op('OP_CHECKSIG')->getScript();\n $vectors[] = [\n true,\n $ec,\n $standard, // flags\n $privateKey, // privKey\n $s1,\n null, // redeemscript\n ];\n\n $rs = ScriptFactory::p2sh()->multisig(1, [$privateKey->getPublicKey()]);\n $vectors[] = [\n true,\n $ec,\n InterpreterInterface::VERIFY_P2SH |\n InterpreterInterface::VERIFY_WITNESS |\n InterpreterInterface::VERIFY_CLEAN_STACK\n ,\n $privateKey,\n $rs->getOutputScript(),\n $rs\n ];\n\n return $vectors;\n }", "public function testIsEncoded()\n {\n $array = $this->getDummyHmacData();\n\n $this->assertFalse($this->entity->isEncoded());\n\n $this->entity->setHmac($array['hmac']);\n\n $this->assertTrue($this->entity->isEncoded());\n }", "function createHmacAuth($method, $path, $timestamp) {\n\tglobal $key, $secret;\n\t$str = $method . ' ' . $path . $timestamp;\n\t$hash = hash_hmac('sha1', $str, $secret);\n\treturn $key . ':' . $hash;\n}", "private function hashing() {\n\t\t$data = md5($this->name.$this->date);\n\t\t$data = md5($data);\n\t\t$data = strrev($data);\n\t\t//$data = md5($data);\n\t\t$data = strtoupper($data);\n\t\t//$data = strrev($data);\n\n\t\t$datatemp = NULL;\n\t\tfor($i=0; $i<=strlen($data); $i++) {\n\t\t\t$arr = substr($data, $i, 1);\n\t\t\tif($i == '4' || $i == '8' || $i == '12' || $i == '16' || $i == '20' || $i == '24' || $i == '28' || $i == '32') {\n\t\t\t\t$datatemp .= substr($this->strfinger, ($i/4)-1, 1);\t\n\t\t\t}\n\t\t\t$datatemp .= \"/%\".$this->combine[$arr];\n\t\t}\n\n\t\t$this->resulthashcode = substr($datatemp, 1, strlen($datatemp)-6);\n\t\t$this->result = true;\n\t}", "protected function getDummyHmacData()\n {\n $array = [];\n $array['data'] = substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, 30);\n $array['key'] = hash('sha512', rand(1000, 100000));\n $array['time'] = time();\n\n //doesn't really matter about it only being a random string, this is only a test!\n $array['hmac'] = hash('sha512', rand(1000, 100000));\n\n return $array;\n }", "public static function getHash($algoritmo,$data,$key){\n $hash= hash_init($algoritmo,HASH_HMAC,$key);\n hash_update($hash,$data);\n return hash_final($hash);\n }", "public function hashAlgo(\n\t\tstring\t$token, \n\t\tstring\t$default, \n\t\tbool\t$hmac\t\t= false \n\t) : string {\n\t\tstatic $algos\t= [];\n\t\t$t\t\t= $token . ( string ) $hmac;\n\t\tif ( isset( $algos[$t] ) ) {\n\t\t\treturn $algos[$t];\n\t\t}\n\t\t\n\t\t$ht\t\t= $this->setting( $token ) ?? $default;\n\t\t\n\t\t$algos[$t]\t= \n\t\t\t\\in_array( $ht, \n\t\t\t\t( $hmac ? \\hash_hmac_algos() : \\hash_algos() ) \n\t\t\t) ? $ht : $default;\n\t\t\t\n\t\treturn $algos[$t];\t\n\t}", "function f2($a){\n\n $b=hash('sha256',$a);\n\n return $b;\n\n\n\n }", "public function testHandshake2()\n {\n // https://tools.ietf.org/html/draft-josefsson-tls-curve25519-02\n\n // The values in that document use little-endian representation.\n $d_A = strrev(pack('H*', '5AC99F33632E5A768DE7E81BF854C27C46E3FBF2ABBACD29EC4AFF517369C660'));\n $d_B = strrev(pack('H*', '47DC3D214174820E1154B49BC6CDB2ABD45EE95817055D255AA35831B70D3260'));\n $x_A = strrev(pack('H*', '057E23EA9F1CBE8A27168F6E696A791DE61DD3AF7ACD4EEACC6E7BA514FDA863'));\n $x_B = strrev(pack('H*', '6EB89DA91989AE37C7EAC7618D9E5C4951DBA1D73C285AE1CD26A855020EEF04'));\n $x_S = strrev(pack('H*', '61450CD98E36016B58776A897A9F0AEF738B99F09468B8D6B8511184D53494AB'));\n\n // Public key computation.\n $this->assertSame($x_A, $this->curve->getPublic($d_A));\n $this->assertSame($x_B, $this->curve->getPublic($d_B));\n\n // Shared secret computation.\n $this->assertSame($x_S, $this->curve->getShared($d_A, $x_B));\n $this->assertSame($x_S, $this->curve->getShared($d_B, $x_A));\n }", "function androidHashCheck($paramString,$androidCrypt){\r\n\t\t$salt = 0;\r\n\r\n\t\tforeach($paramString as $string) {\r\n\t\t\t$encryptString .= $string; //concatenate all strings in array\r\n\t\t\tfor($i=0;$i<strlen($string);$i++) {\r\n\t\t\t\tif($i%2==0)\t// only find sum of every other character's ascii value\r\n\t\t\t\t\t$salt += ord($string[$i]);\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t$salt *= 97;\r\n\t\t$salt = strval($salt).\"z\";\r\n\t\t//echo $salt.\" \";\r\n\t\t$encryptString .= $salt;\r\n\t\t$encryptString = md5($encryptString);\r\n\t\t//echo $encryptString;\r\n\t\tif($encryptString == $androidCrypt) \r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\t\r\n\t}", "public function supportedAlgorithms()\n {\n return array_map(function($value){\n return [$value];\n }, hash_hmac_algos());\n }", "private function checkSignature($signature,$timestamp,$nonce)\n {\n $token = Yii::$app->params['wechat']['token'];\n if (!$token) {\n echo 'TOKEN is not defined!';\n } else {\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }\n }", "public function validateWebhook(Request $request)\n {\n $calculatedHmac = base64_encode(hash_hmac('sha256', $request->getContent(), $this->shopifyApiSecret, true));\n return hash_equals($request->headers->get('X-Shopify-Hmac-SHA256'), $calculatedHmac);\n }", "function send_enc_output($out)\n{ $a = json_encode($out);\n $rand = rand(10000, 99999);\n $rand2 = rand(1, 4);\n $rand = $rand2 . $rand;\n $rand_key = substr($rand, $rand2, 2);\n $ekey = \"!@#%^&\" . substr($_SESSION['gCCAppKey'], 4, 5) . \"gpl\" . $rand_key;\n //$ekey = \"gplCC\" . substr($_SESSION['gCCAppKey'], 9, 5) . \"!@#%^&\";\n $hex = dechex($rand);\n $resp = strlen($hex) . $hex . gPlexEncryption::AESEncrypt($a, $ekey, '12gPlex:gCC!@#12');\n //file_put_contents('log/resp_'.time().'.txt', $ekey . ' || ' . '12gPlex:gCC!@#12' . ' || ' . $a . ' || '.$resp);\n echo $resp;\n exit;\n}", "function HmacMd5($data, $key) {\n// Creates an md5 HMAC.\n// Eliminates the need to install mhash to compute a HMAC\n// Hacked by Lance Rushing(NOTE: Hacked means written)\n//需要配置环境支持iconv,否则中文参数不能正常处理\n $key = iconv(\"GB2312\", \"UTF-8\", $key);\n $data = iconv(\"GB2312\", \"UTF-8\", $data);\n\n $b = 64; // byte length for md5\n if (strlen($key) > $b) {\n $key = pack(\"H*\", md5($key));\n }\n $key = str_pad($key, $b, chr(0x00));\n $ipad = str_pad('', $b, chr(0x36));\n $opad = str_pad('', $b, chr(0x5c));\n $k_ipad = $key ^ $ipad;\n $k_opad = $key ^ $opad;\n\n return md5($k_opad . pack(\"H*\", md5($k_ipad . $data)));\n}", "function api_sig($rtm_method,$args = array())\n\t{\n\t\t$args['api_key'] = $this->apikey;\n\t\tif ($rtm_method) {\n\t\t\t$args['method'] = 'rtm.'.$rtm_method;\n\t\t}\n\t\tksort($args);\n\t\t$api_sig = $this->secret;\n\t\tforeach ($args as $key => $value) {\n\t\t\t$api_sig .= $key.$value;\n\t\t}\n\t\t\n\t\treturn $api_sig;\n\t}", "function evhash( $data, ?string $secretkey = null, string $algo = 'sha256' ): string\n{\n if ( \\is_null( $secretkey ) ) {\n return hash_hmac( $algo, $data, env( 'SECURE_AUTH_KEY' ) );\n }\n\n return hash_hmac( $algo, $data, $secretkey );\n}", "public function validateSignature(array $request)\n {\n $this->assertRequestParamIsNotNull(\n $request, 'hmac', 'Expected signature in query params'\n );\n\n $hmac = $request['hmac'];\n\n return $this->generateSignature($request, '&') === $hmac;\n }", "abstract public function nonce_check();", "private function checkSignature($signature,$timestamp,$nonce)\n {\n $token = Yii::$app->params['wechat']['token'];\n if (!$token) {\n echo 'TOKEN is not defined!';\n } else {\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n \n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }\n }", "function verifiyToken($username, $token) {\n $SECRET_KEY = 'Med1a_Cube$Even7';\n $splittedToken = split(\":\", $token);\n $token = $splittedToken[0];\n $timestamp = $splittedToken[1];\n\n $hash = sha1($username . $SECRET_KEY . $timestamp);\n $deltaTime = time() - $timestamp;\n\n if($deltaTime < 60 && $hash == $timestamp) {\n return true;\n }\n\n return false;\n}", "function sloodle_signature($data) {\n \tglobal $CFG;\n\n $salt = '';\n if ( isset($CFG->sloodle_signature_salt) && ($CFG->sloodle_signature_salt != '' ) ) {\n $salt = $CFG->sloodle_signature_salt;\n } else {\n $salt = random_string(40);\n set_config('sloodle_signature_salt', $salt);\n }\n\n if (function_exists('hash_hmac')) {\n return hash_hmac('sha256', $data, $salt);\n }\n return sloodle_custom_hmac('sha1', $data, $salt);\n }", "public function testRequestSigning() {\n\t\t$signer = new Auth_OAuth_Signer();\n\n\t\t// test 1\n\t\t$params = array('file'=>'vacation.jpg', 'size'=>'original', 'oauth_version'=>'1.0',\n\t\t\t\t\t'oauth_consumer_key'=>'dpf43f3p2l4k3l03', 'oauth_token'=>'nnch734d00sl2jdk',\n\t\t\t\t\t'oauth_timestamp'=>'1191242096', 'oauth_nonce'=>'kllo9940pd9333jh');\n\t\tself::build_request('GET', 'http://photos.example.net/photos', $params);\n\t\t$request = Auth_OAuth_RequestImpl::fromRequest();\n\t\t$server = new Auth_OAuth_Store_ServerImpl('key', 'kd94hf93k423kf44');\n\t\t$server->setSignatureMethods( array('PLAINTEXT', 'HMAC-SHA1') );\n\t\t$token = new Auth_OAuth_TokenImpl('token', 'pfkkdhi9sl3r4s00', 'key', 'access');\n\n\t\t$signer->sign($request, $server, $token);\n\t\t$this->assertEquals('PLAINTEXT', $request->getSignatureMethod());\n\t\t$this->assertEquals('kd94hf93k423kf44&pfkkdhi9sl3r4s00', $request->getSignature());\n\n\n\t\t// test 2\n\t\t$params = array('file'=>'vacation.jpg', 'size'=>'original', 'oauth_version'=>'1.0',\n\t\t\t\t\t'oauth_consumer_key'=>'dpf43f3p2l4k3l03', 'oauth_token'=>'nnch734d00sl2jdk',\n\t\t\t\t\t'oauth_timestamp'=>'1191242096', 'oauth_nonce'=>'kllo9940pd9333jh');\n\t\tself::build_request('GET', 'http://photos.example.net/photos', $params);\n\t\t$request = Auth_OAuth_RequestImpl::fromRequest();\n\t\t$server = new Auth_OAuth_Store_ServerImpl('key', 'kd94hf93k423kf44');\n\t\t$server->setSignatureMethods( array( 'INVALID-METHOD', 'HMAC-SHA1', 'PLAINTEXT') );\n\t\t$token = new Auth_OAuth_TokenImpl('token', 'pfkkdhi9sl3r4s00', 'key', 'access');\n\n\t\t$signer->sign($request, $server, $token);\n\t\t$this->assertEquals('HMAC-SHA1', $request->getSignatureMethod());\n\t\t$this->assertEquals('tR3+Ty81lMeYAr/Fid0kMTYa/WM=', $signer->getSignature($request, $server, $token));\n\t}", "private function getSignature()\n\t{\n\t\t$string_to_sign = mb_convert_encoding(\n\t\t\t$this->http_verb . $this->uri . $this->timestamp . $this->nonce,\n\t\t\t'UTF-8'\n\t\t);\n\t\treturn base64_encode(\n\t\t\thash_hmac(\n\t\t\t\t'sha1',\n\t\t\t\t$string_to_sign,\n\t\t\t\t$this->secret,\n\t\t\t\ttrue\n\t\t\t)\n\t\t);\n\t}", "public function testHashSecret()\n {\n $this->assertEquals(\n 'HASHYsecretyThang',\n $this->gateway->getHashSecret()\n );\n }", "public function doCertificateRequestCompare()\n {\n\n $isMatch = ($this->getCertificateHash() === $this->getCertificateRequestHash());\n\n $this->setMatch($isMatch);\n }", "public function mefSignature() {\r\n\t$encoded_header = base64_encode('{\"alg\": \"HS512\",\"typ\": \"JWT\"}');\r\n\t$iss = 'CISCAR';\r\n\tif(isset($_GET['annuaire']) && $_GET['annuaire'] == 2 )\r\n\t{\r\n\t\t\t$iss = 'GCR';\r\n\t}\r\n\t// base64 encodes the payload json\r\n\t$encoded_payload = base64_encode('{\r\n\t\t\t\"iat\": \"'.time().'\",\r\n\t\t\t\"iss\": \"'.$iss.'\",\r\n\t\t\t\"aud\": \"https://boxstva-client.stva.com\",\r\n\t\t\t\"sub\": \"'.$this->getIndividuID().'\",\r\n\t\t\t\"family_name\": \"'.utf8_encode($this->getNom()).'\",\r\n\t\t\t\"given_name\": \"'.utf8_encode($this->getPrenom()).'\",\r\n\t\t\t\"ordering_party\": \"'.$this->getRolePrinc().'\",\r\n\t\t\t\"entities\": \"'.$this->getRattachements().'\"\r\n\t\t}');\r\n\t\r\n\t// base64 strings are concatenated to one that looks like this\r\n\t$header_payload = $encoded_header . '.' . $encoded_payload;\r\n\t\r\n\t//Setting the secret key environnement de Pre-PROD\r\n\t//\"aud\": \"http://box-gcr-pp.stva.com.s3-website-eu-west-1.amazonaws.com\",\r\n\t//$secret_key = '+XgiH7AFTCCUSbuFyMiqYThoStVW7etx32VRhSAKvCrqZPK2rZ4r1gtXoBlZHEismbALi8KKdmdRd3MnoH/19nfwIOV0+tX8blaUy/cQLxCQmfL8BlWuDutdegs72js2zvGpbS1YxXgjWhd4RjsVPn0HSL7q3EBJBORwAELOpI4GZuqSCn1n/R/veZiq7giAv7Gxi+J1A+EOTXtOzZSiQa/tYvcm6xaPTNPzP9HdgxAeKMN4FV44dG+Q66wD14WYOBAo1IPHKvAdWSS53uwRVAb7HDDfflVLcib851LG7fLC6JXaUmdK0iTEU3qJV32wzlF5phax9t16GdJfmCqAxJDMHx0iIVtZYajZPHnPYzXoHHCSilHmPoPZZkmKjlC12L1m87QKVySqP9K3J9fORW+Tn3QIkIcvl+GA4vqomk7/eVP8NT9MwIOvV9pjMJl+cGIoIYYQZmqQ3+Pa7d1NjV0bx6I9WlJNAKYxC5zFvVzqlx5j/H5Wq91WLOrZZNGaE/kygrLmyCYWQiCNzNbwvEsAgCPUgGy0o9o2itVEL4zwzRWPrNDp4fivhMA87QzbzFkDvX9B6PBb1R/3EFy1uSAk22ovyK/fMmN6GRTNeDQdGRi/U64Ys9mA+UjzBi22gy8ZIgFfcnCfJIinMO5PCh2BJ2AQq3kKxe4AMEQmeno=';\r\n\r\n\t//Setting the secret key environnement de PRODUCTION\r\n\t//\"aud\": \"https://boxstva-client.stva.com\",\r\n\t$secret_key = 'Rn2ZvoU+dTOtpE/BOUEuMaf65G2l7lA1nDJV56hmLcl17Y6F2EPCSIrKRCCVWc/Zda7m5Bp/g9BYUIRVTvgmtlcghGRBtswGFwMjq0Ye4QVtmpa8qZBI0sTHGjnbwTvmqZmf1v2TAcJWsAIJsRcoX0IchGvhaEKUMnLAXAUQT4mBhSdUY7H/ZckUthciFveKtxvmKMfjOLJNqciD8fVapuzQBqSRzFhTifVceLG1EmouRnoE5vg3RERwEhpVqFmt0fo+VCOinAR0nHG5Nq0XWXUTmGGsbOcDljLxz+oLAN28cffMc+6OfxkRX3L5ILId3pHMvV+MJns9FCZSA6+u87s3K31fLARCvVP6aVXXRn+M6CGBLxjQtbGopeQCHBRaliNxGr5LJIAkLFusBeG7jqIpGToxqy+D87tiYrg1zG2iRFTkKtvMJRZxdEkCnwJx4jOmuVboKCdtAqCQNX9e4I6jKp+Gs8edSbbV+17TY422DqV+sOXIxMA6udZ1vWm9eDE25dVVoRfiQXC7U/BLEGkV3ocs5du15nD1+NEODqlrVW+2WceQ1yQcSF4hRsU7Wk1pJ+aMRvFkx6PV028nSLExxTTPkxw07BmmDU5W9E6KbLB1/NFtseSyzgxTacGlFEVxmS+Zq846NLcNTrwQuM15Bub4zAy1N8Qv2NeQs4I=';\r\n\t\r\n\t// Creating the signature, a hash with the s512 algorithm and the secret key. The signature is also base64 encoded.\r\n\t$signature = base64_encode(hash_hmac('sha512', $header_payload, $secret_key, true));\r\n\t//$signature = hash_hmac('sha512', $header_payload, $secret_key, true);\r\n\t\r\n\t// Creating the JWT token by concatenating the signature with the header and payload, that looks like this:\r\n\t$jwt_token = $header_payload . '.' . $signature;\r\n\t\r\n\t//listing the resulted JWT\r\n\t//echo $jwt_token;\r\n\t//print $jwt_token;\r\n\treturn $jwt_token;\r\n\t\r\n\t//$decoded_jwt = explode(\".\",$jwt_token);\r\n\t//$decoded_header = base64_decode($decoded_jwt[0]);\r\n\t//$decoded_payload = base64_decode($decoded_jwt[1]);\r\n\t//$decoded_signature = base64_decode($decoded_jwt[2]);\r\n\t//echo $decoded_signature;\r\n\t\r\n\t//die();\r\n\r\n\r\n//\t\t$data = 'my data';\r\n\t\t\r\n//\t\t//Crée une nouvelle clé privée et publique\r\n//\t\t$new_key_pair = openssl_pkey_new(array(\r\n//\t\t\t\t\"private_key_bits\" => 1024,\r\n//\t\t\t\t\"private_key_type\" => OPENSSL_KEYTYPE_RSA,\r\n//\t\t));\r\n//\t\topenssl_pkey_export($new_key_pair, $private_key_pem);\r\n\t\t\r\n//\t\t$details = openssl_pkey_get_details($new_key_pair);\r\n//\t\t$public_key_pem = $details['key'];\r\n\t\t\r\n//\t\t//Création de la signature\r\n//\t\topenssl_sign($data, $signature, $private_key_pem, OPENSSL_ALGO_SHA1);\r\n\t\t\r\n//\t\t//Sauvegarde pour utilisation ultérieur\r\n//\t\tfile_put_contents('private_key.pem', $private_key_pem);\r\n//\t\tfile_put_contents('public_key.pem', $public_key_pem);\r\n//\t\tfile_put_contents('signature.dat', $signature);\r\n//\t\tprint $private_key_pem;\r\n//\t\t//Vérification de la signature\r\n//\t\t$r = openssl_verify($data, $signature, $public_key_pem, \"sha1WithRSAEncryption\");\r\n//\t\tvar_dump($r);\r\n\t}" ]
[ "0.6637877", "0.65675014", "0.6541337", "0.64355534", "0.64083177", "0.62488174", "0.6171402", "0.61219627", "0.60254097", "0.58803296", "0.58696693", "0.58433634", "0.58060634", "0.57296246", "0.57135576", "0.5684822", "0.56719047", "0.5671174", "0.5630208", "0.56262827", "0.56253725", "0.5620772", "0.560194", "0.5591664", "0.5584559", "0.55787814", "0.5577959", "0.5571746", "0.55605036", "0.5545577", "0.5545577", "0.5545577", "0.551485", "0.5507086", "0.5497567", "0.54840803", "0.5483229", "0.5481452", "0.5458876", "0.5450892", "0.5446496", "0.5438682", "0.5430638", "0.54257965", "0.542308", "0.5417886", "0.54027426", "0.5399166", "0.53847164", "0.53765345", "0.5363879", "0.53632694", "0.5359462", "0.5355371", "0.53547263", "0.52739054", "0.52542555", "0.5243449", "0.523549", "0.5233285", "0.5220125", "0.52148575", "0.5199194", "0.51762587", "0.51737976", "0.51717186", "0.5168977", "0.5166257", "0.51578736", "0.5152427", "0.5149152", "0.51432097", "0.5142393", "0.51417917", "0.5141596", "0.5140567", "0.5130131", "0.51273924", "0.51241285", "0.5112777", "0.5107678", "0.5103588", "0.51006025", "0.5056499", "0.50448066", "0.5037425", "0.50318444", "0.5016323", "0.5014881", "0.5008219", "0.5005328", "0.5001537", "0.49994338", "0.49993336", "0.49900404", "0.4986491", "0.49860272", "0.4983647", "0.4969886", "0.4963243" ]
0.7421382
0
Display a listing of the resource.
public function index() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $categoria=Categoria::all(); $sea=$request->input('search'); // SI ENCUNTRA UNA COINCIDENCIA CON LO BUSCADO $contador=0; $foroLike=Foros::where('titulo','like','%'.$sea.'%')->get(); foreach ($foroLike as $f) { $tit=$f->titulo; $idForo=$f->id; $foroB=$f; $contador++; } if($contador>0){ $users= DB::table('Foros') ->join('foros_user', 'Foros.id', '=', 'foros_user.foros_id') ->join('users', 'users.id', '=', 'foros_user.user_id') ->where('Foros.id','=', $idForo) ->select('mensaje','name','foros_user.created_at') ->get(); return view("admin.foro.listaForos",compact("foroLike","users","categoria" )); }else{ $NingunResultado='No se encontraron foros con ese nombre'; return view("admin.foro.foro",compact("NingunResultado","categoria" )); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "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
Create a new controller instance.
public function __construct(Request $request, Users $user) { $this->middleware('guest', ['except' => 'logout']); $this->user = $user; $this->request = $request; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Show the application's login form.
public function showLoginForm() { $view = 'cscms::frontend.default.auth.login'; if (View::exists(config('cscms.coderstudios.theme').'.auth.login')) { $view = config('cscms.coderstudios.theme').'.auth.login'; } return view($view); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showLogin()\n\t{\n\t\t// show the form\n\t \treturn View::make('login');\n\t}", "private function formLogin(){\n\t\tView::show(\"user/login\");\n\t}", "public function showLoginForm()\n\t{\n\t\treturn view('auth.login');\n\t}", "public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}", "public function showLoginForm()\n {\n $this->data['title'] = trans('backpack::base.login'); // set the page title\n\n return view('backpack::auth.login', $this->data);\n }", "public function showLoginForm()\n\t{\n\t\t// Remembering Login\n\t\tif (auth()->viaRemember()) {\n\t\t\treturn redirect()->intended($this->redirectTo);\n\t\t}\n\t\t\n\t\t// Meta Tags\n\t\tMetaTag::set('title', getMetaTag('title', 'login'));\n\t\tMetaTag::set('description', strip_tags(getMetaTag('description', 'login')));\n\t\tMetaTag::set('keywords', getMetaTag('keywords', 'login'));\n\t\t\n\t\treturn appView('auth.login');\n\t}", "public function showLoginForm()\n {\n\n /** set session refferrer */\n $this->setPreviousUrl();\n\n /** @var String $title */\n $this->title = __(\"admin.pages_login_title\");\n /** @var String $content */\n $this->template = 'Admin::Auth.login';\n\n /**render output*/\n return $this->renderOutput();\n }", "public function getShowLoginPage()\n {\n echo $this->blade->render(\"login\", [\n 'signer' => $this->signer,\n ]);\n }", "public function showLoginForm()\n {\n return view('hub::auth.login');\n }", "public function showLoginForm()\n {\n return view('ui.pages.login');\n }", "public function _showForm()\n\t{\n\t\t$this->registry->output->setTitle( \"Log In\" );\n\t\t$this->registry->output->setNextAction( 'index&do=login' );\n\t\t$this->registry->output->addContent( $this->registry->legacy->fetchLogInForm() );\n\t\t$this->registry->output->sendOutput();\n\t\texit();\n\t}", "public function showLoginForm()\n {\n return view('adminlte::auth.login');\n }", "public function showLoginForm()\n {\n $this->data['title'] = trans('back-project::base.login'); // set the page title\n return view('back-project::auth.login', $this->data);\n }", "public function showForm()\n\t{\n echo view($this->config->views['login']);\n\t}", "public function showLoginForm()\n {\n return view('blog::admin.pages.auth.login');\n }", "public function showLoginForm()\n {\n return view('auth::login');\n }", "public function showLoginForm()\n {\n $form = \\FormBuilder::create(LoginUserForm::class);\n\n return view('account::auth.login', compact('form'));\n }", "public function showLoginForm()\n {\n return view('shopper::pages.auth.login');\n }", "public function showLoginForm()\n {\n return view('admin.auth.login');\n }", "public function showLoginForm()\n {\n return view('admin.auth.login');\n }", "public function showLoginForm()\n {\n return view('admin.auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login',[\n 'title' => 'Connexion à l\\'espace d\\'administration',\n 'loginRoute' => 'backend.login',\n 'forgotPasswordRoute' => 'backend.password.request',\n ]);\n }", "public function showLoginForm()\n {\n return view('auth.magic-login');\n }", "public function showLoginForm()\n {\n if(Agent::isTable() || Agent::isMobile()){\n return view('errors.desktop-only');\n }\n else{\n return view('auth.login');\n }\n }", "public function showLoginForm()\n\t{\n\t\treturn view('auth.organizer.login');\n\t}", "public function showLoginForm()\n {\n\n return view('auth.login');\n }", "public function showLogin() {\n if (isAuth()) {\n Flash::set(\"You're already logged in!\", 'info');\n $this->redirect($this->url('LoginHome'));\n }\n $active = 'login';\n $this\n ->setTitle('Login')\n ->add('active', $active)\n ->show('login/login');\n }", "public function showLoginForm()\n {\n return view('operator.login');\n }", "public function showLoginForm()\n {\n return view('pages.superAdmin.login');\n }", "public function showLoginForm()\n {\n \n if (\\Auth::check()) {\n return redirect()->route('eventmie.welcome');\n }\n return Eventmie::view('eventmie::auth.login');\n }", "public function showLoginForm()\n {\n return view('user.login');\n }", "public function showLoginForm()\n {\n return view('estagiarios.auth.login');\n }", "public function showLoginForm()\n {\n return view('guestAuth.login');\n }", "public function showLoginForm()\n {\n return view('admin.login');\n }", "public function showLoginForm()\n {\n return view('admin.login');\n }", "public function showLoginForm()\n {\n return view('admin.login');\n }", "public function showLoginForm()\n {\n return view('admin.login');\n }", "function Login()\n {\n $this->view->ShowLogin();\n }", "public function showLoginForm()\n {\n return view('admin::auth.login',[\n 'title' => 'Admin Login',\n 'loginRoute' => route('dashboard.login'),\n 'forgotPasswordRoute' => 'dashboard.password.request',\n ]);\n }", "public function showLogin()\n\t{\n\t\treturn View::make('login');\n\t}", "public function login()\n {\n $this->renderView('login');\n }", "public function showAdminLoginForm()\n {\n $title = Lang::get('admin.ca_login');\n return view('admin.login', compact('title'));\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function login()\n {\n $this->set('title', 'Login');\n $this->render('login');\n }", "public function showLoginForm()\n {\n if (Auth::viaRemember()) {\n return redirect()->intended('dashboard');\n }\n return view(\"auth.login\");\n }", "public function index()\r\n\t{\r\n\t\t$this->viewloader(\"auth/loginform\");\r\n\t\t\r\n\t}", "public function showLogin()\n {\n return View::make('auth.login');\n }", "public function showLogin(){\n $this->data['pagetitle'] = \"Login\";\n $this->data['page'] = 'login';\n // $this->data['pagecontent'] = 'login';\n $this->data['pagebody'] = 'login';\n \n $this->render();\n }", "public function login()\n\t{\n\t\treturn view(\"auth/login\", [\n\t\t\t'title' => \"Login\"\n\t\t]);\n\t}", "public function showLogin() {\n return View::make('user.login');\n }", "public function formLogin() {\n $this->view->addForm();\n }", "public function loginAction()\n {\n // Instantiate the form that asks the user to log in.\n $form = new Application_Form_LoginForm();\n\n // Initialize the error message to be empty.\n $this->view->formResponse = '';\n\n // For security purposes, only proceed if this is a POST request.\n if ($this->getRequest()->isPost())\n {\n // Process the filled-out form that has been posted:\n // if the input values are valid, attempt to authenticate.\n $formData = $this->getRequest()->getPost();\n if ($form->isValid($formData))\n {\n if ( $this->_authenticate($formData) )\n {\n $this->_helper->redirector('index', 'index');\n }\n }\n }\n\n // Render the view.\n $this->view->form = $form;\n }", "public function showTutorLoginForm()\n {\n $title = Lang::get('admin.ca_login');\n return view('tutor.login', compact('title'));\n }", "public function getLoginForm()\n {\n $incorrect = \\Session::pull('login.incorrect');\n\n $this->nav('navbar.logged.out.login');\n $this->title('navbar.logged.out.login');\n\n return $this->view('auth.login', compact('incorrect'));\n }", "public function showLoginForm()\n {\n return view('index');\n }", "function renderLoginForm() {\n\t\t$tpl = DevblocksPlatform::getTemplateService();\n\t\t$tpl->cache_lifetime = \"0\";\n\t\t\n\t\t// add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)\n\t\t$translate = DevblocksPlatform::getTranslationService();\n\t\t$tpl->assign('translate', $translate);\n\t\t\n\t\t@$redir_path = explode('/',urldecode(DevblocksPlatform::importGPC($_REQUEST[\"url\"],\"string\",\"\")));\n\t\t$tpl->assign('original_path', (count($redir_path)==0) ? 'login' : implode(',',$redir_path));\n\t\t\n\t\t$tpl->display('file:' . dirname(dirname(__FILE__)) . '/templates/login/login_form_default.tpl');\n\t}", "public function showloginform()\n {\n return view('tsadmin.adminloginform');\n }", "public function showLoginForm()\n { \n return view('auth.showLoginForm');\n }", "public function showLogin()\n\t{\n return View::make('login');\n\t}", "public function showLoginPage()\n {\n return view('auth.login');\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login.twig', [\n 'model' => $model,\n ]);\n }\n }", "public function showLogin()\n\t{\n if (\\Auth::check())\n {\n // Redirect to homepage\n return \\Redirect::route('dashboard');\n }\n\n // Show the login page\n\t\treturn \\View::make('front.login');\n\t}", "public function logInPage() {\n $view = new View('login');\n $view->generate();\n }", "function showLoginForm() {\n}", "public function actionLogin()\n\t{\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n $signup_model = new SignupForm();\n $login_model = new LoginForm();\n \n return $this->render('login', [\n 'login_model' => $login_model,\n 'signup_model' => $signup_model, 'modal' => true\n ]);\n\t}", "public function showLoginForm()\n { \n if (Auth::user()) {\n return redirect('/admin/dashboard');\n }\n \n return view('index.login');\n }", "public function showLogin()\n {\n if (Auth::check())\n {\n // Show Index\n return Redirect::to('/');\n }\n // Show Login\n return View::make('login');\n }", "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->redirect([ 'site/index' ]);\n }\n $referer = \\Yii::$app->request->get('referer', \\Yii::$app->request->referrer);\n if (empty( $referer )) {\n $referer = Url::to([ 'cabinet/main' ], true);\n }\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return Yii::$app->getResponse()\n ->redirect($referer);\n } else {\n return $this->render(\n 'login',\n [\n 'model' => $model,\n ]\n );\n }\n }", "public function showLoginForm(): Response\n {\n return $this->render('login.html');\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->redirect(['site/account']);\n }\n\n $model = new LoginForm();\n\n if (Yii::$app->request->isPost) {\n $postData = Yii::$app->request->post();\n\n if ($model->load($postData) && $model->login()) {\n return $this->redirect(['site/account']);\n }\n }\n\n $model->password = '';\n\n return $this->render('login', [\n 'model' => $model,\n ]);\n }", "public function Login()\n\t{\n\t\t$form = new CForm(array('name'=>'loginForm', 'action'=>$this->request->CreateUrl('user/login')), array(\n\t\t\t'acronym' \t\t=> new CFormElementText('acronym', array(\n\t\t\t\t'label'\t\t=> 'Acronym or email:',\n\t\t\t\t'type'\t\t=> 'text',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'password'\t\t=> new CFormElementPassword('password', array(\n\t\t\t\t'label'\t\t=> 'Password:',\n\t\t\t\t'type'\t\t=> 'password',\n\t\t\t\t)\n\t\t\t),\n\t\t\tnew CFormElementSubmit('doLogin', array(\n\t\t\t\t'value'\t\t=> 'Login',\n\t\t\t\t'type'\t\t=> 'submit',\n\t\t\t\t'callback'\t=> array($this, 'DoLogin')\n\t\t\t\t)\n\t\t\t),\n\t\t));\n\t\t\n\t\t$form->SetValidation('acronym',array('not_empty'));\n\t\t$form->SetValidation('password',array('not_empty'));\n\t\t\n\t\t$form->Check();\n\n\t\t$this->views->SetTitle('Login');\n\t\t$this->views->AddView('user/login.tpl.php', array(\n\t\t\t'login_form'\t\t=> $form->GetHTML(),\n\t\t\t'allow_create_user'\t=> $this->config['create_new_users'],\n\t\t\t),\n\t\t'primary'\n\t\t);\n\t}", "public function actionLogin()\n {\n $this->layout = '/login';\n $manager = new Manager(['userId' => UsniAdaptor::app()->user->getId()]);\n $userFormDTO = new UserFormDTO();\n $model = new LoginForm();\n $postData = UsniAdaptor::app()->request->post();\n $userFormDTO->setPostData($postData);\n $userFormDTO->setModel($model);\n if (UsniAdaptor::app()->user->isGuest)\n {\n $manager->processLogin($userFormDTO);\n if($userFormDTO->getIsTransactionSuccess())\n {\n return $this->goBack();\n }\n }\n else\n {\n return $this->redirect($this->resolveDefaultAfterLoginUrl());\n }\n return $this->render($this->loginView,['userFormDTO' => $userFormDTO]);\n }", "public function showLogin(){\n\t\t\t\n\t\t\t//Verificamos si ya esta autenticado\n\t\t\tif(Auth::check()){\n\n\t\t\t\t//Si esta autenticado lo mandamos a la raiz, el inicio\n\t\t\t\treturn Redirect::to('/');\n\t\t\t} else {\n\n\t\t\t\t//Si no lo mandamos al formulario de login\n\t\t\t\treturn View::make('login');\n\n\t\t\t}\n\t\t}", "public function actionLogin()\n\t{\n\t\t$form=new LoginForm;\n\t\t// collect user input data\n\t\tif(isset($_POST['LoginForm']))\n\t\t{\n\t\t\t$form->attributes=$_POST['LoginForm'];\n\t\t\t// validate user input and redirect to previous page if valid\n\t\t\tif($form->validate())\n\t\t\t\t$this->redirect(Yii::app()->user->returnUrl);\n\t\t}\n\t\t// display the login form\n\t\t$this->render('login',array('form'=>$form));\n\t}", "public function showLogin() {\n\t\treturn View::make('login/login')->with('error', '');\n\t}", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n //return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n //return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function login()\n\t{\n\t\treturn View::make('auth.login');\n\t}", "public function showLoginForm() {\n $url = url('../') . '/portal/login';\n return Redirect::to($url);\n }", "public function showLoginForm(): View\n {\n return view('auth.login');\n }", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function actionLogin() {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login() && $model->validate()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "function renderLoginForm() {\n\t\t$tpl = DevblocksPlatform::getTemplateService();\n\t\t$tpl->cache_lifetime = \"0\";\n\t\t\n\t\t// add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)\n\t\t$translate = DevblocksPlatform::getTranslationService();\n\t\t$tpl->assign('translate', $translate);\n\t\t\n\t\t@$redir_path = explode('/',urldecode(DevblocksPlatform::importGPC($_REQUEST[\"url\"],\"string\",\"\")));\n\t\t$tpl->assign('original_path', (count($redir_path)==0) ? 'login' : implode(',',$redir_path));\n\n\t\t// TODO: pull this from a config area\n\t\t$server = 'localhost';\n\t\t$port = '10389';\n\t\t$default_dn = 'cn=William Bush,ou=people,o=sevenSeas';\n\t\t$tpl->assign('server', $server);\n\t\t$tpl->assign('port', $port);\n\t\t$tpl->assign('default_dn', $default_dn);\n\t\t\n\t\t// display login form\n\t\t$tpl->display('file:' . dirname(dirname(__FILE__)) . '/templates/login/login_form_ldap.tpl');\n\t}", "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function loginForm()\n {\n return view('login');\n }", "public function login()\n\t{\n\t\t$this->layout->content = View::make('login.login');\n\t}", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }" ]
[ "0.8195479", "0.8184714", "0.81353784", "0.8114367", "0.8106355", "0.8087322", "0.80029774", "0.79896617", "0.7967813", "0.79508567", "0.79352325", "0.7924134", "0.7901801", "0.78818923", "0.78473926", "0.7842989", "0.78256094", "0.7800776", "0.7777558", "0.7777558", "0.7777558", "0.7737047", "0.7737047", "0.7737047", "0.7737047", "0.7737047", "0.7737047", "0.7737047", "0.7737047", "0.7718073", "0.7713825", "0.77121496", "0.77109325", "0.7701632", "0.76938844", "0.76911926", "0.76841027", "0.76649404", "0.76548326", "0.76434505", "0.764228", "0.76310635", "0.76310635", "0.76310635", "0.76310635", "0.76003623", "0.7570066", "0.7563254", "0.7557227", "0.7551454", "0.7548312", "0.75171715", "0.7495362", "0.74649376", "0.7447624", "0.74347454", "0.743267", "0.7421023", "0.7393693", "0.7383633", "0.737965", "0.7372955", "0.73616844", "0.7358818", "0.735267", "0.7350887", "0.73256296", "0.73214614", "0.73140866", "0.73073065", "0.7300327", "0.72964346", "0.7295574", "0.7294269", "0.7282752", "0.7277177", "0.7264378", "0.7263998", "0.7262814", "0.7262336", "0.7261748", "0.72444725", "0.7240734", "0.72373515", "0.72372574", "0.7237158", "0.7234796", "0.72317404", "0.7226313", "0.7223567", "0.72232443", "0.72232443", "0.72161657", "0.7215002", "0.721392", "0.721392", "0.721392", "0.721392", "0.721392", "0.721392" ]
0.77962434
18
Handle a login request to the application.
public function login(Request $request) { $this->validateLogin($request); // If the class is using the ThrottlesLogins trait, we can automatically throttle // the login attempts for this application. We'll key this by the username and // the IP address of the client making these requests into this application. if ($this->hasTooManyLoginAttempts($request)) { $this->fireLockoutEvent($request); return $this->sendLockoutResponse($request); } if ($this->request->config['user_verify_users'] && !$this->user->isVerified($request)) { return $this->sendNotVerifiedLoginResponse($request); } if (!$this->user->isEnabled($request)) { return $this->sendDisabledLoginResponse($request); } if ($this->attemptLogin($request)) { return $this->sendLoginResponse($request); } // If the login attempt was unsuccessful we will increment the number of attempts // to login and redirect the user back to the login form. Of course, when this // user surpasses their maximum number of attempts they will get locked out. $this->incrementLoginAttempts($request); return $this->sendFailedLoginResponse($request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handleLogin( ){\n\t\t// Filter allowed data\n\t\t$data = Request::only([ 'uid', 'password' ]);\n\n\t\t// Validate user input\n\t\t$validator = Validator::make(\n\t\t\t$data,\n\t\t\t[\n\t\t\t\t'uid' => 'required',\n\t\t\t\t'password' => 'required',\n\t\t\t]\n\t\t);\n\n\t\tforeach ($data as $key => $value) {\n\t\t\t$data[$key] = $this->sanitizeLDAP( $value );\n\t\t}\n\n\t\tif($validator->fails()){\n\t\t\t// If validation fails, send back with errors\n\t\t\treturn Redirect::route('login')->withErrors( $validator )->withInput( );\n\t\t}\n\n\t\tif( Auth::attempt( [ 'uid' => $data['uid'], 'password' => $data['password']], true ) ){\n\t\t\t// If login is successful, send them to home\n\t\t\treturn Redirect::route( 'home' );\n\t\t} else {\n\t\t\t// Otherwise, tell them they're wrong\n\t\t\treturn Redirect::route( 'login' )\n\t\t\t\t\t\t ->withErrors([ \n\t\t\t\t\t\t\t\t'message' => 'I\\'m sorry, that username and password aren\\'t correct.' \n\t\t\t\t\t\t\t]);\n\t\t}\n\n\t\treturn Redirect::route( 'login' )->withInput( );\n\t}", "public static function handle_login() {\n $params = $_POST;\n $player = Player::authenticate($params['username'], $params['password']);\n if(!$player) {\n View::make('player/login.html', array('error' => 'Väärä käyttäjätunnus tai salasana.', 'username' => $params['username']));\n } else {\n $_SESSION['user'] = $player->id;\n\n Redirect::to('/', array('message' => 'Kirjautunut käyttäjänä ' . $player->username));\n }\n }", "public function onLogin(Request $request)\n {\n $username = $request->input('username');\n $password = $request->input('password');\n \n // save posted data in user data object model\n $user = new UserModel(-1, $username, $password);\n \n // call security buesiness service\n $service = new SecurityService(); \n $status = $service->login($user);\n \n // render a failed or passed response view and pass the user model in passed view\n if($status)\n {\n $data = ['model' => $user];\n return view('loginPassed')->with($data);\n }\n else \n {\n return view('loginFailed');\n }\n }", "protected function loginIfRequested() {}", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function processLogin()\n {\n $user = $this->post['user'];\n\n // Run the form validation\n $errors = $this->validateLogin($user);\n\n // If the form is valid, check the login credentials and\n // if valid log the user in otherwise display the form again.\n if (empty($errors)) {\n if ($this->authentication->login($user['email'], $user['password'])) {\n header('location: /admin/');\n return http_response_code();\n } else {\n $errors[] = 'Invalid login credentials';\n return $this->loginForm($errors);\n }\n } else {\n return $this->loginForm($errors);\n }\n }", "public static function login()\n {\n (new Authenticator(request()))->login();\n }", "public function loginAction() {\n $auth = $this->app->container[\"settings\"][\"auth\"];\n\n // Note: There is no point to check whether the user is authenticated, as there is no authentication\n // check for this route as defined in the config.yml file under the auth.passthrough parameter.\n\n $request = $this->app->request;\n $max_exptime = strtotime($auth[\"maxlifetime\"]);\n $default_exptime = strtotime($auth[\"lifetime\"]);\n $exptime = $default_exptime;\n\n if ( $request->isFormData() )\n {\n $username = $request->post(\"username\");\n $password = $request->post(\"password\");\n $exptime = self::getExpirationTime($request->post(\"expiration\"), $default_exptime, $max_exptime);\n }\n\n if ( preg_match(\"/^application\\\\/json/i\", $request->getContentType()) )\n {\n $json = json_decode($request->getBody(), true);\n if ( $json !== NULL )\n {\n $username = $json[\"username\"];\n $password = $json[\"password\"];\n $exptime = self::getExpirationTime(isset($json[\"expiration\"])?$json[\"expiration\"]:null, $default_exptime, $max_exptime);\n }\n }\n\n if ( empty($username) || empty($password) ) {\n $this->renderUnauthorized();\n return;\n }\n\n /**\n * @var \\PDO\n */\n $pdo = $this->app->getPDOConnection();\n $user = $pdo->select()\n ->from(\"tbl_user\")\n ->where(\"username\", \"=\", $username)\n ->where(\"password\", \"=\", sha1($password))\n ->where(\"status\", \">\", 0)\n ->execute()\n ->fetch();\n\n if ( empty($user) )\n {\n $this->renderUnauthorized();\n return;\n }\n\n $pdo->update(array(\"lastlogin_time\"=>gmdate(\"Y-m-d H:i:s\")))\n ->table(\"tbl_user\")\n ->where(\"id\", \"=\", $user[\"id\"])\n ->execute();\n\n $this->app->setAuthData(Factory::createAuthData($user, $exptime));\n\n $this->render(200);\n }", "public function postLoginAction()\n {\n //get input\n $inputs = $this->getPostInput();\n\n //define default\n $default = [\n 'status' => 'active'\n ];\n\n // Validate input\n $params = $this->myValidate->validateApi($this->userLogin, $default, $inputs);\n\n if (isset($params['validate_error']))\n {\n //Validate error\n return $this->responseError($params['validate_error'], '/users');\n }\n\n //process user login\n $result = $this->userService->checkLogin($params);\n\n //Check response error\n if (!$result['success'])\n {\n //process error\n return $this->responseError($result['message'], '/users');\n }\n\n //return data\n $encoder = $this->createEncoder($this->modelName, $this->schemaName);\n\n return $this->response($encoder, $result['data']);\n }", "public function login()\n {\n $authorized = $this->authorize( $_POST );\n if( !empty( $authorized ) && $authorized !== false ){\n $this->register_login_datetime( $authorized );\n ( new Events() )->trigger( 1, true );\n } else {\n ( new Events() )->trigger( 2, true );\n }\n }", "public function loginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authLogin' );\n }", "public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}", "public function processLogin(): void;", "public function login(Request $request);", "public function loginAction()\r\n\t{\r\n\t\r\n\t\t$post_back = $this->request->getParam( \"postback\" );\r\n\t\t$config_https = $this->registry->getConfig( \"SECURE_LOGIN\", false, false );\r\n\t\r\n\t\t// if secure login is required, then force the user back thru https\r\n\t\r\n\t\tif ( $config_https == true && $this->request->uri()->getScheme() == \"http\" )\r\n\t\t{\r\n\t\t\t$uri = $this->request->uri();\r\n\t\t\t$uri->setScheme('https');\r\n\t\r\n\t\t\treturn $this->redirect()->toUrl((string) $uri);\r\n\t\t}\r\n\t\r\n\t\t### remote authentication\r\n\t\r\n\t\t$result = $this->authentication->onLogin();\r\n\t\r\n\t\tif ( $result == Scheme::REDIRECT )\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t\r\n\t\t### local authentication\r\n\t\r\n\t\t// if this is not a 'postback', then the user has not submitted the form, they are arriving\r\n\t\t// for first time so stop the flow and just show the login page with form\r\n\t\r\n\t\tif ( $post_back == null ) return 1;\r\n\t\r\n\t\t$bolAuth = $this->authentication->onCallBack();\r\n\t\r\n\t\tif ( $bolAuth == Scheme::FAILED )\r\n\t\t{\r\n\t\t\t// failed the login, so present a message to the user\r\n\t\r\n\t\t\treturn array(\"error\" => \"authentication\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t}", "public function login() {\n $this->FormHandler->setRequired('employeeCode');\n $this->FormHandler->setRequired('employeePassword');\n\n\n if ($this->FormHandler->run() === true) {\n $employeeCode = $this->FormHandler->getPostValue('employeeCode');\n $employePassword = $this->FormHandler->getPostValue('employeePassword');\n if ($this->User->checkLoginCredentials($employeeCode, $employePassword) === true) {\n // Log them in and redirect\n $this->User->loginClient($_SESSION, $employeeCode);\n redirect('employee/dashboard');\n }\n }\n else if ($this->User->checkIfClientIsLoggedIn($_SESSION) === true) {\n redirect('employee/dashboard');\n }\n\n loadHeader();\n include APP_PATH . '/view/user/login.php';\n loadFooter();\n }", "public function handleLogin(){\n $username = htmlentities(trim($_POST['username']));\n $password = htmlentities(trim($_POST['password']));\n $loginSebagai = htmlentities(trim($_POST['login_sebagai']));\n\n $loginResult = WebDb::handleLogin($username,$password, $loginSebagai);\n\n if(!$loginResult) {\n Session::set(\"login_gagal\",\"Username atau password salah\");\n header(\"Location: /it-a\");\n die();\n }\n Session::set(\"user_id\",$username);\n Session::set(\"login_sebagai\",$loginSebagai);\n header(\"Location: /it-a/dashboard\");\n }", "public function postLogin()\n\t{\n\n\t\t$input = array(\n\t\t 'email' => \\Input::get( 'email' ),\n\t\t 'password' => \\Input::get( 'password' ),\n\t\t 'remember' => \\Input::get( 'remember' ),\n\t\t);\n\n\t\t// If you wish to only allow login from confirmed users, call logAttempt\n\t\t// with the second parameter as true.\n\t\t// logAttempt will check if the 'email' perhaps is the username.\n\t\tif ( \\Confide::logAttempt( $input, true ) ) \n\t\t{\n\t\t return \\Redirect::intended('/company'); \n\t\t}\n\t\telse\n\t\t{\n\t\t $user = new \\User;\n\n\t\t // Check if there was too many login attempts\n\t\t if( \\Confide::isThrottled( $input ) )\n\t\t {\n\t\t $err_msg = \\Lang::get('confide::confide.alerts.too_many_attempts');\n\t\t }\n\t\t elseif( $user->checkUserExists( $input ) and ! $user->isConfirmed( $input ) )\n\t\t {\n\t\t $err_msg = \\Lang::get('confide::confide.alerts.not_confirmed');\n\t\t }\n\t\t else\n\t\t {\n\t\t $err_msg = \\Lang::get('confide::confide.alerts.wrong_credentials');\n\t\t }\n\n\t\t return \\Redirect::action('controllers\\company\\AuthController@getLogin')\n\t\t ->withInput(\\Input::except('password'))\n\t\t ->with( 'error', $err_msg );\n\t\t}\n\n\t}", "public function loginAction()\n {\n $data = $this->getRequestData();\n if ($this->getDeviceSession(false)) {\n $this->setErrorResponse('Your device is already running a session. Please logout first.');\n }\n $session = Workapp_Session::login($data['username'], $data['password']);\n if (!$session) {\n $this->setErrorResponse('No user with such username and password');\n }\n $session->registerAction($_SERVER['REMOTE_ADDR']);\n $this->_helper->json(array('session_uid' => $session->getSessionUid()));\n }", "public function login()\n {\n /* validation requirement */\n $validator = $this->validation('login', request());\n\n if ($validator->fails()) {\n\n return $this->core->setResponse('error', $validator->messages()->first(), NULL, false , 400 );\n }\n\n $credentials = request(['email', 'password']);\n\n if (! $token = auth()->attempt($credentials)) {\n\n return $this->core->setResponse('error', 'Please check your email or password !', NULL, false , 400 );\n }\n\n return $this->respondWithToken($token, 'login');\n }", "public function login()\n {\n if(is_logged_in()) {\n redirect_to(url('thread/index'));\n }\n\n $user = new User;\n $page = Param::get('page_next', 'login');\n\n switch($page) {\n case 'login':\n break;\n\n case 'lobby':\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n\n try {\n $user = $user->verify();\n $_SESSION['id'] = $user['id'];\n } catch (UserNotFoundException $e) {\n $page = 'login';\n }\n break;\n\n default:\n throw new UserNotFoundException(\"User not found\");\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }", "public function login()\n {\n if ($this->getCurrentUser()->get('id')) {\n $this->redirect($this->Auth->redirectUrl());\n }\n\n if ($user = $this->Auth->identify()) {\n $this->Auth->setUser($user);\n\n // set cookie\n if (!empty($this->getRequest()->getData('remember_me'))) {\n if ($CookieAuth = $this->Auth->getAuthenticate('Lil.Cookie')) {\n $CookieAuth->createCookie($this->getRequest()->getData());\n }\n }\n } else {\n if ($this->getRequest()->is('post') || env('PHP_AUTH_USER')) {\n $this->Flash->error(__d('lil', 'Invalid username or password, try again'));\n }\n }\n\n if ($this->getCurrentUser()->get('id')) {\n $redirect = $this->Auth->redirectUrl();\n $event = new Event('Lil.Auth.afterLogin', $this->Auth, [$redirect]);\n $this->getEventManager()->dispatch($event);\n\n return $this->redirect($redirect);\n }\n }", "private function login(){\n \n }", "public function loginAction() : object\n {\n $title = \"Logga in\";\n\n // Deal with incoming variables\n $user = getPost('user');\n $pass = getPost('pass');\n $pass = MD5($pass);\n\n if (hasKeyPost(\"login\")) {\n $sql = loginCheck();\n $res = $this->app->db->executeFetchAll($sql, [$user, $pass]);\n if ($res != null) {\n $this->app->session->set('user', $user);\n return $this->app->response->redirect(\"content\");\n }\n }\n\n // Add and render page to login\n $this->app->page->add(\"content/login\");\n return $this->app->page->render([\"title\" => $title,]);\n }", "abstract protected function doLogin();", "public function postLogin()\n {\n if ($this->request->is('post')) {\n $input = $this->request->getData();\n // Check validate login of input data\n $validate = $this->Client->newEntity($input, ['validate' => 'login']);\n\n // Check this validate had error or not\n if ($validate->errors()) {\n $this->set($validate->errors());\n // Check login by account of Shop and redirect to Index page if success\n } else if ($shop = $this->Shop->checkLoginForShop($input) != null) {\n // Change to Model Shop to check authenticate.\n $this->Auth->config('authenticate', [\n 'Form' => ['userModel' => 'Shop']\n ]);\n\n $shop = $this->Auth->identify();\n $this->Auth->setUser($shop);\n\n return $this->redirect(['controller' => 'Pages', 'action' => 'index']);\n // Check login by account of Client and redirect to Index page if success\n } else if ($client = $this->Auth->identify()) {\n $this->Auth->setUser($client);\n return $this->redirect(['controller' => 'Pages', 'action' => 'home']);\n } else {\n $this->Flash->error('Username or password are not correct..');\n }\n $this->login();\n }\n }", "public function login()\n {\n\t\t$login = Input::get('login');\n\t\t$password = Input::get('password');\n\t\ttry{\n\t\t\n\t\t\t$user = Auth::authenticate([\n\t\t\t\t'login' => $login,\n\t\t\t\t'password' => $password\n\t\t\t]);\n\t\t\t$this->setToken($user);\n\t\t\treturn $this->sendResponse('You are now logged in');\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\treturn $this->sendResponse($e->getMessage());\n\t\t}\n }", "function login() {\n\t\tif (isset($_REQUEST['username']) && !empty($_REQUEST['username'])) {\n\t\t\t$username = $_REQUEST['username'];\n\n\t\t\t$userDAO = implementationUserDAO_Dummy::getInstance();\n\t\t\t$users = $userDAO->getUsers();\n\n\t\t\tforeach ($users as $key => $user) {\n\t\t\t\tif ($user->getUsername() === $username) {\n\t\t\t\t\t$userFound = $user;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($userFound) && $userFound != null) {\n\n\t\t\t\tif (isset($_REQUEST['password']) && !empty($_REQUEST['password'])) {\n\t\t\t\t\t$password = $_REQUEST['password'];\n\n\t\t\t\t\tif ($userFound->getPassword() === $password) {\n\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$_SESSION['USERNAME']= $username;\n\n\t\t\t\t\t\t$url = getPreviousUrl();\n\t\t\t\t\t\t$newUrl = substr($url, 0, strpos($url, \"?\"));\n\n\t\t\t\t\t\tredirectToUrl($newUrl);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// redirecting to login with bad password alert\n\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\t// redirecting to login page with bad username alert\n\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t}\n\n\n\t}", "public function access() {\n \tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\n \t\t$user = Auth::login($_POST['email'], $_POST['pw']);\n \t\tif($user) {\n \t\t\tApp::redirect('dashboard');\n \t\t}\n\t\t\tSession::set('_old_input', $_POST);\n\t\t\tSession::set('_errors', ['login' => \"Email y/o password incorrectos.\"]);\n\t\t\tApp::redirect('login');\n\n \t}\n\n }", "public function postLogin() {\n\n\t\t// get input parameters\n\t\t//\n\t\t$username = Input::get('username');\n\t\t$password = Input::get('password');\n\n\t\t// validate user\n\t\t//\n\t\t$user = User::getByUsername($username);\n\t\tif ($user) {\n\t\t\tif (User::isValidPassword($password, $user->password)) {\n\t\t\t\tif ($user->hasBeenVerified()) {\n\t\t\t\t\tif ($user->isEnabled()) {\n\t\t\t\t\t\t$userAccount = $user->getUserAccount();\n\t\t\t\t\t\t$userAccount->penultimate_login_date = $userAccount->ultimate_login_date;\n\t\t\t\t\t\t$userAccount->ultimate_login_date = gmdate('Y-m-d H:i:s');\n\t\t\t\t\t\t$userAccount->save();\n\t\t\t\t\t\t$res = Response::json(array('user_uid' => $user->user_uid));\n\t\t\t\t\t\tSession::set('timestamp', time());\n\t\t\t\t\t\tSession::set('user_uid', $user->user_uid);\n\t\t\t\t\t\treturn $res;\n\t\t\t\t\t} else\n\t\t\t\t\t\treturn Response::make('User has not been approved.', 401);\n\t\t\t\t} else\n\t\t\t\t\treturn Response::make('User email has not been verified.', 401);\n\t\t\t} else\n\t\t\t\treturn Response::make('Incorrect username or password.', 401);\n\t\t} else\n\t\t\treturn Response::make('Incorrect username or password.', 401);\n\n\t\t/*\n\t\t$credentials = array(\n\t\t\t'username' => $username,\n\t\t\t'password' => $password\n\t\t);\n\n\t\tif (Auth::attempt($credentials)) {\n\t\t\treturn Response::json(array(\n\t\t\t\t'user_uid' => $user->uid\n\t\t\t));\n\t\t} else\n\t\t\treturn Response::error('500');\n\t\t*/\n\t}", "public function loginAction()\n {\n // Instantiate the form that asks the user to log in.\n $form = new Application_Form_LoginForm();\n\n // Initialize the error message to be empty.\n $this->view->formResponse = '';\n\n // For security purposes, only proceed if this is a POST request.\n if ($this->getRequest()->isPost())\n {\n // Process the filled-out form that has been posted:\n // if the input values are valid, attempt to authenticate.\n $formData = $this->getRequest()->getPost();\n if ($form->isValid($formData))\n {\n if ( $this->_authenticate($formData) )\n {\n $this->_helper->redirector('index', 'index');\n }\n }\n }\n\n // Render the view.\n $this->view->form = $form;\n }", "protected function login()\n {\n $this->send(Response::nick($this->config['nick']));\n $this->send(Response::user(\n $this->config['nick'],\n $this->config['hostname'],\n $this->config['servername'],\n $this->config['realname']\n ));\n }", "public function loginUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n\n // Check email\n if (!$email) {\n $this->showLoginForm(['Please enter email']);\n }\n // Check password\n if (!$password) {\n $this->showLoginForm(['Please enter password']);\n }\n\n // Check user exist and then password\n $user = $this->getUser($email);\n $password = md5($password);\n if (!$user || $password !== $user['password']) {\n $this->showLoginForm(['Error on login']);\n }\n\n // Save login details to cookies\n if (!defined('APP_USERS_COOKIES_EMAIL')\n || !defined('APP_USERS_COOKIES_PASSWORD')) {\n $this->showLoginForm(['Error on login']);\n }\n setcookie(APP_USERS_COOKIES_EMAIL, $email);\n setcookie(APP_USERS_COOKIES_PASSWORD, $password);\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_login']);\n }", "public function login() {\r\n\r\n // signal any observers that the user has logged in\r\n $this->setState(\"login\");\r\n }", "public function processLogin(LoginRequest $request)\n {\n try {\n \n $remember = (bool) $request->get('remember', false);\n \n if (Sentinel::authenticate($request->all(), $remember)) {\n \n return redirect()->intended();\n }\n \n $errors = trans('sentinel.errors.credentials');\n \n }\n catch (NotActivatedException $e) {\n \n $errors = trans('sentinel.errors.activation'); \n }\n catch (ThrottlingException $e) {\n \n $errors = trans('sentinel.errors.throttle', ['delay' => $e->getDelay()]);\n }\n \n return redirect()->back()\n ->withInput()\n ->withErrors($errors);\n }", "public function login() {\n\t\tif(!empty(Session::get('http_response'))) {\n\t\t\thttp_response_code(Session::get('http_response'));\n\t\t\tSession::delete('http_response');\n\t\t}\n\t\tif($_POST && isset($_POST['login']) && isset($_POST['password'])) {\n\t\t\t$user = $this->_model->getLogin(strtolower($_POST['login']));\n\t\t\tif($user && $user->enabled) {\n\t\t\t\tif(hash_equals($user->password,crypt($_POST['password'],$user->password))) {\n\t\t\t\t\tif($user->blocked) {\n\t\t\t\t\t\thttp_response_code(403);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is blocked\"));\n\t\t\t\t\t} elseif($user->verified) {\n\t\t\t\t\t\tSession::set('user',$user);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'success','icon'=>'check','text'=>\"User has logged in successfully\"));\n\t\t\t\t\t\t$redirect = Session::get('login_redirect');\n\t\t\t\t\t\tRouter::redirect(Session::get('login_redirect'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is not yet confirmed\"));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thttp_response_code(401);\n\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t}\t\n\t\t}\n\t}", "public function login()\n\t{\n\t\tif ($this->request->is('post')) {\n\n\t\t\t// If no parameter passed to login(), CakePHP automatically give the request params as parameters.\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\treturn $this->redirect($this->Auth->redirectUrl());\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->set('signInFail', true); // view vars\n\t\t\t}\n\t\t}\n\t}", "public function login($request)\n\t\t{\n\t\t\tif (isset($request->username) && isset($request->passphrase))\n\t\t\t\treturn $this->authenticate($request);\n\t\t}", "public function doLogin()\n {\n $rules = array(\n 'email' => 'required|email',\n 'password' => 'required|alphaNum|min:3'\n );\n \n // validate inputs from the form\n $validator = Validator::make(Input::all(), $rules);\n \n // if the validator fails, redirect back to the form\n if ($validator->fails()) {\n return Redirect::to('/')\n ->withErrors($validator)\n ->withInput(Input::except('password'));\n } else {\n // create our user data for the authentication\n $userdata = array(\n 'email' => Input::get('email'),\n 'password' => Input::get('password')\n );\n \n // attempt to do the login\n $response = $this->requestLoginApi($userdata);\n\n if ($response->status == true) {\n // validation successful, save cookie!\n return Redirect::to('showsearch')\n ->withCookie(Cookie::make('accessToken', $response->data->accessToken, 60))\n ->with('message', 'Auth OK! (Token created)');\n \n } else {\n // validation fail, send back to login form\n return Redirect::to('/')\n ->withErrors(\"Invalid credentials\")\n ->withInput(Input::except('password'));\n }\n }\n }", "public function loginAction(Request $request){\n //for the view\n $params = array(\"title\" => _(\"Sign in\"));\n\n $params['loginUsername'] = \"\";\n\n //handle login form\n if (!empty($_POST)){\n $error = true;\n\n $loginUsername = $_POST['loginUsername'];\n $params['loginUsername'] = $loginUsername;\n $password = $_POST['password'];\n\n //validation\n $validator = new CustomValidator();\n\n $validator->validateLoginUsername($loginUsername);\n $validator->validatePassword($password);\n\n //if valid\n if ($validator->isValid()){\n //find user from db\n $userManager = new UserManager();\n $user = $userManager->findByEmailOrUsername($loginUsername);\n\n //if user found\n if($user){\n\n// hash password\n $securityHelper = new SH();\n $hashedPassword = $securityHelper->hashPassword( $password, $user->getSalt());\n// $hashedPassword = bcrypt($password);\n\n //compare hashed passwords\n if ($hashedPassword === $user->getPassword()){\n //login\n $error = false;\n $this->logUser($request, $user);\n $json = new JsonResponse();\n $json->setData(array(\"redirectTo\" => '/skills'));\n $json->send();\n }\n }\n }\n if($error){\n $params['error']['global'] = _(\"You username/email and password do not match\");\n }\n }\n return view('auth.login',['params'=>$params]);\n// $view = new View(\"login.php\", $params);\n// $view->setLayout(\"../View/layouts/modal.php\");\n// $view->send(true);\n }", "public function loginAction() {\n $auth = Zend_Auth::getInstance();\n\n if ($auth->hasIdentity()) {\n $this->_redirect($this->getUrl());\n }\n\n $request = $this->getRequest();\n\n $redirect = $request->getPost('redirect');\n if (strlen($redirect) == 0)\n $redirect = $request->getServer('REQUEST_URI');\n if (strlen($redirect) == 0)\n $redirect = $this->getUrl();\n\n $errors = array();\n\n if ($request->isPost()) {\n // get the hash\n $hash = $request->getPost('hash');\n\n if ($this->checkHash($hash)) {\n $username = $request->getPost('username');\n $password = $request->getPost('password');\n\n if (strlen($username) == 0 || strlen($password) == 0)\n $errors['username'] = 'Required field must not be blank';\n\n if (count($errors) == 0) {\n $adapter = new Champs_Auth_Doctrine($username, $password);\n\n $result = $auth->authenticate($adapter);\n\n if ($result->isValid()) {\n $this->_redirect($this->getUrl());\n }\n\n $errors['username'] = 'Your login details were invalid';\n }\n }\n }\n\n // setup hash\n $this->initHash();\n\n $this->view->errors = $errors;\n $this->view->redirect = $redirect;\n }", "private function _login(){\r\n\r\n // It will always be called via ajax so we will respond as such\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n try {\r\n\r\n\r\n $username = $_POST['username'];\r\n $password = $_POST['password'];\r\n\r\n $path = ROOT.'/site/config/auth.txt';\r\n $adapter = new AuthAdapter($path,\r\n 'MRZPN',\r\n $username,\r\n $password);\r\n\r\n //$result = $adapter->authenticate($username, $password);\r\n\r\n $auth = new AuthenticationService();\r\n $result = $auth->authenticate($adapter);\r\n\r\n\r\n if(!$result->isValid()){\r\n $result->error = \"Incorrect username and password combination!\";\r\n /*\r\n foreach ($result->getMessages() as $message) {\r\n $result->error = \"$message\\n\";\r\n }\r\n */\r\n } else {\r\n $response = 200;\r\n $result->url = WEBROOT;\r\n }\r\n\r\n\r\n\r\n } catch (Exception $e) {\r\n $result->error = $e->getMessage();\r\n }\r\n\r\n }\r\n\r\n // Return the response\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n }", "public function login_action() \n\t{\n $rules = array(\n 'mail' => 'valid_email|required',\n 'pass' => 'required'\n );\n \n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n // they've passed the filter login try and log 'em in\n\t\tUserModel::login(); \n }", "private function handleJustLoggedIn() {\n $this->authenticatedView->setViewMessage(\"Welcome\");\n\n $keepLoggedIn = $this->userRequest->wantsToStayLoggedIn();\n \n if ($keepLoggedIn) {\n $userCredentials = $this->getUserCredentials();\n $cookieHandler = new CookieHandler();\n $cookieHandler->serveCookie($userCredentials);\n }\n }", "protected function handleLogin(Request $request)\n {\n $domain = $this->builder->auth()->adminDomain();\n\n /** @var PasswordProvider $passwordProvider */\n $passwordProvider = $domain->provider('password');\n\n $data = $request->data();\n $user = $passwordProvider->login(\n $data->getRequired('username'),\n $data->getRequired('password')\n );\n\n if($user === null) {\n return $this->getTemplate(array(\n 'loginFailed' => true\n ));\n }\n\n return $this->loggedInRedirect();\n }", "function doLoginAction() {\n if ($this->request->isPost() && $this->request->isAjax()) {\n try {\n $user = new User(\n $this->request->getPost('username')\n , $this->request->getPost('password')\n );\n\n if ($user->isRegisted()) {\n $reponse = $this->_translator()->get(\n __CLASS__ . __METHOD__\n . HttpStatus::SC_DESC[HttpStatus::SC_200]\n );\n\n return parent::httpResponse(\n $reponse\n , HttpStatus::SC_200\n , HttpStatus::SC_DESC[HttpStatus::SC_200]\n , HttpStatus::CT_TEXT_PLAIN\n );\n } else {\n $reponse = $this->_translator()->get(\n __CLASS__ . __METHOD__\n . HttpStatus::SC_DESC[HttpStatus::SC_401]\n );\n\n return parent::httpResponse(\n $reponse\n , HttpStatus::SC_401\n , HttpStatus::SC_DESC[HttpStatus::SC_401]\n , HttpStatus::CT_TEXT_PLAIN\n );\n }\n } catch (Exception $e) {\n return parent::httpResponse($e->getMessage());\n }\n }\n }", "public function doLogin(LoginRequest $request)\n { \n try {\n $data = $request->all();\n\n if (AuthSam::login($data, $request->remember_me)) {\n AuthSam::getSubsidychecklist();\n $user_id = AuthSam::getUser()->id;\n $users = DB::table('user_login_info')->where('user_id', $user_id)->get()->count();\n if ($users >= 2)\n DB::table('user_login_info')->where('user_id', $user_id)->take(1)->delete();\n $dataLog = [\n 'user_id' => $user_id,\n 'ipaddress' => $request->ip(),\n 'login_day' => date(\"Y-m-d\"),\n ];\n DB::table('user_login_info')->insert($dataLog);\n Cache::flush();\n if(AuthSam::permission_lock()==1) {\n if (AuthSam::permission()) {\n return redirect('/agency/home');\n } else {\n return redirect('/client/F0');\n }\n }else{\n if (AuthSam::permission()) {\n $url = '/agency/home_lock';\n } else {\n $url = '/client/F0_lock';\n }\n session()->forget(['is_login', 'user_id', 'permission', 'subsidy_check_list', 'follow_list']);\n return redirect($url);\n }\n \n } else {\n return redirect('/login')->with('error', 'ユーザー名とパスワードが違います。');\n }\n } catch(Exception $e) {\n return redirect('/login')->with('error', 'ユーザー名とパスワードが違います。');\n }\n \n }", "public function do_login()\n {\n $this->userObject = new User();\n\n // grab the uID of the person signing in\n $uid = $this->userObject->checkUser($_POST['user_email'], $_POST['user_password']);\n\n // if the uID exists\n if ($uid) {\n\n $this->set('message', 'You logged in!');\n\n // grab the array of user-data from the database\n $user = $this->userObject->getUser($uid);\n\n // leave out the password\n unset($user['password']);\n unset($user[4]);\n\n // if (strlen($_SESSION['redirect']i) > 0) { // basically, if someone types in the url with the funciton after,\n // // supposed to redirect people to the pages they want.\n // $view = $_SESSION['redirect'];\n // unset($_SESSION['redirect']);\n // header('Location: ' . BASE_URL . $view);\n\n // make the SESSION key 'user' and set it equal to the aray of user-data\n $_SESSION['user'] = $user;\n\n header('Location: /index.php/');\n\n } else {\n\n $this->set('error', 'Sorry! Looks like something might be messed up with your Username or Password! :p');\n }\n }", "public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}", "private function _signInRequested()\n {\n if ($this->model->signIn($_POST['username'], $_POST['password'])) {\n $this->utility->redirect('write');\n } else {\n $this->view->display($this->model);\n }\n }", "public function login($request)\n {\n return $this->start()->uri(\"/api/login\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function postLogin()\n {\n $this->validate($this->request, [\n 'username' => 'required',\n 'password' => 'required',\n ]);\n\n if ($this->hasTooManyLoginAttempts($this->request)) {\n return $this->sendLockoutResponse($this->request);\n }\n\n $credentials = $this->request->only('username', 'password');\n\n if ($this->auth->attempt($credentials, $this->request->has('remember'))) {\n return ($this->request->ajax())\n ? response()->json(['success' => true])\n : redirect()->intended($this->redirectPath());\n }\n\n $this->incrementLoginAttempts($this->request);\n\n $errors = ['username' => t('invalid_creds')];\n\n if ($this->request->ajax()) {\n return response()->json(['username' => [t('invalid_creds')]], 422);\n }\n\n return redirect($this->loginPath())\n ->withInput($this->request->only('username', 'remember'))\n ->withErrors([\n 'username' => t('invalid_creds'),\n ]);\n }", "public static function doLogin($request, $response, $args) {\n $username = strtolower($request->getParsedBody()['username']);\n $password = $request->getParsedBody()['password'];\n\n //Check login isn't empty\n if(empty($username) || empty($password)) {\n return self::renderAlert($response, 'login', 'danger', 'Username or password incorrect');\n }\n\n //Check user exist\n $user = DB::getInstance()->get('users', '*', [ 'username' => $username ]);\n if(empty($user)) {\n return self::renderAlert($response, 'login', 'danger', 'Username or password incorrect');\n }\n\n //Check password\n if(!password_verify($password, $user['password'])) {\n return self::renderAlert($response, 'login', 'danger', 'Username or password incorrect');\n }\n\n $_SESSION['MEMBER']['username'] = $username;\n return $response->withHeader('Location', '/')->withStatus(302);\n }", "public function post_signin()\n\t{\n\t\tif(Service\\Validation\\Login::passes(Input::all()))\n\t\t{\n\t\t\tif(Service\\Security::authorize(array('username' => Input::get('username'), 'password' => Input::get('password'))))\n\t\t\t{\n\t\t\t\treturn Redirect::home();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Redirect::to_route('login')->with_input()->with_errors(new Messages(array(\n\t\t\t\t\t__('login.failed')->get()\n\t\t\t\t)));\n\t\t\t}\n\t\t}\n\n\t\treturn Redirect::to_route('login')->with_input()->with_errors(Service\\Validation::errors());\n\t}", "public function postLogin(Request $request)\n {\n return $this->login($request);\n }", "public function postLogin(Request $request)\n {\n return $this->login($request);\n }", "public function handleUserLogin($event) {\n //Log user login\n $activity = new Activity;\n $activity->activity_type = 'login';\n $activity->actor_id = $event->user->id;\n $activity->actor_type = 'user';\n $activity->activity_data = '';\n $activity->user_agent = $this->request->header('User-Agent');\n $activity->actor_ip = $this->request->ip();\n $activity->save();\n }", "public static function handleLogin()\n\t\t{\n\t\t\t@session_start();\n\t\t\t$logged=$_SESSION['loggedIn'];\n\t\t\t$redirectPage=$_SERVER['REQUEST_URI'];\n\t\t\tif($logged==false){\n\t\t\t\tsession_destroy();\n\t\t\t\tsession_start();\n\t\t\t\tSession::set('redirectPage',$redirectPage);\n\t\t\t\t echo '<script type=\"text/javascript\">';\n\t\t echo 'window.location.href=\"'.$URL.'/login\";';\n\t\t echo '</script>';\n\t\t echo '<noscript>';\n\t\t echo '<meta http-equiv=\"refresh\" content=\"0;url='.$url.'\" />';\n\t\t echo '</noscript>'; \n\t\t\t\texit;\t\n\t\t\t}\t\t\n\t\t\tif (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 3600)) {\n\t\t\t // last request was more than 60 minutes ago\n\t\t\t session_destroy();\n\t\t\t\tsession_start();\n\t\t\t Session::set('redirectPage',$redirectPage);\n\t\t\t echo '<script type=\"text/javascript\">';\n\t\t echo 'window.location.href=\"'.$URL.'/login\";';\n\t\t echo '</script>';\n\t\t echo '<noscript>';\n\t\t echo '<meta http-equiv=\"refresh\" content=\"0;url='.$url.'\" />';\n\t\t echo '</noscript>'; \n\t\t\t\texit;\t\n\t\t\t}\n\t\t\t$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp\n\t\t\t\n\t\t}", "public function login ($request)\n {\n if ($request->getMethod() === 'POST') {\n\n $datas = $this->getParams($request);\n $users = $this->container->get('users.login');\n $user = $this->getNewEntity($datas);\n\n $found_username = array_search($user->username, array_column($users,'username'));\n $found_email = array_search($user->username, array_column($users,'email'));\n\n // Match -> (Username or Email) and Password Ok\n if (\n (strlen($found_username) > 0) &&\n (password_verify($user->password,$users[$found_username]['password'])) ||\n (strlen($found_email) > 0) && \n (password_verify($user->password,$users[$found_email]['password'])) \n ) {\n return $this->openGate($user); \n }\n\n }\n\n // fuction for encrypt new password\n // $this->encrypt('password');die();\n\n $header = $this->getHeaderEntity('login');\n $username = '';\n return $this->renderer->render($this->viewPath . '/login', compact('header', 'username'));\n }", "public function login() {\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\treturn $this->redirect($this->Auth->redirect());\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Invalid username or password, try again'));\n\t\t\t}\n\t\t}\n\t}", "public function loginUri(Request $request);", "public function login(Request $request)\n {\n //\n }", "public function login();", "public function login();", "private function user_login() {\n\t\t\t// Cross validation if the request method is POST else it will return \"Not Acceptable\" status\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\tif(!isset($_POST['password']) && !isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email and password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['password'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t$email = $this->_request['email'];\n\t\t\t$password = $this->_request['password'];\n\t\t\t$hashed_password = sha1($password);\n\t\t\t\t\t\t\t\t\t\t// Input validations\n\t\t\tif(!empty($email) and !empty($password)) {\n\t\t\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t$sql = \"SELECT user_name, user_email, user_phone_no, user_pic, user_address, remember_token\n\t\t\t\t\t\t\t\t\tFROM table_user\n\t\t\t\t\t\t\t\t\tWHERE user_email = '$email'\n\t\t\t\t\t\t\t\t\tAND user_password = '\".$hashed_password.\"'\n\t\t\t\t\t\t\t\t\tLIMIT 1\";\n\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n if($stmt->rowCount()=='0') {\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n $this->response($this->json($error), 200);\n }\n\t\t\t\t\t\t$error = array('status' => \"Success\", \"msg\" => \"Sucessfully Login!\", \"data\" => json_encode($results) );\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Fields are required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t// If invalid inputs \"Bad Request\" status message and reason\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n\t\t\t$this->response($this->json($error), 200);\n\t\t}", "private function doLogin()\n {\n if (!isset($this->token)) {\n $this->createToken();\n $this->redis->set('cookie_'.$this->token, '[]');\n }\n\n $loginResponse = $this->httpRequest(\n 'POST',\n 'https://sceneaccess.eu/login',\n [\n 'form_params' => [\n 'username' => $this->username,\n 'password' => $this->password,\n 'submit' => 'come on in',\n ],\n ],\n $this->token\n );\n\n $this->getTorrentsFromHTML($loginResponse);\n }", "protected function loginAuthenticate(){\n\n\t\t\n\t}", "public function __handleAuthentication() {\n $allowActions = array('adminLogin');\n\n if(strpos($this->action, 'admin') !== false && !in_array($this->action, $allowActions)) {\n $params = $this->getParams();\n\n if(empty($params['token']) || !$this->Session->check($params['token'])) {\n $this->sendError(API_MSG_INCORRECT_INPUT, API_CODE_NG, API_HTTP_CODE_200);\n }\n }\n }", "public function processLoginAction(Request $request, Application $app)\n {\n // Set the 'user logged in' session to false (default value)\n $_SESSION['isUserLoggedIn'] = false;\n\n // Retrieve user details from the text input (username and password)\n $usernameFromInput = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\n $passwordFromInput = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n\n // Retrieve details from Database\n $user = Login::getOneByUsername($usernameFromInput);\n\n // If username from input field is not empty and password is verified\n if ($user) {\n\n // Retrieve details from Database\n $usernameFromDb = $user->getUsername();\n //$passwordFromDb = $user->getPassword();\n\n $isPresent = LoginController::matchUserWithPassword($usernameFromInput, $passwordFromInput);\n $isRole = Login::matchUserWithRole($usernameFromDb);\n\n if ($usernameFromInput != $usernameFromDb) {\n return $app->redirect('/index');\n }\n\n // If username exists, and password matches\n if ($isPresent != null) {\n\n // Store username in 'user' in 'session'\n $app['session']->set('user', array('username' => $usernameFromDb));\n\n // Set the 'user logged in' session to true\n $_SESSION['isUserLoggedIn'] = true;\n\n // If role is assigned to the user, redirect the user to the specific page\n if ($isRole) {\n if ($user->getRole() == 'admin') {\n return $app->redirect('/adminIndex');\n } elseif ($user->getRole() == 'student') {\n return $app->redirect('/studentIndex');\n } elseif ($user->getRole() == 'member') {\n return $app->redirect('/memberIndex');\n }\n }\n }\n }\n\n $argsArray = [\n 'loginError' => 'Wrong Username or Password! Try again!'\n ];\n\n $templateName = 'index';\n return $app['twig']->render($templateName . '.html.twig', $argsArray);\n }", "public function login(Request $request)\n {\n Auth::attempt($request->input());\n echo json_encode(['status' => Auth::check()]);\n }", "public function usersLogin() {\n // login uses its own handle\n $httpLogin = $this->_prepareLoginRequest();\n $url = $this->_appendApiKey($this->uriBase . '/users/login.json');\n $data = array('login' => $this->username, 'password' => $this->password);\n return $this->_processRequest($httpLogin, $url, 'post', $data);\n }", "public function login() {\r\n if ($this->request->is('post')) {\r\n \r\n //If the user is authenticated...\r\n if ($this->Auth->login()) {\r\n \r\n if ($this->isAdmin()) $this->redirect(\"/admin/halls\");\r\n else $this->redirect(\"/halls\");\r\n }\r\n else {\r\n $this->Session->setFlash(__('Invalid username or password, try again'));\r\n }\r\n }\r\n }", "public function doLogin()\n {\n\n //check if all the fields were filled\n if (!Request::checkVars(Request::postData(), array('username', 'password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"Complete all the fields!\", \"type\" => \"error\")));\n exit;\n }\n\n //create the user entity with the spcific login data\n $userEntity = new User(array('username' => Request::post('username'), 'password' => Request::post('password'), 'email' => null, 'name' => null));\n\n //check if the user exists and get it as entity if exists\n if (!$userEntity = $this->repository->findUser($userEntity)) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The username does not exist!\", \"type\" => \"error\")));\n exit;\n }\n\n //get the user ID from database\n $userEntity->setAttr('access', $this->repository->getAccessByUsername(Request::post('username')));\n\n //check if the login credentials are correct for login\n if (!$this->repository->checkLogin($userEntity, Request::post('password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The user/email is incorrect!\", \"type\" => \"error\")));\n exit;\n }\n\n $userEntity->setAttr('access', $this->repository->getAccessByUsername(Request::post('username')));\n\n //set the session using the user data\n $this->session->setSession($userEntity);\n\n echo json_encode(\n array(\n \"swal\" => array(\"title\" => \"Success!\", \"text\" => \"You successfully logged in!\", \"type\" => \"success\", \"hideConfirmButton\" => true),\n \"redirect\" => array(\"url\" => BASE_URL . '/index.php?page=home', 'time' => 1)\n )\n );\n }", "public function postLogin()\n\t{\n\t\tif (Auth::attempt(Input::only('email', 'password')))\n\t\t{\n\t\t\treturn Redirect::to('/')->withErrors('You have successfully logged in!');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Redirect::to('/')->withErrors('Invalid Credentials')->withInput();\n\t\t}\n\n\t}", "function handle_logins()\n{\n if (get_param_integer('httpauth', 0) == 1) {\n require_code('users_inactive_occasionals');\n force_httpauth();\n }\n $username = trim(post_param_string('login_username', ''));\n if (($username != '') && ($username != do_lang('GUEST'))) {\n require_code('users_active_actions');\n handle_active_login($username);\n }\n\n // If it was a log out\n $page = get_param_string('page', ''); // Not get_page_name for bootstrap order reasons\n if (($page == 'login') && (get_param_string('type', '', true) == 'logout')) {\n require_code('users_active_actions');\n handle_active_logout();\n }\n}", "function SubmitLoginDetails()\n\t{\n\t\t// Login logic is handled by Application::CheckAuth method\n\t\tAuthenticatedUser()->CheckAuth();\n\t}", "public function login()\n {\n // make sure request is post\n if( ! SCMUtility::requestIsPost())\n {\n View::make('templates/system/error.php',array());\n return;\n }\n\n $email = SCMUtility::stripTags( (isset($_POST['email'])) ? $_POST['email'] : '' );\n $password = SCMUtility::stripTags( (isset($_POST['password'])) ? $_POST['password'] : '' );\n\n if( ! Session::Auth($email,$password) )\n {\n SCMUtility::setFlashMessage('Invalid email/password.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n }", "public function doLogin(){\n $rules = array(\n 'userid' => 'required|max:30',\n 'password' => 'required',\n );\n $display = array(\n 'userid' => 'User ID',\n 'password' => 'Password'\n );\n\n $validator = \\Validator::make(\\Input::all(), $rules, array(), $display);\n if($validator->fails()) {\n return \\Redirect::back()\n ->withErrors($validator)\n ->withInput(\\Input::all());\n }else{\n $user = User::where('username', '=', \\Input::get('userid'))\n ->first();\n if(isset($user->id)){\n if($user->level < 3) {\n if (\\Hash::check(\\Input::get('password'), $user->password)) {\n \\Session::put('logedin', $user->id);\n \\Session::put('loginLevel', $user->level);\n \\Session::put('nickname', $user->nickname);\n }\n return \\Redirect::nccms('/');\n }else{\n \\Session::flash('error', 'Permission Error.');\n return \\Redirect::nccms('login');\n }\n }else{\n \\Session::flash('error', 'Email/Password Error.');\n return \\Redirect::nccms('login');\n }\n }\n }", "public function login(Request $request) {\n $result = array('status' => false, 'data' => $request->all(), 'messages' => array('success' => '', 'errors' => ''));\n\n return ($request->isMethod('POST')) ? $this->mainController->doLogin($request->all()) : $result;\n }", "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db fpr this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token\n FROM users\n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the db, it means login failed\n if(!$token) {\n\n Router::redirect(\"/users/login/error\");\n \n\n # But if we did, login succeeded!\n } else {\n\n \n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n \n\n # Send them to the main page - or wherevr you want them to go\n Router::redirect(\"/\");\n # Send them back to the login page\n }\n }", "public function login() {\n $userName = Request::post('user_name');\n $userPassword = Request::post('user_password');\n if (isset($userName) && isset($userPassword)) {\n // perform the login method, put result (true or false) into $login_successful\n $login_successful = LoginModel::login($userName, $userPassword);\n\n // check login status: if true, then redirect user login/showProfile, if false, then to login form again\n if ($login_successful) {\n //if the user successfully logs in, reset the count\n $userID = Session::get('user_id');\n LoginModel::validLogin($userID);\n Redirect::to('login/loginHome');\n } else {\n Redirect::to('login/index');\n }\n }\n }", "public function action_login()\n {\n if(\\Auth::check())\n {\n \\Response::redirect('admin/dashboard');\n }\n\n // Set validation\n $val = \\Validation::forge('login');\n $val->add_field('username', 'Name', 'required');\n $val->add_field('password', 'Password', 'required');\n\n // Run validation\n if($val->run())\n {\n if(\\Auth::instance()->login($val->validated('username'), $val->validated('password')))\n {\n \\Session::set_flash('success', \\Lang::get('nvadmin.public.login_success'));\n \\Response::redirect('admin/dashboard');\n }\n else\n {\n $this->data['page_values']['errors'] = \\Lang::get('nvadmin.public.login_error');\n }\n }\n else\n {\n $this->data['page_values']['errors'] = $val->show_errors();\n }\n\n // Set templates variables\n $this->data['template_values']['subtitle'] = 'Login';\n $this->data['template_values']['description'] = \\Lang::get('nvadmin.public.login');\n $this->data['template_values']['keywords'] = 'login, access denied';\n }", "public function executeLogin(sfWebRequest $request) {\n $this->getUser()->login();\n $this->forward($request->getParameter('module'), $request->getParameter('action'));\n }", "public function login()\n\t{\n\n\t\tif ( ( $this->get_access_key() === null || $this->get_access_secret() === null ) )\n\t\t{\n echo 'case 1';\n $oauth = new \\OAuth( $this->tokens['consumer_key'], $this->tokens['consumer_secret'] );\n\n $request_token_info = $oauth->getRequestToken( $this->request_token_url, $this->get_callback() );\n\n if ($request_token_info)\n {\n\n $this->set_request_tokens( $request_token_info );\n }\n\n // Now we have the temp credentials, let's get the real ones.\n\n // Now let's get the OAuth token\n\t\t\t\\Response::redirect( $this->get_auth_url() );\n return;\n\t\t}\n\n\t\treturn $this->check_login();\n\t}", "public function doAuthentication();", "function loginHandler($inputs = []) {\n $username = $inputs['username'];\n $password = $inputs['password'];\n $sql = 'SELECT * FROM `admin` WHERE `name` = ? AND password = ?';\n $res = getOne($sql, [$username, $password]);\n if (!$res) {\n formatOutput(false, 'username or password error');\n }\n else{\n $buildingRes = getOne(\"SELECT * FROM `admin_building` WHERE admin_id =?\", [$res['id']]);\n $bid = isset($buildingRes['building_id']) ? $buildingRes['building_id'] : '0';\n setLogin($res['id'],$bid);\n formatOutput(true, 'login success', $res);\n }\n}", "public function onSignin()\n {\n try {\n /*\n * Validate input\n */\n $data = post();\n $rules = [];\n\n $rules['login'] = 'required|email|between:6,255';\n\n $rules['password'] = 'required|between:6,255';\n\n if (!array_key_exists('login', $data)) {\n $data['login'] = post('username', post('email'));\n }\n\n $validation = Validator::make($data, $rules);\n if ($validation->fails()) {\n throw new ValidationException($validation);\n }\n\n /*\n * Authenticate user\n */\n $credentials = [\n 'login' => array_get($data, 'login'),\n 'password' => array_get($data, 'password')\n ];\n\n Event::fire('rainlab.user.beforeAuthenticate', [$this, $credentials]);\n\n $user = Auth::authenticate($credentials, true);\n if ($user->isBanned()) {\n Auth::logout();\n throw new AuthException(/*Sorry, this user is currently not activated. Please contact us for further assistance.*/'rainlab.user::lang.account.banned');\n }\n\n /*\n * Redirect\n */\n if ($redirect = $this->makeRedirection(true)) {\n return $redirect;\n }\n }\n catch (Exception $ex) {\n if (Request::ajax()) throw $ex;\n else Flash::error($ex->getMessage());\n }\n }", "public function executeLogin(sfWebRequest $request)\n {\n //set the referrer used when loggin in.\n $this->getUser()->setReferer($this->getContext()->getActionStack()->getSize() > 1 ? $request->getUri() : $request->getReferer());\n \n $this->form = new sfAuthSigninForm();\n \n if ($request->isMethod('post')) {\n $this->form->bind($request->getParameter('sf_auth_signin'));\n \n if ($this->form->isValid()) {\n $this->getUser()->setFlash('success', $this->getContext()->getI18N()->__('Welcome back :)'));\n \n $referer = $this->getUser()->getReferer($request->getReferer());\n $this->redirectUnless(empty($referer), $referer);\n $this->redirect('@homepage'); \n }\n }\n }", "public function login()\n\t{\n\t\tif ( func_get_args() ) {\n\t\t\t$args = phpSmug::processArgs( func_get_args() );\n\t\t\tif ( array_key_exists( 'EmailAddress', $args ) ) {\n\t\t\t\t// Login with password\n\t\t\t\t$this->request( 'smugmug.login.withPassword', array( 'EmailAddress' => $args['EmailAddress'], 'Password' => $args['Password'] ) );\n\t\t\t} else if ( array_key_exists( 'UserID', $args ) ) {\n\t\t\t\t// Login with hash\n\t\t\t\t$this->request( 'smugmug.login.withHash', array( 'UserID' => $args['UserID'], 'PasswordHash' => $args['PasswordHash'] ) );\n\t\t\t}\n\t\t\t$this->loginType = 'authd';\n\t\t\t\n\t\t} else {\n\t\t\t// Anonymous login\n\t\t\t$this->loginType = 'anon';\n\t\t\t$this->request( 'smugmug.login.anonymously' );\n\t\t}\n\t\t$this->SessionID = $this->parsed_response['Login']['Session']['id'];\n\t\treturn $this->parsed_response ? $this->parsed_response['Login'] : FALSE;\n\t}", "public function login()\n {\n $login = new Login();\n\n $path = '/inloggen';\n if (CSRF::validate() && $login->check()) {\n // try to send the user to the reservation form or sign up for meet the expert page\n $path = Session::get('path');\n unset($_SESSION['path']);\n\n if (empty($path)) {\n $path = '/';\n }\n }\n\n return new RedirectResponse($path);\n }", "public function authenticate()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('login', Input::only('email', 'password'));\n\n\t\t# if the user was authenticated\n\t\tif(isset($response['success']))\n\t\t{\t\n\t\t\t# save the returned user object to the session for later use\n\t\t\tUser::startSession($response['success']['data']['user']);\n\n\t\t\t# we got here from a redirect. if they came via a new account registration then reflash the \n\t\t\t# session so we can use the data on the next page load\n\t\t\tif(Session::has('success')) {\n\t\t\t\tSession::reflash();\n\t\t\t}\t\t\t\n\n\t\t\tif(Input::get('redirect') && ! Session::has('ignoreRedirect')) {\n\t\t\t\treturn Redirect::to(Input::get('redirect'));\n\t\t\t}\n\n\t\t\t# and show the profile page\n\t\t\treturn Redirect::to('profile');\t\n\t\t}\n\t\t# auth failed. return to the log in screen and display an error\n\t\telse \n\t\t{ \n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('login-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\n\t\t\t# ... and show the log in page again\n\t\t\treturn Redirect::to('login');\n\t\t}\n\t}", "public function login(Request $request)\n {\n $this->validateLogin($request);\n\n $user = Sentinel::authenticateAndRemember($request->only($this->username(), 'password'));\n\n if ($request->ajax()) {\n if (! $user) {\n $response = [\n 'status' => 'error',\n 'message' => __('These credentials do not match our records.')\n ];\n\n return response()->json($response);\n }\n\n $response = [\n 'status' => 'success',\n 'message' => __('Successfull Login'),\n 'user' => $user\n ];\n\n return response()->json($response);\n }\n\n if (! $user) {\n return back()->with('error', __('These credentials do not match our records.'));\n }\n\n AccessLog::add($user);\n\n return redirect(route('shopper.dashboard.home'))->with('success', __('Successfull Login'));\n }", "public function actionLogin()\n {\n \\Yii::$app->response->format = Response::FORMAT_JSON;\n\n if(Yii::$app->request->isPost) {\n\n $model = new LoginForm();\n\n\n if ($model->load(Yii::$app->getRequest()->getBodyParams(), '') && $model->login()) {\n\n return ['status'=> 'success', 'access_token' => Yii::$app->user->identity->getAuthKey()];\n } else {\n\n return ['status' => 'error', 'message' => 'Wrong username or password'];;\n }\n\n }\n\n\n return ['status' => 'wrong', 'message' => 'Wrong HTTP method, POST needed'];\n }", "function memberLoginHandler() {\n global $inputs;\n\n $username = $inputs['username'];\n $password = $inputs['password'];\n $sql = 'select * from `member` where name = ? and password = ?';\n $res = getOne($sql, [$username, $password]);\n\n if (!$res) {\n formatOutput(false, 'username or password error');\n } else {\n setMemberLogin($res['id']);\n formatOutput(true, 'login success', $res);\n }\n}", "public function login(Request $request)\n {\n $this->validateLogin($request); \n\n if ($user = $this->attemptLogin($request)) {\n return $this->sendLoginResponse($request, $user);\n } \n\n return $this->sendFailedLoginResponse($request);\n }", "public function postLogin(Request $request)\n {\n $this->validate($request, [\n 'email' => 'required|email',\n 'password' => 'required',\n ]);\n\n $credentials = $request->all();\n $remember = false;\n\n if(array_key_exists('remember', $credentials)){\n $remember = true;\n }\n\n try {\n if($user = Sentinel::authenticate($credentials, $remember)){\n Sentinel::login($user);\n return redirect()->route('admin.dashboard');\n }\n Session::flash('message', \"Your email/password combination do not match!\");\n return redirect()->back();\n\n } catch(NotActivatedException $e) {\n Session::flash('message', \"Your account has not been activated yet.\");\n return redirect()->back();\n } catch(ThrottlingException $e) {\n $min = intval($e->getDelay() / 60);\n $timeToGo = $min . ':' . str_pad(($e->getDelay() % 60), 2, '0', STR_PAD_LEFT);\n Session::flash('message', \"Your IP is blocked, You will have to wait \". $timeToGo . \" minutes\");\n return redirect()->back();\n }\n\n }", "public function LoginCheck()\n {\n $protocol = Yii::app()->params['protocol'];\n $servername = Yii::app()->request->getServerName();\n $user = Yii::app()->session['username'];\n if (empty($user)) {\n $returnUrl = $protocol . $servername . Yii::app()->homeUrl;\n $this->redirect($returnUrl);\n }\n }", "public function loginProcess(UserLoginRequest $request)\n {\n $processReaction = $this->userEngine->processLogin($request->all());\n\n return __processResponse($processReaction, [\n 1 => __('Welcome, you are logged in successfully.'),\n 2 => __('Authentication failed. Please check your \n email/password & try again.'),\n ], [], true);\n }", "abstract public function loginAction(Celsus_Parameters $parameters, Celsus_Response_Model $responseModel);", "public function postLogin(Request $request)\n {\n $backToLogin = redirect()->route('admin-login')->withInput();\n $findUser = Sentinel::findByCredentials(['login' => $request->input('email')]);\n\n\n // If we can not find user based on email...\n if (! $findUser) {\n flash()->error('Wrong email or username!');\n\n return $backToLogin;\n }\n\n try {\n $remember = (bool) $request->input('remember_me');\n // If password is incorrect...\n if (! Sentinel::authenticate($request->all(), $remember)) {\n flash()->error('Wrong email or username!');\n\n return $backToLogin;\n }\n\n if (strtolower(Sentinel::check()->roles[0]->slug) == 'cro') {\n flash()->error('You Have No Access!');\n Sentinel::logout();\n return $backToLogin;\n }\n\n $log['description'] = 'A user log in';\n $insertLog = new LogActivity();\n $insertLog->insertNewLogActivity($log);\n\n flash()->success('Login success!');\n //return redirect()->route('admin-dashboard');\n return redirect()->route('admin-index-event');\n } catch (ThrottlingException $e) {\n\n $log['description'] = 'A user login failed because too many attempts';\n $insertLog = new LogActivity();\n $insertLog->insertNewLogActivity($log);\n\n flash()->error('Too many attempts!');\n } catch (NotActivatedException $e) {\n flash()->error('Please activate your account before trying to log in.');\n } catch (\\Exception $e) {\n\n $log['description'] = $e->getMessage().' '.$e->getFile().' on line:'.$e->getLine();\n $insertLog = new LogActivity();\n $insertLog->insertNewLogActivity($log);\n \n }\n\n return $backToLogin;\n }", "public function login() {\r\n if (!empty($_POST)) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n\r\n $hash = hash('sha512', $password . Configuration::USER_SALT);\r\n unset($password);\r\n\r\n $user = UserModel::getByUsernameAndPasswordHash($username, $hash);\r\n unset($hash);\r\n\r\n if ($user) {\r\n Session::set('user_id', $user->user_id);\r\n Session::set('username', $username);\r\n Session::set('ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR'));\r\n Session::set('ua', filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING));\r\n\r\n Misc::redirect('');\r\n } else {\r\n $this->set('message', 'Nisu dobri login parametri.');\r\n sleep(1);\r\n }\r\n }\r\n }" ]
[ "0.7669814", "0.74851155", "0.7442612", "0.72329086", "0.7112905", "0.7103887", "0.70698494", "0.7055757", "0.7029516", "0.6985367", "0.6953118", "0.69134593", "0.6885101", "0.687445", "0.6863917", "0.6856037", "0.6848747", "0.684784", "0.68152297", "0.680864", "0.68045515", "0.67792654", "0.6771233", "0.67666423", "0.67659724", "0.67419285", "0.67255026", "0.66824514", "0.66804695", "0.6661723", "0.66615164", "0.66599214", "0.6653103", "0.6650553", "0.664819", "0.66480184", "0.66423595", "0.66292566", "0.6616117", "0.66158235", "0.6614166", "0.66131216", "0.66108733", "0.66001797", "0.6598898", "0.65979165", "0.65857095", "0.6582395", "0.65822494", "0.65788734", "0.657026", "0.65687394", "0.65674514", "0.6563829", "0.6560272", "0.6560272", "0.65553254", "0.6548969", "0.6548335", "0.65271837", "0.6519302", "0.65027267", "0.64946365", "0.64946365", "0.64943993", "0.64915204", "0.64838105", "0.6480556", "0.6471744", "0.6466453", "0.64642614", "0.64604133", "0.6456966", "0.64559203", "0.6455759", "0.64528894", "0.64402467", "0.6433877", "0.6431453", "0.64256763", "0.6411047", "0.6408026", "0.6405608", "0.64052635", "0.64042723", "0.64006245", "0.63940746", "0.6390829", "0.6385385", "0.63831717", "0.63792276", "0.63753724", "0.6374533", "0.6369184", "0.6369093", "0.63690686", "0.6366873", "0.6366771", "0.6365373", "0.6362475", "0.635908" ]
0.0
-1
Get the failed login response instance.
protected function sendDisabledLoginResponse(Request $request) { $errors = [$this->username() => trans('auth.disabled')]; if ($request->expectsJson()) { return response()->json($errors, 422); } return redirect()->back() ->withInput($request->only($this->username(), 'remember')) ->withErrors($errors) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function sendFailedLoginResponse()\n {\n return response()->json([\n 'message' => $this->errorMessage,\n ], 401);\n }", "public function getErrorResponse()\n {\n $result['responseCode'] = self::RESPONSE_LOGIN_ERROR;\n return $result;\n }", "public function authenticationFailure()\n {\n return $this->sendFailed(\"not authenticated\");\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n $errors = [$this->username() => trans('auth.failed')];\n\n // Load user from database\n $user = User::where($this->username(), $request->{$this->username()})->first();\n\n // Check if user was successfully loaded, that the password matches\n // and active is not 1. If so, override the default error message.\n if ($user && \\Hash::check($request->password, $user->password) && $user->isactive == 0) {\n $errors = [$this->username() => trans('auth.notactivated')];\n } else if ($user && \\Hash::check($request->password, $user->password) && $user->isactive == 2) {\n $errors = [$this->username() => trans('auth.deactivated')];\n }\n\n if ($request->expectsJson()) {\n return response()->json($errors, 422);\n }\n return redirect()->back()\n ->withInput($request->only($this->username(), 'remember'))\n ->withErrors($errors);\n }", "protected function getFailedLoginMessage()\n\t{\n\t\treturn 'These credentials do not match our records.';\n\t}", "protected function sendFailedLoginResponse(Request $request) {\n return redirect()->back()->withInput($request->only($this->loginUsername(),\n 'remember'))->withFrom($request->path())->withErrors([\n $this->loginUsername() => $this->getFailedLoginMessage(),\n ]);\n }", "public static function failed(): self\n {\n return self::getInstance('FAILED');\n }", "protected function sendFailedLoginResponse(LoginRequest $request)\n {\n return redirect()->back()\n ->withInput($request->only('login', 'remember'))\n ->withErrors([\n 'login' => Lang::get('auth.failed'),\n ]);\n }", "public function get_response()\r\n {\r\n $response = Response::factory()\r\n ->status(401)\r\n ->headers('Location', URL::site('user/enter'));\r\n return $response;\r\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n return redirect()->back()\n ->withInput($request->only('email', 'remember'))\n ->withErrors([\n 'email' => $this->getFailedLoginMessage(),\n ]);\n }", "public function getLoginFailedReason() {\n\t\treturn $this->error;\n\t}", "protected function getFailedLoginMessage()\n {\n\n $user = User::where('email',\\Request::only('email'))\n ->where('active',0)->first();\n $password = \\Request::only('password');\n\n\n\n if ($user != null){\n\n extract($password);\n\n if(\\Hash::check($password, $user->password)){\n\n return \\Lang::has('auth.active')\n ? \\Lang::get('auth.active')\n : 'Active your account.';\n }\n\n\n }else{\n\n return \\Lang::has('auth.failed')\n ? \\Lang::get('auth.failed')\n : 'These credentials do not match our records.';\n }\n }", "protected function getFailedLoginMessage()\n {\n return \\Lang::has('auth.failed')\n ? \\Lang::get('auth.failed')\n : 'Email atau password anda salah';\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n return redirect()->back()\n ->withInput($request->only($this->username(), 'remember'))\n ->withErrors([\n $this->username() => Lang::get('auth.failed'),\n ]);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n return redirect()->back()\n ->withInput($request->only($this->loginUsername(), 'remember'))\n ->withErrors([\n $this->loginUsername() => $this->getFailedLoginMessage(),\n ]);\n }", "public function getLastErrorResponse() {\n if (!empty($this->rawResponses)) {\n foreach (array_reverse($this->rawResponses) as $x) {\n if (isset($x['error'])) {\n return $x;\n }\n }\n }\n }", "public function getAuthenticationException();", "private function loginFailed()\n {\n //Login failed...\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n return response()->json([\n 'status' => 'failed',\n 'message' => Lang::get('auth.failed')\n ], 401);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n return response()->json([\n 'success' => false,\n 'errors' => [\n $this->username() => trans('auth.failed'),\n ]\n ], 401);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n $errors = [$this->username() => trans('auth.failed')];\n\n if ($request->expectsJson()) {\n return response()->json($errors, 422);\n }\n\n return redirect('/?ref=login')->withInput($request->only($this->username(), 'remember'))->withErrors($errors);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n if($request->wantsJson() || $request->isJson()) {\n return response($this->getFailedLoginMessage(), 401);\n }\n\n return redirect()->back()\n ->withInput($request->only($this->loginUsername(), 'remember'))\n ->withErrors([\n $this->loginUsername() => $this->getFailedLoginMessage(),\n ]);\n }", "public function getInvalidUserResponse()\n {\n $result['responseCode'] = self::RESPONSE_INVALID_USER;\n return $result;\n }", "protected function getFailedLoginMessage()\n {\n //return Lang::has('auth.failed')\n //? Lang::get('auth.failed')\n //: '账号或密码错误';\n return '账号或密码错误';\n }", "protected function sendFailedLoginResponse(Request $request): RedirectResponse\n {\n return redirect()\n ->back()\n ->withInput($request->only($this->username(), 'remember'))\n ->withErrors([\n $this->username() => Lang::get('auth.failed'),\n 'password' => Lang::get('auth.failed')\n ]);\n }", "public static function FAILURE()\n {\n return self::getInstance(__METHOD__);\n }", "private static function generateFailedAuthResponse(&$response) {\n $response->getHeaders()->addHeaders([\n 'Date' => gmdate('D, d M Y H:i:s T'),\n 'Content-Type' => 'application/json; charset=UTF-8'\n ]);\n $response->setContent(\\Zend\\Json\\Json::encode(['success' => false, 'data' => false, 'errors' => 'Request authorization failed, check keys/payload']));\n $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');\n $response->setStatusCode(403);\n }", "public function testFailLogin()\n {\n $response = $this->call('GET', '/api/v1/login?email=surganda@gmail.com&password=12345');\n \n $this->assertEquals(401, $response->status());\n }", "public function onAuthenticationFailure(\n Request $request,\n AuthenticationException $exception)\n {\n return new Response('Authentication Failed. ', 403);\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception)\n {\n// $exception,\n// new JWTAuthenticationFailureResponse($exception->getMessage())\n// );\n\n $event = new AuthenticationFailureEvent(\n $exception,\n new JWTAuthenticationFailureResponse(\n $this->translator->trans('Invalid credentials.')\n )\n );\n if ($this->dispatcher instanceof ContractsEventDispatcherInterface) {\n $this->dispatcher->dispatch($event, Events::AUTHENTICATION_FAILURE);\n } else {\n $this->dispatcher->dispatch(Events::AUTHENTICATION_FAILURE, $event);\n }\n\n return $event->getResponse();\n }", "public function failed()\n {\n $this->status = JSendResponse::STATUS_FAIL;\n\n return $this;\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response\n {\n if ($request->hasSession()) {\n $request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception);\n }\n\n if ($exception instanceof BadCredentialsException) {\n $msg = 'Invalid credentials.';\n } else {\n $msg = $exception->getMessage();\n }\n return new JsonResponse(['error' => 1, 'message' => $msg]);\n }", "function alt_failed_login()\n {\n return 'The login information you have entered is incorrect.';\n }", "public function get_response()\n {\n return BootphpException::response($this);\n }", "public static function accessTokenFetchFailed(Response $response)\n {\n return new static(sprintf(\n \"Fetching access token from Procountor failed. '%s'\",\n $response->body()\n ));\n }", "public function testOnAuthenticationFailure(): void\n {\n $this->serverService->expects($this->once())\n ->method('getVariable')\n ->with('realm')\n ->will($this->returnValue('mock_realm'))\n ;\n\n $response = $this->authenticator->onAuthenticationFailure(\n new Request(),\n new AuthenticationException('Authentication failure message')\n );\n\n $this->assertSame(401, $response->getStatusCode());\n $this->assertSame('{\"error\":\"access_denied\",\"error_description\":\"Authentication failure message\"}', $response->getContent());\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception): null|Response\n {\n $data = array(\n 'message' => strtr($exception->getMessageKey(), $exception->getMessageData())\n );\n\n return new JsonResponse($data, Response::HTTP_FORBIDDEN);\n }", "public function get_response() {\n $view = View::factory('Errors/default');\n\n // Remembering that `$this` is an instance of HTTP_Exception_404\n $view->message = $this->getMessage();\n\n $view->error_code = 500;\n $view->error_rant = \"something's wrong with our server\";\n $view->error_message = \"probably another rat ate our server cable. Please wait patiently :)\";\n\n $response = Response::factory()\n ->status(500)\n ->body($view->render());\n\n return $response;\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n $notify[\"status\"]=\"failed\";\n $notify[\"notify\"][]=\"Signing into the system was failed.\";\n $notify[\"notify\"][]=\"Please try again.\";\n\n $request->session()->flash(\"notify\", $notify);\n\n return redirect()->back();\n }", "protected function getFailedLoginMessage()\n\t{\n\t\treturn 'Địa chỉ email hoặc mật khẩu không đúng';\n\t}", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception)\n {\n return new RedirectResponse($request->getSession()->get('_security.jira_secured.login_path'));\n }", "public function login()\n\t{\n\n\t\ttry {\n\t\t\t$error = $this->getRequest()->getSession()->get('api.error');\n\t\t\t$this->getRequest()->getSession()->remove('api.error');\n\t\t\treturn compact('error');\n\t\t} catch (ValueNotFoundException $e) {\n\n\t\t}\n\t}", "public function testCantLoginWithInvalidCredentials()\n {\n // arrange \n $user = User::factory()->create();\n\n // act\n $response = $this->post(\"/login\", [\n \"email\" => $user->email,\n \"password\" => \"invalidpassword\"\n ]);\n\n // assert\n $response->assertStatus(302);\n $response->assertSessionHas(\"errors\");\n\n $messages = session(\"errors\")->getMessages();\n $this->assertEquals($messages[\"email\"][0], \"These credentials do not match our records.\");\n // dd($messages);\n }", "protected function invalidResponse(){\n return response()->json([\n 'ResultCode' => 1,\n 'ResultDesc' => 'Failed to complete the transaction',\n 'ThirdPartyTransID' => 0\n ]);\n\n }", "public function getError()\n {\n $errorMessage = null;\n \n if (!$this->isOk())\n {\n $errorMessage = $this->m_responseArray['message'];\n }\n else\n {\n throw new Exception('Calling getError when there was no error');\n }\n \n return $errorMessage;\n }", "public function handleFailure($response) {\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception);", "public static function failed()\n\t{\n\t\treturn Request::$failed;\n\t}", "public function getEnrollmentErrorResponse()\n {\n $result['responseCode'] = self::RESPONSE_ENROLLMENT_ERROR;\n return $result;\n }", "public function getLastError() {\n return $_SESSION['last_login_error'];\n }", "private static function response()\n {\n $response = self::$response;\n self::$response = [Key::STATUS => Key::FAILED, Key::CODE => '', Key::MESSAGE => '', Key::DATA => []];\n return $response;\n }", "public function lastFailedLoginAttemptAt() : ?DateTime\n {\n return $this->returnDateField('last_failed_login');\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n throw ValidationException::withMessages([\n $this->username() => [trans('auth.failed')],\n ]);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n throw ValidationException::withMessages([\n $this->username() => [trans('auth.failed')],\n ]);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n throw ValidationException::withMessages([\n $this->username() => [trans('auth.failed')],\n ]);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n throw ValidationException::withMessages([\n $this->username() => [trans('auth.failed')],\n ]);\n }", "public function testCreateFail()\n {\n // fail\n (new ExperimentRecruitingTokenResponse())->create(-1, 'fail', -1);\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception)\n {\n $datos = $request->request->all();\n $user = $datos[\"_username\"];\n $uri = $this->container->get('router')->generate('administrador_inicio_login_error', array('u'=> $user));\n $response = new RedirectResponse($uri);\n return $response;\n }", "public function getLoginResponse()\n {\n $result['responseCode'] = self::RESPONSE_LOGIN_OK;\n return $result;\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception)\n {\n $error = $exception->getMessage();\n\n $request->getSession()->set('login_error', $error);\n\n return new \\Symfony\\Component\\HttpFoundation\\RedirectResponse($this->router->generate('fos_user_security_login'));\n }", "protected function sendResetFailedResponse(Request $request, $response)\n {\n return response()->json([\n 'status' => 'error',\n 'msg' => __('messages.password.fail')\n ], 400);\n //return response()->json(['message' => 'Failed, Invalid Token.']);\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception)\n {\n $request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception);\n\n return new RedirectResponse($this->router->generate($this->parameters['route']['login']));\n }", "public function getBattleCheckFail()\n {\n return $this->get(self::_BATTLE_CHECK_FAIL);\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception)\n {\n $data = array(\n 'status' => Response::HTTP_FORBIDDEN,\n 'error' => 'Invalid token!', //strtr($exception->getMessageKey(), $exception->getMessageData()),\n 'data' => null\n );\n\n return new JsonResponse($data, Response::HTTP_FORBIDDEN);\n }", "public function testProcessLoginFailed(){\n\n Sentinel::disableCheckpoints();\n\n $credentials = [\n 'email' => 'admin@admin.com',\n 'password' => 'passwords',\n ];\n\n $response = $this->post(route('login.action', $credentials));\n\n $response->assertSessionHas('failed');\n $response->assertRedirect(route('login.form'));\n }", "protected function sendResetLinkFailedResponse( Request $request, $response )\n {\n return response( [ 'errors' => [trans( $response )] ], 422 );\n }", "public function testLoginFailure()\n {\n $mock = new MockHandler([\n new Response(400, [], '{\"error\": \"login failure\"}'),\n ]);\n\n $handler = HandlerStack::create($mock);\n $this->app->instance(Client::class, new Client(['handler' => $handler]));\n\n //login\n $this->post('api/user/login', ['email' => 'test@test.com', 'password' => 'password'], $this->headers)\n ->assertStatus(400)\n ->assertSeeText('login failure');\n\n }", "public function failed($message = 'Failed', $code = 400)\n {\n return response([\n \"status\" => false,\n \"message\" => __($message),\n ], $code);\n }", "public function failError()\n {\n if (\n ($packet = $this->getPacket()) and\n $packet['status'] !== Job::STATUS_FAILED and\n ($e = json_decode($packet['exception'], true))\n ) {\n return empty($e['error']) ? var_export($e, true) : $e['error'];\n }\n\n return 'Unknown exception';\n }", "protected function failedToAuthenticateUserMessage(): string\n {\n return 'Unable to authenticate with invalid token.';\n }", "private function createCapturePaymentIdIncorrectErrorResponse(): stdClass\n {\n $response = new stdClass();\n $response->captureErrors = new stdClass();\n $response->captureErrors->error = new stdClass();\n $response->captureErrors->error->_ = 'Payment id incorrect.';\n $response->captureErrors->error->code = 'REQUEST_DATA_INCORRECT';\n\n return $response;\n }", "protected function failure(string $message)\n {\n return response()->json([\n 'success' => false,\n 'msg' => $message,\n ]);\n }", "public function failed(\\Exception $exception)\n {\n if ($exception instanceof BadRequestException) {\n $code = 400;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_BAD_REQUEST);\n } elseif ($exception instanceof NotImplementedException) {\n $code = 501;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_NOT_IMPLEMENTED);\n } elseif ($exception instanceof ForbiddenException) {\n $code = 403;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_FORBIDDEN);\n } elseif ($exception instanceof NotFoundException) {\n $code = 404;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_NOT_FOUND);\n } elseif ($exception instanceof ConflictException) {\n $code = 409;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_CONFLICT);\n } elseif ($exception instanceof ServiceUnavailableException) {\n $code = 503;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_SERVICE_UNAVAILABLE);\n } else {\n $code = 500;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_INTERNAL);\n }\n $format = $this->responseStructure;\n $response = [];\n\n // Check exception type\n $type = self::ERROR_TYPE_MANDATORY;\n if ($exception instanceof DuplicateExceptionInterface) {\n $type = self::ERROR_TYPE_DUPLICATE;\n } else if ($exception instanceof MandatoryExceptionInterface) {\n $type = self::ERROR_TYPE_MANDATORY;\n }\n\n // Add error response message\n if ($exception instanceof ResponseMessageInterface) {\n $response = $exception->getResponse();\n }\n\n return $this->silexApp->$format(\n $this->mapper->generateMap(\n false,\n $response,\n array('message' => $failure, 'type' => $type)\n ))->setStatusCode($code);\n }", "public function getError()\r\n {\r\n if (isset($this->response['faultString'])) {\r\n return $this->response['faultString'];\r\n } elseif (isset($this->response['errmsg'])) {\r\n return $this->response['errmsg'];\r\n }\r\n return null;\r\n }", "public function onAuthenticationFailure(AuthenticationFailureEvent $event)\n {\n // TODO warn about login attempt on admin users accounts.\n }", "function failed_login () {\n\t\n return 'Your username and/or password is incorrect.';\n\n}", "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 failed(string $tokenString): \\Inertia\\Response\n {\n $pageTitle = 'Invite failed';\n\n $token = $this->invitation->findToken($tokenString);\n\n return $this->response(\n compact('pageTitle', 'token'),\n 'auth.invitation.failed'\n );\n }", "protected function fetchResponseError($response) {\n\t\tif (isset($response['error'])) {\n\t\t\treturn array(\n\t\t\t\t'code' => $response['error']['code'],\n\t\t\t\t'message' => $response['error']['message'],\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "protected function sendResetFailedResponse(Request $request, $response)\n\t{\n\t\t$message = ($response == Password::INVALID_USER) ? 'User does not exist' : 'Reset token is invalid';\n\t\treturn response()->json(['code' => 500, 'message' => trans($message), 'error' => []], 500);\n\t}", "protected function sendResetFailedResponse(Request $request, $response)\n {\n return $this->error(['email' => trans($response)], \"Password reset failed!\", 401);\n }", "public function getErrorResponses();", "protected function getBadRequestResponse()\n {\n $response = new Response();\n $response->setStatusCode(400);\n $response->setContent('Bad request');\n\n return $response;\n }", "public function getErrorResponse(): ?Error\n {\n return $this->errorResponse;\n }", "public function testLoginFailedFunctionality()\n {\n $this->expectOutputString(\"err_login_failed\");\n $email = 'test@example.com';\n $ctrl = new Controller();\n // Give it the wrong password\n $ctrl->login($email,'wrong password');\n\n }", "protected function sendResetFailedResponse(Request $request, $response)\n {\n return redirect()->back()\n ->withInput($request->only('email'))\n ->withErrors(['email' => trans($response)]);\n }", "protected function sendResetFailedResponse(Request $request, $response)\n {\n return redirect()->back()\n ->withInput($request->only('email'))\n ->withErrors(['email' => trans($response)]);\n }", "protected function sendResetFailedResponse(Request $request, $response)\n {\n return redirect()->back()\n ->withInput($request->only('email'))\n ->withErrors(['email' => trans($response)]);\n }", "protected function statusCodeFail(): int\n {\n return 401;\n }", "public function getInvalidChallengeResponse()\n {\n $result['responseCode'] = self::RESPONSE_INVALID_CHALLENGE;\n return $result;\n }", "private function createStatusErrorResponse(): stdClass\n {\n $response = new stdClass();\n $response->statusErrors = new stdClass();\n $response->statusErrors->error = new stdClass();\n $response->statusErrors->error->_ = 'Order could not be found with the given key.';\n $response->statusErrors->error->code = 'REQUEST_DATA_INCORRECT';\n\n return $response;\n }", "public static function userLoginFailed(){\n self::$IntelligenceService->addToIntelligenceStack(self::USER_INTELLIGENCE_LOGIN_KEY, self::USER_INTELLIGENCE_FAILED);\n }", "public function errorMessage() { return $this->errorMessage; }", "public function getFailureReason();", "private function getFailedLogins() {\n $last_logins = array();\n $cron_interval = $this->config('acquia_connector.settings')->get('spi.cron_interval');\n\n if (\\Drupal::moduleHandler()->moduleExists('dblog')) {\n $result = db_select('watchdog', 'w')\n ->fields('w', array('message', 'variables', 'timestamp'))\n ->condition('w.message', 'login attempt failed%', 'LIKE')\n ->condition('w.timestamp', REQUEST_TIME - $cron_interval, '>')\n ->condition('w.message', array(\n \"UPGRADE.txt\",\n \"MAINTAINERS.txt\",\n \"README.txt\",\n \"INSTALL.pgsql.txt\",\n \"INSTALL.txt\",\n \"LICENSE.txt\",\n \"INSTALL.mysql.txt\",\n \"COPYRIGHT.txt\",\n \"CHANGELOG.txt\",\n ), 'NOT IN')\n ->orderBy('w.timestamp', 'DESC')\n ->range(0, 10)\n ->execute();\n\n foreach ($result as $record) {\n $variables = unserialize($record->variables);\n if (!empty($variables['%user'])) {\n $last_logins['failed'][$record->timestamp] = Html::escape($variables['%user']);\n }\n }\n }\n return $last_logins;\n }", "public function getFailed(): int\n {\n return $this->failed;\n }", "private function determineErrorResponse(\n $exception,\n $message,\n ResponseInterface $response,\n ServerRequestInterface $request\n ) {\n $errorResponse = $this->getResponse();\n $this->emit(self::EVENT_LIFECYCLE_ERROR, $exception, $request, $errorResponse, $response);\n $this->error = true;\n\n if ( ! $errorResponse->getBody()->isWritable() ) {\n return $errorResponse;\n }\n\n $content = $errorResponse->getBody()->__toString();\n if ( empty($content) ) {\n $errorResponse->getBody()->write($message);\n }\n\n return $errorResponse;\n }", "protected function authenticationError(Exception $exception)\n {\n return $this->jsonResponse($exception->getMessage(), Response::HTTP_UNAUTHORIZED);\n }", "public function getFailedMessage()\n {\n if (array_key_exists(\"failedMessage\", $this->_propDict)) {\n return $this->_propDict[\"failedMessage\"];\n } else {\n return null;\n }\n }", "protected function sendResetLinkFailedResponse(Request $request, $response)\n {\n return response()->json(['erro' => trans($response)], 400);\n }", "public function getErrorMsg()\r\n {\r\n return $this->lastErrorMsg;\r\n }" ]
[ "0.7125313", "0.66206", "0.6566375", "0.6516578", "0.6394318", "0.6197063", "0.61886126", "0.61761606", "0.61624056", "0.6155329", "0.61095643", "0.6107442", "0.6068647", "0.6056417", "0.60313195", "0.60273534", "0.59978", "0.5986536", "0.5982837", "0.59571075", "0.5914038", "0.5885596", "0.58835244", "0.58661014", "0.58646166", "0.5832125", "0.5829438", "0.5819214", "0.57648563", "0.5726266", "0.57095987", "0.5709108", "0.5692016", "0.56904936", "0.5673909", "0.5671605", "0.5657604", "0.5648879", "0.56481224", "0.5625399", "0.5611273", "0.55970913", "0.55760086", "0.5550449", "0.5545668", "0.5531178", "0.5514902", "0.55145174", "0.5504482", "0.5496485", "0.5485101", "0.5483935", "0.5479528", "0.5479528", "0.5479528", "0.5479528", "0.54688513", "0.54595083", "0.544978", "0.5446978", "0.5442622", "0.54253733", "0.54227346", "0.54209155", "0.54184306", "0.54156244", "0.54003483", "0.53894836", "0.5380284", "0.53770405", "0.53752273", "0.5374408", "0.5374368", "0.53681844", "0.53663766", "0.5348545", "0.5343012", "0.53380626", "0.53380394", "0.53240997", "0.53066975", "0.5287109", "0.5286249", "0.5286234", "0.52833533", "0.5280847", "0.5280847", "0.5277799", "0.5276475", "0.5272259", "0.5267629", "0.52558404", "0.5239876", "0.5234235", "0.5227035", "0.5218615", "0.52141947", "0.5194155", "0.51861995", "0.5185015", "0.5183288" ]
0.0
-1
Get the failed login response instance.
protected function sendNotVerifiedLoginResponse(Request $request) { $errors = [$this->username() => trans('auth.verified')]; if ($request->expectsJson()) { return response()->json($errors, 422); } return redirect()->back() ->withInput($request->only($this->username(), 'remember')) ->withErrors($errors) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function sendFailedLoginResponse()\n {\n return response()->json([\n 'message' => $this->errorMessage,\n ], 401);\n }", "public function getErrorResponse()\n {\n $result['responseCode'] = self::RESPONSE_LOGIN_ERROR;\n return $result;\n }", "public function authenticationFailure()\n {\n return $this->sendFailed(\"not authenticated\");\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n $errors = [$this->username() => trans('auth.failed')];\n\n // Load user from database\n $user = User::where($this->username(), $request->{$this->username()})->first();\n\n // Check if user was successfully loaded, that the password matches\n // and active is not 1. If so, override the default error message.\n if ($user && \\Hash::check($request->password, $user->password) && $user->isactive == 0) {\n $errors = [$this->username() => trans('auth.notactivated')];\n } else if ($user && \\Hash::check($request->password, $user->password) && $user->isactive == 2) {\n $errors = [$this->username() => trans('auth.deactivated')];\n }\n\n if ($request->expectsJson()) {\n return response()->json($errors, 422);\n }\n return redirect()->back()\n ->withInput($request->only($this->username(), 'remember'))\n ->withErrors($errors);\n }", "protected function getFailedLoginMessage()\n\t{\n\t\treturn 'These credentials do not match our records.';\n\t}", "protected function sendFailedLoginResponse(Request $request) {\n return redirect()->back()->withInput($request->only($this->loginUsername(),\n 'remember'))->withFrom($request->path())->withErrors([\n $this->loginUsername() => $this->getFailedLoginMessage(),\n ]);\n }", "public static function failed(): self\n {\n return self::getInstance('FAILED');\n }", "protected function sendFailedLoginResponse(LoginRequest $request)\n {\n return redirect()->back()\n ->withInput($request->only('login', 'remember'))\n ->withErrors([\n 'login' => Lang::get('auth.failed'),\n ]);\n }", "public function get_response()\r\n {\r\n $response = Response::factory()\r\n ->status(401)\r\n ->headers('Location', URL::site('user/enter'));\r\n return $response;\r\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n return redirect()->back()\n ->withInput($request->only('email', 'remember'))\n ->withErrors([\n 'email' => $this->getFailedLoginMessage(),\n ]);\n }", "public function getLoginFailedReason() {\n\t\treturn $this->error;\n\t}", "protected function getFailedLoginMessage()\n {\n\n $user = User::where('email',\\Request::only('email'))\n ->where('active',0)->first();\n $password = \\Request::only('password');\n\n\n\n if ($user != null){\n\n extract($password);\n\n if(\\Hash::check($password, $user->password)){\n\n return \\Lang::has('auth.active')\n ? \\Lang::get('auth.active')\n : 'Active your account.';\n }\n\n\n }else{\n\n return \\Lang::has('auth.failed')\n ? \\Lang::get('auth.failed')\n : 'These credentials do not match our records.';\n }\n }", "protected function getFailedLoginMessage()\n {\n return \\Lang::has('auth.failed')\n ? \\Lang::get('auth.failed')\n : 'Email atau password anda salah';\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n return redirect()->back()\n ->withInput($request->only($this->username(), 'remember'))\n ->withErrors([\n $this->username() => Lang::get('auth.failed'),\n ]);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n return redirect()->back()\n ->withInput($request->only($this->loginUsername(), 'remember'))\n ->withErrors([\n $this->loginUsername() => $this->getFailedLoginMessage(),\n ]);\n }", "public function getLastErrorResponse() {\n if (!empty($this->rawResponses)) {\n foreach (array_reverse($this->rawResponses) as $x) {\n if (isset($x['error'])) {\n return $x;\n }\n }\n }\n }", "public function getAuthenticationException();", "private function loginFailed()\n {\n //Login failed...\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n return response()->json([\n 'status' => 'failed',\n 'message' => Lang::get('auth.failed')\n ], 401);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n return response()->json([\n 'success' => false,\n 'errors' => [\n $this->username() => trans('auth.failed'),\n ]\n ], 401);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n $errors = [$this->username() => trans('auth.failed')];\n\n if ($request->expectsJson()) {\n return response()->json($errors, 422);\n }\n\n return redirect('/?ref=login')->withInput($request->only($this->username(), 'remember'))->withErrors($errors);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n if($request->wantsJson() || $request->isJson()) {\n return response($this->getFailedLoginMessage(), 401);\n }\n\n return redirect()->back()\n ->withInput($request->only($this->loginUsername(), 'remember'))\n ->withErrors([\n $this->loginUsername() => $this->getFailedLoginMessage(),\n ]);\n }", "public function getInvalidUserResponse()\n {\n $result['responseCode'] = self::RESPONSE_INVALID_USER;\n return $result;\n }", "protected function getFailedLoginMessage()\n {\n //return Lang::has('auth.failed')\n //? Lang::get('auth.failed')\n //: '账号或密码错误';\n return '账号或密码错误';\n }", "protected function sendFailedLoginResponse(Request $request): RedirectResponse\n {\n return redirect()\n ->back()\n ->withInput($request->only($this->username(), 'remember'))\n ->withErrors([\n $this->username() => Lang::get('auth.failed'),\n 'password' => Lang::get('auth.failed')\n ]);\n }", "public static function FAILURE()\n {\n return self::getInstance(__METHOD__);\n }", "private static function generateFailedAuthResponse(&$response) {\n $response->getHeaders()->addHeaders([\n 'Date' => gmdate('D, d M Y H:i:s T'),\n 'Content-Type' => 'application/json; charset=UTF-8'\n ]);\n $response->setContent(\\Zend\\Json\\Json::encode(['success' => false, 'data' => false, 'errors' => 'Request authorization failed, check keys/payload']));\n $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');\n $response->setStatusCode(403);\n }", "public function testFailLogin()\n {\n $response = $this->call('GET', '/api/v1/login?email=surganda@gmail.com&password=12345');\n \n $this->assertEquals(401, $response->status());\n }", "public function onAuthenticationFailure(\n Request $request,\n AuthenticationException $exception)\n {\n return new Response('Authentication Failed. ', 403);\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception)\n {\n// $exception,\n// new JWTAuthenticationFailureResponse($exception->getMessage())\n// );\n\n $event = new AuthenticationFailureEvent(\n $exception,\n new JWTAuthenticationFailureResponse(\n $this->translator->trans('Invalid credentials.')\n )\n );\n if ($this->dispatcher instanceof ContractsEventDispatcherInterface) {\n $this->dispatcher->dispatch($event, Events::AUTHENTICATION_FAILURE);\n } else {\n $this->dispatcher->dispatch(Events::AUTHENTICATION_FAILURE, $event);\n }\n\n return $event->getResponse();\n }", "public function failed()\n {\n $this->status = JSendResponse::STATUS_FAIL;\n\n return $this;\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response\n {\n if ($request->hasSession()) {\n $request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception);\n }\n\n if ($exception instanceof BadCredentialsException) {\n $msg = 'Invalid credentials.';\n } else {\n $msg = $exception->getMessage();\n }\n return new JsonResponse(['error' => 1, 'message' => $msg]);\n }", "function alt_failed_login()\n {\n return 'The login information you have entered is incorrect.';\n }", "public function get_response()\n {\n return BootphpException::response($this);\n }", "public static function accessTokenFetchFailed(Response $response)\n {\n return new static(sprintf(\n \"Fetching access token from Procountor failed. '%s'\",\n $response->body()\n ));\n }", "public function testOnAuthenticationFailure(): void\n {\n $this->serverService->expects($this->once())\n ->method('getVariable')\n ->with('realm')\n ->will($this->returnValue('mock_realm'))\n ;\n\n $response = $this->authenticator->onAuthenticationFailure(\n new Request(),\n new AuthenticationException('Authentication failure message')\n );\n\n $this->assertSame(401, $response->getStatusCode());\n $this->assertSame('{\"error\":\"access_denied\",\"error_description\":\"Authentication failure message\"}', $response->getContent());\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception): null|Response\n {\n $data = array(\n 'message' => strtr($exception->getMessageKey(), $exception->getMessageData())\n );\n\n return new JsonResponse($data, Response::HTTP_FORBIDDEN);\n }", "public function get_response() {\n $view = View::factory('Errors/default');\n\n // Remembering that `$this` is an instance of HTTP_Exception_404\n $view->message = $this->getMessage();\n\n $view->error_code = 500;\n $view->error_rant = \"something's wrong with our server\";\n $view->error_message = \"probably another rat ate our server cable. Please wait patiently :)\";\n\n $response = Response::factory()\n ->status(500)\n ->body($view->render());\n\n return $response;\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n $notify[\"status\"]=\"failed\";\n $notify[\"notify\"][]=\"Signing into the system was failed.\";\n $notify[\"notify\"][]=\"Please try again.\";\n\n $request->session()->flash(\"notify\", $notify);\n\n return redirect()->back();\n }", "protected function getFailedLoginMessage()\n\t{\n\t\treturn 'Địa chỉ email hoặc mật khẩu không đúng';\n\t}", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception)\n {\n return new RedirectResponse($request->getSession()->get('_security.jira_secured.login_path'));\n }", "public function login()\n\t{\n\n\t\ttry {\n\t\t\t$error = $this->getRequest()->getSession()->get('api.error');\n\t\t\t$this->getRequest()->getSession()->remove('api.error');\n\t\t\treturn compact('error');\n\t\t} catch (ValueNotFoundException $e) {\n\n\t\t}\n\t}", "public function testCantLoginWithInvalidCredentials()\n {\n // arrange \n $user = User::factory()->create();\n\n // act\n $response = $this->post(\"/login\", [\n \"email\" => $user->email,\n \"password\" => \"invalidpassword\"\n ]);\n\n // assert\n $response->assertStatus(302);\n $response->assertSessionHas(\"errors\");\n\n $messages = session(\"errors\")->getMessages();\n $this->assertEquals($messages[\"email\"][0], \"These credentials do not match our records.\");\n // dd($messages);\n }", "protected function invalidResponse(){\n return response()->json([\n 'ResultCode' => 1,\n 'ResultDesc' => 'Failed to complete the transaction',\n 'ThirdPartyTransID' => 0\n ]);\n\n }", "public function getError()\n {\n $errorMessage = null;\n \n if (!$this->isOk())\n {\n $errorMessage = $this->m_responseArray['message'];\n }\n else\n {\n throw new Exception('Calling getError when there was no error');\n }\n \n return $errorMessage;\n }", "public function handleFailure($response) {\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception);", "public static function failed()\n\t{\n\t\treturn Request::$failed;\n\t}", "public function getEnrollmentErrorResponse()\n {\n $result['responseCode'] = self::RESPONSE_ENROLLMENT_ERROR;\n return $result;\n }", "public function getLastError() {\n return $_SESSION['last_login_error'];\n }", "private static function response()\n {\n $response = self::$response;\n self::$response = [Key::STATUS => Key::FAILED, Key::CODE => '', Key::MESSAGE => '', Key::DATA => []];\n return $response;\n }", "public function lastFailedLoginAttemptAt() : ?DateTime\n {\n return $this->returnDateField('last_failed_login');\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n throw ValidationException::withMessages([\n $this->username() => [trans('auth.failed')],\n ]);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n throw ValidationException::withMessages([\n $this->username() => [trans('auth.failed')],\n ]);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n throw ValidationException::withMessages([\n $this->username() => [trans('auth.failed')],\n ]);\n }", "protected function sendFailedLoginResponse(Request $request)\n {\n throw ValidationException::withMessages([\n $this->username() => [trans('auth.failed')],\n ]);\n }", "public function testCreateFail()\n {\n // fail\n (new ExperimentRecruitingTokenResponse())->create(-1, 'fail', -1);\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception)\n {\n $datos = $request->request->all();\n $user = $datos[\"_username\"];\n $uri = $this->container->get('router')->generate('administrador_inicio_login_error', array('u'=> $user));\n $response = new RedirectResponse($uri);\n return $response;\n }", "public function getLoginResponse()\n {\n $result['responseCode'] = self::RESPONSE_LOGIN_OK;\n return $result;\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception)\n {\n $error = $exception->getMessage();\n\n $request->getSession()->set('login_error', $error);\n\n return new \\Symfony\\Component\\HttpFoundation\\RedirectResponse($this->router->generate('fos_user_security_login'));\n }", "protected function sendResetFailedResponse(Request $request, $response)\n {\n return response()->json([\n 'status' => 'error',\n 'msg' => __('messages.password.fail')\n ], 400);\n //return response()->json(['message' => 'Failed, Invalid Token.']);\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception)\n {\n $request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception);\n\n return new RedirectResponse($this->router->generate($this->parameters['route']['login']));\n }", "public function getBattleCheckFail()\n {\n return $this->get(self::_BATTLE_CHECK_FAIL);\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception)\n {\n $data = array(\n 'status' => Response::HTTP_FORBIDDEN,\n 'error' => 'Invalid token!', //strtr($exception->getMessageKey(), $exception->getMessageData()),\n 'data' => null\n );\n\n return new JsonResponse($data, Response::HTTP_FORBIDDEN);\n }", "public function testProcessLoginFailed(){\n\n Sentinel::disableCheckpoints();\n\n $credentials = [\n 'email' => 'admin@admin.com',\n 'password' => 'passwords',\n ];\n\n $response = $this->post(route('login.action', $credentials));\n\n $response->assertSessionHas('failed');\n $response->assertRedirect(route('login.form'));\n }", "protected function sendResetLinkFailedResponse( Request $request, $response )\n {\n return response( [ 'errors' => [trans( $response )] ], 422 );\n }", "public function testLoginFailure()\n {\n $mock = new MockHandler([\n new Response(400, [], '{\"error\": \"login failure\"}'),\n ]);\n\n $handler = HandlerStack::create($mock);\n $this->app->instance(Client::class, new Client(['handler' => $handler]));\n\n //login\n $this->post('api/user/login', ['email' => 'test@test.com', 'password' => 'password'], $this->headers)\n ->assertStatus(400)\n ->assertSeeText('login failure');\n\n }", "public function failed($message = 'Failed', $code = 400)\n {\n return response([\n \"status\" => false,\n \"message\" => __($message),\n ], $code);\n }", "public function failError()\n {\n if (\n ($packet = $this->getPacket()) and\n $packet['status'] !== Job::STATUS_FAILED and\n ($e = json_decode($packet['exception'], true))\n ) {\n return empty($e['error']) ? var_export($e, true) : $e['error'];\n }\n\n return 'Unknown exception';\n }", "protected function failedToAuthenticateUserMessage(): string\n {\n return 'Unable to authenticate with invalid token.';\n }", "private function createCapturePaymentIdIncorrectErrorResponse(): stdClass\n {\n $response = new stdClass();\n $response->captureErrors = new stdClass();\n $response->captureErrors->error = new stdClass();\n $response->captureErrors->error->_ = 'Payment id incorrect.';\n $response->captureErrors->error->code = 'REQUEST_DATA_INCORRECT';\n\n return $response;\n }", "protected function failure(string $message)\n {\n return response()->json([\n 'success' => false,\n 'msg' => $message,\n ]);\n }", "public function failed(\\Exception $exception)\n {\n if ($exception instanceof BadRequestException) {\n $code = 400;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_BAD_REQUEST);\n } elseif ($exception instanceof NotImplementedException) {\n $code = 501;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_NOT_IMPLEMENTED);\n } elseif ($exception instanceof ForbiddenException) {\n $code = 403;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_FORBIDDEN);\n } elseif ($exception instanceof NotFoundException) {\n $code = 404;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_NOT_FOUND);\n } elseif ($exception instanceof ConflictException) {\n $code = 409;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_CONFLICT);\n } elseif ($exception instanceof ServiceUnavailableException) {\n $code = 503;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_SERVICE_UNAVAILABLE);\n } else {\n $code = 500;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_INTERNAL);\n }\n $format = $this->responseStructure;\n $response = [];\n\n // Check exception type\n $type = self::ERROR_TYPE_MANDATORY;\n if ($exception instanceof DuplicateExceptionInterface) {\n $type = self::ERROR_TYPE_DUPLICATE;\n } else if ($exception instanceof MandatoryExceptionInterface) {\n $type = self::ERROR_TYPE_MANDATORY;\n }\n\n // Add error response message\n if ($exception instanceof ResponseMessageInterface) {\n $response = $exception->getResponse();\n }\n\n return $this->silexApp->$format(\n $this->mapper->generateMap(\n false,\n $response,\n array('message' => $failure, 'type' => $type)\n ))->setStatusCode($code);\n }", "public function getError()\r\n {\r\n if (isset($this->response['faultString'])) {\r\n return $this->response['faultString'];\r\n } elseif (isset($this->response['errmsg'])) {\r\n return $this->response['errmsg'];\r\n }\r\n return null;\r\n }", "public function onAuthenticationFailure(AuthenticationFailureEvent $event)\n {\n // TODO warn about login attempt on admin users accounts.\n }", "function failed_login () {\n\t\n return 'Your username and/or password is incorrect.';\n\n}", "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 failed(string $tokenString): \\Inertia\\Response\n {\n $pageTitle = 'Invite failed';\n\n $token = $this->invitation->findToken($tokenString);\n\n return $this->response(\n compact('pageTitle', 'token'),\n 'auth.invitation.failed'\n );\n }", "protected function fetchResponseError($response) {\n\t\tif (isset($response['error'])) {\n\t\t\treturn array(\n\t\t\t\t'code' => $response['error']['code'],\n\t\t\t\t'message' => $response['error']['message'],\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "protected function sendResetFailedResponse(Request $request, $response)\n\t{\n\t\t$message = ($response == Password::INVALID_USER) ? 'User does not exist' : 'Reset token is invalid';\n\t\treturn response()->json(['code' => 500, 'message' => trans($message), 'error' => []], 500);\n\t}", "protected function sendResetFailedResponse(Request $request, $response)\n {\n return $this->error(['email' => trans($response)], \"Password reset failed!\", 401);\n }", "public function getErrorResponses();", "protected function getBadRequestResponse()\n {\n $response = new Response();\n $response->setStatusCode(400);\n $response->setContent('Bad request');\n\n return $response;\n }", "public function getErrorResponse(): ?Error\n {\n return $this->errorResponse;\n }", "public function testLoginFailedFunctionality()\n {\n $this->expectOutputString(\"err_login_failed\");\n $email = 'test@example.com';\n $ctrl = new Controller();\n // Give it the wrong password\n $ctrl->login($email,'wrong password');\n\n }", "protected function sendResetFailedResponse(Request $request, $response)\n {\n return redirect()->back()\n ->withInput($request->only('email'))\n ->withErrors(['email' => trans($response)]);\n }", "protected function sendResetFailedResponse(Request $request, $response)\n {\n return redirect()->back()\n ->withInput($request->only('email'))\n ->withErrors(['email' => trans($response)]);\n }", "protected function sendResetFailedResponse(Request $request, $response)\n {\n return redirect()->back()\n ->withInput($request->only('email'))\n ->withErrors(['email' => trans($response)]);\n }", "protected function statusCodeFail(): int\n {\n return 401;\n }", "public function getInvalidChallengeResponse()\n {\n $result['responseCode'] = self::RESPONSE_INVALID_CHALLENGE;\n return $result;\n }", "private function createStatusErrorResponse(): stdClass\n {\n $response = new stdClass();\n $response->statusErrors = new stdClass();\n $response->statusErrors->error = new stdClass();\n $response->statusErrors->error->_ = 'Order could not be found with the given key.';\n $response->statusErrors->error->code = 'REQUEST_DATA_INCORRECT';\n\n return $response;\n }", "public static function userLoginFailed(){\n self::$IntelligenceService->addToIntelligenceStack(self::USER_INTELLIGENCE_LOGIN_KEY, self::USER_INTELLIGENCE_FAILED);\n }", "public function errorMessage() { return $this->errorMessage; }", "public function getFailureReason();", "private function getFailedLogins() {\n $last_logins = array();\n $cron_interval = $this->config('acquia_connector.settings')->get('spi.cron_interval');\n\n if (\\Drupal::moduleHandler()->moduleExists('dblog')) {\n $result = db_select('watchdog', 'w')\n ->fields('w', array('message', 'variables', 'timestamp'))\n ->condition('w.message', 'login attempt failed%', 'LIKE')\n ->condition('w.timestamp', REQUEST_TIME - $cron_interval, '>')\n ->condition('w.message', array(\n \"UPGRADE.txt\",\n \"MAINTAINERS.txt\",\n \"README.txt\",\n \"INSTALL.pgsql.txt\",\n \"INSTALL.txt\",\n \"LICENSE.txt\",\n \"INSTALL.mysql.txt\",\n \"COPYRIGHT.txt\",\n \"CHANGELOG.txt\",\n ), 'NOT IN')\n ->orderBy('w.timestamp', 'DESC')\n ->range(0, 10)\n ->execute();\n\n foreach ($result as $record) {\n $variables = unserialize($record->variables);\n if (!empty($variables['%user'])) {\n $last_logins['failed'][$record->timestamp] = Html::escape($variables['%user']);\n }\n }\n }\n return $last_logins;\n }", "public function getFailed(): int\n {\n return $this->failed;\n }", "private function determineErrorResponse(\n $exception,\n $message,\n ResponseInterface $response,\n ServerRequestInterface $request\n ) {\n $errorResponse = $this->getResponse();\n $this->emit(self::EVENT_LIFECYCLE_ERROR, $exception, $request, $errorResponse, $response);\n $this->error = true;\n\n if ( ! $errorResponse->getBody()->isWritable() ) {\n return $errorResponse;\n }\n\n $content = $errorResponse->getBody()->__toString();\n if ( empty($content) ) {\n $errorResponse->getBody()->write($message);\n }\n\n return $errorResponse;\n }", "protected function authenticationError(Exception $exception)\n {\n return $this->jsonResponse($exception->getMessage(), Response::HTTP_UNAUTHORIZED);\n }", "public function getFailedMessage()\n {\n if (array_key_exists(\"failedMessage\", $this->_propDict)) {\n return $this->_propDict[\"failedMessage\"];\n } else {\n return null;\n }\n }", "protected function sendResetLinkFailedResponse(Request $request, $response)\n {\n return response()->json(['erro' => trans($response)], 400);\n }", "public function getErrorMsg()\r\n {\r\n return $this->lastErrorMsg;\r\n }" ]
[ "0.7125313", "0.66206", "0.6566375", "0.6516578", "0.6394318", "0.6197063", "0.61886126", "0.61761606", "0.61624056", "0.6155329", "0.61095643", "0.6107442", "0.6068647", "0.6056417", "0.60313195", "0.60273534", "0.59978", "0.5986536", "0.5982837", "0.59571075", "0.5914038", "0.5885596", "0.58835244", "0.58661014", "0.58646166", "0.5832125", "0.5829438", "0.5819214", "0.57648563", "0.5726266", "0.57095987", "0.5709108", "0.5692016", "0.56904936", "0.5673909", "0.5671605", "0.5657604", "0.5648879", "0.56481224", "0.5625399", "0.5611273", "0.55970913", "0.55760086", "0.5550449", "0.5545668", "0.5531178", "0.5514902", "0.55145174", "0.5504482", "0.5496485", "0.5485101", "0.5483935", "0.5479528", "0.5479528", "0.5479528", "0.5479528", "0.54688513", "0.54595083", "0.544978", "0.5446978", "0.5442622", "0.54253733", "0.54227346", "0.54209155", "0.54184306", "0.54156244", "0.54003483", "0.53894836", "0.5380284", "0.53770405", "0.53752273", "0.5374408", "0.5374368", "0.53681844", "0.53663766", "0.5348545", "0.5343012", "0.53380626", "0.53380394", "0.53240997", "0.53066975", "0.5287109", "0.5286249", "0.5286234", "0.52833533", "0.5280847", "0.5280847", "0.5277799", "0.5276475", "0.5272259", "0.5267629", "0.52558404", "0.5239876", "0.5234235", "0.5227035", "0.5218615", "0.52141947", "0.5194155", "0.51861995", "0.5185015", "0.5183288" ]
0.0
-1
Get master slide relations
public function getMasterSlideRelations() { return $this->masterSlideRels; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRelations();", "public function getRelations();", "public static function workflowRelations();", "public function relations()\r\n {\r\n return $this->relations;\r\n }", "public function getWithRelations();", "protected static function _relations() {\n\n\t}", "public function getRelations()\n\t{\n\t\treturn $this->relations;\n\t}", "public function getRelations()\n\t{\n\t\treturn $this->relations;\n\t}", "public function getRelations()\n {\n return $this->relations;\n }", "public function getRelations()\n {\n return $this->relations;\n }", "abstract function relations();", "public function writeSlideMasterRelationships(SlideMaster $oMasterSlide)\n {\n // Create XML writer\n $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n // XML header\n $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n // Relationships\n $objWriter->startElement('Relationships');\n $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships');\n // Starting relation id\n $relId = 0;\n // Write all the relations to the Layout Slides\n foreach ($oMasterSlide->getAllSlideLayouts() as $slideLayout) {\n $this->writeRelationship($objWriter, ++$relId, 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout', '../slideLayouts/slideLayout' . $slideLayout->layoutNr . '.xml');\n // Save the used relationId\n $slideLayout->relationId = 'rId' . $relId;\n }\n\n // Write drawing relationships?\n $relId = $this->writeDrawingRelations($oMasterSlide, $objWriter, ++$relId);\n\n // Write background relationships?\n $oBackground = $oMasterSlide->getBackground();\n if ($oBackground instanceof Image) {\n $this->writeRelationship($objWriter, $relId, 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', '../media/' . $oBackground->getIndexedFilename($oMasterSlide->getRelsIndex()));\n $oBackground->relationId = 'rId' . $relId;\n\n ++$relId;\n }\n\n // TODO: Write hyperlink relationships?\n // TODO: Write comment relationships\n // Relationship theme/theme1.xml\n $this->writeRelationship($objWriter, $relId, 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme', '../theme/theme' . $oMasterSlide->getRelsIndex() . '.xml');\n $objWriter->endElement();\n // Return\n return $objWriter->getData();\n }", "protected function getRelations()\n {\n return array();\n }", "public function getRelationList();", "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 slides()\n {\n return $this->hasMany('App\\ArticleSlider');\n }", "public function getSlides(){\r\n\t\treturn $this->getModel()->getSlides();\r\n\t}", "public function getDisplay_relations()\r\n {\r\n return $this->m_display_relations;\r\n }", "public function getRelations()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('relations');\n }", "public function defineRelations()\n\t{\n\t\treturn array();\n\t}", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelations()\n {\n return $this->discoverRelations();\n }", "protected function getRelationsAlias()\n\t{\n\t\t$method = 'get' . ucfirst($this->actionName === 'index' ? 'list' : $this->actionName) . 'Display';\n\t\tif(!method_exists($this->configuration, $method))\n\t\t{\n\t\t\t$method = 'getFormDisplay';\n\t\t}\n\t\t$fieldsets = $this->configuration->$method();\n\t\tswitch($this->actionName)\n\t\t{\n\t\t\tcase 'filter':\n\t\t\t\t$fieldsets = $this->configuration->getFilterDisplay();\n\t\t\t\tbreak;\n\t\t\tcase 'index':\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$fieldsets = array_merge($fieldsets, $this->configuration->getFormDisplay());\n\t\t\t\tbreak;\n\t\t}\n\t\t$relations = array();\n\n\t\tswitch($this->actionName)\n\t\t{\n\t\t\tcase 'filter':\n\t\t\t\treturn $this->doGetRelations($fieldsets);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tforeach($fieldsets as $fieldset=>$fields)\n\t\t\t\t{\n\t\t\t\t\tif(!is_array($fields)){\n\t\t\t\t\t\treturn $this->doGetRelations($fieldsets);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$relations = array_merge($relations, $this->doGetRelations($fields));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn array_unique(array_diff($relations, array_keys($this->getDmModule()->getTable()->getRelationHolder()->getLocals())));\n\t}", "public function get_active_relations() {\n\t\t\treturn $this->_active_relations;\n\t\t}", "protected function getRelations()\n\t{\n\t\treturn ['widgets'];\n\t}", "public function getLayoutRelations()\r\n {\r\n return $this->layoutRelations;\r\n }", "public function getAllMorphologysAttribute()\n {\n // There two calls return collections as defined in relations.\n $r1 = $this->morphologys1;\n $r2 = $this->morphologys2;\n\n // Merge collections and return single collection.\n return $r1->merge($r2);\n }", "abstract public static function relations() : ? array;", "public function relationNames()\n {\n return [];\n }", "public function getSlides()\n {\n return Slide::all();\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 getParentRelationship()\n {\n return auth()->user()->ministryDiscussions();\n }", "public function relationNames()\n {\n return [\n 'pegawais'\n ];\n }", "public function Interests() {\n\t\treturn parent::getRelated();\n\t}", "public function relationNames()\n {\n return [\n 'detailbeasiswas'\n ];\n }", "public function get_related_tables(){\n\t\treturn $this->related;\n\t}", "public function setRelations() {}", "public function relationNames()\n {\n return [\n 'siswa'\n ];\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 get_slides_for_slider() {\n return $this->slides_to_include;\n }", "public function getChildrenRelationIndex();", "public function getBookMasters()\n {\n return $this->hasMany(BookMaster::className(), ['SubID' => 'subID']);\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 }", "abstract public function included(): ?JsonApiParser\\Collections\\Relations;", "public function getRelAll ()\n {\n \treturn ($this->db_object->getRowsAll (\"Select * from \".$this->table_prefix.$this->quiz_tables['rel']));\n }", "public function getLinks() {\n\t\t$relationModel = $this->getRelationModel();\n\t\t$parentModel = $this->getParentRecordModel();\n\t\t\n\t\t$isSubProduct = false;\n\t\tif($parentModel->getModule()->getName() == $relationModel->getRelationModuleModel()->getName()) {\n\t\t\t$isSubProduct = $relationModel->isSubProduct($parentModel->getId());\n\t\t}\n\t\t\n\t\tif(!$isSubProduct){\n\t\t\treturn parent::getLinks();\n\t\t}\n\t}", "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 relations() {\r\n\t\treturn CMap::mergeArray(parent::relations(), array(\r\n\t\t\t\"properties\" => array(self::HAS_MANY,\"APropertyModel\",\"classId\"),\r\n\t\t\t\"interfaces\" => array(self::MANY_MANY,\"AInterfaceModel\",\"classImplements(classId,implementsId)\"),\r\n\t\t));\r\n\t}", "public function getReferencesList(){\n return $this->_get(1);\n }", "public function relations() {\n return [\n 'materias' => [self::HAS_MANY, 'Materia', 'usuario_id'],\n 'tags' => [self::HAS_MANY, 'Tag', 'usuario_id'],\n 'agendas' => [self::HAS_MANY, 'Agenda', 'usuario_id'],\n ];\n }", "public function getReferences();", "public function galleries(): MorphMany\n {\n return $this->morphMany(Gallery::class, 'gallery');\n }", "public function getRelated_resources()\r\n {\r\n return $this->related_resources;\r\n }", "public function loadRelated()\n {\n return;\n }", "public function galleries()\n {\n return $this->morphToMany('TypiCMS\\Modules\\Galleries\\Models\\Gallery', 'galleryable')\n ->withPivot('position')\n ->orderBy('position')\n ->withTimestamps();\n }", "public function relations()\n {\n // class name for the relations automatically generated below.\n return array(\n 'options' => array(self::BELONGS_TO, 'Options', 'next_opt')\n );\n }", "public function galleries()\n {\n return $this->belongsTo(Gallery::class);\n }", "public function galleries()\n {\n return $this->hasMany(Gallery::class);\n }", "public function relationNames()\n {\n return [\n 'akumulasiPoint',\n 'sanksi',\n 'siswa'\n ];\n }", "private function parents() {\n return array_map(array($this, 'page_info_from_id'), $this->parent_ids());\n }", "public function getItemRelations()\n {\n return [];\n }", "public function relationNames()\n {\n return [\n 'siswas'\n ];\n }", "public function get_parents(){\n\t\treturn $this->master->parent_list_construct();\n\t}", "protected function relationships(): array\n {\n return [];\n }", "public function relationNames()\n {\n return [\n 'immobilien',\n 'kunde'\n ];\n }", "protected function _loadRelatedData()\n {\n return array(\n 'UCmsAlbumI18n' => UCmsAlbumI18n::model()->findByPk(array(\n 'u_cms_album_id' => $_GET['album'], 'i18n_id' => Yii::app()->language\n ))\n );\n }", "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 }", "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 relationNames()\r\n {\r\n return [\r\n 'kelas',\r\n 'siswa'\r\n ];\r\n }", "public function getRelationships()\n {\n return $this->getSchema()->getRelationships( $this->getName() );\n }", "private static function relations()\n {\n $files = ['OneToOne', 'OneToMany', 'ManyToMany', 'BelongsTo'];\n $folder = static::$root.'MVC/Relations'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyRelationException', 'ModelNotFindedException'];\n $folder = static::$root.'MVC/Relations/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public abstract function getCustomizedRelationList();", "public function relations()\n {\n // class name for the relations automatically generated below.\n return array(\n \n );\n }", "public function getRelatedResources()\r\n {\r\n return $this->related_resources;\r\n }", "private function getRelationships() {\n\n $file = $this->getExtractedFile();\n\n $xmlWorkbook = simplexml_load_string( $file->getFromName( \"xl/_rels/workbook.xml.rels\" ) );\n\n $rels = array();\n $key = 0;\n\n foreach ( $xmlWorkbook->Relationship as $ele ) {\n\n $key++;\n $rels[$key]->rId = (string) $ele->attributes()->Id;\n $rels[$key]->type = (string) $ele->attributes()->Type;\n $rels[$key]->typeSlug = end( explode( '/', $ele->attributes()->Type ) );\n $rels[$key]->path = 'xl/' . $ele->attributes()->Target;\n\n }\n\n return $rels;\n }", "public function getPersonaPivots()\n {\n return $this->Personas_->merge($this->Parents_);\n }", "public function getWithRelations() {\n\n return $this->with_relations;\n \n }", "function mj_loop_related_items()\n{\n $items = mj_get_related_items_for_loop();\n return loop_records('related_items', $items, \"mj_set_current_related_item\");\n}", "public function product_galleries() {\n return $this->hasMany(ProductGallery::class, 'product_id', 'id');\n }", "public function getRelatedRecords()\n {\n return $this->_related;\n }", "public function relationNames()\r\n {\r\n return [\n 'especie',\n 'lance'\n ];\r\n }", "public function related(): ?array;", "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 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 }" ]
[ "0.6565142", "0.6565142", "0.6494329", "0.63103247", "0.6149196", "0.604606", "0.6045348", "0.6045348", "0.6040107", "0.6040107", "0.60358614", "0.59706074", "0.5954368", "0.5921102", "0.58812016", "0.5878163", "0.5796429", "0.5778933", "0.57628113", "0.57399756", "0.5703496", "0.5703496", "0.5703496", "0.5703496", "0.5703496", "0.5703496", "0.5703496", "0.5703496", "0.5703496", "0.5703496", "0.5703496", "0.56651384", "0.5650084", "0.56040657", "0.55634654", "0.5541372", "0.55406773", "0.5529468", "0.551854", "0.55121714", "0.5502102", "0.54948795", "0.548627", "0.5482396", "0.5479693", "0.54794955", "0.54742384", "0.5411604", "0.54030675", "0.54013824", "0.53916025", "0.5391564", "0.5388222", "0.53865135", "0.5383163", "0.538032", "0.5367161", "0.53634405", "0.53583187", "0.53473884", "0.5343878", "0.53371495", "0.53327996", "0.5329215", "0.5325309", "0.53217983", "0.5317101", "0.5304143", "0.52989775", "0.52899677", "0.52650905", "0.52493966", "0.52463794", "0.5238127", "0.52357256", "0.52350444", "0.5233297", "0.52328235", "0.5228466", "0.5227184", "0.5224299", "0.5223009", "0.520967", "0.52047825", "0.5197298", "0.51839787", "0.5174228", "0.51641876", "0.5163362", "0.5158412", "0.5152245", "0.51503044", "0.5149383", "0.51469564", "0.51469564", "0.51469564", "0.51469564", "0.51469564", "0.51469564", "0.51469564" ]
0.8652648
0
Get array of slide layouts
public function getLayouts() { return $this->layouts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLayouts();", "public function getThemeLayouts();", "public function getLayouts(): ?array;", "public function getLayouts() {\n $path = APPPATH.'opencnab/layouts';\n $diretorio = dir($path);\n\n //Grava em um array todos eles para uso durante a aplicação.\n $cont = 0;\n while($arquivo = $diretorio -> read()){\n if($arquivo <> '.' && $arquivo <> '..'){\n $this->layouts[$cont] = require_once($path.'/'.$arquivo);\n $cont++;\n }\n }\n $diretorio -> close();\n\n return $this->layouts;\n }", "protected function buildSlides() {\n $this->sortSlidesByWeight();\n\n $slides = [];\n foreach ($this->configuration['slides'] as $slide) {\n if ($slide['mid'] !== NULL) {\n $slides[] = [\n 'image' => $this->fileUrlFromMediaId($slide['mid']),\n 'caption' => $slide['caption'],\n ];\n }\n }\n return $slides;\n }", "public function getLayouts(): array\n {\n $layouts = [];\n\n foreach ($this->config->get('layouts') as $layout) {\n $layout->setParentKey($this->getKey());\n\n $layouts[] = $layout->toArray();\n }\n\n return $layouts;\n }", "public function get_layouts ()\n {\n return $this->_layouts;\n }", "public function all_layouts() {\n\t\t// Globals\n\t\tglobal $wpdb;\n\t\t\n\t\t// Load the layouts from the database as an array\n\t\t$sql = \"SELECT * FROM `\" . rpids_tableprefix() . \"rpids_layouts` ORDER BY `name` ASC;\";\n\t\t$sqlret = $wpdb->get_results( $sql, ARRAY_A );\n\t\t\n\t\t// Create the return object\n\t\t$return = new StdClass();\n\t\t\n\t\t// Loop through each layout\n\t\tforeach( $sqlret as $layout ) {\n\t\t\t// Add the screen info to the return object\n\t\t\t$return->$layout['id'] = new StdClass();\n\t\t\t$return->$layout['id']->name = $layout['name'];\n\t\t\t$return->$layout['id']->id = $layout['id'];\n\t\t}\n\t\treturn $return;\n\t}", "public function getLayouts(){\n\n $defaultTheme = env('THEME', 'default');\n $path = app_path() . \"/../resources/views/themes/$defaultTheme/\";\n $layoutPath = $path . \"layouts\";\n $metaFilePath = $path . \"$defaultTheme.json\";\n try{\n $validator = file_exists($metaFilePath) && is_dir($layoutPath);\n if ($validator){\n\n // Read layouts\n $layouts = [];\n if ($dh = opendir($layoutPath)){\n while (($file = readdir($dh)) !== false){\n $filePath = $layoutPath . '/' . $file; \n if ($file == '.' || $file == '..') {\n continue;\n }\n $content = file_get_contents($filePath);\n $info = $this->extractInfo($content);\n $layouts[] = [\n 'name' => $file,\n 'info' => isset($info[1]) ? json_decode($info[1], true) : null\n ];\n }\n closedir($dh);\n }\n return $layouts;\n }\n else{\n return [];\n }\n }\n catch (\\Exception $e){ \n return [];\n }\n }", "public function getPagelayouts($dc)\n\t{\n\t\t$objLayouts = $this->Database->prepare('SELECT id,name FROM tl_layout WHERE pid=?')->execute($dc->activeRecord->pid);\n\t\t$arrLayouts = array();\n\t\twhile($objLayouts->next())\t$arrLayouts[$objLayouts->id] = $objLayouts->name;\n\t\treturn $arrLayouts;\n\t}", "public function get_layouts() {\n $layouts = array();\n\n foreach ( glob( self::_find_view_folder() . 'layouts/*.*' ) as $layout ) {\n $layouts[] = pathinfo( $layout, PATHINFO_BASENAME );\n }\n\n return $layouts;\n }", "function tc_layout_choices() {\r\n $global_layout = apply_filters( 'tc_global_layout' , TC_init::$instance -> global_layout );\r\n $layout_choices = array(); \r\n foreach ($global_layout as $key => $value) {\r\n $layout_choices[$key] = ( $value['customizer'] ) ? call_user_func( '__' , $value['customizer'] , 'customizr' ) : null ;\r\n }\r\n return $layout_choices;\r\n }", "public function getLayouts()\n {\n $layouts = array(\n 'html' => $this->translate('documentationLayout_static'),\n 'json' => $this->translate('documentationLayout_interactive'),\n );\n\n $configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['sphinx']);\n switch ($configuration['pdf_builder']) {\n case 'pdflatex':\n $renderPdf = \\TYPO3\\CMS\\Core\\Utility\\CommandUtility::getCommand('pdflatex') !== '';\n break;\n case 'rst2pdf':\n $renderPdf = true;\n break;\n default:\n $renderPdf = false;\n break;\n }\n if ($renderPdf) {\n $layouts['pdf'] = $this->translate('documentationLayout_pdf');\n }\n\n return $layouts;\n }", "public function getLayoutParameters(): array;", "public function getLayoutsForSelect()\n {\n if (!$this->_layoutsInitialized) {\n $this->_initLayouts();\n }\n\n $results = [];\n foreach ($this->_layouts as $layout) {\n $results[$layout->id()] = $layout->name();\n }\n\n return $results;\n }", "public function getLayout();", "public function getThemeLayouts()\n {\n return $this->layouts;\n }", "public function getLayoutList() {\n try {\n $client = new Zend_Soap_Client($this->LAYOUT_WSDL_URI);\n $options = array('soap_version' => SOAP_1_1,\n 'encoding' => 'ISO-8859-1',\n );\n $client->setOptions($options);\n $client->action = 'findAllActiveLayout';\n $result = $client->findAllActiveLayout();\n return $result;\n } catch (Exception $e) {\n //return false;\n }\n }", "function wp_get_layout_definitions()\n {\n }", "function WPBC_get_layout_locations_for_options(){\n\t$layout_defaults = WPBC_layout_struture__defaults();\n\t$main_container = $layout_defaults['main_container'];\n\t$test_array = array();\n\n\tforeach ($main_container as $key => $value) { \n\t\tif($key!='defaults'){ \n\t\t\t//$icon = WPBC_get_option('custom_layout_preview__'.$key);\n\t\t\t$img_path = get_template_directory_uri();\n\t\t\t$icon = $img_path.'/template-parts/layout/structure/'.$key.'.png';\n\t\t\t$test_array[$key] = $icon;\n\t\t}\n\t}\n\treturn $test_array;\n}", "public function getThemeLayout();", "static function footer_widgets_layout_array() {\n\t\t$layout = get_theme_mod( 'footer_widgets_layout', '[4,6,8]' );\n\t\t$layout = json_decode( $layout );\n\n\t\tif ( is_array( $layout ) && ! empty( $layout ) ) {\n\t\t\t$spans = array( (int) $layout[0] );\n\n\t\t\tfor ( $i = 0; $i < ( sizeof( $layout ) - 1 ); $i++ ) {\n\t\t\t\t$spans[] = $layout[ $i + 1 ] - $layout[ $i ];\n\t\t\t}\n\n\t\t\t$spans[] = 12 - $layout[ $i ];\n\n\t\t\treturn $spans;\n\t\t}\n\t\telse if ( 1 === $layout ) { // single column\n\t\t\treturn array( '12' );\n\t\t}\n\n\t\t// default: disable footer\n\t\treturn array();\n\t}", "public function getViewLayout(): array\n {\n return $this->template;\n }", "public function getLayout() {}", "public function getLayoutOptions()\n {\n $theme = \\Cms\\Classes\\Theme::getActiveTheme();\n\n $path = $theme->getPath() . '/partials/tiles';\n\n if (file_exists($path) === false) {\n return [];\n }\n\n $files = array_diff(scandir($path), array('.', '..'));\n\n $options = [\n '-default-' => 'Default Layout', // use components/section/tileset1.htm\n '-section-' => 'Section (inline)' // use inline layout specified in Section config (e.g. from FateFactory)\n ];\n foreach ($files as $file) {\n if (substr($file, 0, 1) !== '_') {\n $name = $file;\n $options[$file] = $name;\n }\n }\n\n return $options;\n }", "function getLayouts(){\n if(!getSession('USER')) return NULL;\n\n $dir = 'uploads/_tmp/'.$_SESSION['USER']['user_id'].'/';\n\n if($files = scandir($dir)){\n unset($files[0]);\n unset($files[1]);\n $files = array_values($files);\n\n for($i=0; $i<count($files); $i++){\n $layouts[$i]['src'] = $dir.$files[$i];\n $layouts[$i]['type'] = end(explode(\".\", $files[$i]));\n $layouts[$i]['size'] = ceil(filesize($dir.$files[$i]) / 1024) < 1024 ? ceil(filesize($dir.$files[$i]) / 1024) . ' Кб' : (round(filesize($dir.$files[$i]) / 1024 / 1024, 2)) . ' Мб';\n }\n }else{\n return false;\n }\n\n return $layouts;\n }", "private function setLayouts() {\n # list of layout names!\n $availableLayouts = $this->fileMaker->listLayouts();\n\n foreach ($availableLayouts as $layoutName){\n if ($this->name === 'mi' or $this->name === 'miw') {\n if ($layoutName == 'search-'.strtoupper($this->name)) {\n $this->search_layout = $this->fileMaker->getLayout($layoutName);\n } else if ($layoutName == 'results-'.strtoupper($this->name)) {\n $this->result_layout = $this->fileMaker->getLayout($layoutName);\n } else if ($layoutName == 'details-'.strtoupper($this->name)) {\n $this->detail_layout = $this->fileMaker->getLayout($layoutName);\n }\n } else {\n if (str_contains($layoutName, 'search')) {\n $this->search_layout = $this->fileMaker->getLayout($layoutName);\n } else if (str_contains($layoutName, 'results')) {\n $this->result_layout = $this->fileMaker->getLayout($layoutName);\n } else if (str_contains($layoutName, 'details')) {\n $this->detail_layout = $this->fileMaker->getLayout($layoutName);\n }\n }\n }\n }", "public function getLayoutGroups()\n {\n return array(\n static::LAYOUT_GROUP_HOME => array(\n 'main'\n )\n );\n }", "function techfak_layouts() {\n\t$layout_options = array(\n\t\t'maxwidth' => array(\n\t\t\t'value' => 'maxwidth',\n\t\t\t'label' => __( 'Max-width layout', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/layout-maxwidth.png',\n\t\t),\n\t\t'fullwidth' => array(\n\t\t\t'value' => 'fullwidth',\n\t\t\t'label' => __( 'Full-width layout', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/layout-fullwidth.png',\n\t\t),\n\n\t);\n\n\treturn apply_filters( 'techfak_layouts', $layout_options );\n}", "public function getAvailableLayoutTypes()\n {\n $module = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Module')->getCurrentSkinModule();\n\n return $module\n ? $this->getModuleLayoutTypes($module)\n : array(\n static::LAYOUT_GROUP_DEFAULT => $this->getLayoutTypes(),\n static::LAYOUT_GROUP_HOME => $this->getLayoutTypes(),\n );\n }", "public function getPageLayout() {}", "public static function get_layouts($id=null)\n {\n // We return an array if returning all layouts\n // Other wise return the object if we looking up a specific layout id\n $return = array();\n\n // Are we looking for a specific studio layout id?\n // If not we return all layouts\n if($id){\n // Return a specific studio layout by ID\n if(($data = Layout::find($id)) != NULL){\n $data->formatted_cost = $data->cost == '' ? '' : '&pound;' . number_format($data->cost,2);\n $return = $data;\n }\n }else{\n // Get all studio layout data and iterate the returned data\n $layouts = DB::table('quotation_layouts')->order_by('size_y', 'asc')->order_by('size_x', 'asc')->get();\n foreach($layouts as $layout)\n {\n $layout->formatted_cost = $layout->cost == '' ? '' : '&pound;' . number_format($layout->cost, 2);\n $code = str_replace('.', '', $layout->size_x) . 'x' . str_replace('.', '', $layout->size_y);\n $return[$code] = $layout;\n }\n }\n\n return $return;\n }", "public function getSlides()\n {\n return Slide::all();\n }", "function layouts($group = [])\n { \n $group = is_array($group) ? $group : func_get_args(); \n\n return app('armin.layout')->all()->filter(function($layout) use ($group) { \n if(empty($group) || in_array('*', $layout->group())) {\n return true;\n }\n\n return count(array_intersect($layout->group(), $group));\n });\n }", "function facebook_instant_articles_get_layout_info() {\n return array(\n 'facebook_instant_article' => array(\n 'label' => t('Facebook Instant Article'),\n 'path' => \"\",\n 'regions' => array(\n 'header' => t('Header'),\n 'body' => t('Body'),\n 'footer' => t('Footer'),\n ),\n 'image' => 1,\n ),\n );\n}", "private function fill_slider(){\n\t\tglobal $DB;\n\t\t$slides= \"SELECT * FROM {theme_archaius} ORDER BY position ASC\";\n\t $slides= $DB->get_records_sql($slides);\n\t return $slides;\n\t}", "public function getLayoutDependencies()\n {\n $objectManager = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager();\n return [\n 'processorFactory' => $objectManager->get(\\Magento\\Framework\\View\\Layout\\ProcessorFactory::class),\n 'eventManager' => $objectManager->get(\\Magento\\Framework\\Event\\ManagerInterface::class),\n 'structure' => $objectManager->create(\\Magento\\Framework\\View\\Layout\\Data\\Structure::class, []),\n 'messageManager' => $objectManager->get(\\Magento\\Framework\\Message\\ManagerInterface::class),\n 'themeResolver' => $objectManager->get(\\Magento\\Framework\\View\\Design\\Theme\\ResolverInterface::class),\n 'readerPool' => $objectManager->get('commonRenderPool'),\n 'generatorPool' => $objectManager->get(\\Magento\\Framework\\View\\Layout\\GeneratorPool::class),\n 'cache' => $objectManager->get(\\Magento\\Framework\\App\\Cache\\Type\\Layout::class),\n 'readerContextFactory' => $objectManager->get(\\Magento\\Framework\\View\\Layout\\Reader\\ContextFactory::class),\n 'generatorContextFactory' => $objectManager->get(\n \\Magento\\Framework\\View\\Layout\\Generator\\ContextFactory::class\n ),\n 'appState' => $objectManager->get(\\Magento\\Framework\\App\\State::class),\n 'logger' => $objectManager->get(\\Psr\\Log\\LoggerInterface::class),\n ];\n }", "private function getLayoutData()\n {\n return [\n 'components' => [\n 'checkout' => [\n 'children' => [\n 'steps' => [\n 'children' => [\n 'billing-step' => [\n 'children' => [\n 'payment' => [\n 'children' => [\n 'renders' => [\n 'children' => [\n 'payment1' => [\n 'methods' => [\n 'payment1_1' => [\n 'isBillingAddressRequired' => true\n ]\n ]\n ],\n 'payment2' => [\n 'methods' => [\n 'payment2_1' => [\n 'isBillingAddressRequired' => true\n ],\n 'payment2_2' => [\n 'isBillingAddressRequired' => false\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ]\n ];\n }", "public function layouts()\n\t{\n return array('table');\n\t}", "static function get() {\n $main = array();\n $opt = get_option('mpat_application_manager');\n if ($opt) {\n array_push($main, ['mpat_application_manager' => $opt]);\n }\n $opt = get_option('timeline_scenario');\n if ($opt) {\n array_push($main, ['timeline_scenario' => $opt]);\n }\n $opt = get_option('dsmcc');\n if ($opt) {\n array_push($main, ['dsmcc' => $opt]);\n }\n $pages = get_pages();\n foreach ($pages as $page) {\n $page = $page->to_array();\n $meta = get_post_meta($page['ID'], 'mpat_content', true);\n if (isset($meta[\"layoutId\"]))\n {\n $layout = get_post( $meta[\"layoutId\"] );\n if ($layout && $layout->post_type == \"page_layout\") {\n $meta[\"layout_name\"] = $layout->post_title;\n }\n }\n $page['meta'] = array('mpat_content' => $meta);\n array_push($main, array(\n \"page\" => $page,\n ));\n }\n $layouts = get_posts( array( 'post_type' => 'page_layout', 'posts_per_page' => '100' ) );\n foreach ($layouts as $layout) {\n $layout = $layout->to_array();\n if ($layout['post_status'] == 'publish') {\n $meta = get_post_meta($layout['ID'], 'mpat_content', true);\n $layout['meta'] = array('mpat_content' => $meta);\n array_push($main, array(\n \"page_layout\" => $layout,\n ));\n }\n }\n return $main;\n }", "public function layout(): iterable\n {\n return [\n Layout::metrics([\n 'Sales Today' => 'metrics.sales',\n 'Visitors Today' => 'metrics.visitors',\n 'Pending Orders' => 'metrics.orders',\n 'Total Earnings' => 'metrics.total',\n ]),\n\n Layout::columns([\n ChartLineExample::make('charts', 'Line Chart')\n ->description('Visualize data trends with multi-colored line graphs.'),\n\n ChartBarExample::make('charts', 'Bar Chart')\n ->description('Compare data sets with colorful bar graphs.'),\n ]),\n\n Layout::table('table', [\n TD::make('id', 'ID')\n ->width('100')\n ->render(fn (Repository $model) => // Please use view('path')\n \"<img src='https://loremflickr.com/500/300?random={$model->get('id')}'\n alt='sample'\n class='mw-100 d-block img-fluid rounded-1 w-100'>\n <span class='small text-muted mt-1 mb-0'># {$model->get('id')}</span>\"),\n\n TD::make('name', 'Name')\n ->width('450')\n ->render(fn (Repository $model) => Str::limit($model->get('name'), 200)),\n\n TD::make('price', 'Price')\n ->width('100')\n ->usingComponent(Currency::class, before: '$')\n ->align(TD::ALIGN_RIGHT)\n ->sort(),\n\n TD::make('created_at', 'Created')\n ->width('100')\n ->usingComponent(DateTimeSplit::class)\n ->align(TD::ALIGN_RIGHT),\n ]),\n\n Layout::modal('exampleModal', Layout::rows([\n Input::make('toast')\n ->title('Messages to display')\n ->placeholder('Hello world!')\n ->help('The entered text will be displayed on the right side as a toast.')\n ->required(),\n ]))->title('Create your own toast message'),\n ];\n }", "function ava_get_single_product_layouts() {\n\n\t$image_dir = get_template_directory_uri() . '/inc/customizer/images/';\n\n\treturn apply_filters(\n\t\t'ava_single_product_layouts', array(\n\t\t\t'single-product-1' => esc_url( $image_dir ) . 'single-product-1.svg',\n\t\t\t'single-product-2' => esc_url( $image_dir ) . 'single-product-2.svg',\n\t\t\t'single-product-3' => esc_url( $image_dir ) . 'single-product-3.svg',\n\t\t)\n\t);\n}", "public function getLayout(){\n $layout = $this->getAttribute('layout');\n\n $initLayout = $this->initLayout();\n\n if(!$layout){ // layout hasn't been initialized?\n $layout = $initLayout;\n $this->layout = json_encode($layout);\n $this->update(array('layout'));\n }else{\n $layout = json_decode($layout, true); // json to associative array\n if (!is_array ($layout)) $layout = array ();\n\n $this->addRemoveLayoutElements('left', $layout, $initLayout);\n $this->addRemoveLayoutElements('right', $layout, $initLayout);\n }\n\n return $layout;\n }", "public function getEnabledSlides()\n {\n $slides = ArrayList::create();\n \n foreach ($this->getListItems() as $item) {\n \n if ($slide = $this->createSlide($item)) {\n $slides->push($slide);\n }\n \n }\n \n return $slides;\n }", "public function getLayoutRelations()\r\n {\r\n return $this->layoutRelations;\r\n }", "function getModuleLayouts( $module ) {\n return Core::getLayouts( esf_Extensions::MODULE, $module );\n}", "function pi_get_content_layout()\n{\n return piBlogCustomize::pi_refresh_in_customize('pi_options[content][layout]') ? piBlogCustomize::pi_refresh_in_customize('pi_options[content][layout]') : piBlogFramework::$piOptions['content']['layout'];\n}", "function r2r_zen_discussion_node_panels_layouts() {\n $items['discussion_node'] = array(\n 'title' => t('Reality - Discussion Node Layout'),\n 'icon' => 'discussion_node.png',\n 'theme' => 'discussion_node',\n // 'css' => 'discussion_node.css',\n 'regions' => array(\n 'top' => t('Top'),\n 'left' => t('Left side'),\n 'right_t' => t('Right side, top row'),\n 'right_l' => t('Right side, Left col'),\n 'right_m' => t('Right side, Middle col'),\n 'right_r' => t('Right side, Right col'),\n 'right_b' => t('Right side, right row bottom')\n ),\n );\n\n return $items;\n}", "function colleges_post_list_layouts( $layouts ) {\n\treturn array_merge( $layouts, array(\n\t\t'people' => 'People Layout',\n\t\t'degree_block' => 'Degree Block Layout'\n\t) );\n}", "function initLayout(){\n $layout = array(\n 'left' => array(\n 'ProfileInfo' => array(\n 'title' => 'Profile Info',\n 'minimize' => false,\n ),\n 'EmailInboxMenu' => array(\n 'title' => 'Inbox Menu',\n 'minimize' => false,\n ),\n 'ActionMenu' => array(\n 'title' => 'Actions',\n 'minimize' => false,\n ),\n 'TopContacts' => array(\n 'title' => 'Top Contacts',\n 'minimize' => false,\n ),\n 'RecentItems' => array(\n 'title' => 'Recently Viewed',\n 'minimize' => false,\n ),\n 'ActionTimer' => array(\n 'title' => 'Action Timer',\n 'minimize' => true,\n ),\n 'UserCalendars' => array(\n 'title' => 'User Calendars',\n 'minimize' => false,\n ),\n 'CalendarFilter' => array(\n 'title' => 'Filter',\n 'minimize' => false,\n ),\n 'GroupCalendars' => array(\n 'title' => 'Group Calendars',\n 'minimize' => false,\n ),\n 'FilterControls' => array(\n 'title' => 'Filter Controls',\n 'minimize' => false,\n ),\n 'SimpleFilterControlEventTypes' => array(\n 'title' => 'Event Types',\n 'minimize' => false,\n ),\n ),\n 'right' => array(\n 'SmallCalendar' => array(\n 'title' => 'Small Calendar',\n 'minimize' => false,\n ),\n 'ChatBox' => array(\n 'title' => 'Activity Feed',\n 'minimize' => false,\n ),\n 'GoogleMaps' => array(\n 'title' => 'Google Map',\n 'minimize' => false,\n ),\n 'OnlineUsers' => array(\n 'title' => 'Active Users',\n 'minimize' => false,\n ),\n 'TagCloud' => array(\n 'title' => 'Tag Cloud',\n 'minimize' => false,\n ),\n 'TimeZone' => array(\n 'title' => 'Clock',\n 'minimize' => false,\n ),\n 'SmallCalendar' => array(\n 'title' => 'Calendar',\n 'minimize' => false,\n ),\n 'QuickContact' => array(\n 'title' => 'Quick Contact',\n 'minimize' => false,\n ),\n 'MediaBox' => array(\n 'title' => 'Files',\n 'minimize' => false,\n ),\n ),\n 'hiddenRight' => array(\n 'ActionMenu' => array(\n 'title' => 'My Actions',\n 'minimize' => false,\n ),\n 'MessageBox' => array(\n 'title' => 'Message Board',\n 'minimize' => false,\n ),\n 'NoteBox' => array(\n 'title' => 'Note Pad',\n 'minimize' => false,\n ),\n 'DocViewer' => array(\n 'title' => 'Doc Viewer',\n 'minimize' => false,\n ),\n 'TopSites' => array(\n 'title' => 'Top Sites',\n 'minimize' => false,\n ),\n ),\n );\n if(Yii::app()->contEd('pro')){\n if(file_exists('protected/config/proWidgets.php')){\n foreach(include('protected/config/proWidgets.php') as $loc=>$data){\n if (isset ($layout[$loc]))\n $layout[$loc] = array_merge($layout[$loc],$data);\n }\n }\n }\n return $layout;\n }", "function getLayout() {return $this->readLayout();}", "protected function elements()\n {\n $window = $this->getUrlWindow($this->onEachSide);\n\n return array_filter(array(\n $window['first'],\n is_array($window['slider']) ? '...' : null,\n $window['slider'],\n is_array($window['last']) ? '...' : null,\n $window['last'],\n ));\n }", "public function getAllSlideTemplates() {\n return $this->container->get('doctrine')\n ->getRepository('Os2DisplayCoreBundle:SlideTemplate')\n ->findAll();\n }", "protected function _getPageArray()\n {\n return array(\n\n array(\n 'version' => '0.0.2',\n 'identifier' => 'porto_home_6',\n 'page_layout' => '1column',\n 'stores' => [0],\n 'title' => 'Tile, Stone, Concrete Tools & Supply - Master Wholesale',\n 'content_heading' => 'Tile, Stone, Concrete Tools & Supply - Master Wholesale',\n 'content' => <<<HTML\n<div class=\"row\" style=\"margin: 0 -10px;\">\n <div class=\"col-lg-3\" style=\"padding: 0 10px;\">\n <div class=\"home-side-menu\">\n <h2 class=\"side-menu-title\">CATEGORIES</h2>\n {{block class=\"Smartwave\\Megamenu\\Block\\Topmenu\" name=\"sw.sidenav\" template=\"Smartwave_Megamenu::sidemenu.phtml\" ttl=\"3600\"}}\n </div>\n </div>\n <div class=\"col-lg-9\" style=\"padding: 0 10px;\">\n <div id=\"banner-slider-demo-9\" class=\"owl-carousel owl-banner-carousel owl-bottom-narrow\" style=\"margin-bottom:20px;\">\n <div class=\"item\">\n <div style=\"position:relative\">\n <img src=\"{{media url=&quot;wysiwyg/Master/mh-slide.png&quot;}}\" alt=\"\" />\n </div>\n </div>\n <div class=\"item\">\n <div style=\"position:relative\">\n <img src=\"{{media url=&quot;wysiwyg/Master/leveling-slide.jpg&quot;}}\" alt=\"\" />\n </div>\n </div>\n <div class=\"item\">\n <div style=\"position:relative\">\n <img src=\"{{media url=&quot;wysiwyg/schluter-slide.jpg&quot;}}\" alt=\"\" />\n </div>\n </div>\n </div>\n <script type=\"text/javascript\">\n require([\n 'jquery',\n 'owl.carousel/owl.carousel.min'\n ], function ($) {\n $(\"#banner-slider-demo-9\").owlCarousel({\n items: 1,\n autoplay: true,\n autoplayTimeout: 5000,\n autoplayHoverPause: true,\n dots: true,\n nav: false,\n navRewind: true,\n animateIn: 'fadeIn',\n animateOut: 'fadeOut',\n loop: true\n });\n });\n </script>\n </div>\n</div>\n<div class=\"row\" style=\"margin: 0 -10px;\">\n\n\n\n <div class=\"col-lg-3\" style=\"padding: 0 10px;\">\n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\" style=\"text-align:center;\">\n <br />\n<br />\n<br />\n<br />\n<br />\n<br />\n<br />\n </div>\n </div> \n <!-- end -->\n<br /><br />\n<!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\">\n <h2><a href=\"#\">Blog Articles</a></h2>\n<ul class=\"recent-blog\" style=\"list-style:none; padding-inline-start:12px; padding-right:12px;\">\n<li><a title=\"Bosch Laser Level - GLL3-330CG\" href=\"https://www.masterwholesale.com/blog/bosch-green-line-laser-level-review/\" target=\"_blank\">Review: Bosch Green Line Laser Level</a></li>\n<li><a title=\"Makita LXT Lithium Ion Cordless Brushless Angle Grinder\" href=\"https://www.masterwholesale.com/blog/makita-18v-lxt-lithium-ion-cordless-brushless-angle-grinder-review/\" target=\"_blank\">Review: Makita&nbsp;<span>LXT Cordless Brushless Angle Grinder&nbsp;</span></a></li>\n<li><a title=\"Mixing Laticrete PermaColor Grout\" href=\"https://www.masterwholesale.com/blog/how-to-mix-small-batch-laticrete-permacolor-select-grout/\" target=\"_blank\">How to Mix a Small Batch of Laticrete PermaColor Grout</a></li>\n<li><a title=\"Polishing Tile Edges with Diamond Hand Polishing Pads\" href=\"https://www.masterwholesale.com/blog/polish-stone-porcelain-tile-diamond-hand-polishing-pads/\" target=\"_blank\">How to Polish Tile Edges w/ Diamond Hand Polishing Pads</a></li>\n<li><a title=\"Stoning Porcelain and Stone Tile\" href=\"https://www.masterwholesale.com/blog/stone-edge-porcelain-tile-stone/\" target=\"_blank\">How to Stone or Edge Porcelain and Stone Tiles</a></li>\n<li><a title=\"Bridge Saw vs Sliding Table Saw\" href=\"https://www.masterwholesale.com/blog/366-2/\" target=\"_blank\">Bridge Saw vs Sliding Table Saw</a></li>\n<li><a title=\"How to Core with a Diamond Core Drill Bit\" href=\"https://www.masterwholesale.com/blog/dry-core-drill-tile-stone/\" target=\"_blank\">How to Dry Core Drill on Stone or Tile</a></li>\n<li><a title=\"How to Reopen a diamond Core Bit \" href=\"https://www.masterwholesale.com/blog/master-wholesale-reopen-diamond-core-bit/\" target=\"_blank\">How to Sharpen or Reopen a Diamond Core Bit</a></li>\n<li><a title=\"Resin Glass Blade Shootout\" href=\"https://www.masterwholesale.com/blog/resin-glass-blade-shootout/\" target=\"_blank\">Resin Glass Blade Shootout with Blake Adsero</a></li>\n<li><a title=\"Makita Polishing Kit\" href=\"https://www.masterwholesale.com/blog/makita-pw5001c-wet-polishing-kit-master-wholesale/\" target=\"_blank\">How to Polish an Exposed Edge on Stone Tile</a></li>\n<li><a title=\"Deluxe Dry Polishing Kit\" href=\"https://www.masterwholesale.com/blog/?p=254\" target=\"_self\">MWI Deluxe Dry Polishing Kit Demo</a></li>\n<li><a title=\"Laser Level Shootout\" href=\"https://www.masterwholesale.com/blog/laser-level-shootout/\" target=\"_self\">Laser Level Shootout</a></li>\n<li><a title=\"Ishii Tile Cutters\" href=\"https://www.masterwholesale.com/blog/how-to-assemble-and-use-the-ishii-blue-tile-cutters/\" target=\"_self\">How to Assemble and Use Ishii BlueTile Cutters</a></li>\n<li><a title=\"Diamond Blade Shootout\" href=\"https://www.masterwholesale.com/blog/tile-saw-diamond-blade-shootout/\" target=\"_self\">Tile Saw Diamond Blade Shootout</a></li>\n</ul>\n </div>\n </div> \n <!-- end -->\n <div id=\"ads-slider-demo-9\" class=\"owl-carousel\">\n <div class=\"item\" style=\"text-align:center;\">\n <img src=\"\" alt=\"\" style=\"display:inline-block;\"/>\n </div>\n </div>\n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\" style=\"text-align:center;\">\n {{block class=\"Magento\\Framework\\View\\Element\\Template\" name=\"single_special\" template=\"Magento_Catalog::product/view/single_special.phtml\" ttl=\"3600\"}}\n </div>\n </div> \n <!-- end -->\n </div>\n <div class=\"col-lg-9\" style=\"padding: 0 10px;\">\n <h2 class=\"filterproduct-title\"><span class=\"content\"><strong>FEATURED ITEMS</strong></span></h2>\n <div id=\"featured_product\" class=\"owl-top-narrow\">\n {{block class=\"Smartwave\\Filterproducts\\Block\\Home\\FeaturedList\" name=\"featured_product\" product_count=\"8\" aspect_ratio=\"0\" image_width=\"140\" product_type=\"1\" template=\"grid.phtml\"}}\n </div>\n <h2 class=\"filterproduct-title\"><span class=\"content\"><strong>BESTSELLERS</strong></span></h2>\n <div id=\"new_product\" class=\"owl-top-narrow\">\n {{block class=\"Smartwave\\Filterproducts\\Block\\Home\\BestsellersList\" name=\"bestseller_list\" product_count=\"8\" aspect_ratio=\"0\" product_type=\"1\" image_width=\"140\" template=\"grid.phtml\"}}\n </div>\n </div>\n<style type=\"text/css\">\n #banner-slider-demo-9 img {width:100%;}\n #banner-slider-demo-9 .content h2 {\n font-size: 44px;\n font-weight: 900;\n letter-spacing: -0.025em;\n text-transform: uppercase;\n line-height: 38px;\n margin-bottom: 10px;\n margin-top:0;\n }\n #banner-slider-demo-9 .content span {\n font-size:18px;\n line-height:38px;\n font-weight: 700;\n text-transform:uppercase;\n }\n #banner-slider-demo-9 .content p {\n font-size:14px;\n font-weight:300;\n margin-bottom:10;\n }\n #banner-slider-demo-9 .content .btn-default {\n font-size: 14px;\n line-height: 25px;\n letter-spacing: 0.025em;\n padding: 10px 34px;\n border-radius:3px;\n background-color: #010204;\n color: #fff;\n font-family: 'Oswald';\n text-transform: uppercase; \n margin-top: 28px;\n } \n #testimonials-slider-demo-9 {\n border: solid 2px #0188cc;\n border-radius: 2px;\n }\n @media (min-width: 768px) {\n .page-header .nav-sections {\n display: none;\n }\n h2.side-menu-title {\n padding: 16px 25px;\n }\n.sw-megamenu.navigation.side-megamenu li.level0 > a {\n margin: 0 20px;\n line-height: 44px;\n font-weight: 600;\n}\n }\n @media (max-width: 767px) {\n #banner-slider-demo-9 img {width:100%;height:100%;}\n #banner-slider-demo-9 .owl-controls {\n display:none !important;\n }\n #banner-slider-demo-9 .content {\n top:15% !important;\n }\n #banner-slider-demo-9 .content h2 {\n font-size: 24px; \n line-height: 1;\n margin-bottom: 5px;\n }\n #banner-slider-demo-9 .content span {\n font-size: 11px !important;\n line-height: 23px; \n }\n #banner-slider-demo-9 .content span b {\n font-size: 15px !important;\n }\n #banner-slider-demo-9 .content p {\n font-size: 11px !important; \n margin-bottom: 10px;\n }\n #banner-slider-demo-9 .content .btn-default {\n font-size: 10px !important;\n line-height: 20px; \n padding: 3px 13px;\n border-radius: 3px; \n margin-top: 0px;\n } \n }\n</style>\nHTML\n ),\n array(\n 'version' => '0.0.3',\n 'identifier' => 'porto_home_6',\n 'page_layout' => '1column',\n 'stores' => [0],\n 'title' => 'Tile, Stone, Concrete Tools & Supply - Master Wholesale',\n 'content_heading' => 'Tile, Stone, Concrete Tools & Supply - Master Wholesale',\n 'content' => <<<HTML\n<div class=\"row\" style=\"margin: 0 -10px;\">\n <div class=\"col-lg-3\" style=\"padding: 0 10px;\">\n {{block class=\"Magento\\\\Cms\\\\Block\\\\Block\" block_id=\"home_sidebar\"}}\n </div>\n <div class=\"col-lg-9\" style=\"padding: 0 10px;\">\n <div id=\"banner-slider-demo-9\" class=\"owl-carousel owl-banner-carousel owl-bottom-narrow\" style=\"margin-bottom:20px;\">\n <div class=\"item\">\n <div style=\"position:relative\"> <img src=\"{{media url=&quot;wysiwyg/Master/mh-slide.png&quot;}}\" alt=\"\" /> </div>\n </div>\n <div class=\"item\">\n <div style=\"position:relative\"> <img src=\"{{media url=&quot;wysiwyg/Master/leveling-slide.jpg&quot;}}\" alt=\"\" /> </div>\n </div>\n <div class=\"item\">\n <div style=\"position:relative\"> <img src=\"{{media url=&quot;wysiwyg/schluter-slide.jpg&quot;}}\" alt=\"\" /> </div>\n </div>\n </div>\n <script type=\"text/javascript\">\n require([\n 'jquery',\n 'owl.carousel/owl.carousel.min'\n ], function ($) {\n $(\"#banner-slider-demo-9\").owlCarousel({\n items: 1,\n autoplay: true,\n autoplayTimeout: 5000,\n autoplayHoverPause: true,\n dots: true,\n nav: false,\n navRewind: true,\n animateIn: 'fadeIn',\n animateOut: 'fadeOut',\n loop: true\n });\n });\n </script>\n <h2 class=\"filterproduct-title\"><span class=\"content\"><strong>FEATURED ITEMS</strong></span></h2>\n <div id=\"featured_product\" class=\"owl-top-narrow\"> {{block class=\"Smartwave\\Filterproducts\\Block\\Home\\FeaturedList\" name=\"featured_product\" product_count=\"8\" aspect_ratio=\"0\" image_width=\"140\" product_type=\"1\" template=\"grid.phtml\"}} </div>\n <h2 class=\"filterproduct-title\"><span class=\"content\"><strong>BESTSELLERS</strong></span></h2>\n <div id=\"new_product\" class=\"owl-top-narrow\"> {{block class=\"Smartwave\\Filterproducts\\Block\\Home\\BestsellersList\" name=\"bestseller_list\" product_count=\"8\" aspect_ratio=\"0\" product_type=\"1\" image_width=\"140\" template=\"grid.phtml\"}} </div>\n </div>\n</div>\n<style type=\"text/css\">\n #banner-slider-demo-9 img {width:100%;}\n #banner-slider-demo-9 .content h2 {\n font-size: 44px;\n font-weight: 900;\n letter-spacing: -0.025em;\n text-transform: uppercase;\n line-height: 38px;\n margin-bottom: 10px;\n margin-top:0;\n }\n #banner-slider-demo-9 .content span {\n font-size:18px;\n line-height:38px;\n font-weight: 700;\n text-transform:uppercase;\n }\n #banner-slider-demo-9 .content p {\n font-size:14px;\n font-weight:300;\n margin-bottom:10;\n }\n #banner-slider-demo-9 .content .btn-default {\n font-size: 14px;\n line-height: 25px;\n letter-spacing: 0.025em;\n padding: 10px 34px;\n border-radius:3px;\n background-color: #010204;\n color: #fff;\n font-family: 'Oswald';\n text-transform: uppercase; \n margin-top: 28px;\n } \n #testimonials-slider-demo-9 {\n border: solid 2px #0188cc;\n border-radius: 2px;\n }\n @media (min-width: 768px) {\n .page-header .nav-sections {\n display: none;\n }\n h2.side-menu-title {\n padding: 16px 25px;\n }\n.sw-megamenu.navigation.side-megamenu li.level0 > a {\n margin: 0 20px;\n line-height: 44px;\n font-weight: 600;\n}\n }\n @media (max-width: 767px) {\n #banner-slider-demo-9 img {width:100%;height:100%;}\n #banner-slider-demo-9 .owl-controls {\n display:none !important;\n }\n #banner-slider-demo-9 .content {\n top:15% !important;\n }\n #banner-slider-demo-9 .content h2 {\n font-size: 24px; \n line-height: 1;\n margin-bottom: 5px;\n }\n #banner-slider-demo-9 .content span {\n font-size: 11px !important;\n line-height: 23px; \n }\n #banner-slider-demo-9 .content span b {\n font-size: 15px !important;\n }\n #banner-slider-demo-9 .content p {\n font-size: 11px !important; \n margin-bottom: 10px;\n }\n #banner-slider-demo-9 .content .btn-default {\n font-size: 10px !important;\n line-height: 20px; \n padding: 3px 13px;\n border-radius: 3px; \n margin-top: 0px;\n } \n }\n</style>\nHTML\n ),\n\n );\n }", "public function getLayout() {\n\n return $this->asset_array['default']['layout']['name'];\n }", "public static function getKeyboardLayouts($format = false) {\n\n if ($format) {\n $layouts = [];\n $locales = self::getKeyboardLocales();\n foreach ($locales as $locale) {\n $layouts[$locale] = self::getKeyboardLayout($locale, $format);\n }\n return $layouts;\n }\n\n return self::$layouts;\n }", "private function getWidgets()\n {\n /* Config: menu widget,metodo getGonfig\n * $this->widget\n *\n * Content: array(widget,metodo,);\n */\n\n /*\n * 'config' => $this->widget('menu', 'getConfig', array('perfil-img')),\n * ** array('perfil-img') == array de la posicion y la visibilidad **\n */\n\n /*\n * 'content' => array('menu', 'getMenu', array('perfil-img', 'perfil-img')),\n * ** array('perfil-img', 'perfil-img') ==\n */\n $db = new Database(DB_HOST, DB_NAME, DB_USER, DB_PASS, DB_CHAR);\n $query = $db->query(\"SELECT * FROM \" . DB_PREFIJO . \"widgets\");\n $widget = $query->fetchAll(PDO::FETCH_OBJ);\n $widgets = array();\n foreach ($widget as $key => $valor) {\n $widgets[$valor->nombre] = array('config' => $this->widget('menu', 'getConfig', array($valor->nombre)), 'content' => array('menu', 'getMenu', array($valor->nombre, $valor->view)),);\n }\n $positions = $this->getLayoutPositions();\n $keys = array_keys($widgets);\n foreach ($keys as $k) {\n /* verificar si la posicion del widget esta presente */\n if (isset($positions[$widgets[$k]['config']['position']])) {\n /* verificar si esta deshabilitado para la vista */\n if (!isset($widgets[$k]['config']['hide']) || !in_array(self::$_item, $widgets[$k]['config']['hide'])) {\n /* verificar si esta habilitado para la vista */\n if ($widgets[$k]['config']['show'] === 'all' || in_array(self::$_item, $widgets[$k]['config']['show'])) {\n if (isset($this->_widget[$k])) {\n $widgets[$k]['content'][2] = $this->_widget[$k];\n }\n /* llenar la posicion del layout */\n $positions[$widgets[$k]['config']['position']][] = $this->getWidgetContent($widgets[$k]['content']);\n\n }\n }\n }\n }\n return $positions;\n }", "public static function map() {\n return array(\n 'name' => esc_html__( 'Header Slider', 'webzp_r_hs' ),\n 'description' => esc_html__( 'Outputs header slider.', 'webzp_r_hs' ),\n 'category' => esc_html__( 'Content', 'webzp_r_hs' ),\n 'base' => 'webzp_r_header_slider',\n 'params' => array(\n array(\n 'type' => 'textfield',\n 'heading' => esc_html__( 'First slide title', 'webzp_r_hs' ),\n 'param_name' => 'first_title',\n 'value' => '',\n ),\n\n array(\n 'type' => 'textfield',\n 'heading' => esc_html__( 'Second slide title', 'webzp_r_hs' ),\n 'param_name' => 'second_title',\n 'value' => '',\n ),\n\n array(\n 'type' => 'textfield',\n 'heading' => esc_html__( 'First slide description', 'webzp_r_hs' ),\n 'param_name' => 'first_slide_desc',\n 'value' => '',\n ),\n\n array(\n 'type' => 'textfield',\n 'heading' => esc_html__( 'Second slide description', 'webzp_r_hs' ),\n 'param_name' => 'second_slide_desc',\n 'value' => '',\n ),\n\n array(\n 'type' => 'textarea',\n 'heading' => esc_html__( 'Slider bottom description', 'webzp_r_hs' ),\n 'param_name' => 'slider_desc',\n 'value' => '',\n ),\n\n array(\n 'type' => 'attach_image',\n 'heading' => esc_html__( 'First slide background', 'webzp_r_hs' ),\n 'param_name' => 'first_slide_bg',\n 'value' => '',\n ),\n\n array(\n 'type' => 'attach_image',\n 'heading' => esc_html__( 'Second slide background', 'webzp_r_hs' ),\n 'param_name' => 'second_slide_bg',\n 'value' => '',\n ),\n\n array(\n 'type' => 'attach_image',\n 'heading' => esc_html__( 'First slide icon', 'webzp_r_hs' ),\n 'param_name' => 'first_slide_icon',\n 'value' => '',\n ),\n\n array(\n 'type' => 'attach_image',\n 'heading' => esc_html__( 'Second slide icon', 'webzp_r_hs' ),\n 'param_name' => 'second_slide_icon',\n 'value' => '',\n ),\n\n array(\n 'type' => 'vc_link',\n 'heading' => esc_html__( 'First slide link', 'webzp_r_hs' ),\n 'param_name' => 'first_slide_link',\n 'value' => '',\n ),\n\n array(\n 'type' => 'vc_link',\n 'heading' => esc_html__( 'Second slide link', 'webzp_r_hs' ),\n 'param_name' => 'second_slide_link',\n 'value' => '',\n ),\n ),\n );\n }", "protected function _initLayouts()\n {\n $layouts = [];\n\n if (method_exists($this, 'registerLayouts')) {\n $layouts = $this->registerLayouts();\n }\n\n foreach ($layouts as $layout) {\n $this->_initLayout($layout);\n }\n }", "public function getSliderList()\n { \n $sliders = PageSlider::where('status', PageSlider::ACTIVE)->get();\n return $sliders;\n }", "function fanwood_plugin_layouts( $layout ) {\n\n\tif ( current_theme_supports( 'theme-layouts' ) ) {\n\t\n\t\t$global_layout = hybrid_get_setting( 'fanwood_global_layout' );\n\t\t$buddypress_layout = hybrid_get_setting( 'fanwood_buddypress_layout' );\n\n\t\tif ( function_exists( 'bp_loaded' ) && !bp_is_blog_page() && $layout == 'layout-default' ) {\n\t\t\n\t\t\tif ( $buddypress_layout !== 'layout_default' ) {\n\t\t\t\n\t\t\t\tif ( $buddypress_layout == 'layout_1c' )\n\t\t\t\t\t$layout = 'layout-1c';\n\t\t\t\telseif ( $buddypress_layout == 'layout_2c_l' )\n\t\t\t\t\t$layout = 'layout-2c-l';\n\t\t\t\telseif ( $buddypress_layout == 'layout_2c_r' )\n\t\t\t\t\t$layout = 'layout-2c-r';\n\t\t\t\telseif ( $buddypress_layout == 'layout_3c_c' )\n\t\t\t\t\t$layout = 'layout-3c-c';\n\t\t\t\telseif ( $buddypress_layout == 'layout_3c_l' )\n\t\t\t\t\t$layout = 'layout-3c-l';\n\t\t\t\telseif ( $buddypress_layout == 'layout_3c_r' )\n\t\t\t\t\t$layout = 'layout-3c-r';\n\t\t\t\telseif ( $buddypress_layout == 'layout_hl_1c' )\n\t\t\t\t\t$layout = 'layout-hl-1c';\n\t\t\t\telseif ( $buddypress_layout == 'layout_hl_2c_l' )\n\t\t\t\t\t$layout = 'layout-hl-2c-l';\n\t\t\t\telseif ( $buddypress_layout == 'layout_hl_2c_r' )\n\t\t\t\t\t$layout = 'layout-hl-2c-r';\n\t\t\t\telseif ( $buddypress_layout == 'layout_hr_1c' )\n\t\t\t\t\t$layout = 'layout-hr-1c';\n\t\t\t\telseif ( $buddypress_layout == 'layout_hr_2c_l' )\n\t\t\t\t\t$layout = 'layout-hr-2c-l';\n\t\t\t\telseif ( $buddypress_layout == 'layout_hr_2c_r' )\n\t\t\t\t\t$layout = 'layout-hr-2c-r';\n\t\t\t\t\n\t\t\t} elseif ( $buddypress_layout == 'layout_default' ) {\n\t\t\t\n\t\t\t\tif ( $global_layout == 'layout_1c' )\n\t\t\t\t\t$layout = 'layout-1c';\n\t\t\t\telseif ( $global_layout == 'layout_2c_l' )\n\t\t\t\t\t$layout = 'layout-2c-l';\n\t\t\t\telseif ( $global_layout == 'layout_2c_r' )\n\t\t\t\t\t$layout = 'layout-2c-r';\n\t\t\t\telseif ( $global_layout == 'layout_3c_c' )\n\t\t\t\t\t$layout = 'layout-3c-c';\n\t\t\t\telseif ( $global_layout == 'layout_3c_l' )\n\t\t\t\t\t$layout = 'layout-3c-l';\n\t\t\t\telseif ( $global_layout == 'layout_3c_r' )\n\t\t\t\t\t$layout = 'layout-3c-r';\n\t\t\t\telseif ( $global_layout == 'layout_hl_1c' )\n\t\t\t\t\t$layout = 'layout-hl-1c';\n\t\t\t\telseif ( $global_layout == 'layout_hl_2c_l' )\n\t\t\t\t\t$layout = 'layout-hl-2c-l';\n\t\t\t\telseif ( $global_layout == 'layout_hl_2c_r' )\n\t\t\t\t\t$layout = 'layout-hl-2c-r';\n\t\t\t\telseif ( $global_layout == 'layout_hr_1c' )\n\t\t\t\t\t$layout = 'layout-hr-1c';\n\t\t\t\telseif ( $global_layout == 'layout_hr_2c_l' )\n\t\t\t\t\t$layout = 'layout-hr-2c-l';\n\t\t\t\telseif ( $global_layout == 'layout_hr_2c_r' )\n\t\t\t\t\t$layout = 'layout-hr-2c-r';\n\t\t\t\n\t\t\t}\n\n\t\t}\n\t\t\n\t}\n\t\n\treturn $layout;\n\n}", "function quest_ptpb_prebuilt_layouts( $layouts ) {\n\n\t\t$path = get_template_directory() . '/pace-builder/layouts/';\n\n\t\t$layouts['Agency'] = array(\n\t\t\t\t'tab_pane'\t=> 'Quest Prebuilt',\n\t\t\t\t'thumb'\t\t=> 'http://demo.pacethemes.com/pace-builder/wp-content/uploads/sites/6/2016/06/app-landing-350x300.jpg',\n\t\t\t\t'preview'\t=> 'http://demo.pacethemes.com/pace-builder/layouts/app-landing-page/',\n\t\t\t\t'layout'\t=> json_decode( quest_read_layout_file( $path . 'agency.json' ), true )\n\t\t\t);\n\n\t\treturn $layouts;\n\t}", "public static function getLayout()\r\n {\r\n if (!isset(static::$_layout[static::layoutName()])) {\r\n $connection = static::getDb();\r\n static::$_layout[static::layoutName()] = $connection->getLayout(static::layoutName());\r\n }\r\n return static::$_layout[static::layoutName()];\r\n }", "public function toOptionArray()\n {\n if ($this->_options === null) {\n $this->_options = array();\n foreach (Mage::getSingleton('page/config')->getPageLayouts() as $layout) {\n $this->_options[] = array(\n 'value' => $layout->getTemplate(),\n 'label' => $layout->getLabel(),\n );\n }\n }\n return $this->_options;\n }", "function getLayout()\n\t{\n\t\treturn $this->createQueryBuilder('app')\n\t\t\t->where('app.zone IS NOT NULL')\n\t\t\t->getQuery()\n\t\t\t->useResultCache(true, null, self::CACHE_ID)\n\t\t\t->getResult();\n\t}", "public static function get_all_sliders() {\n\t\treturn array_merge( self::get_layer_sliders(), self::get_rev_sliders() );\n\t}", "public function getLayout($layoutName)\n {\n return !empty($this->_layouts[$layoutName]) ? $this->_layouts[$layoutName] : [];\n }", "function ava_get_top_header_layouts() {\n\n\t$image_dir = get_template_directory_uri() . '/inc/customizer/images/';\n\n\treturn apply_filters(\n\t\t'ava_top_header_layouts', array(\n\t\t\t'top-header-1' => esc_url( $image_dir ) . 'top-header-1.svg',\n\t\t\t'top-header-2' => esc_url( $image_dir ) . 'top-header-2.svg',\n\t\t\t'top-header-3' => esc_url( $image_dir ) . 'top-header-3.svg',\n\t\t)\n\t);\n}", "public function get_slides_for_slider() {\n return $this->slides_to_include;\n }", "protected function getSmallSlider()\n {\n return array(\n 'first' => $this->getUrlRange(1, $this->lastPage()),\n 'slider' => null,\n 'last' => null,\n );\n }", "function wprt_blog_entry_layout_blocks() {\n\n\t// Get layout blocks\n\t$blocks = wprt_get_mod( 'blog_entry_composer' );\n\n\t// If blocks are 100% empty return defaults\n\t$blocks = $blocks ? $blocks : 'title,meta,excerpt_content,readmore';\n\n\t// Convert blocks to array so we can loop through them\n\tif ( ! is_array( $blocks ) ) {\n\t\t$blocks = explode( ',', $blocks );\n\t}\n\n\t// Set block keys equal to vals\n\t$blocks = array_combine( $blocks, $blocks );\n\n\t// Return blocks\n\treturn $blocks;\n}", "public function getSlides(){\r\n\t\treturn $this->getModel()->getSlides();\r\n\t}", "public static function templateStyles()\n {\n return [\n '1_column' => [\n 'full_width_banner',\n 'single_text_row',\n 'footer',\n ],\n '1_2_column' => [\n 'full_width_banner',\n 'single_text_row',\n 'two_image_text_columns',\n 'footer',\n ],\n '1_2_1_column' => [\n 'full_width_banner',\n 'single_text_row',\n 'two_image_text_columns',\n 'single_text_row',\n 'footer',\n ],\n '1_3_column' => [\n 'full_width_banner',\n 'single_text_row',\n 'three_image_text_columns',\n 'single_text_row',\n 'footer',\n ],\n '1_3_1_column' => [\n 'full_width_banner',\n 'single_text_row',\n 'three_image_text_columns',\n 'single_text_row',\n 'footer',\n ],\n '1_3_2_column' => [\n 'full_width_banner',\n 'single_text_row',\n 'three_image_text_columns',\n 'two_image_text_columns',\n 'footer',\n ],\n '2_column' => [\n 'full_width_banner',\n 'two_image_text_columns',\n 'footer',\n ],\n '2_1_column' => [\n 'full_width_banner',\n 'two_image_text_columns',\n 'single_text_row',\n 'footer',\n ],\n '2_1_2_column' => [\n 'full_width_banner',\n 'two_image_text_columns',\n 'single_text_row',\n 'two_image_text_columns',\n 'footer',\n ],\n '3_1_3_column' => [\n 'full_width_banner',\n 'three_image_text_columns',\n 'single_text_row',\n 'three_image_text_columns',\n 'footer',\n ],\n ];\n }", "function sb_slideshow_slides( $sql ) {\n\tglobal $wpdb, $post, $sb_slideshow_interface, $sb_slideshow_slides;\n\n\t$slides = get_post_meta( ( ! isset( $post->ID ) ? absint( $_POST['id'] ) : $post->ID ), 'slide', false ); // set single (third parameter) to false to pull ALL records with key \"slide\"\n\n\t$attachments = $wpdb->get_results( $sql );\n\n\t// push all image attachments info into array\n\t$indexes = array();\n\tforeach( $attachments as $attachment ) {\n\t\tarray_push( $indexes, count( $sb_slideshow_slides ) );\n\n\t\t$box = 'library';\n\t\t$order = '';\n\t\tforeach( $slides as $slide ) {\n\t\t\tif( $slide['attachment_id'] == $attachment->ID ) {\n\t\t\t\t$box = 'slides';\n\t\t\t\t$order = $slide['order'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$metadata = wp_get_attachment_metadata( $attachment->ID );\n\n\t\tarray_push( $sb_slideshow_slides, array(\n\t\t\t'box' \t\t\t=> $box,\n\t\t\t'order'\t\t\t=> $order,\n\t\t\t'attachment'\t\t=> array(\n\t\t\t\t'id' \t\t=> $attachment->ID,\n\t\t\t\t'year' \t\t=> mysql2date( 'Y', $attachment->post_date ),\n\t\t\t\t'month' \t=> mysql2date( 'm', $attachment->post_date ),\n\t\t\t\t'width'\t\t=> $metadata['width'],\n\t\t\t\t'height' \t=> $metadata['height'],\n\t\t\t\t'type' \t\t=> $attachment->post_mime_type,\n\t\t\t\t'link'\t\t=> $attachment->post_excerpt,\n\t\t\t\t'content'\t=> $attachment->post_content ),\n\t\t\t\t'image' \t=> '<img src=\"' . sb_get_post_image_url( array( 'width' => $sb_slideshow_interface['slide_width'], 'height' => $sb_slideshow_interface['slide_height'], 'image_id' \t=> $attachment->ID, 'echo' \t=> false ) ) . '\" width=\"' . $sb_slideshow_interface['slide_width'] . '\" height=\"' . $sb_slideshow_interface['slide_height'] . '\" />'\n\t\t\t)\n\t\t);\n\t}\n\n\tusort( $sb_slideshow_slides, 'sb_slideshow_slide_sort' ); // order the elements of the array\n\n\treturn $indexes;\n}", "public function getList($typeSlide = null)\n\t{\n\t\t$listBlock = [];\n\t\t$listMenu = [];\n\t\t$listClass = [];\n\t\t$listNews = [];\n\t\tif (!$typeSlide) {\n\t\t\t$typeSlide = TYPE_SLIDE_FULL;\n\t\t\t$listBlock = Blocks::where('id', '!=', 1)->with('slidesFull')->orderBy('id', 'desc')->get();\n\t\t\t$listMenu = Menus::where('link', '')->with('slidesFull')->orderBy('id', 'desc')->get();\n\t\t\t$listClass = HomeClass::with('slidesFull')->orderBy('id', 'desc')->get();\n\t\t}\n\t\tif ($typeSlide == TYPE_SLIDE_STUDENT) {\n\t\t\t$listBlock = Blocks::with('slidesStudent')->orderBy('id', 'desc')->get();\n\t\t\t$listMenu = Menus::where('link', '')->with('slidesStudent')->orderBy('id', 'desc')->get();\n\t\t\t$listClass = HomeClass::with('slidesStudent')->orderBy('id', 'desc')->get();\n\t\t}\n\t\tif ($typeSlide == TYPE_SLIDE_ROW) {\n\t\t\t// $listBlock = Blocks::with('slidesRow')->find(THCS_BLOCK);\n\t\t\t$listBlock = Slide::where('block_id', THCS_BLOCK)->where('display_type', TYPE_SLIDE_ROW)->get();\n\t\t\t$listNews = Slide::where('block_id', SLIDE_HOME)->where('display_type', TYPE_SLIDE_ROW)->get();\n\t\t\t$listMenu = Menus::where('link', '')->with('slidesRow')->orderBy('id', 'desc')->get();\n\t\t}\n\t\t$data = Slide::orderBy('id', 'desc')->paginate(PAGINATE);\n\t\t\n\t\treturn View::make('admin.slide.index')->with(compact('data', 'listBlock', 'listMenu', 'listClass', 'listNews'));\n\t}", "protected function loadThemeLayouts()\n {\n $this->layouts = [];\n $layoutsDirectory = new DirectoryIterator($this->getFolder() . '/layouts');\n foreach ($layoutsDirectory as $entry) {\n if ($entry->isDir() && ! $entry->isDot()) {\n $layoutSlug = $entry->getFilename();\n $layout = new ThemeLayout($this, $layoutSlug);\n $this->layouts[$layoutSlug] = $layout;\n }\n }\n }", "public function getLayout(){\n\n return $this->layout;\n\n }", "public function get_slides_from_meta($slider_metas){\r\n $slides = array();\r\n if(is_array($slider_metas)){\r\n foreach($slider_metas as $slider_meta){\r\n $attachment_id = (int) $slider_meta['id'];\r\n $image_url = wp_get_attachment_url($attachment_id);\r\n $image_url = ($image_url===false) ? '' : $image_url;\r\n $slides[] = $image_url;\r\n }\r\n }\r\n return $slides;\r\n }", "public function layout() {\n return $this->layout;\n }", "function ju_layout() {return ju_o(ILayout::class);}", "function wpsight_options_layout() {\n\t\n\t\tif( ! current_theme_supports( 'options-layout' ) )\n\t\t\treturn;\n\t\t\n\t\t/** Create options array */\n\t\t\t\n\t\t$options_layout = array();\n\t\t\t\n\t\t$options_layout['heading_layout'] = array(\n\t\t\t'name' => __( 'Layout', 'wpsight' ),\n\t\t\t'id' => 'heading_layout',\n\t\t\t'type' => 'heading'\n\t\t);\n\t\t\n\t\t$options_layout['header_right'] = array( \n\t\t\t'name' \t => __( 'Header Area', 'wpsight' ),\n\t\t\t'desc' \t => __( 'You can add custom HTML and/or shortcodes, which will be automatically inserted into your theme.', 'wpsight' ),\n\t\t\t'std' \t => __( 'Need expert advice? Call us now - 555 555 555', 'wpsight' ),\n\t\t\t'id' \t => 'header_right',\n\t\t\t'settings' => array( 'textarea_rows' => 5 ),\n\t\t\t'type' \t => 'editor'\n\t\t);\n\t\t\n\t\tif( WPSIGHT_LAYOUT == 'four' ) {\n\t\t\n\t\t\t$options_layout['archive_layout'] = array(\n\t\t\t\t'name' \t => __( 'Archive Layout', 'wpsight' ),\n\t\t\t\t'desc' \t => __( 'Please remember that the layout is also limited through the sidebar. If the archive sidebar is active, only option #1 and #3 will be possible.', 'wpsight' ),\n\t\t\t\t'id' \t => 'archive_layout',\n\t\t\t\t'std' \t => 'span9',\n\t\t\t\t'type' \t => 'images',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'span3' => WPSIGHT_ADMIN_IMG_URL . '/archive-three.png',\n\t\t\t\t\t'span6' => WPSIGHT_ADMIN_IMG_URL . '/archive-six.png',\n\t\t\t\t\t'span9' => WPSIGHT_ADMIN_IMG_URL . '/archive-nine.png',\n\t\t\t\t\t'span12' => WPSIGHT_ADMIN_IMG_URL . '/archive-twelve.png'\n\t\t\t\t)\n\t\t\t);\n\t\t\n\t\t} else {\n\t\t\n\t\t\t$options_layout['archive_layout'] = array(\n\t\t\t\t'name' \t => __( 'Archive Layout', 'wpsight' ),\n\t\t\t\t'desc' \t => __( 'Please remember that the layout is also limited through the sidebar. If the archive sidebar is active, only option #1 and #3 will be possible.', 'wpsight' ),\n\t\t\t\t'id' \t => 'archive_layout',\n\t\t\t\t'std' \t => 'span8',\n\t\t\t\t'type' \t => 'images',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'span4' => WPSIGHT_ADMIN_IMG_URL . '/archive-four.png',\n\t\t\t\t\t'span6' => WPSIGHT_ADMIN_IMG_URL . '/archive-six.png',\n\t\t\t\t\t'span8' => WPSIGHT_ADMIN_IMG_URL . '/archive-eight.png',\n\t\t\t\t\t'span12' => WPSIGHT_ADMIN_IMG_URL . '/archive-twelve.png'\n\t\t\t\t)\n\t\t\t);\t\n\t\t\n\t\t}\n\t\t\n\t\tif( WPSIGHT_LAYOUT == 'four' ) {\n\t\t\n\t\t\t// Check if old property_archive_layout option was active\n\t\t\t$listing_archive_layout_std = wpsight_get_option( 'property_archive_layout' ) ? wpsight_get_option( 'property_archive_layout' ) : 'span3';\n\t\t\n\t\t\t$options_layout['listing_archive_layout'] = array(\n\t\t\t\t'name' \t => __( 'Listing Archive Layout', 'wpsight' ),\n\t\t\t\t'desc' \t => __( 'Please remember that the layout is also limited through the sidebar. If the listing archive sidebar is active, only option #1 and #3 will be possible.', 'wpsight' ),\n\t\t\t\t'id' \t => 'listing_archive_layout',\n\t\t\t\t'std' \t => $listing_archive_layout_std,\n\t\t\t\t'type' \t => 'images',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'span3' => WPSIGHT_ADMIN_IMG_URL . '/archive-three.png',\n\t\t\t\t\t'span6' => WPSIGHT_ADMIN_IMG_URL . '/archive-six.png',\n\t\t\t\t\t'span9' => WPSIGHT_ADMIN_IMG_URL . '/archive-nine.png',\n\t\t\t\t\t'span12' => WPSIGHT_ADMIN_IMG_URL . '/archive-twelve.png'\n\t\t\t\t)\n\t\t\t);\n\t\t\n\t\t} else {\n\t\t\t\n\t\t\t// Check if old property_archive_layout option was active\n\t\t\t$listing_archive_layout_std = wpsight_get_option( 'property_archive_layout' ) ? wpsight_get_option( 'property_archive_layout' ) : 'span4';\n\t\t\n\t\t\t$options_layout['listing_archive_layout'] = array(\n\t\t\t\t'name' \t => __( 'Listing Archive Layout', 'wpsight' ),\n\t\t\t\t'desc' \t => __( 'Please remember that the layout is also limited through the sidebar. If the listing archive sidebar is active, only option #1 and #3 will be possible.', 'wpsight' ),\n\t\t\t\t'id' \t => 'listing_archive_layout',\n\t\t\t\t'std' \t => $listing_archive_layout_std,\n\t\t\t\t'type' \t => 'images',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'span4' => WPSIGHT_ADMIN_IMG_URL . '/archive-four.png',\n\t\t\t\t\t'span6' => WPSIGHT_ADMIN_IMG_URL . '/archive-six.png',\n\t\t\t\t\t'span8' => WPSIGHT_ADMIN_IMG_URL . '/archive-eight.png',\n\t\t\t\t\t'span12' => WPSIGHT_ADMIN_IMG_URL . '/archive-twelve.png'\n\t\t\t\t)\n\t\t\t);\t\n\t\t\n\t\t}\n\t\t\n\t\t$options_layout['credit'] = array( \n\t\t\t'name' \t => __( 'Credit', 'wpsight' ),\n\t\t\t'desc' \t => __( 'You can add custom HTML and/or shortcodes, which will be automatically inserted into your theme.', 'wpsight' ) . ' ' . __(' Available shortcodes', 'wpsight' ) . ': <code>[the_year]</code>, <code>[site_link]</code>, <code>[wordpress_link]</code>, <code>[wpcasa_link]</code>, <code>[loginout_link]</code>',\n\t\t\t'std' \t => '<div class=\"credit-left\"><p>[the_year] - [site_link]</p></div>' . \"\\n\" . '<div class=\"credit-right\"><p>Powered by [wordpress_link] - Built on [wpcasa_link]</p></div>',\n\t\t\t'id' \t => 'credit',\n\t\t\t'settings' => array( 'textarea_rows' => 5 ),\n\t\t\t'type' \t => 'editor'\n\t\t);\n\t\t\t\t\n\t\treturn apply_filters( 'wpsight_options_layout', $options_layout );\n\t\t\n\t}", "public function getLayout(): string;", "public function getDataStructure()\n\t{\n\t\t$sections = [];\n\t\tforeach($this->sections as $section) {\n\t\t\t$sections[] = [\n\t\t\t\t'name' => $section['name'],\n\t\t\t\t'blocks' => []\n\t\t\t];\n\t\t}\n\t\treturn $sections;\n\t}", "public static function get_advanced_headers_layout() {\n\n\t\t\t$ids = Astra_Ext_Advanced_Headers_Data::get_current_page_header_ids();\n\n\t\t\tif ( false == $ids ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$settings = get_post_meta( $ids, 'ast-advanced-headers-layout', true );\n\n\t\t\treturn $settings;\n\t\t}", "public function layout()\n {\n return $this->layout;\n }", "public function get_layout($id)\n\t{\n\t\treturn $this->get_single($id);\n\t}", "public function all_layouts()\n {\n\n try {\n if (isset($_REQUEST['AuthToken'])) {\n $AuthToken = $_REQUEST['AuthToken'];\n } else {\n $AuthToken = '';\n }\n if (!Master::check_master_token($AuthToken)) {\n return response([\n 'message' => \"Token Expired\",\n 'status' => 'TokenExpired'\n ], 400);\n }\n\n $offset = ($_GET['page'] - 1) * $_GET['per_page'];\n $sort_field = (isset($_GET['sort_field'])) ? $_GET['sort_field'] : \"id\";\n $sort_order = (isset($_GET['sort_order'])) ? $_GET['sort_order'] : \"desc\";\n\n $data = array();\n $data_count = 0;\n\n if (Schema::hasTable('layout_setting')) {\n $sql = DB::table('layout_setting')\n ->join('portal_user_role', 'portal_user_role.id', '=', 'layout_setting.user_role_id')\n ->join('module_list', 'module_list.api_name', '=', 'layout_setting.module_api_name')\n ->select('layout_setting.*', 'portal_user_role.name', 'module_list.singular_label');\n //search conditions portal_user_role user_role_id\n if (isset($_GET['search']) && ($_GET['search'] != \"\")) {\n $q = $_GET['search'];\n $sql->where(function ($query) use ($q) {\n $query->where('module_api_name', 'LIKE', '%' . $q . '%')\n ->orWhere('layout_name', 'LIKE', '%' . $q . '%')\n ->orWhere('user_role_id', 'LIKE', '%' . $q . '%');\n });\n }\n $data = $sql->offset($offset)->limit($_GET['per_page'])->orderBy('layout_setting.'.$sort_field, $sort_order)->get();\n\n //return $data;\n\n //count of total tasks\n $csql = DB::table('layout_setting');\n //search conditions for count\n if (isset($_GET['search']) && ($_GET['search'] != \"\")) {\n $q = $_GET['search'];\n $csql->where(function ($query) use ($q) {\n $query->where('module_api_name', 'LIKE', '%' . $q . '%')\n ->orWhere('layout_name', 'LIKE', '%' . $q . '%')\n ->orWhere('user_role_id', 'LIKE', '%' . $q . '%');\n });\n }\n $data_count = $csql->count();\n }\n\n //response\n return response([\n 'message' => \"\",\n 'pgData' => $data,\n 'totalRows' => $data_count,\n ], 200);\n } catch (Exception $e) {\n return response([\n 'message' => $e->getMessage()\n ], 400);\n }\n }", "public function getAvailableTemplate()\r\n {\r\n $panels = $this->_panel->getCollection()\r\n ->addFieldToFilter('status', '1');\r\n $listPanel = array();\r\n foreach ($panels as $panel) {\r\n $listPanel[] = array('label' => $panel->getName(),\r\n 'value' => $panel->getId());\r\n }\r\n // echo 'test';\r\n // die();\r\n return $listPanel;\r\n }", "function spr_get_sections() {\n\tglobal $spr_sql_fields;\n\n\t$sql_tables = safe_pfx('txp_section');\n\t$rs = safe_query(\"SELECT \".$spr_sql_fields.\" FROM \".$sql_tables.\" WHERE name != 'default' ORDER BY name\");\n\twhile ($a = nextRow($rs)) {\n\t\textract($a); // set 'name','title','parent' etc in $a\n\t\t$out[$name] = $a;\n\t}\n\treturn $out;\n}", "public function formatLayoutTemplateFiles()\n\t{\n\t\t$layoutFiles\t = parent::formatLayoutTemplateFiles();\n\t\t$dir\t\t\t = dirname( $this->reflection->getFileName() );\n\t\t$layoutFiles[]\t = $dir . '/../../../../presenters/templates/@layout.latte';\n\t\t$layoutFiles[]\t = $dir . '/../../presenters/templates/@layout.latte';\n\n\t\treturn $layoutFiles;\n\t}", "public function getDesignsList() {\n return $this->_get(1);\n }", "public function buildPanels() {\n return array($this);\n }", "function stock_toolkit_get_slide_as_list(){\n\n\t$args = wp_parse_args( \n\t\tarray(\n\t\t\t'post_type' => 'slide',\n\t\t\t'numberposts' => -1,\n\t\t)\n\t);\n\n\t$posts = get_posts($args);\n\n\t$post_options = array(esc_html__('-- Select Slide --', 'stock-toolkit')=> '');\n\n\tif($posts){\n\t\tforeach ($posts as $post) {\n\t\t\t$post_options[ $post->post_title ] = $post->ID;\n\t\t}\n\t}\n\n\treturn $post_options;\n}", "public function getDesignsList() {\n return $this->_get(5);\n }", "public static function getModules(){\n if(!function_exists('the_flexible_field') || !function_exists('get_row_layout')) return;\n while(the_flexible_field('underpin_flex_content')) TemplateLoader::getTemplate(str_replace('_', '-', get_row_layout()));\n }", "function fanwood_layouts() {\n\n\tif ( current_theme_supports( 'theme-layouts' ) ) {\n\n\t\t$global_layout = hybrid_get_setting( 'fanwood_global_layout' );\n\t\t$bbpress_layout = hybrid_get_setting( 'fanwood_bbpress_layout' );\n\t\t$jigoshop_layout = hybrid_get_setting( 'fanwood_jigoshop_layout' );\n\t\t$layout = theme_layouts_get_layout();\n\n\t\tif ( !is_singular() && $global_layout !== 'layout_default' && function_exists( \"fanwood_{$global_layout}\" ) ) {\n\t\t\tadd_filter( 'get_theme_layout', 'fanwood_' . $global_layout );\n\t\t}\n\t\t\n\t\tif ( is_singular() && $layout == 'layout-default' && $global_layout !== 'layout_default' && function_exists( \"fanwood_{$global_layout}\" ) ) {\n\t\t\tadd_filter( 'get_theme_layout', 'fanwood_' . $global_layout );\n\t\t}\n\t\t\n\t\tif ( function_exists ( 'bbp_loaded' ) ) {\n\t\t\tif ( is_bbpress() && !is_singular() && $bbpress_layout !== 'layout_default' && function_exists( \"fanwood_{$bbpress_layout}\" ) ) {\n\t\t\t\tadd_filter( 'get_theme_layout', 'fanwood_' . $bbpress_layout );\n\t\t\t}\n\t\t\telseif ( is_bbpress() && is_singular() && $layout == 'layout-default' && $bbpress_layout !== 'layout_default' && function_exists( \"fanwood_{$bbpress_layout}\" ) ) {\n\t\t\t\tadd_filter( 'get_theme_layout', 'fanwood_' . $bbpress_layout );\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( function_exists ( 'is_jigoshop' ) ) {\n\t\t\tif ( is_jigoshop() && !is_singular() && $jigoshop_layout !== 'layout_default' && function_exists( \"fanwood_{$jigoshop_layout}\" ) ) {\n\t\t\t\tadd_filter( 'get_theme_layout', 'fanwood_' . $jigoshop_layout );\n\t\t\t}\n\t\t\telseif ( is_jigoshop() && is_singular() && $layout == 'layout-default' && $jigoshop_layout !== 'layout_default' && function_exists( \"fanwood_{$jigoshop_layout}\" ) ) {\n\t\t\t\tadd_filter( 'get_theme_layout', 'fanwood_' . $jigoshop_layout );\n\t\t\t}\n\t\t}\n\n\t}\n\t\n}", "function responsive_woocommerce_shop_elements_positioning() {\n\n\t\t// Default sections.\n\t\t$sections = array( 'title', 'price', 'ratings', 'short_desc', 'add_cart', 'category' );\n\n\t\t// Get sections from Customizer.\n\t\t$sections = get_theme_mod( 'responsive_woocommerce_shop_elements_positioning', $sections );\n\n\t\t// Turn into array if string.\n\t\tif ( $sections && ! is_array( $sections ) ) {\n\t\t\t$sections = explode( ',', $sections );\n\t\t}\n\n\t\t// Apply filters for easy modification.\n\t\t$sections = apply_filters( 'responsive_woocommerce_shop_elements_positioning', $sections );\n\n\t\t// Return sections.\n\t\treturn $sections;\n\n\t}", "public function getLayoutRootPaths() {}", "private static function makeLayoutClasses()\n {\n $classes = [];\n\n // Add classes related to the \"layout_topnav\" configuration.\n\n if (self::isLayoutTopnavEnabled()) {\n $classes[] = 'layout-top-nav';\n }\n\n // Add classes related to the \"layout_boxed\" configuration.\n\n if (self::isLayoutBoxedEnabled()) {\n $classes[] = 'layout-boxed';\n }\n\n // Add classes related to fixed sidebar layout configuration. The fixed\n // sidebar is not compatible with layout topnav.\n\n if (! self::isLayoutTopnavEnabled() && static::getConfig('layout_fixed_sidebar')) {\n $classes[] = 'layout-fixed';\n }\n\n // Add classes related to fixed navbar/footer configuration. The fixed\n // navbar/footer is not compatible with layout boxed.\n\n if (! self::isLayoutBoxedEnabled()) {\n $classes = array_merge($classes, self::makeFixedResponsiveClasses('navbar'));\n $classes = array_merge($classes, self::makeFixedResponsiveClasses('footer'));\n }\n\n return $classes;\n }", "public static function getLayout()\n {\n return self::$layout;\n }" ]
[ "0.7576874", "0.7215799", "0.694425", "0.65814537", "0.6491735", "0.6448685", "0.643181", "0.64280397", "0.64037335", "0.6373531", "0.63655883", "0.630084", "0.6256414", "0.6220792", "0.6197013", "0.6171722", "0.6169434", "0.6168664", "0.61329305", "0.60967636", "0.60400766", "0.59615266", "0.59612703", "0.5929077", "0.5917607", "0.5908978", "0.5825795", "0.579332", "0.575071", "0.5739598", "0.5738951", "0.5731767", "0.5730309", "0.5704757", "0.5622161", "0.55785316", "0.55682474", "0.554472", "0.55443764", "0.553804", "0.5499713", "0.54965496", "0.5482065", "0.54785633", "0.5461544", "0.54229033", "0.54148775", "0.54016274", "0.5400926", "0.53933775", "0.5381746", "0.5376947", "0.53502566", "0.53450185", "0.53417593", "0.5323568", "0.53007364", "0.52958256", "0.52935934", "0.52657706", "0.52556396", "0.52538276", "0.52527434", "0.52513146", "0.5231574", "0.5226723", "0.52257615", "0.52251583", "0.5223759", "0.52019787", "0.51959896", "0.51888114", "0.5177524", "0.5176978", "0.51721776", "0.5168337", "0.51682824", "0.5166908", "0.5157198", "0.51418215", "0.51410115", "0.5127938", "0.5127282", "0.51269764", "0.51095", "0.51088923", "0.509701", "0.50967556", "0.50883967", "0.5085957", "0.50839436", "0.5082645", "0.5070411", "0.5065669", "0.504957", "0.5047987", "0.5044646", "0.5038464", "0.5035662", "0.5032349" ]
0.6543263
4
Get array of slide layout relations
public function getLayoutRelations() { return $this->layoutRelations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRelations();", "public function getRelations();", "public function getMasterSlideRelations()\r\n {\r\n return $this->masterSlideRels;\r\n }", "public function relations()\r\n {\r\n return $this->relations;\r\n }", "public static function workflowRelations();", "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}", "protected function getRelations()\n {\n return array();\n }", "public function getLayouts();", "public function getRelationList();", "public function getWithRelations();", "protected function getRelations()\n\t{\n\t\treturn ['widgets'];\n\t}", "public function getRelations()\n {\n return $this->relations;\n }", "public function getRelations()\n {\n return $this->relations;\n }", "public function getRelations()\n\t{\n\t\treturn $this->relations;\n\t}", "public function getRelations()\n\t{\n\t\treturn $this->relations;\n\t}", "public function getDisplay_relations()\r\n {\r\n return $this->m_display_relations;\r\n }", "abstract public static function relations() : ? array;", "public function slides()\n {\n return $this->hasMany('App\\ArticleSlider');\n }", "abstract function relations();", "public function getLayouts(): ?array;", "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}", "protected function getArrayableRelations()\n {\n return $this->relations;\n }", "public function getItemRelations()\n {\n return [];\n }", "public function getThemeLayouts();", "protected function relationships(): array\n {\n return [];\n }", "protected function getRelationsAlias()\n\t{\n\t\t$method = 'get' . ucfirst($this->actionName === 'index' ? 'list' : $this->actionName) . 'Display';\n\t\tif(!method_exists($this->configuration, $method))\n\t\t{\n\t\t\t$method = 'getFormDisplay';\n\t\t}\n\t\t$fieldsets = $this->configuration->$method();\n\t\tswitch($this->actionName)\n\t\t{\n\t\t\tcase 'filter':\n\t\t\t\t$fieldsets = $this->configuration->getFilterDisplay();\n\t\t\t\tbreak;\n\t\t\tcase 'index':\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$fieldsets = array_merge($fieldsets, $this->configuration->getFormDisplay());\n\t\t\t\tbreak;\n\t\t}\n\t\t$relations = array();\n\n\t\tswitch($this->actionName)\n\t\t{\n\t\t\tcase 'filter':\n\t\t\t\treturn $this->doGetRelations($fieldsets);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tforeach($fieldsets as $fieldset=>$fields)\n\t\t\t\t{\n\t\t\t\t\tif(!is_array($fields)){\n\t\t\t\t\t\treturn $this->doGetRelations($fieldsets);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$relations = array_merge($relations, $this->doGetRelations($fields));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn array_unique(array_diff($relations, array_keys($this->getDmModule()->getTable()->getRelationHolder()->getLocals())));\n\t}", "public function getRelations()\n {\n return $this->discoverRelations();\n }", "public function defineRelations()\n\t{\n\t\treturn array();\n\t}", "public function getLayouts(): array\n {\n $layouts = [];\n\n foreach ($this->config->get('layouts') as $layout) {\n $layout->setParentKey($this->getKey());\n\n $layouts[] = $layout->toArray();\n }\n\n return $layouts;\n }", "public abstract function getCustomizedRelationList();", "public function relations() {\r\n\t\treturn CMap::mergeArray(parent::relations(), array(\r\n\t\t\t\"properties\" => array(self::HAS_MANY,\"APropertyModel\",\"classId\"),\r\n\t\t\t\"interfaces\" => array(self::MANY_MANY,\"AInterfaceModel\",\"classImplements(classId,implementsId)\"),\r\n\t\t));\r\n\t}", "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 }", "protected static function _relations() {\n\n\t}", "protected function buildSlides() {\n $this->sortSlidesByWeight();\n\n $slides = [];\n foreach ($this->configuration['slides'] as $slide) {\n if ($slide['mid'] !== NULL) {\n $slides[] = [\n 'image' => $this->fileUrlFromMediaId($slide['mid']),\n 'caption' => $slide['caption'],\n ];\n }\n }\n return $slides;\n }", "public function getSlides()\n {\n return Slide::all();\n }", "public function relations() {\n return [\n 'materias' => [self::HAS_MANY, 'Materia', 'usuario_id'],\n 'tags' => [self::HAS_MANY, 'Tag', 'usuario_id'],\n 'agendas' => [self::HAS_MANY, 'Agenda', 'usuario_id'],\n ];\n }", "public function getLayoutParameters(): array;", "public function getSlides(){\r\n\t\treturn $this->getModel()->getSlides();\r\n\t}", "public function relations()\n\t{\n\t\tYii::import('application.modules.profile.models.*');\n\n\t\t//$relations = Yii::app()->cache->get('yum_user_relations');\n $relations=false;\n\t\tif($relations === false) {\n\t\t\t$relations = array();\n\n\t\t\t\t\t\n\n\t\t\tif (Yum::hasModule('profile')) {\n\t\t\t\t$relations['visits'] = array(\n\t\t\t\t\t\tself::HAS_MANY, 'YumProfileVisit', 'visited_id');\n\t\t\t\t$relations['visited'] = array(\n\t\t\t\t\t\tself::HAS_MANY, 'YumProfileVisit', 'visitor_id');\n\t\t\t\t$relations['profile'] = array(\n\t\t\t\t\t\tself::HAS_ONE, 'YumProfile', 'user_id');\n\t\t\t\t$relations['privacy'] = array(\n\t\t\t\t\t\tself::HAS_ONE, 'YumPrivacySetting', 'user_id');\n\t\t\t}\n \n $relations['role'] = array(\n\t\t\t\t\t\tself::MANY_MANY, 'Role',\n\t\t\t\t\t\t UserRole::model()->tableName().'(user_id, role_id)');\n \n\t\t\tYii::app()->cache->set('yum_user_relations', $relations, 3600);\n\t\t}\n\n\t\treturn $relations;\n\t}", "protected function getArrayableRelations()\n\t{\n\t\treturn array_except($this->getArrayableItems($this->relations), ['data_attributes', 'dataAttributes', 'media']);\n\t}", "public function get_layouts ()\n {\n return $this->_layouts;\n }", "public function all_layouts() {\n\t\t// Globals\n\t\tglobal $wpdb;\n\t\t\n\t\t// Load the layouts from the database as an array\n\t\t$sql = \"SELECT * FROM `\" . rpids_tableprefix() . \"rpids_layouts` ORDER BY `name` ASC;\";\n\t\t$sqlret = $wpdb->get_results( $sql, ARRAY_A );\n\t\t\n\t\t// Create the return object\n\t\t$return = new StdClass();\n\t\t\n\t\t// Loop through each layout\n\t\tforeach( $sqlret as $layout ) {\n\t\t\t// Add the screen info to the return object\n\t\t\t$return->$layout['id'] = new StdClass();\n\t\t\t$return->$layout['id']->name = $layout['name'];\n\t\t\t$return->$layout['id']->id = $layout['id'];\n\t\t}\n\t\treturn $return;\n\t}", "public function getLayout();", "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 getRelations()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('relations');\n }", "public function getLayouts()\r\n {\r\n return $this->layouts;\r\n }", "public function getLayoutList() {\n try {\n $client = new Zend_Soap_Client($this->LAYOUT_WSDL_URI);\n $options = array('soap_version' => SOAP_1_1,\n 'encoding' => 'ISO-8859-1',\n );\n $client->setOptions($options);\n $client->action = 'findAllActiveLayout';\n $result = $client->findAllActiveLayout();\n return $result;\n } catch (Exception $e) {\n //return false;\n }\n }", "public function relations() {\n\t\t// NOTE: you may need to adjust the relation name and the related\n\t\t// class name for the relations automatically generated below.\n\t\treturn array(\n\t\t\t'tag' => array(self::BELONGS_TO, 'sweelix\\yii1\\ext\\db\\ar\\Tag', 'tagId'),\n\t\t\t'content' => array(self::BELONGS_TO, 'sweelix\\yii1\\ext\\db\\ar\\Content', 'contentId'),\n\t\t\t'group' => array(self::BELONGS_TO, 'sweelix\\yii1\\ext\\db\\ar\\Group', 'groupId'),\n\t\t\t'node' => array(self::BELONGS_TO, 'sweelix\\yii1\\ext\\db\\ar\\Node', 'nodeId'),\n\t\t);\n\t}", "public function relations()\n\t{\n\t\t// class name for the relations automatically generated below.\n\t\treturn array(\n\t\t\t\t'Img' => array(self::HAS_MANY, 'ImgAdvt', 'advt_id'),\n\t\t);\n\t}", "public function getChildrenRelationIndex();", "public function getLayoutDependencies()\n {\n $objectManager = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager();\n return [\n 'processorFactory' => $objectManager->get(\\Magento\\Framework\\View\\Layout\\ProcessorFactory::class),\n 'eventManager' => $objectManager->get(\\Magento\\Framework\\Event\\ManagerInterface::class),\n 'structure' => $objectManager->create(\\Magento\\Framework\\View\\Layout\\Data\\Structure::class, []),\n 'messageManager' => $objectManager->get(\\Magento\\Framework\\Message\\ManagerInterface::class),\n 'themeResolver' => $objectManager->get(\\Magento\\Framework\\View\\Design\\Theme\\ResolverInterface::class),\n 'readerPool' => $objectManager->get('commonRenderPool'),\n 'generatorPool' => $objectManager->get(\\Magento\\Framework\\View\\Layout\\GeneratorPool::class),\n 'cache' => $objectManager->get(\\Magento\\Framework\\App\\Cache\\Type\\Layout::class),\n 'readerContextFactory' => $objectManager->get(\\Magento\\Framework\\View\\Layout\\Reader\\ContextFactory::class),\n 'generatorContextFactory' => $objectManager->get(\n \\Magento\\Framework\\View\\Layout\\Generator\\ContextFactory::class\n ),\n 'appState' => $objectManager->get(\\Magento\\Framework\\App\\State::class),\n 'logger' => $objectManager->get(\\Psr\\Log\\LoggerInterface::class),\n ];\n }", "public function findAllWithRelation()\n {\n return $this->model\n ->with(static::$relations)\n ->orderBy('is_top', 'DESC')\n ->orderBy('is_published')\n ->orderBy('created_at', 'DESC')\n ->get();\n }", "public function relationNames()\n {\n return [];\n }", "public function relations()\n {\n // class name for the relations automatically generated below.\n return array(\n \n );\n }", "public function getRelationsFromConfig()\n {\n $conf = $this->getConf();\n $rel = $conf->getVal('issue_relations', IDF_Form_IssueTrackingConf::init_relations);\n $relations = array();\n foreach (preg_split(\"/\\015\\012|\\015|\\012/\", $rel, -1, PREG_SPLIT_NO_EMPTY) as $s) {\n $verbs = preg_split(\"/\\s*,\\s*/\", $s, 2);\n if (count($verbs) == 1)\n $relations += array($verbs[0] => $verbs[0]);\n else\n $relations += array($verbs[0] => $verbs[1], $verbs[1] => $verbs[0]);\n }\n return $relations;\n }", "public function getPagelayouts($dc)\n\t{\n\t\t$objLayouts = $this->Database->prepare('SELECT id,name FROM tl_layout WHERE pid=?')->execute($dc->activeRecord->pid);\n\t\t$arrLayouts = array();\n\t\twhile($objLayouts->next())\t$arrLayouts[$objLayouts->id] = $objLayouts->name;\n\t\treturn $arrLayouts;\n\t}", "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 structure() {\n $list = $this->newQuery()->where('parent_id', 0)->orderBy('order_id', 'asc')->get();\n $list->transform(function (PageCategory $category) {\n $children = $category->newQuery()->where('parent_id', $category->getAttribute('id'))->orderBy('order_id', 'asc')->get();\n $children->transform(function (PageCategory $category) {\n $children = $category->newQuery()->where('parent_id', $category->getAttribute('id'))->orderBy('order_id', 'asc')->get();\n $category->setAttribute('children', $children);\n\n return $category;\n });\n $category->setAttribute('children', $children);\n\n return $category;\n });\n\n return $list->toArray();\n }", "public function getLinks() {\n\t\t$relationModel = $this->getRelationModel();\n\t\t$parentModel = $this->getParentRecordModel();\n\t\t\n\t\t$isSubProduct = false;\n\t\tif($parentModel->getModule()->getName() == $relationModel->getRelationModuleModel()->getName()) {\n\t\t\t$isSubProduct = $relationModel->isSubProduct($parentModel->getId());\n\t\t}\n\t\t\n\t\tif(!$isSubProduct){\n\t\t\treturn parent::getLinks();\n\t\t}\n\t}", "public function getRelationships(): ?array;", "public function layout()\n {\n return $this->belongsTo('App\\Model\\Layout');\n }", "public function relations() {\n\t\t// NOTE: you may need to adjust the relation name and the related\n\t\t// class name for the relations automatically generated below.\n\t\treturn array(\n\t\t\t'metas' => array(self::MANY_MANY, 'sweelix\\yii1\\ext\\db\\ar\\Meta', 'contentMeta(contentId, metaId)'),\n\t\t\t'tags' => array(self::MANY_MANY, 'sweelix\\yii1\\ext\\db\\ar\\Tag', 'contentTag(contentId, tagId)'),\n\t\t\t'author' => array(self::BELONGS_TO, 'sweelix\\yii1\\ext\\db\\ar\\Author', 'authorId'),\n\t\t\t'language' => array(self::BELONGS_TO, 'sweelix\\yii1\\ext\\db\\ar\\Language', 'languageId'),\n\t\t\t'node' => array(self::BELONGS_TO, 'sweelix\\yii1\\ext\\db\\ar\\Node', 'nodeId'),\n\t\t\t'template' => array(self::BELONGS_TO, 'sweelix\\yii1\\ext\\db\\ar\\Template', 'templateId'),\n\t\t);\n\t}", "private function _relDefinition($relation)\n {\n list($tblJunction) = array_values($relation->via->from);\n list($colRelated) = array_values($relation->link);\n list($colOwner) = array_keys($relation->via->link);\n\n return [$tblJunction, $colRelated, $colOwner];\n }", "private function getRelationships() {\n\n $file = $this->getExtractedFile();\n\n $xmlWorkbook = simplexml_load_string( $file->getFromName( \"xl/_rels/workbook.xml.rels\" ) );\n\n $rels = array();\n $key = 0;\n\n foreach ( $xmlWorkbook->Relationship as $ele ) {\n\n $key++;\n $rels[$key]->rId = (string) $ele->attributes()->Id;\n $rels[$key]->type = (string) $ele->attributes()->Type;\n $rels[$key]->typeSlug = end( explode( '/', $ele->attributes()->Type ) );\n $rels[$key]->path = 'xl/' . $ele->attributes()->Target;\n\n }\n\n return $rels;\n }", "public function getDescendants();", "public function relations()\n\t{\n\t\t// class name for the relations automatically generated below.\n\t\treturn array(\n 'nas'=>array(self::BELONGS_TO,'Nas','nas_id'),\n 'leased'=>array(self::HAS_MANY,'IpLeased','pool_id'),\n\t\t);\n\t}", "public function relations()\n {\n // class name for the relations automatically generated below.\n return array(\n 'options' => array(self::BELONGS_TO, 'Options', 'next_opt')\n );\n }", "public function relations()\n {\n return $this->belongsToMany(Product::class, 'product_relations', 'product_id', 'related_product_id')\n ->using(ProductRelation::class);\n }", "public function relationNames()\n {\n return [\n 'pegawais'\n ];\n }", "public function getViewersForRelations(): array\n {\n $ret = [];\n foreach ($this->getValueViewers() as $key => $viewer) {\n if ($viewer->isLinkedToDbColumn() && $viewer->hasRelation()) {\n $ret[$key] = $viewer;\n }\n }\n return $ret;\n }", "public function getWithRelations() {\n\n return $this->with_relations;\n \n }", "public function getRelations(): array\n {\n $relations = [];\n foreach ($this->columns as $column) {\n if (!empty($column->relation) && !\\in_array($column->relation, $relations)) {\n $relations[] = $column->relation;\n }\n }\n\n return $relations;\n }", "public function relationNames()\n {\n return [\n 'akumulasiPoint',\n 'sanksi',\n 'siswa'\n ];\n }", "public function getRelationships()\n {\n return $this->getSchema()->getRelationships( $this->getName() );\n }", "public function galleries()\n {\n return $this->hasMany(Gallery::class);\n }", "public function getLayout() {}", "public function generate_side_navigation_array() {\n\t\t\n\t\treturn $this->doctor_cp;\n\t\t\n\t}", "public function setRelations() {}", "public static function relations()\n {\n return [\n// 'gender' => ['Gender', 'gender'],\n// 'gender' => 'Gender',\n ];\n }", "public function relationNames()\n {\n return [\n 'immobilien',\n 'kunde'\n ];\n }", "public static function getMeetingsRelatedListViewLayoutWithAllStandardAndCustomFieldsPlaced()\n {\n return array(\n 'panels' => array(\n array(\n 'rows' => array(\n array('cells' =>\n array(\n array(\n 'element' => 'name',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'owner',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'startDateTime',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'endDateTime',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'location',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'category',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'description',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'createdDateTime',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'modifiedDateTime',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'createdByUser',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'modifiedByUser',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'checkbox',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'currency',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'date',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'datetime',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'decimal',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'picklist',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'integer',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'multiselect',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'tagcloud',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'calculatednumber',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'countrypicklist',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'statepicklist',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'citypicklist',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'phone',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'radio',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'text',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'textarea',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'url',\n ),\n )\n ),\n ),\n ),\n ),\n );\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "public function getArrayLinkRels()\n {\n return $this->arrayLinkRels;\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 }" ]
[ "0.6544422", "0.6544422", "0.65423155", "0.62704134", "0.6241179", "0.61994475", "0.6160077", "0.6136131", "0.61135644", "0.5995332", "0.5975921", "0.59673613", "0.59673613", "0.59661984", "0.59661984", "0.5885068", "0.58613497", "0.5860434", "0.5845556", "0.58426696", "0.57908505", "0.5740281", "0.57397395", "0.5706097", "0.57011205", "0.56696767", "0.56560874", "0.55922186", "0.55667466", "0.5561669", "0.5543305", "0.55277497", "0.5511564", "0.55014324", "0.54890513", "0.5486977", "0.54856807", "0.54765666", "0.5465406", "0.5453619", "0.5447869", "0.54449403", "0.5406867", "0.53972214", "0.5394095", "0.53799874", "0.53757614", "0.5360625", "0.53544575", "0.5352316", "0.5298458", "0.5291193", "0.52792996", "0.5256458", "0.5222775", "0.52130926", "0.5206377", "0.5196637", "0.51965016", "0.51951057", "0.51868975", "0.5186668", "0.51818305", "0.51700413", "0.51697147", "0.5155701", "0.5154401", "0.5154169", "0.51465255", "0.5129525", "0.5124364", "0.51208794", "0.5120142", "0.51110625", "0.5108294", "0.5100334", "0.5099923", "0.5097381", "0.5078834", "0.5078693", "0.50686026", "0.5053383", "0.5053383", "0.5053383", "0.5053383", "0.5053383", "0.5053383", "0.5053383", "0.5053383", "0.5053383", "0.5053383", "0.5053383", "0.5049296", "0.50314415", "0.50314415", "0.50314415", "0.50314415", "0.50314415", "0.50314415", "0.50314415" ]
0.7564597
0
Find specific slide layout. This is an array consisting of: masterid name (string) body (string)
public function findLayout($name = '', $masterId = 1) { foreach ($this->layouts as $layout) { if ($layout['name'] == $name && $layout['masterid'] == $masterId) { return $layout; } } throw new \Exception("Could not find slide layout $name in current layout pack."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findLayoutId($name = '', $masterId = 1)\r\n {\r\n foreach ($this->layouts as $layoutId => $layout) {\r\n if ($layout['name'] == $name && $layout['masterid'] == $masterId) {\r\n return $layoutId;\r\n }\r\n }\r\n\r\n throw new \\Exception(\"Could not find slide layout $name in current layout pack.\");\r\n }", "public function getLayouts();", "public function getLayout();", "public function get_layout($id)\n\t{\n\t\treturn $this->get_single($id);\n\t}", "function layout_first()\n { \n foreach (func_get_args() as $name) {\n if(! empty($name) && $layout = the_layout($name)) {\n return $layout;\n }\n } \n\n $error = 'Not Found Layout(s) '. collect(func_get_args())->filter()->implode(', ') . '.';\n\n return abort(500, $error);\n }", "private function setLayouts() {\n # list of layout names!\n $availableLayouts = $this->fileMaker->listLayouts();\n\n foreach ($availableLayouts as $layoutName){\n if ($this->name === 'mi' or $this->name === 'miw') {\n if ($layoutName == 'search-'.strtoupper($this->name)) {\n $this->search_layout = $this->fileMaker->getLayout($layoutName);\n } else if ($layoutName == 'results-'.strtoupper($this->name)) {\n $this->result_layout = $this->fileMaker->getLayout($layoutName);\n } else if ($layoutName == 'details-'.strtoupper($this->name)) {\n $this->detail_layout = $this->fileMaker->getLayout($layoutName);\n }\n } else {\n if (str_contains($layoutName, 'search')) {\n $this->search_layout = $this->fileMaker->getLayout($layoutName);\n } else if (str_contains($layoutName, 'results')) {\n $this->result_layout = $this->fileMaker->getLayout($layoutName);\n } else if (str_contains($layoutName, 'details')) {\n $this->detail_layout = $this->fileMaker->getLayout($layoutName);\n }\n }\n }\n }", "public function getLayouts(): ?array;", "public function all_layouts() {\n\t\t// Globals\n\t\tglobal $wpdb;\n\t\t\n\t\t// Load the layouts from the database as an array\n\t\t$sql = \"SELECT * FROM `\" . rpids_tableprefix() . \"rpids_layouts` ORDER BY `name` ASC;\";\n\t\t$sqlret = $wpdb->get_results( $sql, ARRAY_A );\n\t\t\n\t\t// Create the return object\n\t\t$return = new StdClass();\n\t\t\n\t\t// Loop through each layout\n\t\tforeach( $sqlret as $layout ) {\n\t\t\t// Add the screen info to the return object\n\t\t\t$return->$layout['id'] = new StdClass();\n\t\t\t$return->$layout['id']->name = $layout['name'];\n\t\t\t$return->$layout['id']->id = $layout['id'];\n\t\t}\n\t\treturn $return;\n\t}", "function findRef_layout($content, $spParams) {\n\t\treturn $this->getSoftrefTable('tx_kbnescefe_layout', $content);\n\t}", "public function getLayout() {}", "function pi_get_content_layout()\n{\n return piBlogCustomize::pi_refresh_in_customize('pi_options[content][layout]') ? piBlogCustomize::pi_refresh_in_customize('pi_options[content][layout]') : piBlogFramework::$piOptions['content']['layout'];\n}", "public function getPagelayouts($dc)\n\t{\n\t\t$objLayouts = $this->Database->prepare('SELECT id,name FROM tl_layout WHERE pid=?')->execute($dc->activeRecord->pid);\n\t\t$arrLayouts = array();\n\t\twhile($objLayouts->next())\t$arrLayouts[$objLayouts->id] = $objLayouts->name;\n\t\treturn $arrLayouts;\n\t}", "protected function _get_layout($layout_name)\n {\n $filename = $layout_name . '.html';\n $content = '';\n $configStr = '';\n $handle = @fopen(\"$this->layout_folder/$filename\", \"r\");\n if ($handle) {\n $cnt = 0;\n while (($buffer = fgets($handle, 4096)) !== false) {\n if (false !== strpos($buffer, '---')){\n ++$cnt;\n if ($cnt > 1)\n break;\n }\n $configStr .= $buffer;\n }\n\n while (($buffer = fgets($handle, 4096)) !== false) {\n $content .= $buffer;\n }\n\n if (!feof($handle)) {\n echo \"Error: unexpected fgets() fail\\n\";\n }\n fclose($handle);\n }\n\n if ($content == \"\") {\n $content = $configStr;\n $configStr = \"\";\n }\n $config = Spyc::YAMLLoadString($configStr);\n $config['content'] = $content;\n return $config;\n }", "function layout(string $layout)\n {\n return the_layout($layout);\n }", "function sage_get_sections($field_name = 'sections') {\n\n if (!$field_name) return;\n\n $field_data = sage_get_field( $field_name );\n\n // check if the flexible content field exists\n if( !$field_data ) return;\n\n // loop through the rows of data\n $content = array();\n $i = 0;\n\n foreach ( $field_data as $field ) {\n\n $field['field_name'] = $field_name;\n\n // collect layout content\n $content[] = sage_get_row_content($field);\n\n }\n\n return implode('', $content);\n\n}", "protected function getLayout($id='default'){\n\t\tinclude($this->layoutsPath.'/'.$id.'.php');\n\t}", "public static function MasterLayout()\n \t{\n \t\treturn self::$_master;\n \t}", "function facebook_instant_articles_get_layout_info() {\n return array(\n 'facebook_instant_article' => array(\n 'label' => t('Facebook Instant Article'),\n 'path' => \"\",\n 'regions' => array(\n 'header' => t('Header'),\n 'body' => t('Body'),\n 'footer' => t('Footer'),\n ),\n 'image' => 1,\n ),\n );\n}", "public function getLayout() {\n\n return $this->asset_array['default']['layout']['name'];\n }", "public function getThemeLayouts();", "function getLayout() {return $this->readLayout();}", "public function getLayouts(){\n\n $defaultTheme = env('THEME', 'default');\n $path = app_path() . \"/../resources/views/themes/$defaultTheme/\";\n $layoutPath = $path . \"layouts\";\n $metaFilePath = $path . \"$defaultTheme.json\";\n try{\n $validator = file_exists($metaFilePath) && is_dir($layoutPath);\n if ($validator){\n\n // Read layouts\n $layouts = [];\n if ($dh = opendir($layoutPath)){\n while (($file = readdir($dh)) !== false){\n $filePath = $layoutPath . '/' . $file; \n if ($file == '.' || $file == '..') {\n continue;\n }\n $content = file_get_contents($filePath);\n $info = $this->extractInfo($content);\n $layouts[] = [\n 'name' => $file,\n 'info' => isset($info[1]) ? json_decode($info[1], true) : null\n ];\n }\n closedir($dh);\n }\n return $layouts;\n }\n else{\n return [];\n }\n }\n catch (\\Exception $e){ \n return [];\n }\n }", "public function getLayouts() {\n $path = APPPATH.'opencnab/layouts';\n $diretorio = dir($path);\n\n //Grava em um array todos eles para uso durante a aplicação.\n $cont = 0;\n while($arquivo = $diretorio -> read()){\n if($arquivo <> '.' && $arquivo <> '..'){\n $this->layouts[$cont] = require_once($path.'/'.$arquivo);\n $cont++;\n }\n }\n $diretorio -> close();\n\n return $this->layouts;\n }", "public function getLayouts()\n {\n $layouts = array(\n 'html' => $this->translate('documentationLayout_static'),\n 'json' => $this->translate('documentationLayout_interactive'),\n );\n\n $configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['sphinx']);\n switch ($configuration['pdf_builder']) {\n case 'pdflatex':\n $renderPdf = \\TYPO3\\CMS\\Core\\Utility\\CommandUtility::getCommand('pdflatex') !== '';\n break;\n case 'rst2pdf':\n $renderPdf = true;\n break;\n default:\n $renderPdf = false;\n break;\n }\n if ($renderPdf) {\n $layouts['pdf'] = $this->translate('documentationLayout_pdf');\n }\n\n return $layouts;\n }", "public function getLayout()\n\t{\n\t\t$input = JFactory::getApplication()->input;\n\t\treturn $input->getCmd('tmpl') ? $input->getCmd('tmpl') : $this->getParam('mainlayout', 'default');\n\t}", "public function get_layouts() {\n $layouts = array();\n\n foreach ( glob( self::_find_view_folder() . 'layouts/*.*' ) as $layout ) {\n $layouts[] = pathinfo( $layout, PATHINFO_BASENAME );\n }\n\n return $layouts;\n }", "public function layout($name = null) {\n\t\t$request = $this->container->get('request');\n\t\tif (!is_null($name) && $this->container->hasParameter('oxygen_framework.templating.layouts.'.$name)) {\n\t\t\treturn $this->container->getParameter('oxygen_framework.templating.layouts.'.$name);\n\t\t}\n\t\tif ($request->isXmlHttpRequest() && $this->container->hasParameter('oxygen_framework.templating.layouts.light')) {\n\t\t\treturn $this->container->getParameter('oxygen_framework.templating.layouts.light');\n\t\t} elseif ($this->container->hasParameter('oxygen_framework.templating.layouts.full')) {\n\t\t\treturn $this->container->getParameter('oxygen_framework.templating.layouts.full');\n\t\t}\n\t\tthrow new \\Exception(\"Layout undefined in oxygen_framework configuration\");\n\t}", "function WPBC_get_layout_locations_for_options(){\n\t$layout_defaults = WPBC_layout_struture__defaults();\n\t$main_container = $layout_defaults['main_container'];\n\t$test_array = array();\n\n\tforeach ($main_container as $key => $value) { \n\t\tif($key!='defaults'){ \n\t\t\t//$icon = WPBC_get_option('custom_layout_preview__'.$key);\n\t\t\t$img_path = get_template_directory_uri();\n\t\t\t$icon = $img_path.'/template-parts/layout/structure/'.$key.'.png';\n\t\t\t$test_array[$key] = $icon;\n\t\t}\n\t}\n\treturn $test_array;\n}", "public function layout() {\n return $this->layout;\n }", "public function getThemeLayout();", "public static function get_layouts($id=null)\n {\n // We return an array if returning all layouts\n // Other wise return the object if we looking up a specific layout id\n $return = array();\n\n // Are we looking for a specific studio layout id?\n // If not we return all layouts\n if($id){\n // Return a specific studio layout by ID\n if(($data = Layout::find($id)) != NULL){\n $data->formatted_cost = $data->cost == '' ? '' : '&pound;' . number_format($data->cost,2);\n $return = $data;\n }\n }else{\n // Get all studio layout data and iterate the returned data\n $layouts = DB::table('quotation_layouts')->order_by('size_y', 'asc')->order_by('size_x', 'asc')->get();\n foreach($layouts as $layout)\n {\n $layout->formatted_cost = $layout->cost == '' ? '' : '&pound;' . number_format($layout->cost, 2);\n $code = str_replace('.', '', $layout->size_x) . 'x' . str_replace('.', '', $layout->size_y);\n $return[$code] = $layout;\n }\n }\n\n return $return;\n }", "public function getContent() {\r\n\t\treturn PzkParser::parseLayout($this->layout, $this, true);\r\n\t}", "public function getLayoutParameters(): array;", "public function getPageLayout() {}", "public function getLayout(): string;", "protected function getRandomLayout(): string {\n\t\t$key = array_rand($this->layouts);\n\t\t\n\t\treturn $this->layouts[$key];\n\t}", "public function get_layout_id()\n\t{\n\t\treturn $this->_layout_id;\n\t}", "function wp_get_layout_definitions()\n {\n }", "function idaho_webmaster_prebuilt_layouts( $layouts ) {\n\t\t$layouts['about-us'] = array(\n\t\t\t'name' => __( 'About', 'idaho-webmaster' ),\n\t\t\t'description' => __( 'A simple about page.', 'idaho-webmaster' ),\n\t\t\t'widgets' => array(\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<blockquote><p>This area is used as a brief description of the agency. Think about it as an elevator pitch, keep it short and to the point.</p></blockquote><h3>HISTORY</h3><p>Our agency was founding in the year by this initiative. This section can be replaced by another title as well.</p><h3>NEXT BOARD MEETING</h3><p>January 1, 1970<br /> 1:00 p.m. – 1:30 p.m.<br />A Location</p><h3>More about us?</h3><p>Add more information to the right aside here. Any additional information can be placed here under new headings.</p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b925e25e15e',\n\t\t 'panels_info' => array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'name' => 'Name Of Board Member',\n\t\t 'image' => 0,\n\t\t 'align' => 'left',\n\t\t 'style' => 'rounded',\n\t\t 'text' => '<p>In this area you put the members profile information. Typically some past achievements that are relevant to the their position on your board. And of course include their current projects and works. This description should hopefully be a 3-5 sentence paragraph. Going to long will cause a loss of interest in the reader. Keep things brief while getting all the necessary information in.</p><p>In usu impedit insolens, no dicunt possim sit. Per ad velit concludaturque. Purto inani et vix, persius voluptatum est et. Dicit prompta eam ut, facilisi gubergren has at, eu decore principes aliquando ius. Nonumes disputando sea eu, sumo suavitate accommodare ne per, per eu lobortis inciderint.</p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b927c776db0',\n\t\t 'panels_info' => array(\n\t\t 'class' => 'Bootstrap_Widget_Biography_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 1,\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'name' => 'Name Of Board Member',\n\t\t 'image' => 0,\n\t\t 'align' => 'right',\n\t\t 'style' => 'rounded',\n\t\t 'text' => '<p>In this area you put the members profile information. Typically some past achievements that are relevant to the their position on your board. And of course include their current projects and works. This description should hopefully be a 3-5 sentence paragraph. Going to long will cause a loss of interest in the reader. Keep things brief while getting all the necessary information in.</p><p>In usu impedit insolens, no dicunt possim sit. Per ad velit concludaturque. Purto inani et vix, persius voluptatum est et. Dicit prompta eam ut, facilisi gubergren has at, eu decore principes aliquando ius. Nonumes disputando sea eu, sumo suavitate accommodare ne per, per eu lobortis inciderint.</p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b929d339fd6',\n\t\t 'panels_info' => array(\n\t\t 'class' => 'Bootstrap_Widget_Biography_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 2,\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'name' => 'Name Of Board Member',\n\t\t 'image' => 0,\n\t\t 'align' => 'left',\n\t\t 'style' => 'rounded',\n\t\t 'text' => '<p>In this area you put the members profile information. Typically some past achievements that are relevant to the their position on your board. And of course include their current projects and works. This description should hopefully be a 3-5 sentence paragraph. Going to long will cause a loss of interest in the reader. Keep things brief while getting all the necessary information in.</p><p>In usu impedit insolens, no dicunt possim sit. Per ad velit concludaturque. Purto inani et vix, persius voluptatum est et. Dicit prompta eam ut, facilisi gubergren has at, eu decore principes aliquando ius. Nonumes disputando sea eu, sumo suavitate accommodare ne per, per eu lobortis inciderint.</p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b929d988c69',\n\t\t 'panels_info' => array(\n\t\t 'class' => 'Bootstrap_Widget_Biography_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 3,\n\t\t ),\n\t\t ),\n\t\t\t),\n\t\t\t'grids' => array(\n\t\t array(\n\t\t 'cells' => 2,\n\t\t\t\t\t'style' => array(),\n\t\t \t),\n\t\t\t),\n\t\t\t'grid_cells' => array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.334737617611999993538773878754000179469585418701171875,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.6652623823879999509500748899881727993488311767578125,\n\t\t ),\n\t\t\t),\n\t\t);\n\n\t\t$layouts['contact-us'] = array(\n\t\t\t'name' => __( 'Contact', 'idaho-webmaster' ),\n\t\t\t'description' => __( 'A simple contact page.', 'idaho-webmaster' ),\n\t \t'widgets' =>\n\t\t\tarray(\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<h3>Our Office</h3><p><strong>STEM Action Center</strong><br /> Address: 700 West Jefferson Street<br /> Boise, Idaho, 83720</p><h3>CONTACT OUR STAFF</h3><p><strong>Contact #1</strong><br /><button class=\"btn btn-default\" type=\"button\">208 332-1302</button></p><p><strong>Contact #2</strong><br /><button class=\"btn btn-default\" type=\"button\">208 332-1302</button></p><h3> </h3>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b925e25e15e',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t '_sow_form_id' => '56ba126b129c1',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_CF7_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 1,\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'name' => 'Name Of Staff Member',\n\t\t 'image' => 0,\n\t\t 'align' => 'left',\n\t\t 'style' => 'rounded',\n\t\t 'text' => '<p>In this area you put the members profile information. Typically some past achievements that are relevant to the their position on your board. And of course include their current projects and works. This description should hopefully be a 3-5 sentence paragraph. Going to long will cause a loss of interest in the reader. Keep things brief while getting all the necessary information in.</p><p>In usu impedit insolens, no dicunt possim sit. Per ad velit concludaturque. Purto inani et vix, persius voluptatum est et. Dicit prompta eam ut, facilisi gubergren has at, eu decore principes aliquando ius. Nonumes disputando sea eu, sumo suavitate accommodare ne per, per eu lobortis inciderint.</p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b927c776db0',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Biography_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'name' => 'Name Of Staff Member',\n\t\t 'image' => 0,\n\t\t 'align' => 'right',\n\t\t 'style' => 'rounded',\n\t\t 'text' => '<p>In this area you put the members profile information. Typically some past achievements that are relevant to the their position on your board. And of course include their current projects and works. This description should hopefully be a 3-5 sentence paragraph. Going to long will cause a loss of interest in the reader. Keep things brief while getting all the necessary information in.</p><p>In usu impedit insolens, no dicunt possim sit. Per ad velit concludaturque. Purto inani et vix, persius voluptatum est et. Dicit prompta eam ut, facilisi gubergren has at, eu decore principes aliquando ius. Nonumes disputando sea eu, sumo suavitate accommodare ne per, per eu lobortis inciderint.</p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b929d339fd6',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Biography_Widget',\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 3,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t\t),\n\t\t\t'grids' =>\n\t\t\tarray(\n\t\t array(\n\t\t 'cells' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t\t),\n\t\t\t'grid_cells' =>\n\t\t\tarray(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.334737617611999993538773878754000179469585418701171875,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.6652623823879999509500748899881727993488311767578125,\n\t\t ),\n\t\t\t),\n\t\t);\n\n\t\t$layouts['three-column'] = array(\n\t\t\t'name' => __( 'Three Column', 'idaho-webmaster' ),\n\t 'description' => __( 'A three column layout.', 'idaho-webmaster' ),\n\t \t'widgets' =>\n\t\t array(\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba4e2af10be',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba4e613da0a',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba4e69e0d70',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 2,\n\t\t 'id' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'grids' =>\n\t\t array(\n\t\t array(\n\t\t 'cells' => 3,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t 'grid_cells' =>\n\t\t array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\t$layouts['two-column'] = array(\n\t\t\t'name' => __( 'Two Column', 'idaho-webmaster' ),\n\t\t\t'description' => __( 'A two column layout.', 'idaho-webmaster' ),\n\t\t\t'widgets' =>\n\t\t array(\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba4e2af10be',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba4e613da0a',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'grids' =>\n\t\t array(\n\t\t array(\n\t\t 'cells' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t 'grid_cells' =>\n\t\t array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.5,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.5,\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\t$layouts['one-column'] = array(\n\t\t\t'name' => __( 'One Column', 'idaho-webmaster' ),\n\t\t\t'description' => __( 'A one column layout.', 'idaho-webmaster' ),\n\t \t'widgets' =>\n\t\t array(\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba4e2af10be',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t 'style' =>\n\t\t array(\n\t\t 'background_display' => 'tile',\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'grids' =>\n\t\t array(\n\t\t array(\n\t\t 'cells' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t 'grid_cells' =>\n\t\t array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 1,\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\t$layouts['home-page'] = array(\n\t\t\t'name' => __( 'Home Page', 'idaho-webmaster' ),\n\t\t\t'description' => __( 'A three column homepage layout.', 'idaho-webmaster' ),\n\t\t\t'widgets' =>\n\t\t array(\n\t\t array(\n\t\t 'title' => 'Panel Heading',\n\t\t 'style' => 'default',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba51504cecb',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => 'Panel Heading',\n\t\t 'style' => 'default',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba516d8f895',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => 'Panel Heading',\n\t\t 'style' => 'default',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba517022c43',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'grid' => 0,\n\t\t 'cell' => 2,\n\t\t 'id' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'grids' =>\n\t\t array(\n\t\t array(\n\t\t 'cells' => 3,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t 'grid_cells' =>\n\t\t array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\t$layouts['home-page-3'] = array(\n\t\t\t'name' => __( 'Three Column Home Page', 'idaho-webmaster' ),\n\t 'description' => __( 'A three column homepage layout using visual editors for content.', 'idaho-webmaster' ),\n\t \t'widgets' =>\n\t\t array(\n\t\t array(\n\t\t 'image' => 0,\n\t\t 'style' => 'none',\n\t\t 'margin' => 'default',\n\t\t '_sow_form_id' => '56be5f45b8a80',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widgets_Image_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<h1>Agency Heading</h1><p>This is a template that is great for small agencies. It doesn\\'t have too much fancy flare to it, but it makes a great use of the standard Bootstrap core components. Feel free to use this template for any project you want!</p><p><a class=\"btn btn-primary btn-lg\" href=\"#\">Call To Action!</a></p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56be5f4fde46a',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<hr />',\n\t\t 'text_selected_editor' => 'html',\n\t\t '_sow_form_id' => '56be637d6f354',\n\t\t 'autop' => false,\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 1,\n\t\t 'cell' => 0,\n\t\t 'id' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<h3>Heading 1</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.</p><p><a class=\"btn btn-info\" href=\"#\">Find out more about us.</a></p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c35226ec15d',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 0,\n\t\t 'id' => 3,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<h3>Heading 2</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.</p><p><a class=\"btn btn-info\" href=\"#\">Find out more about us.</a></p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c3526d93f12',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 1,\n\t\t 'id' => 4,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<h3>Heading 3</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.</p><p><a class=\"btn btn-info\" href=\"#\">Find out more about us.</a></p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c35270a18ea',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 2,\n\t\t 'id' => 5,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'grids' =>\n\t\t array(\n\t\t array(\n\t\t 'cells' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t array(\n\t\t 'cells' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t array(\n\t\t 'cells' => 3,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t 'grid_cells' =>\n\t\t array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.58289855852000005409507821241277270019054412841796875,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.417101441480000001416073018845054320991039276123046875,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 1,\n\t\t 'weight' => 1,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\t$layouts['home-page-4'] = array(\n\t\t\t'name' => __( 'Four Column Home Page', 'idaho-webmaster' ),\n\t 'description' => __( 'A four column homepage layout using panels.', 'idaho-webmaster' ),\n\t \t'widgets' =>\n\t\t array(\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<h1>Agency&nbsp;Heading</h1><p>This is a template that is great for small agencies. It doesn\\'t have too much fancy flare to it, but it makes a great use of the standard Bootstrap core components. Feel free to use this template for any project you want!</p><p><a class=\"btn btn-primary btn-lg\" href=\"#\">Call To Action!</a></p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56be5f4fde46a',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'image' => 0,\n\t\t 'style' => 'none',\n\t\t 'margin' => 'default',\n\t\t '_sow_form_id' => '56be5f45b8a80',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widgets_Image_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<hr />',\n\t\t 'text_selected_editor' => 'html',\n\t\t '_sow_form_id' => '56be637d6f354',\n\t\t 'autop' => false,\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 1,\n\t\t 'cell' => 0,\n\t\t 'id' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'style' => 'default',\n\t\t 'image' => 0,\n\t\t 'text' => '<h3>Heading 1</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.<br /><br /></p><p><a class=\"btn btn-primary\" href=\"#\">To more information</a></p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c366c60569f',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 0,\n\t\t 'id' => 3,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'style' => 'default',\n\t\t 'image' => 0,\n\t\t 'text' => '<h3>Heading&nbsp;2</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.<br /><br /></p><p><a class=\"btn btn-primary\" href=\"#\">To more information</a></p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c366f43c8d1',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 1,\n\t\t 'id' => 4,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'style' => 'default',\n\t\t 'image' => 0,\n\t\t 'text' => '<h3>Heading&nbsp;3</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.<br /><br /></p><p><a class=\"btn btn-primary\" href=\"#\">To more information</a></p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c366f6a4953',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 2,\n\t\t 'id' => 5,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'style' => 'default',\n\t\t 'image' => 0,\n\t\t 'text' => '<h3>Heading&nbsp;4</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.<br /><br /></p><p><a class=\"btn btn-primary\" href=\"#\">To more information</a></p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c366f91c6e6',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 3,\n\t\t 'id' => 6,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'grids' =>\n\t\t array(\n\t\t array(\n\t\t 'cells' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t array(\n\t\t 'cells' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t array(\n\t\t 'cells' => 4,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t 'grid_cells' =>\n\t\t array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.417282695947000015213035339911584742367267608642578125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.5827173040530000402981158913462422788143157958984375,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 1,\n\t\t 'weight' => 1,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.25,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.25,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.25,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.25,\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\treturn $layouts;\n\n\t}", "public function getLayout(){\n\n return $this->layout;\n\n }", "function getLayout($id){\r\n \r\n $transform = ucfirst(str_replace('-', \"_\", $id));\r\n $layout_name = \"\\\\LK\\PXEdit\\\\Layouts\\\\\" . $transform;\r\n \r\n // Force an Autoload\r\n \\PXEdit_Autoload($layout_name);\r\n \r\n if(!class_exists($layout_name)){\r\n $this ->sendError('Layout ' . $layout_name . \" is not existing.\");\r\n } \r\n \r\n $layout = new $layout_name();\r\n return $layout;\r\n }", "function self_get_page_sections(){\n\tif( have_rows('content_blocks') ):\n\n\t // loop through the rows of data\n\t while ( have_rows('content_blocks') ) : the_row();\n\n\t \t\t\t$cur_sect = get_row_layout();\n\t \t\t\t$filepath = TEMPLATEPATH . '/partials/' . $cur_sect . '.php';\n\n\t \t\t\tif(file_exists( $filepath )){\n\n\t\t\t\t\t\t// the partial\n\t\t \t\t\tinclude($filepath);\n\n\t \t\t\t}\n\n\t endwhile;\n\n\telse :\n\n\t // no layouts found\n\n\tendif;\n\n}", "public static function get_layoutsByCode($code){\n // Split code into x / y\n $split = explode('x', $code);\n $x = $split[0];\n $y = $split[1];\n\n // Search DB for specific layout matching x and y\n $layout = DB::table('quotation_layouts')->where('size_x', '=', $x)->where('size_y', '=', $y)->get();\n\n if($layout != null && sizeof($layout)){\n // BY default DB data is in an array, we want the first array. There should never be an instance where there is multiple data returned as the code should be unique\n $layout = $layout[0];\n $layout->formatted_cost = $layout->cost == '' ? '' : '&pound;' . number_format($layout->cost,2);\n return $layout;\n }\n\n return false;\n }", "function wprt_layout_position() {\n\t// Default layout position\n\t$layout = 'sidebar-right';\n\n\t// Get layout position for site\n\t$layout = wprt_get_mod( 'site_layout_position', 'sidebar-right' );\n\n\t// Get layout position for single post\n\tif ( is_singular( 'post' ) )\n\t\t$layout = wprt_get_mod('single_post_layout_position', 'sidebar-right');\n\n\t// Single post/page can have custom layout position\n\tif ( is_singular() && wprt_metabox('page_layout') )\n\t\t$layout = wprt_metabox('page_layout');\n\n\t// Get layout position for shop pages\n\tif ( class_exists( 'woocommerce' ) ) {\n\t\tif ( is_shop() || is_product_category() ) $layout = wprt_get_mod('shop_layout_position', 'no-sidebar'); \n\t\tif ( is_singular( 'product' ) ) $layout = wprt_get_mod('shop_single_layout_position', 'no-sidebar');\n\t}\n\n\treturn $layout;\n}", "public function layout()\n {\n return $this->layout;\n }", "function GetLayout(){\n\t//Building the query\n\t$stringBuilder = \"SELECT l.layout_id, l.font, l.font_color, l.background_color, l.default_background, l.logo, fbg.location AS backgroundLocation, flogo.location AS logoLocation \";\n\t$stringBuilder .= \"FROM layout l \";\n\t$stringBuilder .= \"INNER JOIN `file` fbg ON fbg.file_id=l.default_background \";\n\t$stringBuilder .= \"INNER JOIN `file` flogo ON flogo.file_id=l.logo \";\n\t$stringBuilder .= \"ORDER BY l.layout_id DESC \";\t\n\n\t// Preparing query\n\t$query = GetDatabaseConnection()->prepare($stringBuilder);\n\t$query->execute(array()); //Putting in the parameters\n\t$result = $query->fetchAll(); //Fetching it\n\treturn $result;\n}", "function r2r_zen_discussion_node_panels_layouts() {\n $items['discussion_node'] = array(\n 'title' => t('Reality - Discussion Node Layout'),\n 'icon' => 'discussion_node.png',\n 'theme' => 'discussion_node',\n // 'css' => 'discussion_node.css',\n 'regions' => array(\n 'top' => t('Top'),\n 'left' => t('Left side'),\n 'right_t' => t('Right side, top row'),\n 'right_l' => t('Right side, Left col'),\n 'right_m' => t('Right side, Middle col'),\n 'right_r' => t('Right side, Right col'),\n 'right_b' => t('Right side, right row bottom')\n ),\n );\n\n return $items;\n}", "public function getLayoutById($id) {\n try {\n $client = new Zend_Soap_Client($this->LAYOUT_WSDL_URI);\n $options = array('soap_version' => SOAP_1_1,\n 'encoding' => 'ISO-8859-1',\n );\n $client->setOptions($options);\n $client->action = 'findByLayoutId';\n $result = $client->findByLayoutId($id);\n return $result;\n } catch (Exception $e) {\n //return false;\n }\n }", "public function layout($name, array $data = array());", "protected function findLayout($action)\n {\n foreach ($this->layouts as $layout => $actions) {\n if (in_array($action, $actions, true)) {\n return $layout;\n }\n }\n return false;\n }", "function LayoutContent($order,$name)\r\n\t{\r\n\t\tglobal $_REQUEST;\r\n\t\tglobal $_SETTINGS;\r\n\t\t\r\n\t\tif($_REQUEST['PREVIEW']){\r\n\t\t\r\n\t\t\t$select = \t\"SELECT * FROM `content` WHERE \".\r\n\t\t\t\t\t\t\"`layout`='1' AND \".\r\n\t\t\t\t\t\t\"`order`='\".$order.\"' AND \".\r\n\t\t\t\t\t\t\"`preview`='1' \".\r\n\t\t\t\t\t\t\"\".$_SETTINGS['demosqland'].\"\";\r\n\t\t\t\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\t$select = \t\"SELECT * FROM `content` WHERE \".\r\n\t\t\t\t\t\t\"`layout`='1' AND \".\r\n\t\t\t\t\t\t\"`order`='\".$order.\"' AND \".\r\n\t\t\t\t\t\t\"`preview`='0' \".\r\n\t\t\t\t\t\t\"\".$_SETTINGS['demosqland'].\"\";\r\n\t\t\t\r\n\t\t}\t\t\r\n\t\t$result = mysql_query($select)or die(\"err\");\r\n\t\t$row = mysql_fetch_array($result);\r\n\t\t$content = $row['content']; \r\n\t\techo $content;\r\n\t}", "public static function get_advanced_headers_layout() {\n\n\t\t\t$ids = Astra_Ext_Advanced_Headers_Data::get_current_page_header_ids();\n\n\t\t\tif ( false == $ids ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$settings = get_post_meta( $ids, 'ast-advanced-headers-layout', true );\n\n\t\t\treturn $settings;\n\t\t}", "function cs_meta_layout(){\n\tglobal $cs_xmlObject;\n\tif ( empty($cs_xmlObject->sidebar_layout->cs_layout) ) $cs_layout = \"\"; else $cs_layout = $cs_xmlObject->sidebar_layout->cs_layout;\n\tif ( empty($cs_xmlObject->sidebar_layout->cs_sidebar_left) ) $cs_sidebar_left = \"\"; else $cs_sidebar_left = $cs_xmlObject->sidebar_layout->cs_sidebar_left;\n\tif ( empty($cs_xmlObject->sidebar_layout->cs_sidebar_right) ) $cs_sidebar_right = \"\"; else $cs_sidebar_right = $cs_xmlObject->sidebar_layout->cs_sidebar_right;\n ?>\n\t<div class=\"elementhidden\">\n <div class=\"clear\"></div>\n \t<div class=\"opt-head\">\n <h4>Layout Options</h4>\n <div class=\"clear\"></div>\n </div>\n <ul class=\"form-elements\">\n <li class=\"to-label\">\n <label>Select Layout</label>\n </li>\n <li class=\"to-field\">\n <div class=\"meta-input\">\n <div class='radio-image-wrapper'>\n <input <?php if($cs_layout==\"none\")echo \"checked\"?> onclick=\"show_sidebar('none')\" type=\"radio\" name=\"cs_layout\" class=\"radio\" value=\"none\" id=\"radio_1\" />\n <label for=\"radio_1\">\n <span class=\"ss\"><img src=\"<?php echo get_template_directory_uri()?>/images/admin/1.gif\" alt=\"\" /></span>\n <span <?php if($cs_layout==\"none\")echo \"class='check-list'\"?> id=\"check-list\"><img src=\"<?php echo get_template_directory_uri()?>/images/admin/1-hover.gif\" alt=\"\" /></span>\n </label>\n </div>\n <div class='radio-image-wrapper'>\n <input <?php if($cs_layout==\"right\")echo \"checked\"?> onclick=\"show_sidebar('right')\" type=\"radio\" name=\"cs_layout\" class=\"radio\" value=\"right\" id=\"radio_2\" />\n <label for=\"radio_2\">\n <span class=\"ss\"><img src=\"<?php echo get_template_directory_uri()?>/images/admin/2.gif\" alt=\"\" /></span>\n <span <?php if($cs_layout==\"right\")echo \"class='check-list'\"?> id=\"check-list\"><img src=\"<?php echo get_template_directory_uri()?>/images/admin/2-hover.gif\" alt=\"\" /></span>\n </label>\n </div>\n <div class='radio-image-wrapper'>\n <input <?php if($cs_layout==\"left\")echo \"checked\"?> onclick=\"show_sidebar('left')\" type=\"radio\" name=\"cs_layout\" class=\"radio\" value=\"left\" id=\"radio_3\" />\n <label for=\"radio_3\">\n <span class=\"ss\"><img src=\"<?php echo get_template_directory_uri()?>/images/admin/3.gif\" alt=\"\" /></span>\n <span <?php if($cs_layout==\"left\")echo \"class='check-list'\"?> id=\"check-list\"><img src=\"<?php echo get_template_directory_uri()?>/images/admin/3-hover.gif\" alt=\"\" /></span>\n </label>\n </div>\n </div>\n </li>\n </ul>\n <ul class=\"form-elements meta-body\" style=\" <?php if($cs_sidebar_left == \"\"){echo \"display:none\";}else echo \"display:block\";?>\" id=\"sidebar_left\" >\n <li class=\"to-label\">\n <label>Select Left Sidebar</label>\n </li>\n <li class=\"to-field\">\n <select name=\"cs_sidebar_left\" class=\"select_dropdown\" id=\"page-option-choose-left-sidebar\">\n <?php\n $cs_theme_option = get_option('cs_theme_option');\n if ( isset($cs_theme_option['sidebar']) and count($cs_theme_option['sidebar']) > 0 ) {\n foreach ( $cs_theme_option['sidebar'] as $sidebar ){\n ?>\n <option <?php if ($cs_sidebar_left==$sidebar)echo \"selected\";?> ><?php echo $sidebar;?></option>\n <?php\n }\n }\n ?>\n </select>\n </li>\n </ul>\n <ul class=\"form-elements meta-body\" style=\" <?php if($cs_sidebar_right == \"\"){echo \"display:none\";}else echo \"display:block\";?>\" id=\"sidebar_right\" >\n <li class=\"to-label\">\n <label>Select Right Sidebar</label>\n </li>\n <li class=\"to-field\">\n <select name=\"cs_sidebar_right\" class=\"select_dropdown\" id=\"page-option-choose-right-sidebar\">\n <?php\n if ( isset($cs_theme_option['sidebar']) and count($cs_theme_option['sidebar']) > 0 ) {\n foreach ( $cs_theme_option['sidebar'] as $sidebar ){\n ?>\n <option <?php if ($cs_sidebar_right==$sidebar)echo \"selected\";?> ><?php echo $sidebar;?></option>\n <?php\n }\n }\n ?>\n </select>\n <input type=\"hidden\" name=\"cs_orderby[]\" value=\"meta_layout\" />\n </li>\n </ul>\n\t</div>\n\t<div class=\"clear\"></div>\n<?php\t\n}", "public function getLayoutName()\n {\n return $this->layout;\n }", "public function get_layouts ()\n {\n return $this->_layouts;\n }", "function yt_bbpres_site_layout( $current_layout ){\r\n\tif( yt_is_bbpress() )\r\n\t\treturn 'right-sidebar';\r\n\r\n\treturn $current_layout;\r\n}", "abstract function buildShowLayout(): void;", "protected function buildSlides() {\n $this->sortSlidesByWeight();\n\n $slides = [];\n foreach ($this->configuration['slides'] as $slide) {\n if ($slide['mid'] !== NULL) {\n $slides[] = [\n 'image' => $this->fileUrlFromMediaId($slide['mid']),\n 'caption' => $slide['caption'],\n ];\n }\n }\n return $slides;\n }", "public function getLayout(){\n return $this->_layout;\n }", "public function layout($layout, $params = NULL)\n\t{\n\t\t// If params are sended, parse array and turn key in variable name\n\t\t// Ex: array(\"language\" => \"portuguese\") turns $language = \"portuguese\";\n\t\tif(isset($params) && !empty($params))\n\t\t{\n\t\t\tforeach($params as $paramKey => $paramValue)\n\t\t\t{\n\t\t\t\t$$paramKey = $paramValue;\n\t\t\t}\n\t\t}\n\t\t// Include layout file\n\t\tinclude(LAYOUT_PATH.$layout.\".phtml\");\n\t}", "public function getLayoutOptions()\n {\n $theme = \\Cms\\Classes\\Theme::getActiveTheme();\n\n $path = $theme->getPath() . '/partials/tiles';\n\n if (file_exists($path) === false) {\n return [];\n }\n\n $files = array_diff(scandir($path), array('.', '..'));\n\n $options = [\n '-default-' => 'Default Layout', // use components/section/tileset1.htm\n '-section-' => 'Section (inline)' // use inline layout specified in Section config (e.g. from FateFactory)\n ];\n foreach ($files as $file) {\n if (substr($file, 0, 1) !== '_') {\n $name = $file;\n $options[$file] = $name;\n }\n }\n\n return $options;\n }", "function layouts($group = [])\n { \n $group = is_array($group) ? $group : func_get_args(); \n\n return app('armin.layout')->all()->filter(function($layout) use ($group) { \n if(empty($group) || in_array('*', $layout->group())) {\n return true;\n }\n\n return count(array_intersect($layout->group(), $group));\n });\n }", "function colleges_post_list_layouts( $layouts ) {\n\treturn array_merge( $layouts, array(\n\t\t'people' => 'People Layout',\n\t\t'degree_block' => 'Degree Block Layout'\n\t) );\n}", "function spr_get_sections() {\n\tglobal $spr_sql_fields;\n\n\t$sql_tables = safe_pfx('txp_section');\n\t$rs = safe_query(\"SELECT \".$spr_sql_fields.\" FROM \".$sql_tables.\" WHERE name != 'default' ORDER BY name\");\n\twhile ($a = nextRow($rs)) {\n\t\textract($a); // set 'name','title','parent' etc in $a\n\t\t$out[$name] = $a;\n\t}\n\treturn $out;\n}", "function the_layout(string $layout)\n {\n return app('armin.layout')->layout($layout);\n }", "public function get_layout( $layout_id = '' ) {\n // Globals\n\t\tglobal $wpdb;\n \n try {\n // Layout ID is not optional\n if( @$layout_id != '' ) {\n $layout_id = sanitize_text_field( $layout_id );\n } else {\n throw new Exception( 'Layout ID is required.' );\n }\n \n // Get the layout from the database\n $sql = \"SELECT * FROM `\" . rpids_tableprefix() . \"rpids_layouts` WHERE `id` = '\" . $layout_id . \"';\";\n $layout = $wpdb->get_row( $sql, ARRAY_A );\n \n // Make sure we found something\n if( $layout == null ) {\n // Nope\n throw new Exception( 'Layout not found.' );\n } else {\n // Got it! Put it in an object.\n $return = new StdClass();\n $return->status = 'success';\n $return->id = $layout['id'];\n $return->name = $layout['name'];\n $return->description = $layout['description'];\n $return->type = $layout['type'];\n $return->width = $layout['width'];\n $return->height = $layout['height'];\n $return->bgimage = $layout['bgimage'];\n $return->bgimagetype = $layout['bgimagetype'];\n $return->bgcolor = $layout['bgcolor'];\n $return->startimage = $layout['startimage'];\n $return->items = (object) unserialize( $layout['items'] );\n $return->lastmodified = $layout['lastmodified'];\n \n // Return it!\n return $return;\n }\n } catch ( Exception $e ) {\n return (object) array(\n\t\t\t\t\"status\" => \"error\",\n\t\t\t\t\"message\" => $e->getMessage()\n\t\t\t);\n }\n }", "function layout_content_areas()\r\n\t{\r\n\t\t$websitepath = $this->website_path;\r\n\t\t$theme = $this->theme;\r\n\t\t$directory = $_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.'index.php';\r\n\t\tif(file_exists($directory))\r\n\t\t{\r\n\t\t\t/*** OPEM THE FILE ***/\r\n\t\t\t$myFile = $directory;\r\n\t\t\t$fh = fopen($myFile, 'r');\r\n\t\t\t$theData = fread($fh, filesize($myFile));\r\n\t\t\tfclose($fh);\r\n\t\t\t\r\n\t\t\t/*** GET ARRAY OF FILE ***/\r\n\t\t\t$theDataArray = explode('$CMS->LayoutContent(',$theData);\r\n\t\t\t$anum = count($theDataArray);\r\n\t\t\t$a = 0;\r\n\t\t\t$i = 0;\r\n\t\t\twhile($a<$anum)\r\n\t\t\t{\r\n\t\t\t\t//if($a > 0){\r\n\t\t\t\t\t$theContentArray = explode(\");\",$theDataArray[$a]);\r\n\t\t\t\t\t$bnum = count($theContentArray);\r\n\t\t\t\t\t//echo \"a-$a : bnum-$bnum <br />\";\r\n\t\t\t\t\tif($bnum >= 2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$theFunctionArray = explode(\",\",$theContentArray[0]);\r\n\t\t\t\t\t\t$cnum = count($theFunctionArray);\r\n\t\t\t\t\t\t//echo \"b-$a : cnum-$cnum : \".$theContentArray[0].\"<br />\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif($cnum == 2)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$contentarray[$i]['name'] = str_replace(\"'\",\"\",$theFunctionArray[1]);\r\n\t\t\t\t\t\t\t$contentarray[$i]['order'] = str_replace(\"'\",\"\",$theFunctionArray[0]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/*** INSERT CHECK ***/\r\n\t\t\t\t\t\t\t$sel1 = \"INSERT INTO `content` SET \".\r\n\t\t\t\t\t\t\t\t\t\"`order`='\".$contentarray[$i]['order'].\"', \".\r\n\t\t\t\t\t\t\t\t\t\"`layout`='1'\".\r\n\t\t\t\t\t\t\t\t\t\"\".$_SETTINGS['demosql'].\"\";\r\n\t\t\t\t\t\t\t$res1 = doQuery($sel1);\t\t\r\n\t\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//echo \"<strong>\".$theContentArray[0].\"</strong><br>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//echo \"<br />theDataArray-$a: \".$theDataArray[$a].\"<br />\";\r\n\t\t\t\t//}\r\n\t\t\t\t$a++;\r\n\t\t\t}//END while\r\n\t\t}\r\n\t\treturn $contentarray;\r\n\t}", "public function readLayouts () {\n // @var FileMakerDataApi\n $fmDataApi = $this->_backend->getFileMakerDataApi();\n\n // @var FileMakerDataApiResult\n $result = $fmDataApi->layoutNames();\n\n if ($result->isError()) {\n throw new FileMakerDataApiResponseException($result);\n }\n\n $layouts = $result->getLayouts();\n $layoutNames = $this->_flattenFolders($layouts);\n natsort($layoutNames);\n\n $restfmMessage = new \\RESTfm\\Message\\Message();\n foreach ($layoutNames as $layout) {\n $restfmMessage->addRecord(new \\RESTfm\\Message\\Record(\n NULL, NULL, array('layout' => $layout)\n ));\n }\n\n return $restfmMessage;\n }", "function initLayout(){\n $layout = array(\n 'left' => array(\n 'ProfileInfo' => array(\n 'title' => 'Profile Info',\n 'minimize' => false,\n ),\n 'EmailInboxMenu' => array(\n 'title' => 'Inbox Menu',\n 'minimize' => false,\n ),\n 'ActionMenu' => array(\n 'title' => 'Actions',\n 'minimize' => false,\n ),\n 'TopContacts' => array(\n 'title' => 'Top Contacts',\n 'minimize' => false,\n ),\n 'RecentItems' => array(\n 'title' => 'Recently Viewed',\n 'minimize' => false,\n ),\n 'ActionTimer' => array(\n 'title' => 'Action Timer',\n 'minimize' => true,\n ),\n 'UserCalendars' => array(\n 'title' => 'User Calendars',\n 'minimize' => false,\n ),\n 'CalendarFilter' => array(\n 'title' => 'Filter',\n 'minimize' => false,\n ),\n 'GroupCalendars' => array(\n 'title' => 'Group Calendars',\n 'minimize' => false,\n ),\n 'FilterControls' => array(\n 'title' => 'Filter Controls',\n 'minimize' => false,\n ),\n 'SimpleFilterControlEventTypes' => array(\n 'title' => 'Event Types',\n 'minimize' => false,\n ),\n ),\n 'right' => array(\n 'SmallCalendar' => array(\n 'title' => 'Small Calendar',\n 'minimize' => false,\n ),\n 'ChatBox' => array(\n 'title' => 'Activity Feed',\n 'minimize' => false,\n ),\n 'GoogleMaps' => array(\n 'title' => 'Google Map',\n 'minimize' => false,\n ),\n 'OnlineUsers' => array(\n 'title' => 'Active Users',\n 'minimize' => false,\n ),\n 'TagCloud' => array(\n 'title' => 'Tag Cloud',\n 'minimize' => false,\n ),\n 'TimeZone' => array(\n 'title' => 'Clock',\n 'minimize' => false,\n ),\n 'SmallCalendar' => array(\n 'title' => 'Calendar',\n 'minimize' => false,\n ),\n 'QuickContact' => array(\n 'title' => 'Quick Contact',\n 'minimize' => false,\n ),\n 'MediaBox' => array(\n 'title' => 'Files',\n 'minimize' => false,\n ),\n ),\n 'hiddenRight' => array(\n 'ActionMenu' => array(\n 'title' => 'My Actions',\n 'minimize' => false,\n ),\n 'MessageBox' => array(\n 'title' => 'Message Board',\n 'minimize' => false,\n ),\n 'NoteBox' => array(\n 'title' => 'Note Pad',\n 'minimize' => false,\n ),\n 'DocViewer' => array(\n 'title' => 'Doc Viewer',\n 'minimize' => false,\n ),\n 'TopSites' => array(\n 'title' => 'Top Sites',\n 'minimize' => false,\n ),\n ),\n );\n if(Yii::app()->contEd('pro')){\n if(file_exists('protected/config/proWidgets.php')){\n foreach(include('protected/config/proWidgets.php') as $loc=>$data){\n if (isset ($layout[$loc]))\n $layout[$loc] = array_merge($layout[$loc],$data);\n }\n }\n }\n return $layout;\n }", "public function prepare_layout($layout_script = NULL)\n {\n $layout = parent::prepare_layout($layout_script);\n return $layout;\n }", "public function getLayout(){\n $layout = $this->getAttribute('layout');\n\n $initLayout = $this->initLayout();\n\n if(!$layout){ // layout hasn't been initialized?\n $layout = $initLayout;\n $this->layout = json_encode($layout);\n $this->update(array('layout'));\n }else{\n $layout = json_decode($layout, true); // json to associative array\n if (!is_array ($layout)) $layout = array ();\n\n $this->addRemoveLayoutElements('left', $layout, $initLayout);\n $this->addRemoveLayoutElements('right', $layout, $initLayout);\n }\n\n return $layout;\n }", "function mai_get_layout( $layout ) {\n\tremove_filter( 'genesis_pre_get_option_site_layout', 'genesiswooc_archive_layout' );\n\n\t// Setup cache.\n\tstatic $layout_cache = '';\n\n\t// If cache is populated, return value.\n\tif ( '' !== $layout_cache ) {\n\t\treturn esc_attr( $layout_cache );\n\t}\n\n\t$site_layout = '';\n\n\tglobal $wp_query;\n\n\t// If home page.\n\tif ( is_home() ) {\n\t\t$site_layout = genesis_get_custom_field( '_genesis_layout', get_option( 'page_for_posts' ) );\n\t\tif ( ! $site_layout ) {\n\t\t\t$site_layout = genesis_get_option( 'layout_archive' );\n\t\t}\n\t}\n\n\t// If viewing a singular page, post, or CPT.\n\telseif ( is_singular() ) {\n\t\t$site_layout = genesis_get_custom_field( '_genesis_layout', get_the_ID() );\n\t\tif ( ! $site_layout ) {\n\t\t\t$site_layout = genesis_get_option( sprintf( 'layout_%s', get_post_type() ) );\n\t\t}\n\t}\n\n\t// If viewing a post taxonomy archive.\n\telseif ( is_category() || is_tag() || is_tax( get_object_taxonomies( 'post', 'names' ) ) ) {\n\t\t$term = $wp_query->get_queried_object();\n\t\t$site_layout = $term ? get_term_meta( $term->term_id, 'layout', true) : '';\n\t\t$site_layout = $site_layout ? $site_layout : genesis_get_option( 'layout_archive' );\n\t}\n\n\t// If viewing a custom taxonomy archive.\n\telseif ( is_tax() ) {\n\t\t$term = $wp_query->get_queried_object();\n\t\t$site_layout = $term ? get_term_meta( $term->term_id, 'layout', true) : '';\n\t\tif ( ! $site_layout ) {\n\t\t\t$tax = get_taxonomy( $wp_query->get_queried_object()->taxonomy );\n\t\t\tif ( $tax ) {\n\t\t\t\t/**\n\t\t\t\t * If we have a tax, get the first one.\n\t\t\t\t * Changed to reset() when hit an error on a term archive that object_type array didn't start with [0]\n\t\t\t\t */\n\t\t\t\t$post_type = reset( $tax->object_type );\n\t\t\t\t// If we have a post type and it supports genesis-cpt-archive-settings\n\t\t\t\tif ( post_type_exists( $post_type ) && genesis_has_post_type_archive_support( $post_type ) ) {\n\t\t\t\t\t// $site_layout = genesis_get_option( sprintf( 'layout_archive_%s', $post_type ) );\n\t\t\t\t\t$site_layout = genesis_get_cpt_option( 'layout', $post_type );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$site_layout = $site_layout ? $site_layout : genesis_get_option( 'layout_archive' );\n\t}\n\n\t// If viewing a supported post type.\n\t// elseif ( is_post_type_archive() && genesis_has_post_type_archive_support() ) {\n\telseif ( is_post_type_archive() ) {\n\t\t// $site_layout = genesis_get_option( sprintf( 'layout_archive_%s', get_post_type() ) );\n\t\t$site_layout = genesis_get_cpt_option( 'layout', get_post_type() );\n\t\t$site_layout = $site_layout ? $site_layout : genesis_get_option( 'layout_archive' );\n\t}\n\n\t// If viewing an author archive.\n\telseif ( is_author() ) {\n\t\t$site_layout = get_the_author_meta( 'layout', (int) get_query_var( 'author' ) );\n\t\t$site_layout = $site_layout ? $site_layout : genesis_get_option( 'layout_archive' );\n\t}\n\n\t// Pull the theme option.\n\tif ( ! $site_layout ) {\n\t\t$site_layout = genesis_get_option( 'site_layout' );\n\t}\n\n\t// Use default layout as a fallback, if necessary.\n\tif ( ! genesis_get_layout( $site_layout ) ) {\n\t\t$site_layout = genesis_get_default_layout();\n\t}\n\t// Push layout into cache.\n\t$layout_cache = $site_layout;\n\n\t// Return site layout.\n\treturn esc_attr( $site_layout );\n\n}", "public function get_layout ( $layout_name )\n {\n $layouts = $this->get_layouts();\n\n if ( isset( $layouts[$layout_name] ) /* @perf array_key_exists( $layout_name, $layouts ) */ )\n {\n return $layouts[ $layout_name ];\n }\n\n throw new \\Exception( 'No layout exists with the name \"' . $layout_name . '\"' );\n }", "function get_common_range_details($id) {\r\n\t\t$i = $id;\r\n\t\t$path = array();\r\n\t\t\r\n\t\twhile ($i != 0) {\r\n\t\t\t$db = $this->db->query(\"SELECT id, parent FROM wp_structure WHERE id = $i\");\r\n\t\t\t$x = $db->result_array();\r\n\t\t\t$i = $x[0]['parent'];\r\n\t\t\t$path[] = $x[0]['id'];\r\n\t\t}\r\n\t\t$path = array_reverse($path);\r\n\t\t\r\n\t\t/*\r\n\t\t * It is projectors\r\n\t\t * So change the parent ID\r\n\t\t */\r\n\t\tif (isset($path[1]) && $path[1] == 73) {\r\n\t\t\t$id = 1562;\r\n\t\t}\r\n\t\t\r\n\t\t//echo '<!-- ' . print_r($path, true) . \"\\n $id \\n\" . ' -->';\r\n\t\t\r\n\t\t$result = array();\r\n\t\t\r\n\t\t// get folders case studies and white papers\r\n\t\t$fcws = $this->db->query(\"SELECT * FROM `wp_structure`, `wp_folder`\r\n\t\t\t\t\t\t\t\t\tWHERE `id` = `link` AND `online` = 1 AND `parent` = '{$id}'\r\n\t\t\t\t\t\t\t\t\tORDER BY `position`\");\r\n\t\tif ($fcws->num_rows() > 0) {\r\n\t\t\t$result['folders'] = $fcws->result_array();\r\n\t\t} else {\r\n\t\t\t$result['folders'] = false;\r\n\t\t}\r\n\t\t\r\n\t\t// get articles FAQ's and Warranty\r\n\t\t$fcws = $this->db->query(\"SELECT * FROM `wp_structure`, `wp_article`\r\n\t\t\t\t\t\t\t\t\tWHERE `id` = `link` AND `online` = 1 AND `parent` = '{$id}'\r\n\t\t\t\t\t\t\t\t\tORDER BY `position`\");\r\n\t\tif ($fcws->num_rows() > 0) {\r\n\t\t\t$result['articles'] = $fcws->result_array();\r\n\t\t} else {\r\n\t\t\t$result['articles'] = false;\r\n\t\t}\r\n\t\t\r\n\t\tif ($result['articles'] == false && $result['folders'] == false) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn $result;\r\n\t\t}\r\n\t\t\r\n\t}", "private function getInLayout($content, $data = array()) {\n\t\t$matr = new FrontMatter($content);\n\t\t\n\t\t# Set page title if set in template\n\t\tif ($title = $matr->fetch('title')) {\n\t\t\t$data = array_add_key($data, 'title', $title);\n\t\t}\n\t\t\n\t\t# Change layout file if overwritten in template\n\t\tif ($matr->fetch('layout') && $this->layoutExists($matr->fetch('layout'))) {\n\t\t\t$layout = $this->getLayoutFile($matr->fetch('layout'));\n\t\t} else {\n\t\t\t$layout = SNUG_VIEWS . $this->layout;\n\t\t}\n\t\t\n\t\t# Parse body and wrap in layout\n\t\t$body = $this->parseHAMLString($matr->fetch('content'), $data);\n\t\t$html = $this->parseHAML($layout, array_add_key($data, 'body', $body));\n\t\t\n\t\t# Return almighty HTML code\n\t\treturn $html;\n\t}", "function getSlideTitles() {\n global $slides;\n\n foreach ($slides[\"slides\"] as $slide) {\n $id = $slide[\"id\"];\n $title = $slide[\"title\"];\n echo \"<p class='sliderTitle' id='title$id'>$title</p>\";\n }\n }", "function zeen_get_article_layout_skin( $pid = '' ) {\n\n\t$output = get_post_meta( $pid, 'zeen_article_layout_skin', true ) == 'on' ? 2 : 1;\n\treturn $output;\n}", "protected function getLayout()\n {\n return $this->layout;\n }", "protected function getLayout()\n {\n return $this->layout;\n }", "protected function getLayout() {\n\t\treturn $this->getFrontcontroller()->getResource('layout');\n\t}", "function dbQuerySectionIdSet()\n {\n $resultset = $this->dbQuery(\"SELECT id, mtitle FROM section ORDER BY mtitle\");\n\n $parents[0] = 'Root';\n\n if (isset ($resultset))\n {\n foreach ($resultset as $key => $val)\n {\n $parents[$val['id']] = stripslashes($val['mtitle']);\n }\n }\n\n return $parents;\n }", "function fanwood_plugin_layouts( $layout ) {\n\n\tif ( current_theme_supports( 'theme-layouts' ) ) {\n\t\n\t\t$global_layout = hybrid_get_setting( 'fanwood_global_layout' );\n\t\t$buddypress_layout = hybrid_get_setting( 'fanwood_buddypress_layout' );\n\n\t\tif ( function_exists( 'bp_loaded' ) && !bp_is_blog_page() && $layout == 'layout-default' ) {\n\t\t\n\t\t\tif ( $buddypress_layout !== 'layout_default' ) {\n\t\t\t\n\t\t\t\tif ( $buddypress_layout == 'layout_1c' )\n\t\t\t\t\t$layout = 'layout-1c';\n\t\t\t\telseif ( $buddypress_layout == 'layout_2c_l' )\n\t\t\t\t\t$layout = 'layout-2c-l';\n\t\t\t\telseif ( $buddypress_layout == 'layout_2c_r' )\n\t\t\t\t\t$layout = 'layout-2c-r';\n\t\t\t\telseif ( $buddypress_layout == 'layout_3c_c' )\n\t\t\t\t\t$layout = 'layout-3c-c';\n\t\t\t\telseif ( $buddypress_layout == 'layout_3c_l' )\n\t\t\t\t\t$layout = 'layout-3c-l';\n\t\t\t\telseif ( $buddypress_layout == 'layout_3c_r' )\n\t\t\t\t\t$layout = 'layout-3c-r';\n\t\t\t\telseif ( $buddypress_layout == 'layout_hl_1c' )\n\t\t\t\t\t$layout = 'layout-hl-1c';\n\t\t\t\telseif ( $buddypress_layout == 'layout_hl_2c_l' )\n\t\t\t\t\t$layout = 'layout-hl-2c-l';\n\t\t\t\telseif ( $buddypress_layout == 'layout_hl_2c_r' )\n\t\t\t\t\t$layout = 'layout-hl-2c-r';\n\t\t\t\telseif ( $buddypress_layout == 'layout_hr_1c' )\n\t\t\t\t\t$layout = 'layout-hr-1c';\n\t\t\t\telseif ( $buddypress_layout == 'layout_hr_2c_l' )\n\t\t\t\t\t$layout = 'layout-hr-2c-l';\n\t\t\t\telseif ( $buddypress_layout == 'layout_hr_2c_r' )\n\t\t\t\t\t$layout = 'layout-hr-2c-r';\n\t\t\t\t\n\t\t\t} elseif ( $buddypress_layout == 'layout_default' ) {\n\t\t\t\n\t\t\t\tif ( $global_layout == 'layout_1c' )\n\t\t\t\t\t$layout = 'layout-1c';\n\t\t\t\telseif ( $global_layout == 'layout_2c_l' )\n\t\t\t\t\t$layout = 'layout-2c-l';\n\t\t\t\telseif ( $global_layout == 'layout_2c_r' )\n\t\t\t\t\t$layout = 'layout-2c-r';\n\t\t\t\telseif ( $global_layout == 'layout_3c_c' )\n\t\t\t\t\t$layout = 'layout-3c-c';\n\t\t\t\telseif ( $global_layout == 'layout_3c_l' )\n\t\t\t\t\t$layout = 'layout-3c-l';\n\t\t\t\telseif ( $global_layout == 'layout_3c_r' )\n\t\t\t\t\t$layout = 'layout-3c-r';\n\t\t\t\telseif ( $global_layout == 'layout_hl_1c' )\n\t\t\t\t\t$layout = 'layout-hl-1c';\n\t\t\t\telseif ( $global_layout == 'layout_hl_2c_l' )\n\t\t\t\t\t$layout = 'layout-hl-2c-l';\n\t\t\t\telseif ( $global_layout == 'layout_hl_2c_r' )\n\t\t\t\t\t$layout = 'layout-hl-2c-r';\n\t\t\t\telseif ( $global_layout == 'layout_hr_1c' )\n\t\t\t\t\t$layout = 'layout-hr-1c';\n\t\t\t\telseif ( $global_layout == 'layout_hr_2c_l' )\n\t\t\t\t\t$layout = 'layout-hr-2c-l';\n\t\t\t\telseif ( $global_layout == 'layout_hr_2c_r' )\n\t\t\t\t\t$layout = 'layout-hr-2c-r';\n\t\t\t\n\t\t\t}\n\n\t\t}\n\t\t\n\t}\n\t\n\treturn $layout;\n\n}", "public function getName()\n\t{\n\t\treturn 'layout';\n\t}", "public function LayoutTitle(){\n $title = app_layout_title::all();\n $layout = app_layout::all();\n $item = app_layout_item::all();\n return view('app.layout',compact('title','layout','item'));\n }", "public function loadLayout()\n {\n \n echo \"<div id='layout-mini-cr'>\";\n try\n {\n $portal = new Portal();\n foreach($portal->loadBox() as $i => $v)\n {\n try\n {\n $portal->getId($v[1]);\n $info = $portal->pegaInfo();\n switch($v[2])\n {\n\n case 1: echo \"<div class='box-mini-ex1' id='box-mini-$v[0]'><a href='#'><div class='delete-box-mini' id='dlb-$v[0]'></div></a>$info[1]</div>\"; break;\n case 2: echo \"<div class='box-mini-ex2' id='box-mini-$v[0]'><a href='#'><div class='delete-box-mini' id='dlb-$v[0]'></div></a>$info[1]</div>\"; break;\n case 3: echo \"<div class='box-mini-ex3' id='box-mini-$v[0]'><a href='#'><div class='delete-box-mini' id='dlb-$v[0]'></div></a>$info[1]</div>\"; break; \n } \n }\n catch(Exception $ex)\n {\n // Deleta a box caso ele não consiga pegar as informações da notícia\n $portal->getBid($v[0]);\n $portal->deleteBox();\n }\n }\n echo \"<div class='clear'></div>\";\n }\n catch(Exception $a)\n {\n \n }\n echo \"</div>\";\n }", "public function getLayout() {\n \t\n \t// Return the current layout\n \treturn $this->sLayout;\n }", "public function getLayoutName()\n\t{\n\t\treturn $this->layout_name;\n\t}", "public function getLayoutList() {\n try {\n $client = new Zend_Soap_Client($this->LAYOUT_WSDL_URI);\n $options = array('soap_version' => SOAP_1_1,\n 'encoding' => 'ISO-8859-1',\n );\n $client->setOptions($options);\n $client->action = 'findAllActiveLayout';\n $result = $client->findAllActiveLayout();\n return $result;\n } catch (Exception $e) {\n //return false;\n }\n }", "public function prepare_layout($layout_script = NULL)\n {\n return $this->request->get_controller('acl')->prepare_layout($layout_script);\n }", "function parse()\n {\n $params=$this->layoutManager->getPluginParams(\"L\");\n $tLang=$params[\"lang\"];\n $el=$this->getSubElements();\n $id=$el[\"ID\"][\"text\"];\n $textNode=$el[\"C\"][\"node\"];\n $layoutContents=$textNode->contents;\n $nContents=count($layoutContents);\n if($nContents==0)\n return;\n\n $curVar=1;\n $phpCode=array();\n $newContents=array();\n $currentNode=array(\"TYPE\"=>\"HTML\",\"TEXT\"=>\"\");\n $newContents[]=$currentNode;\n /* Supongamos una lista de layoutContents del tipo HTML - PHP - HTML : ej: a <?php echo \"p\";?> b\n * Para buscar la traduccion, hay que actuar como si fuera 1 solo layoutContent de tipo a %1 b\n * Por eso, el resultado debe ser 1 solo layoutcontent de tipo HTML, aunque dentro, contenga codigo php.\n * \n */\n $html=\"\";\n for($k=0;$k<$nContents;$k++)\n { \n if($layoutContents[$k][\"TYPE\"]==\"HTML\")\n {\n $html.=$layoutContents[$k][\"TEXT\"];\n }\n else\n {\n if($layoutContents[$k][\"TYPE\"]==\"PHP\")\n {\n $html.=\"{%\".$curVar.\"}\";\n $phpCode[$curVar]=$layoutContents[$k][\"TEXT\"];\n $curVar++;\n }\n else\n {\n // Se traduce el nodo HTML actual\n $currentNode[\"TEXT\"]=$this->parseTranslation($tLang,$id,$phpCode,$html);\n // Se copia el nodo que hemos encontrado, tal cual (no es ni PHP ni HTML)\n $newContents[]=$layoutContents[$k];\n // Se crea el siguiente nodo HTML.\n $currentNode=array(\"TYPE\"=>\"HTML\",\"TEXT\"=>\"\");\n $newContents[]=$currentNode;\n $html=\"\";\n $phpCode=array();\n $curVar=1;\n }\n \n }\n } \n // Al llegar aqui, nos queda el ultimo nodo HTML creado.Hay que parsearlo.\n $currentNode[\"TEXT\"]=$this->parseTranslation($tLang,$id,$phpCode,$html);\n return $newContents;\n }", "public function slice_and_dice(){\n\n // Are we inside a section?\n $in_section = false;\n\n // The current Section name\n $section_name = '';\n\n // Output, as Layout file modified\n $output = '';\n\n // The canonical name of the Layout\n $layout_canonical_name = (string) new \\file_basename_for($this->layout_name);\n\n // The full path filename for the layout\n $filename = (string)new Theme_Root(getcwd(), $this->theme_name) . \"/$this->layout_name\";\n\n // Get model for saving sections in DB\n $page_model = (new Model('website_page'))\n\n ->find(\"name='$layout_canonical_name'\");\n\n // Have we substituted the sections for the directive yet?\n $is_replaced = false;\n\n // if we can open the file for reading...\n if ( ( $handle = fopen($filename,'r'))){\n\n while ( ($line = fgets($handle))!== false ){\n\n // Report for first file\n if ( self::$is_first_file && $this->verbose ) echo \"\\tLine: $line\";\n\n if ( preg_match('/<section/',$line,$hits)){\n\n if ( $this->verbose ) echo \"\\tFound an HTML <section> on line $line in Layout $layout_canonical_name\\r\\n\";\n\n\n $section_name = (string) new Section_Name($line,$layout_canonical_name);\n\n // Initialize content\n $this->sections[$section_name] = '';\n\n $in_section = true;\n\n if ( ! $is_replaced){\n\n $output .= file_get_contents(new Code_Alchemy_Root_Path().\"/templates/fragments/foreach-model-template.php\").\"\\r\\n\";\n\n $is_replaced = true;\n }\n }\n\n if ( $in_section )\n\n $this->sections[$section_name] .= $line;\n\n else\n\n $output .= $line;\n\n if ( preg_match('<\\/section>',$line) )\n\n $in_section = false;\n\n }\n\n // No longer the first file\n self::$is_first_file = false;\n\n\n if ( $output )\n\n file_put_contents($filename,$output);\n\n\n fclose($handle);\n\n // Write sections to database\n foreach ( $this->sections as $name => $section_data ) {\n\n // If DB Model for Page was found...\n if ( $page_model->exists){\n\n $section_model = (new Model('page_section'));\n\n if ( ! $section_model\n\n ->create_from(array(\n\n 'website_page_id' => $page_model->id,\n\n 'name' => $name,\n\n 'handlebars_template' => (string)\n\n new String_Values_Replacer($section_data,array(\n\n '/<\\?\\=\\$theme_root\\?\\>/' => '{{theme_root}}'\n ))\n\n )))\n\n echo \"\\t\".$section_model->error();\n\n else\n\n {\n\n if ( $this->verbose ) echo \"\\t$name: Section successfully extracted and added to database\\r\\n\";\n }\n\n\n\n }\n\n\n }\n\n\n }\n\n if ( $this->verbose ) echo \"\\t\". get_called_class().\" Sliced out \".count( $this->sections).\" from Layout $layout_canonical_name\\r\\n\";\n\n }", "public function getViewLayout()\n {\n if(isset($_GET['debug'])) $this->debug();\n\n switch (true) {\n case isset($this->items):\n return 'man_toc';\n case isset($this->methods):\n return 'man_group';\n default:\n return 'man_single';\n }\n }", "function happy_post_layout_one_column( $layout ) {\n\treturn 'layout-1c';\n}", "public function getLayout()\n {\n return $this->layout;\n }", "public function getLayout()\n {\n return $this->layout;\n }", "public function getLayout()\n {\n return $this->layout;\n }", "function get_row_layout()\n{\n}", "public function getLayouts()\r\n {\r\n return $this->layouts;\r\n }", "public function layout($layout_name)\n {\n if (!isset($this->layoutTable[$layout_name])) {\n $this->layoutTable[$layout_name] = new Supporting\\FileMakerLayout($this->provider, $layout_name);\n }\n return $this->layoutTable[$layout_name];\n }", "function getContentArrayForTemplating($code, $strip_template_content_comments = false) {\r\n\t\t// assume the main <h1> is directly in the content <div>\r\n\t//\t$inventing_h1 = false;\r\n\t//\t$h1_strpos = strpos($code, '<h1');\r\n\t\t//print('$h1_strpos: ');var_dump($h1_strpos);\r\n\t\t//print('code}}}<br>');\r\n\t\t//print($code);\r\n\t\t//print('{{{code<br>');\r\n\t\t//exit(0);\r\n\t\t$found_h1 = false;\r\n\t//\tif($h1_strpos === false) {\r\n\t\t\t// ideally we would run structure on every file and this problem would go away, but it shouldn't be bad to write a possibly overlapping solution here\r\n\t\t\t// take a shot; look for what seems like paragraph content then take the first block in its container\r\n\t\t\tpreg_match_all('/<(p|h[1-6])[^<>]*?>(.*?)<\\/\\1>/is', $code, $possible_heading_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t//var_dump($possible_heading_matches);\r\n\t\t\tforeach($possible_heading_matches[0] as $index => $value) {\r\n\t\t\t\t$possible_heading_content = $possible_heading_matches[2][$index][0];\r\n\t\t\t\t//var_dump($possible_heading_content);\r\n\t\t\t\t/*if(substr_count($possible_heading_content, '.') > 2 || substr_count($paragraph_content, ':') > 0) {\r\n\t\t\t\t\t$paragraph_offset = $possible_heading_matches[0][$index][1];\r\n\t\t\t\t\t$blockArray = OM::getContainingBlock($code, $paragraph_offset);\r\n\t\t\t\t\t//$blockString = $blockArray[0];\r\n\t\t\t\t\t//$offset_contained_string_in_block = $blockArray[1];\r\n\t\t\t\t\t$containing_block_offset = $blockArray[2];\r\n\t\t\t\t\tpreg_match('/<(h1|h2|h3|h4|h5|h6|p)[^<>]*?>(.*?)<\\/\\1>/is', $code, $h1_matches, PREG_OFFSET_CAPTURE, $containing_block_offset);\r\n\t\t\t\t\t$h1_strpos = $h1_matches[0][1];\r\n\t\t\t\t\t$inventing_h1 = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}*/\r\n\t\t\t\tif(ReTidy::isIndexical($possible_heading_content)) {\r\n\t\t\t\t\t//print('possible_heading_content is indexical.<br>');\r\n\t\t\t\t\t//print('$possible_heading_content: ' . $possible_heading_content);\r\n\t\t\t\t\t$h1_strpos = $possible_heading_matches[0][$index][1];\r\n\t\t\t\t\t$h1_including_tag = $possible_heading_matches[0][$index][0];\r\n\t\t\t\t\t$h1_previous_tag_name = $possible_heading_matches[1][$index][0];\r\n\t\t\t\t\t$found_h1 = true;\r\n\t//\t\t\t\t$inventing_h1 = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t//\t\tif(!$inventing_h1) {\r\n\t//\t\t\t//print($code);\r\n\t//\t\t\tprint('h1 not detected or created in getContentArrayForTemplating; this needs to be fixed.');exit(0);\r\n\t//\t\t}\r\n\t//\t}\r\n\t\t$get_content_more_crudely = true;\r\n\t\tif(strpos($code, '<div') === false) {\r\n\t\t\t//print('here347459475948759<br>');\r\n\t\t} else {\r\n\t\t\t//print('here347459475948760<br>');\r\n\t\t\tif($found_h1) {\r\n\t\t\t\t// we assume the code is syntactically sound for this...\r\n\t\t\t\tpreg_match_all('/<div/is', substr($code, 0, $h1_strpos), $open_div_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\tpreg_match_all('/<\\/div>/is', substr($code, 0, $h1_strpos), $close_div_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\t//print('$open_div_matches: ');var_dump($open_div_matches);\r\n\t\t\t\t$counter1 = sizeof($open_div_matches[0]) - 1;\r\n\t\t\t\t$counter2 = sizeof($close_div_matches[0]) - 1;\r\n\t\t\t\t$found_content_div = false;\r\n\t\t\t\t//print('here183945606067<br>');\r\n\t\t\t\tif(sizeof($open_div_matches) > 0) {\r\n\t\t\t\t\twhile($counter1 > -1) {\r\n\t\t\t\t\t\t//print('here183945606068<br>');\r\n\t\t\t\t\t\t$strpos_open_div = $open_div_matches[0][$counter1][1];\r\n\t\t\t\t\t\twhile($counter2 > -1) {\r\n\t\t\t\t\t\t\t//print('here183945606069<br>');\r\n\t\t\t\t\t\t\t$strpos_close_div = $close_div_matches[0][$counter2][1];\r\n\t\t\t\t\t\t\t$counter2--;\r\n\t\t\t\t\t\t\tif($strpos_close_div > $strpos_open_div) {\r\n\t\t\t\t\t\t\t\t$counter1--;\r\n\t\t\t\t\t\t\t\tcontinue 2;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$strpos_content_div = $strpos_open_div;\r\n\t\t\t\t\t\t\t\t$found_content_div = true;\r\n\t\t\t\t\t\t\t\tbreak 2;\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$counter1--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!$found_content_div) {\r\n\t\t\t\t//print('here347459475948761<br>');\r\n\t\t\t} else {\r\n\t\t\t\t//print('here347459475948762<br>');\r\n\t\t\t\t//$strpos_content_div = ReTidy::strpos_last(substr($code, 0, $h1_strpos), '<div');\r\n\t\t\t\t$content_div_code = OM::getOString($code, '<div', '</div>', $strpos_content_div);\r\n\t\t\t\t//print('$content_div_code: ');var_dump($content_div_code);\r\n\t\t\t\t$strlen_opening_content_div = strpos($content_div_code, '>') + 1;\r\n\t\t\t\t$content = substr($content_div_code, $strlen_opening_content_div, strlen($content_div_code) - $strlen_opening_content_div - 6);\r\n\t\t\t\t/*print('XXX9o9beep39o9XXX\r\n');\r\n\t\t\t\tprint('$content (div-wise): ' . $content);\r\n\t\t\t\tprint('\r\nXXX9o9beep49o9XXX\r\n\t\t\t\t');*/\r\n\t\t\t\t$content_offset = $strpos_content_div + $strlen_opening_content_div;\r\n\t\t\t\t$get_content_more_crudely = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($get_content_more_crudely) {\r\n\t\t\t//print('here347459475948763<br>');\r\n\t\t\t$body = OM::getOString($code, '<body', '</body>');\r\n\t\t\tif(strlen($body) === 0) {\r\n\t\t\t\t//print('here347459475948764<br>');\r\n\t\t\t\t//if($h1_strpos === false) {\r\n\t\t\t\tif(!$found_h1) {\r\n\t\t\t\t\t//return $code; // we return the unchanged code\r\n\t\t\t\t\t//ReTidy::fatal_error('did not find the &lt;body&gt; of the document or it has zero length');exit(0);\r\n\t\t\t\t\t$strpos_last_meta = ReTidy::strpos_last($code, '<meta');\r\n\t\t\t\t\t$content_offset = $strpos_last_meta + strpos($code, '>', $strpos_last_meta);\r\n\t\t\t\t\t$content = substr($code, $content_offset);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$content_offset = $h1_strpos;\r\n\t\t\t\t\t$content = substr($code, $h1_strpos);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t//print('here347459475948765<br>');\r\n\t\t\t\t$body_offset = strpos($code, '<body');\r\n\t\t\t\tpreg_match('/<body[^<>]*?>/is', $body, $opening_body_tag_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\t$opening_body_tag = $opening_body_tag_matches[0][0];\r\n\t\t\t\t$strlen_opening_body_tag = strlen($opening_body_tag);\r\n\t\t\t\t$content = substr($body, $strlen_opening_body_tag, strlen($body) - $strlen_opening_body_tag - 7);\r\n\t\t\t\t$content_offset = $body_offset + $opening_body_tag_matches[0][1] + $strlen_opening_body_tag;\r\n\t\t\t\t//$cleaned_content = $content;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/*\r\n\t\t// content; in this generalized templater order, attempts at grabbing the content are from the more specific to the more general\r\n\t\t$opening_content_div = '<div id=\"cn-centre-col-inner\">';\r\n\t\t$strpos_content_div = strpos($code, $opening_content_div);\r\n\t\tif($strpos_content_div !== false) {\r\n\t\t\t$content_div_code = OM::getOString($code, '<div', '</div>', $strpos_content_div);\r\n\t\t\t$strlen_opening_content_div = strlen($opening_content_div);\r\n\t\t\t$content = substr($content_div_code, $strlen_opening_content_div, strlen($content_div_code) - $strlen_opening_content_div - 6);\r\n\t\t\t$content_offset = $strpos_content_div + $strlen_opening_content_div;\r\n\t\t\t//print($content);exit(0);\r\n\t\t\t// call the end of content comment comment part of the content container rather than the content itself...\r\n\t\t\t// treating the open and close differently and possibly leaving us open to future problems...\r\n\t\t\t//$pos_close_content_comment = strpos($content, '<!-- clf2-nsi2 theme ends / Fin du thème clf2-nsi2 -->');\r\n\t\t\t//if($pos_close_content_comment !== false) {\r\n\t\t\t//\t$content = substr($content, 0, $pos_close_content_comment);\r\n\t\t\t//}\r\n\t\t\t//print($content);exit(0);\r\n\t\t\tif($strip_template_content_comments) {\r\n\t\t\t\t// remove template comments from the beginning of the content\r\n\t\t\t\t$cleaned_content = $content;\r\n\t\t\t\t$cleaned_content = str_replace('<!-- Content title begins / Début du titre du contenu -->', '', $cleaned_content);\r\n\t\t\t\t$cleaned_content = str_replace('<!-- Content Title ends / Fin du titre du contenu -->', '', $cleaned_content);\r\n\t\t\t\t$cleaned_content = str_replace('<!-- clf2-nsi2 theme begins / Début du thème clf2-nsi2 -->', '', $cleaned_content);\r\n\t\t\t\t// remove template comments from the end of the content?\r\n\t\t\t\t$cleaned_content = str_replace('<!-- clf2-nsi2 theme ends / Fin du thème clf2-nsi2 -->', '', $cleaned_content);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$opening_content_div = '<div class=\"center\">';\r\n\t\t\t$strpos_content_div = strpos($code, $opening_content_div);\r\n\t\t\tif($strpos_content_div !== false) {\r\n\t\t\t\t$content_div_code = OM::getOString($code, '<div', '</div>', $strpos_content_div);\r\n\t\t\t\t$strlen_opening_content_div = strlen($opening_content_div);\r\n\t\t\t\t$content = substr($content_div_code, $strlen_opening_content_div, strlen($content_div_code) - $strlen_opening_content_div - 6);\r\n\t\t\t\t$content_offset = $strpos_content_div + $strlen_opening_content_div;\r\n\t\t\t\tif($strip_template_content_comments) {\r\n\t\t\t\t\t// remove template comments from the beginning of the content\r\n\t\t\t\t\t$cleaned_content = $content;\r\n\t\t\t\t\t$cleaned_content = str_replace('<!-- CONTENT TITLE BEGINS | DEBUT DU TITRE DU CONTENU -->', '', $cleaned_content);\r\n\t\t\t\t\t$cleaned_content = str_replace('<!-- CONTENT TITLE ENDS | FIN DU TITRE DU CONTENU -->', '', $cleaned_content);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$body = OM::getOString($code, '<body', '</body>');\r\n\t\t\t\tif(strlen($body) === 0) {\r\n\t\t\t\t\t//return $code; // we return the unchanged code\r\n\t\t\t\t\tReTidy::fatal_error('did not find the &lt;body&gt; of the document or it has zero length');exit(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpreg_match('/<body[^<>]*?>/is', $body, $opening_body_tag_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\t\t$opening_body_tag = $opening_body_tag_matches[0][0];\r\n\t\t\t\t\t$strlen_opening_body_tag = strlen($opening_body_tag);\r\n\t\t\t\t\t$content = substr($body, $strlen_opening_body_tag, strlen($body) - $strlen_opening_body_tag - 7);\r\n\t\t\t\t\t$content_offset = $opening_body_tag_matches[0][1] + $strlen_opening_body_tag;\r\n\t\t\t\t\t$cleaned_content = $content;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}*/\r\n\t\t// force every document to have an h1 and force the h1 to be at the start of the content\r\n\t\t//print('$h1_including_tag1: ' . $h1_including_tag);\r\n\t\t//print('$h1_previous_tag_name: ');var_dump($h1_previous_tag_name);\r\n\t\t//print('content_in_templating1: ' . $content);\r\n\t\tif(!$found_h1) {\r\n\t\t\t$h1_including_tag = '<h1>Dummy h1</h1>';\r\n\t\t\t$added_h1_length = strlen($h1_including_tag);\r\n\t\t\t$h1_previous_tag_name = 'h1';\r\n\t\t\t//$h1_strpos = $content_offset + 4;\r\n\t\t} else {\r\n\t\t\t$added_h1_length = 0;\r\n\t\t\t// cutting the h1 out\r\n\t\t\t//$content = substr($content, 0, $h1_strpos) . substr($content, $h1_strpos + strlen($h1_including_tag));\r\n\t\t\t//$content = substr($code, $content_offset, $h1_strpos) . substr($code, $h1_strpos + strlen($h1_including_tag), strlen($code) - $content_offset - ($h1_strpos + strlen($h1_including_tag)) - strlen(substr($code, $content_offset + strlen($content))));\r\n\t\t\t//$content = substr($code, $content_offset, $h1_strpos) . substr($code, $h1_strpos + strlen($h1_including_tag));\r\n\t\t\t$length_of_after_content = strlen($code) - $content_offset - strlen($content);\r\n\t\t\t$length_of_after_h1_including_tag = strlen($code) - ($h1_strpos + strlen($h1_including_tag));\r\n\t\t\t//print('after_content: ' . substr($code, $content_offset + strlen($content)));\r\n\t\t\t//print('after_h1_including_tag : ' . substr($code, $h1_strpos + strlen($h1_including_tag)));\r\n\t\t\t//$length_of_after_content = strlen(substr($code, $content_offset + strlen($content)));\r\n\t\t\t//$length_of_after_h1_including_tag = strlen(substr($code, $h1_strpos + strlen($h1_including_tag)));\r\n\t\t\t//print('substr($code, $content_offset, $h1_strpos - $content_offset) : ' . substr($code, $content_offset, $h1_strpos - $content_offset) );\r\n\t\t\t//print('substr($code, $h1_strpos + strlen($h1_including_tag), $length_of_after_h1_including_tag - $length_of_after_content) : ' . substr($code, $h1_strpos + strlen($h1_including_tag), $length_of_after_h1_including_tag - $length_of_after_content));\r\n\t\t\t$content = substr($code, $content_offset, $h1_strpos - $content_offset) . substr($code, $h1_strpos + strlen($h1_including_tag), $length_of_after_h1_including_tag - $length_of_after_content);\r\n\t\t}\r\n\t\t//print('substr($code, $h1_strpos, strlen($h1_including_tag)): ' . substr($code, $h1_strpos, strlen($h1_including_tag)));\r\n\t\t//print('$content in templating2: ');ReTidy::var_dump_full($content);\r\n\t\t$h1_including_tag = str_replace('<' . $h1_previous_tag_name, '<h1', $h1_including_tag);\r\n\t\t$h1_including_tag = str_replace('</' . $h1_previous_tag_name . '>', '</h1>', $h1_including_tag);\r\n\t\t$length_adjustment_due_to_previous_tag_name = 2 * (strlen('h1') - strlen($h1_previous_tag_name));\r\n\t\t//print('$h1_including_tag2: ' . $h1_including_tag);\r\n\t\t$content = $h1_including_tag . $content;\r\n\t\t//print('$content: ');var_dump($content);\r\n\t\t//print('$code2: ' . htmlentities($code));\r\n\t\t//print('content_in_templating3: ' . $content);\r\n\t\t//print('$code, $content_offset, $content: ');ReTidy::var_dump_full($code, $content_offset, $content);\r\n\t\t$code = substr($code, 0, $content_offset) . $content . substr($code, $content_offset + strlen($content) - $length_adjustment_due_to_previous_tag_name - $added_h1_length);\r\n\t\t// 2017-10-05\r\n\t\t// 2018-07-25; previously it was unclear why -2, but frequently we are converting a <p> to an <h1> making a difference in length of 2\r\n\t\t//$code = substr($code, 0, $content_offset) . $content . substr($code, $content_offset + strlen($content));\r\n\t\t//print('$code3: ' . htmlentities($code));\r\n\t\t// h1 inside the content\r\n\t//\tif(!$inventing_h1) {\r\n\t\t\tpreg_match('/<h1[^<>]*?>(.*?)<\\/h1>/is', $content, $h1_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t$h1 = $h1_matches[1][0];\r\n\t//\t} else {\r\n\t\t\t//print('should never get here...3489573495873');exit(0);\r\n\t\t\t//$h1 = $h1_matches[2][0];\r\n\t//\t\t$h1 = $possible_heading_content;\r\n\t//\t}\r\n\t\t// remove anchors and comments from the h1; if they are required, then the new versions should exist in the template\r\n\t\t$cleaned_h1 = $h1;\r\n\t\t$cleaned_h1 = preg_replace('/<a [^<>]*?>/is', '', $cleaned_h1);\r\n\t\t$cleaned_h1 = preg_replace('/<!--[^<>]*?-->/is', '', $cleaned_h1);\r\n\t\t$cleaned_h1 = str_replace('</a>', '', $cleaned_h1);\r\n\t\t$h1_offset = $content_offset + $h1_matches[1][1];\r\n\t\t// exclude the <h1> from the content for the purposes of templating\r\n\t\t//$content = substr($content, $h1_matches[0][1] + strlen($h1_matches[0][0]));\r\n\t\t//$content = str_replace($h1_matches[0][0], '', $content); // not good enough\r\n\t\t$content = substr($content, $h1_matches[0][1] + strlen($h1_matches[0][0]));\r\n\t\t//print('content_in_templating4: ' . $content);\r\n\t\t$content_offset += $h1_matches[0][1] + strlen($h1_matches[0][0]); \r\n\t\t// exclude the date modified from the content for the purposes of templating\r\n\t\t// this is very specific so we might need to have date modified detection similar to what's in the templateCode function (around line 600)\r\n\t\tif(preg_match('/<dl[^<>]*?>\\s*<dt>(Date modified:|Date de modification&#160;:)<\\/dt>\\s*<dd>\\s*<span>\\s*<time>([^<>]*?)<\\/time>\\s*<\\/span>\\s*<\\/dd>\\s*<\\/dl>/is', $content, $date_modified_matches, PREG_OFFSET_CAPTURE)) {\r\n\t\t\t//var_dump($date_modified_matches);\r\n\t\t\t$content = substr($content, 0, $date_modified_matches[0][1]);\r\n\t\t}\r\n\t\t//print('content_in_templating5: ' . $content);\r\n\t\t$cleaned_content = $content;\r\n\t\t//print('$cleaned_content1: ' . $cleaned_content);\r\n\t\t$array_content_comments_to_remove = array(\r\n\t\t'<!-- Content title begins / Début du titre du contenu -->',\r\n\t\t'<!-- Content Title ends / Fin du titre du contenu -->',\r\n\t\t'<!-- clf2-nsi2 theme begins / Début du thème clf2-nsi2 -->',\r\n\t\t'<!-- clf2-nsi2 theme ends / Fin du thème clf2-nsi2 -->',\r\n\t\t'<!-- CONTENT TITLE BEGINS | DEBUT DU TITRE DU CONTENU -->',\r\n\t\t'<!-- CONTENT TITLE ENDS | FIN DU TITRE DU CONTENU -->',\r\n\t\t'<!-- InstanceEndEditable -->',\r\n\t\t);\r\n\t\tforeach($array_content_comments_to_remove as $index => $value) {\r\n\t\t\t$cleaned_content = str_replace($value, '', $cleaned_content);\r\n\t\t}\r\n\t\t//print('$cleaned_content2: ' . $cleaned_content);\r\n\t\t$array_regex_content_comments_to_remove = array(\r\n\t\t'<!-- InstanceBeginEditable name=\"[^\"]*?\" -->',\r\n\t\t);\r\n\t\tforeach($array_regex_content_comments_to_remove as $index => $value) {\r\n\t\t\t$cleaned_content = preg_replace('/' . $value . '/is', '', $cleaned_content);\r\n\t\t}\r\n\t\t//print('ContentArray\t: ');var_dump(array($content, $content_offset, $cleaned_content, $h1, $h1_offset, $cleaned_h1));\r\n\t\t//print('$cleaned_content3: ' . $cleaned_content);\r\n\t\t//print('$code in getContentArray: ' . $code);\r\n\t\treturn array($code, $content, $content_offset, $cleaned_content, $h1, $h1_offset, $cleaned_h1);\r\n\t}" ]
[ "0.6427461", "0.60419255", "0.57956725", "0.578238", "0.5765474", "0.566768", "0.5621621", "0.5544791", "0.55408204", "0.55038816", "0.54350394", "0.5409676", "0.53653896", "0.53606236", "0.53169423", "0.5308249", "0.52842766", "0.52663875", "0.52411413", "0.52371067", "0.52225554", "0.521442", "0.52014464", "0.5194661", "0.5191687", "0.51666605", "0.5114228", "0.5084376", "0.50830513", "0.5065327", "0.5064338", "0.506", "0.50596964", "0.50454116", "0.5041646", "0.50370795", "0.5005664", "0.5001096", "0.4972882", "0.49719137", "0.49652058", "0.49585414", "0.49392033", "0.4934484", "0.49302876", "0.49290228", "0.4925372", "0.49245992", "0.49176288", "0.49000365", "0.48858145", "0.48847106", "0.48839843", "0.4866008", "0.48446867", "0.48439407", "0.48321775", "0.4807373", "0.4798282", "0.47963524", "0.47943875", "0.47833213", "0.4780403", "0.47728318", "0.47705182", "0.47698605", "0.47691795", "0.47528023", "0.47456434", "0.47422078", "0.47351485", "0.47350642", "0.47280088", "0.4712183", "0.47086054", "0.47009024", "0.46977493", "0.46907106", "0.46907106", "0.4686482", "0.46785873", "0.4677412", "0.46726277", "0.46660215", "0.46508783", "0.46479738", "0.46423414", "0.46405286", "0.46404183", "0.46399784", "0.46380353", "0.4636525", "0.4633457", "0.46303424", "0.46303424", "0.46303424", "0.46292275", "0.46254876", "0.46137613", "0.460998" ]
0.6926826
0
Find specific slide layout id.
public function findLayoutId($name = '', $masterId = 1) { foreach ($this->layouts as $layoutId => $layout) { if ($layout['name'] == $name && $layout['masterid'] == $masterId) { return $layoutId; } } throw new \Exception("Could not find slide layout $name in current layout pack."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findLayout($name = '', $masterId = 1)\r\n {\r\n foreach ($this->layouts as $layout) {\r\n if ($layout['name'] == $name && $layout['masterid'] == $masterId) {\r\n return $layout;\r\n }\r\n }\r\n\r\n throw new \\Exception(\"Could not find slide layout $name in current layout pack.\");\r\n }", "public function get_layout_id()\n\t{\n\t\treturn $this->_layout_id;\n\t}", "public function get_layout($id)\n\t{\n\t\treturn $this->get_single($id);\n\t}", "public function getLayoutById($id) {\n try {\n $client = new Zend_Soap_Client($this->LAYOUT_WSDL_URI);\n $options = array('soap_version' => SOAP_1_1,\n 'encoding' => 'ISO-8859-1',\n );\n $client->setOptions($options);\n $client->action = 'findByLayoutId';\n $result = $client->findByLayoutId($id);\n return $result;\n } catch (Exception $e) {\n //return false;\n }\n }", "protected function getLayout($id='default'){\n\t\tinclude($this->layoutsPath.'/'.$id.'.php');\n\t}", "function getLayout($id){\r\n \r\n $transform = ucfirst(str_replace('-', \"_\", $id));\r\n $layout_name = \"\\\\LK\\PXEdit\\\\Layouts\\\\\" . $transform;\r\n \r\n // Force an Autoload\r\n \\PXEdit_Autoload($layout_name);\r\n \r\n if(!class_exists($layout_name)){\r\n $this ->sendError('Layout ' . $layout_name . \" is not existing.\");\r\n } \r\n \r\n $layout = new $layout_name();\r\n return $layout;\r\n }", "function findRef_layout($content, $spParams) {\n\t\treturn $this->getSoftrefTable('tx_kbnescefe_layout', $content);\n\t}", "protected function getRandomLayout(): string {\n\t\t$key = array_rand($this->layouts);\n\t\t\n\t\treturn $this->layouts[$key];\n\t}", "public function getLayout() {\n\n return $this->asset_array['default']['layout']['name'];\n }", "public function getLayoutId(): UuidInterface\n {\n return $this->layoutId;\n }", "protected function findLayout($action)\n {\n foreach ($this->layouts as $layout => $actions) {\n if (in_array($action, $actions, true)) {\n return $layout;\n }\n }\n return false;\n }", "function layout_first()\n { \n foreach (func_get_args() as $name) {\n if(! empty($name) && $layout = the_layout($name)) {\n return $layout;\n }\n } \n\n $error = 'Not Found Layout(s) '. collect(func_get_args())->filter()->implode(', ') . '.';\n\n return abort(500, $error);\n }", "public function getLayout()\n\t{\n\t\t$input = JFactory::getApplication()->input;\n\t\treturn $input->getCmd('tmpl') ? $input->getCmd('tmpl') : $this->getParam('mainlayout', 'default');\n\t}", "public function getLayout();", "public function getFieldLayoutId(): int\n {\n if (is_int($this->_fieldLayoutId)) {\n return $this->_fieldLayoutId;\n }\n\n if ($this->idAttribute !== null) {\n $id = $this->owner->{$this->idAttribute};\n } else if (is_callable($this->_fieldLayoutId)) {\n $id = call_user_func($this->_fieldLayoutId);\n } else if (is_string($this->_fieldLayoutId)) {\n $id = $this->owner->{$this->_fieldLayoutId}();\n }\n\n if (!isset($id) || !is_numeric($id)) {\n throw new InvalidConfigException('Unable to determine the field layout ID for ' . get_class($this->owner) . '.');\n }\n\n return $this->_fieldLayoutId = (int)$id;\n }", "public function get_layout ( $layout_name )\n {\n $layouts = $this->get_layouts();\n\n if ( isset( $layouts[$layout_name] ) /* @perf array_key_exists( $layout_name, $layouts ) */ )\n {\n return $layouts[ $layout_name ];\n }\n\n throw new \\Exception( 'No layout exists with the name \"' . $layout_name . '\"' );\n }", "private function sectionIDbyName( $name )\n {\n $sectionID = false;\n $sectionList = eZSection::fetchFilteredList( array( 'name' => $name ), false, false, true );\n if( is_array( $sectionList ) && count( $sectionList ) > 0 )\n {\n $section = $sectionList[0];\n if( is_object( $section ) )\n {\n $sectionID = $section->attribute( 'id' );\n }\n }\n return $sectionID;\n }", "public function getLayoutName()\n {\n return $this->layout;\n }", "function layout(string $layout)\n {\n return the_layout($layout);\n }", "protected function getComponentId(): string {\n if ($this->isPageTemplate()) {\n return \"{$this->layout}-{$this->post->post_type}\";\n }\n\n if (str_contains($this->layout, '-')) {\n return implode('-', \\__::chain($this->layout)\n ->split('-')\n ->map(fn ($string) => \\__::lowerCase($string))\n ->value());\n }\n\n return \\__::lowerCase($this->layout);\n }", "public function get_layout( $layout_id = '' ) {\n // Globals\n\t\tglobal $wpdb;\n \n try {\n // Layout ID is not optional\n if( @$layout_id != '' ) {\n $layout_id = sanitize_text_field( $layout_id );\n } else {\n throw new Exception( 'Layout ID is required.' );\n }\n \n // Get the layout from the database\n $sql = \"SELECT * FROM `\" . rpids_tableprefix() . \"rpids_layouts` WHERE `id` = '\" . $layout_id . \"';\";\n $layout = $wpdb->get_row( $sql, ARRAY_A );\n \n // Make sure we found something\n if( $layout == null ) {\n // Nope\n throw new Exception( 'Layout not found.' );\n } else {\n // Got it! Put it in an object.\n $return = new StdClass();\n $return->status = 'success';\n $return->id = $layout['id'];\n $return->name = $layout['name'];\n $return->description = $layout['description'];\n $return->type = $layout['type'];\n $return->width = $layout['width'];\n $return->height = $layout['height'];\n $return->bgimage = $layout['bgimage'];\n $return->bgimagetype = $layout['bgimagetype'];\n $return->bgcolor = $layout['bgcolor'];\n $return->startimage = $layout['startimage'];\n $return->items = (object) unserialize( $layout['items'] );\n $return->lastmodified = $layout['lastmodified'];\n \n // Return it!\n return $return;\n }\n } catch ( Exception $e ) {\n return (object) array(\n\t\t\t\t\"status\" => \"error\",\n\t\t\t\t\"message\" => $e->getMessage()\n\t\t\t);\n }\n }", "public function getLayout(): string;", "public function getLayout() {}", "public function fetchSlide($id)\n\t{\n \tif ($id != NULL && is_numeric($id)) :\n\t $select = $this->registry->db->select()\n \t ->from(array('s' => 'rotators_slides'))\n \t ->where('s.rots_id = ?', $id)\n \t ->limit(1,0);\n\n\t\t $slide = $this->registry->db->fetchall($select);\n return $slide['0'];\n else :\n throw new Exception('Invalid slide id');\n endif;\n\t}", "function pi_get_content_layout()\n{\n return piBlogCustomize::pi_refresh_in_customize('pi_options[content][layout]') ? piBlogCustomize::pi_refresh_in_customize('pi_options[content][layout]') : piBlogFramework::$piOptions['content']['layout'];\n}", "function layout_hint_key(string $layout)\n {\n return \"layout-{$layout}\";\n }", "private function getPageId()\n {\n return $this->getRequest()->getParam('id') ?: $this->getRequest()->getParam('page_id');\n }", "public function getLayoutName()\n\t{\n\t\treturn $this->layout_name;\n\t}", "public function getPresentationById($id)\n\t{\n\t\treturn $this->find((int) $id)->current();\n\t}", "protected function determinePageId() {}", "protected function determinePageId() {}", "public static function get_layoutsByCode($code){\n // Split code into x / y\n $split = explode('x', $code);\n $x = $split[0];\n $y = $split[1];\n\n // Search DB for specific layout matching x and y\n $layout = DB::table('quotation_layouts')->where('size_x', '=', $x)->where('size_y', '=', $y)->get();\n\n if($layout != null && sizeof($layout)){\n // BY default DB data is in an array, we want the first array. There should never be an instance where there is multiple data returned as the code should be unique\n $layout = $layout[0];\n $layout->formatted_cost = $layout->cost == '' ? '' : '&pound;' . number_format($layout->cost,2);\n return $layout;\n }\n\n return false;\n }", "function yt_bbpres_site_layout( $current_layout ){\r\n\tif( yt_is_bbpress() )\r\n\t\treturn 'right-sidebar';\r\n\r\n\treturn $current_layout;\r\n}", "function wprt_layout_position() {\n\t// Default layout position\n\t$layout = 'sidebar-right';\n\n\t// Get layout position for site\n\t$layout = wprt_get_mod( 'site_layout_position', 'sidebar-right' );\n\n\t// Get layout position for single post\n\tif ( is_singular( 'post' ) )\n\t\t$layout = wprt_get_mod('single_post_layout_position', 'sidebar-right');\n\n\t// Single post/page can have custom layout position\n\tif ( is_singular() && wprt_metabox('page_layout') )\n\t\t$layout = wprt_metabox('page_layout');\n\n\t// Get layout position for shop pages\n\tif ( class_exists( 'woocommerce' ) ) {\n\t\tif ( is_shop() || is_product_category() ) $layout = wprt_get_mod('shop_layout_position', 'no-sidebar'); \n\t\tif ( is_singular( 'product' ) ) $layout = wprt_get_mod('shop_single_layout_position', 'no-sidebar');\n\t}\n\n\treturn $layout;\n}", "function fetchSectionIDFromHandle($handle){\n\t\t\t$handle = Lang::createHandle($handle);\n\n\t\t\treturn $this->_db->fetchVar('id', 0, \"SELECT `id` FROM `tbl_sections` WHERE `handle` = '\".$handle.\"' LIMIT 1\");\n\t\t}", "function ID($id)\n {\n if (false !== $ctrl = \\ClickBlocks\\MVC\\Page::$current->view->get($id)) return $ctrl->attr('id');\n }", "public static function key_layout($str) {\n\t\treturn 'layout_' . self::key($str);\n\t}", "public function findLayoutZoneByLayoutAndZone($layout, $zone)\n {\n $layoutZones = $this->getCachedLayoutZone();\n $layout = (int) $layout;\n $zone = (int) $zone;\n if (empty($layoutZones[$layout][$zone])) {\n \n return 0;\n }\n\n return $layoutZones[$layout][$zone];\n }", "function findPageId($name){\n $conditions = array('Content.type' => 'pages',\n 'Content.status' => 'published',\n 'Content.title' => $name,\n \n );\n $result = $this->find('first', array('conditions' => $conditions, 'fields' => 'Content.id'));\n if(!empty($result)){\n\t\t\t\treturn $result;\n }else{\n\t\t\t\treturn false;\n\t\t\t}\n }", "protected function getLayoutSlideRequest(Requests\\GetLayoutSlideRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling getLayoutSlide');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling getLayoutSlide');\n }\n\n $resourcePath = '/slides/{name}/layoutSlides/{slideIndex}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'GET');\n }", "private function getParamICalHelpArticleId()\n {\n $iCalHelpArticleId = JComponentHelper::getParams('com_events')\n ->get( 'iCalHelpArticleId', 0 );\n return (int)$iCalHelpArticleId;\n }", "public function getLayout(){\n\n return $this->layout;\n\n }", "protected function getWidgetId()\n {\n return !empty($_GET['wid']) ? $_GET['wid'] : 'rrf';\n }", "public function pId()\n {\n static $id = null;\n\n if (!is_null($id)) {\n return $id;\n }\n\n $id = $this->property('id');\n\n if (strpos($id, 'http') === 0) {\n $path = explode('/', parse_url($id, PHP_URL_PATH));\n\n if ($path[1] == 'gallery') {\n $id = $path[2];\n }\n elseif ($path[1] == 'a') {\n $id = 'a/'.$path[2];\n }\n else {\n $id = $path[1];\n }\n }\n\n return $id;\n }", "protected function getLayout()\n {\n return $this->layout;\n }", "protected function getLayout()\n {\n return $this->layout;\n }", "public function getExportLayoutName(){\n\t\t\n\t\t$this->validateInited();\n\t\t\n\t\t$parentID = $this->post->post_parent;\n\t\t\n\t\t$prefix = \"template\";\n\t\t\n\t\t$layoutName = $prefix;\n\t\tif(!empty($parentID))\n\t\t\t$layoutName .= \"_\". $this->getPostBaseName($parentID);\n\t\t\n\t\t$layoutName .= \"_\".$this->getPostBaseName($this->id);\n\t\t\n\t\t$layoutName = HelperUC::convertTitleToHandle($layoutName);\n\n\t\treturn($layoutName);\n\t}", "function zeen_get_article_layout_skin( $pid = '' ) {\n\n\t$output = get_post_meta( $pid, 'zeen_article_layout_skin', true ) == 'on' ? 2 : 1;\n\treturn $output;\n}", "public function getViewId();", "public function layout($name = null) {\n\t\t$request = $this->container->get('request');\n\t\tif (!is_null($name) && $this->container->hasParameter('oxygen_framework.templating.layouts.'.$name)) {\n\t\t\treturn $this->container->getParameter('oxygen_framework.templating.layouts.'.$name);\n\t\t}\n\t\tif ($request->isXmlHttpRequest() && $this->container->hasParameter('oxygen_framework.templating.layouts.light')) {\n\t\t\treturn $this->container->getParameter('oxygen_framework.templating.layouts.light');\n\t\t} elseif ($this->container->hasParameter('oxygen_framework.templating.layouts.full')) {\n\t\t\treturn $this->container->getParameter('oxygen_framework.templating.layouts.full');\n\t\t}\n\t\tthrow new \\Exception(\"Layout undefined in oxygen_framework configuration\");\n\t}", "public static function getLayout()\n {\n return self::$layout;\n }", "function happy_post_layout_one_column( $layout ) {\n\treturn 'layout-1c';\n}", "abstract protected function determinePageId() ;", "public function mapPage($selectedLayoutId) {\n try {\n $client = new SoapClient($this->LAYOUT_WSDL_URI);\n $res = $client->findByLayoutId($selectedLayoutId);\n return $res;\n } catch (Zend_Exception $e) {\n var_dump($e);\n }\n }", "function fetchId($name)\n {\n //return $this->_parent->_name.'-'.\"popup-$name[1]\";\n return $this->_parent->getName().'-'.\"popup-$name[1]\";\n }", "function fetchFieldIDFromElementName($element_name, $section_id=NULL){\n\t\t\treturn $this->_Parent->Database->fetchVar('id', 0, \"SELECT `id` FROM `tbl_fields` WHERE `element_name` = '$element_name' \".($section_id ? \" AND `parent_section` = '$section_id' \" : '').\" LIMIT 1\");\n\t\t}", "protected function getLayout() {\n\t\treturn $this->getFrontcontroller()->getResource('layout');\n\t}", "function getId() {\n\t\treturn $this->getData('sectionDecisionId');\r\n\t}", "public function layout() {\n return $this->layout;\n }", "protected function getWrapperId()\r\n {\r\n return self::$ID_WRAPPER;\r\n }", "public function getLayout() {\n \t\n \t// Return the current layout\n \treturn $this->sLayout;\n }", "public function get_id_by_slug( $name = false ){\n\n\t\tif( $name ){\n\t\t\tglobal $wpdb;\n\n\t\t\t$query = $wpdb->prepare( \"SELECT ID FROM {$wpdb->posts} WHERE post_status = 'publish' AND post_type = 'wp_simple_flexslider' AND post_title = %s\", $name );\n\n\t\t\t$post = $wpdb->get_row( $query );\n\n\t\t\tif( isset( $post->ID ) ){\n\n\t\t\t\treturn $post->ID;\n\n\t\t\t} else {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getLayout(){\n return $this->_layout;\n }", "public function sel_next_playlist_id()\n\t{\n\t\t$playlist_id = null;\n\t\ttry{\n\t\t\t$t_playlist = new Model_T_Playlist($this->db, $this->client_id);\n\t\t\t$playlist_id = $t_playlist->sel_next_id();\n\t\t} catch(Exception $e){\n\t\t\tKohana::$log->add(Log::ERROR, Kohana_Exception::text($e))->write();\n\t\t\t$playlist_id = null;\n\t\t}\n\t\treturn $playlist_id;\n\t}", "function layout_path($layout = '')\n { \n return extension_path(\"layouts\").($layout ? DS.$layout : $layout);\n }", "function getLayout() {return $this->readLayout();}", "function ts_get_single_post_sidebar_id($position, $default = 'main')\r\n{\r\n\t$sidebar = get_post_meta(ts_get_current_id(), $position,true);\r\n\tif (empty($sidebar))\r\n\t{\r\n\t\t$sidebar = $default;\r\n\t}\r\n\treturn $sidebar;\r\n}", "public function getLayout($id)\n {\n if (!$this->_layoutsInitialized) {\n $this->_initLayout($id);\n }\n if (!isset($this->_layouts[$id])) {\n throw new Exception(__d('wasabi_cms', 'Layout \"{0}\" for theme \"{1}\" does not exist.', $id, $this->id()));\n }\n\n return $this->_layouts[$id];\n }", "public function getLayout()\n {\n return $this->layout;\n }", "public function getLayout()\n {\n return $this->layout;\n }", "public function getLayout()\n {\n return $this->layout;\n }", "protected function getSectionId():int\n {\n $secRes = SectionTable::getList([\n \"filter\" => [\n \"IBLOCK_ID\" => $this->iblockId,\n \"DEPTH_LEVEL\" => 2\n ],\n \"select\" => [\"ID\"]\n ]);\n while($sectionFields = $secRes->fetch())\n $sections[] = (int) $sectionFields[\"ID\"];\n $rndKey = array_rand($sections, 1);\n $sectionId = (int) $sections[$rndKey];\n return $sectionId;\n }", "public function get_theme_layout ($layout_slug='') {\r\n\t\tif (empty($layout_slug)) return '';\r\n\r\n\t\t$filenames = array(\r\n\t\t\t'layouts/index-' . $layout_slug . '.php',\r\n\t\t\t'layouts/' . $layout_slug . '.php',\r\n\t\t);\r\n\t\treturn function_exists('upfront_locate_template')\r\n\t\t\t? upfront_locate_template($filenames)\r\n\t\t\t: locate_template($filenames)\r\n\t\t;\r\n\t}", "public function getEditingThemeId()\n {\n $theme = \\Phpfox::model('layout_theme')\n ->select()\n ->where('is_editing=?', 1)\n ->first();\n\n if (!empty($theme)) {\n return $theme->getId();\n }\n\n return 'default';\n }", "public function getIdByName($name) {\n $id = $this->db->queryToSingleValue(\n \t\"select \n \t\tid\n from \n \tOvalSourceDef \n where\n \tname='\".mysql_real_escape_string($name).\"'\");\n if ($id == null) {\n return -1;\n }\n return $id;\n }", "public function initByID($id){\n\t\t\n\t\tif($id === \"current_post\"){\n\t\t\t$id = null;\n\t\t\t$post = get_post();\n\t\t\tif(empty($post))\n\t\t\t\tUniteFunctionsUC::throwError(\"Current post not found\");\n\t\t\t\n\t\t\t$this->id = $post->ID;\n\t\t\t\n\t\t}else{\n\t\t\t$id = (int)$id;\n\t\t\tif(empty($id))\n\t\t\t\tUniteFunctionsUC::throwError(\"Empty layout ID\");\n\t\t\t\n\t\t\t$post = @get_post($id);\n\t\t\tif(empty($post))\n\t\t\t\tUniteFunctionsUC::throwError(\"layout with id: $id not found\");\n\t\t\t\n\t\t\t$this->id = $id;\n\t\t}\n\t\t\n\t\t\n\t\t$this->initByPost($post);\n\t}", "public function getNavigationId()\n {\n $action = $this->params()->fromRoute('action');\n\n switch ($action) {\n case 'add':\n $licence = $this->params()->fromRoute('licence');\n $application = $this->params()->fromRoute('application');\n $transportManager = $this->params()->fromRoute('transportManager');\n\n if ($licence) {\n return 'case';\n }\n\n if ($transportManager) {\n return 'transport_managers';\n }\n\n if ($application) {\n return 'application';\n }\n // Missing break is intentional\n default:\n return null;\n }\n }", "public function getLayoutSetting($name, $default = null)\n\t{\n\t\treturn isset($this->_layoutsettings) ? $this->_layoutsettings->get($name, $default) : $default;\n\t}", "public function getLayout() {\n\t\treturn $this->layout;\n\t}", "public function getLayoutVar($varName) {\n if (isset($this->layoutVars[$varName])) {\n return $this->layoutVars[$varName];\n } else {\n return null;\n }\n }", "function get_slide($slide_id)\r\n {\r\n $slide = $this->db->query(\"\r\n SELECT\r\n *\r\n\r\n FROM\r\n `slide`\r\n\r\n WHERE\r\n `slide_id` = ?\r\n \",array($slide_id))->row_array();\r\n\r\n return $slide;\r\n }", "protected function getLayout($default = null)\n\t{\n\t\tif ($default)\n\t\t\treturn 'reservation';\n\n\t\t$jinput = JFactory::getApplication()->input;\n\n\t\treturn $jinput->get('layout', 'reservation', 'CMD');\n\t}", "public function id()\n\t{\n\t\treturn $this->SqueezePlyrID ;\n\t}", "function getLayoutPath() {\r\n $layout_name = trim($this->getLayout()) == '' ? $this->getControllerName() : $this->getLayout();\r\n return $this->engine->getLayoutPath($layout_name);\r\n }", "static function findIdByName($name) {\n $campaign = self::findByName($name);\n if (count($campaign)>0) return $campaign['id'];\n return 0;\n }", "public function layout()\n {\n return $this->layout;\n }", "public function getThemeLayout();", "public function getLayout() {\n\t\treturn $this->_layout;\n\t}", "protected function getCurrentId()\n {\n return (array_key_exists($this->idfieldName(), $this->data)) ? $this->data[$this->idfieldName()] : NULL;\n }", "public function getLayout()\n\t{\n\t\treturn $this->_layout;\n\t}", "function it_exchange_custom_url_tracking_addon_builder_layout( $layout ) {\n\n\t$var = get_query_var( 'it_exchange_custom_url' );\n\tif ( empty( $var ) || ! is_singular() )\n\t\treturn $layout;\n\n\t$post_id = empty( $GLOBALS['post']->ID ) ? 0 : $GLOBALS['post']->ID;\n\t$custom_urls = get_post_meta( $post_id, '_it-exchange-product-feature-custom-url-tracking', true );\n\tforeach( $custom_urls as $url => $data ) {\n\t\tif ( $data['slug'] == $var && ! empty( $data['builder-layout'] ) )\n\t\t\treturn $data['builder-layout'];\n\t}\n\n\treturn $layout;\n}", "public static function getLayout()\r\n {\r\n if (!isset(static::$_layout[static::layoutName()])) {\r\n $connection = static::getDb();\r\n static::$_layout[static::layoutName()] = $connection->getLayout(static::layoutName());\r\n }\r\n return static::$_layout[static::layoutName()];\r\n }", "public function getCurrentViewId()\n {\n $view_data = $this->_getCurrentView();\n\n if (!empty($view_data)) {\n return $view_data['view_id'];\n }\n\n return null;\n }", "public function getLayout()\n {\n return 'layouts/layout-full-width.tpl';\n }", "public function getLayout() {\n return $this->_layout;\n }", "public function layout()\n {\n return $this->belongsTo('App\\Model\\Layout');\n }", "protected function getCurrentPageIdFromRootTemplate() {}", "function sloodle_get_module_id($name)\n {\n // Ensure the name is a non-empty string\n if (!is_string($name) || empty($name)) return FALSE;\n // Obtain the module record\n if (!($module_record = sloodle_get_record('modules', 'name', $module_name))) return FALSE;\n \n return $module_record->id;\n }", "function the_layout(string $layout)\n {\n return app('armin.layout')->layout($layout);\n }", "protected function getLeadDotLoopID(Backend_Lead $lead)\n {\n // Check for Lead's DotLoop Contact ID\n $dotloop_contact_data = $this->dotloop_api->getLeadConnectData($lead->getId());\n return (!empty($dotloop_contact_data)) ? intval($dotloop_contact_data['dotloop_contact_id']) : null;\n }" ]
[ "0.65256196", "0.6411301", "0.6158252", "0.5912597", "0.5849126", "0.57362217", "0.5652987", "0.5529795", "0.5520399", "0.55122954", "0.54729843", "0.54729277", "0.5423573", "0.54176074", "0.53927225", "0.53778535", "0.5358844", "0.5344133", "0.5314206", "0.530747", "0.52784836", "0.5258347", "0.52470845", "0.52424765", "0.51764864", "0.515812", "0.5147693", "0.5143494", "0.510783", "0.5085128", "0.5085128", "0.5076419", "0.5061893", "0.5036555", "0.50357187", "0.5012135", "0.50115216", "0.4999381", "0.49979657", "0.4995161", "0.49865696", "0.4981992", "0.49813128", "0.49749988", "0.49742115", "0.49742115", "0.4968165", "0.49669498", "0.4961737", "0.49597028", "0.49551383", "0.49395573", "0.49342033", "0.4925592", "0.4922616", "0.4915438", "0.49124864", "0.4909762", "0.49094942", "0.49072552", "0.49028748", "0.48905963", "0.48877195", "0.48710316", "0.4870083", "0.48681068", "0.48671064", "0.48545086", "0.4850539", "0.4850539", "0.4850539", "0.48453653", "0.4831483", "0.48241195", "0.48116377", "0.48105824", "0.48079637", "0.47958666", "0.4793169", "0.47910625", "0.47906473", "0.4790575", "0.47877032", "0.47796017", "0.4770361", "0.47581714", "0.47554833", "0.4747176", "0.47453967", "0.47400108", "0.4738214", "0.47363967", "0.47309113", "0.47270212", "0.47235274", "0.4722007", "0.4721275", "0.47186428", "0.47154292", "0.4714362" ]
0.6772118
0
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8399559", "0.8375976", "0.8375976", "0.8342963", "0.825244", "0.824597", "0.82116634", "0.81456405", "0.81095356", "0.80819404", "0.79899764", "0.7988185", "0.79821676", "0.7959435", "0.79494536", "0.79476935", "0.7925", "0.7913219", "0.78985447", "0.7892049", "0.7888783", "0.78885525", "0.7860001", "0.7839742", "0.7839742", "0.7836824", "0.7823007", "0.7810926", "0.7806934", "0.77903354", "0.7786534", "0.7781346", "0.77802587", "0.7761786", "0.7752098", "0.77181315", "0.77181315", "0.77142626", "0.7711265", "0.77023965", "0.76929665", "0.7690725", "0.76904184", "0.76890206", "0.76723206", "0.7665594", "0.7664652", "0.7654854", "0.7648983", "0.76413405", "0.76408315", "0.7639785", "0.763341", "0.76287645", "0.762751", "0.76264757", "0.7619986", "0.7619986", "0.761193", "0.76025206", "0.7601517", "0.7601157", "0.7601157", "0.7600066", "0.75978255", "0.75942534", "0.7586907", "0.7584423", "0.7578891", "0.75615716", "0.75516856", "0.75510263", "0.7550412", "0.7542515", "0.75408965", "0.7537727", "0.75362265", "0.7527483", "0.7514947", "0.75127167", "0.7498631", "0.749526", "0.7493661", "0.7490471", "0.74865395", "0.7486299", "0.7478914", "0.74754286", "0.74708784", "0.7470241", "0.7463862", "0.74629074", "0.74623996", "0.74613595", "0.74610263", "0.7447454", "0.74386954", "0.7435271", "0.7432479", "0.7431103", "0.742201" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return array( 'parent_id' => 'integer', 'area_name' => 'max:50', 'sort' => 'integer' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8343546", "0.8014665", "0.7937206", "0.7926811", "0.7923615", "0.7905433", "0.7861068", "0.7791027", "0.77841467", "0.77639014", "0.77372813", "0.7733606", "0.77110046", "0.7692483", "0.76856923", "0.7683318", "0.7683318", "0.7683318", "0.7683318", "0.7683318", "0.7683318", "0.76759267", "0.7671764", "0.76669997", "0.7658313", "0.76424056", "0.76314425", "0.76299816", "0.7617575", "0.7610898", "0.760748", "0.7602764", "0.7599495", "0.7598348", "0.75924945", "0.7592167", "0.7588475", "0.7581675", "0.75560045", "0.75556475", "0.7551787", "0.7546985", "0.7542093", "0.7537384", "0.75370705", "0.75301105", "0.7518624", "0.75159705", "0.75089574", "0.7506592", "0.7505938", "0.7499879", "0.7496097", "0.7495033", "0.74930423", "0.7491216", "0.74904597", "0.7489752", "0.74876916", "0.74876636", "0.74802196", "0.747963", "0.74696404", "0.7463791", "0.7462722", "0.7461719", "0.74595535", "0.74555475", "0.7453959", "0.7453909", "0.74509215", "0.7448826", "0.74418545", "0.74413", "0.74357206", "0.74357104", "0.74347955", "0.74308217", "0.7428876", "0.742377", "0.7420234", "0.7415896", "0.74148333", "0.7414047", "0.7412942", "0.74114394", "0.7405532", "0.7405127", "0.74048644", "0.74014634", "0.73909056", "0.73841065", "0.7373293", "0.7371715", "0.7369096", "0.73621505", "0.7355512", "0.73455215", "0.7344044", "0.73436797", "0.73358494" ]
0.0
-1
Web programming handin 2, exercise 2A. User: Boris Lykke Nielsen, 20125327 Date: 17102016 Time: 20:53 Calculates BMI.
function get_bmi($height, $weight) { return $weight / pow($height/100, 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateBMI(){\n $BMI = (705 * $this->weight / ($this->height * $this->height));\n return $BMI;\n }", "function calculateBMI($weight, $height)\r\n{\r\n $BMI = $weight / ($height * $height);\r\n\r\n\r\n \r\n //echo \"<h1><center><b>ASSESSMENT RESULTS </b></center></h1>\";\r\n\r\n echo \"<p>\r\n <div style=\\\"text-align:center\\\">\r\n <span class=\\\"dot\\\"></span>\r\n <span class=\\\"dot\\\"></span>\r\n <span class=\\\"dot\\\"></span>\r\n </div>\r\n </p>\";\r\n\r\n\r\n echo \"<div style=\\\"text-align:center\\\">\";\r\n echo \"<b>BMI: </b>\"; \r\n echo number_format($BMI, 1);\r\n echo \"<br>\";\r\n\r\n \r\n if ($BMI >= 40)\r\n {\r\n echo \"Very Severaly Obese\";\r\n }\r\n\r\n else if ($BMI < 40 && $BMI >= 35)\r\n {\r\n echo \"Severely Obese\";\r\n }\r\n\r\n else if ($BMI < 35 && $BMI >= 30)\r\n {\r\n echo \"Moderately Obese\";\r\n \r\n }\r\n\r\n else if ($BMI < 30 && $BMI >= 25)\r\n {\r\n echo \"Oveweight\";\r\n // oveweight \r\n }\r\n\r\n else if ($BMI < 25 && $BMI >= 18.5)\r\n {\r\n echo \"Normal (healthy weight)\";\r\n // normal (healthy weight) \r\n }\r\n\r\n else if ($BMI < 18.5 && $BMI >= 16)\r\n {\r\n echo \"Underweight\";\r\n // underweight \r\n }\r\n\r\n else if ($BMI < 16 && $BMI >= 15)\r\n {\r\n echo \"Severely Underweight\";\r\n // severely underweight \r\n }\r\n\r\n else if ($BMI < 15)\r\n {\r\n echo \"Severely Underweight\";\r\n // very severely underweight\r\n }\r\n\r\n else\r\n {\r\n echo \"Error in value entered. Please take the test again. Thanks!\";\r\n }\r\n\r\n return $BMI; \r\n}", "public function getBMI(){\r\n\r\n return ($this->weight)/(($this->height*$this->height));\r\n}", "function calculate_bmi() {\n if (!$this->height || !$this->weight) { // check weight and height are set and height is not zero\n return 0;\n }\n\n return round((self::BMI_CONSTANT * $this->weight) / pow($this->height, 2), 2);\n }", "public function getBMI()\n {\n if ($this->height && $this->height > 0){\n return (($this->weight / ($this->height * $this->height)) * 703);\n }\n else{\n return 0;\n }\n \n }", "function bmi($bb, $tb){\n\t$bmi = $bb / (($tb * 0.01) * ($tb * 0.01));\n\treturn $bmi;\n}", "function scoreBMI(){\n //Find the BMI of the user, and compare that to others.\n $userGender=$_POST[\"gender\"];\n $calcHeight=($_POST[\"height-ft\"] * 12)+$_POST[\"height-in\"];\n $userHeight=$calcHeight*2.54/100;\n $userWeight=($_POST[\"weight\"]*0.453592);\n\n $userBMI=$userWeight / pow($userHeight,2);\n if($userBMI < 18.5){\n $BMIpoints=7.5;\n } elseif($userBMI > 18.5 && $userBMI < 24.9){\n $BMIpoints=20;\n } elseif($userBMI > 24.9 && $userBMI < 29.9){\n $BMIpoints=10;\n } elseif($userBMI > 29.9){\n $BMIpoints=5;\n }\n return $BMIpoints;\n $url = 'data/bmi.json';\n $JSON = file_get_contents($url);\n $BMI = json_decode($JSON);\n foreach ($BMI as $category) {\n if($category->SEX == $userGender && $category->GEO == $userProvince){\n switch($userGender){\n case \"Males\":\n $baseline=68.5;\n break;\n case \"Females\":\n $baseline=73.5;\n break;\n }\n }\n }\n}", "public function calculate_bmi() {\n return $this->bodymass / ($this->bodylength * $this->bodylength); \n }", "function computeBMI($mass, $height) {\n\t\t$factor = 100.0; // strict input to output conversion constant: 100 centimeters in 1 meter\n\t\t$scale = 2.5; // tunable parameter according to MacKay, N.J. (2010), scale should be 2.3 <= x <= 2.7\n\t\t$bmi = $mass / pow(($height/$factor), $scale);\n\t\treturn $bmi;\n\t}", "protected function getBMI($weight, $height){\n return round($weight / pow($height, 2), 2);\n }", "function calcBMR($sex, $weight, $height, $age)\r\n{\r\n if ($sex == 'M' || $sex == 'm' || $sex == 'MALE' || $sex == 'male')\r\n {\r\n echo \"<div style=\\\"text-align:center\\\">\";\r\n\r\n $BMR = 66.4720 + (13.7516 * $weight) + (5.0033 * $height) - (6.7550 * $age);\r\n echo \"<br> Your BMR = \";\r\n echo number_format($BMR, 1);\r\n \r\n }\r\n\r\n else if ($sex == 'F' || $sex == 'f' || $sex == 'FEMALE' || $sex == 'female')\r\n {\r\n $BMR = 655.0955 + (9.5634 * $weight) + (1.8496 * $height) - (4.6756 * $age);\r\n echo \"<br> Your BMR = \";\r\n echo number_format($BMR, 1);\r\n \r\n }\r\n\r\n else\r\n {\r\n echo \"<br> Error in value entered. Results will be incorrect. Please take the test again. Thanks!\";\r\n $BMR = 0; \r\n \r\n }\r\n\r\n return $BMR;\r\n\r\n}", "function scoreHealth(){\n //Find the BMI of the user, and compare that to others.\n return $_POST['health1']+$_POST['health2']+$_POST['health3']+$_POST['health4']+$_POST['health5']+$_POST['health6'];\n}", "function calculateIBW() {\n global $height;\n global $x;\n\n $ft_dif = 0;\n // How far over 5ft\n if ($height > 152.4) {\n $cm_dif = $height - 152.4;\n $inchsum = $cm_dif * 0.39370;\n\n $ft_dif = 60 - $inchsum; // Find difference from 5ft (60 inches)\n }\n\n // Find ideal body weight\n return $x + (2.3 * $ft_dif);\n}", "public function processBMI($height, $weight, $user)\r\n {\r\n $dev = 0;\r\n $bmi_score = 0;\r\n $bmi_state = '';\r\n $bmi = $weight / $height / $height;\r\n $low_bmi = 18.5;\r\n $high_bmi = 24.9;\r\n\r\n if ($bmi >= 18.5 && $bmi <= 24.9)\r\n $bmi_state = 'Normal';\r\n if ($bmi < 18.5)\r\n $bmi_state = 'UnderWeight';\r\n if ($bmi > 25 && $bmi < 29.9)\r\n $bmi_state = 'OverWeight';\r\n if ($bmi > 30)\r\n $bmi_state = 'Obese';\r\n\r\n\r\n if ($bmi < $low_bmi) {\r\n $dev = abs($bmi - $low_bmi) / $low_bmi * 100;\r\n }\r\n if ($bmi > $high_bmi)\r\n $dev = abs($bmi - $high_bmi) / $high_bmi * 100;\r\n\r\n $bmiDeviationBaseScore = BmiScore::all();\r\n $recommendTestIds = [];\r\n foreach ($bmiDeviationBaseScore as $value) {\r\n $deviationRange = str_replace(\"val\", $dev, $value->deviation_range);\r\n if (eval(\"return $deviationRange;\")) {\r\n $bmi_score = $value->score;\r\n $recommendTestIds = $value->recommend_test == null ? [] : array_column($value->recommend_test->toArray(), \"test_id\");\r\n break;\r\n }\r\n }\r\n $user->height = $height;\r\n $user->weight = $weight;\r\n $user->BMI = $bmi;\r\n $user->BMI_state = $bmi_state;\r\n $user->BMI_score = $bmi_score;\r\n $bmiObject = (new QueryTagRepository())->where('tag_name', strtoupper(Constants::BMI))->first([\r\n 'id', 'excellent_marks', 'good_marks', 'bad_marks'\r\n ]);\r\n $tagStateColumn = \"tag\" . $bmiObject->id . \"_state\";\r\n $tagScoreColumn = \"tag\" . $bmiObject->id . \"_score\";\r\n if ($bmi_score >= $bmiObject->excellent_marks) {\r\n $tagState = Constants::EXCELLENT;\r\n } else if ($bmi_score < $bmiObject->excellent_marks && $bmi_score >= $bmiObject->good_marks) {\r\n $tagState = Constants::GOOD;\r\n } else {\r\n $tagState = Constants::BAD;\r\n }\r\n try {\r\n DB::beginTransaction();\r\n if ($user->assessmentRecord == null) {\r\n $userAssessmentRecord = new assesHistory();\r\n $userAssessmentRecord->user_id = $user->id;\r\n $userAssessmentRecord->tags_completed = [];\r\n $userAssessmentRecord->$tagScoreColumn = $bmi_score;\r\n $userAssessmentRecord->$tagStateColumn = $tagState;\r\n $userAssessmentRecord->save();\r\n } else {\r\n $user->assessmentRecord->$tagScoreColumn = $bmi_score;\r\n $user->assessmentRecord->$tagStateColumn = $tagState;\r\n $user->assessmentRecord->save();\r\n }\r\n foreach ($recommendTestIds as $recommendedTestId) {\r\n $user->recommendedTest()->updateOrCreate([\r\n 'user_id' => $user->id,\r\n 'test_id' => $recommendedTestId\r\n ], [\r\n 'user_id' => $user->id,\r\n 'test_id' => $recommendedTestId\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 return $user;\r\n }", "public function evaluateWealth() : float;", "private function score_biometric_data(){\t\t\r\n\t\t$data = $this->data['biometric_data'];\r\n\t\t$bp_systolic = $data['bp_systolic'];\r\n\t\tif ($bp_systolic > 140) $bp_systolic = 1;\r\n\t\telse if ($bp_systolic > 120) $bp_systolic = 3;\r\n\t\telse if ($bp_systolic == 0) $bp_systolic = 0;\r\n\t\telse $bp_systolic = 5;\r\n\t\t\t\r\n\t\tif ($data['bp_diastolic'] > 90) $bp_diastolic = 1;\r\n\t\telse if ($data['bp_diastolic'] > 80) $bp_diastolic = 3;\r\n\t\telse if ($data['bp_diastolic'] == 0) $bp_diastolic = 0;\r\n\t\telse $bp_diastolic = 5;\r\n\t\t\r\n\t\t$body_fat = 5;\r\n\t\tif ($this->demographics['gender'] == \"M\") {\r\n\t\t\tif ($this->demographics['age'] >= 60){\r\n\t\t\t\tif ($data['body_fat'] > 24.1) $body_fat = 1;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else if ($this->demographics['age'] >= 40) {\r\n\t\t\t\tif ($data['body_fat'] > 24.1) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 23.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else{\r\n\t\t\t\tif ($data['body_fat'] > 23.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 19.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif ($this->demographics['age'] >= 60) {\r\n\t\t\t\tif ($data['body_fat'] > 31.5) $body_fat = 1;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else if ($this->demographics['age'] >= 40) {\r\n\t\t\t\tif ($data['body_fat'] > 31.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 30.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else{\r\n\t\t\t\tif ($data['body_fat'] > 30.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 23.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\t\t\t\t\t\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\r\n\t\t$waist = 5;\r\n\t\tif ($this->demographics['gender'] == 'M') {\r\n\t\t\tif ($data['waist'] > 40) {\r\n\t\t\t\t$waist = 1;\r\n\t\t\t}\r\n\t\t\telse if ($data['waist'] == 0) {\r\n\t\t\t\t$waist = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($data['waist'] > 35) {\r\n\t\t\t\t$waist = 1;\r\n\t\t\t}\r\n\t\t\telse if ($data['waist'] == 0) {\r\n\t\t\t\t$waist = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$bmi = 3;\r\n\t\tif ($data['bmi'] > 30) $bmi = 1;\r\n\t\telse if ($data['bmi'] > 25) $bmi = 3;\r\n\t\telse if ($data['bmi'] > 18) $bmi = 5;\r\n\t\telse if ($data['bmi'] == 0) $bmi = 0;\r\n\t\t$data['bmi'] = sprintf(\"%.1f\", $data['bmi']);\r\n\r\n\t\t$blood_glucose = 5;\r\n\t\tif ($data['blood_glucose'] > 200) $blood_glucose = 1;\r\n\t\telse if ($data['blood_glucose'] > 129) $blood_glucose = 3;\t\t\t\r\n\t\telse if ($data['blood_glucose'] == 0) $blood_glucose = 0;\r\n\t\t\r\n\t\t$cholesterol = 5;\r\n\t\tif ($data['cholesterol'] > 239) $cholesterol = 1;\r\n\t\telse if ($data['cholesterol'] > 199) $cholesterol = 3;\t\t\t\r\n\t\telse if ($data['cholesterol'] == 0) $cholesterol = 0;\r\n\t\t\t\t\t\r\n\t\t$triglycerides = 5;\r\n\t\tif ($data['triglycerides'] > 200) $triglycerides = 1;\r\n\t\telse if ($data['triglycerides'] > 149) $triglycerides = 3;\t\t\t\r\n\t\telse if ($data['triglycerides'] == 0) $triglycerides = 0;\r\n\t\t\t\t\t\r\n\t\t$hdl = 1;\r\n\t\tif ($this->demographics['gender'] == 'F') {\r\n\t\t\tif ($data['hdl'] > 40) $hdl = 5;\r\n\t\t\telse if ($data['hdl'] > 30) $hdl = 3;\r\n\t\t\telse if ($data['hdl'] == 0) $hdl = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($data['hdl'] > 50) $hdl = 5;\r\n\t\t\telse if ($data['hdl'] > 35) $hdl = 3;\r\n\t\t\telse if ($data['hdl'] == 0) $hdl = 0;\r\n\t\t}\r\n\r\n//\t\tif($data['hdl']>59) $hdl=5;\r\n//\t\telse if($data['hdl']>40) $hdl=3;\r\n//\t\telse if($data['hdl']==0) $hdl=0;\r\n\r\n\t\t$ldl = 5;\r\n\t\tif ($data['ldl'] > 140) $ldl = 1;\r\n\t\telse if ($data['ldl'] > 100) $ldl = 3;\r\n\t\telse if ($data['ldl'] == 0) $ldl = 0;\r\n\r\n\t\tif($data['hdl'] > 0 && $data['cholesterol'] > 0)\r\n\t\t\t$ratio = $data['cholesterol'] / $data['hdl'];\r\n\t\telse\r\n\t\t\t$ratio = 0;\r\n\t\t\r\n\t\t$ratio = sprintf(\"%.1f\", $ratio);\r\n\r\n\t\t$tc_hdl = 5;\r\n\t\tif ($ratio > 4.5) $tc_hdl = 1;\r\n\t\telse if ($ratio == 0) $tc_hdl = 0;\r\n\r\n\r\n\t\t$hemoglobin = 5;\r\n\t\tif ($data['hemoglobin'] == 0)\r\n\t\t\t$hemoglobin = 0;\r\n\t\telse if (($data['hemoglobin'] < 4.0) || ($data['hemoglobin'] > 6.0)) {\r\n\t\t\t$hemoglobin = 1;\r\n\t\t}\r\n\r\n\t\t$cotinine = 5;\r\n\t\tif ($data['cotinine'] > 0) {\r\n\t\t\t$cotinine = 1;\r\n\t\t}\r\n\r\n\t\t$ob = new stdClass();\r\n\t\t$ob->total = 0;\r\n\t\t$ob->data = array('bp_systolic' => array($bp_systolic,.0625, 0.0, $data['bp_systolic']),\r\n\t\t\t\t\t\t'bp_diastolic' => array($bp_diastolic,.0625, 0.0, $data['bp_diastolic']),\r\n\t\t\t\t\t\t'body_fat' => array($body_fat,.125, 0.0, $data['body_fat']),\r\n\t\t\t\t\t\t'bmi' => array($bmi,.0625, 0.0, $data['bmi']),\r\n\t\t\t\t\t\t'waist' => array($waist, .0625, 0.0, $data['waist']),\r\n\t\t\t\t\t\t'blood_glucose' => array($blood_glucose,.0417, 0.0, $data['blood_glucose']),\r\n\t\t\t\t\t\t'hemoglobin' => array($hemoglobin,.0417, 0.0, $data['hemoglobin']),\r\n\t\t\t\t\t\t'cotinine' => array($cotinine,.0416, 0.0, $data['cotinine']),\r\n\t\t\t\t\t\t'cholesterol' => array($cholesterol,.1, 0.0, $data['cholesterol']),\r\n\t\t\t\t\t\t'triglycerides' => array($triglycerides,.1, 0.0, $data['triglycerides']),\r\n\t\t\t\t\t\t'hdl' => array($hdl,.1, 0.0, $data['hdl']),\r\n\t\t\t\t\t\t'ldl' => array($ldl,.1, 0.0, $data['ldl']),\r\n\t\t\t\t\t\t'tc_hdl' => array($tc_hdl,.1, 0.0, $ratio));\r\n\t\tforeach($ob->data as &$rec){\r\n\t\t\t$rec[2] = $rec[0] * $rec[1];\r\n\t\t\t$ob->total += $rec[2];\r\n\t\t}\r\n\t\treturn $ob;\r\n\t}", "public function pageWeight()\r\n\t{\r\n\t\t$weight = Bn::getValue('weight');\r\n\t\t$fileName = '../Conf/Teams/'. $weight;\r\n\r\n\t\t// Chargement du fichier\r\n\t\t$doc = new DOMDocument('1.0', 'UTF-8');\r\n\t\t$doc->validateOnParse = true;\r\n\t\t$doc->load($fileName);\r\n\r\n\t\t$bal = new Bn_Balise();\r\n\t\t$xjoueurs = $doc->getElementsByTagName('joueur');\r\n\t\tforeach($xjoueurs as $xjoueur)\r\n\t\t{\r\n\t\t\t$nbHommes = Object::nodeValue($xjoueur, 'homme');\r\n\t\t\t$nbFemmes = Object::nodeValue($xjoueur, 'femme');\r\n\t\t\t$nbMixtes = Object::nodeValue($xjoueur, 'mixte');\r\n\t\t}\r\n\t\tif ($nbMixtes) $bal->addP('', $nbMixtes . ' joueurs');\r\n\t\telse\r\n\t\t{\r\n\t\t\t$p = $bal->addP('', $nbHommes . ' homme(s)' . '; ' . $nbFemmes . ' femme(s)');\r\n\t\t}\r\n\t\t\r\n\t\t$xrules = $doc->getElementsByTagName('rules');\r\n\t\tforeach($xrules as $xrule)\r\n\t\t{\r\n\t\t\t$discipline = Object::nodeValue($xrule, 'discipline');\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$xpoids = $doc->getElementsByTagName('poid');\r\n\t\t$t = $bal->addBalise('table');\r\n\t\t$tr = $t->addBalise('tr');\r\n\t\t$td = $tr->addBalise('td', '', 'Classement');\r\n\t\t$td = $tr->addBalise('td', '', 'Rang min.');\r\n\t\t$td = $tr->addBalise('td', '', 'Rang max.');\r\n\t\t$td = $tr->addBalise('td', '', 'Points');\r\n\t\tforeach($xpoids as $xpoid)\r\n\t\t{\r\n\t\t\t$tr = $t->addBalise('tr');\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'classement'));\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'rang_min'));\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'rang_max'));\r\n\t\t\t$td = $tr->addBalise('td', '', $xpoid->getAttribute('points'));\r\n\t\t}\r\n\t\t\r\n\t\techo $bal->toHtml();\r\n\t\treturn false;\r\n\t}", "function IMC($name, $weightKg, $heightCm){\n $heightM = $heightCm/100;\n $heightCarre = $heightM * $heightM;\n $IMC = $weightKg/$heightCarre;\n $message = \"Bonjour $name , votre IMC est $IMC\";\n return $message;\n\n}", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "function bmi($txtWeight,$txtHeight)\n { \n \n global $database_hdc,$hdc,$database_personalHealth,$personalHealth;\n \n \n \n $arr[\"txtWeight\"]=$txtWeight;\n $arr[\"txtHeight\"]=$txtHeight;\n header('Content-type: application/json');\n return json_encode($arr);\n\n }", "public function updateBMI(\\Illuminate\\Http\\Request $request)\r\n {\r\n try {\r\n $user = $this->userRepo->getUser($request->get('user_id'));\r\n $user = $this->processBMI($request->get('height'), $request->get('weight'), $user);\r\n if ($user->save()) {\r\n return Helpers::getResponse(200, \"User Information save successfully\", $user->only(['height', 'weight', 'BMI', 'BMI_state', 'BMI_score']));\r\n } else {\r\n return Helpers::getResponse(500, \"Something went wrong\");\r\n }\r\n } catch (UserNotFoundException $e) {\r\n $e->setMessage(Constants::NO_USER_FOUND);\r\n return $e->sendUserNotFoundExceptionResponse();\r\n }\r\n }", "function values($price, $weight=0.45){\n $price = $price + ($price * $weight);\n return $price;\n}", "public function calculate()\n {\n $nationalInsurance = 0.0;\n $nationalInsurance += $this->calculateBand('basic');\n $nationalInsurance += $this->calculateBand('higher');\n return $nationalInsurance;\n }", "function thief_op_growth($userid)\n{\n include_once(\"inc/functions/get.php\");\n $kingdom = get_kingdom_nonarray($userid);\n\n //SCIENCE\n $alliance_size = (get_alliance_size($kingdom)) * 80;\n $res = mysql_query(\"SELECT offence_bonus FROM kingdom WHERE id = $kingdom\");\n $line = mysql_fetch_assoc($res);\n\n $sci = round((1.98*$line[\"offence_bonus\"])/($alliance_size+$line[\"offence_bonus\"]),3);\n $sci = min($sci,1);\n\n $build = mysql_query (\"SELECT homes, hideouts, land FROM build WHERE id = $userid\");\n $build = mysql_fetch_assoc($build);\n //Base-growth\n $growth = $build[\"hideouts\"]*0.2+1;\n\n //Specialization-bonus\n $growth = $growth * (1 + 2 * $build[\"hideouts\"] / ($build[\"land\"]));\n\n //Race-bonus\n $grab = mysql_query(\"SELECT race FROM stats WHERE id = $userid\");\n $grab = mysql_fetch_array($grab);\n if ($grab['race'] == \"Wood Elf\")\n {\n $growth = $growth*1.3;\n }\n if ($grab['race'] == \"Mori Hai\")\n {\n $growth = (($build[\"homes\"]/2.5)+$build[\"hideouts\"])*0.2+1;\n $growth = $growth * (1 + 2 * (($build[\"homes\"]/2.5)+$build[\"hideouts\"]) / ($build[\"land\"]));\n }\n $growth = round($growth * ( ($sci/2)+1 ));\n return $growth;\n}", "function calculate_belt( ){\n\t\tvalidate_isset(['belt', 'drive', 'width', 'length']);\n\n\t\t$belt = __get_belt_details($_POST['belt']);\n\n\t\treturn __get_belt_price($_POST['drive'], $belt['piw'], $_POST['width'], $_POST['length']);\n\t}", "private function compute($base){\n\t\t$amount = \n\t\t $this->getSkillPercent($this->miningSkill) *\n\t\t $this->getSkillPercent($this->astroSkill) *\n\t\t $this->getSkillPercent($this->frigateSkill) *\n\t\t $this->getSkillPercent($this->upgradeLaser)\t\t\n\t\t;\n\t\treturn $base * $amount * $this->getVentureBonus();\n\t}", "function getWeight(){return $this->weight;}", "function characterEquipmentWeight($character_id) {\n\t\n\t\taddToDebugLog(\"characterEquipmentWeight(), Function Entry - supplied parameters: Character ID: \" . $character_id . \", INFO\");\n\t\n\t\t$sql = \"SELECT weight FROM hackcess.character_equipment WHERE character_id = \" . $character_id . \";\";\n\t\t$result = search($sql);\n\t\t$rows = count($result);\n\t\t$weight = 0;\n\t\tfor ($r = 0; $r < $rows; $r++) {\n\t\t\t$weight = $weight + $result[$r][0];\n\t\t}\n\t\taddToDebugLog(\"characterEquipmentWeight(), Total Weight: \" . $weight . \", INFO\");\n\t\n\t\treturn $weight;\n\t\n\t}", "function candies($n, $m) {\n $result = 0; \n $result = intval($m/$n); \n $result = $n * $result; \n return $result;\n}", "function calculateCashBonus($jlhVIP){\n $bonusCash = 0;\n if ($jlhVIP >= 18){\n $bonusCash = 20000000; //20juta\n }else if ($jlhVIP >= 15){\n $bonusCash = 15000000; //15juta\n }else if ($jlhVIP >= 12){\n $bonusCash = 12000000; //12juta\n }else if ($jlhVIP >= 9){\n $bonusCash = 10000000; //10juta\n }else if ($jlhVIP >= 6){\n $bonusCash = 5000000; //5juta\n }else if ($jlhVIP >= 3){\n $bonusCash = 2000000; //2juta\n }\n return ($bonusCash);\n}", "public function GetWeight() {\n\t\treturn 10;\n\t}", "function it_returns_the_weight() {\n $this->weight()->shouldBe( '17.91 KB' );\n }", "public function weight() {\r\n\t\treturn (int)$this->techData['weight'];\r\n\t}", "function getInterestFactor($interest)\n{\n $rate = $interest / 365.25;\n return $rate;\n}", "public function getWeight()\n {\n }", "public function getWeight()\n {\n }", "function get_weight($score){\n\tswitch($score){\n\t\tcase 1:\n\t\t\treturn 1;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\treturn 1.3;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\treturn 1.5;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\treturn 1.9;\n\t\t\tbreak;\n\t}\n}", "function deck_calculate_stats_value(array $base, array $bond, int $user_leader_skill, int $guest_leader_skill = 0): array\r\n{\r\n\t$lsk = [$user_leader_skill, $guest_leader_skill];\r\n\t$add = [0.0, 0.0, 0.0];\r\n\t\r\n\tforeach($lsk as $skill)\r\n\t{\r\n\t\tif($skill == 0)\r\n\t\t\tcontinue;\r\n\t\t\r\n\t\tif($skill >= 1 && $skill <= 9)\r\n\t\t{\r\n\t\t\t/* Non-cross attribute */\r\n\t\t\t$i = intdiv($skill - 1, 3);\r\n\t\t\t$add[$i] += (float)$base[$i] * 0.03 * ((($skill - 1) % 3) + 1);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tswitch($skill)\r\n\t\t\t{\r\n\t\t\t\tcase 31:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Smile Angel */\r\n\t\t\t\t\t$add[0] += (float)$base[1] * 0.12;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 32:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Smile Empress */\r\n\t\t\t\t\t$add[0] += (float)$base[2] * 0.12;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 33:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Pure Princess */\r\n\t\t\t\t\t$add[1] += (float)$base[0] * 0.12;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 34:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Pure Empress */\r\n\t\t\t\t\t$add[1] += (float)$base[2] * 0.12;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 35:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Cool Princess */\r\n\t\t\t\t\t$add[2] += (float)$base[0] * 0.12;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 36:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Cool Angel */\r\n\t\t\t\t\t$add[2] += (float)$base[1] * 0.12;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tdefault:\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t$out = [];\r\n\t\r\n\tfor($i = 0; $i < 3; $i++)\r\n\t\t$out[$i] = $base[$i] + $bond[$i] + (int)round($add[$i]);\r\n\t\r\n\treturn $out;\r\n}", "function dienTichHT(int $a, int $b, float $h) : void\n\t{\n\t\t// ham bat buoc phai co return\n\t\t//$t = (($a+$b)*$h)/2;\n\t\t//$t = (string)$t;\n\t\t//return 100;\n\t\techo 100;\n\t}", "function generate_data_set($heights, $weights) {\n $output = [[]];\n for ($x=0; $x<=count($heights)-1; $x++) {\n for ($y=0; $y<=count($weights)-1; $y++) {\n $output[$y][$x] = get_bmi($heights[$x], $weights[$y]);\n }\n }\n return $output;\n}", "function height() {\n if (empty($this->bodyheight)) {\n if ($this->page[\"Bio\"] == \"\") $this->openpage (\"Bio\",\"person\");\n if (preg_match(\"/Height<\\/h5>\\s*\\n(.*?)\\s*\\((.*?)\\)/m\",$this->page[\"Bio\"],$match)) {\n $this->bodyheight[\"imperial\"] = trim($match[1]);\n $this->bodyheight[\"metric\"] = trim($match[2]);\n }\n }\n return $this->bodyheight;\n }", "function _fourD_analysis_calculate_project_weight( $nid, $uid=0, $getsubtotal=false ) {\n\n $weight = 0.0;\n \n /* Factor in the Ability to Assess, by each user */\n if( $uid ){\n $weight = _fourD_analysis_calculate_project_weight_internal( $nid, $uid, $getsubtotal );\n }\n \n else{\n// if( $getsubtotal ){\n /* Factor in the Ability to Assess, by each user */\n $usrs = db_query(\"SELECT uid, assess_ability FROM {node_4dnetwork_analysis} WHERE nid = '%d'\", $nid);\n $users = array();\n while( $u = db_fetch_object($usrs) ) {\n $users[$u->uid] = $u->assess_ability;\n }\n \n // Formula: (Wxq\"*Axq+Wyq\"*Ayq ... )/(Axq+Ayq...)\n $ability_total = 0;\n foreach($users as $auid=>$ability){\n $ability_total += $ability;\n $weight += ( _fourD_analysis_calculate_project_weight_internal( $nid, $auid, $getsubtotal, true ) * $ability );\n }\n \n if( $ability_total > 0 ){\n $weight = $weight/$ability_total;\n }\n// }\n }\n \n return $weight;\n}", "public function visit(Book $book)\n {\n $cost = 0; //creating local variable and assigning 0 to it\n\n //apply 5$ discount if book price is greater than 50\n if ($book->getPrice() > 50) {\n //if price of book is below 50\n $cost = $book->getPrice() - 5;\n } else {\n //if price of book is above 50\n $cost = $book->getPrice();\n }\n\n //printing the value to user\n echo (\"Book ISBN::\" . $book->getIsbnNumber() . \" cost =\" . $cost . \"\\n\");\n\n return $cost; //returning the cost\n }", "public function getWeight() {\n }", "function getLamCost ($totalSheets, &$rawCost, &$labor, $quantity, $Nup) {\n\tif ($_POST[\"lam\"] == \"lam\") {\n\t\t$lamCost = 0;\n\t\t$lamCost += ($totalSheets * LAMCOST);\n\t}\n\telse {\n\t\t$lamCost = 0;\n\t\t}\n$rawCost += $lamCost;\n\n\n// if booklet + lam\n\tif ($_POST[\"lamcover\"] == \"lamcover\") {\n\t\t$lamCoverLabor = 0;\n\t\t$lamCoverLabor += (( $quantity / $Nup ) * LAMTIME * HOUR );\n\t\t$lamCoverCost = 0;\n\t\t$lamCoverCost += ($quantity * LAMCOST);\n\t}\n\telse {\n\t\t$lamCoverLabor = 0;\n\t\t$lamCoverCost = 0;\n\t}\n$labor += $lamCoverLabor;\n$rawCost += $lamCoverCost;\n\n\n//Determine Lam Labor\n\tif ($_POST[\"lam\"] == \"lam\") {\n\t\t$lamLabor = 0;\n\t\t$lamLabor += ((($totalSheets/4) * LAMTIME) * HOUR);\n\t}\n\telse {\n\t\t$lamLabor = 0;\n\t}\n$labor += $lamLabor;\n}", "function aspcalc()\n{\n global $ASP1, $ASP2, $SH, $MR, $SB;\n $SB = round ( ($ASP2 * $SH - $SH * $ASP1) / ($MR - $ASP2) );\n display ();\n}", "function beratbadanideal($tb, $g){\n\tif($g == \"Pria\" && $tb >= 160 ||$g == \"Wanita\" && $tb >= 150){\n\t\t$bbi = beratbadanormal($tb) - (0.1 * beratbadanormal($tb));\n\t}else if($g == \"Pria\" && $tb < 160 || $g == \"Wanita\" && $tb < 150){\n\t\t$bbi = beratbadanormal($tb) - 1;\n\t}\n\treturn $bbi;\n}", "function hitung_fitness($individu){\n\t\t$fitness = 1/(1+f_obj($individu)); //agar nilai fitness menjadi 0-10\n\t\treturn $fitness;\n\t}", "function pembagian($first_number,$second_number){\n\t\t\t\t// variabel bagi\n\t\t\t\t$bagi = $first_number / $second_number;\n\t\t\t\techo \"Pembagian $first_number / $second_number = $bagi <br><br>\";\t\t\t\t\t\t\t\t\n\t\t\t}", "function Tn_eco_bri($level,$MBn) // -> CT sai neu test level >=7\n{\n\treturn round(2000*pow(2-($level-1)/10,$level-1)*$MBn);\n}", "function kategoriberatbadan($g, $bb, $tb){\n\tif($g == \"Wanita\"){\n\t\tif(bmi($bb,$tb) < 18 ){\n\t\t\t$ket = \"Under Weight / Kurus dan saran dari kami sebaiknya mulai menambah berat badan dan mengkonsumsi makanan berkarbohidrat di imbangi dengan olah raga.\";\n\t\t}elseif (bmi($bb,$tb) >=18 && bmi($bb,$tb) <=25) {\n\t\t\t$ket = \"Normal Weight / Normal dan berat badan anda termasuk kategori ideal.\";\n\t\t}elseif (bmi($bb,$tb) > 25 && bmi($bb,$tb) <=27) {\n\t\t\t$ket = \"Over Weight / Kegemukan dan anda sudah masuk kategori gemuk. Saran dari kami sebaiknya hindari makanan berlemak dan mulailah meningkatkan olahraga seminggu minimal 2 kali.\";\n\t\t}elseif (bmi($bb,$tb) > 27) {\n\t\t\t$ket= \"Obesitas dan saran dari kami sebaiknya segera membuat program menurunkan berat badan karena anda termasuk kategori obesitas/ terlalu gemuk dan tidak baik bagi kesehatan.\";\n\t\t}\n\t}elseif ($g == \"Pria\") {\n\t\tif(bmi($bb,$tb) < 17 ){\n\t\t\t$ket = \"Under Weight / Kurus dan saran dari kami tambah konsumsi makanan berkalori.\";\n\t\t}elseif (bmi($bb,$tb) >= 17 && bmi($bb,$tb) <=23) {\n\t\t\t$ket = \"Normal Weight / Normal dan selamat berat badan anda termasuk ideal.\";\n\t\t}elseif (bmi($bb,$tb) > 23 && bmi($bb,$tb) <=27) {\n\t\t\t$ket = \"Over Weight / Kegemukan dan harus waspada.\";\n\t\t}elseif (bmi($bb,$tb) > 27) {\n\t\t\t$ket = \"Obesitas dan saran dari kami sebaiknya memulai program menurunkan berat badan agar lebih ideal.\";\n\t\t}\n\t}\nreturn $ket;\n}", "function get_pl_weight ($login)\r\n {\r\n //$login = mysql_real_escape_string ($login);\r\n //if (!is_player ($login)) put_error ('this function sums weight for players');\r\n\r\n $q = do_mysql (\"SELECT SUM(weight) FROM items WHERE belongs = '\".$login.\"' AND is_in <> 'ban';\");\r\n $wgh = mysql_fetch_assoc ($q);\r\n if (!$wgh['SUM(weight)']) $wgh['SUM(weight)'] = 0;\r\n global $I_WGH;\r\n $wgh['SUM(weight)'] = round ($wgh['SUM(weight)'] * $I_WGH);\r\n return $wgh['SUM(weight)'];\r\n }", "function calculateEnergyUse(){\n $this->boilerEnergy = $this->outletSteam->energyFlow + $this->blowdown->energyFlow - $this->feedwater->energyFlow;\n $this->fuelEnergy = $this->boilerEnergy / $this->boilerEff; \n $this->checkWarnings();\n }", "public function qbr() {\n\t\t// 5. Sum the four functions that are inputs to QBR: (1) % of completions, (2) avg yards per attempt, (3) TDs per attempt, and (4) % of interceptions. These functions are built below.\n\t\t$qbr = $this->completions() + $this->yards() + $this->touchdowns() + $this->interceptions();\n\t\t// 6. Divide #5 by 6\n\t\t$qbr /= 6;\n\t\t// 7. Multiply #6 by 100\n\t\t$qbr *= 100;\n\t\treturn $qbr;\n\t}", "public static function GetBMIId($bmi)\n {\n if ($bmi < self::BMI1)\n return '1';\n elseif ($bmi > self::BMI2)\n return '3';\n else\n return '2';\n }", "function getTotalHT() {\n if (isset($this->calculmontant) && $this->calculmontant == true) return (sprintf(\"%.2f\", $this->totalHT));\n else return 0;\n }", "function hrChance($hr, $ab){\n //protects from divided-by 0\n if($ab > 0)\n $ave = $hr/$ab;\n else\n $ave = 0.0;\n //returns the average \n return \"<span>$ave</span\";\n }", "private function score_weight_nutrition(){\r\n\t\t$data = $this->data['weight_nutrition'];\r\n\r\n\t\t$q21 = $this->scoreValue(array(5,1,3),$data['q21']);\r\n\t\t$q22 = $this->scoreValue(array(1,3,5),$data['q22']);\r\n\r\n\t\t$qn24 = $this->scoreValue(array(1,2,3,4,5), $data['qn24']);\r\n\t\t$qn25 = $this->scoreValue(array(1,2,3,4,5), $data['qn25']);\r\n\r\n\t\t//fruit & veg _1 & 2\r\n\t\t$q23a = 0;\r\n\t\t$f = $data['q23_1'];\r\n\t\t$v = $data['q23_2'];\r\n\t\t\r\n\t\tif ($f > 0) $f--;\r\n\t\tif ($v > 0) $v--;\r\n\t\t$table = array(\r\n\t\t array(1,1,1,2,2),\t\r\n\t\t array(1,1,2,2,3),\r\n\t\t array(1,2,2,3,3),\r\n\t\t array(2,2,3,4,5),\r\n\t\t array(2,3,3,5,5),\r\n\t\t);\r\n\t\t$q23a = $table[$v][$f];\r\n\t\t\r\n\t\t//Fats\r\n\t\t$q23b = 0;\r\n\t\tfor($x = 3; $x <= 7; $x++){\r\n\t\t\t$q23b += $this->scoreValue(array(0,3,5,12,25),$data['q23_'.$x]);\r\n\t\t}\r\n\t\t$q23b = $q23b/5;\r\n\t\tif ($q23b > 10) $q23b = 1;\r\n\t\telse if ($q23b > 5.1) $q23b = 2;\r\n\t\telse if ($q23b > 3.2) $q23b = 3;\r\n\t\telse if ($q23b > 2) $q23b = 4;\r\n\t\telse $q23b = 5;\r\n\t\t\r\n\t\t///breads & Grains _8\r\n\t\t$q23c = $this->scoreValue(array(0,3,5,12,25),$data['q23_8']);\r\n\t\tif ($q23c > 12) $q23c = 5;\r\n\t\telse if ($q23c > 8) $q23c = 4;\r\n\t\telse if ($q23c > 4.9) $q23c = 3;\r\n\t\telse if ($q23c > 3) $q23c = 2;\r\n\t\telse $q23c = 1;\r\n\t\t\r\n\t\t$ob=new stdClass();\r\n\t\t$ob->total=0;\r\n\t\t$ob->data=array('q21'=>array($q21,.1),\r\n\t\t\t\t\t\t'q22'=>array($q22,.1),\r\n\t\t\t\t\t\t'q23_1'=>array($q23a,.25),\r\n\t\t\t\t\t\t'q23_2'=>array($q23b,.25),\r\n\t\t\t\t\t\t'q23_3'=>array($q23c,.1),\r\n\t\t\t\t\t\t'qn24'=>array($qn24,.1),\r\n\t\t\t\t\t\t'qn25'=>array($qn25,.1)\r\n\t\t);\r\n\t\tforeach($ob->data as &$rec){\r\n\t\t\t$rec[2]=$rec[0]*$rec[1];\r\n\t\t\t$ob->total+=$rec[2];\r\n\t\t}\r\n\t\treturn $ob;\r\n\t}", "abstract protected function calculateValue();", "function getUVFloodCost (&$rawCost, $totalSheets) {\n\tif ($_POST[\"uvFlood\"] == \"uvFlood\") {\n\t\t$itemUVFlood = 1;\n\t\t$uvFloodCost = UVFLOODSETUP;\n\t\t$uvFloodCost += ($totalSheets * UVFLOODCOST);\n\t}\nelse {\n\t$uvFloodCost = 0;\n\t}\n\n$rawCost += $uvFloodCost;\n}", "function battingAve($h, $ab){\n //protects from divided-by 0\n if($ab > 0)\n $ave = $h/$ab;\n else\n $ave = 0.0;\n //displays average as red if greater than or equal to 0.3 \n if($ave >= 0.3)\n return \"<span style = color:red>$ave</span>\"; \n //default return \n return \"<span>$ave</span\";\n }", "function getWeight() { return $this->_weight; }", "public function getWeight() \r\n {\r\n return $this->weight;\r\n }", "function imc($masse,$taille)\n\t{\n\t\tif ($taille > 0)\n\t\t{\n\t\t\t$res = $masse / pow($taille,2);\n\t\t\treturn $res;\n\t\t}\n\t\telse\n\t\t\treturn 0;\n\t}", "function molar_absorption_coefficient_of_prot($seq,$aminoacid_content,$molweight) {\r\n // Pace et al. . Protein Sci. 1995;4:2411-23.\r\n $abscoef = ($aminoacid_content[\"A\"]*5500 + $aminoacid_content[\"Y\"]*1490 + $aminoacid_content[\"C\"]*125)/$molweight;\r\n return $abscoef;\r\n}", "function weight_factor($section, $rating_rules){\r\n\t$weight_fact = 1 ;\r\n\tforeach($rating_rules as $kew=> $val){\r\n\t\tif(!empty($section) & $val['RatingRule']['section'] == $section){\r\n\t\t\t$weight_fact=$val['RatingRule']['Weight_factor'];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn ($weight_fact);\r\n}", "private function get_calculated_value( $_INPUT ){\n\t\tif ( $this->ignore_value( $_INPUT ) ){\n\t\t\tif (isset( $_INPUT['i_effective'] ) ){\n\t\t\t\tif (!(array()== $_INPUT['i_effective'] ) ){\n\t\t\t\t\treturn $this->get_solution( (float)$_INPUT['i_effective'] ); \n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn $this->get_interest_rate_for_value( (float)$_INPUT['value'] );\n\t\t}\n\t}", "function checkWeightedSum($isbn){\n $odd = 0;\n $even = 0;\n for($i = 0; $i<strlen($isbn)-1; $i++){\n if($i%2 == 0){\n $odd += $isbn[$i];\n }else{\n $even += $isbn[$i]*3;\n }\n }\n $sum = $odd + $even;\n $mod = $sum%10;\n $check = ($mod == 0) ? 0 : 10-$mod;\n if($check == substr($isbn, 12,12)){\n return 1;\n }else{\n return 0;\n }\n }", "public function calculate();", "public function calculate();", "public function get_weight(){\n\t\treturn $this->weight;\n\t}", "function compute_money_total($available, $frozen, $investment, $loaned, $interest, $owned, $fine)\n{\n return ($available + $frozen + $investment - ($loaned + $interest + $owned + $fine));\n}", "function meterTomile($e){\n$getTotal = $e*0.000621371;\nreturn $getTotal;\n}", "public function humidityScore();", "function display()\n{\n global $ASP1, $ASP2, $SH, $MR, $SB;\n $SH2 = $SB + $SH;\n $ASP2 = (($SB * $MR) + ($SH * $ASP1)) / $SH2;\n echo sprintf ( \"%12d | %6d | %8.2f | Rs. %9.2f | %5.0f %% | %6d\\n\", $ASP2, $SB, $MR, $MR * $SB,\n (100 * ($ASP1 - $ASP2) / $ASP1), $SH2 );\n}", "static function GetWeightGainArray($bmi)\n {\n $data = Yii::app()->cache->get(self::CACHE_ID . self::GetBMIId($bmi));\n if ($data === false) {\n $data = array();\n $models = self::model()->findAll(array('order' => 'week ASC'));\n foreach ($models as $model) {\n if ($bmi < self::BMI1)\n $data[$model->week] = $model->w1;\n elseif ($bmi > self::BMI2)\n $data[$model->week] = $model->w3;\n else\n $data[$model->week] = $model->w2;\n }\n $data[1] = round($data[2] / 2, 2);\n for ($i = 3; $i < 40; $i = $i + 2)\n $data[$i] = round(($data[$i - 1] + $data[$i + 1]) / 2, 2);\n\n Yii::app()->cache->set(self::CACHE_ID . self::GetBMIId($bmi), $data, 3600);\n }\n\n return $data;\n }", "function calc_dream_mp_score_a($db, $dreamid, $personid) {\n global $pwpdo;\n $query = \"select pw_vote.vote as mpvote, pw_dyn_dreamvote.vote as dreamvote from\n pw_vote, pw_dyn_dreamvote, pw_division, pw_mp where\n pw_vote.division_id = pw_division.division_id and\n pw_dyn_dreamvote.division_number = pw_division.division_number and\n pw_dyn_dreamvote.division_date = pw_division.division_date\n and pw_vote.mp_id = pw_mp.mp_id\n and pw_mp.person = ? and pw_dyn_dreamvote.dream_id = ?\";\n\n $qrowarray=$pwpdo->fetch_all_rows($query,array($personid,$dreamid));\n $t = 0.0;\n $c = 0.0;\n foreach ($qrowarray as $qrow)\n {\n $weight = 1;\n $mpvote = $qrow['mpvote'];\n $mpvote = str_replace(\"tell\", \"\", $mpvote);\n $dreamvote = $qrow['dreamvote'];\n if ($dreamvote == \"aye3\" or $dreamvote == \"no3\") {\n $dreamvote = str_replace(\"3\", \"\", $dreamvote);\n $weight = 3;\n }\n $t += $weight;\n\n if ($mpvote == $dreamvote)\n $c += $weight;\n elseif ($mpvote == \"both\" or $dreamvote == \"both\")\n $c = $c + ($weight / 2);\n }\n\n return array($c, $t);\n}", "public function getOilBonus() // 1% expa = 0.3% bonusu\n\t{\n\t\treturn $this->getExperience() * 0.2;\n\t}", "function bank($bedrag){\n $jaar = 1;\n for ($jaar;$jaar<=10;++$jaar){\n $nieuwbedrag = $bedrag *pow(1.08,$jaar);\n echo 'na '.$jaar.' jaar heeft Hans '.$nieuwbedrag.'euro <br>';\n }\n }", "function getUtilisation(){\n\n $total = $this-> getTotalWeight() ;\n \n return round(($total / $this->capacity) * 100, 2);\n\n }", "public static function ComputeScoreWithBias( $goods, $bads, $vote ) {\n\t\t$score = self::ComputeScore( $goods, $bads );\n\t\t\n\t\tif( $vote === TRUE ) {\n\t\t\t// only add 1 if it wont make it 99 (\"perfect\")\n\t\t\tif( $score != 99 ) {\n\t\t\t\t$score = min( $result+1, 98 );\n\t\t\t}\n\t\t} else if( $vote === FALSE ) {\n\t\t\t$score = max( $score-1, 0 );\n\t\t}\n\t}", "function getTotalWeight()\n { $total = 0 ;\n if (count($this->items) > 0) \n { \n for ($p=0; $p<count($this->items); $p++) \n {\n $total = $total + $this->items[$p];\n }\n }\n return $total;\n }", "function compute_withdrawing_fee($amount)\n{\n $fee = 0;\n if (!is_null($amount) && $amount > 0)\n {\n if ($amount < 20000)\n {\n $fee = 1;\n }\n else if ($amount < 50000)\n {\n $fee = 3;\n }\n else\n {\n $fee = 5;\n }\n }\n return $fee;\n}", "function extra_calc_scenario_two($base, $goal) {\n\tif ($base >= $goal) {\n\t\treturn 0;\n\t} else {\n\t\t$ce_db = access_db();\n\n\t\t$diff = $goal - $base;\n\t\t$curr_data = $_COOKIE['ce_info'];\n\t\t$pieces = explode(\"|\" , $curr_data);\n\t\t$account_id = $pieces[0];\n\t\t$account_name = $pieces[1];\n\t\t$game_id = $pieces[2];\n\t\t$period_id = $pieces[3];\n\t\t$company_id = $pieces[4];\n\t\t$plant_id = $pieces[5];\n\t\t$game_start_date = $pieces[6];\n\t\t$game_period_id = $pieces[7];\n\n\t\t$query = \"SELECT * FROM ce_game WHERE game_id = $game_id AND game_period_id = $game_period_id\";\n\t\t$result = $ce_db->get_results($query, ARRAY_A);\n\t\t$carbon_price = $result[\"carbon_price_last_perd\"];\n\n\n\t}\n}", "function baretat($id){\n{\n\tif ($id == 1)\n\t{\n\t\techo \"Rage : $OFFSET_RAGE; / $OFFSET_RAGE_MAX\";\n\t}\n\telseif ($id == 4)\n\t{\n\t\techo \"Energie : $OFFSET_ENER / $OFFSET_ENER_MAX\";\n\t}\n\telseif ($id == 6)\n\t{\n\t\techo \"P. Runique : 0 / 0\";\n\t}\n\telseif ($id == 2 || ($id) == 3 || ($id) == 5 || ($id) == 7 || ($id) == 8 || ($id) == 9 || ($id) == 11)\n\t{\n\t\techo \"Mana : $OFFSET_MANA / $OFFSET_MANA_MAX\";\n\t}\n}\n}", "function setWeight($minweight = 50) {\n echo \"The height is : $minweight <br>\";\n}", "function get_weight() {\n\t\tif ($this->data['weight']) return $this->data['weight'];\n\t}", "public function getLifeStyleMultiplier() {\r\n\r\n\t\t//Get the latest iFOCUS results. If there are none, return the sedentary value\r\n\t\t$reports = $this->getCompleted();\r\n\t\tif ($reports) {\r\n\t\t\t$this->retrieve($this->id, false, $reports[0]['value']);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn (1.2);\r\n\t\t}\r\n\r\n\t\t$ndays = 0;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Number of days of exercise\r\n\t\tif ($this->data['physical_activity']['q24']) {\t\t\t\t//Moderate activity level\r\n\t\t\t$q24 = $this->data['physical_activity']['q24'];\r\n\t\t\tif ($q24 == 1) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//None\r\n\t\t\t\t$ndays += 0;\r\n\t\t\t}\r\n\t\t\telse if ($q24 == 2) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//1 day/week\r\n\t\t\t\t$ndays += 1;\r\n\t\t\t}\r\n\t\t\telse if ($q24 == 3) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//2 days/week\r\n\t\t\t\t$ndays += 2;\r\n\t\t\t}\r\n\t\t\telse if ($q24 == 4) {\r\n\t\t\t\t$ndays += 3;\r\n\t\t\t}\r\n\t\t\telse if ($q24 == 5) {\r\n\t\t\t\t$ndays += 4;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($this->data['physical_activity']['q25']) {\t\t\t\t//Strength training\r\n\t\t\t$q25 = $this->data['physical_activity']['q25'];\r\n\t\t\tif ($q25 == 1) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//None\r\n\t\t\t\t$ndays += 0;\r\n\t\t\t}\r\n\t\t\telse if ($q25 == 2) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//1 day/week\r\n\t\t\t\t$ndays += 1;\r\n\t\t\t}\r\n\t\t\telse if ($q25 == 3) {\r\n\t\t\t\t$ndays += 2;\r\n\t\t\t}\r\n\t\t\telse if ($q25 == 4) {\r\n\t\t\t\t$ndays += 3;\r\n\t\t\t}\r\n\t\t\telse if ($q25 == 5) {\r\n\t\t\t\t$ndays += 4;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($this->data['physical_activity']['q26']) {\t\t\t\t//Stretching\r\n\t\t\t$q26 = $this->data['physical_activity']['q26'];\r\n\t\t\tif ($q26 == 1) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//None\r\n\t\t\t\t$ndays == 0;\r\n\t\t\t}\r\n\t\t\telse if ($q26 == 2) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//1 day/week\r\n\t\t\t\t$ndays += 1;\r\n\t\t\t}\r\n\t\t\telse if ($q26 == 3) {\r\n\t\t\t\t$ndays += 2;\r\n\t\t\t}\r\n\t\t\telse if ($q26 == 4) {\r\n\t\t\t\t$ndays += 3;\r\n\t\t\t}\r\n\t\t\telse if ($q26 == 5) {\r\n\t\t\t\t$ndays += 4;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($ndays == 0) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Sedentary\r\n\t\t\t$ret = 1.2;\r\n\t\t}\r\n\t\telse if (($ndays >= 1) && ($ndays <= 2)) {\t\t\t\t\t\t//Light activity\r\n\t\t\t$ret = 1.375;\r\n\t\t}\r\n\t\telse if (($ndays >= 3) && ($ndays <= 5)) {\t\t\t\t\t\t//Moderate activity\r\n\t\t\t$ret = 1.55;\r\n\t\t}\r\n\t\telse if ($ndays > 5) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Very active\r\n\t\t\t$ret = 1.725;\r\n\t\t}\r\n\r\n\t\treturn $ret;\r\n\t}", "function getSaddleCost (&$labor, &$rawCost, $quantity) {\nif ($_POST[\"saddle\"] == \"saddle\") {\n\t$saddleLabor = (($quantity/SADDLEPERHOUR) * HOUR);\n\t$saddleCost = ($quantity * STAPLE);\n\t}\nelse {\n\t$saddleLabor = 0;\n\t$saddleCost = 0;\n\t}\n$labor += $saddleLabor;\n$rawCost += $saddleCost;\n}", "public function getBrut()\n\t{\n\n\t\treturn $this->getClick * $this->getClickPayout;\t\n\t}", "function awardForCapture($specsOwned, $mugsOwned, $sausageRollsOwned)\n{\n $award = 10 * (($specsOwned * $mugsOwned * $sausageRollsOwned)/2);\n return $award;\n}", "function practice($hours) {\n\n\t\t$coef_practice = $hours/100;\n\n\t\t$this->skills = $this->skills*$coef_practice + $this->skills;\n\t\treturn $coef_practice;\n\n\t\t}", "public function calculate()\n\t{\n\t\t$this->sold();\n\t\t$this->rank();\n\t\t$this->feedback();\n\t\t$this->storeActive();\n\t\t$this->cod();\n\t\t$this->accountAge();\n\t\t$this->imageCount();\n\n\t\treturn $this->score;\n\t}", "public function getWeight() : float\n\t{\n\t\treturn $this->weight;\n\t}" ]
[ "0.7939702", "0.78994477", "0.7580967", "0.7513129", "0.7474416", "0.71902215", "0.7094098", "0.70771927", "0.7028157", "0.6712062", "0.6647952", "0.6599207", "0.6489997", "0.63912064", "0.5976507", "0.57638735", "0.56954795", "0.56864136", "0.5658275", "0.5658275", "0.5658275", "0.5658275", "0.5658275", "0.5658275", "0.5658275", "0.5648497", "0.56189513", "0.55715656", "0.55459917", "0.5498837", "0.5451026", "0.54096884", "0.5387523", "0.5370626", "0.5344658", "0.52691275", "0.5269093", "0.5235584", "0.52352756", "0.5226915", "0.5214327", "0.5214327", "0.5208801", "0.5193719", "0.51715654", "0.51709974", "0.5157157", "0.5122661", "0.5121733", "0.51149756", "0.51099783", "0.5076097", "0.5064559", "0.5059663", "0.5054762", "0.5051564", "0.50348145", "0.5029357", "0.50255436", "0.5022832", "0.5016287", "0.5009723", "0.50046295", "0.4987897", "0.49686918", "0.49623287", "0.49611995", "0.49476123", "0.49284983", "0.4924212", "0.4923005", "0.4920724", "0.4901637", "0.4900618", "0.48965085", "0.48965085", "0.4894392", "0.48925835", "0.4890982", "0.48870513", "0.48820338", "0.48784408", "0.48741907", "0.48720154", "0.48712265", "0.48679405", "0.48627633", "0.4862217", "0.4857068", "0.4850366", "0.48502538", "0.48484954", "0.4842878", "0.48399365", "0.48349807", "0.48310387", "0.48258853", "0.4825733", "0.4824056", "0.4820622" ]
0.75494426
3
Generates a matrix of bmi values based on a set of height and weight values.
function generate_data_set($heights, $weights) { $output = [[]]; for ($x=0; $x<=count($heights)-1; $x++) { for ($y=0; $y<=count($weights)-1; $y++) { $output[$y][$x] = get_bmi($heights[$x], $weights[$y]); } } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_bmi($height, $weight) {\n return $weight / pow($height/100, 2);\n}", "protected function getBMI($weight, $height){\n return round($weight / pow($height, 2), 2);\n }", "function calculate_bmi() {\n if (!$this->height || !$this->weight) { // check weight and height are set and height is not zero\n return 0;\n }\n\n return round((self::BMI_CONSTANT * $this->weight) / pow($this->height, 2), 2);\n }", "function calculateBMI(){\n $BMI = (705 * $this->weight / ($this->height * $this->height));\n return $BMI;\n }", "public function getBMI(){\r\n\r\n return ($this->weight)/(($this->height*$this->height));\r\n}", "function computeBMI($mass, $height) {\n\t\t$factor = 100.0; // strict input to output conversion constant: 100 centimeters in 1 meter\n\t\t$scale = 2.5; // tunable parameter according to MacKay, N.J. (2010), scale should be 2.3 <= x <= 2.7\n\t\t$bmi = $mass / pow(($height/$factor), $scale);\n\t\treturn $bmi;\n\t}", "public function getBMI()\n {\n if ($this->height && $this->height > 0){\n return (($this->weight / ($this->height * $this->height)) * 703);\n }\n else{\n return 0;\n }\n \n }", "public function processBMI($height, $weight, $user)\r\n {\r\n $dev = 0;\r\n $bmi_score = 0;\r\n $bmi_state = '';\r\n $bmi = $weight / $height / $height;\r\n $low_bmi = 18.5;\r\n $high_bmi = 24.9;\r\n\r\n if ($bmi >= 18.5 && $bmi <= 24.9)\r\n $bmi_state = 'Normal';\r\n if ($bmi < 18.5)\r\n $bmi_state = 'UnderWeight';\r\n if ($bmi > 25 && $bmi < 29.9)\r\n $bmi_state = 'OverWeight';\r\n if ($bmi > 30)\r\n $bmi_state = 'Obese';\r\n\r\n\r\n if ($bmi < $low_bmi) {\r\n $dev = abs($bmi - $low_bmi) / $low_bmi * 100;\r\n }\r\n if ($bmi > $high_bmi)\r\n $dev = abs($bmi - $high_bmi) / $high_bmi * 100;\r\n\r\n $bmiDeviationBaseScore = BmiScore::all();\r\n $recommendTestIds = [];\r\n foreach ($bmiDeviationBaseScore as $value) {\r\n $deviationRange = str_replace(\"val\", $dev, $value->deviation_range);\r\n if (eval(\"return $deviationRange;\")) {\r\n $bmi_score = $value->score;\r\n $recommendTestIds = $value->recommend_test == null ? [] : array_column($value->recommend_test->toArray(), \"test_id\");\r\n break;\r\n }\r\n }\r\n $user->height = $height;\r\n $user->weight = $weight;\r\n $user->BMI = $bmi;\r\n $user->BMI_state = $bmi_state;\r\n $user->BMI_score = $bmi_score;\r\n $bmiObject = (new QueryTagRepository())->where('tag_name', strtoupper(Constants::BMI))->first([\r\n 'id', 'excellent_marks', 'good_marks', 'bad_marks'\r\n ]);\r\n $tagStateColumn = \"tag\" . $bmiObject->id . \"_state\";\r\n $tagScoreColumn = \"tag\" . $bmiObject->id . \"_score\";\r\n if ($bmi_score >= $bmiObject->excellent_marks) {\r\n $tagState = Constants::EXCELLENT;\r\n } else if ($bmi_score < $bmiObject->excellent_marks && $bmi_score >= $bmiObject->good_marks) {\r\n $tagState = Constants::GOOD;\r\n } else {\r\n $tagState = Constants::BAD;\r\n }\r\n try {\r\n DB::beginTransaction();\r\n if ($user->assessmentRecord == null) {\r\n $userAssessmentRecord = new assesHistory();\r\n $userAssessmentRecord->user_id = $user->id;\r\n $userAssessmentRecord->tags_completed = [];\r\n $userAssessmentRecord->$tagScoreColumn = $bmi_score;\r\n $userAssessmentRecord->$tagStateColumn = $tagState;\r\n $userAssessmentRecord->save();\r\n } else {\r\n $user->assessmentRecord->$tagScoreColumn = $bmi_score;\r\n $user->assessmentRecord->$tagStateColumn = $tagState;\r\n $user->assessmentRecord->save();\r\n }\r\n foreach ($recommendTestIds as $recommendedTestId) {\r\n $user->recommendedTest()->updateOrCreate([\r\n 'user_id' => $user->id,\r\n 'test_id' => $recommendedTestId\r\n ], [\r\n 'user_id' => $user->id,\r\n 'test_id' => $recommendedTestId\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 return $user;\r\n }", "function calculateBMI($weight, $height)\r\n{\r\n $BMI = $weight / ($height * $height);\r\n\r\n\r\n \r\n //echo \"<h1><center><b>ASSESSMENT RESULTS </b></center></h1>\";\r\n\r\n echo \"<p>\r\n <div style=\\\"text-align:center\\\">\r\n <span class=\\\"dot\\\"></span>\r\n <span class=\\\"dot\\\"></span>\r\n <span class=\\\"dot\\\"></span>\r\n </div>\r\n </p>\";\r\n\r\n\r\n echo \"<div style=\\\"text-align:center\\\">\";\r\n echo \"<b>BMI: </b>\"; \r\n echo number_format($BMI, 1);\r\n echo \"<br>\";\r\n\r\n \r\n if ($BMI >= 40)\r\n {\r\n echo \"Very Severaly Obese\";\r\n }\r\n\r\n else if ($BMI < 40 && $BMI >= 35)\r\n {\r\n echo \"Severely Obese\";\r\n }\r\n\r\n else if ($BMI < 35 && $BMI >= 30)\r\n {\r\n echo \"Moderately Obese\";\r\n \r\n }\r\n\r\n else if ($BMI < 30 && $BMI >= 25)\r\n {\r\n echo \"Oveweight\";\r\n // oveweight \r\n }\r\n\r\n else if ($BMI < 25 && $BMI >= 18.5)\r\n {\r\n echo \"Normal (healthy weight)\";\r\n // normal (healthy weight) \r\n }\r\n\r\n else if ($BMI < 18.5 && $BMI >= 16)\r\n {\r\n echo \"Underweight\";\r\n // underweight \r\n }\r\n\r\n else if ($BMI < 16 && $BMI >= 15)\r\n {\r\n echo \"Severely Underweight\";\r\n // severely underweight \r\n }\r\n\r\n else if ($BMI < 15)\r\n {\r\n echo \"Severely Underweight\";\r\n // very severely underweight\r\n }\r\n\r\n else\r\n {\r\n echo \"Error in value entered. Please take the test again. Thanks!\";\r\n }\r\n\r\n return $BMI; \r\n}", "function bmi($bb, $tb){\n\t$bmi = $bb / (($tb * 0.01) * ($tb * 0.01));\n\treturn $bmi;\n}", "public function calculate_bmi() {\n return $this->bodymass / ($this->bodylength * $this->bodylength); \n }", "static function GetWeightGainArray($bmi)\n {\n $data = Yii::app()->cache->get(self::CACHE_ID . self::GetBMIId($bmi));\n if ($data === false) {\n $data = array();\n $models = self::model()->findAll(array('order' => 'week ASC'));\n foreach ($models as $model) {\n if ($bmi < self::BMI1)\n $data[$model->week] = $model->w1;\n elseif ($bmi > self::BMI2)\n $data[$model->week] = $model->w3;\n else\n $data[$model->week] = $model->w2;\n }\n $data[1] = round($data[2] / 2, 2);\n for ($i = 3; $i < 40; $i = $i + 2)\n $data[$i] = round(($data[$i - 1] + $data[$i + 1]) / 2, 2);\n\n Yii::app()->cache->set(self::CACHE_ID . self::GetBMIId($bmi), $data, 3600);\n }\n\n return $data;\n }", "function html_generate_table($heights, $weights, $rows) {\n $html = '<table>';\n $html .= html_generate_row($heights, ' ', true);\n foreach ($rows as $key => $row) {\n $html .= html_generate_row($row, $weights[$key]);\n }\n $html .= '</table>';\n return $html;\n}", "function bmi($txtWeight,$txtHeight)\n { \n \n global $database_hdc,$hdc,$database_personalHealth,$personalHealth;\n \n \n \n $arr[\"txtWeight\"]=$txtWeight;\n $arr[\"txtHeight\"]=$txtHeight;\n header('Content-type: application/json');\n return json_encode($arr);\n\n }", "function calculateIBW() {\n global $height;\n global $x;\n\n $ft_dif = 0;\n // How far over 5ft\n if ($height > 152.4) {\n $cm_dif = $height - 152.4;\n $inchsum = $cm_dif * 0.39370;\n\n $ft_dif = 60 - $inchsum; // Find difference from 5ft (60 inches)\n }\n\n // Find ideal body weight\n return $x + (2.3 * $ft_dif);\n}", "public function setWeight($weight);", "public function setWeight($weight);", "public function setWeight($weight);", "public function setWeight($weight);", "public function pageWeight()\r\n\t{\r\n\t\t$weight = Bn::getValue('weight');\r\n\t\t$fileName = '../Conf/Teams/'. $weight;\r\n\r\n\t\t// Chargement du fichier\r\n\t\t$doc = new DOMDocument('1.0', 'UTF-8');\r\n\t\t$doc->validateOnParse = true;\r\n\t\t$doc->load($fileName);\r\n\r\n\t\t$bal = new Bn_Balise();\r\n\t\t$xjoueurs = $doc->getElementsByTagName('joueur');\r\n\t\tforeach($xjoueurs as $xjoueur)\r\n\t\t{\r\n\t\t\t$nbHommes = Object::nodeValue($xjoueur, 'homme');\r\n\t\t\t$nbFemmes = Object::nodeValue($xjoueur, 'femme');\r\n\t\t\t$nbMixtes = Object::nodeValue($xjoueur, 'mixte');\r\n\t\t}\r\n\t\tif ($nbMixtes) $bal->addP('', $nbMixtes . ' joueurs');\r\n\t\telse\r\n\t\t{\r\n\t\t\t$p = $bal->addP('', $nbHommes . ' homme(s)' . '; ' . $nbFemmes . ' femme(s)');\r\n\t\t}\r\n\t\t\r\n\t\t$xrules = $doc->getElementsByTagName('rules');\r\n\t\tforeach($xrules as $xrule)\r\n\t\t{\r\n\t\t\t$discipline = Object::nodeValue($xrule, 'discipline');\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$xpoids = $doc->getElementsByTagName('poid');\r\n\t\t$t = $bal->addBalise('table');\r\n\t\t$tr = $t->addBalise('tr');\r\n\t\t$td = $tr->addBalise('td', '', 'Classement');\r\n\t\t$td = $tr->addBalise('td', '', 'Rang min.');\r\n\t\t$td = $tr->addBalise('td', '', 'Rang max.');\r\n\t\t$td = $tr->addBalise('td', '', 'Points');\r\n\t\tforeach($xpoids as $xpoid)\r\n\t\t{\r\n\t\t\t$tr = $t->addBalise('tr');\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'classement'));\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'rang_min'));\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'rang_max'));\r\n\t\t\t$td = $tr->addBalise('td', '', $xpoid->getAttribute('points'));\r\n\t\t}\r\n\t\t\r\n\t\techo $bal->toHtml();\r\n\t\treturn false;\r\n\t}", "public static function getSampleData()\n {\n return array(\n array(array('weight' => 2), array('weight' => 1), array('weight' => 100), array('weight' => 1), array('weight' => 2), array('weight' => 1)),\n array(array('weight' => 2), array('weight' => 1), array('weight' => 100), array('weight' => 1), array('weight' => 2), array('weight' => 1)),\n array(array('weight' => 2), array('weight' => 1), array('weight' => 100), array('weight' => 1), array('weight' => 2), array('weight' => 1)),\n array(array('weight' => 2), array('weight' => 2), array('weight' => 2), array('weight' => 2), array('weight' => 2), array('weight' => 1))\n );\n }", "function scoreBMI(){\n //Find the BMI of the user, and compare that to others.\n $userGender=$_POST[\"gender\"];\n $calcHeight=($_POST[\"height-ft\"] * 12)+$_POST[\"height-in\"];\n $userHeight=$calcHeight*2.54/100;\n $userWeight=($_POST[\"weight\"]*0.453592);\n\n $userBMI=$userWeight / pow($userHeight,2);\n if($userBMI < 18.5){\n $BMIpoints=7.5;\n } elseif($userBMI > 18.5 && $userBMI < 24.9){\n $BMIpoints=20;\n } elseif($userBMI > 24.9 && $userBMI < 29.9){\n $BMIpoints=10;\n } elseif($userBMI > 29.9){\n $BMIpoints=5;\n }\n return $BMIpoints;\n $url = 'data/bmi.json';\n $JSON = file_get_contents($url);\n $BMI = json_decode($JSON);\n foreach ($BMI as $category) {\n if($category->SEX == $userGender && $category->GEO == $userProvince){\n switch($userGender){\n case \"Males\":\n $baseline=68.5;\n break;\n case \"Females\":\n $baseline=73.5;\n break;\n }\n }\n }\n}", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function createWeightTable()\r\n\t{\r\n\t\t$query = 'CREATE TABLE `usdaWeight` (\r\n\t\t\t`id` int(3) unsigned NOT NULL auto_increment,\r\n\t\t\t`NDB_No` int(5) unsigned zerofill NOT NULL default \"00000\",\r\n\t\t\t`Seq` int(2) unsigned NOT NULL default 0,\r\n\t\t\t`Amount` double default NULL,\r\n\t\t\t`Msre_Desc` varchar(80) default NULL,\r\n\t\t\t`Gm_Wgt` double default NULL,\r\n\t\t\t`Num_Data_Pts` int(3) default NULL,\r\n\t\t\t`Std_Dev` double default NULL,\r\n\t\t\tPRIMARY KEY (`id`),\r\n\t\t\tUNIQUE KEY `NDB_No` (`NDB_No`,`Seq`)\r\n\t\t) ENGINE=MyISAM AUTO_INCREMENT=13088 DEFAULT CHARSET=utf8 COMMENT=\"USDA WEIGHT\"';\r\n\t\t$this->_db->setQuery($query);\r\n\t\treturn $this->_db->query();\r\n\t}", "public function definition()\n { \n $height = rand(160, 170);\n $weight = rand(45, 90);\n \n return [\n 'personnel_id' => $this->faker->unique()->numberBetween(1, Personnel::count()),\n 'height' => $height,\n 'weight' => $weight,\n 'bmi' => $this->bmi($weight, ($height/100))\n ];\n \n }", "public function spreadWeightValues(array $values)\n {\n // Don't allow an empty value list\n if (count($values) === 0) {\n require_once 'Zend/Tag/Exception.php';\n throw new Zend_Tag_Exception('Value list may not be empty');\n }\n\n // Re-index the array\n $values = array_values($values);\n\n // If just a single value is supplied simply assign it to to all tags\n if (count($values) === 1) {\n foreach ($this->_items as $item) {\n $item->setParam('weightValue', $values[0]);\n }\n } else {\n // Calculate min- and max-weight\n $minWeight = null;\n $maxWeight = null;\n\n foreach ($this->_items as $item) {\n if ($minWeight === null && $maxWeight === null) {\n $minWeight = $item->getWeight();\n $maxWeight = $item->getWeight();\n } else {\n $minWeight = min($minWeight, $item->getWeight());\n $maxWeight = max($maxWeight, $item->getWeight());\n }\n }\n\n // Calculate the thresholds\n $steps = count($values);\n $delta = ($maxWeight - $minWeight) / ($steps - 1);\n $thresholds = [];\n\n for ($i = 0; $i < $steps; $i++) {\n $thresholds[$i] = floor(100 * log(($minWeight + $i * $delta) + 2));\n }\n\n // Then assign the weight values\n foreach ($this->_items as $item) {\n $threshold = floor(100 * log($item->getWeight() + 2));\n\n for ($i = 0; $i < $steps; $i++) {\n if ($threshold <= $thresholds[$i]) {\n $item->setParam('weightValue', $values[$i]);\n break;\n }\n }\n }\n }\n }", "public function updateBMI(\\Illuminate\\Http\\Request $request)\r\n {\r\n try {\r\n $user = $this->userRepo->getUser($request->get('user_id'));\r\n $user = $this->processBMI($request->get('height'), $request->get('weight'), $user);\r\n if ($user->save()) {\r\n return Helpers::getResponse(200, \"User Information save successfully\", $user->only(['height', 'weight', 'BMI', 'BMI_state', 'BMI_score']));\r\n } else {\r\n return Helpers::getResponse(500, \"Something went wrong\");\r\n }\r\n } catch (UserNotFoundException $e) {\r\n $e->setMessage(Constants::NO_USER_FOUND);\r\n return $e->sendUserNotFoundExceptionResponse();\r\n }\r\n }", "public static function GetUserWeightArray($weight_before, $bmi)\n {\n $data = self::GetWeightGainArray($bmi);\n $result = array();\n for ($i = 1; $i <= 40; $i++) {\n $result[$i] = sprintf(\"%01.2f\", $weight_before + $data[$i]);\n }\n\n return $result;\n }", "static public function get_params($weight) {\n $params = array();\n $params[self::SHORT_NAME.'weight'] = $weight;\n return $params;\n }", "function weighted_random_simple($values, $weights){ \n $count = count($values); \n $i = 0; \n $n = 0; \n $num = mt_rand(0, array_sum($weights)); \n while($i < $count){\n $n += $weights[$i]; \n if($n >= $num){\n break; \n }\n $i++; \n } \n return $values[$i]; \n}", "function calcBMR($sex, $weight, $height, $age)\r\n{\r\n if ($sex == 'M' || $sex == 'm' || $sex == 'MALE' || $sex == 'male')\r\n {\r\n echo \"<div style=\\\"text-align:center\\\">\";\r\n\r\n $BMR = 66.4720 + (13.7516 * $weight) + (5.0033 * $height) - (6.7550 * $age);\r\n echo \"<br> Your BMR = \";\r\n echo number_format($BMR, 1);\r\n \r\n }\r\n\r\n else if ($sex == 'F' || $sex == 'f' || $sex == 'FEMALE' || $sex == 'female')\r\n {\r\n $BMR = 655.0955 + (9.5634 * $weight) + (1.8496 * $height) - (4.6756 * $age);\r\n echo \"<br> Your BMR = \";\r\n echo number_format($BMR, 1);\r\n \r\n }\r\n\r\n else\r\n {\r\n echo \"<br> Error in value entered. Results will be incorrect. Please take the test again. Thanks!\";\r\n $BMR = 0; \r\n \r\n }\r\n\r\n return $BMR;\r\n\r\n}", "abstract protected function getWeightFeatures();", "function getWeight(){return $this->weight;}", "private function _calculate_weights($factors, $weights)\n\t{\n\t\tforeach ($factors as $weight_factor => $value)\n\t\t{\n\t\t\t$this->_weight[$weight_factor] = (int) ($weights['search_weight_' . $weight_factor] ?? 0);\n\t\t\t$this->_weight_total += $this->_weight[$weight_factor];\n\t\t}\n\t}", "public function weighted_chance($values, $weights = array(), $debug = ''){\n\n /*\n $debug2 = array();\n foreach ($values AS $k => $v){ $debug2[$v] = $weights[$k]; }\n $this->events_create(false, false, 'DEBUG', trim(preg_replace('/\\s+/', ' ', (\n (!empty($debug) ? '$debug:'.$debug.'<br />' : '').\n '$values/weights:'.nl2br(print_r($debug2, true)).'<br />'.\n ''\n ))));\n */\n\n // Count the number of values passed\n $value_amount = count($values);\n\n // If no weights have been defined, auto-generate\n if (empty($weights)){\n $weights = array();\n for ($i = 0; $i < $value_amount; $i++){\n $weights[] = 1;\n }\n }\n\n // Calculate the sum of all weights\n $weight_sum = array_sum($weights);\n\n // Define the two counter variables\n $value_counter = 0;\n $weight_counter = 0;\n\n // Randomly generate a number from zero to the sum of weights\n $random_number = mt_rand(0, array_sum($weights));\n while($value_counter < $value_amount){\n $weight_counter += $weights[$value_counter];\n if ($weight_counter >= $random_number){ break; }\n $value_counter++;\n }\n\n //$debug = array('$values' => $values, '$weights' => $weights);\n //$this->events_create(false, false, 'DEBUG', '<pre>'.preg_replace('#\\s+#', ' ', print_r($debug, true)).'</pre>');\n\n // Return the random element\n return $values[$value_counter];\n\n }", "function values($price, $weight=0.45){\n $price = $price + ($price * $weight);\n return $price;\n}", "public function setWeight($weight)\n {\n $this->weight = $weight;\n }", "public static function GetBMIId($bmi)\n {\n if ($bmi < self::BMI1)\n return '1';\n elseif ($bmi > self::BMI2)\n return '3';\n else\n return '2';\n }", "public function setWeight($weight) {\n $this->weight = $weight;\n return $this;\n }", "public function setWeight($weight)\n {\n $this->weight = $weight;\n return $this;\n }", "public function providerGetReadableWeights() {\n return array(\n array(\n array(StatsCategories::B_TOTAL => 1.0),\n 'b_total_100'\n ),\n array(\n array(\n StatsCategories::B_HOME_AWAY => .5,\n StatsCategories::P_HOME_AWAY => .5\n ),\n 'b_home_away_50__p_home_away_50'\n )\n );\n }", "function set_weight($weight) {\n $this->weight = $weight;\n }", "public function setWeight($weight=1)\n\t{\n\t\t$this->weight = intval($weight);\n\t}", "public function setWeight($weight)\n {\n $this->weight = $weight;\n\n return $this;\n }", "public function setWeight($weight)\n {\n $this->weight = $weight;\n\n return $this;\n }", "public function setWeight($weight)\n {\n $this->weight = $weight;\n\n return $this;\n }", "function getValuesWeight(){\n\t\t//$this->db->select('*'); // <-- There is never any reason to write this line!\n\t\t$this->db->from('fuzzyweight');\n\t\t$this->db->order_by(\"u_w\", \"asc\");\n\n\t\t$query = $this->db->get();\n\n return $query->result();\n\t}", "abstract public function setWeight(array $questions): array ;", "private static function _generate_value_matrix ($functions = null)\n {\n if ( is_null($functions) ) {\n $functions = static::$_value_functions;\n }\n // The Map loader has guaranteed that the decay value array exactly\n // matches the dimensions of the map, so...\n $matrix = array_map(function($map_row, $decay_row) use ($functions){\n return array_map(function($location, $decay_pct) use ($functions){\n foreach ($functions as $regex => $score) {\n if ( preg_match(\"/$regex/\", $location) === 1 ) {\n // This little bit of math makes it so that younger\n // enemy tiles are more valuable than older ones and\n // older own tiles are less of an obstacle. This\n // slightly changes the balance of tile ages in the\n // game so that opponents have more old tiles and the\n // bot's team has slightly younger tiles overall.\n return $score * (1 - $decay_pct);\n }\n }\n return 0;\n }, $map_row, $decay_row);\n }, Map::get_all(), Map::get_all_decay_pct());\n // Run through all the bots in the game and halve the negative scores\n // of any bots that aren't moving, since they're less of a hazard.\n $bots = Map::get_bots();\n foreach ($bots as $location => $bot) {\n if ( $bot->status() == 'inactive' ) {\n // The \"hazard\" value for this bot's coordinates can be reduced,\n // since it isn't moving.\n $matrix[$bot->y][$bot->x] /= 2;\n }\n }\n return $matrix;\n }", "private function set_biometric_data($arr){\r\n\t\t$err=null;\r\n\t\ttry{\r\n \t\t$hf=$this->vc->exists('height_ft',$arr,\"integer\",array(\"rangex_low\"=>0,\"rangex_high\"=>8),true,false);\r\n \t\t$hi=$this->vc->exists('height_in',$arr,\"integer\",array(\"range_low\"=>0,\"rangex_high\"=>12),true,false);\r\n \t\t\r\n \t\t$this->data['biometric_data']['height']=($hf*12)+$hi;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please select your height in feet and inches\";\r\n \t\t$eob->name = \"Height\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('weight',$arr,\"numeric\",array(\"rangex_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['weight']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter you weight in pounds\";\r\n \t\t$eob->name = \"Weight\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('bp_systolic',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['bp_systolic']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your blood pressure systolic value\";\r\n \t\t$eob->name = \"Systolic\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('bp_diastolic',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['bp_diastolic']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for you blood pressure diastolic value\";\r\n \t\t$eob->name = \"Diastolic\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('body_fat',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['body_fat']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your percent body fat\";\r\n \t\t$eob->name = \"Percent Body Fat\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\r\n \t$height=$this->data['biometric_data']['height'];\r\n \tif($height>0){\r\n \t\t\t$this->data['biometric_data']['bmi']=($this->data['biometric_data']['weight']*703)/pow($height,2);\r\n \t}else{\r\n \t\t\t$this->data['biometric_data']['bmi']=0;\r\n \t}\r\n \t\t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('waist',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['waist']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your waist circumference in inches\";\r\n \t\t$eob->name = \"Waist size\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n \ttry{\r\n \t\t$v=$this->vc->exists('blood_glucose',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['blood_glucose']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your blood glucose level\";\r\n \t\t$eob->name = \"Blood Glucose\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('hemoglobin',$arr,\"numeric\",array(\"precision\"=>\"3,3\"),true,false);\r\n \t\t$this->data['biometric_data']['hemoglobin']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number of your blood hemoglobin level\";\r\n \t\t$eob->name = \"Hemoglobin\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('cotinine',$arr,\"numeric\",array(\"precision\"=>\"3,3\"),true,false);\r\n \t\t$this->data['biometric_data']['cotinine']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your blood cotinine (nicotine) level\";\r\n \t\t$eob->name = \"Cotinine\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n \ttry{\r\n \t\t$v=$this->vc->exists('cholesterol',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['cholesterol']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your total cholesterol level\";\r\n \t\t$eob->name = \"Total cholesterol\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('triglycerides',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['triglycerides']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your level of triglycerides\";\r\n \t\t$eob->name = \"Triglycerides\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('hdl',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['hdl']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your HDL cholesterol level\";\r\n \t\t$eob->name = \"HDL\";\r\n \t\t$err[] = $eob;\r\n \t} \t \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('ldl',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['ldl']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your LDL cholesterol level\";\r\n \t\t$eob->name = \"LDL\";\r\n \t\t$err[] = $eob;\r\n \t}\r\n \treturn ($err)?$err:false;\r\n\t}", "function setWeight($minweight = 50) {\n echo \"The height is : $minweight <br>\";\n}", "public function setWeight(Weight $weight)\n {\n $this->values['Weight'] = $weight;\n return $this;\n }", "public function setWeight(Weight $weight)\n {\n $this->values['Weight'] = $weight;\n return $this;\n }", "public function __construct($name, $age, $weight, $height)\n {\n $this->name = $name;\n $this->age = $age;\n $this->weight = $weight;\n $this->height = $height;\n }", "public function matrixMaker($words){\n $matrix = [];\n $info = [];\n for($i=0;$i<count($words);$i++){\n $ok = 0;\n while($ok<1){\n $maker = $this->hMaker($matrix, $words[$i]);\n $ok = $maker['status'];\n }\n $matrix = $maker['matrix'];\n $info[$words[$i]] = ['start'=>$maker['start'], 'type'=>$maker['type']];\n }\n for($i=0;$i<15;$i++){\n for($j=0;$j<15;$j++){\n if(empty($matrix[$i][$j])){\n $matrix[$i][$j] = $this->assign_rand_value(rand(1,26));\n }\n }\n }\n return ['matrix'=>$matrix, 'info'=>$info];\n }", "function kategoriberatbadan($g, $bb, $tb){\n\tif($g == \"Wanita\"){\n\t\tif(bmi($bb,$tb) < 18 ){\n\t\t\t$ket = \"Under Weight / Kurus dan saran dari kami sebaiknya mulai menambah berat badan dan mengkonsumsi makanan berkarbohidrat di imbangi dengan olah raga.\";\n\t\t}elseif (bmi($bb,$tb) >=18 && bmi($bb,$tb) <=25) {\n\t\t\t$ket = \"Normal Weight / Normal dan berat badan anda termasuk kategori ideal.\";\n\t\t}elseif (bmi($bb,$tb) > 25 && bmi($bb,$tb) <=27) {\n\t\t\t$ket = \"Over Weight / Kegemukan dan anda sudah masuk kategori gemuk. Saran dari kami sebaiknya hindari makanan berlemak dan mulailah meningkatkan olahraga seminggu minimal 2 kali.\";\n\t\t}elseif (bmi($bb,$tb) > 27) {\n\t\t\t$ket= \"Obesitas dan saran dari kami sebaiknya segera membuat program menurunkan berat badan karena anda termasuk kategori obesitas/ terlalu gemuk dan tidak baik bagi kesehatan.\";\n\t\t}\n\t}elseif ($g == \"Pria\") {\n\t\tif(bmi($bb,$tb) < 17 ){\n\t\t\t$ket = \"Under Weight / Kurus dan saran dari kami tambah konsumsi makanan berkalori.\";\n\t\t}elseif (bmi($bb,$tb) >= 17 && bmi($bb,$tb) <=23) {\n\t\t\t$ket = \"Normal Weight / Normal dan selamat berat badan anda termasuk ideal.\";\n\t\t}elseif (bmi($bb,$tb) > 23 && bmi($bb,$tb) <=27) {\n\t\t\t$ket = \"Over Weight / Kegemukan dan harus waspada.\";\n\t\t}elseif (bmi($bb,$tb) > 27) {\n\t\t\t$ket = \"Obesitas dan saran dari kami sebaiknya memulai program menurunkan berat badan agar lebih ideal.\";\n\t\t}\n\t}\nreturn $ket;\n}", "public function getWeightings() {\n\t\treturn $this->_weights;\n\t}", "function getCompatibilityByWeight($searchee=array(), $candidate=array(), $type=1){\r\n\t\t$commonItems = 0;\r\n\t\t$sim = 0;\r\n\t\tforeach($searchee[\"MemberAttributeWeight\"] as $weight_searchee){\r\n\t\t\tforeach($candidate[\"MemberAttributeWeight\"] as $weight_candidate){\r\n\t\t\t\tif ($weight_searchee[\"attribute_id\"]==$weight_candidate[\"attribute_id\"]){\r\n\t\t\t\t\t$attribute = $this->controller->Attribute->find(\"first\", array(\"conditions\"=>array(\"Attribute.id\"=>$weight_candidate[\"attribute_id\"])));\r\n\t\t\t\t\t//if ($attribute[\"attribute_type_id\"]==$type){\r\n\t\t\t\t\t\t$commonItems++;\r\n\t\t\t\t\t\t$weight1 = $weight_searchee[\"weight\"];\r\n\t\t\t\t\t\t$weight2 = $weight_candidate[\"weight\"];\r\n\t\t\t\t\t\t$sim+=pow(($weight1-$weight2), 2);\r\n\t\t\t\t\t//}\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($commonItems>0){\r\n\t\t\t$sim = sqrt($sim/$commonItems);\r\n\t\t\t$sim = 1 - tanh($sim);\r\n\t\t\t$maxItems = min(count($searchee[\"MemberAttributeWeight\"]), count($candidate[\"MemberAttributeWeight\"]));\r\n\t\t\t$sim = $sim * ($commonItems/$maxItems);\r\n\t\t}\r\n\t\treturn $sim;\r\n\t}", "public function weights() {\n\n if(!$this->app->session->get('userID')) {\n return $this->generateResponse(401);\n }\n\n if((!$weights = $this->weight->weights($this->app->session->get('userID')))) {\n $this->response = array('weights' => false);\n } else {\n\n foreach($weights as $weight) {\n $data[] = ['id' => $weight['weight_id'],\n 'weight_id' => $weight['weight_id'],\n 'date' => $weight['weighed_date'],\n 'weight' => $weight['weight'],\n 'change' => $weight['change']];\n }\n\n $this->response = array('weights' => $data);\n\n }\n\n return $this->generateResponse();\n\n }", "public function getWeightColumns() {\n $out = array();\n foreach ($this->_relationConfig as $i => $conf) {\n $out[] = $conf[self::WEIGHT_COLUMN_KEY];\n }\n return $out;\n }", "public static function cmac_normalize_weights($weights)\n {\n $sum = array_sum($weights);\n if( $sum == 0 )\n {\n return $weights;\n }\n\n foreach($weights as $index => $weight)\n {\n $weights[$index] = round($weight / $sum * 100);\n }\n\n $new_sum = array_sum($weights);\n $rand_key = array_rand($weights, 1);\n\n if( $new_sum != 100 )\n {\n $weights[$rand_key] += 100 - $new_sum;\n }\n return $weights;\n }", "function getWeight() { return $this->_weight; }", "public static function scaleImageSize($w, $h, $mw, $mh)\n {\n foreach(array('w','h') as $v)\n {\n $m = \"m{$v}\";\n\n if(${$v} > ${$m} && ${$m}) { $o = ($v == 'w') ? 'h' : 'w';\n $r = ${$m} / ${$v}; ${$v} = ${$m}; ${$o} = ceil(${$o} * $r); }\n }\n\n // Return the results\n return array(0 => $w, 1 => $h, 'width' => $w, 'height' => $h);\n }", "function w_rand($weights)\n {\n $r = mt_rand(1,1000);\n $offset = 0;\n foreach ($weights as $k => $w)\n {\n $offset += $w*10;\n if ($r <= $offset)\n return $k;\n }\n }", "private function score_biometric_data(){\t\t\r\n\t\t$data = $this->data['biometric_data'];\r\n\t\t$bp_systolic = $data['bp_systolic'];\r\n\t\tif ($bp_systolic > 140) $bp_systolic = 1;\r\n\t\telse if ($bp_systolic > 120) $bp_systolic = 3;\r\n\t\telse if ($bp_systolic == 0) $bp_systolic = 0;\r\n\t\telse $bp_systolic = 5;\r\n\t\t\t\r\n\t\tif ($data['bp_diastolic'] > 90) $bp_diastolic = 1;\r\n\t\telse if ($data['bp_diastolic'] > 80) $bp_diastolic = 3;\r\n\t\telse if ($data['bp_diastolic'] == 0) $bp_diastolic = 0;\r\n\t\telse $bp_diastolic = 5;\r\n\t\t\r\n\t\t$body_fat = 5;\r\n\t\tif ($this->demographics['gender'] == \"M\") {\r\n\t\t\tif ($this->demographics['age'] >= 60){\r\n\t\t\t\tif ($data['body_fat'] > 24.1) $body_fat = 1;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else if ($this->demographics['age'] >= 40) {\r\n\t\t\t\tif ($data['body_fat'] > 24.1) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 23.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else{\r\n\t\t\t\tif ($data['body_fat'] > 23.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 19.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif ($this->demographics['age'] >= 60) {\r\n\t\t\t\tif ($data['body_fat'] > 31.5) $body_fat = 1;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else if ($this->demographics['age'] >= 40) {\r\n\t\t\t\tif ($data['body_fat'] > 31.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 30.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else{\r\n\t\t\t\tif ($data['body_fat'] > 30.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 23.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\t\t\t\t\t\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\r\n\t\t$waist = 5;\r\n\t\tif ($this->demographics['gender'] == 'M') {\r\n\t\t\tif ($data['waist'] > 40) {\r\n\t\t\t\t$waist = 1;\r\n\t\t\t}\r\n\t\t\telse if ($data['waist'] == 0) {\r\n\t\t\t\t$waist = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($data['waist'] > 35) {\r\n\t\t\t\t$waist = 1;\r\n\t\t\t}\r\n\t\t\telse if ($data['waist'] == 0) {\r\n\t\t\t\t$waist = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$bmi = 3;\r\n\t\tif ($data['bmi'] > 30) $bmi = 1;\r\n\t\telse if ($data['bmi'] > 25) $bmi = 3;\r\n\t\telse if ($data['bmi'] > 18) $bmi = 5;\r\n\t\telse if ($data['bmi'] == 0) $bmi = 0;\r\n\t\t$data['bmi'] = sprintf(\"%.1f\", $data['bmi']);\r\n\r\n\t\t$blood_glucose = 5;\r\n\t\tif ($data['blood_glucose'] > 200) $blood_glucose = 1;\r\n\t\telse if ($data['blood_glucose'] > 129) $blood_glucose = 3;\t\t\t\r\n\t\telse if ($data['blood_glucose'] == 0) $blood_glucose = 0;\r\n\t\t\r\n\t\t$cholesterol = 5;\r\n\t\tif ($data['cholesterol'] > 239) $cholesterol = 1;\r\n\t\telse if ($data['cholesterol'] > 199) $cholesterol = 3;\t\t\t\r\n\t\telse if ($data['cholesterol'] == 0) $cholesterol = 0;\r\n\t\t\t\t\t\r\n\t\t$triglycerides = 5;\r\n\t\tif ($data['triglycerides'] > 200) $triglycerides = 1;\r\n\t\telse if ($data['triglycerides'] > 149) $triglycerides = 3;\t\t\t\r\n\t\telse if ($data['triglycerides'] == 0) $triglycerides = 0;\r\n\t\t\t\t\t\r\n\t\t$hdl = 1;\r\n\t\tif ($this->demographics['gender'] == 'F') {\r\n\t\t\tif ($data['hdl'] > 40) $hdl = 5;\r\n\t\t\telse if ($data['hdl'] > 30) $hdl = 3;\r\n\t\t\telse if ($data['hdl'] == 0) $hdl = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($data['hdl'] > 50) $hdl = 5;\r\n\t\t\telse if ($data['hdl'] > 35) $hdl = 3;\r\n\t\t\telse if ($data['hdl'] == 0) $hdl = 0;\r\n\t\t}\r\n\r\n//\t\tif($data['hdl']>59) $hdl=5;\r\n//\t\telse if($data['hdl']>40) $hdl=3;\r\n//\t\telse if($data['hdl']==0) $hdl=0;\r\n\r\n\t\t$ldl = 5;\r\n\t\tif ($data['ldl'] > 140) $ldl = 1;\r\n\t\telse if ($data['ldl'] > 100) $ldl = 3;\r\n\t\telse if ($data['ldl'] == 0) $ldl = 0;\r\n\r\n\t\tif($data['hdl'] > 0 && $data['cholesterol'] > 0)\r\n\t\t\t$ratio = $data['cholesterol'] / $data['hdl'];\r\n\t\telse\r\n\t\t\t$ratio = 0;\r\n\t\t\r\n\t\t$ratio = sprintf(\"%.1f\", $ratio);\r\n\r\n\t\t$tc_hdl = 5;\r\n\t\tif ($ratio > 4.5) $tc_hdl = 1;\r\n\t\telse if ($ratio == 0) $tc_hdl = 0;\r\n\r\n\r\n\t\t$hemoglobin = 5;\r\n\t\tif ($data['hemoglobin'] == 0)\r\n\t\t\t$hemoglobin = 0;\r\n\t\telse if (($data['hemoglobin'] < 4.0) || ($data['hemoglobin'] > 6.0)) {\r\n\t\t\t$hemoglobin = 1;\r\n\t\t}\r\n\r\n\t\t$cotinine = 5;\r\n\t\tif ($data['cotinine'] > 0) {\r\n\t\t\t$cotinine = 1;\r\n\t\t}\r\n\r\n\t\t$ob = new stdClass();\r\n\t\t$ob->total = 0;\r\n\t\t$ob->data = array('bp_systolic' => array($bp_systolic,.0625, 0.0, $data['bp_systolic']),\r\n\t\t\t\t\t\t'bp_diastolic' => array($bp_diastolic,.0625, 0.0, $data['bp_diastolic']),\r\n\t\t\t\t\t\t'body_fat' => array($body_fat,.125, 0.0, $data['body_fat']),\r\n\t\t\t\t\t\t'bmi' => array($bmi,.0625, 0.0, $data['bmi']),\r\n\t\t\t\t\t\t'waist' => array($waist, .0625, 0.0, $data['waist']),\r\n\t\t\t\t\t\t'blood_glucose' => array($blood_glucose,.0417, 0.0, $data['blood_glucose']),\r\n\t\t\t\t\t\t'hemoglobin' => array($hemoglobin,.0417, 0.0, $data['hemoglobin']),\r\n\t\t\t\t\t\t'cotinine' => array($cotinine,.0416, 0.0, $data['cotinine']),\r\n\t\t\t\t\t\t'cholesterol' => array($cholesterol,.1, 0.0, $data['cholesterol']),\r\n\t\t\t\t\t\t'triglycerides' => array($triglycerides,.1, 0.0, $data['triglycerides']),\r\n\t\t\t\t\t\t'hdl' => array($hdl,.1, 0.0, $data['hdl']),\r\n\t\t\t\t\t\t'ldl' => array($ldl,.1, 0.0, $data['ldl']),\r\n\t\t\t\t\t\t'tc_hdl' => array($tc_hdl,.1, 0.0, $ratio));\r\n\t\tforeach($ob->data as &$rec){\r\n\t\t\t$rec[2] = $rec[0] * $rec[1];\r\n\t\t\t$ob->total += $rec[2];\r\n\t\t}\r\n\t\treturn $ob;\r\n\t}", "function IMC($name, $weightKg, $heightCm){\n $heightM = $heightCm/100;\n $heightCarre = $heightM * $heightM;\n $IMC = $weightKg/$heightCarre;\n $message = \"Bonjour $name , votre IMC est $IMC\";\n return $message;\n\n}", "function get_weight() {\n\t\tif ($this->data['weight']) return $this->data['weight'];\n\t}", "private function score_weight_nutrition(){\r\n\t\t$data = $this->data['weight_nutrition'];\r\n\r\n\t\t$q21 = $this->scoreValue(array(5,1,3),$data['q21']);\r\n\t\t$q22 = $this->scoreValue(array(1,3,5),$data['q22']);\r\n\r\n\t\t$qn24 = $this->scoreValue(array(1,2,3,4,5), $data['qn24']);\r\n\t\t$qn25 = $this->scoreValue(array(1,2,3,4,5), $data['qn25']);\r\n\r\n\t\t//fruit & veg _1 & 2\r\n\t\t$q23a = 0;\r\n\t\t$f = $data['q23_1'];\r\n\t\t$v = $data['q23_2'];\r\n\t\t\r\n\t\tif ($f > 0) $f--;\r\n\t\tif ($v > 0) $v--;\r\n\t\t$table = array(\r\n\t\t array(1,1,1,2,2),\t\r\n\t\t array(1,1,2,2,3),\r\n\t\t array(1,2,2,3,3),\r\n\t\t array(2,2,3,4,5),\r\n\t\t array(2,3,3,5,5),\r\n\t\t);\r\n\t\t$q23a = $table[$v][$f];\r\n\t\t\r\n\t\t//Fats\r\n\t\t$q23b = 0;\r\n\t\tfor($x = 3; $x <= 7; $x++){\r\n\t\t\t$q23b += $this->scoreValue(array(0,3,5,12,25),$data['q23_'.$x]);\r\n\t\t}\r\n\t\t$q23b = $q23b/5;\r\n\t\tif ($q23b > 10) $q23b = 1;\r\n\t\telse if ($q23b > 5.1) $q23b = 2;\r\n\t\telse if ($q23b > 3.2) $q23b = 3;\r\n\t\telse if ($q23b > 2) $q23b = 4;\r\n\t\telse $q23b = 5;\r\n\t\t\r\n\t\t///breads & Grains _8\r\n\t\t$q23c = $this->scoreValue(array(0,3,5,12,25),$data['q23_8']);\r\n\t\tif ($q23c > 12) $q23c = 5;\r\n\t\telse if ($q23c > 8) $q23c = 4;\r\n\t\telse if ($q23c > 4.9) $q23c = 3;\r\n\t\telse if ($q23c > 3) $q23c = 2;\r\n\t\telse $q23c = 1;\r\n\t\t\r\n\t\t$ob=new stdClass();\r\n\t\t$ob->total=0;\r\n\t\t$ob->data=array('q21'=>array($q21,.1),\r\n\t\t\t\t\t\t'q22'=>array($q22,.1),\r\n\t\t\t\t\t\t'q23_1'=>array($q23a,.25),\r\n\t\t\t\t\t\t'q23_2'=>array($q23b,.25),\r\n\t\t\t\t\t\t'q23_3'=>array($q23c,.1),\r\n\t\t\t\t\t\t'qn24'=>array($qn24,.1),\r\n\t\t\t\t\t\t'qn25'=>array($qn25,.1)\r\n\t\t);\r\n\t\tforeach($ob->data as &$rec){\r\n\t\t\t$rec[2]=$rec[0]*$rec[1];\r\n\t\t\t$ob->total+=$rec[2];\r\n\t\t}\r\n\t\treturn $ob;\r\n\t}", "public function get_weight(){\n\t\treturn $this->weight;\n\t}", "public function __construct($weight, UnitOfMeasure $unitOfMeasure)\n {\n $this->weight = $weight;\n $this->unitOfMeasure = $unitOfMeasure;\n }", "public function setWeight() {\n }", "public function getWeight() \r\n {\r\n return $this->weight;\r\n }", "public function setBiometricDefaults(){\r\n \t\r\n \tif($this->data['biometric_data']['height']==\"0\"){ \t\t\r\n \t\t$this->data['biometric_data']['height']=(intval($this->demographics['height_ft'])*12)+$this->demographics['height_in']; \t\t\r\n \t} \t\r\n \t\r\n \t//get last weight entered\r\n \tif($this->data['biometric_data']['weight']==\"0\"){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackWeightModel.php\");\r\n \t\t$w=new UserTrackWeightModel($this->id); \r\n \t\t$weight=$w->getLastEntry();\r\n \t\t$this->data['biometric_data']['weight']=($weight)?$weight['weight']:0;\r\n \t}\r\n \t\r\n \t\t//get last bp entered\r\n \tif($this->data['biometric_data']['bp_systolic']==\"0\"){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackBPModel.php\");\r\n \t\t$bp= new UserTrackBPModel($this->id);\r\n \t\t$data=$bp->getLastEntry(); \t\t\r\n \t\t$this->data['biometric_data']['bp_systolic']=($data)?$data['systolic']:0;\r\n \t\t$this->data['biometric_data']['bp_diastolic']=($data)?$data['diastolic']:0; \t\t\t \t\t\r\n \t}\r\n \t\r\n \t//calculate current BMI\r\n \tif($this->data['biometric_data']['bmi']==0){ \t\t\r\n \t\tif($this->data['biometric_data']['height']!=0){ \t\t\t\r\n \t \t\t$this->data['biometric_data']['bmi']=round($this->data['biometric_data']['weight']/pow($this->data['biometric_data']['height'],2)*703,2); \t\t\t\r\n \t\t}\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackMeasurementsModel.php\");\r\n\t\t\t\t$mm = new UserTrackMeasurementsModel($this->id);\r\n\t\t\t\t$data = $mm->getLastEntry();\r\n \t\t$this->data['biometric_data']['waist'] = ($data['waist']) ? $data['waist'] : 0;\r\n \t}\r\n \t\r\n \t//get Last Entered Blood Glucose\r\n \tif($this->data['biometric_data']['blood_glucose']==0){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackBloodGlucoseModel.php\");\r\n \t\t$bg= new UserTrackBloodGlucoseModel($this->id);\r\n \t\t$data=$bg->getLastEntry();\r\n \t\tif ($data['random']['date_entered'] > $data['fasting']['date_entered']) {\r\n\t \t\t$this->data['biometric_data']['blood_glucose']=$data['random']['blood_glucose'];\r\n\t \t\t$this->data['glucose_test'] = 'random';\r\n\t \t}\r\n\t \telse {\r\n\t \t\t$this->data['biometric_data']['blood_glucose'] = $data['fasting']['blood_glucose'];\r\n\t \t\t$this->data['glucose_test'] = 'fasting';\r\n\t \t}\r\n\t\t\t\tif (!isset($this->data['biometric_data']['hemoglobin']))\r\n\t \t\t$this->data['biometric_data']['hemoglobin'] = 0;\r\n\t\t\t\tif (!isset($this->data['biometric_data']['cotinine']))\r\n\t \t\t$this->data['biometric_data']['cotinine'] = 0;\r\n \t}\r\n \t\r\n //get Last Entered Cholesterol\r\n \tif($this->data['biometric_data']['cholesterol']==0){\r\n \t\trequire_once(ROOT_DIR.\"classes/model/UserTrackCholesterolModel.php\");\r\n \t\t$c= new UserTrackCholesterolModel($this->id);\r\n \t\t$data=$c->getLastEntry(); \t\t\r\n \t\t$this->data['biometric_data']['cholesterol']=($data)?$data['total']:0;\r\n \t\t$this->data['biometric_data']['triglycerides']=($data)?$data['triglycerides']:0;\r\n \t\t$this->data['biometric_data']['hdl']=($data)?$data['hdl']:0;\r\n \t\t$this->data['biometric_data']['ldl']=($data)?$data['ldl']:0;\r\n \t}\r\n \t\t\r\n\t}", "public function setMtSalBrutMoins600H($mtSalBrutMoins600H) {\n $this->mtSalBrutMoins600H = $mtSalBrutMoins600H;\n return $this;\n }", "public function create()\n {\n $sizes = collect([\n ['mm' => '0.80', 'sieve' => '+0000-000', 'carat' => '0.003'],\n ['mm' => '0.90', 'sieve' => '+000-00', 'carat' => '0.004'],\n ['mm' => '1.00', 'sieve' => '+00-0', 'carat' => '0.005'],\n ['mm' => '1.10', 'sieve' => '+0-1.0', 'carat' => '0.006'],\n ['mm' => '1.10', 'sieve' => '+1.0-1.5', 'carat' => '0.007'],\n ['mm' => '1.20', 'sieve' => '+1.5-2.0', 'carat' => '0.008'],\n ['mm' => '1.20', 'sieve' => '+2.0-2.5', 'carat' => '0.009'],\n ['mm' => '1.30', 'sieve' => '+2.5-3.0', 'carat' => '0.010'],\n ['mm' => '1.30', 'sieve' => '+3.0-3.5', 'carat' => '0.011'],\n ['mm' => '1.40', 'sieve' => '+3.5-4.0', 'carat' => '0.012'],\n ['mm' => '1.40', 'sieve' => '+4.0-4.5', 'carat' => '0.014'],\n ['mm' => '1.50', 'sieve' => '+4.5-5.0', 'carat' => '0.015'],\n ['mm' => '1.50', 'sieve' => '+5.0-5.5', 'carat' => '0.017'],\n ['mm' => '1.60', 'sieve' => '+5.5-6.0', 'carat' => '0.020'],\n ['mm' => '1.70', 'sieve' => '+6.0-6.5', 'carat' => '0.023'],\n ['mm' => '1.80', 'sieve' => '+6.5-7.0', 'carat' => '0.027'],\n ['mm' => '1.90', 'sieve' => ' +7.0-7.5', 'carat' => '0.030'],\n ['mm' => '2.00', 'sieve' => '+7.5-8.0', 'carat' => '0.035'],\n ['mm' => '2.10', 'sieve' => ' +8.0-8.5', 'carat' => '0.040'],\n ['mm' => '2.20', 'sieve' => '+8.5-9.0', 'carat' => '0.045'],\n ['mm' => '2.30', 'sieve' => ' +9.0-9.5', 'carat' => '0.053'],\n ['mm' => '2.40', 'sieve' => '+9.5-10.0', 'carat' => '0.060'],\n ['mm' => '2.50', 'sieve' => '+10.0-10.5', 'carat' => '0.070'],\n ['mm' => '2.60', 'sieve' => ' +10.5-11.0', 'carat' => '0.075'],\n ['mm' => '2.70', 'sieve' => '+11.0-11.5', 'carat' => '0.080'],\n ['mm' => '2.80', 'sieve' => '+11.5-12.0', 'carat' => '0.090'],\n ['mm' => '2.90', 'sieve' => ' +12.0-12.5', 'carat' => '0.100'],\n ['mm' => '3.00', 'sieve' => '+12.5-13.0', 'carat' => '0.110'],\n ['mm' => '3.10', 'sieve' => '+13.0-13.5', 'carat' => '0.120'],\n ['mm' => '3.20', 'sieve' => '+13.5-14.0', 'carat' => '0.135'],\n ['mm' => '3.30', 'sieve' => '+14.0-14.5', 'carat' => '0.150'],\n ['mm' => '3.40', 'sieve' => ' +14.5-15.0', 'carat' => '0.160'],\n ['mm' => '3.50', 'sieve' => '+15.0-15.5', 'carat' => '0.170'],\n ['mm' => '3.60', 'sieve' => '+15.5-16.0', 'carat' => '0.180'],\n ['mm' => '3.70', 'sieve' => ' +16.0-16.5', 'carat' => '0.190'],\n ['mm' => '3.80', 'sieve' => '+16.5-17.0', 'carat' => '0.210'],\n ['mm' => '3.90', 'sieve' => '+17.0-17.5', 'carat' => '0.230'],\n ['mm' => '4.00', 'sieve' => ' +17.5-18.0', 'carat' => '0.250'],\n ['mm' => '4.10', 'sieve' => '+18.0-18.5', 'carat' => '0.270'],\n ['mm' => '4.20', 'sieve' => '+18.5-19.0', 'carat' => '0.300'],\n ['mm' => '4.30', 'sieve' => ' +19.0-19.5', 'carat' => '0.320'],\n ['mm' => '4.40', 'sieve' => '+19.5-20.0', 'carat' => '0.340'],\n ]);\n\n // return $sizes;\n return view('sellers.create', compact('sizes'));\n }", "public function __construct(){\n $this->name = \"hobbits\";\n $this->description = \"Shorter than dwarfs. Some are stronger, some faster\";\n $this->picture = \"hobbit.jpg\";\n $this->minmax_life = [60, 80];\n $this->minmax_power = [80, 95];\n $this->minmax_resistance = [60, 80];\n $this->minmax_speed = [80, 100];\n $this->proportions = [\n \"life\" => 1,\n \"power\" => 1,\n \"resistance\" => 1,\n \"speed\" => -1\n ];\n }", "function populasi_awal($jml_individu, $jml_cluster){\n\t\tfor ($i=0; $i < $jml_individu; $i++) { \n\t\t\tfor ($j=0; $j < $jml_cluster; $j++) { \n\t\t\t\t$awal[$i][$j] = rand(0,10);\n\t\t\t}\n\t\t}\n\t\treturn $awal;\n\t}", "function get_product_atrribute_matrix($attribute_include=false, $showHiddenValues=true,$sortingTable = 'tx_commerce_products_attributes_mm'){\n \t\t\n \t\treturn $this->get_product_attribute_matrix($attribute_include, $showHiddenValues,$sortingTable );\n \t}", "public function setWeight(?int $weight)\n {\n $this->weight = $weight;\n\n return $this;\n }", "function generate($difficulty)\r\n {\r\n //$difficulty = 1;\r\n $size = 3;\r\n // randomize numbers\r\n $numbers = range(1, pow($size, 2));\r\n shuffle($numbers);\r\n\r\n // row index sets\r\n $x = 1;\r\n for($i = 1; $i <= pow($size, 2); $i++){\r\n $a = \"rowIndex_\" . $i; //set up variable names eg $rowIndex_1\r\n for($ii = 1; $ii <= pow($size, 2); $ii++){\r\n ${$a}[$ii] = $x; //set up variable eg $rowIndex[0] = 1\r\n $x = $x + 1;\r\n }\r\n $allRows[$i] = $$a; //set up array eg $temp[0] = $rowIndex_1\r\n }\r\n $temp = array_chunk($allRows, $size, true);\r\n foreach($temp as $key => $arrRow){\r\n $a = \"arrRow_\" . $key; // set up variable names\r\n $$a = $arrRow; // set up variable\r\n $arrAllRows[$key] = $$a; // set up array\r\n }\r\n\r\n // column index sets\r\n for($i = 1; $i <= pow($size, 2); $i++){\r\n $a = \"colIndex_\" . $i; // set up variable names\r\n $x = $i;\r\n for($ii = 1; $ii <= pow($size, 2); $ii++){\r\n ${$a}[$ii] = $x; // set up variable\r\n $x = $x + pow($size, 2);\r\n }\r\n $allCols[$i] = $$a; // set up array\r\n }\r\n $temp = array_chunk($allCols, $size, true);\r\n foreach($temp as $key => $arrCol){\r\n $a = \"arrCol_\" . $key; // set up variable names\r\n $$a = $arrCol; // set up variable\r\n $arrAllCols[$key] = $$a; // set up array\r\n }\r\n\r\n // block index sets\r\n $x = 1;\r\n $y = 1;\r\n for($i = 1; $i <= $size; $i++){\r\n for($ii = 1; $ii <= $size; $ii++){\r\n $a = \"blockIndex_\" . $x; // set up variable names\r\n $z = 1;\r\n for($iii = 1; $iii <= $size; $iii++){\r\n for($iv = 1; $iv <= $size; $iv++){\r\n ${$a}[$z++] = $y; // set up variable\r\n $y = $y + 1;\r\n }\r\n $y = $y + ((pow($size, 2)) - ($size));\r\n }\r\n $arrAllBlocks[$x] = $$a; // set up array\r\n $x = $x + 1;\r\n }\r\n $y = ($i * $size) + 1;\r\n }\r\n\r\n // set up basic board\r\n for($i = 1; $i <= pow($size, 2); $i++){\r\n foreach($arrAllBlocks as $block){\r\n $temp = $numbers;\r\n foreach($block as $index){\r\n $data[$index] = array_shift($temp);\r\n }\r\n $firstNumber = array_shift($numbers);\r\n $numbers = array_pad($numbers, pow($size, 2), $firstNumber);\r\n }\r\n }\r\n ksort($data);\r\n\r\n // shuffle rows\r\n for($i = 0; $i <= $size - 2; $i++){\r\n foreach($arrAllRows as $arrRows){\r\n shuffle($arrRows);\r\n $arrRows = array_slice($arrRows, 0, 2); // takes first 2 rows\r\n foreach($arrRows as $key => $row){\r\n foreach($row as $rowKey => $index){\r\n if($key == 0){\r\n $row_1[$rowKey] = $data[$index];\r\n }else{\r\n $row_2[$rowKey] = $data[$index];\r\n }\r\n }\r\n }\r\n foreach($arrRows as $key => $row){ // swops them\r\n foreach($row as $rowKey => $index){\r\n if($key == 0){\r\n $data[$index] = $row_2[$rowKey];\r\n }else{\r\n $data[$index] = $row_1[$rowKey];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // shuffle columns\r\n for($i = 0; $i <= $size - 2; $i++){\r\n foreach($arrAllCols as $arrCols){\r\n shuffle($arrCols);\r\n $arrCols = array_slice($arrCols, 0, 2); // takes first 2 columns\r\n foreach($arrCols as $key => $col){\r\n foreach($col as $colKey => $index){\r\n if($key == 0){\r\n $col_1[$colKey] = $data[$index];\r\n }else{\r\n $col_2[$colKey] = $data[$index];\r\n }\r\n }\r\n }\r\n foreach($arrCols as $key => $col){ // swops them\r\n foreach($col as $colKey => $index){\r\n if($key == 0){\r\n $data[$index] = $col_2[$colKey];\r\n }else{\r\n $data[$index] = $col_1[$colKey];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n $solution = implode(\",\", $data);\r\n\r\n //remove pairs of numbers symetrically\r\n if($difficulty == 1){\r\n $pairs = 16;\r\n }elseif($difficulty == 2){\r\n $pairs = 22;\r\n }elseif($difficulty == 3){\r\n $pairs = 30;\r\n }else{\r\n $pairs = 170;\r\n\t\t\t//$pairs = 0;\r\n }\r\n \r\n\t\t$puzzle1 = implode(\"\", $data);\r\n\t\t\r\n\t\tfor($i = 1; $i <= $pairs; $i++){\r\n do{\r\n $number_1 = rand(1, pow($size, 4));\r\n }while($number_1 == (((pow($size, 4) - 1) / 2) + 1));\r\n $data[$number_1] = '';\r\n $number_2 = (pow($size, 4) + 1) - $number_1;\r\n $data[$number_2] = '';\r\n }\r\n \r\n\t $puzzle = \"\";\r\n //print_r($data);\r\n \r\n\t for($i = 1;$i<count($data)+1;$i++)\r\n {\r\n \tif($data[$i] == \"\")\r\n \t\t$puzzle .= \".\";\r\n \telse \t\r\n \t\t$puzzle .= $data[$i];\r\n }\r\n \r\n $puzzle = array($puzzle, $puzzle1);\r\n return $puzzle;\r\n \r\n }", "public function getWeight() {\n }", "public function initializeM($m, $nb = 25)\n {\n for($j=0; $j<$nb; $j++){\n\n $label = \"m+\".$j;\n\n if ($j == 0) {\n $label = \"m\";\n }\n\n $m[$label] = 0;\n }\n\n return $m;\n \n }", "public function getWeight()\n {\n }", "public function getWeight()\n {\n }", "private function _calculate_weight( $carts )\n\t{\n\t\t$total_weight = 0;\n\t\t$weights = 0;\n\n\t\tforeach( $carts as $cart_product )\n\t\t{\n\t\t\t$product = $cart_product['data'];\n\t\t\t// jika berat kosong (null), berat default diambil dari nilai berat setting JNE\n\t\t\t$weight = ( $product->weight ) ? $product->weight : $this->jne_settings['weight'] ;\n\t\t\t// detai content \n\t\t\t$content = '<tr class=\"row-jne-weight-data\"><td class=\"col-1\">'. $product->post->post_title;\n\t\t\t// memiliki volume\n\t\t\tif( $product->length && $product->width && $product->height ) {\n\t\t\t\t// hitung volume\n\t\t\t\t$volume = $product->length * $product->width * $product->height;\n\t\t\t\t// hitung volumetrik\n\t\t\t\t$volumetik = ($volume / 6000) * $weight;\n\t\t\t\t// Apabila hitungan volumetrik lebih berat dari berat aktual, maka biaya kirim dihitung berdasarkan berat volumetrik.\n\t\t\t\t$weight = ($volumetik > $weight) ? $volumetik : $weight ;\n\t\t\t\t// detai content \n\t\t\t\t$content .= sprintf(' (%sx%sx%s)', $product->length, $product->width, $product->height);\n\t\t\t} \n\t\t\t// detai content \n\t\t\t$content .= '</td><td class=\"col-2\">:</td><td class=\"col-3\">'. $this->_floor_dec($weight).' kg</td></tr>';\n\n\t\t\t// hitung berat per kuantitas\n\t\t\t$weight = $weight * $cart_product['quantity'];\n\t\t\t// increase\n\t\t\t$weights += $weight;\n\n\t\t\t// set detai content \n\t\t\t$this->_tooltip_content .= $content;\n\t\t}\n\t\t\n\t\t// prehitungan toleransi\n\t\tif($weights > 1) {\n\t\t\t$tolerance = $this->jne_settings['tolerance'];\n\t\t\t$_weights = $this->_floor_dec($weights, 2);\n\t\t\t$intval = intval($weights);\n\t\t\t$diff = $_weights - $intval;\n\t\t\t$total_weight = $diff > $tolerance ? ceil($weights) : $intval;\n\n\t\t\t/* uncomment this for debugging\n\t\t\tjne_rate_debug(array(\n\t\t\t\t'weights' => array(\n\t\t\t\t\t'default' => $weights,\n\t\t\t\t\t'precision' => $_weights\n\t\t\t\t),\n\t\t\t\t'fraction' => array(\n\t\t\t\t\t'up' => ceil($weights),\n\t\t\t\t\t'down' => $intval\n\t\t\t\t),\n\t\t\t\t'diff' => array(\n\t\t\t\t\t'default' => $weights - $intval,\n\t\t\t\t\t'precision' => $diff\n\t\t\t\t),\n\t\t\t\t'tolerance' => $tolerance,\n\t\t\t\t'total_weight' => $total_weight\n\t\t\t));\n\t\t\t*/\n\t\t\n\t\t\t$this->_tooltip_content .= '<tr class=\"row-jne-weight-tolerance\"><td class=\"col-1 text-right\">Tolerance</td><td class=\"col-2\">:</td><td class=\"col-3\">'.$tolerance.' kg</td></tr>';\n\t\t} \n\t\telse $total_weight = 1;\n\t\t\t\n\t\t$this->_tooltip_content .= '<tr class=\"row-jne-weight-total\"><td class=\"col-1 text-right\">Total</td><td class=\"col-2\">:</td><td class=\"col-3\">'.$total_weight.' kg</td></tr>';\n\n\t\treturn $total_weight;\n\t}", "public function run()\n {\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 2,\n 'weight' => 1.5\n ]);\n\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 2,\n 'weight' => 4\n ]);\n\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 3,\n 'weight' => 1.5\n ]);\n\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 3,\n 'weight' => 2.5\n ]);\n\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 3,\n 'weight' => 4\n ]);\n\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 4,\n 'weight' => 1.5\n ]);\n\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 4,\n 'weight' => 2.5\n ]);\n\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 4,\n 'weight' => 4\n ]);\n\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 4,\n 'weight' => 6\n ]);\n\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 5,\n 'weight' => 1.5\n ]);\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 5,\n 'weight' => 2.5\n ]);\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 5,\n 'weight' => 4\n ]);\n Cable::create([\n 'name' => 'ВВГ',\n 'count' => 5,\n 'weight' => 6\n ]);\n Cable::create([\n 'name' => 'АВВГ',\n 'count' => 2,\n 'weight' => 2.5\n ]);\n\n Cable::create([\n 'name' => 'АВВГ',\n 'count' => 2,\n 'weight' => 4\n ]);\n Cable::create([\n 'name' => 'АВВГ',\n 'count' => 2,\n 'weight' => 10\n ]);\n\n Cable::create([\n 'name' => 'АВВГ',\n 'count' => 2,\n 'weight' => 16\n ]);\n\n Cable::create([\n 'name' => 'ШВВП',\n 'count' => 2,\n 'weight' => 0.5\n ]);\n Cable::create([\n 'name' => 'ШВВП',\n 'count' => 2,\n 'weight' => 0.75\n ]);\n Cable::create([\n 'name' => 'ШВВП',\n 'count' => 3,\n 'weight' => 0.75\n ]);\n Cable::create([\n 'name' => 'ПВС',\n 'count' => 2,\n 'weight' => 0.75\n ]);\n Cable::create([\n 'name' => 'ПВС',\n 'count' => 2,\n 'weight' => 2.5\n ]);\n Cable::create([\n 'name' => 'ПВС',\n 'count' => 3,\n 'weight' => 2.5\n ]);\n Cable::create([\n 'name' => 'ПВС',\n 'count' => 4,\n 'weight' => 2.5\n ]);\n Cable::create([\n 'name' => 'ПВС',\n 'count' => 4,\n 'weight' => 2.5\n ]);\n\n\n }", "public function getBobotKriteria()\n {\n $query =$this->db->query(\"SELECT * FROM tb_kriteria ORDER BY id_kriteria\");\n \n $criteria = array();\n foreach ($query->result_array() as $row) {\n \n $criteria[$row['id_kriteria']] = $row['weight'];\n\n }\n \n return $criteria;\n }", "function get_atrribute_matrix($articleList=false, $attribute_include=false, $showHiddenValues=true,$sortingTable = 'tx_commerce_articles_article_attributes_mm'){\n \t\treturn $this->get_attribute_matrix($articleList, $attribute_include, $showHiddenValues,$sortingTable);\n \t}", "protected function calcHeight($width, $height)\n {\n $newHeightPercentage = (100 * $this->maxHeight) / $height;\n $newWidth = ($width * $newHeightPercentage) / 100;\n\n return array('width' => ceil($newWidth), 'height' => ceil($this->maxHeight));\n }", "public function getCarePersonWeightAllowableValues()\n {\n return [\n self::CARE_PERSON_WEIGHT_WENIGER_ALS_130KG,\n self::CARE_PERSON_WEIGHT_MEHR_ALS_130KG,\n self::CARE_PERSON_WEIGHT_NOCH_UNKLAR,\n ];\n }", "public function Matrix($wine)\n{\n\tfor($i=0; $i<=$wine; $i++)\n\tfor($j=0; $j<=$wine; $j++) \n\t\n\t$this->glasses[$i][$j]=0;\n}", "protected function getCustomerInfo($currentWeight){\n $customer = $this->_customerSession->getCustomer();\n $newWeight = floatval(str_replace(',','.',$currentWeight));\n $prevWeight = floatval(str_replace(',','.',$customer->getData('body_weight')));\n if($newWeight === $prevWeight){\n $weight = $prevWeight;\n }else{\n $weight = $newWeight;\n $customer->setData('body_weight', $currentWeight)->save();\n }\n $user = [\n 'nof_goal' => strtolower($this->_helper->getCustomerAttrLabel('nof_goal', true, $customer->getData('nof_goal'))),\n 'body_weight' => $weight,\n 'target_weight' => floatval(str_replace(',','.',$customer->getData('target_weight'))),\n 'body_height' => floatval(str_replace(',','.',$customer->getData('body_height'))),\n 'bmi' => $this->getBMI($customer->getData('body_weight'), $customer->getData('body_height')),\n 'work_intensity' => $this->getWorkIntensityValue($customer->getData('work_intensity'))\n ];\n return $user;\n }", "public function __construct($id, $name, $weight, $base, $height, $width)\n {\n $this->id = $id;\n $this->name = $name;\n $this->weight = $weight;\n $this->base = $base;\n $this->height = $height;\n $this->width = $width;\n }", "public function setWeight($num, $weight)\n {\n $this->_weights[$num] = $weight;\n }" ]
[ "0.6889044", "0.6724125", "0.66733015", "0.6540938", "0.6432388", "0.6407645", "0.6347937", "0.63068247", "0.58951604", "0.58021104", "0.57378024", "0.5391214", "0.5338081", "0.5244167", "0.5142047", "0.49500576", "0.49500576", "0.49500576", "0.49500576", "0.49211723", "0.49034935", "0.48137364", "0.4796583", "0.4796583", "0.4796583", "0.4796583", "0.4796583", "0.4796583", "0.4796583", "0.47619277", "0.47550428", "0.47148228", "0.46869054", "0.46761718", "0.46708333", "0.46298796", "0.462122", "0.45672312", "0.45441112", "0.45401204", "0.45078582", "0.44824922", "0.44511873", "0.44434607", "0.44401", "0.44360086", "0.44341126", "0.44305623", "0.4389352", "0.43001935", "0.43001935", "0.43001935", "0.42730632", "0.42620438", "0.4257439", "0.42564884", "0.4252848", "0.42502093", "0.42502093", "0.4242844", "0.42419472", "0.4226908", "0.42192578", "0.42165723", "0.42160198", "0.42030394", "0.41904032", "0.41892087", "0.41890737", "0.41858205", "0.41635427", "0.41593817", "0.41531074", "0.41461828", "0.41438052", "0.41357654", "0.4097133", "0.408547", "0.40826046", "0.40725043", "0.40711525", "0.40664995", "0.4061839", "0.40578997", "0.40552965", "0.4049586", "0.40393823", "0.4027157", "0.40230787", "0.40230787", "0.40024942", "0.396888", "0.39624625", "0.39568543", "0.39544708", "0.39394355", "0.3933563", "0.39331526", "0.3932967", "0.3910829" ]
0.7459362
0
Takes an array of BMI values and wraps in html for inserting in a table. Values are rounded to 1 decimal.
function html_generate_row($row, $prepend, $heading=false) { $html = '<tr>'; if ($prepend !== null) { $html .= '<th>'.$prepend.'</th>'; } for ($i=0; $i <= count($row)-1; $i++) { if (!$heading) { $html .= '<td>'.round($row[$i], 1).'</td>'; } else { $html .= '<th>'.round($row[$i], 1).'</th>'; } } $html .= '</tr>'; return $html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateBMI($weight, $height)\r\n{\r\n $BMI = $weight / ($height * $height);\r\n\r\n\r\n \r\n //echo \"<h1><center><b>ASSESSMENT RESULTS </b></center></h1>\";\r\n\r\n echo \"<p>\r\n <div style=\\\"text-align:center\\\">\r\n <span class=\\\"dot\\\"></span>\r\n <span class=\\\"dot\\\"></span>\r\n <span class=\\\"dot\\\"></span>\r\n </div>\r\n </p>\";\r\n\r\n\r\n echo \"<div style=\\\"text-align:center\\\">\";\r\n echo \"<b>BMI: </b>\"; \r\n echo number_format($BMI, 1);\r\n echo \"<br>\";\r\n\r\n \r\n if ($BMI >= 40)\r\n {\r\n echo \"Very Severaly Obese\";\r\n }\r\n\r\n else if ($BMI < 40 && $BMI >= 35)\r\n {\r\n echo \"Severely Obese\";\r\n }\r\n\r\n else if ($BMI < 35 && $BMI >= 30)\r\n {\r\n echo \"Moderately Obese\";\r\n \r\n }\r\n\r\n else if ($BMI < 30 && $BMI >= 25)\r\n {\r\n echo \"Oveweight\";\r\n // oveweight \r\n }\r\n\r\n else if ($BMI < 25 && $BMI >= 18.5)\r\n {\r\n echo \"Normal (healthy weight)\";\r\n // normal (healthy weight) \r\n }\r\n\r\n else if ($BMI < 18.5 && $BMI >= 16)\r\n {\r\n echo \"Underweight\";\r\n // underweight \r\n }\r\n\r\n else if ($BMI < 16 && $BMI >= 15)\r\n {\r\n echo \"Severely Underweight\";\r\n // severely underweight \r\n }\r\n\r\n else if ($BMI < 15)\r\n {\r\n echo \"Severely Underweight\";\r\n // very severely underweight\r\n }\r\n\r\n else\r\n {\r\n echo \"Error in value entered. Please take the test again. Thanks!\";\r\n }\r\n\r\n return $BMI; \r\n}", "function html_generate_table($heights, $weights, $rows) {\n $html = '<table>';\n $html .= html_generate_row($heights, ' ', true);\n foreach ($rows as $key => $row) {\n $html .= html_generate_row($row, $weights[$key]);\n }\n $html .= '</table>';\n return $html;\n}", "public function getBMI(){\r\n\r\n return ($this->weight)/(($this->height*$this->height));\r\n}", "function get_bmi($height, $weight) {\n return $weight / pow($height/100, 2);\n}", "function calculateBMI(){\n $BMI = (705 * $this->weight / ($this->height * $this->height));\n return $BMI;\n }", "function calcBMR($sex, $weight, $height, $age)\r\n{\r\n if ($sex == 'M' || $sex == 'm' || $sex == 'MALE' || $sex == 'male')\r\n {\r\n echo \"<div style=\\\"text-align:center\\\">\";\r\n\r\n $BMR = 66.4720 + (13.7516 * $weight) + (5.0033 * $height) - (6.7550 * $age);\r\n echo \"<br> Your BMR = \";\r\n echo number_format($BMR, 1);\r\n \r\n }\r\n\r\n else if ($sex == 'F' || $sex == 'f' || $sex == 'FEMALE' || $sex == 'female')\r\n {\r\n $BMR = 655.0955 + (9.5634 * $weight) + (1.8496 * $height) - (4.6756 * $age);\r\n echo \"<br> Your BMR = \";\r\n echo number_format($BMR, 1);\r\n \r\n }\r\n\r\n else\r\n {\r\n echo \"<br> Error in value entered. Results will be incorrect. Please take the test again. Thanks!\";\r\n $BMR = 0; \r\n \r\n }\r\n\r\n return $BMR;\r\n\r\n}", "function minitable($Array){\n\t$table='<table class=\"mini\">';\n\tforeach ($Array as $row=>$Cells){\n\t\t$table.='<tr>'.\"\\n\";\n\t\tforeach ($Cells as $column=>$value){\n\t\t\t$class=setclass($row,$column,$value);\n\t\t\t$value=htmlSafe($value);\n\t\t\tif (strlen($value)>1){$value='&nbsp;';}\n\t\t\tif (strlen($value)==0){$value='x';}\n\t\t\t$table.='<td class=\"'.$class.'\">'.$value.'</td>'.\"\\n\";\n\t\t}\n\t\t$table.='</tr>'.\"\\n\";\n\t}\n\t$table.='</table>';\n\treturn $table;\n}", "function calculate_bmi() {\n if (!$this->height || !$this->weight) { // check weight and height are set and height is not zero\n return 0;\n }\n\n return round((self::BMI_CONSTANT * $this->weight) / pow($this->height, 2), 2);\n }", "function bmi($bb, $tb){\n\t$bmi = $bb / (($tb * 0.01) * ($tb * 0.01));\n\treturn $bmi;\n}", "public function processBMI($height, $weight, $user)\r\n {\r\n $dev = 0;\r\n $bmi_score = 0;\r\n $bmi_state = '';\r\n $bmi = $weight / $height / $height;\r\n $low_bmi = 18.5;\r\n $high_bmi = 24.9;\r\n\r\n if ($bmi >= 18.5 && $bmi <= 24.9)\r\n $bmi_state = 'Normal';\r\n if ($bmi < 18.5)\r\n $bmi_state = 'UnderWeight';\r\n if ($bmi > 25 && $bmi < 29.9)\r\n $bmi_state = 'OverWeight';\r\n if ($bmi > 30)\r\n $bmi_state = 'Obese';\r\n\r\n\r\n if ($bmi < $low_bmi) {\r\n $dev = abs($bmi - $low_bmi) / $low_bmi * 100;\r\n }\r\n if ($bmi > $high_bmi)\r\n $dev = abs($bmi - $high_bmi) / $high_bmi * 100;\r\n\r\n $bmiDeviationBaseScore = BmiScore::all();\r\n $recommendTestIds = [];\r\n foreach ($bmiDeviationBaseScore as $value) {\r\n $deviationRange = str_replace(\"val\", $dev, $value->deviation_range);\r\n if (eval(\"return $deviationRange;\")) {\r\n $bmi_score = $value->score;\r\n $recommendTestIds = $value->recommend_test == null ? [] : array_column($value->recommend_test->toArray(), \"test_id\");\r\n break;\r\n }\r\n }\r\n $user->height = $height;\r\n $user->weight = $weight;\r\n $user->BMI = $bmi;\r\n $user->BMI_state = $bmi_state;\r\n $user->BMI_score = $bmi_score;\r\n $bmiObject = (new QueryTagRepository())->where('tag_name', strtoupper(Constants::BMI))->first([\r\n 'id', 'excellent_marks', 'good_marks', 'bad_marks'\r\n ]);\r\n $tagStateColumn = \"tag\" . $bmiObject->id . \"_state\";\r\n $tagScoreColumn = \"tag\" . $bmiObject->id . \"_score\";\r\n if ($bmi_score >= $bmiObject->excellent_marks) {\r\n $tagState = Constants::EXCELLENT;\r\n } else if ($bmi_score < $bmiObject->excellent_marks && $bmi_score >= $bmiObject->good_marks) {\r\n $tagState = Constants::GOOD;\r\n } else {\r\n $tagState = Constants::BAD;\r\n }\r\n try {\r\n DB::beginTransaction();\r\n if ($user->assessmentRecord == null) {\r\n $userAssessmentRecord = new assesHistory();\r\n $userAssessmentRecord->user_id = $user->id;\r\n $userAssessmentRecord->tags_completed = [];\r\n $userAssessmentRecord->$tagScoreColumn = $bmi_score;\r\n $userAssessmentRecord->$tagStateColumn = $tagState;\r\n $userAssessmentRecord->save();\r\n } else {\r\n $user->assessmentRecord->$tagScoreColumn = $bmi_score;\r\n $user->assessmentRecord->$tagStateColumn = $tagState;\r\n $user->assessmentRecord->save();\r\n }\r\n foreach ($recommendTestIds as $recommendedTestId) {\r\n $user->recommendedTest()->updateOrCreate([\r\n 'user_id' => $user->id,\r\n 'test_id' => $recommendedTestId\r\n ], [\r\n 'user_id' => $user->id,\r\n 'test_id' => $recommendedTestId\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 return $user;\r\n }", "function multiple_arrayDisplay($multiple_array)\n{\n $r = '';\n $r .= '<style> td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n foreach ($multiple_array[0] as $key => $value) {\n $r .= '<th>'.$key.'</th>';\n }\n $r .= '</tr>';\n foreach ($multiple_array as $key => $value) {\n $r .= '<tr>';\n foreach ($value as $key1 => $value1) {\n if ($key1 == 'price') {\n $r .= '<td> $'.$value1.' </td>';\n } else {\n $r .= '<td>'.$value1.' </td>';\n }\n }\n $r .= '</tr>';\n }\n $r .= '</table>';\n\n return $r;\n}", "function multiple_arrayDisplay($multiple_array)\n{\n $r = '';\n $r .= '<style> td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n foreach ($multiple_array[0] as $key => $value) {\n $r .= '<th>'.$key.'</th>';\n }\n $r .= '</tr>';\n foreach ($multiple_array as $key => $value) {\n $r .= '<tr>';\n foreach ($value as $key1 => $value1) {\n if ($key1 == 'price') {\n $r .= '<td> $'.$value1.' </td>';\n } else {\n $r .= '<td>'.$value1.' </td>';\n }\n }\n $r .= '</tr>';\n }\n $r .= '</table>';\n\n return $r;\n}", "public function getBMI()\n {\n if ($this->height && $this->height > 0){\n return (($this->weight / ($this->height * $this->height)) * 703);\n }\n else{\n return 0;\n }\n \n }", "public function pageWeight()\r\n\t{\r\n\t\t$weight = Bn::getValue('weight');\r\n\t\t$fileName = '../Conf/Teams/'. $weight;\r\n\r\n\t\t// Chargement du fichier\r\n\t\t$doc = new DOMDocument('1.0', 'UTF-8');\r\n\t\t$doc->validateOnParse = true;\r\n\t\t$doc->load($fileName);\r\n\r\n\t\t$bal = new Bn_Balise();\r\n\t\t$xjoueurs = $doc->getElementsByTagName('joueur');\r\n\t\tforeach($xjoueurs as $xjoueur)\r\n\t\t{\r\n\t\t\t$nbHommes = Object::nodeValue($xjoueur, 'homme');\r\n\t\t\t$nbFemmes = Object::nodeValue($xjoueur, 'femme');\r\n\t\t\t$nbMixtes = Object::nodeValue($xjoueur, 'mixte');\r\n\t\t}\r\n\t\tif ($nbMixtes) $bal->addP('', $nbMixtes . ' joueurs');\r\n\t\telse\r\n\t\t{\r\n\t\t\t$p = $bal->addP('', $nbHommes . ' homme(s)' . '; ' . $nbFemmes . ' femme(s)');\r\n\t\t}\r\n\t\t\r\n\t\t$xrules = $doc->getElementsByTagName('rules');\r\n\t\tforeach($xrules as $xrule)\r\n\t\t{\r\n\t\t\t$discipline = Object::nodeValue($xrule, 'discipline');\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$xpoids = $doc->getElementsByTagName('poid');\r\n\t\t$t = $bal->addBalise('table');\r\n\t\t$tr = $t->addBalise('tr');\r\n\t\t$td = $tr->addBalise('td', '', 'Classement');\r\n\t\t$td = $tr->addBalise('td', '', 'Rang min.');\r\n\t\t$td = $tr->addBalise('td', '', 'Rang max.');\r\n\t\t$td = $tr->addBalise('td', '', 'Points');\r\n\t\tforeach($xpoids as $xpoid)\r\n\t\t{\r\n\t\t\t$tr = $t->addBalise('tr');\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'classement'));\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'rang_min'));\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'rang_max'));\r\n\t\t\t$td = $tr->addBalise('td', '', $xpoid->getAttribute('points'));\r\n\t\t}\r\n\t\t\r\n\t\techo $bal->toHtml();\r\n\t\treturn false;\r\n\t}", "public function html() : string\n {\n $table = \"<table class=\\\"multiplicationTable\\\">\";\n\n for ($row = 1; $row <= $this->rows + 1; $row++) {\n $table .= \"<tr>\";\n\n for ($column = 1; $column <= $this->columns + 1; $column++) {\n if ($row == 1 && $column == 1) {\n $table .= \"<td class=\\\"bold highlighted\\\">X</td>\";\n } elseif ($row == 1) {\n $table .= \"<td class=\\\"bold highlighted\\\">\" . ($column - 1) . \"</td>\";\n } elseif ($column == 1) {\n $table .= \"<td class=\\\"bold highlighted\\\">\" . ($row - 1) . \"</td>\";\n } else {\n $table .= \"<td>\" . ($row - 1) * ($column - 1) . \"</td>\";\n }\n }\n\n $table .= \"</tr>\";\n }\n\n $table .= \"</table>\";\n\n return $table;\n }", "function displayBoilerDetails(){\n $mS = Steam_MeasurementSystem::getInstance();\n $translator = Zend_Registry::get('Zend_Translate');\n $details = \"<table class='data'>\n <tr><th>\".$translator->_('Blowdown Rate').\"</th><td>\".number_format(100*$this->blowdownRate,1).\" \".$mS->label('%').\"</td></tr>\n <tr><th>\".$translator->_('Boiler Energy').\"</th><td>\".$mS->displayEnergyflowLabeled($this->boilerEnergy).\"</td></tr>\n <tr><th>\".$translator->_('Combustion Efficiency').\"</th><td>\".number_format(100*$this->boilerEff,1).\" \".$mS->label('%').\"</td></tr>\n <tr><th>\".$translator->_('Fuel Energy').\"</th><td>\".$mS->displayEnergyflowLabeled($this->fuelEnergy).\"</td></tr>\n </table>\";\n return $details;\n }", "function scoreBMI(){\n //Find the BMI of the user, and compare that to others.\n $userGender=$_POST[\"gender\"];\n $calcHeight=($_POST[\"height-ft\"] * 12)+$_POST[\"height-in\"];\n $userHeight=$calcHeight*2.54/100;\n $userWeight=($_POST[\"weight\"]*0.453592);\n\n $userBMI=$userWeight / pow($userHeight,2);\n if($userBMI < 18.5){\n $BMIpoints=7.5;\n } elseif($userBMI > 18.5 && $userBMI < 24.9){\n $BMIpoints=20;\n } elseif($userBMI > 24.9 && $userBMI < 29.9){\n $BMIpoints=10;\n } elseif($userBMI > 29.9){\n $BMIpoints=5;\n }\n return $BMIpoints;\n $url = 'data/bmi.json';\n $JSON = file_get_contents($url);\n $BMI = json_decode($JSON);\n foreach ($BMI as $category) {\n if($category->SEX == $userGender && $category->GEO == $userProvince){\n switch($userGender){\n case \"Males\":\n $baseline=68.5;\n break;\n case \"Females\":\n $baseline=73.5;\n break;\n }\n }\n }\n}", "function html_content($text) {\n \n return ' <tr>\n <td width=\"15%\" style=\"font-size: 12pt; padding: 1px;\" class=\"inner_td\">'.$text['works_name'].'</td>\n <td width=\"20%\" style=\"font-size: 12pt; padding: 1px;\" class=\"inner_td\">'.$text['kpi_title'].'</td>\n <td width=\"5%\" align=\"center\" style=\"font-size: 12pt; padding: 1px;\" class=\"inner_td\"></td>\n <td style=\"font-size: 12pt; padding: 1px;\" class=\"kpi_level_td\">'.$text['kpi_level1'].'</td>\n <td style=\"font-size: 12pt; padding: 1px;\" class=\"kpi_level_td\">'.$text['kpi_level2'].'</td>\n <td style=\"font-size: 12pt; padding: 1px;\" class=\"kpi_level_td\">'.$text['kpi_level3'].'</td>\n <td style=\"font-size: 12pt; padding: 1px;\" class=\"kpi_level_td\">'.$text['kpi_level4'].'</td>\n <td style=\"font-size: 12pt; padding: 1px;\" class=\"kpi_level_td\">'.$text['kpi_level5'].'</td>\n <td width=\"5%\" align=\"center\" style=\"font-size: 12pt; padding: 1px;\" class=\"inner_td\">'.($text['kpi_score_raw']!=\"\"?$text['kpi_score_raw']:$text['kpi_score']).'</td>\n <td width=\"5%\" align=\"center\" style=\"font-size: 12pt; padding: 1px;\" class=\"inner_td\">'.$text['kpi_score'].'</td>\n <td width=\"5%\" align=\"center\" style=\"font-size: 12pt; padding: 1px;\" class=\"inner_td\">'.$text['weight'].'</td>\n <td width=\"5%\" align=\"center\" style=\"font-size: 12pt; padding: 1px;\" class=\"inner_td\">'.$text['sum'].'</td>\n </tr>\n\n'; \n}", "public static function GenerateHTML($array) {\n\t\tif ($array == null || is_null($array) || empty($array)) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tif ($array instanceof mBugReport) {\n\t\t\t/** @var mBugReport $mbr */\n\t\t\t$mbr = $array;\n\t\t\t$html = \"\";\n\t\t\t\n\t\t\t$brief_1 = Input::escape($mbr->getBrief());\n\t\t\t$title_1 = self::GenerateHoverTitle($mbr);\n\t\t\t\n\t\t\t$html .= '<div class=\"row\"><div class=\"col-md-12 material-hover-box full-width masterTooltip\" title=\"'.$title_1.'\" >'; {\n\t\t\t\t$html .= '<a href=\"#\" class=\"word-break bug-report\" bug_id=\"'. $mbr->getID(). '\">'. $brief_1. '</a>';\n\t\t\t} $html .= '</div></div>';\n\t\t\t\n\t\t\treturn $html;\n\t\t}\n\t\t\n\t\t$amount = count($array);\n\t\t\n\t\t$html = \"\";\n\t\t\n\t\tfor ($x = 0; $x < $amount; $x += 3) {\n\t\t\tif ($x > $amount) continue;\n\t\t\t$html .= '<div class=\"row\">';\n\t\t\t\n\t\t\t/** @var mBugReport $item_1 */\n\t\t\t/** @var mBugReport $item_2 */\n\t\t\t/** @var mBugReport $item_3 */\n\t\t\t$item_1 = $array[$x];\n\t\t\t$item_2 = null;\n\t\t\t$item_3 = null;\n\t\t\tif ($x+1 < $amount) $item_2 = $array[$x+1];\n\t\t\tif ($x+2 < $amount) $item_3 = $array[$x+2];\n\t\t\t\n\t\tRender:\n\t\t\t// Col = 12\n\t\t\tif ($item_2 == null) {\n\t\t\t\t$brief_1 = Input::escape($item_1->getBrief());\n\t\t\t\t$title_1 = self::GenerateHoverTitle($item_1);\n\t\t\t\t\n\t\t\t\t$html .= '<div class=\"col-md-12 material-hover-box full-width masterTooltip\" title=\"'.$title_1.'\" >'; {\n\t\t\t\t\t$html .= '<a href=\"#\" class=\"word-break bug-report\" bug_id=\"'. $item_1->getID(). '\">'. $brief_1. '</a>';\n\t\t\t\t} $html .= '</div>'; goto EOI;\n\t\t\t}\n\t\t\t\n\t\t\t// Col = 6\n\t\t\telse if ($item_3 == null) {\n\t\t\t\t$brief_1 = Input::escape($item_1->getBrief());\n\t\t\t\t$brief_2 = Input::escape($item_2->getBrief());\n\t\t\t\t\n\t\t\t\t$title_1 = self::GenerateHoverTitle($item_1);\n\t\t\t\t$title_2 = self::GenerateHoverTitle($item_2);\n\t\t\t\t\n\t\t\t\t$html .= '<div class=\"col-md-6 material-hover-box full-width masterTooltip\" title=\"'.$title_1.'\" >'; {\n\t\t\t\t\t$html .= '<a href=\"#\" class=\"word-break bug-report\" bug_id=\"'. $item_1->getID(). '\">'. $brief_1. '</a>';\n\t\t\t\t} $html .= '</div>';\n\t\t\t\t\n\t\t\t\t$html .= '<div class=\"col-md-6 material-hover-box full-width masterTooltip\" title=\"'.$title_2.'\" >'; {\n\t\t\t\t\t$html .= '<a href=\"#\" class=\"word-break bug-report\" bug_id=\"'. $item_2->getID(). '\">'. $brief_2. '</a>';\n\t\t\t\t} $html .= '</div>';\n\t\t\t\t\n\t\t\t\tgoto EOI;\n\t\t\t}\n\t\t\t\n\t\t\t// Col = 4\n\t\t\telse {\n\t\t\t\t$brief_1 = Input::escape($item_1->getBrief());\n\t\t\t\t$brief_2 = Input::escape($item_2->getBrief());\n\t\t\t\t$brief_3 = Input::escape($item_3->getBrief());\n\t\t\t\t\n\t\t\t\t$title_1 = self::GenerateHoverTitle($item_1);\n\t\t\t\t$title_2 = self::GenerateHoverTitle($item_2);\n\t\t\t\t$title_3 = self::GenerateHoverTitle($item_3);\n\t\t\t\t\n\t\t\t\t$html .= '<div class=\"col-md-4 material-hover-box full-width masterTooltip\" title=\"'.$title_1.'\" >'; {\n\t\t\t\t\t$html .= '<a href=\"#\" class=\"word-break bug-report\" bug_id=\"'. $item_1->getID(). '\">'. $brief_1. '</a>';\n\t\t\t\t} $html .= '</div>';\n\t\t\t\t\n\t\t\t\t$html .= '<div class=\"col-md-4 material-hover-box full-width masterTooltip\" title=\"'.$title_2.'\" >'; {\n\t\t\t\t\t$html .= '<a href=\"#\" class=\"word-break bug-report\" bug_id=\"'. $item_2->getID(). '\">'. $brief_2. '</a>';\n\t\t\t\t} $html .= '</div>';\n\t\t\t\t\n\t\t\t\t$html .= '<div class=\"col-md-4 material-hover-box full-width masterTooltip\" title=\"'.$title_3.'\" >'; {\n\t\t\t\t\t$html .= '<a href=\"#\" class=\"word-break bug-report\" bug_id=\"'. $item_3->getID(). '\">'. $brief_3. '</a>';\n\t\t\t\t} $html .= '</div>';\n\t\t\t\t\n\t\t\t\tgoto EOI;\n\t\t\t}\n\t\t\t\n\t\t\t//End of Item\n\t\tEOI: $html .= '</div>';\n\t\t}\n\t\t\n\t\treturn $html;\n\t}", "public function calculate_bmi() {\n return $this->bodymass / ($this->bodylength * $this->bodylength); \n }", "function shop_uc_product_weight($variables) {\n $amount = $variables['amount'];\n $units = $variables['units'];\n\n// $output = '<div class=\"product-info weight\">'; // Sudhakar\n $output = t('!weight', array('!weight' => uc_weight_format($amount, $units)));\n// $output .= '</div>'; // Sudhakar\n\n return $output;\n}", "function makeHTMLTable($array){\n\t\t // start table\n\t\t $html = '<table>';\n\t\t // header row\n\t\t $html .= '<tr>';\n\t\t // foreach($array[0] as $key=>$value){\n\t\t // $html .= '<th>' . htmlspecialchars($key) . '</th>';\n\t\t // }\n\t\t // $html .= '</tr>';\n\t\t // data rows\n\t\t foreach( $array as $key=>$value){\n\t\t $html .= '<tr>';\n\t\t foreach($value as $key2=>$value2){\n\t\t $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n\t\t }\n\t\t $html .= '</tr>';\n\t\t }\n\t\t // finish table and return it\n\t\t $html .= '</table>';\n\t\t return $html;\n\t\t\t}", "function buildTable($array){\n // start table\n $html = '<table class=\"table\">';\n // data rows\n foreach( $array as $key=>$value){\n $html .= '<tr>';\n foreach($value as $key2=>$value2){\n $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n }\n $html .= '</tr>';\n }\n\n // finish table and return it\n\n $html .= '</table>';\n return $html;\n}", "function arrayToBarGraph ($array, $max_width, $table_values=\"CELLPADDING=5\", $col_1_head=null, $col_2_head=null) {\n\tglobal $gallery;\n\tforeach ($array as $value) {\n\t\tif ((IsSet($max_value) && ($value > $max_value)) || (!IsSet($max_value))) {\n\t\t\t$max_value = $value;\n\t\t}\n\t}\n\n\tif (!isSet($max_value)) {\n\t\t// no results!\n\t\treturn null;\n\t}\n\n\t$string_to_return = \"\\n <table $table_values>\";\n\tif ($col_1_head || $col_2_head) {\n\t\t$string_to_return .=\t'<tr>' .\n\t\t\t\t\t\"\\n\\t<td></td>\".\n\t\t\t\t\t\"\\n\\t<td class=\\\"admin\\\">$col_1_head</td>\".\n\t\t\t\t\t\"\\n\\t<td class=\\\"admin\\\">$col_2_head</td>\".\n\t\t\t\t\t\"</tr>\";\n\t}\n\n\tif ($max_value > 0) {\n\t\t$pixels_per_value = ((double) $max_width)\n\t\t\t/ $max_value;\n\t}\n\telse {\n\t\t$pixels_per_value = 0;\n\t}\n\n\t$counter = 0;\n\tforeach ($array as $name => $value) {\n\t\t$bar_width = $value * $pixels_per_value;\n\t\t$img_url= getImagePath('bar.gif');\n\t\t$string_to_return .= \"\\n\\t<tr>\"\n\t\t\t. \"\\n\\t<td>(\". ++$counter .\")</td>\"\n\t\t\t. \"\\n\\t<td>$name ($value)</td>\"\n\t\t\t. \"\\n\\t<td><img src=\\\"\". $img_url .\"\\\" border=\\\"1\\\"\"\n\t\t\t. \" width=\\\"$bar_width\\\" height=\\\"10\\\" alt=\\\"BAR\\\"></td>\"\n\t\t\t. \"\\n\\t</tr>\";\n\t}\n\t$string_to_return .= \"\\n </table>\";\n\treturn($string_to_return);\n}", "function field_tags($sum){\n\t\t$max = 12;\n\t\t$per_row = ceil($max / $sum);\n\t\t$fields = '<div class=\"col-xs-12 col-md-'.$per_row.'\">';\n\t\t// $fields = '<div class=\"row\">';\n\t\treturn $fields;\n\t}", "function printHTML() \n {\n?>\n <center>\n <table class='gains' border='0'>\n <tr>\n<?\n for ($i=0; $i<count($this->machines); $i++) {\n $m = $this->machines[$i];\n if ($i == 0)\n echo \"<td align='center' colspan='2'>\".substr($m,4,2).\"</td>\\n\";\n else\n echo \"<th align='center' colspan='2'>\".substr($m,4,2).\"</th>\\n\";\n }\n?>\n </tr>\n <tr>\n<?\n for ($i=0; $i<count($this->machines); $i++) {\n $m = $this->machines[$i];\n echo \"<td align='center'>\\n\";\n echo \"<span id=\\\"\".$m.\"_pol0_bar\\\">[ Loading Progress Bar ]</span>\\n\";\n echo \"<td align='center'>\\n\";\n echo \"<span id=\\\"\".$m.\"_pol1_bar\\\">[ Loading Progress Bar ]</span>\\n\";\n echo \"</td>\\n\";\n }\n?>\n </tr>\n <tr>\n<?\n for ($i=0; $i<count($this->machines); $i++) {\n $m = $this->machines[$i];\n echo \"<td colspan='2'>\\n\";\n echo \"<div id='\".$m.\"_pol0_value'></div>\\n\";\n echo \"<div id='\".$m.\"_pol1_value'></div>\\n\";\n echo \"</td>\\n\";\n }\n?>\n </tr>\n <!--<tr><td colspan='32' align='center'><span id=\"max_gain\"></span></td></tr>-->\n </table>\n </center>\n<?\n }", "function bmi($txtWeight,$txtHeight)\n { \n \n global $database_hdc,$hdc,$database_personalHealth,$personalHealth;\n \n \n \n $arr[\"txtWeight\"]=$txtWeight;\n $arr[\"txtHeight\"]=$txtHeight;\n header('Content-type: application/json');\n return json_encode($arr);\n\n }", "function formatReport($array,$string){\n\t\n\t\t$total = 0.0;\n\t\t$table = '<h3 class=\"text-success\">'. $string .'</h3>\n\t\t\t\t<table class=\"table table-striped table-hover\">\n\t\t\t\t<tHead>\n\t\t\t\t<tr>\n\t\t\t\t<th>Name</th>\n\t\t\t\t<th>Bill Description</th>\n\t\t\t\t<th>Bill Amount</th>\n\t\t\t\t<th>Bill Category</th>\n\t\t\t\t<th>Bill Date</th>\n\t\t\t\t</tr>\n\t\t\t\t</tHead>\n\t\t\t\t<tBody>';\n\t\tforeach ($array as $value){\n\t\t\t$total += floatval($value['BillAmount']);\n\t\t\t$shortDate = explode(\" \", $value['BillDate']);\n\t\t\t$shortDate = $shortDate[0];\n\t\t\t$table .= '<tr>\n\t\t\t\t\t<td>'. $value['FirstName'].' '.$value['LastName'] .'</td>\n\t\t\t\t\t<td>'. $value['BillDesc'] .'</td>\n\t\t\t\t\t<td>'. $value['BillAmount'] .'</td>\n\t\t\t\t\t<td>'. $value['BillCategory'] .'</td>\n\t\t\t\t\t<td>'. $shortDate .'</td>\n\t\t\t\t\t</tr>';\n\t\t}\n\t\t$table .= '\n\t\t\t\t<tr class=\"danger\">\n\t\t\t\t<td></td>\n\t\t\t\t<th class=\"text-right\">Total:</th><th>$'.$total.'</th><td></td><td></td>\n\t\t\t\t</tr>\n\t\t\t\t</tBody></table>';\n\t\n\t\treturn $table;\n\t}", "function process_height_abbreviate (&$list)\n{\n\tforeach ($list as $key => $row) {\n\t\t$list[$key]['height'] = sprintf ('%1.1Fm', $row['height']);\n\t}\n}", "function prepare_price($price_arr,$class_arr,$br)\n\t{\n\t\t\n\t\tglobal $PriceSettings_arr;\n\t\t$retval = '';\n\t\t$retvalue['pdf'] \t\t= array();\n\t\t// Check whether price is to be displayed in a single row or in multiple rows\n\t\tif ($br==1) // case if the seperation character is <br>\n\t\t{ \n\t\t\t// Check whether ul or div is to be used to display the prices\n\t\t\tswitch ($class_arr['class_type'])\n\t\t\t{\n\t\t\t\tcase 'div': // case if div\n\t\t\t\t\t$outer_prefix \t= '';\n\t\t\t\t\t$outer_suffix\t= '';\n\t\t\t\t\t$main_prefix \t= '<div ';\n\t\t\t\t\t$main_suffix \t= '</div>';\n\t\t\t\tbreak;\n\t\t\t\tdefault: // case if any other than div\n\t\t\t\t\tif($class_arr['ul_class'])// place <ul> only if the class for ul is present\n\t\t\t\t\t\t$outer_prefix = '<ul class=\"'.$class_arr['ul_class'].'\">';\n\t\t\t\t\telse\n\t\t\t\t\t\t$outer_prefix = '';\n\t\t\t\t\tif($class_arr['ul_class'])// place <ul> only if the class for ul is present\n\t\t\t\t\t\t$outer_suffix = '</ul>';\n\t\t\t\t\telse\n\t\t\t\t\t\t$outer_suffix = '';\t\n\t\t\t\t\t$main_prefix \t= '<li ';\n\t\t\t\t\t$main_suffix \t= '</li>';\n\t\t\t\tbreak;\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$outer_prefix \t= '<div>';\n\t\t\t$outer_suffix\t= '</div>';\n\t\t\t$main_prefix\t= '<span ';\n\t\t\t$main_suffix\t= '</span>';\n\n\t\t\t// Overriding the classes using the classes for span\n\t\t\t$class_arr['normal_class']\t\t= ($class_arr['normal_span_class']!='')?$class_arr['normal_span_class']:'normal_span_class';\n\t\t\t$class_arr['strike_class']\t\t= ($class_arr['strike_span_class']!='')?$class_arr['strike_span_class']:'strike_span_class';\n\t\t\t$class_arr['yousave_class']\t\t= ($class_arr['yousave_span_class']!='')?$class_arr['yousave_span_class']:'yousave_span_class';\n\t\t\t$class_arr['discount_class']\t= ($class_arr['discount_span_class']!='')?$class_arr['discount_span_class']:'discount_span_class';\n\t\t}\t\n\t\t \n\t\tif ($outer_prefix!='')\n\t\t\t$retval .= $outer_prefix;\n\t\tif ($price_arr['discounted_price']) //Check if discount exists\n\t\t{\n\t\t\tif ($PriceSettings_arr['strike_baseprice']==1) // check whether the base price is to be striked out\n\t\t\t{\n\t\t\t\t$base_class = $class_arr['strike_class'];\n\t\t\t}\t\n\t\t\telse\t\n\t\t\t{\n\t\t\t\t$base_class = $class_arr['normal_class'];\n\t\t\t}\t\n\t\t\t$retval \t\t\t\t\t\t\t.=$main_prefix.' class=\"'.$base_class.'\">'.$price_arr['base_price'].$main_suffix;\n\t\t\t$retvalue['pdf'][] \t\t\t\t\t= $price_arr['base_price'];\n\t\t\t$retvalue['normal']['base_price'] \t= $price_arr['base_price'];\n\t\t\t\n\t\t\tif ($price_arr['base_price_exc'])// show only in exists\n\t\t\t{\n\t\t\t\t$retval \t\t\t\t\t\t.=$main_prefix.' class=\"'.$base_class.'\">'.$price_arr['base_price_exc'].$main_suffix;\n\t\t\t\t$retvalue['pdf'][] \t\t\t\t= $price_arr['base_price_exc'];\n\t\t\t}\t\n\t\t\t$retval \t\t\t\t\t\t\t.=$main_prefix.' class=\"'.$class_arr['normal_class'].'\">'.$price_arr['discounted_price'].$main_suffix;\n\t\t\t$discounted_price_only \t\t\t= $price_arr['discounted_price'];\n\t\t\t$retvalue['pdf'][] \t\t\t\t\t= $price_arr['discounted_price'];\n\t\t\t\n\t\t\tif ($price_arr['discounted_price_exc'])// show only in exists\n\t\t\t{\n\t\t\t\t$retval \t\t\t\t\t\t.=$main_prefix.' class=\"'.$class_arr['normal_class'].'\">'.$price_arr['discounted_price_exc'].$main_suffix;\n\t\t\t\t$retvalue['pdf'][] \t\t\t\t= $price_arr['discounted_price_exc'];\n\t\t\t}\t\n\t\t\tif($price_arr['yousave_price'])// show only in exists\n\t\t\t{\n\t\t\t\t$retval \t\t\t\t\t\t.=$main_prefix.' class=\"'.$class_arr['yousave_class'].'\">'.$price_arr['yousave_price'].$main_suffix;\n\t\t\t\t$retvalue['pdf'][] \t\t\t\t= $price_arr['yousave_price'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($PriceSettings_arr['price_display_discount_with_price']==1)\n\t\t\t\t{\n\t\t\t\t\tif($price_arr['disc_val']) // if discount is entered as val\n\t\t\t\t\t{\n\t\t\t\t\t\t$retval \t\t\t\t.=$main_prefix.' class=\"'.$class_arr['discount_class'].'\">'.$price_arr['disc_val'].$main_suffix;\n\t\t\t\t\t\t$retvalue['pdf'][] \t\t= $price_arr['disc_val'];\n\t\t\t\t\t}\t\n\t\t\t\t\telseif($price_arr['disc_percent']) // if discount is entered as percentage\n\t\t\t\t\t{\n\t\t\t\t\t\t$retval \t\t\t\t.=$main_prefix.' class=\"'.$class_arr['discount_class'].'\">'.$price_arr['disc_percent'].$main_suffix;\n\t\t\t\t\t\t$retvalue['pdf'][] \t\t= $price_arr['disc_val'];\n\t\t\t\t\t}\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{ \n\t\t\t$retval \t\t\t.=$main_prefix.' class=\"'.$class_arr['normal_class'].'\">'.$price_arr['base_price'].$main_suffix;\n\t\t\t$retvalue['pdf'][] \t= $price_arr['base_price'];\n\t\t}\t\n\t\tif ($outer_suffix!='')\n\t\t\t$retval .= $outer_suffix;\n\t\t\n\t\t$returnvalue['html'] = $retval;\n\t\t$returnvalue['values'] = $retvalue['pdf'];\n\t\treturn $returnvalue;\n\t}", "private function printBodinfo()\n {\n if (sizeof($this->stringBiedingenArray) > 0) {\n\n $html = <<<HTML\n<div class=\"row\">\n<div class=\"col\">\n <table class=\"table table-sm table-dark\">\n <thead>\n <tr>\n <th scope=\"col\">Bodbedrag</th>\n <th scope=\"col\">Datum bod</th>\n <th scope=\"col\">Bieder</th>\n </tr>\n </thead>\n <tbody>\n</div>\nHTML;\n for ($i = 0; $i < sizeof($this->stringBiedingenArray); $i++) {\n $array = explode(\"|||||||||\", $this->stringBiedingenArray[$i]);\n\n $html .= <<<HTML\n <tr>\n <td>&euro; $array[0]</td>\n <td>$array[1]</td>\n <td>$array[2]</td>\n </tr>\nHTML;\n\n }\n\n $html .= <<<HTML\n </tbody> \n </table> \n </div> \n</div>\n</div>\nHTML;\n } else {\n\n $html = <<<HTML\n<div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col\">\n <p>Wees de eerste bieder!</p>\n </div>\n </div>\nHTML;\n\n }\n return $html;\n }", "function fusioncore_ajax_get_stat_bar_html($rawval,$label,$displayval,$mult=20,$maxval=200,$level2=10,$level3=50){\n\n\t$val=(floatval($rawval) * $mult);\n\tif($val>$maxval)\n\t\t$val=$maxval;\n\tif($val<=1)\n\t\t$val=1;\t\t\n\telse if($val<=0)\n\t\t$val=0;\n\t\n\t$spanval=\"0,$maxval,$val\";\n\t\n\tif($val>$level3)\n\t\t$spanval=\"<div style='height: 10px; width: \".$val.\"px; background-color: \".COMMONCOLOR_RED.\";'>&nbsp;</div>\";\n\telse if($val>$level2)\n\t\t$spanval=\"<div style='height: 10px; width: \".$val.\"px; background-color: \".COMMONCOLOR_YELLOW.\";'>&nbsp;</div>\";\n\telse\n\t\t$spanval=\"<div style='height: 10px; width: \".$val.\"px; background-color: \".COMMONCOLOR_GREEN.\";'>&nbsp;</div>\";\n\t\n\t$barclass=\"\";\n\t\n\t$output='<tr><td><span class=\"sysstat_stat_subtitle\">'.$label.'</span></td><td>'.$displayval.'</td><td><span class=\"statbar'.$barclass.'\">'.$spanval.'</span></td></tr>';\n\t\n\treturn $output;\n\t}", "public static function htmlTable ($array, $tableHeadingSubstitutions = array (), $class = 'lines', $keyAsFirstColumn = true, $uppercaseHeadings = false, $allowHtml = false /* true/false/array(field1,field2,..) */, $showColons = false, $addCellClasses = false, $addRowKeyClasses = false, $onlyFields = array (), $compress = false, $showHeadings = true, $encodeEmailAddress = true)\r\n\t{\r\n\t\t# Check that the data is an array\r\n\t\tif (!is_array ($array)) {return $html = \"\\n\" . '<p class=\"warning\">Error: the supplied data was not an array.</p>';}\r\n\t\t\r\n\t\t# Return nothing if no data\r\n\t\tif (empty ($array)) {return '';}\r\n\t\t\r\n\t\t# Assemble the data cells\r\n\t\t$dataHtml = '';\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\tif (!$value || !is_array ($value)) {return $html = \"\\n\" . '<p class=\"warning\">Error: the supplied data was not a multi-dimensional array.</p>';}\r\n\t\t\t$headings = $value;\r\n\t\t\t$dataHtml .= \"\\n\\t\" . '<tr' . ($addRowKeyClasses ? ' class=\"' . htmlspecialchars ($key) . '\"' : '') . '>';\r\n\t\t\tif ($keyAsFirstColumn) {\r\n\t\t\t\t$thisCellClass = ($addCellClasses ? htmlspecialchars ($key) . ((is_array ($addCellClasses) && isSet ($addCellClasses[$key])) ? ' ' . $addCellClasses[$key] : '') : '') . ($keyAsFirstColumn ? ($addCellClasses ? ' ' : '') . 'key' : '');\r\n\t\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\\t\") . (strlen ($thisCellClass) ? \"<td class=\\\"{$thisCellClass}\\\">\" : '<td>') . \"<strong>{$key}</strong></td>\";\r\n\t\t\t}\r\n\t\t\t$i = 0;\r\n\t\t\tforeach ($value as $valueKey => $valueData) {\r\n\t\t\t\tif ($onlyFields && !in_array ($valueKey, $onlyFields)) {continue;}\t// Skip if not in the list of onlyFields if that is supplied\r\n\t\t\t\t$i++;\r\n\t\t\t\t$data = $array[$key][$valueKey];\r\n\t\t\t\t$thisCellClass = ($addCellClasses ? htmlspecialchars ($valueKey) . ((is_array ($addCellClasses) && isSet ($addCellClasses[$valueKey])) ? ' ' . $addCellClasses[$valueKey] : '') : '') . ((($i == 1) && !$keyAsFirstColumn) ? ($addCellClasses ? ' ' : '') . 'key' : '');\r\n\t\t\t\t$htmlAllowed = (is_array ($allowHtml) ? (in_array ($valueKey, $allowHtml)) : $allowHtml);\t// Either true/false or an array of permitted fields where HTML is allowed\r\n\t\t\t\t$cellContents = ($htmlAllowed ? $data : htmlspecialchars ($data));\r\n\t\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\\t\") . (strlen ($thisCellClass) ? \"<td class=\\\"{$thisCellClass}\\\">\" : '<td>') . ($encodeEmailAddress ? self::encodeEmailAddress ($cellContents) : $cellContents) . (($showColons && ($i == 1) && $data) ? ':' : '') . '</td>';\r\n\t\t\t}\r\n\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\") . '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t# Construct the heading HTML\r\n\t\t$headingHtml = '';\r\n\t\tif ($tableHeadingSubstitutions !== false) {\r\n\t\t\t$headingHtml .= \"\\n\\t\" . '<tr>';\r\n\t\t\tif ($keyAsFirstColumn) {$headingHtml .= \"\\n\\t\\t\" . '<th></th>';}\r\n\t\t\t$columns = array_keys ($headings);\r\n\t\t\tforeach ($columns as $column) {\r\n\t\t\t\tif ($onlyFields && !in_array ($column, $onlyFields)) {continue;}\t// Skip if not in the list of onlyFields if that is supplied\r\n\t\t\t\t$columnTitle = (empty ($tableHeadingSubstitutions) ? $column : (isSet ($tableHeadingSubstitutions[$column]) ? $tableHeadingSubstitutions[$column] : $column));\r\n\t\t\t\t$headingHtml .= \"\\n\\t\\t\" . ($addCellClasses ? '<th class=\"' . $column . ((is_array ($addCellClasses) && isSet ($addCellClasses[$column])) ? ' ' . $addCellClasses[$column] : '') . '\">' : '<th>') . ($uppercaseHeadings ? ucfirst ($columnTitle) : $columnTitle) . '</th>';\r\n\t\t\t}\r\n\t\t\t$headingHtml .= \"\\n\\t\" . '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t# Construct the overall heading\r\n\t\t$html = \"\\n\\n\" . \"<table class=\\\"{$class}\\\">\";\r\n\t\tif ($showHeadings) {$html .= $headingHtml;}\r\n\t\t$html .= $dataHtml;\r\n\t\t$html .= \"\\n\" . '</table>';\r\n\t\t\r\n\t\t# Return the HTML\r\n\t\treturn $html;\r\n\t}", "function render($values) {\n return ereg_replace(\"(.{100})\",\"\\\\1<br>\",$values->feature_residues);\n\n }", "function opaljob_areasize_unit_format( $value='' ){\n return $value . ' ' . '<span>'.'m2'.'</span>';\n}", "function checkFloat($value){\r\n $temp = '<code style=\"font_size: 10px\">double</code>';\r\n\r\n $temp .= \"<code style='font_size: 9px ; color:#f57900 '>\" . PHP_EOL;\r\n\r\n $temp .= \"{$value}\" . PHP_EOL;\r\n\r\n $temp .= \"</code>\";\r\n\r\n return $temp ;\r\n}", "protected function RenderStatus_HTML_cells() {\n\t$qInStock = $this->QtyInStock();\n\t$out = \"<td>\"\n\t .$this->RenderPriceRange()\n\t .'</td><td>'\n\t .$this->CatalogOptionsList()\n\t .'</td>'\n\t ;\n\tif ($qInStock > 0) {\n\t $out .= \"<td>$qInStock in stock</td>\";\n\t}\n\treturn $out;\n }", "function computeBMI($mass, $height) {\n\t\t$factor = 100.0; // strict input to output conversion constant: 100 centimeters in 1 meter\n\t\t$scale = 2.5; // tunable parameter according to MacKay, N.J. (2010), scale should be 2.3 <= x <= 2.7\n\t\t$bmi = $mass / pow(($height/$factor), $scale);\n\t\treturn $bmi;\n\t}", "function generate_data_set($heights, $weights) {\n $output = [[]];\n for ($x=0; $x<=count($heights)-1; $x++) {\n for ($y=0; $y<=count($weights)-1; $y++) {\n $output[$y][$x] = get_bmi($heights[$x], $weights[$y]);\n }\n }\n return $output;\n}", "protected function getBMI($weight, $height){\n return round($weight / pow($height, 2), 2);\n }", "function outputFormat(array $headers, array $cells, $result, $content_name) {\necho '<h3>'.ucfirst($content_name).' Content</h3>';\necho '<table>';\nforeach ($headers as $val) {\necho '<th>'.$val.'</th>';\n}\nwhile($row = mysqli_fetch_array($result))\n {\n echo '<tr>';\n foreach ($cells as $val) {\n echo '<td>'.$row[$val].'</td>';\n }\n echo '</tr>';\n }\n echo '</table>';\n}", "function setAmtWords()\n\t{\n\t\t\n\t\t$single = array();\n\t\t$single[count($single)] = \"\";\n\t\t$single[count($single)] = \"ONE\";\n\t\t$single[count($single)] = \"TWO\";\n\t\t$single[count($single)] = \"THREE\";\n\t\t$single[count($single)] = \"FOUR\";\n\t\t$single[count($single)] = \"FIVE\";\n\t\t$single[count($single)] = \"SIX\";\n\t\t$single[count($single)] = \"SEVEN\";\n\t\t$single[count($single)] = \"EIGHT\";\n\t\t$single[count($single)] = \"NINE\";\n\t\t$single[count($single)] = \"TEN\";\n\t\t$single[count($single)] = \"ELEVEN\";\n\t\t$single[count($single)] = \"TWELVE\";\n\t\t$single[count($single)] = \"THIRTEEN\";\n\t\t$single[count($single)] = \"FOURTEEN\";\n\t\t$single[count($single)] = \"FIFTEEN\";\n\t\t$single[count($single)] = \"SIXTEEN\";\n\t\t$single[count($single)] = \"SEVENTEEN\";\n\t\t$single[count($single)] = \"EIGHTEEN\";\n\t\t$single[count($single)] = \"NINETEEN\";\n\t\t\n\t\t$double = array();\n\t\t$double[count($double)] = \"\";\n\t\t$double[count($double)] = \"\";\n\t\t$double[count($double)] = \"TWENTY\";\n\t\t$double[count($double)] = \"THIRTY\";\n\t\t$double[count($double)] = \"FORTY\";\n\t\t$double[count($double)] = \"FIFTY\";\n\t\t$double[count($double)] = \"SIXTY\";\n\t\t$double[count($double)] = \"SEVENTY\";\n\t\t$double[count($double)] = \"EIGHTY\";\n\t\t$double[count($double)] = \"NINETY\";\n\t\t\n\t\t$amtWords = array();\n\t\t$amtWords[\"single\"] = $single;\n\t\t$amtWords[\"double\"] = $double;\n\t\t$amtWords[\"thousand\"] = \" THOUSAND \";\n\t\t$amtWords[\"hundred\"] = \" HUNDRED \";\n\t\t$amtWords[\"and\"] = \" AND \";\n\t\t$amtWords[\"andOne\"] = \"\";\n\t\t\t\n\t\treturn $amtWords;\n\t}", "function calculateIBW() {\n global $height;\n global $x;\n\n $ft_dif = 0;\n // How far over 5ft\n if ($height > 152.4) {\n $cm_dif = $height - 152.4;\n $inchsum = $cm_dif * 0.39370;\n\n $ft_dif = 60 - $inchsum; // Find difference from 5ft (60 inches)\n }\n\n // Find ideal body weight\n return $x + (2.3 * $ft_dif);\n}", "function DOM_force_ths($table) {\r\n\t\t// ??\r\n\t\t$number_cells = $number_number_cells = $number_empty_cells = 0;\r\n\t\t$toppest_number = false;\r\n\t\t$leftest_number = false;\r\n\t\tforeach($this->table_grid as $index => $column) {\r\n\t\t\tforeach($column as $index2 => $value) {\r\n\t\t\t\t$number_cells++;\r\n\t\t\t\t$cell = $value[0];\r\n\t\t\t\tif(ReTidy::isNumberDatum(ReTidy::tagless($cell))) {\r\n\t\t\t\t\t$number_number_cells++;\r\n\t\t\t\t\t// mark the cell as a number\r\n\t\t\t\t\t$this->table_grid[$index][$index2][2] = \"number\";\r\n\t\t\t\t\tif(!$toppest_number && !$leftest_number) {\r\n\t\t\t\t\t\t// this should always find the first number in the table.\r\n\t\t\t\t\t\t$toppest_number = $index2;\r\n\t\t\t\t\t\t$leftest_number = $index;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(ReTidy::isEmptyTagIgnoringWhitespaceAndAttributes($cell)) {\r\n\t\t\t\t\t$number_empty_cells++;\r\n\t\t\t\t\t// mark the cell as empty\r\n\t\t\t\t\t$this->table_grid[$index][$index2][2] = \"empty\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$number_data_cells = $number_number_cells + $number_empty_cells;\r\n\t\tif(bcdiv($number_number_cells, $number_cells, 2) > 0.3) {\r\n\t\t\tif(bcdiv($number_empty_cells, $number_cells, 2) < 0.1 || bcdiv($number_data_cells, $number_cells, 2) > 0.5) {\r\n\t\t\t\t// the primary type of data is numbers\r\n\t\t\t\tforeach($this->table_grid as $index => $column) {\r\n\t\t\t\t\tforeach($column as $index2 => $value) {\r\n\t\t\t\t\t\tif($toppest_number <= $index2 && $leftest_number <= $index) {\r\n\t\t\t\t\t\t\t// we are into the data region of the table\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$cell = $value[0];\r\n\t\t\t\t\t\tif($this->table_grid[$index][$index2][2] != \"number\" && \r\n\t\t\t\t\t\t$this->table_grid[$index][$index2][2] != \"empty\" && \r\n\t\t\t\t\t\t$cell->nodeName != \"th\" /*&& \r\n\t\t\t\t\t\t!Retidy::isEmpty($cell)*/) {\r\n\t\t\t\t\t\t\t$cell->setAttribute('newtag', 'th');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$done_a_column = false;\r\n\t\t$done_a_row = false;\r\n\t\tforeach($this->table_grid as $index => $column) {\r\n\t\t\t$found_non_strong_in_column = false;\r\n\t\t\tforeach($column as $index2 => $value) {\r\n\t\t\t\t$cell = $value[0];\r\n\t\t\t\tif($index === 1) {\r\n\t\t\t\t\tif($index2 === 1) {\r\n\t\t\t\t\t\t// the top left cell will not be a data cell\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ReTidy::getAttribute($cell, 'rowspan')) {\r\n\t\t\t\t\t\t// this is pretty aggressive\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(!$found_non_strong_in_column) {\r\n\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'strong[1]';\r\n\t\t\t\t\t$first_strong_in_cell = $this->xpath->query($query, $cell);\r\n\t\t\t\t\t$strong = false;\r\n\t\t\t\t\tforeach($first_strong_in_cell as $strong) { }\r\n\t\t\t\t\tif(!$strong) {\r\n\t\t\t\t\t\tif(ReTidy::isEmptyTagIgnoringWhitespaceAndAttributes($cell) || ReTidy::getAttribute($cell, \"newtag\")->nodeValue === \"th\" || $cell->nodeName === \"th\") {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$found_non_strong_in_column = true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(ReTidy::haveSameTextContent($cell, $strong)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$found_non_strong_in_column = true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!$found_non_strong_in_column) {\r\n\t\t\t\t$done_a_column = true;\r\n\t\t\t\tforeach($column as $index2 => $value) {\r\n\t\t\t\t\tif($toppest_number && $leftest_number && $toppest_number <= $index2 && $leftest_number <= $index) {\r\n\t\t\t\t\t\t// we are into the data region of the table\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$cell = $value[0];\r\n\t\t\t\t\tif(!ReTidy::isEmpty($cell)) {\r\n\t\t\t\t\t\t$cell->setAttribute('newtag', 'th');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} elseif(!$done_a_column) {\r\n\t\t\t\t// keep looking\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach(ReTidy::array_mirror($this->table_grid) as $index => $row) {\r\n\t\t\t$found_non_strong_in_row = false;\r\n\t\t\tforeach($row as $index2 => $value) {\r\n\t\t\t\t$cell = $value[0];\r\n\t\t\t\tif($index === 1) {\r\n\t\t\t\t\tif($index2 === 1) {\r\n\t\t\t\t\t\t// the top left cell will not be a data cell\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ReTidy::getAttribute($cell, 'colspan')) {\r\n\t\t\t\t\t\t// this is pretty aggressive\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(!$found_non_strong_in_row) {\r\n\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'strong[1]';\r\n\t\t\t\t\t$first_strong_in_cell = $this->xpath->query($query, $cell);\r\n\t\t\t\t\t$strong = false;\r\n\t\t\t\t\tforeach($first_strong_in_cell as $strong) { }\r\n\t\t\t\t\tif(!$strong) {\r\n\t\t\t\t\t\tif(ReTidy::isEmptyTagIgnoringWhitespaceAndAttributes($cell) || ReTidy::getAttribute($cell, \"newtag\")->nodeValue === \"th\" || $cell->nodeName === \"th\") {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$found_non_strong_in_row = true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(ReTidy::haveSameTextContent($cell, $strong)) {\r\n\t\t\t\t\t\t\t//print(\"same<br>\\r\\n\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t//print(\"not<br>\\r\\n\");\r\n\t\t\t\t\t\t\t$found_non_strong_in_row = true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!$found_non_strong_in_row) {\r\n\t\t\t\t$done_a_row = true;\r\n\t\t\t\tforeach($row as $index2 => $value) {\r\n\t\t\t\t\tif($toppest_number && $leftest_number && $toppest_number <= $index2 && $leftest_number <= $index) {\r\n\t\t\t\t\t\t// we are into the data region of the table\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$cell = $value[0];\r\n\t\t\t\t\tif(!ReTidy::isEmpty($cell)) {\r\n\t\t\t\t\t\t$cell->setAttribute('newtag', 'th');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} elseif(!$done_a_row) {\r\n\t\t\t\t// keep looking\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function spreadWeightValues(array $values)\n {\n // Don't allow an empty value list\n if (count($values) === 0) {\n require_once 'Zend/Tag/Exception.php';\n throw new Zend_Tag_Exception('Value list may not be empty');\n }\n\n // Re-index the array\n $values = array_values($values);\n\n // If just a single value is supplied simply assign it to to all tags\n if (count($values) === 1) {\n foreach ($this->_items as $item) {\n $item->setParam('weightValue', $values[0]);\n }\n } else {\n // Calculate min- and max-weight\n $minWeight = null;\n $maxWeight = null;\n\n foreach ($this->_items as $item) {\n if ($minWeight === null && $maxWeight === null) {\n $minWeight = $item->getWeight();\n $maxWeight = $item->getWeight();\n } else {\n $minWeight = min($minWeight, $item->getWeight());\n $maxWeight = max($maxWeight, $item->getWeight());\n }\n }\n\n // Calculate the thresholds\n $steps = count($values);\n $delta = ($maxWeight - $minWeight) / ($steps - 1);\n $thresholds = [];\n\n for ($i = 0; $i < $steps; $i++) {\n $thresholds[$i] = floor(100 * log(($minWeight + $i * $delta) + 2));\n }\n\n // Then assign the weight values\n foreach ($this->_items as $item) {\n $threshold = floor(100 * log($item->getWeight() + 2));\n\n for ($i = 0; $i < $steps; $i++) {\n if ($threshold <= $thresholds[$i]) {\n $item->setParam('weightValue', $values[$i]);\n break;\n }\n }\n }\n }\n }", "public function convertToHtmlValue($data);", "function beratbadanormal($tb){\n\t$bbn = $tb - 100;\n\treturn $bbn;\n}", "function displayItemForBid($aItemInfo)\n{\n $itemID = $aItemInfo[\"itemID\"];\n $title = $aItemInfo[\"title\"];\n $ownerID = $aItemInfo[\"ownerID\"];\n $totalBid = $aItemInfo[\"totalBid\"];\n $desc = $aItemInfo[\"description\"];\n $minBid = $aItemInfo[\"minBidPrice\"];\n \n $display = \"<div id='bidItemContainer' class='col-sm-offset-3 col-sm-12'>\n <table id='bidItem'>\n <tr id='bidError'>\n <td colspan='4'>Please place a bid at a minimum of $\".$minBid.\"<td>\n </tr>\n <tr>\n <td colspan='2'>\n \".getPhoto($itemID).\"\n </td>\n <td id='itemName' colspan='2'>\n <h2>$title</h2>\n </td>\n </tr>\n <tr>\n <td colspan='4' id='itemDesc'>$desc</td> \n </tr>\n <tr>\n <td colspan='2'><span style='font-weight:bold'>Total Bid is: $<input type='text' size='5' id='currentBid' value='$totalBid' readonly style='border:none'></span></td>\n <td>$<input id='bid' type='number' value='\".$minBid.\"' min='\".$minBid.\"' step='.01'/>\n <input id='minBid' type='hidden' value='\".$minBid.\"'/></td>\n <input id='itemID' type='hidden' value='\".$itemID.\"'/></td>\n <td><input type='button' id='updateBid' \".isDisabled().\" value='BID AMOUNT'/></td>\n </tr>\n <tr>\n <td></td>\n </tr>\n </table>\n </div>\";\n return $display;\n\n}", "function values($price, $weight=0.45){\n $price = $price + ($price * $weight);\n return $price;\n}", "function IMC($name, $weightKg, $heightCm){\n $heightM = $heightCm/100;\n $heightCarre = $heightM * $heightM;\n $IMC = $weightKg/$heightCarre;\n $message = \"Bonjour $name , votre IMC est $IMC\";\n return $message;\n\n}", "private function score_biometric_data(){\t\t\r\n\t\t$data = $this->data['biometric_data'];\r\n\t\t$bp_systolic = $data['bp_systolic'];\r\n\t\tif ($bp_systolic > 140) $bp_systolic = 1;\r\n\t\telse if ($bp_systolic > 120) $bp_systolic = 3;\r\n\t\telse if ($bp_systolic == 0) $bp_systolic = 0;\r\n\t\telse $bp_systolic = 5;\r\n\t\t\t\r\n\t\tif ($data['bp_diastolic'] > 90) $bp_diastolic = 1;\r\n\t\telse if ($data['bp_diastolic'] > 80) $bp_diastolic = 3;\r\n\t\telse if ($data['bp_diastolic'] == 0) $bp_diastolic = 0;\r\n\t\telse $bp_diastolic = 5;\r\n\t\t\r\n\t\t$body_fat = 5;\r\n\t\tif ($this->demographics['gender'] == \"M\") {\r\n\t\t\tif ($this->demographics['age'] >= 60){\r\n\t\t\t\tif ($data['body_fat'] > 24.1) $body_fat = 1;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else if ($this->demographics['age'] >= 40) {\r\n\t\t\t\tif ($data['body_fat'] > 24.1) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 23.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else{\r\n\t\t\t\tif ($data['body_fat'] > 23.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 19.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif ($this->demographics['age'] >= 60) {\r\n\t\t\t\tif ($data['body_fat'] > 31.5) $body_fat = 1;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else if ($this->demographics['age'] >= 40) {\r\n\t\t\t\tif ($data['body_fat'] > 31.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 30.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else{\r\n\t\t\t\tif ($data['body_fat'] > 30.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 23.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\t\t\t\t\t\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\r\n\t\t$waist = 5;\r\n\t\tif ($this->demographics['gender'] == 'M') {\r\n\t\t\tif ($data['waist'] > 40) {\r\n\t\t\t\t$waist = 1;\r\n\t\t\t}\r\n\t\t\telse if ($data['waist'] == 0) {\r\n\t\t\t\t$waist = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($data['waist'] > 35) {\r\n\t\t\t\t$waist = 1;\r\n\t\t\t}\r\n\t\t\telse if ($data['waist'] == 0) {\r\n\t\t\t\t$waist = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$bmi = 3;\r\n\t\tif ($data['bmi'] > 30) $bmi = 1;\r\n\t\telse if ($data['bmi'] > 25) $bmi = 3;\r\n\t\telse if ($data['bmi'] > 18) $bmi = 5;\r\n\t\telse if ($data['bmi'] == 0) $bmi = 0;\r\n\t\t$data['bmi'] = sprintf(\"%.1f\", $data['bmi']);\r\n\r\n\t\t$blood_glucose = 5;\r\n\t\tif ($data['blood_glucose'] > 200) $blood_glucose = 1;\r\n\t\telse if ($data['blood_glucose'] > 129) $blood_glucose = 3;\t\t\t\r\n\t\telse if ($data['blood_glucose'] == 0) $blood_glucose = 0;\r\n\t\t\r\n\t\t$cholesterol = 5;\r\n\t\tif ($data['cholesterol'] > 239) $cholesterol = 1;\r\n\t\telse if ($data['cholesterol'] > 199) $cholesterol = 3;\t\t\t\r\n\t\telse if ($data['cholesterol'] == 0) $cholesterol = 0;\r\n\t\t\t\t\t\r\n\t\t$triglycerides = 5;\r\n\t\tif ($data['triglycerides'] > 200) $triglycerides = 1;\r\n\t\telse if ($data['triglycerides'] > 149) $triglycerides = 3;\t\t\t\r\n\t\telse if ($data['triglycerides'] == 0) $triglycerides = 0;\r\n\t\t\t\t\t\r\n\t\t$hdl = 1;\r\n\t\tif ($this->demographics['gender'] == 'F') {\r\n\t\t\tif ($data['hdl'] > 40) $hdl = 5;\r\n\t\t\telse if ($data['hdl'] > 30) $hdl = 3;\r\n\t\t\telse if ($data['hdl'] == 0) $hdl = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($data['hdl'] > 50) $hdl = 5;\r\n\t\t\telse if ($data['hdl'] > 35) $hdl = 3;\r\n\t\t\telse if ($data['hdl'] == 0) $hdl = 0;\r\n\t\t}\r\n\r\n//\t\tif($data['hdl']>59) $hdl=5;\r\n//\t\telse if($data['hdl']>40) $hdl=3;\r\n//\t\telse if($data['hdl']==0) $hdl=0;\r\n\r\n\t\t$ldl = 5;\r\n\t\tif ($data['ldl'] > 140) $ldl = 1;\r\n\t\telse if ($data['ldl'] > 100) $ldl = 3;\r\n\t\telse if ($data['ldl'] == 0) $ldl = 0;\r\n\r\n\t\tif($data['hdl'] > 0 && $data['cholesterol'] > 0)\r\n\t\t\t$ratio = $data['cholesterol'] / $data['hdl'];\r\n\t\telse\r\n\t\t\t$ratio = 0;\r\n\t\t\r\n\t\t$ratio = sprintf(\"%.1f\", $ratio);\r\n\r\n\t\t$tc_hdl = 5;\r\n\t\tif ($ratio > 4.5) $tc_hdl = 1;\r\n\t\telse if ($ratio == 0) $tc_hdl = 0;\r\n\r\n\r\n\t\t$hemoglobin = 5;\r\n\t\tif ($data['hemoglobin'] == 0)\r\n\t\t\t$hemoglobin = 0;\r\n\t\telse if (($data['hemoglobin'] < 4.0) || ($data['hemoglobin'] > 6.0)) {\r\n\t\t\t$hemoglobin = 1;\r\n\t\t}\r\n\r\n\t\t$cotinine = 5;\r\n\t\tif ($data['cotinine'] > 0) {\r\n\t\t\t$cotinine = 1;\r\n\t\t}\r\n\r\n\t\t$ob = new stdClass();\r\n\t\t$ob->total = 0;\r\n\t\t$ob->data = array('bp_systolic' => array($bp_systolic,.0625, 0.0, $data['bp_systolic']),\r\n\t\t\t\t\t\t'bp_diastolic' => array($bp_diastolic,.0625, 0.0, $data['bp_diastolic']),\r\n\t\t\t\t\t\t'body_fat' => array($body_fat,.125, 0.0, $data['body_fat']),\r\n\t\t\t\t\t\t'bmi' => array($bmi,.0625, 0.0, $data['bmi']),\r\n\t\t\t\t\t\t'waist' => array($waist, .0625, 0.0, $data['waist']),\r\n\t\t\t\t\t\t'blood_glucose' => array($blood_glucose,.0417, 0.0, $data['blood_glucose']),\r\n\t\t\t\t\t\t'hemoglobin' => array($hemoglobin,.0417, 0.0, $data['hemoglobin']),\r\n\t\t\t\t\t\t'cotinine' => array($cotinine,.0416, 0.0, $data['cotinine']),\r\n\t\t\t\t\t\t'cholesterol' => array($cholesterol,.1, 0.0, $data['cholesterol']),\r\n\t\t\t\t\t\t'triglycerides' => array($triglycerides,.1, 0.0, $data['triglycerides']),\r\n\t\t\t\t\t\t'hdl' => array($hdl,.1, 0.0, $data['hdl']),\r\n\t\t\t\t\t\t'ldl' => array($ldl,.1, 0.0, $data['ldl']),\r\n\t\t\t\t\t\t'tc_hdl' => array($tc_hdl,.1, 0.0, $ratio));\r\n\t\tforeach($ob->data as &$rec){\r\n\t\t\t$rec[2] = $rec[0] * $rec[1];\r\n\t\t\t$ob->total += $rec[2];\r\n\t\t}\r\n\t\treturn $ob;\r\n\t}", "public function toHTML();", "function cellGradeColor($value)\r\n {\r\n $grade ='';\r\n\tif($value == 'F')\r\n\t{\r\n\t \r\n\t $grade = $grade.'<p class=\"red_text\"><strong>'. $value.'</strong></p>';\r\n\t}else if($value == 'E')\r\n\t{\r\n\t\t\r\n\t\t $grade = $grade.'<p class=\"red_text\"><strong>'. $value.'</strong></p>';\r\n\t}else\r\n\t{\r\n\t $grade = $grade.'<p class=\"bold_text\"><strong>'. $value.'</strong></p>';\r\n\t} \r\n\t \r\n\t return $grade;\r\n\r\n }", "function dispArr($vals,$yr,$rates){\n\t\t\t\tfor($idx=0;$idx<$yr;$idx++){\n\t\t\t\t\techo(\"<tr>\");\n\t\t\t\t\tfor($jdx=0;$jdx<$rates+2;$jdx++){\n\t\t\t\t\t\tif($jdx===0){\n\t\t\t\t\t\t\techo(\"<td align='right'>\".$vals[$idx][$jdx].\"</td>\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo(\"<td align='right'>$\".(number_format($vals[$idx][$jdx],2)).\"</td>\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\techo(\"</tr>\");\n\t\t\t\t}\n\t\t\t}", "function CelluUni($valeur,$colonne,$large,$style)\n{\n $balise = '<td';\n if ($colonne != '') $balise.= ' colspan=\"'.$colonne.'\"';\n if ($large != '') $balise.= ' width=\"'.$large.'\"';\n if ($style != '') $balise.= ' class=\"'.$style.'\"';\n html($balise.'>'.$valeur.'</td>'); \n}", "function table_from_array(&$data_array, $has_header = TRUE, $class = \"\", $id = \"\", $text_limit_to_trim = null) {\n if ((count($data_array) == 0) || (count(current($data_array)) == 0)) {\n trigger_error(\"Array to build HTML table is empty\", E_USER_NOTICE);\n return FALSE;\n }\n $table_object = new html_classes\\table($class, $id);\n\n foreach ($data_array as $row_index => $row_data) {\n if ($has_header && ($row_index === 0)) {\n $thead = $table_object->append_thead();\n $tr = $thead->append_tr();\n } else {\n if (!isset($tbody)) {\n $tbody = $table_object->append_tbody();\n }\n $tr = $tbody->append_tr();\n }\n foreach ($row_data as $col_index => $col_value) {\n if ($has_header && ($row_index === 0)) {\n $tr->append_th($col_value);\n } else {\n if (!is_object($col_value)) {\n if (is_numeric($col_value)) {\n if (is_float($col_value)) {\n $col_value = number_format($col_value, 2);\n } else {\n $col_value = number_format($col_value);\n }\n }\n if (is_numeric($text_limit_to_trim) && strlen($col_value) > $text_limit_to_trim) {\n $col_value = substr($col_value, 0, $text_limit_to_trim) . \"...\";\n }\n } else {\n if (is_numeric($text_limit_to_trim) && strlen($col_value->get_value()) > $text_limit_to_trim) {\n $col_value->set_value(substr($col_value->get_value(), 0, $text_limit_to_trim) . \"...\");\n }\n// d($col_value->get_value());\n }\n $tr->append_td($col_value);\n }\n }\n }\n// \\var_dump($table_object);\n return $table_object;\n}", "function display()\n{\n global $ASP1, $ASP2, $SH, $MR, $SB;\n $SH2 = $SB + $SH;\n $ASP2 = (($SB * $MR) + ($SH * $ASP1)) / $SH2;\n echo sprintf ( \"%12d | %6d | %8.2f | Rs. %9.2f | %5.0f %% | %6d\\n\", $ASP2, $SB, $MR, $MR * $SB,\n (100 * ($ASP1 - $ASP2) / $ASP1), $SH2 );\n}", "private function Write_Balance_Table() {\n\t\t$top = 12 + self::VERT_MARGIN;\n\t\t$row_height = 8.5;\n\t\t$number_of_rows = 19;\n\t\t$labels_width = 80;\n\t\t$labels_left_1 = self::HORZ_MARGIN;\n\t\t$labels_left_2 = $labels_left_1 + $labels_width;\n\t\t$labels_left_3 = $labels_left_2 + $labels_width;\n\t\t\n\t\t$table_left = self::HORZ_MARGIN + 432;\n\t\t$table_column_width = 54;\n\t\t$table_left_column2 = $table_left + $table_column_width;\n\t\t\n\t\t$this->pdf->setlinewidth(0.40);\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t\n\t\t/**\n\t\t * Build the table first\n\t\t * $this->pdf->rect($x, $y, $w, $h);\n\t\t */\n\t\t\n\t\t//Define the height positions of elements in the table, so we can go adding and removing elements all willy nilly\n\t\t$label_heights = array(\n\t\t\n\t\t\t'BEGINNING CHECKING BALANCE'\t=> 2,\n\t\t\t'DEPOSITS'\t\t\t\t\t \t=> 4,\n\t\t\t'TOTAL RECEIPTS'\t\t\t\t=> 11,\n\t\t\t'DISBURSEMENTS'\t\t\t\t\t=> 12,\n\t\t\t'TOTAL DISBURSED'\t\t\t\t=> 16,\n\t\t\t'ENDING CHECKING BALANCE'\t\t=> 18,\n\t\t\t'OPERATING ACCOUNT'\t\t\t\t=> 2,\n\t\t\t'RETURNS'\t\t\t\t\t\t=> 2,\n\t\t\t'CREDIT CARD PAYMENTS'\t\t\t=> 5,\n\t\t\t'CHARGEBACKS'\t\t\t\t\t=> 6,\n\t\t\t//'WESTERN UNION PAYMENTS'\t\t=> 7,\n\t\t\t'MONEY ORDER'\t\t\t\t\t=> 7,\n\t\t\t//'QUICK CHECK DEPOSIT'\t\t\t=> 9,\n\t\t\t//'MONEYGRAM'\t\t\t\t\t\t=> 10,\n\t\t\t//'CRSI RECOVERY'\t\t\t\t\t=> 11,\n\t\t\t//'RECOVERY'\t\t\t\t\t\t=> 12,\n\t\t\t//'FINAL COLLECTIONS'\t\t\t\t=> 13,\n\t\t\t'DEBIT RETURNS'\t\t\t\t\t=> 8,\n\t\t\t'CREDIT RETURNS'\t\t\t\t=> 9,\n\t\t\t'LOANS'\t\t\t\t\t\t\t=> 12,\n\t\t//\t'CARD LOANS'\t\t\t\t\t=> 19,\n\t\t\t'DEBIT RETURNS DISBURSE'\t\t\t\t\t=> 13,\n\t\t\t'CREDIT RETURNS DISBURSE'\t\t\t\t=> 14,\n\t\t\t'INTERCEPT_RESERVE'\t\t\t\t=> 2,\n\t\t\t'TOTAL DEBITED'\t\t\t\t\t=> 4,\n\t\t\t\n\t\t\t);\n\t\t\n\t\t\n\t\t\n\t\t/**\n\t\t * fill table header\n\t\t */\n\t\t$this->Rect_TL($table_left, $top, $table_column_width * 2, $row_height * $label_heights['BEGINNING CHECKING BALANCE']);\n\t\t$this->pdf->fill();\n\t\t\n\t\t/**\n\t\t * fill highlighted rows\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'rgb', 1, 1, 176/255, 0);\n\t\t$this->Rect_TL($table_left_column2, $top + ($row_height * $label_heights['TOTAL RECEIPTS']), $table_column_width, $row_height);\n\t\t$this->Rect_TL($table_left_column2, $top + ($row_height * $label_heights['DEBIT RETURNS DISBURSE']), $table_column_width, $row_height);\n\t\t$this->Rect_TL($table_left_column2, $top + ($row_height * $label_heights['CREDIT RETURNS DISBURSE']), $table_column_width, $row_height);\n\t\t$this->Rect_TL($table_left, $top + ($row_height * $label_heights['TOTAL DISBURSED']), $table_column_width * 2, $row_height);\n\t\t$this->Rect_TL($table_left_column2, $top + ($row_height * $label_heights['ENDING CHECKING BALANCE']), $table_column_width, $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t/**\n\t\t * fill the cute little background at the bottom.\n\t\t */\n//\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n//\t\t$this->Rect_TL($table_left, $top + ($row_height * 24) - 1, $table_column_width * 2, 1);\n//\t\t$this->pdf->fill();\n\t\t\n\t\t/**\n\t\t * Add strokes to the table\n\t\t */\n\t\t$this->Rect_TL($table_left, $top, $table_column_width * 2, $row_height * $number_of_rows);\n\t\t\n\t\t$this->Line_TL($table_left + $table_column_width, $top,\n\t\t\t\t\t $table_left + $table_column_width, $top + ($row_height * $number_of_rows));\n\t\t\n\t\t$this->Line_TL($table_left, $top + ($row_height * $label_heights['BEGINNING CHECKING BALANCE']),\n\t\t\t\t\t $table_left + ($table_column_width * 2), $top + ($row_height * $label_heights['BEGINNING CHECKING BALANCE']));\n\t\t\n\t\t$this->Line_TL($table_left, $top + ($row_height * $label_heights['TOTAL DISBURSED']),\n\t\t\t\t\t $table_left + ($table_column_width * 2), $top + ($row_height * $label_heights['TOTAL DISBURSED']));\n\t\t\n\t\t$this->Line_TL($table_left, $top + ($row_height * $label_heights['ENDING CHECKING BALANCE']),\n\t\t\t\t\t $table_left + ($table_column_width * 2), $top + ($row_height * $label_heights['ENDING CHECKING BALANCE']));\n\t\t\t\t\t \n\t\t$this->Line_TL($table_left, $top + ($row_height * $label_heights['ENDING CHECKING BALANCE']) - 1,\n\t\t\t\t\t $table_left + ($table_column_width * 2), $top + ($row_height * $label_heights['ENDING CHECKING BALANCE']) - 1);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t/**\n\t\t * Build Label Backgrounds\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($labels_left_1, $top + ($row_height * $label_heights['BEGINNING CHECKING BALANCE']), $labels_width * 3, $row_height);\n\t\t$this->Rect_TL($labels_left_1, $top + ($row_height * $label_heights['DEPOSITS']), $labels_width, $row_height);\n\t\t$this->Rect_TL($labels_left_2, $top + ($row_height * $label_heights['TOTAL RECEIPTS']), $labels_width * 2, $row_height);\n\t\t$this->Rect_TL($labels_left_1, $top + ($row_height * $label_heights['DISBURSEMENTS']), $labels_width, $row_height);\n\t\t$this->Rect_TL($labels_left_2, $top + ($row_height * $label_heights['TOTAL DISBURSED']), $labels_width * 2, $row_height);\n\t\t$this->Rect_TL($labels_left_1, $top + ($row_height * $label_heights['ENDING CHECKING BALANCE']), $labels_width * 2, $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t/**\n\t\t * Build Labels\n\t\t */\n\t\t$this->Text_TL(\"BEGINNING CHECKING BALANCE\", \n\t\t\t$labels_left_1, $top + ($row_height * $label_heights['BEGINNING CHECKING BALANCE']) - 1, \n\t\t\t$labels_width * 3, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['UNDERLINE']} {$this->formats['ITALICS']}\");\n\n\t\t$this->Text_TL(\"DEPOSITS\", \n\t\t\t$labels_left_1, $top + ($row_height * $label_heights['DEPOSITS']) - 1, \n\t\t\t$labels_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['UNDERLINE']} {$this->formats['ITALICS']}\");\n\n\t\t$this->Text_TL(\"TOTAL RECEIPTS\", \n\t\t\t$labels_left_2, $top + ($row_height * $label_heights['TOTAL RECEIPTS']) - 1,\n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['UNDERLINE']} {$this->formats['ITALICS']}\");\n\n\t\t$this->Text_TL(\"DISBURSEMENTS\", \n\t\t\t$labels_left_1, $top + ($row_height * $label_heights['DISBURSEMENTS']) - 1,\n\t\t\t$labels_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['UNDERLINE']} {$this->formats['ITALICS']}\");\n\n\t\t$this->Text_TL(\"TOTAL DISBURSED\", \n\t\t\t$labels_left_2, $top + ($row_height * $label_heights['TOTAL DISBURSED']) - 1,\n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['UNDERLINE']} {$this->formats['ITALICS']}\");\n\n\t\t$this->Text_TL(\"ENDING CHECKING BALANCE\", \n\t\t\t$labels_left_1, $top + ($row_height * $label_heights['ENDING CHECKING BALANCE']) - 1,\n\t\t\t$labels_width * 3, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['UNDERLINE']} {$this->formats['ITALICS']}\");\n\n\t\t$this->Text_TL(\"OPERATING ACCOUNT\", \n\t\t\t$table_left, $top, \n\t\t\t$table_column_width, $row_height * $label_heights['OPERATING ACCOUNT'],\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['CENTER']} {$this->formats['ITALICS']}\");\n\n\t\t$this->Text_TL(\"RETURNS<avoidbreak=false>\",\n\t\t\t$table_left_column2, $top, \n\t\t\t$table_column_width, $row_height * $label_heights['RETURNS'],\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['CENTER']} {$this->formats['ITALICS']} adjustmethod=spread\");\n\t\t//Let's use variable and increment/decrement to define the locations of the\n\t\t\n\t\t$this->Text_TL(\"DEPOSITS\", \n\t\t\t$labels_left_2, $top + ($row_height * $label_heights['DEPOSITS']), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n\n\t\t$this->Text_TL(\"CREDIT CARD PAYMENTS\", \n\t\t\t$labels_left_2, $top + ($row_height * $label_heights['CREDIT CARD PAYMENTS']), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n\n\t\t$this->Text_TL(\"CHARGEBACKS\", \n\t\t\t$labels_left_2, $top + ($row_height * $label_heights['CHARGEBACKS']), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n\n\t\t/*$this->Text_TL(\"WESTERN UNION PAYMENTS\", \n\t\t\t$labels_left_2, $top + ($row_height * 7), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n*/\n\t\t$this->Text_TL(\"MONEY ORDERS\", \n\t\t\t$labels_left_2, $top + ($row_height * $label_heights['MONEY ORDER']), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n\n/*\t\t$this->Text_TL(\"QUICK CHECK DEPOSIT\", \n\t\t\t$labels_left_2, $top + ($row_height * 9), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n\n\t\t$this->Text_TL(\"MONEYGRAM\", \n\t\t\t$labels_left_2, $top + ($row_height * 10), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n\n\t\t$this->Text_TL(\"CRSI RECOVERY\", \n\t\t\t$labels_left_2, $top + ($row_height * 11), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n\n\t\t$this->Text_TL(\"RECOVERY\", \n\t\t\t$labels_left_2, $top + ($row_height * 12), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n*/\n\t\t/*$this->Text_TL(\"FINAL COLLECTIONS\", \n\t\t\t$labels_left_2, $top + ($row_height * 13), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n*/\n\t\t$this->Text_TL(\"DEBIT RETURNS\", \n\t\t\t$labels_left_2, $top + ($row_height * $label_heights['DEBIT RETURNS']), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n\n\t\t$this->Text_TL(\"CREDIT RETURNS\",\n\t\t\t$labels_left_2, $top + ($row_height * $label_heights['CREDIT RETURNS']),\n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n\n\t\t$this->Text_TL(\"LOANS\", \n\t\t\t$labels_left_2, $top + ($row_height * $label_heights['LOANS']), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n\n/*\t\t$this->Text_TL(\"CARD LOANS\",\n\t\t\t$labels_left_2, $top + ($row_height * 19),\n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n*/\n\t\t$this->Text_TL(\"DEBIT RETURNS\",\n\t\t\t$labels_left_2, $top + ($row_height * $label_heights['DEBIT RETURNS DISBURSE']), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n\n\t\t$this->Text_TL(\"CREDIT RETURNS\",\n\t\t\t$labels_left_2, $top + ($row_height * $label_heights['CREDIT RETURNS DISBURSE']), \n\t\t\t$labels_width * 2, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']}\");\n\t\t\t\n\t\t/**\n\t\t * Set Values\n\t\t */\n\t\t$this->Text_TL(number_format($this->data['intercept_reserve'], 2),\n\t\t\t$table_left_column2, $top + ($row_height * $label_heights['INTERCEPT_RESERVE']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\n\t\t$this->Text_TL(number_format($this->data['period']['total debited']['span'], 2),\n\t\t\t$table_left, $top + ($row_height * $label_heights['TOTAL DEBITED']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['period']['credit card payments']['span'], 2),\n\t\t\t$table_left, $top + ($row_height * $label_heights['CREDIT CARD PAYMENTS']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\n\t\t$this->Text_TL(number_format($this->data['period']['chargebacks']['span'], 2),\n\t\t\t$table_left, $top + ($row_height * $label_heights['CHARGEBACKS']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\n/*\t\t$this->Text_TL(number_format($this->data['period']['western union deposit']['span'], 2),\n\t\t\t$table_left, $top + ($row_height * $label_heights['WESTERN UNION DEPOSIT']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\n\t\t$this->Text_TL(number_format($this->data['period']['money order deposit']['span'], 2),\n\t\t\t$table_left, $top + ($row_height * $label_heights['MONEY ORDER']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t/*$this->Text_TL(number_format($this->data['period']['quick check deposit']['span'], 2),\n\t\t\t$table_left, $top + ($row_height * $label_heights['QUICK CHECK DEPOSIT']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['period']['moneygram deposit']['span'], 2),\n\t\t\t$table_left, $top + ($row_height * $label_heights['MONEYGRAM DEPOSIT']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\n/*\t\t$this->Text_TL(number_format($this->data['period']['crsi recovery']['span'], 2),\n\t\t\t$table_left, $top + ($row_height * $label_heights['CRSI RECOVERY']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\n\t/*\t$this->Text_TL(number_format($this->data['period']['recovery']['span'], 2),\n\t\t\t$table_left, $top + ($row_height * $label_heights['RECOVERY']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\n/*\t\t$this->Text_TL(number_format($this->data['period']['final collections']['span'], 2),\n\t\t\t$table_left, $top + ($row_height * $label_heights['FINAL COLLECTIONS']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\n\t\t$this->Text_TL(number_format($this->data['period']['debit returns']['span'], 2),\n\t\t\t$table_left_column2, $top + ($row_height * $label_heights['DEBIT RETURNS']),\n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['period']['credit returns']['span'], 2),\n\t\t\t$table_left_column2, $top + ($row_height * $label_heights['CREDIT RETURNS']),\n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['period']['debit returns']['span'] + $this->data['period']['credit returns']['span'], 2),\n\t\t\t$table_left_column2, $top + ($row_height * $label_heights['TOTAL RECEIPTS']),\n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['period']['loan disbursement']['span'], 2),\n\t\t\t$table_left, $top + ($row_height * $label_heights['DISBURSEMENTS']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n/*\t\t$this->Text_TL(number_format($this->data['card_loan_disbursement'], 2),\n\t\t\t$table_left, $top + ($row_height * 19),\n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n*/\n\t\t$this->Text_TL(number_format($this->data['period']['debit returns']['span'], 2),\n\t\t\t$table_left_column2, $top + ($row_height * $label_heights['DEBIT RETURNS DISBURSE']),\n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\n\t\t$this->Text_TL(number_format($this->data['period']['credit returns']['span'], 2),\n\t\t\t$table_left_column2, $top + ($row_height * $label_heights['CREDIT RETURNS DISBURSE']),\n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\n\t\t$this->Text_TL(number_format($this->data['period']['loan disbursement']['span'], 2),\n\t\t\t$table_left, $top + ($row_height * $label_heights['TOTAL DISBURSED']), \n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['period']['debit returns']['span'] + $this->data['period']['credit returns']['span'], 2),\n\t\t\t$table_left_column2, $top + ($row_height * $label_heights['TOTAL DISBURSED']),\n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['intercept_reserve'], 2),\n\t\t\t$table_left_column2, $top + ($row_height * $label_heights['ENDING CHECKING BALANCE']) - 1,\n\t\t\t$table_column_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t}", "public function to_html_raw()\n {\n $html = \"\";\n if(count($this->data))\n {\n $html = \"<tr>\";\n foreach($this->data as $key => $val)\n {\n $html .= \"<td>\".$val.\"</td>\"; \n } \n $html .= \"</tr>\";\n }\n return $html; \n }", "function printcalc($farea,$fnbcalls,$fminutes,$frate,$abo) {\n global $table,$objPHPExcel,$page,$ld,$totcall,$totmin,$totprix,$totmob,$minmob,$prixmob;\n if (!$abo) {\n $ld++;\n if (!$frate) {\n $iprix=0;\n $frate=$prettyprix=\"Inclus\";\n } else {\n $iprix=$fminutes*$frate;\n $prettyprix=round($iprix,2);\n }\n $prettyarea=preg_replace('/MOBILE/', 'MOB', $farea);\n $table .=\"<tr>\\n<td colspan=\\\"4\\\" style=\\\"border-right:0.1px solid black; border-top:0.1px solid black;\\\">$prettyarea</td>\\n<td style=\\\"border-right:0.1px solid black; border-top:0.1px solid black;\\\">$fnbcalls</td>\\n<td style=\\\"border-right:0.1px solid black; border-top:0.1px solid black;\\\">\". round($fminutes) .\"</td>\\n<td style=\\\"border-right:0.1px solid black; border-top:0.1px solid black; text-align:right\\\">$prettyprix</td>\\n</tr>\\n\";\n $objPHPExcel->setActiveSheetIndex($page)->setCellValue(\"B\".$ld,$farea);\n $objPHPExcel->setActiveSheetIndex($page)->setCellValue(\"H\".$ld,$fnbcalls);\n $objPHPExcel->setActiveSheetIndex($page)->setCellValue(\"I\".$ld,round($fminutes));\n $objPHPExcel->setActiveSheetIndex($page)->setCellValue(\"J\".$ld,$frate);\n $objPHPExcel->setActiveSheetIndex($page)->setCellValue(\"K\".$ld,$prettyprix);\n $totcall = $totcall+$fnbcalls;\n $totmin = $totmin+$fminutes;\n $totprix = $totprix+$iprix;\n } else {\n $iprix=$fminutes*$frate;\n $totcall = $totcall+$fnbcalls;\n $totmin = $totmin+$fminutes;\n $totmob=$totmob+$fnbcalls;\n $minmob=$minmob+$fminutes;\n $prixmob=$prixmob+$iprix;\n }\n\n\n}", "function tap_beides($default){\n\t\tglobal $game;\n\n\t\treturn $wert = '\n\t\t<table border=0 cellpadding=0 cellspacing=0>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_metal_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71b\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"base_resource_1\" value=\"'.(round($default['resource_1']*0.16)).'\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_mineral_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71b\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"base_resource_2\" value=\"'.(round($default['resource_2']*0.16)).'\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_latinum_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71b\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"base_resource_3\" value=\"'.(round($default['resource_3']*0.16)).'\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_unit1_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71b\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"base_unit_1\" value=\"'.$default['min_unit_1'].'\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_unit2_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71b\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"base_unit_2\" value=\"'.$default['min_unit_2'].'\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_unit3_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71b\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"base_unit_3\" value=\"'.$default['min_unit_3'].'\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_unit4_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71b\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"base_unit_4\" value=\"'.$default['min_unit_4'].'\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_unit5_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71b\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"base_unit_5\" value=\"'.$default['unit_5'].'\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_unit6_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71b\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"base_unit_6\" value=\"'.$default['unit_6'].'\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_metal_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71c\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"add_resource_1\" value=\"'.(round($default['resource_1']*0.03)).'\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_mineral_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71c\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"add_resource_2\" value=\"'.(round($default['resource_2']*0.03)).'\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_latinum_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71c\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"add_resource_3\" value=\"'.(round($default['resource_3']*0.03)).'\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_unit1_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71c\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"add_unit_1\" value=\"0\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_unit2_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71c\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"add_unit_2\" value=\"0\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_unit3_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71c\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"add_unit_3\" value=\"0\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_unit4_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71c\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"add_unit_4\" value=\"0\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_unit5_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71c\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"add_unit_5\" value=\"0\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t<tr><td width=150>&nbsp;<img src=\"'.$game->GFX_PATH.'menu_unit6_small.gif\">&nbsp;('.constant($game->sprache(\"TEXT71c\")).'):</td><td width=20></td><td width=80><input type=\"text\" id=\"add_unit_6\" value=\"0\" class=\"Field_nosize\" size=\"10\" maxlength=\"6\"></td></tr>\n\t\t</table>';\n\t}", "private function getFieldOutputNumericAI($value, $iar = [])\n {\n if ($this->getFieldValue($value) == '') {\n $spF = ['id' => $value['COLUMN_NAME'], 'style' => 'font-style:italic;'];\n return $this->setStringIntoTag('auto-numar', 'span', $spF);\n }\n $inAdtnl = [\n 'type' => 'hidden',\n 'name' => $value['COLUMN_NAME'],\n 'id' => $value['COLUMN_NAME'],\n 'value' => $this->getFieldValue($value),\n ];\n if ($iar !== []) {\n $inAdtnl = array_merge($inAdtnl, $iar);\n }\n return '<b>' . $this->getFieldValue($value) . '</b>' . $this->setStringIntoShortTag('input', $inAdtnl);\n }", "function generateTable($widths, $headers, $values)\n{\n\t$theTable = \"<table width=\\\"100%\\\">\\n\";\n\t$theTable = $theTable . \"<tr>\"; \n\n\t$table_column_width = \"\";\n\t$rowcounter = 0;\n\n\tforeach ( $headers as $table_cell )\n\t{ \n\t\tif ($widths != null)\n\t\t{\n\t\t\t$table_column_width = \" width=\\\"\".$widths[$rowcounter].\"\\\"\";\n\t\t}\n\n\t\t$theTable = $theTable . \"<th class=\\\"tdHeader\\\"\".$table_column_width.\">$table_cell</th>\";\n\t\t$rowcounter++;\n\t} \n\n\t$theTable = $theTable . \"</tr>\\n\\t<tr>\";\n\n\t$count = count( $headers );\n\t$rowcounter = 0;\n\t$table_odd = \"1\";\n\n\tforeach ( $values as $table_value )\n\t{\n\t\tif ($rowcounter == $count) \n\t\t{\n\t\t\t$theTable = $theTable . \"</tr>\\n<tr>\";\n\t\t\t$rowcounter = 0;\n\t\t\tif ($table_odd == \"1\") \n\t\t\t{\n\t\t\t\t$table_odd = \"0\";\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$table_odd = \"1\";\n\t\t\t}\n\t\t}\n\t\tif ($table_odd == \"1\") \n\t\t{\n\t\t\t$table_class = \"tdOdd\";\n\t\t} else\n\t\t{\n\t\t\t$table_class = \"tdEven\";\n\t\t}\n\n\t\t$theTable = $theTable . \"<td class=\\\"$table_class\\\" valign=\\\"top\\\">$table_value</td>\";\n\t\t$rowcounter++;\n\t}\n\t$theTable = $theTable . (\"</tr>\\n</table>\\n\");\n\treturn $theTable;\n}", "abstract public function convert_to_html();", "function makeBold($val){\n\t\treturn \"<b>$val</b>\";\n\t}", "function unit_display($bits) {\n\n\t$output = \"\";\n\n\tif (($bits / 1000000000000) > 1 ) {\n\t\t$output = round(($bits / 1000000000000), 3) . \" Tb\";\n\t}elseif (($bits / 1000000000) > 1 ) {\n\t\t$output = round(($bits / 1000000000), 3) . \" Gb\";\n\t}elseif (($bits / 1000000) > 1 ) {\n\t\t$output = round(($bits / 1000000), 3) . \" Mb\";\n\t}elseif (($bits / 1000) > 1 ) {\n\t\t$output = round(($bits / 1000), 3) . \" Kb\";\n\t}else{\n\t\t$output = $bits . \" bits\";\n\t}\n\n\treturn $output;\n\n}", "public function decorateRating($value, $row)\n {\n return '<div class=\"rating-box percent-'.$value.'\"><div class=\"rating\" style=\"width:'.$value.'%\"></div></div>';\n }", "function satoshitize($satoshitize) {\n return sprintf(\"%.8f\", $satoshitize);\n}", "private function set_biometric_data($arr){\r\n\t\t$err=null;\r\n\t\ttry{\r\n \t\t$hf=$this->vc->exists('height_ft',$arr,\"integer\",array(\"rangex_low\"=>0,\"rangex_high\"=>8),true,false);\r\n \t\t$hi=$this->vc->exists('height_in',$arr,\"integer\",array(\"range_low\"=>0,\"rangex_high\"=>12),true,false);\r\n \t\t\r\n \t\t$this->data['biometric_data']['height']=($hf*12)+$hi;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please select your height in feet and inches\";\r\n \t\t$eob->name = \"Height\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('weight',$arr,\"numeric\",array(\"rangex_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['weight']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter you weight in pounds\";\r\n \t\t$eob->name = \"Weight\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('bp_systolic',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['bp_systolic']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your blood pressure systolic value\";\r\n \t\t$eob->name = \"Systolic\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('bp_diastolic',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['bp_diastolic']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for you blood pressure diastolic value\";\r\n \t\t$eob->name = \"Diastolic\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('body_fat',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['body_fat']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your percent body fat\";\r\n \t\t$eob->name = \"Percent Body Fat\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\r\n \t$height=$this->data['biometric_data']['height'];\r\n \tif($height>0){\r\n \t\t\t$this->data['biometric_data']['bmi']=($this->data['biometric_data']['weight']*703)/pow($height,2);\r\n \t}else{\r\n \t\t\t$this->data['biometric_data']['bmi']=0;\r\n \t}\r\n \t\t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('waist',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['waist']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your waist circumference in inches\";\r\n \t\t$eob->name = \"Waist size\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n \ttry{\r\n \t\t$v=$this->vc->exists('blood_glucose',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['blood_glucose']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your blood glucose level\";\r\n \t\t$eob->name = \"Blood Glucose\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('hemoglobin',$arr,\"numeric\",array(\"precision\"=>\"3,3\"),true,false);\r\n \t\t$this->data['biometric_data']['hemoglobin']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number of your blood hemoglobin level\";\r\n \t\t$eob->name = \"Hemoglobin\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('cotinine',$arr,\"numeric\",array(\"precision\"=>\"3,3\"),true,false);\r\n \t\t$this->data['biometric_data']['cotinine']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your blood cotinine (nicotine) level\";\r\n \t\t$eob->name = \"Cotinine\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n \ttry{\r\n \t\t$v=$this->vc->exists('cholesterol',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['cholesterol']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your total cholesterol level\";\r\n \t\t$eob->name = \"Total cholesterol\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('triglycerides',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['triglycerides']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your level of triglycerides\";\r\n \t\t$eob->name = \"Triglycerides\";\r\n \t\t$err[] = $eob;\r\n \t} \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('hdl',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['hdl']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your HDL cholesterol level\";\r\n \t\t$eob->name = \"HDL\";\r\n \t\t$err[] = $eob;\r\n \t} \t \t\r\n\t\ttry{\r\n \t\t$v=$this->vc->exists('ldl',$arr,\"numeric\",array(\"range_low\"=>0),true,false);\r\n \t\t$this->data['biometric_data']['ldl']=($v==\"\")?0:$v;\r\n \t}catch(ValidationException $e){\r\n \t\t$eob=$e->createErrorObject();\r\n \t\t$eob->message = \"Please enter a number for your LDL cholesterol level\";\r\n \t\t$eob->name = \"LDL\";\r\n \t\t$err[] = $eob;\r\n \t}\r\n \treturn ($err)?$err:false;\r\n\t}", "public function asHtml(){\n $html = \"<table class='timer'>\\n<tr><th>ID</th><th>time [s]</th></tr>\\n\";\n foreach($this->times as $id => $time)\n $html .= \"<tr><td>$id</td><td>\" . number_format($time,$this->decimals) . \"</td></tr>\\n\";\n return $html . '</table>';\n }", "private function _getWrappingValues(){\n return number_format(Tools::ps_round($this->context->cart->getOrderTotal(TRUE, Cart::ONLY_WRAPPING), 2), 2, '.', '');\n }", "function formatMoney($number, $cents = 2, $title = '') {\n\tif ( is_numeric($number) ) {\n\t\t// whole number\n\t\tif ( floor($number) == $number ) {\n\t\t\t$money = number_format( $number, ($cents == 2 ? 2 : 0) ); // format\n\t\t} else { // cents\n\t\t\t$money = number_format( round($number, 2), ($cents == 0 ? 0 : 2) ); // format\n\t\t} // integer or decimal\n\t\t\n\t\tif ( $title ) {\n\t\t\t$title = ' class=\"simptip-position-top simptip-smooth simptip-fade\" data-clipboard data-clipboard-text=\"'.$title.'\" data-tooltip=\"'.$title.'\"';\n\t\t}\n\t\techo '<td class=\"chart_data\"><span'.$title.'>'.$money.'</span>'.Config::get('callrate.currency').'</td>' . PHP_EOL;\n\t} else {\n\t\techo '<td class=\"chart_data\"></td>' . PHP_EOL;\n\t}\n}", "public function body()\n {\n $this->altRow = false;\n $lastBreakValue = null;\n $body[] = '<tbody>';\n $breaks = 0;\n foreach ($this->data as $index => $row) {\n if (!empty($this->tableOptions['break'])) {\n $breakValue = $row[$this->tableOptions['break']];\n if ($breakValue !== $lastBreakValue) {\n $lastBreakValue = $breakValue;\n if ($breaks) {\n $body[] = '</tbody>';\n $body[] = '<tbody class=\"page-break-before\">';\n }\n $breaks++;\n $body[] = $this->buildBreakRow($this->tableOptions['break'], $row);\n // continue;\n }\n }\n $body[] = $this->buildRow($row);\n }\n $body[] = '</tbody>';\n\n $ret = implode(chr(10), $body);\n\n if (!empty($this->tableOptions['totals'])) {\n $ret .= $this->buildTotalsRow();\n }\n\n return $ret;\n }", "function tableauToHTML(array $tab)\n{\n echo \"<table>\";\n foreach ($tab as $i => $ligne) {\n echo \"<tr>\";\n foreach ($ligne as $j => $valeur) {\n echo \"<td>$valeur</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "function outputPrice($amount)\n {\n $hmtl = '<h1> The Amount for 5 item is = '.$amount.'</h1>';\n echo $hmtl;\n }", "function bone_string($avg_rating) {\r\n $bone = \"\";\r\n $count = 0;\r\n while($count < $avg_rating) {\r\n $bone .= \"<img class='bone' src='../images/bone.png' alt='bone'>\";\r\n $count += 1;\r\n }\r\n return($bone);\r\n}", "function battingAve($h, $ab){\n //protects from divided-by 0\n if($ab > 0)\n $ave = $h/$ab;\n else\n $ave = 0.0;\n //displays average as red if greater than or equal to 0.3 \n if($ave >= 0.3)\n return \"<span style = color:red>$ave</span>\"; \n //default return \n return \"<span>$ave</span\";\n }", "private function createHorizontalLabels()\n {\n $html = array();\n\n $html[] = '<div class=\"'.$this->style->axes->abs->wrapperCssClass.'\">';\n\n foreach ($this->globalGfxData->ordMinMax as $index => $ordData) {\n $point1 = new Point(\n $this->globalGfxData->absSteps[ $index ],\n $this->globalGfxData->bottom\n );\n\n $html[] = $this->createLabels(\n $this->style->axes->abs->labels[ $index ]->label,\n $point1,\n $this->style->axes->abs->labelCssClass\n );\n }\n\n $html[] = '</div>';\n\n return implode('', $html);\n }", "function tableau_smileys($cols='',$return=true) {\n\t$listimag = genere_list_smileys(_DIR_SMILEYS_SPIPBB);\n\t// nombre de colonnes (2 par défaut) (pas trop large pour GAF ! !!) c: 23/12/7 Il vaut mieux 3 ou reduire l'espace disponible ou le nombre d'emoticons\n\tif($cols=='') { $cols=3; }\n\t$compte=0;\n\t$champ='texte';\n\n\t$aff = \"<table width='100%' cellspacing='0' cellpadding='1' border='0'><tr>\\n\";\n\twhile (list($nom,$chem) = each($listimag)) {\n\t\t$aff.= \"<td style='vertical-align:bottom' class='verdana1'><div style='text-align:center'>\\n\n\t\t\t<a href=\\\"javascript:emoticon(':$nom',document.getElementById('$champ'))\\\">\\n\n\t\t\t<img src='\".$chem.\"' style='border:0' title='smiley - \".$nom.\"' alt='smil' />\\n\n\t\t\t</a></div></td>\\n\";\n\n\t\t$compte++;\n\t\tif ($compte % $cols == 0) { $aff.= \"</tr><tr>\\n\"; }\n\t}\n\t$aff.= \"</tr></table>\\n\";\n\n\tif($return) { return $aff; } else { echo $aff; }\n}", "function calculate_belt( ){\n\t\tvalidate_isset(['belt', 'drive', 'width', 'length']);\n\n\t\t$belt = __get_belt_details($_POST['belt']);\n\n\t\treturn __get_belt_price($_POST['drive'], $belt['piw'], $_POST['width'], $_POST['length']);\n\t}", "function writeAsHtmlTable() \r\n\t{\r\n\t\t\t// Import Package Utility\r\n\t\t\tinclude_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); \t\t\t\r\n\t\tRDFUtil::writeHTMLTable($this->getMemModel());\r\n\t}", "function format($cols,$name,$value='',$unit=''){\n $vlen=strlen($value.$unit)+1;\n $format='%-'.($cols-$vlen).\".\".($cols-$vlen).\"s\".'%'.($vlen).\".\".($vlen).\"s\"; //name & value+unit\n return sprintf($format,$name,$value.$unit);\n}", "function displayBoilerProperties($tableName = NULL){\n\n $display = Steam_Support::displayWarnings($this);\n $steamDisplay = new Steam_ObjectDisplay(array(\n array($this->feedwater, 'Feedwater'),\n array($this->blowdown, 'Blowdown'),\n array($this->outletSteam, 'Steam'),\n ));\n $display .= $steamDisplay->displaySteamObjectTable($tableName, true);\n $display .= $this->displayBoilerDetails();\n $display .= \"<table><tr><td>\n <form action='equipBoiler' method='Post'>\n <input type='hidden' name='daPressure' value='\".round($steamDisplay->mS->localize($this->feedwater->pressure,'pressure'),2).\"'>\n <input type='hidden' name='combustEff' value='\".round($this->boilerEff*100,2).\"'>\n <input type='hidden' name='blowdownRate' value='\".round($this->blowdownRate*100,2).\"'>\n <input type='hidden' name='SteamPressure' value='\".round($steamDisplay->mS->localize($this->outletSteam->pressure,'pressure'),2).\"'>\n <input type='hidden' name='SteamSecondParameter' value='SpecificEnthalpy'>\n <input type='hidden' name='SteamSpecificEnthalpy' value='\".round($steamDisplay->mS->localize($this->outletSteam->specificEnthalpy,'specificEnthalpy'),2).\"'>\n <input type='hidden' name='massFlow' value='\".round($steamDisplay->mS->localize($this->outletSteam->massFlow,'massflow'),2).\"'>\n \n <input type='submit' name='Enter' value='\".$steamDisplay->translator->_('Copy to Boiler Calculator').\"'>\n </form>\n </td><td style='color: red; padding-left: 10px;'>\n \".$steamDisplay->translator->_('*May include slight rounding errors.').\"\n </td></tr></table>\";\n \n return $display;\n }", "public function overlayFixedHtmlAttributeValues() {}", "function barra($nombre, $porcentaje)\n{\n\t$ancho = 1;\n\n\t//LARGO M�IMO\n\t$largo = 10;\n?>\n<table width=\"40%\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#E9E9E9\">\n<tr id=\"trtitulogris\">\n<td colspan=\"2\"><?php echo $nombre; ?></td>\n</tr>\n<tr>\n<td width=\"70%\"><img src=\"../../../../imagenes/punto.gif\" height=\"<?php echo $largo ?>\" width=\"<?php echo $porcentaje ?>%\" style=\"color:#FEF7ED\"></td>\n<td width=\"30%\"><?php echo round($porcentaje,1).\" %\"; ?></td>\n</tr>\n</table>\n<br>\n<?php\n}", "protected function to_html( $value ) {\n\t\tif ( $this->is_embedded_html( $value ) ) {\n\t\t\treturn $value['html'];\n\t\t} elseif ( $this->is_microformat( $value ) ) {\n\t\t\treturn webmention_sanitize_html( htmlspecialchars( $value['value'] ) );\n\t\t}\n\t\treturn webmention_sanitize_html( htmlspecialchars( $value ) );\n\t}", "public function getHTML()\n {\n $rowIDs = $this->rowID;\n $numberOfColumns = $this->tableColumns;\n $html = \"\";\n $rowCounter = 0;\n\n $html .= \"<table class='table'>\";\n\n if ($this->tableHead != null) {\n $html .= \"<tr>\";\n\n foreach ($this->tableHead as $head) {\n $html .= \"<th>$head</th>\";\n }\n $html .= \"</tr>\";\n }\n $html .= \"<tr>\";\n\n $i = 0;\n foreach ($this->tableData as $data) {\n if (($i) % $numberOfColumns == 0) {\n $html .= \"</tr><tr id='$rowIDs[$rowCounter]'>\";\n $rowCounter++;\n }\n//\n $html .= \"<td>$data</td>\";\n $i++;\n\n }\n $html .= \"</tr>\";\n\n $html .= \"</table>\";\n\n return $html;\n\n }", "function show($value){\n return \"<td>\"\n . \"$value\"\n . \"</td>\";\n }", "function format_megabytes($megabytes)\n{\n if ($megabytes >= 1000) {\n return $megabytes / 1000 . 'GB';\n }\n\n if ($megabytes >= 1000000) {\n return $megabytes / 1000000 . 'TB';\n }\n\n return $megabytes . 'MB';\n}", "private function _calculate_weight( $carts )\n\t{\n\t\t$total_weight = 0;\n\t\t$weights = 0;\n\n\t\tforeach( $carts as $cart_product )\n\t\t{\n\t\t\t$product = $cart_product['data'];\n\t\t\t// jika berat kosong (null), berat default diambil dari nilai berat setting JNE\n\t\t\t$weight = ( $product->weight ) ? $product->weight : $this->jne_settings['weight'] ;\n\t\t\t// detai content \n\t\t\t$content = '<tr class=\"row-jne-weight-data\"><td class=\"col-1\">'. $product->post->post_title;\n\t\t\t// memiliki volume\n\t\t\tif( $product->length && $product->width && $product->height ) {\n\t\t\t\t// hitung volume\n\t\t\t\t$volume = $product->length * $product->width * $product->height;\n\t\t\t\t// hitung volumetrik\n\t\t\t\t$volumetik = ($volume / 6000) * $weight;\n\t\t\t\t// Apabila hitungan volumetrik lebih berat dari berat aktual, maka biaya kirim dihitung berdasarkan berat volumetrik.\n\t\t\t\t$weight = ($volumetik > $weight) ? $volumetik : $weight ;\n\t\t\t\t// detai content \n\t\t\t\t$content .= sprintf(' (%sx%sx%s)', $product->length, $product->width, $product->height);\n\t\t\t} \n\t\t\t// detai content \n\t\t\t$content .= '</td><td class=\"col-2\">:</td><td class=\"col-3\">'. $this->_floor_dec($weight).' kg</td></tr>';\n\n\t\t\t// hitung berat per kuantitas\n\t\t\t$weight = $weight * $cart_product['quantity'];\n\t\t\t// increase\n\t\t\t$weights += $weight;\n\n\t\t\t// set detai content \n\t\t\t$this->_tooltip_content .= $content;\n\t\t}\n\t\t\n\t\t// prehitungan toleransi\n\t\tif($weights > 1) {\n\t\t\t$tolerance = $this->jne_settings['tolerance'];\n\t\t\t$_weights = $this->_floor_dec($weights, 2);\n\t\t\t$intval = intval($weights);\n\t\t\t$diff = $_weights - $intval;\n\t\t\t$total_weight = $diff > $tolerance ? ceil($weights) : $intval;\n\n\t\t\t/* uncomment this for debugging\n\t\t\tjne_rate_debug(array(\n\t\t\t\t'weights' => array(\n\t\t\t\t\t'default' => $weights,\n\t\t\t\t\t'precision' => $_weights\n\t\t\t\t),\n\t\t\t\t'fraction' => array(\n\t\t\t\t\t'up' => ceil($weights),\n\t\t\t\t\t'down' => $intval\n\t\t\t\t),\n\t\t\t\t'diff' => array(\n\t\t\t\t\t'default' => $weights - $intval,\n\t\t\t\t\t'precision' => $diff\n\t\t\t\t),\n\t\t\t\t'tolerance' => $tolerance,\n\t\t\t\t'total_weight' => $total_weight\n\t\t\t));\n\t\t\t*/\n\t\t\n\t\t\t$this->_tooltip_content .= '<tr class=\"row-jne-weight-tolerance\"><td class=\"col-1 text-right\">Tolerance</td><td class=\"col-2\">:</td><td class=\"col-3\">'.$tolerance.' kg</td></tr>';\n\t\t} \n\t\telse $total_weight = 1;\n\t\t\t\n\t\t$this->_tooltip_content .= '<tr class=\"row-jne-weight-total\"><td class=\"col-1 text-right\">Total</td><td class=\"col-2\">:</td><td class=\"col-3\">'.$total_weight.' kg</td></tr>';\n\n\t\treturn $total_weight;\n\t}", "function array_display($array_name)\n{\n $r = '';\n $r .= '<style> table,td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n $r .= '<th>Index/Key</th>';\n $r .= '<th>Value</th>';\n $r .= '</tr>';\n foreach ($array_name as $index => $value) {\n $r .= '<tr>';\n $r .= '<td> '.$index.' </td>';\n if ($index == 'price') {\n $r .= '<td> $'.$value.' </td>';\n $r .= '</tr>';\n } else {\n $r .= '<td>'.$value.' </td>';\n $r .= '</tr>';\n }\n }\n $r .= '</table>';\n\n return $r;\n}", "function array_display($array_name)\n{\n $r = '';\n $r .= '<style> table,td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n $r .= '<th>Index/Key</th>';\n $r .= '<th>Value</th>';\n $r .= '</tr>';\n foreach ($array_name as $index => $value) {\n $r .= '<tr>';\n $r .= '<td> '.$index.' </td>';\n if ($index == 'price') {\n $r .= '<td> $'.$value.' </td>';\n $r .= '</tr>';\n } else {\n $r .= '<td>'.$value.' </td>';\n $r .= '</tr>';\n }\n }\n $r .= '</table>';\n\n return $r;\n}", "function array_display($array_name)\n{\n $r = '';\n $r .= '<style> table,td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n $r .= '<th>Index/Key</th>';\n $r .= '<th>Value</th>';\n $r .= '</tr>';\n foreach ($array_name as $index => $value) {\n $r .= '<tr>';\n $r .= '<td> '.$index.' </td>';\n if ($index == 'price') {\n $r .= '<td> $'.$value.' </td>';\n $r .= '</tr>';\n } else {\n $r .= '<td>'.$value.' </td>';\n $r .= '</tr>';\n }\n }\n $r .= '</table>';\n\n return $r;\n}", "function format_unit(\n $value,\n $base = 1024,\n $units = ['', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\n $precision = 2\n) {\n if ($value < 0) {\n return '-' . format_unit(abs($value), $units, $precision);\n }\n\n if ($value < 1) {\n return $value . ' ' . $units[0];\n }\n\n $power = min(\n floor(log($value, $base)),\n count($units) - 1\n );\n\n return round($value / pow($base, $power), $precision) . ' ' . $units[$power];\n}", "function PopulateIncidentTable($values) {\n echo \"<tr>\";\n foreach ($values as $value) {\n echo \"<td>$value</td>\";\n }\n echo \"</tr>\";\n}", "function showMths($mths) {\r\n\r\n if ($mths < 18)\r\n {\r\n echo floor($mths).\" mths\";\r\n }\r\n else\r\n {\r\n $yrs = floor($mths/12);\r\n $mths = $mths - ($yrs * 12);\r\n echo $yrs.\" yrs \";\r\n if (floor($mths) > 0)\r\n {\r\n echo floor($mths).\" mths\";\r\n }\r\n }\r\n}", "function skin_diff_row( $template_bit_name, $template_bit_size, $template_bit_id, $diff_is, $template_bit_id_safe ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<tr>\n <td class='tablerow1'>\n <strong>{$template_bit_name}</strong>\n </td>\n <td class='tablerow1' width='5%' nowrap='nowrap' align='center'>{$diff_is}</td>\n <td class='tablerow1' width='5%' nowrap='nowrap' align='center'>{$template_bit_size}</td>\n <td class='tablerow1' width='5%'><img id=\"menu{$template_bit_id_safe}\" 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{$template_bit_id_safe}\",\n new Array(\n\t\t\timg_view + \" <a href='#' onclick=\\\"return template_view_diff('$template_bit_id')\\\">Просмотр различий</a>\"\n \t\t ) );\n </script>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function render()\n {\n $price = $this->renderChildren();\n return ((int)$price) / 100;\n }", "function format($value);", "function PMA_formatByteDown($value, $limes = 6, $comma = 0)\r\n{\r\n $dh = pow(10, $comma);\r\n $li = pow(10, $limes);\r\n $return_value = $value;\r\n $unit = $byteunits[0];\r\n\t$byteunits = array('Byte', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');\r\n\t$number_thousands_separator = ',';\r\n\t$number_decimal_separator = '.';\r\n\r\n for ( $d = 6, $ex = 15; $d >= 1; $d--, $ex-=3 ) {\r\n if (isset($byteunits[$d]) && $value >= $li * pow(10, $ex)) {\r\n $value = round($value / ( pow(1024, $d) / $dh) ) /$dh;\r\n $unit = $byteunits[$d];\r\n break 1;\r\n } // end if\r\n } // end for\r\n\r\n if ($unit != $byteunits[0]) {\r\n $return_value = number_format($value, $comma, $number_decimal_separator, $number_thousands_separator);\r\n } else {\r\n $return_value = number_format($value, 0, $number_decimal_separator, $number_thousands_separator);\r\n }\r\n\r\n return array($return_value, $unit);\r\n}", "public function render()\n {\n $value = number_format($this->value, $this->decimals, $this->decimal_separator, $this->thousands_separator);\n\n return Str::of($value)\n ->prepend($this->before.' ')\n ->append(' '.$this->after)\n ->trim()\n ->toString();\n }" ]
[ "0.6540405", "0.58550465", "0.56446296", "0.5600782", "0.5424319", "0.5392967", "0.5314423", "0.530344", "0.52566814", "0.5213206", "0.5201535", "0.5201535", "0.5181448", "0.5154064", "0.51494443", "0.51152045", "0.5112653", "0.5106421", "0.5081103", "0.50707585", "0.504232", "0.5041058", "0.5031243", "0.5001997", "0.49907917", "0.49829346", "0.4957291", "0.48916197", "0.4882898", "0.4844677", "0.48337135", "0.48308462", "0.48029748", "0.4797899", "0.47888595", "0.4761357", "0.47485888", "0.47316584", "0.47262138", "0.47202498", "0.47188878", "0.46853778", "0.4683719", "0.46578917", "0.46508357", "0.46498856", "0.4636023", "0.46331", "0.462917", "0.4625718", "0.46158803", "0.46158662", "0.46142992", "0.46138477", "0.4599076", "0.45917192", "0.4586834", "0.45764065", "0.45749903", "0.45703176", "0.4562368", "0.4556124", "0.4554062", "0.45509225", "0.45451745", "0.45442918", "0.4538525", "0.4533688", "0.45205215", "0.45176288", "0.4501334", "0.4491481", "0.4488589", "0.44831106", "0.44718075", "0.446258", "0.44583517", "0.44566867", "0.44514528", "0.444394", "0.44406468", "0.4436512", "0.44294357", "0.44235572", "0.44179514", "0.44080654", "0.44004476", "0.43922728", "0.43919155", "0.43911853", "0.43847623", "0.43847623", "0.43847623", "0.43766782", "0.43682855", "0.43672612", "0.43629906", "0.43627533", "0.4352272", "0.43507928", "0.4350212" ]
0.0
-1
Generates a html table populated with values from a matrix. Generates a heading row with height values.
function html_generate_table($heights, $weights, $rows) { $html = '<table>'; $html .= html_generate_row($heights, ' ', true); foreach ($rows as $key => $row) { $html .= html_generate_row($row, $weights[$key]); } $html .= '</table>'; return $html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function drawTable()\n {\n echo \"<table border='1'>\";\n for ($i = 0; $i < $this->m; $i++) {\n echo \"<tr>\";\n for ($j = 0; $j < $this->n; $j++) {\n if ($this->isInSolution($i, $j, $this->matrix)) {\n echo \"<td bgcolor='#9acd32'>\";\n } else {\n echo \"<td>\";\n }\n echo $this->matrix[$i][$j];\n echo \"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "function draw_table($rows) {\n \n echo \"<table border=1 cellspacing=1>\"; //Set up border and spacing\n echo \"<tr>\"; //Begin the table row insertion for header row\n \n foreach($rows[0] as $key => $item) {\n \n echo \"<th>$key</th>\";\n \n }\n \n echo \"</tr>\";\n \n // Insert data into each row\n foreach ($rows as $row) {\n \n echo \"<tr>\";\n \n foreach ($row as $key => $item) {\n \n echo \"<td>$item</td>\"; //Table data\n \n }\n \n echo \"</tr>\";\n \n }\n \n echo \"</table>\";\n \n }", "function makeHTMLTable($array){\n\t\t // start table\n\t\t $html = '<table>';\n\t\t // header row\n\t\t $html .= '<tr>';\n\t\t // foreach($array[0] as $key=>$value){\n\t\t // $html .= '<th>' . htmlspecialchars($key) . '</th>';\n\t\t // }\n\t\t // $html .= '</tr>';\n\t\t // data rows\n\t\t foreach( $array as $key=>$value){\n\t\t $html .= '<tr>';\n\t\t foreach($value as $key2=>$value2){\n\t\t $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n\t\t }\n\t\t $html .= '</tr>';\n\t\t }\n\t\t // finish table and return it\n\t\t $html .= '</table>';\n\t\t return $html;\n\t\t\t}", "function generateTable($widths, $headers, $values)\n{\n\t$theTable = \"<table width=\\\"100%\\\">\\n\";\n\t$theTable = $theTable . \"<tr>\"; \n\n\t$table_column_width = \"\";\n\t$rowcounter = 0;\n\n\tforeach ( $headers as $table_cell )\n\t{ \n\t\tif ($widths != null)\n\t\t{\n\t\t\t$table_column_width = \" width=\\\"\".$widths[$rowcounter].\"\\\"\";\n\t\t}\n\n\t\t$theTable = $theTable . \"<th class=\\\"tdHeader\\\"\".$table_column_width.\">$table_cell</th>\";\n\t\t$rowcounter++;\n\t} \n\n\t$theTable = $theTable . \"</tr>\\n\\t<tr>\";\n\n\t$count = count( $headers );\n\t$rowcounter = 0;\n\t$table_odd = \"1\";\n\n\tforeach ( $values as $table_value )\n\t{\n\t\tif ($rowcounter == $count) \n\t\t{\n\t\t\t$theTable = $theTable . \"</tr>\\n<tr>\";\n\t\t\t$rowcounter = 0;\n\t\t\tif ($table_odd == \"1\") \n\t\t\t{\n\t\t\t\t$table_odd = \"0\";\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$table_odd = \"1\";\n\t\t\t}\n\t\t}\n\t\tif ($table_odd == \"1\") \n\t\t{\n\t\t\t$table_class = \"tdOdd\";\n\t\t} else\n\t\t{\n\t\t\t$table_class = \"tdEven\";\n\t\t}\n\n\t\t$theTable = $theTable . \"<td class=\\\"$table_class\\\" valign=\\\"top\\\">$table_value</td>\";\n\t\t$rowcounter++;\n\t}\n\t$theTable = $theTable . (\"</tr>\\n</table>\\n\");\n\treturn $theTable;\n}", "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 }", "function createTable($array,$summary,$caption,$id='',$class='') {\n\tif(!is_array($array) || empty($summary) || empty($caption)) return false;\n\t\n\t$thead_text = '';\n\t$tbody_text = '';\n\n\t$header_total = count($array['header']);\n\tforeach($array['header'] as $key => $header) {\n\t\tif(!is_array($header)) $header = array('text' => $header);\n\t\t$thead_text .= '<th scope=\"col\"'.addAttributes(@$header['title'],$header['id'],@$header['class']).'>'.formatText($header['text']).'</th>'.\"\\n\";\n\t}\n\n\t$i=0;\n\tforeach($array['rows'] as $key => $row_array) {\n\t\t$tbody_row = '';\n\t\tif(empty($row_array['class'])) $row_array['class'] = array();\n\t\telseif(!is_array($row_array['class'])) $row_array['class'] = array($row_array['class']);\n\t\tif(!isEven($i)) $row_array['class'][] = 'odd';\n\n\t\tif(count($row_array['value'])!=$header_total) continue; // if the number of rows don't match header rows...\n\t\tforeach($row_array['value'] as $key => $row) {\n\t\t\tif(!is_array($row)) $row = array('text' => $row);\n\t\t\t$tbody_row .= '<td headers=\"'.$array['header'][$key]['id'].'\"'.addAttributes('',@$row['id'],@$row['class']).'>'.$row['text'].'</td>'.\"\\n\";\n\t\t}\n\t\t$tbody_text .= '<tr'.addAttributes('',@$row_array['id'],@$row_array['class']).'>'.\"\\n\".$tbody_row.'</tr>'.\"\\n\";\n\t\t$i++;\n\t}\n\tif(empty($tbody_text)) return false;\n\t\n\t$table = '<table summary=\"'.formatText($summary).'\"'.addAttributes('',$id,$class).'>\n\t\t<caption>'.formatText($caption).'</caption>\n\t\t<thead>'.\"\\n\".'<tr>'.\"\\n\".$thead_text.'</tr>'.\"\\n\".'</thead>\n\t\t<tbody>'.\"\\n\".$tbody_text.'</tbody>\n\t</table>'.\"\\n\";\n\t\n\treturn $table;\n}", "function printMatrix($header,$matrix = null){\n $widthColumn = ($this->GetPageWidth() - (2 * $this->marginSize)) / sizeof($header);\n\n for($i = 0; $i< sizeof($header); $i++){\n $this->Cell($widthColumn,$this->fontSize/2,$header[$i],1,0,'C'); \n }\n\n //Salto de linea para los valores de la matriz\n\n $this->Ln();\n\n $this->SetFont($this->font,'',$this->fontSize);\n\n foreach($matrix as $row){\n foreach($row as $value){\n $this->Cell($widthColumn,$this->fontSize/2,\"EMPTY\",1,0,'C'); \n }\n $this->Ln();\n }\n\n // for($i = 0; $i< 40; $i++){\n // for($j = 0; $j< sizeof($header); $j++){\n // $this->Cell($widthColumn,$this->fontSize/2,\"EMPTY\",1,0,'C'); \n // }\n // $this->Ln();\n // }\n }", "public function render()\n\t{\n\n\t\t$table = \"<table\";\n\n\t\t// Add all attributes\n\t\tforeach ($this->attributes as $key => $value) {\n\t\t\t$table .= ' ' . $key . '=\"' . $value .'\"';\n\t\t}\n\n\t\t$table .= \">\"; // Close table\n\n\t\t// Add the head\n\t\tif ($this->showHeadRow) {\n\t\t\t$table .= \"<thead><tr>\";\n\n\t\t\t// Show the number header.\n\t\t\tif ($this->showNumberColumn) {\n\t\t\t\t$table .= \"<th>#</th>\";\n\t\t\t}\n\n\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t$columnHeadTitle = isset($column['headTitle']) ? $column['headTitle'] : $column[0];\n\t\t\t\t$table .= \"<th>\" . $columnHeadTitle . \"</th>\";\n\t\t\t}\n\n\t\t\t$table .= \"</tr></thead>\"; // finish head\n\t\t}\n\n\t\t// Body\n\t\t$table .= \"<tbody>\";\n\n\t\t$row = $this->numberColumnOffset;\n\n\t\tif (count($this->data) == 0) {\n\t\t\t// Show a no data entry\n\t\t\t$colspan = count($this->columns) + ($this->showNumberColumn ? 1 : 0);\n\t\t\t$table .= '<tr><td colspan=\"'.$colspan.'\"><p align=\"center\" style=\"font-weight:bold;\">Keine Einträge</p></td></tr>';\n\t\t}\n\t\telse {\n\t\t\tforeach ($this->data as $dataObject) {\n\n\t\t\t\t// Row attributes\n\t\t\t\t$attributes = $this->rowAttributes;\n\t\t\t\tif (!is_array($attributes)) {\n\t\t\t\t\tif (is_callable($this->rowAttributes)) {\n\t\t\t\t\t\t$callable = $this->rowAttributes;\n\t\t\t\t\t\t$attributes = $callable($dataObject);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$attributeString = '';\n\t\t\t\tif ($attributes) {\t\t// Add attributes if we have some\n\t\t\t\t\tforeach ($attributes as $attributeName => $attributeValue) {\n\t\t\t\t\t\t$attributeString .= $attributeName . '=\"' . $attributeValue . '\" ' ;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($this->rowIdDataMethod) {\n\t\t\t\t\t// method name or closure?\n\t\t\t\t\t$id = '';\n\t\t\t\t\tif (is_string($this->rowIdDataMethod)) {\n\t\t\t\t\t\t$id = $dataObject->{$this->rowIdDataMethod}(); // Call the row data method\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$rf = new \\ReflectionFunction($this->rowIdDataMethod);\n\t\t\t\t\t\tif ($rf->isClosure()) {\n\t\t\t\t\t\t\t// we got a closure\n\t\t\t\t\t\t\t$closure = $this->rowIdDataMethod;\n\t\t\t\t\t\t\t$id = $closure($dataObject);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t$table .= '<tr id=\"'. $id .'\" ' . $attributeString . '>'; // Start row with id\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$table .= \"<tr \". $attributeString .\">\";\t// Start row without id\n\t\t\t\t}\n\n\t\t\t\t// Number?\n\t\t\t\tif ($this->showNumberColumn) {\n\t\t\t\t\t$table .= \"<td>\" . $row . \"</td>\";\n\t\t\t\t}\n\n\t\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t\t$dataMethod = isset($column['dataMethod']) ? $column['dataMethod'] : $column[1];\n\t\t\t\t\tif (is_string($dataMethod)) {\n\t\t\t\t\t\t// Just call the method an insert the return value into the table cell\n\t\t\t\t\t\t$table .= \"<td>\". $dataObject->$dataMethod() .\"</td>\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$rf = new \\ReflectionFunction($dataMethod);\n\t\t\t\t\t\tif ($rf->isClosure()) {\n\n\t\t\t\t\t\t\t// Call the closure and get the result\n\t\t\t\t\t\t\t$value = $dataMethod($dataObject, $this);\n\n\t\t\t\t\t\t\t$table .= \"<td>\". $value .\"</td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$table .= \"</tr>\";\t// End the table row\n\t\t\t\t$row++;\n\t\t\t}\n\n\t\t\t// Render the footer row\n\t\t\t$table = $this->renderFooter($table);\n\n\t\t}\n\n\t\t$table .= \"</tbody>\";\n\n\t\t$table .= \"</table>\";\n\t\treturn $table;\n\t}", "function makeMultiDimTable($array)\n {\n $totalkeys = 0;\n $totalvalues = 0;\n echo \"<table>\";\n echo \"<thead><tr><td>Keys</td><td>Values</td></tr></thead>\";\n echo \"<tbody>\";\n foreach($array as $key => $value)\n {\n echo \"<tr><td>\" . $key . \"</td><td>\" . $value . \"</td></tr>\";\n $totalkeys += $key;\n $totalvalues += $value;\n }\n echo \"<tr><td colspan=2>Totals</td></tr>\";\n echo \"<tr><td>\" . $totalkeys . \"</td><td>\" . $totalvalues . \"</td></tr>\";\n echo \"</tbody>\";\n }", "public function getHTML()\n {\n $rowIDs = $this->rowID;\n $numberOfColumns = $this->tableColumns;\n $html = \"\";\n $rowCounter = 0;\n\n $html .= \"<table class='table'>\";\n\n if ($this->tableHead != null) {\n $html .= \"<tr>\";\n\n foreach ($this->tableHead as $head) {\n $html .= \"<th>$head</th>\";\n }\n $html .= \"</tr>\";\n }\n $html .= \"<tr>\";\n\n $i = 0;\n foreach ($this->tableData as $data) {\n if (($i) % $numberOfColumns == 0) {\n $html .= \"</tr><tr id='$rowIDs[$rowCounter]'>\";\n $rowCounter++;\n }\n//\n $html .= \"<td>$data</td>\";\n $i++;\n\n }\n $html .= \"</tr>\";\n\n $html .= \"</table>\";\n\n return $html;\n\n }", "public function enumerate_values_table_row(){\n\t\treturn \"\n\t\t\t<tr>\n\t\t\t\t<td>$this->avg_reaction_time_m_no_faces</td> \n\t\t\t\t<td>$this->accuracy_m_no_faces</td> \n\t\t\t\t<td>$this->avg_reaction_time_m_faces</td> \n\t\t\t\t<td>$this->accuracy_m_faces</td> \n\n\t\t\t\t<td>$this->avg_reaction_time_aba_no_faces</td> \n\t\t\t\t<td>$this->accuracy_aba_no_faces</td> \n\t\t\t\t<td>$this->avg_reaction_time_aba_faces</td> \n\t\t\t\t<td>$this->accuracy_aba_faces</td> \n\n\t\t\t\t<td>$this->avg_reaction_time_faces</td> \n\t\t\t\t<td>$this->accuracy_faces</td> \n\t\t\t\t<td>$this->avg_reaction_time_no_faces</td> \n\t\t\t\t<td>$this->accuracy_no_faces</td> \n\t\t\t</tr>\n\t\t\";\n\t}", "private function render_data()\n\t{\n\t\t// create if the headers exists\n\t\t// 2 header style table\n\t\tif(count($this->headers) == 2 && isset($this->headers[0][0]) && isset($this->headers[1][0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr><th></th>';\n\t\t\tforeach($this->headers[0] as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the row headers and the data\n\t\t\tfor($i=0; $i<count($this->headers[1]); $i++)\n\t\t\t{\n\t\t\t\t// the header\n\t\t\t\t$html .= \"<tr><th>{$this->headers[1][$i]}</th>\";\n\t\t\t\t\n\t\t\t\t// and now the data\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\t// 1 header style table\n\t\tif(count($this->headers) > 0 && isset($this->headers[0]) && !is_array($this->headers[0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr>';\n\t\t\tforeach($this->headers as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the data\n\t\t\tfor($i=0; $i<count($this->data); $i++)\n\t\t\t{\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\treturn '';\n\t}", "public function generate_screen() {\n\t\t\t$bootstrap = new HTMLWriter();\n\t\t\t$content = '';\n\t\t\t$columns = array_keys($this->json['columns']);\n\t\t\t$count = 0; \n\t\t\t$array = array(); \n\t\t\tforeach ($this->json['columns'] as $column) {\n\t\t\t\tif ($column['sortavailable'] == 'n') { $array[] = $count; }\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\t\n\t\t\t$tb = new Table(\"class=table table-striped table-bordered table-condensed table-excel|id=table\");\n\t\t\t$tb->tablesection('thead');\n\t\t\t\t$tb->tr();\n\t\t\t\tforeach($this->json['columns'] as $column) {\n\t\t\t\t\t$class = DplusWire::wire('config')->textjustify[$column['headingjustify']];\n\t\t\t\t\t$tb->th(\"class=$class\", $column['heading']);\n\t\t\t\t}\n\t\t\t$tb->closetablesection('thead');\n\t\t\t$tb->tablesection('tbody');\n\t\t\t\tforeach ($this->json['data']['lots'] as $lot) {\n\t\t\t\t\t$tb->tr();\n\t\t\t\t\tforeach($columns as $column) {\n\t\t\t\t\t\t$class = DplusWire::wire('config')->textjustify[$this->json['columns'][$column]['datajustify']];\n\t\t\t\t\t\t$tb->td(\"class=$class\", $lot[$column]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t$tb->closetablesection('tbody');\n\t\t\t$content = $tb->close();\n\t\t\treturn $content;\n\t\t}", "public function renderTableBody() {\n //$models = array_values($this->dataProvider->getModels());\n //$keys = $this->dataProvider->getKeys();\n $rows = [];\n \n foreach ($this->dataProvider as $model) {\n if (is_callable($this->beforeRow)) {\n $row = call_user_func($this->beforeRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows)) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n } else {\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }\n }", "function html_table($data) {\r\n\r\n $row = mysqli_fetch_assoc($data);\r\n $rows = array();\r\n array_push($rows, $row);\r\n $attributes = array_keys($row);\r\n\r\n if(mysqli_num_rows($data) > 0) {\r\n while($row = mysqli_fetch_assoc($data)) {\r\n array_push($rows, $row);\r\n }\r\n }\r\n\r\n print(\"<table>\\n\");\r\n print(\"<tr>\\n\");\r\n for($i = 0; $i < count($attributes); $i++) {\r\n print(\"<th>{$attributes[$i]}</th>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n for($j = 0; $j < count($rows); $j++) {\r\n print(\"<tr>\\n\");\r\n foreach($attributes as $attribute) {\r\n print(\"<td>{$rows[$j][$attribute]}</td>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n }\r\n\r\n print(\"</table>\\n\");\r\n\r\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 generateHtmlTableData($header,$result,$class=null,$sumColumn=null)\n\t{\n\t\t$addClass=$columns=null;\n\t\tif($class)$addClass='class=\"'.$class.'\"';\n\t\t$tableContent= \"<table $addClass >\";\n\t\t$tableContent=$tableContent.\"<tr>\";\n\t\t\t\tforeach($header as $title)\n\t\t\t\t $tableContent=$tableContent. \"<th> $title </th>\";\n\t\t$tableContent=$tableContent.\"</tr>\";\n\t\tif($result){ $i=0;\n\t\t\t foreach($result as $row) {\n\t\t\t\t\tif($i==0){$columns=array_keys($this->objectToArray($row));$i++;}\n\t\t\t\t $tableContent=$tableContent.\"<tr>\";\n\t\t\t foreach ( $row as $key=>$data) {\n\t\t\t\t\t if(is_float($data)) $data=$this->numFormat($data);\n\t\t\t\t\t\tif(is_numeric($data)) { $numView=explode('.',$data);\n\t\t\t\t\t\t\tif(isset($numView[1])) $data=$this->numFormat($data); }\n\t\t\t\t\t\t$tableContent=$tableContent.\"<td>$data</td>\"; }\n\t\t\t\t$tableContent=$tableContent.\"</tr>\"; }}\n\t\tif($sumColumn)\n\t\t{\n\t\t\tif($columns){\n\t\t\t$tableContent=$tableContent.\"<tr>\";\n\n\t\t\tforeach($columns as $dataColumn){\n\t\t\t\t$total=$tddata=null;\n\t\t\t\tforeach( $sumColumn as $column)\n\t\t\t\t\tif($column==$dataColumn){\n\t\t\t\t\t\t$total=(float)0;\n\t\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t\t$value=(float)$row->$column;\n\t\t\t\t\t\t\t$total=$total+$value;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t if($total)\n\t\t\t\t$tddata=\"<b>\".$this->numFormat($total).\"</b>\";\n\t\t\t $tableContent=$tableContent.\"<td style='color:#FF0000;'>\".$tddata.\"</td>\";\n\t\t\t}\n\t\t\t$tableContent=$tableContent.\"</tr>\"; }\n\t\t}\n\t\t//print_r($columns);\n\t\t$tableContent=$tableContent.\"</table>\";\n\n\t\treturn $tableContent;\n\t}", "Function DrawTable($array, $numValues) {\r\n?>\r\n\t\t\r\n\t<table border=\"1\" style=\"width:100%\" id=\"myTable\">\r\n\t<tbody>\r\n\r\n<?php\r\n\r\n //keep track of how many cells have been filled\r\n $count = 0;\r\n \r\n //outer for loop to track rows\r\n\tfor($i = 0; $i < $numValues[1]; $i++) {\r\n //start a new row when the row length has been met\r\n echo(\"<tr>\");\r\n \r\n //inner for loop to track columns\r\n\t\tfor($j = 0; $j < $numValues[0]; $j++) {\r\n //add the cell to the row and display the contents of the shuffled array at that index noted by count\r\n echo '<td id=\"cellnum'.$count.'\">';\r\n\t\t\techo $array[$count];\r\n\t\t\t$count++;\r\n\t\t\techo(\"</td>\");\r\n\r\n\t\t}\r\n\t\techo(\"</tr>\");\r\n\t}\r\n\r\n //end the table and add the submit button\r\n echo \" </tbody>\r\n </table><br>\r\n <br><button id='submit' type='submit'>Submit</button>\";\r\n}", "public function html() : string\n {\n $table = \"<table class=\\\"multiplicationTable\\\">\";\n\n for ($row = 1; $row <= $this->rows + 1; $row++) {\n $table .= \"<tr>\";\n\n for ($column = 1; $column <= $this->columns + 1; $column++) {\n if ($row == 1 && $column == 1) {\n $table .= \"<td class=\\\"bold highlighted\\\">X</td>\";\n } elseif ($row == 1) {\n $table .= \"<td class=\\\"bold highlighted\\\">\" . ($column - 1) . \"</td>\";\n } elseif ($column == 1) {\n $table .= \"<td class=\\\"bold highlighted\\\">\" . ($row - 1) . \"</td>\";\n } else {\n $table .= \"<td>\" . ($row - 1) * ($column - 1) . \"</td>\";\n }\n }\n\n $table .= \"</tr>\";\n }\n\n $table .= \"</table>\";\n\n return $table;\n }", "function display_report()\n {\n $out = '<div>';\n $out .= '<table id=\"resultsTable\">';\n $out .= '<thead>';\n if(isset($this->header))\n {\n if(!$this->has_split_header())\n {\n $out .= '<tr>';\n foreach($this->header AS $head)\n {\n $out .= '<th>'.$head.'</th>';\n } \n $out .= '</tr>';\n }\n else\n {\n //foreach row\n foreach($this->header AS $row)\n {\n $out .= '<tr>';\n foreach($row AS $rowObj)\n {\n $columnCount = isset($rowObj->colCount) ? $rowObj->colCount : 1;\n $columnContent = $rowObj->content;\n $out .= '<th colspan=\"'.$columnCount.'\">'.$columnContent.'</th>';\n }\n $out .= '</tr>';\n }\n } \n }\n $out .= '</thead>';\n $out .= '<tbody>';\n if(isset($this->data))\n {\n foreach($this->data AS $row)\n {\n $out .= '<tr>';\n foreach($row AS $cell)\n {\n if(is_a($cell, 'stdClass'))\n {\n $out .= $this->build_cell($cell);\n }\n else\n {\n $out .= '<td>'.$cell.'</td>';\n }\n } \n $out .= '</tr>';\n }\n }\n //count the last row\n// $out .= '<tr>';\n// for($i=0;$i<count($row);$i++)\n// {\n// $out .= '<td class=\"emptyrow\"><div class=\"emptycell\">X</div></td>';\n// }\n// $out .= '</tr>';\n $out .= '</tbody>';\n $out .= '</table>';\n $out .= '</div>';\n \n return $out;\n }", "function toHtml()\n {\n require_once 'HTML/Table.php';\n $table = new HTML_Table(null, 0, true);\n $table->updateAttributes($this->getAttributes());\n\n $tbody = $table->getBody();\n $tbody->setAutoGrow(true);\n $tbody->setAutoFill('');\n\n $thead = $table->getHeader();\n $thead->setAutoGrow(true);\n $thead->setAutoFill('');\n \n $tfoot = $table->getFooter();\n $tfoot->setAutoGrow(true);\n $tfoot->setAutoFill('');\n \n if (isset($this->_footer) && is_array($this->_footer) && count($this->_footer)) {\n $footer = $this->_footer;\n } elseif (is_string($this->_footer)) {\n $last_column = array_pop(array_keys($this->_columnNames));\n $footer = array($last_column => $this->_footer);\n if (isset($this->_footerAttributes['@all'])) {\n if (isset($this->_footerAttributes[$last_column])) {\n $this->_footerAttributes[$last_column] = array_merge($this->_footerAttributes['@all'], $this->_footerAttributes[$last_column]);\n } else {\n $this->_footerAttributes[$last_column] = $this->_footerAttributes['@all'];\n }\n unset($this->_footerAttributes['@all']);\n }\n }\n\n $col = 0;\n if ($this->_columnNames) {\n foreach ($this->_columnNames as $key => $value) {\n $thead->setHeaderContents(0, $col, $value, $this->_columnAttributes[$key]);\n if (isset($footer)) {\n if (isset($footer[$key])) {\n $attributes = isset($this->_footerAttributes['@all']) ? $this->_footerAttributes['@all'] : array();\n if (isset($this->_footerAttributes[$key])) $attributes = array_merge($attributes, $this->_footerAttributes[$key]);\n if (isset($col_spanned)) {\n $tfoot->setCellContents(0, $col_spanned, $footer[$key]);\n $tfoot->setCellAttributes(0, $col_spanned, array_merge($attributes, array('colspan' => $key - $col_spanned + 1)));\n unset($col_spanned);\n } else {\n $tfoot->setCellContents(0, $col, $footer[$key]);\n if (!empty($attributes)) $tfoot->setCellAttributes(0, $col, $attributes);\n }\n } else {\n if (!isset($col_spanned)) $col_spanned = $key;\n }\n }\n ++$col;\n }\n }\n if (!empty($this->_rows)) {\n $row = 0;\n foreach (array_keys($this->_rows) as $key) {\n $col = 0;\n foreach (array_keys($this->_rows[$key]) as $key2) {\n $tbody->setCellContents($row, $col, $this->_rows[$key][$key2]->toHTML());\n $attributes = isset($this->_rowAttributes[$key]['@all']) ? $this->_rowAttributes[$key]['@all'] : array();\n if (isset($this->_rowAttributes[$key][$key2])) $attributes = array_merge($attributes, $this->_rowAttributes[$key][$key2]);\n if (!empty($attributes)) $tbody->setCellAttributes($row, $col, $attributes); \n ++$col;\n }\n if (isset($this->_rowAttributes[$key]['@row'])) $tbody->setRowAttributes($row, $this->_rowAttributes[$key]['@row'], true);\n ++$row;\n }\n } elseif (isset($this->_emptyText)) {\n $tbody->setCellContents(0, 0, $this->_emptyText);\n $tbody->setCellAttributes(0, 0, array('align' => 'center', 'colspan' => count($this->_columnNames)));\n }\n\n return $table->toHTML();\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 }", "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 static function htmlTable ($array, $tableHeadingSubstitutions = array (), $class = 'lines', $keyAsFirstColumn = true, $uppercaseHeadings = false, $allowHtml = false /* true/false/array(field1,field2,..) */, $showColons = false, $addCellClasses = false, $addRowKeyClasses = false, $onlyFields = array (), $compress = false, $showHeadings = true, $encodeEmailAddress = true)\r\n\t{\r\n\t\t# Check that the data is an array\r\n\t\tif (!is_array ($array)) {return $html = \"\\n\" . '<p class=\"warning\">Error: the supplied data was not an array.</p>';}\r\n\t\t\r\n\t\t# Return nothing if no data\r\n\t\tif (empty ($array)) {return '';}\r\n\t\t\r\n\t\t# Assemble the data cells\r\n\t\t$dataHtml = '';\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\tif (!$value || !is_array ($value)) {return $html = \"\\n\" . '<p class=\"warning\">Error: the supplied data was not a multi-dimensional array.</p>';}\r\n\t\t\t$headings = $value;\r\n\t\t\t$dataHtml .= \"\\n\\t\" . '<tr' . ($addRowKeyClasses ? ' class=\"' . htmlspecialchars ($key) . '\"' : '') . '>';\r\n\t\t\tif ($keyAsFirstColumn) {\r\n\t\t\t\t$thisCellClass = ($addCellClasses ? htmlspecialchars ($key) . ((is_array ($addCellClasses) && isSet ($addCellClasses[$key])) ? ' ' . $addCellClasses[$key] : '') : '') . ($keyAsFirstColumn ? ($addCellClasses ? ' ' : '') . 'key' : '');\r\n\t\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\\t\") . (strlen ($thisCellClass) ? \"<td class=\\\"{$thisCellClass}\\\">\" : '<td>') . \"<strong>{$key}</strong></td>\";\r\n\t\t\t}\r\n\t\t\t$i = 0;\r\n\t\t\tforeach ($value as $valueKey => $valueData) {\r\n\t\t\t\tif ($onlyFields && !in_array ($valueKey, $onlyFields)) {continue;}\t// Skip if not in the list of onlyFields if that is supplied\r\n\t\t\t\t$i++;\r\n\t\t\t\t$data = $array[$key][$valueKey];\r\n\t\t\t\t$thisCellClass = ($addCellClasses ? htmlspecialchars ($valueKey) . ((is_array ($addCellClasses) && isSet ($addCellClasses[$valueKey])) ? ' ' . $addCellClasses[$valueKey] : '') : '') . ((($i == 1) && !$keyAsFirstColumn) ? ($addCellClasses ? ' ' : '') . 'key' : '');\r\n\t\t\t\t$htmlAllowed = (is_array ($allowHtml) ? (in_array ($valueKey, $allowHtml)) : $allowHtml);\t// Either true/false or an array of permitted fields where HTML is allowed\r\n\t\t\t\t$cellContents = ($htmlAllowed ? $data : htmlspecialchars ($data));\r\n\t\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\\t\") . (strlen ($thisCellClass) ? \"<td class=\\\"{$thisCellClass}\\\">\" : '<td>') . ($encodeEmailAddress ? self::encodeEmailAddress ($cellContents) : $cellContents) . (($showColons && ($i == 1) && $data) ? ':' : '') . '</td>';\r\n\t\t\t}\r\n\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\") . '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t# Construct the heading HTML\r\n\t\t$headingHtml = '';\r\n\t\tif ($tableHeadingSubstitutions !== false) {\r\n\t\t\t$headingHtml .= \"\\n\\t\" . '<tr>';\r\n\t\t\tif ($keyAsFirstColumn) {$headingHtml .= \"\\n\\t\\t\" . '<th></th>';}\r\n\t\t\t$columns = array_keys ($headings);\r\n\t\t\tforeach ($columns as $column) {\r\n\t\t\t\tif ($onlyFields && !in_array ($column, $onlyFields)) {continue;}\t// Skip if not in the list of onlyFields if that is supplied\r\n\t\t\t\t$columnTitle = (empty ($tableHeadingSubstitutions) ? $column : (isSet ($tableHeadingSubstitutions[$column]) ? $tableHeadingSubstitutions[$column] : $column));\r\n\t\t\t\t$headingHtml .= \"\\n\\t\\t\" . ($addCellClasses ? '<th class=\"' . $column . ((is_array ($addCellClasses) && isSet ($addCellClasses[$column])) ? ' ' . $addCellClasses[$column] : '') . '\">' : '<th>') . ($uppercaseHeadings ? ucfirst ($columnTitle) : $columnTitle) . '</th>';\r\n\t\t\t}\r\n\t\t\t$headingHtml .= \"\\n\\t\" . '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t# Construct the overall heading\r\n\t\t$html = \"\\n\\n\" . \"<table class=\\\"{$class}\\\">\";\r\n\t\tif ($showHeadings) {$html .= $headingHtml;}\r\n\t\t$html .= $dataHtml;\r\n\t\t$html .= \"\\n\" . '</table>';\r\n\t\t\r\n\t\t# Return the HTML\r\n\t\treturn $html;\r\n\t}", "function showDataTable(){\n\t\t$output = \"\";\n\t\t// print the table\n\t\t$output .= \"<table summary=\\\"\".$this->summary.\"\\\">\\n\";\n\t\t// print the caption\n\t\t$output .= \"<caption>\".$this->caption.\"</caption>\\n\";\n\t\t$output .= $this->showHeader();\n\t\t// initialise variables\n\t\t$altCounter = 0;\n\t\t$altClass = \"\";\n\t\t$h = 1;\n\t\t// loop each row\n\t\tfor ($x=0; $x<count($this->rows); $x++) {\n\t\t\t// if it is time to show the header\n\t\t\tif ($h==$this->headerRepeat){\n\t\t\t\t// show the header\n\t\t\t\t$output .= $this->showHeader();\n\t\t\t\t$h = 1;\n\t\t\t}\n\t\t\t$row = $this->rows[$x];\n\t\t\t// alternate the row classes\n\t\t\tif ($this->altClasses){\n\t\t\t\tif ($this->altClasses[$altCounter]!=\"\"){ $altClass = \" class=\\\"\".$this->altClasses[$altCounter].\"\\\"\"; } else { $altClass=\"\"; }\n\t\t\t\tif ($altCounter==count($this->altClasses)-1){ $altCounter=0; } else { $altCounter++; }\n\t\t\t}\n\t\t\t// set the parameters to nothing\n\t\t\t$params = \"\";\n\t\t\t// if there are parameters for this row set\n\t\t\tif (count($this->rowParams[$x])>0){\n\t\t\t\t// loop the parameters\n\t\t\t\twhile (list($attribute, $parameter) = each($this->rowParams[$x])) {\n\t\t\t\t\t// if the parameter is 'class'\n\t\t\t\t\tif (strtolower($attribute)==\"class\"){\n\t\t\t\t\t\t// replace the altClass variable\n\t\t\t\t\t\t$altClass = \" \".strtolower($attribute).\"=\\\"$parameter\\\"\";\n\t\t\t\t\t} else{\n\t\t\t\t\t\t// otherwise build the parameters\n\t\t\t\t\t\t$params .= \" \".strtolower($attribute).\"=\\\"$parameter\\\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// print the row\n\t\t\t$output .= \"\t<tr$altClass$params>\\n\";\n\t\t\t\t// set the colSpan to 0\n\t\t\t\t$colSpan = 0;\n\t\t\t\t$colSpanAttribute = \"\";\n\t\t\t\t// if this row has less columns than the number of fields\n\t\t\t\tif (count($row)<count($this->fields)){\n\t\t\t\t\t$colSpan = (count($this->fields)-count($row))+1;\n\t\t\t\t}\n\t\t\t\t// loop each cell\n\t\t\t\tfor ($i=0; $i<count($row); $i++) {\n\t\t\t\t\t$value = $row[$i];\n\t\t\t\t\t$value = $this->formatField($i, $x);\n\t\t\t\t\t// make the colspan attribute\n\t\t\t\t\tif ($colSpan>0 && $i==(count($row)-1)){ $colSpanAttribute = \" colspan=\\\"$colSpan\\\"\"; }\n\t\t\t\t\t// print the cell\n\t\t\t\t\t$output .= \"\t\t<td$colSpanAttribute>\".$value.\"</td>\\n\";\n\t\t\t\t}\n\t\t\t// end the row\n\t\t\t$output .= \"\t</tr>\\n\";\n\t\t\t// increment the header repeat variable\n\t\t\t$h++;\n\t\t}\n\t\t// end the table\n\t\t$output .= \"</table>\\n\\n\";\n\t\tprint $output;\n\t}", "function buildTable($array){\n // start table\n $html = '<table class=\"table\">';\n // data rows\n foreach( $array as $key=>$value){\n $html .= '<tr>';\n foreach($value as $key2=>$value2){\n $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n }\n $html .= '</tr>';\n }\n\n // finish table and return it\n\n $html .= '</table>';\n return $html;\n}", "public function fullTableRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($in as $k => $v){\n if(!isset($v)) $v = 'n/a';\n $out .= '<td><a title=\"'.$k.'\">'.$v.'</a></td>';\n }\n return('<tr>'.$out.'</tr>');\n }", "function outputFormat(array $headers, array $cells, $result, $content_name) {\necho '<h3>'.ucfirst($content_name).' Content</h3>';\necho '<table>';\nforeach ($headers as $val) {\necho '<th>'.$val.'</th>';\n}\nwhile($row = mysqli_fetch_array($result))\n {\n echo '<tr>';\n foreach ($cells as $val) {\n echo '<td>'.$row[$val].'</td>';\n }\n echo '</tr>';\n }\n echo '</table>';\n}", "function printTable ($rows, $cols) {\n echo \"<table border=1>\";\n\n for ($i=0; $i<$rows; $i++) {\n echo \"<tr>\";\n for ($j=0; $j<$cols; $j++) {\n echo \"<td> Content </td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "function make_table($query) {\r\n\t\techo \"<table><tr>\";\r\n\t\t$row = mysqli_fetch_assoc($query);\r\n\t\tforeach ($row as $attr => $value) {\r\n\t\t\techo \"<th>$attr</th>\";\r\n\t\t}\r\n\t\techo \"</tr>\";\r\n\t\twhile ($row = mysqli_fetch_assoc($query)) { \r\n\t\t\techo \"<tr>\";\r\n\t\t\tforeach($row as $value) {\r\n\t\t\t\techo \"<td>$value</td>\";\r\n\t\t\t}\r\n\t\t\techo \"</tr>\";\r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}", "function getTable($array, $firstLineHeader = true, $lastLineFooter = true, $withTableStructure = true)\n{\n\t$ret = '';\n\n\t$rows = count($array);\n\t$cols = isset($array[0]) ? count($array[0]) : 0;\n\t$i = 0;\n\n\tif($firstLineHeader)\n\t{\n\t\t$ret .= '<tr class=\"tableHeaderRow\">';\n\t\tfor($j = 0; $j < $cols; $j++)\n\t\t{\n\t\t\tif($j == ($cols - 1))\n\t\t\t\t$ret .= '<td class=\"tableHeaderCellR\">';\n\t\t\telse if($j == 0)\n\t\t\t\t$ret .= '<td class=\"tableHeaderCellL\">';\n\t\t\telse\n\t\t\t\t$ret .= '<td class=\"tableHeaderCell\">';\n\n\t\t\t$ret .= $array[$i][$j] . '</td>' . \"\\n\";\n\t\t}\n\t\t$ret .= '</tr>' . \"\\n\";\n\n\t\t$i++;\n\t}\n\n\tfor(; $i < $rows; $i++)\n\t{\n\t\t$ret .= '<tr class=\"tableRow\">';\n\t\tfor($j = 0; $j < $cols; $j++)\n\t\t{\n\t\t\tif($j == ($cols - 1))\n\t\t\t{\n\t\t\t\tif($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t\t$ret .= '<td class=\"tableCellBR\">';\n\t\t\t\telse if($i == 0)\n\t\t\t\t\t$ret .= '<td class=\"tableCellTR\">';\n\t\t\t\telse\n\t\t\t\t\t$ret .= '<td class=\"tableCellR\">';\n\t\t\t}\n\t\t\telse if($j == 0)\n\t\t\t{\n\t\t\t\tif($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t\t$ret .= '<td class=\"tableCellBL\">';\n\t\t\t\telse if($i == 0)\n\t\t\t\t\t$ret .= '<td class=\"tableCellTL\">';\n\t\t\t\telse\n\t\t\t\t\t$ret .= '<td class=\"tableCellL\">';\n\t\t\t}\n\t\t\telse if($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t$ret .= '<td class=\"tableCellB\">';\n\t\t\telse if($i == 0)\n\t\t\t\t$ret .= '<td class=\"tableCellT\">';\n\t\t\telse\n\t\t\t\t$ret .= '<td class=\"tableCell\">';\n\n\t\t\t$ret .= $array[$i][$j] . '</td>' . \"\\n\";\n\t\t}\n\t\t$ret .= '</tr>' . \"\\n\";\n\t}\n\n\tif($withTableStructure)\n\t\t$ret = '<p/><table class=\"tableMain\">' . $ret . '</table>';\n\n\treturn $ret;\n}", "public function render()\r\n {\r\n $widths = $this->calculateWidths();\r\n\r\n $table = $this->renderHeaders($widths);\r\n $table .= $this->renderRows($widths);\r\n\r\n return $table;\r\n }", "function drawTable($dataArray)\n{\n $dom = new DOMDocument();\n $table = $dom->createElement('table');\n $table->setAttribute('class', 'log-table');\n\n foreach ($dataArray as $row)\n {\n $tr = $dom->createElement('tr');\n $table->appendChild($tr);\n\n $td = $dom->createElement('td', $row);\n $tr->appendChild($td);\n\n $table->appendChild($tr);\n }\n\n $dom->appendChild($table);\n echo $dom->saveHTML();\n}", "public function getTable($css_classes=''){\r\n\t\t$table=\"<table class='$css_classes'>\";\r\n\t\t // this condition check the single array\r\n\t\t\tif(count($this->values)==count($this->values,1)){\r\n\t\t\t\tforeach($this->values as $key=>$val){\r\n\t\t\t\t\t$table.=\"<tr>\";\r\n\t\t\t\t\t\t$table.=\"<th>$key</th><td>$val</td>\";\r\n\t\t\t\t\t$table.=\"</tr>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$table.=\"<tr>\";\r\n // this condition check for nested array\r\n\t\t\t\tforeach($this->values[0] as $key=>$row){\r\n\t\t\t\t\t$table.=\"<th>\".ucfirst($key).\"</th>\";\r\n\t\t\t\t}\r\n\t\t\t\t$table.=\"<th>Action</th>\";\r\n\t\t\t\t$table.=\"</tr>\";\r\n\t\t\t\tforeach($this->values as $row){\r\n\t\t\t\t\t$table.=\"<tr>\";\r\n\t\t\t\t\t\tforeach($row as $val){\r\n\t\t\t\t\t\t\t$table.=\"<td>$val</td>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// add two button for edit and delete data\r\n\t\t\t\t\t\t$table.=\"<td><a class='btn btn-info' href='edit.php?id=$row[id]'>Edit</a> <a class='btn btn-danger mt-1' href='delete.php?delid=$row[id]'>Delete</a></td>\";\r\n\t\t\t\t\t$table.=\"</tr>\";\r\n\t\t\t\t}\r\n\t\t\t\t// ceate a new row for add new data \r\n\t\t\t\t$colspan=count($this->values)+1;\r\n\t\t\t\t$table.=\"<tr><td class='text-center' colspan='$colspan'><a class='btn btn-primary' href='insert_form.php'>Add New Value</a></td></tr>\";\r\n\t\t\t}\r\n\r\n\t\t$table.=\"</table>\";\r\n\t\treturn $table;\r\n\t}", "public function generateTable($myTableArrayBody) {\n\t\t\t $x = 0;\n\t\t\t $y = 0;\n\t\t\t $seTableStr = '<table><caption><h3>HAVANAO PAYMENT DETAILS</h3></caption><tbody>';\t\t \n\t\t\t foreach ($myTableArrayBody as $key => $value) {\n\t\t\t \t$seTableStr = $seTableStr.'<tr><th>'.strtoupper($key).'</th><td>'.$value.'</td></tr>';\n\t\t\t }\n\t\t\t $seTableStr .= '</tbody></table>';\n\t\t\t return $seTableStr;\n\t\t\t}", "function printTable($rows, $cols){\n\techo \"<table border=1>\";\n\n\tfor ($i=0; $i < $rows; $i++) { \n\t\techo \"<tr>\";\n\t\tfor ($j=0; $j < $cols; $j++) { \n\t\t\techo \"<td> Content </td>\";\n\t\t}\n\n\t\techo \"</tr>\";\n\n\t}\n\n\techo \"</table>\";\n}", "function WriteTable($tcolums)\n {\n for ($i = 0; $i < sizeof($tcolums); $i++)\n {\n $current_col = $tcolums[$i];\n $height = 0;\n \n // get max height of current col\n $nb=0;\n for($b = 0; $b < sizeof($current_col); $b++)\n {\n // set style\n $this->SetFont($current_col[$b]['font_name'], $current_col[$b]['font_style'], $current_col[$b]['font_size']);\n $color = explode(\",\", $current_col[$b]['fillcolor']);\n $this->SetFillColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['textcolor']);\n $this->SetTextColor($color[0], $color[1], $color[2]); \n $color = explode(\",\", $current_col[$b]['drawcolor']); \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n $this->SetLineWidth($current_col[$b]['linewidth']);\n \n $nb = max($nb, $this->NbLines($current_col[$b]['width'], $current_col[$b]['text'])); \n $height = $current_col[$b]['height'];\n } \n $h=$height*$nb;\n \n \n // Issue a page break first if needed\n $this->CheckPageBreak($h);\n \n // Draw the cells of the row\n for($b = 0; $b < sizeof($current_col); $b++)\n {\n $w = $current_col[$b]['width'];\n $a = $current_col[$b]['align'];\n \n // Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n \n // set style\n $this->SetFont($current_col[$b]['font_name'], $current_col[$b]['font_style'], $current_col[$b]['font_size']);\n $color = explode(\",\", $current_col[$b]['fillcolor']);\n $this->SetFillColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['textcolor']);\n $this->SetTextColor($color[0], $color[1], $color[2]); \n $color = explode(\",\", $current_col[$b]['drawcolor']); \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n $this->SetLineWidth($current_col[$b]['linewidth']);\n \n $color = explode(\",\", $current_col[$b]['fillcolor']); \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n \n \n // Draw Cell Background\n $this->Rect($x, $y, $w, $h, 'FD');\n \n $color = explode(\",\", $current_col[$b]['drawcolor']); \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n \n // Draw Cell Border\n if (substr_count($current_col[$b]['linearea'], \"T\") > 0)\n {\n $this->Line($x, $y, $x+$w, $y);\n } \n \n if (substr_count($current_col[$b]['linearea'], \"B\") > 0)\n {\n $this->Line($x, $y+$h, $x+$w, $y+$h);\n } \n \n if (substr_count($current_col[$b]['linearea'], \"L\") > 0)\n {\n $this->Line($x, $y, $x, $y+$h);\n }\n \n if (substr_count($current_col[$b]['linearea'], \"R\") > 0)\n {\n $this->Line($x+$w, $y, $x+$w, $y+$h);\n }\n \n \n // Print the text\n $this->MultiCell($w, $current_col[$b]['height'], $current_col[$b]['text'], 0, $a, 0);\n \n // Put the position to the right of the cell\n $this->SetXY($x+$w, $y); \n }\n \n // Go to the next line\n $this->Ln($h); \n } \n }", "function writeAsHtmlTable() \r\n\t{\r\n\t\t\t// Import Package Utility\r\n\t\t\tinclude_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); \t\t\t\r\n\t\tRDFUtil::writeHTMLTable($this->getMemModel());\r\n\t}", "function buildHTMLTable($dataSet){\n\n $tblHTML = \"<table class='cleanTbl'>\";\n\n foreach ($dataSet as $row) {\n\n $tblHTML = $tblHTML.\"<tr class='cleanTbl'>\";\n\n foreach($row as $col){\n\n $tblHTML = $tblHTML.\"<td class='cleanTbl'>$col</td>\";\n\n }\n $tblHTML = $tblHTML.\"</tr>\";\n\n }\n $tblHTML = $tblHTML.\"</table>\";\n\n return $tblHTML;\n}", "function multiple_arrayDisplay($multiple_array)\n{\n $r = '';\n $r .= '<style> td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n foreach ($multiple_array[0] as $key => $value) {\n $r .= '<th>'.$key.'</th>';\n }\n $r .= '</tr>';\n foreach ($multiple_array as $key => $value) {\n $r .= '<tr>';\n foreach ($value as $key1 => $value1) {\n if ($key1 == 'price') {\n $r .= '<td> $'.$value1.' </td>';\n } else {\n $r .= '<td>'.$value1.' </td>';\n }\n }\n $r .= '</tr>';\n }\n $r .= '</table>';\n\n return $r;\n}", "function multiple_arrayDisplay($multiple_array)\n{\n $r = '';\n $r .= '<style> td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n foreach ($multiple_array[0] as $key => $value) {\n $r .= '<th>'.$key.'</th>';\n }\n $r .= '</tr>';\n foreach ($multiple_array as $key => $value) {\n $r .= '<tr>';\n foreach ($value as $key1 => $value1) {\n if ($key1 == 'price') {\n $r .= '<td> $'.$value1.' </td>';\n } else {\n $r .= '<td>'.$value1.' </td>';\n }\n }\n $r .= '</tr>';\n }\n $r .= '</table>';\n\n return $r;\n}", "function it_should_make_the_example_table()\n {\n \t$table = '| Tables | Are | Cool |' . PHP_EOL . \n\t\t\t\t '|----------|:-------------:|------:|' . PHP_EOL .\n\t\t\t\t '| col 1 is | left-aligned | $1600 |' . PHP_EOL .\n\t\t\t\t '| col 2 is | centered | $12 |' . PHP_EOL .\n\t\t\t\t '| col 3 is | right-aligned | $1 |' . PHP_EOL;\n\n \t$this->headers(['Tables','Are','Cool']) //headers\n\t\t\t->align(['L','C','R']) // set column alignment\n\t\t\t->rows([ // add multiple rows at once\n\t\t\t\t['col 1 is', 'left-aligned', '$1600'],\n\t\t\t\t['col 2 is', 'centered', '$12'],\n\t\t\t])\n\t\t\t->row(['col 3 is', 'right-aligned', '$1'])\n\t\t\t->render()\n\t\t\t->shouldReturn($table);\n }", "public function createTable($columns, $values = [], $tablename = '') {\n\n $html = \"<table id='\".$tablename.\"'>\";\n \n $html .= $this->createHeader($columns);\n \n $html .= $this->createRows($columns, $values);\n \n $html .= \"</table>\";\n return $html;\n }", "function createTable($result) {\n $table = \"<table class='table table-bordered'>\";\n $row = $result->fetch_assoc();\n $table .= \"<tr>\";\n foreach(array_keys($row) as $field) {\n $table .= \"<th class='text-center'>$field</th>\";\n }\n $table .= \"</tr>\";\n while($row) {\n $table .= \"<tr>\";\n foreach($row as $key => $value) {\n $table .= \"<td class='text-center'>\";\n if(strcmp($key, \"Price\") == 0 or strcmp($key, \"Revenue\") == 0) {\n $table.=\"\\$\" . number_format($value, 2, \".\", \"\");\n }\n else {\n $table .= $value;\n }\n $table.=\"</td>\";\n }\n $table .= \"</tr>\";\n $row = $result->fetch_assoc();\n }\n $table .= \"</table>\";\n return $table;\n }", "function toTable($data)\n{\n//print_r($data);\n\t$keys = $data[0];\n\t$keys = array_flip($keys);\n\t$result = \"<table>\\n\\t<tr>\";\n\tforeach($keys as $key)\n\t{\n\t\t$result .= '<th>' . $key . '</th>';\n\t}\n\t$result .= \"</tr>\\n\";\n\t$counter = 0;\n\tforeach($data as $item)\n\t{\n\t\t$counter++;\n\t\tif ($counter % 2 == 1)\n\t\t{\n\t\t\t$result .= \"\\t<tr>\";\n\t\t} else\n\t\t{\n\t\t\t$result .= \"\\t<tr class=\\\"odd\\\">\";\n\t\t}\n\t\tforeach($item as $value)\n\t\t{\n\t\t\t$result .= '<td>' . $value . '</td>';\n\t\t}\n\t\t$result .= \"</tr>\\n\";\n\t}\n\t$result .= \"</table>\\n\";\n\treturn $result;\n}", "function create_table($id, $data, $headers=[], $caption = \"\") {\n $table = \"<table id=\\\"$id\\\"><caption>$caption</caption>\";\n\n if (sizeof($headers) > 0) {\n $table .= add_row(create_headers($headers));\n }\n\n foreach($data as $vals) {\n $table .= add_row(create_row($vals));\n }\n\n $table .= \"</table>\";\n return $table;\n }", "public function makeTable($headings, $content);", "function html_generate_row($row, $prepend, $heading=false) {\n $html = '<tr>';\n if ($prepend !== null) {\n $html .= '<th>'.$prepend.'</th>';\n }\n for ($i=0; $i <= count($row)-1; $i++) {\n if (!$heading) {\n $html .= '<td>'.round($row[$i], 1).'</td>';\n } else {\n $html .= '<th>'.round($row[$i], 1).'</th>';\n }\n }\n $html .= '</tr>';\n return $html;\n}", "public function print(): void\n {\n $values = $this->table->getValues();\n $size = $this->table->getSize();\n echo \"<table>\";\n foreach ($values as $index => $row) {\n if ($index === 1) {\n echo \"<tr><th>*</th>\";\n foreach ($row as $cell) {\n echo \"<th style='width:\" . (100 / ($size + 1)) . \"%'>\" . $cell . \"</th>\";\n }\n echo \"</tr>\";\n }\n echo \"<tr>\";\n echo \"<th style='width:\" . (100 / ($size + 1)) . \"%'>{$index}</th>\";\n foreach ($row as $cell) {\n echo \"<td style='width:\" . (100 / ($size + 1)) . \"%'>\" . $cell . \"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "function createTable(array $results = array())\n{\n if (empty($results)) {\n return '<table><tr><td>Empty Result Set</td></tr></table>';\n }\n\n // dynamically create the header information from the keys\n // of the result array from mysql\n $table = '<table>';\n $keys = array_keys(reset($results));\n $table.='<thead><tr>';\n foreach ($keys as $key) {\n $table.='<th><mark>&nbsp;'.$key.'&nbsp;</mark></th>';\n }\n $table.='</tr></thead>';\n\n // populate the main table body\n $table.='<tbody>';\n foreach ($results as $result) {\n $table.='<tr>';\n foreach ($result as $val) {\n $table.='<td><mark>&nbsp;'.$val.'&nbsp;</mark></td>';\n }\n $table.='</tr>';\n }\n $table.='</tbody></table>';\n return $table;\n}", "public function renderTableBody()\n {\n $models = array_values($this->dataProvider->getModels());\n $keys = $this->dataProvider->getKeys();\n $rows = [];\n foreach ($models as $index => $model) {\n $key = $keys[$index];\n if ($this->beforeRow !== null) {\n $row = call_user_func($this->beforeRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model, $key, $index);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows) && $this->emptyText !== false) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n }\n\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }", "function generateHorizontalTableFromQuery($tableid, $title, $description, $sql){\n\t\t global $database;\n\n $rec = $database->query($sql);\n \n if (!$rec || !$rec->num_rows){\n\t\t\t return $database->error;\n\t\t }\n\t\t \n\t\t $field_names = array();\n\t\t $fields = \"\";\n\t\t $body = \"\";\n\t\t\t\n\t\t\t// first field\n\t\t\t$field_names[] = \"<th>Category</th>\";\n\t\t\twhile ($row = $rec->fetch_array()){\n\t\t\t\t$col = $row[0];\n\t\t\t\t$field_names[] = \"<th>$col</th>\";\n\t\t\t}\n\n\t\t\t$fields = implode(\"\", $field_names);\n\t\t\t\n\t\t\tmysqli_data_seek($rec, 0);\n\n\t\t\t$keys = array();\t\t\t\n\t\t\t$row = $rec->fetch_array();\n\t\t\t$keys_ = array_keys($row);\n\t\t\t$idx = 0;\n\n\t\t\tforeach($keys_ as $key){\n\t\t\t\tif (! is_numeric($key) && $idx > 1){\n\t\t\t\t\t$keys[] = $key;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$idx++;\n\t\t\t}\n\n\t\t\tmysqli_data_seek($rec, 0);\n\t\t\t$data = \"\";\n\t\t\t$body = \"\";\n\t\t\t\n\t\t\t$total_fields = sizeof($field_names); // account for category\n\t\t\t$datasets = [];\n\t\t\t$idx = 1;\n\t\t\t\n\t\t\twhile ($row = $rec->fetch_array()){\t\t\n\t\t\t\tforeach($keys as $category) {\n\t\t\t\t\t\t $data = $row[$category];\n\t\t\t\t\t\t if (!$data) $data = 0;\n\t\t\t\t\t\t $datasets[$category][] = \"<td>$data</td>\"; \n\t\t\t\t}\n\t\t\t}\t\t\t\n\n\t\t\tforeach ($datasets as $key=>$arr){\n\t\t\t\t$data = implode(\"\", $arr);\n\t\t\t\t$body .= \"<tr><td>$key</td>$data</tr>\";\n\t\t\t\t$idx++;\n\t\t\t}\n\t\t\t\n\t\t\treturn \"<h5 style='font-weight:bold'>$title <small class='pull-right'>$description</small></h5>\n\t\t\t\t\t <div class='table-responsive' style='overflow-x:scroll;'>\n\t\t\t\t\t\t <table class='table table-hover table-bordered' id='$tableid'>\n\t\t\t\t\t <thead>\n\t\t\t\t\t\t <tr>$fields</tr>\n\t\t\t\t\t\t </thead>\n\t\t\t\t\t\t <tbody>\n\t\t\t\t\t\t\t\t$body\n\t\t\t\t\t\t </tbody>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t</div>\";\n }", "function SQL2HTML($query, $title=\"Table Summary\")\n{\n \n if (!$result = pp_run_query($query)) {\n $sRetVal = mysql_error();\n } else {\n $sRetVal = \"<table border='1'>\\n\";\n $sRetVal .= \"<tr><th colspan='\" . count($result[0]) . \"'>\";\n $sRetVal .= $title . \"</th></tr>\";\n $sRetVal .= \"<tr>\";\n $i=0;\n //while ($i < count($result[0])) {\n foreach(array_keys($result[0]) as $key){\n $sRetVal .= \"<th>\" . $key . \"</th>\";\n $i++;\n }\n $sRetVal .= \"</tr>\";\n foreach($result as $line){\n $sRetVal .= \"\\t<tr>\\n\";\n foreach($line as $col_value) {\n $sRetVal .= \"\\t\\t<td>$col_value</td>\\n\";\n }\n $sRetVal .= \"\\t</tr>\\n\";\n }\n $sRetVal .= \"</table>\\n\";\n }\n \n return($sRetVal);\n}", "function table_from_array(&$data_array, $has_header = TRUE, $class = \"\", $id = \"\", $text_limit_to_trim = null) {\n if ((count($data_array) == 0) || (count(current($data_array)) == 0)) {\n trigger_error(\"Array to build HTML table is empty\", E_USER_NOTICE);\n return FALSE;\n }\n $table_object = new html_classes\\table($class, $id);\n\n foreach ($data_array as $row_index => $row_data) {\n if ($has_header && ($row_index === 0)) {\n $thead = $table_object->append_thead();\n $tr = $thead->append_tr();\n } else {\n if (!isset($tbody)) {\n $tbody = $table_object->append_tbody();\n }\n $tr = $tbody->append_tr();\n }\n foreach ($row_data as $col_index => $col_value) {\n if ($has_header && ($row_index === 0)) {\n $tr->append_th($col_value);\n } else {\n if (!is_object($col_value)) {\n if (is_numeric($col_value)) {\n if (is_float($col_value)) {\n $col_value = number_format($col_value, 2);\n } else {\n $col_value = number_format($col_value);\n }\n }\n if (is_numeric($text_limit_to_trim) && strlen($col_value) > $text_limit_to_trim) {\n $col_value = substr($col_value, 0, $text_limit_to_trim) . \"...\";\n }\n } else {\n if (is_numeric($text_limit_to_trim) && strlen($col_value->get_value()) > $text_limit_to_trim) {\n $col_value->set_value(substr($col_value->get_value(), 0, $text_limit_to_trim) . \"...\");\n }\n// d($col_value->get_value());\n }\n $tr->append_td($col_value);\n }\n }\n }\n// \\var_dump($table_object);\n return $table_object;\n}", "private function createCells($data){\r\n $html = '';\r\n foreach ($data AS $index => $row) {\r\n $html .= '<tr class=\"ctable-rows\">';\r\n foreach ($row as $rownr => $data) {\r\n $html .= '<td>' . $data . '</td>';\r\n }\r\n $html .= '</tr>';\r\n }\r\n return $html;\r\n }", "function minitable($Array){\n\t$table='<table class=\"mini\">';\n\tforeach ($Array as $row=>$Cells){\n\t\t$table.='<tr>'.\"\\n\";\n\t\tforeach ($Cells as $column=>$value){\n\t\t\t$class=setclass($row,$column,$value);\n\t\t\t$value=htmlSafe($value);\n\t\t\tif (strlen($value)>1){$value='&nbsp;';}\n\t\t\tif (strlen($value)==0){$value='x';}\n\t\t\t$table.='<td class=\"'.$class.'\">'.$value.'</td>'.\"\\n\";\n\t\t}\n\t\t$table.='</tr>'.\"\\n\";\n\t}\n\t$table.='</table>';\n\treturn $table;\n}", "static public function generate(Resultset $resultset){\r\n\t\t$code = '<table>' ;\r\n\t\t$code .= '<thead></thead>' ;\r\n\t\t$code .= '<tbody>' ;\r\n\t\tforeach ($resultset as $record){\r\n\t\t\t$code .= '<tr>' ;\r\n\t\t\tforeach ($record->toArray() as $value){\r\n\t\t\t\t$code .= '<td>'.$value.'</td>' ;\r\n\t\t\t}\r\n\t\t\t$code .= '</tr>' ;\r\n\t\t}\r\n\t\t$code .= '</tbody>' ;\r\n\t\t$code .= '<tfoot></tfoot>' ;\r\n\t\t$code .= '</table>';\r\n\t\t\r\n\t\treturn $code ;\r\n\t}", "public static function generate(array $inputArray)\r\n {\r\n //HTML table should use the table head tag for the first row of the table and have the field names from the CSV file in this row. \r\n $tableOpenString = '<table>';\r\n $headerString = '<thead><tr>';\r\n\r\n foreach ($inputArray[0] as $columnName)\r\n {\r\n $headerString.=\"<td>$columnName</td>\";\r\n }\r\n\r\n $headerString.='</thead></tr>';\r\n $tableBodyString = '<tbody>';\r\n for ($i=1 ; $i<=sizeof($inputArray)-1 ; $i++)\r\n {\r\n $currentArray = $inputArray[$i]; \r\n\r\n if (sizeof($currentArray)==sizeof($inputArray[0]))\r\n {\r\n $tableBodyString.='<tr>';\r\n foreach ($currentArray as $row)\r\n {\r\n $tableBodyString.=\"<td>$row</td>\";\r\n }\r\n $tableBodyString.='</tr>';\r\n }\r\n }\r\n $tableBodyString.='</tbody>';\r\n $tableCloseString = '</table>';\r\n\r\n $htmlOutput = $tableOpenString . $headerString . $tableBodyString . $tableCloseString;\r\n\r\n return $htmlOutput; \r\n \r\n }", "function display() {\n echo'<table cols=\"3\" style=\"font-size:large; font-weight:bold\">';\n echo'<tr>'; //first row\n for ($pos = 0; $pos < 9; $pos++) {\n echo $this->show_cell($pos);\n if ($pos % 3 == 2)\n echo '</tr><tr>'; //next square is in a new row\n }\n echo'</tr>';\n echo'</table>';\n }", "protected function generateTable(&$params)\n {\n $groupingField = array_search($params[\"grouping_fields\"][$params[\"grouping_level\"]],$params[\"fields\"]);\n $groupingLevel = $params[\"grouping_level\"];\n $accumulatedTotals = array();\n \n if(count($this->reportData) == 0) return;\n \n do\n {\n if($_POST[\"grouping_\".($params[\"grouping_level\"]+1).\"_newpage\"] == \"1\")\n {\n $params[\"report\"]->addPage($_POST[\"grouping_\".($params[\"grouping_level\"]+1).\"_newpage\"]);\n }\n\n $headingValue = $this->reportData[$this->reportDataIndex][$groupingField];\n $this->drawHeading($headingValue, $params);\n\n $totalsBox = new TableContent($params[\"headers\"],null);\n $totalsBox->style[\"totalsBox\"] = true;\n array_unshift($params[\"previous_headings\"], array($headingValue, $groupingField));\n $params[\"ignored_fields\"][] = $groupingField;\n\n if($params[\"grouping_fields\"][$groupingLevel + 1] == \"\")\n {\n $data = array();\n do\n {\n //if($t == 1000) die(); $t++;\n $continue = true;\n $row = $this->reportData[$this->reportDataIndex];\n //var_dump($row);\n\n @$data[] = array_values($row);\n\n $this->reportDataIndex++;\n\n foreach($params[\"previous_headings\"] as $heading)\n {\n if($heading[0] != $this->reportData[$this->reportDataIndex][$heading[1]])\n {\n array_shift($params[\"previous_headings\"]);\n $continue = false;\n break;\n }\n }\n }while($continue);\n \n $totals = $this->drawTable($data, $params, $params[\"data_params\"], null, $headingValue);\n array_pop($params[\"ignored_fields\"]);\n }\n else\n {\n $params[\"grouping_level\"]++;\n $totals = $this->generateTable($params);\n array_shift($params[\"previous_headings\"]);\n $params[\"grouping_level\"]--;\n array_pop($params[\"ignored_fields\"]);\n }\n\n if($this->drawTotals && $totals != null)\n {\n $totalsBox->data_params = $this->dataParams;\n $totalsBox->data_params[\"widths\"] = $this->widths;\n $totals[0] = \"$headingValue\";\n $totalsBox->setData($totals);\n $params[\"report\"]->add($totalsBox);\n foreach($totals as $i => $total)\n {\n if($total === null) continue;\n $accumulatedTotals[$i] += $total;\n }\n }\n\n if($params[\"previous_headings\"][0][0] != $this->reportData[$this->reportDataIndex][$params[\"previous_headings\"][0][1]])\n {\n break;\n }\n\n }while($this->reportDataIndex < count($this->reportData));\n \n return $accumulatedTotals; \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 }", "function table_display($table)\n{\n $out = '';\n $out = '<style> td,th{border: solid 2px black;}</style>';\n if (count($table) == 0) {\n //table is empty\n return 'table is empty';\n }\n $out .= '<table>';\n\n //table header\n $col_names = array_keys($table[0]);\n $out .= '<tr>';\n foreach ($col_names as $col_name) {\n $out .= '<th>'.$col_name.'</th>';\n }\n $out .= '</tr>';\n //table data\n $out .= '</tr>';\n foreach ($table as $one_row) {\n $out .= '<tr>';\n foreach ($one_row as $key => $col_name) {\n if ($key == 'price' and gettype($key) != 'integer') {\n $out .= '<td> $'.$col_name.' </td>';\n } else {\n $out .= '<td>'.$col_name.' </td>';\n }\n }\n $out .= '</tr>';\n }\n $out .= '</table>';\n\n return $out;\n}", "function MysqlResultsTable ($mysql_results, $table_id='') {\n while ($myrow = mysql_fetch_assoc($mysql_results)) {\n if (! ($headers))\n $headers = array_keys($myrow);\n $rows .= \" <tr>\\n\";\n foreach ($headers as $k)\n $rows .= \" <td class=$k>$myrow[$k]</td>\\n\";\n $rows .= \" </tr>\\n\";\n } // end while myrow\n $header = join(\"</th><th>\",$headers);\n $header = \"<tr><th>$header</th></tr>\\n\";\n if ($table_id != '') { $id = ' id=\"'.$table_id.'\"'; }\n $rows = \"<table$id>$header$rows</table>\\n\";\n return ($rows);\n}", "function display() {\r\n echo '<table cols=\"3\" style=\"font-size:large; font-weight:bold\">';\r\n echo '<tr>'; \r\n for ($pos = 0; $pos < 9; $pos++) { \r\n echo $this->show_cell($pos); \r\n if ($pos % 3 == 2) {\r\n echo '</tr><tr>';\r\n } \r\n }\r\n echo '</tr>';\r\n echo '</table>';\r\n }", "function printTable($arg_array)\r\n\t\t{\r\n\t\techo \"<table border=1>\";\r\n\t\tforeach($arg_array[0] as $key=>$value)\r\n\t\t\t{\r\n\t\t\techo \"<th>\".$key.\"</th>\";\r\n\t\t\t}\r\n\t\techo \"<tr>\";\r\n\t\tforeach($arg_array as $row =>$record)\r\n\t\t\t{\r\n\t\t\tforeach($record as $column_head => $value)\r\n\t\t\t\t{\r\n\t\t\t\techo \"<td>\".$value.\"</td>\";\r\n\t\t\t\t}\r\n\t\t\techo \"</tr>\";\t\r\n\t\t\t}\r\n\t\techo \"</table>\";\r\n\t\t}", "function tabla01($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table id=\\\"one-column-emphasis\\\" >\\n\n <colgroup>\\n\n \t<col class=\\\"oce-first\\\" />\\n\n </colgroup>\\n\n <tbody>\\n\";\n\tforeach( $array01 as $key => $value){\n\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t}\n\t$array02[$i++] = \"</tbody>\\n</table>\\n\";\n\treturn $array02;\n/*\n<table id=\\\"one-column-emphasis\\\" >\n <colgroup>\n \t<col class=\\\"oce-first\\\" />\n </colgroup>\n <tbody>\n \t<tr>\n \t<td></td>\n </tr>\n </tbody>\n</table>\n*/\n}", "public function render($data){\n $html = \"<html><body><table border = 1>\";\n\t $html .= \"<tr>\";\n\t foreach($data[0] as $header){\n\t $html .=\"<th>\" .$header. \"</th>\";\n\t }\n\t $html .= \"</tr>\";\n\t for ($i=1;$i<count($data);$i++){\n\t $html .= \"<tr>\";\n\t foreach ($data[$i] as $row) {\n\t $html .= \"<td>\" .$row. \"</td>\";\n\t }\n\t $html .=\"</tr>\";\n\t }\n\t $html .=\"</table>\";\n\t return $html; \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}", "function FancyTable($header, $data)\n{\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(40, 35, 40, 45);\n for($i=0;$i<count($header);$i++)\n $this->Cell($w[$i],7,$header[$i],1,0,'C',true);\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 foreach($data as $row)\n {\n $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);\n $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill);\n $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill);\n $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);\n $this->Ln();\n $fill = !$fill;\n }\n // Closing line\n $this->Cell(array_sum($w),0,'','T');\n}", "public function table()\n\t{\n\t\t$this->datatables->select('testcat.test_id AS test_id, testcat_id, gender, age, score, percentile, percentile.id AS id');\n\t\t$this->datatables->from('percentile');\n\t\t$this->datatables->join('testcat', 'testcat.id = percentile.testcat_id');\n\n\t\t$this->datatables->edit_column('test_id', '$1', 'test_get_link_by_id(test_id)');\n\t\t$this->datatables->edit_column('testcat_id', '$1', 'testcat_get_link_by_id(testcat_id)');\n\t\t$this->datatables->edit_column('gender', '$1', 'gender(gender)');\n\t\t$this->datatables->edit_column('id', '$1', 'percentile_actions(id)');\n\n\t\techo $this->datatables->generate();\n\t}", "function writeTable($table = [], $heads = [], $data = []){\n $html = '<table ';\n //the attributes of table\n foreach ($table as $key =>$item) {\n if (is_numeric($key)) {\n $html .= \" {$key} \";\n } else {\n $html .= \" {$key}={$item} \";\n }\n }\n\n $html .= ' >';\n\n $html .= '<thead><tr>';\n\n //the column head of table\n foreach ($heads as $head) {\n $class = isset($head['class']) ? $head['class'] : '';\n $html .= \"<th class=\\\"{$class}\\\">{$head['title']}</th>\";\n }\n $html .= '</tr></thead>';\n\n //the body\n $html .= '<tbody>';\n foreach ($data as $row) {\n $html .= \"<tr>\";\n\n foreach ($heads as $head) {\n $class = isset($row[$head['column']]['class']) ? $row[$head['column']]['class'] : '';\n\n $html .= \"<td class=\\\"{$class}\\\">{$row[$head['column']]['value']}</td>\";\n }\n $html .= \"</tr>\";\n }\n\n $html .= '</tbody></table>';\n echo $html;\n}", "function vievRandomBigArray($array){\n echo '<table border=\"1\">';\n for ($y=0; $y < count($array); $y++){\n echo '<tr>';\n for ($x=0; $x < count($array[$y]); $x++){\n echo \"<td>\".$array[$y][$x].'</td>';\n }\n echo \"</tr>\";\n }\n echo '</table>';\n}", "function tabla03($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table border=\\\"0\\\">\";\n\tforeach( $array01 as $value ){\n\t\tforeach( $value as $key => $value){\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t\t}\n\t\t// linea en blanco\n\t\t$array02[$i++] = \"<tr><td></td><td></td></tr>\\n\";\n\t}\n\t$array02[$i++] = \"</table>\";\n\treturn $array02;\n\n// foreach( $array02 as $value ){\n//\techo $value;\n//}\n}", "function ImprovedTable($header,$data)\n{\n\t//Anchuras de las columnas\n\t$w=array(60,30,20,35,35);\n\t//Cabeceras\n\t$l = mysql_connect(\"localhost\",\"pmm\",\"guhAf2eh\");\n\t//$l = mysql_connect(\"DBSERVER\",\"root\",\"root\");\n\tmysql_select_db(\"pmm_dbpruebas\", $l);\n\t//mysql_select_db(\"pmm_dbweb\", $l);\n\t$s = \"SELECT CONCAT_WS(' ',nombre,paterno,materno) AS cliente, d.calle, d.poblacion, d.estado, d.pais\n\tFROM catalogocliente cc\n\tINNER JOIN direccion d ON cc.id = d.codigo\n\tWHERE d.facturacion='SI'\n\tLIMIT 0,100\";\t\n\t$r = mysql_query($s,$l) or die($s);\n\t\n\tfor($i=0;$i<count($header);$i++)\n\t\t$this->Cell($w[$i],7,$header[$i],1,0,'C');\n\t$this->Ln();\n\t//Datos\t\n\t\twhile($row = mysql_fetch_array($r)){\n\t\t\t$this->Cell($w[0],6,$row[0],'LR');\n\t\t\t$this->Cell($w[1],6,$row[1],'LR');\n\t\t\t$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');\n\t\t\t$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');\n\t\t\t$this->Ln();\n\t\t}\n\t/*foreach($data as $row)\n\t{\n\t\t$this->Cell($w[0],6,$row[0],'LR');\n\t\t$this->Cell($w[1],6,$row[1],'LR');\n\t\t$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');\n\t\t$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');\n\t\t$this->Ln();\n\t}*/\n\t//Lnea de cierre\n\t$this->Cell(array_sum($w),0,'','T');\n}", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<p class=left>Description:</p>\\n\";\n\t}", "public function getTable()\r\n {\r\n $this->calculateColumnWidth();\r\n\r\n $output = $this->border ? $this->getBorderLine() : '';\r\n foreach ($this->data as $y => $row) {\r\n if ($row === self::HR) {\r\n if (!$this->allBorders) {\r\n $output .= $this->getBorderLine();\r\n unset($this->data[$y]);\r\n }\r\n\r\n continue;\r\n }\r\n\r\n foreach ($row as $x => $cell) {\r\n $output .= $this->getCellOutput($x, $row);\r\n }\r\n $output .= PHP_EOL;\r\n\r\n if ($y === self::HEADER_INDEX) {\r\n $output .= $this->getBorderLine();\r\n } else {\r\n if ($this->allBorders) {\r\n $output .= $this->getBorderLine();\r\n }\r\n }\r\n }\r\n\r\n if (!$this->allBorders) {\r\n $output .= $this->border ? $this->getBorderLine() : '';\r\n }\r\n\r\n if (PHP_SAPI !== 'cli') {\r\n $output = '<pre>' . $output . '</pre>';\r\n }\r\n\r\n return $output;\r\n }", "function getTable(){\n\t\t\tglobal $page, $tableContent, $tableHeadings, $idName, $URL;\n\t\t\t// reset current page content\n\t\t\t$page = \"\";\n\t\t\t\n\t\t\t$page = '<div class=\"tableContainer\"><table class=\"twoCol\">';\n\t\t\t\n\t\t\t\t\n\t\t\t\t$page = $page . '<tr class = \"tableHeader\">';\n\t\t\t\t$page = $page . '<td class = \"headerCell\"></td>';\n\t\t\t\t\n\t\t\t\tforeach (array_keys($tableContent[0]) as $h){\n\t\t\t\t\t\n\t\t\t\t\t$page = $page . '<td class = \"headerCell\">' . $h . '</td>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$page = $page . '</tr>';\n\t\t\t\n\t\t\t\n\t\t\t// make sure we have table content to print\n\t\t\t\n\t\t\t$contentSize = count($tableContent);\n\t\t\t\n\t\t\tfor($i = 0; $i < $contentSize; $i++){\n\t\t\t\t$rowSize = count($tableContent[$i]);\n\t\t\t\t\n\t\t\t\t// vary row depending on odd/even\n\t\t\t\tif($i % 2){\n\t\t\t\t\t$page = $page . ('<tr class = \"odd\">');\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$page = $page . ('<tr class = \"even\">');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// now build row content\n\t\t\t\t$oddevenCount = 1;\n\t\t\t\t$view = '<td class = \"even\">\n\t\t\t\t<a href=\"' . $URL . '?id=' . $tableContent[$i][$idName] . '\">\n\t\t\t\tVIEW</a></td>';\n\t\t\t\t$page = $page . $view;\n\t\t\t\t\n\t\t\t\tforeach ($tableContent[$i] as $row){\n\t\t\t\t\t\n\t\t\t\t\t// vary cell tag depending on odd/even\n\t\t\t\t\tif($oddevenCount % 2){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$page = $page . '<td class = \"even\">';\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$page = $page . '<td class = \"odd\">';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// add content\n\t\t\t\t\t$page = $page . $row;\n\t\t\t\t\t\n\t\t\t\t\t// close cell tag\n\t\t\t\t\t$page = $page . '</td>';\n\t\t\t\t\t$oddevenCount += 1;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// close row tag\n\t\t\t\t$page = $page . '</tr>';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$page = $page . ('</table></div>');\n\t\t\t\n\t\t\treturn $page;\n\t\t}", "function generateVerticalTableFromQuery($tableid, $title, $description, $sql){\n\t\t global $database;\n\n $rec = $database->query($sql);\n \n if (!$rec || !$rec->num_rows){\n\t\t\t return $database->error;\n\t\t }\n\t\t \n\t\t $field_names = array();\n\t\t $fields = \"\";\n\t\t $body = \"\";\n\t\t\t\n\t\t\twhile ($fieldinfo=mysqli_fetch_field($rec)){\t\n\t\t\t\t$fieldname = $fieldinfo->name;\n\t\t\t\t$field_names[] = $fieldname;\n\t\t\t\t$fields .= \"<th>$fieldname</th>\";\n\t\t\t}\n\n\t\t\t$datatable = \"$('#$tableid').dataTable();\";\n\t\t\tif (!$tableid) $datatable = \"\";\n\t\t\t$data = \"\";\n\t\t\t\n\t\t\twhile ($row = $rec->fetch_array()){\n\t\t\t\t$data = \"\";\n\t\t\t\tforeach ($field_names as $fld){\n\t\t\t\t\t$val = $row[$fld];\n\t\t\t\t\tif (!$val) $val = 0;\n\t\t\t\t\t$data .= \"<td>$val</td>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t $body .= \"<tr>$data</tr>\";\t\t\n\t\t\t}\n\n\t\t\treturn \"<h5 style='font-weight:bold'>$title <small class='pull-right'>$description</small></h5>\n\t\t\t <div class='table-responsive' style='overflow-x:scroll;'>\n\t\t\t\t <table class='table table-hover table-bordered' id='$tableid'>\n\t\t\t <thead>\n\t\t\t\t <tr>$fields</tr>\n\t\t\t\t </thead>\n\t\t\t\t <tbody>\n\t\t\t\t\t\t$body\n\t\t\t\t </tbody>\n\t\t\t\t </table>\n\t\t\t\t </div>\n\t\t\t\t <script>\n\t\t\t\t \t$('document').ready(function(){\n\t\t\t\t \t\t$datatable\n\t\t\t\t \t});\n\t\t\t\t </script>\";\n }", "function RowHeadFoot($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->SetFont('Arial', 'B', 7);\n $this->SetFillColor(203, 203, 203);\n $this->MultiCell($w, 5, $data[$i], 1, $a, true);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }", "function print_table($data)\n{\n\t$col_width = array();\n\n\t// pre-calculate column width\n\tforeach ($data as $row) {\n\t\tforeach ($row as $col => $value) {\n\t\t\t$col_width[$col] = max(@$col_width[$col], mb_strlen(var_export($value, true)));\n\t\t}\n\t}\n\n\t// include key width\n\tforeach ($col_width as $label => & $width) {\n\t\t$width = max(mb_strlen($label), $width);\n\t}\n\t\n\t// show table header\n\techo \"\\n \";\n\tforeach ($col_width as $label => $width) {\n\t\techo \"+\", str_repeat('-', $width + 2);\n\t}\n\techo \"+\\n \";\n\tforeach ($col_width as $label => $width) {\n\t\t$pad = ($width - mb_strlen($label)) / 2.;\n\t\techo \"| \", str_repeat(' ', floor($pad)), $label, str_repeat(' ', ceil($pad)), \" \";\n\t}\n\techo \"|\\n \";\n\tforeach ($col_width as $label => $width) {\n\t\techo \"+\", str_repeat('-', $width + 2);\n\t}\n\techo \"+\\n \";\n\n\t// show table\n\tforeach ($data as $row) {\n\t\tforeach ($row as $col => $value) {\n\t\t\t$value_str = var_export($value, true);\n\t\t\t$pad = $col_width[$col] - mb_strlen($value_str);\n\t\t\tif (is_numeric($value)) {\n\t\t\t\techo \"| \", str_repeat(' ', $pad), $value_str, \" \";\n\t\t\t} else {\n\t\t\t\techo \"| \", $value_str, str_repeat(' ', $pad), \" \";\n\t\t\t}\n\t\t}\n\t\techo \"|\\n \";\n\t}\n\n\tforeach ($col_width as $label => $width) {\n\t\techo \"+\", str_repeat('-', $width + 2);\n\t}\n\techo \"+\\n\\n\";\n}", "function as_table() \n {\n #$str = \"<table> \\n\";\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) \n {\n if ($obj != NULL) \n {\n $str .= \"<tr>\\n\\t<td>\".$obj->label().\"</td>\\n\\t\";\n $str .= \"<td>\".$obj.\"</td>\\n</tr>\\n\";\n }\n }\n #$str .= \"</table>\\n\";\n return $str;\n }", "public function makeTableView($headings, $content, $idFieldName, $viewURL);", "function getTable(){\n\t\t\tglobal $page, $tableContent, $tableHeadings;\n\t\t\t// reset current page content\n\t\t\t$page = \"\";\n\t\t\t\n\t\t\t$page = '<div class=\"tableContainer\"><table class=\"twoCol\">';\n\t\t\t\n\t\t\t// make sure we have a header row, else skip\n\t\t\t/*\n\t\t\t$headerSize = count($tableHeadings);\n\t\t\tif($headerSize > 0){\n\t\t\t\t\n\t\t\t\t$page = $page . '<tr class = \"tableHeader\">';\n\t\t\t\t\n\t\t\t\tforeach ($tableHeadings as $h){\n\t\t\t\t\t$page = $page . '<td class = \"headerCell\">' . $h . '</td>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$page = $page . '</tr>';\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t$page = $page . '<tr class = \"tableHeader\">';\n\t\t\t\t\n\t\t\t\tforeach (array_keys($tableContent[0]) as $h){\n\t\t\t\t\t\n\t\t\t\t\t$page = $page . '<th class = \"headerCell\">' . $h . '</th>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$page = $page . '</tr>';\n\t\t\t\n\t\t\t\n\t\t\t// make sure we have table content to print\n\t\t\t\n\t\t\t$contentSize = count($tableContent);\n\t\t\t\n\t\t\tfor($i = 0; $i < $contentSize; $i++){\n\t\t\t\t$rowSize = count($tableContent[$i]);\n\t\t\t\t\n\t\t\t\t// vary row depending on odd/even\n\t\t\t\tif($i % 2){\n\t\t\t\t\t$page = $page . ('<tr class = \"odd\">');\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$page = $page . ('<tr class = \"even\">');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// now build row content\n\t\t\t\t$oddevenCount = 0;\n\t\t\t\tforeach ($tableContent[$i] as $row){\n\t\t\t\t\t\n\t\t\t\t\t// vary cell tag depending on odd/even\n\t\t\t\t\tif($oddevenCount % 2){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$page = $page . '<td class = \"odd\">';\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$page = $page . '<td class = \"even\">';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// add content\n\t\t\t\t\t$page = $page . $row;\n\t\t\t\t\t\n\t\t\t\t\t// close cell tag\n\t\t\t\t\t$page = $page . '</td>';\n\t\t\t\t\t$oddevenCount += 1;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// close row tag\n\t\t\t\t$page = $page . '</tr>';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$page = $page . ('</table></div>');\n\t\t\t\n\t\t\treturn $page;\n\t\t}", "public function SummaryLine_HTML_row() {\n\t$sCatNum = $this->CatNum();\n\t$htLink = $this->ShopLink($sCatNum);\n\t$sName = $this->NameString();\n\t$sStats = $this->RenderStatus_HTML_cells();\n\treturn \"\\n<tr><td>$htLink</td><td>&ldquo;$sName&rdquo;</td>$sStats</tr>\";\n }", "function tabla02($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table border=\\\"1\\\">\";\n\tforeach( $array01 as $key => $value){\n\t\tif ( $key == 'id' or $key == 'ID' or $key == 'Id'){\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td><td> - </td></tr>\\n\";\n\t\t} else{\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t\t}\n\t}\n\t$array02[$i++] = \"</table>\";\n\treturn $array02;\n}", "function makeTable($netid, $pass) {\r\n $dataJSON = getOwlspaceData($netid,$pass, 1);\r\n\r\n $returnString = \"\";\r\n\r\n $data = json_decode($dataJSON, true);\r\n\r\n $keys = array_keys($data);\r\n\r\n echo '<table class=\"table\">';\r\n // go through and make table\r\n foreach (array_keys($data) as $index => $classKey) {\r\n foreach (array_keys($data[$classKey]) as $index => $assignmentKey) {\r\n echo '<tr>';\r\n echo '<td>', $classKey, '</td>';\r\n echo '<td>', $assignmentKey, '</td>';\r\n echo '<td>', $data[$classKey][$assignmentKey], '</td>';\r\n echo '</tr>';\r\n }\r\n }\r\n echo '</table>';\r\n\r\n \r\n }", "function printTable($array,$m,$n){\necho \"<br>\"; \nfor ($i = 0; $i <= $m; $i++) \n{ \nfor ($j = 0; $j <= $n; $j++) \n{ \n echo $array[$i][$j].\" \";\n}\n echo \"<br>\";\n}\n\n echo \"<br>\";\n echo \"<br>\";\n}", "function html_table_data($dbtable, $sqlquery = NULL){\n\t\t$i = 1;\n\t\t$db = ADONewConnection('mysql'); \n\t $db->debug = true; \n\t $db->Connect('localhost', 'xxxx', 'xxxx', 'xxxx'); \n\t if(!$db)\n\t \tdie(\"Database conn failed\");\n\t \t\n\t $rs = $db->GetAssoc(\"select * from $dbtable\");\n\t if (!$rs) {\n\t \tdie(\"Sql statement error\");\n\t } \n\t print (\"<div id=\\\"demo\\\"><table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" border=\\\"0\\\" class=\\\"display\\\" id=\\\"example\\\">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>ID</th>\n\t\t\t\t<th>School</th>\n\t\t\t\t<th>Level</th>\n\t\t\t\t<th>Enrollment</th>\n\t\t\t</tr>\n\t\t</thead><tbody>\");\n\t foreach ($rs as $row){\n\t \techo(\"<tr id=\\\"$i\\\" class=\\\"gradeA\\\"><td>\".\n\t \t$row['id'].\"</td><td>\".$row['school'].\"</td><td class=\\\"center\\\">\".\n\t \t$row['level'].\"</td><td class=\\\"center\\\">\".$row['enrollment'].\"</td>\n\t\t\t</tr>\");\n\t \t$i++;\t \t\t\n\t }\n\t\t echo (\"</tbody>\n\t\t\t\t\t<tfoot>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>ID</th>\n\t\t\t\t\t\t<th>School</th>\n\t\t\t\t\t\t<th>Level</th>\n\t\t\t\t\t\t<th>Enrollment</th>\t\n\t\t\t\t\t</tr>\n\t\t\t\t\t</tfoot>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\");\n\t $db->Close();\n\t}", "function tableauToHTML(array $tab)\n{\n echo \"<table>\";\n foreach ($tab as $i => $ligne) {\n echo \"<tr>\";\n foreach ($ligne as $j => $valeur) {\n echo \"<td>$valeur</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "public function loadMatrix($matrice)\n {\n foreach ($matrice as $key => $values) {\n echo('<tr> \\n<tr>\\n'.$key.'\\n</tr>\\n');\n foreach ($values as $case) {\n echo('<td> test </td>\\n');\n }\n echo('</tr>\\n');\n }\n }", "public function write() {\n\t\t$table = '<table '.$this->addHTML.'>';\n\t\tif(!is_null($this->tableInfo['head'])) {\n\t\t\t$table .= '<thead><tr>';\n\t\t\tforeach($this->tableInfo['head'] as $value) {\n\t\t\t\t$table .= '<th>'.$value.'</th>';\n\t\t\t}\n\t\t\tif($this->crud) {\n\t\t\t\t\t$table .= '<th>Options</th>';\t\n\t\t\t}\n\t\t\t$table .= '</tr></thead>';\n\t\t}\n\t\t$table .= '<tbody>';\n\t\tif(isset($this->tableInfo['rows'])) {\n\t\t\tforeach($this->tableInfo['rows'] as $row) {\n\t\t\t\t$table .= '<tr>';\n\t\t\t\tforeach($row as $key => $column) {\n\t\t\t\t\tif(($key != $this->crud_id) OR $this->show_crud_id) {\n\t\t\t\t\t\t$table .= '<td>'.$column.'</td>';\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($this->crud && isset($row[$this->crud_id])) {\n\t\t\t\t\t$table .= '<td>';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Details/'.$row[$this->crud_id].'\" title=\"Details\"><i class=\"fa fa-search\"></i></a> | ';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Edit/'.$row[$this->crud_id].'\" title=\"Edit\"><i class=\"fa fa-wrench\"></i></a> | ';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Delete/'.$row[$this->crud_id].'\" title=\"Delete\"><i class=\"fa fa-trash\"></i></a>';\n\t\t\t\t\t$table .= '</td>';\n\t\t\t\t}\n\t\t\t\t$table .= '</tr>';\n\t\t\t}\n\t\t} else {\n\t\t\t$table .= '<tr>';\n\t\t\t$table .= '<td>';\n\t\t\t$table .= 'No Data to show here.';\n\t\t\t$table .= '</td>';\n\t\t\t$table .= '</tr>';\t\n\t\t}\n\t\t\n\t\t$table .= '</tbody></table>';\n\t\treturn $table;\n\t}", "function affichage_sudoku($sudoku) {\n echo \"<table border=1px width=500px><tr>\";\n for ($i = 1; $i <= 9; $i++) {\n for ($j = 1; $j <= 9; $j++) {\n echo \"<td>\" . $sudoku[$i][$j] . \"</td>\";\n }\n if ($i < 9)\n echo \"</tr><tr>\";\n else\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "function printMatrixDistance($matrixAndKeys)\n{\n list($keys, $matrix) = $matrixAndKeys;\n $n = count($matrix);//Dimension of our square matrix\n $CI =& get_instance();//save the CodeIgniter instance in order to access methods\n $template = array('table_open' => '<table class=\"table table-striped table-bordered text-center\">');\n\n $CI->load->library('table');\n $CI->table->set_template($template);\n $heading = array_column($keys, 0);\n array_unshift($heading, \"key\");// Add an empty entry at the beginning\n $CI->table->set_heading($heading);\n\n for ($i=0; $i < $n; $i++)\n {\n for ($j=0; $j < $n; $j++)\n {\n if (!array_key_exists($j, $matrix[$i]))\n {\n $matrix[$i][$j] = \"\";//Fill the matrix to avoid errors\n }\n }\n $row = $matrix[$i];\n array_unshift($row, '<b>'.$keys[$i][0].'</b>');//Add the current row number\n $CI->table->add_row($row);\n }\n return $CI->table->generate();\n}", "function sql_to_html_table($sqlresult, $delim=\"\\n\") {\n // starting table\n $htmltable = \"<table border='1' width='100%'>\" . $delim ; \n $counter = 0 ;\n // putting in lines\n while( $row = $sqlresult->fetch_assoc() ){\n if ( $counter===0 ) {\n // table header\n $htmltable .= \"<tr>\" . $delim;\n foreach ($row as $key => $value ) {\n $htmltable .= \"<th>\" . ucwords($key) . \"</th>\" . $delim ;\n }\n $htmltable .= \"</tr>\" . $delim ; \n $counter = 22;\n } \n // table body\n $htmltable .= \"<tr>\" . $delim ;\n foreach ($row as $key => $value ) {\n $htmltable .= \"<td>\" . $value . \"</td>\" . $delim ;\n }\n $htmltable .= \"</tr>\" . $delim ;\n }\n // closing table\n $htmltable .= \"</table>\" . $delim ; \n // return\n return( $htmltable ) ; \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 tabla($lista, $totalColumnas) {\n $totalFilas = count($lista) / $totalColumnas;\n echo \"<table border='1'>\";\n for ($fila = 0; $fila < $totalFilas; $fila++) {\n echo \"<tr>\";\n for ($i=0;$i<$totalColumnas;$i++) {\n $posicion = $totalColumnas * $fila + $i;\n if ($posicion < count($lista)) {\n $contenido = $lista[$posicion];\n } else {\n $contenido = \"\";\n }\n echo \"<td>\".$contenido.\"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "function table($text) {\n\t\t$output = \"\";\n\t\tif (!empty($text)) {\n\t\t\t$output .= '<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"100%\">';\n\t\t\t$array = explode(\"\\n\", $text);\n\t\t\tfor ($i=0; $i<count($array); $i++) {\n\t\t\t\tif (!empty($array[$i])) {\n\t\t\t\t\t$row = explode(\":\", $array[$i], 2);\n\t\t\t\t\t$title = isset($row[0]) ? $row[0] : '';\n\t\t\t\t\t$data = isset($row[1]) ? $row[1] : '';\n\t\t\t\t\tif ($i%2 == 0) {\n\t\t\t\t\t\t$output .= '<tr class=\"row_ab_a\"><td class=\"form_title\" width=\"30%\">'.$title.'</td><td bgcolor=\"#EBF1F6\" width=\"70%\">'.$data.'</td></tr>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$output .= '<tr class=\"row_ab_b\"><td class=\"form_title\">'.$title.'</td><td bgcolor=\"#FFFFFF\">'.$data.'</td></tr>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$output .= '</table>';\n\t\t}\n\n\t\treturn $output;\n\t}", "public function printMatrix() {\n echo __CLASS__ . PHP_EOL;\n for ($i = 0; $i < $this->row; ++$i) {\n for ($j = 0; $j < $this->col; ++$j) {\n printf('%lf ', $this->data[$i * $this->col + $j]);\n }\n echo PHP_EOL;\n }\n }", "public function table(array $headers, $rows, $style = 'default')\n {\n $table = new Table($this->output);\n $table->setHeaders($headers)->setRows($rows)->setStyle($style)->render();\n }", "public function visualizzazione(){\n $nameColumn = $this->getColumnName();\n $tuple = $this->read();\n foreach($nameColumn as $nome){\n $x = ' <td> '. $nome . ' </td> ';\n echo $x;\n }\n \n foreach($tuple as $ris){\n $str ='<tr> <td> '.$ris->getId(). ' </td> '.\n '<td> '.$ris->getNome(). '</td>'.\n '<td> '.$ris->getUsername(). '</td>'.\n '<td> '.$ris->getPassword(). '</td>'.\n '<td> '.$ris->getEmail(). '</td>'.\n '<td> '.$ris->getMuseo(). '</td>'.\n '</tr>';\n echo $str;\n };\n }" ]
[ "0.71482766", "0.69479454", "0.6868333", "0.67576283", "0.6698893", "0.6503475", "0.64767045", "0.64269537", "0.6407969", "0.6397027", "0.63963944", "0.6371333", "0.63682574", "0.6352933", "0.63084054", "0.63021237", "0.62997144", "0.62874657", "0.62730134", "0.6268025", "0.62563556", "0.6245211", "0.6245106", "0.62182605", "0.6211805", "0.62032896", "0.6202186", "0.6196853", "0.6194815", "0.61806005", "0.61635965", "0.61031806", "0.6096288", "0.6094213", "0.6091041", "0.6090016", "0.60619533", "0.6055635", "0.6054778", "0.60379726", "0.60379726", "0.6034378", "0.603432", "0.6020231", "0.6011539", "0.59970695", "0.5996436", "0.5987281", "0.5986712", "0.5985968", "0.5962001", "0.59351534", "0.5923075", "0.5916312", "0.59118026", "0.59094465", "0.5907632", "0.5902222", "0.5891544", "0.58912677", "0.58890206", "0.58869", "0.5877251", "0.5868307", "0.5863881", "0.5860109", "0.5857428", "0.5846983", "0.58469355", "0.58090216", "0.58080983", "0.5802777", "0.57885015", "0.5784727", "0.57784015", "0.57779074", "0.57742935", "0.57590413", "0.57435364", "0.57344294", "0.5722934", "0.5718097", "0.5712831", "0.57009816", "0.5698456", "0.56977427", "0.56955874", "0.56865406", "0.5682483", "0.56798226", "0.5668688", "0.5668182", "0.5665062", "0.56623083", "0.5658456", "0.56576604", "0.56379765", "0.56368035", "0.5635661", "0.5633" ]
0.7196417
0
Show the application dashboard.
public function index() { $products = Product::all(); return view('frontend.index',compact('products')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
Need to build proper context and set up proper rules
public function buildContext($studentRegistration) { // What programs is this user eligible for? // do they have any training family members? // if (num_familymembers == 1) then allow for 2nd family member programs // if (num_familymembers > 1) then allow for 3rd family member programs // how many active contracts does this user have? // if (num_contracts > 1) then allow sign up for 3 year program // Build context ... $tfmRepo = $this->em->getRepository('TSK\StudentBundle\Entity\TrainingFamilyMembers'); if ($studentRegistration->getTrainingFamilyMember()) { $nextSlot = $tfmRepo->getNextSlotForPrimaryStudent($studentRegistration->getTrainingFamilyMember()->getPrimaryStudent()); $this->logger->debug('tfm=' . $studentRegistration->getTrainingFamilyMember()->getId()); } else { $nextSlot = 1; } $this->logger->debug("nextSlot = $nextSlot"); if ($studentRegistration->getStudent()) { $numContracts = $studentRegistration->getStudent()->getContracts()->count(); } else { $numContracts = 0; } $ctx = new Context(array( 'studentRegistration' => $studentRegistration, 'numContracts' => $numContracts, 'student.nextAvailableTFMSlot' => $nextSlot )); return $ctx; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _generateRules()\n {\n }", "public function buildRules(): void\n {\n }", "protected function processRules() {\n $this->rules = array(\n 'dang-ky' => 'auth/register',\n 'lay-lai-mat-khau' => 'auth/forgotpassword',\n 'tim-kiem-san-pham' => 'product/search',\n 'tin-tuc/gioi-thieu' => 'site/about',\n 'doi-tac' => 'partner/index',\n 'tuyen-dung' => 'recruitment/list',\n 'dai-ly' => 'agency/list',\n 'tin-tuc/<title>-<id:\\d+>' => 'news/list',\n 'tin-tuc' => 'news/list',\n 'tin-tuc/chi-tiet/<title>-<id:\\d+>' => 'news/detail',\n 'lien-he' => 'site/contact',\n 'danh-muc-san-pham/<title>-<id:\\d+>-<sort>' => 'product/catalog',\n 'danh-muc-san-pham/<title>-<id:\\d+>' => 'product/catalog',\n 'nhan-hang/<name>-<id:\\d+>-<mid:\\d+>-<sort>' => 'product/manufacture',\n 'nhan-hang/<name>-<id:\\d+>-<mid:\\d+>' => 'product/manufacture',\n 'san-pham/<title>-<id:\\d+>' => 'product/detail',\n 'gio-hang' => 'shoppingcart/order',\n 'gio-hang/them-<id:\\d+>' => 'shoppingcart/add',\n \n '<controller:\\w+>/<id:\\d+>' => '<controller>/view',\n '<controller:\\w+>/<action:\\w+>/<id:\\d+>' => '<controller>/<action>',\n '<controller:\\w+>/<action:\\w+>' => '<controller>/<action>',\n );\n // Run parent\n parent::processRules();\n }", "protected abstract function rules();", "protected function processRules() {\n\n\t\t$active_lang = implode('|', array_keys( Yii::app()->params['languages'] ));\n\t\t$domain = Yii::app()->params['current_domain'];\n\t\t\n\t\t// if( ($urlrules = Yii::app()->cache->get('customurlrules')) === false )\n\t\t// {\n\t\t\t$_more = array();\n\t\t\t\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias, language FROM {{custompages}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"/<alias:({$rule['alias']})>\" ] = array('site/custompages/index');\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT id, seoname FROM {{members}}\")->query();\n\t\t\t$urlUsers = $dbCommand->readAll();\n\t\t\tforeach($urlUsers as $uu)\n\t\t\t{\n\t\t\t\t$_more[ \"/user/<id:({$uu['id']})>-<alias:({$uu['seoname']})>\" ] = array('site/users/viewprofile');\n\t\t\t}\n\n\t\t\t$this->rules = array(\n\n\t\t\t\t//-----------------------ADMIN--------------\n\t\t\t\t\"/admin\" => 'admin/index/index',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>\" => 'admin/<_c>/index',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>\" => 'admin/<_c>/<_a>',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>//*\" => 'admin/<_c>/<_a>/',\n\t\t\t\t//-----------------------ADMIN--------------\n\n //gii\n \"/gii\" => array('gii'),\n \"/gii/<_c:([a-zA-z0-9-_]+)>\" => array('gii/<_c>/'),\n \"/gii/<_c:([a-zA-z0-9-_]+)>/<_a:([a-zA-z0-9-_]+)>/*\" => array('gii/<_c>/<_a>/'),\n\n\t\t\t\t\"/products/category/<alias:.*?>\" => 'site/products/category/',\n \"/products/active/<type:(lowprice|cent|all)>/\" => 'site/products/active/',\n \"/products/ended/<type:(lowprice|cent|all)>/\" => 'site/products/ended/',\n \"/products/upcoming/<type:(lowprice|cent|all)>/\" => 'site/products/upcoming/',\n \"/products/label/<id:([a-zA-z0-9-_]+)?>\" => 'site/products/label/',\n \"/messagesShop/index/<shop_id:([a-zA-z0-9-_]+)?>\" => 'site/messagesShop/index/',\n \n \"/register/\" => 'site/profile/create/',\n \"/Anmeldung/\" => 'site/profile/create/',\n \n \"/search/detail/<condition:([a-zA-z0-9-_]+)?>\" => 'site/search/detail',\n \"/shop/search/<shop_id:([a-zA-z0-9-_]+)?>/<condition:([a-zA-z0-9-_]+)?>\" => 'site/shop/search/',\n \"/search.html/\" => 'site/search/search',\n \"/orders/customer/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/orders/customer/',\n \"/admin/orders/vi_customer/<id:([a-zA-z0-9-_]+)>\" => 'site/admin/orders/vi_customer/',\n \"/shopRatings/detail/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shopRatings/detail/',\n \"/shopManager/detail/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shopManager/detail/',\n \"/custompages/detail/<alias:.*?>\" => 'site/custompages/detail',\n \"/shopNewsletter/sendNewletter/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shopNewsletter/sendNewletter/',\n \"/shopNewsletter/join/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shopNewsletter/join/',\n \"/blogshop/blog/<shop_id:([a-zA-z0-9-_]+)>/<blog_id:([a-zA-z0-9-_]+)>\" => 'site/blogshop/blog/',\n \"/blogshop/detail/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/blogshop/detail/',\n \"/shop/sort/<shop_id:([a-zA-z0-9-_]+)>/<sort_id:([a-zA-z0-9-_]+)>\" => 'site/shop/sort/',\n \"/shop/contact/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shop/contact/',\n \"/shop/star/<shop_id:([a-zA-z0-9-_]+)>/<star:([a-zA-z0-9-_]+)>\" => 'site/shop/star/',\n \"/shop/findproduct/<shop_id:([a-zA-z0-9-_]+)>/<price:([a-zA-z0-9-_]+)>\" => 'site/shop/findproduct/',\n \"/shop/category/<shop_id:([a-zA-z0-9-_]+)>/<category_id:([a-zA-z0-9-_]+)>\" => 'site/shop/category/',\n \"/productsshop/detail/<shop_id:([a-zA-z0-9-_]+)>/<id:([a-zA-z0-9-_]+)>\" => 'site/productsShop/detail/',\n \"/productsshop/addComment\" => 'site/productsShop/addComment',\n \"/products/detail/<id:([a-zA-z0-9-_]+)>\" => 'site/products/detail/',\n \"/tags/detail/<slug:([a-zA-z0-9-_]+)>\" => 'site/tags/detail/',\n \"/shop/detail/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shop/detail/',\n \n \"/votes/voting/<type:(lowprice|cent|all)>/\" => 'site/votes/voting/',\n\n\t\t\t\t\"/<_a:(register|login|logout|verify)>\" => 'site/users/<_a>',\n\t\t\t\t\"/admin-login\" => 'site/users/admin',\n\t\t\t\t\"/forgot-password\" => 'site/users/lostpassword',\n\t\t\t\t\"/change-password\" => 'site/users/changepass',\n\t\t\t\t\"/contact-us\" => 'site/contactus/index',\n\t\t\t\t\"/messages\" => 'site/usermessages/index',\n\t\t\t\t\"/<_a:(viewmessage|sendmessage)>\" => 'site/usermessages/<_a>',\n\t\t\t\t// \"/invoices\" => 'site/transactions/index',\n\t\t\t\t// \"/buy-a-plan\" => 'site/transactions/buyplan',\n\t\t\t\t// \"/<_a:(earning|cashout)>\" => 'site/transactions/<_a>',\n\t\t\t\t// \"/<id:(\\d+)>-<ualias:(.*?)>/blog/<alias:(.*)>\" => array('site/blog/viewpost'),\n\t\t\t\t// Blogs\n\t\t\t\t\"/blog/category/<alias:(.*)>\" => 'site/blog/viewcategory',\n\t\t\t\t\"/blog/view/<alias:(.*)>\" => 'site/blog/viewpost',\n\n\t\t\t\t\"/\" => 'site/index/index',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>\" => 'site/<_c>/index',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>\" => 'site/<_c>/<_a>',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>//*\" => 'site/<_c>/<_a>/',\n \n \n \n\t\t\t);\n\n\t\t\t$urlrules = array_merge( $_more, $this->rules );\n\t\t\t//Yii::app()->cache->set('customurlrules', $urlrules);\n\t\t// }\n\t\t\n\t\t$this->rules = $urlrules;\n\t\t\n // Run parent\n parent::processRules();\n\n }", "public function initRules() {\n $config = Context::$appConfig;\n if (isset($config->interceptRules['pre'])) {\n $this->preRules = $config->interceptRules['pre'];\n }\n if (isset($config->interceptRules['post'])) {\n $this->postRules = $config->interceptRules['post'];\n }\n }", "protected function processRules() {\n\t\t$active_lang = implode('|', array_keys( Yii::app()->params['languages'] ));\n\t\t$domain = Yii::app()->params['current_domain'];\n\t\t\n\t\t// if( ($urlrules = Yii::app()->cache->get('customurlrules')) === false )\n\t\t// {\n\t\t\t$_more = array();\n\t\t\t\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias, language FROM {{custompages}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"/<alias:({$rule['alias']})>\" ] = array('site/custompages/index');\n\t\t\t}\n\n\t\t\t//set url news category\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{news_categorys}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"news/category/<alias:({$rule['alias']})>\" ] = array('site/news/viewcategory');\n\t\t\t}\n\n\t\t\t//set url news\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{news}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"news/view/<alias:({$rule['alias']})>\" ] = array('site/news/viewpost');\n\t\t\t}\n\n\t\t\t//set url Products category\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{categories}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"articles/category/<alias:({$rule['alias']})>\" ] = array('site/products/viewcategory');\n\t\t\t}\n\n\t\t\t//set url Products\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{products}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"articles/view/<alias:({$rule['alias']})>\" ] = array('site/products/detail');\n\t\t\t}\n\n //set url Videos\n $dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{videos}}\")->query();\n $urlRules = $dbCommand->readAll();\n foreach($urlRules as $rule)\n {\n $_more[ \"hearing-tv/detail/<alias:({$rule['alias']})>\" ] = array('site/auditionTV/detail');\n }\n\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT id, seoname FROM {{members}}\")->query();\n\t\t\t$urlUsers = $dbCommand->readAll();\n\t\t\tforeach($urlUsers as $uu)\n\t\t\t{\n\t\t\t\t$_more[ \"/user/<id:({$uu['id']})>-<alias:({$uu['seoname']})>\" ] = array('site/users/viewprofile');\n\t\t\t}\n \n \t//$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{products}}\")->query();\n\t\t\t//$urlRules = $dbCommand->readAll();\n\t\t\t$urlRules = array();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"/articles/detail/<alias:({$rule['alias']})>\" ] = array('site/products/detail');\n\t\t\t}\n\n\t\t\t$this->rules = array(\n\n\t\t\t\t//-----------------------ADMIN--------------\n\t\t\t\t\"/admin\" => 'admin/index/index',\n \"/admin/articles\" => 'admin/products/index',\n \"/admin/articles/create\" => 'admin/products/create',\n \"/admin/articles/view\" => 'admin/products/view',\n \"/admin/articles/update\" => 'admin/products/update',\n \"/admin/articles/delete\" => 'admin/products/delete',\n \"/admin/articleComments\" => 'admin/ProductComments/index',\n \"/admin/articleComments/create\" => 'admin/ProductComments/create',\n \"/admin/articleComments/view\" => 'admin/ProductComments/view',\n \"/admin/articleComments/update\" => 'admin/ProductComments/update',\n \"/admin/articleComments/delete\" => 'admin/ProductComments/delete',\n\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>\" => 'admin/<_c>/index',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>\" => 'admin/<_c>/<_a>',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>//*\" => 'admin/<_c>/<_a>/',\n\t\t\t\t//-----------------------ADMIN--------------\n\n //gii\n \"/gii\" => array('gii'),\n \"/gii/<_c:([a-zA-z0-9-_]+)>\" => array('gii/<_c>/'),\n \"/gii/<_c:([a-zA-z0-9-_]+)>/<_a:([a-zA-z0-9-_]+)>/*\" => array('gii/<_c>/<_a>/'),\n\n\t\t\t\t\"/products/category/<alias:.*?>\" => 'site/products/category/',\n \"/products/active/<type:(lowprice|cent|all)>/\" => 'site/products/active/',\n \"/products/ended/<type:(lowprice|cent|all)>/\" => 'site/products/ended/',\n \"/products/upcoming/<type:(lowprice|cent|all)>/\" => 'site/products/upcoming/',\n \"/products/label/<id:([a-zA-z0-9-_]+)?>\" => 'site/products/label/',\n \"/articles\" => 'site/products/index/',\n \n \"/register/\" => 'site/profile/create/',\n \"/Anmeldung/\" => 'site/profile/create/',\n \"/guestbook\" => 'site/index/guestbook/',\n \"/grand-public\" => 'site/auditionTV/grandPublic',\n \"/videos-pro\" => 'site/auditionTV/videosPro',\n \"/hearing-TV\" => 'site/auditionTV/index',\n \"/classified-ads\" => 'site/Announcements/index',\n \"/formulaire_annonce\" => 'site/Announcements/register',\n \"/classified-ads/<id:([a-zA-z0-9-_]+)?>\" => 'site/Announcements/detail/',\n \"/hearing-care-centers\" => 'site/directoryOrders/directory',\n \"/hearing-aid-suppliers\" => 'site/directoryOrders/hearingAidSuppliers',\n \"/ENT-doctors\" => 'site/directoryOrders/doctors',\n \"/instrumentation-ORL\" => 'site/directoryOrders/InstrumentationORL',\n \"/services-ORL\" => 'site/directoryOrders/ServicesORL',\n \"/speech-therapists\" => 'site/directoryOrders/speechTherapists',\n \"/associative-sector\" => 'site/directoryOrders/associativeSector',\n \"/organizations\" => 'site/directoryOrders/organizations',\n \"/organizations/type/<alias:.*?>\" => 'site/directoryOrders/typeAgency/',\n \"/organizations/departement/<alias:.*?>\" => 'site/directoryOrders/department/',\n \"/organizations/ville/<alias:.*?>\" => 'site/directoryOrders/department/',\n \"/services/departement/<alias:.*?>\" => 'site/directoryOrders/services/',\n \"/services/ville/<alias:.*?>\" => 'site/directoryOrders/services/',\n \"/hospitals/<alias:.*?>/<id:.*?>\" => 'site/directoryOrders/hospitals/',\n \"/orthophonistes/departement/<alias:.*?>\" => 'site/directoryOrders/orthophonistes/',\n \"/orthophonistes/ville/<alias:.*?>\" => 'site/directoryOrders/orthophonistes/',\n \"/speech/<alias:.*?>/<id:.*?>\" => 'site/directoryOrders/speech/',\n \"/event/<id:([a-zA-z0-9-_]+)?>\" => 'site/Events/detail',\n \"/laureates-CNA\" => 'site/students/laureatesCNA',\n \"/espace-pro\" => 'site/regulation/espacePro',\n \"/appear-directory\" => 'site/directoryOrders/appearDirectory',\n \"/doctors/departement/<alias:.*?>\" => 'site/directoryOrders/doctorsByDepartment/',\n \"/doctors/ville/<alias:.*?>\" => 'site/directoryOrders/doctorsByDepartment/',\n \"/doctor/<alias:.*?>/<id:.*?>\" => 'site/directoryOrders/detailDoctor/',\n\n \"/search\" => 'site/index/search',\n \"/search-advanced\" => 'site/index/searchAdvanced',\n \"/searchalpha\" => 'site/index/searchAlpha',\n \"/supports\" => 'site/index/supports',\n \"/orders/customer/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/orders/customer/',\n \"/admin/orders/vi_customer/<id:([a-zA-z0-9-_]+)>\" => 'site/admin/orders/vi_customer/',\n \"/custompages/detail/<alias:.*?>\" => 'site/custompages/detail',\n \"/products/detail/<id:([a-zA-z0-9-_]+)>\" => 'site/products/detail/',\n \"/support/detail/<id:([a-zA-z0-9-_]+)>\" => 'site/support/detail/',\n \"/tags/detail/<slug:([a-zA-z0-9-_]+)>\" => 'site/tags/detail/',\n \n\n\t\t\t\t\"/<_a:(register|login|logout|verify)>\" => 'site/users/<_a>',\n\t\t\t\t\"/admin-login\" => 'site/users/admin',\n\t\t\t\t\"/affiliate-login\" => 'site/users/affiliate',\n\t\t\t\t\"/forgot-password\" => 'site/users/lostpassword',\n\t\t\t\t\"/change-password\" => 'site/users/changepass',\n\t\t\t\t\"/contact-us\" => 'site/contactus/index',\n\t\t\t\t\"/news-letter\" => 'site/newsletter/index',\n\t\t\t\t\"/messages\" => 'site/usermessages/index',\n\t\t\t\t\"/users-login\" => 'site/login/index',\n\t\t\t\t\"/directory-orders\" => 'site/directoryOrders/create',\n\t\t\t\t\"/<_a:(viewmessage|sendmessage)>\" => 'site/usermessages/<_a>',\n\t\t\t\t// \"/invoices\" => 'site/transactions/index',\n\t\t\t\t// \"/buy-a-plan\" => 'site/transactions/buyplan',\n\t\t\t\t// \"/<_a:(earning|cashout)>\" => 'site/transactions/<_a>',\n\t\t\t\t// \"/<id:(\\d+)>-<ualias:(.*?)>/blog/<alias:(.*)>\" => array('site/blog/viewpost'),\n\t\t\t\t// Blogs\n\t\t\t\t\"/blog/category/<alias:(.*)>\" => 'site/blog/viewcategory',\n\t\t\t\t\"/blog/view/<alias:(.*)>\" => 'site/blog/viewpost',\n\n\t\t\t\t\"/\" => 'site/index/index',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>\" => 'site/<_c>/index',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>\" => 'site/<_c>/<_a>',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>//*\" => 'site/<_c>/<_a>/',\n \n \n \n\t\t\t);\n\n\t\t\t$urlrules = array_merge( $_more, $this->rules );\n\t\t\t//Yii::app()->cache->set('customurlrules', $urlrules);\n\t\t// }\n\t\t\n\t\t$this->rules = $urlrules;\n\t\t\n // Run parent\n parent::processRules();\n\n }", "abstract protected function getRules();", "private function setupRules()\n {\n // Validator::extend('rule', 'App\\Support\\Rules\\Rule@validate');\n // Validator::replacer('rule', 'App\\Support\\Rules\\Rule@message');\n }", "abstract public function rules();", "abstract public function rules();", "abstract public function rules();", "abstract public function rules();", "public function setupFilterRules()\n { }", "protected function setupDefaultsRules()\n { }", "abstract function rules();", "public function setupValidatorRules()\n { }", "abstract public function parseRules();", "abstract protected function setUpRoutableContextModel();", "public function rules();", "public function rules();", "public function rules();", "public function beforeRules(): void\n {\n }", "public function initRules()\n {\n $this->rules['email'] = V::email();\n $this->rules['password'] = V::alnum()->noWhitespace()->length(4, 20)->setName('Password');\n $this->rules['first_name'] = V::alpha()->noWhitespace()->length(4, 20)->setName('First name');\n $this->rules['last_name'] = V::alpha()->noWhitespace()->length(4, 20)->setName('Last name');\n }", "protected function compile()\n\t{\n\t\t// Initialize an array for the applicable rules\n\t\t$applicable_rules = array();\n\t\t\n\t\t// Get the scope for this instance of ACL\n\t\t$scope = $this->scope();\n\n\t\t// Resolve rules that currently have wildcards\n\t\tACL::resolve_rules($scope);\n\t\t\n\t\t// Re-index the scope array with numbers for looping\n\t\t$scope = array_values($scope);\n\t\t\n\t\t// Get all the rules that could apply to this request\n\t\tfor ($i = 2; $i >= 0; $i--)\n\t\t{\n\t\t\t// Get the key for the scope\n\t\t\t$key = ACL::key($scope);\n\t\t\t\n\t\t\t// Look in the rules array for a rule matching the key\n\t\t\tif ($rule = Arr::get(self::$_rules, $key, FALSE))\n\t\t\t{\n\t\t\t\t$applicable_rules[$key] = $rule;\n\t\t\t}\n\n\t\t\t// Remove part of the scope so the next iteration can cascade to another rule\n\t\t\t$scope[$i] = '';\n\t\t}\n\t\t\n\t\t// Get default rule\n\t\t$default_key = ACL::KEY_SEPARATOR.ACL::KEY_SEPARATOR;\n\t\t$applicable_rules[$default_key] = Arr::get(self::$_rules, $default_key);\n\n\t\t// Reverse the rules. Compile from the bottom up\n\t\t$applicable_rules = array_reverse($applicable_rules);\n\n\t\t// Compile the rule\n\t\tforeach ($applicable_rules as $rule)\n\t\t{\n\t\t\t$this->rule = Arr::overwrite($this->rule, $rule->as_array());\n\t\t}\n\t}", "abstract protected function initializeContext();", "public function allowedContexts() {}", "abstract protected function rules($actor, $data, $obj = null);", "abstract protected function prepareContext(): void;", "protected function _buildRules() {\n\t\tforeach ($this->_ruleNames as $rule) {\n\t\t\t$className = $rule . 'DocBlockRule';\n\t\t\tif (!class_exists($className, false)) {\n\t\t\t\ttrigger_error('Missing Rule Class ' . $className, E_USER_WARNING);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$ruleObj = new $className();\n\t\t\tif ($ruleObj instanceof DocBlockRule) {\n\t\t\t\t$this->rules[$rule] = $ruleObj;\n\t\t\t}\n\t\t}\n\t}", "public function getRules() {}", "public function rules()\n {\n $rules = [];\n $cat = null;\n \n // CREATE\n if (in_array($this->method(), ['POST', 'CREATE'])) {\n $rules = [\n 'parent' => 'required|not_in:0',\n 'category' => 'required|not_in:0',\n 'post_type' => 'required|not_in:0',\n 'company_name' => 'required|mb_between:2,200|whitelist_word_title',\n 'company_description' => 'required|mb_between:5,1000|whitelist_word',\n 'title' => 'required|mb_between:2,200|whitelist_word_title',\n 'description' => 'required|mb_between:5,2000|whitelist_word',\n 'salary_type' => 'required|not_in:0',\n 'contact_name' => 'required|mb_between:2,200',\n 'email' => 'max:100|whitelist_email|whitelist_domain',\n 'phone' => 'max:20',\n 'city' => 'required|not_in:0',\n ];\n \n // Check 'logo' is required\n if ($this->file('logo')) {\n $rules['logo'] = 'required|image|mimes:' . getUploadFileTypes('image') . '|max:' . (int)config('settings.upload_max_file_size', 1000);\n }\n \n // Recaptcha\n if (config('settings.activation_recaptcha')) {\n $rules['g-recaptcha-response'] = 'required';\n }\n }\n \n // UPDATE\n if (in_array($this->method(), ['PUT', 'PATCH', 'UPDATE'])) {\n $rules = [\n 'category' => 'required|not_in:0',\n 'post_type' => 'required|not_in:0',\n 'company_name' => 'required|mb_between:2,200|whitelist_word_title',\n 'company_description' => 'required|mb_between:50,1000|whitelist_word',\n 'title' => 'required|mb_between:10,200|whitelist_word_title',\n 'description' => 'required|mb_between:50,2000|whitelist_word',\n 'salary_type' => 'required|not_in:0',\n 'contact_name' => 'required|mb_between:2,200',\n 'email' => 'max:100|whitelist_email|whitelist_domain',\n 'phone' => 'max:20',\n 'city' => 'required|not_in:0',\n ];\n \n // Check 'logo' is required\n if ($this->file('logo')) {\n $rules['logo'] = 'required|image|mimes:' . getUploadFileTypes('image') . '|max:' . (int)config('settings.upload_max_file_size', 1000);\n }\n }\n \n // COMMON\n \n // Location\n if (in_array(config('country.admin_type'), ['1', '2']) && config('country.admin_field_active') == 1) {\n $rules['admin_code'] = 'required|not_in:0';\n }\n \n // Email\n if ($this->filled('email')) {\n $rules['email'] = 'email|' . $rules['email'];\n }\n if (isEnabledField('email')) {\n if (isEnabledField('phone') && isEnabledField('email')) {\n if (Auth::check()) {\n $rules['email'] = 'required_without:phone|' . $rules['email'];\n } else {\n // Email address is required for Guests\n $rules['email'] = 'required|' . $rules['email'];\n }\n } else {\n $rules['email'] = 'required|' . $rules['email'];\n }\n }\n \n // Phone\n if ($this->filled('phone')) {\n $rules['phone'] = 'phone:' . $this->input('country', config('country.code')) . ',mobile|' . $rules['phone'];\n }\n if (isEnabledField('phone')) {\n if (isEnabledField('phone') && isEnabledField('email')) {\n $rules['phone'] = 'required_without:email|' . $rules['phone'];\n } else {\n $rules['phone'] = 'required|' . $rules['phone'];\n }\n }\n \n return $rules;\n }", "public function setup()\n\t{\n\t\t$this->addRule('old_url', function($data)\n\t\t{\n\t\t\t$entries = Link::blank()\n\t\t\t\t->whereEquals('old_url', substr($data['old_url'], 0, 255));\n\n\t\t\tif (isset($data['id']))\n\t\t\t{\n\t\t\t\t$entries->where('id', '!=', $data['id']);\n\t\t\t}\n\n\t\t\t$row = $entries->row();\n\n\t\t\treturn !$row->get('id') ? false : Lang::txt('COM_REDIRECT_ERROR_DUPLICATE_OLD_URL');\n\t\t});\n\t}", "public function __construct()\n {\n $this->pluralRules = Pluralize::all();\n $this->singularRules = Singularize::all();\n $this->aplicator = new Rules();\n \n foreach (Irregularize::all() as $rule) {\n $this->irregularSingles[$rule[0]] = $rule[1];\n $this->irregularPlurals[$rule[1]] = $rule[0];\n }\n \n foreach (Uncountable::all() as $rule) {\n $this->addUncountableRule($rule);\n }\n }", "public function process($context, &$target)\n {\n // Loop over each set\n foreach ($this->ruleSets as $ruleSet)\n {\n // Build up a list of valid sets\n if ($ruleSet->isValid($context))\n {\n $ruleSet->applyResults($target);\n }\n }\n }", "public function contextStrategy();", "protected function prepareValidations() {}", "public function matchingApplicationContextConditionsDataProvider() {}", "public function add_rewrite_rules() {\n\t\t$priority = 'top';\n\t\t$root_rule = '/([^/]+)/?$';\n\n\t\t$page_slug = wct_paged_slug();\n\t\t$paged_rule = '/([^/]+)/' . $page_slug . '/?([0-9]{1,})/?$';\n\t\t$embed_rule = '/([^/]+)/embed/?$';\n\n\t\t// User Comments\n\t\t$user_comments_rule = '/([^/]+)/' . $this->user_comments_slug . '/?$';\n\t\t$user_comments_paged_rule = '/([^/]+)/' . $this->user_comments_slug . '/' . $this->cpage_slug . '/?([0-9]{1,})/?$';\n\n\t\t// User Rates\n\t\t$user_rates_rule = '/([^/]+)/' . $this->user_rates_slug . '/?$';\n\t\t$user_rates_paged_rule = '/([^/]+)/' . $this->user_rates_slug . '/' . $page_slug . '/?([0-9]{1,})/?$';\n\n\t\t// User to rate\n\t\t$user_to_rate_rule = '/([^/]+)/' . $this->user_to_rate_slug . '/?$';\n\t\t$user_to_rate_paged_rule = '/([^/]+)/' . $this->user_to_rate_slug . '/' . $page_slug . '/?([0-9]{1,})/?$';\n\n\t\t// User talks\n\t\t$user_talks_rule = '/([^/]+)/' . $this->user_talks_slug . '/?$';\n\t\t$user_talks_paged_rule = '/([^/]+)/' . $this->user_talks_slug . '/' . $page_slug . '/?([0-9]{1,})/?$';\n\n\t\t// User rules\n\t\tadd_rewrite_rule( $this->user_slug . $user_comments_paged_rule, 'index.php?' . $this->user_rid . '=$matches[1]&' . $this->user_comments_rid . '=1&' . $this->cpage_rid . '=$matches[2]', $priority );\n\t\tadd_rewrite_rule( $this->user_slug . $user_comments_rule, 'index.php?' . $this->user_rid . '=$matches[1]&' . $this->user_comments_rid . '=1', $priority );\n\t\tadd_rewrite_rule( $this->user_slug . $user_rates_paged_rule, 'index.php?' . $this->user_rid . '=$matches[1]&' . $this->user_rates_rid . '=1&' . $this->page_rid . '=$matches[2]', $priority );\n\t\tadd_rewrite_rule( $this->user_slug . $user_rates_rule, 'index.php?' . $this->user_rid . '=$matches[1]&' . $this->user_rates_rid . '=1', $priority );\n\t\tadd_rewrite_rule( $this->user_slug . $user_to_rate_paged_rule, 'index.php?' . $this->user_rid . '=$matches[1]&' . $this->user_to_rate_rid . '=1&' . $this->page_rid . '=$matches[2]', $priority );\n\t\tadd_rewrite_rule( $this->user_slug . $user_to_rate_rule, 'index.php?' . $this->user_rid . '=$matches[1]&' . $this->user_to_rate_rid . '=1', $priority );\n\t\tadd_rewrite_rule( $this->user_slug . $user_talks_paged_rule, 'index.php?' . $this->user_rid . '=$matches[1]&' . $this->user_talks_rid . '=1&' . $this->page_rid . '=$matches[2]', $priority );\n\t\tadd_rewrite_rule( $this->user_slug . $user_talks_rule, 'index.php?' . $this->user_rid . '=$matches[1]&' . $this->user_talks_rid . '=1', $priority );\n\t\tadd_rewrite_rule( $this->user_slug . $embed_rule, 'index.php?' . $this->user_rid . '=$matches[1]&embed=true', $priority );\n\t\tadd_rewrite_rule( $this->user_slug . $root_rule, 'index.php?' . $this->user_rid . '=$matches[1]', $priority );\n\n\t\t// Action rules (only add a new talk right now)\n\t\tadd_rewrite_rule( $this->action_slug . $root_rule, 'index.php?' . $this->action_rid . '=$matches[1]', $priority );\n\t}", "public function setRules() {\n }", "public function mod_rewrite_rules()\n {\n }", "public function getRules()\n {\n }", "public function getRules()\n {\n }", "public function getRules()\n {\n }", "protected function buildRules()\n {\n $this->rules = [\n 'title' => 'required|min:5|max:255',\n 'category_id' => 'required',\n 'condition_id' => 'required',\n 'description' => 'required|min:5|max:255',\n 'request' => 'required|min:5|max:255',\n ];\n\n $this->messages = [\n 'required' => 'Este campo es requerido.',\n 'title.max' => 'No debe ser mayor a :max caracteres.',\n 'title.min' => 'No debe ser menor a :min caracteres.',\n 'request.min' => 'No debe ser menor a :min caracteres.',\n ];\n\n // El request trae imagenes nuevas o va a remover imagenes\n $image_files = $this->file('image');\n $remove_images = $this->input('remove_images', []);\n\n $validate_images = true;\n $article_id = $this->route()->getParameter('article_id');\n\n if ($article_id) {\n $article = Article::findOrFail($article_id);\n $validate_images = $article->images->count() < count($remove_images);\n }\n\n if ($validate_images) {\n foreach (range(0, count($image_files) - 1) as $index) {\n $this->rules['image.' . $index] = 'required|image';\n $this->messages['image.' . $index . '.image'] = 'Una de las imagenes no es válida.';\n }\n }\n }", "public static function allRules()\n {\n }", "public function rules()\n {\n if( $this->is('category/store') ) {\n return $this->createRules();\n return $this->messages();\n } \n elseif ( $this->is('category/update/{id}') ) {\n return $this->updateRules();\n return $this->messages();\n }\n }", "public function run() {\n if(!empty($this->taxonomies)):\n self::createTaxonomies(); // Register Taxonomy First, Because we want Rewrite Rules for Taxonomy to come Before Post Type.\n endif; \n if(!empty($this->post_type)):\n self::createPostType();\n endif;\n }", "protected function buildControllerContext() {}", "function addRuleInstances(&$digester) {\r\n\r\n\t\t$applicationPattern\t\t= 'phpmvc-config';\r\n\r\n\t\t// DataSourceConfig\r\n\t\t$dataSourcesPattern\t\t= 'phpmvc-config/data-sources';\r\n\t\t$dataSourcePattern\t\t= 'phpmvc-config/data-sources/data-source';\r\n\r\n\t\t// ActionConfig\r\n\t\t$actionMappingsPattern\t= 'phpmvc-config/action-mappings';\r\n\t\t$actionMappingPattern\t= 'phpmvc-config/action-mappings/action';\r\n\t\t$actionForwardPattern\t= 'phpmvc-config/action-mappings/action/forward';\r\n\r\n\t\t// FormBean\r\n\t\t$formBeansPattern\t\t\t= 'phpmvc-config/form-beans';\r\n\t\t$formBeanPattern\t\t\t= 'phpmvc-config/form-beans/form-bean';\r\n\r\n\r\n\t\t$globForwardsPattern\t\t= '*/global-forwards';\r\n\t\t$setPropertyPattern\t\t= 'phpmvc-config/my-object/property';\r\n\r\n\r\n\t\t// DataSourceConfig <data-source ...>\r\n\t\t// Create a new configuration object ('DataSourceConfig')\r\n\t\t$digester->addObjectCreate(\r\n\t\t\t\t\t\t\t$dataSourcePattern,\t// <data-source ...>\r\n\t\t\t\t\t\t\t'DataSourceConfig',\t// config class to build\r\n\t\t\t\t\t\t\t'className');\t\t\t// [optional] specify an alternate to \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the default 'DataSourceConfig' config \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// file, if this attribute is present in\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the phpmvc-config xml descriptor file\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Eg: \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// <data-source ... className=\"MyDataSourceConfig\">\r\n\t\t// Set the configuration objects properties\r\n\t\t// phpmvc-config xml descriptor file attributes must match the target object methods\r\n\t \t// Eg: \"driverClassName\" maps to \"BasicDataSource->setDriverClassName\"\r\n\t\t$digester->addSetProperties($dataSourcePattern);\r\n\t\t// Add a callback reference to bind the configuration object to its parent\r\n\t\t// (ApplicationConfig) object.\r\n\t\t// Eg: Rule(pattern-to-match, ApplicationConfig->addDataSourceConfig(dataSourceConfig))\r\n\t\t$digester->addSetNext($dataSourcePattern, 'addDataSourceConfig');\t\t\r\n\r\n\r\n\t\t// ActionConfig\r\n\t\t$digester->addObjectCreate($actionMappingPattern, 'ActionConfig');\r\n\t\t$digester->addSetProperties($actionMappingPattern);\r\n\t\t$digester->addSetNext($actionMappingPattern, 'addActionConfig');\t\r\n\r\n\t\t$digester->addObjectCreate($actionForwardPattern, 'ForwardConfig');\r\n\t\t$digester->addSetProperties($actionForwardPattern);\r\n\t\t$digester->addSetNext($actionForwardPattern, 'addForwardConfig');\t\r\n\r\n\r\n\t\t// FormBeanConfig\r\n\t\t$digester->addObjectCreate($formBeanPattern, 'FormBeanConfig');\r\n\t\t$digester->addSetProperties($formBeanPattern);\r\n\t\t$digester->addSetNext($formBeanPattern, 'addFormBeanConfig');\t\r\n\r\n }", "private function setRule()\n\t{\n\t\t$this->rule = ( $this->timber->security->isAuth() && $this->timber->security->isClient() ) ? 'client' : $this->rule;\n\t\t$this->rule = ( $this->timber->security->isAuth() && $this->timber->security->isStaff() ) ? 'staff' : $this->rule;\n\t\t$this->rule = ( $this->timber->security->isAuth() && $this->timber->security->isAdmin() ) ? 'admin' : $this->rule;\n\t}", "public function testGetRules()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function rules($data);", "public function rules()\n {\n }", "private function _loadRules()\n\t{\n\t\t//load rules\n\t\trequire_once( PROJECT_ROOT . '/data/configs/groups/global.php' );\n\n\t\t//TODO: make group selector\n\t\tif ( is_array( $this->_auth->getGroups( ) ) )\n\t\t{\n\t\t\t//load active group\n\t\t\t$activeGroup = $this->_auth->getActiveGroup();\n\n\t\t\tif ( !$activeGroup\n\t\t\t || !file_exists( PROJECT_ROOT . '/data/configs/groups/' . $activeGroup . '.php' )\n\t\t\t)\n\t\t\t{\n\t\t\t\tforeach ( $this->_auth->getGroups() as $groupId )\n\t\t\t\t{\n\t\t\t\t\t$ruleFile = PROJECT_ROOT . '/data/configs/groups/' . $groupId . '.php';\n\t\t\t\t\tif ( file_exists( $ruleFile ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$activeGroup = $groupId;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $activeGroup )\n\t\t\t{\n\t\t\t\trequire_once( PROJECT_ROOT . '/data/configs/groups/' . $activeGroup . '.php' );\n\t\t\t\t$this->_auth->setActiveGroup( $activeGroup );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\t\treturn;\n\t}", "public function __construct() {\n //parent::__construct();\n\n $model = new AclModel();\n //$sections = new Sections();\n $privileges = new PrivilegesModel();\n $roles = new Roles();\n\n $this->recursiveRolesFill($roles->getTree());\n\n foreach($privileges->getResourcesArray() as $name)\n {\n $this->addResource($name);\n }\n\n foreach($model->getRules() as $rule)\n {\n $this->allow($rule->role, $rule->resource, $rule->privilege);\n }\n }", "protected function init()\n {\n $this\n ->add(new OwnerRule('*', Order::class))\n ->add(new OwnerRule('*', Card::class))\n ->add(new OwnerRule('*', Setting::class))\n ->add(new OwnerRule('*', MyProduct::class))\n ->add(new OwnerRule('*', MyProductTag::class))\n ->add(new OwnerRule('*', MyProductCollection::class))\n ;\n }", "function ind_post_rewrite_rules($rules) {\n\tglobal $wp_rewrite;\n \n\t// add rewrite tokens\n\t$keytag = '%chapter%';\n\t$wp_rewrite->add_rewrite_tag($keytag, '([0-9]+)', 'chapter=');\n\n\t// rules for 'posts'\n\t$post_structure = $wp_rewrite->permalink_structure . \"/chapter/$keytag\";\n\t$post_structure = str_replace('//', '/', $post_structure);\n\t$post_rewrite = $wp_rewrite->generate_rewrite_rules($post_structure, EP_PERMALINK);\n\n\t$rules = array_merge($post_rewrite,$rules);\n\t \n\treturn $rules;\n}", "protected function defineRules()\n {\n return [];\n }", "protected function _construct()\n {\n $this->_init('magento_targetrule', 'rule_id');\n }", "protected function initializeContext(): void\n {\n $this->context->setAspect('date', new DateTimeAspect(new \\DateTimeImmutable('@' . $GLOBALS['EXEC_TIME'])));\n $this->context->setAspect('visibility', new VisibilityAspect(true, true));\n $this->context->setAspect('workspace', new WorkspaceAspect(0));\n $this->context->setAspect('backend.user', new UserAspect(null));\n }", "public function validateRules();", "public function page_rewrite_rules()\n {\n }", "protected function setupValidation()\n {\n }", "protected function preValidate() {}", "public function __construct()\n {\n parent::__construct($this->rules);\n }", "public function __construct()\n {\n $this->rulesets = [\n // Exact values\n function ($value) {\n return is_string($value) && isset($this->exactReplacements[$value])\n ? [$this, 'replaceExactValue']\n : null;\n },\n\n // Router (MVC applications)\n // We do not want to rewrite these.\n function ($value, array $keys) {\n $key = array_pop($keys);\n // Only worried about a top-level \"router\" key.\n return $key === 'router' && $keys === [] && is_array($value)\n ? [$this, 'noopReplacement']\n : null;\n },\n\n // service- and pluginmanager handling\n function ($value) {\n return is_array($value) && array_intersect_key(self::SERVICE_MANAGER_KEYS_OF_INTEREST, $value) !== []\n ? [$this, 'replaceDependencyConfiguration']\n : null;\n },\n\n // Array values\n function ($value, array $keys) {\n return $keys !== [] && is_array($value)\n ? [$this, 'processConfig']\n : null;\n },\n ];\n }", "function init(&$context){}", "protected function runLogic()\n {\n Logic::run($this->request); /* The logic to attempt to parse the request */\n }", "public function __construct(){\n\t\t// First we are calling the parent's constructor (pHandler)\n\t\tcall_user_func_array('parent::__construct', func_get_args());\n\t\t// Override the datamodel\n\n\t\tif($this->_section == 'inflections')\n\t\t\t$table = 'morphology';\n\n\t\t$this->dataModel = new pRuleDataModel($this->_activeSection['table'], (isset(pRegister::arg()['id']) ? pRegister::arg()['id'] : null));\n\n\t}", "public function run() {\n \n foreach( $this->validation_rules as $var=>$opt) {\n \n /*\n $default_opt = [\n 'min' => false,\n 'max' => false,\n 'required' => false,\n ];\n $opt = array_merge($default_opt,$opt);\n */\n \n //if compulsary field is not set then no point validating further\n if(isset($opt['set']) && !$this->is_set($var)) {\n continue;\n } \n \n /* Trim whitespace from beginning and end of variable */\n if( array_key_exists('trim', $opt) ) {\n $this->source[$var] = trim( $this->source[$var] );\n }\n \n $is_required = false;\n \n //if required field is empty then no point validating further\n if( isset($opt['required']) && !$this->not_empty($var) ) {\n continue;\n }\n \n if( isset($opt['required']) ) {\n unset($opt['required']);\n $is_required = true;\n }\n \n if( isset($opt['set']) )\n unset($opt['set']);\n \n if( isset($opt['trim']) )\n unset($opt['trim']);\n \n foreach( $opt as $rule_type=>$rule_val ) {\n $raw_field_value = isset($this->source[$var]) ? $this->source[$var] : false;\n \n /*\n if(is_string($raw_field_value) && strlen($raw_field_value) == 0 && !$is_required)\n continue;\n */\n $result = true;\n if( method_exists($this, 'validate_'.$rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$var], $rule_val) : [$var, $rule_val];\n //$result = call_user_func_array([$this, 'validate_'.$rule_type], [$var, $rule_val]);\n $result = call_user_func_array([$this, 'validate_'.$rule_type], $t_params);\n }\n elseif( method_exists($this->caller_obj, $rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$this, $raw_field_value], $rule_val) : [$this, $raw_field_value, $rule_val];\n $result = call_user_func_array([$this->caller_obj, $rule_type], $t_params);\n }\n elseif( function_exists($rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$this, $raw_field_value], $rule_val) : [$this, $raw_field_value, $rule_val];\n $result = call_user_func_array($rule_type, $t_params);\n }\n \n if($result === false)\n break;\n }\n }\n }", "public function processTransformationRules()\n {\n $rulesText = '';\n\n #-----------------------------------------------------------------------------\n # If auto-generated rules were specified, generate the rules,\n # otherwise, get the from the configuration\n #-----------------------------------------------------------------------------\n if ($this->configuration->getTransformRulesSource() === Configuration::TRANSFORM_RULES_DEFAULT) {\n $rulesText = $this->autoGenerateRules();\n } else {\n $rulesText = $this->configuration->getTransformationRules();\n }\n \n $tablePrefix = $this->configuration->getTablePrefix();\n $schemaGenerator = new SchemaGenerator($this->dataProject, $this->configuration, $this->logger);\n\n list($schema, $parseResult) = $schemaGenerator->generateSchema($rulesText);\n\n ###print \"\\n\".($schema->toString()).\"\\n\";\n\n $this->schema = $schema;\n\n return $parseResult;\n }", "function addValidationRules(){\n\t\t$this->registerRule('validDate','function','validDate');\n\t\t$this->registerRule('validPeriod','function','validPeriod');\n\t\t$this->registerRule('existe','function','existe');\n\t\t$this->registerRule('number_range','function','number_range');\n\t\t$this->registerRule('validInterval','function','validInterval');\n\t\t$this->registerRule('couple_not_null','function','couple_not_null');\n\t\t$this->registerRule('validParam','function','validParam');\n\t\t$this->registerRule('validUnit_existe','function','validUnit_existe');\n\t\t$this->registerRule('validUnit_required','function','validUnit_required');\n\t\t$this->addRule('dats_title','Data description: Metadata informative title is required','required');\n\t\t$this->addRule('dats_title','Data description: Dataset name exceeds the maximum length allowed (100 characters)','maxlength',100);\t\n\t\t$this->addRule('dats_date_begin','Temporal coverage: Date begin is not a date','validDate');\n\t\t$this->addRule('dats_date_end','Temporal coverage: Date end is not a date','validDate');\n\t\t$this->addRule(array('dats_date_begin','dats_date_end'),'Temporal coverage: Date end must be after date begin','validPeriod');\n\t\tif ($this->dataset->dats_id == 0){\n\t\t\t$this->addRule('dats_title','Data description: A dataset with the same title exists in the database','existe',array('dataset','dats_title'));\n\t\t}\n\t\t\n\t\tif (isset($this->dataset->data_policy) && !empty($this->dataset->data_policy) && $this->dataset->data_policy->data_policy_id > 0){\n\t\t\t$this->getElement('new_data_policy')->setAttribute('onfocus','blur()');\n\t\t}\n\t\t$this->addRule('new_data_policy','Data use information: Data policy exceeds the maximum length allowed (100 characters)','maxlength',100);\t\n\t\t$attrs = array();\n\t\tif (isset($this->dataset->database) && !empty($this->dataset->database) && $this->dataset->database->database_id > 0){\n\t\t\t//$this->getElement('new_database')->setAttribute('onfocus','blur()');\n\t\t\t//$this->getElement('new_db_url')->setAttribute('onfocus','blur()');\n\t\t\t$this->disableElement('new_database');\n\t\t\t$this->disableElement('new_db_url');\n\t\t}\n\t\t/*else {\n\t\t\t//$this->addRule('new_database','A database with the same title already exists','existe',array('database','database_name'));\n\t\t}*/\n\t\t$this->addRule('new_database','Data use information: Database name exceeds the maximum length allowed (250 characters)','maxlength',250);\n\t\t$this->addRule('new_db_url','Data use information: Database url exceeds the maximum length allowed (250 characters)','maxlength',250);\t\n\t\t//Formats\n\t\tfor ($i = 0; $i < $this->dataset->nbFormats; $i++){\n\t\t\t$this->addRule('data_format_'.$i,'Data use information: Format name '.($i+1).' exceeds the maximum length allowed (100 characters)','maxlength',100);\n\t\t\tif (isset($this->dataset->data_formats[$i]) && !empty($this->dataset->data_formats[$i]) && $this->dataset->data_formats[$i]->data_format_id > 0){\n\t\t\t\t//$this->getElement('new_data_format_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t$this->disableElement('new_data_format_'.$i);\n\t\t\t}\n\t\t\t/*else{\n\t\t\t\t//$this->addRule('new_data_format_'.$i,'Data format '.($i+1).': This format already exists in the database','existe',array('data_format','data_format_name'));\n\t\t\t}*/\n\t\t}\n\t\t//Contacts\n\t\t$this->addRule('pi_0','Contact 1 is required','couple_not_null',array($this,'pi_name_0'));\n\t\t$this->addRule('organism_0','Contact 1: organism is required','couple_not_null',array($this,'org_sname_0'));\n\t\t$this->addRule('email1_0','Contact 1: email1 is required','required');\t\n\t\tfor ($i = 0; $i < $this->dataset->nbPis; $i++){\n\t\t\t$this->addRule('pi_name_'.$i,'Contact '.($i+1).': Name exceeds the maximum length allowed (250 characters)','maxlength',250);\n\t\t\t$this->addRule('email1_'.$i,'Contact '.($i+1).': email1 is incorrect','email');\n\t\t\t$this->addRule('email2_'.$i,'Contact '.($i+1).': email2 is incorrect','email');\n\t\t\t$this->addRule('org_fname_'.$i,'Contact '.($i+1).': Organism full name exceeds the maximum length allowed (250 characters)','maxlength',250);\n\t\t\t$this->addRule('org_sname_'.$i,'Contact '.($i+1).': Organism short name exceeds the maximum length allowed (50 characters)','maxlength',50);\n\t\t\t$this->addRule('org_url_'.$i,'Contact '.($i+1).': Organism url exceeds the maximum length allowed (250 characters)','maxlength',250);\n\t\t\t$this->addRule('email1_'.$i,'Contact '.($i+1).': email1 exceeds the maximum length allowed (250 characters)','maxlength',250);\n\t\t\t$this->addRule('email2_'.$i,'Contact '.($i+1).': email2 exceeds the maximum length allowed (250 characters)','maxlength',250);\n\t\t\tif (isset($this->dataset->originators[$i]) && !empty($this->dataset->originators[$i]) && $this->dataset->originators[$i]->pers_id > 0){\n\t\t\t\t//$this->getElement('pi_name_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t//$this->getElement('email1_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t//$this->getElement('email2_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t//$this->getElement('organism_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t$this->disableElement('pi_name_'.$i);\n\t\t\t\t$this->disableElement('email1_'.$i);\n\t\t\t\t$this->disableElement('email2_'.$i);\n\t\t\t\t$this->disableElement('organism_'.$i);\n\t\t\t}\n\t\t\t/*else{\n\t\t\t\t//$this->addRule('pi_name_'.$i,'Contact '.($i+1).': A contact with the same name is already present in the database. Select it in the drop-down list.','existe',array('personne','pers_name'));\n\t\t\t}*/\n\t\t\tif (isset($this->dataset->originators[$i]->organism) && !empty($this->dataset->originators[$i]->organism) && $this->dataset->originators[$i]->organism->org_id > 0){\n\t\t\t\t//$this->getElement('org_sname_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t//$this->getElement('org_fname_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t//$this->getElement('org_url_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t$this->disableElement('org_sname_'.$i);\n\t\t\t\t$this->disableElement('org_fname_'.$i);\n\t\t\t\t$this->disableElement('org_url_'.$i);\n\t\t\t}\n\t\t\tif ($i != 0){\n\t\t\t\t$this->addRule('pi_name_'.$i,'Contact '.($i+1).': email1 is required','contact_email_required',array($this,$i));\n\t\t\t\t$this->addRule('pi_name_'.$i,'Contact '.($i+1).': organism is required','contact_organism_required',array($this,$i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Add validation rules\n\t\t$this->AddModValidationRules();\n\t\t$this->AddSatValidationRules();\n\t\t$this->AddInstruValidationRules();\n\n\t\t//$this->addRule('grid_type','Coverage: Grid type exceeds the maximum length allowed (100 characters)','maxlength',100);\n\t\t$this->addVaValidationRulesResolution('Coverage');\n\t\t//$this->addRule('sensor_resol_temp','Coverage: Temporal resolution is incorrect','validDate');\n\t\t$this->addRule('sensor_resol_tmp','Coverage: temporal resolution is incorrect','regex',\"/^[0-9]{2}[:][0-9]{2}[:][0-9]{2}$/\");\n\t\t$this->addValidationRulesGeoCoverage();\n\t\t//PARAMETER\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->addValidationRulesVariable($i,$i,'Parameter '.($i+1));\n\t\t}\n\t\t\n\t}", "public function makeRules()\n {\n $this->rules = [];\n preg_match_all(\"/([.#a-z0-9-]*)\\s?({[^}]*})/i\", $this->contents(), $comands);\n foreach ($comands[1] as $k => $selector) {\n preg_match_all(\"/([a-z0-9-]*):([^;]*);/i\", $comands[2][$k], $declarations);\n $this->rules[$selector] = [];\n foreach ($declarations[1] as $i => $property) {\n $this->rules[$selector][$property] = $declarations[2][$i];\n }\n }\n }", "public function get_all_rules()\n {\n }", "public function buildRules(RulesChecker $rules) {\n\t\t//$rules->add($rules->existsIn(['navigation_tree_id'], 'NavigationTrees'));\n\t\t//$rules->add($rules->existsIn(['parent_id'], 'ParentNavigationItems'));\n\t\treturn $rules;\n\t}", "public function executeRules()\n {\n // Retrieve rules for the current thing\n $rules = Rule::where('thingListener', $this->listener)->get();\n foreach ($rules as $rule) {\n if (true === $this->validateJson($rule->jsonRule)) {\n $this->jsonRule = json_decode($rule->jsonRule);\n $this->parseJson();\n }\n }\n\n return;\n }", "private function buildRewrites(){\n\t\t\n\t\t// If we want to add IfModule checks, add the opening tag\n\t\tif($this->includeIfModuleCheck){\n\t\t\t$this->appendIfModuleCheckStart();\n\t\t}\n\t\t\t\n\t\t// If we want to turn the rewrite engine on, add the statement\n\t\tif($this->includeTurnOnEngine){\n\t\t\t$this->appendTurnOnEngine();\n\t\t}\n\t\t\n\t\t// Are there actually URLs to rewrite?\n\t\tif(!empty($this->urls)){\n\t\t\t\n\t\t\t// Loop through the URLs\n\t\t\tforeach($this->urls as $source => $destination){\n\t\t\t\t\n\t\t\t\t// Check for query strings, as RewriteRule will ignore them\n\t\t\t\t$queryStringPos = strpos($source, '?');\n\t\t\t\t\n\t\t\t\t// URL has a query string\n\t\t\t\tif($queryStringPos !== FALSE){\n\t\t\t\t\t\n\t\t\t\t\t// Grab the query string\n\t\t\t\t\t$queryString = substr($source, $queryStringPos + 1);\n\t\t\t\t\t\n\t\t\t\t\t// If there wasn't just a lone ? in the URL\n\t\t\t\t\tif($queryString != ''){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add a RewriteCond for this query string\n\t\t\t\t\t\t$this->buildRewriteCondition('QUERY_STRING', $queryString);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// RewriteRule matches on the request URI without query strings, so remove the query string\n\t\t\t\t\t$source = substr($source, 0, $queryStringPos);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Add a RewriteRule for this source / destination\n\t\t\t\t$this->buildRewriteRule($source, $destination);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If we are adding the check for mod_rewrite.c add the closing tag\n\t\tif($this->includeIfModuleCheck){\n\t\t\t$this->appendIfModuleCheckEnd();\n\t\t}\n\t\t\n\t\t// Return our rewrites\n\t\treturn $this->rewrites;\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->rulesBirth = array(0, 1, 2, 3, 4);\n $this->rulesStayAlive = array(0, 1, 2, 3);\n }", "protected function preProcess() {}", "abstract protected function getValidationRules();", "abstract public function rules(): array;", "abstract public function rules(): array;", "abstract public function rules(): array;", "protected function setUp()\n {\n $this->object1 = new \\Yana\\Security\\Data\\SecurityRules\\Rule('Group1', 'Role1', true);\n $this->object2 = new \\Yana\\Security\\Data\\SecurityRules\\Rule('Group2', 'Role2', false);\n $this->object3 = new \\Yana\\Security\\Data\\SecurityRules\\Rule('', '', false);\n }", "abstract public function get_context();", "abstract public function getRules(): array;", "public function check() : void {\n\t\tif ( ! $this->check_host() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $this->is_healthcheck() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $this->is_cli() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $this->rules as $rule ) {\n\t\t\t$target = $rule->target();\n\t\t\t$pattern = $rule->pattern();\n\t\t\t$uri = $this->get_full_url();\n\n\t\t\tif (\n\t\t\t\t! @preg_match( \"/$pattern/\", $uri, $matches )\n\t\t\t\t&& ! @preg_match( \"/$pattern/\", $this->uri, $matches )\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( $rule->is_external_target() && ! $this->is_subdomain() ) {\n\t\t\t\t$uri = $this->uri;\n\t\t\t}\n\n\t\t\t$uri = ltrim( $uri, '/' );\n\n\t\t\tif ( $rule->is_regex_target() ) {\n\t\t\t\tunset( $matches[0] );\n\t\t\t\t$matches = array_values( $matches );\n\n\t\t\t\t$key = 0;\n\t\t\t\t$placeholders = array_map(\n\t\t\t\t\tfunction( $val ) use ( &$key ) {\n\t\t\t\t\t\t$key++;\n\t\t\t\t\t\treturn \"$$key\";\n\t\t\t\t\t},\n\t\t\t\t\t$matches\n\t\t\t\t);\n\n\t\t\t\t/**\n\t\t\t\t * Normally we might expect a preg_replace() here as we're working with\n\t\t\t\t * regex, however preg_replace() will not replace the entire subject an\n\t\t\t\t * will append the replacement to it rather than replace the subject with\n\t\t\t\t * our $target value with dollar placeholders. To get around this and keep\n\t\t\t\t * the $target as the full subject, we create an array of placeholders based\n\t\t\t\t * on the amount of matches and use a simple str_replace() to replace the $target\n\t\t\t\t * placeholders with the paired values from $placeholders and $matches.\n\t\t\t\t */\n\t\t\t\t$target = str_replace( $placeholders, $matches, $target );\n\t\t\t}\n\n\t\t\tif ( ! $rule->is_external_target() && ! $this->is_subdomain() ) {\n\t\t\t\t$target = ltrim( $target, '/' );\n\t\t\t\t$target = \"/$target\";\n\t\t\t}\n\n\t\t\theader( \"Location: $target\", $rule->code() );\n\t\t\texit;\n\t\t}\n\n\t\t$this->rules = []; // Reset to avoid potential large memory usage.\n\t}", "public function rules()\n {\n //\n }", "function loadRules() {\n\t\tglobal $sugar_config;\n\n\t\t$this->preflightCache();\n\n\t\t$file = $this->rulesCache.\"/{$this->user->id}.php\";\n\n\t\t$routingRules = array();\n\n if (file_exists($file)) {\n include FileLoader::validateFilePath($file); // force include locally\n }\n\n\t\t$this->rules = $routingRules;\n\t}", "public function rules()\n {\n\n $rules = [];\n switch ($this->request->get('type')) {\n case 'subscribers':\n $rules = [\n 'email' => 'required|email|max:50',\n 'subscribe' => 'nullable|in:0,1',\n 'accept' => 'required|accepted',\n ];\n break;\n case 'contacts':\n $rules = [\n 'name' => 'required|string|max:191',\n 'phone' => 'string|max:20',\n 'email' => 'email|max:50',\n 'message' => 'required|string|max:2048',\n 'accept' => 'required|accepted',\n ];\n $rules = $this->applyReCaptchaRules($rules);\n break;\n case 'faq':\n $rules = [\n 'name' => 'required|string|max:191',\n 'phone' => 'string|max:20',\n 'email' => 'email|max:50',\n 'city' => 'string|max:255',\n 'message' => 'required|string|max:2048',\n 'terms.*' => 'array|max:1',\n 'terms.*.*' => 'numeric|exists:terms,id',\n 'accept' => 'required|accepted',\n ];\n break;\n case 'cooperation':\n $rules = [\n 'name' => 'required|string|max:191',\n 'phone' => 'string|max:20',\n 'email' => 'email|max:50',\n 'city' => 'string|max:255',\n 'message' => 'nullable|string|max:2048',\n 'terms.*' => 'array|max:1',\n 'terms.*.*' => 'numeric|exists:terms,id',\n 'accept' => 'required|accepted',\n 'subscribe' => 'required|in:0,1',\n ];\n break;\n case 'questions':\n $rules = [\n 'name' => 'required|string|max:191',\n 'email' => 'email|max:50',\n 'message' => 'required|string|max:2048',\n ];\n break;\n case 'buy_one_click':\n $rules = [\n 'name' => 'required|string|max:191',\n 'phone' => 'required|string|max:50',\n 'product_id' => 'sometimes|exists:products,id',\n ];\n break;\n }\n\n return array_merge([\n 'type' => 'required|in:'.implode(',', $this->formTypes)\n ], $rules);\n }", "protected function localValidation()\n\t\t{\n\t\t}", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['product_code']));\n $rules->add($rules->existsIn(['category_id'], 'Categories'));\n $rules->add($rules->existsIn(['brand_id'], 'Brands'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n // $rules->add($rules->existsIn(['image_id'], 'Images'));\n\n return $rules;\n }", "private function createCategoryRules()\n {\n // Validation rules\n $this->form_validation->set_rules('category_title', 'Category Title', 'trim|required|max_length[255]');\n }", "private function checkHealth(){\n\n if(strpos($_SERVER['SERVER_SOFTWARE'], 'Apache')===FALSE)\n $this->apache = false;\n\n if(function_exists('apache_get_modules')){\n $mods = apache_get_modules();\n if(!in_array('mod_rewrite', $mods))\n $this->rewrite = false;\n }\n\n if(!$this->apache || !$this->rewrite){\n showMessage(__('URL rewriting requires an Apache Server and mod_rewrite enabled!','dtransport'), RMMSG_WARN);\n return false;\n }\n\n if(!preg_match(\"/RewriteEngine\\s{1,}On/\", $this->content))\n $this->content .= \"\\nRewriteEngine On\\n\";\n\n $base = parse_url(XOOPS_URL.'/');\n $this->base = isset($base['path']) ? rtrim($base['path'], '/').'/' : '/';\n $rb = \"RewriteBase \".$this->base.\"\\n\";\n\n if(strpos($this->content, $rb)===false){\n if(preg_match(\"/RewriteBase/\", $this->content))\n preg_replace(\"/RewriteBase\\s{1,}(.*)\\n\",$rb, $this->content);\n else\n $this->content .= $rb.\"\\n\";\n }\n\n if(!preg_match(\"/RewriteCond\\s{1,}\\%\\{REQUEST_URI\\}\\s{1,}\\!\\/\\[A\\-Z\\]\\+\\-/\", $this->content))\n $this->content .= \"RewriteCond %{REQUEST_URI} !/[A-Z]+-\\n\";\n\n if(!preg_match(\"/RewriteCond\\s{1,}\\%\\{REQUEST_FILENAME\\}\\s{1,}\\!\\-f/\", $this->content))\n $this->content .= \"RewriteCond %{REQUEST_FILENAME} !-f\\n\";\n\n if(!preg_match(\"/RewriteCond\\s{1,}\\%\\{REQUEST_FILENAME\\}\\s{1,}\\!\\-d/\", $this->content))\n $this->content .= \"RewriteCond %{REQUEST_FILENAME} !-d\\n\";\n\n\n\n }", "public function __construct()\n {\n if (!(self::$matchContext instanceof MatchContext)) {\n self::$matchContext = new MatchContext([], []);\n }\n }", "private function PrepareRuleset($env){\n\n $hasOnePassingSelector = false;\n $selectors = array();\n if( $this->selectors ){\n Less_Tree_DefaultFunc::error(\"it is currently only allowed in parametric mixin guards,\");\n\n foreach($this->selectors as $s){\n $selector = $s->compile($env);\n $selectors[] = $selector;\n if( $selector->evaldCondition ){\n $hasOnePassingSelector = true;\n }\n }\n\n Less_Tree_DefaultFunc::reset();\n } else {\n $hasOnePassingSelector = true;\n }\n\n if( $this->rules && $hasOnePassingSelector ){\n $rules = $this->rules;\n }else{\n $rules = array();\n }\n\n $ruleset = new Less_Tree_Ruleset($selectors, $rules, $this->strictImports);\n\n $ruleset->originalRuleset = $this->ruleset_id;\n\n $ruleset->root = $this->root;\n $ruleset->firstRoot = $this->firstRoot;\n $ruleset->allowImports = $this->allowImports;\n\n\n // push the current ruleset to the frames stack\n $env->unshiftFrame($ruleset);\n\n\n // Evaluate imports\n if( $ruleset->root || $ruleset->allowImports || !$ruleset->strictImports ){\n $ruleset->evalImports($env);\n }\n\n return $ruleset;\n }", "static public function init_rewrite_rules() {\n\n\t\t$fronts = self::get_rewrite_fronts();\n\t\t$paged_regex = self::$paged_regex_base;\n\n\t\t$flpaged_rules = array(\n\n\t\t\t// Category archive\n\t\t\t$fronts['category'] . '/(.+?)/' . $paged_regex . '/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&flpaged=$matches[2]',\n\n\t\t\t// Tag archive\n\t\t\t$fronts['tag'] . '/([^/]+)/' . $paged_regex . '/?([0-9]{1,})/?$' => 'index.php?tag=$matches[1]&flpaged=$matches[2]',\n\n\t\t\t// Year archive\n\t\t\t$fronts['date'] . '([0-9]{4})/' . $paged_regex . '/?([0-9]{1,})/?$' => 'index.php?year=$matches[1]&flpaged=$matches[2]',\n\n\t\t\t// Year/month archive\n\t\t\t$fronts['date'] . '([0-9]{4})/([0-9]{1,2})/' . $paged_regex . '/?([0-9]{1,})/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&flpaged=$matches[3]',\n\n\t\t\t// Day archive\n\t\t\t$fronts['date'] . '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/' . $paged_regex . '/?([0-9]{1,})/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&flpaged=$matches[4]',\n\n\t\t\t// Author archive\n\t\t\t$fronts['author'] . '([^/]+)/' . $paged_regex . '/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&flpaged=$matches[2]',\n\n\t\t\t// Post single - Numeric permastruct (/archives/%post_id%)\n\t\t\t$fronts['default'] . '([0-9]+)/' . $paged_regex . '/?([0-9]{1,})/?$' => 'index.php?p=$matches[1]&flpaged=$matches[2]',\n\n\t\t\t// Page\n\t\t\t'(.?.+?)/' . $paged_regex . '/?([0-9]{1,})/?$' => 'index.php?pagename=$matches[1]&flpaged=$matches[2]',\n\n\t\t\t// Post single\n\t\t\t'(.+?)/' . $paged_regex . '/?([0-9]{1,})/?$' => 'index.php?name=$matches[1]&flpaged=$matches[2]',\n\t\t);\n\n\t\t// Frontpage static\n\t\tif ( get_option( 'page_on_front' ) ) {\n\t\t\t$flpaged_rules[ $paged_regex . '/([0-9]*)/?' ] = 'index.php?page_id=' . get_option( 'page_on_front' ) . '&flpaged=$matches[1]';\n\t\t}\n\t\t// Generic Rule for Homepage / Search\n\t\t$flpaged_rules[ $paged_regex . '/?([0-9]{1,})/?$' ] = 'index.php?&flpaged=$matches[1]';\n\n\t\tforeach ( $flpaged_rules as $regex => $redirect ) {\n\t\t\tadd_rewrite_rule( $regex, $redirect, 'top' );\n\t\t}\n\n\t\tadd_rewrite_tag( '%flpaged%', '([^&]+)' );\n\t}", "function testContext() {\n $this->ConfigFile();\n $this->ContextHierarchy();\n }", "function SiteRules()\n{\n\n$this->database = new Database();\n\n}", "protected function getContext() {}" ]
[ "0.6936584", "0.65178424", "0.64494044", "0.6441711", "0.6400946", "0.62853336", "0.6283039", "0.6198425", "0.6189518", "0.61536413", "0.61536413", "0.61536413", "0.61536413", "0.602825", "0.6018138", "0.5965268", "0.5906007", "0.5754399", "0.57334214", "0.5716024", "0.5716024", "0.5716024", "0.56511205", "0.5640121", "0.5588367", "0.554469", "0.54685396", "0.5462573", "0.54616904", "0.54611295", "0.54601246", "0.54248065", "0.5406273", "0.5395883", "0.53854835", "0.5383478", "0.5381102", "0.5351548", "0.53482324", "0.5347399", "0.5339633", "0.53229535", "0.53229535", "0.53229535", "0.53196883", "0.5302171", "0.5281841", "0.52798516", "0.52612895", "0.5256535", "0.5246451", "0.5244516", "0.5227079", "0.5205689", "0.5202172", "0.51992977", "0.5189266", "0.5173366", "0.51703835", "0.51679933", "0.5157335", "0.515559", "0.5152128", "0.51513094", "0.51456165", "0.5135601", "0.51302063", "0.5121105", "0.51162016", "0.51141655", "0.5098587", "0.50985134", "0.50902927", "0.50889426", "0.50882876", "0.5086634", "0.5085441", "0.5074114", "0.506165", "0.5058097", "0.5046913", "0.50457466", "0.50457466", "0.50457466", "0.504423", "0.50362676", "0.5023549", "0.5018723", "0.5012201", "0.50102794", "0.50051486", "0.50021636", "0.5001715", "0.49994525", "0.49944794", "0.49942118", "0.49934033", "0.49842814", "0.49778694", "0.49763152", "0.49761516" ]
0.0
-1
Ha comp chya student login cha login karnya sathi database mahde search karat aahe..
public function mechvalidate($username,$password) { $q=$this->db->where(['username'=>$username,'password'=>$password]) ->get('mechstud'); if($q->num_rows()) { return $q->row()->id; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search()\n\t{\n\t\t\n\t}", "public function search()\n\t{\n\t\t$search=$this->input->post('search');\n\t\t$data_rows=get_role_manage_table_data_rows($this->Role->search($search),$this);\n\t\techo $data_rows;\n\t}", "function filter_rsa_tambah_em(){\n\t\t\tif($this->check_session->user_session() && $this->check_session->get_level()==100){\n\t\t\t\t$keyword = form_prep($this->input->post('keyword'));\n\t\t\t\t$data['result_rsa_tambah_em'] = $this->rsa_tambah_em_model->search_rsa_tambah_em($keyword);\n\t\t\t\t$this->load->view('rsa_tambah_em/row_rsa_tambah_em',$data);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tshow_404('page');\n\t\t\t}\n \n \n\t\t}", "public function search();", "public function search();", "public static function search($login) {\n $sql = new Sql();\n return $sql->select(\"SELECT * FROM tb_usuarios WHERE deslogin LIKE :SEARCH ORDER BY deslogin\",array(\n ':SEARCH'=>\"%\".$login.\"%\"\n ));\n \n }", "function cari2($keyword) {\n\t$query=\" SELECT * FROM administrator \n\t\t\t\tWHERE\n\t\t\t nama_lengkap LIKE '%$keyword%' OR\n\t\t\t email LIKE '%$keyword%' OR\n\t\t\t alamat LIKE '%$keyword%' OR\n\t\t\t no_hp_wa LIKE '%$keyword%' OR\n\t\t\t nik LIKE '%$keyword%' OR\n\t\t\t keterangan LIKE '%$keyword%'\n\t\t\t \"; \n\treturn query ($query); // query menghasilkan assoc array dari query, jadi kita memanggil function yang udah dibuat di dalam function baru\n}", "public function search(){}", "public function searchReader()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$text = $_POST['text'];\n\t\t\t$type = $_POST['type'];\n\t\t\t//$return = array();\n\t\t\t$book = D('User');\n\n\t\t\t$sql = \"SELECT * FROM lib_user\n\t\t\t\t\t where {$type} like '%{$text}%' ORDER BY register_time DESC;\";\n\t\t\t$return = $book->query($sql);\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'data' => json_encode($return)\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'No Result'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\n\t}", "function search_user(){\n\t\trequire_once(\"dbconnection.php\");\n\t\t$obj=new dbconnection();\n\t\t$con=$obj->getcon();\n\t\t\n\t\t\n\t\t$dbh=$obj->get_pod();\n\n\t\t$search_by = $_POST['search_by'];\n\n\t\t$sqlget = \"SELECT * FROM users WHERE uname='$search_by';\";\n\t\t$resultget = mysqli_query($con,$sqlget) or die(\"SQL Error : \".mysqli_error($con));\n\t\t$recget= mysqli_fetch_assoc($resultget);\n\n\t\techo json_encode($recget);\n\t\t\n\t}", "function find_user() //функция авторизации пользователя\n\t{\n\t\t//echo \"Hello <br/>\";\n\t\t$sth = $this->db->prepare(\"SELECT id, username FROM accounts WHERE username = :username AND password = :password\");\n \t\t$sth->execute(array(\n\t\t\t\t\t\t\t':username'=>$_POST['username'], \n\t\t\t\t\t\t\t':password' =>Hash::create('sha256', $_POST['password'], 'cats do not fliing')\n \t\t\t\t\t));\n\n \t/*$result = $sth->fetchAll();\n\t\tprint_r($result);*/\n\t\t$data = $sth->fetch();\n\t\t//print_r($data);\n\n\t\t$count = $sth->rowCount();\n\t\tif($count > 0)\n\t\t{\n\t\t\t//logged in\n\t\t\tSession::init();\n\t\t\tSession::set('username', $data['username'] );\n\t\t\tSession::set('loggedIn', true);\n\t\t\theader('location: ../dashboard');\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('location: ../login');\n\t\t}\n\t\t\n\t}", "function search()\n\t{\n\t\t$search=$this->input->post('search');\n\t\t\t$data_rows=get_temp_manage_table_data_rows1($this->Giftcard->search($search),$this);\n\t\t\techo $data_rows;\n\t}", "public function doLogin($data){\n\n $this->where('username',$data['username']);\n $this->where('password',sha1( $data['password']) );\n $result = $this->search();\n\n if ($result){\n return $result;\n }\n\n return false;\n\n }", "function cek_login($table,$where){\n\t\treturn $this->db->get_where($table,$where); //cek database\n\t}", "public function cekLogin($data) {\r\n\t\t\t$query=\t$this->db->query(\"select * from ms_user where user_name='\".$data['username'].\"' and password='\".$data['password'].\"'\");\r\n return $query;\r\n }", "function search()\n\t{}", "function search()\n\t{}", "function check_login() {\n //j'appelle la fonction pour se connecter à la database\n include(\"M/db_connect.php\");\n \n //je récupere ce qui est du formulaire et normalisation du form\n $email = htmlspecialchars($_GET['email']);\n $password = htmlspecialchars($_GET['password']);\n \n // la requete pour la database \n $req = $db->prepare(\"SELECT * FROM account WHERE email LIKE :email AND psw LIKE :psw\");\n $req->execute(array(\"email\"=>$email, \"psw\"=>$password));\n\n return $req;\n }", "public static function search($login){\n\t\t\t$sql = new Sql();\n\n\t\t\treturn $sql->select(\"SELECT * FROM tb_usuarios_dois WHERE deslogin LIKE :SEARCH ORDER BY idusuario\", array(\n\t\t\t\t':SEARCH'=>\"%\".$login.\"%\"\n\t\t\t));\n\t\t}", "function cek_hak_akses_user(){\n $kode_secure= 'x0017'; // kode halaman user\n $t = $this->cekLogin(); // get kode login\n\n $kodeakses = array('id_modul' => $kode_secure, );\n $data = $this->db->get_where('tb_modul_manajemen', $kodeakses)->row();\n $id_modul = $data->id_modul_manajemen;\n\n $query = $this->db->query(\"SELECT * FROM tb_user WHERE id_user = '\".$t.\"' AND hak_akses LIKE '%\".$id_modul.\"%'\")->num_rows();\n if($query < 1){\n redirect(base_url('not_access'));\n }\n }", "public function user_login($username,$password){\n $sqlQuery= \"select * from Sidhus_Login_credentials where (mobileno='\".$username.\"' or emailId ='\".$username.\"') and (password='\".$password.\"')\";\n $result=$this->con->query($sqlQuery);\n $this->con->close();\n return $result;\n }", "function findusers() {\n $this->auth(SUPPORT_ADM_LEVEL);\n $search_word = $this->input->post('search');\n if($search_word == '-1'){ //initial listing\n $data['records'] = $this->m_user->getAll(40);\n } else { //regular search\n $data['records'] = $this->m_user->getByWildcard($search_word);\n }\n $data['search_word'] = $search_word;\n $this->load->view('/admin/support/v_users_search_result', $data);\n }", "function search_log()\n\t{\n\t\t$users = $this->auth_model->get_usernames();\n\t\t$data[\"users\"] = get_keyed_pairs($users,array(\"username\",\"user\"),TRUE);\n\t\t$data[\"actions\"] = array(\"login\" => \"login\",\"logout\" => \"logout\");\n\t\t$this->load->view(\"admin/search_log\",$data);\n\t}", "function SEARCH(){\n//Se contruye la sentencia de busqueda usando Like\n $sql= \"SELECT\n IdTrabajo,\n login,\n Alias,\n Horas,\n Ruta\n FROM ENTREGA\n WHERE (\n (IdTrabajo LIKE REPLACE('%$this->idTrabajo%', ' ', '' ))&&\n (login LIKE REPLACE('%$this->login%', ' ', '' ))&&\n (Alias LIKE REPLACE('%$this->alias%', ' ', '' ))&&\n (Horas LIKE REPLACE('%$this->horas%', ' ', '' ))&&\n (Ruta LIKE REPLACE('%$this->ruta%', ' ', '' ))\n )\";\n // si se produce un error en la busqueda mandamos el mensaje de error en la consulta\n if (!($resultado = $this->mysqli->query($sql))){\n return 'Error en la consulta sobre la base de datos';\n }\n else{ // si la busqueda es correcta devolvemos el recordset resultado\n return $resultado;\n }\n}", "public function loginTrainer(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\t\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t$result = mysql_query(\"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"' and password='\".$_REQUEST[\"pass\"].\"'\");\r\n\t\t\t\t$row = mysql_fetch_array($result);\r\n\t\t\t\tif($row == false){\r\n\t\t\t\t\t//echo \"No records\";\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$_SESSION['trainer'] = $row;\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//echo 'Something went wrong ! ';\r\n\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "function search() {}", "function cek_login($table,$where){ \n return $this->db->get_where($table,$where);\n }", "public function basicSearch(){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t$SearchNameOrganisme = $this->_getParam('Basicseacrhname');\n\t\t\t\t\t\t\tif(strlen(trim($SearchNameOrganisme))>0){\n\t\t\t\t\t\t\t\tif(get_magic_quotes_gpc()){\n\t\t\t\t\t\t\t\t\t$SearchNameOrganisme = stripslashes($SearchNameOrganisme);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$SearchNameOrganisme = mysql_real_escape_string($SearchNameOrganisme);\n\t\t\t\t\t\t\t\t$ShowingBasicSearch = $this->GetModelOrganize->searchbasic($SearchNameOrganisme);\n\t\t\t\t\t\t\t\t$this->view->getfivetable = $ShowingBasicSearch;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$getAllDataToview = $this->GetModelOrganize->selectAllDataForOrganismeMenu ();\n\t\t\t\t\t\t\t\t$this->view->getfivetable = $getAllDataToview;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}catch (ErrorException $ex){\n\t\t\t\t\t\t\techo \"Message:\".$ex->getMessage();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "function searchs()\n\t{\n\t $url1 = explode('/',$_GET['url']);\t\n\t\t$this->view->title = 'Search seance hemodialyse';\n\t $this->view->userListviewo = $_GET['o']; //criter de choix\n\t $this->view->userListviewq = $_GET['q']; //key word \n\t\t$this->view->userListviewp =$url1[2]; // parametre 2 page limit 2,3\n\t\t$this->view->userListviewl =10; // parametre 3 nombre de ligne par page limit 2,3 \n\t\t$this->view->userListviewb =20; // parametre nombre de chiffre dan la barre navigation\n\t\t$this->view->userListview = $this->model->userSearchs($this->view->userListviewo,$this->view->userListviewq,$this->view->userListviewp,$this->view->userListviewl);\n\t\t$this->view->userListview1= $this->model->userSearchs1($this->view->userListviewo,$this->view->userListviewq); // compte total pour bare de navigation\n\t\t$this->view->render($this->route.'/seance');\n\t}", "function cari($keyword) {\n\t$query=\" SELECT * FROM pengguna \n\t\t\t\tWHERE\n\t\t\t nama_lengkap LIKE '%$keyword%' OR\n\t\t\t email LIKE '%$keyword%' OR\n\t\t\t alamat LIKE '%$keyword%' OR\n\t\t\t no_hp_wa LIKE '%$keyword%'\n\t\t\t \"; \n\treturn query ($query); // query menghasilkan assoc array dari query, jadi kita memanggil function yang udah dibuat di dalam function baru\n\n}", "public function search_sessions()\n {\n \n $search_content = $this->input->get(\"search\");\n if($search_content==\"\"){\n \n }else{\n $search_content = $this->security->xss_clean($search_content);\n $search_content = htmlspecialchars($search_content);\n $data[\"results\"] = $this->admin_student_courses_mdl->search_sessions($search_content);\n print json_encode($data);\n }\n \n }", "public function findStudent()\n {\n //$search = '%'.$search.'%';\n $dql = \"SELECT ae FROM ABCIsystemBundle:AbcMembers ae WHERE ae.idCard like'__02%' and ae.status='active'\";\t\n $repositorio = $this->getEntityManager()->createQuery($dql);\n return $repositorio->getResult();\t\n }", "function getProfileLogin($usr, $pwd){\r\n\t\t//$pwd = strtoupper ($pwd);\r\n\t\t\r\n\t\t$query = $this->db->get_where('cuid_lahir', array('oper_id' => $usr,'password like binary' => $pwd));\t\r\n\t\treturn $query; \r\n\t}", "public function index()\n\t{\n\t\t\t$idUser = $this->session->userdata(\"id\");\n\t\t\t\n\t\t\t$this->load->model(\"general_model\");\n\t\t\t$arrParam = array(\n\t\t\t\t\"table\" => \"user\",\n\t\t\t\t\"order\" => \"id_user\",\n\t\t\t\t\"column\" => \"id_user\",\n\t\t\t\t\"id\" => $idUser\n\t\t\t);\n\t\t\t$data['information'] = $this->general_model->get_basic_search($arrParam);\n\n\t\t\t$data[\"view\"] = \"form_password\";\n\t\t\t$this->load->view(\"layout\", $data);\n\t}", "public function cek($data){\n\t \t$sql =\"SELECT u.*,r.nama FROM user u INNER JOIN role r ON r.id = u.idrole WHERE u.username=? AND u.password= SHA1(?)\";\n\t\t$ps =$this->koneksi->prepare($sql);\n\t\t$ps->execute($data);\n\t\t$rs = $ps->fetch();\n\t\treturn $rs;\n\t}", "function sidsearch($sid){\r\n\t\tif ($this->db->get_where('user',array('member_id'=>$sid))->num_rows()==1){\r\n\t\t\t$uid = end($this->db->get_where('user',array('member_id'=>$sid))->result())->id;\r\n\t\t\t$user_info = $this->db->get_where('user_info',array('uid'=>$uid))->row_array();\r\n\t\t\t$user_info['appendix'] = unserialize($user_info['appendix']);\r\n\t\t\tif (isset($user_info['appendix']['ulib']['comp_id']) && is_numeric($user_info['appendix']['ulib']['comp_id'])){\r\n\t\t\t\t$registered = TRUE;\r\n\t\t\t}else{\r\n\t\t\t\t$registered = FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//generate output\r\n\t\t\t$output = array('en' => $user_info['enn'],\r\n\t\t\t\t\t\t\t'fn' => $user_info['cnfn'],\r\n\t\t\t\t\t\t\t'ln' => $user_info['cnln'],\r\n\t\t\t\t\t\t\t'msg' => 'Target located',\r\n\t\t\t\t\t\t\t'code' => 0,\r\n\t\t\t\t\t\t\t'regi' => $registered,\r\n\t\t\t\t\t\t\t'class' => $user_info['appendix']['class']\r\n\t\t\t);\r\n\t\t}\r\n\t\t//get unregistered user information\r\n\t\telseif ($this->db->get_where('user_veri',array('member_id'=>$sid))->num_rows()==1){\r\n\t\t\t//get app\r\n\t\t\t$user_info = $this->db->get_where('user_veri',array('member_id'=>$sid))->row_array();\r\n\t\t\t$user_info['appendix'] = unserialize($user_info['appendix']);\r\n\t\t\tif (isset($user_info['appendix']['ulib']['comp_id']) && is_numeric($user_info['appendix']['ulib']['comp_id'])){\r\n\t\t\t\t$registered = TRUE;\r\n\t\t\t}else{\r\n\t\t\t\t$registered = FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$output = array('en' => $user_info['enn'],\r\n\t\t\t\t\t\t\t'fn' => $user_info['cnfn'],\r\n\t\t\t\t\t\t\t'ln' => $user_info['cnln'],\r\n\t\t\t\t\t\t\t'msg' => 'Target located',\r\n\t\t\t\t\t\t\t'code' => 0,\r\n\t\t\t\t\t\t\t'regi' => $registered,\r\n\t\t\t\t\t\t\t'class' => $user_info['appendix']['class']\r\n\t\t\t);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$output = array('msg' => \"Not yet matched\",\r\n\t\t\t\t\t\t\t'code' => 100\r\n\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}", "public function search()\n {\n\n }", "public function search()\n {\n\n }", "public function searchDb($txtsearch){\n\t\t$data = $this->db->query('SELECT * FROM `sanpham` as s inner join tacgia as t on t.maTacGia = s.id_MaTacGia WHERE s.`tensanpham` LIKE \"%'.$txtsearch.'%\" OR t.tenTacGia LIKE \"%'.$txtsearch.'%\" ')->result_object();\n\t\treturn $data;\n\t}", "public function GetSearch(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $user_id = $_POST['user_id'];\n $keyword = $_POST['keyword'];\n $type = $_POST['type'];\n $user_auth_key = $_POST['user_auth_key'];\n $latitude = $_POST['latitude'];\n $longitude = $_POST['longitude'];\n $page_no = $_POST['page_no'];\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($keyword) && !empty($type) && !empty($user_auth_key) && !empty($page_no)){\n $result = $res->CheckAuthentication($user_id, $user_auth_key, $conn);\n if($result != false){\n $res->get_search($user_id, $keyword, $type, $latitude, $longitude, $page_no, $conn);\n $this->dbClose();\n }\n else{\n $this->dbclose();\n $error = array('status' => \"0\", \"msg\" => \"Not Authorised To get detail\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }\n else{\n $error = array('status' => \"0\", \"msg\" => \"Fill All Fields\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }", "function consult_login($dato){\n\t\t// se crean las variables que tentran la data correspondiente en la posicion que esta cada uno de estos datos\n\t\t$cedula=strip_tags($dato[0]);\n\t\t$contrasena=strip_tags($dato[1]);\n\t\t//se crea una variable que instancia la clase que coneccion a la base de datos\n\t\t$mysqli = new conect_database();\n\t\t// se rea una variable que sea igual a la variable que instancio la clase anterior y se realiza una respectiva consulta y se le mandan los respectivos datos\n\t\t$query = $mysqli->prepare(\"select id_usuarios,nombre_usuario,tipo_usuario from t_usuarios where usuario='\".$cedula.\"' and contrasena='\".$contrasena.\"'\");\n\t\t// se ejecuta lo que esta dentro de la variable anterior \n\t\t$query->execute();\t\n // se llama la una de las variables privadas que se crearon al principio y esta va a ser igual a la variable que contiene los datos de la consulta uy se obtienen los datos con get_result();\n\t\t$this->consult=$query->get_result();\n // se creaun bucle que es igual a data que sea igual al metodo inbocado en este caso la variable que contiela los datos de la consulta y se obtiene una colunma o un array (los datos)\n\t\twhile ($data=$this->consult->fetch_row()) {\n // llamamos a la otra variable privada que sera un array y contendra los datos\n\t\t\t$this->dataAll[]=$data;\n\n\t\t}\n // retornamos los datos \n\t\treturn $this->dataAll;\n\t}", "public function search() {\n // without an entry we just redirect to the error page as we need the entry to find it in the database\n if (!isset($_POST['submit-search']))\n return call('pages', 'error');\n \n //try{\n // we use the given entry to get the correct post\n $userentry = filter_input(INPUT_POST,'search', FILTER_SANITIZE_SPECIAL_CHARS);\n $results = Search::find($_POST['search']);\n require_once('views/pages/SearchResults.php');\n //}\n //catch (Exception $ex){\n // $ex->getMessage();\n // return call('pages','error');\n }", "public function indexlcac()\n {\n $this->utils->Restreindre($this->userConnecter->admin,$this->utils->Est_autoriser(36,$this->userConnecter->profil));\n $data['lang'] = $this->lang->getLangFile($this->getSession()->getAttribut('lang'));\n $params = array('view' => 'jula/liercac-search');\n $this->view($params,$data);\n }", "function searchUser()\t{\n\t\t$position = mt_rand(1, $this->rnd_users_number);\n $query = \"select user from \".self::RNDUSERSC_NAME.\" where id=\".$position;\n if ($result = $this->db_conn->query($query)) {\n $row = $result->fetch_assoc();\n return $row[\"user\"];\n }\n else {\n die (\"Error sending the query '\".$query.\"' to MySQL\");\n }\n\t}", "function search_student(){\n\t\t\theader(\"Location:../view/search_student.php\");\n\t\t}", "public function search2()\n\t{\n\t\t//$id=$this->input->get('id');\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_kelas = $this->Wali_Kelas_model->ambil_kelas($this->input->get('kelas'));\n\t\t$ambil_kegiatan = $this->Wali_Kelas_model->ambil_kegiatan($this->input->get('id'));\n\t\t$data = array(\n\t\t\t'user1' => $ambil_akun1,\n\t\t\t'status' => $ambil_status,\n\t\t\t'kls' => $ambil_kelas,\n\t\t\t'kegiatan' => $ambil_kegiatan\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['listKelas'] = $this->Wali_Kelas_model->getAllKelas();\n\t\t$data['listPelajaran'] = $this->Wali_Kelas_model->getAllPelajaran();\n\t\t$data['listMahasiswa'] = $this->Wali_Kelas_model->getAllMahasiswa();\n\t\t$data['listKegiatan4'] =$this->Wali_Kelas_model->ambil_dataKegiatan2();\n\t\t$this->load->view('W_Edit_Kegiatan&Nama',$data);\n\t\t\n\t}", "public function user_login() {\n global $db;\n\n //Use path to det user\n if (isset($_POST['login'])) {\n $username = \"\";\n $log_col = $_POST['liwth'];\n $user = $_POST['uname'];\n $pwd = sha1($_POST['pwd']);\n $login = $_POST['lias'];\n\n//Chosing the col of table where to login fron\n switch ($log_col) {\n case \"user\":\n $username = \"uname\";\n break;\n case \"cuser\":\n $username = \"cuname\";\n break;\n case \"employee\":\n $username = \"employee_no\";\n break;\n case\"job_seeker\":\n $username = \"natid\";\n break;\n default :\n echo 'ERROR DETERMINING USER CATEGORY!!!';\n }\n\n// echo '.' . $user . '.' . $pwd . '.' . $login . '.';\n// $query = \"SELECT fname $username, pwd FROM $login WHERE $username='$user' AND pwd='$pwd' \";\n $query = \"SELECT $username, fname, pwd FROM $login WHERE $username = ? AND pwd = ?\";\n $type_array = array('s', 's');\n $data_array = array($user, $pwd);\n\n $res = $db->select($query, $type_array, $data_array);\n if (!empty($res)) {\n foreach ($res as $row) {\n $_SESSION[$username] = $row[$username];\n $empno = $_SESSION[$username];\n $_SESSION['fname'] = $row['fname'];\n echo 'Login success';\n echo 'SESSION NAME' . $_SESSION['fname'];\n Redirect::to(\"index.php?rdr=1\");\n }\n } else {\n $query = \"SELECT fname $username, pwd FROM $login WHERE $username = ?\";\n $type_array = array('s');\n $data_array = array($user);\n\n $res = $db->select($query, $type_array, $data_array);\n if (!empty($res)) {\n echo 'Wrong password for ' . $user;\n// echo '.' . $user . '.' . $pwd . '.' . $login . '.';\n } else {\n echo 'The username does not exist';\n }\n }\n }\n }", "function search($id){\n\t\tglobal $con;\n\t\t$query = \"select * from user where id = '$id'\";\n\t\t$res=$con->query($query);\n\t\treturn $res;\n\t}", "function login() {\n $params = $this->objService->get_request_params();\n $isSuccess = $this->objQuery->count('user','email= ? AND password = ?', array($params->email,$params->password));\n echo $isSuccess;\n }", "Public function search_user(){\n $kata_kunci = $this->input->post('keyword');\n // jalankan query\n $data['user'] = $this->mUser->get_user_cari($kata_kunci);\n \n // membungkus hasil query model kedalam variabel $hasil\n $hasil = $this->load->view('rs/user/list_datauser',$data);\n \n // variabel hasil dikonversi kedalam objek json sebagai respon ke Ajax\n echo json_encode($hasil); \n }", "public function login($data) {\n\n // echo\"hi\";\n // die();\n\n //decrypt the passwolrd\n $hash = md5($data['password']);\n //echo $hash; die();\n\n $condition = \"uname =\" . \"'\" . $data['uname'] . \"' AND \" . \"password =\" . \"'\" .$hash. \"'\";\n\n $this->db->select('*');\n $this->db->from('registration');\n $this->db->where($condition);\n $this->db->limit(1);\n $query = $this->db->get();\n //echo $query; die();\n\n if ($query->num_rows() == 1) {\n return true;\n } else {\n return false;\n }\n }", "public static function search() {\r\n $result = lC_Default::find($_GET['q']);\r\n\r\n echo $result;\r\n }", "function BasicSearchWhere() {\n\t\tglobal $Security, $t_tinbai_mainsite;\n\t\t$sSearchStr = \"\";\n\t\tif (!$Security->CanSearch()) return \"\";\n\t\t$sSearchKeyword = $t_tinbai_mainsite->BasicSearchKeyword;\n\t\t$sSearchType = $t_tinbai_mainsite->BasicSearchType;\n\t\tif ($sSearchKeyword <> \"\") {\n\t\t\t$sSearch = trim($sSearchKeyword);\n\t\t\tif ($sSearchType <> \"\") {\n\t\t\t\twhile (strpos($sSearch, \" \") !== FALSE)\n\t\t\t\t\t$sSearch = str_replace(\" \", \" \", $sSearch);\n\t\t\t\t$arKeyword = explode(\" \", trim($sSearch));\n\t\t\t\tforeach ($arKeyword as $sKeyword) {\n\t\t\t\t\tif ($sSearchStr <> \"\") $sSearchStr .= \" \" . $sSearchType . \" \";\n\t\t\t\t\t$sSearchStr .= \"(\" . $this->BasicSearchSQL($sKeyword) . \")\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$sSearchStr = $this->BasicSearchSQL($sSearch);\n\t\t\t}\n\t\t}\n\t\tif ($sSearchKeyword <> \"\") {\n\t\t\t$t_tinbai_mainsite->setSessionBasicSearchKeyword($sSearchKeyword);\n\t\t\t$t_tinbai_mainsite->setSessionBasicSearchType($sSearchType);\n\t\t}\n\t\treturn $sSearchStr;\n\t}", "public function search(){ \n\t\t$this->layout = false;\t \n\t\t$q = trim(Sanitize::escape($_GET['q']));\t\n\t\tif(!empty($q)){\n\t\t\t// execute only when the search keywork has value\t\t\n\t\t\t$this->set('keyword', $q);\n\t\t\t$data = $this->BdSpoc->find('all', array('fields' => array('HrEmployee.first_name'),\n\t\t\t'group' => array('first_name'), 'conditions' => \tarray(\"OR\" => array ('first_name like' => '%'.$q.'%'),\n\t\t\t'AND' => array('HrEmployee.status' => '1', 'HrEmployee.is_deleted' => 'N','BdSpoc.is_deleted' => 'N'))));\t\t\n\t\t\t$this->set('results', $data);\n\t\t}\n }", "public function search_user($data)\r\n\t{\r\n\t\t$telp = $data['telp'];\r\n\t\t$ada = $this->db->get_where('tb_juragan',array('telp' => $telp))->num_rows();\r\n\t\tif ($ada != 1) {\r\n\t\t\t# code...\r\n\t\t\treturn TRUE;\r\n\t\t} else {\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}", "function cek_login($tabel,$where) {\n\t\t$login = $this->db->get_where('user',$where);\n\t\treturn $login;\n\t}", "function cek_login($username, $password){\n\t\t$this->db->where('nama', $username);\n\t\t$this->db->where('password', $password);\n\t\treturn $this->db->get($this->nama_table)->row();\n\t}", "public function search()\n {\n auth_admin();\n $s_news = myUrlEncode(trim($this->input->post('s_news')));\n redirect($this->path . '/main/a' . $s_news);\n }", "public function haz_eff_hea(){\n $this->search_list();\n\t}", "function rechercheEmployeur($matE,$psw,$id){\n require_once ('connexion.php');\n $cnx= new connexion();\n $pdo=$cnx->cnxbase();\n $req=\"SELECT * from login WHERE matE='$matE' and psw='$psw' and login='$id' \";\n $res=$pdo->query($req);\n return $res;\n $row_count = $res->rowCount(); \n return $row_count;\n}", "public function searchUsers()\n {\n # Set tables to search to a variable.\n $tables = $this->getTables();\n # Set fields to search to a variable.\n $fields = $this->getFields();\n # Set search terms to a variable.\n $search_terms = $this->getSearchTerms();\n # Perform search.\n $this->performSearch($search_terms, $tables, $fields);\n }", "public function testDatabaseSearch()\n {\n \t//finding Bowen in database (first seeded user)\n $this->seeInDatabase('users',['firstName'=>'Bowen','email'=>'bowen.hui@ubc.ca','admin'=>1]);\n\n //finding Hiroko in database (last seeded user)\n $this->seeInDatabase('users',['firstName'=>'Hiroko','email'=>'hiroko.nakahara@ubc.ca','admin'=>1]);\n\n //check that dummy user is NOT in database\n $this->notSeeInDatabase('users',['firstName'=>'Jon Bon Jovi']);\n\n\t\t//find first Category in the database\n\t\t$this->seeInDatabase('Category',['name'=>'Physics']);\n\t\t\n //find last Category in the database\n $this->seeInDatabase('Category',['name'=>'Other']);\n\n }", "function superadmin_index() {\n\t\t$this->set('meta_title','User Group');\n\t\t$search = '';\n\t\t$argArr = array();\n\t\t$cond = '';\t\t\n\tif(isset($this->params['pass'][0]) && isset($this->params['pass'][1]) && $this->params['pass'][1] == 'page_record') {\n\t\t$this->Session->write('per_page_record',$this->params['pass'][0]);\n\t}\t\t\n\t\t/* Search conditon for text value */\n\t\tif(!empty($this->data)) {\n\t\t\t$search = $this->data['Role']['search'];\n\t\t\t$this->Session->write('data_search',$this->data['Role']);\n\t\t\t\tif($this->Session->read('param_search')) {\n\t\t\t\t\t$this->Session->delete('param_search');\n\t\t\t\t}\t\t\t\n\t\t}\n\t\telse if(isset($this->params['named']['search']) && $this->params['named']['search']) {\n\t\t\t $this->Session->write('param_search',$this->params['named']);\n\t\t\t\t if($this->Session->read('data_search')) {\n\t\t\t\t\t$this->Session->delete('data_search');\n\t\t\t\t}\t\t\t \n\t\t\t \n\t\t}\n\t\telse if($this->Session->read('data_search')) {\n\t\t\t$search = $this->Session->read('data_search.search');\n\t\t\t\tif($this->Session->read('param_search')) {\n\t\t\t\t\t$this->Session->delete('param_search');\n\t\t\t\t}\t\t\n\t\t}\n\t\telse if($this->Session->read('param_search')) {\n\t\t\t$search = $this->Session->read('param_search.search');\n\t\t\t\t if($this->Session->read('data_search')) {\n\t\t\t\t\t$this->Session->delete('data_search');\n\t\t\t\t}\t\t\n\t\t}\n\t\tif($search) {\n\t\t\t$argArr['search'] = $search;\n\t\t $cond[] = array('OR'=>array('Role.role_name LIKE'=>'%'.$search.'%'));\n\t\t}\n\t\t$this->set('search', $search); \n\t\t$this->set('argArr', $argArr);\n\t\t/* End Search conditon for text value */\n\t\t$condition = $cond;\n\t\t$record = ($this->Session->read('per_page_record')) ? $this->Session->read('per_page_record') : ADMIN_PER_PAGE_RECORD;\n\t\t$this->paginate = array('limit' =>$record,'order' => array('Role.role_name' => 'ASC'));\n\t\t$data = $this->paginate('Role', $condition);\n\t\t$this->set('data', $data); \n\t }", "public function search()\n {\n $user = UserAccountController::getCurrentUser();\n if ($user === null) {\n return;\n }\n $view = new View('search');\n echo $view->render();\n }", "public function searchIndex($params)\n {\n $query=\"select*from was.v_spwas where no_register='\".$_SESSION['was_register'].\"' and id_tingkat='\".$_SESSION['kode_tk'].\"' and id_kejati='\".$_SESSION['kode_kejati'].\"' and id_kejari='\".$_SESSION['kode_kejari'].\"' and id_cabjari='\".$_SESSION['kode_cabjari'].\"' and id_wilayah='\".$_SESSION['id_wil'].\"' and id_level1='\".$_SESSION['id_level_1'].\"' and id_level2='\".$_SESSION['id_level_2'].\"' and id_level3='\".$_SESSION['id_level_3'].\"' and id_level4='\".$_SESSION['id_level_4'].\"'\";\n $keyWord = htmlspecialchars($_GET['SpWas1Search']['cari'], ENT_QUOTES);\n if($_GET['SpWas1Search']['cari']!=''){\n $query .=\" and (upper(nomor_sp_was1) like'%\".strtoupper($keyWord).\"%'\";\n $query .=\" or upper(terlapor) like'%\".strtoupper($keyWord).\"%')\"; \n }\n\n\n // add conditions that should always apply here\n\n $jml = Yii::$app->db->createCommand(\" select count(*) from (\".$query.\")a \")->queryScalar(); \n $dataProvider = new SqlDataProvider([\n 'sql' => $query,\n 'totalCount' => (int)$jml,\n 'pagination' => [\n 'pageSize' => 10,\n ]\n ]);\n \n\n $this->load($params);\n\n if (!$this->validate()) {\n\n return $dataProvider;\n }\n\n return $dataProvider;\n }", "protected function quicksearch()\n {\n $words = $this->getWords();\n $logged_in = APP_User::isBWLoggedIn('NeedMore,Pending');\n if (!$logged_in) {\n $request = PRequest::get()->request;\n if (!isset($request[0])) {\n $login_url = 'login';\n } else switch ($request[0]) {\n case 'login':\n case 'main':\n case 'start':\n $login_url = 'login';\n break;\n default:\n $login_url = 'login/'.htmlspecialchars(implode('/', $request), ENT_QUOTES);\n }\n } else {\n $username = isset($_SESSION['Username']) ? $_SESSION['Username'] : '';\n }\n\n if (class_exists('MOD_online')) {\n $who_is_online_count = MOD_online::get()->howManyMembersOnline();\n } else {\n // echo 'MOD_online not active';\n if (isset($_SESSION['WhoIsOnlineCount'])) {\n $who_is_online_count = $_SESSION['WhoIsOnlineCount']; // MOD_whoisonline::get()->whoIsOnlineCount();\n } else {\n $who_is_online_count = 0;\n }\n }\n PPostHandler::setCallback('quicksearch_callbackId', 'SearchmembersController', 'index');\n\n require TEMPLATE_DIR . 'shared/roxpage/quicksearch.php';\n }", "private function searchMaster() {\n $id = intval($_POST['query']);\n $data = $this->system->getDB()->query(\"SELECT * FROM master WHERE id=?\", array($id));\n echo(json_encode($data[0]));\n }", "function search($db,$page,$per,$status='',$year=0,$month=0,$userid=0)\r\n\t{\r\n//if($condition=='name'){\r\n//$sql.=\" and b.name like '%\".$keys.\"%'\";\r\n//}\r\n\t\t$sql = \"select * from \".AGENT_TOTAL_TABLE.\" where id>0\";\r\n\t\t\tif($status>-1){\r\n\t\t\t\t$sql.=\" and status ='\".$status.\"'\";\r\n\t\t\t}\r\n\t\t\tif($year>0){\r\n\t\t\t\t$sql.=\" and year ='\".$year.\"'\";\r\n\t\t\t}\r\n\t\t\tif($month>0){\r\n\t\t\t\t$sql.=\" and month ='\".$month.\"'\";\r\n\t\t\t}\r\n\t\t\tif($userid>0){\r\n\t\t\t\t$sql.=\" and agent_userid ='\".$userid.\"'\";\r\n\t\t\t}\r\n\t\t$sql.=\" order by id desc\";\r\n//\t\techo $sql;\r\n\t\t$pager = get_pager_data($db, $sql, $page,$per);\r\n\t\treturn $pager;\r\n\t}", "function getstudent($search)\n {\n $q = \"select * from student where studid like '%$search%' or fname like '%$search%' or midname like '%$search%' or lname like '%$search%' or college like '%$search%' or course like '%$search%' or year like '%$search%' or section like '%$search%' order by section,year,course,college,lname,midname,fname,studid\";\n $r = mysql_query($q);\n\n return $r;\n }", "private function consultar_usuario_por_nombre() {\n $sentencia = \"select id,nombrecompleto ,correo,token \"\n . \"from usuario u where u.nombrecompleto ilike '%{$this->referencia_a_buscar}%'; \";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n }", "function get_login($user,$pass)\n {\n\t\t\t$query = $this->db->query('SELECT * FROM tb_akun AS A\n\t\t\tLEFT JOIN tb_karyawan AS B ON A.id_karyawan = B.id_karyawan\n\t\t\tLEFT JOIN tb_jabatan AS C ON B.id_jabatan = C.id_jabatan \n\t\t\tWHERE A.user = \"'.$user.'\" AND A.pass = \"'.$pass.'\"');\n \n\t\t\tif($query->num_rows() > 0)\n {\n return $query->row();\n }\n else\n {\n return false;\n }\n }", "function login(){\n $query = \"SELECT\n `id_user`, `nama`, `username`, `password`\n FROM\n \" . $this->db_table . \" \n WHERE\n username='\".$this->username.\"' AND password='\".$this->password.\"'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n // execute query\n $stmt->execute();\n return $stmt;\n }", "function searchAction() {\n\t\t$this->getModel()->setPage($this->getPageFromRequest());\n\t\t$this->getInputManager()->setLookupGlobals(utilityInputManager::LOOKUPGLOBALS_GET);\n\t\t$inData = $this->getInputManager()->doFilter();\n\t\t$this->addInputToModel($inData, $this->getModel());\n\t\t$oView = new userView($this);\n\t\t$oView->showSearchLeaderboard();\n\t}", "public static function connected(){\n\t\trequire_once (File::build_path(array('lib','Security.php'))); \n\t\t$pwd= Security::chiffrer($_GET['password']);\n\n\t\tif(ModelBenevole::checkPassword($_GET['login'], $pwd)){\n\t\t\t$id = ModelBenevole::getIDbyLogin($_GET['login']);\n\t\t\t$bene = ModelBenevole::select($id);\n\n\t\t\tif($bene->__get('nonce') == null){ \n\t\t\t\t$id = ModelBenevole::getIDbyLogin($_GET['login']);\n\t\t\t\t$b = ModelBenevole::select($id); \n\t\t\t\t$pagetitle = 'Vous êtes connecté';\n\t\t\t\t$controller = 'benevole';\n\t\t\t\t$view = 'detail'; //renvoie sur le détail \n\t\t\t\t$_SESSION['login'] = $_GET['login'];\n\t\t\t}else{\n\t\t\t\t$pagetitle = 'Compte non validé';\n\t\t\t\t$controller = 'benevole';\n\t\t\t\t$view = 'error'; //renvoie sur l'erreur\n\t\t\t}\n\t\t\trequire_once (File::build_path(array('view','view.php'))); \n\t\t}else{\n\t\t\t$pagetitle = 'Mauvais identifiants et/ou mot de passe';\n\t\t\t$controller = 'benevole';\n\t\t\t$view = 'error';\n\t\t\trequire_once (File::build_path(array('view','view.php'))); \n\t\t}\n\t}", "function bank_search($bank_id ,$bank_kode ,$bank_nama ,$bank_norek ,$bank_atasnama ,$bank_saldo ,$bank_keterangan ,$bank_aktif ,$bank_creator ,$bank_date_create ,$bank_update ,$bank_date_update ,$bank_revised ,$start,$end){\r\n\t\t\tif ($bank_aktif==\"\")\r\n\t\t\t\t$bank_aktif = \"Aktif\";\r\n\t\t\t//full query\r\n\t\t\t$query=\"select * from bank,akun,bank_master WHERE bank_kode=akun_id AND bank_nama=mbank_id\";\r\n\t\t\t\r\n\t\t\tif($bank_id!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_id LIKE '%\".$bank_id.\"%'\";\r\n\t\t\t};\r\n\t\t\tif($bank_kode!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_kode LIKE '%\".$bank_kode.\"%'\";\r\n\t\t\t};\r\n\t\t\tif($bank_nama!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_nama LIKE '%\".$bank_nama.\"%'\";\r\n\t\t\t};\r\n\t\t\tif($bank_norek!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_norek LIKE '%\".$bank_norek.\"%'\";\r\n\t\t\t};\r\n\t\t\tif($bank_atasnama!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_atasnama LIKE '%\".$bank_atasnama.\"%'\";\r\n\t\t\t};\r\n\t\t\tif($bank_saldo!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_saldo LIKE '%\".$bank_saldo.\"%'\";\r\n\t\t\t};\r\n\t\t\tif($bank_keterangan!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_keterangan LIKE '%\".$bank_keterangan.\"%'\";\r\n\t\t\t};\r\n\t\t\tif($bank_aktif!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_aktif LIKE '%\".$bank_aktif.\"%'\";\r\n\t\t\t};\r\n\t\t\tif($bank_creator!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_creator LIKE '%\".$bank_creator.\"%'\";\r\n\t\t\t};\r\n\t\t\tif($bank_date_create!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_date_create LIKE '%\".$bank_date_create.\"%'\";\r\n\t\t\t};\r\n\t\t\tif($bank_update!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_update LIKE '%\".$bank_update.\"%'\";\r\n\t\t\t};\r\n\t\t\tif($bank_date_update!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_date_update LIKE '%\".$bank_date_update.\"%'\";\r\n\t\t\t};\r\n\t\t\tif($bank_revised!=''){\r\n\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t$query.= \" bank_revised LIKE '%\".$bank_revised.\"%'\";\r\n\t\t\t};\r\n\t\t\t$result = $this->db->query($query);\r\n\t\t\t$nbrows = $result->num_rows();\r\n\t\t\t\r\n\t\t\t$limit = $query.\" LIMIT \".$start.\",\".$end;\t\t\r\n\t\t\t$result = $this->db->query($limit); \r\n\t\t\t\r\n\t\t\tif($nbrows>0){\r\n\t\t\t\tforeach($result->result() as $row){\r\n\t\t\t\t\t$arr[] = $row;\r\n\t\t\t\t}\r\n\t\t\t\t$jsonresult = json_encode($arr);\r\n\t\t\t\treturn '({\"total\":\"'.$nbrows.'\",\"results\":'.$jsonresult.'})';\r\n\t\t\t} else {\r\n\t\t\t\treturn '({\"total\":\"0\", \"results\":\"\"})';\r\n\t\t\t}\r\n\t\t}", "public function searchUser_post()\n\t{\n\t\t$tokenData = validateAuthorizationToken($this->input->get_request_header('Authorization'));\n\t\tif($tokenData[\"status\"]) {\n\t\t\t$userId = $tokenData[\"data\"][\"userId\"];\n\t\t\t$user = $this->UserModel->getUserById($userId); // i dati dell'utente.\n\t\t\tif(count($user) <= 0) // utente non trovato con questo id\n\t\t\t\treturn $this->response(buildServerResponse(false, \"Token di accesso non valido. #5\"), 200);\n\n\t\t\t$searchQuery = $this->input->post('query');\n\t\t\t$result = $this->UserModel->searchUser($searchQuery, $userId);\n\t\t\treturn $this->response(buildServerResponse(true, \"ok\", array(\"searchResult\" => $result)));\n\t\t}\n\t\treturn $this->response(buildServerResponse(false, \"Errore autorizzazione.\"), 200);\n\t}", "function bd_usuarios_datos($login) {\n $sql=\"\n SELECT id, nombre, nivel, email\n FROM usuarios\n WHERE id LIKE '{$login}'or email LIKE '{$login}'\";\n $salida = sql2row($sql);\n return $salida;\n}", "function get_cek_login($user,$pass)\n\t\t{\n\t\t\t$query = $this->db->get_where('tb_akun', array('user' => $user,'pass'=>$pass));\n\t\t\tif($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\treturn $query->row();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function search()\n\t{\n\t$searchBy = Input::get('searchBy');\n $kode_akun = Input::get('katakunci');\n $searchResult = DB::table('laporan_kas_harian')->where($searchBy, 'LIKE', '%'.$kode_akun.'%')->get();\n\n return View::make('listpencariandata')\n ->with('searchBy', $searchBy)\n ->with('kode_akun', $kode_akun)\n ->with('searchResult', $searchResult);\n }", "function friendSearchHandler() {\n global $inputs;\n\n $keyword = $inputs['keyword'];\n $res = getAll(\"SELECT a.name,a.email \n FROM member a \n WHERE a.name LIKE '%$keyword%' \n AND a.id NOT IN (\n SELECT apply_member_id \n FROM member_friend_apply \n WHERE status = 0)\"\n );\n\n formatOutput(true, 'success',$res);\n}", "public function actionIndex()\n {\n $query=\\Yii::$app->request->get(\"serach\");\n $obj=DataUser::find()->where(['!=','status','9']);\n\n if(@$query['email']){\n $obj=$obj->andwhere(['email'=>$query['email']]);\n }\n if(@$query['name']){\n $obj=$obj->andwhere(\"name like '%\".$query['name'].\"%'\");\n }\n if(@$query['last_date']){\n $obj=$obj->andwhere(['last_date'=>$query['last_date']]);\n }\n\n $totalCount = $obj->count();\n $pages = new Pagination(['totalCount' =>$totalCount, 'pageSize' => 20]);\n $data=$obj->orderBy(\"created desc\")->offset($pages->offset)->limit($pages->limit)->all();\n \n return $this->render('index', [\n 'data' => $data,'pages'=>$pages,'menu1'=>'pass','menu2'=>'dekaron'\n ]);\n }", "public function index() {\n $usan = $this->session->userdata('nama') ; \n $kue = $this->M_login->hak_ak($usan); \n $query = $this->M_pengguna->listAll();\n $queryauthor = $this->M_pengguna->listAuthor(); \n $dataHalamanku = array(\n 'query' => $query,\n 'da' => $kue,\n //'nama_admin'=>$usan,\n 'q' => $query,\n 'query_author'=>$queryauthor\n );\n $this->load->view('dashboard/v_header',$dataHalamanku);\n $this->load->view('pengguna/v_user'); \n $this->load->view('dashboard/v_footer');\n }", "function searchEmail()\n {\n $result = null;\n $emailPrepareRegister = null;\n $param = getParameter();\n if (!empty($param[0])) {\n $emailPrepareRegister = $param[0];\n $result = $this->model->khachhang->searchEmail($emailPrepareRegister);\n }\n $this->layout->set('null');\n $this->view->load('frontend/searchEmailResult', [\n 'result' => $result\n ]);\n }", "function cariinfo($keyword) {\n\t$query=\" SELECT * FROM informasi ORDER BY id_informasi\n\t\t\t\tWHERE\n\t\t\t judul LIKE '%$keyword%' OR\n\t\t\t tanggal LIKE '%$keyword%' OR\n\t\t\t instansi LIKE '%$keyword%' \n\t\t\t \"; \n\treturn query ($query); // query menghasilkan assoc array dari query, jadi kita memanggil function yang udah dibuat di dalam function baru\n\n}", "function doLogin()\n {\n\n //var_dump($sql);exit;\n /*if($res){*/\n //存入session\n /*session_start();\n $_SESSION['user'] = json_encode($res);*/\n\n //展示数据库\n $sql = 'show databases;';\n $res = $GLOBALS['data']->query($sql)->fetchAll();\n foreach ($res as $k=>$v){\n $res[$k] = $v['Database'];\n }\n //var_dump($res);exit;\n\n include \"views/homePage.html\";\n /*}*/\n }", "public function actionIndex()\n {\n\t\t$query=Was27Inspeksi::findOne(['no_register'=>$_SESSION['was_register'],'id_tingkat'=>$_SESSION['kode_tk'],'id_kejati'=>$_SESSION['kode_kejati'],'id_kejari'=>$_SESSION['kode_kejari'],'id_cabjari'=>$_SESSION['kode_cabjari'],'id_wilayah'=>$_SESSION['was_id_wilayah'],'id_level1'=>$_SESSION['was_id_level1'],'id_level2'=>$_SESSION['was_id_level2'],'id_level3'=>$_SESSION['was_id_level3'],'id_level4'=>$_SESSION['was_id_level4']]);\n\n if(count($query)>0){\n $this->redirect(\\Yii::$app->urlManager->createUrl(\"pengawasan/was27-inspeksi/update?id=\".$query->id_was_27_inspeksi));\n }else{\n $this->redirect(\\Yii::$app->urlManager->createUrl(\"pengawasan/was27-inspeksi/create\"));\n }\n /* echo \"string\";\n exit();\n $searchModel = new DipaMasterSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]); */\n }", "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 caridataAction() {\n \t$nkolom = $_POST['nkolom'];\n\t$ekolom = $_POST['ekolom'];\n\t$this->view->hsldataList = $this->adm_ndatasearch_serv->ndatasearch($nkolom,$ekolom);\n }", "function search() {\n\t$clauses = [];\n\t$params = [];\n\n // When searching for fire/last name, we use like clauses for fuzzy searching.\n buildLikeClause('first_name', 'first_name', $params, $clauses);\n buildLikeClause('last_name', 'last_name', $params, $clauses);\n\n // Do an equality search for the dept.\n if (isset($_GET['dept'])) {\n $dept = trim($_GET['dept']);\n if (strlen($dept)) {\n $clauses[] = \"dept = ?\";\n $params[] = $dept;\n }\n }\n\n // Use equality searching for courses and p_langs.\n buildAlternationSubClause('courses', 'courses', $params, $clauses);\n buildAlternationSubClause('p_langs', 'p_langs', $params, $clauses);\n\n // Connect to the db.\n $db = new PDO(\"mysql:host=localhost;dbname=cmpe226\", \"root\", \"\");\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n // Finish constructing our sql.\n $sql = 'SELECT * FROM studentrecord_assignment1';\n if ($clauses) {\n $sql .= ' where ' . join(' and ', $clauses);\n }\n\n // Execute and fetch.\n $stmt = $db->prepare($sql);\n $stmt->execute($params);\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n}", "public function search_user($username,$surname,$email,$phone){\n if(!empty($username)){$this->db->like('username', $username);}\n if(!empty($surname)){$this->db->where('surname', $surname);}\n\t if(!empty($email)){$this->db->where('email', $email);}\n\t if(!empty($phone)){$this->db->where('phone', $phone);}\n\t // if(!empty($acc_company_name)){$this->db->where('acc_company_name', $acc_company_name);}\n\t \n\t //two not empty with username\n \n if(!empty($username) && !empty($surname)){$this->db->where(array('username' => $username, 'surname' => $surname));}\n if(!empty($username) && !empty($email)){$this->db->where('username',$username); $this->db->where('email', $email);}\n\t if(!empty($username) && !empty($phone)){$this->db->where(array('username' => $username, 'phone' => $phone));}\n\t // if(!empty($username) && !empty($acc_company_name)){$this->db->where(array('username' => $username, 'acc_company_name' => $acc_company_name));}\n\t \n\t //two not empty with surname\n if(!empty($surname) && !empty($username) ){$this->db->where('surname', $surname);$this->db->where('username', $username);}\n\t if(!empty($surname) && !empty($email) ){$this->db->where('surname', $surname);$this->db->where('email', $email);}\n\t if(!empty($surname) && !empty($phone) ){$this->db->where('surname', $surname);$this->db->where('phone', $phone);}\n\t// if(!empty($surname) && !empty($acc_company_name) ){$this->db->where('surname', $surname);$this->db->where('acc_company_name', $acc_company_name;}\n\t \n\t //two not empty with phone\n if(!empty($phone) && !empty($username) ){$this->db->where('phone', $phone);$this->db->where('username', $username);}\n\t if(!empty($phone) && !empty($email) ){$this->db->where('phone', $phone);$this->db->where('email', $email);}\n\t if(!empty($phone) && !empty($surname) ){$this->db->where('phone', $phone);$this->db->where('surname', $surname);}\n//\t if(!empty($phone) && !empty($acc_company_name) ){$this->db->where('phone', $phone);$this->db->where('acc_company_name', $acc_company_name;}\n\t \n\t //two not empty with email\n if(!empty($surname) && !empty($email)){$this->db->where('email' , $email);$this->db->where('surname', $surname);}\n\t if(!empty($username) && !empty($email)){$this->db->where('email' , $email);$this->db->where('username', $username);}\n\t if(!empty($phone) && !empty($email)){$this->db->where('email' , $email);$this->db->where('phone', $phone);}\n\t // if(!empty($acc_company_name) && !empty($email)){$this->db->where('email' , $email);$this->db->where('acc_company_name', $acc_company_name);}\n\t \n\t \n\t //three not empty with username\n if(!empty($username) && !empty($surname) && !empty($email) ){$this->db->like('username', $username);$this->db->where(array('surname' => $surname, 'email' => $email));}\n\t \n\t if(!empty($username) && !empty($surname) && !empty($phone) ){$this->db->like('username', $username);$this->db->where(array('surname' => $surname, 'phone' => $phone));}\n\t \n\t //three not empty with email\n\t if(!empty($username) && !empty($phone) && !empty($email) ){$this->db->like('username', $username); $this->db->or_like('email', $email); $this->db->where('phone', $phone); }\n\t \n\t if(!empty($username) && !empty($surname) && !empty($email) ){$this->db->like('username', $username); $this->db->or_like('email', $email); $this->db->where('surname', $surname); }\n\t \n\t if(!empty($surname) && !empty($phone) && !empty($email) ){$this->db->where('surname', $surname); $this->db->or_like('email', $email); $this->db->where('phone', $phone); }\n\t \n\t \n\t //All Not Empty\n\t \n if(!empty($username)){$this->db->like('username', $username);}\n if(!empty($surname) && empty($username) ){$this->db->like('surname', $surname);}\n if(!empty($username) && !empty($surname) ){$this->db->or_like('surname', $surname);} \n if(empty($surname) && empty($username) && !empty($email)){$this->db->like('email', $email);}\n if(!empty($username) || !empty($surname) ){ if(!empty($email)){$this->db->or_like('email', $email);}}\n if(empty($surname) && empty($username) && empty($email) && !empty($phone) ){$this->db->like('phone', $phone);}\n if(!empty($username) || !empty($surname) || !empty($email) ){ if(!empty($phone)){$this->db->or_like('phone', $phone);}}\n $query = $this->db->get('user');\n return $query->result_array();\n }", "function cari($keyword)\n{\n $query_cari = \"SELECT * FROM mahasiswa WHERE \n nama LIKE '%$keyword%' OR \n nip LIKE '%$keyword%' OR \n email LIKE '%$keyword%' OR \n jurusan LIKE '%$keyword%'\n ORDER BY id DESC;\n \";\n\n // memanggil variable query yang pertama \n return query($query_cari);\n}", "public function check(){ \r\n $username = $this->validate($_POST['username']);\r\n $password = md5($this->validate($_POST['password']));\r\n \r\n $query = $this->admin->selectWhere(array('username'=>$username, 'password'=>$password));\r\n \r\n $data = $this->admin->getResult($query);\r\n $jml = $this->admin->getRows($query);\r\n \r\n if($jml>0){\r\n $data = $data[0];\r\n $_SESSION['username'] = $data['username'];\r\n $_SESSION['password'] = $data['password'];\r\n \r\n $this->redirect('admin');\r\n }else{\r\n $view = $this->view('admin/login');\r\n $view->bind('msg', 'Username atau Password salah!');\r\n }\r\n \r\n }", "public function search_student(){\n\t\t$this->verify();\n\t\t$this->load->library('form_validation');\n\t\t$this->form_validation->set_rules('search', \"Search\", 'trim|required');\n\t\tif($this->form_validation->run()){\n\t\t\t$data['search_result']=$this->admin_model->search_student($this->input->post('search'));\n\t\t\t$this->load->view('students/searchResult', $data);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tform_error('search');\n\t\t}\n\t}", "function cekLogin($username,$password)\n\t{\n\t\t$pwd \t= md5($password);\n\t\t// cek login\n\t\t$query \t= $this->db->where('username',$username)\n\t\t\t\t\t\t ->where('password',$pwd)\n\t\t\t\t\t\t ->get('admin');\n\t\treturn $query;\t\t\n\t}", "public function userSearch()\n {\n $query = $this->input->post('query');\n $data['results'] = $this->admin_m->search($query);\n $data['query'] = $query;\n $data['content'] = 'admin/searchResults';\n $this->load->view('components/template', $data);\n }", "public function searchAdmin()\n {\n $this->connect();\n $bind = $this->bind($this->conn);\n $filter = sprintf($this->to_filter_admin, $this->login);\n if ($this->to_get_type_admin == 'string') {\n $wanted = array($this->to_get_admin);\n }\n if ($this->to_get_type_admin == 'array') {\n $to_get_array = explode(',', $this->to_get_admin);\n }\n $sr = ldap_search($this->conn, $this->dn, $filter, $wanted);\n $sr_res = ldap_get_entries($this->conn, $sr);\n $result = $sr_res;\n ldap_close($this->connect());\n\n return $result;\n }", "public function getSearch();", "public function search()\n {\n if (!$this->current_user->has_permission('USER_LIST')) {\n return redirect();\n }\n\n $view_data = [\n 'menu_active' => 'li_user'\n ];\n\n $pagination = [\n 'page' => (int) $this->input->get_or_default('p', 1),\n 'limit' => (int) $this->input->get_or_default('limit', PAGINATION_DEFAULT_LIMIT)\n ];\n\n $pagination['offset'] = ($pagination['page'] - 1) * $pagination['limit'];\n\n // Get list users\n $users = $this->_api('user')->search_list(array_merge($this->input->get(), [\n 'limit' => $pagination['limit'],\n 'offset' => $pagination['offset'],\n 'sort_by' => 'id',\n 'sort_position' => 'desc'\n ]), [\n 'with_deleted' => TRUE,\n 'point_remain_admin' => TRUE\n ]);\n\n if (isset($users['result'])) {\n $view_data['users'] = $users['result']['items'];\n $pagination['total'] = $users['result']['total'];\n }\n\n $view_data['search'] = $pagination['search'] = $this->input->get();\n $view_data['pagination'] = $pagination;\n $view_data['csv_download_string'] = '/user/download_csv?' . http_build_query($this->input->get());\n\n $this->_breadcrumb = [\n [\n 'link' => '/user/search',\n 'name' => 'ユーザー検索'\n ]\n ];\n\n return $this->_render($view_data);\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('username', $this->username, true);\n $criteria->compare('email', $this->email, true);\n $criteria->compare('password_hash', $this->password_hash, true);\n $criteria->compare('temp_password', $this->temp_password, true);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('birthday', $this->birthday, true);\n $criteria->compare('identity_number', $this->identity_number, true);\n $criteria->compare('date_of_issue', $this->date_of_issue, true);\n $criteria->compare('place_of_issue', $this->place_of_issue, true);\n $criteria->compare('date_in', $this->date_in, true);\n $criteria->compare('code_account', $this->code_account, true);\n $criteria->compare('img_avatar', $this->img_avatar, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('address_vi', $this->address_vi, true);\n $criteria->compare('house_numbers', $this->house_numbers, true);\n $criteria->compare('province_id', $this->province_id);\n $criteria->compare('district_id', $this->district_id);\n $criteria->compare('ward_id', $this->ward_id);\n $criteria->compare('street_id', $this->street_id);\n $criteria->compare('login_attemp', $this->login_attemp);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('last_logged_in', $this->last_logged_in, true);\n $criteria->compare('ip_address', $this->ip_address, true);\n $criteria->compare('role_id', $this->role_id);\n if (CommonProcess::isUserAdmin()) {\n // Root admin\n } else {\n // The other roles\n $criteria->addCondition('t.role_id !=' . Roles::getRoleByName(Roles::ROLE_ADMIN)->id);\n $criteria->addCondition('t.role_id !=' . Roles::getRoleByName(Roles::ROLE_MANAGER)->id);\n }\n $criteria->compare('application_id', $this->application_id);\n $criteria->compare('department_id', $this->department_id);\n $criteria->compare('contract_type_id', $this->contract_type_id);\n $criteria->compare('base_salary', $this->base_salary);\n $criteria->compare('social_insurance_salary', $this->social_insurance_salary);\n $criteria->compare('responsible_salary', $this->responsible_salary);\n $criteria->compare('subvention', $this->subvention);\n $criteria->compare('status', $this->status);\n $criteria->compare('gender', $this->gender, true);\n $criteria->compare('phone', $this->phone, true);\n $criteria->compare('verify_code', $this->verify_code, true);\n $criteria->compare('slug', $this->slug, true);\n $criteria->compare('address_temp', $this->address_temp, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->order = 'id DESC';\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => Settings::getListPageSize(),\n ),\n ));\n }", "function verif_login($login) {\r\n // mise en caractere majuscule du login à tester\r\n $identifiant = strtoupper($login);\r\n \r\n // ecriture de la requette à executer\r\n $requette = sprintf (\"SELECT * FROM voyant WHERE login='%s'\",vers_base($identifiant));\r\n \r\n //verification que la base de donnée existe si oui $ok = VRAIS/TRUE sinon FAUX/FALSE\r\n $ok = (($base_voyant = sqlite_open('../bases_de_donnees/base_voyant.db'))!= FALSE );\r\n \r\n // execution de la requette si $ok est vrais sinon on passe\r\n if ($ok) { $ok = (($resultat_requette = sqlite_query($base_voyant,$requette)) != FALSE);}\r\n \r\n // si la base existe et que la requette à pu etre executer \r\n // alors on met celle-ci en tableau pour lire la ligne\r\n if ($ok) { $ligne = sqlite_fetch_array($resultat_requette); }\r\n \r\n // on lit la ligne de verification si le pseudo existe\r\n // la fonction empty permet de savoir si la ligne elle-même existe\r\n // et apres etre sure que le login existe\r\n $existe = ((! empty($ligne)) and ($ligne[\"login\"] == $identifiant));\r\n \r\n // retour du resultat VRAIS/TRUE si existe et FAUX/FALSE si n'existe pas\r\n return $existe;\r\n }", "function searchStaff($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n session_start();\n $OrgID=$_SESSION['OrgID'];\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\n $searchTxt=$post['searchTxt'];\n $sql=\"SELECT st.*\n FROM SCP_Staff as st\n INNER JOIN SCP_UserLogin as ulogin ON st.UserID=ulogin.UserID where st.OrgID='\".$OrgID.\"' and st.Name LIKE '\".$searchTxt.\"%'\";\n $result = mysql_query($sql);\n \n //CHECK FOR ERROR\n if (!$result) die('Invalid query: ' . mysql_error());\n $rows = array();\n while($row = mysql_fetch_assoc($result)) {\n $rows[] = $row;\n }\n if($rows) {\n $data['responseData'] = $rows;\n $data['message'] = \"All staff get successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = \"No Staff Found\";\n $data['responseCode'] = \"201\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}" ]
[ "0.66607034", "0.6647163", "0.6614217", "0.6589859", "0.6589859", "0.65705675", "0.65460926", "0.6485628", "0.6476908", "0.6459321", "0.6457877", "0.63821626", "0.63782364", "0.6354914", "0.63479495", "0.63308454", "0.63308454", "0.6319413", "0.6314112", "0.62959445", "0.6285463", "0.62676626", "0.62551045", "0.6240853", "0.62354", "0.6207303", "0.6174474", "0.6163905", "0.6157341", "0.6118228", "0.6100212", "0.6083874", "0.6082454", "0.60789835", "0.60772496", "0.6074889", "0.60747874", "0.60747874", "0.606302", "0.60427266", "0.603827", "0.60321945", "0.6028602", "0.6019645", "0.60189545", "0.6012443", "0.6011228", "0.60094327", "0.6009218", "0.60051674", "0.6004638", "0.60032344", "0.59945655", "0.59924686", "0.5988946", "0.5981498", "0.59811985", "0.59765995", "0.5974704", "0.59710556", "0.59574956", "0.59499454", "0.5937532", "0.5932039", "0.5931484", "0.5923855", "0.5922969", "0.5921838", "0.5920437", "0.5909368", "0.5901986", "0.5899365", "0.58856994", "0.5874211", "0.5871593", "0.5867041", "0.5865438", "0.58634096", "0.5857261", "0.58447015", "0.58377683", "0.5834758", "0.58320934", "0.58297527", "0.5829057", "0.5828968", "0.58272797", "0.58265305", "0.58243227", "0.58206093", "0.5819398", "0.581888", "0.5818687", "0.58119965", "0.5810748", "0.58106154", "0.58062595", "0.5801288", "0.5797836", "0.5796766", "0.57938987" ]
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8399559", "0.8375976", "0.8375976", "0.8342963", "0.825244", "0.824597", "0.82116634", "0.81456405", "0.81095356", "0.80819404", "0.79899764", "0.7988185", "0.79821676", "0.7959435", "0.79494536", "0.79476935", "0.7925", "0.7913219", "0.78985447", "0.7892049", "0.7888783", "0.78885525", "0.7860001", "0.7839742", "0.7839742", "0.7836824", "0.7823007", "0.7810926", "0.7806934", "0.77903354", "0.7786534", "0.7781346", "0.77802587", "0.7761786", "0.7752098", "0.77181315", "0.77181315", "0.77142626", "0.7711265", "0.77023965", "0.76929665", "0.7690725", "0.76904184", "0.76890206", "0.76723206", "0.7665594", "0.7664652", "0.7654854", "0.7648983", "0.76413405", "0.76408315", "0.7639785", "0.763341", "0.76287645", "0.762751", "0.76264757", "0.7619986", "0.7619986", "0.761193", "0.76025206", "0.7601517", "0.7601157", "0.7601157", "0.7600066", "0.75978255", "0.75942534", "0.7586907", "0.7584423", "0.7578891", "0.75615716", "0.75516856", "0.75510263", "0.7550412", "0.7542515", "0.75408965", "0.7537727", "0.75362265", "0.7527483", "0.7514947", "0.75127167", "0.7498631", "0.749526", "0.7493661", "0.7490471", "0.74865395", "0.7486299", "0.7478914", "0.74754286", "0.74708784", "0.7470241", "0.7463862", "0.74629074", "0.74623996", "0.74613595", "0.74610263", "0.7447454", "0.74386954", "0.7435271", "0.7432479", "0.7431103", "0.742201" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'name' => 'required|max:255', 'tel' => 'required|max:10', 'email' => 'required|email|max:255', 'content' => 'required|max:255', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Run the database seeds.
public function run() { $organizationTypesNames = [ [ 'fr' => 'École de danse', 'en' => 'Dance School' ], [ 'fr' => 'Groupe indépendant', 'en' => 'Independent Group' ], [ 'fr' => 'Danseur indépendant', 'en' => 'Independent Dancer' ], ]; foreach($organizationTypesNames as $names) { $organizationType = new OrganizationType(); foreach($names as $locale => $name) { app()->setLocale($locale); $organizationType->name = $name; } $organizationType->save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => 'simpleadressemail@mail.com', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"admin@admin.com\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => 'admin@petstore.com',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => 'prosales@researchmobile.co',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => 'movil@researchmobile.co',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'test@yandex.ru'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => 'admin@yahoo.com',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => 'programmerlemar@gmail.com',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => 'qwerty@gmail.com',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> 'admin@example.com',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => 'briedis@aa.bb',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => 'briedis2@aa.bb',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => 'admin@admin.com',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => 'ignacio@dh.com',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'alice@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'bob@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = your.email@domain.com\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'papesambandour@hotmail.com',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => 'rognales@gmail.com',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => 'sonic21danger@gmail.com',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => 'sovon.kucse@gmail.com']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'abada@gmail.com',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','abada@gmail.com')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => 'eddyjaair@gmail.com']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => 'barbozagonzalesjose@gmail.com',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => 'russell@gmail.com',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => 'bitfumes@gmail.com',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => 'paul@gmail.com',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => 'pkw@pkw.com',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => 'empresa02@gmail.com',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => 'carlos@email.com',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'izzanniroshlei@gmail.com',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'aina@gmail.com',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'sab@gmail.com',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => 'pedrito@juase.com',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'hienphan18112015@gmail.com', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'haphan@gmail.com', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Construtor do Controlador Basico_OPController_FormularioAssocclElementoAssocclValidatorOPController.
protected function __construct() { // chamando construtor da classe pai parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function camposObligatorios()\n {\n $this->setRequiredField(\"mascara\");\n $this->setRequiredField(\"etiqueta\");\n/*\n $this->setRequiredField(\"id_padre\");\n*/\n $this->setRequiredField(\"posicion\");\n $this->setRequiredField(\"visible\");\n $this->setRequiredField(\"nivel_acceso\");\n/*\n $this->setRequiredField(\"accion\");\n*/\n\n return;\n }", "public function validator()\n {\n\n return TipoContratoValidator::class;\n }", "public function validate($validateCascade = false)\n {\n Logger::getInstance()->po_log(\"PO:validate \" . get_class($this));\n \n // Preprocesamiento para validar\n // http://code.google.com/p/yupp/issues/detail?id=72\n $this->preValidate();\n \n\n // Si tiene restriccion nullable(true) o blank(true) y el valor es nulo o vacio,\n // deberia dar que valida aunque haya otra restriccion que falle para el valor.\n\n $valid = true;\n \n //$this->errors = array(); // Reset de los errores actuales\n $this->errors = new Errors(); // core.validation.Errors\n \n $this->validated = true; // Se setea al ppio para que la cascada no generar loops de validacion,\n // asi ve que esta instancia tiene validated en true y no intenta revalidarla.\n\n if ( is_array($this->constraints) )\n {\n foreach ( $this->constraints as $attr => $constraintArray )\n {\n //Logger::getInstance()->po_log(\"PO:validate B ($attr)\");\n \n // =========================================\n // FIXME: reutilizar validateOnly\n // =========================================\n \n // Si la restriccion es para un hasOne, aunque sea validacion sin cascada,\n // igual con esto pide el valor del hasOne y trata de validarlo contra la restriccion.\n $value = ( (isset($this->attributeValues[$attr]) || array_key_exists($attr, $this->attributeValues)) ? $this->attributeValues[$attr] : NULL );\n \n // ===============================================================\n // TICKET: http://code.google.com/p/yupp/issues/detail?id=20\n // Si el valor es null, pregunta por restriccion nullable,\n // que si da ok, no verifica las demas restricciones.\n // Esto es porque si es nullable(true) y el valor es null,\n // las demas restricciones para el mismo atributo no tienen\n // sentido de verificarse porque es posible que den false\n // (min, inList, etc). Se hace un continue para segur verificando\n // las restricciones de otros atributos.\n\n if ($value === NULL)\n {\n $nullable = $this->getConstraintOfClass($attr, 'Nullable');\n if (isset($nullable) && $nullable->evaluate($value))\n {\n continue; // Deja de ver restricciones para el atributo actual y sigue con el siguiente\n }\n }\n else if ($value === '') // Si el valor es vacio, hace lo mismo que nullable por con Blank\n {\n $blank = $this->getConstraintOfClass($attr, 'BlankConstraint');\n if (isset($blank) && $blank->evaluate($value))\n {\n continue; // Deja de ver restricciones para el atributo actual y sigue con el siguiente\n }\n }\n\n // Ve el resto de las restricciones\n foreach ( $constraintArray as $constraint )\n {\n // TODO: Cuando se validen relaciones, value podria ser un objeto, si la restriccion se puso para una relacion.\n // Mas abajo se usa el value para armar el string de error y falla si es objeto no tiene toString.\n \n if (!$constraint->evaluate($value))\n {\n $valid = false;\n\n // Genera mensaje de error\n YuppLoader::load('core.validation','ValidationMessage');\n $err = ValidationMessage::getMessage( $constraint, $attr, $value );\n \n $this->errors->add($attr, $err);\n }\n }\n }\n }\n \n // http://code.google.com/p/yupp/issues/detail?id=50\n if ($validateCascade)\n {\n foreach ( $this->hasOne as $attr => $clazz )\n {\n $inst = $this->attributeValues[ $attr ];\n if ($inst !== NULL && $inst !== PersistentObject::NOT_LOADED_ASSOC && !$inst->validated)\n {\n if (!$inst->validate(true)) // Sigue validando en cascada\n {\n $valid = false;\n }\n }\n }\n }\n\n return $valid;\n }", "public function newAssocForm()\n {\n $assocs = $this->assocManager->getAssocs();\n require_once 'vue/new.assoc.view.php';\n }", "public function rules()\n {\n\n $id = '';\n if ($this->segments() !== null && count($this->segments()) > 0) {\n $id = $this->segments()[count($this->segments()) - 1];\n }\n\n $organizacion_id = $this->input('organizacion_id');\n\n $validators = [\n 'nombre' => 'required|max:200',\n 'nombre_visualizacion' => 'required|max:200',\n 'numero_documento' => 'max:20',\n 'moneda_simbolo' => 'max:5',\n 'cp_nombres' => 'required|max:200|regex:/^[a-zA-ZáéíóúÁÉÍÓÚ0-9_. ]*$/',\n 'cp_apellido_paterno' => 'nullable|max:50|regex:/^[a-zA-ZáéíóúÁÉÍÓÚñÑ0-9_. ]*$/',\n 'cp_apellido_materno' => 'nullable|max:50|regex:/^[a-zA-ZáéíóúÁÉÍÓÚñÑ0-9_. ]*$/',\n 'numero_documento' => 'unico:cuentas,numero_documento,' . $id . ',' . $organizacion_id,\n ];\n return $validators;\n }", "public function rules() {\n return array(\n array('cedula,nombre, apellido, correoElectronico, fechaNacimiento, ciudad, genero, fechaNacimiento, tieneHijos, \n tieneMascotas, telefonoFijo, telefonoCelular, profesion, ocupacion', \n 'required', 'message' => '{attribute} no puede estar vacío'),\n array('condiciones', 'required', 'message' => 'Aceptar términos y condiciones'),\n //array('cedula', 'numerical','integerOnly' => true),\n //array('cedula', 'length', 'min'=>5, 'max'=>12),\n array('correoElectronico', 'email', 'allowEmpty' => false),\n array('fechaNacimiento', 'date', 'format' => 'yyyy-M-d', 'allowEmpty' => true),\n array('genero', 'in', 'range' => array(1, 2), 'allowEmpty' => true),\n array('cedula, nombre, apellido, correoElectronico', 'length', 'max' => 50),\n array('cedula,nombre, apellido, correoElectronico, fechaNacimiento, genero, fechaNacimiento, tieneHijos, \n tieneMascotas, telefonoFijo, telefonoCelular, codigoVerificacion, ocupacion','safe'),\n array('correoElectronico', 'validarCorreo' ),\n //array('solicitarVerificacion', 'validarCodigo' ),\n );\n }", "public function validator()\n {\n\n return ProfessorResponsavelCursoValidator::class;\n }", "public function rules() {\r\n return array(\r\n array('cedula, condiciones, nombre, apellido, correoElectronico, genero, fechaNacimiento, condiciones', 'attributeTrim'),\r\n \r\n array('cedula', 'required', 'on' => 'registro', 'message' => '{attribute} no puede estar vacío'),\r\n array('condiciones', 'required', 'on' => 'registro', 'message' => 'Aceptar términos y condiciones'),\r\n array('cedula', 'numerical','integerOnly'=>true),\r\n array('cedula', 'length', 'min'=>5, 'max'=>12),\r\n array('nombre, apellido', 'required', 'on' => 'registro, actualizar', 'message' => '{attribute} no puede estar vacío'),\r\n array('clave, claveConfirmar', 'required', 'on' => 'registro, restablecer, contrasena', 'message' => '{attribute} no puede estar vacío'),\r\n array('clave, claveConfirmar', 'length', 'min'=>5, 'max'=>15, 'on' => 'registro, restablecer, contrasena'),\r\n array('correoElectronico', 'email', 'on' => 'registro, actualizar', 'allowEmpty' => false),\r\n array('fechaNacimiento', 'date', 'on' => 'registro, actualizar', 'format' => 'yyyy-M-d', 'allowEmpty' => true),\r\n array('genero', 'in', 'range' => array(1, 2), 'on' => 'registro, actualizar', 'allowEmpty' => true),\r\n array('genero, fechaNacimiento', 'default', 'on' => 'registro, actualizar', 'value' => null),\r\n \r\n \r\n array('cedula, nombre, apellido, correoElectronico', 'length', 'max' => 50),\r\n \r\n array('claveConfirmar', 'validarClave', 'on' => 'registro, restablecer, contrasena'),\r\n array('cedula', 'safe', 'on' => 'restablecer, actualizar'),\r\n array('profesion', 'safe', 'on' => 'actualizar'),\r\n array('profesion', 'default', 'value' => null),\r\n array('profesion', 'validarProfesion'),\r\n array('cedula', 'validarCedula', 'on' => 'registro'),\r\n array('correoElectronico', 'validarCorreo', 'on' => 'registro, actualizar'),\r\n );\r\n }", "public function validator()\n {\n\n return AvaliacoeValidator::class;\n }", "public function validator()\n {\n\n return OccupationValidator::class;\n }", "public function initializeControllerArgumentsBaseValidators() {}", "public function validator()\n {\n\n return ProjetoValidator::class;\n }", "public function rules()\n\t{\n\n \t\treturn array(\n array('site, compteEMVactif, SFAccountsMap, porteurFolder,porteurAlias, porteurMap, porteurDNS', 'required'),\n array(\n\t\t\t\t\t 'compteEMVactif, \n\t\t\t\t\t SFAccountsMap,\n\t\t\t\t\t porteurFolder,\n\t\t\t\t\t porteurAlias, \n\t\t\t\t\t porteurMap, \n\t\t\t\t\t porteurDNS, \n\n\t\t\t\t\t porteurWebformUpdateClient,\n\t\t\t\t\t \n\t\t\t\t\t porteurWebformInscrirClient, \n\t\t\t\t\t porteurWebformDesinscrirClient,\n\t\t\t\t\t UrlRefundDone, \n\t\t\t\t\t UrlRefundReceived, \n\t\t\t\t\t UrlResendProduct,\n\t\t\t\t\t UrlResendProductV1, \n\t\t\t\t\t porteurMail, \n\t\t\t\t\t imageFolder',\n\t\t\t\t\t \n\t\t\t\t\t 'match', 'pattern' => '/^[a-zA-Z0-9_\\- .:\\/]*$/',\n\t\t\t\t\t 'message' => 'Invalid characters.',\n\t\t\t\t\t ),\n\t\t\t\t\t array(\n\t\t\t\t\t 'site, \n\t\t\t\t\t porteurName,\n\t\t\t\t\t DefaultSite,\n\t\t\t\t\t porteur, \n\t\t\t\t\t compte,\n\t\t\t\t\t \tSFAccountsMap,'\n\t\t\t\t\t ,\n\t\t\t\t\t \n\t\t\t\t\t 'match', 'pattern' => '/^[a-zA-Z0-9_ .:\\/]*$/',\n\t\t\t\t\t 'message' => 'Invalid characters.',\n\t\t\t\t\t ),\n\t\t\t\t\t );\n\n\t}", "public function rules()\n {\n return [\n 'apoderado' => ['required','max:100'],\n 'apPatApo' => ['required','max:100'],\n 'apMatApo' => ['required','max:100'],\n 'fonoApo' => ['required','max:100'],\n 'rutApo' => ['required','max:100'],\n 'dvApo' => ['required','max:100'],\n 'correoApo'=> ['required','max:100']\n ];\n }", "public function rules()\n {\n return [\n //'cve_cliente',\n 'nombre'=>'required',\n //'fec_registro',\n //'tel_fijo',\n //'tel_cel',\n //'mail'=>'email',\n //'calle',\n //'no_exterior',\n //'no_interior',\n //'colonia',\n //'cp',\n //'municipio_id',\n //'estado_id',\n 'st_cliente_id'=>'required',\n //'oferta_id',\n //'medio_id',\n //'expo',\n //'otro_medio',\n 'empleado_id'=>'required',\n //'promociones',\n //'promo_cel',\n //'promo_correo'\n 'archivo'=>'requiredif:doc_cliente_id,1,2,3,4,5,6,7,8,9'\n ];\n }", "protected function validation(){\t\t\n\t\t$this->validate(\"InclusionIn\", array(\n\t\t\t\"field\" => \"mandoc\",\n\t\t\t\"domain\" => array('S', 'N'),\n\t\t\t\"required\" => true\n\t\t));\n\t\tif($this->validationHasFailed()==true){\n\t\t\treturn false;\n\t\t}\n\t}", "public function init() {\n $dcpr_id_processo_digital = new Zend_Form_Element_Hidden('DCPR_ID_PROCESSO_DIGITAL');\n $dcpr_id_processo_digital->setRequired(true)\n ->addValidator('StringLength', false, array(0, 5));\n\n $dcpr_id_documento = new Zend_Form_Element_Hidden('DCPR_ID_DOCUMENTO');\n $dcpr_id_documento->setRequired(true)\n ->addValidator('StringLength', false, array(0, 20));\n\n $dcpr_id_tp_vinculacao = new Zend_Form_Element_Select('DCPR_ID_TP_VINCULACAO');\n $dcpr_id_tp_vinculacao->setRequired(true)\n ->setLabel('Selecione o tipo de juntada:');\n\n $dcpr_dh_vinculacao_doc = new Zend_Form_Element_Text('DCPR_DH_VINCULACAO_DOC');\n $dcpr_dh_vinculacao_doc->setRequired(true)\n ->setLabel('Data e Hora da juntada:');\n\n $dcpr_ic_ativo = new Zend_Form_Element_Checkbox('DCPR_IC_ATIVO');\n $dcpr_ic_ativo->setRequired(true)\n ->setLabel('Ativo:')\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $this->addElements(array($dcpr_id_processo_digital\n , $dcpr_id_documento\n , $dcpr_id_tp_vinculacao\n , $dcpr_dh_vinculacao_doc\n , $dcpr_ic_ativo));\n }", "public static function adicionarCriterioAvaliacao( CriterioAvaliacao $oCriterioAvaliacao ) {\n\n if( !array_key_exists( $oCriterioAvaliacao->getCodigo(), CriterioAvaliacaoRepository::getInstance()->aCriterioAvaliacao ) ) {\n CriterioAvaliacaoRepository::getInstance()->aCriterioAvaliacao[$oCriterioAvaliacao->getCodigo()] = $oCriterioAvaliacao;\n }\n return true;\n }", "public function rules()\n {\n return [\n 'paciente_id' => 'required|min:1',\n 'pagador_id' => 'required|min:1',\n 'regimen' => 'required|min:1',\n 'tipo_servicio' => 'required|min:1',\n 'ips_id' => 'required|min:1',\n 'tipo_paciente' => 'required|min:1',\n 'presentado' => 'required|min:2|max:2',\n 'departamento_id' => 'required|min:1',\n 'municipio_id' => 'required|min:1',\n 'diagnosticos' => 'required|array|min:1',\n\n 'aceptacion_negacion.codigo_aceptacion' => 'required_if:aceptacion_negacion.aceptado_negado,ACEPTADO',\n 'aceptacion_negacion.motivo_negacion' => 'required_if:aceptacion_negacion.aceptado_negado,NEGADO',\n 'aceptacion_negacion.profesional_responsable' => 'required_with:aceptacion_negacion.aceptado_negado',\n ];\n }", "public function rules()\n {\n return [\n 'convocatoria_id' => ['numeric', 'exists:convocatorias,id', 'required'],\n 'tipo_convocatoria_id' => ['numeric', 'exists:tipo_convocatoria,id', 'required'],\n 'sector' => ['bool', 'required_unless:tipo_convocatoria_id,2'],\n 'subsector' => ['bool', 'required_unless:tipo_convocatoria_id,2'],\n 'confidencial' => ['bool', 'required'],\n 'recomendaciones' => ['bool', 'required_if:tipo_convocatoria_id,1', 'nullable'],\n 'datos' => ['bool', 'required'],\n 'nombre' => ['string', 'min:10', 'max:150', 'required'],\n 'actividad' => ['string', 'min:10', 'max:400', 'required_if:tipo_convocatoria_id,1', 'nullable'],\n 'problema' => ['string', 'min:10', 'max:500', 'required'],\n 'archivo' => ['file', 'max:10240', 'mimes:pdf', 'nullable']\n ];\n }", "public function init()\r\n {\r\n \t\r\n \r\n \tif(!isset($this->_PROJETOS)){\r\n \t\t$projeto= new Application_Model_DbTable_Projeto();\r\n \t\t$this->_PROJETOS=$projeto->getProjetoCombo() ;\r\n \t} \t\r\n \t$this->setName('FormularioServico');\r\n $FL_VALIDAR_SERVICO= new Zend_Form_Element_Hidden('FL_VALIDAR_SERVICO');\r\n $FL_VALIDAR_SERVICO->addFilter('Int');\r\n $FL_VALIDAR_SERVICO->removeDecorator('Label');\r\n \r\n $ID_SERVICO = new Zend_Form_Element_Hidden('ID_SERVICO');\r\n $ID_SERVICO->addFilter('Int');\r\n $ID_SERVICO->removeDecorator('Label');\r\n \r\n \r\n $FK_OPERADOR = new Zend_Form_Element_Hidden('FK_OPERADOR');\r\n $FK_OPERADOR->addFilter('Int');\r\n $FK_OPERADOR->removeDecorator('Label');\r\n \r\n $FL_PCP = new Zend_Form_Element_Hidden('FL_PCP');\r\n $FL_PCP->addFilter('Int');\r\n $FL_PCP->removeDecorator('Label');\r\n \r\n /* \r\n \r\n \r\n \r\n \r\n \r\n \r\n */\r\n\r\n $FK_TIPO_SERVICO= new Zend_Form_Element_Select('FK_TIPO_SERVICO');\r\n $tipoServico= new Application_Model_DbTable_TipoServico();\r\n $FK_TIPO_SERVICO->setLabel('TIPO PCP');\r\n $FK_TIPO_SERVICO->setMultiOptions( $tipoServico->getTipoServicoCombo() )\r\n ->setRequired(true)\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control select2');\r\n \r\n\t\t\r\n \r\n $FK_PROJETO= new Zend_Form_Element_Hidden('FK_PROJETO');\r\n $FK_PROJETO->addFilter('Int');\r\n $FK_PROJETO->removeDecorator('Label');\r\n \r\n $FK_PROJETO1 = new Zend_Form_Element_Text('FK_PROJETO1');\r\n $FK_PROJETO1->setLabel('PROJETO')\r\n ->setAttrib('class', 'form-control');\r\n\r\n \r\n $DS_SERVICO = new Zend_Form_Element_Textarea('DS_SERVICO');\r\n $DS_SERVICO->setLabel('PCP')\r\n \t\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control ')\r\n \t ->setAttrib('rows', '20');\r\n \r\n $DT_SERVICO = new Zend_Form_Element_Text('DT_SERVICO');\r\n $DT_SERVICO->setLabel('DATA')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control')\r\n ->addPrefixPath('Aplicacao_Validate', 'Aplicacao/Validate/', 'validate')\r\n\t\t\t->addValidator(new Aplicacao_Validate_Data())\r\n ->setAttrib('placeholder', 'Enter serviço ');\r\n \r\n $NR_CARGA_HORARIA = new Zend_Form_Element_Text('NR_CARGA_HORARIA');\r\n $NR_CARGA_HORARIA->setLabel('CARGA HORARIA')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->addValidator('float', true, array('locale' => 'en_US'))\r\n ->setAttrib('class', 'form-control')\r\n ->setAttrib('placeholder', 'Enter carga horária ');\r\n \r\n \r\n \r\n $submit = new Zend_Form_Element_Submit('submit');\r\n $submit->setLabel(\"Adiconar\");\r\n $submit->setAttrib('id', 'submitbutton');\r\n $submit->removeDecorator('DtDdWrapper')\r\n ->setAttrib('class', 'btn btn-primary button')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label'); \r\n \r\n $this->addElements(array($FK_PROJETO1,$FL_VALIDAR_SERVICO,$ID_SERVICO,$FK_PROJETO,$DS_SERVICO,$FK_OPERADOR,$FK_TIPO_SERVICO,$DT_SERVICO,$FL_PCP,$NR_CARGA_HORARIA,$submit)); \r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioPcpProjeto.phtml')))); \r\n\t\r\n }", "protected function initializeActionMethodValidators() {}", "public function configure()\n {\n $this->validatorSchema['correo'] = new sfValidatorEmail();\n\n $this->validatorSchema['seccion'] = new sfValidatorChoice(array(\n 'choices' => array_keys(PersonaPeer::$seccion),\n ));\n\n /*\n * Se agrega el listbox con las secciones disponibles\n */\n\n $this->widgetSchema['seccion'] = new sfWidgetFormChoice(array(\n 'choices' => PersonaPeer::$seccion,\n 'multiple' => false,\n 'expanded' => false,\n ));\n /*\n * Se modifican los labels del formulario para que los nombres de los\n * atributos tengan mejor presentacion\n */\n $this->widgetSchema->setLabels(array(\n 'segundonombre' => 'Segundo Nombre',\n 'segundoapellido' => 'Segundo Apellido',\n ));\n/*\n * Se modifica la plantilla para que no se muestre los campos tipo,cuenta,clave\n * y estado ya que estos atributos se llenan por defecto o a través de metodos\n * automatizados.\n */\n unset(\n $this['tipo'],\n $this['cuenta'],\n $this['clave'],\n $this['estado']\n );\n\n // Validadores de tipo de requerimiento. Los campos no pueden estar vacios //\n $this->validatorSchema['nombre']->addMessage('required',\n 'Debes indicar el Nombre');\n $this->validatorSchema['segundonombre']->addMessage('required',\n 'Debes indicar el Segundo Nombre');\n $this->validatorSchema['apellido']->addMessage('required',\n 'Debes indicar el Apellido');\n $this->validatorSchema['correo']->addMessage('required',\n 'Debes indicar el Correo');\n $this->validatorSchema['segundoapellido']->addMessage('required',\n 'Debes indicar el Segundo Apellido');\n \n // Validadores del máximo de campo. Los campos no pueden exceder de un límite //\n $this->validatorSchema['nombre']->addMessage('max_length',\n 'El nombre del Alumno no debe exceder de 45 caracteres');\n $this->validatorSchema['segundonombre']->addMessage('max_length',\n 'El segundo nombre del Alumno no debe exceder de 45 caracteres');\n $this->validatorSchema['apellido']->addMessage('max_length',\n 'El apellido del Alumno no debe exceder de 45 caracteres');\n $this->validatorSchema['segundoapellido']->addMessage('max_length',\n 'El segundo apellido del Alumno no debe exceder de 45 caracteres');\n $this->validatorSchema['correo']->addMessage('max_length',\n 'El correo del Alumno no debe exceder de 80 caracteres');\n\n // Validadores del máximo de campo. Los campos no pueden exceder de un límite //\n $this->widgetSchema['nombre']->setAttribute('size', '50');\n $this->widgetSchema['segundonombre']->setAttribute('size', '50');\n $this->widgetSchema['apellido']->setAttribute('size', '50');\n $this->widgetSchema['segundoapellido']->setAttribute('size', '50');\n $this->widgetSchema['correo']->setAttribute('size', '50');\n }", "protected function validaObligatorios() {\n $this->controlaValidezLista($this->armaArrayClavesListas());\n $retorno = true;\n $arrayFallos = array();\n $arrayClaves = array_keys($this->arrayObligatorios);\n foreach ($arrayClaves as $cpoOblig) {\n $atrib = $this->buscoAtributo($cpoOblig);\n if ($this->arrayObligatorios[$cpoOblig] == 0) {\n $arrayFallos[] = $atrib;\n $retorno = $arrayFallos;\n }\n }\n return $retorno;\n }", "public function rules(){\n return [\n 'direccion'=> 'required',\n 'tipoVivienda' => 'required',\n 'compartido' => 'required',\n 'operacion' =>'required',\n 'precio' =>'required|numeric|gt:0',\n 'anioConstruccion'=>'required|numeric|gt:1800',\n 'metrosCuadrados'=>'required|numeric|gt:0',\n 'cantAmbientes'=>'required|numeric|gt:0',\n 'cantBanios'=>'required|numeric|gt:0',\n 'cantCocheras'=> 'required|numeric|gte:0',\n 'cantDormitorios'=> 'required|numeric|gt:0|lte:cantAmbientes',\n 'propietario'=> 'required|exists:propietarios,cuit',\n 'piso' => 'required_if:tipoVivienda,Departamento', \n 'numeroDepto' => 'required_if:tipoVivienda,Departamento'\n ];\n }", "public function validateByModel()\r\n {\r\n $error = ['correspondence' => []];\r\n \r\n if($this->data['correspondence']['contactByEmail'] == \"1\") {\r\n if(($this->lpa->document->correspondent instanceof Correspondence) && !($this->lpa->document->correspondent->email instanceof EmailAddress)) {\r\n $error['correspondence']['contactByEmail'] = [\"Email address is not provided\"];\r\n }\r\n }\r\n \r\n if($this->data['correspondence']['contactByPhone'] == \"1\") {\r\n if(!($this->lpa->document->correspondent->phone instanceof PhoneNumber)) {\r\n $error['correspondence']['contactByPhone'] = [\"Phone number is not provided\"];\r\n }\r\n }\r\n \r\n $correspondent = new Correspondence([\r\n 'contactByPost' => (bool)$this->data['correspondence']['contactByPost'],\r\n 'contactByInWelsh' => (bool)$this->data['correspondence']['contactInWelsh'],\r\n ]);\r\n \r\n $modelValidation = $correspondent->validate(['contactByPost', 'contactInWelsh']);\r\n \r\n if(count($modelValidation) == 0) {\r\n if(count($error['correspondence']) == 0) {\r\n return ['isValid'=>true, 'messages' => []];\r\n }\r\n else {\r\n return [\r\n 'isValid'=>false,\r\n 'messages' => $error,\r\n ];\r\n }\r\n }\r\n else {\r\n return [\r\n 'isValid'=>false,\r\n 'messages' => array_merge(['correspondence' => $this->modelValidationMessageConverter($modelValidation)], $error),\r\n ];\r\n }\r\n }", "public function validation() {\n\t $validator = new Validation();\n\n\t $validator->add('name', new PresenceOfValidator([\n\t 'model'=>$this,\n\t 'message'=>$this->translator->_('菜单名必须填写')\n\t ]));\n\t if(!$this->parentId){\n $validator->add('appId',new PresenceOfValidator([\n 'model'=>$this,\n 'message'=>$this->translator->_('未指定应用')\n ]));\n }\n\t return $this->validate($validator);\n\t}", "public function rules()\n {\n return [\n [['identity', 'controller'], 'required'],\n ];\n }", "public static function validateConstraints(DomElement $parent, $prefix='')\n {\n // Primary Keys.\n $pks = $parent->getElementsByTagName('primary-key');\n foreach ($pks as $pk) {\n self::_validatePrimaryKeyConstraint($pk, $prefix);\n }\n\n // Foreign Keys.\n $fks = $parent->getElementsByTagName('foreign-key');\n $keyPosition = 1;\n foreach ($fks as $fk) {\n self::_validateForeignKeyConstraint($fk, $keyPosition, $prefix);\n $keyPosition++;\n }\n\n // Unique constraints.\n $uniques = $parent->getElementsByTagName('unique');\n $keyPosition = 1;\n foreach ($uniques as $unique) {\n self::_validateUniqueConstraint($unique, $keyPosition, $prefix);\n $keyPosition++;\n }\n\n }", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n //Crea una caja de texto llamada nombre y longitud 50\r\n $elemT = new FEText(\"Asunto\", FALSE, 50);\r\n //$elemT->set_style_attribute('align', 'right');\r\n //Le asignamos el id nombre y la tecla de acceso n (ctrl+n)\r\n $elemT->set_attribute(\"id\",\"asunto\");\r\n $elemT->set_attribute(\"accesskey\",\"n\"); \r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemT);\r\n\t\r\n //Creamos un Area de Texto llamada comentario\r\n $elemTA = new FETextArea(\"Comentario\", FALSE, 10, 60,\"500px\", \"100px\");\r\n $elemTA->set_attribute('wrap', 'physical');\r\n //Le asignamos el id email y la tecla de acceso c (ctrl+c) \r\n $elemTA->set_attribute(\"id\",\"comentario\");\r\n $elemTA->set_attribute(\"accesskey\",\"d\");\r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemTA);\r\n\r\n //Añade un campo oculto llamado id. En ocasiones este campo se utiliza para indicar ciertas operaciones.\r\n //OJO!! es un punto sensible porque el usuario podría cambiar su valor de forma inexperada para el código.\r\n// $this->add_hidden_element(\"id\");\r\n\r\n //Añade un boton con la acción submit\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"miguel_Enter\"));\r\n //$submit->set_attribute('id',''); \r\n $submit->set_attribute('accesskey','e'); \r\n $this->add_element($submit); \r\n\t\t\t\t\r\n\t\t\t\t$this->add_hidden_element('status');\r\n \t\t$this->set_hidden_element_value('status', 'new');\r\n }", "public function validarProfesion() {\r\n if (!$this->hasErrors()) {\r\n if ($this->profesion != null) {\r\n $objProfesion = ProfesionCliente::model()->findByPk($this->profesion);\r\n \r\n if($objProfesion==null)\r\n $this->addError('profesion', 'Profesión no válida');\r\n }\r\n }\r\n }", "public function rules()\n {\n return [\n 'nombre_cliente' => ['required'|'string'|'max:30'|'min:3'],\n 'apellido_cliente' => ['required'|'string'|'max:30'],\n 'tipo_doc' => ['required'],\n 'numero_doc' => ['required'|'numeric'|'max:10'|'min:8' ],\n 'telefono' => ['required'|'numeric'|'max:7'|'min:7'],\n 'celular' => ['required'|'numeric'|'max:10'|'min:10'],\n 'correo' => ['required'|'unique:e-mail'],\n 'direccion' => ['required'],\n ];\n }", "public function rules()\n\t{\n\t\treturn array(\n\t\t\tarray('competition', 'required'),\n\t\t);\n\t}", "public function rules()\n {\n return [\n 'canton'=>'required|exists:canton,id',\n 'nombre'=> Rule::unique('canton')->where(function ($query) {\n $canton=Canton::findOrFail($this->input('canton'));\n return $query->where('provincia_id',$canton->provincia->id)->where('id','!=',$this->input('canton'));\n }),\n 'codigo'=> Rule::unique('canton')->where(function ($query) {\n $canton=Canton::findOrFail($this->input('canton'));\n return $query->where('provincia_id', $canton->provincia->id)->where('id','!=',$this->input('canton'));\n }),\n 'provincia'=>'required|exists:provincia,id'\n ];\n }", "public function rules()\n {\n\n if($this->opt == \"cpf\") {\n $doc = ['cpf' => 'required|min:14|unique:pessoa_f'];\n } else {\n $doc = ['cnpj' => 'required|min:18|unique:pessoa_j'];\n }\n\n if ($this->syspdv == true) {\n $s = [\n 'controle' => 'required',\n 'versao' => 'required',\n 'serie' => 'required'\n ];\n } else {\n $s = [];\n }\n\n if($this->acsn == true){\n $a = ['contrato' => 'required'];\n } else {\n $a = [];\n }\n\n if($this->ecletica == true){\n $e = [\n 'cod_rede' => 'required',\n 'cod_loja' => 'required'\n ];\n } else {\n $e = [];\n }\n\n if ($this->syspdv == false && $this->acsn == false && $this->ecletica == false) {\n $s = ['sistema' => 'required'];\n $a = ['sistema' => 'required'];\n $e = ['sistema' => 'required'];\n }\n\n return $doc+[\n 'razao_social' => 'required|unique:clientes',\n 'nome_fantasia' => 'required',\n 'email' => 'required|email',\n 'telefone' => 'required|min:14',\n ]+$s+$a+$e;\n }", "public function __construct()\n {\n $this->middleware('auth');\n //$this->field_list = ['nombre' => 'Nombre', 'direccion' => 'Dirección', 'telefono' => 'Teléfono', 'imglogo' => 'Logo', 'total_facturas' => 'Facturas', 'total_timbres' => 'Timbres', 'activo' => 'Activo', 'id' => 'Acciones'];\n $this->field_list = ['nombre' => 'Nombre', 'direccion' => 'Dirección', 'telefono' => 'Teléfono', 'id' => 'Acciones'];\n $this->name = 'Empresas';\n $this->name_plural = 'Empresas';\n $this->form = 'App\\Core\\Forms\\Admin\\EmpresaForm';\n $this->model = 'App\\Models\\Catalogos\\Empresas';\n $this->url_prefix = 'empresas';\n $validation_add = [];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n }", "public function __construct(array $medico = null, array $cuarto = null)\n {\n parent::__construct('AdmisionForm');\n $this->setAttribute('method', 'post');\n\n // medicos\n $this->add(array(\n 'name' => 'idmedico',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Medicos',\n 'empty_option' => 'Seleccione un medico',\n 'value_options' => $medico,\n ),\n 'attributes' => array(\n 'id' => 'idmedicoadmision'\n )\n ));\n // cuarto\n $this->add(array(\n 'name' => 'idcuarto',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Cuarto',\n 'empty_option' => 'Seleccione un cuarto',\n 'value_options' => $cuarto,\n ),\n 'attributes' => array(\n 'id' => 'idcuarto'\n )\n ));\n // paciente\n $this->add(array(\n 'name' => 'idpaciente',\n 'type' => 'Text',\n 'attributes' => array(\n 'id' => 'idpacienteadmision'\n )\n ));\n\n $this->add(array(\n 'name' => 'admision_fechaadmision',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Fecha de admisión',\n ),\n 'attributes' => array(\n 'id' => 'admision_fechaadmision'\n )\n ));\n $this->add(array(\n 'name' => 'admision_fechasalida',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Fecha de salida',\n ),\n 'attributes' => array(\n 'id' => 'admision_fechasalida'\n )\n ));\n $this->add(array(\n 'name' => 'admision_diagnostico',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Diagnostico',\n ),\n 'attributes' => array(\n 'id' => 'admision_diagnostico'\n )\n ));\n $this->add(array(\n 'name' => 'admision_observaciones',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Observaciones',\n ),\n 'attributes' => array(\n 'id' => 'admision_observaciones'\n )\n ));\n $this->add(array(\n 'name' => 'admision_status',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Status',\n 'empty_option' => 'Seleccione su estado civil',\n 'value_options' => array('pagada' => 'pagada','no pagada' => 'no pagada','pendiente' => 'pendiente'),\n ),\n 'attributes' => array(\n 'id' => 'admision_status'\n )\n ));\n $this->add(array(\n 'name' => 'admision_total',\n 'required' => true,\n 'validators' => array(\n array(\n 'name' => 'Float',\n 'options' => array(\n 'min' => 0,\n 'locale' => 'es_MX',\n ),\n ),\n ),\n 'options' => array(\n 'label' => 'Admisión Total'\n ),\n 'attributes' => array(\n 'id' => 'admision_total'\n )\n ));\n $this->add(array(\n 'name' => 'admision_pagadaen',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Pagada en',\n ),\n 'attributes' => array(\n 'id' => 'admision_pagadaen'\n )\n ));\n $this->add(array(\n 'name' => 'admision_tipodepago',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Tipo de pago',\n 'empty_option' => 'Seleccione tipo de pago',\n 'value_options' => array('efectivo', 'tarjeta debito','tarjeta credito','cheque','no identificado'),\n ),\n 'attributes' => array(\n 'id' => 'admision_tipodepago'\n )\n ));\n $this->add(array(\n 'name' => 'admision_referenciapago',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Referencia de pago (4 últimos dígitos)',\n ),\n 'attributes' => array(\n 'id' => 'admision_referenciapago'\n )\n ));\n $this->add(array(\n 'name' => 'admision_facturada',\n 'type' => 'Text',\n 'options' => array(\n 'label' => '¿Facturada?',\n ),\n 'attributes' => array(\n 'id' => 'admision_facturada'\n )\n ));\n $this->add(array(\n 'name' => 'admision_registrada',\n 'type' => 'Text',\n 'options' => array(\n 'label' => '¿Registrada?',\n ),\n 'attributes' => array(\n 'id' => 'admision_registrada'\n )\n ));\n }", "public function validarProfesion() {\n if (!$this->hasErrors()) {\n if (empty($this->profesion) && empty($this->ocupacion)) {\n $this->addError('profesion', 'Profesi&oacute;n/ocupaci&oacute;n no puede estar vac&iacute;o');\n $this->addError('ocupacion', 'Profesi&oacute;n/ocupaci&oacute;n no puede estar vac&iacute;o');\n }\n }\n }", "public function init() {\n $docm_id_documento = new Zend_Form_Element_Hidden('DOCM_ID_DOCUMENTO');\n $docm_id_documento->setRequired(true)\n ->addValidator('StringLength', false, array(0, 20))\n ->removeDecorator('Label')\n ->removeDecorator('HtmlTag');\n\n $docm_nr_documento = new Zend_Form_Element_Text('DOCM_NR_DOCUMENTO');\n $docm_nr_documento->setRequired(false)\n ->addValidator('StringLength', false, array(0, 28));\n\n $docm_nr_sequencial_doc = new Zend_Form_Element_Text('DOCM_NR_SEQUENCIAL_DOC');\n $docm_nr_sequencial_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 10));\n\n $docm_nr_dcmto_usuario = new Zend_Form_Element_Text('DOCM_NR_DCMTO_USUARIO');\n $docm_nr_dcmto_usuario->setRequired(false)\n ->addValidator('StringLength', false, array(0, 16));\n\n $docm_dh_cadastro = new Zend_Form_Element_Text('DOCM_DH_CADASTRO');\n $docm_dh_cadastro->setRequired(false);\n\n $docm_cd_matricula_cadastro = new Zend_Form_Element_Text('DOCM_CD_MATRICULA_CADASTRO');\n $docm_cd_matricula_cadastro->setRequired(false)\n ->addValidator('StringLength', false, array(0, 14));\n\n $docm_id_tipo_doc = new Zend_Form_Element_Select('DOCM_ID_TIPO_DOC');\n $docm_id_tipo_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 5));\n\n $docm_sg_secao_geradora = new Zend_Form_Element_Text('DOCM_SG_SECAO_GERADORA');\n $docm_sg_secao_geradora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_cd_lotacao_geradora = new Zend_Form_Element_Text('DOCM_CD_LOTACAO_GERADORA');\n $docm_cd_lotacao_geradora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 5));\n\n $docm_sg_secao_redatora = new Zend_Form_Element_Text('DOCM_SG_SECAO_REDATORA');\n $docm_sg_secao_redatora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_cd_lotacao_redatora = new Zend_Form_Element_Text('DOCM_CD_LOTACAO_REDATORA');\n $docm_cd_lotacao_redatora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 5));\n\n $docm_id_pctt = new Zend_Form_Element_Select('DOCM_ID_PCTT');\n $docm_id_pctt->setRequired(false)\n ->addValidator('StringLength', false, array(0, 7));\n\n $docm_ds_assunto_doc = new Zend_Form_Element_Text('DOCM_DS_ASSUNTO_DOC');\n $docm_ds_assunto_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 4000));\n\n $docm_id_tipo_situacao_doc = new Zend_Form_Element_Select('DOCM_ID_TIPO_SITUACAO_DOC');\n $docm_id_tipo_situacao_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_id_confidencialidade = new Zend_Form_Element_Select('DOCM_ID_CONFIDENCIALIDADE');\n $docm_id_confidencialidade->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_nr_documento_red = new Zend_Form_Element_Text('DOCM_NR_DOCUMENTO_RED');\n $docm_nr_documento_red->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_dh_expiracao_documento = new Zend_Form_Element_Text('DOCM_DH_EXPIRACAO_DOCUMENTO');\n $docm_dh_expiracao_documento->setRequired(false);\n\n\n $docm_ds_palavra_chave = new Zend_Form_Element_Textarea('DOCM_DS_PALAVRA_CHAVE');\n $docm_ds_palavra_chave->setRequired(false)\n ->addValidator('StringLength', false, array(0, 500));\n\n $docm_ic_arquivamento = new Zend_Form_Element_Checkbox('DOCM_IC_ARQUIVAMENTO');\n $docm_ic_arquivamento->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_id_pessoa = new Zend_Form_Element_Text('DOCM_ID_PESSOA');\n $docm_id_pessoa->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_ic_documento_externo = new Zend_Form_Element_Checkbox('DOCM_IC_DOCUMENTO_EXTERNO');\n $docm_ic_documento_externo->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_ic_ativo = new Zend_Form_Element_Checkbox('DOCM_IC_ATIVO');\n $docm_ic_ativo->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_ic_processo_autuado = new Zend_Form_Element_Checkbox('DOCM_IC_PROCESSO_AUTUADO');\n $docm_ic_processo_autuado->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_id_movimentacao = new Zend_Form_Element_Text('DOCM_ID_MOVIMENTACAO');\n $docm_id_movimentacao->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_dh_fase = new Zend_Form_Element_Text('DOCM_DH_FASE');\n $docm_dh_fase->setRequired(false);\n\n $docm_id_documento_pai = new Zend_Form_Element_Text('DOCM_ID_DOCUMENTO_PAI');\n $docm_id_documento_pai->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_id_pessoa_temporaria = new Zend_Form_Element_Text('DOCM_ID_PESSOA_TEMPORARIA');\n $docm_id_pessoa_temporaria->setRequired(false)\n ->addValidator('StringLength', false, array(0, 6));\n\n $docm_id_tp_extensao = new Zend_Form_Element_Select('DOCM_ID_TP_EXTENSAO');\n $docm_id_tp_extensao->setRequired(false)\n ->addValidator('StringLength', false, array(0, 3));\n\n $docm_ic_movi_individual = new Zend_Form_Element_Checkbox('DOCM_IC_MOVI_INDIVIDUAL');\n $docm_ic_movi_individual->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_ic_apensado = new Zend_Form_Element_Checkbox('DOCM_IC_APENSADO');\n $docm_ic_apensado->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $this->addElements(array(\n $docm_id_documento\n , $docm_nr_documento\n , $docm_nr_sequencial_doc\n , $docm_nr_dcmto_usuario\n , $docm_dh_cadastro\n , $docm_cd_matricula_cadastro\n , $docm_id_tipo_doc\n , $docm_sg_secao_geradora\n , $docm_cd_lotacao_geradora\n , $docm_sg_secao_redatora\n , $docm_cd_lotacao_redatora\n , $docm_id_pctt\n , $docm_ds_assunto_doc\n , $docm_id_tipo_situacao_doc\n , $docm_id_confidencialidade\n , $docm_nr_documento_red\n , $docm_dh_expiracao_documento\n , $docm_ds_palavra_chave\n , $docm_ic_arquivamento\n , $docm_id_pessoa\n , $docm_ic_documento_externo\n , $docm_ic_ativo\n , $docm_ic_processo_autuado\n , $docm_id_movimentacao\n , $docm_dh_fase\n , $docm_id_documento_pai\n , $docm_id_pessoa_temporaria\n , $docm_id_tp_extensao\n , $docm_ic_movi_individual\n , $docm_ic_apensado\n ));\n }", "public function init()\n {\n\t\t$this->setName('Velatorio');\n\n //campo hidden para guardar id del velatorio\n $idvelatorio = new Zend_Form_Element_Hidden('idvelatorio'); \n $idvelatorio->addFilter('Int');\n\n //creamos <input text> para escribir nombre del velatorio\n $RUC = new Zend_Form_Element_Text('RUC');\n $RUC->setLabel('RUC:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t\n //creamos <input text> para escribir nombre del velatorio\n $nombre = new Zend_Form_Element_Text('nombre');\n $nombre->setLabel('Nombre del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t \n\t\t \n //creamos <input text> para escribir direccion del velatorio\n $direccion = new Zend_Form_Element_Text('direccion');\n $direccion->setLabel('Direccion del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t\t\n //Combo del Departamento \n $iddepartamento = new Zend_Form_Element_Select('iddepartamento');\n $iddepartamento->setLabel('Seleccione departamentos:')->setRequired(true); \n\t\t\n\t\t$iddepartamento->addMultiOption(0, \"select\");\t\t\n\n\t\t//cargo en un select los departamentos\n $table = new Application_Model_DbTable_Departamento();\n //obtengo listado de todos los departamentos y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $iddepartamento->addMultiOption($c->iddepartamento, $c->nombre);\n }\n\n\t\t\n\t\t//Combo de la Provincia\n $idprovincias = new Zend_Form_Element_Select('idprovincias');\n $idprovincias->setLabel('Seleccione provincias:')->setRequired(true); \n\t\t\n\t\t//cargo en un select las provincias\n /* $table = new Application_Model_DbTable_Provincia();\n //obtengo listado de todas los provincias y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $idprovincias->addMultiOption($c->idprovincia, $c->nombre);\n }\n\t\t*/\n\t\t\t\t\n\t\t//Combo del Distrito\n $iddistrito = new Zend_Form_Element_Select('iddistrito');\n $iddistrito->setLabel('Seleccione distritos:')->setRequired(true); \n\n\t\t//cargo en un select los distritos\n /*$table = new Application_Model_DbTable_Distrito();\n //obtengo listado de todos los distritos y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $iddistrito->addMultiOption($c->iddistrito, $c->nombre);\n }\n\t\t*/\n\t\t\n\t\t\n\t\t//creamos <input text> para escribir telefono del velatorio\n $telefono_fijo = new Zend_Form_Element_Text('telefono_fijo');\n $telefono_fijo->setLabel('Telefono del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\t\t \n\t\t//creamos <input text> para escribir celular del velatorio\n $telefono_celular = new Zend_Form_Element_Text('telefono_celular');\n $telefono_celular->setLabel('Celular del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\t\t \n\t\t//creamos <input text> para escribir correo electronico del velatorio\n $mail = new Zend_Form_Element_Text('mail');\n $mail->setLabel('Correo Electronico del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t//creamos <input text> para escribir costo alquiler del velatorio\n $costo = new Zend_Form_Element_Text('costo');\n $costo->setLabel('Costo Alquiler del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t//creamos <input text> para escribir observacion del velatorio\n $observacion = new Zend_Form_Element_Textarea('observacion');\n $observacion->setLabel('Observaciones:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\n\t\t\t\n\t\t \n //boton para enviar formulario\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setAttrib('id', 'submitbutton');\n\n //agregolos objetos creados al formulario\n //$this->addElements(array($id, $nombre,$Descripccion,$profesores,$submit));\t\n\t\t$this->addElements(array($idvelatorio,$RUC,$nombre,$direccion,$iddepartamento,$idprovincias,$iddistrito,$telefono_fijo,$telefono_celular,$mail,$costo,$observacion,$submit));\t\n\t\t\n\t\t//DECORATOR GRUPOS\n\t\t$this->addDisplayGroups(array(\n\t\t\t'left' => array(\n\t\t\t\t'options' => array('description' => 'Left Column'),\n\t\t\t\t'elements' => array($RUC,$nombre,$direccion,$iddepartamento,$idprovincias),\n\t\t\t),\n\t\t\t'right' => array(\n\t\t\t\t'options' => array('description' => 'Right Column'),\n\t\t\t\t'elements' => array($iddistrito,$telefono_fijo,$telefono_celular,$mail,$costo,$observacion),\n\t\t\t),\n\t\t\t'bottom' => array(\n\t\t\t\t'elements' => array($submit),\n\t\t\t)\n\t\t));\n\t\t \n\t\t//$this->setDisplayGroupDecorators(array('Description', 'FormElements', 'Fieldset'));\t\t\n\t\t$this->setDisplayGroupDecorators(array('FormElements', 'Fieldset'));\n\t\t\n\t\t//DECORATOR GRUPOS\n\t\t$this->addDisplayGroups(array(\n\t\t\t'left' => array(\n\t\t\t\t'options' => array('description' => 'Left Column'),\n\t\t\t\t'elements' => array($RUC,$nombre,$direccion,$iddepartamento,$idprovincias),\n\t\t\t),\n\t\t\t'right' => array(\n\t\t\t\t'options' => array('description' => 'Right Column'),\n\t\t\t\t'elements' => array($iddistrito,$telefono_fijo,$telefono_celular,$mail,$costo,$observacion),\n\t\t\t),\n\t\t\t'bottom' => array(\n\t\t\t\t'elements' => array($submit),\n\t\t\t)\n\t\t));\n\t\t \n\t\t//$this->setDisplayGroupDecorators(array('Description', 'FormElements', 'Fieldset'));\t\t\n\t\t$this->setDisplayGroupDecorators(array('FormElements', 'Fieldset'));\n\t\t\n\t\t\n }", "public function rules()\n {\n return [\n 'nPlaca'=>'unique:vehiculos',\n //'nInventario'=>'unique:vehiculos',\n ];\n }", "public function rules()\n {\n return array(\n array('habilidades_id_habilidad, usuarios_id_usuario', 'required'),\n array('habilidades_id_habilidad, usuarios_id_usuario', 'length', 'max'=>10),\n array('habilidades_id_habilidad, usuarios_id_usuario', 'safe', 'on'=>'search'),\n );\n }", "public function rules()\n {\n return [\n 'codigoTipo'=> 'required|unique:clasificaciones_activos,codigoTipo,'.$this->clasificacionesActivos['id'],\n 'nombreTipo'=> 'required|min:3|max:50',\n ];\n }", "public function rules()\n\t{\n\t\t// will receive user inputs.\n\t\treturn array(\n\t\t\tarray('codsoc', 'required'),\n\t\t\tarray('codalm', 'length', 'max'=>3),\n\t\t\tarray('codalm', 'required'),\n\t\t\tarray('codalm', 'length', 'min'=>3),\n\t\t\tarray('codalm', 'unique'),\n\t\t\tarray('codalm', 'match', 'pattern'=>Yii::app()->params['mascaradocs'],'message'=>'El codigo no es el correcto, El c debe comenzar por 2 DIGITOS > 0 y los caracteres deben ser numericos'),\n\t\t\tarray('codmon', 'required', 'message'=>' Indique la moneda para valorizar el inventario'),\n\n\t\t\tarray('nomal', 'length', 'max'=>35),\n\t\t\tarray('nomal', 'required'),\n\t\t\tarray('tipo, tipovaloracion', 'length', 'max'=>2),\n\t\t\t//array('codcen', 'length', 'max'=>4),\n\t\t\tarray('codcen', 'required'),\n\t\t\tarray('codsoc', 'length', 'max'=>1),\n\t\t\tarray('estructura', 'length', 'max'=>15),\n\t\t\tarray('desalm,bloqueado,verprecios,novalorado,codmon,agregarauto', 'safe'),\n\t\t\tarray('numeropuntos,codalm,periodo', 'safe','on'=>'grafico'),\n\t\t\tarray('codalm, nomal, desalm, tipo, codcen,codmon, codsoc, tipovaloracion, estructura,tolstockres,fecharefpronostico', 'safe', 'on'=>'insert,update'),\n\t\t\tarray('codalm, nomal, desalm, tipo, codcen, codsoc, tipovaloracion, estructura, id', 'safe', 'on'=>'search'),\n\t\t);\n\t}", "public function getAcroForm() {}", "public function getAcroForm() {}", "public function validator()\n {\n\n return CollegeHasAttributeValidator::class;\n }", "public function __construct()\n {\n $this->middleware('auth');\n //$this->field_list = ['affair'=>'Asunto','message'=>'Mensaje','archivo'=>'Archivo','id'=>'Acciones'];\n $this->field_list = ['number'=>'Folio','affair'=>'Asunto','message'=>'Mensaje','archivob'=>'Archivo del cliente','name'=>'Nombre','last_name'=>'Apellidos','phone'=>'Telefono','email'=>'Correo electronico','address'=>'Dirección','created_at'=>'Fecha de reporte','id'=>'Acciones'];\n $this->name = 'Canalizacion';\n $this->name_plural = 'Canalizacion';\n $this->form = 'App\\Core\\Forms\\Admin\\CanalizacionForm';\n $this->model = 'App\\Models\\Catalogos\\Ticket';\n $this->url_prefix = 'ticket';\n $validation_add = [\n ];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n }", "abstract protected function buildValidator(ArrayValidator $desc);", "public function validator()\n {\n\n return AnggotaKeluargaValidator::class;\n }", "public function rules()\r\n {\r\n // will receive user inputs.\r\n return array(\r\n //array('DataOcorrenciaF, Ocorrencia, dt_hr_ini_atendimento, dt_hr_fim_atendimento', 'safe'),\r\n //The following rule is used by search().\r\n //The following rule is used by search().\r\n //array('condominioPredial, corporativo, dataGrafico, totalChart, sizeChart', 'required'),\r\n array('condominioPredial, corporativo, dataGrafico, totalChart, sizeChart', 'safe', 'on'=>'search'),\r\n\r\n );\r\n }", "public function rules()\n {\n return [\n 'name'=>'required|string|max:255',\n 'apaterno'=>'required|string|max:255',\n 'amaterno'=>'required|string|max:255',\n 'direccion'=>'nullable|string|max:255',\n 'email'=>'required|email|string|max:200|unique:proveedors,email,'.\n $this->route('proveedor')->id.'|max:255',\n\n 'ruc_number'=>'required|string|max:10|min:10|unique:proveedors,ruc_number,'.\n $this->route('proveedor')->id.'|max:10', \n\n 'telefono'=>'required|string|min:10|unique:proveedors,phone'\n ];\n }", "public function __construct()\n {\n $this->middleware('auth');\n $this->field_list = ['identificador'=>'Folio','number_usuario'=>'Membresía','conta'=>'Número','premio'=>'Premio','dtip'=>'Tipo', 'name'=>'Lugar','punto'=>'Puntos','nombre'=>'Estado','estad_uno'=>'Fecha de elaboración','id'=>'Acciones'];\n //$this->field_list = ['folio'=>'Folio','id_product'=>'Producto','name'=>'Estacion','points'=>'Puntos','value'=>'Valor','qr_memberships'=>'Membresia','name_status'=>'Status','name_state'=>'Estado', 'name_exchange'=>'Tipo','todate'=>'Fecha','id'=>'Acciones'];\n $this->name = 'Recibido';\n $this->name_plural = 'fa fa-newspaper-o';\n $this->form = 'App\\Core\\Forms\\Lealtad\\RecibidoForm';\n $this->model = 'App\\Models\\Lealtad\\Exchange';\n $this->url_prefix = 'recibidoexchange';\n $validation_add = [\n // 'folio'=>'required|max:25',\n ];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n }", "public function rules()\n\t{\n\t\treturn array(\n\t\t\tarray('question_1', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 1.'),\n array('question_2', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 2.'),\n array('question_3', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 3.'),\n array('question_4', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 4.'),\n array('question_5', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 5.'),\n array('question_6', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 6.'),\n array('question_7', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 7.'),\n array('question_8', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 8.'),\n array('question_9', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 9.'),\n array('question_10', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 10.'),\n array('question_11', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 11.'),\n array('question_12', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 12.'),\n array('question_13', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 13.'),\n array('question_14', 'required', 'message'=>'Debe seleccionar una opción para la pregunta 14.'),\n\t\t);\n\t}", "public function validator()\n {\n\n return EmpreValidator::class;\n }", "public function rules()\n {\n\n return [\n 'nombre'=>['string',\n Rule::unique('tbl_proyectos_realizados','rt_titulo_proyecto')\n ->where(function($query){\n return $query->where('fk_id_usuario',$this->user()->pk_id_usuario);\n }),\n ],\n\n 'fechaI'=>'date|required',\n 'fechaF'=>'date|required',\n 'area'=>'numeric|required',\n 'area-c'=>'string|required_if:area,\"Otra Área de conocimiento\"',\n 'descripcion'=>'required|string|min:6|max:150'\n\n\n ];\n }", "public function rules()\n {\n return [\n 'departamento_id' => 'required|exists:ubigeos,id',\n 'fecha_entrega' => 'required|date_format:Y-m-d',\n 'cantidad' => 'required|integer|min:1',\n 'observacion' => 'alpha_num_spaces'\n //'clave' => 'required|exists:calendarizaciones,clave'\n ];\n }", "public function rules()\n {\n\n return [\n 'tipo' => 'required',\n 'nome' => 'required|string|min:0|max:255',\n 'celular' => 'nullable|string|min:0|max:20',\n 'email' => 'nullable|string|min:0|max:100',\n 'cpf_cnpj' => 'nullable|unique:clientes,cpf_cnpj,'. $this->cliente,'id',\n 'estado_civil' => 'nullable',\n 'nome_empresa' => 'required|string|min:0|max:255',\n 'cep' => 'nullable|string|min:0|max:10',\n 'numero' => 'nullable|string|min:0|max:10',\n 'endereco' => 'nullable|string|min:0|max:200',\n 'complemento' => 'nullable|string|min:0|max:200',\n 'estado' => 'nullable|string|min:0|max:2',\n 'is_whatsapp' => 'nullable|boolean',\n 'obs' => 'nullable',\n 'naturalidade_uf' => 'nullable|string|min:0|max:2',\n 'nacionalidade' => 'nullable|string|min:0|max:100',\n\n ];\n }", "public function rules()\n {\n return [\n 'id' => 'integer|nullable|exists:richiesta,id',\n 'contatto_1' => 'string|required|max:100',\n 'contatto_2' => 'string|nullable|max:100',\n 'oggetto' => 'string|required|max:200',\n 'testo' => 'string|required',\n 'globale' => 'boolean|nullable',\n 'associazioni' => 'array',\n 'associazioni.*' => 'integer|required|exists:associazione,id',\n ];\n }", "public function rules()\r\n {\r\n return [\r\n [['id_contribuyente', 'impuesto'],\r\n 'required', 'on' => 'search',\r\n 'message' => Yii::t('backend', '{attribute} is required')],\r\n [['id_contribuyente'],\r\n 'required', 'on' => 'search_all',\r\n 'message' => Yii::t('backend', '{attribute} is required')],\r\n [['id_contribuyente', 'impuesto', 'tipo_solicitud'],\r\n 'integer','on' => 'search',\r\n 'message' => Yii::t('backend', '{attribute} wild be integer')],\r\n [['fecha_hasta'], 'required',\r\n 'when' => function($model) {\r\n if ( $model->fecha_desde != null ) {\r\n return true;\r\n }\r\n }\r\n , 'message' => Yii::t('backend', '{attribute} is required')],\r\n [['fecha_desde'], 'required',\r\n 'when' => function($model) {\r\n if ( $model->fecha_hasta != null ) {\r\n return true;\r\n }\r\n }\r\n , 'message' => Yii::t('backend', '{attribute} is required')],\r\n [['fecha_hasta'], 'compare',\r\n 'compareAttribute' => 'fecha_desde', 'operator' => '>='],\r\n [['fecha_desde', 'fecha_hasta'], 'default', 'value' => null],\r\n ['id_contribuyente', 'default', 'value' => isset($_SESSION['idContribuyente']) ? $_SESSION['idContribuyente'] : null],\r\n ];\r\n }", "public function rules()\n {\n return [ \n 'nombre' => 'required|string|max:150|unique:proveedores' , \n 'email' => 'required|string|max:250|unique:proveedores' , \n 'direccion' => 'required|string|max:250' ,\n 'telefono' => 'required|string|max:16|min:9' ,\n ];\n }", "public function testObtenerPropuestaDeProyecto () {\n $test = new FormularioDePropuestaAprobacionModel();\n $this->assertNotEmpty($test->obtenerPropuestaDeProyecto([\"columna1\" => 1]));\n }", "public function rules()\n\t{\n\t\treturn [\n\n\t\t'NumeroIdentificacion_Aprendiz' => 'required|unique:Aprendizs,NumeroIdentificacion_Aprendiz',\n\t\t\t'TipoDoc_Aprendiz'=> 'required|string',\n\t\t\t'Nombre_Aprendiz'=> 'required|string',\n\t\t\t'Apellido_Aprendiz'=> 'required|string',\n\t\t\t'Direccion_Aprendiz'=> 'required|string',\n\t\t\t'Telefono_Aprendiz'=> 'required|numeric',\n\t\t\t'Genero_Aprendiz'=> 'required|string',\n\t\t\t'Email_Aprendiz'=> 'required|string',\n\t\t\t'Contraseña_Aprendiz'=> 'required|string',\n\t\t\t'Eps'\t=> 'required|string'\n\n\t\t\t//\n\t\t];\n\t}", "public function rules()\n {\n return [\n\n 'codigo'=> 'required',\n 'nombre'=> 'required|unique:proyectos,nombre',\n 'fecha_inicio'=> 'required',\n 'fecha_fin'=> 'required|date|after:fecha_inicio',\n 'municipio_inicio'=> 'required',\n 'ubicacion_inicial'=> 'required',\n 'municipio_final'=> 'required',\n 'ubicacion_final'=> 'required',\n 'horas_laboral'=> 'required',\n 'temperatura'=> 'required',\n 'propietario_dobletroque'=>'required',\n 'duracion_proyecto'=> 'required',\n 'cantidad_vehiculo_propio'=> 'required',\n 'cantidad_vehiculo_alquilado'=> 'required',\n 'valor_metrocubico_propio'=> 'required',\n 'valor_metrocubico_alquilado'=> 'required',\n 'valor_contrato'=> 'required',\n 'valor_anticipo_contrato'=> 'required',\n\n 'antiguedad_vehiculo'=> 'required',\n 'otros_requerimientos'=> '',\n 'tiposVias'=>'required|array',\n 'tiposVias.*.tipovia_id'=>'required',\n 'rellenos'=>'required|array',\n 'rellenos.*.tipo_material_id'=>'required',\n\n 'costoServicio'=> 'required|array',\n 'costoServicio.*.servicio_id'=>'required',\n 'costoServicio.*.otro_servicio'=>'required_if:costoServicio.*.servicio_id,4|unique:servicios,nombre',\n 'costoServicio.*.proveedor_id'=>'required',\n 'costoServicio.*.forma_pago'=>'required',\n 'costoServicio.*.medio_pago'=>'required',\n 'costoServicio.*.otro_medio_pago'=>'required_if:costoServicio.*.medio_pago,Otros',\n 'costoServicio.*.pago_a_realizar'=>'required',\n\n 'costoServicio.*.detalle'=>'required|array',\n 'costoServicio.*.detalle.*.tipo_costo_servicio_id'=> 'required',\n 'costoServicio.*.detalle.*.otro_costo_servicio'=>'required_if:costoServicio.*.detalle.*.tipo_costo_servicio_id,4|unique:tipo_costo_servicio,nombre',\n 'costoServicio.*.detalle.*.valor'=>'required',\n\n 'condiciones_economicas' => 'required|array',\n 'condiciones_economicas.*.nombre_condicion_economica_id' => 'required',\n 'condiciones_economicas.*.otro_condicion_economica' => 'required_if:condiciones_economicas.*.nombre_condicion_economica_id,4',\n 'condiciones_economicas.*.pago_a_realizar' => 'required',\n 'condiciones_economicas.*.forma_pago' => 'required',\n 'condiciones_economicas.*.medio_pago' => 'required',\n 'condiciones_economicas.*.otro_medio_pago' => '',\n\n 'datos_operacion'=>'required',\n 'datos_operacion.consumo_combustible_dia'=>'required',\n 'datos_operacion.consumo_lubricante_dia'=>'required',\n 'datos_operacion.consumo_refrigerante_dia'=>'required',\n 'datos_operacion.consumo_grasa'=>'required',\n 'datos_operacion.consumo_llantas_dia'=>'required',\n 'datos_operacion.pago_peajes'=>'required',\n 'datos_operacion.pago_conductor_dia'=>'required',\n 'datos_operacion.pago_hidratacion_dia'=>'required',\n 'datos_operacion.pago_parqueadero_dia'=>'required',\n 'datos_operacion.pago_soat_dia'=>'required',\n 'datos_operacion.pago_tecnomecanica_dia'=>'required',\n 'datos_operacion.pago_seguro_dia'=>'required',\n 'datos_operacion.pago_leasing_dia'=>'required',\n 'datos_operacion.pago_lavado_dia'=>'required',\n 'datos_operacion.pago_mantenimiento_dia'=>'required',\n 'datos_operacion.pago_admin_dia'=>'required',\n\n 'datos_administracion' =>'required',\n 'datos_administracion.salario_conductor_dia'=>'required',\n 'datos_administracion.salario_gerencia_nacional_operaciones_dia'=>'required',\n 'datos_administracion.salario_gerencia_regional_operaciones_dia'=>'required',\n 'datos_administracion.salario_gerencia_recursos_humanos_dia'=>'required',\n 'datos_administracion.salario_asistente_recursos_humanos_dia'=>'required',\n 'datos_administracion.salario_gerencia_administracion_dia'=>'required',\n 'datos_administracion.salarios_upervisor_asignado_dia'=>'required',\n 'datos_administracion.pago_arriendo_oficina_dia'=>'required',\n 'datos_administracion.pagos_servicios_oficina_dia'=>'required',\n 'datos_administracion.pago_alojamiento_dia'=>'required',\n 'datos_administracion.pago_alimentacion_dia'=>'required',\n 'datos_administracion.pago_alquiler_camionetas_dia'=>'required',\n 'datos_administracion.pago_tiquetes_aereos_dia'=>'required',\n 'datos_administracion.pago_transporte_terrestre_dia'=>'required',\n 'datos_administracion.pago_gasolina_camionetas_dia'=>'required',\n 'datos_administracion.pago_papeleria_dia'=>'required',\n 'datos_administracion.pago_insumos_oficina_dia'=>'required',\n 'datos_administracion.pago_gastos_oficina'=>'required',\n\n 'recorridos' => 'required',\n 'recorridos.*.recorrido_inicio_id'=>'required',\n 'recorridos.*.recorrido_final_id'=>'required',\n 'recorridos.*.accion_id'=>'required',\n\n\n\n\n\n ];\n }", "public function init()\r\n {\r\n \t\r\n \r\n \t \t\r\n \t$this->setName('FormularioCliente');\r\n $ID_CLIENTE = new Zend_Form_Element_Hidden('$ID_CLIENTE');\r\n $ID_CLIENTE->addFilter('Int');\r\n $ID_CLIENTE->removeDecorator('Label');\r\n \r\n \r\n \r\n $DT_ATUALIZACAO = new Zend_Form_Element_Text('DT_ATUALIZACAO');\r\n $DT_ATUALIZACAO->setLabel('DATA ÚLTIMA ATUALIZAÇÃO')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control')\r\n ->setAttrib('placeholder', '');\r\n \r\n \r\n \r\n $NM_CLIENTE= new Zend_Form_Element_Text('NM_CLIENTE');\r\n $NM_CLIENTE->setLabel('NOME')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter nome');\r\n \r\n $NR_CNPJ = new Zend_Form_Element_Text('NR_CNPJ');\r\n $NR_CNPJ->setLabel('CNPJ')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cnpj');\r\n \r\n \t$TX_OBSERVACAO = new Zend_Form_Element_Textarea('TX_OBSERVACAO');\r\n $TX_OBSERVACAO->setLabel('OBSERVA��O')\r\n \t\t\r\n\t\t\t\t\t ->removeDecorator('DtDdWrapper')\r\n \t\t\t ->removeDecorator('HtmlTag')\r\n \t\t\t\t ->removeDecorator('Label')\r\n \t\t\t ->setAttrib('class', 'form-control')\r\n \t\t\t\t ->setAttrib('rows', '5'); \r\n \t\r\n $NM_LOGRADOURO = new Zend_Form_Element_Text('NM_LOGRADOURO');\r\n $NM_LOGRADOURO->setLabel('LOGRADOURO')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter logradouro');\r\n \r\n \r\n \t\r\n \t$NR_NUMERO = new Zend_Form_Element_Text('NR_NUMERO');\r\n $NR_NUMERO->setLabel('NÚMERO')\r\n\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter número');\t\t\t \r\n \t\t\t\t \r\n \t$DS_COMPLEMENTO = new Zend_Form_Element_Text('DS_COMPLEMENTO');\r\n $DS_COMPLEMENTO->setLabel('LOGRADOURO')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter complemento');\t\t\r\n \r\n \t \r\n \t \r\n \t\t\t\t \r\n \t$NM_BAIRRO = new Zend_Form_Element_Text('NM_BAIRRO');\r\n $NM_BAIRRO->setLabel('BAIRRO')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter bairro');\r\n \t\r\n \t$NR_CEP= new Zend_Form_Element_Text('NR_CEP');\r\n $NR_CEP->setLabel('CEP')\r\n\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cep');\r\n \t\r\n \t\t\r\n \t$NM_CIDADE = new Zend_Form_Element_Text('NM_CIDADE');\r\n $NM_CIDADE->setLabel('CIDADE')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cidade');\r\n \t \r\n \t\r\n \t$estados = array(\"AC\"=>\"Acre\", \"AL\"=>\"Alagoas\", \"AM\"=>\"Amazonas\", \"AP\"=>\"Amapá\",\"BA\"=>\"Bahia\",\"CE\"=>\"Ceará\",\"DF\"=>\"Distrito Federal\",\"ES\"=>\"Espírito Santo\",\"GO\"=>\"Goiás\",\"MA\"=>\"Maranhão\",\"MT\"=>\"Mato Grosso\",\"MS\"=>\"Mato Grosso do Sul\",\"MG\"=>\"Minas Gerais\",\"PA\"=>\"Pará\",\"PB\"=>\"Paraíba\",\"PR\"=>\"Paraná\",\"PE\"=>\"Pernambuco\",\"PI\"=>\"Piauí\",\"RJ\"=>\"Rio de Janeiro\",\"RN\"=>\"Rio Grande do Norte\",\"RO\"=>\"Rondônia\",\"RS\"=>\"Rio Grande do Sul\",\"RR\"=>\"Roraima\",\"SC\"=>\"Santa Catarina\",\"SE\"=>\"Sergipe\",\"SP\"=>\"São Paulo\",\"TO\"=>\"Tocantins\");\r\n \t\r\n \t$NM_UF = new Zend_Form_Element_Select( 'NM_UF' );\r\n $NM_UF->setLabel('UF')\r\n ->addMultiOptions($estados)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t->removeDecorator('DtDdWrapper')\r\n \t->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t->setAttrib('class', 'form-control select2') ->setAttrib('placeholder', 'Enter uf');;\t\t \r\n\r\n \t\t\t\t \r\n \t$FK_RAMO_ATIVIDADE= new Zend_Form_Element_Select('FK_RAMO_ATIVIDADE');\r\n $FK_RAMO_ATIVIDADE->setAttrib('class', 'form-control');\r\n \r\n $ramoAtividade= new Application_Model_DbTable_RamoAtividade();\r\n $FK_RAMO_ATIVIDADE->setLabel('RAMO ATIVIDADE')\r\n ->setRequired(true)\r\n\t\t->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control select2');\r\n \r\n \r\n $listaRamoAtividade=$ramoAtividade->getRamoAtividadeCombo();\r\n $FK_RAMO_ATIVIDADE->setMultiOptions( $listaRamoAtividade );\t\t\t \r\n \t\r\n $submit = new Zend_Form_Element_Submit('submit');\r\n $submit->setLabel(\"Adiconar\");\r\n $submit->setAttrib('id', 'submitbutton');\r\n $submit->removeDecorator('DtDdWrapper')\r\n ->setAttrib('class', 'btn btn-primary button')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label'); \r\n \r\n $this->addElements(array($ID_CLIENTE,$NM_CLIENTE,$NR_CNPJ,$TX_OBSERVACAO,$NM_LOGRADOURO,$NR_NUMERO,$DS_COMPLEMENTO,$NM_BAIRRO,$NR_CEP,$NM_CIDADE,$NM_UF,$DT_ATUALIZACAO,$FK_RAMO_ATIVIDADE,$submit)); \r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioCliente.phtml')))); \r\n\t\r\n }", "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}", "public function rules()\n {\n $documento = count($this->get('documentoDestinoTrasladoDocumentoDetalle')); \n $concepto = count($this->get('documentoConceptoDestinoTrasladoDocumentoDetalle')); \n $tercero = count($this->get('terceroDestinoTrasladoDocumentoDetalle')); \n \n\n $validacion = array(\n \"numeroTrasladoDocumento\" => \"required|string|max:10|unique:trasladodocumento,numeroTrasladoDocumento,\".$this->get('idTrasladoDocumento') .\",idTrasladoDocumento\",\n \"descripcionTrasladoDocumento\" => \"required|string|max:80\",\n \"fechaElaboracionTrasladoDocumento\" => \"required|date\",\n \"estadoTrasladoDocumento\" => \"required|string|max:10\",\n \"SistemaInformacion_idOrigen\" => \"required|int\",\n \"SistemaInformacion_idDestino\" => \"required|int\");\n\n if($this->get('bodegaEmbarque') == 'on')\n {\n $validacion[\"fechaRealEmbarque\"] = \"required\"; \n }\n\n if($this->get('otmEmbarque') == 'on')\n {\n $validacion[\"fechaRealEmbarque\"] = \"required\"; \n }\n\n for($i = 0; $i < $documento; $i++)\n {\n if(trim($this->get('documentoDestinoTrasladoDocumentoDetalle')[$i]) == '')\n { \n $validacion['documentoDestinoTrasladoDocumentoDetalle'.$i] = 'required';\n }\n } \n\n for($i = 0; $i < $concepto; $i++)\n {\n if(trim($this->get('documentoConceptoDestinoTrasladoDocumentoDetalle')[$i]) == '')\n { \n $validacion['documentoConceptoDestinoTrasladoDocumentoDetalle'.$i] = 'required';\n }\n } \n\n for($i = 0; $i < $tercero; $i++)\n {\n if(trim($this->get('terceroDestinoTrasladoDocumentoDetalle')[$i]) == '')\n { \n $validacion['terceroDestinoTrasladoDocumentoDetalle'.$i] = 'required';\n }\n } \n\n \n return $validacion; \n }", "public function rules()\n {\n return [\n 'num_doc'=>'required',\n 'nombres',\n 'ap_paterno',\n 'ap_materno',\n 'celular',\n 'telefono',\n 'sexo',\n 'direccion',\n 'correo',\n 'fech_nacimiento',\n 'edad',\n 'tipo_documento_id',\n 'Estado_id',\n 'tipo_persona_id'\n ];\n }", "public final function definition() {\n $mform = $this->_form;\n $customdata = $this->_customdata;\n $editmode = $customdata['editmode'];\n\t\n $mform->addElement('header', 'typeheading', get_string('editingacoupon', 'enrol_coupon', get_string($this->typestring, 'enrol_coupon')));\n\n $mform->addElement('hidden', 'id');\n $mform->setType('id', PARAM_INT);\n\n $mform->addElement('hidden', 'couponid');\n $mform->setType('couponid', PARAM_INT);\n\n\t\t$mform->addElement('hidden', 'type');\n\t\t$mform->setType('type', PARAM_INT);\n\t\t\n\t\t$mform->addElement('hidden', 'couponaction');\n\t\t$mform->setType('couponaction', PARAM_INT);\n\t\t\n\t\t$mform->addElement('hidden', 'couponvalue');\n\t\t$mform->setType('couponvalue', PARAM_INT);\n\n\t\t$mform->addElement('text', 'name', get_string('couponname', 'enrol_coupon'), array('size'=>70));\n\t\t$mform->setType('name', PARAM_TEXT);\n\t\t$mform->addRule('name', get_string('required'), 'required', null, 'client');\n\t\t\n\t\t$mform->addElement('textarea', 'description', get_string('description'), 'wrap=\"virtual\" rows=\"4\" cols=\"50\"');\n\t\t$mform->setType('description', PARAM_TEXT);\n\t\t\n\t\t\t\n $this->custom_definition();\n \n\n\t\t\n\t\t$mform->addElement('text', 'maxuses', get_string('maxuses', 'enrol_coupon'));\n\t\t$mform->setType('maxuses', PARAM_INT);\n\t\t$mform->setDefault('maxuses', 1);\n\t\t$mform->addRule('maxuses', get_string('required'), 'required', null, 'client');\n\t\t\n $options = array('optional'=>true);\n $mform->addElement('date_selector', 'fromdate',get_string('fromdate','enrol_coupon'), $options);\n $mform->addElement('date_selector', 'todate',get_string('todate','enrol_coupon'), $options);\n\n\t\t$mform->addElement('text', 'duration', get_string('duration', 'enrol_coupon'));\n\t\t$mform->setType('duration', PARAM_INT);\n\t\t$mform->setDefault('duration', 0);\n\t\t$mform->addRule('duration', get_string('required'), 'required', null, 'client');\n\n\n\t\t//add the action buttons\n $this->add_action_buttons(get_string('cancel'), get_string('savecoupon', 'enrol_coupon'));\n\n }", "function geraClasseValidadorFormulario(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo1 = Util::getConteudoTemplate('class.Modelo.ValidadorFormulario.tpl');\n $modelo2 = Util::getConteudoTemplate('metodoValidaFormularioCadastro.tpl');\n\n # abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n $aModeloFinal = array();\n \n # varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $nomeClasse = ucfirst($this->getCamelMode((string)$aTabela['NOME']));\n $copiaModelo1 = $modelo1;\n $copiaModelo2 = $modelo2;\n\n $objetoClasse = \"\\$o$nomeClasse\";\n\n # ==== varre a estrutura dos campos da tabela em questao ====\n $camposForm = array();\n foreach($aTabela as $oCampo){\n # recupera campo e tabela e campos (chave estrangeira)\n $nomeCampoOriginal = (string)$oCampo->NOME;\n # processa nome original da tabela estrangeira\n $nomeFKClasse = (string)$oCampo->FKTABELA;\n $objetoFKClasse = \"\\$o$nomeFKClasse\";\n\n $nomeCampo = $nomeCampoOriginal;\n //$nomeCampo = $nomeCampoOriginal;\n\n # monta parametros a serem substituidos posteriormente\n $label = ($nomeFKClasse != '') ? ucfirst(strtolower($nomeFKClasse)) : ucfirst(str_replace($nomeClasse,\"\",$nomeCampoOriginal));;\t\t\t\t\t\n $camposForm[] = ((int)$oCampo->CHAVE == 1) ? \"if(\\$acao == 2){\\n\\t\\t\\tif(\\$$nomeCampoOriginal == ''){\\n\\t\\t\\t\\t\\$this->msg = \\\"$label invalido!\\\";\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t}\" : \"if(\\$$nomeCampoOriginal == ''){\\n\\t\\t\\t\\$this->msg = \\\"$label invalido!\\\";\\n\\t\\t\\treturn false;\\n\\t\\t}\\t\";\n }\n # monta demais valores a serem substituidos\n $camposForm = join($camposForm,\"\\n\\t\\t\");\n\n # substitui todas os parametros pelas variaveis já processadas\n $copiaModelo2 = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo2);\n $copiaModelo2 = str_replace('%%ATRIBUICAO%%', $camposForm, $copiaModelo2);\n\n $aModeloFinal[] = $copiaModelo2;\n }\n\n $modeloFinal = str_replace('%%FUNCOES%%', join(\"\\n\\n\", $aModeloFinal), $copiaModelo1);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\n if(!file_exists($dir)) mkdir($dir);\n\n $fp = fopen(\"$dir/class.ValidadorFormulario.php\",\"w\"); fputs($fp, $modeloFinal); fclose($fp);\n\n return true;\t\n }", "public function __construct() {\n\n\t\t//Call the parent constructor\n\t\tparent::__construct(); \n\t\t\n\t\t$this->validate = array_merge(\n\t\t\t\t\t$this->validate\n\t\t\t\t);\t\t\n\n\t}", "public function rules()\n\t{\n\t\treturn [\n\t\t\t'clave' => 'required|max:50',\n\t\t\t'descripcion' => 'required|max:200',\n\t\t\t'id_tipo_colaborador' => 'required|integer',\n 'primera_incidencia' => 'required|integer',\n 'primera_incidencia_plazo'=> 'required',\n 'segunda_incidencia'=> 'required|integer',\n 'segunda_incidencia_plazo'=> 'required|integer',\n 'tercera_incidencia'=> 'required|integer',\n\t\t];\n\t}", "private function validationRules(BoardApp $app)\n {\n $dates = collect($this->interviewDates());\n $rules = [\n 'interview_schedule' => ['sometimes', 'array', 'size:'.$dates->count(), function ($attribute, $value, $fail) use ($dates) {\n foreach ($dates->all() as $date) {\n if (! array_key_exists($date->format('Y-m-d H:i:s'), $value)) {\n $fail(\"Please enter your availability for {$date->format('D, M j, g:i a')}.\");\n }\n }\n }],\n 'interview_schedule.*' => 'integer|between:1,3',\n 'ocs' => 'sometimes|in:none,abroad_fa,abroad_sp,abroad_wi',\n 'remote' => 'sometimes|boolean',\n 'remote_contact' => 'sometimes|required_if:remote,1',\n 'remote_platform' => 'required_if:remote,1',\n 'common' => 'sometimes|array',\n ];\n\n return $rules;\n }", "public function __construct()\n {\n parent::__construct();\n\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle(\"Consulta de relatórios\");\n\n $criteria_relatorio_id = new TCriteria();\n\n\tTTransaction::open('permission');\n $conn = TTransaction::get();\n $result = $conn->query('SELECT * FROM system_user_group WHERE system_user_id = '.TSession::getValue(\"userid\").' and system_group_id = (SELECT ID FROM system_group WHERE name = \\'Managers\\')');\n $objects = $result->fetchAll(PDO::FETCH_CLASS, \"stdClass\");\n if (count($objects) > 0) {\n $filterVar = null;\n $result = $conn->query('SELECT * FROM system_users WHERE system_unit_id = (SELECT system_unit_id FROM system_users WHERE id = '.TSession::getValue(\"userid\").')');\n $system_users = $result->fetchAll(PDO::FETCH_CLASS, \"stdClass\");\n foreach ($system_users as $user) {\n if ($filterVar != null) {\n $filterVar = $filterVar.',';\n }\n $filterVar = $filterVar.$user->id;\n }\n $criteria_relatorio_id->add(new TFilter('id', 'in', \"(SELECT id FROM relatorio WHERE user_id in ($filterVar))\"));\n } else {\n $filterVar = TSession::getValue(\"userid\");\n $criteria_relatorio_id->add(new TFilter('user_id', '=', $filterVar));\n }\n TTransaction::close();\n\n $relatorio_id = new TDBCheckGroup('relatorio_id', 'bedevops', 'Relatorio', 'id', '{titulo}','id asc' , $criteria_relatorio_id );\n $categoria_id = new TDBCombo('categoria_id', 'bedevops', 'Categoria', 'id', '{categoria}','categoria asc' );\n\n $relatorio_id->setBreakItems(2);\n $relatorio_id->setLayout('horizontal');\n\n $relatorio_id->setSize(600);\n $categoria_id->setSize('20%');\n\n $row1 = $this->form->addFields([new TLabel(\"Título:\", null, '14px', null)],[$relatorio_id]);\n $row2 = $this->form->addFields([new TLabel(\"Categoria:\", null, '14px', null)],[$categoria_id]);\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_ongenerate = $this->form->addAction(\"Filtrar\", new TAction([$this, 'onGenerate']), 'fas:search #ffffff');\n $btn_ongenerate->addStyleClass('btn-primary'); \n\n $btn_onaction = $this->form->addAction(\"Cadastrar\", new TAction([$this, 'onAction']), 'fas:hammer #ffffff');\n $btn_onaction->addStyleClass('btn-success'); \n\n $btn_onexport = $this->form->addHeaderAction(\"Exportar\", new TAction([$this, 'onExport']), 'fas:file-pdf #ffffff');\n $btn_onexport->addStyleClass('btn-danger'); \n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n $container->add(TBreadCrumb::create([\"Relatórios\",\"Consulta de Relatórios\"]));\n $container->add($this->form);\n\n TButton::disableField(self::$formName, 'btn_onexport');\n\n parent::add($container);\n\n }", "public function __construct(){\n require_once \"GestioneAcquariMarini/libs/ValidationFunction/validationFunction.php\";\n $this->validationFunction = new ValidationFunction();\n }", "public function rules()\n {\n return [\n 'ID_JOGADOR' => 'required'\n , 'DM_DATA_INICIO_S' => 'required'\n , 'ID_TIPO_LESAO' => 'required'\n , 'ID_ORIGEM_LESAO' => 'required'\n , 'ID_PARTE_CORPO' => 'required'\n , 'ID_MEDICO' => 'required'\n ];\n }", "public function rules()\r\n {\r\n $contactAbout = config('constants.contact.contact_about');\r\n\r\n return [\r\n 'name' => 'required|max:100',\r\n 'kana' => 'required|regex:/^[ぁ-ん  ー・]+$/u|max:100',\r\n 'phone' => 'required|max:30',\r\n 'email' => 'required|email',\r\n 'inquiryAbout' => 'required|in:'.$contactAbout['individual']['jp_value'].','.$contactAbout['corporate']['jp_value'],\r\n 'options' => 'required|array',\r\n 'inquiryContent' => 'max:1000',\r\n 'zipCode' => 'max:10',\r\n 'municipality' => 'max:100',\r\n 'houseNumber' => 'max:100'\r\n ];\r\n }", "public function validateRequest(){\n global $default;\n\n // Validate controller\n if (!($this->controller)) {\n // No controller set, Use defaults\n $this->controller = $default['controller'];\n $this->action = $default['action'];\n $this->parameter1 = $default['parameter1']; \n $this->parameter2 = $default['parameter2'];\n $this->parameter3 = $default['parameter3'];\n } \n\n // Check controller exists\n \n // Validate action\n if (!isset($this->action)) {\n // No action set, try index\n $this->action = 'index';\n } \n\n // Create controller to dispatch our request, eg new ItemsController\n $model = ucwords(rtrim($this->controller, 's'));\n $controller = ucwords($this->controller) . 'Controller';\n $dispatch = new $controller($model, $this->controller, $this->action);\n\n // Check $action method exists\n if (!method_exists($dispatch, $this->action)) {\n // Show error page\n } \n }", "public function rules()\n\t{\n\t\treturn [\n\t\t\t'doc' => \t'required|max:100|unique:patients,doc',\n 'first_name' => \t'required|max:50',\n 'last_name' => \t'required|max:50',\n 'doc_type_id'\t\t=> \t'required|integer|exists:doc_types,id',\n 'occupation_id' => \t'required|integer|exists:occupations,id',\n 'date_birth'\t\t=>\t'required|date',\n 'sex'\t\t\t\t=> \t'required|in:M,F',\n 'email'\t\t\t\t=>\t'email|max:100|unique:patients,email',\n 'tel'\t\t\t\t=>\t'numeric',\n 'address' => 'max:100'\n\t\t];\n\t}", "public function rules()\n {\n return [\n 'nombre' => 'required|min:3',\n 'apellido' => 'required|min:3',\n 'parentesco' => 'required',\n 'dpiencargado' => 'required|min:8|unique:encargados,dpiencargado,',\n 'telefono' => 'required|min:8',\n 'direccion' => 'required',\n 'email' => 'required|email|unique:encargados,email,',\n 'encargadoaux' => 'required',\n 'parentescoaux' => 'required',\n 'telefonoaux' => 'required|min:8',\n ];\n }", "public function rules()\n { \n // Campos multiregistro Limites geograficos\n $planemergenciaSede = count($this->get('sedePlanEmergenciaLimite'));\n $planemergenciaNorte = count($this->get('nortePlanEmergenciaLimite'));\n $planemergenciaSur = count($this->get('surPlanEmergenciaLimite'));\n $planemergenciaOriente = count($this->get('orientePlanEmergenciaLimite'));\n $planemergenciaOccidente = count($this->get('occidentePlanEmergenciaLimite'));\n // Campos multiregistro Inventario\n $planemergenciaSedeInventario = count($this->get('sedePlanEmergenciaInventario'));\n $planemergenciaRecursoInventario = count($this->get('recursoPlanEmergenciaInventario'));\n $planemergenciaCantidadInventario = count($this->get('cantidadPlanEmergenciaInventario'));\n $planemergenciaUbicacionInventario = count($this->get('ubicacionPlanEmergenciaInventario'));\n $planemergenciaObservacionInventario = count($this->get('observacionPlanEmergenciaInventario'));\n // Campos multiregistro Comite\n $planemergenciaComite = count($this->get('comitePlanEmergenciaComite'));\n $planemergenciaIntegrantes = count($this->get('integrantesPlanEmergenciaComite'));\n // Campos multiregistro Nivel\n $planemergenciaNivelCargo = count($this->get('cargoPlanEmergenciaNivel'));\n\n\n $validacion = array(\n \"nombrePlanEmergencia\" => \"required\",\n \"fechaElaboracionPlanEmergencia\" => \"required\",\n \"CentroCosto_idCentroCosto\" => \"required\",\n \"Tercero_idRepresentanteLegal\" => \"required\"\n );\n\n\n// For Multiregistro limietes geograficos\n for($i = 0; $i < $planemergenciaSede; $i++)\n {\n if(trim($this->get('sedePlanEmergenciaLimite')[$i]) == '')\n { \n $validacion['sedePlanEmergenciaLimite'.$i] = 'required';\n }\n }\n\n for($i = 0; $i < $planemergenciaNorte; $i++)\n {\n if(trim($this->get('nortePlanEmergenciaLimite')[$i]) == '')\n { \n $validacion['nortePlanEmergenciaLimite'.$i] = 'required';\n }\n }\n for($i = 0; $i < $planemergenciaSur; $i++)\n {\n if(trim($this->get('surPlanEmergenciaLimite')[$i]) == '')\n { \n $validacion['surPlanEmergenciaLimite'.$i] = 'required';\n }\n }\n for($i = 0; $i < $planemergenciaOriente; $i++)\n {\n if(trim($this->get('orientePlanEmergenciaLimite')[$i]) == '')\n { \n $validacion['orientePlanEmergenciaLimite'.$i] = 'required';\n }\n }\n\n for($i = 0; $i < $planemergenciaOccidente; $i++)\n {\n if(trim($this->get('occidentePlanEmergenciaLimite')[$i]) == '')\n { \n $validacion['occidentePlanEmergenciaLimite'.$i] = 'required';\n }\n }\n // Cierra FOR LIMITES\n\n // For Multiregistro Inventario\n for($i = 0; $i < $planemergenciaSedeInventario ; $i++)\n {\n if(trim($this->get('sedePlanEmergenciaInventario')[$i]) == '')\n { \n $validacion['sedePlanEmergenciaInventario'.$i] = 'required';\n }\n }\n\n for($i = 0; $i < $planemergenciaRecursoInventario ; $i++)\n {\n if(trim($this->get('recursoPlanEmergenciaInventario')[$i]) == '')\n { \n $validacion['recursoPlanEmergenciaInventario'.$i] = 'required';\n }\n }\n for($i = 0; $i < $planemergenciaCantidadInventario ; $i++)\n {\n if(trim($this->get('cantidadPlanEmergenciaInventario')[$i]) == '')\n { \n $validacion['cantidadPlanEmergenciaInventario'.$i] = 'required';\n }\n }\n for($i = 0; $i < $planemergenciaUbicacionInventario ; $i++)\n {\n if(trim($this->get('ubicacionPlanEmergenciaInventario')[$i]) == '')\n { \n $validacion['ubicacionPlanEmergenciaInventario'.$i] = 'required';\n }\n }\n for($i = 0; $i < $planemergenciaObservacionInventario ; $i++)\n {\n if(trim($this->get('observacionPlanEmergenciaInventario')[$i]) == '')\n { \n $validacion['observacionPlanEmergenciaInventario'.$i] = 'required';\n }\n } \n // Cierra FOR INVENTARIO\n\n // For Multiregistro Comie\n for($i = 0; $i < $planemergenciaComite ; $i++)\n {\n if(trim($this->get('comitePlanEmergenciaComite')[$i]) == '')\n { \n $validacion['comitePlanEmergenciaComite'.$i] = 'required';\n }\n }\n\n for($i = 0; $i < $planemergenciaIntegrantes ; $i++)\n {\n if(trim($this->get('integrantesPlanEmergenciaComite')[$i]) == '')\n { \n $validacion['integrantesPlanEmergenciaComite'.$i] = 'required';\n }\n }\n \n // Cierra FOR COMITE\n // For Multiregistro nivel\n for($i = 0; $i < $planemergenciaNivelCargo; $i++)\n {\n if(trim($this->get('cargoPlanEmergenciaNivel')[$i]) == '')\n { \n $validacion['cargoPlanEmergenciaNivel'.$i] = 'required';\n }\n }\n // Cierra FOR nivel\n return $validacion;\n \n }", "public function rules() { \n\n return [\n 'codigo' => 'required|alpha_num|unique:cliente|max:1',\n 'razonsocial' => 'required|unique:cliente|max:15',\n 'cif' => 'required|alpha_num|unique:cliente|max:15',\n 'direccion' => 'required|max:100',\n 'municipio' => 'required|max:100',\n 'provincia' => 'required|max:100',\n 'fechainiciocontrato' => 'required|date',\n 'fechafincontrato' => 'required|date',\n 'numeroreconocimientoscontratados' => 'required|numeric'\n ];\n }", "public function rules()\n {\n return [\n 'nome' => 'required|string|min:1',\n 'nascimento' => [\n 'required',\n new RulesClienteMaiorIdade($this->nascimento)\n ],\n 'cpf' => [\n 'required',\n 'string',\n Rule::unique('clientes')->ignore($this->id),\n 'min:1'\n ],\n 'email' => [\n 'required',\n 'string',\n 'email',\n Rule::unique('clientes')->ignore($this->id),\n 'min:1'\n ]\n ];\n \n }", "public function testSetEmailLstAdrChoixElem() {\n\n $obj = new Collaborateurs();\n\n $obj->setEmailLstAdrChoixElem(10);\n $this->assertEquals(10, $obj->getEmailLstAdrChoixElem());\n }", "public function checkvalores1($attribute,$params) {\n\t\t\t\t\t\t\t\t\t\tif ($this->tipoimputacion=='K')\t\t{ //ESTA IMPOUTADA A UN CECO\n\t\t\t\t\t\t\t\t\t\t\t$modeloceco=Cc::model()->find(\"codc=:codigo\",array(\":codigo\"=>trim($this->tipoimputacion)));\n\t\t\t\t\t\t\t\t\t\t\tif (is_null($modeloceco))\n\t\t\t\t\t\t\t\t\t\t\t\t $this->adderror('tipoimputacion','Este ceco no existe' );\n\n\t\t\t\t\t\t\t\t\t\t}\telse { // SI ES LIBRE \n\t\t\t\t\t\t\t\t\t\t\t\t\t//Luego si son de otro tipo , no debe de haber material en el campo\n\t\t\t\t\t\t\t\t\t\t\t if(!is_null($this->tipoimputacion))\n\t\t\t\t\t\t\t\t\t\t\t \t $this->adderror('tipoimputacion','No se permite especificar el ceco en este tipo de solicitud' );\n\t\t\t\t\t\t\t\t\t\t}\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t}", "public function rules()\n {\n return [\n 'nom_cliente' => 'required|string|max:50',\n 'apellido_paterno' => 'required|string|max:20',\n 'apellido_materno' => 'required|string|max:20',\n 'telefono' => 'required|numeric',\n 'ciudad' => 'required',\n ];\n }", "function ValidaCampos(){\n\t\t\n\t\t $this->form_validation->set_rules(\"id_clase\", \"Id_clase\", \"callback_select_clase\");\n\t\t $this->form_validation->set_rules(\"ofrenda_clase\", \"Ofrenda_clase\", \"trim|required\");\n\t\t $this->form_validation->set_rules(\"fecha_ofrenda\", \"Fecha_ofrenda\", \"trim|required\");\n\t\t \n\t}", "public function validateAdd( $adapter, $o )\n\t{\n\t\t$result = new ValidationResult();\n\n\t\t//Check Application Name\n\t\tif(SoondaUtil::CheckEmpty( $o->ApplicationName, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:ApplicationName}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"ApplicationName\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t//Check Application Title\n\t\tif(SoondaUtil::CheckEmpty( $o->ApplicationTitle, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:ApplicationTitle}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"ApplicationTitle\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t//Check Application Info\n\t\tif(SoondaUtil::CheckEmpty( $o->ApplicationInfo, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:ApplicationInfo}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"ApplicationInfo\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t//Check Application Icon Small\n\t\tif(SoondaUtil::CheckEmpty( $o->ApplicationIconSmall, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:ApplicationIconSmall}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"ApplicationIconSmall\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t//Check Application Icon Middle\n\t\tif(SoondaUtil::CheckEmpty( $o->ApplicationIconMiddle, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:ApplicationIconMiddle}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"ApplicationIconMiddle\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t//Check Application Icon Large\n\t\tif(SoondaUtil::CheckEmpty( $o->ApplicationIconLarge, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:ApplicationIconLarge}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"ApplicationIconLarge\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t//Check Application Path\n\t\tif(SoondaUtil::CheckEmpty( $o->ApplicationPath, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:ApplicationPath}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"ApplicationPath\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t//Check Application File\n\t\tif(SoondaUtil::CheckEmpty( $o->ApplicationFile, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:ApplicationFile}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"ApplicationFile\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t//Check Application Class\n\t\tif(SoondaUtil::CheckEmpty( $o->ApplicationClass, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:ApplicationClass}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"ApplicationClass\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t//Check Application Main Function\n\t\tif(SoondaUtil::CheckEmpty( $o->ApplicationMainFunction, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:ApplicationMainFunction}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"ApplicationMainFunction\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t//Check Display Icon\n\t\tif(SoondaUtil::CheckEmpty( $o->DisplayIcon, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:DisplayIcon}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"DisplayIcon\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t//Check Is Active\n\t\tif(SoondaUtil::CheckEmpty( $o->IsActive, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:IsActive}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"IsActive\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t//Check Use Workflow\n\t\tif(SoondaUtil::CheckEmpty( $o->UseWorkflow, \"\") ) \n\t\t{\t$result->succeed = false;\n\t\t\t$result->message = \"<b> <b>{SOO.LANG:UseWorkflow}</b> </b> {SOO.LANG:cannotempty}!\";\n\t\t\t$result->columnName = \"UseWorkflow\";\n\t\t\treturn $result;\n\t\t}\n\n\t\t$result->succeed = true;\n\t\t$result->message = \"Ok\";\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t// will receive user inputs.\n\t\treturn array(\n\t\t\tarray('tbl_Programa_id_programa, tbl_Factor_id_factor, tbl_caracteristica_id_caracteristica, num_aspecto, aspecto, instrumento', 'required'),\n\t\t\tarray('tbl_Programa_id_programa, tbl_Factor_id_factor, tbl_caracteristica_id_caracteristica', 'length', 'max'=>10),\n\t\t\tarray('num_aspecto', 'length', 'max'=>20),\n\t\t\tarray('instrumento', 'length', 'max'=>128),\n\t\t\tarray('fuente, documento, link', 'length', 'max'=>256),\n\t\t\tarray('cumple', 'length', 'max'=>2),\n\t\t\tarray('Observaciones','safe'),\n\t\t\t/*\n\t\t\t//Example username\n\t\t\tarray('username', 'match', 'pattern' => '/^[A-Za-z0-9_]+$/u',\n 'message'=>'Username can contain only alphanumeric \n characters and hyphens(-).'),\n \tarray('username','unique'),\n \t*/\n\t\t\t// The following rule is used by search().\n\t\t\t// @todo Please remove those attributes that should not be searched.\n\t\t\tarray('id_aspecto, tbl_Programa_id_programa, tbl_Factor_id_factor, tbl_caracteristica_id_caracteristica, num_aspecto, aspecto, instrumento, fuente, documento, link, Observaciones', 'safe', 'on'=>'search'),\n\t\t);\n\t}", "public function cadastrar(){\n $this->recVariaveis();\n $validate=new \\Classes\\ClassValidate();\n $validate->validateFields(array($_POST));\n $validate->validateEmail($this->Email);\n //$validate->validateData($this->Dt_Nascimento);\n $validate->validateCPF($this->CPF);\n var_dump($validate->getErro());\n parent::cadastroClientes($this->Nome, $this->Sobrenome, $this->CPF, $this->Dt_Nascimento, $this->Telefone, $this->Email, $this->Senha);\n echo \"Cadastro realizado com sucesso!\";\n }", "public function rules()\n { \n return [\n 'nombres' => 'required',\n 'apellido_paterno' => 'required',\n 'apellido_materno' => 'required',\n 'tipo_documento' => 'required',\n 'num_documento' => [\n 'required',\n function ($attribute, $value, $fail) {\n LOG::info($this->get('tipo_documento'));\n LOG::info(\"Longitud Documento:\".strlen($value));\n if($this->get('tipo_documento')=== 1){\n LOG::info(\"Longitud Documento:\".strlen($value));\n if(strlen($value)!=8){\n $fail('El DNI debe contener 8 caracteres');\n }\n else{\n $patron = \"/^[[:digit:]]+$/\";\n if (!preg_match($patron, $value)) {\n $fail('El DNI debe contener solo numeros');\n }\n }\n }\n if($this->get('tipo_documento')==='4'){\n if(strlen($value)>12 || strlen($value)<5){\n $fail('El carnet de extranjeria no cumple con los requisitos de longitud');\n }else{\n $patron = \"/^[[:alnum:]]+$/\";\n if (!preg_match($patron, $value)) {\n $fail('El carnet de extranjeria debe contener solo numeros y letras');\n } \n }\n }\n if($this->get('tipo_documento')==='6'){\n if(strlen($value)!=11){\n $fail('El RUC debe contener 11 caracteres');\n }\n else{\n $patron = \"/^[[:digit:]]+$/\";\n if (!preg_match($patron, $value)) {\n $fail('El RUC debe contener solo numeros');\n }\n }\n }\n if($this->get('tipo_documento')==='9'){\n if(strlen($value)>15 || strlen($value)<5){\n $fail('El carne de solicitud de refugio no cumple con los requisitos de longitud');\n }else{\n $patron = \"/^[[:alnum:]]+$/\";\n if (!preg_match($patron, $value)) {\n $fail('El carne de solicitud de refugio debe contener solo numeros y letras');\n } \n }\n }\n if($this->get('tipo_documento')==='11'){\n if(strlen($value)>15 || strlen($value)<5){\n $fail('La partidad de nacimiento no cumple con los requisitos de longitud');\n }else{\n $patron = \"/^[[:alnum:]]+$/\";\n if (!preg_match($patron, $value)) {\n $fail('La partidad de nacimiento debe contener solo numeros y letras');\n } \n }\n }\n }\n ],\n 'fecha_nacimiento' => 'required',\n 'sexo' => 'required',\n ]; \n }", "public function configure()\n {\n \t$arregloEstados = array(2 => 'Libre', 3 => 'Regular');\n\t// Consultar Guille, 1 => 'Cursando'\n \t\n \t$this->widgetSchema['fechacierre'] = new sfWidgetFormInput(array('label' => '<p align=\"left\">Fecha de Cierre:</p>'), array('size' =>'10'));\n \t$this->widgetSchema['fechavencimiento'] = new sfWidgetFormInput(array('label' => '<p align=\"left\">Fecha de Vencimiento:</p>'), array('size' =>'10'));\n \t$this->widgetSchema['idestadomateria'] = new sfWidgetFormSelect(array('choices' => $arregloEstados));\n \t$this->widgetSchema['idcomision'] = new sfWidgetFormInputHidden();\n\t$this->widgetSchema['idmesaexamen'] = new sfWidgetFormSelect(array('choices' => array(0 => '----Seleccione----')));\n\t\n \t// Se define los labels\n\t$this->widgetSchema->setLabel('idestadomateria', '<p align=\"left\">Estado:</p>');\n\t$this->widgetSchema->setLabel('idmesaexamen', '<p align=\"left\">Mesa de Examen:</p>');\n\t \t\n \t// Se define los validadores \n\t$this->setValidators(array(\n\t\t'fechacierre' => new sfValidatorString(),\n\t\t'fechavencimiento' => new sfValidatorString()\n\t)); \n }", "public function rules()\n {\n return [\n 'comedor_id' => ['required', Rule::exists('comedores', 'id')],\n 'menu_id' => ['required', Rule::exists('menus', 'id')],\n 'descripcion' => [\n 'required',\n Rule::unique('platos')\n ->where(function ($query) {\n return $query\n ->where('comedor_id', '=', $this->comedor_id)\n ->where('descripcion', '=', $this->descripcion);\n })\n ->ignore($this->id),\n ],\n 'insumos.*.insumos' => [\n 'required', 'distinct',\n ], \n \n 'insumos.*.cantidad' => ['required'],\n\n 'insumos' => [\n new PlatoUnicoRule($this->id,$this->comedor_id)\n ],\n ];\n }", "public function __construct()\n {\n parent::__construct([], [\n 'acronym' => [\n 'type' => 'text',\n 'label' => 'Akronym',\n 'required' => true,\n 'validation' => ['not_empty'],\n ],\n 'firstName' => [\n 'type' => 'text',\n 'label' => 'Förnamn',\n 'required' => true,\n 'validation' => ['not_empty'],\n ],\n 'lastName' => [\n 'type' => 'text',\n 'label' => 'Efternamn',\n 'required' => true,\n 'validation' => ['not_empty'],\n ],\n 'town' => [\n 'type' => 'text',\n 'label' => 'Ort',\n 'required' => true,\n 'validation' => ['not_empty'],\n ],\n 'email' => [\n 'type' => 'text',\n 'label' => 'E-post',\n 'required' => true,\n 'validation' => ['not_empty', 'email_adress'],\n ],\n 'password' => [\n 'type' => 'password',\n 'label' => 'Lösenord',\n 'required' => true,\n 'validation' => ['not_empty'],\n ],\n 'submit' => [\n 'type' => 'submit',\n 'callback' => [$this, 'callbackSubmit'],\n 'value' => 'Spara',\n ],\n ]);\n }", "function validaCampos()\n {\n $this->form_validation->set_rules(\"producto\", \"Producto\", \"trim|required\");\n\t\t$this->form_validation->set_rules(\"plazo\", \"Plazo\", \"trim|required\");\n $this->form_validation->set_rules(\"fechaInicio\", \"Fecha Inicio\", \"trim|required\");\n $this->form_validation->set_rules(\"fechaFinal\", \"Fecha Final\", \"trim|required\");\n $this->form_validation->set_rules(\"tasaInteres\", \"Tasa Interes\", \"trim|required\");\n $this->form_validation->set_rules(\"capital\", \"Capital\", \"trim|required\");\n $this->form_validation->set_rules(\"deuda\", \"Deuda\", \"trim|required\");\n\t\t$this->form_validation->set_rules(\"tipo\", \"Tipo\", \"callback_select_tipo\");\n\t\t$this->form_validation->set_rules(\"estado\", \"Estado\", \"callback_select_estado\");\n /*$this->form_validation->set_rules(\"distrito\", \"Distrito\", \"callback_select_distrito\");\n $this->form_validation->set_rules(\"provincia\", \"Provincia\", \"callback_select_provincia\");\n $this->form_validation->set_rules(\"departamento\", \"Departamento\", \"callback_select_departamento\");\n $this->form_validation->set_rules(\"telefono\", \"Telefono\", \"trim|required\");\n $this->form_validation->set_rules(\"sexo\", \"Sexo\", \"callback_select_sexo\");\n $this->form_validation->set_rules(\"oficinaAfiliacion\", \"OficinaAfiliacion\", \"callback_select_oficina\");*/\n }", "public function rules() {\r\n //retornar array de todas las validaciones\r\n return array(\r\n //array de propiedades de los campos \r\n array(\r\n 'nombre,password,repetir_password,email', // nombre de mis campos nombre,password,repetir_password,email\r\n 'required',\r\n 'message' => 'Este campo es requerido',\r\n ),\r\n array(\r\n 'email',\r\n 'email',\r\n 'message' => 'El formato de Email es Incorrecto',\r\n ),\r\n array(\r\n 'password',\r\n 'match',\r\n 'pattern' => '/^[a-z0-9]+$/i',\r\n 'message' => 'Solo letras y numeros',\r\n ),\r\n array(\r\n 'repetir_password',\r\n 'compare',\r\n 'compareAttribute' => 'password',\r\n 'message' => 'El password no coincide',\r\n ),\r\n array(\r\n 'nombre',\r\n 'comprobar_nombre'\r\n ),\r\n array(\r\n 'email',\r\n 'comprobar_email'\r\n ),\r\n ); //fin de mi return array\r\n }", "public function rules()\n {\n $rules = [\n 'condominio_id' => 'required|exists:condominios,id',\n 'cliente_id' => \"required|exists:clientes,id,condominio_id,{$this->condominio_id}\",\n 'created_at' => \"nullable|date_format:Y-m-d H:i\",\n 'prototipo' => 'nullable|string',\n 'detalles' => 'required|array|min:1',\n 'detalles.*.familia_id' => 'required|exists:familias,id',\n 'detalles.*.concepto_id' => 'required|exists:conceptos,id',\n 'detalles.*.falla_id' => 'nullable|exists:fallas,id',\n 'detalles.*.ubicacion_id' => 'required|exists:ubicaciones,id',\n 'detalles.*.descripcion' => 'nullable|string',\n ];\n if ($this->user()->es_coordinador === false) {\n array_unshift($rules, [\n 'condominio_id' => 'required|exists:condominios,id',\n 'cliente_id' => \"required|exists:clientes,id,condominio_id,{$this->condominio_id}\",\n ]);\n }\n return $rules;\n }", "public function rules()\n {\n return [\n 'nombre' => 'required',\n 'apellido_pat' => 'required',\n 'apellido_mat' => 'required',\n 'fecha_nac' => 'required',\n 'tipo_doc' => 'required',\n 'numero_doc' => 'required|unique:tbl_persona,nombre,' . $this->route('persona')->id . '|max:20',\n 'sexo' => 'required',\n 'celular' => 'required',\n 'email' => 'required',\n 'direccion' => 'required', \n ];\n }", "public function rules()\n {\n if ($this->method() === 'POST') {\n $this->camposValidacao['nome'][] = 'unique:pessoas,nome';\n }\n return $this->camposValidacao;\n }", "public function validator()\n {\n\n return PescariaValidator::class;\n }", "public function addValidator()\n {\n $this->app->validator->extendImplicit('recaptcha', function ($attribute, $value, $parameters) {\n $captcha = new Recaptcha();\n return $captcha->validate();\n }, config('Recaptcha.custom_error'));\n }" ]
[ "0.48214734", "0.46716857", "0.46556398", "0.46516967", "0.46305948", "0.46106762", "0.45696616", "0.45574588", "0.45313123", "0.4518478", "0.451473", "0.4464344", "0.44557038", "0.4452974", "0.44419336", "0.44372746", "0.44340152", "0.44136012", "0.44104397", "0.43992507", "0.4399213", "0.43947554", "0.43860698", "0.43822256", "0.43750158", "0.43716925", "0.4362452", "0.43552625", "0.43468806", "0.43447202", "0.4341637", "0.43370765", "0.43252468", "0.43215334", "0.43197367", "0.43166512", "0.43140513", "0.43115652", "0.4308261", "0.42892364", "0.4289124", "0.42864752", "0.42856103", "0.42843258", "0.42840812", "0.42840812", "0.42821506", "0.42768732", "0.42652157", "0.4256641", "0.424679", "0.42370299", "0.423283", "0.42327842", "0.42326117", "0.42278478", "0.4226476", "0.4220755", "0.42174703", "0.4216671", "0.4211679", "0.4210278", "0.42097518", "0.4207119", "0.41963232", "0.41962186", "0.4184946", "0.4181137", "0.41810736", "0.41797367", "0.41757894", "0.41743168", "0.4173174", "0.4170141", "0.4168348", "0.41666093", "0.4164992", "0.41634607", "0.41611543", "0.41587296", "0.4155751", "0.4150934", "0.41473454", "0.41454214", "0.41436344", "0.41428337", "0.41412547", "0.4136273", "0.4134346", "0.41327545", "0.41296655", "0.4128021", "0.41272432", "0.4126475", "0.41264388", "0.412386", "0.41224316", "0.41201094", "0.4119746", "0.41153315", "0.41057867" ]
0.0
-1
Inicializa o controlador Basico_OPController_FormularioAssocclElementoAssocclValidatorOPController
protected function _init() { // chamando inicializacao da classe pai parent::_init(); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init() {\n $dcpr_id_processo_digital = new Zend_Form_Element_Hidden('DCPR_ID_PROCESSO_DIGITAL');\n $dcpr_id_processo_digital->setRequired(true)\n ->addValidator('StringLength', false, array(0, 5));\n\n $dcpr_id_documento = new Zend_Form_Element_Hidden('DCPR_ID_DOCUMENTO');\n $dcpr_id_documento->setRequired(true)\n ->addValidator('StringLength', false, array(0, 20));\n\n $dcpr_id_tp_vinculacao = new Zend_Form_Element_Select('DCPR_ID_TP_VINCULACAO');\n $dcpr_id_tp_vinculacao->setRequired(true)\n ->setLabel('Selecione o tipo de juntada:');\n\n $dcpr_dh_vinculacao_doc = new Zend_Form_Element_Text('DCPR_DH_VINCULACAO_DOC');\n $dcpr_dh_vinculacao_doc->setRequired(true)\n ->setLabel('Data e Hora da juntada:');\n\n $dcpr_ic_ativo = new Zend_Form_Element_Checkbox('DCPR_IC_ATIVO');\n $dcpr_ic_ativo->setRequired(true)\n ->setLabel('Ativo:')\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $this->addElements(array($dcpr_id_processo_digital\n , $dcpr_id_documento\n , $dcpr_id_tp_vinculacao\n , $dcpr_dh_vinculacao_doc\n , $dcpr_ic_ativo));\n }", "public function init()\n {\n \t\n \t$this->setAttrib('enctype', 'multipart/form-data');\n \t \t\n \t$this->setName('FormularioOcorrencia');\n $id = new Zend_Form_Element_Hidden('id_ocorrencia');\n $id->addFilter('Int');\n \n \n \n\t\t$descricao = new Zend_Form_Element_Textarea('descricao');\n $descricao->setLabel('Descricao')\n ->setRequired(true);\n\t\t$descricao->removeDecorator('DtDdWrapper')\n ->removeDecorator('HtmlTag')\n ->removeDecorator('Label')\n ->setAttrib('class', 'form-control')\n \t->setAttrib('rows', '5');\n \n\t\t\n\t\t\n\t\t\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setLabel(\"Adiconar\");\n $submit->setAttrib('id', 'submitbutton');\n $submit->removeDecorator('DtDdWrapper')\n ->setAttrib('class', 'btn btn-primary')\n ->removeDecorator('HtmlTag')\n ->removeDecorator('Label');\n \n \n \n \n $this->addElements(array($id,$descricao,$submit)); \n \n $this->setDecorators( array( array('ViewScript', array('viewScript' => 'formularioOcorrencia.phtml'))));\n }", "public function init()\r\n {\r\n \t\r\n \r\n \t \t\r\n \t$this->setName('FormularioRamoAtividade');\r\n $ID_RAMO_ATIVIDADE = new Zend_Form_Element_Hidden('ID_RAMO_ATIVIDADE');\r\n $ID_RAMO_ATIVIDADE->addFilter('Int');\r\n $ID_RAMO_ATIVIDADE->removeDecorator('Label');\r\n \r\n $DS_RAMO_ATIVIDADE= new Zend_Form_Element_Text('DS_RAMO_ATIVIDADE');\r\n $DS_RAMO_ATIVIDADE->setLabel('RAMO DE ATIVIDADE')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter ramo de atividade');\r\n \r\n \t \r\n \t\t\t\t \r\n \t\t\t\t \r\n \r\n $submit = new Zend_Form_Element_Submit('submit');\r\n $submit->setLabel(\"Adiconar\");\r\n $submit->setAttrib('id', 'submitbutton');\r\n $submit->removeDecorator('DtDdWrapper')\r\n ->setAttrib('class', 'btn btn-primary button')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label'); \r\n \r\n $this->addElements(array($ID_RAMO_ATIVIDADE,$DS_RAMO_ATIVIDADE,$submit)); \r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioRamoAtividade.phtml')))); \r\n\t\r\n }", "public function init()\n {\n\t\t$this->setName('Velatorio');\n\n //campo hidden para guardar id del velatorio\n $idvelatorio = new Zend_Form_Element_Hidden('idvelatorio'); \n $idvelatorio->addFilter('Int');\n\n //creamos <input text> para escribir nombre del velatorio\n $RUC = new Zend_Form_Element_Text('RUC');\n $RUC->setLabel('RUC:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t\n //creamos <input text> para escribir nombre del velatorio\n $nombre = new Zend_Form_Element_Text('nombre');\n $nombre->setLabel('Nombre del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t \n\t\t \n //creamos <input text> para escribir direccion del velatorio\n $direccion = new Zend_Form_Element_Text('direccion');\n $direccion->setLabel('Direccion del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t\t\n //Combo del Departamento \n $iddepartamento = new Zend_Form_Element_Select('iddepartamento');\n $iddepartamento->setLabel('Seleccione departamentos:')->setRequired(true); \n\t\t\n\t\t$iddepartamento->addMultiOption(0, \"select\");\t\t\n\n\t\t//cargo en un select los departamentos\n $table = new Application_Model_DbTable_Departamento();\n //obtengo listado de todos los departamentos y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $iddepartamento->addMultiOption($c->iddepartamento, $c->nombre);\n }\n\n\t\t\n\t\t//Combo de la Provincia\n $idprovincias = new Zend_Form_Element_Select('idprovincias');\n $idprovincias->setLabel('Seleccione provincias:')->setRequired(true); \n\t\t\n\t\t//cargo en un select las provincias\n /* $table = new Application_Model_DbTable_Provincia();\n //obtengo listado de todas los provincias y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $idprovincias->addMultiOption($c->idprovincia, $c->nombre);\n }\n\t\t*/\n\t\t\t\t\n\t\t//Combo del Distrito\n $iddistrito = new Zend_Form_Element_Select('iddistrito');\n $iddistrito->setLabel('Seleccione distritos:')->setRequired(true); \n\n\t\t//cargo en un select los distritos\n /*$table = new Application_Model_DbTable_Distrito();\n //obtengo listado de todos los distritos y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $iddistrito->addMultiOption($c->iddistrito, $c->nombre);\n }\n\t\t*/\n\t\t\n\t\t\n\t\t//creamos <input text> para escribir telefono del velatorio\n $telefono_fijo = new Zend_Form_Element_Text('telefono_fijo');\n $telefono_fijo->setLabel('Telefono del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\t\t \n\t\t//creamos <input text> para escribir celular del velatorio\n $telefono_celular = new Zend_Form_Element_Text('telefono_celular');\n $telefono_celular->setLabel('Celular del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\t\t \n\t\t//creamos <input text> para escribir correo electronico del velatorio\n $mail = new Zend_Form_Element_Text('mail');\n $mail->setLabel('Correo Electronico del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t//creamos <input text> para escribir costo alquiler del velatorio\n $costo = new Zend_Form_Element_Text('costo');\n $costo->setLabel('Costo Alquiler del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t//creamos <input text> para escribir observacion del velatorio\n $observacion = new Zend_Form_Element_Textarea('observacion');\n $observacion->setLabel('Observaciones:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\n\t\t\t\n\t\t \n //boton para enviar formulario\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setAttrib('id', 'submitbutton');\n\n //agregolos objetos creados al formulario\n //$this->addElements(array($id, $nombre,$Descripccion,$profesores,$submit));\t\n\t\t$this->addElements(array($idvelatorio,$RUC,$nombre,$direccion,$iddepartamento,$idprovincias,$iddistrito,$telefono_fijo,$telefono_celular,$mail,$costo,$observacion,$submit));\t\n\t\t\n\t\t//DECORATOR GRUPOS\n\t\t$this->addDisplayGroups(array(\n\t\t\t'left' => array(\n\t\t\t\t'options' => array('description' => 'Left Column'),\n\t\t\t\t'elements' => array($RUC,$nombre,$direccion,$iddepartamento,$idprovincias),\n\t\t\t),\n\t\t\t'right' => array(\n\t\t\t\t'options' => array('description' => 'Right Column'),\n\t\t\t\t'elements' => array($iddistrito,$telefono_fijo,$telefono_celular,$mail,$costo,$observacion),\n\t\t\t),\n\t\t\t'bottom' => array(\n\t\t\t\t'elements' => array($submit),\n\t\t\t)\n\t\t));\n\t\t \n\t\t//$this->setDisplayGroupDecorators(array('Description', 'FormElements', 'Fieldset'));\t\t\n\t\t$this->setDisplayGroupDecorators(array('FormElements', 'Fieldset'));\n\t\t\n\t\t//DECORATOR GRUPOS\n\t\t$this->addDisplayGroups(array(\n\t\t\t'left' => array(\n\t\t\t\t'options' => array('description' => 'Left Column'),\n\t\t\t\t'elements' => array($RUC,$nombre,$direccion,$iddepartamento,$idprovincias),\n\t\t\t),\n\t\t\t'right' => array(\n\t\t\t\t'options' => array('description' => 'Right Column'),\n\t\t\t\t'elements' => array($iddistrito,$telefono_fijo,$telefono_celular,$mail,$costo,$observacion),\n\t\t\t),\n\t\t\t'bottom' => array(\n\t\t\t\t'elements' => array($submit),\n\t\t\t)\n\t\t));\n\t\t \n\t\t//$this->setDisplayGroupDecorators(array('Description', 'FormElements', 'Fieldset'));\t\t\n\t\t$this->setDisplayGroupDecorators(array('FormElements', 'Fieldset'));\n\t\t\n\t\t\n }", "public function init()\r\n {\r\n \t\r\n \r\n \tif(!isset($this->_PROJETOS)){\r\n \t\t$projeto= new Application_Model_DbTable_Projeto();\r\n \t\t$this->_PROJETOS=$projeto->getProjetoCombo() ;\r\n \t} \t\r\n \t$this->setName('FormularioServico');\r\n $FL_VALIDAR_SERVICO= new Zend_Form_Element_Hidden('FL_VALIDAR_SERVICO');\r\n $FL_VALIDAR_SERVICO->addFilter('Int');\r\n $FL_VALIDAR_SERVICO->removeDecorator('Label');\r\n \r\n $ID_SERVICO = new Zend_Form_Element_Hidden('ID_SERVICO');\r\n $ID_SERVICO->addFilter('Int');\r\n $ID_SERVICO->removeDecorator('Label');\r\n \r\n \r\n $FK_OPERADOR = new Zend_Form_Element_Hidden('FK_OPERADOR');\r\n $FK_OPERADOR->addFilter('Int');\r\n $FK_OPERADOR->removeDecorator('Label');\r\n \r\n $FL_PCP = new Zend_Form_Element_Hidden('FL_PCP');\r\n $FL_PCP->addFilter('Int');\r\n $FL_PCP->removeDecorator('Label');\r\n \r\n /* \r\n \r\n \r\n \r\n \r\n \r\n \r\n */\r\n\r\n $FK_TIPO_SERVICO= new Zend_Form_Element_Select('FK_TIPO_SERVICO');\r\n $tipoServico= new Application_Model_DbTable_TipoServico();\r\n $FK_TIPO_SERVICO->setLabel('TIPO PCP');\r\n $FK_TIPO_SERVICO->setMultiOptions( $tipoServico->getTipoServicoCombo() )\r\n ->setRequired(true)\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control select2');\r\n \r\n\t\t\r\n \r\n $FK_PROJETO= new Zend_Form_Element_Hidden('FK_PROJETO');\r\n $FK_PROJETO->addFilter('Int');\r\n $FK_PROJETO->removeDecorator('Label');\r\n \r\n $FK_PROJETO1 = new Zend_Form_Element_Text('FK_PROJETO1');\r\n $FK_PROJETO1->setLabel('PROJETO')\r\n ->setAttrib('class', 'form-control');\r\n\r\n \r\n $DS_SERVICO = new Zend_Form_Element_Textarea('DS_SERVICO');\r\n $DS_SERVICO->setLabel('PCP')\r\n \t\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control ')\r\n \t ->setAttrib('rows', '20');\r\n \r\n $DT_SERVICO = new Zend_Form_Element_Text('DT_SERVICO');\r\n $DT_SERVICO->setLabel('DATA')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control')\r\n ->addPrefixPath('Aplicacao_Validate', 'Aplicacao/Validate/', 'validate')\r\n\t\t\t->addValidator(new Aplicacao_Validate_Data())\r\n ->setAttrib('placeholder', 'Enter serviço ');\r\n \r\n $NR_CARGA_HORARIA = new Zend_Form_Element_Text('NR_CARGA_HORARIA');\r\n $NR_CARGA_HORARIA->setLabel('CARGA HORARIA')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->addValidator('float', true, array('locale' => 'en_US'))\r\n ->setAttrib('class', 'form-control')\r\n ->setAttrib('placeholder', 'Enter carga horária ');\r\n \r\n \r\n \r\n $submit = new Zend_Form_Element_Submit('submit');\r\n $submit->setLabel(\"Adiconar\");\r\n $submit->setAttrib('id', 'submitbutton');\r\n $submit->removeDecorator('DtDdWrapper')\r\n ->setAttrib('class', 'btn btn-primary button')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label'); \r\n \r\n $this->addElements(array($FK_PROJETO1,$FL_VALIDAR_SERVICO,$ID_SERVICO,$FK_PROJETO,$DS_SERVICO,$FK_OPERADOR,$FK_TIPO_SERVICO,$DT_SERVICO,$FL_PCP,$NR_CARGA_HORARIA,$submit)); \r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioPcpProjeto.phtml')))); \r\n\t\r\n }", "public function init() {\n $docm_id_documento = new Zend_Form_Element_Hidden('DOCM_ID_DOCUMENTO');\n $docm_id_documento->setRequired(true)\n ->addValidator('StringLength', false, array(0, 20))\n ->removeDecorator('Label')\n ->removeDecorator('HtmlTag');\n\n $docm_nr_documento = new Zend_Form_Element_Text('DOCM_NR_DOCUMENTO');\n $docm_nr_documento->setRequired(false)\n ->addValidator('StringLength', false, array(0, 28));\n\n $docm_nr_sequencial_doc = new Zend_Form_Element_Text('DOCM_NR_SEQUENCIAL_DOC');\n $docm_nr_sequencial_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 10));\n\n $docm_nr_dcmto_usuario = new Zend_Form_Element_Text('DOCM_NR_DCMTO_USUARIO');\n $docm_nr_dcmto_usuario->setRequired(false)\n ->addValidator('StringLength', false, array(0, 16));\n\n $docm_dh_cadastro = new Zend_Form_Element_Text('DOCM_DH_CADASTRO');\n $docm_dh_cadastro->setRequired(false);\n\n $docm_cd_matricula_cadastro = new Zend_Form_Element_Text('DOCM_CD_MATRICULA_CADASTRO');\n $docm_cd_matricula_cadastro->setRequired(false)\n ->addValidator('StringLength', false, array(0, 14));\n\n $docm_id_tipo_doc = new Zend_Form_Element_Select('DOCM_ID_TIPO_DOC');\n $docm_id_tipo_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 5));\n\n $docm_sg_secao_geradora = new Zend_Form_Element_Text('DOCM_SG_SECAO_GERADORA');\n $docm_sg_secao_geradora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_cd_lotacao_geradora = new Zend_Form_Element_Text('DOCM_CD_LOTACAO_GERADORA');\n $docm_cd_lotacao_geradora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 5));\n\n $docm_sg_secao_redatora = new Zend_Form_Element_Text('DOCM_SG_SECAO_REDATORA');\n $docm_sg_secao_redatora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_cd_lotacao_redatora = new Zend_Form_Element_Text('DOCM_CD_LOTACAO_REDATORA');\n $docm_cd_lotacao_redatora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 5));\n\n $docm_id_pctt = new Zend_Form_Element_Select('DOCM_ID_PCTT');\n $docm_id_pctt->setRequired(false)\n ->addValidator('StringLength', false, array(0, 7));\n\n $docm_ds_assunto_doc = new Zend_Form_Element_Text('DOCM_DS_ASSUNTO_DOC');\n $docm_ds_assunto_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 4000));\n\n $docm_id_tipo_situacao_doc = new Zend_Form_Element_Select('DOCM_ID_TIPO_SITUACAO_DOC');\n $docm_id_tipo_situacao_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_id_confidencialidade = new Zend_Form_Element_Select('DOCM_ID_CONFIDENCIALIDADE');\n $docm_id_confidencialidade->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_nr_documento_red = new Zend_Form_Element_Text('DOCM_NR_DOCUMENTO_RED');\n $docm_nr_documento_red->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_dh_expiracao_documento = new Zend_Form_Element_Text('DOCM_DH_EXPIRACAO_DOCUMENTO');\n $docm_dh_expiracao_documento->setRequired(false);\n\n\n $docm_ds_palavra_chave = new Zend_Form_Element_Textarea('DOCM_DS_PALAVRA_CHAVE');\n $docm_ds_palavra_chave->setRequired(false)\n ->addValidator('StringLength', false, array(0, 500));\n\n $docm_ic_arquivamento = new Zend_Form_Element_Checkbox('DOCM_IC_ARQUIVAMENTO');\n $docm_ic_arquivamento->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_id_pessoa = new Zend_Form_Element_Text('DOCM_ID_PESSOA');\n $docm_id_pessoa->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_ic_documento_externo = new Zend_Form_Element_Checkbox('DOCM_IC_DOCUMENTO_EXTERNO');\n $docm_ic_documento_externo->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_ic_ativo = new Zend_Form_Element_Checkbox('DOCM_IC_ATIVO');\n $docm_ic_ativo->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_ic_processo_autuado = new Zend_Form_Element_Checkbox('DOCM_IC_PROCESSO_AUTUADO');\n $docm_ic_processo_autuado->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_id_movimentacao = new Zend_Form_Element_Text('DOCM_ID_MOVIMENTACAO');\n $docm_id_movimentacao->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_dh_fase = new Zend_Form_Element_Text('DOCM_DH_FASE');\n $docm_dh_fase->setRequired(false);\n\n $docm_id_documento_pai = new Zend_Form_Element_Text('DOCM_ID_DOCUMENTO_PAI');\n $docm_id_documento_pai->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_id_pessoa_temporaria = new Zend_Form_Element_Text('DOCM_ID_PESSOA_TEMPORARIA');\n $docm_id_pessoa_temporaria->setRequired(false)\n ->addValidator('StringLength', false, array(0, 6));\n\n $docm_id_tp_extensao = new Zend_Form_Element_Select('DOCM_ID_TP_EXTENSAO');\n $docm_id_tp_extensao->setRequired(false)\n ->addValidator('StringLength', false, array(0, 3));\n\n $docm_ic_movi_individual = new Zend_Form_Element_Checkbox('DOCM_IC_MOVI_INDIVIDUAL');\n $docm_ic_movi_individual->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_ic_apensado = new Zend_Form_Element_Checkbox('DOCM_IC_APENSADO');\n $docm_ic_apensado->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $this->addElements(array(\n $docm_id_documento\n , $docm_nr_documento\n , $docm_nr_sequencial_doc\n , $docm_nr_dcmto_usuario\n , $docm_dh_cadastro\n , $docm_cd_matricula_cadastro\n , $docm_id_tipo_doc\n , $docm_sg_secao_geradora\n , $docm_cd_lotacao_geradora\n , $docm_sg_secao_redatora\n , $docm_cd_lotacao_redatora\n , $docm_id_pctt\n , $docm_ds_assunto_doc\n , $docm_id_tipo_situacao_doc\n , $docm_id_confidencialidade\n , $docm_nr_documento_red\n , $docm_dh_expiracao_documento\n , $docm_ds_palavra_chave\n , $docm_ic_arquivamento\n , $docm_id_pessoa\n , $docm_ic_documento_externo\n , $docm_ic_ativo\n , $docm_ic_processo_autuado\n , $docm_id_movimentacao\n , $docm_dh_fase\n , $docm_id_documento_pai\n , $docm_id_pessoa_temporaria\n , $docm_id_tp_extensao\n , $docm_ic_movi_individual\n , $docm_ic_apensado\n ));\n }", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n //Crea una caja de texto llamada nombre y longitud 50\r\n $elemT = new FEText(\"Asunto\", FALSE, 50);\r\n //$elemT->set_style_attribute('align', 'right');\r\n //Le asignamos el id nombre y la tecla de acceso n (ctrl+n)\r\n $elemT->set_attribute(\"id\",\"asunto\");\r\n $elemT->set_attribute(\"accesskey\",\"n\"); \r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemT);\r\n\t\r\n //Creamos un Area de Texto llamada comentario\r\n $elemTA = new FETextArea(\"Comentario\", FALSE, 10, 60,\"500px\", \"100px\");\r\n $elemTA->set_attribute('wrap', 'physical');\r\n //Le asignamos el id email y la tecla de acceso c (ctrl+c) \r\n $elemTA->set_attribute(\"id\",\"comentario\");\r\n $elemTA->set_attribute(\"accesskey\",\"d\");\r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemTA);\r\n\r\n //Añade un campo oculto llamado id. En ocasiones este campo se utiliza para indicar ciertas operaciones.\r\n //OJO!! es un punto sensible porque el usuario podría cambiar su valor de forma inexperada para el código.\r\n// $this->add_hidden_element(\"id\");\r\n\r\n //Añade un boton con la acción submit\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"miguel_Enter\"));\r\n //$submit->set_attribute('id',''); \r\n $submit->set_attribute('accesskey','e'); \r\n $this->add_element($submit); \r\n\t\t\t\t\r\n\t\t\t\t$this->add_hidden_element('status');\r\n \t\t$this->set_hidden_element_value('status', 'new');\r\n }", "public function newAssocForm()\n {\n $assocs = $this->assocManager->getAssocs();\n require_once 'vue/new.assoc.view.php';\n }", "public function init()\n {\n $this->setMethod('post');\n \n $auth = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'));\n $user = $auth->getIdentity();\n $num_membre = $user->num_membre;\n \n \n $o_map = new Application_Model_EuObjetMapper();\n $rows = $o_map->fetchAll();\n $objets = array();\n foreach ($rows as $o) {\n $objets[] = $o->design_objet;\n }\n $elem_o = new ZendX_JQuery_Form_Element_AutoComplete(\n \"design_objet\", array('label' => 'Désignation *','required' => true,)\n );\n $elem_o->setJQueryParams(array('source' => $objets));\n $this->addElement($elem_o);\n \n $gamme_select = new Zend_Form_Element_Select('num_gamme');\n $gamme_select->setLabel('Gamme de produit *')\n ->setRequired(true);\n $g = new Application_Model_DbTable_EuGammeProduit();\n $rows = $g->fetchAll();\n foreach ($rows as $c) {\n $gamme_select->addMultiOption($c->code_gamme, $c->design_gamme);\n }\n $this->addElement($gamme_select);\n \n $type_unite = array('' => '', 'jour' => 'Jour', 'mois' => 'Mois', 'annee' => 'Année');\n $unit_select = new Zend_Form_Element_Select('unite_mdv');\n $unit_select->setLabel('Unité de durée *')\n ->setRequired(true)\n ->addMultiOptions($type_unite);\n $this->addElement($unit_select);\n \n \n $this->addElement('text', 'duree_vie', array(\n 'label' => 'Durée de vie *',\n 'required' => true,\n 'validators'=>array('validator' => 'digits'),\n ));\n \n $this->addElement('text', 'prix_unitaire', array(\n 'label' => 'Prix unitaire *',\n 'required' => true,\n 'validators'=>array('validator' => 'digits'),\n ));\n \n $boutique_select = new Zend_Form_Element_Select('code_bout');\n $boutique_select->setLabel('Boutique *')\n ->setRequired(true);\n $b = new Application_Model_DbTable_EuBoutique();\n $select=$b->select();\n $select->from($b)\n ->where('proprietaire = ?', $num_membre);\n $rows = $b->fetchAll($select);\n foreach ($rows as $c) {\n $boutique_select->addMultiOption($c->code_bout, $c->design_bout);\n }\n $this->addElement($boutique_select);\n \n $smcipn_select = new Zend_Form_Element_Select('code_demand');\n $smcipn_select->setLabel('Code subvention ')\n ->setRequired(false);\n $s = new Application_Model_DbTable_EuSmcipn();\n $rows = $s->fetchAll();\n $smcipn_select->addMultiOption('', '');\n foreach ($rows as $c) {\n $smcipn_select->addMultiOption($c->code_demand, $c->code_demand);\n }\n $this->addElement($smcipn_select);\n \n $this->addElement('textarea', 'caract_objet', array(\n 'label' => 'Caractéristique ',\n 'required' => false,\n ));\n \n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Valider',\n ));\n \n // Add the cancel button\n $this->addElement('button', 'cancel', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n )); \n }", "public function init()\r\n {\r\n \t\r\n \r\n \t \t\r\n \t$this->setName('FormularioCliente');\r\n $ID_CLIENTE = new Zend_Form_Element_Hidden('$ID_CLIENTE');\r\n $ID_CLIENTE->addFilter('Int');\r\n $ID_CLIENTE->removeDecorator('Label');\r\n \r\n \r\n \r\n $DT_ATUALIZACAO = new Zend_Form_Element_Text('DT_ATUALIZACAO');\r\n $DT_ATUALIZACAO->setLabel('DATA ÚLTIMA ATUALIZAÇÃO')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control')\r\n ->setAttrib('placeholder', '');\r\n \r\n \r\n \r\n $NM_CLIENTE= new Zend_Form_Element_Text('NM_CLIENTE');\r\n $NM_CLIENTE->setLabel('NOME')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter nome');\r\n \r\n $NR_CNPJ = new Zend_Form_Element_Text('NR_CNPJ');\r\n $NR_CNPJ->setLabel('CNPJ')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cnpj');\r\n \r\n \t$TX_OBSERVACAO = new Zend_Form_Element_Textarea('TX_OBSERVACAO');\r\n $TX_OBSERVACAO->setLabel('OBSERVA��O')\r\n \t\t\r\n\t\t\t\t\t ->removeDecorator('DtDdWrapper')\r\n \t\t\t ->removeDecorator('HtmlTag')\r\n \t\t\t\t ->removeDecorator('Label')\r\n \t\t\t ->setAttrib('class', 'form-control')\r\n \t\t\t\t ->setAttrib('rows', '5'); \r\n \t\r\n $NM_LOGRADOURO = new Zend_Form_Element_Text('NM_LOGRADOURO');\r\n $NM_LOGRADOURO->setLabel('LOGRADOURO')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter logradouro');\r\n \r\n \r\n \t\r\n \t$NR_NUMERO = new Zend_Form_Element_Text('NR_NUMERO');\r\n $NR_NUMERO->setLabel('NÚMERO')\r\n\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter número');\t\t\t \r\n \t\t\t\t \r\n \t$DS_COMPLEMENTO = new Zend_Form_Element_Text('DS_COMPLEMENTO');\r\n $DS_COMPLEMENTO->setLabel('LOGRADOURO')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter complemento');\t\t\r\n \r\n \t \r\n \t \r\n \t\t\t\t \r\n \t$NM_BAIRRO = new Zend_Form_Element_Text('NM_BAIRRO');\r\n $NM_BAIRRO->setLabel('BAIRRO')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter bairro');\r\n \t\r\n \t$NR_CEP= new Zend_Form_Element_Text('NR_CEP');\r\n $NR_CEP->setLabel('CEP')\r\n\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cep');\r\n \t\r\n \t\t\r\n \t$NM_CIDADE = new Zend_Form_Element_Text('NM_CIDADE');\r\n $NM_CIDADE->setLabel('CIDADE')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cidade');\r\n \t \r\n \t\r\n \t$estados = array(\"AC\"=>\"Acre\", \"AL\"=>\"Alagoas\", \"AM\"=>\"Amazonas\", \"AP\"=>\"Amapá\",\"BA\"=>\"Bahia\",\"CE\"=>\"Ceará\",\"DF\"=>\"Distrito Federal\",\"ES\"=>\"Espírito Santo\",\"GO\"=>\"Goiás\",\"MA\"=>\"Maranhão\",\"MT\"=>\"Mato Grosso\",\"MS\"=>\"Mato Grosso do Sul\",\"MG\"=>\"Minas Gerais\",\"PA\"=>\"Pará\",\"PB\"=>\"Paraíba\",\"PR\"=>\"Paraná\",\"PE\"=>\"Pernambuco\",\"PI\"=>\"Piauí\",\"RJ\"=>\"Rio de Janeiro\",\"RN\"=>\"Rio Grande do Norte\",\"RO\"=>\"Rondônia\",\"RS\"=>\"Rio Grande do Sul\",\"RR\"=>\"Roraima\",\"SC\"=>\"Santa Catarina\",\"SE\"=>\"Sergipe\",\"SP\"=>\"São Paulo\",\"TO\"=>\"Tocantins\");\r\n \t\r\n \t$NM_UF = new Zend_Form_Element_Select( 'NM_UF' );\r\n $NM_UF->setLabel('UF')\r\n ->addMultiOptions($estados)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t->removeDecorator('DtDdWrapper')\r\n \t->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t->setAttrib('class', 'form-control select2') ->setAttrib('placeholder', 'Enter uf');;\t\t \r\n\r\n \t\t\t\t \r\n \t$FK_RAMO_ATIVIDADE= new Zend_Form_Element_Select('FK_RAMO_ATIVIDADE');\r\n $FK_RAMO_ATIVIDADE->setAttrib('class', 'form-control');\r\n \r\n $ramoAtividade= new Application_Model_DbTable_RamoAtividade();\r\n $FK_RAMO_ATIVIDADE->setLabel('RAMO ATIVIDADE')\r\n ->setRequired(true)\r\n\t\t->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control select2');\r\n \r\n \r\n $listaRamoAtividade=$ramoAtividade->getRamoAtividadeCombo();\r\n $FK_RAMO_ATIVIDADE->setMultiOptions( $listaRamoAtividade );\t\t\t \r\n \t\r\n $submit = new Zend_Form_Element_Submit('submit');\r\n $submit->setLabel(\"Adiconar\");\r\n $submit->setAttrib('id', 'submitbutton');\r\n $submit->removeDecorator('DtDdWrapper')\r\n ->setAttrib('class', 'btn btn-primary button')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label'); \r\n \r\n $this->addElements(array($ID_CLIENTE,$NM_CLIENTE,$NR_CNPJ,$TX_OBSERVACAO,$NM_LOGRADOURO,$NR_NUMERO,$DS_COMPLEMENTO,$NM_BAIRRO,$NR_CEP,$NM_CIDADE,$NM_UF,$DT_ATUALIZACAO,$FK_RAMO_ATIVIDADE,$submit)); \r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioCliente.phtml')))); \r\n\t\r\n }", "public function __construct()\n {\n $this->middleware('auth');\n //$this->field_list = ['nombre' => 'Nombre', 'direccion' => 'Dirección', 'telefono' => 'Teléfono', 'imglogo' => 'Logo', 'total_facturas' => 'Facturas', 'total_timbres' => 'Timbres', 'activo' => 'Activo', 'id' => 'Acciones'];\n $this->field_list = ['nombre' => 'Nombre', 'direccion' => 'Dirección', 'telefono' => 'Teléfono', 'id' => 'Acciones'];\n $this->name = 'Empresas';\n $this->name_plural = 'Empresas';\n $this->form = 'App\\Core\\Forms\\Admin\\EmpresaForm';\n $this->model = 'App\\Models\\Catalogos\\Empresas';\n $this->url_prefix = 'empresas';\n $validation_add = [];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n }", "public function init()\n {\n parent::init();\n \n $this->addCssFile(\"/css/library/Account/Form/activate-accounts.css\");\n $this->addJsFile(\"/js/library/Account/Form/activate-accounts.js\");\n \n //add js file to do cool input masking\n $this->addJsFile(\"/js/jquery.maskedinput-1.3.js\");\n \n $this->setDecorators(self::$_formDecorators);\n \n foreach ($this->order->order_configurations as $config) {\n $subform = new \\Account_Form_ActivateAccountsSubForm($config->id);\n $this->addSubForm($subform, \"orderConfiguration_\" . $config->id);\n }\n \n $emailEveryone = new Zend_Form_Element_Checkbox(\"emailEveryone\");\n $emailEveryone->setLabel(\"Send email to account holders with their login information.\")\n ->setDecorators(self::$checkboxDecorators)\n ->setValue(1);\n $this->addElement($emailEveryone);\n \n $orderId = new Zend_Form_Element_Hidden(\"orderId\");\n $orderId->setDecorators(array('ViewHelper'));\n $this->addElement($orderId);\n\n $saveButton = new Fisdap_Form_Element_SaveButton(\"saveButton\");\n $saveButton->setLabel(\"Save\")\n ->setDecorators(self::$buttonDecorators);\n $this->addElement($saveButton);\n \n if ($this->order->id) {\n $this->setDefaults(array(\n 'orderId' => $this->order->id,\n ));\n }\n }", "public function __construct()\n {\n $this->middleware('auth');\n //$this->field_list = ['affair'=>'Asunto','message'=>'Mensaje','archivo'=>'Archivo','id'=>'Acciones'];\n $this->field_list = ['number'=>'Folio','affair'=>'Asunto','message'=>'Mensaje','archivob'=>'Archivo del cliente','name'=>'Nombre','last_name'=>'Apellidos','phone'=>'Telefono','email'=>'Correo electronico','address'=>'Dirección','created_at'=>'Fecha de reporte','id'=>'Acciones'];\n $this->name = 'Canalizacion';\n $this->name_plural = 'Canalizacion';\n $this->form = 'App\\Core\\Forms\\Admin\\CanalizacionForm';\n $this->model = 'App\\Models\\Catalogos\\Ticket';\n $this->url_prefix = 'ticket';\n $validation_add = [\n ];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n }", "public function init()\n {\n $this->setAction('/Authentification/registration')->setMethod('post');\n \n $ime = new Zend_Form_Element_Text('tbIme');\n $ime->setLabel('Ime:');\n // provera regularnim izrazima\n $ime->addValidator('regex', false, array(\n 'pattern' => '/^[A-Z][a-z]{2,20}$/'))\n ->addErrorMessage('Ime mora pocinjati velikim slovom i imati minimalno 3, a maksimalno 20 karaktera.');\n $ime->addFilter('StringTrim');\n $ime->setDescription('npr: Danijela');\n \n $prezime = new Zend_Form_Element_Text('tbPrezime');\n $prezime->setLabel('Prezime:');\n $prezime->addValidator('regex', false, array(\n 'pattern' => '/^[A-Z][a-z]{2,20}$/'))\n ->addErrorMessage('Prezime mora pocinjati velikim slovom i imati minimalno 3, a maksimalno 20 karaktera.');\n $prezime->setDescription('npr: Nikitin');\n $prezime->addFilter('StringTrim');\n \n $email = new Zend_Form_Element_Text('tbEmail');\n $email->setLabel('E-mail:');\n $email->setRequired(true);\n $email->addValidator('EmailAddress')->addErrorMessage('E-mail adresa nije ispravna.');\n $email->addFilter('StringTrim');\n $email->setDescription('npr: something@example.any');\n \n $lozinka = new Zend_Form_Element_Password('tbLozinka');\n $lozinka->setLabel('Lozinka:');\n $lozinka->setRequired(true);\n $lozinka->addValidator(new Zend_Validate_StringLength(6, 20))->addErrorMessage('Lozinka mora imati minimalno 6, a maksimalno 20 karaktera');\n $lozinka->addFilter('StringTrim');\n $lozinka->setDescription('Minimalno 6, a maksimalno 20 karaktera');\n \n $lozinkaPonovo = new Zend_Form_Element_Password('tbLozinkaPonovo');\n $lozinkaPonovo->setLabel('Ponovite lozinku:');\n $lozinkaPonovo->setRequired(true);\n $lozinkaPonovo->addValidator(new Zend_Validate_Identical('tbLozinka'))->addErrorMessage('Lozinke se ne poklapaju.'); // poklapanje unetih lozinki\n $lozinkaPonovo->addFilter('StringTrim');\n \n $adresa = new Zend_Form_Element_Text('tbAdresa');\n $adresa->setLabel('Adresa:');\n $adresa->setDescription('npr: Kumodraska 15, Ilije Popovica 24a..');\n $adresa->addValidator('regex',false, array('pattern'=>'/^[A-Z][a-z]+(\\s\\w+)*(\\d|\\w)+$/'))->addErrorMessage('Adresa mora pocinjati velikim slovom i zavrsavati se brojem zgrade.');\n $adresa->addFilter('StringTrim');\n \n $brojTelefona = new Zend_Form_Element_Text('tbBrojTelefona');\n $brojTelefona->setLabel('Broj telefona:');\n $brojTelefona->setDescription('npr: 065/345-67-89');\n $brojTelefona->addValidator('regex',false, array('pattern'=>'/^06\\d\\/\\d{3}(\\-\\d{2}){2}$/'))->addErrorMessage('Broj telefona nije ispravno unet.');\n \n $button = new Zend_Form_Element_Submit('btnRegister');\n $button->setLabel('Registruj se');\n $button->setAttrib('class', 'btn btn-default');\n \n $this->addElements(array($ime, $prezime, $email, $lozinka, $lozinkaPonovo, $adresa, $brojTelefona, $button));\n \n }", "public function init()\n {\n $this->setMethod('post');\n\n $this->addElement(\n 'text', 'code_bout', array(\n 'label' => 'Code *',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n\n $this->addElement('text', 'design_bout', array(\n 'label' => 'Raison sociale *',\n 'required' => true,\n ));\n \n $this->addElement('text', 'telephone', array(\n 'label' => 'Téléphone *',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n \n $this->addElement('text', 'adresse', array(\n 'label' => 'Adresse *',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n \n $ms = new Application_Model_EuSecteurMapper();\n $secteur = $ms->fetchAll();\n $z_select = new Zend_Form_Element_Select('codesect');\n $z_select->setLabel('Nom secteur *: ')->isRequired(true);\n foreach ($secteur as $s) {\n $z_select->addMultiOption($s->codesect, $s->nomsect);\n }\n $this->addElement($z_select);\n \n $this->addElement('text', 'nom_responsable', array(\n 'label' => 'Nom responsable*:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n \n $this->addElement('text', 'prenom_responsable', array(\n 'label' => 'Prenom responsable*:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n \n // $nm = new Application_Model_DbTable_EuMembre();\n // $select = $nm->select();\n // $select->where('type_membre=?', 'M');\n // $rows = $nm->fetchAll($select);\n // $membres = array();\n // foreach ($rows as $c) {\n // $membres[] = $c->num_membre;\n // }\n // $elem = new ZendX_JQuery_Form_Element_AutoComplete(\n // \"proprietaire\", array('label' => 'Numéro membre *')\n // );\n // $elem->setJQueryParams(array('source' => $membres));\n // $this->addElement($elem);\n \n \n $this->addElement('text', 'mail', array(\n 'label' => 'E-Mail:',\n 'required' => false,\n 'filters' => array('StringTrim'),\n ));\n \n $this->addElement('text', 'siteweb', array(\n 'label' => 'Site web:',\n 'required' =>false,\n 'filters' => array('StringTrim'),\n ));\n \n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Valider',\n )); \n \n // Add the cancel button\n $this->addElement('button', 'cancel', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n ));\n }", "public function init() {\n $auth = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'));\n $user = $auth->getIdentity();\n $code_groupe = $user->code_groupe;\n\n $this->setMethod('post');\n\n $this->addElement('text', 'nom_gac', array(\n 'label' => 'Nom *',\n 'required' => true,\n 'size' => 30,\n 'filters' => array('StringTrim'),\n ));\n\n $nm = new Application_Model_DbTable_EuMembreMorale();\n $select = $nm->select();\n $rows = $nm->fetchAll($select);\n $membres = array();\n foreach ($rows as $c) {\n $membres[] = $c->code_membre_morale;\n }\n $elem = new ZendX_JQuery_Form_Element_AutoComplete(\n \"code_membre\", array('label' => 'Code membre','required' => false)\n );\n $elem->setJQueryParams(array('source' => $membres));\n $elem->setAttrib('size', '25');\n $elem->setRequired(false);\n $this->addElement($elem);\n\n $mapper = new Application_Model_DbTable_EuTypeGac();\n $select = $mapper->select();\n $select->order('ordre_type_gac', 'ASC');\n if ($code_groupe == 'agregat') {\n $select->where('ordre_type_gac >=?', 1);\n $select->where('ordre_type_gac <=?', 8);\n } elseif ($code_groupe == 'gac') {\n $select->where('ordre_type_gac >=?', 2);\n $select->where('ordre_type_gac <=?', 8);\n } elseif ($code_groupe == 'gacp') {\n $select->where('ordre_type_gac >=?', 3);\n $select->where('ordre_type_gac <=?', 8);\n } elseif ($code_groupe == 'gacsu') {\n $select->where('ordre_type_gac >=?', 9);\n $select->where('ordre_type_gac <=?', 11);\n } elseif ($code_groupe == 'gacex') {\n $select->where('ordre_type_gac >=?', 3);\n } elseif ($code_groupe == 'gacse') {\n $select->where('ordre_type_gac >=?', 4);\n $select->where('ordre_type_gac <=?', 8);\n } elseif ($code_groupe == 'gacr') {\n $select->where('ordre_type_gac >=?', 5);\n $select->where('ordre_type_gac <=?', 8);\n } elseif ($code_groupe == 'gacs') {\n $select->where('ordre_type_gac >=?', 6);\n $select->where('ordre_type_gac <=?', 8);\n }\n $tgac = $mapper->fetchAll($select);\n $t_select = new Zend_Form_Element_Select('code_type_gac');\n $t_select->setLabel('Type GAC *');\n $t_select->setRequired(true);\n foreach ($tgac as $c) {\n $t_select->addMultiOption('', '');\n $t_select->addMultiOption($c->code_type_gac, $c->nom_type_gac);\n }\n $this->addElement($t_select);\n\n $mapper = new Application_Model_EuZoneMapper();\n $zones = $mapper->fetchAll();\n $z_select = new Zend_Form_Element_Select('code_zone');\n $z_select->setLabel('Zone géographique');\n $z_select->isRequired(true);\n foreach ($zones as $c) {\n $z_select->addMultiOption('', '');\n $z_select->addMultiOption($c->code_zone, $c->nom_zone);\n }\n $mapper = new Application_Model_EuPaysMapper();\n $zones = $mapper->fetchAll();\n $z_select->isRequired(true);\n foreach ($zones as $c) {\n $z_select->addMultiOption('', '');\n $z_select->addMultiOption($c->id_pays, $c->libelle_pays);\n }\n $mapper = new Application_Model_DbTable_EuSection();\n $zones = $mapper->fetchAll();\n $z_select->isRequired(true);\n foreach ($zones as $c) {\n $z_select->addMultiOption('', '');\n $z_select->addMultiOption($c->id_section, $c->nom_section);\n }\n $mapper = new Application_Model_DbTable_EuRegion();\n $zones = $mapper->fetchAll();\n $z_select->isRequired(true);\n foreach ($zones as $c) {\n $z_select->addMultiOption('', '');\n $z_select->addMultiOption($c->id_region, $c->nom_region);\n }\n $mapper = new Application_Model_EuSecteurMapper();\n $zones = $mapper->fetchAll();\n $z_select->isRequired(true);\n foreach ($zones as $c) {\n $z_select->addMultiOption('', '');\n $z_select->addMultiOption($c->code_secteur, $c->nom_secteur);\n }\n $mapper = new Application_Model_EuAgenceMapper();\n $zones = $mapper->fetchAll();\n $z_select->isRequired(true);\n foreach ($zones as $c) {\n $z_select->addMultiOption('', '');\n $z_select->addMultiOption($c->code_agence, $c->libelle_agence);\n }\n $this->addElement($z_select);\n\n $a_select = new Zend_Form_Element_Multiselect('code_agence');\n $a_select->setLabel('Agences couvertes');\n $a_select->isRequired(false);\n $mapper = new Application_Model_DbTable_EuAgence();\n $select = $mapper->select();\n $select->order('libelle_agence', 'ASC');\n $agence = $mapper->fetchAll($select);\n foreach ($agence as $c) {\n $a_select->addMultiOption('', '');\n $a_select->addMultiOption($c->code_agence, $c->libelle_agence);\n }\n $this->addElement($a_select);\n \n $ng = new Application_Model_DbTable_EuMembre();\n $select = $ng->select();\n $rows = $ng->fetchAll($select);\n $membres = array();\n foreach ($rows as $c) {\n $membres[] = $c->code_membre;\n }\n $elem = new ZendX_JQuery_Form_Element_AutoComplete(\n \"code_membre_gestionnaire\", array('label' => 'Numéro gestionnaire','required' => false)\n );\n $elem->setJQueryParams(array('source' => $membres));\n $elem->setAttrib('size', '25');\n $elem->setRequired(false);\n $this->addElement($elem);\n\n $this->addElement('text', 'nom_gestion', array(\n 'label' => 'Nom gestionnaire',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'size' => 25,\n 'readonly' => true,\n ));\n\n $this->addElement('text', 'prenom_gestion', array(\n 'label' => 'Prénoms gestionnaire',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'size' => 25,\n 'readonly' => true,\n ));\n\n $this->addElement('text', 'tel_gestion', array(\n 'label' => 'Téléphone gestionnaire',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'size' => 25,\n 'readonly' => true,\n ));\n\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Valider',\n ));\n\n // Add the cancel button\n $this->addElement('button', 'cancel', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n ));\n $this->addElement(\n 'hidden', 'code_gac', array(\n ));\n $this->addElement(\n 'hidden', 'zone', array(\n ));\n \n }", "public function init()\n {\n $element = new Zend_Form_Element_Text('prenom');\n $element->setLabel('Prénom');\n $element->setRequired();\n \n $validator = new Zend_Validate_NotEmpty();\n $validator->setMessage('Le prénom est obligatoire', Zend_Validate_NotEmpty::IS_EMPTY);\n $element->addValidator($validator);\n \n $validator = new Zend_Validate_StringLength();\n $validator->setMessage('Le prénom ne doit pas dépasser %max% caractères', Zend_Validate_StringLength::TOO_LONG);\n $validator->setMax(40);\n $element->addValidator($validator);\n \n $filter = new Zend_Filter_StringTrim();\n $element->addFilter($filter);\n \n $filter = new Zend_Filter_StripTags();\n $element->addFilter($filter);\n \n $this->addElement($element);\n \n \n $element = new Zend_Form_Element_Text('nom');\n $element->setLabel('Nom');\n \n $this->addElement($element);\n \n \n $element = new Zend_Form_Element_Text('email');\n $element->setLabel('Email');\n \n $this->addElement($element);\n \n \n $element = new Zend_Form_Element_Text('telephone');\n $element->setLabel('Téléphone');\n \n $this->addElement($element);\n \n // Exercices :\n // Ajouter les validateurs et filtres \n // - required (sur le nom)\n // - stringlength sur tous les champs\n // - trim et striptags sur tous les champs\n // - Email : vérifier le format et qu'il ne soit pas en base\n // doc de Zend_Validate_NoRecordExists\n }", "public function init() {\n $this->setMethod('post');\n \n // Add claim Number element\n $this->addElement(\n 'text',\n 'claimNumber',\n array(\n 'required' => true,\n 'validators' => array(\n array(\n 'NotEmpty',\n true,\n array(\n 'messages' => array (\n 'isEmpty' => 'Please enter claim number',\n 'notEmptyInvalid' => 'Please enter valid claim number'\n )\n )\n )\n )\n )\n );\n\n // Add hidden element for claim reference number\n $this->addElement('hidden', 'ref_num', array(\n 'value' => '',\n 'class' => 'noborder',\n 'label' =>''\n ));\n \n // Add hidden element for mode\n $this->addElement('hidden', 'mode', array(\n 'value' => '',\n 'class' => 'noborder',\n 'label' =>''\n )); \n\n // Add search button\n $this->addElement('image', 'search', array(\n 'src' => '/assets/connect/images/claims/search-button.jpg',\n 'align' => 'top',\n 'class' => 'search',\n 'onclick' => 'return validateClaimNumber()'\n ));\n\n \n // Add the back button\n $this->addElement('button', 'back', array(\n 'ignore' => true,\n 'label' => 'Back',\n 'value' => 'Back',\n 'onclick' => 'window.location=\"/rentguaranteeclaims/home\"'\n ));\n \n // Set decorators\n $this->clearDecorators();\n $this->setDecorators(array('Form'));\n $this->setElementDecorators(array ('ViewHelper', 'Errors')); \n }", "protected function initialize() {\n //validaciones\n $this->validates_presence_of('nombre', 'message: Debe escribir un <b>Nombre</b>');\n \n $this->validates_uniqueness_of('nombre', 'message: Este Municipio <b>ya existe</b> en el sistema');\n }", "public function __construct(){\n require_once \"GestioneAcquariMarini/libs/ValidationFunction/validationFunction.php\";\n $this->validationFunction = new ValidationFunction();\n }", "public function __construct()\n {\n $this->middleware('auth');\n $this->field_list = ['identificador'=>'Folio','number_usuario'=>'Membresía','conta'=>'Número','premio'=>'Premio','dtip'=>'Tipo', 'name'=>'Lugar','punto'=>'Puntos','nombre'=>'Estado','estad_uno'=>'Fecha de elaboración','id'=>'Acciones'];\n //$this->field_list = ['folio'=>'Folio','id_product'=>'Producto','name'=>'Estacion','points'=>'Puntos','value'=>'Valor','qr_memberships'=>'Membresia','name_status'=>'Status','name_state'=>'Estado', 'name_exchange'=>'Tipo','todate'=>'Fecha','id'=>'Acciones'];\n $this->name = 'Recibido';\n $this->name_plural = 'fa fa-newspaper-o';\n $this->form = 'App\\Core\\Forms\\Lealtad\\RecibidoForm';\n $this->model = 'App\\Models\\Lealtad\\Exchange';\n $this->url_prefix = 'recibidoexchange';\n $validation_add = [\n // 'folio'=>'required|max:25',\n ];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n }", "public function init() {\n \n $auth = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'));\n $user = $auth->getIdentity();\n $this->setMethod('post');\n $login = $user->code_acteur;\n\t\tif($login!='' || $login!= NULL){\n\t\t\t$login1=$login;\n\t\t}else{\n\t\t\t$login1='';\n\t\t}\n $gacs = array();\n $g_map = new Application_Model_DbTable_EuGacFiliere();\n $select = $g_map->select()\n ->where('code_gac = ?', $login1)\n ->where('groupe = ?', 'GAC')\n ->order('date_creation', 'ASC');\n $ngac = $g_map->fetchAll($select);\n foreach ($ngac as $value) {\n $gacs[$value->code_gac_filiere] = ucfirst($value->nom_gac_filiere);\n }\n $g_select = new Zend_Form_Element_Select('num_gac_filiere');\n $g_select->setLabel('Nom GAC Filière *')->isRequired(true);\n $g_select->addMultiOption('', '');\n $g_select->addMultiOptions($gacs);\n $this->addElement($g_select);\n \n $this->addElement('button', 'valider', array(\n 'ignore' => true,\n 'label' => 'Valider',\n ));\n\n // Add the cancel button\n $this->addElement('reset', 'annuler', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n ));\n }", "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}", "public function init()\n {\n $request = new Zend_Controller_Request_Http();\n $domain = $request->getCookie('domain');\n $defaultBehaviors = array(\n '' => '--',\n 'Discarded' => 'Discard Email',\n 'Rejected' => 'Reject Email',\n 'Rerouted to' => 'Forward to this address:',\n 'Accepted and Bounced' => 'Accept and Bounce'\n );\n\n\n $this->addElement('text', 'domain', array(\n 'label' => 'Domain Name',\n 'readonly' => true,\n 'value' => $domain,\n 'validators' => array(\n array('NotEmpty', true),\n\n ),\n ));\n\n $this->addElement('select', 'MailToUnknown', array(\n 'label' => 'Set Default Behavior',\n 'multiOptions' => $defaultBehaviors,\n // 'required' => true,\n ));\n\n $this->addElement('text', 'MailRerouteAddress', array(\n 'label' => 'Address to forward to',\n ));\n\n $this->populate($this->getSettings());\n\n $this->addControlButtons(array(\n 'cancelLink' => pm_Context::getBaseUrl(),\n ));\n }", "public function init(){\n $this->setAttrib('id', 'create-new-user-form');\n\n $clients = Repo_Client::getInstance()->getSelectArray();\n $roles = Repo_Role::getInstance()->getSelectArray();\n unset($roles['']);\n\n // Email\n $this->addElement('text','email',array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'Email',\n 'required' => true,\n 'validators' => array('EmailAddress')\n ));\n\n // Password\n $this->addElement('text','password',array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'Password',\n 'required' => true,\n 'validators' => array(array('StringLength', false, array(8, 50)))\n ));\n\n // UDID\n $this->addElement('text','UDID',array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'UDID',\n 'required' => false\n ));\n\n // Surname\n $this->addElement('text','surname',array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'Surname',\n 'required' => true\n ));\n\n // First name\n $this->addElement('text','firstname',array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'First Name',\n 'required' => true\n ));\n\n // User type\n /*$this->addElement('text','user_type',array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'User Type',\n 'required' => true\n ));*/\n\n // Role\n $this->addElement('multiCheckbox','role', array(\n 'decorators' => $this->_multiCheckboxDecorator,\n 'label' => 'Role',\n 'required' => true,\n 'registerInArrayValidator' => false\n ));\n\n $this->getElement('role')->addMultiOptions(\n $roles\n );\n\n // Client\n $this->addElement('select','client', array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'Client',\n 'required' => true\n ));\n\n $this->getElement('client')->addMultiOptions(\n $clients\n );\n\n // ID\n $this->addElement('hidden','id',array(\n 'decorators' => $this->_buttonElementDecorator,\n 'required' => false\n ));\n\n // Set user values if a user is passed in.\n if (isset($this->extraParams['user']) && $user = $this->extraParams['user']) {\n $this->setUser($user);\n }\n }", "protected function initializeActionMethodValidators() {}", "public function init()\n {\n $this->addElementPrefixPath(\n 'My_Validate_Doctrine',\n 'My/Validate/Doctrine',\n Zend_Form_Element::VALIDATE\n );\n $email = $this->createElement(\n 'text',\n 'email',\n array(\n 'DisableLoadDefaultDecorators' => true,\n 'decorators' => array(\n 'ViewHelper'\n ),\n 'required' => true,\n 'filters' => array(\n 'StringTrim'\n ),\n 'validators' => array(\n 'EmailAddress',\n array('DbRecordExists', false, array('user', 'email'))\n ),\n 'attribs' => array(\n 'placeholder' => $this->_view->translate('ejemplo@dominio.com')\n )\n )\n );\n $this->addElements(array($email));\n }", "public function init()\n {\n $this->setAction('/content/process/tool');\n\n $this->setMethod('post');\n\n $this->generateFormElements();\n\n $this->addElementsToForm('horizontal_rule', 'Horizontal rule', $this->elements);\n\n $this->addDefaultElementDecorators();\n\n $this->addCustomElementDecorators();\n }", "public function init()\n {\n $this->addAttribs(array(\"class\" => \"form-horizontal\"))\n ->setDecorators(array(\n 'FormElements',\n 'Form'\n )); \n $this->addElement('hidden','idcategory'); \n \n $name = $this->createElement('text','name');\n $name->setLabel(\"Tên danh mục :\")\n ->setRequired()\n ->setAttrib(\"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($name); \n \n $model = new Application_Model_DbTable_Categories();\n $result = $model->arrayChosen(); \n $groups_id = $this->createElement('select','parent_id');\n $groups_id->setLabel(\"Danh mục cha :\")\n ->setRequired()\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n ));\n $groups_id->addMultiOption(\"0\",\"None\"); \n foreach($result as $row){\n $groups_id->addMultiOption($row['key'],$row['value']);\n } \n $this->addElement($groups_id);\n \n $user_status = $this->createElement('Radio','status');\n $user_status->setLabel(\"Trạng thái :\")\n ->setMultiOptions(array(\"Khóa lại\",\"Hoạt động \"))\n ->setValue(1)\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($user_status); \n \n $submit = $this->createElement(\"submit\",\"submit\");\n $submit->setLabel(\"Thêm\"); \n $this->addElement($submit); \n }", "public function init()\n {\n $this->setMethod(\"post\");\n $username = new Zend_Form_Element_Text(\"name\");\n $username->setAttrib(\"class\", \"form-control\");\n $username->setLabel(\"Username: \");\n $username->setRequired();\n// $username->addFilter(new Zend_Filter_StripTags);\n $username->setAttrib(\"class\", \"form-control\");\n\n \n \n $email = new Zend_Form_Element_Text(\"email\");\n $email->setRequired()\n ->setLabel(\"Email:\")\n ->addValidator(new Zend_Validate_EmailAddress())\n ->addValidator(new Zend_Validate_Db_NoRecordExists(array(\n 'table' => 'users',\n 'field' => 'email'\n )\n));\n \n $password = new Zend_Form_Element_Password(\"password\");\n $password->setRequired()\n ->setLabel(\"Password\");\n \n \n $id = new Zend_Form_Element_Hidden(\"id\");\n $submit = new Zend_Form_Element_Submit(\"submit\");\n $this->addElements(array($id,$username,$email,$password,$submit));\n }", "public function init()\n {\n $this->setMethod('post');\n\n // Add fullname element\n $this->addElement('text', 'fullname', array(\n 'label' => 'Fullname',\n 'required' => true,\n \"type\" => \"Zend\\\\InputFilter\\\\ArrayInput\",\n 'filters' => array(\n array(\n 'name' => 'StringTrim',\n 'options' => array()\n ),\n array(\n 'name' => 'StripTags',\n 'options' => array()\n ),\n ),\n 'validators' => array(\n array(\n 'validator'=>'NotEmpty',\n 'options'=>array(\n 'messages'=>'Yêu cầu nhập dữ liệu cho ô input fullname'\n ),\n 'breakChainOnFailure'=>true\n ),\n ), \n ));\n\n // Add address element\n $this->addElement('text', 'address', array(\n 'label' => 'Address',\n 'required' => true,\n 'validators' => array(\n array(\n 'validator'=>'NotEmpty',\n 'options'=>array(\n 'messages'=>'Yêu cầu nhập dữ liệu cho ô input address'\n ),\n 'breakChainOnFailure'=>true\n ),\n )\n ));\n \n // Add age element\n $this->addElement('text', 'age', array(\n 'label' => 'Age',\n 'required' => true,\n 'validators' => array(\n array(\n 'validator'=>'NotEmpty',\n 'options'=>array(\n 'messages'=>'Yêu cầu nhập dữ liệu cho ô input age'\n ),\n 'breakChainOnFailure'=>true\n ),\n array(\n 'validator'=>'Int',\n 'options'=>array(\n 'messages'=>'Nhập đúng định dạng số'\n ),\n 'breakChainOnFailure'=>true\n ),\n )\n )); \n \n // Add password element\n $this->addElement('password', 'password', array(\n 'label' => 'Password',\n 'required' => FALSE,\n )); \n \n // Add an email element\n $this->addElement('text', 'email', array(\n 'label' => 'Email',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'validator'=>'NotEmpty',\n 'options'=>array(\n 'messages'=>'Yêu cầu nhập dữ liệu cho ô input Email'\n ),\n 'breakChainOnFailure'=>true\n ),\n array(\n 'validator'=>'EmailAddress',\n 'options'=>array(\n 'messages'=>'Không đúng định dạng email'\n ),\n 'breakChainOnFailure'=>true\n ),\n )\n ));\n \n // Add age element\n $this->addElement('hidden', 'createprofile', array(\n 'value' => 'createprofile',\n )); \n $element = $this->getElement('createprofile');\n $element->removeDecorator('label');\n \n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Submit',\n ));\n }", "public function __construct() {\n\n\t\tparent::__construct();\n\n\t\t\t$this->data = array();\n\t\t\t$this->url = $this->router->class;\n\n\t\t\t$this->load->helper(array('validaciones','layout','security', 'form')); // Carga los helper para validar los formularios('validaciones'), cargar las vistas(layouts), seguridad md5 y demas(segurity), carga creacion de formularios html y seguridad en el envio de formularios('form').\t\t\t\t\t\t\t\t \t\t\t \t\t \n\n\t}", "function init()\n {\n $this->setMethod('post');\n $this->addAttribs(array('id' => 'frmCoupons'));\n $this->setEnctype(Zend_Form::ENCTYPE_MULTIPART);\n\n $name = new Zend_Form_Element_Text('code');\n $name->setLabel('Cod');\n $name->setAttribs(array('maxlength' => 'code', 'class' => 'validate[required,minSize[5],maxSize[10]]', 'style' => 'width:250px;'));\n $name->setRequired(true);\n $this->addElement($name);\n\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setValue('Adauga');\n $submit->setAttribs(array('class' => 'button1'));\n $submit->setIgnore(true);\n $this->addElement($submit);\n\n }", "protected function initializeAction()\n\t{\n\t\tparent::init('Form');\n\t}", "public function __construct() {\r\n\r\n parent::__construct();\r\n \r\n //cargamos modelo para CI perfil\r\n $this->load->model('paciente_model');\r\n $this->load->model('dropdown_model');\r\n \r\n //Cargamos todas las librerias utilizadas en es CI\r\n $this->load->library(array(\r\n 'form_validation',//funciones para los formularios\r\n 'session',//iniciar session\r\n 'fileclass',//control css y js para cada pagina\r\n 'general_sessions',//Validar datos de session\r\n 'data_empresa',//informacion de la empresa\r\n 'gestion_view'));//controlar vistas\r\n \r\n //Cargamos todos los helper que utilizaremos\r\n $this->load->helper(array('url', 'form','html','funciones_system'));\r\n }", "public function init()\n {\n $this->addElement(\n 'text','USUARIO_RUT', array(\n 'label'=>'Rut de Usuario',\n 'required'=>true\n )\n );\n \n $this->addElement(\n 'password', 'USUARIO_SESSION', array(\n 'label'=>'Sesión',\n 'required'=>true\n )\n );\n \n $this->addElement(\n 'submit', 'Ingresar', array(\n 'id'=>'send',\n )\n ); \n }", "public function init()\n {\n \t$userCountry = \tnew Zend_Form_Element_Text('country');\n \t$userCountry\t->setLabel('Country:')\n\t\t\t \t->setRequired(true)\n\t\t\t \t->addValidator('NotEmpty', true);\n \t\n \t$userState = \tnew Zend_Form_Element_Text('state');\n \t$userState\t->setLabel('State:')\n\t\t\t \t->setRequired(true)\n\t\t\t \t->addValidator('NotEmpty', true);\n \t\n \t$userCity = \tnew Zend_Form_Element_Text('city');\n \t$userCity\t->setLabel('City:')\n\t\t\t \t->setRequired(true)\n\t\t\t \t->addValidator('NotEmpty', true);\n \t\n \t$userContact = \tnew Zend_Form_Element_Text('contact');\n \t$userContact \t->setLabel('Contact:')\n\t\t\t\t\t\t->setRequired(true)\n\t\t\t\t \t->addValidator('NotEmpty', true);\n \t\n \t$userImage = \tnew Zend_Form_Element_Text('userImage');\r\n \t$userImage\t->setLabel('Image:')\r\n\t\t\t \t->setRequired(true)\r\n\t\t\t \t->addValidator('NotEmpty', true);\r\n \t \r\n \t$userUniversity = \tnew Zend_Form_Element_Text('university');\r\n \t$userUniversity\t->setLabel('University:')\r\n\t\t\t\t\t ->setRequired(true)\r\n\t\t\t\t\t ->addValidator('NotEmpty', true);\r\n \t \r\n \t$submit = \tnew Zend_Form_Element_Submit('submit');\r\n \t$submit->setLabel('Click here to submit');\r\n \t \r\n \t$this->addElements(array($userCountry,$userState,$userCity,$userContact,$userImage,$userUniversity,$submit));\r\n \t$this->setAttrib('action','Myprofile/adduserprofile');\r\n \t$this->setMethod('post');\r\n \t\n }", "public function init()\n {\n $this->setMethod('post');\n $id = new Zend_Form_Element_Hidden('id');\n\t\t\n\t\t$id_wlabel = new Zend_Form_Element_Select('id_wlabel');\n\t\t$id_wlabel->setLabel('WLabel')\n\t\t\t\t\t\t ->setmultiOptions($this->_selectOptionsWLabel())\n\t\t\t\t\t\t ->setAttrib('maxlength', 200)\n\t\t\t\t\t\t ->setAttrib('size', 1)\n\t\t\t\t\t\t ->setRequired(true)\n ->addValidator('NotEmpty', true);\t\n \n\t\t$layout = new Zend_Form_Element_Text('layout');\n\t\t$layout->setLabel('Layout')\n\t\t\t\t->setRequired(true)\n\t\t\t\t->addFilter('StripTags')\n\t\t\t\t->addFilter('StringTrim')\n\t\t\t\t->addValidator('NotEmpty')\n\t\t\t\t->setAttrib('size', 56)\n\t\t\t\t->setAttrib('maxlength', 255);\n \n\t\t$template = new Zend_Form_Element_Text('template');\n\t\t$template->setLabel('Template')\n\t\t\t\t->setRequired(true)\n\t\t\t\t->addFilter('StripTags')\n\t\t\t\t->addFilter('StringTrim')\n\t\t\t\t->addValidator('NotEmpty')\n\t\t\t\t->setAttrib('size', 56)\n\t\t\t\t->setAttrib('maxlength', 255);\n\n\t\t$status = new Zend_Form_Element_Select('status');\n\t\t$status->setLabel('Status')\n\t\t\t\t\t\t ->setRequired(true)\n ->addValidator('NotEmpty', true)\n ->setmultiOptions(array('0'=>'inactive', '1'=>'active'))\n\t\t\t\t\t\t ->setAttrib('maxlength', 200)\n\t\t\t\t\t\t ->setAttrib('size', 1)\n\t\t\t\t\t\t ;\n\t\t\t\t\t\t \t\t\t\t \n $submit = new Zend_Form_Element_Submit('submit');\n\t\t$submit->setLabel('Add');\n\n\t\t$this->addElements(array($id,$id_wlabel,$layout,$template,$status,$submit));\n }", "public function init() {\n $this->setMethod(\"post\");\n $this->addElement('text', 'code_categorie', array('label' => 'Code:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'class' => 'text',\n 'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 10))\n )));\n\n $this->addElement('text', 'libelle_categorie', array('label' => 'Libelle:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'class' => 'text'\n ));\n\n $this->addElement('textarea', 'description_categorie', array(\n 'label' => 'Description:',\n 'required' => FALSE,\n ));\n\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Valider',\n ));\n\n // Add the cancel button\n $this->addElement('button', 'cancel', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n ));\n }", "public function __construct() {\n\n $this->inputmanager = new Validator();\n\n $this->config = $this->configuration();\n\n $this->validation = $this->validate(); \n\n }", "public function init() {\n $auth = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'));\n $user = $auth->getIdentity();\n $this->setMethod('post');\n\n $num_membre = $user->num_membre;\n\n $this->addElement(\n 'text', 'code_demand', array(\n 'label' => 'Code *',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n\n $this->addElement('text', 'lib_demand', array(\n 'label' => 'Libellé *',\n 'required' => true,\n 'size' => 43,\n 'filters' => array('StringTrim'),\n ));\n\n $gac = array();\n $tab = new Application_Model_DbTable_EuGac();\n $sel = $tab->select();\n $sel->order('date_creation', 'DESC');\n $ngac = $tab->fetchAll($sel);\n foreach ($ngac as $value) {\n $gac[$value->num_gac] = ucfirst($value->num_gac) . '--' . $value->nom_gac;\n }\n $g_select = new Zend_Form_Element_Select('num_gac');\n $g_select->setLabel('Nom de la GAC *')->isRequired(true);\n $g_select->addMultiOption('', '');\n $g_select->addMultiOptions($gac);\n $this->addElement($g_select);\n\n $besoin = array();\n $table = new Application_Model_DbTable_EuBesoin();\n $select = $table->select();\n $select->where('num_client=?', $num_membre);\n $select->order('id_besoin', 'DESC');\n $bes = $table->fetchAll($select);\n foreach ($bes as $value) {\n $besoin[$value->id_besoin] = ucfirst($value->objet_besoin) . ' ' . $value->date_besoin;\n }\n $f_select = new Zend_Form_Element_Select('id_besoin');\n $f_select->setLabel('Expression de besoin ')->isRequired(false);\n $f_select->addMultiOption('', '');\n $f_select->addMultiOptions($besoin);\n $this->addElement($f_select);\n\n $this->addElement('textarea', 'desc_demand', array(\n 'label' => 'Description',\n 'required' => false,\n 'filters' => array('StringTrim'),\n ));\n\n $type_unite = array('' => '', 'jour' => 'Jour', 'mois' => 'Mois', 'annee' => 'Année');\n $unit_select = new Zend_Form_Element_Select('unite_mdv');\n $unit_select->setLabel('Unité de durée *')\n ->setRequired(true)\n ->addMultiOptions($type_unite);\n $this->addElement($unit_select);\n\n $this->addElement('text', 'mdv', array(\n 'label' => 'Durée du projet *',\n 'required' => true,\n 'size' => 8,\n 'filters' => array('StringTrim'),\n 'validators' => array('validator' => 'digits'),\n ));\n\n $this->addElement('text', 'mt_salaire', array(\n 'label' => 'Salaire',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array('validator' => 'digits'),\n ));\n\n $this->addElement('text', 'mt_investis', array(\n 'label' => 'Investissement',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array('validator' => 'digits'),\n ));\n\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Valider',\n ));\n\n // Add the cancel button\n $this->addElement('button', 'cancel', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n ));\n }", "protected function _construct()\n {\n $this->_init(\\AddictedToMagento\\DynamicForms\\Model\\ResourceModel\\Form::class);\n }", "public function init()\n {\n $this->setMethod('post');\n\n\n $name = new Zend_Form_Element_Text('name');\n $name->setLabel('Your Name: ');\n $name->setAttrib('class', 'form-control');\n /**$email->setAttribs(Array(\n 'placeholder'=>'Ex : mariam@gmail.com',\n 'class'=>'form-control'\n ));**/\n //$email->addValidator( 'Db_NoRecordExists', true, array(\n // 'table' => 'clients',\n //'field' => 'email',\n //'messages' => array( 'recordFound' => 'Email already taken' )));\n\n $pswd = new Zend_Form_Element_Password('password');\n $pswd->setLabel('Password:');\n $pswd->setAttrib('class', 'form-control');\n\n\n $submit = new Zend_Form_Element_Submit('login');\n $submit->setValue('Submit');\n $submit->setAttrib('class', 'btn-primary');\n\n $this->addElements(array(\n\n $name,\n $pswd,\n $submit,\n\n\n\n ));\n\n\n\n }", "public function initializeControllerArgumentsBaseValidators() {}", "public function init()\n {\n parent::init();\n $this->formModel = new GoodsForm();\n \n }", "public function __construct()\n {\n $this->middleware('auth');\n $this->field_list = ['number_usuario'=>'QR','name'=>'Nombre','first_surname'=>'Apellido Paterno','second_surname'=>'Apellido Materno','totals'=>'Puntos','visits'=>'Visitas', 'id'=>'Acciones'];\n $this->name = 'Usuarios con mas puntos';\n $this->name_plural = 'fa fa-child';\n $this->form = 'App\\Core\\Forms\\Lealtad\\UsuariosMasPuntosForm';\n $this->model = 'App\\User';\n $this->url_prefix = 'usuarioconmaspuntos';\n $validation_add = [\n ];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n\n }", "public function init() {\n $this->setMethod ( 'post' );\n\n // add an name element\n $this->addElement ( 'text', 'name', array ('label' => 'Your name:', 'required' => true, 'filters' => array ( 'StringTrim' ), 'validators' => array ('alnum') ) );\n \n //add surname\n $this->addElement ( 'text', 'surname', array ('label' => 'Your surname:', 'filters' => array ( 'StringTrim' ), 'validators' => array ('alnum', array ('regex', false, array ('/^[a-z]/i' ) ), array ('StringLength', false, array (3, 20 ) ) ), 'required' => true ) );\n\n //add company\n $this->addElement ( 'text', 'company', array ('label' => 'Your company:', 'filters' => array ( 'StringTrim' ), 'validators' => array ( array ('StringLength', false, array (2, 120 ) ) ), 'required' => false ) );\n\n // add an email element\n $this->addElement ( 'text', 'email', array ('label' => 'Your email:', 'required' => true, 'filters' => array ('StringTrim' ), 'validators' => array ('EmailAddress' ) ) );\n\n //add phonenumber\n $this->addElement ( 'text', 'phonenumber', array ('label' => 'Your phone number:', 'filters' => array ('StringTrim', 'StringToLower' ), 'validators' => array ('alnum', array ('StringLength', false, array (9, 30 ) ) ), 'required' => false ) );\n\n //add link reported\n $this->addElement ( 'text', 'linkreported', array ('label' => 'Please, insert the link to be reviewed:', 'filters' => array ('StringTrim', 'StringToLower' ), 'validators' => array ( array ('StringLength', false, array (9, 256 ) ) ), 'required' => true ) );\n\n //add url reported\n $this->addElement ( 'text', 'urlreported', array ('label' => 'Please, insert the url where this content appears:', 'filters' => array ('StringTrim', 'StringToLower' ), 'validators' => array ( array ('StringLength', false, array (9, 256 ) ) ), 'required' => true ) );\n\n //add reason\n $this->addElement ( 'text', 'reason', array ('label' => 'Reason of your complaint:', 'filters' => array ( 'StringTrim' ), 'validators' => array ( array ('StringLength', false, array (3, 100 ) ) ), 'required' => true ) );\n\n\n $this->addElement ( 'textarea', 'message', \n array ('label' => 'Your message:', 'validators' => array (array ('StringLength', false, array (20, 2000 ) ) ), 'required' => true, 'rows' => 4,'cols' => 60 )\n\n );\n\n $this->addElement ( 'captcha', 'captcha', array ('label' => 'Please, insert the 5 characters shown:', 'required' => true,\n 'captcha' => array ('captcha' => 'Image', 'wordLen' => 5, 'height' => 50, 'width' => 160, 'gcfreq' => 50, 'timeout' => 300,\n 'font' => APPLICATION_PATH . '/configs/antigonimed.ttf',\n 'imgdir' => FOOFIND_PATH . '/public/images/captcha' ) ) );\n\n\n $checkboxDecorator = array(\n 'ViewHelper',\n 'Errors',\n array(array('data' => 'HtmlTag'), array('tag' => 'span', 'class' => 'element')),\n array('Label', array('tag' => 'dt'),\n array(array('row' => 'HtmlTag'), array('tag' => 'span')),\n ));\n\n $this->addElement('checkbox', 'agree', array(\n 'decorators' => $checkboxDecorator,\n 'required' => true,\n 'checked' =>false\n ));\n\n\n // add the submit button\n $this->addElement ( 'submit', 'submit', array (\n 'label' => 'Send',\n 'class' => 'large magenta awesome') );\n }", "public function init()\n {\n // Existing Insurer\n $this->addElement('text', 'target_premium', array(\n 'label' => '',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please let us know how much your renewal premium is',\n 'notEmptyInvalid' => 'Please let us know how much your renewal premium is'\n )\n )\n )\n )\n ));\n \n // Existing Insurer\n $this->addElement('text', 'existing_insurer', array(\n 'label' => '',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please let us know the name of you existng insurer',\n 'notEmptyInvalid' => 'Please let us know the name of you existng insurer'\n )\n )\n )\n )\n ));\n\n // Add next renewal date element\n $this->addElement('text', 'next_renwal_date', array(\n 'label' => '',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please select your renewal date',\n 'notEmptyInvalid' => 'Please enter a valid policy start date'\n )\n )\n )\n )\n ));\n $next_renwal_date = $this->getElement('next_renwal_date');\n $validator = new Zend_Validate_DateCompare();\n $validator->minimum = new Zend_Date(mktime(0, 0, 0, date('m'), date('d'), date('Y')));\n $validator->setMessages(array(\n 'msgMinimum' => 'Policy start date cannot be in the past',\n ));\n $next_renwal_date->addValidator($validator, true);\n\n // Append additional styles for the datepicker\n $view = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('view');\n $view->headLink()->appendStylesheet(\n '/assets/vendor/bootstrap-datepicker/css/bootstrap-datepicker.min.css',\n 'screen'\n );\n\n // Append required JS files for the datepicker to function\n $view->headScript()->appendFile(\n '/assets/vendor/jquery-date/js/date.js',\n 'text/javascript'\n )->appendFile(\n '/assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.min.js',\n 'text/javascript'\n )->appendFile(\n '/assets/portfolio-insurance-quote/js/renewalDatePicker.js',\n 'text/javascript'\n );\n\n // Add 'how did you hear about us?' element\n $this->addElement('select', 'how_hear', array(\n 'label' => '',\n 'required' => false,\n // TODO: Remove the hard coded options\n 'multiOptions' => array(\n '' => 'Please Select',\n 'Letting Agent' => 'Letting Agent',\n 'Personal Recommendation' => 'Personal Recommendation',\n 'SMS' => 'SMS',\n 'Email' => 'Email',\n 'Letter' => 'Letter',\n 'Internet Location' => 'Internet Location',\n 'Publication' => 'Publication',\n 'Other' => 'Other'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please select How did you heard about us',\n 'notEmptyInvalid' => 'Please select How did you heard about us'\n )\n )\n )\n )\n ));\n \n // Other Information\n $this->addElement('text', 'other', array(\n 'label' => '',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Other Information'\n )\n )\n )\n ),\n 'attribs' => array(\n 'data-ctfilter' => 'yes'\n )\n ));\n\n // Strip all tags to prevent XSS errors\n $this->setElementFilters(array('StripTags'));\n \n // Set custom subform decorator\n $this->setDecorators(array(\n array('ViewScript', array('viewScript' => 'portfolio-insurance-quote/step3.phtml'))\n ));\n \n $this->setElementDecorators(array(\n array('ViewHelper', array('escape' => false)),\n array('Label', array('escape' => false))\n ));\n }", "function __construct()\r\n {\r\n parent::__construct();\r\n $his->load->library('form_validation');\r\n $this->load->model('catalogos/TipoJuicios_model');\r\n }", "public function init()\n { \n parent::init();\n $this->setAction('/zfmyadmin/create/form/');\n $this->setAttrib('id', 'create-form-form'); \n \n $element = new Zend_Form_Element_Select('moduleName', array(\n 'id' => 'module-name',\n 'class' => 'module-name',\n 'required' => true,\n ));\n $element->addValidator(new Zfmyadmin_Validate_ModuleExist);\n $element->setSeparator('');\n $element->setDecorators(array( \n 'ViewHelper', \n 'Errors',\n )); \n $this->addElement($element); \n \n $element = new Zend_Form_Element_Select('controllerName', array(\n 'id' => 'controller-name',\n 'class' => 'controller-name',\n 'required' => true,\n ));\n $element->setSeparator('');\n $element->setDecorators(array( \n 'ViewHelper', \n 'Errors',\n )); \n $this->addElement($element); \n \n $element = new Zend_Form_Element_Select('actionName', array(\n 'id' => 'action-name',\n 'class' => 'action-name',\n 'required' => true,\n ));\n $element->setSeparator('');\n $element->setDecorators(array( \n 'ViewHelper', \n 'Errors',\n )); \n $this->addElement($element); \n //==================================================================== \n \n $element = new Zend_Form_Element_Text('formClassName', array(\n 'id' => 'create-form-class-name',\n 'size' => 50,\n 'filters' => array('StringTrim'),\n ));\n $this->addElement($element);\n \n $element = new Zend_Form_Element_Text('formExtendsClassName', array(\n 'id' => 'create-form-extends-class-name',\n 'size' => 50,\n 'filters' => array('StringTrim'),\n ));\n $this->addElement($element);\n\n \n \n// =================================================================\n \n// =============================================================== \n \n $element = new Zend_Form_Element_Hidden('intentionSignature', array(\n 'id'=>'intention-signature',\n 'value'=>''\n ));\n \n $this->addElement($element); \n \n \n $element = new Zend_Form_Element_Hidden('creatorCategory', array(\n 'id' => 'creator-category',\n 'value' => Zfmyadmin_Models_Operation::CATEGORY_FORM,\n 'filters' => array('Int'),\n ));\n \n $this->addElement($element); \n \n \n foreach ($this as $element) { \n $element->setDecorators(array(\n 'ViewHelper',\n array('Errors', array('class' => 'form-field-error' )),\n 'Label',\n ));\n } \n $this->addSubFormAttr();\n $this->setSubmit();\n \n }", "public function init() {\n\n $this->setMethod('post');\n $this->setName('order');\n\n\n\n $vyrobce = new Zend_Form_Element_Text('vyrobce');\n $vyrobce->setLabel('Výrobce')\n ->setRequired(true);\n\n $typ = new Zend_Form_Element_Text('typ');\n $typ->setLabel('Typ')\n ->setRequired(true);\n\n $druhPaliva = new Zend_Form_Element_Text('palivo');\n $druhPaliva->setLabel('Druh paliva')\n ->setRequired(true);\n\n $pocetValcu = new Zend_Form_Element_Text('valce');\n $pocetValcu->setLabel('Počet válců')\n ->setRequired(true);\n\n $obsahCM = new Zend_Form_Element_Text('obsah');\n $obsahCM->setLabel('Obsah v cm3')\n ->setRequired(true);\n\n $rokVyroby = new Zend_Form_Element_Text('vyroba');\n $rokVyroby->setLabel('Rok vyroby')\n ->setRequired(true);\n\n $vykonKW = new Zend_Form_Element_Text('vykon');\n $vykonKW->setLabel('Výkon v KW')\n ->setRequired(true);\n\n $this->addDisplayGroup(array($vyrobce,$typ,$druhPaliva,$pocetValcu,$obsahCM,$rokVyroby,$vykonKW), 'technickeparam',array('legend' => 'Technické parametry vozu'));\n\n // FAKTURACNI UDAJE\n\n $zakaznik = new Zend_Form_Element_Text('zakaznik');\n $zakaznik->setLabel('Jméno a příjmení')\n ->setRequired(true);\n\n $firma = new Zend_Form_Element_Text('firma');\n $firma->setLabel('Název firmy');\n\n $ico = new Zend_Form_Element_Text('ico');\n $ico->setLabel('IČO');\n\n $dic = new Zend_Form_Element_Text('dic');\n $dic->setLabel('DIČ');\n\n $ulice = new Zend_Form_Element_Text('ulice');\n $ulice->setLabel('Ulice, ČP')\n ->setRequired(true);\n\n $mesto = new Zend_Form_Element_Text('mesto');\n $mesto->setLabel('Město')\n ->setRequired(true);\n\n $psc = new Zend_Form_Element_Text('psc');\n $psc->setLabel('PSČ')\n ->setRequired(true);\n\n $telefon = new Zend_Form_Element_Text('telefon');\n $telefon->setLabel('Telefon')\n ->setRequired(true);\n\n $email = new Zend_Form_Element_Text('zakaznikemail');\n $email->setLabel('E-mail')\n ->addValidator(new Zend_Validate_EmailAddress());\n\n //textarea\n $poznamka = new Zend_Form_Element_Textarea('poznamka');\n $poznamka->setAttribs(array('cols' => 60, 'rows' => 8))\n ->setLabel('Poznámka');\n\n\n $this->addDisplayGroup(array($zakaznik,$firma,$ico,$dic,$ulice,$mesto,$psc,$telefon,$email,$poznamka), 'fakturace',array('legend' => 'Fakturační údaje'));\n\n //DODACI ADRESA\n\n $zakaznikd = new Zend_Form_Element_Text('zakaznikd');\n $zakaznikd->setLabel('Jméno a příjmení');\n\n $firmad = new Zend_Form_Element_Text('firmad');\n $firmad->setLabel('Název firmy');\n\n $uliced = new Zend_Form_Element_Text('uliced');\n $uliced->setLabel('Ulice, ČP');\n\n $mestod = new Zend_Form_Element_Text('mestod');\n $mestod->setLabel('Město');\n\n $pscd = new Zend_Form_Element_Text('pscd');\n $pscd->setLabel('PSČ');\n\n $telefond = new Zend_Form_Element_Text('telefond');\n $telefond->setLabel('Telefon');\n\n $this->addDisplayGroup(array($zakaznikd,$firmad,$uliced,$mestod,$pscd,$telefond), 'dodaci',array('legend' => 'Dodací adresa'));\n\n $control = new Zend_Form_Element_Text('order_control');\n $control->setLabel('Kontrola 5+3 (slovy)')\n ->setRequired(true);\n\n\n //tlacitko submit pro dany formular\n $submit = new Zend_Form_Element_Submit('order');\n $submit->setAttrib('id', 'order_button');\n $submit->setLabel('Objednat zboží');\n\n //$this->addElements(array($email, $messageContent, $captcha, $submit));\n $this->addElements(array($vyrobce, $typ, $druhPaliva, $pocetValcu, $obsahCM, $rokVyroby, $vykonKW, $zakaznik, $firma, $ico, $dic, $ulice, $mesto, $psc, $telefon,\n $email, $poznamka, $zakaznikd, $firmad, $uliced, $mestod, $pscd, $telefond, $control, $submit));\n //akce pro zpracovani formulare\n // $this->setAction($this->getBaseUrl() . '/index/send');\n $url = new Zend_View_Helper_Url();\n $this->setAction($url->url(array('controller' => 'index', 'action' => 'sendorder'), 'default'));\n }", "public function __construct(array $medico = null, array $cuarto = null)\n {\n parent::__construct('AdmisionForm');\n $this->setAttribute('method', 'post');\n\n // medicos\n $this->add(array(\n 'name' => 'idmedico',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Medicos',\n 'empty_option' => 'Seleccione un medico',\n 'value_options' => $medico,\n ),\n 'attributes' => array(\n 'id' => 'idmedicoadmision'\n )\n ));\n // cuarto\n $this->add(array(\n 'name' => 'idcuarto',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Cuarto',\n 'empty_option' => 'Seleccione un cuarto',\n 'value_options' => $cuarto,\n ),\n 'attributes' => array(\n 'id' => 'idcuarto'\n )\n ));\n // paciente\n $this->add(array(\n 'name' => 'idpaciente',\n 'type' => 'Text',\n 'attributes' => array(\n 'id' => 'idpacienteadmision'\n )\n ));\n\n $this->add(array(\n 'name' => 'admision_fechaadmision',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Fecha de admisión',\n ),\n 'attributes' => array(\n 'id' => 'admision_fechaadmision'\n )\n ));\n $this->add(array(\n 'name' => 'admision_fechasalida',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Fecha de salida',\n ),\n 'attributes' => array(\n 'id' => 'admision_fechasalida'\n )\n ));\n $this->add(array(\n 'name' => 'admision_diagnostico',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Diagnostico',\n ),\n 'attributes' => array(\n 'id' => 'admision_diagnostico'\n )\n ));\n $this->add(array(\n 'name' => 'admision_observaciones',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Observaciones',\n ),\n 'attributes' => array(\n 'id' => 'admision_observaciones'\n )\n ));\n $this->add(array(\n 'name' => 'admision_status',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Status',\n 'empty_option' => 'Seleccione su estado civil',\n 'value_options' => array('pagada' => 'pagada','no pagada' => 'no pagada','pendiente' => 'pendiente'),\n ),\n 'attributes' => array(\n 'id' => 'admision_status'\n )\n ));\n $this->add(array(\n 'name' => 'admision_total',\n 'required' => true,\n 'validators' => array(\n array(\n 'name' => 'Float',\n 'options' => array(\n 'min' => 0,\n 'locale' => 'es_MX',\n ),\n ),\n ),\n 'options' => array(\n 'label' => 'Admisión Total'\n ),\n 'attributes' => array(\n 'id' => 'admision_total'\n )\n ));\n $this->add(array(\n 'name' => 'admision_pagadaen',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Pagada en',\n ),\n 'attributes' => array(\n 'id' => 'admision_pagadaen'\n )\n ));\n $this->add(array(\n 'name' => 'admision_tipodepago',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Tipo de pago',\n 'empty_option' => 'Seleccione tipo de pago',\n 'value_options' => array('efectivo', 'tarjeta debito','tarjeta credito','cheque','no identificado'),\n ),\n 'attributes' => array(\n 'id' => 'admision_tipodepago'\n )\n ));\n $this->add(array(\n 'name' => 'admision_referenciapago',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Referencia de pago (4 últimos dígitos)',\n ),\n 'attributes' => array(\n 'id' => 'admision_referenciapago'\n )\n ));\n $this->add(array(\n 'name' => 'admision_facturada',\n 'type' => 'Text',\n 'options' => array(\n 'label' => '¿Facturada?',\n ),\n 'attributes' => array(\n 'id' => 'admision_facturada'\n )\n ));\n $this->add(array(\n 'name' => 'admision_registrada',\n 'type' => 'Text',\n 'options' => array(\n 'label' => '¿Registrada?',\n ),\n 'attributes' => array(\n 'id' => 'admision_registrada'\n )\n ));\n }", "public function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t$this->load->library('form_validation');\r\n\t}", "public function __construct() {\n\n\t\t//Call the parent constructor\n\t\tparent::__construct(); \n\t\t\n\t\t$this->validate = array_merge(\n\t\t\t\t\t$this->validate\n\t\t\t\t);\t\t\n\n\t}", "public function init()\r\n {\r\n \t\r\n \t$this->setName('nome');\r\n \t$this->setAttrib('enctype', 'multipart/form-data');\r\n $ID_OPERADOR = new Zend_Form_Element_Hidden('ID_OPERADOR');\r\n $ID_OPERADOR->addFilter('Int');\r\n \r\n\t\t$NM_OPERADOR= new Zend_Form_Element_Text('NM_OPERADOR');\r\n $NM_OPERADOR->setLabel('NOME')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter nome');\r\n \t \r\n \t \r\n $DS_TELEFONE_PESSOAL= new Zend_Form_Element_Text('DS_TELEFONE_PESSOAL');\r\n $DS_TELEFONE_PESSOAL->setLabel('TELEFONE PESSOAL')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter telefone pessoal');\r\n \t \r\n \t \r\n $DS_TELEFONE_BIOS= new Zend_Form_Element_Text('DS_TELEFONE_BIOS');\r\n $DS_TELEFONE_BIOS->setLabel('TELEFONE BIOS')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter telefone bios'); \t\r\n \t \r\n $DS_EMAIL_PESSOAL= new Zend_Form_Element_Text('DS_EMAIL_PESSOAL');\r\n $DS_EMAIL_PESSOAL->setLabel('E-MAIL PESSOAL')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter e-mail pessoal'); \r\n \r\n $DS_EMAIL_BIOS= new Zend_Form_Element_Text('DS_EMAIL_BIOS');\r\n $DS_EMAIL_BIOS->setLabel('E-MAIL BIOS')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter e-mail bios');\r\n \r\n $DS_ENDERECO= new Zend_Form_Element_Text('DS_ENDERECO');\r\n $DS_ENDERECO->setLabel('ENDEREÇO')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter endereco');\r\n \r\n $DS_BAIRRO= new Zend_Form_Element_Text('DS_BAIRRO');\r\n $DS_BAIRRO->setLabel('BAIRRO')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter bairro');\r\n \r\n $NR_CEP= new Zend_Form_Element_Text('NR_CEP');\r\n $NR_CEP->setLabel('CEP')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cep');\r\n \r\n \r\n $NR_CPF= new Zend_Form_Element_Text('NR_CPF');\r\n $NR_CPF->setLabel('CPF')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cpf');\r\n \r\n $NR_IDENTIDADE= new Zend_Form_Element_Text('NR_IDENTIDADE');\r\n $NR_IDENTIDADE->setLabel('Nº IDENTIDADE')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter nº identidade');\r\n \t \r\n $DT_NASCIMENTO= new Zend_Form_Element_Text('DT_NASCIMENTO');\r\n $DT_NASCIMENTO->setLabel('DATA NASCIMENTO')\r\n ->setRequired(true)\r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter data nascimento'); \t \r\n \r\n $DS_REGISTRO_PROFISSIONAL= new Zend_Form_Element_Text('DS_REGISTRO_PROFISSIONAL');\r\n $DS_REGISTRO_PROFISSIONAL->setLabel('REGISTRO PROFISSIONAL')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter data registro profissional');\r\n \t \r\n $DS_CTF_IBAM= new Zend_Form_Element_Text('DS_CTF_IBAM');\r\n $DS_CTF_IBAM->setLabel('CTF IBAMA')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter ctf ibama');\r\n \r\n $DS_SKYPE= new Zend_Form_Element_Text('DS_SKYPE');\r\n $DS_SKYPE->setLabel('SKYPE')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter skype');\r\n \r\n $DS_LOGIN= new Zend_Form_Element_Text('DS_LOGIN');\r\n $DS_LOGIN->setLabel('LOGIN')\r\n ->setRequired(true)\r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter skype');\r\n \r\n $DS_SENHA= new Zend_Form_Element_Password('DS_SENHA');\r\n $DS_SENHA->setLabel('SENHA')\r\n ->setRequired(true)\r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter senha');\r\n \t \r\n $REPETIR_SENHA= new Zend_Form_Element_Password('REPETIR_SENHA');\r\n $REPETIR_SENHA->setLabel('REPETIR SENHA')\r\n ->setRequired(true)\r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter repetir senha');\r\n \r\n \r\n $NM_CONTATO_FAMILIAR= new Zend_Form_Element_Text('NM_CONTATO_FAMILIAR');\r\n $NM_CONTATO_FAMILIAR->setLabel('NOME CONTATO FAMILIAR')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter nome contato familiar');\r\n \r\n\r\n $NR_TELEFONE_CONTATO_FAMILIAR= new Zend_Form_Element_Text('NR_TELEFONE_CONTATO_FAMILIAR');\r\n $NR_TELEFONE_CONTATO_FAMILIAR->setLabel('Nº TELEFONE CONTATO FAMILIAR')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter n� telefone contato familiar');\r\n \r\n \t \r\n $FK_PERFIL= new Zend_Form_Element_Select('FK_PERFIL');\r\n $perfil = new Application_Model_DbTable_Perfil();\r\n $FK_PERFIL->setLabel('Perfil');\r\n $FK_PERFIL->setMultiOptions( $perfil->getPerfil() )\r\n ->setRequired(true)\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control select2');\r\n \t \r\n \t \r\n \t $submit = new Zend_Form_Element_Submit('submit');\r\n \t $submit->setLabel(\"Adiconar\");\r\n \t $submit->setAttrib('id', 'submitbutton');\r\n \t $submit->removeDecorator('DtDdWrapper')\r\n \t ->setAttrib('class', 'btn btn-primary button')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label');\r\n \t \r\n \r\n $this->addElements(array($ID_OPERADOR,$NM_OPERADOR,$DS_TELEFONE_PESSOAL,$DS_TELEFONE_BIOS,$DS_EMAIL_PESSOAL,$DS_EMAIL_BIOS,$DS_ENDERECO,$DS_BAIRRO,$NR_CEP,$NR_CPF,$NR_IDENTIDADE,$DT_NASCIMENTO,$DS_REGISTRO_PROFISSIONAL,$DS_CTF_IBAM,$DS_SKYPE,$DS_LOGIN,$DS_SENHA,$REPETIR_SENHA,$NM_CONTATO_FAMILIAR, $NR_TELEFONE_CONTATO_FAMILIAR, $FK_PERFIL,$submit));\r\n // $this->addElements(array($id, $nome, $email,$senha, $submit));\r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioOperador.phtml'))));\r\n }", "public function init()\n {\n parent::init();\n Requirements::add_i18n_javascript(USERFORMS_DIR . '/javascript/lang');\n Requirements::combine_files('userformslice.js', array(\n USERFORMS_DIR . '/thirdparty/jquery-validate/jquery.validate.min.js',\n USERFORMS_DIR . '/javascript/UserForm.js'\n ));\n }", "public function init() {\n\t\tparent::init();\n\t\t\n\t\t// block prototype validation\n\t\tValidator::set_javascript_validation_handler('none');\n\t\t\n\t\t// load the jquery\n\t\t//Requirements::javascript(SAPPHIRE_DIR .'/thirdparty/jquery/jquery.js');\n\t\tRequirements::javascript('userforms/thirdparty/jquery-validate/jquery.validate.min.js');\n\t}", "public function __construct()\n {\n parent::__construct();\n \n\t\t\t\t$this->load->model(\"producto_model\",\"producto\");\n\t\t\t\t$this->load->library('form_validation');\n \n \n }", "private function init_configuraciones(): controler\n {\n $this->titulo_lista = 'Registro de Clientes';\n\n return $this;\n }", "public function init() {\n $this->setMethod('post');\n\n // Add agent name element\n $this->addElement(\n 'span',\n 'agent_name',\n array(\n 'label' \t=> 'Name of letting agency',\n 'required' \t=> false,\n 'readonly' \t=> true,\n 'filters' \t=> array('StringTrim'),\n 'class' => 'formvalue',\n 'validators' => array(\n array(\n 'NotEmpty',\n true,\n array(\n 'messages' => array (\n 'isEmpty' => 'Please enter letting agent name',\n 'notEmptyInvalid' => 'Please enter letting agent name'\n )\n )\n )\n )\n )\n );\n\n // Add agent scheme number\n $this->addElement(\n 'span',\n 'agent_schemenumber',\n array(\n 'label' \t=> 'Agent scheme number',\n 'required' \t=> false,\n 'readonly' \t=> true,\n 'filters' \t=> array('StringTrim'),\n 'class' => 'formvalue',\n 'validators' => array(\n array(\n 'NotEmpty',\n true,\n array(\n 'messages' => array (\n 'isEmpty' => 'Please enter agent scheme number',\n 'notEmptyInvalid' => 'Please enter agent scheme number'\n )\n )\n )\n )\n )\n );\n\n // Add agent contact name element\n $this->addElement(\n 'text',\n 'agent_contact_name',\n array(\n 'label' => 'Contact name',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'maxlength' => '100',\n 'validators' => array(\n array(\n 'NotEmpty',\n true,\n array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your contact name',\n 'notEmptyInvalid' => 'Please enter your contact name'\n )\n )\n )\n )\n )\n );\n\n // Add the landlord find address button\n $this->addElement('submit', 'landlords_address_lookup', array(\n 'ignore' => true,\n 'label' => 'Find address',\n 'class' => 'button',\n 'onclick' => 'getPropertiesByPostcode($(\\'#landlord_postcode\\').val(), \\'landlord_postcode\\', \\'landlord_address\\',\\'no_landlord_address_selector\\'); return false;'\n ));\n\n\n // Add agent postcode\n $this->addElement('text', 'agent_postcode', array(\n 'label' => 'Postcode',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'maxlength' => '10',\n 'validators' => array(\n array(\n 'NotEmpty',\n true,\n array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your office postcode',\n 'notEmptyInvalid' => 'Please enter your office postcode'\n )\n )\n ),\n array(\n 'regex',\n true,\n array(\n 'pattern' => '/^[0-9a-z]{2,}\\ ?[0-9a-z]{2,}$/i',\n 'messages' => 'Postcode must be in postcode format'\n )\n )\n ),\n )\n );\n\n Application_Core_FormUtils::createManualAddressInput(\n $this,\n 'agent_housename',\n 'agent_street',\n 'agent_town',\n 'agent_city',\n false,\n '',\n true\n );\n\n // Add agent phone number element\n $this->addElement('text', 'agent_telephone', array(\n 'label' => 'Telephone number',\n 'required' => true,\n 'class' => 'input-pos-float',\n 'validators' => array(\n \t'TelephoneNumber',\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your telephone number'\n )\n )\n )\n )\n ));\n\n // Add agent e-mail element\n $this->addElement('text', 'agent_email', array(\n 'label' => 'Email address',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'maxlength' => '100',\n 'validators' => array(\n array ('NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your email address'\n )\n ))\n )\n ));\n\n $emailValidator = new Zend_Validate_EmailAddress();\n $emailValidator->setMessages(array(\n Zend_Validate_EmailAddress::INVALID_HOSTNAME => \"Domain name invalid in email address\",\n Zend_Validate_EmailAddress::INVALID_FORMAT => \"Invalid email address\"\n ));\n $this->getElement('agent_email')->addValidator($emailValidator);\n\n // Add agents directly authorised by FCA\n $this->addElement('span', 'agent_dir_by_fca', array(\n 'label' => 'Directly Authorised by the Financial Conduct Authority',\n 'filters' => array('StringTrim'),\n 'class' => 'formvalue'\n ));\n\n $this->addElement('span', 'agent_ar_by_barbon', array(\n 'label' => 'Appointed Representative for Barbon Insurance Group Ltd',\n 'filters' => array('StringTrim'),\n 'class' => 'formvalue'\n ));\n\n // Landlord1\n $subHeaderHtml = '<span style=\"font-size:smaller;\">Please provide title, first name and surname</span>';\n $this->addElement('text', 'landlord1_name', array(\n 'label' => \"Full name<br>$subHeaderHtml\",\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'maxlength' => '80',\n 'validators' => array(\n array ('NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please landlords name'\n )\n ))\n )\n ));\n\n // landlor company Name\n $this->addElement('text', 'landlord_company_name', array(\n 'label' => 'Company name',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '100',\n ));\n\n // Add Landlord postcode\n $subHeaderHtml = '<span style=\"font-size:smaller;\">Landlords residential address (This cannot be a C/O address due to the requirements for Legal Proceedings)</span>';\n $this->addElement('text', 'landlord_postcode', array(\n 'label' => \"Landlord Home Address Postcode<br>$subHeaderHtml\",\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'maxlength' => '10',\n 'validators' => array(\n array(\n 'NotEmpty',\n true,\n array(\n 'messages' => array(\n 'isEmpty' => 'Please enter Landlord\\'s postcode',\n 'notEmptyInvalid' => 'Please enter Landlord\\'s postcode'\n )\n )\n ), array(\n 'regex',\n true,\n array(\n 'pattern' => '/^[0-9a-z]{2,}\\ ?[0-9a-z]{2,}$/i',\n 'messages' => 'Postcode must be in postcode format'\n )\n )\n ),\n ));\n\n Application_Core_FormUtils::createManualAddressInput(\n $this,\n 'landlord_housename',\n 'landlord_street',\n 'landlord_town',\n 'landlord_city',\n false\n );\n\n $this->addElement('select', 'landlord_address', array(\n 'required' => false,\n 'label' => '',\n 'filters' => array('StringTrim'),\n 'class' => 'postcode_address',\n 'multiOptions' => array('' => 'Please select'),\n 'validators' => array(\n array (\n 'NotEmpty',\n true,\n array(\n 'messages' => array(\n 'isEmpty' => 'Please select landlord address',\n 'notEmptyInvalid' => 'Please select landlord address'\n )\n )\n )\n )\n ));\n\n // Remove 'nnn not found in haystack' error\n $this->getElement('landlord_address')->setRegisterInArrayValidator(false);\n\n // Add hidden element for postcode\n $this->addElement('hidden', 'landlord_address_id', array(\n 'value' => 1, 'class' => 'noborder'\n ));\n\n\n // Add agent phone number element\n $this->addElement('text', 'landlord_telephone', array(\n 'label' => 'Telephone number',\n 'required' => false,\n 'class' => 'input-pos-float',\n 'validators' => array(\n array('NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter landlord phone number'\n )\n )),\n array('regex', true, array(\n 'pattern' => $this->PHONE_RGX,\n 'messages' => 'Not a valid phone number'\n ))\n )\n ));\n\n // Add Landlord e-mail element\n $this->addElement('text', 'landlord_email', array(\n 'label' => 'Email address',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '100',\n 'validators' => array(\n array ('NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter landlord email address'\n )\n ))\n )\n ));\n\n $emailValidator = new Zend_Validate_EmailAddress();\n $emailValidator->setMessages(\n array(\n Zend_Validate_EmailAddress::INVALID_HOSTNAME => \"Domain name invalid in email address\",\n Zend_Validate_EmailAddress::INVALID_FORMAT => \"Invalid email address\"\n )\n );\n\n $this->getElement('landlord_email')->addValidator($emailValidator);\n\n // Set decorators\n $this->clearDecorators();\n $this->setDecorators(array ('Form'));\n $this->setElementDecorators(array ('ViewHelper', 'Label', 'Errors'));\n\n // Add the next button\n $this->addElement('submit', 'next', array(\n 'ignore' => true,\n 'label' => 'Continue to Step 2',\n 'onclick' => 'window.location=\"step2\"'\n ));\n\n // Add the save and exit button\n $this->addElement('button', 'save', array(\n 'ignore' => true, 'label' => 'Save & Exit'\n ));\n\n // Landlord Address decorators\n $landlordAddressLookUp = $this->getElement('landlords_address_lookup');\n $landlordAddressLookUp->clearDecorators();\n $landlordAddressLookUp->setDecorators(array ('ViewHelper'));\n\n // Nav decorators\n $next = $this->getElement('next');\n $next->clearDecorators();\n $next->setDecorators(array ('ViewHelper'));\n\n $save_and_exit = $this->getElement('save');\n $save_and_exit->clearDecorators();\n $save_and_exit->setDecorators(array ('ViewHelper'));\n\n $this->setDecorators(\n array(\n array(\n 'ViewScript',\n array(\n 'viewScript' => 'rentguaranteeclaims/subforms/you-and-landlords.phtml'\n )\n )\n )\n );\n\n //Allow HTML to be inserted into the labels.\n $this->getElement('landlord1_name')->getDecorator('Label')->setOption('escape', false);\n $this->getElement('landlord_postcode')->getDecorator('Label')->setOption('escape', false);\n }", "public function init(){\n\t\t//Additional information.\n\t\t$this->addElement('textarea', 'additional_information', array(\n\t\t\t\t'label' => 'Additional information',\n\t\t\t\t'required' => false,\n\t\t\t\t'filters' => array('StringTrim'),\n\t\t\t\t'validators' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'NotEmpty', true, array(\n\t\t\t\t\t\t\t\t\t\t'messages' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t'isEmpty' => 'Please enter additional information',\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t));\n\n\t\t// Add declaration statement agree element\n\t\t$this->addElement('checkbox', 'confirmation_statement', array(\n\t\t\t\t'label' => '',\n\t\t\t\t'required' => true,\n\t\t\t\t'checkedValue' => '1',\n\t\t\t\t'uncheckedValue' => null, // Must be used to override default of '0' and force an error when left unchecked\n\t\t\t\t'validators' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'NotEmpty', true, array(\n\t\t\t\t\t\t\t\t\t\t'messages' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t'isEmpty' => 'You must agree to confirmation statement to continue'\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t));\n\n\t\t// Set custom subform decorator\n\t\t$this->setDecorators(array(\n\t\t\t\tarray('ViewScript', array('viewScript' => 'insurance/subforms/quote-my-additionaldetail.phtml'))\n\t\t));\n\n\t\t// Strip all tags to prevent XSS errors\n\t\t$this->setElementFilters(array('StripTags'));\n\n\n\t\t$this->setElementDecorators(array(\n\t\t\t\tarray('ViewHelper', array('escape' => false)),\n\t\t\t\tarray('Label', array('escape' => false))\n\t\t));\n\t}", "public function __construct()\n {\n \n $this->field_list = [\n 'usr_id'=>'Validate::id',\n 'usr_email'=>'Validate::email',\n 'usr_password'=>'Validate::checkstring',\n 'usr_date_connexion'=>'Validate::alwaysTrue',\n 'usr_role'=>'Validate::role'\n ]; \n \n parent::__construct();\n }", "public function init()\n {\n parent::init();\n // Pripojime JS soubor s pluginem\n Web::instance()->addCustomJSFile(View::factory('js/jquery.AppFormItemRelSelect.js'));\n // A jeho inicializaci\n $init_js = View::factory('js/jquery.AppFormItemRelSelect-init.js');\n $config['attr'] = $this->attr;\n //pozadovane preview relacnich zaznamu\n $config['preview'] = arr::get($this->config, 'preview', '');\n //max pocet vysledku, ktery se ma nacitat do autocompletu\n //(fallback hodnota je 15)\n $config['_ps'] = arr::get($this->config, 'page_size', 10);\n\n //pokud ma prvek umoznit vytvoreni noveho relacniho zaznamu, tak\n //jQuery pluginu predam URL pro nacteni editacniho formulare\n if (arr::get($this->config, 'new', ''))\n {\n $config['add_new_url'] = appurl::object_new_ajax($this->config['relobject'], arr::getifset($this->config, 'relformconfig', NULL), arr::get($this->config, 'new_defaults'), arr::get($this->config, 'overwrite'));\n //pridam konfiguraci dialogu\n $config['dialog'] = arr::getifset($this->config, 'dialog', array());\n }\n\n //url pro cteni dat - v parametrech se bude predavat i filtr, ktery je\n //nastaveny v konfiguraci prvku\n $config['data_url'] = appurl::object_cb_data($this->config['relobject'], $this->getConfigValue('filter', array()));\n\n //filter_by_parent definuje nazev atributu/prvku podle jehoz hodnoty se filtruje\n //na tomto prvku. Vetsinou se jedna o vazby typu firma - pobocky, nebo pobocka - pracovnici\n //apod. Zajistuje ze se filtruje podle nadrazeneho prvku a zarovne pri\n //vyberu na tomto prvku se automaticky doplni rodicovsky\n if (($filter_parent = arr::get($this->config, 'filter_parent')) != FALSE)\n {\n //bude se filtrovat podle tohoto nebo techto atributu - prvek musi na formulari\n //tento atribut najit a vzit si aktualni hodnotu - ocekava ze to\n //bude relselect\n $config['filter_parent_attr'] = (array)$filter_parent;\n }\n\n //filter_by_child zajistuje ze pri vyberu hodnoty tohoto prvku dojde\n //k vymazani hodnoty child prvku.\n if (($filter_child = arr::get($this->config, 'filter_child')) != FALSE)\n {\n $config['filter_child_attr'] = (array)$filter_child;\n }\n\n // dynamic filtering by values in the form\n if (($dynamic_filter = arr::get($this->config, 'dynamic_filter')) != FALSE)\n {\n $config['dynamic_filter'] = (array)$dynamic_filter;\n }\n\n $init_js->config = $config;\n //prida do sablony identifikator tohoto prvku a zajisti vlozeni do stranky\n parent::addInitJS($init_js);\n }", "public function init()\n {\n // Add declaration statement agree element\n $this->addElement('checkbox', 'declaration_statement', array(\n 'required' => true,\n 'checkedValue' => '1',\n 'uncheckedValue' => null, // Must be used to override default of '0' and force an error when left unchecked\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'You must agree to the declaration statement to continue'\n )\n )\n )\n )\n ));\n\n // Set custom subform decorator\n $this->setDecorators(array(\n array('ViewScript', array('viewScript' => 'portfolio-insurance-quote/subforms/disclosure-and-declaration.phtml'))\n ));\n \n // Strip all tags to prevent XSS errors\n $this->setElementFilters(array('StripTags'));\n \n \n $this->setElementDecorators(array(\n array('ViewHelper', array('escape' => false)),\n array('Label', array('escape' => false))\n ));\n }", "public function __construct()\n {\n parent::__construct('ServicioForm');\n $this->setAttribute('method', 'post');\n \n $this->add(array(\n 'name' => 'servicio_nombre',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Nombre',\n ),\n ));\n $this->add(array(\n 'name' => 'servicio_descripcion',\n 'type' => 'textarea',\n 'options' => array(\n 'label' => 'Descripcion',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_costo',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Costo',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_precio',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Precio',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_iva',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'IVA',\n ),\n ));\n \n\n\n }", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n // Course Info \r\n $elemT1 = new FEText( \"courseName\", true, 10);\r\n $elemT1->set_style_attribute('align', 'left');\r\n $elemT1->set_attribute(\"id\",\"coursename\");\r\n $elemT1->set_attribute(\"accesskey\",\"n\"); \r\n $this->add_element($elemT1);\r\n\r\n $elemP1 = new FETextArea(\"coursedataDescripcion\", true, 10, 50, null, 300);\r\n $elemP1->set_style_attribute('align', 'left');\r\n $elemP1->set_attribute(\"id\",\"coursedatadescripcion\"); \r\n $elemP1->set_attribute(\"accesskey\",\"d\"); \r\n $this->add_element($elemP1);\r\n\r\n include(Util::app_Path(\"andromeda/include/classes/nls.inc.php\"));\r\n $language = $this->_formatElem(\"FEListBox\", \"courseLanguage\", \"courseLanguage\", FALSE, \"100px\", NULL, $nls['languages_form']);\r\n $language->set_style_attribute('align', 'left');\r\n $language->set_attribute(\"id\",\"courselanguage\");\r\n $language->set_attribute(\"accesskey\",\"l\"); \r\n $this->add_element($language);\r\n \r\n $elemT2 = new FEText( \"coursedataVersion\", FALSE, 10);\r\n $elemT2->set_style_attribute('align', 'left');\r\n $elemT2->set_attribute(\"id\",\"coursedataversion\");\r\n $elemT2->set_attribute(\"accesskey\",\"v\"); \r\n $this->add_element($elemT2);\r\n \r\n $elemP2 = new FETextArea(\"coursedataPalabrasClaves\", false, 10, 50, null, 300);\r\n $elemP2->set_style_attribute('align', 'left');\r\n $elemP2->set_attribute(\"id\",\"coursedatapalabrasclaves\");\r\n $elemP2->set_attribute(\"accesskey\",\"w\"); \r\n $this->add_element($elemP2);\r\n\r\n $elemT3 = new FEText( \"coursedataDestinatarios\", FALSE, 10);\r\n $elemT3->set_style_attribute('align', 'left');\r\n $elemT3->set_attribute(\"id\",\"coursedatadestinatarios\");\r\n $elemT3->set_attribute(\"accesskey\",\"u\"); \r\n $this->add_element($elemT3);\r\n \r\n $elemP3 = new FETextArea(\"coursedataConocimientosPrevios\", false, 10, 50, null, 300);\r\n $elemP3->set_style_attribute('align', 'left');\r\n $elemP3->set_attribute(\"id\",\"coursedataconocimientosprevios\");\r\n $elemP3->set_attribute(\"accesskey\",\"k\"); \r\n $this->add_element($elemP3);\r\n\r\n $elemT4 = new FEText( \"coursedataMetodologia\", FALSE, 10);\r\n $elemT4->set_style_attribute('align', 'left');\r\n $elemT4->set_attribute(\"id\",\"coursedatametodologia\");\r\n $elemT4->set_attribute(\"accesskey\",\"m\"); \r\n $this->add_element($elemT4);\r\n\r\n $elemCB1 = new FECheckBox('courseActive', agt('Poner el curso activo.') );\r\n $elemCB1->set_style_attribute('align', 'left');\r\n $elemCB1->set_attribute(\"id\",\"courseactive\"); \r\n $elemCB1->set_attribute(\"accesskey\",\"o\"); \r\n $this->add_element( $elemCB1 );\r\n\r\n $elemCB2 = new FECheckBox('courseAccess', agt('Poner el curso accesible.') ); \r\n $elemCB2->set_style_attribute('align', 'left');\r\n $elemCB2->set_attribute(\"id\",\"courseaccess\");\r\n $elemCB2->set_attribute(\"accesskey\",\"p\"); \r\n $this->add_element( $elemCB2 ); \r\n\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"Insertar Curso\"));\r\n $submit->set_attribute(\"id\",\"submit\"); \r\n $submit->set_attribute(\"accesskey\",\"e\"); \r\n $this->add_element($submit);\r\n }", "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->helper(array('form','url')); //load form helper on demand.\n\t\t$this->load->library(array('form_validation','session')); //loading form validation library\n\t}", "public function __construct(){\n\t\tparent:: __construct();\n\t\t$this->load->helper('form');\n\t}", "public function init()\n\t{\n\t\t$this->setAction($this->getView()->baseUrl('admin/subject/add'));\n\t\t\n\t\tparent::init();\n\t\t\n\t\t// Name\n\t\t$this->getElement('subject_name')->addValidator('Db_NoRecordExists', false, array('core_subject', 'subject_name'));\n\t\t\n\t\t// Code\n\t\t$this->getElement('subject_code')->addValidator('Db_NoRecordExists', false, array('core_subject', 'subject_code'));\n\t}", "public function initialize()\n {\n $username = new Text('username',\n array(\n 'id' => 'username',\n 'class' => 'form-control'\n )\n );\n\n $username->setLabel('Nombre de Usuario');\n\n $username->addValidators(\n array(\n new PresenceOf(\n array(\n 'message' => 'El campo Nombre de Usuario es requerido'\n )\n ),\n new StringLength(\n array(\n 'max' => '50',\n 'min' => '2',\n 'messageMinimum' => 'El campo Nombre de Usuario no puede tener menos de 2 caracteres',\n 'messageMaximum' => 'El campo Nombre de Usuario no puede tener mas de 50 caracteres'\n )\n )\n )\n );\n\n $this->add($username);\n\n // Campo Email y validaciones (Se llama aqui la libreria porque ya existe una libreria llamada Email, que es un validaor)\n $email = new Phalcon\\Forms\\Element\\Email('email',\n array(\n 'id' => 'email',\n 'class' => 'form-control'\n )\n );\n\n $email->setLabel('Correo');\n\n $email->addValidators(\n array(\n new PresenceOf(\n array(\n 'message' => 'El campo Correo es requerido'\n )\n ),\n new Email(\n array(\n 'message' => 'El campo Correo no tiene un formato valido'\n )\n )\n )\n );\n\n $this->add($email);\n\n // Agregar el campo role\n $role = new Select('role',\n array(\n 'registered' => 'Registrado',\n 'admin' => 'Administrador'\n ),\n array(\n 'id' => 'role',\n 'class' => 'form-control'\n )\n );\n\n $role->setLabel('Role');\n\n $this->add($role);\n\n // campo status y su validacion\n $status = new Check ('status',\n array(\n 'id' => 'status',\n 'value' => 1\n )\n );\n $status->setLabel('Activo');\n $this->add($status);\n\n // Agregar submit\n $this->add(new Submit('submit', array(\n 'class' => 'btn btn-primary btn-sm btn-block',\n 'value' => 'Enviar'\n )));\n\n\n // Para evitar ataque csrf\n $csrf = new Hidden('csrf');\n\n $csrf->addValidator( new Identical(array(\n 'value' => $this->security->getSessionToken(),\n 'message' => 'Problemas con el formulario'\n )\n )\n );\n\n $this->add($csrf);\n\n $this->add(new Hidden('typeForm', array('value'=>'user')));\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->load->database();\n $this->load->helper(array('form','captcha','general'));\n $this->load->library('form_complete');\n $this->load->library('form_validation');\n $this->load->library('Ventana_modal');\n $this->load->model('Encuestas_model', 'enc_mod');\n\n\n }", "public function __construct()\n {\n parent::__construct();\n\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle(\"Consulta de relatórios\");\n\n $criteria_relatorio_id = new TCriteria();\n\n\tTTransaction::open('permission');\n $conn = TTransaction::get();\n $result = $conn->query('SELECT * FROM system_user_group WHERE system_user_id = '.TSession::getValue(\"userid\").' and system_group_id = (SELECT ID FROM system_group WHERE name = \\'Managers\\')');\n $objects = $result->fetchAll(PDO::FETCH_CLASS, \"stdClass\");\n if (count($objects) > 0) {\n $filterVar = null;\n $result = $conn->query('SELECT * FROM system_users WHERE system_unit_id = (SELECT system_unit_id FROM system_users WHERE id = '.TSession::getValue(\"userid\").')');\n $system_users = $result->fetchAll(PDO::FETCH_CLASS, \"stdClass\");\n foreach ($system_users as $user) {\n if ($filterVar != null) {\n $filterVar = $filterVar.',';\n }\n $filterVar = $filterVar.$user->id;\n }\n $criteria_relatorio_id->add(new TFilter('id', 'in', \"(SELECT id FROM relatorio WHERE user_id in ($filterVar))\"));\n } else {\n $filterVar = TSession::getValue(\"userid\");\n $criteria_relatorio_id->add(new TFilter('user_id', '=', $filterVar));\n }\n TTransaction::close();\n\n $relatorio_id = new TDBCheckGroup('relatorio_id', 'bedevops', 'Relatorio', 'id', '{titulo}','id asc' , $criteria_relatorio_id );\n $categoria_id = new TDBCombo('categoria_id', 'bedevops', 'Categoria', 'id', '{categoria}','categoria asc' );\n\n $relatorio_id->setBreakItems(2);\n $relatorio_id->setLayout('horizontal');\n\n $relatorio_id->setSize(600);\n $categoria_id->setSize('20%');\n\n $row1 = $this->form->addFields([new TLabel(\"Título:\", null, '14px', null)],[$relatorio_id]);\n $row2 = $this->form->addFields([new TLabel(\"Categoria:\", null, '14px', null)],[$categoria_id]);\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_ongenerate = $this->form->addAction(\"Filtrar\", new TAction([$this, 'onGenerate']), 'fas:search #ffffff');\n $btn_ongenerate->addStyleClass('btn-primary'); \n\n $btn_onaction = $this->form->addAction(\"Cadastrar\", new TAction([$this, 'onAction']), 'fas:hammer #ffffff');\n $btn_onaction->addStyleClass('btn-success'); \n\n $btn_onexport = $this->form->addHeaderAction(\"Exportar\", new TAction([$this, 'onExport']), 'fas:file-pdf #ffffff');\n $btn_onexport->addStyleClass('btn-danger'); \n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n $container->add(TBreadCrumb::create([\"Relatórios\",\"Consulta de Relatórios\"]));\n $container->add($this->form);\n\n TButton::disableField(self::$formName, 'btn_onexport');\n\n parent::add($container);\n\n }", "public function __construct() {\r\n $this->ctrlAccueil = new ControleurAccueil();\r\n $this->ctrlBillet = new ControleurBillet();\r\n $this->ctrlConnexion = new ControleurConnexion();\r\n $this->ctrlAdmin = new ControleurAdmin();\r\n }", "public function init()\n {\n $this->setMethod('post');\n\n // Add an email element\n $this->addElement('text', 'nom', array(\n 'label' => \"Nom de l'endroit:\",\n 'required' => true,\n 'filters' => array('StringTrim')\n ));\n\n // Add an email element\n $this->addElement('select', 'active', array(\n 'label' => \"État\",\n\t 'multiOptions' => array(0 => 'Proposition', 1 => 'ZAP en service')\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hidden', 'latitude', array(\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hidden', 'longitude', array(\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hidden', 'id', array(\n ));\n \n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Modifier',\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hash', 'csrf', array(\n 'ignore' => true,\n ));\n }", "public function __construct()\n {\n parent::__construct();\n\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle('Avaliações');\n\n $inscricao_evento_id = new TDBUniqueSearch('inscricao_evento_id', 'eventtus', 'Evento', 'id', 'id','nome asc' );\n\n $inscricao_evento_id->setSize('100%');\n $inscricao_evento_id->setMinLength(0);\n $inscricao_evento_id->setMask('{nome}');\n\n $row1 = $this->form->addFields([new TLabel('Evento', null, '14px', null),$inscricao_evento_id]);\n $row1->layout = ['col-sm-6'];\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_ongenerate = $this->form->addAction('Gerar', new TAction([$this, 'onGenerate']), 'fa:search #ffffff');\n $btn_ongenerate->addStyleClass('btn-primary'); \n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n $container->add(TBreadCrumb::create(['Cadastros','Avaliações']));\n $container->add($this->form);\n\n parent::add($container);\n\n }", "public function init()\n {\n $this->setMethod('post');\n \n // Add an email element\n $this->addElement('text', 'email', array(\n 'label' => 'Email',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'validator'=>'NotEmpty',\n 'options'=>array(\n 'messages'=>'Email is required'\n ),\n 'breakChainOnFailure'=>true\n ),\n array(\n 'validator'=>'EmailAddress',\n 'options'=>array(\n 'messages'=>'Email is invalid'\n ),\n 'breakChainOnFailure'=>true\n ),\n )\n ));\n // Add password element\n $this->addElement('password', 'password', array(\n 'label' => 'Password',\n 'required' => true,\n 'validators' => array(\n array(\n 'validator'=>'NotEmpty',\n 'options'=>array(\n 'messages'=>'Password is required'\n ),\n 'breakChainOnFailure'=>true\n ),\n )\n )); \n \n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Submit',\n ));\n \n \n// // And finally add some CSRF protection\n// $this->addElement('hash', 'csrf', array(\n// 'ignore' => true,\n// ));\n }", "public function init(){\n $this->setMethod('post');\n $this->setAttrib('enctype', Zend_Form::ENCTYPE_MULTIPART);\n //'multipart/form-data'\n $this->addPrefixPath('PAP_Form_Element_', 'PAP/Form/Element/', 'Element');\n $this->addDecorators(array('FormElements', 'Form'));\n \n $decorators = array(\n array('ViewHelper'),\n array('Label', array(\n 'class' => 'leftalign ui-button-text'\n )),\n );\n \n //$allowWhiteSpace = new Zend_Validate_Alnum(array('allowWhiteSpace' => true));\n $decoratorsButton = array(\n array('ViewHelper'),\n array('HtmlTag', array('tag' => 'div')),\n );\n \n $control = new Zend_Form_Element_Radio('reportType');\n $control->setLabel('Tipo de Reporte')\n ->setMultiOptions(array(\n 'actual' => 'Período Actual',\n 'pendientes' => 'Cargos Pendientes',\n 'ultimos' => 'Últimos períodos'\n ))\n ->setOptions(array('id' => 'reportType'))\n ->setSeparator('')\n ->setAttrib('label_class', 'leftalign ui-button-text')\n ->setDecorators($decorators);\n $this->addElement($control);\n \n $this->addElement('submit', 'search', array(\n 'ignore' => true,\n 'label' => 'Buscar',\n ));\n $this->search->setAttrib('class', 'buttons')\n ->setDecorators($decoratorsButton);\n \n $this->addElement('button', 'pay', array(\n 'ignore' => true,\n 'label' => 'Informar Pago',\n ));\n $this->pay->setAttrib('class', 'buttons')\n ->setAttrib('onClick', 'showPaymentInfo()')\n ->setDecorators($decoratorsButton);\n \n $this->addElement('button', 'payMP', array(\n 'ignore' => true,\n 'label' => 'Pagar con Mercado Pago',\n ));\n $this->payMP->setAttrib('class', 'buttons')\n ->setAttrib('onClick', 'showMercadoPago()')\n ->setDecorators($decoratorsButton);\n \n $this->addElement('hidden', 'data');\n }", "protected function _construct()\n {\n $this->_init('commercers_profilers_rule', 'rule_id');\n }", "public function init()\n {\n $this->setName('autores');\n\n //campo hidden para guardar id de album\n $id = new Zend_Form_Element_Hidden('id');\n $id->addFilter('Int');\n\n //creamos <input text> para escribir nombre album\n $nombre = new Zend_Form_Element_Text('nombre');\n $nombre->setLabel('Nombre del autor:')->setRequired(true)->\n addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\n //creamos select para seleccionar artista\n /*$artista = new Zend_Form_Element_Select('artista_id');\n $artista->setLabel('Seleccione artista:')->setRequired(true);\n //cargo en un select los tipos de usuario\n $table = new Application_Model_DbTable_Artista();\n //obtengo listado de todos los artistas y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $artista->addMultiOption($c->id, $c->nombre);\n }*/\n\n //descripcion album\n $descripcion = new Zend_Form_Element_Text('descripcion');\n $descripcion->setLabel('Descripcion:')->setRequired(false)->addFilter('StripTags')->addFilter('StringTrim');\n //Email\n $email = new Zend_Form_Element_Text('email');\n $email->setLabel('E-mail:')->setRequired(true)->addFilter('StripTags')->\n addFilter('StringTrim')->addValidator('NotEmpty');\n //fecha lanzamiento\n $fecha = new Zend_Form_Element_Text('fecha');\n $fecha->setLabel('Fecha lanzamiento:')->setRequired(true)->addFilter('StripTags')->\n addFilter('StringTrim')->addValidator('NotEmpty');\n //creo un validador de formato de fecha\n $valiDate = new Zend_Validate_Date();\n $valiDate->setFormat('dd-mm-YYYY');\n $fecha->addValidator($valiDate);\n $fecha->setValue(date(\"d-m-Y\"));\n\n //boton para enviar formulario\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setAttrib('id', 'submitbutton');\n\n //agregolos objetos creados al formulario\n $this->addElements(array($id, $nombre,\n $descripcion, $email, $fecha, $submit));\n }", "public final function definition() {\n $mform = $this->_form;\n $customdata = $this->_customdata;\n $editmode = $customdata['editmode'];\n\t\n $mform->addElement('header', 'typeheading', get_string('editingacoupon', 'enrol_coupon', get_string($this->typestring, 'enrol_coupon')));\n\n $mform->addElement('hidden', 'id');\n $mform->setType('id', PARAM_INT);\n\n $mform->addElement('hidden', 'couponid');\n $mform->setType('couponid', PARAM_INT);\n\n\t\t$mform->addElement('hidden', 'type');\n\t\t$mform->setType('type', PARAM_INT);\n\t\t\n\t\t$mform->addElement('hidden', 'couponaction');\n\t\t$mform->setType('couponaction', PARAM_INT);\n\t\t\n\t\t$mform->addElement('hidden', 'couponvalue');\n\t\t$mform->setType('couponvalue', PARAM_INT);\n\n\t\t$mform->addElement('text', 'name', get_string('couponname', 'enrol_coupon'), array('size'=>70));\n\t\t$mform->setType('name', PARAM_TEXT);\n\t\t$mform->addRule('name', get_string('required'), 'required', null, 'client');\n\t\t\n\t\t$mform->addElement('textarea', 'description', get_string('description'), 'wrap=\"virtual\" rows=\"4\" cols=\"50\"');\n\t\t$mform->setType('description', PARAM_TEXT);\n\t\t\n\t\t\t\n $this->custom_definition();\n \n\n\t\t\n\t\t$mform->addElement('text', 'maxuses', get_string('maxuses', 'enrol_coupon'));\n\t\t$mform->setType('maxuses', PARAM_INT);\n\t\t$mform->setDefault('maxuses', 1);\n\t\t$mform->addRule('maxuses', get_string('required'), 'required', null, 'client');\n\t\t\n $options = array('optional'=>true);\n $mform->addElement('date_selector', 'fromdate',get_string('fromdate','enrol_coupon'), $options);\n $mform->addElement('date_selector', 'todate',get_string('todate','enrol_coupon'), $options);\n\n\t\t$mform->addElement('text', 'duration', get_string('duration', 'enrol_coupon'));\n\t\t$mform->setType('duration', PARAM_INT);\n\t\t$mform->setDefault('duration', 0);\n\t\t$mform->addRule('duration', get_string('required'), 'required', null, 'client');\n\n\n\t\t//add the action buttons\n $this->add_action_buttons(get_string('cancel'), get_string('savecoupon', 'enrol_coupon'));\n\n }", "public function __construct() {\n $this->adminProveedorModelo = new adminProveedorModelo();\n }", "public function __construct(){\n\t\tparent::__construct();\n\t\tinit_painel();\n\t\t$this->load->model('Comentarios_model', 'Comentarios');\n\t}", "public function init()\n {\n $this->setMethod('post');\n\n // Add Hosuing Acts\n $this->addElement('select', 'housing_act_adherence', array(\n 'label' => 'Is the property let in accordance with the Housing Acts of 1988, 1996, 2004 ' .\n 'and any subsequent or superseding legislation, AND, has the Landlord complied ' .\n ' with the requirements of the Tenancy Deposit Scheme (TDS)?',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'multiOptions' => array(\n '' => 'Please select',\n '1' => 'Yes',\n '0' => 'No'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please select housing act adherence',\n 'notEmptyInvalid' => 'Please select housing act adherence'\n )\n )\n )\n )\n ));\n\n // Add tenant start date\n $this->addElement('text', 'tenancy_start_date', array(\n 'label' => 'Tenancy start date (DD/MM/YYYY)',\n 'required' => true,\n 'validators' => array(\n array(\n 'NotEmpty',true,array(\n 'messages' => array(\n 'isEmpty' => 'Please select tenancy start date',\n 'notEmptyInvalid' => 'Please select tenancy start date'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/(?P<d>\\d{2})(?P<sep>\\D)(?P<m>\\d{2})\\2(?P<y>\\d{4})/',\n 'messages' => 'Tenancy start date must be in dd/mm/yyyy format'\n )\n )\n )\n ));\n\n // Add tenant start date\n $this->addElement('text', 'tenancy_end_date', array(\n 'label' => 'Tenancy end date (DD/MM/YYYY)',\n 'required' => false,\n 'validators' => array(\n array(\n 'NotEmpty',true,array(\n 'messages' => array(\n 'isEmpty' => 'Please select tenancy end date',\n 'notEmptyInvalid' => 'Please select end date'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/(?P<d>\\d{2})(?P<sep>\\D)(?P<m>\\d{2})\\2(?P<y>\\d{4})/',\n 'messages' => 'Tenancy end date must be in dd/mm/yyyy format'\n )\n )\n )\n ));\n\n // Add original cover start date\n $this->addElement('text', 'original_cover_start_date', array(\n 'label' => 'Policy start date (DD/MM/YYYY)',\n 'required' => true,\n 'validators' => array(\n array(\n 'NotEmpty',true,array(\n 'messages' => array(\n 'isEmpty' => 'Please select original cover start date',\n 'notEmptyInvalid' => 'Please select original cover start date'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/(?P<d>\\d{2})(?P<sep>\\D)(?P<m>\\d{2})\\2(?P<y>\\d{4})/',\n 'messages' => 'Original cover start date must be in dd/mm/yyyy format'\n )\n )\n )\n ));\n\n // Add rental property postcode\n $this->addElement('text', 'tenancy_postcode', array(\n 'label' => 'Rental property address postcode',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'maxlength' => '10',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter rental property address postcode',\n 'notEmptyInvalid' => 'Please enter rental property address postcode'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/^[0-9a-z]{2,}\\ ?[0-9a-z]{2,}$/i',\n 'messages' => 'Rental property postcode must be in postcode format'\n )\n )\n )\n ));\n\n // Add the find address button\n $this->addElement('submit', 'tenancy_address_lookup', array(\n 'ignore' => true,\n 'label' => 'Find Address',\n 'class' => 'button',\n 'onclick' => 'getPropertiesByPostcode($(\\'#tenancy_postcode\\').val(), \\'tenancy_postcode\\', \\'tenancy_address\\',\\'no_property_address_selector\\'); return false;'\n ));\n\n // Add agent address select element\n $this->addElement('select', 'tenancy_address', array(\n 'class' =>'postcode_address',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'multiOptions' => array(\n '' => 'Please select'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please select property address',\n 'notEmptyInvalid' => 'Please select property address'\n )\n )\n )\n )\n ));\n\n // Remove 'nnn not found in haystack' error\n $this->getElement('tenancy_address')->setRegisterInArrayValidator(false);\n\n // Add hidden element for postcode\n $this->addElement('hidden', 'tenancy_address_id', array(\n 'label' => '',\n 'value' => 1,\n 'class' => 'noborder'\n ));\n\n // Add in additional validation fields using utility class\n Application_Core_FormUtils::createManualAddressInput(\n $this,\n 'tenancy_housename',\n 'tenancy_street',\n 'tenancy_town',\n 'tenancy_city',\n false,\n 'tenant\\'s'\n );\n\n // Add monthly rental\n $this->addElement('text', 'monthly_rent', array(\n 'label' => 'Monthly rent on this property',\n 'required' => true,\n 'filters' => array('Digits'),\n 'class' => 'input-pos-float',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your monthly rent',\n 'notEmptyInvalid' => 'Please enter your monthly rent'\n )\n )\n )\n )\n ));\n\n // Add Deposit Held\n $this->addElement('text', 'deposit_amount', array(\n 'label' => 'Deposit held',\n 'required' => true,\n 'filters' => array('Digits'),\n 'class' => 'input-pos-float',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your deposit amount',\n 'notEmptyInvalid' => 'Please enter your deposit amount'\n )\n )\n )\n )\n ));\n\n // Add Rental Arrears\n $this->addElement('text', 'rent_arrears', array(\n 'label' => 'Total rent arrears',\n 'required' => false,\n 'filters' => array('Digits'),\n 'class' => 'input-pos-float',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your rent arrears',\n 'notEmptyInvalid' => 'Please enter rent arrears in number'\n )\n )\n )\n )\n ));\n\n // Add date of first arrear\n $this->addElement('text', 'first_arrear_date', array(\n 'label' => 'Date of first arrears (DD/MM/YYYY)',\n 'required' => false,\n 'validators' => array(\n array(\n 'NotEmpty',true,array(\n 'messages' => array(\n 'isEmpty' => 'Please select first arrear date',\n 'notEmptyInvalid' => 'Please select first arrear date'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/(?P<d>\\d{2})(?P<sep>\\D)(?P<m>\\d{2})\\2(?P<y>\\d{4})/',\n 'messages' => 'First arrears date must be in dd/mm/yyyy format'\n )\n )\n )\n ));\n\n // Add date deposit received\n $this->addElement('text', 'deposit_received_date', array(\n 'label' => 'Date when deposit received (DD/MM/YYYY)',\n 'required' => true,\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your deposit received date',\n 'notEmptyInvalid' => 'Please enter your rent arrears in number'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/(?P<d>\\d{2})(?P<sep>\\D)(?P<m>\\d{2})\\2(?P<y>\\d{4})/',\n 'messages' => 'Deposit received date must be in dd/mm/yyyy format'\n )\n )\n )\n ));\n\n $this->addElement('select', 'recent_complaints', array(\n 'label' => 'Have there been any recent complaints, for example regarding disrepair?',\n 'required' => true,\n 'multiOptions' => array(\n '' => 'Please Select',\n '1' => 'Yes',\n '0' => 'No'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Have there been any recent complaints, for example regarding disrepair?',\n 'notEmptyInvalid' => 'Have there been any recent complaints, for example regarding disrepair?'\n )\n ))\n )\n ));\n\n $this->addElement('textarea', 'recent_complaints_further_details', array(\n 'label' => '',\n 'required' => false,\n 'class' => 'additionalinfo fullwidth',\n 'rows' => '5',\n 'cols' => '77',\n 'maxlength' => '250',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please provide further details for recent complaints',\n 'notEmptyInvalid' => 'Please provide further details for recent complaints'\n )\n )\n )\n ),\n ));\n\n $this->addElement('text', 'policy_number', array(\n 'label' => 'Policy number',\n 'required' => 'true',\n 'maxlength' => '15',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter the policy number',\n 'notEmptyInvalid' => 'Please enter the policy number'\n )\n )\n )\n )\n ));\n\n $this->addElement('select', 'grounds_for_claim', array(\n 'label' => 'What are the grounds for this claim?',\n 'required' => true,\n 'multiOptions' => array(\n '' => 'Please Select',\n 'rent-arrears' => 'Rent arrears',\n 'other' => 'Other',\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter the grounds for the claim',\n 'notEmptyInvalid' => 'Please enter the grounds for the claim'\n )\n ))\n )\n ));\n\n $this->addElement('textarea', 'grounds_for_claim_further_details', array(\n 'label' => '',\n 'required' => false,\n 'class' => 'additionalinfo fullwidth',\n 'rows' => '5',\n 'cols' => '77',\n 'maxlength' => '250',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please provide further details for grounds for claim',\n 'notEmptyInvalid' => 'Please provide further details for grounds for claim'\n )\n )\n )\n ),\n ));\n\n // Add element for tenants vacated\n $this->addElement('select', 'tenant_vacated', array(\n 'required' => true,\n 'label' => 'Has the tenant(s) vacated?',\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Has the tenant(s) vacated?',\n 'notEmptyInvalid' => 'Has the tenant(s) vacated?'\n )\n )\n )\n ),\n 'multiOptions' => array(\n '' => 'Please select',\n '1' => 'Yes',\n '0' => 'No'\n )\n ));\n\n $this->addElement('text', 'arrears_at_vacant_possession', array(\n 'required' => false,\n 'label' => 'Please state the arrears at the date vacant possession was obtained to the nearest pound (£)',\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty',true,array(\n 'messages' => array(\n 'isEmpty' => 'Arrears at the date vacant possession was obtained',\n 'notEmptyInvalid' => 'Arrears at the date vacant possession was obtained'\n )\n )\n ),\n )\n ));\n\n // Add tenant vacated date\n $this->addElement('text', 'tenant_vacated_date', array(\n 'label' => 'Date tenants vacated (DD/MM/YYYY)',\n 'required' => false,\n 'validators' => array(\n array(\n 'NotEmpty',true,array(\n 'messages' => array(\n 'isEmpty' => 'Date tenants vacated',\n 'notEmptyInvalid' => 'Date tenants vacated'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/(?P<d>\\d{2})(?P<sep>\\D)(?P<m>\\d{2})\\2(?P<y>\\d{4})/',\n 'messages' => 'Tenant vacated date must be in dd/mm/yyyy format'\n )\n )\n )\n ));\n\n // Add rental property postcode\n $this->addElement('text', 'tenantsforwarding_postcode', array(\n 'label' => 'Tenant\\'s forwarding address postcode',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '10',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Tenant\\'s forwarding address postcode',\n 'notEmptyInvalid' => 'Tenant\\'s forwarding address postcode'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/^[0-9a-z]{2,}\\ ?[0-9a-z]{2,}$/i',\n 'messages' => 'Tenant\\'s forwarding postcode must be in postcode format'\n )\n )\n )\n ));\n\n // Add the find address button\n $this->addElement('submit', 'tenantsforwarding_address_lookup', array(\n 'ignore' => true,\n 'label' => 'Find Address',\n 'class' => 'button',\n 'onclick' => 'getPropertiesByPostcode($(\\'#tenantsforwarding_postcode\\').val(), \\'tenantsforwarding_postcode\\', \\'tenantsforwarding_address\\',\\'forwarding_property_address_selector\\'); return false;'\n ));\n\n // Add agent address select element\n $this->addElement('select', 'tenantsforwarding_address', array(\n 'class' =>'postcode_address',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'multiOptions' => array(\n '' => 'Please select'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please select forwarding address',\n 'notEmptyInvalid' => 'Please select forwarding address'\n )\n )\n )\n )\n ));\n\n // Remove 'nnn not found in haystack' error\n $this->getElement('tenantsforwarding_address')->setRegisterInArrayValidator(false);\n\n // Add hidden element for postcode\n $this->addElement('hidden', 'tenantsforwarding_address_id', array(\n 'label' => '',\n 'value' => 1,\n 'class' => 'noborder'\n ));\n\n // Add in additional validation fields using utility class\n Application_Core_FormUtils::createManualAddressInput(\n $this,\n 'tenantsforwarding_housename',\n 'tenantsforwarding_street',\n 'tenantsforwarding_town',\n 'tenantsforwarding_city',\n false,\n 'tenant\\'s'\n );\n\n $this->addElement('checkbox', 'tenant_occupation_confirmed_by_tel', array(\n 'label' => 'By telephone'\n ));\n\n // Add date deposit received\n $this->addElement('text', 'tenant_occupation_confirmed_by_tel_dateofcontact', array(\n 'label' => 'Date of contact (DD/MM/YYYY)',\n 'required' => false,\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your date of contact when tenant occupation of the property was confirmed by telephone',\n 'notEmptyInvalid' => 'Please enter your date of contact when tenant occupation of the property was confirmed by telephone'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/(?P<d>\\d{2})(?P<sep>\\D)(?P<m>\\d{2})\\2(?P<y>\\d{4})/',\n 'messages' => 'Date of contact must be in dd/mm/yyyy format'\n )\n )\n )\n ));\n\n $this->addElement('text', 'tenant_occupation_confirmed_by_tel_tenantname', array(\n 'label' => 'Name of tenant contacted',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '30',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter the tenant contacted when tenant occupation of the property was confirmed by telephone',\n 'notEmptyInvalid' => 'Please enter the tenant contacted when tenant occupation of the property was confirmed by telephone'\n )\n )\n )\n )\n ));\n\n\n $this->addElement('checkbox', 'tenant_occupation_confirmed_by_email', array(\n 'label' => \"By email<br><span style=\\\"font-size:smaller;\\\">Please provide a copy of the email</span>\"\n ));\n\n $this->addElement('text', 'tenant_occupation_confirmed_by_email_dateofcontact', array(\n 'label' => 'Date of contact (DD/MM/YYYY)',\n 'required' => false,\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your date of contact when tenant occupation of the property was confirmed by email',\n 'notEmptyInvalid' => 'Please enter your date of contact when tenant occupation of the property was confirmed by email'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/(?P<d>\\d{2})(?P<sep>\\D)(?P<m>\\d{2})\\2(?P<y>\\d{4})/',\n 'messages' => 'Date of contact must be in dd/mm/yyyy format'\n )\n )\n )\n ));\n\n $this->addElement('text', 'tenant_occupation_confirmed_by_email_tenantname', array(\n 'label' => 'Name of tenant contacted',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '30',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter the tenant contacted when tenant occupation of the property was confirmed by email',\n 'notEmptyInvalid' => 'Please enter the tenant contacted when tenant occupation of the property was confirmed by email'\n )\n )\n )\n )\n ));\n\n $this->addElement('checkbox', 'tenant_occupation_confirmed_by_visit', array(\n 'label' => 'In person'\n ));\n\n $this->addElement('text', 'tenant_occupation_confirmed_by_visit_dateofvisit', array(\n 'label' => 'Date of visit (DD/MM/YYYY)',\n 'required' => false,\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your date of visit when tenant occupation of the property was confirmed',\n 'notEmptyInvalid' => 'Please enter your date of visit when tenant occupation of the property was confirmed'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/(?P<d>\\d{2})(?P<sep>\\D)(?P<m>\\d{2})\\2(?P<y>\\d{4})/',\n 'messages' => 'Date of visit must be in dd/mm/yyyy format'\n )\n )\n )\n ));\n\n $this->addElement('text', 'tenant_occupation_confirmed_by_visit_individualattending', array(\n 'label' => 'Name of individual attending the visit',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '30',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter the name of the individual who attended the visit to confirm tenant occupation of the property',\n 'notEmptyInvalid' => 'Please enter the name of the individual who attended the visit to confirm tenant occupation of the property'\n )\n )\n )\n )\n ));\n\n $this->addElement('text', 'tenant_occupation_confirmed_by_visit_tenantname', array(\n 'label' => 'Name of tenant spoken to',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '30',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter the tenant spoken to when tenant occupation of the property was confirmed by a visit',\n 'notEmptyInvalid' => 'Please enter the tenant spoken to when tenant occupation of the property was confirmed by a visit'\n )\n )\n )\n )\n ));\n\n $this->addElement('select', 'section21_served', array(\n 'label' => 'Have you served a Section 21 notice seeking possession?',\n 'required' => true,\n 'multiOptions' => array(\n '' => 'Please Select',\n '1' => 'Yes',\n '0' => 'No'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Have you served a Section 21 notice seeking possession?',\n 'notEmptyInvalid' => 'Have you served a Section 21 notice seeking possession?'\n )\n )\n )\n )\n ));\n\n\n $this->addElement('text', 'section21_expiry', array(\n 'label' => 'Section 21 notice expiry date (DD/MM/YYYY)',\n 'required' => false,\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter the date the Section 21 notice expires',\n 'notEmptyInvalid' => 'Please enter the date the Section 21 notice expires'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/(?P<d>\\d{2})(?P<sep>\\D)(?P<m>\\d{2})\\2(?P<y>\\d{4})/',\n 'messages' => 'Section 21 notice expiry date must be in dd/mm/yyyy format'\n )\n )\n )\n ));\n\n $this->addElement('select', 'section21_moneydepositreceived', array(\n 'label' => 'Was a money deposit received on or after 6 April 2007?',\n 'multiOptions' => array(\n '' => 'Please Select',\n '1' => 'Yes',\n '0' => 'No'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Was a money deposit received on or after 6 April 2007?',\n 'notEmptyInvalid' => 'Was a money deposit received on or after 6 April 2007?'\n )\n )\n )\n )\n ));\n\n $this->addElement('select', 'section21_money_held_under_tds_deposit_scheme', array(\n 'label' => 'Was the deposit held under a TDS authorised under part 6 of the Housing Act 2004?',\n 'multiOptions' => array(\n '' => 'Please Select',\n '1' => 'Yes',\n '0' => 'No'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Was the deposit held under a TDS authorised under part 6 of the Housing Act 2004?',\n 'notEmptyInvalid' => 'Was the deposit held under a TDS authorised under part 6 of the Housing Act 2004?'\n )\n )\n )\n )\n ));\n\n $this->addElement('select', 'section21_tds_complied_with', array(\n 'label' => 'Had the initial requirements of the TDS been complied with in relation to the deposit?',\n 'multiOptions' => array(\n '' => 'Please Select',\n '1' => 'Yes',\n '0' => 'No'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Had the initial requirements of the TDS been complied with in relation to the deposit?',\n 'notEmptyInvalid' => 'Had the initial requirements of the TDS been complied with in relation to the deposit?'\n )\n )\n )\n )\n ));\n\n $this->addElement('select', 'section21_tds_prescribed_information_to_tenant', array(\n 'label' => 'Had you or the landlord given the tenant(s), and anyone who paid the deposit on behalf '\n . 'of the tenant(s), the prescribed information in relation to the deposit and the operation of the TDS?',\n 'multiOptions' => array(\n '' => 'Please Select',\n '1' => 'Yes',\n '0' => 'No'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Had you or the landlord given the tenant, and anyone who paid the deposit on behalf '\n . 'of the tenant, the prescribed information in relation to the deposit and the operation of the TDS?',\n 'notEmptyInvalid' => 'Had you or the landlord given the tenant, and anyone who paid the deposit on behalf '\n . 'of the tenant, the prescribed information in relation to the deposit and the operation of the TDS?'\n )\n )\n )\n )\n ));\n\n $this->addElement('select', 'section21_landlord_deposit_in_property_form', array(\n 'label' => 'Did the landlord receive a deposit in the form of property on or after 6 April 2007?',\n 'multiOptions' => array(\n '' => 'Please Select',\n '1' => 'Yes',\n '0' => 'No'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Did the landlord receive a deposit in the form of property on or after 6 April 2007?',\n 'notEmptyInvalid' => 'Did the landlord receive a deposit in the form of property on or after 6 April 2007?'\n )\n )\n )\n )\n ));\n\n $this->addElement('select', 'section21_returned_at_notice_serve_date', array(\n 'label' => 'At the date the Section 21 notice was served, had the property been returned to the person from whom it was received?',\n 'multiOptions' => array(\n '' => 'Please Select',\n '1' => 'Yes',\n '0' => 'No'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'At the date the Section 21 notice was served, had the property been returned to the person from whom it was received?',\n 'notEmptyInvalid' => 'At the date the Section 21 notice was served, had the property been returned to the person from whom it was received?'\n )\n )\n )\n )\n ));\n\n $this->addElement('select', 'section8_served', array(\n 'label' => 'Have you served a Section 8 notice requiring possession?',\n 'required' => true,\n 'multiOptions' => array(\n '' => 'Please Select',\n '1' => 'Yes',\n '0' => 'No'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Have you served a Section 8 notice requiring possession?',\n 'notEmptyInvalid' => 'Have you served a Section 8 notice requiring possession?'\n )\n )\n )\n )\n ));\n\n $this->addElement('text', 'section8_expiry', array(\n 'label' => 'Section 8 notice expiry date (DD/MM/YYYY)',\n 'required' => false,\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter the date the Section 8 notice expires',\n 'notEmptyInvalid' => 'Please enter the date the Section 8 notice expires'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/(?P<d>\\d{2})(?P<sep>\\D)(?P<m>\\d{2})\\2(?P<y>\\d{4})/',\n 'messages' => 'Section 8 notice expiry date must be in dd/mm/yyyy format'\n )\n )\n )\n ));\n\n $this->addElement('select', 'section8_demand_letter_sent', array(\n 'label' => 'Has a demand letter been sent to the tenant(s) requesting the outstanding arrears? ' .\n 'If yes, you will be required to provide copies.',\n 'required' => true,\n 'multiOptions' => array(\n '' => 'Please Select',\n '1' => 'Yes',\n '0' => 'No'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Has a demand letter been sent to the tenant(s) requesting the outstanding arrears?',\n 'notEmptyInvalid' => 'Has a demand letter been sent to the tenant(s) requesting the outstanding arrears?'\n )\n )\n )\n )\n ));\n\n $this->addElement('textarea', 'section8_over18_occupants', array(\n 'label' => '',\n 'class' => 'additionalinfo fullwidth',\n 'maxlength' => '250',\n ));\n\n // Hidden element for total guarantors to create dynamic guarantor elements\n $this->addElement('hidden', 'totalguarantors', array(\n 'label' => '',\n 'value' => '0',\n 'class' => 'noborder'\n ));\n\n // How many guarantors are there?\n $this->addElement('select', 'total_guarantors', array(\n 'label' => 'How many Guarantors are there?',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'multiOptions' => array(\n '' => 'Please Select',\n '0' => '0',\n '1' => '1',\n '2' => '2',\n '3' => '3',\n '4' => '4'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please specify the number of guarantors',\n 'notEmptyInvalid' => 'Please specify the number of guarantors'\n )\n )\n )\n )\n ));\n\n // Add guarantor name element\n $this->addElement('text', 'guarantor_name', array(\n 'label' => 'Full name',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '80',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter guarantor\\'s full name',\n 'notEmptyInvalid' => 'Please enter guarantor\\'s full name'\n )\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n // Guarantor Home Telno\n $this->addElement('text', 'guarantor_hometelno', array(\n 'label' => 'Home telephone number',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => \"Please enter the guarantor home telephone number\",\n 'notEmptyInvalid' => \"Please enter the guarantor home telephone number\"\n )\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n // Guarantor Work Telno\n $this->addElement('text', 'guarantor_worktelno', array(\n 'label' => 'Work telephone number',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => \"Please enter the guarantor work telephone number\",\n 'notEmptyInvalid' => \"Please enter the guarantor work telephone number\"\n )\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n // Guarantor Mobile Telno\n $this->addElement('text', 'guarantor_mobiletelno', array(\n 'label' => 'Mobile number',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => \"Please enter the guarantor mobile telephone number\",\n 'notEmptyInvalid' => \"Please enter the guarantor mobile telephone number\"\n )\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n // Guarantor Email\n $this->addElement('text', 'guarantor_email', array(\n 'label' => 'Email address',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '50',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => \"Please enter the guarantor email address\",\n 'notEmptyInvalid' => \"Please enter the guarantor email address\"\n )\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n\n\n // Add guarantor postcode\n $this->addElement('text', 'guarantor_postcode', array(\n 'label' => 'Postcode',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '10',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter guarantor address postcode',\n 'notEmptyInvalid' => 'Please enter guarantor address postcode'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/^[0-9a-z]{2,}\\ ?[0-9a-z]{2,}$/i',\n 'messages' => 'Guarantors postcode must be in postcode format'\n )\n )\n )\n ));\n\n // Add the find address button\n $this->addElement('submit', 'address_lookup', array(\n 'ignore' => true,\n 'label' => 'Find Address',\n 'class' => 'button',\n 'onclick' => 'getPropertiesByPostcode($(\\'#guarantor_postcode\\').val(), \\'guarantor_postcode\\', \\'guarantor_address\\',\\'guarantor_child\\');$(\\'#guarantor_add_selector\\').show(); return false;'\n ));\n\n // Add agent address select element\n $this->addElement('select', 'guarantor_address', array(\n 'required' => false,\n 'multiOptions' => array(\n '' => 'Please select'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please select guarantor address',\n 'notEmptyInvalid' => 'Please select guarantor address'\n )\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n $this->addElement('text', 'guarantor_homeletrefno', array(\n 'label' => 'HomeLet reference number',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '10',\n 'validators' => array(\n array(\n 'NotEmpty',true,array(\n 'messages' => array(\n 'isEmpty' => \"Please select the HomeLet reference number\",\n 'notEmptyInvalid' => \"Please select the HomeLet reference number\"\n )\n )\n )\n )\n ));\n\n // Tenants DOB\n $this->addElement('text', 'guarantors_dob', array(\n 'label' => \"Date of birth (DD/MM/YYYY)\",\n 'required' => false,\n 'class' => \"hasDatepicker\",\n 'maxlength' => '10',\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty',true,array(\n 'messages' => array(\n 'isEmpty' => \"Please select the guarantor date of birth\",\n 'notEmptyInvalid' => \"Please select the guarantor date of birth\"\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/^\\d\\d\\/\\d\\d\\/\\d\\d\\d\\d$/',\n 'messages' => \"Guarantor date of birth incomplete\"\n )\n )\n )\n ));\n\n\n\n // Remove 'nnn not found in haystack' error\n $this->getElement('guarantor_address')->setRegisterInArrayValidator(false);\n\n // Add hidden element for postcode\n $this->addElement('hidden', 'guarantoraddress_id', array(\n 'label' => '',\n 'value' => 1,\n 'class' => 'noborder'\n ));\n\n // Add in additional validation fields using utility class\n Application_Core_FormUtils::createManualAddressInput(\n $this,\n 'guarantor_housename',\n 'guarantor_street',\n 'guarantor_town',\n 'guarantor_city',\n false,\n 'guarantor\\'s'\n );\n\n //How many tenants are named on the tenancy agreement?\n $this->addElement('select', 'total_tenants', array(\n 'label' => \"How many tenants are named on the tenancy agreement?\",\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'multiOptions' => array(\n '' => 'Please Select',\n '1' => '1',\n '2' => '2',\n '3' => '3',\n '4' => '4',\n '5' => '5',\n '6' => '6',\n '7' => '7'\n ),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please specify the number of tenants on the tenancy agreement',\n 'notEmptyInvalid' => 'Please specify the number of tenants on the tenancy agreement'\n )\n )\n )\n )\n ));\n\n // Hidden element for total tenants to create dynamic tenant elements\n $this->addElement('hidden', 'totaltenants', array(\n 'label' => '',\n 'value' => '0',\n 'class' => 'noborder'\n ));\n\n // Tenant Name\n $this->addElement('text', 'tenant_name', array(\n 'label' => 'Full name',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '80',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter tenant\\'s full name',\n 'notEmptyInvalid' => 'Please enter tenant\\'s full name'\n )\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n // Tenant Home Telno\n $this->addElement('text', 'tenant_hometelno', array(\n 'label' => 'Home telephone number',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => \"Please enter tenant home telephone number\",\n 'notEmptyInvalid' => \"Please enter tenant home telephone number\"\n )\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n // Tenant Work Telno\n $this->addElement('text', 'tenant_worktelno', array(\n 'label' => 'Work telephone number',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => \"Please enter tenant work telephone number\",\n 'notEmptyInvalid' => \"Please enter tenant work telephone number\"\n )\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n // Tenant Mobile Telno\n $this->addElement('text', 'tenant_mobiletelno', array(\n 'label' => 'Mobile number',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '11',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => \"Please enter tenant mobile telephone number\",\n 'notEmptyInvalid' => \"Please enter tenant mobile telephone number\"\n )\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n // Tenant Email\n $this->addElement('text', 'tenant_email', array(\n 'label' => 'Email address',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'maxlength' => '50',\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => \"Please enter tenant email address\",\n 'notEmptyInvalid' => \"Please enter tenant email address\"\n )\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n\n\n // Policy Number / IRN\n $this->addElement('text', 'rg_policy_ref', array(\n 'label' => \"HomeLet reference number\",\n 'required' => false,\n 'maxlength' => '10',\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter the HomeLet reference number',\n 'notEmptyInvalid' => 'Please enter the HomeLet reference number'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/\\d{7}/',\n 'messages' => 'The HomeLet reference number must be at least seven digits long'\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n // Tenants DOB\n $this->addElement('text', 'tenants_dob', array(\n 'label' => \"Date of birth (DD/MM/YYYY)\",\n 'required' => false,\n 'class' => \"\",\n 'maxlength' => '10',\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty',true,array(\n 'messages' => array(\n 'isEmpty' => 'Please select tenant date of birth',\n 'notEmptyInvalid' => 'Please select tenant date of birth'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/(?P<d>\\d{2})(?P<sep>\\D)(?P<m>\\d{2})\\2(?P<y>\\d{4})/',\n 'messages' => 'Tenants date of birth must be in dd/mm/yyyy format'\n )\n )\n ),\n 'onblur' => 'validateguarantor()'\n ));\n\n // Set decorators\n $this->clearDecorators();\n $this->setDecorators(array('Form'));\n $this->setElementDecorators(array ('ViewHelper', 'Label', 'Errors'));\n\n // Add the back button\n $this->addElement('submit', 'back', array(\n 'ignore' => true,\n 'label' => 'Back'\n ));\n\n // Tenant Address decorators\n $tenantAddressLookUp = $this->getElement('tenancy_address_lookup');\n $tenantAddressLookUp->clearDecorators();\n $tenantAddressLookUp->setDecorators(array ('ViewHelper'));\n\n // Tenant Address decorators\n $tenantsForwardingAddressLookUp = $this->getElement('tenantsforwarding_address_lookup');\n $tenantsForwardingAddressLookUp->clearDecorators();\n $tenantsForwardingAddressLookUp->setDecorators(array ('ViewHelper'));\n\n // Address decorators\n $addressLookUp = $this->getElement('address_lookup');\n $addressLookUp->clearDecorators();\n $addressLookUp->setDecorators(array ('ViewHelper'));\n\n // Add the next button\n $this->addElement('submit', 'next', array(\n 'ignore' => true,\n 'label' => 'Continue to Step 3',\n ));\n\n // Add the save & exit button\n $this->addElement('button', 'save_exit', array(\n 'ignore' => true,\n 'label' => 'Save & Exit ',\n 'onclick' => \"window.location = '/rentguaranteeclaims/saveclaim';\"\n ));\n\n $next = $this->getElement('next');\n $next->clearDecorators();\n $next->setDecorators(array('ViewHelper'));\n\n $back = $this->getElement('back');\n $back->clearDecorators();\n $back->setDecorators(array('ViewHelper'));\n\n $saveExit = $this->getElement('save_exit');\n $saveExit->clearDecorators();\n $saveExit->setDecorators(array('ViewHelper'));\n\n // Hide errors\n Application_Core_FormUtils::removeFormErrors($this);\n\n $this->setDecorators(array(\n array('ViewScript', array('viewScript' => 'rentguaranteeclaims/subforms/tenant-and-property.phtml'))\n ));\n\n // Strip all tags to prevent XSS errors\n $this->setElementFilters(array('StripTags'));\n\n $this->getElement('tenant_occupation_confirmed_by_email')->getDecorator('Label')->setOption('escape', false);\n }", "function __construct()\r\n\t{\r\n\t\tparent::Controller();\r\n\t\t$this->dx_auth->check_uri_permissions();\r\n\t\t$this->load->library('Form_validation');\r\n\r\n\t}", "public function __construct() {\n \n parent::__construct();\n $this->load->library('form_builder');\n \n }", "public function __construct() {\n \n parent::__construct();\n $this->load->library('form_builder');\n \n }", "public function __construct()\n {\n $this->middleware('auth');\n $this->field_list = ['qr_membership'=>'QR','name'=>'Nombre','first_surname'=>'Apellido Paterno','second_surname'=>'Apellido Materno','qr_membership_old'=>'QR Anterior','todate'=>'Fecha'];\n $this->name = 'Cambio de Membresia';\n $this->name_plural = 'fa fa-folder-open';\n $this->form = 'App\\Core\\Forms\\Lealtad\\MembershipsForm';\n $this->model = 'App\\Models\\Lealtad\\Change_Memberships';\n $this->url_prefix = 'changememberships';\n $validation_add = [\n 'qr_membership'=>'required',\n 'active'=>'required|max:2',\n ];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n\n }", "function form_init_data() \r\n {\r\n //$this->set_hidden_element_value(\"id\", \"logon\");\r\n $dataForm = $this->getViewVariable('courseDataForm');\r\n\r\n $this->set_element_value(\"courseName\", $dataForm['c_name'] );\r\n $this->set_element_value(\"courseLanguage\", $dataForm['c_language'] );\r\n //$this->set_element_value(\"coursedescription\", $dataForm['c_description'] );\r\n $this->set_element_value(\"courseActive\", $dataForm['c_active'] );\r\n $this->set_element_value(\"courseAccess\", $dataForm['c_access'] );\r\n $this->set_element_value(\"coursedataDescripcion\", $dataForm['cd_descripcion'] );\r\n $this->set_element_value(\"coursedataVersion\", $dataForm['cd_version'] );\r\n $this->set_element_value(\"coursedataPalabrasClaves\", $dataForm['cd_claves'] );\r\n $this->set_element_value(\"coursedataDestinatarios\", $dataForm['cd_destinatarios'] );\r\n $this->set_element_value(\"coursedataConocimientosPrevios\", $dataForm['cd_conocimientos'] );\r\n $this->set_element_value(\"coursedataMetodologia\", $dataForm['cd_metodologia'] );\r\n\r\n }", "public function init() {\n\n // Invoke the agent user manager\n $agentUserManager = new Manager_Core_Agent_User();\n\n // Create array of possible security questions\n $securityQuestions = array('' => '--- please select ---');\n $securityQuestions += $agentUserManager->getUserSecurityAllQuestions();\n\n $this->setMethod('post');\n\n // Add agent scheme number element\n $this->addElement('text', 'agentschemeno', array(\n 'label' => 'Agent Scheme Number',\n 'required' => false,\n 'filters' => array('Digits'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your Agent Scheme Number',\n 'notEmptyInvalid' => 'Please enter your Letting Agent Scheme Number'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/^\\d{5,}$/',\n 'messages' => 'Agent Scheme Number must contain at least 5 digits'\n )\n )\n )\n ));\n\n // Add username element\n $this->addElement('text', 'username', array(\n 'label' => 'Username',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your username',\n 'notEmptyInvalid' => 'Please enter your username'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/^[a-z0-9]{6,64}$/i',\n 'messages' => 'Username must contain between 6 and 64 alphanumeric characters'\n )\n )\n )\n ));\n\n // Add password element\n $this->addElement('password', 'password', array(\n 'label' => 'Password',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your password',\n 'notEmptyInvalid' => 'Please enter your password'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/^.{6,}$/',\n 'messages' => 'Password must contain at least 6 characters'\n )\n )\n )\n ));\n\n // Add real name element\n $this->addElement('text', 'realname', array(\n 'label' => 'First name + last name',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your first name + last name',\n 'notEmptyInvalid' => 'Please enter your first name + last name'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/^[a-z\\-\\ \\']{2,}$/i',\n 'messages' => 'Name must contain at least two alphabetic characters and only basic punctuation (hyphen, space and single quote)'\n )\n )\n )\n ));\n\n // Add security question element\n $this->addElement('select', 'question', array(\n 'label' => 'Security question',\n 'required' => false,\n 'multiOptions' => $securityQuestions,\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please select a security question',\n 'notEmptyInvalid' => 'Please select a security question'\n )\n )\n )\n )\n ));\n\n // Add security answer element\n $this->addElement('text', 'answer', array(\n 'label' => 'Security answer',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your security answer',\n 'notEmptyInvalid' => 'Please enter your security answer'\n )\n )\n ),\n array(\n 'regex', true, array(\n 'pattern' => '/^[\\w\\ \\.\\-\\'\\,]{2,}$/i',\n 'messages' => 'Security answer must contain at least two characters and only basic punctuation (hyphen, apostrophe, comma, full stop and space)'\n )\n )\n )\n ));\n\n // Add e-mail element\n $this->addElement('text', 'email', array(\n 'label' => 'E-mail address',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array(\n 'NotEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Please enter your e-mail address'\n )\n )\n )\n )\n ));\n\n $emailValidator = new Zend_Validate_EmailAddress();\n $emailValidator->setMessages(\n array(\n Zend_Validate_EmailAddress::INVALID_HOSTNAME => 'Domain name invalid in e-mail address',\n Zend_Validate_EmailAddress::INVALID_FORMAT => 'Invalid e-mail address'\n )\n );\n $this->getElement('email')->addValidator($emailValidator);\n\n $this->setElementFilters(array('StripTags'));\n\n // Set up the element decorators\n $this->setElementDecorators(array (\n 'ViewHelper',\n 'Label',\n 'Errors',\n array('HtmlTag', array('tag' => 'div')),\n ));\n\n // Add login button\n $this->addElement('submit', 'login', array('label' => 'Login'));\n }", "public function initialize($entity = null, $options = array())\n {\n if (!isset($options['edit'])) {\n\n $elemento = new Text(\"formacion_id\");\n $this->add($elemento->setLabel(\"Id\"));\n } else {\n $this->add(new \\Phalcon\\Forms\\Element\\Hidden(\"formacion_id\"));\n }\n /*========================== ==========================*/\n $elemento = new Text('formacion_institucion',array('maxlength'=>50,'class'=>'form-control','required'=>'true','placeholder'=>'Ingrese el nombre de la institución'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Institución');\n $elemento->setFilters(array('striptags', 'string'));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'El nombre de la institución es requerido'\n ))\n ));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Select('formacion_gradoId', \\Curriculum\\Grado::find(), array(\n 'using' => array('grado_id', 'grado_nombre'),\n 'useEmpty' => true,\n 'emptyText' => 'Seleccionar ',\n 'emptyValue' => '',\n 'class'=>'form-control','required'=>'true'\n ));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Seleccione el nivel'\n ))\n ));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Nivel');\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Text('formacion_titulo',array('maxlength'=>50,'class'=>'form-control','placeholder'=>'Ingrese el nombre del Titulo','required'=>'true'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Titulo');\n $elemento->setFilters(array('striptags', 'string'));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Select('formacion_estadoId', \\Curriculum\\Estado::find(), array(\n 'using' => array('estado_id', 'estado_nombre'),\n 'useEmpty' => true,\n 'emptyText' => 'Seleccionar ',\n 'emptyValue' => '',\n 'class'=>'form-control','required'=>'true'\n ));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Seleccione el estado'\n ))\n ));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Estado');\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Date('formacion_fechaInicio',array('class'=>'form-control','required'=>'true'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Fecha de Inicio');\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'La fecha de inicio es requerida.'\n ))\n ));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Date('formacion_fechaFinal',array('class'=>'form-control', 'disabled'=>''));\n $elemento->setLabel('Fecha Final');\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'La fecha final es requerida.'\n ))\n ));\n $this->add($elemento);\n\n }", "public function init()\n {\n \t$login = new Zend_Form_Element_Text('login');\n \t$login->setLabel('Username')\n \t->setAttrib('placeholder', 'Username')->setAttrib('class', 'form_input2');\n \t$name = new Zend_Form_Element_Text('name');\n \t$name->setLabel('Name')\n \t->setAttrib('placeholder', 'Name')->setAttrib('class', 'form_input2');\n \t$email = new Zend_Form_Element_Text('email');\n \t$email->setLabel('email')\n \t->setAttrib('placeholder', 'Email')->setAttrib('class', 'form_input2');\n \t$email2 = new Zend_Form_Element_Text('email2');\n \t$email2->setLabel('email')\n \t->setAttrib('placeholder', 'Confirm password')->setAttrib('class', 'form_input2');\n \t$password = new Zend_Form_Element_Password('pass');\n \t$password->setLabel('Password')->setAttrib('placeholder', 'Password')->setAttrib('class', 'form_input2');\n \t$password2 = new Zend_Form_Element_Password('pass2');\n \t$password2->setLabel('Password')->setAttrib('placeholder', 'Confirm password')->setAttrib('class', 'form_input2');\n \t\n \t$captcha = new Zend_Form_Element_Captcha('cap',\n array('label' => \"Please enter the 5 letters displayed below:\",\n \t'required'=>true,\n \t'captcha' => array(\n \t\t'captcha' => 'image',\n\t\t 'font'=> APPLICATION_PATH.'/../public/fonts/os.ttf',\n\t\t 'imgDir'=>APPLICATION_PATH.'/../public/img/captcha',\n\t\t 'imgUrl'=> '/img/captcha/',\n\t\t 'wordLen' => 5,\n\t\t 'fsize'=>20,\n\t\t 'height'=>48,\n\t\t 'width'=>250,\n\t\t 'gcFreq'=>1,\n\t\t 'expiration' => 300\n\t )\n\t ));\n \t$captcha->setDecorators(array(\n \t\t\t'ViewHelper',\n \t\t\t'Errors',\n \t\t\tarray( 'HtmlTag', array('tag' => 'div', 'class' => 'captha_img'))\n \t))->setAttrib('placeholder', 'Human check');\n \t$submit = new Zend_Form_Element_Submit('submit');\n \t$submit->setLabel('Login');\n \t\n \t$this->addElements(array($login,\n \t\t\t$email,\n \t\t\t$email2,\n \t\t\t$name,\n \t\t\t$captcha,\n\t \t$password,\n \t\t\t$password2,\n\t \t\n\t \t$submit\n \t));\n \t//$this->getElement('cap')->removeDecorator(\"viewhelper\");\n \t\n \t$this->setElementDecorators(array('ViewHelper'));\n \t\n \t\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model(\"M_mahasiswa\");\n\t\t$this->load->library('form_validation');\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->setAdapter(new TActiveControlAdapter($this));\n\t\t$this->getActiveControl()->setClientSide(new TActiveCustomValidatorClientSide);\n\t}", "public function __construct()\n\t{\n\t\t$this->form_rules = array(\n\t\t\t'email' => 'required|email',\n\t\t\t'password' => 'required',\n\t\t);\n\t}", "public function init()\n {\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_PersonalDetails(), 'subform_personaldetails');\n \t$this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_DataProtection(), 'subform_dataprotection');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_CorrespondenceDetails(), 'subform_correspondencedetails');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_InsuredAddress(), 'subform_insuredaddress');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_PolicyDetails(), 'subform_policydetails');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_IDD(), 'subform_idd');\n }", "public function __construct() {\n \t\n\t \tinclude('../conexion/datos.php');\n \n\t $this->id_modulo = 14;\n\t $this->NameCookieApp = $NomCookiesApp;\n\t //$this->permisosInst = new permisosController();\n\t }", "public function init()\n {\n $this->setAttribute('method', 'post');\n $this->add(array(\n 'name' => 'email',\n 'type' => 'Text',\n 'attributes' => array(\n 'size' => 30,\n 'data-rule-maxlength' => 50,\n 'maxsize' => 50,\n 'data-rule-required' => true,\n 'data-rule-email' => true,\n ),\n ));\n $this->add(array(\n 'name' => 'submit',\n 'type' => 'Submit',\n 'attributes' => array(\n 'value' => $this->getTranslator()->translate('Send new password'),\n 'id' => 'submitbutton',\n 'class' => 'button_send',\n ),\n ));\n }", "function init()\n {\n /* Initialize the Flexform and pull the data into a new object */\n $this->pi_initPIflexform();\n $piFlexForm = $this->cObj->data['pi_flexform'];\n\n $default = array('mapWidth', 'mapHeight', 'userGroups', 'pid', 'initialMapType', 'showGroups',\n 'centerLat', 'centerLng', 'autoCenter', 'zoomLevel', 'autoZoom',);\n\n foreach ($default as $key)\n {\n $this->$key = $this->pi_getFFvalue($piFlexForm, $key, 'default');\n }\n\n $controls = array('mapControlSize', 'showMapOverview', 'showMapType',\n 'mapTypePosition', 'showScale', 'mapTypeType', 'showNavigation',\n 'navigationType', 'scalePosition', 'navigationPosition',\n 'showZoom', 'zoomPosition', 'zoomType', 'showPan', 'panPosition',\n );\n\n foreach ($controls as $key)\n {\n $this->$key = $this->pi_getFFvalue($piFlexForm, $key, 'mapControls');\n }\n }", "public function init() {\n $link = new Zend_Form_Element_Text('link');\n $link->setRequired();\n $link->setLabel('Enter New Url: ')->setAttrib('class', 'form-label');\n $link->setAttrib('class', 'form-control');\n $link->addFilter('stringTrim');\n $link->addValidator(new Zend_Validate_Db_NoRecordExists(\n array(\n 'table' => 'links',\n 'field' => 'link',\n )\n ));\n $submit = new Zend_Form_Element_Submit('Add');\n\t\t$submit->setAttrib('class', 'btn btn-primary');\n\t\t$this->setAttrib('class', 'form-horizontal');\n $this->addElements(array( $link, $submit));\n }", "public function init()\r\n\t{\t\t\t\t\t\t\r\n\t\t$this->setMethod('post');\r\n\t\t$this->addAttribs(array( \t \r\n\t\t\t'class' => 'form', \t\r\n \t));\t\t\r\n\t \t\t\t\r\n\t\t$this->addElement('text', 'username', array(\t\r\n\t\t 'required' => true,\t\t\t \r\n\t\t 'label' => 'Tên đăng nhập',\r\n\t\t 'attribs' => array(\r\n\t\t\t\t 'class' => 'focus',\r\n\t\t\t\t\t'size' => 30,\r\n\t\t\t ), \r\n\t\t\t 'filters' => array('StringTrim'),\t\t\t \t \r\n\t\t));\r\n\t\t\r\n\t\t$this->addElement('password', 'password', array(\t\r\n\t\t 'required' => true,\t\t\t \r\n\t\t 'label' => 'Mật khẩu',\r\n\t\t 'attribs' => array(\t\t\t\t \r\n\t\t\t\t\t'size' => 30,\r\n\t\t\t ),\t\t\r\n\t\t\t 'filters' => array('StringTrim'),\t\t \t\t \r\n\t\t));\r\n\t\t\r\n\t\t$this->addElement('checkbox', 'remember', array(\t\r\n\t\t 'required' => true,\t\t\t \r\n\t\t 'label' => 'Ghi nhớ thông tin',\r\n\t\t\t 'filters' => array('StringTrim'),\t\t\t\t \r\n\t\t));\t\r\n\t\t\r\n\t\tforeach($this->getElements() as $element) {\r\n\t\t\t$element->removeDecorator('HtmlTag')\t\t\t\t\r\n\t\t\t ->removeDecorator('DlDtDdWrapper')\r\n\t\t\t ->removeDecorator('Label')\r\n\t\t\t\t\t->addDecorator('Label');\t\t\t\t\t\t\t\t\r\n\t\t}\t\t\t\t\r\n\r\n\t\t$this->addElement('submit', 'login', array( \r\n\t\t 'ignore' =>true,\t\r\n\t\t\t 'label' => 'Đăng nhập'\t\t\t\t\t\t \t\t \t\t \t\t \r\n\t\t));\t\r\n\r\n\t\t$this->addDisplayGroup(\r\n\t\t\tarray('username', 'password' ,'remember', 'login'),\r\n\t\t\t'group1',\r\n\t\t\tarray(\t\t\t\t\r\n\t\t\t\t'legend' => 'Đăng nhập',\t\t\t\t\r\n\t\t\t\t'class' => 'g-green',\t\t\t \r\n\t\t\t)\t\t\t\r\n\t\t);\r\n\t}", "public function init()\n {\n\n // pega o idAgente do usu�rio logado\n $auth = Zend_Auth::getInstance(); // pega a autentica��o\n \n /* ========== IN�CIO PERFIL ==========*/\n // define os grupos que tem acesso\n $PermissoesGrupo = array();\n $PermissoesGrupo[] = 121; // T�cnico de Acompanhamento\n $PermissoesGrupo[] = 122; // Coordenador de Acompanhamento\n $PermissoesGrupo[] = 123; // Coordenador - Geral de Acompanhamento\n $PermissoesGrupo[] = 129; // T�cnico de Acompanhamento\n //$PermissoesGrupo[] = ; // Coordenador de Avalia��o\n //$PermissoesGrupo[] = 134; // Coordenador de Fiscaliza��o\n //$PermissoesGrupo[] = 124; // T�cnico de Presta��o de Contas\n //$PermissoesGrupo[] = 125; // Coordenador de Presta��o de Contas\n //$PermissoesGrupo[] = 126; // Coordenador - Geral de Presta��o de Contas\n parent::perfil(1, $PermissoesGrupo); // perfil novo salic\n\n if (isset($auth->getIdentity()->usu_codigo)) { // autenticacao novo salic\n $this->getIdUsuario = UsuarioDAO::getIdUsuario($auth->getIdentity()->usu_codigo);\n $this->getIdUsuario = ($this->getIdUsuario) ? $this->getIdUsuario['idAgente'] : 0;\n } else { // autenticacao espaco proponente\n $this->getIdUsuario = 0;\n }\n /* ========== FIM PERFIL ==========*/\n\n\n /* ========== IN�CIO �RG�O ========== */\n $GrupoAtivo = new Zend_Session_Namespace('GrupoAtivo'); // cria a sess�o com o grupo ativo\n $this->getIdGrupo = $GrupoAtivo->codGrupo; // id do grupo ativo\n $this->getIdOrgao = $GrupoAtivo->codOrgao; // id do �rg�o ativo\n\n parent::init();\n }" ]
[ "0.6333204", "0.6003988", "0.5947932", "0.58414745", "0.583505", "0.58061063", "0.57299227", "0.57243544", "0.5680082", "0.56095254", "0.5594582", "0.55727905", "0.552878", "0.55271477", "0.55219996", "0.5518174", "0.55178106", "0.54691166", "0.54648215", "0.54612964", "0.5460818", "0.54354995", "0.5429273", "0.5412014", "0.5403206", "0.5393442", "0.5392091", "0.53773004", "0.53536195", "0.5350277", "0.53380287", "0.53345656", "0.53301346", "0.532969", "0.5327458", "0.53256255", "0.5314971", "0.5301182", "0.5295681", "0.5291084", "0.52837765", "0.5273333", "0.5271927", "0.5262065", "0.52571696", "0.5247308", "0.5234613", "0.5227329", "0.5212562", "0.52052575", "0.51948893", "0.5194653", "0.51924837", "0.51841646", "0.51832074", "0.51794183", "0.51737404", "0.51665336", "0.5165661", "0.5161452", "0.5156353", "0.5148573", "0.5147502", "0.51454866", "0.5142404", "0.51389265", "0.5136313", "0.5133707", "0.51262575", "0.51261604", "0.51255006", "0.5123491", "0.5118525", "0.5118308", "0.51134044", "0.511232", "0.51083565", "0.5102476", "0.51015055", "0.5098541", "0.50964195", "0.5094056", "0.50886947", "0.508001", "0.50726324", "0.50726324", "0.50704116", "0.5069129", "0.5063903", "0.5063475", "0.5060817", "0.5059607", "0.50509846", "0.50492465", "0.50468487", "0.50457853", "0.5040064", "0.5038532", "0.5033959", "0.50329244", "0.5032131" ]
0.0
-1
returns the food menu items
function tf_foodmenu_get_menus($cat_id) { $args = array( 'orderby' => 'title', 'post_type' => 'tf_foodmenu', ); $food_menu_posts = get_posts( $args ); $food_menu = array(); $args = array( 'post_type' => 'tf_foodmenu', 'meta_key' => 'display_order', 'orderby' => 'meta_value', 'order' => 'ASC', 'tax_query' => array( array( 'taxonomy' => 'tf_foodmenucat', 'terms' => $cat_id ) ) ); query_posts($args); $food_menu = array(); while(have_posts()): the_post(); $food_menu[get_the_ID()] = array( 'menu-name' => get_the_title(), 'categories' => array( 0 => $cat_id ) ); endwhile; return $food_menu; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_items() {\n return $this->menuitems;\n }", "function getMenuItems()\n {\n }", "public function getMenu();", "public function getMenus() {}", "function getMenuItems()\n {\n $this->menuitem(\"xp\", \"\", \"main\", array(\"xp.story\", \"admin\"));\n $this->menuitem(\"stories\", dispatch_url(\"xp.story\", \"admin\"), \"xp\", array(\"xp.story\", \"admin\"));\n }", "function getMenuEntries()\n\t{\n\t\tglobal $rbacsystem, $lng, $tree, $ilUser, $ilSetting;\n\n\t\t// no menu during online tests\n\t\tif ($_SESSION[\"adn_online_test\"])\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\n\t\t$mm_tpl = new ilTemplate(\"tpl.adn_main_menu.html\", true, true, \"Services/ADN/UI\");\n\n\t\tforeach ($this->getAllMenuItems() as $menu => $items)\n\t\t{\n\t\t\t$this->renderSubMenu($mm_tpl, $menu);\n\t\t}\n\t\treturn $mm_tpl->get();\n\n\n\n\t\t$tpl->setCurrentBlock(\"cust_menu\");\n\t\t$tpl->setVariable(\"TXT_CUSTOM\",\n\t\t\tlfCustomMenu::lookupTitle(\"it\", $menu[\"id\"], $ilUser->getLanguage(), true));\n\t\t$tpl->setVariable(\"MM_CLASS\", \"MMInactive\");\n\n\t\tif (is_file(\"./templates/default/images/mm_down_arrow.png\"))\n\t\t{\n\t\t\t$tpl->setVariable(\"ARROW_IMG\", ilUtil::getImagePath(\"mm_down_arrow.png\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tpl->setVariable(\"ARROW_IMG\", ilUtil::getImagePath(\"mm_down_arrow.gif\"));\n\t\t}\n\t\t$tpl->setVariable(\"CUSTOM_CONT_OV\", $gl->getHTML());\n\t\t$tpl->setVariable(\"MM_ID\", $menu[\"id\"]);\n\t\t$tpl->parseCurrentBlock();\n\t\t$tpl->setCurrentBlock(\"c_item\");\n\t\t$tpl->parseCurrentBlock();\n\n\t}", "public function menuItems()\n\t{\n\t\treturn array(\n array('label'=>$this->labelMenu!==null?$this->labelMenu:Yii::t('app','Generator'), 'icon'=>'fa fa-code', 'url'=>'#','items'=>$this->getMyselfMenu(),'visible'=>Yii::app()->getModule('users')->check('root')),\n );\n\t}", "private function getMenuList() {\n\t\t$listQuery = $this->foodMenuModel->getListMenuFoodActive();\n\t\t$listMenuFood = array();\n\t\t$i = 0;\n\t\tforeach($listQuery as $item) {\n\t\t\t$item['NAME_MENU']=utf8_encode($item['NAME_MENU']);\n\t\t\t$listFood = $this->foodMenuModel->getMenuListFood($item['ID_MENU']);\n\t\t\t$listFoodRes = array();\n\t\t\t$j = 0;\n\t\t\tforeach($listFood as $food) {\n\t\t\t\t$listPrice = $this->foodMenuModel->getCostFood($food['ID_FOOD']);\n\t\t\t\t$listFoodRes[$j]['ID_FOOD'] = $food['ID_FOOD'];\n\t\t\t\t$listFoodRes[$j]['ID_TYPE_FOOD'] = $food['ID_TYPE_FOOD'];\n\t\t\t\t$listFoodRes[$j]['NAME_TYPE_FOOD'] = $food['NAME_TYPE_FOOD'];\n\t\t\t\t$listFoodRes[$j]['NAME_STATE_FOOD'] = $food['NAME_STATE_FOOD'];\n\t\t\t\t$listFoodRes[$j]['NAME_FOOD'] = utf8_encode($food['NAME_FOOD']);\n\t\t\t\t$listFoodRes[$j]['VALUE_STATE_FOOD'] = utf8_encode($food['VALUE_STATE_FOOD']);\n\t\t\t\t$listFoodRes[$j]['DESCRIPTION_FOOD'] = utf8_encode(strip_tags($food['DESCRIPTION_FOOD']));\n\t\t\t\t$listFoodRes[$j]['IMAGE_FOOD'] = utf8_encode($food['IMAGE_FOOD']);\n\t\t\t\t$listFoodRes[$j++]['prices'] = $listPrice;\n\t\t\t}\n\t\t\t$item['foods'] = $listFoodRes;\n\t\t\t$listMenuFood[$i++] = $item;\n\t\t}\n\n\t\treturn $listMenuFood;\n\t}", "public static function getMenuItems()\n {\n // Will be handled in XML in future (or/and with the Joomla native menus)\n // -> give your opinion on j-cook.pro/forum\n\n $items = array();\n\n $items['admin.countries.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_COUNTRIES',\n 'view' => 'countries',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_countries'\n );\n\n $items['admin.regions.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_REGIONS',\n 'view' => 'regions',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_regions'\n );\n\n $items['admin.provinces.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_PROVINCES',\n 'view' => 'provinces',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_provinces'\n );\n\n $items['admin.subscriptionplans.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_SUBSCRIPTIONPLANS',\n 'view' => 'subscriptionplans',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_subscriptionplans'\n );\n\n $items['admin.categories.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_CATEGORIES',\n 'view' => 'categories',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_categories'\n );\n\n $items['admin.typedocuments.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_TYPEDOCUMENTS',\n 'view' => 'typedocuments',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_typedocuments'\n );\n\n $items['admin.documents.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_DOCUMENTS',\n 'view' => 'documents',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_documents'\n );\n\n $items['admin.reservations.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_RESERVATIONS',\n 'view' => 'reservations',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_reservations'\n );\n\n $items['admin.cpanel.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_CONTROL_PANEL',\n 'view' => 'cpanel',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_cpanel'\n );\n\n $items['site.cpanel.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_CONTROL_PANEL',\n 'view' => 'cpanel',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_cpanel'\n );\n\n return $items;\n }", "function MyMod_Items_Menu($args,$items,$argskey,$idkey=\"ID\",$namekeys=array(),$titlekeys=array())\n {\n return\n $this->MyMod_Items_Menu_Horisontal\n (\n $args,\n $items,\n $argskey,\n $idkey,\n $namekeys,\n $titlekeys,\n $this->B($this->MyMod_ItemsName().\":\")\n ).\n \"\";\n \n }", "public static function menus()\n {\n return [];\n }", "abstract public function getMenuData();", "public function getMenuItems() {\t\t\t\t\t\r\n\t\treturn $this->menuItems;\r\n\t}", "public function items()\n\t{\n\t\tif( ! is_null($this->menu))\n\t\t{\n\t\t\tforeach($this->items as $item)\n\t\t\t{\n\t\t\t\t$this->menu->filter($item);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->items;\n\t}", "public function menu()\n {\n $menu_raw = $this->db->select('fs_department.id as de_id, fs_department.name as de_name, fs_category.*')\n ->from('fs_department')\n ->join('fs_category', 'fs_department.id = fs_category.department_id', 'left')\n ->get()->result_array();\n\n $menu_good = array();\n foreach ($menu_raw as $k => $v) {\n $menu_good[$v['de_name']][$k] = $v;// short array menu\n }\n return $menu_good;\n\n }", "public function menuItems()\n {\n return array(\n array('label'=>Yii::t('app','Compras'), 'icon'=>'fa fa-shopping-cart', 'url'=>array('#'), 'items'=>array(\n \n // array('label'=>Yii::t('app','Home Información'), 'icon'=>'fa fa-star-half-o', 'url'=>array('/'.$this->id.'/info/')),\n // array('label'=>Yii::t('app','Beneficios'), 'icon'=>'fa fa-rocket', 'url'=>array('/'.$this->id.'/features/admin')),\n \n \tarray('label'=>Yii::t('app','Compras'), 'icon'=>'fa fa-shopping-cart', 'url'=>array('/'.$this->id.'/header/admin')),\n\n \tarray('label'=>Yii::t('app','Términos y condiciones'), 'icon'=>'fa fa-gavel', 'url'=>array('/'.$this->id.'/conditions/')),\n \tarray('label'=>Yii::t('app','Config'), 'icon'=>'fa fa-cog', 'url'=>array('/'.$this->id.'/config/')),\n \n \n )),\n array('label'=>Yii::t('app','Productos'), 'icon'=>'fa fa-barcode', 'url'=>array('#'), 'items'=>array(\n \n array('label'=>Yii::t('app','Categorías'), 'icon'=>'fa fa-list-ol', 'url'=>array('/'.$this->id.'/categories/admin')),\n array('label'=>Yii::t('app','Productos'), 'icon'=>'fa fa-barcode', 'url'=>array('/'.$this->id.'/items/admin')),\n \t// array('label'=>Yii::t('app','Facilitadores'), 'icon'=>'fa fa-graduation-cap', 'url'=>array('/'.$this->id.'/facilitador/admin')),\n \n )),\n );\n }", "function get_menu() {\n return wp_get_nav_menu_items(9);\n }", "private function createExtraMenus()\n {\n $menu = array(\n 'type' => [[], null],\n 'slot' => [[], null]\n );\n\n if (!$this->category)\n {\n $menu['slot'] = [Lang::item('inventoryType'), null];\n asort($menu['slot'][0]);\n }\n else\n {\n if (isset($this->category[2]) && is_array(Lang::item('cat', $this->category[0], 1, $this->category[1])))\n $catList = Lang::item('cat', $this->category[0], 1, $this->category[1], 1, $this->category[2]);\n else if (isset($this->category[1]) && is_array(Lang::item('cat', $this->category[0])))\n $catList = Lang::item('cat', $this->category[0], 1, $this->category[1]);\n else\n $catList = Lang::item('cat', $this->category[0]);\n\n switch ($this->category[0])\n {\n case 0:\n $menu['type'] = [Lang::item('cat', 0, 1), null];\n\n if (!isset($this->category[1]) || in_array($this->category[1], [6, -3]))\n {\n $menu['slot'] = [Lang::item('inventoryType'), 0x63EFEA];\n asort($menu['slot'][0]);\n }\n break;\n case 2:\n if (!isset($this->category[1]))\n $menu['type'] = [Lang::spell('weaponSubClass'), null];\n\n $menu['slot'] = [Lang::item('inventoryType'), 0x262A000];\n asort($menu['slot'][0]);\n break;\n case 4:\n if (!isset($this->category[1]))\n {\n $menu['slot'] = [Lang::item('inventoryType'), 0x10895FFE];\n $menu['type'] = [Lang::item('cat', 4, 1), null];\n }\n else if (in_array($this->category[1], [1, 2, 3, 4]))\n $menu['slot'] = [Lang::item('inventoryType'), 0x7EA];\n\n asort($menu['slot'][0]);\n break;\n case 16:\n if (!isset($this->category[2]))\n $this->sharedLV['visibleCols'][] = 'glyph';\n case 1:\n if ($this->category[0] == 1)\n $this->sharedLV['visibleCols'][] = 'slots';\n case 3:\n if (!isset($this->category[1]))\n asort($catList[1]);\n case 7:\n case 9:\n $this->sharedLV['hiddenCols'][] = 'slot';\n case 15:\n if (!isset($this->category[1]))\n $menu['type'] = [$catList[1], null];\n\n break;\n }\n }\n\n return $menu;\n }", "public function getMenus()\n\t{\n\n\t}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "public static function get_menu()\n\t\t{ \n\t\t\t\t\n\t\t\t\tglobal $wpdb;\n\t\t\t\t\n\t\t\t\t$dish_list = $wpdb->get_results( \"SELECT * FROM \".$wpdb->prefix.self::$table_name);\n\t\t\t\t\n\t\t\t\t$htm =\t'<div class=\"left-rows\" id=\"menu-all\">All Categories</div>';\t\n\t\t\t\t\n\t\t\t\tif(!empty($dish_list)){\n\t\t\t\t\t\n\t\t\t\t\tforeach($dish_list as $key => $val){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$htm .=\t'<div class=\"left-rows\" id=\"menu-'.$val->re_int.'\">'.$val->re_title.'</div>';\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\n\t\t\t\treturn $htm;\n\t\t\t\t\n\t\t}", "function get_food_menu()\n\t {\n\t\t$today_date = date(\"d-m-Y\");\n\t\t$today_day = date('l', strtotime($today_date));\n\t\t$week_days = array('Monday', 'Tuesday', 'Wednesday','Thursday','Friday','Saturday','Sunday');\n\t\t$temp_array = array_search($today_day,$week_days);\n\t\t\n\t\t$start_date = strtotime(date(\"d-m-Y\", strtotime($today_date)) . '-'.$temp_array.'day');\n\t\t$end_date = strtotime(date(\"d-m-Y\",$start_date) . \" +5 day\");\n\t\t\n\t\t$food_list \t= $this ->ObjM->food_list($start_date,$end_date);\n\t\t//echo $this->db->last_query(); exit;\n\t\t\n\t\tif(count($food_list)<1){\n\t\t\t$json_arr[]=array('validation'=>'false');\t\n\t\t\techo json_encode($json_arr);\n\t\t\texit;\t \n\t\t}\n\t\t\n\t\tfor($i=0;$i<count($food_list);$i++){\n\t\t $food_date = date('d-m-Y',$food_list[$i]['date']);\t\n\t\t\t\n\t\t $json_arr[]=array(\n\t\t\t\t\t'date'\t\t\t\t=>\t$food_date,\n\t\t\t\t\t'day'\t\t\t\t=>\t$food_list[$i]['day'],\n\t\t\t\t\t'food_name'\t\t\t=>\t$food_list[$i]['food_name'],\n\t\t\t\t\t'validation'\t \t=>\t'true' );\n\t\t }\n\t\t echo json_encode($json_arr);\n\t\t\texit;\n\t }", "function getMenuItems () {\n return sqlSelect('SELECT * FROM menu');\n}", "public function run()\n {\n $menus=[\n [\"parent_menu\" => 0,\"nombre\" => \"Catalogo\",\"url\" => \"javascript:;\",\"orden\" => 1,\"icono\" => \"fas fa-clipboard-list\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Ventas\",\"url\" => \"javascript:;\",\"orden\" => 2,\"icono\" => \"fas fa-cart-plus\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Reportes\",\"url\" => \"javascript:;\",\"orden\" => 3,\"icono\" => \"fas fa-chart-pie\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Acceso\",\"url\" => \"javascript:;\",\"orden\" => 4,\"icono\" => \"fas fa-users\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Ayuda\",\"url\" => \"ayuda\",\"orden\" => 5,\"icono\" => \"fas fa-exclamation-circle\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Productos\",\"url\" => \"producto\",\"orden\" => 1,\"icono\" => \"fab fa-product-hunt\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Categorías\",\"url\" => \"categoria\",\"orden\" => 2,\"icono\" => \"fas fa-clipboard-check\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Sabores\",\"url\" => \"sabor\",\"orden\" => 3,\"icono\" => \"fas fa-ice-cream\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Tamaños\",\"url\" => \"tamano\",\"orden\" => 4,\"icono\" => \"fas fa-ruler\"],\n [\"parent_menu\" => 2,\"nombre\" => \"Ordenes\",\"url\" => \"orden\",\"orden\" => 1,\"icono\" => \"fas fa-cart-arrow-down\"],\n [\"parent_menu\" => 2,\"nombre\" => \"Clientes\",\"url\" => \"cliente\",\"orden\" => 2,\"icono\" => \"fas fa-user-tie\"],\n [\"parent_menu\" => 3,\"nombre\" => \"Ingresos\",\"url\" => \"ventarango\",\"orden\" => 1,\"icono\" => \"fas fa-circle\"],\n [\"parent_menu\" => 3,\"nombre\" => \"Ventas por Mes\",\"url\" => \"venta-mes\",\"orden\" => 2,\"icono\" => \"fas fa-circle\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Usuarios\",\"url\" => \"usuario\",\"orden\" => 1,\"icono\" => \"fas fa-user\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Roles\",\"url\" => \"rol\",\"orden\" => 2,\"icono\" => \"fas fa-scroll\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Permisos\",\"url\" => \"permiso\",\"orden\" => 3,\"icono\" => \"fas fa-user-tag\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Menus\",\"url\" => \"menu\",\"orden\" => 4,\"icono\" => \"fas fa-bars\"]\n\n ];\n foreach($menus as $menu){\n DB::table('menu')->insert([\n 'parent_menu' => $menu[\"parent_menu\"],\n 'nombre' => $menu[\"nombre\"],\n 'url' => $menu[\"url\"],\n 'orden' => $menu[\"orden\"],\n 'icono' => $menu[\"icono\"], \n 'created_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }\n }", "public static function menuItems()\n {\n return [\n ['label' => '<i class=\"fa fa-angle-double-right\"></i> ' . Yii::t('menu', 'Users'), 'url' => ['/user-management/user/index']],\n ['label' => '<i class=\"fa fa-angle-double-right\"></i> ' . Yii::t('menu', 'Roles'), 'url' => ['/user-management/role/index']],\n ['label' => '<i class=\"fa fa-angle-double-right\"></i> ' . Yii::t('menu', 'Permissions'), 'url' => ['/user-management/permission/index']],\n ['label' => '<i class=\"fa fa-angle-double-right\"></i> ' . Yii::t('menu', 'Permission groups'), 'url' => ['/user-management/auth-item-group/index']],\n ['label' => '<i class=\"fa fa-angle-double-right\"></i> ' . Yii::t('menu', 'Visit log'), 'url' => ['/user-management/user-visit-log/index']],\n ];\n }", "public function obtenerElementosMenu();", "function menuGetPrimaryItems() {\n $items = array();\n $items[] = array('title' => 'Home', 'url' => '/');\n $items[] = array('title' => 'Blog', 'url' => '/Blog');\n $items[] = array('title' => 'Archive', 'url' => '/Archive');\n\n return menuPrepareItems($items);\n}", "public function getMenuItems(){\n $items = ItemMenu::getBy(array('_id' => array('$in' => $this->_menuItems)));\n return $items;\n }", "function wp_get_nav_menu_items($items, $menu, $args)\n {\n }", "public function run()\n {\n $menuitem = MenuItem::create([\n 'provider_id' => 4, //panera\n 'item_name' => 'Greek Yogurt with apple',\n 'description' => 'Greek Yogurt, Granola, and Mixed Berry Parfait with apple',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 4,\n 'item_name' => 'Half Salad w/ Chicken, apple',\n 'description' => 'Half Seasonal Greens Salad with Chicken and apple',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 4,\n 'item_name' => 'Half Salad w/ Chicken, roll',\n 'description' => 'Half Seasonal Greens Salad with Chicken and roll',\n 'price' => 500,\n ]);\n//(1, 4, 'Half Greek Salad with roll',\n//(2, 4, 'Half Caesar Salad with roll',\n//(3, 4, 'Half Seasonal Greens with roll',\n//(5, 4, 'Half Southwest Caesar Salad with roll',\n//(6, 4, 'Turkey and Cheese Sandwich with apple',\n//(7, 4, 'Ham and Swiss Sandwich with apple',\n//(8, 4, 'PB and J Sandwich with apple',\n//(9, 4, 'Macaroni and Cheese with roll',\n//(55, 4, 'Chicken Noodle Soup with roll',\n//(56, 4, 'Broccoli Cheddar Soup with roll',\n//(57, 4, 'Creamy Tomato Soup with roll',\n//(182, 4, 'Bistro French Onion Soup with roll',\n//(184, 4, 'Baked Potato Soup with roll',\n//(236, 4, 'Macaroni and Cheese with apple',\n//(237, 4, 'Baked Potato Soup with apple',\n//(238, 4, 'Bistro French Onion Soup with apple',\n//(239, 4, 'Broccoli Cheddar Soup with apple',\n//(240, 4, 'Chicken Noodle Soup with apple',\n//(241, 4, 'Creamy Tomato Soup with apple',\n//(242, 4, 'Half Caesar Salad with apple',\n//(243, 4, 'Half Greek Salad with apple',\n//(244, 4, 'Half Seasonal Greens with apple',\n//(245, 4, 'Half Southwest Caesar Salad with apple',\n//(246, 4, 'Extra Chips', 50,\n//(247, 4, 'Add Roll', 50,\n//(248, 4, 'Add Apple', 50,\n//(316, 4, 'Greek Yogurt, Granola, and Mixed Berry Parfait with apple',\n//(317, 4, 'Cup of Fruit', 300,\n//(318, 4, 'Superfruit Smoothie with Greek Yogurt',\n//(319, 4, 'Mango Smoothie with Greek yogurt',\n//(320, 4, 'Green Passion Smoothie',\n//(321, 4, 'Peach and Blueberry Smoothie with Almond Milk',\n//(322, 4, 'Strawberry Smoothie with Greek Yogurt',\n//(323, 4, 'Grilled Cheese Sandwich and apple',\n//(324, 4, 'Half Seasonal Greens Salad with Chicken and apple', 650,\n//(325, 4, 'Half Caesar Salad with Chicken and apple', 650,\n//(326, 4, 'Half Greek Salad with Chicken with roll', 650,\n//(327, 4, 'Half Caesar Salad with chicken and roll', 650,\n//(328, 4, 'Half Seasonal Greens Salad with Chicken and roll', 650,\n//(350, 4, 'Half Greek Salad with Chicken with apple', 650,\n\n $menuitem = MenuItem::create([\n 'provider_id' => 5, //chick\n 'item_name' => 'Grilled Chicken Sub, Fruit Cup',\n 'description' => 'Chilled Grilled Chicken Sub Sandwich with Fruit Cup',\n 'price' => 550,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 5,\n 'item_name' => 'Grilled Chicken Sub, Chips',\n 'description' => 'Chilled Grilled Chicken Sub Sandwich with Chips',\n 'price' => 500,\n ]);\n//(19, 5, 'Chicken Salad Cup, fruit cup', 550, 0,\n//(20, 5, 'Chicken Sandwich, fruit cup', 550,\n//(21, 5, 'Chicken Sandwich, chips',\n//(22, 5, '4 Chicken Nuggets, fruit cup', 350,\n//(23, 5, '4 Chicken Nuggets, chips', 300,\n//(24, 5, '6 Chicken Nuggets, fruit cup', 450,\n//(25, 5, '6 Chicken Nuggets, chips', 400,\n//(26, 5, '8 Chicken Nuggets, fruit cup', 550,\n//(27, 5, '8 Chicken Nuggets with chips',\n//(64, 5, 'Grilled Chicken Cool Wrap with Chips',\n//(65, 5, 'Chilled Grilled Chicken Sub Sandwich with Chips',\n//(66, 5, 'Veggie Wrap with Chips',\n//(167, 5, 'Small Super Food Salad with Chips', 400,\n//(168, 5, 'Large Superfood Salad with Chips',\n//(169, 5, 'Small Super Food Salad with Fruit Cup', 450,\n//(171, 5, 'Large Superfood Salad with Fruit Cup', 550,\n//(172, 5, 'Chilled Grilled Chicken Sub Sandwich with Fruit Cup', 550,\n//(173, 5, 'Grilled Chicken Cool Wrap with Fruit Cup', 550,\n//(174, 5, 'Veggie Wrap with Fruit Cup', 550,\n//(175, 5, 'Greek Yogurt Parfait with Chips',\n//(176, 5, 'Greek Yogurt with Fruit Cup',\n//(177, 5, 'Side Salad with Chips', 400,\n//(178, 5, 'Side Salad with Fruit Cup', 450,\n//(179, 5, 'Extra Four Piece Nugget', 200,\n//(180, 5, 'Extra Chicken Sandwich', 400,\n//(330, 5, 'Small Side of Baked Beans with chips', 350,\n//(331, 5, 'Large Side of Baked Beans with chips',\n//(332, 5, 'Small Mac and Cheese with Chips', 300,\n//(333, 5, 'Medium Mac and Cheese with chips', 350,\n//(334, 5, 'Large Mac and Cheese with chips',\n//(335, 5, 'Spicy Chicken Sandwich and fruit cup', 550,\n//(336, 5, 'Spicy Chicken Sandwich and chips',\n//(337, 5, 'Large Mac and Cheese with Fruit Cup', 550,\n//(338, 5, 'Large side of Baked Beans with Fruit Cup', 550,\n//(339, 5, 'Medium Mac and Cheese with Fruit Cup', 400,\n//(340, 5, 'Small Mac and Cheese with Fruit Cup', 350,\n//(341, 5, 'Small Side of Baked Beans with Fruit Cup', 400,\n//(249, 5, 'Extra Chips', 50,\n//(256, 5, 'Add Fruit Cup', 300,\n\n $menuitem = MenuItem::create([\n 'provider_id' => 6, //elmers\n 'item_name' => 'Cheeseburger w/ chips',\n 'description' => 'Cheeseburger (lettuce and tomato on the side) with chips, cheese, and salsa',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 6,\n 'item_name' => 'Hamburger w/ chips',\n 'description' => 'Hamburger (lettuce and tomato on the side) with chips, cheese, and salsa',\n 'price' => 500,\n ]);\n//(30, 6, 'Chicken Mini Burro with Chips, Cheese, and Salsa',\n//(31, 6, 'Machaca Mini Burro with Chips, Cheese, and Salsa',\n//(32, 6, 'Bean and Cheese Burrito with Chips, Cheese, and Salsa',\n//(33, 6, 'Three Chicken Taquitos with Chips, Cheese, and Salsa',\n//(34, 6, 'Three Beef Taquitos with Chips, Cheese, and Salsa',\n//(35, 6, 'Two Beef Fried Tacos with Chips, Cheese, and Salsa',\n//(36, 6, 'Two Chicken Fried Tacos with Chips, Cheese, and Salsa',\n//(37, 6, 'Cheese Quesadilla with Chips, Cheese, and Salsa',\n//(70, 6, '2 Cheese Enchiladas with Chips, Cheese, and Salsa',\n//(71, 6, 'Mini Beef Chimis with Chips, Cheese, and Salsa',\n//(72, 6, 'Mini Chicken Chimis with Chips, Cheese, and Salsa',\n//(73, 6, 'Mini Red Chili Burro with Chips, Cheese, and Salsa',\n//(74, 6, 'Garden Salad with Chips, Cheese, and Salsa',\n//(250, 6, 'Extra Chips', 50,\n//(311, 6, 'Hamburger (lettuce and tomato on the side) with chips, cheese, and salsa',\n//(312, 6, 'Cheeseburger (lettuce and tomato on the side) with chips, cheese, and salsa',\n//(313, 6, 'Corndog with chips, cheese, and salsa',\n//(314, 6, 'Side of Rice and side of Beans with chips, cheese, and salsa',\n//(315, 6, 'Side of Guacamole with chips, cheese, and salsa',\n\n $menuitem = MenuItem::create([\n 'provider_id' => 7, //floridinos\n 'item_name' => 'Side Salad',\n 'description' => 'Side Salad with Ranch or Italian dressing (Italian is gluten free)',\n 'price' => 300,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 7,\n 'item_name' => 'Pepperoni Pizza Muffins (4)',\n 'description' => 'Pepperoni Pizza Muffins (4) with marinara dipping sauce',\n 'price' => 500,\n ]);\n//(46, 7, 'Cheese Pizza Muffins (4) with ranch dipping sauce',\n//(47, 7, 'Pepperoni Pizza Muffins (4) with marinara dipping sauce',\n//(80, 7, 'Gluten Free Pasta with Marinara',\n//(81, 7, 'Ziti with Alfredo Sauce and Roll',\n//(82, 7, 'Side Salad with Ranch or Italian dressing (Italian is gluten free)', 300,\n//(188, 7, 'Ziti with Marinara and roll',\n//(189, 7, 'Ziti with butter and roll',\n//(215, 7, 'Cheese Pizza Muffins (4) with marinara dipping sauce',\n//(216, 7, 'Pepperoni Pizza Muffins (4) with ranch dipping sauce',\n//(252, 7, 'Extra Chips', 50,\n\n $menuitem = MenuItem::create([\n 'provider_id' => 8, //firehouse\n 'item_name' => 'Grilled Cheese, Turkey, Broccoli Cheese Soup',\n 'description' => 'Grilled Cheese with Turkey and Tomato and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Grilled Cheese, Turkey, Chicken Soup',\n 'description' => 'Half Grilled Cheese with Turkey and Tomato and Chicken Noodle Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup1',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup2',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup3',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup4',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup5',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup6',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup7',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup8',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup9',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup10',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup11',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup12',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup13',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup14',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup15',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup16',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup17',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup18',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup19',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup20',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup21',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup22',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup23',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup24',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup25',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup26',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup27',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup28',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup29',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup30',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup31',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup32',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup33',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup34',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup35',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup36',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup37',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup38',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 8,\n 'item_name' => 'Side Salad, Broccoli Soup39',\n 'description' => 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n 'price' => 500,\n ]);\n //(149, 33, 'Cold Ham and Provolone Sub',\n//(150, 33, 'Cold Turkey and Provolone Sub',\n//(151, 33, 'Hot Meatball Sub',\n//(152, 33, 'Hot Grilled Cheese',\n//(160, 33, 'Beef Chili with Saltines',\n//(185, 33, 'Side Salad with Ranch', 400,\n//(186, 33, 'Cold Ham and Provolone Sub (Meat and Cheese Only)',\n//(187, 33, 'Cold Turkey and Provolone Sub (Meat and Cheese Only)',\n//(251, 33, 'Extra Chips', 50,\n//(258, 33, 'Chicken Noodle Soup',\n//(261, 33, 'Half Turkey Sub and Chicken Noodle Soup',\n//(262, 33, 'Half Ham Sub and Chicken Noodle Soup',\n//(263, 33, 'Half Plain Turkey Sub and Chicken Noodle Soup',\n//(264, 33, 'Half Plain Ham Sub and Chicken Noodle Soup',\n//(265, 33, 'Half Grilled Cheese and Chicken Noodle Soup',\n//(285, 33, 'Side Salad with Ranch and Broccoli Cheese Soup',\n//(286, 33, 'Side Salad with Ranch and Chicken Noodle Soup',\n//(287, 33, 'Half Grilled Cheese and Broccoli Cheese Soup',\n//(288, 33, 'Half Plain Ham Sub and Broccoli Cheese Soup',\n//(289, 33, 'Half Ham Sub with Broccoli Cheese Soup',\n//(290, 33, 'Half Plain Turkey Sub and Broccoli Cheese Soup',\n//(291, 33, 'Half Turkey Sub with Broccoli Cheese Soup',\n//(292, 33, 'Broccoli Cheese Soup',\n//(295, 33, 'Grilled Cheese with Ham and Tomato',\n//(296, 33, 'Grilled Cheese with Ham',\n//(298, 33, 'Grilled Cheese with Turkey',\n//(299, 33, 'Half Grilled Cheese with Ham and Tomato and Chicken Noodle Soup',\n//(301, 33, 'Half Grilled Cheese with Ham and Tomato and Broccoli Cheese Soup',\n//(302, 33, 'Half Grilled Cheese with Ham and Chicken Noodle Soup',\n//(304, 33, 'Half Grilled Cheese with Ham and Broccoli Cheese Soup',\n//(305, 33, 'Half Grilled Cheese with Turkey and Tomato and Chicken Noodle Soup',\n//(307, 33, 'Half Grilled Cheese with Turkey and Tomato and Broccoli Cheese Soup',\n//(308, 33, 'Half Grilled Cheese with Turkey and Chicken Noodle Soup',\n//(310, 33, 'Half Grilled Cheese with Turkey and Broccoli Cheese Soup',\n//(294, 33, 'Pepperoni and Meatball Sub',\n//(342, 33, 'Italian Sub with lettuce and tomato',\n//(343, 33, 'Italian Sub (Meat and Cheese only)',\n//(344, 33, 'Side Salad with Italian Dressing and Broccoli Cheese Soup',\n//(345, 33, 'Side Salad with Italian Dressing', 400,\n//(346, 33, 'Side Salad with Honey Mustard Dressing', 400,\n//(347, 33, 'Side Salad with Italian Dressing and Chicken Noodle Soup',\n//(348, 33, 'Side Salad with Honey Mustard Dressing and Broccoli Cheese Soup',\n//(349, 33, 'Side Salad with Honey Mustard Dressing and Chicken Noodle Soup',\n\n $menuitem = MenuItem::create([\n 'provider_id' => 9,\n 'item_name' => 'Sweet & Sour Chicken, white rice',\n 'description' => 'Gluten Free Sweet and Sour Chicken with white rice',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 9,\n 'item_name' => 'Sweet & Sour Chicken, brown rice',\n 'description' => 'Gluten Free Sweet and Sour Chicken with brown rice',\n 'price' => 500,\n ]);\n//(181, 34, 'Gluten Free Chopped Chicken Salad',\n//(200, 34, 'Honey Seared Chicken with white rice',\n//(201, 34, 'Honey Seared Chicken with brown rice',\n//(202, 34, 'Honey Seared Chicken with noodles',\n//(204, 34, 'Teryaki Chicken with white rice',\n//(205, 34, 'Teryaki Chicken with brown rice',\n//(206, 34, 'Teryaki Chicken with noodles',\n//(208, 34, 'Sweet and Sour Chicken with white rice',\n//(209, 34, 'Sweet and Sour Chicken with brown rice',\n//(210, 34, 'Sweet and Sour Chicken with noodles',\n//(212, 34, 'Gluten Free Sweet and Sour Chicken with white rice',\n//(214, 34, 'Gluten Free Sweet and Sour Chicken with brown rice',\n//(255, 34, 'Extra Chips', 50,\n//(329, 34, 'Half Order of Lettuce Wraps',\n\n\n $menuitem = MenuItem::create([\n 'provider_id' => 10,\n 'item_name' => 'Chicken Salad on Croissant',\n 'description' => 'Chicken Salad with Almonds and Pineapple on All Butter Croissant',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 10,\n 'item_name' => 'Chicken Salad on Wheat Wrap',\n 'description' => 'Chicken Salad with Almonds and Pineapple on Organic Wheat Wrap',\n 'price' => 500,\n ]);\n//(165, 35, 'Nitrate Free Ham on All Butter Croissant',\n//(190, 35, 'Roasted Turkey Breast on All Butter Croissant',\n//(191, 35, 'Chicken Salad with Almonds and Pineapple on All Butter Croissant',\n//(192, 35, 'Vegetarian: Spinach Veggie Wrap',\n//(193, 35, 'Chicken Salad with Almonds and Pineapple on Organic Wheat Wrap',\n//(194, 35, 'Chicken Salad with Almonds and Pineapple on Telera Bun',\n//(195, 35, 'Nitrate Free Ham on Organic Wheat Wrap',\n//(196, 35, 'Nitrate Free Ham on Telera Bun',\n//(197, 35, 'Roasted Turkey Breast on Organic Wheat Wrap',\n//(198, 35, 'Roasted Turkey Breast on Telera Bun',\n//(253, 35, 'Extra Chips', 50,\n\n $menuitem = MenuItem::create([\n 'provider_id' => 11,\n 'item_name' => '(2) Turkey Slider Sandwiches',\n 'description' => 'Slider Sandwiches (2) with Turkey and Cheese with lettuce and tomato',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 11,\n 'item_name' => '(2) Plain Pepperoni Sliders',\n 'description' => 'Slider Sandwiches (2) with Pepperoni and Cheese- Plain',\n 'price' => 500,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 11,\n 'item_name' => '(2) Lettuce, Tomato, Pepperoni Sliders',\n 'description' => 'Slider Sandwiches (2) with Pepperoni and Cheese- lettuce and tomato',\n 'price' => 500,\n ]);\n//(217, 36, 'Slider Sandwiches (2) with Ham and Cheese- Plain',\n//(218, 36, 'Slider Sandwiches (2) with Turkey and Cheese- Plain',\n//(219, 36, 'Slider Sandwiches (2) with Turkey and Cheese with lettuce and tomato',\n//(220, 36, 'Slider Sandwiches (2) with Pepperoni and Cheese- Plain',\n//(221, 36, 'Slider Sandwiches (2) with Pepperoni and Cheese- lettuce and tomato',\n//(222, 36, 'Sub with Ham and Cheese- Plain',\n//(223, 36, 'Sub with Ham and Cheese- lettuce and tomato',\n//(224, 36, 'Sub with Turkey and Cheese- Plain',\n//(225, 36, 'Sub with Turkey and Cheese- lettuce and tomato',\n//(226, 36, 'Sub with Pepperoni and Cheese- Plain',\n//(227, 36, 'Sub with Pepperoni and Cheese- lettuce and tomato',\n//(228, 36, 'Small Gluten Free Chicken Salad',\n//(229, 36, 'Small Oriental Chicken Salad',\n//(230, 36, 'Small Cobb Salad',\n//(231, 36, 'Cup of Carrot and Celery Sticks in Ranch', 350,\n//(232, 36, 'Fruit Cup', 350,\n//(233, 36, 'Yogurt Parfait', 350,\n//(166, 36, 'Slider Sandwiches (2) with Ham and Cheese, lettuce and tomato',\n//(254, 36, 'Extra Chips', 50,\n\n $menuitem = MenuItem::create([\n 'provider_id' => 12,\n 'item_name' => 'Baja Chicken Burrito, Chips',\n 'description' => 'Baja Chicken Burrito with Chips and Salsa',\n 'price' => 600,\n ]);\n $menuitem = MenuItem::create([\n 'provider_id' => 12,\n 'item_name' => 'Chipotle Salad, Chicken',\n 'description' => 'Chipotle Ranch Salad with Grilled Chicken',\n 'price' => 600,\n ]);\n//(270, 37, 'Chicken Tacos (2) with chips',\n//(271, 37, 'Kids Cheese Quesadilla', 350,\n//(272, 37, 'Steak Tacos (2) with Chips', 500,\n//(273, 37, 'Kids Quesadilla with Chicken', 400,\n//(274, 37, 'Kids Bean and Cheese Burrito', 350,\n//(275, 37, 'Chicken Taco (1)', 350,\n//(276, 37, 'Steak Taco (1)', 350,\n//(277, 37, 'Baja Chicken Burrito with Chips and Salsa', 600,\n//(278, 37, 'Chipotle Ranch Salad with Grilled Chicken', 600,\n//(279, 37, 'Chipotle Ranch Salad with Black Beans', 600,\n//(280, 37, 'California Bowl with Grilled Chicken', 600,\n//(281, 37, 'California Bowl with Grilled Veggies', 550,\n//(282, 37, 'Side of Chips and Salsa', 150,\n//(283, 37, 'Kids Churro', 150,\n//(293, 37, 'Extra Chips', 50,\n }", "public function menu() {\n\t\treturn $this->getteams();\n\t}", "public static function returnMenu() {\n return array(\n array(\n 'title' => 'Eve - лица',\n 'link' => self::$group . '/' . 'faces',\n 'class' => 'fa-list-alt',\n 'permit' => 'view',\n ),\n );\n }", "function _spacesoghome_menu_default_items() {\n $items = array();\n\n $items[] = array(\n 'title' => 'Home',\n 'path' => 'front',\n 'weight' => '0',\n 'description' => 'A simple front page.',\n );\n // Translatables\n array(\n t('A simple front page.'),\n t('Home'),\n );\n\n\n return $items;\n}", "function get_menu_items($title) {\n\t$items['home.php'] = \"Home\";\n\t$items['play_trivia.php'] = \"Play Trivia\";\n\t$items['view_leaders.php'] = \"View Leader Board\";\n\t$items['rank_question.php'] = \"Rank Questions\";\n\t$items['insert_question.php'] = \"Insert Question\";\n\t\n\tif ($_SESSION['admin']) {\t\n\t\t$items['insert_user.php'] = \"Delete User\";\n\t\t$items['delete_question.php'] = \"Delete Question\";\n\t}\t\t\n\t$items['logout.php'] = \"Logout\";\n\t\t\n\tforeach ($items as $key=>$value) {\n\t\t$active = '';\n\t\tif ($value==$title) $active = \"active\";\n\t\t$menu_items .= '\n\t\t <li class=\"nav-item\">\n\t\t <a class=\"nav-link '.$active.'\" href=\"'.$key.'\">'.$value.'</a>\n\t\t </li>\n\t\t';\n\t}\n\treturn $menu_items;\n}", "public function getMenuItems() {\n\n $url = $this->urlHelper;\n $items = [];\n\n //Links Visible always to everyone logged in or not.\n //default Home page - no login required. \n\n /* $items[] = [\n 'id' => 'home',\n 'label' => 'Home',\n 'link' => $url('home')\n ]; */\n\n //add links here for pages that will be visible for all users logged-in or not.\n //you must adjust User\\Module.php (~line 85) onDispatch method to ignore calls for \n //the associated Controller and action or you will end up with an infinite loop.\n /*\n $items[] = [\n 'id' => 'about',\n 'label' => 'About',\n 'link' => $url('about')\n ];\n */\n\n $user = $this->authManager->getLoggedInUser();\n\n //BEGIN Authentication/Rendering Logic\n // Display \"Login\" menu item for not authorized user only. On the other hand,\n // display \"Admin\" and \"Logout\" menu items only for authorized users and any other links \n // that should be visible by logged-in users.\n if (!$user) {\n\n $items[] = [\n 'id' => 'login',\n 'label' => 'Sign in',\n 'link' => $url('login'),\n 'float' => 'right'\n ];\n } else {\n\n //render Customers link for all users with sales_attr_id value in users table\n if (!empty($user->getSales_attr_id())) {\n $items[] = [\n 'id' => 'customers',\n 'label' => 'Customers',\n 'data-ffm-salesperson' => $user->getFullName(),\n 'float' => 'static',\n 'link' => $url('customer', ['action' => 'view', 'id' => $user->getSales_attr_id()])\n ];\n }\n //only display admin drop down for admin users.\n $isAdmin = $this->authManager->isAdmin();\n if ($isAdmin) {\n $items[] = [\n 'id' => 'admin',\n 'label' => '<i class=\"ion-gear-a\"></i>',\n 'float' => 'right',\n 'dropdown' => [\n [\n 'id' => 'users',\n 'label' => 'Manage Users',\n 'link' => $url('users')\n ]\n ]\n ];\n }\n\n $settingsDropDownManageAccount = [\n 'id' => 'manage_account',\n 'label' => 'Manage Account',\n 'link' => $url('users', ['action' => 'edit', 'id' => $user->getId()])\n ];\n\n $settingsDropDownViewAccount = [\n 'id' => 'view_account',\n 'label' => 'View Account',\n 'link' => $url('application', ['action' => 'settings'])\n ];\n\n $settingsDropDownLogout = [\n 'id' => 'logout',\n 'label' => 'Logout',\n 'link' => $url('logout')\n ];\n\n $settingsDropDown = [];\n\n //only add the Manage Account link for Admins.\n if ($isAdmin) {\n $settingsDropDown[] = $settingsDropDownManageAccount;\n }\n\n $settingsDropDown[] = $settingsDropDownViewAccount;\n\n $settingsDropDown[] = $settingsDropDownLogout;\n\n $items[] = [\n 'id' => 'settings',\n 'label' => '<i class=\"ion-person\"></i>' . $user->getUsername(),\n 'float' => 'right',\n 'dropdown' => $settingsDropDown\n ];\n\n $loggedInItems = $this->getLoggedInItems();\n\n if ($loggedInItems)\n array_merge($items, $loggedInItems);\n\n // add items to right of settings in top right corner only for logged-in users here\n //Show Salespeople link only to Admin users\n if ($isAdmin) {\n\n $items[] = [\n 'id' => 'salespeople',\n 'label' => 'Salespeople',\n 'float' => 'static',\n 'link' => $url('salespeople', ['action' => 'index']),\n ];\n }\n }\n\n return $items;\n }", "function getItems();", "function getItems();", "public static function informasjonsMeny() {\n if( !get_option('UKM_menu') ) {\n return 'false';\n }\n\n $menu = wp_get_nav_menu_object( get_option('UKM_menu') );\n $menu_items = wp_get_nav_menu_items( $menu );\n\n $items = [];\n foreach( $menu_items as $menu_item ) {\n $postData = self::_getPostFromId( $menu_item->object_id );\n $items[] = self::_getPostDataFromWPOOPost( $postData );\n }\n\n return $items;\n }", "function get_hostel_food_menu()\n\t {\n\t\t$today_date = date(\"d-m-Y\");\n\t\t$today_day = date('l', strtotime($today_date));\n\t\t$week_days = array('Monday', 'Tuesday', 'Wednesday','Thursday','Friday','Saturday','Sunday');\n\t\t$temp_array = array_search($today_day,$week_days);\n\t\t\n\t\t$start_date = strtotime(date(\"d-m-Y\", strtotime($today_date)) . '-'.$temp_array.'day');\n\t\t$end_date = strtotime(date(\"d-m-Y\",$start_date) . \" +5 day\");\n\t\t\n\t\t$food_list \t= $this ->ObjM->food_list($start_date,$end_date);\n\t\t//echo $this->db->last_query(); exit;\n\t\t\n\t\tif(count($food_list)<1){\n\t\t\t$json_arr[]=array('validation'=>'false');\t\n\t\t\techo json_encode($json_arr);\n\t\t\texit;\t \n\t\t}\n\t\t\n\t\tfor($i=0;$i<count($food_list);$i++){\n\t\t $food_date = date('d-m-Y',$food_list[$i]['date']);\t\n\t\t\t\n\t\t $json_arr[]=array(\n\t\t\t\t\t'date'\t\t\t\t=>\t$food_date,\n\t\t\t\t\t'day'\t\t\t\t=>\t$food_list[$i]['day'],\n\t\t\t\t\t'lunch'\t\t\t\t=>\t$food_list[$i]['food_name'],\n\t\t\t\t\t'dinner'\t\t\t=>\t$food_list[$i]['dinner_name'],\n\t\t\t\t\t'validation'\t \t=>\t'true' );\n\t\t }\n\t\t echo json_encode($json_arr);\n\t\t\texit;\n\t }", "function _scholar_polls_menu_default_items() {\n $items = array();\n\n $items[] = array(\n 'title' => 'Polls',\n 'path' => 'polls',\n 'weight' => '0',\n 'description' => 'List of polls in my site',\n );\n // Translatables\n array(\n t('List of polls in my site'),\n t('Polls'),\n );\n\n\n return $items;\n}", "function erp_menu() {\n $menu = [];\n return apply_filters( 'erp_menu', $menu );\n}", "function _quick_menu () {\n\t\t$menu = array(\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> ucfirst($_GET[\"object\"]).\" main\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"],\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> \"\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"],\n\t\t\t),\n\t\t);\n\t\treturn $menu;\t\n\t}", "public function getItems()\n {\n //$urlManager = Yii::$app->urlManager->createUrl();\n $menuItems = [\n 'items' => $this->prepareRawTree()->prepareHasChilds()->getWidgetFormatedArray(),\n 'options' => [\n 'id' => 'left-menu',\n 'class' => 'nav nav-sidebar sortable'\n ],\n 'linkTemplate' => '<a href=\"{url}\">{label_prefix}{label}{label_postfix}</a>',\n 'submenuTemplate' => \"\\n<ul class='sortable nav nav-{level}-level'>\\n{items}\\n</ul>\\n\",\n ];\n //print_r($menuItems);\n return $menuItems;\n }", "public function index()\n {\n return $this->menu->all();\n }", "function _quick_menu () {\n\t\t$menu = array(\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> ucfirst($_GET[\"object\"]).\" main\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"],\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> \"Create common poll\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"].\"&action=create_poll\",\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> \"\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"],\n\t\t\t),\n\t\t);\n\t\treturn $menu;\t\n\t}", "public function menu_get_names()\n {\n return menu_get_names();\n }", "public function getMenu(){\n\n\t\treturn $this->get();\n\t}", "public function getMenuItems()\n {\n return $this->adminMenu->all();\n }", "function showCatMenu() {\n\t\t$template['list'] = $this->cObj2->getSubpart($this->templateCode,'###TEMPLATE_CATMENU_MAIN###');\n\t\t$markerArray = array();\n\t\t$markerArray['###ITEMS###'] = $this->displayCatMenu();\n\n\t\t$content = $this->cObj2->substituteMarkerArrayCached($template['list'], $markerArray);\n\t\treturn $content;\n\t}", "public abstract function getMenuData(): array;", "public function items()\n {\n return $this\n ->hasMany('\\Pageblok\\Menus\\Models\\MenuItem', 'menu_ref')\n ->where('published', true)\n ->orderBy('priority', 'ASC');\n }", "public static function getMenus()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true)\n\t\t\t->select('a.*, SUM(b.home) AS home')\n\t\t\t->from('#__menu_types AS a')\n\t\t\t->join('LEFT', '#__menu AS b ON b.menutype = a.menutype AND b.home != 0')\n\t\t\t->select('b.language')\n\t\t\t->join('LEFT', '#__languages AS l ON l.lang_code = language')\n\t\t\t->select('l.image')\n\t\t\t->select('l.sef')\n\t\t\t->select('l.title_native')\n\t\t\t->where('(b.client_id = 0 OR b.client_id IS NULL)');\n\n\t\t// Sqlsrv change\n\t\t$query->group('a.id, a.menutype, a.description, a.title, b.menutype,b.language,l.image,l.sef,l.title_native');\n\n\t\t$db->setQuery($query);\n\n\t\ttry\n\t\t{\n\t\t\t$result = $db->loadObjectList();\n\t\t}\n\t\tcatch (RuntimeException $e)\n\t\t{\n\t\t\t$result = array();\n\t\t\tJFactory::getApplication()->enqueueMessage(JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');\n\t\t}\n\n\t\treturn $result;\n\t}", "public function get_menu()\r\n {\r\n return '';\r\n }", "public static function menus(): array\n {\n return [];\n }", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "protected function getTopmenuItems()\n {\n $items = array();\n\n if (APP_User::isBWLoggedIn()) {\n $username = isset($_SESSION['Username']) ? $_SESSION['Username'] : '';\n $items[] = array('profile', 'members/'.$username, $username, true);\n }\n // $items[] = array('searchmembers', 'searchmembers/index', 'FindMembers');\n // $items[] = array('forums', 'forums', 'Community');\n // $items[] = array('groups', 'bw/groups.php', 'Groups');\n // $items[] = array('gallery', 'gallery', 'Gallery');\n $items[] = array('getanswers', 'about', 'GetAnswers');\n $items[] = array('findhosts', 'findmembers', 'FindHosts');\n $items[] = array('explore', 'explore', 'Explore');\n if (APP_User::isBWLoggedIn()) {\n $items[] = array('messages', 'messages', 'Messages');\n }\n \n return $items;\n }", "protected function getMenuItems()\n {\n return $this->getService('config')->get()['menu']['admin'];\n }", "function get__menu($terms, $isotope = true) {\n\n\t# Vars \n\t$html = '';\n\t$count = count($terms);\n\n\tif ($count > 0) {\n\t\tif ($isotope) {\n\t\t\t$html .= '<ul class=\"menu--utility\">';\n\t\t\t$html .= '<li class=\"menu__item filter__item iso--filter\" data-filter=\"*\">All</li>';\n\t\t\tforeach ($terms as $term) {\n\t\t\t\t$filter__type = 'filter--' . camelCase(strtolower($term->slug));\n\t\t\t\t$html .= '<li class=\"menu__item filter__item iso--filter\" data-filter=\".' . $filter__type . '\" id=\"' . $filter__type . '\">' . $term->name . '</li>';\n\t\t\t}\n\t\t\t$html .= '</ul>';\n\t\t}\n\n\t\t# Need to refine this later\n\t\telse {\n\t\t\t$html .= '<ul class=\"menu--utility\">';\n\t\t\tforeach ($terms as $term) {\n\t\t\t\t$html .= '<li class=\"menu__item filter__item\">';\n\t\t\t\t$html .= '<a href=\"#\">';\n\t\t\t\t$html .= 'Link';\n\t\t\t\t$html .= '</a>';\n\t\t\t\t$html .= '</li>';\n\t\t\t}\n\t\t\t$html .= '</ul>';\n\t\t}\n\n\t\treturn $html;\n\t}\n\n\telse {\n\t\treturn false;\n\t}\n}", "public function getSubItems()\n {\n return $this->getDataValue($this->getSubmenuName());\n }", "public function getMenuItems($parameters)\r\n {\r\n $user =& JFactory::getUser();\r\n $db =& JFactory::getDBO();\r\n \r\n $pastor = getPastor($user->id);\r\n $num_requests = getRequests($pastor->id);\r\n $items = '';\r\n \r\n if(!$user->guest) {\r\n if($parameters->get('showDivineCall') && $num_requests) {\r\n $items .= '<a class=\"pathway\" href=\"' . JRoute::_('index.php?option=com_devotions&view=divinecall') . '\" style=\"background-image: none\">Divine Call <span style=\"color: red; background-color: #fff; padding: 1px 9px 2px 9px; border-radius: 9px; -moz-border-radius: 9px; -webkit-border-radius: 9px;\">'. $num_requests . '</span> </a>';\r\n }\r\n elseif($parameters->get('showDivineCall')) {\r\n $items .= '<a class=\"pathway\" href=\"' . JRoute::_('index.php?option=com_devotions&view=divinecall') . '\" style=\"background-image: none\">Divine Call</a>';\r\n } \r\n }\r\n \r\n return $items;\r\n }", "public function getMenupaiIdOptions(){\n $menuItens = MenuItem::lists('titulo','id');\n $menuItens[0] = 'Nenhum';\n \n return $menuItens;\n }", "public function prefsMenu()\n {\n return Beatnik::getMenu();\n }", "function getMenu($type = 'list') {\n global $sess_id, $membership_id;\n\n $db = $this->getDb();\n $array = array();\n\n if (isset($sess_id)) {\n $items = generate_main_menu_list('members', $membership_id); \n } else {\n $items = generate_main_menu_list('main'); \n }\n\n if ($type == 'items') {\n return $items; \n }\n\n\n foreach ($items as $item) {\n $array[] = _render_link($item);\n }\n\n if ($type == 'list') {\n $menu = '';\n foreach ($array as $item) {\n $menu .= \"<li>$item</li>\\n\";\n } \n $menu =\"<ul>\\n$menu</li>\\n\";\n } else {\n $menu = $array;\n }\n\n return $menu;\n }", "public function getUserMenu() {\n $event = new BuildUserMenuEvent();\n $this->trigger(self::EVENT_BUILD_USER_MENU, $event);\n $menu = [];\n foreach ($event->items as $block => $items) {\n foreach ($items as $item) {\n $menu[] = $item;\n }\n }\n return $menu;\n }", "public function getMenus(){\n\n }", "protected function menus()\n {\n\n }", "public function getQueryMenus();", "function get_admin_menu_items()\n\t{\n\t\t$default = array($this->get_friendly_name(), $this->get_admin_description(), 'defaultadmin', $this->get_admin_section());\n\t\treturn array($default);\n\t}", "public function getMenuItems()\n\t{\n\t\treturn Settings_Vtiger_MenuItem_Model::getAll($this->getId());\n\t}", "function Dates_Menu()\n {\n $args=$this->CGI_URI2Hash();\n unset($args[ \"Place\" ]);\n\n return $this->DatesObj()->MyMod_Items_Menu($args,$this->Dates(),\"Date\",$idkey=\"ID\",$titlekey=\"Title\");\n }", "public function menuItems($items)\n {\n $result = '';\n\n foreach ($items as $key => $options) {\n $class = '';\n $icon = 'fa fa-menu fa-chevron-right';\n $url = $options;\n $linkOptions = ['escape' => false];\n\n if (is_array($options)) {\n $icon = Hash::get($options, 'icon', $icon);\n $url = Hash::get($options, 'url', '#');\n $class = Hash::get($options, 'class', '');\n $title = Hash::get($options, 'title', '');\n\n $linkOptions = array_merge($linkOptions, Hash::get($options, 'options', []));\n } else {\n $title = $key;\n }\n\n $link = $this->Html->link(\n $this->Html->tag('i', '', ['class' => $icon]) . __($title),\n $url,\n $linkOptions\n );\n\n $result .= $this->Html->tag('li', $link, ['class' => $class]);\n }\n\n return $result;\n }", "function getMenu(){\n\t\t$sql = \"SELECT tl.TenTL, tl.TenKhongDauTL, GROUP_CONCAT(gd.MaGD,':', gd.TenGD,':', gd.TenKhongDauGD) AS GiaiDoan FROM theloai tl INNER JOIN giaidoan gd ON tl.MaTL = gd.MaTL GROUP BY tl.MaTL\";\n\t\t$this->setQuery($sql);\n\t\treturn $this->loadAllRows();\n\t}", "protected function buildMenuArray() {}", "static public function getMenu() {\n $query = mysql_query(\"SELECT `menu` FROM `info` WHERE `id` = '0'\");\n return mysql_result($query, 0, 'menu');\n }", "public static function returnMenu() {\n }", "function erp_get_menu_headers() {\n $menu = [];\n return apply_filters( 'erp_menu_headers', $menu );\n}", "private function PH_PageMenu(){\n $site_menu = self::$xvi_api->GetSiteMenu();\n $page_menu = self::$xvi_api->GetPageMenu();\n \n $menu =\"\";\n foreach($site_menu as $menu_item=>$menu_path) {\n if (strcmp($menu_item,$page_menu[\"item\"])) { /*not selected menu item*/\n $menu .= \"<li><a href=\\\"\".$menu_path.\"\\\"<span></span>\".$menu_item.\"</a></li>\";\n } else { /* it is selected menu*/\n $menu .= \"<li><a class=\\\"sel\\\" href=\\\"\".$menu_path.\"\\\"<span></span>\".$menu_item.\"</a></li>\";\n }\n }\n return $menu;\n }", "public static function getMenus()\n\t{\n\t\t$sql = \"SELECT * FROM mod_menu\";\n\t\t$query = \\SimplCMS::$app->getDbConnection()->query($sql);\n\t\treturn $query->fetchAll( \\PDO::FETCH_ASSOC );\t\t\n\t}", "protected function getMenu() {\n $lMethods = $this->allcsvfilelist();\n natcasesort($lMethods);\n \n $lInherited = get_class_methods('CCor_Cnt');\n $lMenu = new CHtm_Vmenu(lan('sys-doc.menu'));\n foreach ( $lMethods as $lMethod ) {\n if (substr($lMethod, 0, 3) != 'act')\n continue;\n /*\n * if (substr ( $lMethod, 3, 1 ) == 'S')\n * continue;\n */\n if (in_array($lMethod, $lInherited))\n continue;\n \n $lAct = substr($lMethod, 3);\n $lMenu->addItem($lMethod, 'index.php?act=sys-doc.' . strtolower($lAct), $lAct);\n }\n \n $lMenu->setKey('act' . ucfirst($this->mAct));\n return $lMenu;\n }", "function affiche_menu($menus)\n{\n foreach($menus as $key => $value) {\n echo '<li>'.$value.'</li>';\n }\n}", "public function menu()\n {\n return $this->menu;\n }", "public function menu()\n {\n return $this->menu;\n }", "public function getMenuList()\n {\n $items = array();\n\n $models = $this->findAll(array('order'=>'name ASC', 'limit'=>5));\n\n foreach ($models as $model)\n {\n $items[] = array(\n 'label'=> (Yii::app()->language == 'en') ? $model->name_en : $model->name,\n 'url'=>Yii::app()->createUrl('site/photos', array('id'=>$model->id, 'name'=>$model->name_en)),\n );\n }\n\n $items2 = array() ;\n $count = $this->count();\n $tags= $this->findAll(array('order'=>'name ASC', 'limit'=>$count - 5, 'offset'=>5));\n\n foreach($tags as $tag) {\n $items2 [] = array('label'=>(Yii::app()->language == 'en') ? $tag->name_en : $tag->name, 'url'=>Yii::app()->createUrl('site/photos', array('id'=>$tag->id, 'name'=>$tag->name_en)));\n }\n $items['items'] = array('label'=>Yii::t('mainLayout', 'More...'), 'url'=>'#',\n 'items'=>$items2, \n );\n\n return $items;\n }" ]
[ "0.76444346", "0.7385948", "0.70187247", "0.679858", "0.679512", "0.67454994", "0.67418563", "0.6710738", "0.66642994", "0.66360104", "0.660513", "0.6582421", "0.65459025", "0.65230596", "0.6520172", "0.6502722", "0.6431389", "0.64104", "0.64048654", "0.63864934", "0.63864934", "0.63864934", "0.63864934", "0.63864934", "0.63864934", "0.6380884", "0.63741183", "0.6362582", "0.6342979", "0.6342691", "0.6336996", "0.632076", "0.63187605", "0.631051", "0.63045305", "0.63035685", "0.6274801", "0.62540585", "0.62496215", "0.6248509", "0.624359", "0.624359", "0.62398815", "0.6234631", "0.6215389", "0.6214305", "0.61976546", "0.6182806", "0.6163246", "0.6162365", "0.61211395", "0.611303", "0.60903513", "0.60865545", "0.60748315", "0.6072102", "0.6070644", "0.606637", "0.6049936", "0.6034586", "0.6034586", "0.6034586", "0.6034586", "0.6034586", "0.6034586", "0.6034586", "0.6034586", "0.6034586", "0.6034586", "0.6034586", "0.6034586", "0.6034586", "0.6030302", "0.60268414", "0.60205406", "0.60191095", "0.6000978", "0.59955835", "0.5988186", "0.5980699", "0.5976296", "0.59716994", "0.5970412", "0.59698737", "0.59680617", "0.59597087", "0.5957351", "0.5945515", "0.5944362", "0.59397835", "0.5938745", "0.5933143", "0.5923388", "0.5916626", "0.5916264", "0.5910891", "0.5910156", "0.5907049", "0.5907049", "0.5897235" ]
0.62611014
37
Returns an instance of this class.
public static function getInstance() { return Doctrine_Core::getTable('Palabra'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function instance() {\n\t\treturn new self;\n\t}", "public function getInstance()\n {\n return $this;\n }", "public function instance() {\n\t\n\t\treturn $this;\n\t\n\t}", "public function getInstance(): self\n {\n return $this;\n }", "public static function getInstance() {\n return new self();\n }", "public function get_instance()\n\t{\n\t\treturn $this;\n\t}", "public function get_instance()\n\t{\n\t\treturn $this;\n\t}", "public static function getInstance()\n {\n return new self();\n }", "public static function instance() {\n\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\n\t\t}", "public static function get()\n\t{\n\t\tif(null == self::$_instance)\n\t\t{\n\t\t\treturn new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "public static function get()\n {\n if (is_null(self::$instance)) {\n self::$instance = new self();\n }\n return self::$instance;\n }", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) )\n\t\t\t\tself::$_instance = new self();\n\n\t\t\treturn self::$_instance;\n\t\t}", "public function newInstance()\n {\n return new self();\n }", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function get() \n {\n if (!isset(self::$instance)) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public static function get() {\n\t\tif ( self::$instance === null )\n\t\t\tself::$instance = new self();\n\n\t\treturn self::$instance;\n\t}", "public static function self() {\n\n\t\treturn self::factory( 'self' );\n\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function instance() {\n\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\n\t}", "public static function get() {\r\n\r\n\t\tif ( self::$instance == null ) {\r\n\t\t\tself::$instance = new self();\r\n\t\t}\r\n\r\n\t\treturn self::$instance;\r\n\r\n\t}", "public static function instance() {\n\t\t\tif ( ! self::$_instance ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance () {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function instance() {\n\t if ( !isset( self::$instance ) ) {\n\t $className = __CLASS__;\n\t self::$instance = new $className;\n\t }\n\t return self::$instance;\n\t }", "public static function self() {\n\n\t\treturn self::factory( 'self' );\n\n\t}", "public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }", "public static function instance() {\n return new static();\n }", "public static function get() {\n\t\tif ( self::$instance == null ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance () {\n\t\tif ( is_null( self::$_instance ) )\n\t\t\tself::$_instance = new self();\n\t\treturn self::$_instance;\n\t}", "public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "public static function instance()\n {\n return new static();\n }", "public static function instance()\n {\n return new static();\n }", "public static function get_instance()\n {\n if (true === empty(self::$instance)) {\n $instance = new self();\n }\n return $instance;\n }", "public static function instance() {\n\t\tstatic $instance;\n\n\t\tif ( empty( $instance ) ) {\n\t\t\t$instance = new self();\n\t\t}\n\n\t\treturn $instance;\n\t}", "public static function get_instance() {\n\n if ( ! self::$instance instanceof self ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }", "public function __construct ()\n {\n return this;\n }", "public function __construct() {\n return $this;\n }", "public static function get_instance() {\n $self = __CLASS__;\n\n if ( is_null( $self::$instance ) ) {\n $self::$instance = new $self;\n }\n\n return $self::$instance;\n }", "public static function instance() {\n\t\t\tif ( null === self::$_instance ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function instance() {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public function instance();", "public static function instance() {\n\t\tif ( !isset( self::$instance ) ) {\n\t\t\t$class_name = __CLASS__;\n\t\t\tself::$instance = new $class_name;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\r\n if ( is_null( self::$_instance ) ) {\r\n self::$_instance = new self();\r\n }\r\n return self::$_instance;\r\n }", "public static function instance() {\r\n if ( is_null( self::$_instance ) ) {\r\n self::$_instance = new self();\r\n }\r\n return self::$_instance;\r\n }", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) )\n\t\t\tself::$_instance = new self();\n\t\treturn self::$_instance;\n\t}", "public static function instance()\n {\n if (is_null(self::$_instance)) {\n self::$_instance = new self();\n }\n\n return self::$_instance;\n }", "public static function instance() {\n\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t$class_name = __CLASS__;\n\t\t\tself::$instance = new $class_name;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif ( ! self::$instance instanceof self )\r\n\t\t\t{\r\n\t\t\t\tself::$instance = new self;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn self::$instance;\r\n\t\t}", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public static function instance() {\r\n\t\tif ( is_null( self::$_instance ) ) {\r\n\t\t\tself::$_instance = new self();\r\n\t\t}\r\n\t\treturn self::$_instance;\r\n\t}", "public static function instance() {\r\n\t\tif ( is_null( self::$_instance ) ) {\r\n\t\t\tself::$_instance = new self();\r\n\t\t}\r\n\t\treturn self::$_instance;\r\n\t}", "public static function instance() {\n if(is_null( self::$_instance)){\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function instance() {\n\n\t\tif (!self::$instance) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance() {\n\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }", "public static function get_instance(){\n\t\t\tif( is_null( self::$instance ) ){\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function instance() {\n\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t$className = __CLASS__;\n\t\t\tself::$instance = new $className;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n if ( empty( self::$instance ) ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public function get_instance() {\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__);\n\t}", "public static function instance() {\n\t\tif ( empty( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public function getInstance() {\n\t\treturn $this->instance;\n\t}", "public static function getInstance() {\n\n static $instance;\n //If the class was already instantiated, just return it\n if (isset($instance))\n return $instance;\n\n $instance = new self;\n\n return $instance;\n }", "public static function make() {\n return new self();\n }", "public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__); \n\t}", "public static function instance()\n {\n return new static;\n }", "public static function instance()\n {\n return new static;\n }", "public static function instance()\n {\n if (is_null(self::$_instance)) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function instance(): self\n {\n return self::$instance ??= new self();\n }", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( ( self::$instance ) ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( ! ( self::$instance instanceof self ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}" ]
[ "0.8422614", "0.8295301", "0.8285811", "0.81871045", "0.8143881", "0.8063351", "0.8063351", "0.8055489", "0.7950293", "0.793865", "0.7891774", "0.7880838", "0.7830038", "0.7828412", "0.7828412", "0.7828412", "0.7828412", "0.7828412", "0.7828412", "0.7825756", "0.780587", "0.78047556", "0.78043765", "0.78043765", "0.7802583", "0.77903754", "0.7787871", "0.7781021", "0.7768605", "0.7767898", "0.7766817", "0.77595675", "0.7730926", "0.7728104", "0.7716915", "0.77152646", "0.77152646", "0.7707343", "0.7707343", "0.7706665", "0.7706133", "0.76993066", "0.7692347", "0.76880157", "0.76840293", "0.7683914", "0.768212", "0.768212", "0.768212", "0.7679454", "0.7679454", "0.7674896", "0.7660284", "0.7655069", "0.7655069", "0.7650083", "0.76476485", "0.764636", "0.76457775", "0.76406676", "0.76406676", "0.76406676", "0.76406676", "0.76387274", "0.76387274", "0.7634482", "0.7629432", "0.7629432", "0.7629432", "0.7629432", "0.7629432", "0.7629432", "0.7629432", "0.7629432", "0.7629432", "0.7629432", "0.7629432", "0.76287067", "0.76266134", "0.76259387", "0.7623459", "0.7622886", "0.76228714", "0.76201046", "0.76195866", "0.76164865", "0.7616179", "0.7598447", "0.7595922", "0.7586314", "0.75831777", "0.75813985", "0.75811917", "0.75811917", "0.7580553", "0.7576247", "0.7574785", "0.75714004", "0.7571144", "0.75662637", "0.75662637" ]
0.0
-1
Create a new controller instance.
public function __construct(TokenRepository $tokens) { $this->tokens = $tokens; $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Exchange the current transient API token for a new one.
public function refresh(Request $request) { $this->tokens->deleteExpiredTokens($request->user()); return response('Refreshed.')->withCookie( $this->tokens->createEncryptedTokenCookie($request->user()) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function backupCurrentToken()\n {\n $stateStorage = $this->getClient()->getStateStorage();\n\n $token = $stateStorage->get($this->getStateStorageKeyName('token'));\n $stateStorage->set($this->getStateStorageKeyName('real_token'), $token);\n }", "public function refreshToken()\n {\n $token = $this->getToken();\n }", "public function regenerateToken();", "protected function newToken(): string\n {\n $new = $this->fetchNewToken();\n\n $this->cache->put(\n $this->key,\n encrypt($new['access_token']),\n $new['expires_in'] / 60 - 1\n );\n\n return $new['access_token'];\n }", "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth('api')->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n\n\n }", "function securityUpdateToken() {\n\tif (isset($_SESSION['security_token']['time']) && $_SESSION['security_token']['time'] + TOKEN_EXPIRATION > time()) {\n\t\t$_SESSION['security_token']['time'] = time();\n\t\treturn;\n\t}\n\n\t// update the token\n\t$_SESSION['security_token'] = array();\n\t$_SESSION['security_token']['value'] = md5(time());\n\t$_SESSION['security_token']['time'] = time();\n}", "public function token() {\n\t\t$this->autoRender = false;\n\t\t$this->OAuth->setVariable('access_token_lifetime', 60);\n\t\ttry {\n\t\t\t$this->OAuth->grantAccessToken();\n\t\t} catch (OAuth2ServerException $e) {\n\t\t\t$e->sendHttpResponse();\n\t\t}\n\t}", "public function updateToken() {\n try {\n $db = Database::getInstance();\n $expirationDate = new DateTime(\"now\");\n $expirationDate->add(new DateInterval(\"P1D\"));\n $this->token_expiration = $expirationDate->format(\"Y-m-d H:i:s\");\n $this->token = generateToken();\n\n $sql = \"UPDATE `User`\n SET token = :token,\n token_expiration = :token_expiration\n WHERE username = :username\";\n $stmt = $db->prepare($sql);\n $stmt->execute([\n \"username\" => $this->username,\n \"token\" => $this->token,\n \"token_expiration\" => $this->token_expiration\n ]);\n return $this;\n } catch (PDOException $e) {\n exitError(500, \"Internal error.\");\n }\n }", "public function storeAccessToken(AccessToken $token):static;", "public function regenerateToken()\n {\n // don't do anything for destroyed sessions\n if ($this->destroyed === true) {\n return;\n }\n\n $this->prepareForWriting();\n\n // generate new token\n $tokenExpiry = $this->expiryTime;\n $tokenId = $this->sessions->store()->createId($tokenExpiry);\n $tokenKey = bin2hex(random_bytes(32));\n\n // mark the old session as moved if there is one\n if ($this->tokenExpiry !== null) {\n $this->newSession = $tokenExpiry . '.' . $tokenId;\n $this->commit();\n\n // we are now in the context of the new session\n $this->newSession = null;\n }\n\n // set new data as instance vars\n $this->tokenExpiry = $tokenExpiry;\n $this->tokenId = $tokenId;\n $this->tokenKey = $tokenKey;\n\n // the new session needs to be written for the first time\n $this->writeMode = true;\n\n // (re)transmit session token\n if ($this->mode === 'cookie') {\n Cookie::set($this->sessions->cookieName(), $this->token(), [\n 'lifetime' => $this->tokenExpiry,\n 'path' => Url::index(['host' => null, 'trailingSlash' => true]),\n 'secure' => Url::scheme() === 'https',\n 'httpOnly' => true,\n 'sameSite' => 'Lax'\n ]);\n } else {\n $this->needsRetransmission = true;\n }\n\n // update cache of the Sessions instance with the new token\n $this->sessions->updateCache($this);\n }", "private function token_update(string $token)\n {\n $this->token_created = time();\n $this->token_expires = $this->token_created + 86399;\n $this->token = $token;\n $this->headers['Authorization'] = \" Bearer {$token}\";\n\n if ($this->debug) {\n $this->debug_message('Auth token has been updated.');\n }\n }", "public function setToken()\n {\n if (session()->has('drive-access-token')) {\n $accessToken = session()->get('drive-access-token');\n $this->setAccessToken($accessToken);\n if ($this->isAccessTokenExpired()) {\n $accessToken = $this->fetchAccessTokenWithRefreshToken($this->getRefreshToken());\n session()->put('drive-access-token', $accessToken);\n }\n }\n }", "public function setPreviousToken() {\n\t\t$this->_token = $this->_previousToken;\n\t\t$this->_session->key = $this->_previousToken;\n\t}", "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth('api')->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n }", "public function refreshAccessTokenIfNecessary()\n {\n $user = auth()->user();\n // dd(json_decode($user->xero_access_token,true));\n $accessToken = new AccessToken(json_decode($user->xero_access_token,true));\n\n if ($accessToken->hasExpired()) {\n $accessToken = $this->getOAuth2()->refreshAccessToken($accessToken);\n\n $user->xero_access_token = json_encode($accessToken);\n dd(json_encode($accessToken));\n $user->save();\n $successMessage=\"New Access Token generated\";\n return $this->successResponse($user, $successMessage, 200);\n }\n $successMessage=\"Token Didn't expired\";\n return $this->successResponse($user, $successMessage, 200);\n }", "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth()->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n }", "public function refreshToken()\n\t{\n\t\tAuth::user()->generateToken()->didUpdate()->save();\n\n\t\t// Return token\n\t\treturn response()->json([\n\t\t\t'status' => 'Token updated',\n\t\t\t'token' => Auth::user()->token,\n\t\t], 200);\n\t}", "private function setToken() {\n\n /* valid register */\n $request = $this->post('/v1/register', [\n 'firstname' => 'John',\n 'lastname' => 'Doe',\n 'email' => 'john.doe@email.com',\n 'password' => 'secret',\n ]);\n\n /* valid login */\n $this->post('/v1/login', [\n 'email' => 'john.doe@email.com',\n 'password' => 'secret',\n ]);\n\n }", "public function createNewToken()\n {\n return $this->getBandrek()->generateToken();\n }", "function updateAuthSubToken($singleUseToken)\n{\n try {\n $sessionToken = Zend_Gdata_AuthSub::getAuthSubSessionToken($singleUseToken);\n } catch (Zend_Gdata_App_Exception $e) {\n print 'ERROR - Token upgrade for ' . $singleUseToken\n . ' failed : ' . $e->getMessage();\n return;\n }\n\n $_SESSION['sessionToken'] = $sessionToken;\n header('Location: ' . HOME_URL);\n}", "function new_access_token($token, $consumer) {\n // for the user associated with this token if the request token \n // is authorized \n // should also invalidate the request token \n }", "public static function set_token_access() {\n if (SesLibrary::_get('_uuid') || SesLibrary::_get('_uuid') == null) {\n $param = [\n 'uri' => config('app.base_api_uri') . '/generate-token-access?deviceid=' . SesLibrary::_get('_uuid'),\n 'method' => 'GET'\n ];\n $this->__init_request_api($param);\n }\n }", "function setSig() {\n if (sfConfig::get(\"sf_private_key\") !='') {\n \n $hash = md5(rand_str());\n $this -> context ->getLogger()->debug(\"{Theater Token Class} HASH:: \".$hash);\n putLog(\"USER:: \".$this -> sessionVar(\"user_id\").\" | MESSAGE:: TOKEN HASH:: \".$hash);\n \n $expires = strtotime(now());\n $this -> context ->getLogger()->debug(\"{Theater Token Class} EXPIRES:: \".$expires);\n putLog(\"USER:: \".$this -> sessionVar(\"user_id\").\" | MESSAGE:: TOKEN EXPIRES:: \".$expires);\n \n $code = setUserOrderTicket();\n $this -> seat -> setAudienceHmacKey( $code );\n $this -> seat -> save();\n $this -> context ->getLogger()->debug(\"{Theater Token Class} CODE:: \".$code);\n putLog(\"USER:: \".$this -> sessionVar(\"user_id\").\" | MESSAGE:: TOKEN CODE:: \".$code);\n \n /*\n\t\t\t$enc_date = encryptCookie($code, $hash.\"=\".strtotime(now()));\n $this -> context ->getLogger()->debug(\"{Theater Token Class} HMAC_SIG:: \".$enc_date);\n putLog(\"USER:: \".$this -> sessionVar(\"user_id\").\" - TOKEN HMAC_SIG:: \".$enc_date);\n \n $this -> token_raw = $hash . \"|\" . strtotime(now()) . \"|\" . $enc_date;\n $this -> context ->getLogger()->debug(\"{Theater Token Class} Set Token:: \".$this -> token_raw);\n putLog(\"USER:: \".$this -> sessionVar(\"user_id\").\" - TOKEN RAW:: \".$this -> token_raw);\n \n $this -> token = encryptCookie($code,$this -> token_raw);\n $this -> context ->getLogger()->debug(\"{Theater Token Class} Set Coookie:: \".$this -> token);\n putLog(\"USER:: \".$this -> sessionVar(\"user_id\").\" - SET COOKIE:: \".$this -> token);\n */\n \n $this -> setCookieVar( \"csth\", $code, 7 );\n return $this -> token;\n \n }\n \n }", "public function token()\n {\n // echo 'pk';\n try {\n $this->heimdall->createToken();\n } catch (Exception $exception) {\n $this->heimdall->handleException($exception);\n }\n }", "public function generateToken()\n {\n if($this->api_token == null)\n $this->api_token = str_random(60);\n $this->save();\n return $this;\n }", "abstract public function setNextAuthToken($token);", "public function generateToken() {\n // we randomly generate an API token\n $api_token = Str::random(80);\n // we check whether the generated token already exists in the users table\n $api_token_found = User::where('api_token', $api_token)->first();\n while ($api_token_found) {\n // if the generated token is already associated with a registered user, we generates a new token\n $api_token = Str::random(80);\n // we check whether also this newly generated token already exists in the users table\n $api_token_found = User::where('api_token', $api_token)->first();\n }\n // we get the logged in user\n $user = Auth::user();\n // we associate to this user the generated token (this token will certainly be different from those of the other users)\n $user->api_token = $api_token;\n $user->save();\n return redirect()->route('admin.profile');\n }", "protected function regenerateTokenIfNotNew()\n {\n if ($this->tokenExpiry !== null) {\n $this->regenerateToken();\n }\n }", "public function refreshToken()\n {\n $client = new Client();\n\n try {\n $resp = $client->request('POST', 'https://bitbucket.org/site/oauth2/access_token', [\n 'auth' => [\n env('BITBUCKET_CLIENT_ID'),\n env('BITBUCKET_SECRET')\n ],\n 'form_params' => [\n 'grant_type' => 'refresh_token',\n \"refresh_token\" => $this->sourceProvider->refresh_token\n ]\n ]);\n\n $resp = json_decode($resp->getBody()->getContents());\n\n $this->sourceProvider->access_token = $resp->access_token;\n $this->sourceProvider->refresh_token = $resp->refresh_token;\n $this->sourceProvider->save();\n\n } catch (\\Exception $e) {\n \\Log::info($e);\n }\n }", "private function fetchAccessToken(): void\n {\n $url = 'https://accounts.spotify.com/api/token';\n\n $token = Cache::remember('spotify-token', 60 * 60, function () use ($url) {\n $client = new Client;\n $response = $client->request('POST', $url, [\n 'form_params' => [\n 'grant_type' => 'client_credentials',\n ],\n 'headers' => [\n 'Authorization' => 'Basic ' . base64_encode($this->clientId . ':' . $this->clientSecret),\n 'Content-Type' => 'application/x-www-form-urlencoded',\n ],\n ]);\n\n $responseBody = json_decode((string) $response->getBody());\n\n return $responseBody->access_token;\n });\n\n $this->accessToken = $token;\n }", "public function token() {\r\n\t\t\r\n\t\t$response = $this->OAuth2->getAccessTokenData();\r\n\t\t\r\n\t\tif (empty($response)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->set($response);\r\n\t\t\r\n\t}", "public function facebookStoreToken() {\n if ( ! empty( $_GET['access_token'] ) ) {\n $this->instagramCode = $_GET['access_token'];\n update_option( self::FACEBOOK_TOKEN, $_GET['access_token'] );\n }\n }", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "protected function createNewToken($token)\n {\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth('api')->factory()->getTTL() * 60,\n 'user' => auth('api')->user()\n ]);\n }", "protected function createNewToken($token)\n {\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth()->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }" ]
[ "0.66013825", "0.64493024", "0.6220601", "0.6104572", "0.6084544", "0.5947169", "0.59288555", "0.5927942", "0.592285", "0.59034246", "0.59012026", "0.58991873", "0.58895844", "0.5868981", "0.5831067", "0.58211434", "0.5817871", "0.57795066", "0.57793534", "0.57605284", "0.57198685", "0.5711753", "0.56982666", "0.56754744", "0.56503326", "0.5636195", "0.56321806", "0.56213593", "0.5618183", "0.5616009", "0.55549425", "0.55506927", "0.5549182", "0.5549182", "0.5549182", "0.5549182", "0.5549025", "0.5533326", "0.5530463", "0.5530463", "0.5530463", "0.5530463", "0.5530463", "0.5530463", "0.5530463", "0.5530463", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.5530073", "0.55293477", "0.55293477", "0.55293477", "0.55293477", "0.55293477", "0.55293477", "0.55293477", "0.55293477", "0.55293477", "0.5528752", "0.5528752", "0.5528752" ]
0.0
-1
Display a listing of the resource.
public function index() { $products = Products::all(); return $this->returnAll($products); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request, User $user) { $rules = [ 'name' => 'required', 'brand' => 'required', 'quantity' => 'required|integer|min:1', 'approx_price' => 'required|integer|min:50', 'current_price' => 'required|integer|min:50', ]; // dd($data['user_id'] = auth('api')->user()->id); $this->validate($request, $rules); $data = $request->all(); $data['status'] = Products::AVAILABLE_PRODUCT; //$data['image'] = $request->image->store(''); // add path and name if needed $data['user_id'] = auth('api')->user()->id; $product = Products::create($data); return $this->returnOne($product, 201); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show(Products $products) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Products $products) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Products $products, User $user) { }
{ "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(Products $products) { }
{ "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
Leaving out Email for now, should fix later
function register() { global $session; $registered = $session->register($_POST['username'], $_POST['password']); //header('Location: page.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetOriginalEmail() : void;", "function reset_email()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Reset email\n\t\tif ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_new_email_activated').' '.anchor('/auth/login/', 'Login'));\n\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_new_email_failed'));\n\t\t}\n\t}", "function reset_email()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Reset email\n if ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_new_email_activated').' '.anchor('/auth/login/', 'Login'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $this->_show_message($this->lang->line('auth_message_new_email_failed'));\n }\n }", "private function emailAtLogin() {}", "function _spool_email()\n\t{\n\t\t// ------------------------------------------------------\n\t\t// 'email_send' hook.\n\t\t// - Optionally modifies and overrides sending of email.\n\t\t//\n\t\tif (ee()->extensions->active_hook('email_send') === TRUE)\n\t\t{\n\t\t\t$ret = ee()->extensions->call(\n\t\t\t\t'email_send',\n\t\t\t\tarray(\n\t\t\t\t\t'headers'\t\t=> &$this->_headers,\n\t\t\t\t\t'header_str'\t=> &$this->_header_str,\n\t\t\t\t\t'recipients'\t=> &$this->_recipients,\n\t\t\t\t\t'cc_array'\t\t=> &$this->_cc_array,\n\t\t\t\t\t'bcc_array'\t\t=> &$this->_bcc_array,\n\t\t\t\t\t'subject'\t\t=> &$this->_subject,\n\t\t\t\t\t'finalbody'\t\t=> &$this->_finalbody\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif (ee()->extensions->end_script === TRUE)\n\t\t\t{\n\t\t\t\tee()->extensions->end_script = FALSE;\n\t\t\t\treturn $ret;\n\t\t\t}\n\t\t}\n\n\t\treturn parent::_spool_email();\n\t}", "static function unwrap_email($html_email) {\n\n if (self::_has_markers($html_email)) {\n $html_email = self::unwrap_html_element($html_email);\n } else {\n //KEEP FOR OLD EMAIL COMPATIBILITY\n // Extracts only the body part\n $x = strpos($html_email, '<body');\n if ($x) {\n $x = strpos($html_email, '>', $x);\n $y = strpos($html_email, '</body>');\n $html_email = substr($html_email, $x + 1, $y - $x - 1);\n }\n\n /* Cleans up uncorrectly stored newsletter bodies */\n $html_email = preg_replace('/<style\\s+.*?>.*?<\\\\/style>/is', '', $html_email);\n $html_email = preg_replace('/<meta.*?>/', '', $html_email);\n $html_email = preg_replace('/<title\\s+.*?>.*?<\\\\/title>/i', '', $html_email);\n $html_email = trim($html_email);\n }\n\n // Required since esc_html DOES NOT escape the HTML entities (apparently)\n $html_email = str_replace('&', '&amp;', $html_email);\n $html_email = str_replace('\"', '&quot;', $html_email);\n $html_email = str_replace('<', '&lt;', $html_email);\n $html_email = str_replace('>', '&gt;', $html_email);\n\n return $html_email;\n }", "function reset_email()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Reset email\n\t\tif ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->session->set_flashdata('message',$this->lang->line('auth_message_new_email_activated'));\n\t\t\t\t\tredirect('login');\n\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->session->set_flashdata('message',$this->lang->line('auth_message_new_email_failed'));\n\t\t\t\t\tredirect('login');\n\t\t}\n\t}", "public function cancelEmail()\n {\n $this->emailUpdate = false;\n $this->email = $this->customer->email;\n }", "function resetMailer(){\r\n\tglobal $mailer;\r\n\t$mailer->ClearAllRecipients();\r\n\t$mailer->ClearAttachments();\r\n\t$mailer->ClearCustomHeaders();\r\n}", "private function clearEmailSession()\n\t{\n\t\tif (session()->has('verificationEmailSent')) {\n\t\t\tsession()->forget('verificationEmailSent');\n\t\t}\n\t}", "function removeemail($member){\n\t\t$f3=$this->f3; \n\t\t$uselog=$f3->get('uselog');\n\t\t$email_logger=$f3->new('email_log');\n\t\t$email_logger->write('in removeemail for member = '.$member->forename. ' '.$member->surname.'email was '.$member->email ,$uselog);\n\t\t\n\t\t// now check if its in use elsewhere other than this membnum\n\t\t$this->mailmanunsub($member);\n}", "private function updateEmail()\n {\n if (!LOCAL) {\n $ds = ldap_connect(\"addressbook.ic.ac.uk\");\n $r = ldap_bind($ds);\n $justthese = array(\"mail\");\n $sr = ldap_search(\n $ds,\n \"ou=People,ou=shibboleth,dc=ic,dc=ac,dc=uk\",\n \"uid=\".$this->getUser(),\n $justthese\n );\n $info = ldap_get_entries($ds, $sr);\n if ($info[\"count\"] > 0) {\n $this->setEmail($info[0]['mail'][0]);\n return ($info[0]['mail'][0]);\n } else {\n return false;\n }\n } else {\n $email = $this->getEmail();\n return $email;\n }\n }", "abstract protected function _sendMail ( );", "public function resend_email()\n\t{\t\n\t\t// figure out how to compose the body\n\t\tif ($this->that->HTML!='')\n\t\t{\n\t\t\t$body = (isset($this->that->HTML_rewritten)) ? $this->that->HTML_rewritten : $this->that->HTML;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$body = (isset($this->that->PLAIN_rewritten)) ? $this->that->PLAIN_rewritten : $this->that->PLAIN;\n\t\t}\n\n\t\t$is_not_html = $this->that->has_PLAIN_not_HTML();\n\n\t\t// get the attachment filenames\n\t\t$file_array = $this->that->get_file_name_array();\n\t\t\n\t\t// this function is in the email_send_helper\n\t\t// and requires a modified email library\n\t\t// settings for using google as the smtp machine are\n\t\t// embedded in the helper\n\t\t// you can replace this with a simpler email sender\n\t\tsend_email_by_google($this->get_list_address(),\n\t\t\t$this->get_resend_to(),\n\t\t\t$this->get_resend_cc(), \n\t\t\t$this->that->get_address_from(),\n\t\t\t$this->that->get_personal_from(),\n\t\t\t$this->that->get_subject(),\n\t\t\t$body, $is_not_html, $file_array);\n\t}", "function clearEmails() {\n\t\treturn $this->mailer->clearEmails();\n\t}", "function clearEmails() {\n\t\treturn $this->mailer->clearEmails();\n\t}", "function no_email() {\n\tob_end_clean();\n require './assets/includes/header.html';\n require './assets/includes/error.inc.php';\n $links = ['Return To Home' => 'index.php'];\n produce_error_page('That email doesn\\'t exist. Please contact our service team to resolve the issue.', $links);\n require './assets/includes/footer.html';\n exit();\n}", "public function reset() {\n\t\t$this->_mailTo = array();\n\t\t$this->_mailCc = array();\n\t\t$this->_mailBcc = array();\n\t\t$this->_mailSubject = '';\n\t\t$this->_mailBody = '';\n\t\t$this->_mailReplyTo = '';\n\t\t$this->_mailReplyToName = '';\n\t\t$this->_mailFrom = '';\n\t\t$this->_mailFromName = '';\n\t\t$this->_mailFiles = array();\n\t\t$this->_mailPreparedHeaders = '';\n\t\t$this->_mailPreparedBody = '';\n\t}", "private function testEmail(){\n $this->user_panel->checkSecurity();\n $this->mail_handler->testEmailFunction();\n }", "public function sendRestoreEmail();", "function clean_email($email = \"\")\n\t{\n\t\t$email = trim($email);\n\t\t\n\t\t$email = str_replace( \" \", \"\", $email );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check for more than 1 @ symbol\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( substr_count( $email, '@' ) > 1 )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n \t$email = preg_replace( \"#[\\;\\#\\n\\r\\*\\'\\\"<>&\\%\\!\\(\\)\\{\\}\\[\\]\\?\\\\/\\s]#\", \"\", $email );\n \t\n \tif ( preg_match( \"/^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,4})(\\]?)$/\", $email) )\n \t{\n \t\treturn $email;\n \t}\n \telse\n \t{\n \t\treturn FALSE;\n \t}\n\t}", "static function password_expired_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n\n password_expired_email($user) ?\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você criar uma nova senha.\") :\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "function UnigueEmail($check)\r\n {\r\n //μέσω αυτής της συνάρτησης ελέγχεται εάν χρησιμοποιείται ήδη το email\r\n //που έδωσε ο χρήστης και τον ενημερώνει αντίστοιχα μέσω του error που \r\n //υπάρχει για το συγκεκριμένο πεδίο στο αντίστοιχο view(register.ctp)\r\n\r\n //έλεγχος για το αν ήδη υπάρχει το email που επιλέγει ο χρήστης γίνεται\r\n //σε 2 περιπτώσεις:\r\n //α)Κατά την εγγραφή του χρήστη\r\n //β)Κατά την επεξεργασία προφίλ του χρήστη σε περίπτωση που επεξεργαστεί\r\n // το email του.\r\n $email = array_shift($check);\r\n\r\n if(!$this->getLoggedIn() || (strcmp($this->editEmail, 'yes')==0))\r\n {\r\n $conditions = array(\r\n// 'User.email'=>$this->data['User']['email']\r\n 'User.email'=>$email\r\n );\r\n if(!$this->id)\r\n {\r\n if($this->find('count', array('conditions'=>$conditions))>0) \r\n {\r\n// $this->invalidate('email_unique');\r\n return false; \r\n }\r\n }\r\n return true;\r\n }\r\n else\r\n return true;\r\n }", "function changeemail($member,$oldemail,$newemail) {\n\t\n}", "private function clean_poea_email($email) {\n\n \t$emails = array();\n\n \t$email = str_replace('@y.c', \"@yahoo.com\", $email);\n\n\t\t$slash_email = explode(\"/\", $email);\n\t\t$or_email = explode(\" or \", $email);\n\t\t$and_email = explode(\"&\", $email);\n\n\t\tif(count($slash_email) > 1) {\n\t\t\t\n\t\t\tforeach ($slash_email as $v) {\n\n\t\t\t\t$v = trim($v);\n\n\t\t\t\tif(filter_var($v, FILTER_VALIDATE_EMAIL)) {\n\n\t\t\t\t\t$emails[] = $v;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t} elseif(count($and_email) > 1) {\n\n\t\t\tforeach ($and_email as $v) {\n\n\t\t\t\t$v = trim($v);\n\n\t\t\t\tif(filter_var($v, FILTER_VALIDATE_EMAIL)) {\n\n\t\t\t\t\t$emails[] = $v;\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t} elseif(count($or_email) > 1) {\n\n\t\t\tforeach ($or_email as $v) {\n\n\t\t\t\t$v = trim($v);\n\n\t\t\t\tif(filter_var($v, FILTER_VALIDATE_EMAIL)) {\n\t\n\t\t\t\t\t$emails[] = $v;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t} elseif(filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\n\t\t\t$emails[] = $email;\t\n\n\t\t}\n\n\t\tif(empty($emails)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn json_encode($emails);\n }", "function pmproex_pmpro_email_filter($email)\r\n{\r\n\tglobal $wpdb;\r\n \t\r\n\t//only update admin confirmation emails\r\n\tif(strpos($email->template, \"checkout\") !== false && strpos($email->template, \"_admin\") !== false)\r\n\t{\r\n\t\t//get the user_id from the email\r\n\t\t$order_id = $email->data['invoice_id'];\r\n\t\tif(!empty($order_id))\r\n\t\t{\r\n\t\t\t$order = new MemberOrder($order_id);\r\n\t\t\t\t\t\t\r\n\t\t\t//add to bottom of email\r\n\t\t\tif(!empty($order->notes))\r\n\t\t\t{\r\n\t\t\t\t$email->body .= \"<p>Order Notes</p><hr /><p>\" . $order->notes . \"</p>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\t\r\n\treturn $email;\r\n}", "function _osc_from_email_aux() {\n $tmp = osc_mailserver_mail_from();\n return !empty($tmp)?$tmp:osc_contact_email();\n }", "public function filterValidEmailsProvider() {}", "protected function getEmailSubject() {}", "protected function getSenderEmailName() {}", "protected function getSenderEmailName() {}", "protected function cleanEmail($email) {\n\t\tif(is_array($email)) {\n\t\t\t$cleanEmails = array();\n\t\t\tforeach($email as $em) {\n\t\t\t\t$cleanEmails[] = (preg_match('/\\<(.*?)\\>/', $em, $match)) ? $match[1] : $em;\n\t\t\t}\n\t\t\treturn $cleanEmails;\n\t\t}\n\t\telse {\n\t\t\t$cleanEmail = (preg_match('/\\<(.*?)\\>/', $email, $match)) ? $match[1] : $email;\n\t\t\treturn $cleanEmail;\n\t\t}\n\t}", "function email_revalidate_user_settings_save() {\n\t$email = get_input('email');\n\t$user_id = get_input('guid');\n\n\tif (!$user_id) {\n\t\t$user = elgg_get_logged_in_user_entity();\n\t} else {\n\t\t$user = get_entity($user_id);\n\t}\n\n\tif (!is_email_address($email)) {\n\t\tregister_error(elgg_echo('email:save:fail'));\n\t\treturn false;\n\t}\n\n\tif ($user) {\n\t\tif (strcmp($email, $user->email) != 0) {\n\t\t\tif (!get_user_by_email($email)) {\n\t\t\t\t$user->new_email = $email;\n\t\t\t\tset_input('email', $user->email);\n\t\t\t\temail_revalidate_request_validation($user->guid);\n\t\t\t} else {\n\t\t\t\tregister_error(elgg_echo('registration:dupeemail'));\n\t\t\t}\n\t\t} else {\n\t\t\tunset($user->new_email);\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tregister_error(elgg_echo('email:save:fail'));\n\t}\n\treturn false;\n}", "function removeEmail($email) {\n\t\tglobal $polarbear_db;\n\t\t$emailSafe = $polarbear_db->escape($email);\n\t\t$sql = \"DELETE FROM \" . POLARBEAR_DB_PREFIX . \"_emaillist_emails WHERE listID = '{$this->id}' AND email = '$emailSafe'\";\n\t\t$polarbear_db->query($sql);\n\t}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "function set_email_to_html(){\n\treturn true;\n}", "public function email($email) {\n\t\n\t\n\t\n\t\treturn $email;\n\t\n\t}", "function reset()\n {\n $this->fromEmail = \"\";\n $this->fromName = \"\";\n $this->fromUser = null; // RMV-NOTIFY\n $this->priority = '';\n $this->toUsers = array();\n $this->toEmails = array();\n $this->headers = array();\n $this->subject = \"\";\n $this->body = \"\";\n $this->errors = array();\n $this->success = array();\n $this->isMail = false;\n $this->isPM = false;\n $this->assignedTags = array();\n $this->template = \"\";\n $this->templatedir = \"\";\n // Change below to \\r\\n if you have problem sending mail\n $this->LE = \"\\n\";\n }", "public function smtpClose()\n {\n }", "function filterEmail($email, $chars = ''){\r\n $email = trim(str_replace( array(\"\\r\",\"\\n\"), '', $email ));\r\n if( is_array($chars) ) $email = str_replace( $chars, '', $email );\r\n $email = preg_replace( '/(cc\\s*\\:|bcc\\s*\\:)/i', '', $email );\r\n return $email;\r\n}", "public function reset()\n {\n $this->values[self::_PLAIN_MAIL] = null;\n $this->values[self::_FORMAT_MAIL] = null;\n }", "function sendemail($email){\n\t\t$hash_email = encrypt_decrypt('encrypt', $email);\n\t\t$link = 'http://localhost/carpool/edit_info.php?id='.urlencode($hash_email);\n\t\t$mail = new PHPMailer;\n\t\t$mail->isSMTP(); // Set mailer to use SMTP\n\t\t$mail->Host = 'smtp.mail.yahoo.com'; // Specify main and backup SMTP servers\n\t\t$mail->Port = 465; \n\t\t$mail->SMTPAuth = true; // Enable SMTP authentication\n\t\t$mail->Username = 'xxx'; // SMTP username\n\t\t$mail->Password = 'xxx'; // SMTP password\n\t\t$mail->SMTPSecure = 'ssl'; // Enable encryption, 'ssl' also accepted\n\t\t$mail->isHTML(true);\n\n\t\t$mail->From = 'xxx';\n\t\t$mail->FromName = 'Carpool Services';\t\t\n\t\t$mail->addAddress($email); // Add a recipient\n\t\t$mail->Subject = 'Modify your info';\n\t\t$mail->Body = 'Thank you for using Carpool. Please use the link below to edit your information. <br />'.$link;\t\t\n\t\t$mail->SMTPDebug = 1;\n\t\tif(!$mail->send()) {\n\t\t\t\treturn false;\n\t\t} else {\n\t\t\t\treturn true;\n}\n\t}", "private static function canRemoveEmail() {\n\t\treturn\n\t\t\tRights::hasRight(Right::getByName('Premanager', 'registerWithoutEmail'));\n\t}", "function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n $this->data['email_vars']['client_dashboard_url'] = $this->data['vars']['site_url_client'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'];\n\n //new client welcom email-------------------------------\n if ($email == 'new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_client');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['client_users_password'] = $this->input->post('client_users_password');\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($this->data['email_vars']['client_users_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n\n }\n\n //admin notification - new client user-------------------------------\n if ($email == 'admin_notification_new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n }\n\n }\n\n }", "function sanitizeEmail() {\n $pattern = \"/^[A-Z0-9._%+\\-]+@[A-Z0-9.\\-]+\\.[A-Z]{2,}$/i\";\n if (preg_match($pattern, $this->email)) {\n $this->email = filter_var($this->email, FILTER_SANITIZE_EMAIL);\n } else {\n die(\"Error. Check your form data\");\n }\n }", "protected function getSenderEmailAddress() {}", "protected function getSenderEmailAddress() {}", "public function cleanup(){\n\n //$this->_mail_type = 'html';\n //$this->_mail_encoding = 'utf-8';\n //$this->_transport_login = '';\n //$this->_transport = 'php';\n //$this->_transport_password = '';\n //$this->_transport_port = null;\n //$this->_transport_secure = null;\n //$this->_transport_host = null;\n $this->_lastError = null;\n $this->_subject = '';\n $this->_body = '';\n $this->_alt_body = '';\n $this->_attachements = array();\n $this->_from = '';\n $this->_fromName = null;\n $this->_replyto = array();\n $this->_addresses = array();\n $this->_cc = array();\n $this->_bcc = array();\n $this->_replyto = array();\n $this->_custom_headers = array();\n //$this->_is_embed_images = false;\n //$this->_is_track_links = false;\n //$this->_is_use_message_id = false;\n\n return $this;\n\n }", "function howsu_pmpro_email_filter($email) {\n\n\t//only update admin confirmation emails\n\tif(strpos($email->template, \"checkout\") !== false)\n\t{\n\t\tif(!empty($email->data) && !empty($email->data['user_login']))\n\t\t{\n\t\t\t$user = get_user_by(\"login\", $email->data['user_login']);\n\t\t\tif(!empty($user) && !empty($user->ID))\n\t\t\t{\n\t\t\t\t$member_number = get_user_meta($user->ID, \"member_number\", true);\n\n\t\t\t\tif(!empty($member_number))\n\t\t\t\t\t$email->body = str_replace(\"<p>Membership Level\", \"<p>Member Number:\" . $member_number . \"</p><p>Membership Level\", $email->body);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $email;\n}", "function wpcom_invite_force_matching_email_address() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "function changeEmail() {\r\n\r\n\tglobal $SALT;\r\n\tglobal $DB;\r\n\tglobal $MySelf;\r\n\r\n\t// Are we allowed to change our email?\r\n\tif (!$MySelf->canChangeEmail()) {\r\n\t\tmakeNotice(\"You are not allowed to change your email. Ask your CEO to re-enable this feature for your account.\", \"error\", \"Forbidden\");\r\n\t}\r\n\r\n\t/*\r\n\t* At this point we know that the user who submited the\r\n\t* email change form is both legit and the form was not tampered\r\n\t* with. Proceed with the email-change.\r\n\t*/\r\n\r\n\t// its easier on the eyes.\r\n\t$email = sanitize($_POST[email]);\r\n\t$username = $MySelf->getUsername();\r\n\r\n\t// Update the Database. \r\n\tglobal $IS_DEMO;\r\n\tif (!$IS_DEMO) {\r\n\t\t$DB->query(\"update users set email = '$email', emailvalid = '0' where username = '$username'\");\r\n\t\tmakeNotice(\"Your email information has been updated. Thank you for keeping your records straight!\", \"notice\", \"Information updated\");\r\n\t} else {\r\n\t\tmakeNotice(\"Your email would have been changed. (Operation canceled due to demo site restrictions.)\", \"notice\", \"Email change confirmed\");\r\n\t}\r\n\r\n}", "public function setEmail($newEmail) {\n //first, trim the input of excess whitespace\n $newEmail = trim($newEmail);\n \n //second, sanitize the email of all invalid email characters\n $newEmail = filter_var($newEmail, FILTER_SANITIZE_EMAIL);\n \n //finally, bring the email out of quarantine\n $this->email = $newEmail;\n }", "function mailresetlink($useremail,$username)\n\t{\n\t$mail = new PHPMailer();\n\t// Set PHPMailer to use the sendmail transport\n\t$mail->isSMTP();\n\t//Set who the message is to be sent from\n\t$mail->setFrom('administrator@appmantras.com', 'Admin');\n\t//Set who the message is to be sent to\n\t$mail->addAddress($useremail,$username);\n\t//Set the subject line\n\t$mail->Subject = 'Planpiper';\n\n\t$message = \"\n\t<html>\n\t<head>\n\t<title> Android APK File</title>\n\t</head>\n\t<body>\n\t<p>Hi $username,</p>\n\t<p>You are now successfully registered with Planpiper.Please Find Attached the Android APK File for the Planpiper app.</p>\n\t<p>While you cannot reply to this email, please feel free to write to us with any queries at admin@appmantras.com</p>\t\n\t</body>\n\t</html>\n\t\";\t\n\t\t\t\n\t$mail->msgHTML($message, dirname(__FILE__));\n\n\t//send the message, check for errors\n\t\tif(!$mail->send()){\n\t\t\t\n\t\t} \n\t\telse{\n\t\t\t\n\t\t}\n\t}", "function elegantSendEmail() {\n $to = $_POST['datastring']['newEmailForm'][0][0];\n $title = $_POST['datastring']['newEmailForm'][0][1];\n $messagetext = nl2br(rawurldecode($_POST['datastring']['newEmailForm'][0][2])); \n $properties = $_POST['datastring']['properties'];\n\n //Send the email and get a report back\n $sent = elegeantSend($to,$messagetext,$properties);\n \n //Save the email as a post and get a report back\n $saved = elegantSave($title,$to,$messagetext,$properties);\n\n //echo 'Email Status:'.$sent.'<br>Save Status:'.$saved;\n \n //Terminate and provide a response. \n wp_die(); \n}", "private function setEmail()\n {\n\t if ( empty( $_POST['email'] ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n }\n \n $e = trim( $_POST['email'] );\n \n\t\tif ( ! filter_var( $e, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n\t\t}\n \n\t\t$this->data['email'] = $e;\n }", "private function changeEmail()\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 if(!isset($request['new_email']) || $request['new_email']==\"\")\n throw_error_msg(\"provide new_email\");\n\n if(!isset($request['cnew_email']) || $request['cnew_email']==\"\")\n throw_error_msg(\"provide cnew_email\");\n\n if($request['new_email']!=$request['cnew_email'])\n throw_error_msg(\"new email and confirm email do not match\");\n\n $request['userid'] = userid();\n $userquery->change_email($request);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => \"email has been changed successfully\");\n $this->response($this->json($data)); \n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function reset()\n\t{\n\t\t$this->method = NOTIFY_MAIL;\n\t\t$this->body = '';\n\t\t$this->subject = '';\n\t\t$this->bcc = array();\n\t\t$this->vars = array();\n\t}", "public function getEmailOnBrokenLinkOnly() {}", "public static function convert_email_field() {\n\n\t\t// Create a new Email field.\n\t\tself::$field = new GF_Field_Email();\n\n\t\t// Add standard properties.\n\t\tself::add_standard_properties();\n\n\t}", "function isEmail($email) {\nreturn(preg_match(\"/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i\",$email));\n}", "function eMail($string) {\n\n\n\t\t}", "public function TypeSpecificClose()\n {\n if(!mail($this->recipient, $this->subject, $this->mailbody, $this->sender, \"-f\".Krai::GetConfig(\"ADMIN_EMAIL\")))\n {\n $msg = \"EMAILING FAILED: to \".$this->recipient.\", from \".$this->sender.\", subject \".$this->subject.\", body \".$this->mailbody;\n $this->WriteLog($msg);\n return ( false );\n }\n return ( true );\n }", "function email_ok($email,$new=FALSE){\n if(empty($email)) return FALSE;\n if(!preg_match($this->pat_email,$email)) return FALSE;\n if(!$new) return TRUE;\n foreach($this->domains as $umd)\n if($umd->newemail_ok($email)>0) return FALSE;\n return TRUE;\n }", "function MaskUserEMail($email){\n\n\t\t$maskedEMail = '';\n\t\t$positionOfAt = strpos($email, '@');\n\t\t$maskedEMail .= substr($email, 0,1);\n\t\tfor($i=1; $i < strlen($email); $i++) {\n\t\t\tif($i < $positionOfAt-1 || $i > $positionOfAt + 1)\n\t\t\t\t$maskedEMail .= '*';\n\t\t\telse\n\t\t\t\t$maskedEMail .= substr($email, $i,1);\n\t\t}\n\t\t$maskedEMail .= substr($email, $i-1,1);\n\t\treturn $maskedEMail;\n\t}", "public function testRequireEmail()\n {\n $this->markTestIncomplete('Not yet implemented.');\n }", "function string_email( $p_string ) \r\n{\r\n\t$p_string = string_strip_hrefs( $p_string );\r\n\treturn $p_string;\r\n}", "public function testUsersEmailSend()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function _webform_defaults_email() {\r\n return array(\r\n 'name' => '',\r\n 'form_key' => NULL,\r\n 'pid' => 0,\r\n 'weight' => 0,\r\n 'value' => '',\r\n 'mandatory' => 0,\r\n 'email' => 1,\r\n 'extra' => array(\r\n 'width' => '',\r\n 'disabled' => 0,\r\n 'email' => 0,\r\n 'description' => '',\r\n 'attributes' => array(),\r\n ),\r\n );\r\n}", "public function getMail();", "function email_settings()\r\n\t{\r\n\t\tglobal $ibforums, $std, $print;\r\n\r\n\t\tif ($ibforums->member['disable_mail'])\r\n\t\t{\r\n\t\t\t$ibforums->lang['no_mail'] = sprintf($ibforums->lang['no_mail'], $ibforums->member['disable_mail_reason']);\r\n\r\n\t\t\t$this->output .= View::make(\"global.warn_window\", ['message' => $ibforums->lang['no_mail']]);\r\n\t\t} else\r\n\t\t{\r\n\r\n\t\t\t// PM_REMINDER: First byte = Email PM when received new\r\n\t\t\t// \t\t\tSecond byte= Show pop-up when new PM received\r\n\r\n\t\t\t$info = array();\r\n\r\n\t\t\tforeach (array('hide_email', 'allow_admin_mails', 'email_full', 'email_pm', 'auto_track') as $k)\r\n\t\t\t{\r\n\t\t\t\tif (!empty($this->member[$k]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$info[$k] = 'checked';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$info['key'] = $this->md5_check;\r\n\r\n\t\t\t$this->output .= View::make(\"ucp.email\", ['Profile' => $info]);\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t}", "public function getEmail() { return $this->email; }", "protected function useEmailNotificationsDeduplication()\n {\n return false;\n }", "public function isEmailDisabled()\n {\n return !Mage::getStoreConfigFlag('markdown/markdown/enable_email');\n }", "public function saveEmail()\n {\n $this->validate([\n 'email' => [\n 'sometimes',\n 'required',\n 'email',\n Rule::unique(shopper_table('users'), 'email')->ignore($this->customer_id),\n ],\n ]);\n\n $this->updateValue(\n 'email',\n $this->email,\n 'Customer Email address updated successfully.'\n );\n\n $this->emailUpdate = false;\n $this->emit('profileUpdate');\n }", "public function getEmailToName() { return $this->_emailToName; }", "function validate_email() {\n # Check Value is an Email Address\n if ($this->check_email_address($this->cur_val)) {\n # Remove any existing error message\n $this->error_message = \"\";\n\n # Return Email\n return $this->cur_val;\n }\n else {\n # Set Error Message\n $this->set_error(\"Validation for email address ({$this->cur_val}) failed. This is type \" . gettype($this->cur_val));\n\n # Return Blank String\n return \"\";\n }\n }", "public function setEmail($newEmail){\n\t}", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => 'opublisher@gmail.com',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => 'opublisher@gmail.com',\r\n 'fromName' => 'opublisher@gmail.com',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "public function emailExitsAction()\n {\n $ftv_obj=new Ep_Ftv_FtvContacts();\n $user_params=$this->_request->getParams();\n\t\t\n\t\t$emailexit = $ftv_obj->getExistingEmail($user_params['email']);\n\t\t$emailexit=trim($emailexit);\n\t\techo $emailexit;\n\t\texit;\n }", "public function saveEmail()\n {\n $email = new Email($this->sendedMail);\n return $email->save();\n }", "function getEmail() {\n\t\treturn $this->_email;\n\t}", "function sendInfoMail()\t{\n\t\tif ($this->conf['infomail'] && $this->conf['email.']['field'])\t{\n\t\t\t$recipient='';\n\t\t\t$emailfields=t3lib_div::trimexplode(',',$this->conf['email.']['field']);\t\t\t\t\n\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t$recipient.=$recipient?$Arr[$this->conf['email.']['field']].';'.$recipient:$Arr[$this->conf['email.']['field']];\n\t\t\t}\n\t\t\t$fetch = t3lib_div::_GP('fetch');\n\t\t\tif ($fetch)\t{\n\t\t\t\t\t// Getting infomail config.\n\t\t\t\t$key= trim(t3lib_div::_GP('key'));\n\t\t\t\tif (is_array($this->conf['infomail.'][$key.'.']))\t\t{\n\t\t\t\t\t$config = $this->conf['infomail.'][$key.'.'];\n\t\t\t\t} else {\n\t\t\t\t\t$config = $this->conf['infomail.']['default.'];\n\t\t\t\t}\n\t\t\t\t$pidLock='';\n\t\t\t\tif (!$config['dontLockPid'] && $this->thePid)\t{\n\t\t\t\t\t$pidLock='AND pid IN ('.$this->thePid.') ';\n\t\t\t\t}\n\n\t\t\t\t\t// Getting records\n\t\t\t\tif (t3lib_div::testInt($fetch))\t{\n\t\t\t\t\t$DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$this->conf['uidField'],$fetch,$pidLock,'','','1');\n\t\t\t\t} elseif ($fetch) {\t// $this->conf['email.']['field'] must be a valid field in the table!\n\t\t\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t\t\tif ($ef) $DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$ef,$fetch,$pidLock,'','','100');\n\t\t\t\t\t\tif (count($DBrows )) break;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Processing records\n\t\t\t\tif (is_array($DBrows))\t{\n\t\t\t\t\t//$recipient = $DBrows[0][$this->conf['email.']['field']];\n\t\t\t\t\tif ($this->conf['evalFunc'])\t{\n\t\t\t\t\t\t$DBrows[0] = $this->userProcess('evalFunc',$DBrows[0]);\n\t\t\t\t\t}\n\t\t\t\t\t$this->compileMail($config['label'], $DBrows, $this->getFeuserMail($DBrows[0],$this->conf), $this->conf['setfixed.']);\n\t\t\t\t} elseif ($this->cObj->checkEmail($fetch)) {\n\t\t\t\t\t$this->sendMail($fetch, '', '',trim($this->cObj->getSubpart($this->templateCode, '###'.$this->emailMarkPrefix.'NORECORD###')));\n\t\t\t\t}\n\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL_SENT###');\n\t\t\t} else {\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL###');\n\t\t\t}\n\t\t} else $content='Error: infomail option is not available or emailField is not setup in TypoScript';\n\t\treturn $content;\n\t}", "function send_emails() {\n $settings = new Settings();\n $mail_companies = $settings->get_mailto_companies();\n $failed_list_mails = array();\n $mail_reader = new EmailReader(dirname(__FILE__) . '/mails', $this->user_information);\n foreach ($this->cookie_list as $item) {\n if (!$item->has_email()) {\n \t$failed_list_mails[] = $item;\n }\n else {\n $template = $mail_reader->get_companies_mail($item, $mail_companies);\n if (!$this->mail_to($item, $template, $mail_companies)) {\n $failed_list_mails[] = $item;\n }\n\t }\n }\n $this->update_amounts_used($this->cookie_list);\n\n\n $attachments = array();\n\n $failed_list_letters = array();\n foreach ($this->cookie_list as $item) {\n if (!$item->has_address()) {\n $failed_list_letters[] = $item;\n }\n else {\n $letter_generator = new LetterGenerator($this->user_information);\n $pdf = $letter_generator->generate_letter_string($item);\n if ($pdf) {\n \t$folder_writer = new FolderHandler();\n \t$file = $folder_writer->store_file($pdf, \"pdf\");\n \tif ($file) {\n \t\t$attachments[] = $file;\n \t}\n \telse {\n \t\t$failed_list_letters[] = $item;\n \t}\n }\n else {\n $failed_list_letters[] = $item;\n }\n }\n }\n\n\n\n return $this->send_confirmation_mail($attachments, $failed_list_mails, array_diff($this->cookie_list,\n $failed_list_mails), $failed_list_letters, array_diff($this->cookie_list, $failed_list_letters),\n $mail_companies);\n }", "public function getEmail(): ?string {\n return $this->_email;\n }", "function sendNewMessageNotification($to_user_id,$to_name,$subject,$fromEmail,$replyEmail)\n{\n #check if the user enabled this option\n $query=\"select message_email,email from users where user_id ='$to_user_id' and access_level NOT IN ('ebulkuser','eremote') limit 1\";\n $email_option=getDBRecords($query); \n\n if($email_option[0]['message_email'] == \"Y\")\n { \n $email = $email_option[0]['email'];\n $html=\"<p><font size=\\\"2\\\" face=\\\"Verdana, Arial, Helvetica, sans-serif\\\">Dear \".$to_name.\",<br><br>\n You have been sent a message via the online \".DBS.\" system regarding <b>\".$subject.\"</b>, please login to your secure online account to read the message.\n\t\t\t <br><br>Thank You</font></p>\";\n\n\n\t\t$text=\"Dear \".$to_name.\",\n \n\t\t\t You have been sent a message via the online \".DBS.\" system regarding \".$subject.\", please login to your secure online account to read the message.\n\t\t\t \n\t\t\t Thank You\";\n\n\t\t \n\t\t$from = $fromEmail;\n\t\t$mail = new htmlMimeMail();\n\t\t$mail->setHtml($html, $text);\n\t\t$mail->setReturnPath($replyEmail);\n $mail->setFrom($from);\n $mail->setSubject(\"Important Message\");\n $mail->setHeader('X-Mailer', 'HTML Mime mail class');\n\n if(!empty($email))\n\t {\n $result = $mail->send(array($email), 'smtp');\t\n\t\t}\n } \t\n}", "public function unsetBuyerEmailAddress(): void\n {\n $this->buyerEmailAddress = [];\n }", "protected function composeEmailToUser()\n\t{\n\t\t$theURL = ( empty($this->myReentryURL) ?\n\t\t\t\t$this->composeReentryURL() : $this->myReentryURL ) ;\n\t\t$s = $this->model->getRes( 'account/email_body_pwd_reset_instr/'\n\t\t\t. $this->myEmailAddr . '/'\n\t\t\t. $this->getRandomCharsFromToken() )\n\t\t\t. '<a href=\"' . $theURL . '\">' . $theURL . '</a>'\n\t\t\t;\n\t\treturn $s ;\n\t}", "static function add_email(): void {\r\n\t\tself::add_acf_inner_field(self::roles, self::email, [\r\n\t\t\t'label' => 'Email',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => '(Optional)',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '25',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'placeholder' => 'someone@themedium.ca'\r\n\t\t]);\r\n\t}", "function Email_Proforma($Src,$SrcId,$to,$mescat,$subject,$helper='',$helperdata=0,$logfile='',&$attachments=0,$embeded=0,$from='') {\n global $PLANYEAR,$YEARDATA,$FESTSYS;\n if (strlen($mescat) < 30) {\n $Prof = Get_Email_Proforma($mescat);\n $Mess = ($Prof? $Prof['Body'] : \"Unknown message $mescat \");\n } else {\n $Mess = $mescat;\n }\n Parse_Proforma($Mess,$helper,$helperdata,0,$attachments,$embeded);\n \n NewSendEmail($Src,$SrcId,$to,$subject,$Mess,$attachments,$embeded,$from);\n \n if ($logfile) {\n $logf = fopen(\"LogFiles/$logfile.txt\",\"a\");\n fwrite($logf,\"\\n\\nEmail to : \" . Pretty_Print_To($to) . \"Subject:$subject\\n\");\n if ($from) fwrite($logf,\"From: \" . Pretty_Print_To($from));\n fwrite($logf,\"\\n\\n$Mess\");\n\n if ($attachments) {\n if (is_array($attachments)) {\n foreach ($attachments as $i=>$att) fwrite($logf,\" With attachment: \" . $att[0] . \" as \" . $att[1] . \"\\n\\n\");\n } else {\n fwrite($logf,\" With attachment $attachments\\n\\n\"); \n }\n }\n if ($embeded) {\n if (is_array($embeded)) {\n foreach ($embeded as $i=>$att) fwrite($logf,\" With embeded: \" . $att[0] . \" as \" . $att[1] . \"\\n\\n\");\n } else {\n fwrite($logf,\" With embeded $embeded\\n\\n\"); \n }\n }\n\n fclose($logf);\n }\n return $Mess;\n}", "public function traerPorMail($email) {\n\n}", "static function sendUnmemberMail($user) {\t\r\n\t\tif (!MAIL || !$user->isLoaded()) return;\r\n\t\t\r\n\t\t$mailTemplate = new Art_Model_Email_Template(array(\r\n\t\t\t'name' => static::EMAIL_TEMPLATE_UNMEMBER)\r\n\t\t);\r\n\t\t\r\n\t\tif (!$mailTemplate->isLoaded()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$userData = $user->getData();\r\n\t\tif ($userData->gender) {\r\n\t\t\t$genderEnd = '';\r\n\t\t\t$salutation = static::DEAR_SIR.$userData->salutation.',';\r\n\t\t} else {\r\n\t\t\t$genderEnd = 'a';\r\n\t\t\t$salutation = static::DEAR_MADAM.$userData->salutation.',';\r\n\t\t}\r\n\t\t\r\n\t\t$footer = Helper_Default::getDefaultValue(Helper_TBDev::DEFAULT_MAIL_FOOTER);\r\n\t\t$body = Art_Model_Email_Template::replaceIdentities(array('salutation' => $salutation,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'date_termination' => nice_date('now'),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'genderEnd' => $genderEnd,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'footer' => $footer),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$mailTemplate->body);\r\n\t\tstatic::sendMailUsingTemplate($mailTemplate, $body, $userData->email);\r\n\t}", "function clear_to () {\n $this->sendto = array();\n $this->all_emails = array();\n }", "public function strip_resend_to_email_if_also_in_cc()\n\t{\n\t\t// NOTE: only deals with first CC!\n\t\t$add = $this->that->get_address_cc();\n\t\t$this->remove_from_resend_to($add);\n\t}", "protected function notifyByEmail() {\n\t\t$userlist = array();\n\n\t\t// find all the users with this server listed\n\t\t$users = $this->db->select(\n\t\t\tSM_DB_PREFIX . 'users',\n\t\t\t'FIND_IN_SET(\\''.$this->server['server_id'].'\\', `server_id`) AND `email` != \\'\\'',\n\t\t\tarray('user_id', 'name', 'email')\n\t\t);\n\n\t\tif (empty($users)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// build mail object with some default values\n\t\t$mail = new phpmailer();\n\n\t\t$mail->From\t\t= sm_get_conf('email_from_email');\n\t\t$mail->FromName\t= sm_get_conf('email_from_name');\n\t\t$mail->Subject\t= sm_parse_msg($this->status_new, 'email_subject', $this->server);\n\t\t$mail->Priority\t= 1;\n\n\t\t$body = sm_parse_msg($this->status_new, 'email_body', $this->server);\n\t\t$mail->Body\t\t= $body;\n\t\t$mail->AltBody\t= str_replace('<br/>', \"\\n\", $body);\n\n\t\t// go through empl\n\t foreach ($users as $user) {\n\t \t// we sent a seperate email to every single user.\n\t \t$userlist[] = $user['user_id'];\n\t \t$mail->AddAddress($user['email'], $user['name']);\n\t \t$mail->Send();\n\t \t$mail->ClearAddresses();\n\t }\n\n\t if(sm_get_conf('log_email')) {\n\t \t// save to log\n\t \tsm_add_log($this->server['server_id'], 'email', $body, implode(',', $userlist));\n\t }\n\t}", "function SendMail($email_title,$email_body,$reboot)\n{\n\tif($email_title == \"\" || $email_body == \"\" || $email_title == null || $email_body == null)\n\t{\n\t\tfile_put_contents(\"result.txt\",\"email body or title is null\\n\",FILE_APPEND);\n\t\texit(\"email内容为空或者email标题为空\\n\");\t\t\n\t}\n\n\t//load basic class: SMTPMailer\n\trequire(\"SMTPMailer.php\");\n\n\tif($reboot == \"start\"){//说明第一次启动程序\n\t\tfile_put_contents(\"result.txt\",\"\");\t\t\n\t\t//链接到数据库并获得要发送的邮件地址\n\t\t$connection = mysql_connect(\"localhost\", \"mydonor\", \"MYDONOR@))(\") or die (\"Unable toconnect!\");\n\t\tmysql_select_db(\"mydonor\") or die (\"Unable to select database!\"); \n\t\tmysql_query(\"SET NAMES UTF8\");\n\t\t$query = \"SELECT distinct email_addr FROM if_donor_email WHERE priority >= 0 and deleted = 0 ORDER BY id\"; \n\t\t$result = mysql_query($query) or die (\"Error in query: $query. \" . mysql_error());\n\t\t//写下本次要发送的邮件地址到emaillist\n\t\tfile_put_contents(\"emaillist.txt\",\"\");\n\t\t$i = 0;\n\t\twhile($email = mysql_fetch_row($result)){\n\t\t\tfile_put_contents(\"emaillist.txt\",$i.\" \".$email[0].\"\\n\",FILE_APPEND);\t\n\t\t\t$i ++;\n\t\t}\n\t\t//计算本次要发送的邮件数目\n\t\t$email_num = mysql_num_rows($result);\n\t\tif($i !== $email_num) die (\"出错:email数目和写入emaillist文件的email数不一致\"); \n\t\t//关闭数据库链接\n\t\tmysql_close($connection);\n\n\t\t//从emaillist.txt中读入本次待发送的邮件列表\n\t\t$file= \"emaillist.txt\";\n\t\t$emaillist=file($file,FILE_IGNORE_NEW_LINES);\n\t\tif($email_num !== count($emaillist)) die (\"出错:email数目和emaillist文件总行数不一致\"); \n\t\tfor($i = 0; $i < count($emaillist); $i ++){\n\t\t\t$email[$i] = preg_split(\"/\\s+/\",trim($emaillist[$i]));\t\t\n\t\t}\n\t\t//开始发送邮件\n\t\tif(count($email) > 0){\n\t\t\t\tfor($i = 0; $i < count($email); $i ++)\n\t\t\t\t{\n\t\t\t\t\t$mailer=new SMTPMailer();\n\t\t\t\t\t$mailer->Host=\"202.38.64.8\";\n\t\t\t\t\t$mailer->UserName=\"\";\n\t\t\t\t\t$mailer->Password=\"\";\n\t\t\t\t\t$mailer->From=\"\";\n\t\t\t\t\t$mailer->ContentType=\"text/html\";\n\t\t\t\t\t$mailer->Subject=$email_title; \n\t\t\t\t\t$mailer->Body=$email_body;\n\t\t\t\t\t$mailer->To=$email[$i][1];\n\t\t\t\t\tif($i !== intval($email[$i][0])) exit(\"当前发送email地址的id和emaillist.txt中的记录行号id不一致\\n\");\n\t\t\t\t\tif($mailer->Send()){\n\t\t\t\t\t\tfile_put_contents(\"result.txt\",$i.\" \".$email[$i][1].\" 成功\\n\",FILE_APPEND);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfile_put_contents(\"result.txt\",$i.\" \".$email[$i][1].\" \".$mailer->Error.\"\\n\",FILE_APPEND);\n/*\t\t\t\t\t\tif(strstr($mailer->Error,\"Recipient\") !== false){\n\t\t\t\t\t\t\t$connection = mysql_connect(\"localhost\", \"mydonor\", \"MYDONOR@))(\") or die (\"Unable toconnect!\");\n\t\t\t\t\t\t\tmysql_select_db(\"mydonor\") or die (\"Unable to select database!\"); \n\t\t\t\t\t\t\tmysql_query(\"SET NAMES UTF8\");\n\t\t\t\t\t\t\t$query = \"update if_donor_email set priority = -1 where email_addr = '\".$email[0].\"'\"; \n\t\t\t\t\t\t\t$setResult = mysql_query($query);\n\t\t\t\t\t\t\t$error = mysql_error();\n\t\t\t\t\t\t}*/\n\t\t\t\t\t}\n\t\t\t\t\tfile_put_contents(\"currpos.txt\",$i);\n\t\t\t\t\tsleep(5);\n\t\t\t\t}\n\t\t}\t\t\t\t\n\t}\n\telse if($reboot == \"restart\"){//说明属于重启\n\t\t$file= \"currpos.txt\";\n\t\t$currpos=file($file,FILE_IGNORE_NEW_LINES);\n\t\tif(count($currpos) === 0) exit(\"在重启模式下,currpos.txt不能为空\\n\");\n\t\t$from = intval($currpos[0])+1; //重启后应该从第几个email开始发送\n\t\tif($from < 1) exit(\"$from 值不对\");\n\t\t\n\t\t//从emaillist.txt中读入本次待发送的邮件列表\n\t\t$file= \"emaillist.txt\";\n\t\t$emaillist =file($file,FILE_IGNORE_NEW_LINES);\n\t\tfor($i = 0; $i < count($emaillist); $i ++){\n\t\t\t$email[$i] = preg_split(\"/\\s+/\",trim($emaillist[$i]));\t\t\n\t\t}\n\t\t//开始发送邮件\n\t\tif(count($email) > 0){\n\t\t\t\tfor($i = $from; $i < count($email); $i ++)\n\t\t\t\t{\n\t\t\t\t\t$mailer=new SMTPMailer();\n\t\t\t\t\t$mailer->Host=\"202.38.64.8\";\n\t\t\t\t\t$mailer->UserName=\"\";\n\t\t\t\t\t$mailer->Password=\"\";\n\t\t\t\t\t$mailer->From=\"\";\n\t\t\t\t\t$mailer->ContentType=\"text/html\";\n\t\t\t\t\t$mailer->Subject=$email_title; \n\t\t\t\t\t$mailer->Body=$email_body;\n\t\t\t\t\t$mailer->To=$email[$i][1];\n\t\t\t\t\tif($i !== intval($email[$i][0])) exit(\"当前发送email地址的id和emaillist.txt中的记录id不一致\\n\");\n\t\t\t\t\tif($mailer->Send()){\n\t\t\t\t\t\tfile_put_contents(\"result.txt\",$i.\" \".$email[$i][1].\" 成功\\n\",FILE_APPEND);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfile_put_contents(\"result.txt\",$i.\" \".$email[$i][1].\" \".$mailer->Error.\"\\n\",FILE_APPEND);\n/*\t\t\t\t\t\tif(strstr($mailer->Error,\"Recipient\") !== false){\n\t\t\t\t\t\t\t$connection = mysql_connect(\"localhost\", \"mydonor\", \"MYDONOR@))(\") or die (\"Unable toconnect!\");\n\t\t\t\t\t\t\tmysql_select_db(\"mydonor\") or die (\"Unable to select database!\"); \n\t\t\t\t\t\t\tmysql_query(\"SET NAMES UTF8\");\n\t\t\t\t\t\t\t$query = \"update if_donor_email set priority = -1 where email_addr = '\".$email[0].\"'\"; \n\t\t\t\t\t\t\t$setResult = mysql_query($query);\n\t\t\t\t\t\t\t$error = mysql_error();\n\t\t\t\t\t\t}*/\n\t\t\t\t\t}\n\t\t\t\t\tfile_put_contents(\"currpos.txt\",$i);\n\t\t\t\t\tsleep(5);\n\t\t\t\t}\n\t\t}\t\t\t\n\t\t\t\t\t\n\t}else{//既不属于第一次启动,也不属于重启,说明有问题\n\t\texit(\"出错:/既不属于第一次启动,也不属于重启,说明有问题\"); \t\n\t}\t\n}", "function sendMailForDomainPublishUnPublish()\n\t\t{\n\t\t\tglobal $CFG;\n \t $sel_id \t = $_POST['checkedvaluesarr'];\n\t\t\t$tablename \t\t = $_POST['tablename'];\n\t\t\t$filedname \t\t = $_POST['fieldname'];\n\t\t\t$changestatusval = $_POST['changestatusval'];\n\t\t\t$upid \t\t\t = $_POST['whereField'];\n\t\t\t$from_name = $CFG['site']['adminname'];\n\t\t\t$from_email = $CFG['site']['adminemail'];\n\t\t\t\n\t\t\tif( isset($sel_id) && is_array($sel_id) ) {\n\t\t foreach($sel_id as $x => $value){\n\t\t \t$sel_del = \"UPDATE \".$tablename.\" SET \".$filedname.\" = '\".$this->filterInput($changestatusval).\"' WHERE \".$upid.\" = '\".$this->filterInput($value).\"'\";\n\t \t$res_del = mysql_query($sel_del) or die($this->mysql_error($sel_del));\n\t \tif($res_del)\n\t \t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t \t$mail_content = $this->readfilecontent($CFG['site']['emailtpl_path'].\"/emailToAllDomainUser.tpl\");\n\t\t\t\t\t $mail_content = str_replace('{SITE_TITLE}',$CFG['site']['sitename'],$mail_content);\n\t\t\t\t\t $mail_content = str_replace('{SITE_LOGO}',$CFG['site']['logoname'],$mail_content);\n\t\t\t\t\t \n\t\t\t\t\t if($changestatusval == 'publish')\n\t\t\t\t\t \t{\n\t\t\t\t\t \t\t$to_email= $this->selectEmailFromSighupTable($value);\n\t\t\t\t\t \t\t$mailsubject = $CFG['site']['sitename'].\" Your New Domain Published\";\n\t\t\t\t\t\t\t\t\t$name= $this->selectNameFromSighupTable($value);\n\t\t\t\t \t\t$domain_name= $this->selectDomainFromSighupTable($value);\n\t\t\t\t \t\t$mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Published By Us.Lets Enjoy With Your New Domain.',$mail_content);\n\t\t\t\t \t\t$mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t else if($changestatusval == 'unpublish')\n\t\t\t\t\t\t {\n\t\t\t\t\t\t \t $to_email= $this->selectEmailFromSighupTable($value);\n\t\t\t\t\t\t \t $mailsubject = $CFG['site']['sitename'].\" Your New Domain Un Published\";\n\t\t\t\t\t\t\t\t\t $name= $this->selectNameFromSighupTable($value);\n\t\t\t\t \t\t\t $domain_name= $this->selectDomainFromSighupTable($value);\n\t\t\t\t \t\t\t $mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Un Published By Us.Sorry For Delaying.Soon We Will Contact You.',$mail_content);\n\t\t\t\t \t\t\t $mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t else if($changestatusval == 'pointed')\n\t\t\t\t\t \t{\n\t\t\t\t\t \t\t $to_email= $this->selectPointEmailFromSighupTable($value);\n\t\t\t\t\t \t\t $mailsubject = $CFG['site']['sitename'].\" Your Domain Pointed\";\n\t\t\t\t\t \t\t $name= $this->selectPointNameFromSighupTable($value);\n\t\t\t\t \t\t\t $domain_name= $this->selectPointDomainFromSighupTable($value);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Pointed .Lets Enjoy With Your New Point Domain.',$mail_content);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\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 \t\t $to_email= $this->selectPointEmailFromSighupTable($value);\n\t\t\t\t\t \t\t $mailsubject = $CFG['site']['sitename'].\" Your Domain Un Pointed\";\n\t\t\t\t\t \t\t $name= $this->selectPointNameFromSighupTable($value);\n\t\t\t\t \t\t\t $domain_name= $this->selectPointDomainFromSighupTable($value);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Un Pointed By Us.Sorry For Delaying.Soon We Will Contact You.',$mail_content);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t $mail_content = str_replace('{ADMINNAME}',$CFG['site']['adminname'],$mail_content);\n\t\t\t\t\t\t\t//echo $mail_content;die();\n\t\t\t\t\t\t\t$ok=$this->sendMail($from_name,$from_email,$to_email,$mailsubject,$mail_content);\n\t\t\t\t\t\t}\n\t\t \n\t\t \t}\n\t\t echo 'success';exit;\n\t\t }\t\t\n\t\t\t\n\t\t}", "function verify_email()\n\t{\n\t\tlog_message('debug', 'Account/verify_email');\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['msg'] = get_session_msg($this);\n\t\tlog_message('debug', 'Account/verify_email:: [1] post='.json_encode($_POST));\n\t\t# skip this step if the user has already verified their email address\n\t\tif($this->native_session->get('__email_verified') && $this->native_session->get('__email_verified') == 'Y'){\n\t\t\tredirect(base_url().'account/login');\n\t\t}\n\n\t\t# otherwise continue here\n\t\tif(!empty($_POST['emailaddress'])){\n\t\t\t$response = $this->_api->post('account/resend_link', array(\n\t\t\t\t'emailAddress'=>$this->native_session->get('__email_address'),\n\t\t\t\t'baseLink'=>base_url()\n\t\t\t));\n\n\t\t\t$data['msg'] = (!empty($response['result']) && $response['result']=='SUCCESS')?'The verification link has been resent':'ERROR: The verification link could not be resent';\n\t\t}\n\n\t\t$data = load_page_labels('sign_up',$data);\n\t\t$this->load->view('account/verify_email', $data);\n\t}" ]
[ "0.7144806", "0.66062975", "0.654774", "0.6446517", "0.6408544", "0.63693863", "0.63429487", "0.63238287", "0.6309603", "0.6238706", "0.6230137", "0.61889184", "0.61570793", "0.61485815", "0.6117099", "0.6117099", "0.60991025", "0.6041814", "0.60357076", "0.6027966", "0.6021643", "0.6019387", "0.6015159", "0.601328", "0.60093635", "0.60065985", "0.60036004", "0.6002954", "0.598958", "0.59791374", "0.59791374", "0.59671736", "0.5962779", "0.595998", "0.5942289", "0.5942289", "0.5942289", "0.5941274", "0.5941274", "0.5934935", "0.5929994", "0.5909221", "0.59045565", "0.5902354", "0.5897143", "0.5895068", "0.5889886", "0.58803105", "0.5874805", "0.58732635", "0.58732635", "0.58707625", "0.5866632", "0.5864779", "0.58640397", "0.58594364", "0.5858655", "0.5846909", "0.58399916", "0.58299965", "0.5825419", "0.5823971", "0.5815075", "0.5813003", "0.58041286", "0.5802708", "0.57959396", "0.5788825", "0.5788033", "0.5787454", "0.5780621", "0.5777952", "0.57763726", "0.5773392", "0.57732654", "0.5771453", "0.57707256", "0.5770264", "0.5769719", "0.5768988", "0.57673335", "0.5760375", "0.57548714", "0.57545877", "0.5748843", "0.5747497", "0.5745094", "0.5743498", "0.5742143", "0.5737792", "0.57300746", "0.5721336", "0.5714943", "0.57069075", "0.57033646", "0.56999433", "0.5698537", "0.56844795", "0.56827015", "0.56800205", "0.56771624" ]
0.0
-1
Returns the instance of this class.
public static function instance() { if ( ! isset( self::$instance ) ) { $class_name = __CLASS__; self::$instance = new $class_name; } return self::$instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInstance()\n {\n return $this;\n }", "public function instance() {\n\t\n\t\treturn $this;\n\t\n\t}", "public function get_instance()\n\t{\n\t\treturn $this;\n\t}", "public function get_instance()\n\t{\n\t\treturn $this;\n\t}", "public function getInstance(): self\n {\n return $this;\n }", "public static function instance() {\n\t\treturn new self;\n\t}", "public static function instance() {\n\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\n\t\t}", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public static function get()\n {\n if (is_null(self::$instance)) {\n self::$instance = new self();\n }\n return self::$instance;\n }", "public function getInstance() {\n\t\treturn $this->instance;\n\t}", "public static function get() {\n\t\tif ( self::$instance === null )\n\t\t\tself::$instance = new self();\n\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) )\n\t\t\t\tself::$_instance = new self();\n\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function get() {\r\n\r\n\t\tif ( self::$instance == null ) {\r\n\t\t\tself::$instance = new self();\r\n\t\t}\r\n\r\n\t\treturn self::$instance;\r\n\r\n\t}", "public static function get() \n {\n if (!isset(self::$instance)) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }", "public static function get()\n\t{\n\t\tif(null == self::$_instance)\n\t\t{\n\t\t\treturn new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\t\tif ( ! self::$_instance ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\n\t}", "public static function get() {\n\t\tif ( self::$instance == null ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance () {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function instance() {\n\t if ( !isset( self::$instance ) ) {\n\t $className = __CLASS__;\n\t self::$instance = new $className;\n\t }\n\t return self::$instance;\n\t }", "public static function getInstance() {\n return new self();\n }", "public function get_instance() {\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function instance() {\n\t\t\tif ( null === self::$_instance ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n return self::$instance;\n }", "public static function get_instance() {\n\n if ( ! self::$instance instanceof self ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }", "public static function get_instance(){\n\t\t\tif( is_null( self::$instance ) ){\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance() {\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance() {\n\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }", "public static function get_instance() {\n $self = __CLASS__;\n\n if ( is_null( $self::$instance ) ) {\n $self::$instance = new $self;\n }\n\n return $self::$instance;\n }", "public static function instance() {\n\t\tif ( !isset( self::$instance ) ) {\n\t\t\t$class_name = __CLASS__;\n\t\t\tself::$instance = new $class_name;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function instance() {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\r\n return self::$instance;\r\n }", "public static function instance() {\n if(is_null( self::$_instance)){\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function get_instance()\n {\n if (true === empty(self::$instance)) {\n $instance = new self();\n }\n return $instance;\n }", "public static function instance () {\n\t\tif ( is_null( self::$_instance ) )\n\t\t\tself::$_instance = new self();\n\t\treturn self::$_instance;\n\t}", "public static function getInstance()\n {\n return new self();\n }", "public static function instance() {\r\n if ( is_null( self::$_instance ) ) {\r\n self::$_instance = new self();\r\n }\r\n return self::$_instance;\r\n }", "public static function instance() {\r\n if ( is_null( self::$_instance ) ) {\r\n self::$_instance = new self();\r\n }\r\n return self::$_instance;\r\n }", "public static function instance() {\n\n\t\tif (!self::$instance) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function instance()\n {\n if (is_null(self::$_instance)) {\n self::$_instance = new self();\n }\n\n return self::$_instance;\n }", "public static function instance() {\r\n\t\tif ( is_null( self::$_instance ) ) {\r\n\t\t\tself::$_instance = new self();\r\n\t\t}\r\n\t\treturn self::$_instance;\r\n\t}", "public static function instance() {\r\n\t\tif ( is_null( self::$_instance ) ) {\r\n\t\t\tself::$_instance = new self();\r\n\t\t}\r\n\t\treturn self::$_instance;\r\n\t}", "function get() {\n\t\tif (!self::$instance) self::$instance = new self;\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function instance()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif ( ! self::$instance instanceof self )\r\n\t\t\t{\r\n\t\t\t\tself::$instance = new self;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn self::$instance;\r\n\t\t}", "public static function get_instance()\n {\n if (is_null(self::$instance)) {\n self::$instance = new self();\n }\n\n return self::$instance;\n }", "public static function instance() {\n if ( empty( self::$instance ) ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n // Get an instance of Class\n \tif( is_null( self::$instance ) ) self::$instance = new self();\n\n // Return the instance\n \treturn self::$instance;\n }", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) )\n\t\t\tself::$_instance = new self();\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\n\t\tif ( null === self::$instance ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\n\t\tif ( null === self::$instance ) {\n\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function instance()\n {\n if ( !isset(self::$instance) ) {\n self::$instance = new self();\n }\n return self::$instance;\n }", "public static function instance() {\n\t\tif ( empty( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n if ( ! isset( self::$instance ) ) {\n self::$instance = new self();\n }\n\n return self::$instance;\n }", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\t\tif( ! self::$instance )\n\t\t\t\tself::$instance = new self;\n\t\t\treturn self::$instance;\n\t\t}", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( ( self::$instance ) ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function instance()\n {\n if (is_null(self::$_instance)) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function instance() {\r\n\t\tif ( is_null( self::$instance ) ) {\r\n\t\t\tself::$instance = new self();\r\n\t\t}\r\n\t\treturn self::$instance;\r\n\t}", "public static function instance() {\n\t\tif ( ! self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( ! self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t$className = __CLASS__;\n\t\t\tself::$instance = new $className;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tstatic $instance;\n\n\t\tif ( empty( $instance ) ) {\n\t\t\t$instance = new self();\n\t\t}\n\n\t\treturn $instance;\n\t}", "public static function get_instance() {\n\n\t\treturn null === self::$instance ? new self() : self::$instance;\n\n\t}", "public static function getInstance() {\n \n if (empty(self::$instance)) {\n \n self::$instance = new self();\n \n }\n \n return self::$instance;\n \n }" ]
[ "0.8520384", "0.8452989", "0.8337154", "0.8337154", "0.83231586", "0.82599217", "0.8228972", "0.82109284", "0.82109284", "0.82109284", "0.82109284", "0.8171212", "0.8153967", "0.81280893", "0.8125544", "0.8115895", "0.8115895", "0.8107377", "0.8107377", "0.8107377", "0.8107377", "0.8107377", "0.8107377", "0.8101531", "0.80998755", "0.8090529", "0.8077564", "0.8059387", "0.8053675", "0.805146", "0.8048513", "0.8028919", "0.80257195", "0.802172", "0.8013616", "0.79954255", "0.799507", "0.7987136", "0.798552", "0.79845935", "0.7971598", "0.7968414", "0.79659283", "0.79659283", "0.795868", "0.795868", "0.795868", "0.79579324", "0.7957811", "0.7955946", "0.7953362", "0.7949747", "0.7949389", "0.7949389", "0.79395914", "0.793795", "0.7933592", "0.79313135", "0.79313135", "0.79300517", "0.79259497", "0.7923239", "0.79172516", "0.791273", "0.7907864", "0.7907864", "0.7907864", "0.7907864", "0.7907864", "0.7907864", "0.7907864", "0.7907864", "0.7907864", "0.7907864", "0.7907864", "0.79040635", "0.7901879", "0.79005075", "0.7897816", "0.78956825", "0.7893744", "0.78908324", "0.78871053", "0.7886115", "0.788524", "0.788524", "0.788524", "0.788524", "0.788524", "0.788524", "0.788524", "0.7878577", "0.78772485", "0.7875313", "0.787418", "0.787418", "0.7867611", "0.7863997", "0.7849048", "0.784829" ]
0.7957553
49
Method to keep our instance from being cloned or unserialized.
private function __clone() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __clone()\n {\n foreach ($this as $key => $val)\n {\n if (is_object($val) || is_array($val))\n $this->{$key} = unserialize(serialize($val));\n }\n }", "public function __clone()\n\t{\n\t\tforeach ($this as $k => $v)\n\t\t{\n\t\t\tif ((is_object($v)) || is_array($v)) {\n\t\t\t\t$this->{$k} = unserialize(serialize($v));\n\t\t\t}\n\t\t}\n\t}", "public function __clone()\n\t{\n\t\tforeach ($this as $k => $v)\n\t\t{\n\t\t\tif ((is_object($v)) || is_array($v)) {\n\t\t\t\t$this->{$k} = unserialize(serialize($v));\n\t\t\t}\n\t\t}\n\t}", "public function __clone()\n\t{\n\t\tforeach ($this as $k => $v)\n\t\t{\n\t\t\tif (is_object($v) || is_array($v))\n\t\t\t{\n\t\t\t\t$this->{$k} = unserialize(serialize($v));\n\t\t\t}\n\t\t}\n\t}", "public function __clone()\n {\n $this->reset(TRUE);\n }", "public function __clone()\n {\n $this->_id = null;\n $this->_key = null;\n $this->_rev = null;\n // do not change the _changed flag here\n }", "public function copy()\n\t\t{\n\t\t\treturn unserialize(serialize($this)); \n\t\t}", "public function __clone()\n {\n $this->invalidateCache();\n }", "public function __clone()\n {\n $this->data = clone $this->data;\n }", "final public function __clone()\n {\n return;\n }", "public function __clone()\n {\n $this->store = clone $this->store;\n }", "public function __clone()\n {\n // memory foot print as low as possible, even though this is trivial.\n $this->cache = array();\n }", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone(){}", "final public function __clone()\n {\n $this->aliased = false;\n }", "protected function __clone() { }", "public function __clone()\r\n {\r\n $this->_internalObject = clone $this->_internalObject;\r\n\t\t$a=serialize($this->_internalObject);\r\n\t\techo \"$a<br>\";\r\n }", "public function __clone() {}", "public function __clone() {}", "public function __clone() {}", "public function __clone() {}", "protected function __clone() {\n \n }", "public function __clone()\n {\n unset($this->id);\n }", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "public function __clone()\n {\n $this->_id = null;\n }", "final public function __clone() {}", "protected function __clone()\n {\n //no possibility for cloning of singleton class\n }", "public function __clone()\n {\n $this->iterator = NULL;\n $this->isvalid = false;\n }", "function __clone() { return $this; }", "function __clone() { return $this; }", "public function __clone()\n {\n $this->init(clone $this->original, $this->encoding);\n }", "final private function __clone(){}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "protected function __clone()\n {\n }", "private function __clone () {}", "private function __clone() {\n \n }", "private function __clone() {\n \n }", "protected function __clone()\n {}", "final public function __clone()\n {\n }", "final public function __clone()\n {\n }", "final public function __clone()\n {\n }", "public function __wakeup() {\n $this->unset_members();\n }", "protected function __clone()\n {\n \n }", "private function __clone() { }" ]
[ "0.7499972", "0.72443205", "0.72443205", "0.7226955", "0.7047302", "0.7027719", "0.69587237", "0.69440484", "0.6893722", "0.68110555", "0.6750657", "0.6726055", "0.6702723", "0.6702723", "0.6702723", "0.6702723", "0.6702723", "0.6702723", "0.6702723", "0.67006004", "0.6656915", "0.6643079", "0.6631992", "0.6603328", "0.6603328", "0.6603328", "0.6603328", "0.6602503", "0.65943563", "0.65751916", "0.65751916", "0.65751916", "0.65751916", "0.65751916", "0.65751916", "0.65751916", "0.65751916", "0.65751916", "0.65751916", "0.65751916", "0.6568056", "0.6561453", "0.6560408", "0.6555668", "0.65359265", "0.65359265", "0.65285945", "0.6528503", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.64979875", "0.6497738", "0.64959973", "0.6493457", "0.6493457", "0.64755875", "0.64730734", "0.64730734", "0.64730734", "0.6472574", "0.64531964", "0.6445919" ]
0.6455668
94
Internationalization FTW. Load our textdomain.
public function textdomain() { load_plugin_textdomain( 'wa11y', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sn_load_text_domain() {\n\n\tload_plugin_textdomain( 'dorzki-notifications-to-slack' );\n\n}", "public function load_text_domain()\n\t{\n\t\tload_plugin_textdomain('instantsearch', FALSE, basename(dirname(__FILE__)) . '/languages/');\n\t}", "public function load_text_domain() {\n\t\t\tload_plugin_textdomain($this->text_domain, false, dirname(plugin_basename(__FILE__)).'/lang/');\n\t\t\tdo_action('acf_options_page/load_text_domain'); \n\t\t}", "public function loadTextdomain()\n {\n load_plugin_textdomain($this->domain, false, $this->directory);\n }", "public function textdomain() {\n\t\tload_plugin_textdomain( 'store-last-login-date', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t}", "function ind_text_domain() {\n\tload_plugin_textdomain('indizar', false, 'indizar/lang');\n}", "public function load_text_domain() {\n load_theme_textdomain( 'jackpine',\n get_template_directory() . '/languages' );\n }", "function dust_text_domain() {\n load_plugin_textdomain( 'theme-package', false, DUST_ACC_PATH . '/languages' );\n }", "public function textdomain() {\n\t\tload_plugin_textdomain( 'global-user-password-reset', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t}", "public function load_textdomain()\n {\n }", "public function load_plugin_text_domain() {\n load_plugin_textdomain(\n 'text-domain',\n false,\n dirname(dirname(plugin_basename(__FILE__))) . '/languages/'\n );\n\n }", "function localization() {\n load_plugin_textdomain( 'cynetique-labels', false, dirname( plugin_basename( __FILE__ ) ) . '/language/' );\n}", "function eltd_core_text_domain() {\n load_plugin_textdomain('eltd_core', false, ELATED_CORE_REL_PATH.'/languages');\n }", "function mkd_re_text_domain() {\n load_plugin_textdomain('mkdf-real-estate', false, MIKADO_RE_REL_PATH.'/languages');\n }", "public function localization() {\n\t\t\tload_plugin_textdomain( 'bitlive-custom-codes', false, __DIR__ . '/languages/' );\n\t\t}", "function handle_load_domain() {\r\n // get current language\r\n $locale = get_locale ();\r\n // locate translation file\r\n $mofile = WP_PLUGIN_DIR . '/' . plugin_basename ( dirname ( __FILE__ ) ) . '/lang/' . $this->plugin_domain . '-' . $locale . '.mo';\r\n // load translation\r\n load_textdomain ( $this->plugin_domain, $mofile );\r\n }", "function bangla_phonetic_load_text_domain () {\n\tload_plugin_textdomain( 'bangla-phonetic', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n}", "function load_textdomain() {\n\t\t\tif ($this->text_domain_loaded) return;\n\n\t\t\tload_plugin_textdomain($this->text_domain, PLUGINDIR.'/'.plugin_basename(dirname(__FILE__)).'/languages', plugin_basename(dirname(__FILE__)).'/languages');\n\t\t\t$this->text_domain_loaded = true;\n\t\t}", "public function textdomain() {\n\t\t\n\t\tload_plugin_textdomain( 'hotlink-no-more', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );\n\t}", "function wpbm_plugin_text_domain(){\n load_plugin_textdomain( 'wp-blog-manager', false, basename( dirname( __FILE__ ) ) . '/languages/' );\n }", "function init() {\n\t\t\tload_plugin_textdomain( $this->text_domain, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t\t}", "public function localization_setup() {\n load_plugin_textdomain( 'wc-mailerlite', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n }", "function load_textdomain($domain, $mofile, $locale = \\null)\n {\n }", "function simple_login_history_load_textdomain() {\n load_plugin_textdomain('simple-login-history', false, dirname( plugin_basename( __FILE__ )) . '/languages/');\n}", "private function load_localization() {\n $plugin_i18n = new PLUGINNAME_i18n($this->getter()->get_translation_slug);\n add_action('plugins_loaded', array($plugin_i18n, 'load_plugin_textdomain'));\n }", "function tedxf_load_textdomain() {\n\tload_plugin_textdomain( 'tedxf', false, basename( dirname( __FILE__ ) ) . '/languages' );\n}", "function _textdomain($domain)\r\n\t{\r\n\t\tglobal $default_domain;\r\n\t\t$default_domain = $domain;\r\n\t}", "public function load_textdomain() {\n\t\tload_plugin_textdomain( 'wpchaosclient', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/');\n\t}", "private function set_locale()\n {\n\n $plugin_i18n = new myFOSSIL_Resources_i18n();\n $plugin_i18n->set_domain( $this->get_plugin_name() );\n\n $this->loader->add_action( 'plugins_loaded', $plugin_i18n,\n 'load_plugin_textdomain' );\n\n }", "function load_default_textdomain($locale = \\null)\n {\n }", "public function load_textdomain() {\n\t\t\t$mo_file_path = dirname( __FILE__ ) . '/languages/' . get_locale() . '.mo';\n\n\t\t\tload_textdomain( 'cherry-framework', $mo_file_path );\n\t\t}", "public function plugin_textdomain() {\n load_plugin_textdomain( CUSTOM_LOGIN_DIRNAME, false, CUSTOM_LOGIN_DIRNAME . '/languages/' );\n }", "public function load_plugin_textdomain() {\n\t\t\tload_plugin_textdomain( 'gfirem_date_time-locale', false, basename( dirname( __FILE__ ) ) . '/languages' );\n\t\t}", "function handle_load_domain()\n\t\t{\n\t\t\t$plugin_domain = 'gpc-kits';\n\t\t\t\n\t\t\t// TODO: define how client want get this value\n\t\t\t$locale = 'de_DE';\n\t\t\t\t\n\t\t\tif ($locale!='')\n\t\t\t{\n\t\t\t\t// locate translation file\n\t\t\t\t$mofile = WP_PLUGIN_DIR.'/'.plugin_basename(dirname\n\t\t\t\t(__FILE__)).'/lang/' . $plugin_domain . '-' .\n\t\t\t\t$locale . '.mo';\n\t\t\t\t// load translation\n\t\t\t\tload_textdomain($plugin_domain, $mofile);\n\t\t\t}\n\t\t}", "public function localization_setup() {\n load_plugin_textdomain( 'baseplugin', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n }", "public function load_translation() {\n\t\t\t$locale = apply_filters( 'plugin_locale', determine_locale(), 'sv_core' );\n\t\t\tload_textdomain( 'sv_core', dirname( __FILE__ ) . '/languages/sv_core-'.$locale.'.mo' );\n\t\t}", "function load_script_textdomain($handle, $domain = 'default', $path = '')\n {\n }", "function load_theme_textdomain($domain, $path = \\false)\n {\n }", "function load_textdomain() {\r\n load_plugin_textdomain( WPC_CLIENT_TEXT_DOMAIN, false, dirname( 'wp-client-client-portals-file-upload-invoices-billing/wp-client-lite.php' ) . '/languages/' );\r\n }", "function yourls_load_custom_textdomain( $domain, $path ) {\n\t$locale = yourls_apply_filter( 'load_custom_textdomain', yourls_get_locale(), $domain );\n if( !empty( $locale ) ) {\n $mofile = rtrim( $path, '/' ) . '/'. $domain . '-' . $locale . '.mo';\n return yourls_load_textdomain( $domain, $mofile );\n }\n}", "public function load_textdomain()\n {\n\n if (null !== $this->get_path()) {\n load_textdomain($this->textdomain, $this->get_path());\n }\n load_plugin_textdomain($this->textdomain, false, Kirki::$path . '/languages');\n\n }", "function load_muplugin_textdomain($domain, $mu_plugin_rel_path = '')\n {\n }", "function lh_load_theme_textdomain(){\n load_theme_textdomain(LANG_NAMESPACE, get_template_directory() . '/lang');\n}", "function load_textdomain(){\n\t\tload_theme_textdomain('wa_wcc_txt', get_template_directory() . '/lang/');\n\t}", "function joe_uah_load_textdomain() {\n\tload_plugin_textdomain( 'ultimate-admin-helpers', false, basename( __DIR__ ) . '/languages/' );\n}", "function yourls_load_textdomain( $domain, $mofile ) {\n\tglobal $yourls_l10n;\n\n\t$plugin_override = yourls_apply_filter( 'override_load_textdomain', false, $domain, $mofile );\n\n\tif ( true == $plugin_override ) {\n\t\treturn true;\n\t}\n\n\tyourls_do_action( 'load_textdomain', $domain, $mofile );\n\n\t$mofile = yourls_apply_filter( 'load_textdomain_mofile', $mofile, $domain );\n\n\tif ( !is_readable( $mofile ) ) {\n trigger_error( 'Cannot read file ' . str_replace( YOURLS_ABSPATH.'/', '', $mofile ) . '.'\n . ' Make sure there is a language file installed. More info: http://yourls.org/translations' );\n return false;\n }\n\n\t$mo = new MO();\n\tif ( !$mo->import_from_file( $mofile ) )\n return false;\n\n\tif ( isset( $yourls_l10n[$domain] ) )\n\t\t$mo->merge_with( $yourls_l10n[$domain] );\n\n\t$yourls_l10n[$domain] = &$mo;\n\n\treturn true;\n}", "private function set_locale() {\n\n\t\t$plugin_i18n = new I18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "function manhattan_text_domain() {\r\n\t\tload_plugin_textdomain( 'manhattan', false, basename( dirname( __FILE__ ) ) . '/lang' );\r\n\t}", "function acf_load_textdomain($domain = 'acf')\n{\n}", "protected function load_textdomain() {\n\t\tload_plugin_textdomain($this->textdomain, false, plugin_basename(dirname(__FILE__)).'/languages');\n\t}", "private function set_locale() {\n\n\t\t$plugin_i18n = new Service_Tracker_i18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "public function load_plugin_textdomain() {\n\t\t\tload_plugin_textdomain( 'gfirem-webcam-field-locale', false, basename( dirname( __FILE__ ) ) . '/languages' );\n\t\t}", "public function load_lang() {\n /** Set our unique textdomain string */\n $textdomain = 'ninja-forms';\n\n /** The 'plugin_locale' filter is also used by default in load_plugin_textdomain() */\n $locale = apply_filters( 'plugin_locale', get_locale(), $textdomain );\n\n /** Set filter for WordPress languages directory */\n $wp_lang_dir = apply_filters(\n 'ninja_forms_wp_lang_dir',\n WP_LANG_DIR . '/ninja-forms/' . $textdomain . '-' . $locale . '.mo'\n );\n\n /** Translations: First, look in WordPress' \"languages\" folder = custom & update-secure! */\n load_textdomain( $textdomain, $wp_lang_dir );\n\n /** Translations: Secondly, look in plugin's \"lang\" folder = default */\n $plugin_dir = trailingslashit( basename( dirname( dirname( __FILE__ ) ) ) ) . basename( dirname( __FILE__ ) );\n $lang_dir = apply_filters( 'ninja_forms_lang_dir', $plugin_dir . '/lang/' );\n load_plugin_textdomain( $textdomain, FALSE, $lang_dir );\n }", "public function atmf_load_plugin_textdomain(){\n\n $domain = $this->plugin_slug;\n $locale = apply_filters( 'plugin_locale', get_locale(), 'atmf' );\n\n load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );\n load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );\n }", "function mbifthen_load_textdomain() {\r\n\tload_plugin_textdomain( 'multibanco-ifthen-software-gateway-for-woocommerce', false, dirname( plugin_basename( __FILE__ ) ).'/lang/' );\r\n}", "public function wpl_toolskit_load_textdomain() {\n\t\tload_plugin_textdomain( 'medical-toolskit', false, dirname( plugin_basename(__FILE__) ) . '/languages/' );\t\n\t}", "public function load_plugin_textdomain() {\n\n\t\t\t$domain = 'wolf-woocommerce-quickview';\n\t\t\t$locale = apply_filters( 'wolf-woocommerce-quickview', get_locale(), $domain );\n\t\t\tload_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );\n\t\t\tload_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t\t}", "function EWD_URP_localization_setup() {\n\t\tload_plugin_textdomain('ultimate-reviews', false, dirname(plugin_basename(__FILE__)) . '/lang/');\n}", "private function set_locale() {\n\n\t\t$plugin_i18n = new APS_I18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "function i18n() {\n\tload_theme_textdomain( 'additive', ADDITIVE_PATH . '/languages' );\n }", "function load_plugin_textdomain($domain, $deprecated = \\false, $plugin_rel_path = \\false)\n {\n }", "protected function loadLocalization() {}", "function sec_init() {\n\tload_plugin_textdomain(EVNT_TEXTDOMAIN, false, dirname( plugin_basename( __FILE__ ) ) );\n}", "public function load_textdomain() {\n\t\t\t// Set filter for plugin's languages directory\n\t\t\t$lang_dir = dirname( plugin_basename( $this->file ) ) . '/languages/';\n\t\t\t$lang_dir = apply_filters( 'edd_social_discounts_languages_directory', $lang_dir );\n\n\t\t\t// Traditional WordPress plugin locale filter\n\t\t\t$locale = apply_filters( 'plugin_locale', get_locale(), 'edd-social-discounts' );\n\t\t\t$mofile = sprintf( '%1$s-%2$s.mo', 'edd-social-discounts', $locale );\n\n\t\t\t// Setup paths to current locale file\n\t\t\t$mofile_local = $lang_dir . $mofile;\n\t\t\t$mofile_global = WP_LANG_DIR . '/edd-social-discounts/' . $mofile;\n\n\t\t\tif ( file_exists( $mofile_global ) ) {\n\t\t\t\t// Look in global /wp-content/languages/edd-auto-register folder\n\t\t\t\tload_textdomain( 'edd-social-discounts', $mofile_global );\n\t\t\t} elseif ( file_exists( $mofile_local ) ) {\n\t\t\t\t// Look in local /wp-content/plugins/edd-auto-register/languages/ folder\n\t\t\t\tload_textdomain( 'edd-social-discounts', $mofile_local );\n\t\t\t} else {\n\t\t\t\t// Load the default language files\n\t\t\t\tload_plugin_textdomain( 'edd-social-discounts', false, $lang_dir );\n\t\t\t}\n\t\t}", "function kino_load_textdomain() {\n\t\t\t\t\t\t\n\t\t\t// BP group announcements\n\t\t\tload_plugin_textdomain( \n\t\t\t\t'bpga',\n\t\t\t\tfalse, \n\t\t\t\t'kinogeneva-translations/languages/'\n\t\t\t);\n\t\t\t\n\t\t\t// BP group calendar\n\t\t\tload_plugin_textdomain( \n\t\t\t\t'groupcalendar',\n\t\t\t\tfalse, \n\t\t\t\t'kinogeneva-translations/languages/'\n\t\t\t);\n\t\t\t\n\t\t\t// BuddyPress Group Email Subscription\n\t\t\tload_plugin_textdomain( \n\t\t\t\t'bp-ass',\n\t\t\t\tfalse, \n\t\t\t\t'kinogeneva-translations/languages/'\n\t\t\t);\n\t\t\t\n\n}", "function load_textdomain() {\n\tload_plugin_textdomain( 'mcavoy', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );\n}", "public function init_theme_textdomain() {\n\n\t\tload_theme_textdomain( PRSOTHEMEFRAMEWORK__DOMAIN, get_stylesheet_directory() . '/languages' );\n\n\t}", "protected function load_translations() {\n\t\t// load the plugin text domain\n\t\tload_plugin_textdomain( 'mailchimp-for-wp', false, 'mailchimp-for-wp-pro/languages/' );\n\t}", "function i18n() {\n\tload_theme_textdomain( 'wpd', WPDOC_HLTR_PATH . '/languages' );\n}", "public function i18n() {\r\n load_plugin_textdomain( 'woolentor-pro', false, dirname( plugin_basename( WOOLENTOR_ADDONS_PL_ROOT_PRO ) ) . '/languages/' );\r\n }", "function yourls_load_default_textdomain() {\n\t$yourls_locale = yourls_get_locale();\n\n if( !empty( $yourls_locale ) )\n return yourls_load_textdomain( 'default', YOURLS_LANG_DIR . \"/$yourls_locale.mo\" );\n\n return false;\n}", "private function set_locale() {\n\n\t\t$plugin_i18n = new Soisy_Pagamento_Rateale_i18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\t}", "public function load_plugin_textdomain() {\n $domain = $this->plugin_slug;\n $locale = apply_filters('plugin_locale', get_locale(), $domain);\n\n load_textdomain($domain, trailingslashit(WP_LANG_DIR) . $domain . '/' . $domain . '-' . $locale . '.mo');\n load_plugin_textdomain($domain, FALSE, basename(plugin_dir_path(dirname( __FILE__ ))) . '/languages');\n }", "public function i18n() {\n load_plugin_textdomain( 'elementor-hubspot-bulb' );\n }", "function sl_access_load_textdomain() {\n load_plugin_textdomain( 'sl-accessibility-button', false, dirname( plugin_basename( __FILE__ ) ) . '/language' );\n}", "public function initLocalization() {\n $moFiles = scandir(trailingslashit($this->dir) . 'languages/');\n foreach ($moFiles as $moFile) {\n if (strlen($moFile) > 3 && substr($moFile, -3) == '.mo' && strpos($moFile, get_locale()) > -1) {\n load_textdomain('WP_Visual_Chat', trailingslashit($this->dir) . 'languages/' . $moFile);\n }\n }\n }", "function i18n() {\n\tload_theme_textdomain( 'project', Project_PATH . '/languages' );\n }", "public function load_plugin_textdomain() {\n\t\tload_plugin_textdomain( 'storefront-woocommerce-customiser', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t}", "function _load_textdomain_just_in_time($domain)\n {\n }", "function localize_plugin()\r\n{\r\n load_plugin_textdomain( 'favicon', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/');\r\n}", "public function load_plugin_textdomain() {\n\t\t$domain = $this->plugin_slug;\n\t\t$locale = apply_filters( 'plugin_locale', get_locale(), $domain );\n\n\t\tload_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );\n\t}", "public function load_plugin_textdomain() {\n\n\t\t$domain = $this->plugin_slug;\n\t\t$locale = apply_filters( 'plugin_locale', get_locale(), $domain );\n\n\t\tload_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );\n\n\t}", "function wtmds_init() {\n\t\t$plugin_dir = basename(dirname(__FILE__));\n\t\tload_plugin_textdomain( 'wtmds', null, $plugin_dir.'/languages/' );\n\t}", "public function plugin_textdomain()\r\n\t{\r\n\t\t$domain = 'wp-fading-content-slider-locale';\r\n\t\t$locale = apply_filters( 'plugin_locale', get_locale(), $domain );\r\n\t\tload_textdomain( $domain, WP_LANG_DIR.'/'.$domain.'/'.$domain.'-'.$locale.'.mo' );\r\n\t\tload_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/locale/' );\r\n\t}", "function wp_users_list_load_textdomain() {\n\t$plugin_path = plugin_basename( dirname( __FILE__ ) );\n\t$plugin_path .= '/languages';\n\n\tload_plugin_textdomain(\n\t\t'wp-users-list',\n\t\tfalse,\n\t\t$plugin_path\n\t);\n}", "public function load_plugin_textdomain() {\n $locale = is_admin() && function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale();\n $locale = apply_filters( 'plugin_locale', $locale, 'wc-label-gallery' );\n\n unload_textdomain( 'wc-label-gallery' );\n load_plugin_textdomain( 'wc-label-gallery', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );\n }", "public function plugin_textdomain() {\n\t\tload_plugin_textdomain( 'wp-jquery-date-picker', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );\n\t}", "function yourls__( $text, $domain = 'default' ) {\n\treturn yourls_translate( $text, $domain );\n}", "function load_child_theme_textdomain($domain, $path = \\false)\n {\n }", "public function load($textDomain, $language);", "function dacig_load_textdomain() {\n\tload_plugin_textdomain( 'descriptions-as-captions-in-galleries', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n}", "function yourextension_lang(){\n load_plugin_textdomain('yourextension', false, basename( dirname( __FILE__ ) ) . '/languages');\n}", "public function setup_i18n() {\n\t\tload_plugin_textdomain( 'woocommerce-bundle-rate-shipping', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t}", "public function load_plugin_textdomain() {\n\n\t\t\t$domain = 'wolf-discography';\n\t\t\t$locale = apply_filters( 'wolf-discography', get_locale(), $domain );\n\t\t\tload_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );\n\t\t\tload_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t\t}", "public function i18n() {\n load_plugin_textdomain( 'elementor-lightx-widgets' );\n }", "public function load_plugin_textdomain() {\n\n\t\t$domain = $this->plugin_slug;\n\t\t$locale = apply_filters( 'plugin_locale', get_locale(), $domain );\n\n\t\tload_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );\n\t\tload_plugin_textdomain( $domain, FALSE, basename( plugin_dir_path( dirname( __FILE__ ) ) ) . '/languages/' );\n\n\t}", "public function load_plugin_textdomain() {\n\n\t\t$domain = $this->plugin_slug;\n\t\t$locale = apply_filters( 'plugin_locale', get_locale(), $domain );\n\n\t\tload_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );\n\t\tload_plugin_textdomain( $domain, FALSE, basename( plugin_dir_path( dirname( __FILE__ ) ) ) . '/languages/' );\n\n\t}", "public function load_textdomain() {\n\t\t// Set filter for plugin's languages directory\n\t\t$lang_dir = dirname( plugin_basename( __FILE__ ) ) . '/languages/';\n\t\t$lang_dir = apply_filters( 'bbp_notices_languages', $lang_dir );\n\n\t\t// Traditional WordPress plugin locale filter\n\t\t$locale = apply_filters( 'plugin_locale', get_locale(), 'bbpress-notices' );\n\t\t$mofile = sprintf( '%1$s-%2$s.mo', 'bbpress-notices', $locale );\n\n\t\t// Setup paths to current locale file\n\t\t$mofile_local = $lang_dir . $mofile;\n\t\t$mofile_global = WP_LANG_DIR . '/bbpress-notices/' . $mofile;\n\n\t\tif ( file_exists( $mofile_global ) ) {\n\t\t\t// Look in global /wp-content/languages/bbpress-notices folder\n\t\t\tload_textdomain( 'bbpress-notices', $mofile_global );\n\t\t} elseif ( file_exists( $mofile_local ) ) {\n\t\t\t// Look in local /wp-content/plugins/bbpress-notices/languages/ folder\n\t\t\tload_textdomain( 'bbpress-notices', $mofile_local );\n\t\t} else {\n\t\t\t// Load the default language files\n\t\t\tload_plugin_textdomain( 'bbpress-notices', false, $lang_dir );\n\t\t}\n\t}", "public function load_plugin_textdomain() {\n\t\tload_plugin_textdomain( 'wc_name_your_price' , false , dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t}", "public function load_plugin_textdomain() {\n\t\t$locale = apply_filters( 'plugin_locale', get_locale(), 'wcvendors-pro-simple-auctions' );\n\n\t\tload_textdomain( 'wcvendors-pro-simple-auctions', trailingslashit( WP_LANG_DIR ) . 'wc-vendors/wcvendors-pro-simple-auctions-' . $locale . '.mo' );\n\t\tload_plugin_textdomain( 'wcvendors-pro-simple-auctions', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\n\t}" ]
[ "0.81122077", "0.8074776", "0.80555385", "0.80191785", "0.79942864", "0.79508936", "0.7804828", "0.7802141", "0.778983", "0.7640888", "0.7638848", "0.76101226", "0.7604251", "0.7588344", "0.75735503", "0.7545353", "0.74344456", "0.7432846", "0.74310017", "0.74128175", "0.7401313", "0.7386359", "0.73757875", "0.7373444", "0.73647577", "0.7345432", "0.734388", "0.7311454", "0.7306584", "0.72986114", "0.72921467", "0.7291276", "0.7285226", "0.7283634", "0.72805697", "0.72702616", "0.72479343", "0.7246254", "0.72384816", "0.7232988", "0.7229275", "0.7228974", "0.7221684", "0.721395", "0.7203756", "0.7201305", "0.7192618", "0.71880484", "0.7166203", "0.7160582", "0.7149241", "0.71486765", "0.7144636", "0.7126294", "0.71116054", "0.7107213", "0.7103627", "0.71033156", "0.7099073", "0.7091378", "0.70699006", "0.7068801", "0.70639783", "0.7054229", "0.7046496", "0.7030911", "0.70257455", "0.7022774", "0.70205003", "0.70193964", "0.7014146", "0.7005735", "0.7002386", "0.70005834", "0.69993514", "0.69971496", "0.6982661", "0.6976936", "0.69746906", "0.6971974", "0.69706047", "0.6953899", "0.69512117", "0.6949303", "0.6947189", "0.6945401", "0.69389325", "0.6934763", "0.6925631", "0.6922421", "0.6921539", "0.69192636", "0.69160604", "0.69131094", "0.6891713", "0.6890721", "0.6890721", "0.68901604", "0.68880767", "0.6880839" ]
0.7929281
6
Returns array of enabled tools.
public function get_enabled_tools() { // If already defined, get out of here. if ( isset( $this->enabled_tools ) ) { return $this->enabled_tools; } // Get our settings. $settings = $this->get_settings(); // Get enabled tools. if ( isset( $settings['enable_tools'] ) && ! empty( $settings['enable_tools'] ) ) { // Make sure its an array. if ( ! is_array( $settings['enable_tools'] ) ) { $settings['enable_tools'] = explode( ', ', $settings['enable_tools'] ); } // Return the enabled list. return $this->enabled_tools = $settings['enable_tools']; } // We have no enabled tools. return $this->enabled_tools = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getTools()\n {\n return self::TOOLS;\n }", "function get_tools()\n {\n }", "public function tools()\n {\n return [\n new Viewcache,\n new PriceTracker(),\n new UpdateOrder(),\n ];\n }", "public function tools()\n\t{\n\t\tif ( ! $this->tools )\n\t\t{\n\t\t\trequire_once dirname( __FILE__ ) . '/class-bdefinite-tools.php';\n\t\t\t$this->tools = new bDefinite_Tools();\n\t\t}\n\n\t\treturn $this->tools;\n\t}", "public static function getToolSettings();", "function getEnabledPlugins();", "public function provides(): array\n {\n $commands = CommandsList::toLoad($this->app::VERSION);\n $customCommands = CommandsList::getCustomCommands();\n $commandsList = array_values($commands) + array_keys($customCommands);\n\n return $commandsList;\n }", "public function getTools(){\r\n\t\trequire 'classes/view.php';\r\n\t\t$view = new view();\r\n\t\t$view->setTemplate('admin/tools');\r\n\t\treturn $view->loadTemplate(new stdClass());\r\n\t}", "public static function get_enabled_components() {\r\n\t\treturn self::$enabled_components;\r\n\t}", "public function enabled(): array;", "protected function getPersonalTools() {\n\t\t$menu = new MenuBuilder();\n\n\t\t$this->buildPersonalTools( $menu );\n\n\t\t// Allow other extensions to add or override tools\n\t\tHooks::run( 'MobileMenu', [ 'personal', &$menu ] );\n\t\treturn $menu->getEntries();\n\t}", "private function getConfigurationTools() {\n\t\t$menu = new MenuBuilder();\n\n\t\t$this->insertSettingsMenuItem( $menu );\n\n\t\treturn $menu->getEntries();\n\t}", "public function provides()\n {\n return array_merge(array_values($this->devCommands), [ 'migration.creator' ]);\n }", "function getToolSettings() {\n /*reserved for future use*/\n }", "public function provides(): array\n {\n if ($this->app->environment('production')) {\n return array_values($this->commands);\n } else {\n return array_merge(array_values($this->commands), array_values($this->devCommands));\n }\n }", "public static function getEnabled()\n {\n return array_filter(\n $providers = array_keys(self::getProviders(), true, true),\n function ($provider) {\n // if ('google' === $provider && ends_with(config('app.url'), '.local')) {\n // return false;\n // }\n\n return self::isConfigured($provider);\n }\n );\n }", "public function getEnabledModules()\n {\n return array_filter($this->definitions, [$this, 'filterEnabled']);\n }", "public function getTechniques()\n {\n return $this->techniques;\n }", "private function getAvailableSuites()\n {\n return $this->suiteRepository->getSuites();\n }", "protected function getHelpers(): array\n {\n return [];\n }", "public function isEnabledDataProvider()\n {\n return [[true, true], [false, false]];\n }", "public function tools($name = NULL) {\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Verify if account is confirmed\n $this->_check_unconfirmed_account();\n \n // Verify if the tool is enabled\n if ( $this->options->check_enabled('enable_tools_page') == false ) {\n \n show_404();\n \n }\n \n // Require the Tools interface\n require_once APPPATH . 'interfaces/Tools.php';\n \n if ( $name ) {\n \n if ( file_exists(APPPATH . 'tools' . '/' . $name . '/' . $name . '.php') ) {\n \n // Require the tool\n require_once APPPATH . 'tools' . '/' . $name . '/' . $name . '.php';\n \n // Call the class\n $class = ucfirst(str_replace('-', '_', $name));\n $get = new $class;\n \n \n $page = $get->page(['user_id' => $this->user_id]);\n \n $info = $get->check_info();\n \n // Load view/user/tool.php file\n $this->body = 'user/tool';\n $this->content = ['info' => $info, 'page' => $page];\n $this->user_layout();\n \n } else {\n \n echo display_mess(47);\n \n }\n \n } else {\n \n // Get all available tools.\n $classes = [];\n \n foreach (scandir(APPPATH . 'tools') as $dirname) {\n \n if ( is_dir(APPPATH . 'tools' . '/' . $dirname) && ($dirname != '.') && ($dirname != '..') ) {\n \n require_once APPPATH . 'tools' . '/' . $dirname . '/' . $dirname . '.php';\n \n $class = ucfirst(str_replace('-', '_', $dirname));\n \n $get = new $class;\n \n $classes[] = $get->check_info();\n \n }\n \n }\n \n // Get favourites tools\n $get_favourites = $this->user_meta->get_favourites($this->user_id);\n \n $favourites = '';\n \n if ( $get_favourites ) {\n \n $favourites = unserialize($get_favourites[0]->meta_value);\n \n }\n \n // Get all options\n $options = $this->options->get_all_options();\n \n // Load view/user/tools.php file\n $this->body = 'user/tools';\n $this->content = ['tools' => $classes, 'favourites' => $favourites, 'options' => $options];\n $this->user_layout();\n \n }\n \n }", "public function getPrograms()\n {\n $programs = array();\n \n \n foreach( $this->getSystemUserGroups() as $group )\n {\n foreach( $group->getSystemPrograms() as $prog )\n {\n $programs[$prog->controller] = true;\n }\n }\n \n foreach( $this->getSystemUserPrograms() as $prog )\n {\n $programs[$prog->controller] = true;\n }\n \n return $programs;\n }", "public function provides()\n {\n return [\n 'joy-voyager-export.export',\n 'joy-voyager-export.export-all',\n ];\n }", "function custom_get_available_tools_paths_base(){\n\t$paths_base = array();\n\t$paths_base[] = CUSTOM_PLUGIN_PATH.CUSTOM_PLUGIN_TOOLS_FOLDER;\n\t$paths_base = apply_filters(\"custom_get_available_tools_paths_base\", $paths_base);\n\treturn $paths_base;\n}", "public function getRequiredSystems()\n {\n return array();\n\n }", "public function getRequiredSystems()\n {\n return array();\n\n }", "public function provides()\n {\n return array_values($this->commands);\n }", "public function provides()\n {\n return array_values($this->commands);\n }", "function ava_menu_tools() {\n\treturn Ava_Menu_Tools::get_instance();\n}", "public function getHelpers()\n {\n return [\n ];\n }", "public function provides()\n\t{\n\t\treturn array('dandb');\n\t}", "public function getOsFeatures() : array\n {\n return $this->osFeatures;\n }", "public function getEnabledChecks() {\n $enabled = [];\n\n foreach (static::getChecks() as $check) {\n if (!$check->isSkipped()) {\n $enabled[] = $check;\n }\n }\n\n return $enabled;\n }", "public static function get_enabled_plugins() {\n global $DB;\n\n $plugins = core_plugin_manager::instance()->get_installed_plugins('surveyproformat');\n if (!$plugins) {\n return array();\n }\n $installed = array();\n foreach ($plugins as $plugin => $version) {\n $installed[] = 'surveyproformat_'.$plugin;\n }\n\n list($installed, $params) = $DB->get_in_or_equal($installed, SQL_PARAMS_NAMED);\n $disabled = $DB->get_records_select('config_plugins', \"plugin $installed AND name = 'disabled'\", $params, 'plugin ASC');\n foreach ($disabled as $conf) {\n if (empty($conf->value)) {\n continue;\n }\n list($type, $name) = explode('_', $conf->plugin, 2);\n unset($plugins[$name]);\n }\n\n $enabled = array();\n foreach ($plugins as $plugin => $version) {\n $enabled[$plugin] = $plugin;\n }\n\n return $enabled;\n }", "public function provides()\n\t{\n\t\treturn [\n\t\t\t'lock',\n\t\t\t'lock.store',\n\t\t\t'command.lock.clear'\n\t\t];\n\t}", "public function setTools($tools = [])\r\n {\r\n $this->tools = $tools;\r\n }", "public function provides()\n {\n $i = [];\n foreach ($this->commands as $key => $value) {\n array_push($i, 'command.forever.' . $key);\n }\n\n return $i;\n }", "public function provides()\n {\n return ['wit'];\n }", "function local_mediacore_fetch_lti_tools() {\n global $DB;\n $query = \"SELECT *\n FROM {lti_types}\n WHERE baseurl = :baseurl\n AND state = :state\";\n return $DB->get_records_sql($query, array(\n 'baseurl' => local_mediacore_fetch_lti_baseurl(),\n 'state' => MEDIACORE_LOCAL_LTI_TOOL_STATE_CONFIGURED,\n ));\n}", "public function getTheSupports();", "function ppom_get_editing_tools( $editing_tools ){\n\n\tparse_str ( $editing_tools, $tools );\n\tif (isset( $tools['editing_tools'] ) && $tools['editing_tools'])\n\t\treturn implode(',', $tools['editing_tools']);\n}", "public function provides()\n\t{\n\t\treturn [];\n\t}", "public function provides()\n\t{\n\t\treturn [];\n\t}", "public function provides()\n\t{\n\t\treturn [];\n\t}", "public function provides()\n\t{\n\t\treturn [];\n\t}", "public function provides()\n\t{\n\t\treturn [];\n\t}", "public function provides()\n\t{\n\t\treturn [];\n\t}", "public function getRequiredSystems()\n {\n return array(\n dirname(__FILE__).'/TestSystems/MergeSys1',\n );\n\n }", "public function provides() {\n\t\treturn array();\n\t}", "public function tools()\n {\n return [\n // (new Ads),\n new DashboardSidebar([\n 'links' => [\n\n /*\n * '{TEXT}' => [\n * '_icon' => '{ICON}',\n * '_url' => '{URL}', # Optional if _links is present\n * '_target' => '{TARGET}',\n * '_links' => [ # Optional if _url is present\n * '{TEXT}' => [\n * '_url' => '{URL}',\n * '_target' => '{TARGET}',\n * ]\n * '{TEXT}' => [\n * '_url' => '{URL}',\n * '_target' => '{TARGET}',\n * ]\n * ]\n * ]\n */\n\n 'Apps' => [\n '_can' => ['viewAny', App::class],\n '_icon' => fa('fas fa-layer-group'),\n '_url' => '/nova/resources/apps',\n '_params' => [\n 'resourceName' => 'apps',\n ],\n ],\n\n 'Blog Posts' => [\n '_can' => ['viewAny', Post::class],\n '_icon' => fa('fas fa-book'),\n '_url' => '/nova/resources/posts',\n '_params' => [\n 'resourceName' => 'posts',\n ],\n ],\n\n 'Shortcuts' => [\n '_can' => ['viewAny', Shortcut::class],\n '_icon' => fa('fas fa-sparkles'),\n '_url' => '/nova/resources/shortcuts',\n '_params' => [\n 'resourceName' => 'shortcuts',\n ],\n ],\n\n 'Signed Links' => [\n '_can' => ['viewAny', Itms::class],\n '_icon' => fa('fas fa-arrow-alt-to-bottom'),\n '_url' => '/nova/resources/itms',\n '_params' => [\n 'resourceName' => 'itms',\n ],\n ],\n\n 'Unsigned Links' => [\n '_can' => ['viewAny', Ipa::class],\n '_icon' => fa('fas fa-file-archive'),\n '_url' => '/nova/resources/ipas',\n '_params' => [\n 'resourceName' => 'ipas',\n ],\n ],\n\n 'Providers' => [\n '_can' => ['viewAny', Provider::class],\n '_icon' => fa('fab fa-app-store-ios'),\n '_url' => '/nova/resources/providers',\n '_params' => [\n 'resourceName' => 'providers',\n ],\n ],\n\n 'Team' => [\n '_can' => ['viewAny', Team::class],\n '_icon' => fa('fab fa-app-store-ios'),\n '_url' => '/nova/resources/teams',\n '_params' => [\n 'resourceName' => 'teams',\n ],\n ],\n\n 'Users' => [\n '_admin_only' => true,\n '_can' => ['viewAny', User::class],\n '_icon' => fa('fas fa-users'),\n '_url' => '/nova/resources/users',\n '_params' => [\n 'resourceName' => 'users',\n ],\n ],\n\n 'Logs' => [\n '_admin_only' => true,\n '_icon' => fa('fas fa-database'),\n '_url' => '/logs',\n ],\n\n 'Skins' => [\n '_can' => ['viewAny', Skin::class],\n '_icon' => fa('fas fa-moon-stars'),\n '_url' => '/nova/resources/skins',\n '_params' => [\n 'resourceName' => 'skins',\n ],\n ],\n\n 'Account' => [\n '_can' => ['view', Auth::user()],\n '_icon' => fa('fas fa-user-circle'),\n '_url' => '/nova/resources/users/'.Auth::id(),\n '_type' => 'detail',\n '_params' => [\n 'resourceId' => Auth::id(),\n 'resourceName' => 'users',\n ],\n ],\n\n ],\n ]),\n ];\n }", "public function provides()\n {\n return array_values($this->generators);\n }", "public function provides()\n {\n return ['tawk'];\n }", "public function provides() {\n\t\treturn [];\n\t}", "public function provides() {\n\t\treturn [];\n\t}", "public function provides()\n {\n return array(\n //\n );\n }", "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}", "static public function getOptionArray() {\n /**\n * Returnning an array of values for getOptionArray\n * with enabled and disabled value\n */\n /**\n * Prepare array\n * with Enabled\n * and disabled as options\n */\n return array (\n 1 => Mage::helper ( 'airhotels' )->__ ( 'Enabled' ),\n 2 => Mage::helper ( 'airhotels' )->__ ( 'Disabled' ) \n );\n }", "public function getDriverOptions(): array;", "public function provides()\n {\n return [\n 'command.acl.permission.cache',\n 'command.acl.permission.clear',\n 'command.acl.make.condition',\n ];\n }", "public function getRequiredSystems()\n {\n return array(\n 'AssetType',\n 'Asset',\n 'LocalAsset',\n 'Attribute',\n 'AttributeDataSource',\n 'Lookup',\n 'Linking',\n 'AdjacencyList',\n 'MaterialisedPathLinking',\n 'RecursiveLinking',\n 'Design',\n 'Keyword',\n 'Frontend',\n 'DataSource',\n 'FileDataSource',\n 'Project',\n 'RelationshipDataSource',\n dirname(__FILE__).'/TestSystems/TestDALSys1/',\n );\n\n }", "public function getRequiredSystems()\n {\n return array(\n 'AssetType',\n 'Asset',\n 'LocalAsset',\n 'Attribute',\n 'AttributeDataSource',\n 'Lookup',\n 'Linking',\n 'AdjacencyList',\n 'MaterialisedPathLinking',\n 'RecursiveLinking',\n 'Design',\n 'Keyword',\n 'Frontend',\n 'DataSource',\n 'FileDataSource',\n 'Project',\n 'RelationshipDataSource',\n dirname(__FILE__).'/TestSystems/TestDALSys1/',\n );\n\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n {\n return [];\n }", "public function provides()\n\t{\n\t\treturn array();\n\t}", "public function provides()\n\t{\n\t\treturn array();\n\t}", "public function provides()\n\t{\n\t\treturn array();\n\t}", "public function provides()\n\t{\n\t\treturn array();\n\t}", "public function provides()\n\t{\n\t\treturn array();\n\t}", "public function provides()\n\t{\n\t\treturn array();\n\t}", "public function provides()\n\t{\n\t\treturn array();\n\t}", "public function provides()\n\t{\n\t\treturn array();\n\t}", "public function provides()\n\t{\n\t\treturn array();\n\t}" ]
[ "0.74321854", "0.7397889", "0.73007166", "0.70221967", "0.6503069", "0.63667667", "0.6280566", "0.62039125", "0.6190657", "0.6180535", "0.6163957", "0.613895", "0.6121582", "0.6105552", "0.6053528", "0.60220975", "0.60137475", "0.59733015", "0.5951258", "0.5950733", "0.5947072", "0.5928743", "0.5910481", "0.59093434", "0.58942944", "0.58812773", "0.58812773", "0.58714116", "0.58714116", "0.58586633", "0.58488715", "0.5846299", "0.58445156", "0.58298993", "0.58087873", "0.5797539", "0.5794801", "0.57936394", "0.57839036", "0.5783872", "0.5780049", "0.5778192", "0.5766653", "0.5766653", "0.5766653", "0.5766653", "0.5766653", "0.5766653", "0.5754405", "0.5736048", "0.573147", "0.5731209", "0.57288784", "0.571701", "0.571701", "0.5715046", "0.5711566", "0.57074094", "0.5700261", "0.56964695", "0.5684673", "0.5684673", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5679504", "0.5677006", "0.5677006", "0.5677006", "0.5677006", "0.5677006", "0.5677006", "0.5677006", "0.5677006", "0.5677006" ]
0.8200138
0
Add items to the toolbar.
public function add_to_toolbar( $wp_admin_bar ) { // Only need to worry about this stuff if we have enabled tools. $enabled_tools = $this->get_enabled_tools(); if ( empty( $enabled_tools ) ) { return; } // Will hold all of the wA11y nodes. $wa11y_nodes = array(); // Process each enabled tool. foreach ( $enabled_tools as $tool ) { switch ( $tool ) { case 'wave': // Can we load WAVE? if ( $this->can_load_wave() ) { // Get WAVE settings. $settings = wa11y()->get_settings( 'wave' ); // Make sure its OK to add to the toolbar. if ( ! empty( $settings['load_in_toolbar'] ) && true == $settings['load_in_toolbar'] ) { // Build the WAVE url. $wave_url = get_permalink(); // Filter the WAVE url - includes $post object if it exists. $wave_url = apply_filters( 'wa11y_wave_url', $wave_url, get_post() ); // Add WAVE node if we have a URL. if ( ! empty( $wave_url ) ) { $wa11y_nodes[] = array( 'id' => 'wa11y-wave', 'title' => sprintf( __( 'View %s evaluation', 'wa11y' ), 'WAVE' ), 'href' => 'http://wave.webaim.org/report#/' . urlencode( $wave_url ), 'meta' => array( 'target' => '_blank' ), ); } } } break; } } // If we have nodes to add... if ( ! empty( $wa11y_nodes ) ) { // Add parent wA11y node. $wp_admin_bar->add_node( array( 'id' => 'wa11y', 'title' => '<span aria-hidden="true">wA11y</span><span class="screen-reader-text">Wally</span>', 'parent' => false, )); // Add child nodes. foreach ( $wa11y_nodes as $node ) { $wp_admin_bar->add_node( array_merge( $node, array( 'parent' => 'wa11y' ) ) ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initializeToolbarItems() {}", "protected function addToolbar()\n\t{\n\t\t$canDo\t= JHelperContent::getActions('com_menus');\n\t\t$user = JFactory::getUser();\n\n\t\t// Get the toolbar object instance\n\t\t$bar = JToolBar::getInstance('toolbar');\n\n\t\tJToolbarHelper::title(JText::_('COM_MENUS_VIEW_ITEMS_TITLE'), 'list menumgr');\n\n\t\tif ($canDo->get('core.create'))\n\t\t{\n\t\t\tJToolbarHelper::addNew('item.add');\n\t\t}\n\n\t\tif ($canDo->get('core.edit'))\n\t\t{\n\t\t\tJToolbarHelper::editList('item.edit');\n\t\t}\n\n\t\tif ($canDo->get('core.edit.state'))\n\t\t{\n\t\t\tJToolbarHelper::publish('items.publish', 'JTOOLBAR_PUBLISH', true);\n\t\t\tJToolbarHelper::unpublish('items.unpublish', 'JTOOLBAR_UNPUBLISH', true);\n\t\t}\n\n\t\tif (JFactory::getUser()->authorise('core.admin'))\n\t\t{\n\t\t\tJToolbarHelper::checkin('items.checkin', 'JTOOLBAR_CHECKIN', true);\n\t\t}\n\n\t\tif ($this->state->get('filter.published') == -2 && $canDo->get('core.delete'))\n\t\t{\n\t\t\tJToolbarHelper::deleteList('', 'items.delete', 'JTOOLBAR_EMPTY_TRASH');\n\t\t}\n\t\telseif ($canDo->get('core.edit.state'))\n\t\t{\n\t\t\tJToolbarHelper::trash('items.trash');\n\t\t}\n\n\t\tif ($canDo->get('core.edit.state'))\n\t\t{\n\t\t\tJToolbarHelper::makeDefault('items.setDefault', 'COM_MENUS_TOOLBAR_SET_HOME');\n\t\t}\n\n\t\tif (JFactory::getUser()->authorise('core.admin'))\n\t\t{\n\t\t\tJToolbarHelper::custom('items.rebuild', 'refresh.png', 'refresh_f2.png', 'JToolbar_Rebuild', false);\n\t\t}\n\n\t\t// Add a batch button\n\t\tif ($user->authorise('core.create', 'com_menus') && $user->authorise('core.edit', 'com_menus') && $user->authorise('core.edit.state', 'com_menus'))\n\t\t{\n\t\t\tJHtml::_('bootstrap.modal', 'collapseModal');\n\t\t\t$title = JText::_('JTOOLBAR_BATCH');\n\n\t\t\t// Instantiate a new JLayoutFile instance and render the batch button\n\t\t\t$layout = new JLayoutFile('joomla.toolbar.batch');\n\n\t\t\t$dhtml = $layout->render(array('title' => $title));\n\t\t\t$bar->appendButton('Custom', $dhtml, 'batch');\n\t\t}\n\n\t\tJToolbarHelper::help('JHELP_MENUS_MENU_ITEM_MANAGER');\n\t}", "protected function addToolBar()\n {\n JToolbarHelper::title(JText::_('COM_AGENDA_ADMIN_MANAGE_AGENDA_ITEMS'));\n JToolbarHelper::addNew('agendaitem.add');\n JToolbarHelper::editList('agendaitem.edit');\n JToolbarHelper::divider();\n JToolbarHelper::publish('agendaitems.publish', 'JTOOLBAR_PUBLISH', true);\n JToolbarHelper::custom('agendaitems.overwrittenUnpublish', 'unpublish', 'unpublish', 'JTOOLBAR_UNPUBLISH');\n JToolbarHelper::divider();\n JToolbarHelper::deleteList(JText::_('COM_AGENDA_AGENDA_ITEMS_DELETE_CONFIRM'), 'agendaitems.delete');\n }", "protected function addToolbar()\n\t{\n\t\t$app = Factory::getApplication();\n\t\t\n\t\t$this->option = $app->input->get('option', 'com_' . EcConst::getPrefix());\n\t\t$this->canDo = EcHelperAdmin::getActionsEc($this->option);\n\t\t\n\t\tJToolbarHelper::title(Text::_(JString::strtoupper($this->option)), 'stack article');\n\t\t\n\t\tif ($this->canDo->get('core.admin')) {\n\t\t\tJToolbarHelper::divider();\n\t\t\tJToolbarHelper::preferences($this->option);\n\t\t}\n\t}", "protected function addToolbar()\n\t{\t\t\n\t\t// Set toolbar items for the page\n\t\t$edit=JRequest::getVar('edit',true);\n\t\t$text=!$edit ? JText::_('COM_JOOMLEAGUE_GLOBAL_NEW') : JText::_('COM_JOOMLEAGUE_GLOBAL_EDIT');\n\t\tJLToolBarHelper::save('playground.save');\n\t\tif (!$edit)\n\t\t{\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PLAYGROUND_ADD_NEW'),'playground');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('playground.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// for existing items the button is renamed `close` and the apply button is showed\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PLAYGROUND_EDIT'),'playground');\n\t\t\tJLToolBarHelper::apply('playground.apply');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('playground.cancel','COM_JOOMLEAGUE_GLOBAL_CLOSE');\n\t\t}\n\t\tJToolBarHelper::divider();\n\t\tJLToolBarHelper::onlinehelp();\t\n\t}", "protected function addToolbar()\n\t{\n\t\tJFactory::getApplication()->input->set('hidemainmenu', true);\n\n\t\t$canDo = JHelperContent::getActions('com_cooltouraman');\n\t\t$isNew = ($this->item->id == 0);\n\n\t\tJToolbarHelper::title(\n\t\t\tJText::_(\n\t\t\t\t$isNew ? 'COM_COOLTOURAMAN_VIEW_NEW_EXPERIENCE_TITLE' : 'COM_COOLTOURAMAN_VIEW_EDIT_EXPERIENCE_TITLE'\n\t\t\t),\n\t\t\t'experience_level ' . ($isNew ? 'experience_level-add' : 'experience_level-edit')\n\t\t);\n\n\t\tif ($canDo->get('core.edit') || $canDo->get('core.create'))\n\t\t{\n\t\t\tJToolbarHelper::apply('experience_level.apply');\n\t\t\tJToolbarHelper::save('experience_level.save');\n\t\t}\n\n\t\tif (empty($this->item->id))\n\t\t{\n\t\t\tJToolbarHelper::cancel('experience_level.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJToolbarHelper::cancel('experience_level.cancel', 'JTOOLBAR_CLOSE');\n\t\t}\n\t}", "private function addToolbar(): void\n\t{\n\t\tFactory::getApplication()->input->set('hidemainmenu', true);\n\n\t\tToolbarHelper::title(Text::_('COM_JED_EDIT_EMAIL'), 'mail');\n\n\t\tif ($this->canDo->get('core.edit') || $this->canDo->get('core.create'))\n\t\t{\n\t\t\tToolbarHelper::apply('email.apply');\n\t\t\tToolbarHelper::save('email.save');\n\t\t}\n\n\t\tif ($this->canDo->get('core.create')\n\t\t\t&& $this->canDo->get(\n\t\t\t\t'core.manage'\n\t\t\t))\n\t\t{\n\t\t\tToolbarHelper::save2new('email.save2new');\n\t\t}\n\n\t\tif (!$this->item->get('id'))\n\t\t{\n\t\t\tToolbarHelper::cancel('email.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tToolbarHelper::cancel('email.cancel', 'JTOOLBAR_CLOSE');\n\t\t}\n\t}", "protected function addToolBar()\r\n\t{\r\n\t\t$title = JText::_('COM_SMF_MANAGER');\r\n\t\tif ($this->pagination->total)\r\n\t\t{\r\n\t\t\t$title .= \"<span style='font-size: 0.5em; vertical-align: middle;'> (\" . $this->pagination->total . \")</span>\";\r\n\t\t}\r\n\r\n\t\tJToolBarHelper::title($title,'smf');\r\n\r\n\t\tJToolBarHelper::addNew('smf.add');\r\n\t\tJToolBarHelper::editList('smf.edit');\r\n\t\tJToolBarHelper::deleteList('', 'datalist.delete');\r\n\t}", "protected function addToolbar() {\n JFactory::getApplication()->input->set('hidemainmenu', true);\n\n $user = JFactory::getUser();\n $isNew = ($this->item->id == 0);\n if (isset($this->item->checked_out)) {\n $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));\n } else {\n $checkedOut = false;\n }\n\n JToolBarHelper::title(JText::_('COM_CHARTIIB_TITLE_HIERARCHY'), 'generic');\n\n JToolBarHelper::custom('hierarchy.enregistrer', 'save.png', 'save.png', 'JTOOLBAR_SAVE', false);\n \n if (empty($this->item->id)) {\n JToolBarHelper::cancel('hierarchy.cancel', 'JTOOLBAR_CANCEL');\n } else {\n JToolBarHelper::cancel('hierarchy.cancel', 'JTOOLBAR_CLOSE');\n }\n }", "protected function addToolbar()\n\t{\n\t\t$acl = ProjectforkHelper::getActions();\n\t\t$user = JFactory::getUser();\n \n\t\tJToolBarHelper::title(JText::_('COM_CONTENT_ARTICLES_TITLE'), 'article.png');\n\n\t\tif ($acl->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_projectfork');\n\t\t\tJToolBarHelper::divider();\n\t\t}\n\n\t\tJToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER');\n\t}", "protected function addToolbar(){\n\t\tJRequest::setVar('hidemainmenu', true);\n\t\t$isNew\t\t= ($this->item->id == 0);\n\t\tJToolBarHelper::title($isNew ? JText::_('ADD_coment') : JText::_('EDIT_coment'), 'coment.png');\n\t\tJToolBarHelper::apply('coment.apply');\n\t\tJToolBarHelper::save('coment.save');\n\t\tJToolBarHelper::save2new('coment.save2new');\n\t\t// If an existing item, can save to a copy.\n\t\tif (empty($this->item->id)) {\n\t\t\tJToolBarHelper::cancel('coment.cancel');\n\t\t}\n\t\telse {\n\t\t\tJToolBarHelper::cancel('coment.cancel', 'JTOOLBAR_CLOSE');\n\t\t}\n\t}", "protected function addToolbar()\n\t{\n\t\tif (!$this->edit)\n\t\t{\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_CLUB_ADD_NEW'),'jl-clubs');\n\t\t\tJLToolBarHelper::save('club.save');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('club.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// for existing items the button is renamed `close` and the apply button is showed\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_CLUB_EDIT'). ': ' . $this->form->getValue('name'), 'jl-clubs');\n\t\t\tJLToolBarHelper::apply('club.apply');\n\t\t\tJLToolBarHelper::save('club.save');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('club.cancel','COM_JOOMLEAGUE_GLOBAL_CLOSE');\n\t\t}\n\t\t\n\t\tJToolBarHelper::help('screen.joomleague',true);\n\t}", "protected function addToolBar() \r\n {\r\n JFactory::getApplication()->input->set('hidemainmenu', true);\r\n\r\n $user = JFactory::getUser();\r\n $userId = $user->get('id');\r\n\r\n //Get the allowed actions list\r\n $canDo = OdysseyHelper::getActions($this->state->get('filter.category_id'));\r\n $isNew = $this->item->id == 0;\r\n\r\n //Display the view title and the icon.\r\n JToolBarHelper::title(JText::_('COM_ODYSSEY_EDIT_CUSTOMER'), 'pencil-2');\r\n\r\n if($canDo->get('core.edit') || (count($user->getAuthorisedCategories('com_odyssey', 'core.edit'))) > 0 || $this->item->created_by == $userId) {\r\n // We can save the new record\r\n JToolBarHelper::apply('customer.apply', 'JTOOLBAR_APPLY');\r\n JToolBarHelper::save('customer.save', 'JTOOLBAR_SAVE');\r\n }\r\n\r\n JToolBarHelper::cancel('customer.cancel', 'JTOOLBAR_CANCEL');\r\n }", "protected function addToolbar()\n\t{\n\t\trequire_once JPATH_COMPONENT.'/helpers/wbty_payments.php';\n\n\t\t$state\t= $this->get('State');\n\t\t$canDo\t= Wbty_paymentsHelper::getActions($state->get('filter.category_id'));\n\t\t\n\t\tJToolBarHelper::title(JText::_('COM_WBTY_PAYMENTS_TITLE_CONTROLPANEL'), 'controlpanel.png');\n\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_wbty_payments');\n\t\t}\n\n\t}", "protected function addToolbar()\n\t{\n\t\t$bar = JToolBar::getInstance('sender');\n\t\t$bar->appendButton('Link', 'export', 'COM_NEWSLETTER_NEWSLETTER_SEND', '#');\n\n\t\t// Load the submenu.\n\t\tNewsletterHelper::addSubmenu(JRequest::getVar('view'));\n\t}", "protected function addToolbar()\n\t{\n\t\t$user\t= JFactory::getUser();\n\t\t$result\t= new JObject;\n\n\t\t$actions = array(\n\t\t\t'core.admin', 'core.manage'\n\t\t);\n\n\t\tforeach ($actions as $action) {\n\t\t\t$result->set($action, $user->authorise($action, 'com_toes'));\n\t\t}\n\t\t\n\t\t$canDo\t= $result;\n\t\t\n\t\tJToolBarHelper::title(JText::_('COM_TOES'), 'blue-transparant');\n\t\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_toes');\n\t\t\tJToolBarHelper::divider();\n\t\t}\n\t}", "protected function addToolbar()\n\t{\n JToolbarHelper::preferences('com_jpetition');\n JToolbarHelper::title(JText::_('COM_JPETITION_PETITIONS_LIST'), 'checkmark');\n \n if ($this->filterState == self::PETITIONS_STATE_NOT_PUBLISHED){\n JToolbarHelper::publish('petitions.publish', 'JTOOLBAR_PUBLISH', true);\n }\n JToolbarHelper::addNew('petition.add', 'JTOOLBAR_NEW', false);\n\n JToolbarHelper::back('COM_JPETITION_CONTROL_PANEL', 'index.php?option=com_jpetition');\n JToolbarHelper::link('http://www.drjadko.org/donate', JText::_('COM_JPETITION_DONATE'), 'help');\n }", "public function getToolbarItems();", "protected function addToolbar()\n\t{\n\t\t// Set toolbar items for the page\n\t\tif ($this->copy)\n\t\t{\n\t\t\t$toolbarTitle=JText::_('COM_JOOMLEAGUE_ADMIN_PROJECT_COPY_PROJECT');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$toolbarTitle=(!$this->edit) ? JText::_('COM_JOOMLEAGUE_ADMIN_PROJECT_ADD_NEW') : JText::_('COM_JOOMLEAGUE_ADMIN_PROJECT_EDIT');\n\t\t\tJToolBarHelper::divider();\n\t\t}\n\t\tJToolBarHelper::title($toolbarTitle,'ProjectSettings');\n\t\t\n\t\tif (!$this->copy)\n\t\t{\n\t\t\tJLToolBarHelper::apply('project.apply');\n\t\t\tJLToolBarHelper::save('project.save');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJLToolBarHelper::save('project.copysave');\n\t\t}\n\t\tJToolBarHelper::divider();\n\t\tif ((!$this->edit) || ($this->copy))\n\t\t{\n\t\t\tJLToolBarHelper::cancel('project.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// for existing items the button is renamed `close`\n\t\t\tJLToolBarHelper::cancel('project.cancel',JText::_('COM_JOOMLEAGUE_GLOBAL_CLOSE'));\n\t\t}\n\t\tJLToolBarHelper::onlinehelp();\n\t}", "protected function addToolbar()\n\t{\n\t\t// Hide main menu.\n\t\tJFactory::getApplication()->input->set('hidemainmenu', 1);\n\n\t\t$helper = AssociationsHelper::getExtensionHelper($this->extensionName);\n\t\t$title = $helper->getTypeTitle($this->typeName);\n\n\t\t$languageKey = strtoupper($this->extensionName . '_' . $title . 'S');\n\n\t\tif ($this->typeName === 'category')\n\t\t{\n\t\t\t$languageKey = strtoupper($this->extensionName) . '_CATEGORIES';\n\t\t}\n\n\t\tJToolbarHelper::title(JText::sprintf('COM_ASSOCIATIONS_TITLE_EDIT', JText::_($this->extensionName), JText::_($languageKey)), 'contract assoc');\n\n\t\t$bar = JToolbar::getInstance('toolbar');\n\n\t\t$bar->appendButton(\n\t\t\t'Custom', '<button onclick=\"Joomla.submitbutton(\\'reference\\')\" '\n\t\t\t. 'class=\"btn btn-small btn-success\"><span class=\"icon-apply icon-white\" aria-hidden=\"true\"></span>'\n\t\t\t. JText::_('COM_ASSOCIATIONS_SAVE_REFERENCE') . '</button>', 'reference'\n\t\t);\n\n\t\t$bar->appendButton(\n\t\t\t'Custom', '<button onclick=\"Joomla.submitbutton(\\'target\\')\" '\n\t\t\t. 'class=\"btn btn-small btn-success\"><span class=\"icon-apply icon-white\" aria-hidden=\"true\"></span>'\n\t\t\t. JText::_('COM_ASSOCIATIONS_SAVE_TARGET') . '</button>', 'target'\n\t\t);\n\n\t\tif ($this->typeName === 'category' || $this->extensionName === 'com_menus' || $this->save2copy === true)\n\t\t{\n\t\t\tJToolBarHelper::custom('copy', 'copy.png', '', 'COM_ASSOCIATIONS_COPY_REFERENCE', false);\n\t\t}\n\n\t\tJToolbarHelper::cancel('association.cancel', 'JTOOLBAR_CLOSE');\n\t\tJToolbarHelper::help('JHELP_COMPONENTS_ASSOCIATIONS_EDIT');\n\n\t\tJHtmlSidebar::setAction('index.php?option=com_associations');\n\t}", "protected function addToolBar() \r\n {\r\n // Ponemos el nombre del titulo de la vista y el icono que seleccionemos.\r\n JToolBarHelper::title(JText::_('Modelos de Marcas de Vehiculo'),'bookmark banners');\r\n JToolBarHelper::deleteList('', 'nodelos.delete');\r\n JToolBarHelper::editList('nodelo.edit');\r\n JToolBarHelper::addNew('nodelo.add');\r\n }", "protected function addToolbar()\n\t{\n\t\t// Initialise variables.\n\t\t$state\t= $this->get('State');\n\t\t$canDo\t= HelloHelper::getActions();\n\n\t\tJToolBarHelper::title(JText::_('COM_HELLO_MESSAGES_TITLE'), 'hello');\n\n\t\tif ($canDo->get('core.create')) {\n\t\t\tJToolBarHelper::addNew('message.add', 'JTOOLBAR_NEW');\n\t\t}\n\n\t\tif ($canDo->get('core.edit')) {\n\t\t\tJToolBarHelper::editList('message.edit', 'JTOOLBAR_EDIT');\n\t\t}\n\n\t\tif ($canDo->get('core.edit.state')) {\n\t\t\tJToolBarHelper::publishList('messages.publish', 'JTOOLBAR_PUBLISH');\n\t\t\tJToolBarHelper::unpublishList('messages.unpublish', 'JTOOLBAR_UNPUBLISH');\n\t\t\tJToolBarHelper::archiveList('messages.archive','JTOOLBAR_ARCHIVE');\n\t\t}\n\n\t\tif ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {\n\t\t\tJToolBarHelper::deleteList('', 'messages.delete','JTOOLBAR_EMPTY_TRASH');\n\t\t} else if ($canDo->get('core.edit.state')) {\n\t\t\tJToolBarHelper::trash('messages.trash','JTOOLBAR_TRASH');\n\t\t}\n\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_hello');\n\t\t}\n\t}", "protected function addToolbarItem(ToolbarItemController $controller)\n {\n // pass current CRUD handler object to the toolbar item controller.\n $controller->setHandler($this);\n $this->_toolbarItems[] = $controller;\n }", "protected function addToolbar()\n\t{\n\t\tJFactory::getApplication()->input->set('hidemainmenu', true);\n\n\t\t$canDo\t= JHelperContent::getActions('com_languages');\n\n\t\tJToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_OVERRIDE_EDIT_TITLE'), 'comments-2 langmanager');\n\n\t\tif ($canDo->get('core.edit'))\n\t\t{\n\t\t\tJToolbarHelper::apply('override.apply');\n\t\t\tJToolbarHelper::save('override.save');\n\t\t}\n\n\t\t// This component does not support Save as Copy\n\n\t\tif ($canDo->get('core.edit') && $canDo->get('core.create'))\n\t\t{\n\t\t\tJToolbarHelper::save2new('override.save2new');\n\t\t}\n\n\t\tif (empty($this->item->key))\n\t\t{\n\t\t\tJToolbarHelper::cancel('override.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJToolbarHelper::cancel('override.cancel', 'JTOOLBAR_CLOSE');\n\t\t}\n\t\tJToolbarHelper::divider();\n\t\tJToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_OVERRIDES_EDIT');\n\t}", "protected function addToolbar()\n\t{\n JToolbarHelper::preferences('com_jpetition');\n JToolbarHelper::title(JText::_('COM_JPETITION'), 'checkmark');\n }", "public function addToolbar()\n\t{\n\t\tJToolBarHelper::title(JText::_('JBS_EI_TITLE'), 'folder');\n\t\tJToolBarHelper::help('jbsexportimport', true);\n\t}", "protected function addToolbar()\n\t{\n\t\t$canDo\t= UsersHelper::getActions();\n\n\t\tif ($canDo->get('core.create')) {\n\t\t\tJToolBarHelper::addNew('group.add');\n\t\t}\n\t\tif ($canDo->get('core.edit')) {\n\t\t\tJToolBarHelper::editList('group.edit');\n\t\t\tJToolBarHelper::divider();\n\t\t}\n\t\tif ($canDo->get('core.delete')) {\n\t\t\tJToolBarHelper::deleteList('', 'groups.delete');\n\t\t\tJToolBarHelper::divider();\n\t\t}\n\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_users');\n\t\t\tJToolBarHelper::divider();\n\t\t}\n\t\tJToolBarHelper::help('JHELP_USERS_GROUPS');\n\t}", "protected function addToolBar()\n {\n $title = JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLDS');\n\n if ($this->pagination->total)\n {\n $title .= \"<span style='font-size: 0.5em; vertical-align: middle;'>(\" . $this->pagination->total . \")</span>\";\n }\n }", "public function ext_makeToolBar() {}", "protected function addToolbar()\r\n {\r\n $canDo = JVoterHelper::getActions();\r\n $user = JFactory::getUser();\r\n \r\n // Get the toolbar object instance\r\n $bar = JToolbar::getInstance('toolbar');\r\n \r\n JToolbarHelper::title(JText::_('COM_JVOTER_TITLE_FEATURES'), 'puzzle-piece feature');\r\n \r\n if ($canDo->get('core.create'))\r\n {\r\n JToolbarHelper::addNew('feature.add');\r\n }\r\n \r\n if ($canDo->get('core.edit') || $canDo->get('core.edit.own'))\r\n {\r\n JToolbarHelper::editList('features.edit');\r\n }\r\n \r\n if ($canDo->get('core.edit.state'))\r\n {\r\n JToolbarHelper::publish('features.publish', 'JTOOLBAR_PUBLISH', true);\r\n JToolbarHelper::unpublish('features.unpublish', 'JTOOLBAR_UNPUBLISH', true);\r\n JToolbarHelper::archiveList('features.archive');\r\n }\r\n \r\n if ($user->authorise('core.admin'))\r\n {\r\n JToolbarHelper::checkin('features.checkin');\r\n } \r\n \r\n if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete'))\r\n {\r\n JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'features.delete', 'JTOOLBAR_EMPTY_TRASH');\r\n }\r\n elseif ($canDo->get('core.edit.state'))\r\n {\r\n JToolbarHelper::trash('features.trash');\r\n }\r\n \r\n if ($user->authorise('core.admin', 'com_jvoter') || $user->authorise('core.options', 'com_jvoter'))\r\n {\r\n JToolbarHelper::preferences('com_jvoter');\r\n }\r\n }", "protected function addToolbar()\r\n\t{\r\n\t\tJRequest::setVar('hidemainmenu', true);\r\n\t\r\n\t\t$user\t\t= JFactory::getUser();\r\n\t\t$isNew\t\t= ($this->item->room_id == 0);\r\n\t\r\n\t\tJToolBarHelper::title(JText::_('LNG_ROOM',true).\" : \".(!$isNew ? JText::_( \"LNG_EDIT',true): JText::_( \"LNG_ADD_NEW',true)), 'menu.png');\r\n\t\r\n\t\tJToolBarHelper::apply('room.apply');\r\n\t\tJToolBarHelper::save('room.save');\r\n\t\tJToolBarHelper::save2new('room.save2new');\r\n\t\tJToolBarHelper::custom('room.editrateprices', 'stats', 'stats', 'JTOOLBAR_EDIT_RATE_DETAILS',false);\r\n\t\tJToolBarHelper::cancel('room.cancel');\r\n\t\tJToolBarHelper::divider();\r\n\t\tJToolBarHelper::help('JHELP_ROOM_EDIT');\r\n\t}", "function _populate_node_toolbar()\n {\n if ($this->_topic->can_do('midgard:create'))\n {\n foreach (array_keys($this->_request_data['schemadb']) as $name)\n {\n $this->_node_toolbar->add_item\n (\n array\n (\n MIDCOM_TOOLBAR_URL => \"create_event/{$name}/\",\n MIDCOM_TOOLBAR_LABEL => sprintf\n (\n $this->_l10n_midcom->get('create %s'),\n $this->_request_data['schemadb'][$name]->description\n ),\n MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/new-text.png',\n )\n );\n }\n }\n \n if ( $this->_topic->can_do('midgard:update')\n && $this->_topic->can_do('midcom:component_config'))\n {\n $this->_node_toolbar->add_item\n (\n array\n (\n MIDCOM_TOOLBAR_URL => 'config/',\n MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'),\n MIDCOM_TOOLBAR_HELPTEXT => $this->_l10n_midcom->get('component configuration helptext'),\n MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_folder-properties.png',\n )\n );\n }\n if ( $this->_topic->can_do('midgard:create')\n && $this->_topic->can_do('midcom:component_config'))\n {\n $this->_node_toolbar->add_item\n (\n array\n (\n MIDCOM_TOOLBAR_URL => 'locations/',\n MIDCOM_TOOLBAR_LABEL => 'Paikkatiedot',\n MIDCOM_TOOLBAR_HELPTEXT => $this->_l10n_midcom->get('component configuration helptext'),\n MIDCOM_TOOLBAR_ICON => 'fi.kilonkipinat.website/fam/map_magnify.png',\n )\n );\n }\n\n }", "protected function addToolbar()\n\t{\n\t\trequire_once JPATH_COMPONENT.'/helpers/judges.php';\n\n\t\t$state\t= $this->get('State');\n\t\t$canDo\t= JudgesHelper::getActions();\n\n\t\tJToolBarHelper::title(JText::_('COM_JUDGES_TITLE_JUDGES'), 'judges.png');\n\n\t\tif ($canDo->get('core.create')) {\n\t\t\tJToolBarHelper::addNew('judge.add','JTOOLBAR_NEW');\n\t\t}\n\n\t\tif ($canDo->get('core.edit') && isset($this->items[0])) {\n\t\t\tJToolBarHelper::editList('judge.edit','JTOOLBAR_EDIT');\n\t\t}\n\n\t\tif ($canDo->get('core.edit.state')) {\n\n if (isset($this->items[0])) {\n //If this component does not use state then show a direct delete button as we can not trash\n JToolBarHelper::deleteList('', 'judges.delete','JTOOLBAR_DELETE');\n }\n\n\t\t\tif (isset($this->items[0]->checked_out)) {\n \tJToolBarHelper::custom('judges.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);\n }\n\t\t}\n\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_judges');\n\t\t}\n \n //Set sidebar action - New in 3.0\n\t\tJHtmlSidebar::setAction('index.php?option=com_judges&view=judges');\n \n $this->extra_sidebar = '';\n\t}", "public function initToolbar()\n {\n }", "function setElementsToolbar()\n\t{\n\t\tJToolBarHelper::title(JText::_('ELEMENTS'), 'fabrik-element.png');\n\t\tJToolBarHelper::customX('addToTableView', 'publish.png', 'publish_f2.png', JText::_('ADD TO TABLE VIEW'));\n\t\tJToolBarHelper::customX('removeFromTableView', 'unpublish.png', 'unpublish_f2.png', JText::_('REMOVE FROM TABLE VIEW'));\n\t\tJToolBarHelper::publishList();\n\t\tJToolBarHelper::unpublishList();\n\t\tJToolBarHelper::customX('copySelectGroup', 'copy.png', 'copy_f2.png', 'Copy');\n\t\tJToolBarHelper::deleteList('', 'checkRemove');\n\t\tJToolBarHelper::editListX();\n\t\tJToolBarHelper::addNewX();\n\t}", "public function renderToolbarControls()\n {\n $this->kernel->event->trigger('phifty.crud.toolbar_init',$this);\n foreach( $this->_toolbarItems as $controller ) {\n echo $controller->controlAction();\n }\n }", "protected function addToolbar()\n\t{\n\t\tJRequest::setVar('hidemainmenu', true);\n\t}", "protected function addToolbar()\n {\n // Get the results for each action\n $canDo = JoomHelper::getActions();\n\n // Get the toolbar object instance\n $bar = JToolbar::getInstance('toolbar');\n\n JToolBarHelper::title(JText::_('COM_JOOMGALLERY_IMGMAN_IMAGE_MANAGER'), 'images');\n\n if(($this->_config->get('jg_disableunrequiredchecks') || $canDo->get('joom.upload') || count(JoomHelper::getAuthorisedCategories('joom.upload'))) && $this->pagination->total)\n {\n JToolbarHelper::addNew('new');\n }\n\n if(($canDo->get('core.edit') || $canDo->get('core.edit.own')) && $this->pagination->total)\n {\n JToolbarHelper::editList();\n JToolbarHelper::custom('edit', 'checkbox-partial', 'checkbox-partial', 'JTOOLBAR_BATCH');\n JToolbarHelper::custom('showmove', 'move.png', 'move.png', 'COM_JOOMGALLERY_COMMON_TOOLBAR_MOVE');\n JToolbarHelper::custom('recreate', 'refresh.png', 'refresh.png', 'COM_JOOMGALLERY_COMMON_TOOLBAR_RECREATE');\n\n // Instantiate a new JLayoutFile instance and render the rotate button\n $layout = new JLayoutFile('joomgallery.toolbar.rotate', JPATH_COMPONENT_ADMINISTRATOR . '/layouts');\n $dhtml = $layout->render(array('title' => JText::_('COM_JOOMGALLERY_COMMON_TOOLBAR_ROTATE')));\n $bar->appendButton('Custom', $dhtml, 'rotate');\n\n JToolbarHelper::divider();\n }\n\n if($canDo->get('core.edit.state') && $this->pagination->total)\n {\n JToolbarHelper::publishList('publish', 'COM_JOOMGALLERY_COMMON_PUBLISH');\n JToolbarHelper::unpublishList('unpublish', 'COM_JOOMGALLERY_COMMON_UNPUBLISH');\n JToolbarHelper::custom('approve', 'upload.png', 'upload_f2.png', 'COM_JOOMGALLERY_IMGMAN_TOOLBAR_APPROVE');\n JToolbarHelper::divider();\n }\n\n //if($canDo->get('core.delete'))\n //{\n JToolbarHelper::deleteList('', 'remove');\n //}\n\n }", "function get_toolbars()\n {\n }", "private function configureToolbar(): void\n {\n /** @var Toolbar $toolbarLayout */\n $toolbar = $this->getToolbarBlock();\n $toolbar->removeOrderFromAvailableOrders('position');\n $toolbar->addOrderToAvailableOrders('created_at', __('New'));\n $toolbar->setDefaultOrder('created_at');\n }", "protected function renderToolbar() {}", "function addItem($title, $html, $actions = []) {\n\t\t$this->dashboard_items[] = ['title' => $title, 'html', 'actions' => $actions];\n\t}", "public function initPageHeaderToolbar()\n {\n if (empty($this->display)){\n $this->page_header_toolbar_btn = array(\n 'new' => array(\n 'href' => self::$currentIndex.'&addwpproductcarousels&token='.$this->token,\n 'desc' => $this->l('Add New Carousel', null, null, false),\n 'icon' => 'process-icon-new'\n ),\n 'options' => array(\n 'href' => $this->context->link->getAdminLink('AdminModules') . '&configure=wpproductcarousels',\n 'desc' => $this->l('Options'),\n 'icon' => 'process-icon-cogs'\n )\n );\n }\n\n parent::initPageHeaderToolbar();\n }", "protected function addToolbar()\n\t{\n\t\t// Old code\n\t\t$extension = JFactory::getApplication()->input->get('client', '', 'word');\n\t\t$bar = JToolBar::getInstance('toolbar');\n\t\tJToolBarHelper::title(JText::_('COM_TJREPORTS_TITLE_REPORT'), 'list');\n\n\t\t$button = \"<a class='btn' class='button'\n\t\t\t\ttype='submit' onclick=\\\"Joomla.submitbutton('reports.csvexport'); jQuery('#task').val('');\\\" href='#'><span title='Export'\n\t\t\t\tclass='icon-download'></span>\" . JText::_('COM_TJREPORTS_CSV_EXPORT') . \"</a>\";\n\t\t\t$bar->appendButton('Custom', $button);\n\n\t\t// List of plugin\n\t\tif ($extension)\n\t\t{\n\t\t\tJFactory::getApplication()->input->set('extension', $extension);\n\t\t\tJLoader::import('administrator.components.com_tjreports.helpers.tjreports', JPATH_SITE);\n\t\t\tTjreportsHelper::addSubmenu('reports');\n\t\t\t$this->sidebar = JHtmlSidebar::render();\n\n\t\t\t$model\t= $this->getModel();\n\n\t\t\t// Get all enable plugins\n\t\t\t$this->enableReportPlugins = $this->model->getenableReportPlugins($extension);\n\n\t\t\tforeach ($this->enableReportPlugins as $eachPlugin) :\n\t\t\t\t$this->model->loadLanguage($eachPlugin->element);\n\t\t\t\t$btnclass = ($this->pluginName == $eachPlugin->element) ? \" active btn-primary \" : \"\";\n\t\t\t\t$button = \"<a class='btn button report-btn \" . $btnclass . \"' id='\" . $eachPlugin->element . \"'\n\t\t\t\tonclick=\\\"tjrContentUI.report.loadReport('\" . $eachPlugin->element . \"','\" . $extension . \"'); \\\" ><span\n\t\t\t\tclass='icon-list'></span>\" . JText::_($eachPlugin->name) . \"</a>\";\n\t\t\t\t\t$bar->appendButton('Custom', $button);\n\t\t\tendforeach;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJToolBarHelper::cancel('tjreport.cancel', 'JTOOLBAR_CANCEL');\n\t\t}\n\t}", "function setElementToolbar()\n\t{\n\t\t$task = JRequest::getVar('task', '', 'method', 'string');\n\t\tJToolBarHelper::title($task == 'add' ? JText::_('ELEMENT') . ': <small><small>[ '. JText::_('NEW') .' ]</small></small>' : JText::_('ELEMENT') . ': <small><small>[ '. JText::_('EDIT') .' ]</small></small>', 'fabrik-element.png');\n\t\tJToolBarHelper::save();\n\t\tJToolBarHelper::apply();\n\t\tJToolBarHelper::cancel();\n\t}", "protected function addToolbar()\r\n\t{\n\t\t$canDo = JHotelReservationHelper::getActions();\n\t\t\r\n\t\tJRequest::setVar('hidemainmenu', true);\r\n\r\n\t\t$user\t\t= JFactory::getUser();\r\n\t\t$isNew\t\t= ($this->item->room_id == 0);\r\n\r\n\t\tJToolBarHelper::title(JText::_('LNG_ROOM',true).\" : \".(!$isNew ? JText::_('LNG_EDIT',true): JText::_('LNG_ADD_NEW',true)), 'menu.png');\r\n\r\n\t\tif ($canDo->get('core.create')){\n\t\t\tJToolBarHelper::apply('room.apply');\n\t\t\tJToolBarHelper::save('room.save');\r\n\t\t\tJToolBarHelper::save2new('room.save2new');\n\t\t}\n\t\t\t\n\t\tif(!$isNew){\n\t\t\tJToolBarHelper::custom('room.editrateprices', 'edit', 'stats', 'JTOOLBAR_EDIT_RATE_DETAILS',false);\n\t\t}\r\n\t\tJToolBarHelper::cancel('room.cancel');\r\n\t\tJToolBarHelper::divider();\r\n\t\tJToolBarHelper::help('JHELP_ROOM_EDIT');\n\t\t$doc =JFactory::getDocument();\n\t\t$doc->addScript('components/'.getBookingExtName().'/assets/js/jquery.upload.js');\n\t}", "private function initToolbar()\n\t{\n\t\t$toolbar_btn = array();\n\t\t$toolbar_btn['save'] = array('href' => '#', 'desc' => $this->l('Save'));\n\t\treturn $toolbar_btn;\n\t}", "protected function addToolbar() {\n require_once JPATH_COMPONENT . '/helpers/member.php';\n\n $state = $this->get('State');\n $canDo = MemberHelper::getActions($state->get('filter.category_id'));\n\n JToolBarHelper::title(JText::_('COM_MEMBER_TITLE_CREDITS'), 'credits.png');\n\n //Check if the form exists before showing the add/edit buttons\n $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/credit';\n if (file_exists($formPath)) {\n\n if ($canDo->get('core.create')) {\n JToolBarHelper::addNew('credit.add', 'JTOOLBAR_NEW');\n }\n\n if ($canDo->get('core.edit') && isset($this->items[0])) {\n JToolBarHelper::editList('credit.edit', 'JTOOLBAR_EDIT');\n }\n }\n\n\n\n\n if ($canDo->get('core.admin')) {\n JToolBarHelper::preferences('com_member');\n }\n \n\n //Set sidebar action - New in 3.0\n JHtmlSidebar::setAction('index.php?option=com_member&view=credits');\n\n $this->extra_sidebar = '';\n\n //Filter for the field credit_paid\n $select_label = JText::sprintf('COM_MEMBER_FILTER_SELECT_LABEL', 'Paid');\n $options = array();\n $options[0] = new stdClass();\n $options[0]->value = \"1\";\n $options[0]->text = \"Paid\";\n $options[1] = new stdClass();\n $options[1]->value = \"0\";\n $options[1]->text = \"Not Paid\";\n JHtmlSidebar::addFilter(\n $select_label, 'filter_credit_paid', JHtml::_('select.options', $options, \"value\", \"text\", $this->state->get('filter.credit_paid'), true)\n );\n\n //Filter for the field payment_data\n $select_label = JText::sprintf('COM_MEMBER_FILTER_SELECT_LABEL', 'Payment Data');\n $options = array();\n $options[0] = new stdClass();\n $options[0]->value = \"2\";\n $options[0]->text = \"Paypal\";\n $options[1] = new stdClass();\n $options[1]->value = \"3\";\n $options[1]->text = \"Bank transfer\";\n $options[2] = new stdClass();\n $options[2]->value = \"1\";\n $options[2]->text = \"Saved\";\n JHtmlSidebar::addFilter(\n $select_label, 'filter_payment_data', JHtml::_('select.options', $options, \"value\", \"text\", $this->state->get('filter.payment_data'), true)\n );\n }", "public function initPageHeaderToolbar()\n {\n if (empty($this->display)) {\n $this->page_header_toolbar_btn['new_reward'] = [\n 'href' => self::$currentIndex.'&addgamifications_reward&token='.$this->token,\n 'desc' => $this->l('Add new reward'),\n 'icon' => 'process-icon-new',\n ];\n }\n\n parent::initPageHeaderToolbar();\n }", "public function decorate()\n {\n\n $this->element->addItemButton\n ->addClass('btn-sm push-top')\n ->appendContent(' <i class=\"btr bt-plus btn-no-anim\"></i>')\n ;\n\n $this->element->removeItemButton->content->clear();\n $this->element->removeItemButton->content('<i class=\"btr bt-trash\" style=\"margin:0\"></i>');\n\n }", "function addSeparator() {\n if (is_array($this->toolbar) && count($this->toolbar) > 0) {\n $last = end($this->toolbar);\n if (isset($last) && is_array($last)) {\n if ($last[0] != '-') {\n $this->toolbar[] = array('-', '<seperator/>');\n }\n }\n }\n }", "public function addsButtons() {}", "function setToolBar()\r\n\t{\r\n\t\tJToolBarHelper::title( JText::_('CC VIDEO CATEGORIES'), 'videoscategories');\r\n\t\t\r\n\t\t// Add the necessary buttons\r\n\t\tJToolBarHelper::back('Home' , 'index.php?option=com_community');\r\n\t\tJToolBarHelper::divider();\r\n\t\tJToolBarHelper::publishList( 'publish' , JText::_('CC PUBLISH') );\r\n\t\tJToolBarHelper::unpublishList( 'unpublish' , JText::_('CC UNPUBLISH') );\r\n\t\tJToolBarHelper::divider();\r\n\t\tJToolBarHelper::trash( 'removecategory', JText::_('CC DELETE'));\r\n\t\tJToolBarHelper::addNew( 'newcategory' , JText::_('CC NEW') );\r\n\t}", "protected function setToolBar()\n\t{\n\t\tJToolBarHelper::title( JText::_( 'COM_HYPERCOMMENTS_IMPORT' ) );\n\t\t$canDo = hypercommentsHelper::getActions( 'jcomments' );\n\n\t\tif ( $canDo->get( 'core.create' ) )\n {\n\t\t\tJToolBarHelper::addNew( 'file.add' );\n\t\t}\n\n\t\tif ( $canDo->get( 'core.delete' ) )\n\t\t{\n\t\t\tJToolBarHelper::deleteList( 'DELETE_QUERY_STRING', 'file.delete', 'JTOOLBAR_DELETE' );\n\t\t\tJToolBarHelper::divider();\n\t\t}\n\n\t\tif ( $canDo->get( 'core.manage' ) )\n\t\t{\n\t\t\tJToolBarHelper::unarchiveList( 'file.upload' , 'COM_HYPERCOMMENTS_IMPORT_START');\n\t\t}\n\n\t\tif ( $canDo->get( 'core.admin' ) )\n\t\t{\n\t\t\tJToolBarHelper::preferences( 'com_hypercomments' );\n\t\t\tJToolBarHelper::divider();\n\t\t}\n\t}", "protected function addToolbar() {\n //// Get a refrence of the page instance in joomla\n//\t\t$document\t= JFactory::getDocument();\n// // Set toolbar items for the page\n// $stylelink = '<link rel=\"stylesheet\" href=\"'.JURI::root().'administrator/components/com_sportsmanagement/assets/css/jlextusericons.css'.'\" type=\"text/css\" />' .\"\\n\";\n// $document->addCustomTag($stylelink);\n\n $app = JFactory::getApplication();\n $jinput = $app->input;\n $option = $jinput->getCmd('option');\n // store the variable that we would like to keep for next time\n // function syntax is setUserState( $key, $value );\n $app->setUserState(\"$option.rid\", $this->rid);\n $app->setUserState(\"$option.pid\", $this->project_id);\n\n $massadd = $jinput->getInt('massadd', 0);\n\n // Set toolbar items for the page\n $this->title = JText::_('COM_SPORTSMANAGEMENT_ADMIN_MATCHES_TITLE');\n\n if (!$massadd) {\n //JToolbarHelper::publishList('matches.publish');\n //JToolbarHelper::unpublishList('matches.unpublish');\n\n JToolbarHelper::publish('match.insertgooglecalendar', 'JLIB_HTML_CALENDAR', true);\n JToolbarHelper::divider();\n JToolbarHelper::publish('matches.count_result_yes', 'COM_SPORTSMANAGEMENT_ADMIN_MATCH_F_AD_INCL', true);\n JToolbarHelper::unpublish('matches.count_result_no', 'COM_SPORTSMANAGEMENT_ADMIN_MATCH_F_AD_INCL', true);\n JToolbarHelper::divider();\n JToolbarHelper::publish('matches.publish', 'JTOOLBAR_PUBLISH', true);\n JToolbarHelper::unpublish('matches.unpublish', 'JTOOLBAR_UNPUBLISH', true);\n JToolbarHelper::divider();\n\n JToolbarHelper::apply('matches.saveshort');\n JToolbarHelper::divider();\n\n JToolbarHelper::custom('match.massadd', 'new.png', 'new_f2.png', JText::_('COM_SPORTSMANAGEMENT_ADMIN_MATCHES_MASSADD_MATCHES'), false);\n JToolbarHelper::addNew('match.addmatch', JText::_('COM_SPORTSMANAGEMENT_ADMIN_MATCHES_MASSADD_ADD_MATCH'));\n//\t\t\tJToolbarHelper::deleteList(JText::_('COM_SPORTSMANAGEMENT_ADMIN_MATCHES_MASSADD_WARNING'), 'match.remove');\n JToolbarHelper::divider();\n\n JToolbarHelper::back('JPREV', 'index.php?option=com_sportsmanagement&view=rounds');\n } else {\n JToolbarHelper::custom('match.cancelmassadd', 'cancel.png', 'cancel_f2.png', JText::_('COM_SPORTSMANAGEMENT_ADMIN_MATCHES_MASSADD_CANCEL_MATCHADD'), false);\n }\n\n parent::addToolbar();\n }", "public function gen_Toolbar(){\r\n\t\t$toolbar ='<?xml version=\"1.0\"?><toolbar>';\r\n\t\t$toolbar = $toolbar.'<item id=\"pullReportSort\" type=\"text\" text=\"Search By\" img=\"/detail.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newuser\" type=\"button\" text=\"Add User\" img=\"/adduser.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"userapprove\" type=\"button\" text=\"Approve\" img=\"/userapprove.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"usersuspend\" type=\"button\" text=\"Suspend\" img=\"/usersuspend.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"pedit\" type=\"button\" text=\"Edit Privileges\" img=\"/edit.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newgateway\" type=\"button\" text=\"Add Gateway\" img=\"/assigngateway.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newsenderid\" type=\"button\" text=\"Add SenderID\" img=\"/senderid.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newpackage\" type=\"button\" text=\"Add Package\" img=\"/package.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newshortcode\" type=\"button\" text=\"Add shortcode\" img=\"/assignshortcode.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newcategory\" type=\"button\" text=\"Add Category\" img=\"/category.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newkey\" type=\"button\" text=\"Add key\" img=\"/keys.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newscheme\" type=\"button\" text=\"Add Scheme\" img=\"/scheme.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newgroup\" type=\"button\" text=\"Add Group\" img=\"/usergroup.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newprefix\" type=\"button\" text=\"Add Prefix\" img=\"/prefix.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newoperator\" type=\"button\" text=\"Add Operator\" img=\"/operator.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newcountry\" type=\"button\" text=\"Add Country\" img=\"/country.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newfeature\" type=\"button\" text=\"Add Feature\" img=\"/features.png\"/>';\r\n\r\n\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newscheduler\" type=\"button\" text=\"Add Schedule\" img=\"/scheduler.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newmsgtemplate\" type=\"button\" text=\"Add Template\" img=\"/template.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newaddressbook\" type=\"button\" text=\"Add Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newcontact\" type=\"button\" text=\"Add Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"newtemplate\" type=\"button\" text=\"Add Message\" img=\"/save_msg.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"aedit\" type=\"buttonSelect\" text=\"Edit\" img=\"/edit.png\">';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"address_edit\" text=\"Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"contact_edit\" text=\"Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'</item>';\r\n\t\t$toolbar = $toolbar.'<item id=\"adelete\" type=\"buttonSelect\" text=\"Delete\" img=\"/edit.png\">';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"address_delete\" text=\"Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"contact_delete\" text=\"Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'</item>';\r\n\t\t$toolbar = $toolbar.'<item id=\"edit\" type=\"button\" text=\"Edit\" img=\"/edit.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"approve\" type=\"button\" text=\"Approve\" img=\"/approve.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"disapprove\" type=\"button\" text=\"Disapprove\" img=\"/disapprove.png\" />';\r\n\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"enable\" type=\"button\" text=\"Enable\" img=\"/enable.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"disable\" type=\"button\" text=\"Disable\" img=\"/disable.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"stopcron\" type=\"button\" text=\"Stop Cron\" img=\"/stopcron.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"resumecron\" type=\"button\" text=\"Resume Cron\" img=\"/resumecron.png\" />';\r\n\r\n\t\t//$toolbar = $toolbar.'<item id=\"edit\" type=\"button\" text=\"Edit\" img=\"/edit.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"delete\" type=\"button\" text=\"Delete\" img=\"/delete.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"todayReport\" type=\"button\" text=\"Today Report\" img=\"/detail.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"upload\" type=\"button\" text=\"Upload\" img=\"/upload.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"detail\" type=\"button\" text=\"Detail\" img=\"/detail.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"empty\" type=\"button\" text=\"Empty\" img=\"/empty.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"select\" type=\"button\" text=\"Select All\" img=\"/selectall.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"disselect\" type=\"button\" text=\"Dis-select\" img=\"/disselect.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"excel\" type=\"button\" text=\"Excel\" img=\"/excel.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"excel_outbox\" type=\"button\" text=\"Download Outbox\" img=\"/excel.png\" />';\r\n\t\t\r\n\t\t$toolbar = $toolbar.'<item id=\"search\" type=\"button\" text=\"Search\" img=\"/search.png\" />';\r\n\t\t$toolbar = $toolbar.'</toolbar>';\r\n\r\n\t\treturn $toolbar;\r\n\t}", "function getFilesToolbar() {\n $this->fileToolBar = new base_btnbuilder;\n $this->fileToolBar->images = &$this->images;\n if (isset($this->currentFile) &&\n is_array($this->currentFile) &&\n count($this->currentFile) > 0 &&\n $this->currentFile['folder_id'] >= 0) {\n $this->fileToolBar->addButton(\n 'Properties',\n $this->getLink(\n array(\n 'cmd' => 'edit_file',\n 'file_id' => $this->params['file_id']\n )\n ),\n 'categories-properties',\n 'Show/Edit file properties',\n ($this->params['cmd'] == 'edit_file')\n );\n $this->fileToolBar->addButton(\n 'Tags',\n $this->getLink(\n array(\n 'cmd' => 'file_tags', 'file_id' => $this->params['file_id']\n )\n ),\n 'items-tag',\n 'Edit file tags',\n ($this->params['cmd'] == 'file_tags')\n );\n $this->fileToolBar->addSeparator();\n if ($this->currentFile['current_version_id'] > 1) {\n $this->fileToolBar->addButton(\n 'Versions',\n $this->getLink(\n array(\n 'cmd' => 'file_versions', 'file_id' => $this->params['file_id']\n )\n ),\n 'items-time',\n 'Show file versions',\n ($this->params['cmd'] == 'file_versions')\n );\n }\n if ($this->currentFile['DERIVED'] || $this->currentFile['DERIVATIONS'] > 0) {\n $this->fileToolBar->addButton(\n 'Derivations',\n $this->getLink(\n array(\n 'cmd' => 'file_derivations', 'file_id' => $this->params['file_id']\n )\n ),\n 'status-file-inherited',\n 'Show file derivations',\n ($this->params['cmd'] == 'file_derivations')\n );\n }\n $this->fileToolBar->addSeparator();\n $this->fileToolBar->addButton(\n 'Papaya tag',\n $this->getLink(\n array(\n 'cmd' => 'papaya_tag', 'file_id' => $this->params['file_id']\n )\n ),\n 'items-dialog',\n 'Create papaya tag',\n ($this->params['cmd'] == 'papaya_tag')\n );\n return sprintf('<toolbar>%s</toolbar>'.LF, $this->fileToolBar->getXML());\n }\n return '';\n }", "private function _makeToolbar( $params = null) {\r\n\r\n // Get the JComponent instance of JToolBar\r\n $bar = JToolBar::getInstance('toolbar');\r\n\r\n // add title\r\n $title = Sh404sefHelperGeneral::makeToolbarTitle( JText::_( 'COM_SH404SEF_ALIASES_MANAGER'), $icon = 'sh404sef', $class = 'sh404sef-toolbar-title');\r\n JFactory::getApplication()->JComponentTitle = $title;\r\n\r\n // add \"New url\" button\r\n $bar = JToolBar::getInstance('toolbar');\r\n $bar->addButtonPath( JPATH_COMPONENT . '/' . 'classes');\r\n\r\n // add edit button\r\n $params['class'] = 'modaltoolbar';\r\n $params['size'] =array('x' =>800, 'y' => 600);\r\n unset( $params['onClose']);\r\n $url = 'index.php?option=com_sh404sef&c=editalias&task=edit&tmpl=component&view=editurl&startOffset=2';\r\n $bar->appendButton( 'Shpopuptoolbarbutton', 'edit', $url, JText::_( 'Edit'), $msg='', $task='edit', $list = true, $hidemenu=true, $params);\r\n\r\n // add delete button\r\n $params['class'] = 'modaltoolbar';\r\n $params['size'] =array('x' =>500, 'y' => 300);\r\n unset( $params['onClose']);\r\n $url = 'index.php?option=com_sh404sef&c=editalias&task=confirmdelete&tmpl=component';\r\n $bar->appendButton( 'Shpopuptoolbarbutton', 'delete', $url, JText::_( 'Delete'), $msg=JText::_('VALIDDELETEITEMS', true), $task='delete', $list = true, $hidemenu=true, $params);\r\n\r\n // separator\r\n JToolBarHelper::divider();\r\n\r\n // add import button\r\n $params['class'] = 'modaltoolbar';\r\n $params['size'] =array('x' =>500, 'y' => 400);\r\n unset( $params['onClose']);\r\n $url = 'index.php?option=com_sh404sef&c=wizard&task=start&tmpl=component&optype=import&opsubject=aliases';\r\n $bar->appendButton( 'Shpopuptoolbarbutton', 'import', $url, JText::_( 'COM_SH404SEF_IMPORT_BUTTON'), $msg='', $task='import', $list = false, $hidemenu=true, $params);\r\n\r\n // add import button\r\n $params['class'] = 'modaltoolbar';\r\n $params['size'] =array('x' =>500, 'y' => 300);\r\n unset( $params['onClose']);\r\n $url = 'index.php?option=com_sh404sef&c=wizard&task=start&tmpl=component&optype=export&opsubject=aliases';\r\n $bar->appendButton( 'Shpopuptoolbarbutton', 'export', $url, JText::_( 'COM_SH404SEF_EXPORT_BUTTON'), $msg='', $task='export', $list = false, $hidemenu=true, $params);\r\n\r\n // separator\r\n JToolBarHelper::divider();\r\n \r\n // edit home page button\r\n $params['class'] = 'modalediturl';\r\n $params['size'] =array('x' =>800, 'y' => 600);\r\n $js= '\\\\function(){window.parent.shAlreadySqueezed = false;if(window.parent.shReloadModal) parent.window.location=\\''. $this->defaultRedirectUrl .'\\';window.parent.shReloadModal=true}';\r\n $params['onClose'] = $js;\r\n $bar->appendButton( 'Shpopupbutton', 'home', JText::_( 'COM_SH404SEF_HOME_PAGE_ICON'), \"index.php?option=com_sh404sef&c=editalias&task=edit&view=editurl&home=1&tmpl=component&startOffset=1\", $params);\r\n\r\n // separator\r\n JToolBarHelper::divider();\r\n\r\n }", "public function addItems(array $items);", "function iron_admin_bar ( $wp_toolbar )\n{\n\tglobal $redux_args;\n\n\t$wp_toolbar->add_node( array(\n\t\t 'parent' => 'appearance'\n\t\t, 'id' => 'iron-options'\n\t\t, 'title' => $redux_args['menu_title']\n\t\t, 'href' => admin_url('/admin.php?page=' . $redux_args['page_slug'])\n\t) );\n}", "function my_toolbars( $toolbars )\n{\n/*\n echo '< pre >';\n print_r($toolbars);\n echo '< /pre >';\n die;\n */\n\n // Add a new toolbar called \"Very Simple\"\n // - this toolbar has only 1 row of buttons\n $toolbars['Very Simple' ] = array();\n $toolbars['Very Simple' ][1] = array('bold' , 'italic' , 'underline', 'link' );\n $toolbars['Chapter' ] = array();\n $toolbars['Chapter' ][1] = array('bold' , 'italic' , 'underline', 'bloc');\n $toolbars['Title' ] = array();\n $toolbars['Title' ][1] = array('bold');\n $toolbars['Code'][2] = array('code');\n\n // Edit the \"Full\" toolbar and remove 'code'\n // - delet from array code from http://stackoverflow.com/questions/7225070/php-array-delete-by-value-not-key\n if( ($key = array_search('code' , $toolbars['Full' ][2])) !== false )\n {\n unset( $toolbars['Full' ][2][$key] );\n }\n\n // remove the 'Basic' toolbar completely\n //unset( $toolbars['Basic' ] );\n\n // return $toolbars - IMPORTANT!\n return $toolbars;\n}", "function add_tinymce_toolbar_button( $buttons ) {\n \n array_push( $buttons, '|', 'custom_link_class' );\n return $buttons;\n }", "function setCopyElementToolbar()\n\t{\n\t JToolBarHelper::title(JText::_('SELECT_GROUPS_TO_COPY_ELEMENTS_TO') , 'fabrik-element.png');\n\t JToolBarHelper::save('copy');\n\t\tJToolBarHelper::cancel();\n\t}", "function set_items() { \n\n\t\t$this->items = $this->get_items();\n\n\t}", "public function append($items);", "public function render() {\n\t\t$this->addJavascriptToBackend();\n\t\t$this->addCssToBackend();\n\t\t$title = $GLOBALS['LANG']->getLL('toolbaritem', true);\n\n\t\t\t// toolbar item icon\n\t\t$menu[] = '<a href=\"#\" class=\"toolbar-item\"\">';\n\t\t$menu[] = '<input type=\"text\" id=\"tx-newspaper-role-role\" disabled=\"disabled\" value=\"' . tx_newspaper_Workflow::getRoleTitle(tx_newspaper_workflow::getRole()) . '\" />';\n\t\t$menu[] = '<input type=\"text\" id=\"tx-newspaper-role-counter\" disabled=\"disabled\" value=\"' . $this->docsAssignedToRole . '\" />';\n\t\t$menu[] = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], t3lib_extMgm::extRelPath($this->extkey) . '/mod_role/newspaper.png', 'width=\"23\" height=\"16\"').' alt=\"' . $title . '\" title=\"' . $title . '\" /></a>';\n\t\t$menu[] = '</a>';\n\n\t\t\t// toolbar item menu and initial content\n\t\t$menu[] = '<div class=\"toolbar-item-menu\" style=\"display: none;\">';\n\t\t$menu[] = $this->renderMenu();\n\t\t$menu[] = '</div>';\n\n\t\treturn implode(\"\\n\", $menu);\n\t}", "public function listing(ExoToolbarInterface $exo_toolbar, $exo_toolbar_region, Request $request) {\n $this->exoToolbar = $exo_toolbar;\n $this->exoToolbarRegion = $exo_toolbar->getRegion($exo_toolbar_region);\n\n // Since modals do not render any other part of the page, we need to render\n // them manually as part of this listing.\n if ($request->query->get(MainContentViewSubscriber::WRAPPER_FORMAT) === 'drupal_modal') {\n $build['local_actions'] = $this->buildLocalActions();\n }\n\n $headers = [\n ['data' => $this->t('Item')],\n ['data' => $this->t('Category')],\n ['data' => $this->t('Operations')],\n ];\n\n // Only add blocks which work without any available context.\n $definitions = $this->exoToolbarItemManager->getDefinitionsForContexts($this->contextRepository->getAvailableContexts());\n // Order by category, and then by admin label.\n $definitions = $this->exoToolbarItemManager->getSortedDefinitions($definitions);\n\n $section = $request->query->get('section');\n $weight = $request->query->get('weight');\n $rows = [];\n foreach ($definitions as $plugin_id => $plugin_definition) {\n $row = [];\n $row['title']['data'] = [\n '#type' => 'inline_template',\n '#template' => '<div class=\"block-filter-text-source\">{{ label }}</div>',\n '#context' => [\n 'label' => $plugin_definition['admin_label'],\n ],\n ];\n $row['category']['data'] = $plugin_definition['category'];\n $links['add'] = [\n 'title' => $this->t('Place item'),\n 'url' => Url::fromRoute('entity.exo_toolbar.add', [\n 'exo_toolbar' => $this->exoToolbar->id(),\n 'exo_toolbar_region' => $this->exoToolbarRegion->getPluginId(),\n 'plugin_id' => $plugin_id,\n ]),\n 'attributes' => [\n 'class' => ['use-ajax'],\n 'data-dialog-type' => 'exo_modal',\n 'data-dialog-options' => Json::encode([\n 'width' => 700,\n ]),\n ],\n ];\n if (isset($section)) {\n $links['add']['query']['section'] = $section;\n }\n if (isset($weight)) {\n $links['add']['query']['weight'] = $weight;\n }\n $row['operations']['data'] = [\n '#type' => 'operations',\n '#links' => $links,\n ];\n $rows[] = $row;\n }\n\n $build['#attached']['library'][] = 'block/drupal.block.admin';\n\n $build['filter'] = [\n '#type' => 'search',\n '#title' => $this->t('Filter'),\n '#title_display' => 'invisible',\n '#size' => 30,\n '#placeholder' => $this->t('Filter by block name'),\n '#attributes' => [\n 'class' => ['block-filter-text'],\n 'data-element' => '.block-add-table',\n 'title' => $this->t('Enter a part of the block name to filter by.'),\n ],\n ];\n\n $build['blocks'] = [\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $rows,\n '#empty' => $this->t('No blocks available.'),\n '#attributes' => [\n 'class' => ['block-add-table'],\n ],\n ];\n\n return $build;\n }", "protected function addTaskbar() {\n $localizePanelView = new LocalizePanelView($this->isLocalized);\n $this->taskbar->addNotificationPanel($localizePanelView);\n\n parent::addTaskbar();\n }", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增轮播图';\n $this->global['pageName'] = 'carousel_add';\n $data = '';\n\n $this->loadViews(\"carousel_add\", $this->global, $data, NULL);\n }\n }", "function tt_add_menu_items(){\n\tadd_menu_page('Example Plugin List Table', 'List Table Example', 'activate_plugins', 'tt_list_test', 'tt_render_list_page');\n}", "public function push(...$items): void;", "function getUploadToolbar() {\n if ((\n $this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_UPLOAD) ||\n $this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_IMPORT)\n ) &&\n $this->isFolderSelected()) {\n $toolbar = new base_btnbuilder;\n $toolbar->images = &$this->images;\n $toolbar->addButton(\n 'Upload files',\n $this->getLink(\n array(\n 'cmd' => 'upload_files',\n 'file_id' => empty($this->params['file_id']) ? '' : $this->params['file_id']\n )\n ),\n 'places-computer',\n 'Upload files from your computer',\n isset($this->params['cmd']) && $this->params['cmd'] == 'upload_files'\n );\n if ($this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_IMPORT)) {\n $toolbar->addButton(\n 'Import folder',\n $this->getLink(array('cmd' => 'import_folder')),\n 'places-network-server',\n 'Import local folder on webserver',\n isset($this->params['cmd']) && $this->params['cmd'] == 'import_folder'\n );\n }\n if ($this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_UPLOAD)) {\n $toolbar->addButton(\n 'Get webfile',\n $this->getLink(array('cmd' => 'get_file')),\n 'items-publication',\n 'Get a file from the internet',\n isset($this->params['cmd']) && $this->params['cmd'] == 'get_file'\n );\n }\n $this->layout->addRight(sprintf('<toolbar>%s</toolbar>'.LF, $toolbar->getXML()));\n }\n }", "protected function addToolbar_Editeventsbb()\n\t{\t\n\t\t//set toolbar items for the page\n\t\tJToolbarHelper::title( JText::_( 'COM_SPORTSMANAGEMENT_ADMIN_MATCH_EEBB_TITLE' ),'events' );\n\t\tJToolbarHelper::apply( 'match.saveeventbb' );\n\t\tJToolbarHelper::divider();\n\t\tJToolbarHelper::back( 'back', 'index.php?option=com_joomleague&view=matches&task=match.display' );\n\t\t//JLToolBarHelper::onlinehelp();\t\n\t}", "public function getEditToolbar() {\n\t \n\t\t$toolarray=array(\n\t\t\tarray(\n\t\t\t\t'image'=>'button_bold.png',\n\t\t\t\t'open'\t=>\t\"\\'\\'\\'\",\n\t\t\t\t'close'\t=>\t\"\\'\\'\\'\",\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_bold_sample\", \"Bold text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_bold_tip\", \"Bold text\"),\n\t\t\t\t'key'\t=>\t'B'\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'image'=>'button_italic.png',\n\t\t\t\t'open'\t=>\t\"\\'\\'\",\n\t\t\t\t'close'\t=>\t\"\\'\\'\",\n\t\t\t\t'sample'=> $this->pi_getLL(\"tb_italic_sample\", \"Italic text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_italic_tip\", \"Italic text\"),\n\t\t\t\t'key'\t=>\t'I'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'=>'button_link.png',\n\t\t\t\t'open'\t=>\t'[[',\n\t\t\t\t'close'\t=>\t']]',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_link_sample\", \"Link title\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_link_tip\", \"Internal link\"),\n\t\t\t\t'key'\t=>\t'L'\n\t\t\t),\n\t\t\t/*\n\t\t\tarray(\n\t\t\t\t'image'=>'button_extlink.png',\n\t\t\t\t'open'\t=>\t'[',\n\t\t\t\t'close'\t=>\t']',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_extlink_sample\", \"http://www.example.com link title\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_extlink_tip\", \"External link (remember http:// prefix)\"),\n\t\t\t\t'key'\t=>\t'X'\n\t\t\t),*/\n\t\t\tarray(\n\t\t\t\t'image'=>'button_headline.png',\n\t\t\t\t'open'\t=>\t\"\\\\n== \",\n\t\t\t\t'close'\t=>\t\" ==\\\\n\",\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_headline_sample\", \"Headline text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_headline_tip\", \"Level 2 headline\"),\n\t\t\t\t'key'\t=>\t'H'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_hr.png',\n\t\t\t\t'open'\t=>\t\"\\\\n----\\\\n\",\n\t\t\t\t'close'\t=>\t'',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_hr_tip\", \"Horizontal line (use sparingly)\"),\n\t\t\t\t'key'\t=>\t'R'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sig.png',\n\t\t\t\t'open'\t=>\t\"\\\\n--~~~~\\\\n\",\n\t\t\t\t'close'\t=>\t'',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sig_tip\", \"Signature\"),\n\t\t\t\t'key'\t=>\t'S'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_nowiki.png',\n\t\t\t\t'open'\t=>\t\"<nowiki>\",\n\t\t\t\t'close'\t=>\t'</nowiki>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_nowiki_sample\", \"This is not parsed\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_nowiki_tip\", \"Nowiki\"),\n\t\t\t\t'key'\t=>\t'N'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sub.png',\n\t\t\t\t'open'\t=>\t\"<sub>\",\n\t\t\t\t'close'\t=>\t'</sub>',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sub_tip\", \"Sub\"),\n\t\t\t\t'key'\t=>\t'D'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sup.png',\n\t\t\t\t'open'\t=>\t\"<sup>\",\n\t\t\t\t'close'\t=>\t'</sup>',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sup_tip\", \"Sup\"),\n\t\t\t\t'key'\t=>\t'U'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_strike.png',\n\t\t\t\t'open'\t=>\t\"<s>\",\n\t\t\t\t'close'\t=>\t'</s>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_strike_sample\", \"This text is strike through\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_strike_tip\", \"Strike Through\"),\n\t\t\t\t'key'\t=>\t''\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_ref.png',\n\t\t\t\t'open'\t=>\t\"<ref>\",\n\t\t\t\t'close'\t=>\t'</ref>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_ref_sample\", \"This is a reference\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_ref_tip\", \"Add reference\"),\n\t\t\t\t'key'\t=>\t'R'\n\t\t\t),\n\t\t);\n\t\t$toolbar =\"<script type='text/javascript'>\\n/*<![CDATA[*/\\n\";\n\t\n\t\t$toolbar.=\"document.writeln(\\\"<div id='toolbar'>\\\");\\n\";\n\t\t\n\t\tforeach($toolarray as $tool) {\n\t\t\t$image = substr(t3lib_div::getFileAbsFileName($this->conf['toolbarIconPath']), strlen(PATH_site)) . $tool['image'];\n\t\t\t$open = $tool['open'];\n\t\t\t$close = $tool['close'];\n\t\t\t$sample = $tool['sample'];\n\t\t\t$tip = $tool['tip'];\n\t\t\t$key = $tool[\"key\"]; // accesskey for the buttons\n\t\t\n\t\t\t$toolbar.=\"addButton('$image','$tip','$open','$close','$sample','$key');\\n\";\n\t\t}\n\t\n\t\t$toolbar.=\"addInfobox('\".$this->pi_getLL(\"tb_infobox\").\"','\".$this->pi_getLL(\"tb_infobox_alert\").\"');\\n\";\n\t\t$toolbar.=\"document.writeln(\\\"</div>\\\");\\n\";\n\t\n\t\t$toolbar.=\"/*]]>*/\\n</script>\";\n\t\t\n\t\t// Add Scripts\n\t\t$JS_Param = \"var drWikiEditor='\".$this->prefixId.\"[body]'; //Handler for Editor\\n\";\n\t\t$this->loadExtJS(\"res/wiki_script.js\", $JS_Param);\n\t\t\n\t\treturn $toolbar;\t\t\n\t}", "public function addItems($items)\n {\n foreach ($items as $item)\n {\n $this->addItem($item);\n }\n }", "protected function addToolbar()\n\t{\n\t\trequire_once JPATH_COMPONENT.'/helpers/facegallery.php';\n\n $user = JFactory::getUser();\n\t\t$state\t= $this->get('State');\n\t\t$canDo\t= FacegalleryHelper::getActions($state->get('filter.id'));\n\n\t\tJToolBarHelper::title(JText::_('COM_FACEGALLERY_MANAGER_COMMENTS'), 'comment.png');\n \n if ($canDo->get('core.edit.state'))\n {\n \t\tif (isset($this->items[0]->state))\n {\n\t\t\t JToolBarHelper::divider();\n\t\t\t JToolBarHelper::custom('comments.publish', 'publish.png', 'publish_f2.png','JTOOLBAR_PUBLISH', true);\n\t\t\t JToolBarHelper::custom('comments.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);\n }\n else if (isset($this->items[0]))\n {\n //If this component does not use state then show a direct delete button as we can not trash\n JToolBarHelper::deleteList('', 'comments.delete','JTOOLBAR_DELETE');\n }\n }\n \t \n //Show trash and delete for components that uses the state field\n if (isset($this->items[0]->state))\n {\n\t\t if ($state->get('filter.state') == -2 && $canDo->get('core.delete'))\n {\n\t\t\t JToolBarHelper::deleteList('', 'comments.delete','JTOOLBAR_EMPTY_TRASH');\n\t\t\t JToolBarHelper::divider();\n\t\t } \n \telse if ($canDo->get('core.edit.state'))\n {\n\t\t\t JToolBarHelper::trash('comments.trash','JTOOLBAR_TRASH');\n\t\t\t JToolBarHelper::divider();\n\t\t }\n }\n\n\t if ($canDo->get('core.admin'))\n {\n\t\t\tJToolBarHelper::preferences('com_facegallery');\n\t }\n \n //Set sidebar action - New in 3.0\n\t JHtmlSidebar::setAction('index.php?option=com_facegallery&view=comments');\n $this->extra_sidebar = '';\n\n JHtmlSidebar::addFilter(\n\t\t\tJText::_('JOPTION_SELECT_PUBLISHED'),\n\t\t\t'filter_state',\n\t\t\tJHtml::_('select.options', JHtml::_('jgrid.publishedOptions',array('archived'=>0)), 'value', 'text', $this->state->get('filter.state'), true)\n\t\t);\n\t}", "public function addWidget()\r\n {\r\n }", "public function appendTo(PapayaXmlElement $parent) {\n foreach ($this->_toolbars as $position => $toolbar) {\n if (isset($toolbar)) {\n $node = $toolbar->appendTo($parent);\n if (isset($node)) {\n $node->setAttribute(\n 'position', $this->_positions[$position]\n );\n }\n }\n }\n }", "public function addMenu()\n {\n $wpMenu = [\n [\n 'Bolsista',\n 'Bolsista',\n 'edit_pages',\n 'bolsista',\n $this,\n 'doAction',\n 'dashicons-format-aside',\n 2\n ]\n ];\n $wpSubMenu = [];\n $this->addMenuItem($wpMenu, $wpSubMenu);\n }", "public function render()\n {\n $content = \"{\n xtype: 'toolbar',\n items: [\";\n \n $iterator = new ArrayIterator($this->getItems());\n while ($iterator->valid()) {\n $item = $iterator->current();\n \n $content .= $item->render();\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n }\n } \n \n $content .= \"]}\";\n \n return $content;\n }", "public function action_register_stackitems()\r\n\t{\r\n\t\tStackItem::register( 'multicomplete', Site::get_url( 'vendor' ) . '/multicomplete.js' )->add_dependency( 'jquery.ui' );\r\n\t\t$url = '\"' . URL::get( 'ajax', array( 'context' => 'auto_tags' ) ) . '\"';\r\n\t\t$script = <<< HEADER_JS\r\n$(document).ready(function(){\r\n\t$(\"#tags\").multicomplete({\r\n\t\tsource: $url,\r\n\t\tminLength: 2,\r\n\t\tautoFocus: true,\r\n\t});\r\n});\r\nHEADER_JS;\r\n\t\tStackItem::register( 'tags_auto', $script )->add_dependency( 'multicomplete' );\r\n\t}", "private function loadButtons()\n {\n $objAdd = $this->addButtonNew(_FEST);\n $objAdd->setInline();\n }", "public function backend_element_items()\n {\n $this->frontend_element_items();\n }", "public function backend_element_items()\n {\n $this->frontend_element_items();\n }", "function toolbar( $wp_admin_bar ) {\n\t\tglobal $wp_version;\n\n\t\t// these new toolbar functions were introduced in 3.3\n\t\t// http://codex.wordpress.org/Function_Reference/add_node\n\t\tif ( version_compare( $wp_version, '3.3', '<') )\n\t\t\treturn;\n\n\t\tif ( !current_user_can( 'manage_options' ) )\n\t\t\treturn;\n\n\t\t$messages = $this->get_messages();\n\t\tif ( !empty( $messages['security_notice_count'] ) ) {\n\t\t\t$count = (int)$messages['security_notice_count'];\n\t\t\tif ( $count > 0 ) {\n\t\t\t\t$count = number_format( $count, 0 );\n\t\t\t\t$wp_admin_bar->add_node( array(\n\t\t\t\t\t'id' => 'vp-notice',\n\t\t\t\t\t'title' => '<span class=\"ab-icon\"></span>' .\n\t\t\t\t\t\tsprintf( _n( '%s Security Threat', '%s Security Threats', $count , 'vaultpress'), $count ),\n\t\t\t\t\t'parent' => 'top-secondary',\n\t\t\t\t\t'href' => sprintf( 'https://dashboard.vaultpress.com/%d/security/', $messages['site_id'] ),\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'title' => __( 'Visit VaultPress Security' , 'vaultpress'),\n\t\t\t\t\t\t'onclick' => 'window.open( this.href ); return false;',\n\t\t\t\t\t\t'class' => 'error'\n\t\t\t\t\t),\n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t}", "protected function addQuestionToolbar()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\n\t\t$pool_active = $this->object->isPoolActive();\n\n\t\tif(!$_POST[\"usage\"] && $pool_active)\n\t\t{\n\t\t\tilUtil::sendFailure($lng->txt(\"select_one\"), true);\n\t\t\treturn $this->addQuestionToolbarForm();\n\t\t}\n\n\t\t// make sure that it is set for current and next requests\n\t\t$ilCtrl->setParameter($this->editor_gui, \"pgov\", $this->current_page);\n\n\t\tif(!$this->addQuestion($_POST[\"qtype\"], $pool_active, $_POST[\"pgov\"], \"toolbar\"))\n\t\t{\n\t\t\t$this->renderPage();\n\t\t}\n\t}", "function wpvideocoach_admin_toolbar_init() {\r\n\t// Check permissions and if admin toolbar has been disabled for user\r\n\tif (!is_admin_bar_showing() )\r\n\t\treturn;\r\n \r\n\t// Good to go, let's do this!\r\n\tadd_action('admin_bar_menu', 'wpvideocoach_admin_toolbar', 75);\r\n\t//add_action('admin_bar_menu', 'wpvideocoach_remove_default_links', 75);\r\n}", "public function addMenuItemsJavascript()\n {\n ?>\n <script>\n window.tinymce_submenus = window.tinymce_submenus || [];\n window.tinymce_submenus.push({\n id: '<?php echo $this->id ?>',\n label: '<?php echo $this->label ?>',\n items: '<?php echo str_replace(\"'\", \"\\\\'\", json_encode($this->items)) ?>'\n });\n </script>\n <?php\n }", "function addLocatorItems()\n\t{\n\t\tglobal $ilLocator;\n\t\t\n\t\tif (is_object($this->object))\n\t\t{\n\t\t\t$ilLocator->addItem($this->object->getTitle(),\n\t\t\t\t$this->getGotoLink($this->object->getRefId()), \"\", $_GET[\"ref_id\"]);\n\t\t}\n\t}", "public function setUpMenuItems()\n {\n $Menu = new DModuleMenu();\n $Menu -> setIcon( '<i class=\"fa fa-money\"></i>' );\n $MenuItem = new DModuleMenuItem( \"show\" , \"Monedas\" );\n $MenuItem -> setIcon( '<i class=\"fa fa-money\"></i>' );\n $Menu -> addItemObject( $MenuItem );\n $this -> setMenu( $Menu );\n }", "function wpct_settings_init( ) { \n\t\tregister_setting( 'wp_custom_toolbar', 'wpct_settings' );\n\t\t$roles = get_editable_roles();\n\t\t$menus = $this->menus;\n\t\tforeach($roles as $rkey => $r) {\n\t\t\tadd_settings_section(\n\t\t\t\t\"wpct_pluginPage_section_{$rkey}\", \n\t\t\t\t__( $r['name'], 'wp-custom-toolbar' ), \n\t\t\t\t[$this, 'wpct_settings_section_render'], \n\t\t\t\t'wp_custom_toolbar'\n\t\t\t);\n\t\t\tforeach ($this->menus as $mkey => $m) {\n\t\t\t\tadd_settings_field( \n\t\t\t\t\t\"wpct_checkbox_field_{$mkey}\", \n\t\t\t\t\tfalse, \n\t\t\t\t\t[$this, 'wpct_menu_checkbox_render'],\n\t\t\t\t\t'wp_custom_toolbar', \n\t\t\t\t\t\"wpct_pluginPage_section_{$rkey}\",\n\t\t\t\t\t[\n\t\t\t\t\t\t'rkey' => $rkey,\n\t\t\t\t\t\t'r' => $r,\n\t\t\t\t\t\t'mkey' => $mkey,\n\t\t\t\t\t\t'm' => $m,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function add_menu_items () {\n\t\t\n\t\t//add menu in wordpress dashboard\n\n\t\tadd_submenu_page(\n\t\t\t'ltple-settings',\n\t\t\t__( 'Affiliate Commissions', $this->plugin->slug ),\n\t\t\t__( 'Affiliate Commissions', $this->plugin->slug ),\n\t\t\t'edit_pages',\n\t\t\t'edit.php?post_type=affiliate-commission'\n\t\t);\n\t\t\n\t\tadd_users_page( \n\t\t\t'All Affiliates', \n\t\t\t'All Affiliates', \n\t\t\t'edit_pages',\n\t\t\t'users.php?' . $this->parent->_base .'view=affiliates'\n\t\t);\n\t}", "public function addAdminMenuEntries(): void {\n foreach ($this->adminPages as $page) {\n (new $page($this->container));\n }\n }", "protected function addDisplayToolbar() {\n\t\t$doc = JFactory::getDocument();\n\t\t$doc->addStyleDeclaration('.icon-48-jmap{background-image:url(\"components/com_jmap/images/jmap-48x48.png\")}');\n\t\tJToolBarHelper::title( JText::_('COM_JMAP_CPANEL_TOOLBAR' ), 'jmap' );\n\t\tJToolBarHelper::custom('cpanel.display', 'home', 'home', 'COM_JMAP_CPANEL', false);\n\t}", "function getToolbar() {\n //load the JToolBar library and create a toolbar\n jimport('joomla.html.toolbar');\n $bar = new JToolBar('toolbar');\n\n $bar->appendButton('Standard', 'archive', JText::_('COM_EASYSDI_SHOP_BASKET_BTN_SAVE'), 'basket.draft', false);\n $bar->appendButton('Separator');\n if (!$this->item->free) {\n $bar->appendButton('Standard', 'edit', JText::_('COM_EASYSDI_SHOP_BASKET_BTN_ESTIMATE'), 'basket.estimate', false);\n $bar->appendButton('Separator');\n }\n $bar->appendButton('Standard', 'publish', JText::_('COM_EASYSDI_SHOP_BASKET_BTN_ORDER'), 'basket.order', false);\n\n //generate the html and return\n return $bar->render();\n }", "protected function setupListOperation()\n {\n CRUD::setFromDb();\n\n $this->crud->addButtonFromView('line', 'more_items', 'more.items', 'end');\n }", "public function addButtons()\n {\n if ($this->isCreateButtonRequired()) {\n $this->getToolbar()->addChild('bluemedia_return', Button::class, [\n 'label' => __('Return BM'),\n 'onclick' => 'BlueMedia.BluePayment.showPopup();'\n ]);\n }\n\n return $this;\n }", "protected function addDisplayToolbar() {\r\n\t\t$doc = JFactory::getDocument();\r\n\t\t$doc->addStyleDeclaration('.icon-48-jmap{background-image:url(\"components/com_jmap/images/icon-48-help.png\")}');\r\n\t\t$doc->addStyleDeclaration('.icon-32-config{background-image:url(\"components/com_jmap/images/icon-32-config.png\")}');\r\n\t\tJToolBarHelper::title( JText::_( 'HELP' ), 'jmap' );\r\n\t\tJToolBarHelper::custom('cpanel.display', 'config', 'config', 'CPANEL', false);\r\n\t}", "public function push($gridItems);", "public function append(...$items): self;" ]
[ "0.76404977", "0.75966114", "0.7239539", "0.7164616", "0.7147222", "0.6944684", "0.6939915", "0.68821603", "0.68775946", "0.6844566", "0.68332654", "0.68185544", "0.6802315", "0.6798707", "0.6776612", "0.6772997", "0.67301506", "0.67210996", "0.6708862", "0.67008317", "0.6668903", "0.6667158", "0.66593045", "0.6643868", "0.66199684", "0.6609711", "0.6608156", "0.65963477", "0.65537006", "0.65011245", "0.6480695", "0.645675", "0.64326674", "0.6392732", "0.63528097", "0.6331229", "0.62993884", "0.6280669", "0.62748617", "0.6274304", "0.62477654", "0.62289566", "0.61862755", "0.61836886", "0.61336493", "0.6123102", "0.611022", "0.609501", "0.5985889", "0.5972631", "0.5935008", "0.5911477", "0.58922553", "0.5870473", "0.5858771", "0.5828464", "0.5820587", "0.5812933", "0.5775113", "0.56946933", "0.5676883", "0.56496763", "0.5642103", "0.5628137", "0.562452", "0.5622935", "0.5598372", "0.55443764", "0.5538878", "0.5536823", "0.5516209", "0.5511319", "0.550575", "0.54791117", "0.5458512", "0.5437782", "0.5424859", "0.541829", "0.54160494", "0.540735", "0.5404419", "0.5403743", "0.53976244", "0.53976244", "0.5384609", "0.53808564", "0.53618973", "0.5358488", "0.5351819", "0.5345725", "0.53403324", "0.5331267", "0.5330392", "0.53083384", "0.5307402", "0.53044796", "0.5302774", "0.53019536", "0.52983797", "0.52784234" ]
0.55259573
70
Enqueue any styles/scripts needed for the frontend. Pretty much loading the scripts needed for our tools.
public function enqueue_styles_scripts() { // If tota11y is enabled... if ( wa11y()->can_load_tota11y() ) { // This file belongs in the header. wp_enqueue_script( 'tota11y', plugins_url( '/tools/tota11y/tota11y.min.js', __FILE__ ), array(), $this->plugin_version ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function frontEndStyleScripts(): void\n {\n wp_enqueue_style('users-data-bootstrap', plugin_dir_url(dirname(__FILE__)) . 'assets/css/bootstrap.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-fontawsome', plugin_dir_url(dirname(__FILE__)) . 'assets/css/font-awesome.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-styles', plugin_dir_url(dirname(__FILE__)) . 'assets/css/users-data.css', [], UsersListing::getVersion());\n //\n wp_enqueue_script('jquery-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/jquery.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('jquery-popper', plugin_dir_url(dirname(__FILE__)) . 'assets/js/popper.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('bootstrap-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/bootstrap.min.js', ['jquery'], UsersListing::getVersion(), false);\n }", "public function setup_scripts_and_styles() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_css' ), 50 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_js' ), 10 );\n\t}", "function scripts() {\n\n\twp_enqueue_script(\n\t\t'frontend',\n\t\tPLAYGROUND_THEME_TEMPLATE_URL . \"/dist/js/frontend.min.js\",\n\t\t[],\n\t\tfalse,\n\t\ttrue\n\t);\n\n}", "public function onEnqueueScripts()\n {\n $this->enqueue('front');\n }", "public function enqueueScripts()\n {\n wp_enqueue_style('gfbitpay-admin', $this->plugin->urlBase . 'style-admin.css', false, GFBITPAY_PLUGIN_VERSION);\n }", "function scripts() {\n\n\twp_enqueue_script(\n\t\t'frontend',\n\t\tERI_SCAFFOLD_TEMPLATE_URL . '/dist/js/frontend.js',\n\t\t[],\n\t\tERI_SCAFFOLD_VERSION,\n\t\ttrue\n\t);\n\n\tif ( is_page_template( 'templates/page-styleguide.php' ) ) {\n\t\twp_enqueue_script(\n\t\t\t'styleguide',\n\t\t\tERI_SCAFFOLD_TEMPLATE_URL . '/dist/js/styleguide.js',\n\t\t\t[],\n\t\t\tERI_SCAFFOLD_VERSION,\n\t\t\ttrue\n\t\t);\n\t}\n\n}", "public function enqueueScripts() {\n\t\t\twp_enqueue_script('jquery');\n//\t\t\twp_enqueue_script('owl', self::asset(\"node_modules/owl.carousel/dist/owl.carousel.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('headroom', self::asset(\"node_modules/headroom.js/dist/headroom.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('prettyPhoto', self::asset(\"js/vendor/jquery.prettyPhoto.js\"), ['jquery'], '1.0.0', ' all');\n//\t\t\twp_enqueue_script('navigo', self::asset(\"node_modules/navigo/lib/navigo.min.js\"), ['jquery'], '1.0.0', ' all')\\;\n\t\t\twp_enqueue_script('app', self::asset(\"js/app.min.js\"), ['jquery'], '1.0.0', ' all');\n\t\t}", "public function enqueueScripts(){}", "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "public function enqueue_scripts() {\n\t\t$this->styles();\n\t\t$this->scripts();\n\t}", "public function enqueue_front_end_scripts() {}", "public function enqueue_backend_scripts_and_styles() {\n\t\twp_enqueue_style( 'uclacomponentswp-backend-styles', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/css/backend-styles.css', array(), UCLACOMPONENTSWP_VERSION, 'all' );\n\t\twp_enqueue_script( 'uclacomponentswp-backend-scripts', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/js/backend-scripts.js', array(), UCLACOMPONENTSWP_VERSION, false );\n\t\twp_localize_script( 'uclacomponentswp-backend-scripts', 'uclacomponentswp', array(\n\t\t\t'plugin_name' => __( UCLACOMPONENTSWP_NAME, 'ucla-components-for-wp' ),\n\t\t));\n\t}", "public function enqueueScripts() {\n wp_register_style('rrze-faq-style', plugins_url('assets/css/rrze-faq.css', plugin_basename($this->pluginFile)));\n wp_enqueue_style('rrze-faq-style');\n }", "function grd_scripts() {\n\twp_enqueue_style( 'main-style', get_stylesheet_uri() );\n\tif( !is_admin() ) {\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'modernizr', get_template_directory_uri() . '/bower_components/modernizr/modernizr.js', array('jquery'), NULL, true );\n\t\twp_enqueue_script( 'plugins', get_template_directory_uri() . '/assets/scripts/plugins.min.js', array('jquery'), NULL, true );\n\t\twp_enqueue_script( 'scripts', get_template_directory_uri() . '/assets/scripts/main.min.js', array('jquery'), NULL, true );\n\t\tif( DEV ) {\n\t\t\twp_enqueue_script( 'livereload', '//localhost:35729/livereload.js', NULL, NULL, true);\n\t\t}\n\t}\n}", "function frontend_enqueue_scripts()\n\t{\n\t\twp_register_style('font-awesome', $this->stylesheet, array(), $this->version);\n\n\t\twp_enqueue_style( array( 'font-awesome' ) );\n\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "public function enqueue_scripts() {\n\n\t\twp_enqueue_style( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) . '/dist/control.css' ), array(), '1.0' );\n\n\t}", "function aitAdminEnqueueScriptsAndStyles()\n{\n\t$mapLanguage = get_locale();\n\taitAddScripts(array(\n\t\t'ait-googlemaps-api' => array(\n\t\t\t\t\t\t\t\t\t //'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyC62AaIu5cD1nwSCmyO4-33o3DjkFCH4KE&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyBL0QWiORKMYd585E4qvcsHcAR1R7wmdiY&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'deps' => array('jquery')\n\t\t\t\t\t\t\t\t\t ),\n\t\t'ait-jquery-gmap3' => array('file' => THEME_JS_URL . '/libs/gmap3.min.js', 'deps' => array('jquery', 'ait-googlemaps-api')),\n\t));\n}", "public function frontendScripts() {\r\n global $Tema;\r\n \r\n // Adiciona os scripts\r\n wp_enqueue_script('startr-slider-js', $Tema->URL('modules/slider/assets/idangerous.swiper.min.js'));\r\n \r\n // Adicionamos o CSS também\r\n wp_enqueue_style('startr-slider-css', $Tema->URL('modules/slider/assets/idangerous.swiper.css'));\r\n }", "public function register_frontend_assets() {\n\t\twp_enqueue_style( 'ghc-functionality', $this->plugin_dir_url( 'dist/css/style.min.css' ), array(), $this->version );\n\n\t\twp_register_script( 'ghc-content-types-filter', $this->plugin_dir_url( 'dist/js/content-types.min.js' ), array( 'jquery' ), $this->version, true );\n\n\t\twp_register_script( 'ghc-maps', $this->plugin_dir_url( 'dist/js/maps.min.js' ), array( 'jquery', 'google-maps-api' ), $this->version, true );\n\t\twp_register_script( 'google-maps-api', 'https://maps.googleapis.com/maps/api/js?key=' . get_option( 'options_api_key' ), array(), null, true ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters -- let Google Maps handle cache invalidation.\n\n\t\twp_enqueue_script( 'ghc-popups', $this->plugin_dir_url( 'dist/js/popups.min.js' ), array( 'jquery', 'popup-maker-site' ), $this->version, true );\n\n\t\twp_register_script( 'ghc-robly-lists', $this->plugin_dir_url( 'dist/js/robly-lists.min.js' ), array( 'jquery' ), $this->version, true );\n\n\t\twp_register_script( 'slick', $this->plugin_dir_url( 'dist/js/slick.min.js' ), array( 'jquery' ), $this->version, true );\n\t\twp_register_style( 'slick', $this->plugin_dir_url( 'dist/css/slick.min.css' ), array(), $this->version, false );\n\t}", "function studeon_vc_frontend_scripts() {\n\t\tif (studeon_exists_visual_composer()) {\n\t\t\tif (studeon_is_on(studeon_get_theme_option('debug_mode')) && studeon_get_file_dir('plugins/js_composer/js_composer.css')!='')\n\t\t\t\twp_enqueue_style( 'studeon-js-composer', studeon_get_file_url('plugins/js_composer/js_composer.css'), array(), null );\n\t\t}\n\t}", "function cjpopups_frontend_scripts(){\n\t$wp_version = get_bloginfo('version');\n\t$item_version = cjpopups_item_info('item_version');\n\tif(!is_admin()){\n\t\twp_register_style( 'cj-frontend-css', cjpopups_item_path('framework_url').'/assets/frontend/css/cj-global.css', null, $item_version, 'screen' );\n\t\twp_enqueue_style( 'cj-frontend-css' );\n\t}\n}", "public function enqueue_scripts () {\n\n\t\t$visibility = apply_filters( 'wp_simple_flexslider_insert_frontend_script', true );\n\n\t\tif( $visibility ) {\n\t\t\twp_enqueue_style( 'jquery-flexslider', WP_SIMPLE_FLEXSLIDER_URL . 'flexslider/flexslider.css', array(), '2.3.0', 'all' );\n\t\t\twp_register_script( 'jquery-flexslider', WP_SIMPLE_FLEXSLIDER_URL . 'flexslider/jquery.flexslider-min.js', array( 'jquery'), '2.3.0', 'all' );\n\t\t\twp_enqueue_script( 'wc-simple-flexslider-frontend', WP_SIMPLE_FLEXSLIDER_URL . 'js/wp-simple-flexslider-frontend.js', array( 'jquery', 'jquery-flexslider' ), '0.1', 'all' );\n\t\t}\n\t}", "function enqueue_backend_resources()\n {\n $this->set_screen();\n if (C_NextGen_Admin_Page_Manager::is_requested()) {\n M_NextGen_Admin::enqueue_common_admin_static_resources();\n }\n wp_enqueue_script('jquery');\n $this->object->enqueue_jquery_ui_theme();\n wp_enqueue_script('photocrati_ajax');\n wp_enqueue_script('jquery-ui-accordion');\n wp_enqueue_style('imagely-admin-font', 'https://fonts.googleapis.com/css?family=Lato:300,400,700,900', array(), NGG_SCRIPT_VERSION);\n if (method_exists('M_Gallery_Display', 'enqueue_fontawesome')) {\n M_Gallery_Display::enqueue_fontawesome();\n }\n // Ensure select2\n wp_enqueue_style('ngg_select2');\n wp_enqueue_script('ngg_select2');\n }", "public function enqueue_scripts() {\n\t\twp_enqueue_style( 'pt-style', plugins_url( 'assets/css/style.css', __FILE__ ), array(), '1.0.0', false );\n\n\t\twp_enqueue_script( 'pt-script', plugins_url( 'assets/js/script.js', __FILE__ ), array(), '1.0.0', true );\n\t}", "public function enqueue_front_end_scripts() {\n\n\t\t//Init vars\n\t\t$google_jquery_url = NULL;\n\n\t\t//Ensure scripts are loaded for front end only\n\t\tif( !is_admin() ) {\n\n\t\t\t//Load Zurb Foundation scripts\n\t\t\t$this->enqueue_zurb_foundation_scripts();\n\n\t\t\t//Load Wordpress commments jQuery for single pages only\n\t\t\t$this->enqueue_comments_script();\n\n\t\t}\n\n\t}", "public function admin_enqueue_scripts() {\n\t\t$pagenow = $GLOBALS['pagenow'];\n\n\t\tif ( ! ( self::is_term_edit( $pagenow ) || self::is_term_overview( $pagenow ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$asset_manager = new WPSEO_Admin_Asset_Manager();\n\t\t$asset_manager->enqueue_style( 'scoring' );\n\n\t\t$tab = new WPSEO_Help_Center_Template_Variables_Tab();\n\t\t$tab->enqueue_assets();\n\n\t\t$tag_id = filter_input( INPUT_GET, 'tag_ID' );\n\t\tif (\n\t\t\tself::is_term_edit( $pagenow ) &&\n\t\t\t! empty( $tag_id ) // After we drop support for <4.5 this can be removed.\n\t\t) {\n\t\t\twp_enqueue_media(); // Enqueue files needed for upload functionality.\n\n\t\t\t$asset_manager->enqueue_style( 'metabox-css' );\n\t\t\t$asset_manager->enqueue_style( 'snippet' );\n\t\t\t$asset_manager->enqueue_style( 'scoring' );\n\t\t\t$asset_manager->enqueue_script( 'metabox' );\n\t\t\t$asset_manager->enqueue_script( 'term-scraper' );\n\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'term-scraper', 'wpseoTermScraperL10n', $this->localize_term_scraper_script() );\n\t\t\t$yoast_components_l10n = new WPSEO_Admin_Asset_Yoast_Components_l10n();\n\t\t\t$yoast_components_l10n->localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'term-scraper' );\n\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'replacevar-plugin', 'wpseoReplaceVarsL10n', $this->localize_replace_vars_script() );\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoSelect2Locale', WPSEO_Utils::get_language( WPSEO_Utils::get_user_locale() ) );\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoAdminL10n', WPSEO_Help_Center::get_translated_texts() );\n\n\t\t\t$asset_manager->enqueue_script( 'admin-media' );\n\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-media', 'wpseoMediaL10n', array(\n\t\t\t\t'choose_image' => __( 'Use Image', 'wordpress-seo' ),\n\t\t\t) );\n\t\t}\n\n\t\tif ( self::is_term_overview( $pagenow ) ) {\n\t\t\t$asset_manager->enqueue_script( 'edit-page-script' );\n\t\t}\n\t}", "static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}", "function admin_scripts() {\r\n\t\t\twp_register_style( 'wpeologs_backend_css', WPEO_LOGS_URL . '/assets/css/backend.css', '', WPEO_LOGS_VERSION);\r\n\t\t\twp_enqueue_style( 'wpeologs_backend_css');\r\n\r\n\t\t\twp_enqueue_style( 'dashicons' );\r\n\r\n\t\t\twp_register_script( 'wpeologs_chart_js', WPEO_LOGS_URL . '/assets/js/chart.js');\r\n\t\t\twp_enqueue_script( 'wpeologs_chart_js' );\r\n\r\n\t\t\twp_register_script( 'wpeologs_backend_js', WPEO_LOGS_URL . '/assets/js/backend.js');\r\n\t\t\twp_enqueue_script( 'wpeologs_backend_js' );\r\n\t\t}", "function assets(){\n\t\t\twp_enqueue_style( 'sp-2020-styles', get_template_directory_uri() .'/assets/css/main.css', array(), SPUTZNIK_2020_THEME_VERSION );\n\t\t\twp_enqueue_script( 'sp-2020-js', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), SPUTZNIK_2020_THEME_VERSION, true );\n\n\t\t}", "function flexiauto_scripts_loader() {\n\t\t/* Load custom styles */\n\t\twp_enqueue_style('reset', TPL_DIR . '/assets/css/vendor/reset.css');\n\t\twp_enqueue_style('bootstrap-styles', TPL_DIR . '/assets/css/vendor/bootstrap.min.css');\n\t\twp_enqueue_style('flexi-styles', TPL_DIR . '/assets/css/flexi.min.css');\n\n\t\t/* Load custom scripts */\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', TPL_DIR . '/assets/js/vendor/jquery.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery');\n\n\t\twp_enqueue_script('bootstrap-scripts', TPL_DIR . '/assets/js/vendor/bootstrap.min.js', array(), false, true);\n\t\twp_enqueue_script('nicescroll', TPL_DIR . '/assets/js/vendor/jquery.nicescroll.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery-validate', TPL_DIR . '/assets/js/vendor/jquery.validate.min.js', array(), false, true);\n\t\twp_enqueue_script('match-height', TPL_DIR . '/assets/js/vendor/jquery.matchHeight.min.js', array(), false, true);\n\t\twp_enqueue_script('flexi-scripts', TPL_DIR . '/assets/js/flexi.min.js', array(), false, true);\n\n\t}", "public function adminThemeStylesAndScripts()\n {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.admin.min.css', array());\n wp_enqueue_style('my-admin-theme', get_template_directory_uri() . '/includes/snv/Theme/admin/style.css');\n wp_enqueue_script('my-admin-script', get_template_directory_uri() . '/includes/snv/Theme/admin/script.js', array('jquery'), '1.0', true);\n\n // for the contactonfo page\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n wp_enqueue_style('thickbox');\n }", "public function enqueue_public_scripts_and_styles() {\n\t\t//wp_enqueue_style( 'uclacomponentswp-backend-styles', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/css/backend-styles.css', array(), UCLACOMPONENTSWP_VERSION, 'all' );\n\t\t//wp_enqueue_script( 'uclacomponentswp-backend-scripts', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/js/backend-scripts.js', array(), UCLACOMPONENTSWP_VERSION, false );\n\t\t// wp_localize_script( 'uclacomponentswp-backend-scripts', 'uclacomponentswp', array(\n\t\t// \t'plugin_name' => __( UCLACOMPONENTSWP_NAME, 'ucla-components-for-wp' ),\n\t\t// ));\n\t// Install the UCLA Component library styles\n\twp_enqueue_style( 'ucla-lib-style', 'https://cdn.webcomponents.ucla.edu/1.0.0-beta.16/css/ucla-lib.min.css' );\n\t// Install the UCLA Component Library scripts\n\twp_enqueue_script( 'ucla-lib-script', 'https://s3-us-west-1.amazonaws.com/webcomponents.ucla.edu/public/1.0.0-beta.16/js/ucla-lib-scripts.min.js' );\n\t\n\t}", "public function admin_enqueue_scripts()\n\t\t{\n\t\t\tglobal $pagenow; \n\t\t\tif (is_admin() || $pagenow === 'wc_prd_vendor') { \n\t\t\t\twp_register_script( 'bootstrap-tooltip', $this->assets_url . 'js/bootstrap-tooltip.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'select2', $this->assets_url . 'js/select2/select2.min.js', array( 'jquery' ), '3.5.2' );\n\t\t\t\twp_register_script( 'topgroupshops-media', $this->assets_url . 'js/topgroupshops-media.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'sf-scripts', $this->assets_url . 'js/sf-jquery.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_style( 'select2', $this->assets_url . 'js/select2/select2.css' );\n\t\t\t\twp_register_style( 'sf-styles', $this->assets_url . 'css/sf-styles.css' );\n\t\t\t}\n\t\t}", "function beaver_extender_fe_style_editor_load_scripts() {\n\n\twp_enqueue_style( 'dashicons' );\n\twp_enqueue_style( 'beaver_extender_fe_style_editor_styles' );\n\twp_enqueue_style( 'beaver_extender_jquery_ui_css', '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css', false, BBEXT_VERSION, false );\n\twp_enqueue_script( 'jquery-ui-resizable' );\n\twp_enqueue_script( 'beaver_extender_fe_style_editor' );\n\twp_enqueue_script( 'beaver_extender_ace' );\n\twp_enqueue_script( 'beaver_extender_ace_autocomplete' );\n\t\t\n}", "protected function addAssets(): void\n {\n $this->enqueue('assets/dashifen-2022.js');\n $font1 = $this->enqueue('//fonts.googleapis.com/css2?family=El+Messiri&display=swap');\n $font2 = $this->enqueue('//fonts.googleapis.com/css2?family=Roboto&display=swap');\n $css = $this->enqueue('assets/dashifen-2022.css', [$font1, $font2]);\n \n $dir = trailingslashit($this->getStylesheetDir());\n if (file_exists($dir . 'assets/dashifen-2022-components.css')) {\n $this->enqueue('assets/dashifen-2022-components.css', [$css]);\n }\n }", "function accvent_scripts() {\n\t wp_enqueue_style( 'main', get_stylesheet_uri() );\n\t wp_enqueue_script( 'bundle', get_template_directory_uri() . '/js/build.min.js', array(), '1.0.0', true );\n\t}", "public function enqueue_scripts() {\n wp_enqueue_style( $this->name, plugins_url( '/assets/css/admin.css', IMFILE ), '', $this->version, 'all' );\n \n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( $this->name, plugins_url( '/assets/js/admin.js', IMFILE ), array( 'jquery' ), $this->version, true );\n }", "private function register_scripts()\n\t{\n\t\tif (is_admin()) {\n\t\t\t// Load our main stylesheet.\n\t\t\twp_enqueue_style('kd-letters', plugin_dir_url( __FILE__ ) . '/templates/style/kd-letters.css');\n\t\t}\n\t}", "public function enqueue_scripts() {\n wp_enqueue_script(\n 'moment',\n plugins_url('includes/moment.min.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'minidaemon',\n plugins_url('includes/mdn-minidaemon.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'vspi-admin',\n plugins_url('includes/vspi-admin.js', __FILE__),\n array('jquery'),\n VSPI_VERSION,\n false\n );\n }", "final public function wp_enqueue_scripts()\n {\n // Bypass\n if (!self::tFyAppConfig('enqueue_scripts')) {\n return;\n }\n\n if (self::tFyAppConfig('modal')) :\n wp_enqueue_style('tiFyComponentsPdfViewerModal');\n wp_enqueue_script('tiFyComponentsPdfViewerModal');\n else :\n wp_enqueue_style('tiFyComponentsPdfViewer');\n wp_enqueue_script('tiFyComponentsPdfViewer');\n endif;\n }", "function berry_scripts() {\n\n\twp_dequeue_style( 'seed-style');\n\twp_enqueue_style( 'berry-style', get_stylesheet_uri() );\n\twp_enqueue_script( 'berry-main', get_stylesheet_directory_uri() . '/js/main.js', array(), '2016-1', true );\n\n}", "public function admin_scripts() {\n\t\twp_enqueue_style( 'wpex-font-awesome', WPEX_CSS_DIR_URI .'font-awesome.min.css' );\n\t}", "function aitEnqueueScriptsAndStyles(){\r\n\tif(!is_admin()){\r\n\t\t// just shortcuts\r\n\t\t$s = THEME_CSS_URL;\r\n\t\t$j = THEME_JS_URL;\r\n\r\n\t\taitAddStyles(array(\r\n\t\t\t'ait-colorbox' => array('file' => \"$s/libs/colorbox.css\"),\r\n\t\t\t'ait-fancybox' => array('file' => \"$s/libs/fancybox.css\"),\r\n\t\t\t'jquery-ui' \t => array('file' => \"$s/libs/jquery-ui.css\"),\r\n\t\t\t'prettysociable' => array('file' => \"$s/libs/prettySociable.css\"),\r\n\t\t\t'hoverzoom' \t => array('file' => \"$s/libs/hoverZoom.css\"),\r\n\t\t));\r\n\r\n\t\taitAddScripts(array(\r\n\t\t\t'jquery-ui-tabs' \t\t\t=> true,\r\n\t\t\t'jquery-ui-accordion' \t\t\t=> true,\r\n\t\t\t'jquery-infieldlabel' \t\t\t=> array('file' => \"$j/libs/jquery-infieldlabel.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-iconmenu' \t\t\t\t=> array('file' => \"$j/libs/jquery-iconmenu.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-plugins'\t \t\t\t=> array('file' => \"$j/libs/jquery-plugins.js\", 'deps' => array('jquery')),\r\n\t\t\t'modernizr'\t\t\t\t\t\t=> array('file' => \"$j/libs/modernizr-2.6.1-custom.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\r\n\t\t\t'ait-gridgallery' \t\t\t=> array('file' => \"$j/gridgallery.js\", 'deps' => array('jquery', 'jquery-plugins'), 'inFooter' => true),\r\n\t\t\t'ait-testimonials' \t\t\t=> array('file' => \"$j/testimonials.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'ait-script' \t\t\t=> array('file' => \"$j/script.js\", 'deps' => array('jquery', 'jquery-infieldlabel', 'jquery-iconmenu', 'jquery-plugins', 'modernizr'), 'inFooter' => true),\r\n\t\t));\r\n\t}\r\n}", "public function admin_scripts() {\n\t\twp_enqueue_style( 'jquery-ui-datepicker', plugins_url( \"/css/smoothness/jquery-ui-1.10.3$this->load_dev_files.css\", __FILE__ ), array(), '1.10.3' );\n\t\twp_enqueue_style( 'visual-form-builder-style', plugins_url( \"/css/visual-form-builder-admin$this->load_dev_files.css\", __FILE__ ), array(), '20140412' );\n\t\twp_enqueue_style( 'wp-color-picker' );\n\t\twp_enqueue_style( 'thickbox' );\n\n\t\twp_enqueue_script( 'jquery-ui-sortable' );\n\t\twp_enqueue_script( 'jquery-ui-draggable' );\n\t\twp_enqueue_script( 'jquery-ui-datepicker' );\n\t\twp_enqueue_script( 'wp-color-picker' );\n\t\twp_enqueue_script( 'thickbox' );\n\t\twp_enqueue_script( 'postbox' );\n\t\twp_enqueue_script( 'jquery-form-validation', plugins_url( '/js/jquery.validate.min.js', __FILE__ ), array( 'jquery' ), '1.9.0', true );\n\t\twp_enqueue_script( 'vfb-admin', plugins_url( \"/js/vfb-admin$this->load_dev_files.js\", __FILE__ ) , array( 'jquery', 'jquery-form-validation' ), '20140221', true );\n\t\twp_enqueue_script( 'nested-sortable', plugins_url( \"/js/jquery.ui.nestedSortable$this->load_dev_files.js\", __FILE__ ) , array( 'jquery', 'jquery-ui-sortable' ), '1.3.6', true );\n\t\twp_enqueue_script( 'jquery-ui-timepicker', plugins_url( \"/js/jquery.ui.timepicker$this->load_dev_files.js\", __FILE__ ) , array( 'jquery', 'jquery-ui-datepicker' ), '1.1.1', true );\n\n\t\t// Only load Google Charts if viewing Analytics to prevent errors\n\t\tif ( isset( $_REQUEST['page'] ) && in_array( $_REQUEST['page'], array( 'vfb-reports' ) ) ) {\n\t\t\twp_enqueue_script( 'raphael-js', plugins_url( '/js/raphael.min.js', __FILE__ ), array(), '2.1.0', false );\n\t\t\twp_enqueue_script( 'morris-js', plugins_url( '/js/morris.min.js', __FILE__ ), array( 'raphael-js' ), '0.4.3', false );\n\t\t\twp_enqueue_script( 'vfb-charts', plugins_url( \"/js/vfb-charts$this->load_dev_files.js\", __FILE__ ), array( 'morris-js' ), '20130916', false );\n\t\t}\n\n\t\t// Load CSS for Create Post add-on\n\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) )\n\t\t\twp_enqueue_style( 'vfb-pro-create-post', plugins_url( '/vfb-pro-create-post/css/vfb-pro-create-post.css' ), array( 'jquery-ui-datepicker', 'visual-form-builder-style' ), '20130916' );\n\n\t\twp_localize_script( 'vfb-admin', 'VfbAdminPages', array( 'vfb_pages' => $this->_admin_pages ) );\n\t}", "function enqueue_scripts() {\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ), 21 );\n\t\tadd_action( 'admin_init', array( $this, 'add_pagination' ) );\n\t\tadd_action( \"bc_plugin_browser_content_{$this->page_slug}\", array( $this, 'display_plugins_browser' ), 10, 2 );\n\t}", "function cs_style_and_scripts() {\n \n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/vendor.css' );\n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/app.css' );\n wp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n /*wp_enqueue_script( 'myscripts', get_stylesheet_directory_uri() . '/assets/js/app.js', '', '1.0.0', true );\n wp_localize_script('myscripts', 'cs_obj', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n ));*/\n\n }", "public function action_wp_enqueue_scripts() {\n\n\t\twp_enqueue_style( 'bootstrap', get_stylesheet_directory_uri() . '/lib/bootstrap/dist/css/bootstrap.css' );\n\t\twp_enqueue_style( 'core-style', get_stylesheet_directory_uri() . '/assets/stylesheets/core.css' );\n\n\t}", "function enqueue_scripts() {\n\t\twp_enqueue_script( 'post-quick-editor', plugins_url('./dist/post-quick-editor-bundle.js', __FILE__), array(), 'v0.0.1', true );\n\t\twp_localize_script('post-quick-editor', 'wpApiSettings', array(\n\t\t\t'root' => esc_url_raw(rest_url()),\n\t\t\t'nonce' => wp_create_nonce( 'wp_rest' ),\n\t\t));\n\t}", "public static function wp_enqueue_scripts() {\n\t\t\t\n\t\t\tWPPFrontendUI::_register_styles();\n\t\t\t\n\t\t}", "function load_dev_styles_scripts() {\n // Theme styles\n wp_enqueue_style( 'themename', CHILD_SS_URI . '/assets/dev/style.css', false, null, 'all' );\n\n // Header Scripts\n wp_enqueue_script( 'header_scripts', CHILD_SS_URI . '/assets/dev/header.js', array(), null, false );\n\n // Footer Scripts\n wp_enqueue_script( 'footer_scripts', CHILD_SS_URI . '/assets/dev/footer.js', array( 'jquery' ), null, true );\n\n // Single Scripts\n if ( is_single() ) {\n wp_enqueue_script( 'single_scripts', CHILD_SS_URI . '/assets/dev/single.js', array( 'jquery' ), null, true );\n }\n}", "public function enqueues() {\n\n\t\t// CSS.\n\t\twp_enqueue_style(\n\t\t\t'wpforms-builder-setup',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/css/admin-builder-setup.css',\n\t\t\tnull,\n\t\t\tWPFORMS_VERSION\n\t\t);\n\t}", "function enqueue_styles_and_scripts( ) {\n\t\t$base_url = plugins_url( '', __FILE__ );\n\t\twp_enqueue_script(\n\t\t\t'pr_advance_ui_widget',\n\t\t\t $base_url . 'js/pr_advance_ui_widget.js',\n\t\t\tarray( 'jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-sortable', 'underscore', 'backbone' )\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t'pr_advance_ui_widget',\n\t\t\t$base_url . 'css/pr_advance_ui.css'\n\t\t);\n\t}", "public function load_admin_scripts()\n {\n // Enqueue styles\n wp_enqueue_style('soccerpress', plugins_url('assets/css/soccerpress.css', __FILE__), array(), '1.0.0', false);\n wp_enqueue_style('bootstrap-css', plugins_url('assets/css/bootstrap.min.css', __FILE__), array(), '4.3.1', false);\n\n // Enqueue scripts\n wp_register_script('bootstrap-js', plugins_url('assets/js/bootstrap.min.js', __FILE__), array(), '4.3.1', false);\n }", "public function enqueue_scripts() {\n\t\tif ( is_singular() ) wp_enqueue_script( 'comment-reply' );\n\n\t\twp_enqueue_style( 'app', get_template_directory_uri().'/assets/css/app.css', false, '1.0.0', 'all' );\n\t\twp_enqueue_script( 'foundation-modernizr', get_template_directory_uri().'/bower_components/foundation/js/vendor/modernizr.js', false, '', false );\n\t\twp_enqueue_script( 'foundation-fastclick', get_template_directory_uri().'/bower_components/foundation/js/vendor/fastclick.js', false, '', true );\n\t\twp_enqueue_script( 'foundation', get_template_directory_uri().'/bower_components/foundation/js/foundation.min.js', array('jquery'), '', true );\n\t\twp_enqueue_script( 'main', get_template_directory_uri().'/assets/js/main.js', array('jquery', 'foundation'), '1.0.0', true );\n\t}", "function scripts() {\n\twp_enqueue_script(\n\t\t'deadpool-main',\n\t\tDIE_TEMPLATE_URL . '/assets/js/dist/main.bundle.js',\n\t\t[],\n\t\tfalse,\n\t\ttrue\n\t);\n}", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Fastnetmarketing_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Fastnetmarketing_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/fastnetmarketing-admin-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "function artistpress_scripts() {\n\t\twp_enqueue_style( 'reset', get_template_directory_uri() . '/css/reset.css', array(), '2.0' );\n\t\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.7' );\n\t\twp_enqueue_style( 'main_style', get_template_directory_uri() . '/style.css' );\n\t\twp_enqueue_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', array(), '1.11.3', true );\n\t\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.6', true );\n\t\twp_register_script( 'load', get_template_directory_uri() . '/js/load.js' );\n\n\t\t//localize params for use in load.js\n\t\t$theme_params = array(\n\t\t 'backround_image' => get_option('backround_image'),\n\t\t 'action_url' => get_option('action_url'),\n\t\t);\n\n\t\twp_localize_script( 'load', 'themeParams', $theme_params );\n\n\t\twp_enqueue_script( 'load', get_template_directory_uri() . '/js/load.js', array( 'jquery' ,'bootstrap'), '1', true );\n\t}", "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/scripts.min.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}", "function goodrds_admin_scripts() {\n\t\t// only on our backend page\n\t\tif (get_current_screen()->base == 'settings_page_goodrds') {\n\t wp_register_style( 'goodrds_css', plugins_url('goodrds-admin.css', __FILE__), false, '0.1' );\n\t wp_enqueue_style( 'goodrds_css' );\n\n\t wp_register_script( 'goodrds_js', plugins_url('goodrds-admin.js', __FILE__), array('jquery'), '0.1', true );\n\t wp_enqueue_script( 'goodrds_js' );\n\t }\n\t}", "protected function enqueue_scripts()\n {\n \\wp_enqueue_style('tify_control-progress');\n \\wp_enqueue_script('tify_control-progress');\n }", "function green_shortcodes_vc_scripts_front() {\n\t\tif (green_vc_is_frontend()) {\n\t\t\t// Include CSS \n\t\t\tgreen_enqueue_style ( 'shortcodes_vc-style', green_get_file_url('shortcodes/shortcodes_vc_front.css'), array(), null );\n\t\t\t// Include JS\n\t\t\tgreen_enqueue_script( 'shortcodes_vc-script', green_get_file_url('shortcodes/shortcodes_vc_front.js'), array(), null, true );\n\t\t}\n\t}", "function enqueue_frontend_scripts($scripts){\n\t\twp_enqueue_script('secondthought_device_widget_script');\n\t}", "function wpstarter_scripts() {\n\n\t// Set a dynamic version for cache busting\n\t$theme = wp_get_theme();\n\t$version = $theme['Version'];\n\n\twp_enqueue_style( 'wpstarter-style', get_template_directory_uri() . '/dist/css/main.css' );\n\n\twp_enqueue_script( 'wpstarter-vendorjs', get_template_directory_uri() . '/dist/js/vendor.min.js', array(), $version, true );\n\n wp_enqueue_script( 'wpstarter-customjs', get_template_directory_uri() . '/dist/js/main.js', array(), $version, true );\n\n}", "public function enqueue_assets() {\n\t\twp_enqueue_script( 'satispress-admin' );\n\t\twp_enqueue_style( 'satispress-admin' );\n\t}", "public function enqueue() {\r\n\t\twp_enqueue_style( 'wfct-ei', WFC_EI_CSS_URL . 'environment-indicator.css', array(), WFC_EI_VERSION );\r\n\t}", "function enqueue_scripts() {\n\tif ( ! is_null( is_user_opted_in() ) ) {\n\t\treturn;\n\t}\n\n\twp_enqueue_style(\n\t\t'altis-telemetry',\n\t\tplugins_url( 'assets/opt-in.css', dirname( __FILE__, 2 ) )\n\t);\n}", "public function enqueue_scripts () {\n wp_register_script( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'js/script.js', array( 'jquery' ), $this->_version );\n // Localize the script with new data\n\n $url = admin_url('admin-ajax.php');\n wp_localize_script( $this->_token . '-frontend', 'ajax_url', $url );\n wp_enqueue_script( $this->_token . '-frontend' );\n }", "public function editor_scripts() {\n\t\tadd_filter( 'script_loader_tag', [ $this, 'editor_scripts_as_a_module' ], 10, 2 );\n\n\t\twp_enqueue_style( 'elementor-editor-style', plugins_url( '/assets/editor.css', __FILE__ ) ); // Editor Style\n\t\t\n\t}", "function elegance_scripts()\n {\n /**\n * Stylesheet Enqueue\n * @version 1.0.0\n */\n wp_enqueue_style( 'elegance-style', get_stylesheet_uri() );\n wp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/assets/dist/css/bootstrap.min.css', array(), '4.3.1', 'all');\n wp_enqueue_style( 'font-awesome-css', get_template_directory_uri() . '/assets/dist/fonts/font-awesome.min.css', array(), '4.0.0', 'all');\n\n /**\n * Scripts Enqueue\n * @version 1.0.0\n */\n wp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/assets/dist/js/bootstrap.min.js', array( 'jquery' ), '4.3.1', true );\n\n /**\n * Woocommerce Stylesheet\n * @version 1.0.0\n */\n wp_enqueue_style( 'woocommerce-css', get_template_directory_uri() . '/assets/dist/css/woocommerce.css', array(), '1.0.0', 'all');\n \n }", "public function admin_enqueue_scripts()\n\t{\n\t\twp_register_style( 'go-git', plugins_url( 'components/css/go-git.css', __DIR__ ), array(), 1 );\n\t\twp_enqueue_style( 'go-git' );\n\t}", "public function enqueueAssets()\n {\n wp_enqueue_style( WPADW_DOMAIN . '-admin-style', WPADW_URL . '/assets/style.css' );\n }", "function startertheme_enqueue_files() {\n wp_enqueue_script('startertheme_scripts', get_theme_file_uri('/assets/dist/js/frontend/app.js'), NULL, '1.0', true);\n wp_enqueue_style('startertheme_style', get_theme_file_uri('/assets/dist/css/style.css'), NULL, '1.0');\n}", "function innelyz_scripts() {\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.js', array('jquery'), '3.3.7', false);\n wp_enqueue_style( 'bootstrap', get_template_directory_uri() .'/assets/css/bootstrap.css', array(), false, 'all' );\n wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lora|Pacifico|Roboto');\n wp_enqueue_style( 'innelyz-style', get_stylesheet_uri() );\n }", "public function wp_enqueue_scripts() {\n wp_enqueue_style('normalize', get_template_directory_uri() .\n '/normalize.css', array(), '8.0.1');\n wp_enqueue_style('theme-css', get_stylesheet_uri(),\n array(), '1.0');\n wp_enqueue_script('jquery');\n }", "function cinerama_edge_enqueue_admin_scripts() {\n\t\twp_enqueue_script( 'wp-color-picker' );\n\t\twp_enqueue_script( 'jquery-ui-datepicker' );\n\t\twp_enqueue_script( 'jquery-ui-accordion' );\n\t\twp_enqueue_script( 'common' );\n\t\twp_enqueue_script( 'wp-lists' );\n\t\twp_enqueue_script( 'postbox' );\n\t\twp_enqueue_media();\n\t\twp_enqueue_script( 'edgtf-dependence', get_template_directory_uri() . '/framework/admin/assets/js/edgtf-ui/edgtf-dependence.js', array(), false, true );\n\t\twp_enqueue_script( 'edgtf-twitter-connect', get_template_directory_uri() . '/framework/admin/assets/js/edgtf-ui/edgtf-twitter-connect.js', array(), false, true );\n\n\t\t/**\n\t\t * @see CineramaEdgeClassSkinAbstract::enqueueScripts - hooked with 10\n\t\t */\n\t\tdo_action( 'cinerama_edge_action_enqueue_admin_scripts' );\n\t}", "public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }", "function add_scripts_to_front() {\n $media = get_option('smfn_option_3') ? get_option('smfn_option_3') : \"1023\";\n wp_register_style('smfn-dynamic-css', plugin_dir_url(SMFN_FILE).'assets/css/dynamic.css.php?media=' . $media);\n wp_enqueue_style( 'smfn-dynamic-css');\n wp_enqueue_script('smfn-actions', plugin_dir_url(SMFN_FILE) . 'assets/js/smfnfunctions.js', array(), '1.0.0', true);\n }", "function hugomitoire_scripts() {\n wp_enqueue_style( 'appStyles', get_template_directory_uri() . '/dist/css/style.min.css' );\n wp_enqueue_script( 'Js', get_template_directory_uri() . '/dist/js/all.js', array(), '1.0.0', true );\n wp_enqueue_script( 'Swiper', get_template_directory_uri() . '/dis/js/all.js', array(), '4.4.2', true);\n}", "function scs_admin_head()\n\t{\t\n\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\twp_enqueue_script( 'jquery-ui-tabs' );\n\t\twp_enqueue_script( 'coming-soon', WP_PLUGIN_URL.'/'.basename(dirname(__FILE__)).'/js/init.js' );\n\t\twp_enqueue_style( 'coming-soon', WP_PLUGIN_URL.'/'.basename(dirname(__FILE__)).'/css/admin.css' );\n\t}", "public function admin_scripts() {\n wp_enqueue_script('jquery-ui-sortable');\n wp_enqueue_script('postbox');\n wp_enqueue_script('jquery-form-validation', SWPM_FORM_BUILDER_URL . '/js/jquery.validate.min.js', array('jquery'), '1.9.0', true);\n wp_enqueue_script('swpm-admin', SWPM_FORM_BUILDER_URL . \"/js/swpm-admin$this->load_dev_files.js\", array('jquery', 'jquery-form-validation'), '20140412', true);\n wp_enqueue_script('nested-sortable', SWPM_FORM_BUILDER_URL . \"/js/jquery.ui.nestedSortable$this->load_dev_files.js\", array('jquery', 'jquery-ui-sortable'), '1.3.5', true);\n\n wp_enqueue_style('swpm-form-builder-style', SWPM_FORM_BUILDER_URL . \"/css/swpm-form-builder-admin$this->load_dev_files.css\", array(), '20140412');\n\n wp_localize_script('swpm-admin', 'SwpmAdminPages', array('swpm_pages' => $this->_admin_pages));\n }", "public function wcufd_load_styles_scripts() {\n //main script file of the plugin\n wp_register_script( 'wcufd-front-end-js', plugins_url( 'js/wcufd-script.js',__FILE__ ), array('jquery'), '', true );\n wp_localize_script( 'wcufd-front-end-js', 'wcufd_vars', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'current_user_can' => current_user_can('administrator')\n )\n );\n wp_register_style( 'wcufd-front-end-style', plugins_url( 'css/wcufd-style.css',__FILE__ ) );\n }", "function _s_scripts() {\n\twp_enqueue_style( 'main.css', get_stylesheet_directory_uri() . '/dist/src/style.css', false, '6.9' );\n\twp_enqueue_script( 'main.js', get_stylesheet_directory_uri() . '/dist/main.js', false, false, true );\n}", "function cam_enqueue_related_pages_scripts_and_styles(){\n // wp_enqueue_style('related-styles', plugins_url('/css/bootstrap.min.css', __FILE__));\n wp_enqueue_script('releated-script', plugins_url( '/js/custom.js' , __FILE__ ), array('jquery','jquery-ui-droppable','jquery-ui-draggable', 'jquery-ui-sortable'));\n }", "function starter_scripts() {\n\twp_enqueue_style( 'google-fonts', 'https://fonts.googleapis.com/css?family=Cairo:400,600,700&display=swap', array(), null, 'screen' );\n\twp_enqueue_style( 'starter-style', get_theme_file_uri( 'dist/bundle.css' ), array(), filemtime( get_theme_file_path( 'dist/bundle.css' ) ), 'screen' );\n\twp_enqueue_script( 'starter-script', get_theme_file_uri( 'dist/bundle.js' ), array(), filemtime( get_theme_file_path( 'dist/bundle.js' ) ), true );\n\n\twp_localize_script(\n\t\t'starter-script',\n\t\t'WPglobals',\n\t\tarray(\n\t\t\t'siteurl' => get_template_directory_uri(),\n\t\t\t'homeurl' => get_home_url(),\n\t\t)\n\t);\n}", "public function admin_print_scripts()\n\t\t{\n\t\t\tglobal $wp_version;\n\n\t\t\t//Check wp version and load appropriate scripts for colorpicker.\n\t\t\tif ( 3.5 <= $wp_version ) {\n\t\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\t\twp_enqueue_script( 'wp-color-picker' );\n\t\t\t} else {\n\t\t\t\twp_enqueue_style( 'farbtastic' );\n\t\t\t\twp_enqueue_script( 'farbtastic' );\n\t\t\t}\n\n\t\t\twp_enqueue_script( 'bootstrap-tooltip' );\n\t\t\twp_enqueue_script( 'select2' );\n\t\t\twp_enqueue_script( 'topgroupshops-media' );\n\t\t\twp_enqueue_script( 'sf-scripts' );\n\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\twp_enqueue_style( 'select2' );\n\t\t\twp_enqueue_style( 'sf-styles' );\n\t\t}", "public function scripts() {\n\t\tif ( get_post_type() == 'agenda' && ! is_single() ) {\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'events-calendar', plugins_url( 'assets/js/calendar.js', plugin_dir_path( __FILE__ ) ), array( 'jquery' ), '', true );\n\t\t\twp_enqueue_style( 'events-calendar-styles', plugins_url( 'assets/css/calendar.css', plugin_dir_path( __FILE__ ) ), array(), '' );\n\t\t}\n\n\t\twp_enqueue_style( 'timeline-styles', plugins_url( 'assets/css/timeline.css', plugin_dir_path( __FILE__ ) ), array(), '' );\n\t}", "function theme_styles_scripts() {\n wp_enqueue_style('theme-style', get_template_directory_uri() . '/style.css');\n wp_enqueue_script('app-main', get_template_directory_uri() . '/app.bundle.js', null, null, true);\n}", "function krypton_scripts() {\n\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');\n\twp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.css' );\n\t//wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr.js');\n}", "function cs_front_scripts_enqueue() {\n\tglobal $cs_theme_option;\n if (!is_admin()) {\n\t\twp_enqueue_style('style_css', get_template_directory_uri() . '/style.css');\n\t\twp_enqueue_style('widget_css', get_template_directory_uri() . '/css/widget.css');\n \t\tif ( $cs_theme_option['color_switcher'] == \"on\" ) {\n\t\t\twp_enqueue_style('color-switcher_css', get_template_directory_uri() . '/css/color-switcher.css');\n\t\t}\n \t\twp_enqueue_style('bootstrap_css', get_template_directory_uri() . '/css/bootstrap.min.css');\n \t\twp_enqueue_style('font-awesome_css', get_template_directory_uri() . '/css/font-awesome.css');\n\t\t// Register stylesheet\n \twp_register_style( 'ie6_css', get_template_directory_uri() . '/css/ie.css' );\n \t// Apply IE conditionals\n \t$GLOBALS['wp_styles']->add_data( 'ie6_css', 'conditional', 'lte IE 9' );\n\t\t$GLOBALS['wp_styles']->add_data( 'font-awesome-ie7_css', 'conditional', 'lte IE 9' );\n \t// Enqueue stylesheet\n \twp_enqueue_style( 'ie6_css' );\n\t\t\n\t\twp_enqueue_style( 'font-awesome-ie7_css' );\n \t\twp_enqueue_style( 'wp-mediaelement' );\n \t\t wp_enqueue_script('jquery');\n\t\t\twp_enqueue_script( 'wp-mediaelement' );\n\t\t\twp_enqueue_script('bootstrap_js', get_template_directory_uri() . '/scripts/frontend/bootstrap.min.js', '', '', true);\n\t\t\twp_enqueue_script('bscrolltofixed_js', get_template_directory_uri() . '/scripts/frontend/jquery-scrolltofixed.js', '', '', true);\n \t\t\twp_enqueue_script('jquery.nicescroll_js', get_template_directory_uri() . '/scripts/frontend/jquery.nicescroll.js', '0', '', true);\n\t\t\twp_enqueue_script('jquery.nicescrollpjus_js', get_template_directory_uri() . '/scripts/frontend/jquery.nicescroll.plus.js', '0', '', true);\n\t\t\twp_enqueue_script('functions_js', get_template_directory_uri() . '/scripts/frontend/functions.js', '0', '', true);\n \t\t\tif ( $cs_theme_option['style_rtl'] == \"on\"){\n\t\t\t\twp_enqueue_style('rtl_css', get_template_directory_uri() . '/css/rtl.css');\n \t\t\t}\n\t\t\tif \t($cs_theme_option['responsive'] == \"on\") {\n\t\t\t\techo '<meta name=\"viewport\" content=\"width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\">';\n\t\t\t\twp_enqueue_style('responsive_css', get_template_directory_uri() . '/css/responsive.css');\n\t\t\t}\n }\n}", "public function enqueue_scripts() {\n\t\t// wp_enqueue_style( 'simple-grams', plugins_url( '/assets/css/simple-grams.css', __FILE__ ) );\n\t}", "public function frontend_styles_scripts()\n {\n // GF Chosen\n wp_enqueue_script('gform_chosen');\n\n // Frontend css\n wp_enqueue_style('ga_appointments_calendar_css', plugins_url('assets/calendar.css', __FILE__), false, $this->assets_ver);\n\n // Schedule css\n wp_enqueue_style('ga_appointments_schedule_css', plugins_url('assets/schedule.css', __FILE__), false, $this->assets_ver);\n\n // Frontend grid css\n wp_enqueue_style('ga_appointments_calendar_css_grid', plugins_url('assets/grid.css', __FILE__), false, $this->assets_ver);\n\n // WP Dashicons\n wp_enqueue_style('dashicons');\n\n // Font awesome\n wp_enqueue_style('ga-font-awesome', plugins_url('assets/font-awesome.min.css', __FILE__), false, $this->assets_ver);\n\n // Main javascipt file\n wp_enqueue_script('ga_appointments_calendar_script', plugins_url('assets/main.js', __FILE__), false, $this->assets_ver, true);\n\n // Schedule scripts\n wp_enqueue_script('ga_appointments_schedule_script', plugins_url('assets/schedule.js', __FILE__), false, $this->assets_ver, true);\n\n // AJAX: Services\n wp_localize_script('ga_appointments_calendar_script', 'ga_calendar_services_obj', array('ajax_url' => admin_url('admin-ajax.php'))); // ga_calendar_services_obj = for ajax reference\n\n // AJAX: Providers\n wp_localize_script('ga_appointments_calendar_script', 'ga_calendar_providers_obj', array('ajax_url' => admin_url('admin-ajax.php'))); // ga_calendar_services_obj = for ajax reference\n\n // AJAX: Next Month\n wp_localize_script('ga_appointments_calendar_script', 'ga_calendar_next_month_obj', array('ajax_url' => admin_url('admin-ajax.php'))); // ga_calendar_next_month_obj = for ajax reference\n\n // AJAX: Prev Month\n wp_localize_script('ga_appointments_calendar_script', 'ga_calendar_prev_month_obj', array('ajax_url' => admin_url('admin-ajax.php'))); // ga_calendar_prev_month_obj = for ajax reference\n\n // AJAX: Time Slots\n wp_localize_script('ga_appointments_calendar_script', 'ga_calendar_time_slots_obj', array('ajax_url' => admin_url('admin-ajax.php'))); // ga_calendar_time_slots_obj = for ajax reference\n\n // AJAX: Update Schedule\n wp_localize_script('ga_appointments_schedule_script', 'ga_calendar_schedule_obj', array('ajax_url' => admin_url('admin-ajax.php'))); // ga_calendar_time_slots_obj = for ajax reference\n\n // AJAX: Cancel/Update Appointment\n wp_localize_script('ga_appointments_calendar_script', 'ga_update_appointment_status_obj', array('ajax_url' => admin_url('admin-ajax.php'))); // bb_appointments_calendar_obj = for ajax reference\n\n //AJAX : Get calendar\n wp_localize_script('ga_appointments_calendar_script', 'ga_get_calendar_obj', array('ajax_url' => admin_url('admin-ajax.php')));\n\n\t //For user ajax set appointment status to pending\n\t wp_localize_script('ga_appointments_calendar_script', 'ga_user_set_appointment_pending_obj', array('ajax_url' => admin_url('admin-ajax.php')) );\n }", "function enqueue_script() {\n\t\twp_enqueue_script( 'aztec-vendors-script', get_stylesheet_directory_uri() . '/assets/vendor.js', [], false, true );\n\t\twp_enqueue_script( 'aztec-script', get_stylesheet_directory_uri() . '/assets/app.js', [ 'aztec-vendors-script', 'jquery' ], false, true );\n\t}", "function put_in_queue() {\n wp_enqueue_script('reviewsjs', plugins_url('/assets/js/reviews.js', __FILE__));\n wp_enqueue_style('reviewscss', plugins_url('/assets/css/reviews.css', __FILE__));\n }", "protected function enqueue_scripts()\n {\n wp_enqueue_style('tify_control-text_remaining');\n wp_enqueue_script('tify_control-text_remaining');\n }", "public function enqueue_dependencies () {\n\t\tif (!Upfront_Permissions::current(Upfront_Permissions::BOOT)) wp_die(\"Nope.\");\n\n\t\tif (!class_exists('Thx_Sanitize')) require_once (dirname(__FILE__) . '/class_thx_sanitize.php');\n\t\tif (!class_exists('Thx_Template')) require_once (dirname(__FILE__) . '/class_thx_template.php');\n\n\t\tif (!class_exists('Upfront_Thx_Builder_VirtualPage')) require_once (dirname(__FILE__) . '/class_thx_endpoint.php');\n\n\t\t$tpl = Thx_Template::plugin();\n\n\t\twp_enqueue_style('create_edit', $tpl->url('css/create_edit.css'));\n\n\t\twp_enqueue_script('create_edit', $tpl->url('js/create_edit.js'), array('jquery'));\n\t\twp_localize_script('create_edit', '_thx', array(\n\t\t\t'editor_base' => esc_url(Upfront_Thx_Builder_VirtualPage::get_url(\n\t\t\t\tUpfront_Thx_Builder_VirtualPage::get_initial_url()\n\t\t\t)),\n\t\t\t'action_slug' => Upfront_Thx_Builder_VirtualPage::get_initial_url(),\n\t\t\t'admin_ajax' => admin_url('admin-ajax.php'),\n\t\t\t'l10n' => array(\n\t\t\t\t'oops' => __('Oops, something went wrong with processing your request.', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'start_building' => __('Start Building', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'checking' => __('Checking...', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'creating' => __('Creating...', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'select_media' => __('Select or Upload Media Of Your Chosen Persuasion', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'use_media' => __('Use this media', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'loading' => __('Loading data...', UpfrontThemeExporter::DOMAIN),\n\t\t\t),\n\t\t));\n\n\t\twp_enqueue_media();\n\t}", "function dw_schemas_add_assets() {\n\twp_enqueue_script('schemas-admin-js', '/wp-content/plugins/dw_schemas/assets/scripts.js');\n\twp_enqueue_style('schemas-admin-css', '/wp-content/plugins/dw_schemas/assets/styles.css');\n}", "public function add_scripts() {\n\t\twp_enqueue_script(\n\t\t\t'heweb17',\n\t\t\tplugins_url( '/js/heweb17.js', __FILE__ ),\n\t\t\tarray( 'jquery' ) );\t}", "public static function enqueue_scripts() {\n\t\tif ( ! static::$enqueued && wp_script_is( 'cmb2-scripts', 'enqueued' ) ) {\n\t\t\twp_enqueue_script( 'wplibs-form' );\n\t\t\tstatic::$enqueued = true;\n\t\t}\n\t}" ]
[ "0.8006631", "0.7866203", "0.7793787", "0.77679837", "0.77676374", "0.7759996", "0.77485263", "0.76859105", "0.76721853", "0.76600295", "0.7640692", "0.76287746", "0.76024413", "0.7602393", "0.75960195", "0.75951225", "0.75951225", "0.75780964", "0.75678325", "0.75623316", "0.750899", "0.7490649", "0.74872583", "0.74851304", "0.7463925", "0.745037", "0.74456525", "0.74427724", "0.74422467", "0.7440674", "0.74404854", "0.743562", "0.7430099", "0.74278456", "0.7419801", "0.7418559", "0.74174243", "0.74092704", "0.7398639", "0.7383917", "0.73723567", "0.7368706", "0.73628676", "0.7351914", "0.73519087", "0.7347956", "0.7346951", "0.73402405", "0.73398596", "0.7338243", "0.7317421", "0.73169523", "0.731591", "0.73123646", "0.73103297", "0.7306984", "0.73003805", "0.72969323", "0.7296042", "0.7292504", "0.7289731", "0.7289696", "0.7287509", "0.72850186", "0.72831744", "0.72784805", "0.7278075", "0.72742295", "0.7271414", "0.72649693", "0.7258282", "0.7249329", "0.7245176", "0.72428083", "0.7242275", "0.7241965", "0.72415715", "0.72373664", "0.72352767", "0.7234278", "0.7224415", "0.72241783", "0.72158694", "0.7215663", "0.721405", "0.720855", "0.72058237", "0.72014904", "0.7197695", "0.71942353", "0.71922064", "0.71799076", "0.717725", "0.7172338", "0.7171629", "0.71636707", "0.7160708", "0.71578676", "0.71533775", "0.7153253" ]
0.728005
65
Checks whether or not tota11y is set to load.
public function can_load_tota11y() { // If already defined, get out of here. if ( isset( $this->can_load_tools['tota11y'] ) ) { return $this->can_load_tools['tota11y']; } // Get enabled tools. $enabled_tools = $this->get_enabled_tools(); // If tota11y isn't enabled... if ( empty( $enabled_tools ) || ! in_array( 'tota11y', $enabled_tools ) ) { return $this->can_load_tools['tota11y'] = false; } // Get tota11y settings. $settings = $this->get_settings( 'tota11y' ); // By default, only load tota11y if the user is logged in. $load_tota11y = is_user_logged_in(); // If we're still passing tests, are we supposed to load tota11y in the admin? if ( $load_tota11y && is_admin() ) { $load_tota11y = isset( $settings['load_in_admin'] ) && $settings['load_in_admin'] > 0; } // If we're still passing tests, keep checking. if ( $load_tota11y ) { // If a set user role, then load tota11y. if ( ! empty( $settings['load_user_roles'] ) ) { $load_tota11y = $this->is_user_in_user_roles( $settings['load_user_roles'] ); } // If user capability is set, turn off if not capable. if ( ! empty( $settings['load_user_capability'] ) ) { $load_tota11y = current_user_can( $settings['load_user_capability'] ); } } // Filter whether or not to load tota11y - passes the tota11y settings. return $this->can_load_tools['tota11y'] = apply_filters( 'wa11y_load_tota11y', $load_tota11y, $settings ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isSetup(){\n \treturn isset($GLOBALS['setup']);\n }", "static function wpl_toolskit_ot_active() {\n\t\t//if ( is_plugin_active( 'option-tree/ot-loader.php' ) ) {\n\t\t\treturn true;\n\t\t//}\n\t}", "private function should_load() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$theme_support = get_theme_support( 'themeisle-demo-import' );\n\n\t\tif ( empty( $theme_support ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "protected function isSuhosinLoadedAndActive() {}", "public function checkIfCanLoad()\r\n\t{\r\n\t\treturn true;\r\n\t}", "function sanityCheck() {\n $_app = new ITechTable(SyncCompare::getDesktopConnectionParams('location',$this->desktopFilePath));\n $tiers = $_app->getAdapter()->query('SELECT COUNT(DISTINCT tier) as \"cnt\" FROM location');\n $rows = $tiers->fetchAll();\n $settings = System::getAll();\n $city_tier = 2 + $settings['display_region_i'] + $settings['display_region_h'] + $settings['display_region_g'] + $settings['display_region_f'] + $settings['display_region_e'] + $settings['display_region_d'] + $settings['display_region_c'] + $settings['display_region_b'];\n if ( $rows[0]['cnt'] != $city_tier) {\n //return 'Could not import data: Offline database contains '.$rows[0]['cnt'].' regional levels, while the web database contains '.$city_tier.'.';\n }\n \n return false;\n }", "function load_thermal_hardware() {\n\t$thermal_hardware_modules = array('coretemp', 'amdtemp');\n\t$thermal_hardware = config_get_path('system/thermal_hardware');\n\n\tif (!in_array($thermal_hardware, $thermal_hardware_modules)) {\n\t\treturn false;\n\t}\n\n\tif (!empty($thermal_hardware) && !is_module_loaded($thermal_hardware)) {\n\t\tlog_error(sprintf(gettext(\"Loading %s thermal monitor module.\"), $thermal_hardware));\n\t\tmute_kernel_msgs();\n\t\tmwexec(\"/sbin/kldload {$thermal_hardware}\");\n\t\tunmute_kernel_msgs();\n\t}\n}", "public function isThreatMetrixActive()\r\n {\r\n $enabled = Mage::getStoreConfig('payment/threat_metrix/active');\r\n return $enabled;\r\n }", "protected function useTimemachine() : bool {\r\n if($this->useTimemachineState === null) {\r\n $this->useTimemachineState = ($this instanceof \\codename\\core\\model\\timemachineInterface) && $this->isTimemachineEnabled();\r\n }\r\n return $this->useTimemachineState;\r\n }", "public function isAvailable() {\n return (function_exists('apc_fetch') || function_exists('apcu_fetch')) &&\n ini_get('apc.enabled') &&\n (ini_get('apc.enable_cli') || php_sapi_name() != 'cli');\n }", "protected function should_load_feature() {\n\t\tif ( ! defined( 'ELEMENTOR_VERSION' ) ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function isTablet () : bool {\n\t}", "public function hasTiers()\n {\n return (count($this->arrTiers) > 1);\n }", "function should_load() {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\n\t\treturn is_plugin_active( 'revslider/revslider.php' );\n\t}", "public function hasTiers()\n {\n return (\\count($this->arrTiers) > 1);\n }", "function is_system_configured() {\n global $CFG;\n return (!empty($CFG->ombielalertsserverendpoint) && \n !empty($CFG->ombielalertsserversserverusername) && \n !empty($CFG->ombielalertsserverpassword) && \n !empty($CFG->ombielalertsorgcode) && \n !empty($CFG->ombielalertsorgpassword)\n );\n }", "function fa_is_wptouch_installed(){\n\t$installed = class_exists('WPtouchPlugin') || class_exists('WPtouchPro');\n\treturn $installed;\n}", "public function isSetup()\n\t{\n\t\treturn $this->fileExists($this->rocketeer->getFolder('current'));\n\t}", "protected function shouldRun()\n {\n return false === (bool) $this->configurationManager->getConfigurationValueByPath('FE/pageUnavailable_force');\n }", "function is_available() {\n global $CFG;\n\n //we need the curriculum directory\n if (!file_exists($CFG->dirroot.'/curriculum/config.php')) {\n return false;\n }\n\n //we also need the curr_admin block\n if (!record_exists('block', 'name', 'curr_admin')) {\n return false;\n }\n\n //everything needed is present\n return true;\n }", "public function is_available() {\n\t\tif ( 'yes' === $this->enabled ) {\n\t\t\tif ( ! $this->testmode && is_checkout() ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif ( ! $this->secret_key || ! $this->publishable_key ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isReadyToUse()\n {\n return true;\n }", "public function isOnlineFromTablet()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif ( !$this->isOnline() ) return FALSE;\n\t\n\t\t\treturn ( $this->__deviceDetector( $this->sessionData['browser'] ) === 'TABLET' );\n\t\t}\n\t\tcatch ( \\RuntimeException $e )\n\t\t{\n\t\t\tif ( method_exists( get_parent_class(), __FUNCTION__ ) )\n\t\t\t{\n\t\t\t\treturn call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}\n\t}", "private static function _is_loadable()\n\t{\n\t\t$allowed_in_admin = apply_filters('bwp_minify_allowed_in_admin', false);\n\n\t\tif (is_admin() && !$allowed_in_admin)\n\t\t\treturn false;\n\n\t\tif (!did_action('template_redirect'))\n\t\t\treturn true;\n\n\t\t// ignore Geomashup\n\t\tif (!empty($_GET['geo_mashup_content'])\n\t\t\t&& 'render-map' == $_GET['geo_mashup_content'])\n\t\t\treturn false;\n\n\t\t// ignore AEC (Ajax Edit Comment)\n\t\tif (!empty($_GET['aec_page']))\n\t\t\treturn false;\n\n\t\t// ignore Simple:Press forum plugin\n\t\tif (defined('SPVERSION') && function_exists('sp_get_option'))\n\t\t{\n\t\t\t$sp_page = sp_get_option('sfpage');\n\t\t\tif (is_page($sp_page))\n\t\t\t\treturn false;\n\t\t}\n\n\t\t// @since 1.3.1 ignore Maintenance plugin\n\t\tif (bwp_is_maintenance_on())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isSetupRequired()\n {\n $methodCodes = Mage::getConfig()->getNode('global/payment/setup_required')->asArray();\n if (is_array($methodCodes) && count($methodCodes) > 0) {\n foreach (array_keys($methodCodes) as $methodCode) {\n $methodModel = Mage::getConfig()->getNode('default/payment/' . (string) $methodCode . '/model');\n if ($methodModel) {\n $model = Mage::getModel($methodModel);\n if ($model && method_exists($model, 'isAvailable') && $model->isAvailable()) {\n return true;\n }\n }\n }\n }\n\n return false;\n }", "public function isInitializeNeeded()\n {\n return true;\n }", "public function hasKt(){\n return $this->_has(11);\n }", "public function hasTowerinfo(){\n return $this->_has(1);\n }", "protected static function isInstallToolSession() {}", "public static function hasTestNow(): bool\n {\n return static::$testNow !== null;\n }", "public function hasPilotTestingAccounts()\n {\n foreach ($this->order_configurations as $config) {\n if ($config->configuration & 16384) {\n return true;\n }\n }\n return false;\n }", "private function _isEnvisSet(){\n\t\t/* Variable initialization */\n\t\t$blnIsSet\t= true;\n\t\t\n\t\t/* if setup configuration is not done then then do needful */\n\t\tif($this->getEnvSetupConfigured() == 0){\n\t\t\t/* value overriding */\n\t\t\t$blnIsSet\t= false;\n\t\t}\n\t\t\n\t\t/* Redirect to set-up module */\n\t\tif((!$blnIsSet) && ($this->uri->segment(1) != 'settings' && $this->uri->segment(1) != 'mod' && $this->uri->segment(1) != 'manage_widgets' && $this->uri->segment(1) != 'manage-widgets' && $this->uri->segment(1) != 'social_wall' && $this->uri->segment(1) != 'social-wall')){\n\t\t\t/* redirecting to login */\n\t\t\tredirect(SITE_URL.'settings/setup');\n\t\t}\n\t}", "public static function is_available()\n {\n }", "public static function checkInstallToolEnableFile() {}", "protected function shouldActivatePack(): bool\n {\n // If at least an account is not in trial, pack should be activated.\n return !!$this->accounts->first(fn (AccountContract $account) => !$account->getChargebee()->isTrial());\n }", "private function _load_agent_file()\n {\n if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php'))\n {\n include(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php');\n }\n else if (is_file(APPPATH.'config/user_agents.php'))\n {\n include(APPPATH.'config/user_agents.php');\n }\n else\n {\n return FALSE;\n }\n\n if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mdi/mdi_user_agents.php'))\n {\n include(APPPATH.'config/'.ENVIRONMENT.'/mdi/mdi_user_agents.php');\n }\n else if (is_file(APPPATH.'config/mdi/mdi_user_agents.php'))\n {\n include(APPPATH.'config/mdi/mdi_user_agents.php');\n }\n else\n {\n return FALSE;\n }\n\n\n $return = FALSE;\n\n if (isset($platforms))\n {\n $this->platforms = $platforms;\n unset($platforms);\n $return = TRUE;\n }\n\n if (isset($browsers))\n {\n $this->browsers = $browsers;\n unset($browsers);\n $return = TRUE;\n }\n\n if (isset($mobiles))\n {\n $this->mobiles = $mobiles;\n unset($mobiles);\n $return = TRUE;\n }\n\n if (isset($robots))\n {\n $this->robots = $robots;\n unset($robots);\n $return = TRUE;\n }\n\n if (isset($mobile_apps))\n {\n $this->mobile_apps = $mobile_apps;\n\n if (isset($this->mobiles)) {\n $this->mobiles = $mobile_apps + $this->mobiles;\n }\n\n unset($mobile_apps);\n $return = TRUE;\n }\n\n return $return;\n }", "protected function is_types_active() {\n\t\treturn class_exists( 'Types_Main' );\n\t}", "function is_tablet()\n {\n return dev::isTablet();\n }", "public function openTA()\n {\n $this->TA = simplexml_load_file($this->path.self::TA);\n \n return $this->TA == false ? false : true;\n }", "public function openTA()\n {\n $this->TA = simplexml_load_file($this->path.self::TA);\n \n return $this->TA == false ? false : true;\n }", "public static function isLoaded(): bool\n {\n return !!static::$loaded;\n }", "function is_initialized()\n {\n // Load libraries and grab status information\n //-------------------------------------------\n\n try {\n $this->load->library('certificate_manager/SSL');\n\n $system_cert_exists = $this->ssl->exists_system_certificate();\n $ca_exists = $this->ssl->exists_certificate_authority();\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return FALSE;\n }\n\n if ($ca_exists && $system_cert_exists)\n return TRUE;\n else\n return FALSE;\n }", "private function should_load() {\n\t\treturn class_exists( 'WooCommerce', false );\n\t}", "public function isUsedInAssessments(){\n return ($this->assessments == 1);\n }", "protected function checkInstallToolPasswordNotSet() {}", "public function checkGlobalActive() {\r\n\t\tif (Mage::getStoreConfig('b2bprofessional/generalsettings/active') == 1) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function is_set_up(): bool {\n return true;\n }", "public function isUseful() {\n\t\tif(!$this->isApache()) return false;\n\t\t$f = '.htaccess';\n\t\t$paths = $this->wire('config')->paths;\n\t\t$assets = $paths->assets;\n\t\tif(!file_exists($assets . $f)) return true;\n\t\tif(!file_exists($assets . \"logs/$f\")) return true;\n\t\tif(!file_exists($assets . \"cache/$f\")) return true;\n\t\tif(!file_exists($assets . \"backups/$f\")) return true;\n\t\tif(!file_exists($paths->templates . $f)) return true;\n\t\tif(!file_exists($paths->site . $f)) return true;\n\t\tif(!file_exists($paths->site . \"modules/$f\")) return true;\n\t\treturn false;\n\t}", "public function allow_load() {\n\n\t\tif ( ! is_admin() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! current_user_can( 'install_languages' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\trequire_once ABSPATH . 'wp-admin/includes/template.php';\n\t\trequire_once ABSPATH . 'wp-admin/includes/file.php';\n\t\trequire_once ABSPATH . 'wp-admin/includes/translation-install.php';\n\n\t\treturn wp_can_install_language_pack();\n\t}", "private static function _isTwigTweakEnabled() {\n $module = 'twig_tweak';\n $output = trim(shell_exec('drush pml --field=\"status\" --filter=\"' . $module . '\"'));\n if ($output == 'Enabled') {\n return TRUE;\n }\n return FALSE;\n }", "public function checkIfEssentialConfigurationExists() {}", "public function is_troubleshooting() {\n\t\t// Check if a session cookie to disable plugins has been set.\n\t\tif ( isset( $_COOKIE['wp-health-check-disable-plugins'] ) ) {\n\t\t\t$_GET['health-check-disable-plugin-hash'] = $_COOKIE['wp-health-check-disable-plugins'] . md5( $_SERVER['REMOTE_ADDR'] );\n\t\t}\n\n\t\t// If the disable hash isn't set, no need to interact with things.\n\t\tif ( ! isset( $_GET['health-check-disable-plugin-hash'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( empty( $this->disable_hash ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the plugin hash is not valid, we also break out\n\t\tif ( $this->disable_hash !== $_GET['health-check-disable-plugin-hash'] ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isAvailable() {\n $path = $this->path();\n return file_exists($path);\n }", "public static function isApcuEnabled(): bool\n {\n return extension_loaded('apcu') && (int)ini_get('apc.enabled') === 1;\n }", "public function isTestMode() {\n\t\treturn (bool) $this->app->store->get()->params->get('anet.test_mode');\n\t}", "public static function StagCatalog_active_check() {\n\n if ( ! self::$active_plugins ) {\n self::init();\n }\n\n return in_array( 'stag-catalog/stag-catalog.php', self::$active_plugins ) || array_key_exists( 'stag-catalog/stag-catalog.php', self::$active_plugins );\n }", "public function is_init(){\n\t\tglobal $_wt_options;\n\t\tif($this->user_key || !empty($this->user_key) && $this->app_key || !empty($this->app_key)) return 1;\n\t\treturn 0;\n\t}", "public function effectively_installed()\n {\n return isset($this->config['oxcom_phpbbch_format_only']);\n }", "public function should_load_shim() {\n\n\t\t$should_load = get_option( 'hestia_load_shim' );\n\n\t\tif ( ! empty( $should_load ) ) {\n\t\t\treturn $should_load === 'yes';\n\t\t}\n\n\t\t$is_switch_theme = current_filter() === 'after_switch_theme';\n\t\t$slug = $this->get_theme_slug( $is_switch_theme );\n\t\t$key = str_replace( '-', '_', strtolower( trim( $slug ) ) );\n\t\t$theme_install_time = get_option( $key . '_install' );\n\t\t$current_time = time();\n\t\tif ( empty( $current_time ) || empty( $theme_install_time ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ( $current_time - $theme_install_time ) > 60 ) {\n\t\t\tupdate_option( 'hestia_load_shim', 'yes' );\n\t\t\treturn true;\n\t\t}\n\n\t\tupdate_option( 'hestia_load_shim', 'no' );\n\t\treturn false;\n\t}", "static function isLoaded() {\n return Ak::getStaticVar('CurrentUser') != null;\n }", "function has_altis_config() : bool {\n\tif ( ! function_exists( 'Altis\\\\get_config' ) ) {\n\t\treturn false;\n\t}\n\n\tif ( ! isset( Altis\\get_config()['hm-juicer'] ) ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "function is_robot()\n {\n return dev::isRobot();\n }", "function tidypics_is_upgrade_available() {\n\t// sets $version based on code\n\trequire_once elgg_get_plugins_path() . \"tidypics/version.php\";\n\n\t$local_version = elgg_get_plugin_setting('version', 'tidypics');\n\tif ($local_version === false) {\n\t\t// no version set so either new install or really old one\n\t\tif (!get_subtype_class('object', 'image') || !get_subtype_class('object', 'album')) {\n\t\t\t$local_version = 0;\n\t\t} else {\n\t\t\t// set initial version for new install\n\t\t\telgg_set_plugin_setting('version', $version, 'tidypics');\n\t\t\t$local_version = $version;\n\t\t}\n\t} elseif ($local_version === '1.62') {\n\t\t// special work around to handle old upgrade system\n\t\t$local_version = 2010010101;\n\t\telgg_set_plugin_setting('version', $local_version, 'tidypics');\n\t}\n\n\tif ($local_version == $version) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "private function is_safe_environment(): bool {\n\t\treturn in_array( $this->environment(), [ 'development', 'local' ], true );\n\t}", "protected function isTableAvailable($table) {\n\t\t\t$tables = $this->database->admin_get_tables();\n\t\t\treturn array_key_exists($table, $tables);\n\t}", "public function isForceLoad()\n {\n return (bool) $this->bForceLoad;\n }", "private static function check_config ()\n\t{\n\t\t// load config file here\n\t\tif (count(self::$_config) == 0)\n\t\t{\n\t\t\tself::LoadConfigFile();\n\t\t}\n\t}", "public function oldTaxTableExists() {\n \n static $alreadyChecked = false;\n static $tableExists = false; // remember result of check if already done (prevents multiple checks per script execution)\n \n if ($alreadyChecked == false) {\n $tableExists = tx_pttools_div::dbTableExists($this->getTableName('STEUER'), $this->gsaDbObj);\n $alreadyChecked = true;\n }\n \n return $tableExists; \n \n }", "function hasVAT( )\n {\n if ( $this->HasTax == 1 )\n return true;\n else\n return false;\n }", "private static function is_test_name_ok( $test_name ) {\n if (\n\t\t$test_name === self::CPU\n || $test_name === self::DB\n || $test_name === self::DISK\n\t ) {\n\t\treturn true;\n\t } else {\n\t\treturn false;\n\t }\n\t}", "private function isApiAvailable() {\n\t\treturn get_option(\"wp_broadbean_ipavailibility\") == 1;\n\t}", "public function hasAccountsWaitingInitialization()\n {\n return $this->accounts_waiting_initialization !== null;\n }", "public function hasLoadModule(){\n return $this->_has(6);\n }", "public function needs_installing() {\n\t\t$settings = red_get_options();\n\n\t\tif ( $settings['database'] === '' && $this->get_old_version() === false ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "abstract protected function checkInitialization();", "function check_requirements()\n\t{\n\t\tif (!$this->obj_customer->verify_id())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested customer (\". $this->obj_customer->id .\") does not exist - possibly the customer has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\t// ensure that the portal module is enabled\n\t\tif (sql_get_singlevalue(\"SELECT value FROM config WHERE name='MODULE_CUSTOMER_PORTAL' LIMIT 1\") != \"enabled\")\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"MODULE_CUSTOMER_PORTAL is disabled, enable it if you wish to adjust customer portal configuration options.\");\n\t\t\treturn 0;\n\t\t}\n\n\n\t\treturn 1;\n\t}", "private function needsRestart()\n {\n if (PHP_SAPI !== 'cli' || !defined('PHP_BINARY')) {\n return false;\n }\n\n return !getenv(self::ENV_ALLOW) && $this->loaded;\n }", "public function hasTrophies(): bool\n {\n $value = $this->pluck('definedTrophies');\n\n return isset($value) && !empty($value);\n }", "public function is_monstroid_installed() {\n\t\t\t$theme = wp_get_theme('monstroid');\n\t\t\treturn $theme->exists();\n\t\t}", "public function hasInitBu()\n {\n return $this->get(self::INIT_BU) !== null;\n }", "public function check( $path = null ) {\n\t\t//we can reuse wordpress function here.\n\t\tif ( is_null( $path ) ) {\n\t\t\t$path = WD_Utils::retrieve_wp_config_path();\n\t\t}\n\t\t$is_debug_on = $this->is_debug_on( $path );\n\t\tif ( $is_debug_on === false ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$is_display_on = $this->is_display_on( $path );\n\t\tif ( $is_display_on === 0 ) {\n\t\t\t//debug is one, but the display defined & turn off\n\t\t\treturn true;\n\t\t}\n\n\t\t//if till here, mean the display defined and on, or doesn't\n\t\treturn false;\n\t}", "public function check_availability() {\n \n if ( ( $this->client_id != '' ) AND ( $this->client_secret != '' ) ) {\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n }", "private function islibraryLoaded(): bool\n {\n if (!extension_loaded('gd') && !extension_loaded('gd2')) {\n return false;\n }\n\n return true;\n }", "public static function isAvailable()\n\t{\n\t\treturn true;\n\t}", "public function checkSetup()\n {\n if ($this->itemType == \"\") {\n die(\"No itemType provided!\");\n }\n if ($this->classPathBase == \"\") {\n die(\"No classPathBase provided!\");\n }\n if ($this->listView == \"\" && empty($this->listNames)) {\n die(\"Provide either a list view OR fields!\");\n }\n if ($this->createView == \"\" && empty($this->editSettings)) {\n die(\"No create view OR editSettings provided!\");\n }\n\n if (! empty($this->editSettings)) {\n $fields = ['label','type'];\n foreach ($this->editSettings as $key => $es) {\n foreach ($fields as $f) {\n if (empty($es[$f])) {\n die(\"An edit parameter - {$f} - is missing or blank in your config for \\\"{$key}\\\".\");\n }\n }\n }\n }\n }", "public function is_available() {\n if ($this->enabled == \"yes\") {\n if (!is_ssl() && !$this->testmode) {\n return false;\n }\n // Required fields check\n if (!$this->secret_key || !$this->publishable_key) {\n return false;\n }\n return true;\n }\n return false;\n }", "public function isUsed()\n\t{\n\t\treturn $this->data && $this->data['forms_attempts'] > 0;\n\t}", "function is_tiered_allowed( $package = [] ) {\n $availability = $this->get_option( 'availability' );\n $user_country = $package['destination']['country'];\n $countries = $this->get_option( 'countries' );\n\n switch ( $availability ) {\n // Plugin availability is set to all countries.\n case 'all':\n return true;\n break;\n\n case 'specific':\n $in_allowed_country = false;\n\n for ( $i=0; $i<sizeof( $countries ); $i++ ) {\n if ( $user_country == $countries[$i] ) {\n $in_allowed_country = true;\n break;\n }\n }\n\n return $in_allowed_country;\n break;\n\n case 'except':\n $in_allowed_country = true;\n\n for ( $i=0; $i<sizeof( $countries ); $i++ ) {\n if ( $user_country == $countries[$i] ) {\n $in_allowed_country = false;\n break;\n }\n }\n\n return $in_allowed_country;\n }\n }", "public function checkInstalled() {\n $query = $this->db->query(sprintf('SHOW TABLES LIKE \"%s\"',\n Config::getTableName('requests')));\n $request_table_result = $query->rowCount();\n\n $query = $this->db->query(sprintf('SHOW TABLES LIKE \"%s\"',\n Config::getTableName('users')));\n $user_table_result = $query->rowCount();\n\n if ($request_table_result > 0 || $user_table_result > 0) {\n return true;\n } else {\n return false;\n }\n }", "public function canBoot(): bool;", "function test_externTM() \n{\n\tglobal $config;\n\t\n\treturn (@file_get_contents($config['externTM_url']) != '');\n}", "public function isTestMode()\n {\n if (strpos($this->adyenMode, Environment::TEST) !== false) {\n return true;\n } else {\n return false;\n }\n }", "public function is_available() {\n\t\tif ( 'yes' !== $this->enabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->public_key || ! $this->private_key ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isTestmode()\n {\n return $this->getConfigDataFlag('test', $this->getStoreId());\n }", "public function check_debug_mode(): bool {\n\t\tif ( defined( 'YIKES_DEBUG_ENABLED' ) && true === YIKES_DEBUG_ENABLED ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static function check()\n\t\t{\n\t\t\tif(!($v = get_option(\"ws_plugin__s2member_activated_version\")) || !version_compare($v, WS_PLUGIN__S2MEMBER_VERSION, \">=\"))\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"version\");\n\n\t\t\telse if(is_multisite() && is_main_site() && (!($mms_v = get_option(\"ws_plugin__s2member_activated_mms_version\")) || !version_compare($mms_v, WS_PLUGIN__S2MEMBER_VERSION, \">=\")))\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"mms_version\");\n\n\t\t\telse if(!($l = (int)get_option(\"ws_plugin__s2member_activated_levels\")) || $l !== $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"levels\"])\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"levels\");\n\t\t}", "function check_sched_enabled() {\n\t\t$t = time();\n\t\tif (\n\t\t\t$this->get_sched()\n\t\t\t&& $t >= $this->get_sched_t_s()\n\t\t\t&& $t <= $this->get_sched_t_e()\n\t\t) {\n\t\t\t// Scheduling active -> enable.\n\t\t\t$this->set_enabled(TRUE);\n\t\t\t$this->write();\n\t\t} else if ($this->get_sched()){\n\t\t\t// Scheduling inactive -> disable.\n\t\t\t$this->set_enabled(FALSE);\n\t\t\t$this->write();\n\t\t}\n\t}", "private function canRun()\n {\n if (!$this->apiConfig->isAutoInvoiceEnabled()) {\n return false;\n }\n if (!$this->apiConfig->isEnabled()) {\n return false;\n }\n\n return true;\n }", "public function is_valid() {\n\t\tif ( empty( $this->active ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( empty( $this->type_def['valid'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( $this->trials <= 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public static function isClassLoadingInformationAvailable() {}" ]
[ "0.57944864", "0.5772671", "0.57016224", "0.56895", "0.5640449", "0.558092", "0.5553222", "0.54961634", "0.54422283", "0.5397632", "0.5386181", "0.5379183", "0.5367661", "0.53602475", "0.5350129", "0.53288245", "0.5320735", "0.5273342", "0.525969", "0.5233535", "0.5232316", "0.52238727", "0.5222405", "0.5220483", "0.52203286", "0.5215704", "0.52099526", "0.52031857", "0.51813847", "0.5172575", "0.5159212", "0.5158469", "0.51501215", "0.5146102", "0.5130562", "0.51234144", "0.5122675", "0.5117627", "0.5094302", "0.5094302", "0.50883144", "0.508324", "0.50769585", "0.50646406", "0.5040555", "0.50338566", "0.502325", "0.5019336", "0.50118405", "0.5009788", "0.5009697", "0.5008154", "0.5000722", "0.49992645", "0.49981108", "0.499162", "0.49906194", "0.4979259", "0.49765867", "0.49740854", "0.49719185", "0.49707034", "0.49663973", "0.4966207", "0.49541077", "0.49487862", "0.49478367", "0.49431866", "0.49344775", "0.4931569", "0.4930038", "0.49282628", "0.4927275", "0.49147516", "0.49092227", "0.49042162", "0.49035004", "0.48954386", "0.4894753", "0.48875722", "0.48873398", "0.488723", "0.48861352", "0.48840317", "0.4882818", "0.48812273", "0.4878869", "0.48745823", "0.48736557", "0.48735222", "0.48665693", "0.48655236", "0.486446", "0.48626903", "0.48596677", "0.48569906", "0.48564428", "0.4854064", "0.48532715", "0.48456052" ]
0.7989035
0
Checks whether or not WAVE is set to load.
public function can_load_wave() { // If already defined, get out of here. if ( isset( $this->can_load_tools['wave'] ) ) { return $this->can_load_tools['wave']; } // Get enabled tools. $enabled_tools = $this->get_enabled_tools(); // If WAVE isn't enabled... if ( ! in_array( 'wave', $enabled_tools ) ) { return $this->can_load_tools['wave'] = false; } // Get WAVE settings. $settings = $this->get_settings( 'wave' ); // By default, only load WAVE if the user is logged in. $load_wave = is_user_logged_in(); // Only for published posts. if ( 'publish' != get_post_status() ) { $load_wave = false; } // If we're still passing tests, keep checking. if ( $load_wave ) { // If a set user role, then load WAVE. if ( ! empty( $settings['load_user_roles'] ) ) { $load_wave = $this->is_user_in_user_roles( $settings['load_user_roles'] ); } // If user capability is set, turn off if not capable. if ( ! empty( $settings['load_user_capability'] ) ) { $load_wave = current_user_can( $settings['load_user_capability'] ); } } // Filter whether or not to load WAVE - passes the WAVE settings. return $this->can_load_tools['wave'] = apply_filters( 'wa11y_load_wave', $load_wave, $settings ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasAudio() {}", "public function isAudio()\r\n {\r\n $this->caseClosedOrFail();\r\n\r\n return false;\r\n }", "function is_recording()\n {\n return is_recording();\n }", "public function isAudio($ext=null){\n global $VALID_AUDIO;\n if (!$ext)\n $ext = $this->ext; \n return (in_array( $ext, $VALID_AUDIO )); \n }", "public function isMakingSamples(): bool;", "public function isAudio()\n {\n $mime_type = $this->getMimeType() ?: $this->detectMimeType();\n\n return (strpos($mime_type, 'audio') === 0);\n }", "function is_valid_audio_extension ($ext) {\n switch ($ext = strtolower($ext)) {\n //Sounds (HTML5 <audio> formats)\n case 'mp3':\n case 'ogg':\n case 'aac':\n case 'wav':\n case 'wave':\n return true;\n\n //Denied extension\n default:\n return false;\n }\n }", "public function isAudio() {\n\t\treturn MimeType::isAudio($this);\n\t}", "public function isThisYourUpload()\n\t{\n\t\treturn !($this->httpRequest->getHeader('user-agent') === 'Shockwave Flash');\n\t}", "public function hasInitBu()\n {\n return $this->get(self::INIT_BU) !== null;\n }", "private function isAudioRunning() {\n\t\t$x = shell_exec(\"screen -ls\");\n\t\tif (strpos($x, 'audiorun') == false) return false;\n\t\telse return true;\n\t}", "function dahz_attachment_is_audio( $post_id = 0 ) {\n\n\t$post_id = empty( $post_id ) ? get_the_ID() : $post_id;\n\t$mime_type = get_post_mime_type( $post_id );\n\n\tlist( $type, $subtype ) = false !== strpos( $mime_type, '/' ) ? explode( '/', $mime_type ) : array( $mime_type, '' );\n\n\treturn 'audio' === $type ? true : false;\n}", "public function test_asset_not_loading() {\n\n\t\t// Check that the items are not enquened before we start.\n\t\t$this->assertFalse( $this->are_batch_assets_enqueued() );\n\n\t\t// Call our loader class on the general options page.\n\t\t$this->load_admin_enqueue_hook( 'options-general.php' );\n\n\t\t// Check that our assets aren't enquened.\n\t\t$this->assertFalse( $this->are_batch_assets_enqueued() );\n\t}", "function check_file_is_audio( $tmp ) \n{\n $allowed = array(\n 'audio/mpeg', 'audio/x-mpeg', 'audio/mpeg3', 'audio/x-mpeg-3', 'audio/aiff', \n 'audio/mid', 'audio/x-aiff', 'audio/x-mpequrl','audio/midi', 'audio/x-mid', \n 'audio/x-midi','audio/wav','audio/x-wav','audio/xm','audio/x-aac','audio/basic',\n 'audio/flac','audio/mp4','audio/x-matroska','audio/ogg','audio/s3m','audio/x-ms-wax',\n 'audio/xm'\n );\n \n // check REAL MIME type\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\n $type = finfo_file($finfo, $tmp );\n finfo_close($finfo);\n \n // check to see if REAL MIME type is inside $allowed array\n if( in_array($type, $allowed) ) {\n return $type;\n } else {\n return false;\n }\n}", "public static function isSampled()\n {\n static::checkInit();\n return static::$sampled;\n }", "protected function checkType($type)\n {\n return $type === 'application/x-shockwave-flash' ||\n substr_compare($type, 'audio/', 0, 6) === 0;\n }", "public function getWave()\n {\n return $this->get(self::_WAVE);\n }", "public function hasW()\n {\n return isset($this->w);\n }", "public function hasW()\n {\n return isset($this->w);\n }", "public static function isLoaded(): bool\n {\n return !!static::$loaded;\n }", "private function _isWma($fileName)\n {\n if ($this->_isWmx($fileName, 'wma'))\n {\n $this->_detectedMime = \"audio/x-ms-wma\";\n return true;\n }\n }", "private function isLoad($file){\n\t\treturn in_array($file, $this->file, true);\n\t}", "public function hasSamples(){\n return $this->_has(1);\n }", "public function hasSamples(){\n return $this->_has(1);\n }", "public function hasDw()\n {\n return isset($this->dw);\n }", "public function hasDw()\n {\n return isset($this->dw);\n }", "public function isAudio(): bool\n {\n $originalUrl = mb_strtolower($this->getOriginalUrl(), 'utf-8');\n\n if (Str::endsWith($originalUrl, ['oga', 'mp3', 'wav'])) {\n return true;\n }\n\n if (Str::endsWith($originalUrl, 'ogg')) {\n return !Str::contains($this->getMime(), 'video');\n }\n\n return false;\n }", "public function checkIfCanLoad()\r\n\t{\r\n\t\treturn true;\r\n\t}", "public function isLoaded(): bool\n {\n return $this->options['load'] || in_array($this->getMethod(), [self::INLOAD, self::POSTLOAD], true);\n }", "public function isMandatorySave()\n\t{\n\t\treturn $_FILES ? true : false;\n\t}", "public function isMandatorySave()\n\t{\n\t\treturn $_FILES ? true : false;\n\t}", "function checkResource() {\n if (is_resource($this->_handler) && (get_resource_type($this->_handler) == 'stream')) {\n \treturn true;\n }\n return false;\n }", "protected function mustUseFullDataSample(): bool\n {\n return $this->getSampleSize() === 0;\n }", "function mixtape_qodef_load_woo_assets() {\n\t\treturn mixtape_qodef_is_woocommerce_installed() && (mixtape_qodef_is_woocommerce_page() ||\n\t\t\tmixtape_qodef_has_woocommerce_shortcode() || mixtape_qodef_has_woocommerce_widgets());\n\t}", "public function is_init(){\n\t\tglobal $_wt_options;\n\t\tif($this->user_key || !empty($this->user_key) && $this->app_key || !empty($this->app_key)) return 1;\n\t\treturn 0;\n\t}", "public function isWired(): bool\n {\n if ($this->loadDefaultWire) {\n $this->loadDefaultWire = false;\n\n $defaultWire = config('form-components.default_wire');\n\n if ($defaultWire !== false) {\n $this->wire = $defaultWire;\n }\n }\n\n return $this->wire !== false;\n }", "private function islibraryLoaded(): bool\n {\n if (!extension_loaded('gd') && !extension_loaded('gd2')) {\n return false;\n }\n\n return true;\n }", "public static function is_wma( $filename = null, $signature = null ) {\r\n\t\t\treturn self::is_wma( $filename, $signature );\r\n\t\t}", "protected function isSetup(){\n \treturn isset($GLOBALS['setup']);\n }", "public function isRawLoaded()\n {\n return $this->rawLoaded;\n }", "private function validWBMP(string $data): bool\n {\n return ord($data[0]) === 0 && ord($data[1]) === 0 && $data !== substr(TypeJp2::JPEG_2000_SIGNATURE, 0, self::LONG_SIZE);\n }", "protected function isLoaded(){\n\t\treturn $this->lodaed;\n\t}", "function dynamik_skins_check()\n{\n\tif( current_user_can( 'manage_options' ) )\n\t{\n\t\tif( !empty( $_GET['fct'] ) )\n\t\t{\n\t\t\tswitch( $_GET['fct'] )\n\t\t\t{\n\t\t\t\tcase 'delete_skin':\n\t\t\t\tdynamik_delete_skin();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'activate_skin':\n\t\t\t\tdynamik_activate_skin();\n\t\t\t\tbreak;\n\t\n\t\t\t\tcase 'restore_skin':\n\t\t\t\tdynamik_restore_skin();\n\t\t\t\tbreak;\n\t\n\t\t\t\tcase 'snapshot_skin':\n\t\t\t\tdynamik_snapshot_skin();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}", "public function isFlash()\n {\n return stripos($this->server['USER_AGENT'], 'Shockwave Flash') !== false;\n }", "public function isLoadedFromFile() : bool\n {\n return $this->fileExists;\n }", "public static function isLoaded();", "function audi()\n {\n if (substr($this->marka, 0, 4) === \"Audi\")\n {\n return true;\n }\n else \n {\n return false;\n }\n }", "public function validUpload() {\t\n\t\tif($this->file['error'] == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function is_embed()\n {\n }", "public function isForceLoad()\n {\n return (bool) $this->bForceLoad;\n }", "private function should_load() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$theme_support = get_theme_support( 'themeisle-demo-import' );\n\n\t\tif ( empty( $theme_support ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function check_for_conditional_font_loading() {\n\t\tforeach ( $this->fonts_list as $i => $font ) {\n\t\t\t// Check for conditional statements\n\t\t\tif ( isset( $font['options']['conditional_loading'] ) && ! $this->can_load_this_font( $font['options']['conditional_loading'] ) ) {\n\t\t\t\tunset( $this->fonts_list[ $i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set Checksum\n\t\t$this->checksum = md5( serialize( [ $this->font_sizes, $this->fonts_list ] ) );\n\t}", "public function exists(): bool\n {\n return ! empty($this->awb);\n }", "public function is_embed()\n {\n }", "function SERVICE_IS_RESAMPLABLE($file){\n\t\t\n\t\t// Ok, let's check the file extension and see if we can resample it\n\t\t//Now let's figure out the file type\n\t\t$extArr = explode(\".\",$file);\n\t\t$ext = $extArr[count($extArr)-1];\n\t\t\n\t\tswitch ($ext){\n\t\t\tcase \"mp3\":\n\t\t\tcase \"flac\":\n\t\t\tcase \"mpc\":\n\t\t\tcase \"wv\":\n\t\t\tcase \"ogg\":\n\t\t\tcase \"wav\":\n\t\t\tcase \"wma\":\n\t\t\tcase \"ra\":\n\t\t\tcase \"ram\":\n\t\t\tcase \"rm\":\n\t\t\tcase \"m4a\":\n\t\t\t return true;\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t return false;\n\t\t\tbreak;\n\t\t}\n\t}", "public function hasExtension()\n {\n \treturn ( $this->_extension !== '' );\n }", "protected function isMediaLoaded($locale, $group, $namespace) {\n\n\t\treturn isset($this->mediaLoaded[$namespace][$group][$locale]);\n\t}", "function wp_maybe_load_embeds()\n {\n }", "protected function assertLoaded()\n\t{\n\t\tif (!$this->hasLoaded) {\n\t\t\t$this->settings = $this->loadSettings();\n\n\t\t\t$this->hasLoaded = true;\n\t\t}\n\t}", "private function _check_media_type()\n\t{\n\t\t// Parse the GET param if we haven't yet.\n\t\tif (! isset($this->media_filter)) {\n\t\t\t$this->media_filter = array();\n\t\t\tif (isset($_GET['k']))\n\t\t\t{\n\t\t\t\t$this->media_filter = $_GET['k'];\n\t\t\t\tif (! is_array($this->media_filter))\n\t\t\t\t{\n\t\t\t\t\t$this->media_filter = explode(',',$this->media_filter);\n\t\t\t\t}\n\t\t\t\t// Keep only the \n\t\t\t\t$this->media_filter = array_intersect(array_keys(self::$media_values), $this->media_filter);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Return filters, if any\n\t\tif (count($this->media_filter) > 0)\n\t\t{\n\t\t\treturn $this->media_filter;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "public function isSetup()\n\t{\n\t\treturn $this->fileExists($this->rocketeer->getFolder('current'));\n\t}", "public function hasJustUploaded() {\n return $this->_has(8);\n }", "function should_load() {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\n\t\treturn is_plugin_active( 'revslider/revslider.php' );\n\t}", "public static function is_loading_fonts_async() {\n\t\treturn ! empty( get_option( static::ENABLE_ASYNC_FONTS_LOAD, 0 ) );\n\t}", "private function isResourceValid()\n {\n if (strpos($this->resourceToImport, 'www.freebase.com') === false)\n return false;\n\n return true;\n }", "private function isValidStaticTypeFile(): bool\n {\n return $this->oHttpRequest->getExists('t') &&\n in_array($this->oHttpRequest->get('t'), self::ASSET_FILES_ACCEPTED, true);\n }", "public function isLoaded();", "public function getIsFlash()\n {\n return isset($_SERVER['HTTP_USER_AGENT']) &&\n (stripos($_SERVER['HTTP_USER_AGENT'], 'Shockwave') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'Flash') !== false);\n }", "private function _isWmx($fileName, $type)\n {\n return strpos($this->_getFileType($fileName), 'Microsoft ASF') !== false\n && strcasecmp($this->_getFileSuffix(), $type) == 0;\n }", "public function hasSilencedf(){\r\n return $this->_has(27);\r\n }", "private function _validate_settings()\n\t{\n\n\t\treturn TRUE;\n\t}", "private static function _is_loadable()\n\t{\n\t\t$allowed_in_admin = apply_filters('bwp_minify_allowed_in_admin', false);\n\n\t\tif (is_admin() && !$allowed_in_admin)\n\t\t\treturn false;\n\n\t\tif (!did_action('template_redirect'))\n\t\t\treturn true;\n\n\t\t// ignore Geomashup\n\t\tif (!empty($_GET['geo_mashup_content'])\n\t\t\t&& 'render-map' == $_GET['geo_mashup_content'])\n\t\t\treturn false;\n\n\t\t// ignore AEC (Ajax Edit Comment)\n\t\tif (!empty($_GET['aec_page']))\n\t\t\treturn false;\n\n\t\t// ignore Simple:Press forum plugin\n\t\tif (defined('SPVERSION') && function_exists('sp_get_option'))\n\t\t{\n\t\t\t$sp_page = sp_get_option('sfpage');\n\t\t\tif (is_page($sp_page))\n\t\t\t\treturn false;\n\t\t}\n\n\t\t// @since 1.3.1 ignore Maintenance plugin\n\t\tif (bwp_is_maintenance_on())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isSafe()\n {\n return is_uploaded_file($this->tmp);\n }", "function check()\r\n\t{\r\n\t\tif (isset($_FILES) and !empty($_FILES)) {\r\n\t\t\tforeach ($_FILES as $f) {\r\n\t\t\t\tif ($f['name'] != '') {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function hasFileUpload()\n\t{\n\t\treturn stripos($this->server->get('CONTENT_TYPE'),'multipart/form-data')!==false;\n\t}", "public function need_media()\n\t{\n\t\treturn $this->need_media;\n\t}", "private function can_stop_init()\n {\n $action = (string) rcube_utils::get_input_value('_action', rcube_utils::INPUT_GET);\n\n return $action !== '' && \\stripos($action, 'plugin.') !== 0;\n }", "public function setWave($value)\n {\n return $this->set(self::_WAVE, $value);\n }", "public function hasWkt() {\r\n return $this->wkt !== null ? true : false;\r\n }", "function onload(){\n\t\treturn true;\n\t}", "protected function loadSettingsIfNotLoaded()\n {\n if ( !$this->loaded ) {\n $this->settings = $this->load();\n $this->loaded = true;\n }\n }", "static function areHandlerOptionsValid ()\n {\n // There is no option yet\n return true;\n }", "public function hasMaxMusic(){\n return $this->_has(15);\n }", "private function shouldLoadAnyType($what)\n {\n return $what == Constants::RESOURCES_TYPE_BOTH;\n }", "public function hasWxverifycodere()\n {\n return $this->get(self::WXVERIFYCODERE) !== null;\n }", "public function is_missing_required_data(){\n\t\tif ( ! $this->exists ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( ! $this->get_trigger() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( $this->data_layer()->is_missing_data() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "abstract protected function checkInitialization();", "public function issetUnitOfMeasure(): bool\n {\n return isset($this->unitOfMeasure);\n }", "public function checkConvertionComplete()\r\n\t{\r\n\t\treturn (!file_exists($this->referenceFile) || @filesize($this->referenceFile) == 0);\r\n\t}", "public function it_should_have_soundtrack()\n {\n $this->shouldHaveSoundtrack();\n }", "public function hasStopdf(){\r\n return $this->_has(23);\r\n }", "public static function isLoading()\n {\n $qualifiedName = static::getSingletonClass();\n\n return isset(static::$instances[ $qualifiedName ])\n && static::$instances[ $qualifiedName ] === true;\n }", "public static function is_skin_active() {\n if( ! empty( self::$skin_name ) && self::$skin_name != 'default' )\n return true;\n else\n return false;\n }", "private function should_load() {\n\t\treturn class_exists( 'WooCommerce', false );\n\t}", "function oncall_config_form_validate($form, &$form_state) {\n $validators = array(\n 'file_validate_extensions' => array('mp3'), \n );\n\n // Save the 'welcome' message as a temporary file.\n $welcome = file_save_upload('oncall_welcome', $validators);\n if ($welcome === FALSE) {\n form_set_error('oncall_welcome', t('Not able to save that file. Make sure your files directory is writeable and that the file is an MP3'));\n }\n elseif ($welcome !== NULL) {\n $form_state['values']['oncall_welcome'] = $welcome;\n }\n\n // Save the 'no status' message as a temporary file.\n $nostatus = file_save_upload('oncall_nostatus', $validators);\n if ($nostatus === FALSE) {\n form_set_error('oncall_nostatus', t('Not able to save that file. Make sure your files directory is writeable and that the file is an MP3'));\n }\n elseif ($nostatus !== NULL) {\n $form_state['values']['oncall_nostatus'] = $nostatus;\n }\n}", "protected function hasApplicableFontFile()\n {\n if (is_string($this->file)) {\n return file_exists($this->file);\n }\n\n return false;\n }", "public function test_asset_loading() {\n\n\t\t// Check that the items are not enquened before we start.\n\t\t$this->assertFalse( $this->are_batch_assets_enqueued() );\n\n\t\t// Call our loader class on the locomotive settings page.\n\t\t$this->load_admin_enqueue_hook( 'tools_page_locomotive' );\n\n\t\t// Check that the items are enquened.\n\t\t$this->assertTrue( $this->are_batch_assets_enqueued() );\n\t}", "private function wasFileSent() : bool\n {\n return isset($_FILES[$this->fieldName]['name']) && !empty($_FILES[$this->fieldName]['name']);\n }", "private function are_batch_assets_enqueued() {\n\n\t\t// Run the check on both the style and script enqueue.\n\t\tif ( false !== wp_style_is( 'batch-process-styles', 'enqueued' ) && false !== wp_script_is( 'batch-js', 'enqueued' ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private function isLoaded()\r\n {\r\n return $this->loaded;\r\n }" ]
[ "0.6362254", "0.60759276", "0.58842963", "0.57273394", "0.5548814", "0.55250204", "0.5468493", "0.5381923", "0.533797", "0.5199924", "0.5184609", "0.51770407", "0.5175265", "0.5164781", "0.515583", "0.51516163", "0.51350534", "0.511918", "0.511918", "0.5111083", "0.5109172", "0.5064146", "0.5032419", "0.5032419", "0.49785832", "0.49785832", "0.49748823", "0.49605355", "0.49031258", "0.4875712", "0.4875712", "0.48716483", "0.48580402", "0.4837474", "0.48171335", "0.48169467", "0.47995248", "0.4778638", "0.47435436", "0.47418422", "0.4669021", "0.46656114", "0.465499", "0.46452972", "0.46322387", "0.4627565", "0.46268383", "0.4621621", "0.461987", "0.4618193", "0.46100757", "0.46049738", "0.45943215", "0.45840284", "0.4576647", "0.45751822", "0.45734915", "0.45720515", "0.45715928", "0.4566463", "0.45610455", "0.45547736", "0.45532978", "0.45529306", "0.45450923", "0.45449072", "0.45429844", "0.4540859", "0.453938", "0.45316294", "0.45270464", "0.45163465", "0.45147315", "0.451335", "0.451071", "0.45092714", "0.4507263", "0.44981825", "0.44882038", "0.44857588", "0.4478588", "0.4472578", "0.44693655", "0.44693443", "0.44627705", "0.44509497", "0.44494793", "0.44490334", "0.44428912", "0.44408762", "0.4430609", "0.4419317", "0.44184747", "0.44095442", "0.44092935", "0.44083336", "0.4407678", "0.44051662", "0.44044584", "0.44043258" ]
0.71963847
0
Tests if current user is one of the user roles passed to the function.
public function is_user_in_user_roles( $user_roles ) { // Make sure we have user roles. if ( empty( $user_roles ) ) { return false; } // Get current user. if ( ( $current_user = wp_get_current_user() ) && ( $current_user_roles = isset( $current_user->roles ) ? $current_user->roles : false ) && is_array( $current_user_roles ) ) { // Find out if they share values. $user_roles_intersect = array_intersect( $user_roles, $current_user_roles ); // If they intersect, user is in user roles so return true. if ( ! empty( $user_roles_intersect ) ) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasRole($user, string $role = 'login'): bool {}", "public static function usersRoleIs( $role = false, $current_user = false )\n\t\t{\n\n\t\t\t// Simple sanitization\n\t\t\t$role = sanitize_text_field( $role );\n\n\t\t\t// Must be passed a role\n\t\t\tif( !$role ){\n\t\t\t\treturn new WP_Error( '1', 'usersRoleIs() was not passed a role' );\n\t\t\t}\n\n\t\t\t// Ensure they're logged in, otherwise we can't tell\n\t\t\tif( !is_user_logged_in() ){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// OK, we can check this user, use WP's globalized $curent_user\n\t\t\tif( !$current_user )\n\t\t\t{\n\n\t\t\t\tglobal $current_user; \n\t\t\t\tget_currentuserinfo();\n\t\t\t\t\n\t\t\t}\n\n\t\t\tif( $current_user && isset( $current_user->caps ) && is_array( $current_user->caps ) && isset( $current_user->caps[ $role ] ) && $current_user->caps[ $role ] == 1 ){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}", "function check_user_role($roles, $user_id = null) {\n\tif ($user_id) $user = get_userdata($user_id);\n\telse $user = wp_get_current_user();\n\tif (empty($user)) return false;\n\tforeach ($user->roles as $role) {\n\t\tif (in_array($role, $roles)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "function is_user_in_role( $user_id, $role ) {\r\n $user = new WP_User( $user_id );\r\n\treturn ( ! empty( $user->roles ) && is_array( $user->roles ) && in_array( $role, $user->roles ) );\r\n}", "function auth_roles()\n {\n if (auth_isAnonymous()) {\n return false;\n }\n\n $auth = auth_prerequisite();\n $field = $auth['fields']['role'];\n $session = auth_get();\n $roles = func_get_args();\n\n return in_array($session->$field, $roles);\n }", "function check_role( $role_in ) {\n global $_SESSION;\n\n // read the permissions database\n $d = loadDB();\n\n // check if the current user\n $user_name = $_SESSION[\"logged\"];\n // has a specified role\n $roles = array(); // collect all roles for this user\n foreach ( $d[\"users\"] as $key => $value ) {\n if ($value[\"name\"] == $user_name) {\n $roles = array_merge($roles, $value[\"roles\"]);\n }\n }\n \n foreach ( $roles as $role ) {\n if ($role == $role_in) {\n audit( \"check_role\", $role_in.\" as \".$user_name);\n return true;\n }\n }\n audit( \"check_role failed\", $role_in.\" as \".$user_name);\n return false;\n }", "function frame_user_role($role, $user_id = null)\n{\n if (is_numeric($user_id))\n $user = get_userdata($user_id);\n else\n $user = wp_get_current_user();\n\n if (empty($user))\n return false;\n\n $intersection = array_intersect((array) $role, (array) $user->roles);\n\n return !empty($intersection) ? true : false;\n}", "function tsg_user_has_role( $role = '', $user = null )\n{\n $user = $user ? new WP_User( $user ) : wp_get_current_user();\n\n if ( empty( $user->roles ) )\n return;\n\n if ( in_array( $role, $user->roles ) )\n return true;\n\n return;\n}", "function user_is_role($role, $user_id = null) {\n\tif ($user_id == null)\n\t\t// defaults to the current user\n\t\t$user_id = $_SESSION['user_id'];\n\n\treturn get_user_role_weight($user_id) === get_role_weight($role);\n}", "function user_is_role($role, $user_id = null) {\n\tif ($user_id == null)\n\t\t// defaults to the current user\n\t\t$user_id = $_SESSION['user_id'];\n\n\treturn get_user_role_weight($user_id) === get_role_weight($role);\n}", "function hasRole($role, $userId = null);", "function user_role_need ($role) {\r\n\t$info = user_info();\r\n\treturn ($info[3] == $role ? true : false);\r\n}", "function has_role($user, $role_name) {\n\n\tswitch ($role_name) {\n\t\tcase 'editor' :\n\t\t\tif (is_callable('hj_approve_is_editor')) {\n\t\t\t\treturn call_user_func('hj_approve_is_editor', $user);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'supervisor' :\n\t\t\tif (is_callable('hj_approve_is_supervisor')) {\n\t\t\t\treturn call_user_func('hj_approve_is_supervisor', $user);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'observer' :\n\t\t\tif (is_callable('hj_observer_is_observer')) {\n\t\t\t\treturn call_user_func('hj_observer_is_observer', $user);\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\tif (is_callable('roles_has_role')) {\n\t\treturn call_user_func('roles_has_role', $user, $role_name);\n\t}\n\n\treturn false;\n}", "function isRole($role)\n{\n return ($role == $_SESSION['role']);\n}", "public function is($role);", "function hasRole($user, $role){\n\n if(ucfirst($user->role) == 'Root'){\n return true;\n }\n else {\n if($user->role == ucwords($role)){\n return true;\n }\n else {\n return false;\n }\n }\n }", "function hasRole($role)\n{\n\treturn $this->loggedUser? $this->loggedUser->hasRole($role) : false;\n}", "function checkSingleRole($roleToCheck) {\n //Ensure user is logged in\n if(Auth::guest()) {\n return false;\n }\n $roleToCheck = strtolower($roleToCheck);\n //Ensure that the user is an admin or an owner\n $roles = Auth::user()->roles;\n //Loop through roles and check for permission\n foreach($roles as $role) {\n if($role->name == $roleToCheck) {\n return true;\n }\n }\n //User is not an admin\n return false;\n}", "function ppom_get_current_user_role() {\n \n\tif( is_user_logged_in() ) {\n\t\t$user = wp_get_current_user();\n\t\t$role = ( array ) $user->roles;\n\t\treturn $role[0];\n\t} else {\n\t\treturn false;\n\t}\n}", "public function hasRoleAccess()\n {\n $roles = $this->map[$this->uri]['roles'];\n\n if ($roles === self::ROLE_PUBLIC) {\n\n return true;\n }\n\n $this->isArray($roles);\n\n $this->collectMissingRoles($roles);\n\n return count(array_intersect($this->currentUserRoles, $roles)) > 0;\n }", "function is($role_name){\n $this->CI->load->model('role');\n $role = $this->CI->role->getRoleOnUserByName($this->username(), $role_name);\n if(!empty($role)) return $role;\n else return false;\n }", "public function hasRole(string $role): bool;", "private function isUser($role = 'user') : bool\n {\n return $this->user->hasRole('user');\n }", "public function isHasRole($userId, $role) {\n\t}", "public static function Roles($roles) {\n\t\tself::LoggedIn();\n\t\t$currentRole = $_SESSION['current_user']['role'];\n\t\tif (is_array($roles) && in_array($currentRole, $roles)) {\n\t\t\treturn true;\n\t\t}\n\t\tnotfound();\n\t}", "private function wf_user_permission(){\n\t\t$current_user = wp_get_current_user();\n\t\t$user_ok = false;\n\t\tif ($current_user instanceof WP_User) {\n\t\t\tif (in_array('administrator', $current_user->roles) || in_array('shop_manager', $current_user->roles)) {\n\t\t\t\t$user_ok = true;\n\t\t\t}\n\t\t}\n\t\treturn $user_ok;\n\t}", "function pilau_user_has_role( $user, $role ) {\n\t\treturn in_array( $role, pilau_get_user_role( $user, false, true ) );\n\t}", "function checkRole($role) {\n\n return in_array($role, $this->listRoleCurUser);\n }", "function hasRights($roleid, $fullAccessAdmin = true){\r\n\r\n\t$hasRights = false;\r\n\r\n\tif($_SESSION[\"userinfo\"][\"admin\"] == 1 && ($fullAccessAdmin || $roleid == \"Admin\"))\r\n\t\t$hasRights = true;\r\n\telseif($roleid == \"\")\r\n\t\t$hasRights = true;\r\n\telse\r\n\t\tforeach($_SESSION[\"userinfo\"][\"roles\"] as $role){\r\n\r\n if($role == $roleid){\r\n\r\n\t\t\t\t$hasRights = true;\r\n break;\r\n\r\n }//endif\r\n\r\n }//endif\r\n\r\n\treturn $hasRights;\r\n\r\n}", "public function is_role($role)\n {\n }", "function get_current_user_role() {\n\n\tglobal $wp_roles;\n\n\t$current_user = wp_get_current_user();\n\n\t$roles = $current_user->roles;\n\n\t$role = array_shift($roles);\n\n\treturn isset($wp_roles->role_names[$role]) ? translate_user_role($wp_roles->role_names[$role] ) : false;\n\n}", "function isLoggedIn(){\n if (isset($_SESSION['user_role'])) {\n return true;\n }\n return false;\n}", "function UserCheck( $user, $rolecodes )\n {\n // Return True.\n\n if(isset($user))\n {\n if($rolecodes == \"\")\n {\n // No permissions required for this page, just be logged in.\n return true;\n }\n\n if(isset($user->roles))\n {\n if(is_array($rolecodes))\n {\n $allowedroles = $rolecodes;\n }\n else\n {\n $allowedroles = explode(\",\",$rolecodes);\n }\n\n foreach($user->roles as $thisrole)\n {\n foreach($allowedroles as $thisallowedrole)\n {\n if($thisrole->rolecode == $thisallowedrole)\n {\n return true;\n }\n }\n }\n }\n }\n\n // If not, Return False.\n return false;\n }", "function is_administrator($user)\n{\n return is_array($user->roles) && in_array('administrator', $user->roles);\n}", "function checkUserRole($userId, $roleToCheck) {\n //Ensure user is logged in\n\n $user = User::find($userId);\n if (is_null($user)) {\n return false; //User dose not exist\n }\n $roleToCheck = strtolower($roleToCheck);\n //Ensure that the user is an admin or an owner\n $roles = $user->roles;\n //Loop through roles and check for permission\n foreach($roles as $role) {\n if($role->name == $roleToCheck) {\n return true;\n }\n }\n //User is not an admin\n return false;\n}", "public function hasRole($name);", "function userRoleCheck($user_data) {\n if(!empty($user_data['email'])){\n $user_email = $user_data['email'];\n $userTable = TableRegistry::get('Users');\n $query = $userTable->find('all')->where(['email' => $user_email]);\n if(!empty($query->first()->role_id) and ($query->first()->role_id == 2 or $query->first()->role_id == 1) ){ // Doctor = 2 and Admin = 1\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "private function check_if_user_in_allowed_roles ($user_roles, $allowed_roles) {\n\t\tif (empty($allowed_roles) ||\n\t\t in_array('guest', $allowed_roles) ||\n\t\t in_array('administrator', $user_roles) ||\n\t\t in_array('super', $user_roles) ||\n\t\t\tsizeof(array_intersect($user_roles, $allowed_roles)) > 0) {\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function is_accountant($user)\n{\n return is_array($user->roles) && in_array('accountant', $user->roles);\n}", "function is_role_custom( $role ) {\r\n\t\t\t// User has roles so look for a UM Role one\r\n\t\t\t$role_keys = get_option( 'um_roles' );\r\n\r\n\t\t\tif ( empty( $role_keys ) )\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t$role_keys = array_map( function( $item ) {\r\n\t\t\t\treturn 'um_' . $item;\r\n\t\t\t}, $role_keys );\r\n\r\n\t\t\treturn in_array( $role, $role_keys );\r\n\t\t}", "public function roleInUse(string $role): bool;", "function checkRole($role)\n{\n return (Auth::check())?Auth::user()->checkRole($role):false;\n}", "private function isUser() : bool\n {\n return $this->role('user');\n }", "public function userIs( $role ) {\n\n\t\treturn $this->loggedIn( )\n\t\t\t? in_array( $this->user( $this->roleField ), ( array )$role )\n\t\t\t: false;\n\t}", "function passes_required_role($requiredrole,$loggedrole){\n\t$ret=false;\n\tif($loggedrole==1) $ret=true;//admin sees everything\n\telse if(is_array($requiredrole) and in_array($loggedrole,$requiredrole)) $ret=true;\n\telse if(!is_array($requiredrole) and ($requiredrole>=$loggedrole)) $ret=true;\n\treturn $ret;\n}", "function is_manager($user)\n{\n return is_array($user->roles) && in_array('manager', $user->roles);\n}", "function isLoggedIn() {\n\n\tif (isset($_SESSION['role'])) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function is($roles);", "function isAuthorized($role_policy) {\n global $SEC_ROLES;\n $user_role = $_SESSION['user']['role'];\n $sub_roles = $SEC_ROLES[$user_role];\n if ($user_role !== $role_policy && !in_array($role_policy, $sub_roles)) {\n return false;\n }\n return true;\n}", "public function rolesForUser();", "public function hasCurrentUserAccess($name) {\n $roles = $this->getRoles($name);\n if ($roles === null) {\n return null;\n }\n\n return $this->authUser->hasRoles($this->getRoles($name));\n }", "public function hasRole() {\n return $this->_has(2);\n }", "function user_is_at_least_role($role, $user_id = null) {\n\tif ($user_id == null)\n\t\t// defaults to the current user\n\t\t$user_id = $_SESSION['user_id'];\n\n\treturn get_user_role_weight($user_id) >= get_role_weight($role);\n}", "function user_is_at_least_role($role, $user_id = null) {\n\tif ($user_id == null)\n\t\t// defaults to the current user\n\t\t$user_id = $_SESSION['user_id'];\n\n\treturn get_user_role_weight($user_id) >= get_role_weight($role);\n}", "function auth_role($role)\n {\n if (auth_isAnonymous()) {\n return false;\n }\n\n $auth = auth_prerequisite();\n $field = $auth['fields']['role'];\n $session = auth_get();\n\n return $session->$field == $role;\n }", "function is_auditor($user)\n{\n return is_array($user->roles) && in_array('auditor', $user->roles);\n}", "public function isInRole( $rolename ) {\n\t}", "public function logged_in($roles = NULL)\n\t{\n\t\t$status = FALSE;\n\n\t\t// Get the user from the session\n\t\t$user = $this->get_user();\n\t\t\n\t\tif(is_object($user) AND $user instanceof Entities\\User)\n\t\t{\n\t\t\t// Everything is okay so far\n\t\t\t$status = TRUE;\n\n\t\t\tif(!empty($roles))\n\t\t\t{\n\t\t\t\t// If roles is not an array\n\t\t\t\tif(!is_array($roles))\n\t\t\t\t{\n\t\t\t\t\t// Convert it to an array of one role\n\t\t\t\t\t$roles = array($roles);\n\t\t\t\t}\n\n\t\t\t\t// Check each role\n\t\t\t\tforeach($roles as $role)\n\t\t\t\t{\n\t\t\t\t\tif(!is_object($role))\n\t\t\t\t\t{\n\t\t\t\t\t\t$role = ORM::load('Role')->findBy(array('name' => $role));\n\t\t\t\t\t}\n\t\t\t\t\t// If the user doesn't have the role\n\t\t\t\t\tif(!$user->getRoles()->contains($role[0]))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Set the status false and get outta here\n\t\t\t\t\t\t$status = FALSE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $status;\n\t}", "abstract public function hasRole($roleName);", "public function isAuthorized($user)\n{\n if (isset($user['role']) && $user['role'] === 'admin') {\n return true;\n }\n\n // Default deny\n return false;\n}", "private function isOnlyRole($role = 'user') : bool\n {\n return $this->maxRole() === $role;\n }", "public static function is_role($user, $role_name)\n\t{\n\t\t$menu = Menu::factory('Team', $user);\n\t\treturn $menu->is_allowed($user->username, $role_name);\n\t}", "function _lean_is_admin() {\n global $user;\n if (in_array('administrator', array_values($user->roles))) {\n return true;\n } else {\n return false;\n }\n}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "function isViewer($wpUser){\n for($i = 0; $i < count($wpUser->roles); $i++){\n if(strpos($wpUser->roles[$i], SARON_ROLE_PREFIX . SARON_ROLE_VIEWER) !== FALSE){ // CHECK IF THE USER IS A MEMBER OF THE GROUP (test)saron_edit\n return true;\n }\n } \n return false; \n }", "protected function user_authorized()\n\t{\n\t\t// If the user has the super role, then allow access\n\t\t$super_role = Kohana::config('acl.super_role');\n\t\tif ($super_role AND in_array($super_role, $this->user->roles_list()))\n\t\t\treturn TRUE;\n\t\t// If the user is in the user list, then allow access\n\t\tif (in_array($this->user->id, $this->rule['users']))\n\t\t\treturn TRUE;\n\t\t\t\n\t\t// If the user has all (AND) the capabilities, then allow access\n\t\t$difference = array_diff($this->rule['capabilities'], $this->user->capabilities_list());\n\t\tif ( ! empty($this->rule['capabilities']) AND empty($difference))\n\t\t\treturn TRUE;\n\n\t\t// If there were no capabilities allowed, check the roles\n\t\tif (empty($this->rule['capabilities']))\n\t\t{\n\t\t\t// If the user has one (OR) the roles, then allow access\n\t\t\t$intersection = array_intersect($this->rule['roles'], $this->user->roles_list());\n\t\t\tif ( ! empty($intersection))\n\t\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "function is_admin()\r\n{\r\n global $sqlconnection;\r\n $currentuserid ='';\r\n if(IsLoggedIn())\r\n {\r\n $currentuserid = $_SESSION['userid'];\r\n }\r\n $userrolequery = \"SELECT User_Role FROM USER WHERE User_Id = $currentuserid \";\r\n $userroleresult = mysqli_query($sqlconnection,$userrolequery);\r\n if($userroleresult){\r\n $row = mysqli_fetch_assoc($userroleresult);\r\n if(strtolower($row['User_Role']) ==='admin'){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n else{\r\n return false;\r\n }\r\n \r\n}", "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "function is_admin()\n{\n global $app;\n if (is_authenticated()) {\n $user = $app->auth->getUserData();\n return ($user['role'] === '1');\n } else {\n return false;\n }\n}", "public function valid_input_role() {\n $role = $this->ci->input->post(\"role\");\n\n if ($role == USER_CATI || $role == USER_CID || $role == USER_FINANCE ||\n $role == USER_MP || $role == USER_DIV_MARKETEERS || $role == USER_DIV_CONSULTING ||\n $role == USER_DIV_INSTITUTE || $role == USER_DIV_INSIGHT\n ) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "public static function hf_user_permission() {\n $current_user = wp_get_current_user();\n $current_user->roles = apply_filters('hf_add_user_roles', $current_user->roles);\n $current_user->roles = array_unique($current_user->roles);\n $user_ok = false;\n\n $wf_roles = apply_filters('hf_user_permission_roles', array('administrator', 'shop_manager'));\n if ($current_user instanceof WP_User) {\n $can_users = array_intersect($wf_roles, $current_user->roles);\n if (!empty($can_users)) {\n $user_ok = true;\n }\n }\n return $user_ok;\n }", "public static function hf_user_permission() {\n $current_user = wp_get_current_user();\n $current_user->roles = apply_filters('hf_add_user_roles', $current_user->roles);\n $current_user->roles = array_unique($current_user->roles);\n $user_ok = false;\n\n $wf_roles = apply_filters('hf_user_permission_roles', array('administrator', 'shop_manager'));\n if ($current_user instanceof WP_User) {\n $can_users = array_intersect($wf_roles, $current_user->roles);\n if (!empty($can_users)) {\n $user_ok = true;\n }\n }\n return $user_ok;\n }", "public static function hf_user_permission() {\n $current_user = wp_get_current_user();\n $current_user->roles = apply_filters('hf_add_user_roles', $current_user->roles);\n $current_user->roles = array_unique($current_user->roles);\n $user_ok = false;\n\n $wf_roles = apply_filters('hf_user_permission_roles', array('administrator', 'shop_manager'));\n if ($current_user instanceof WP_User) {\n $can_users = array_intersect($wf_roles, $current_user->roles);\n if (!empty($can_users)) {\n $user_ok = true;\n }\n }\n return $user_ok;\n }", "public static function hf_user_permission() {\n $current_user = wp_get_current_user();\n $current_user->roles = apply_filters('hf_add_user_roles', $current_user->roles);\n $current_user->roles = array_unique($current_user->roles);\n $user_ok = false;\n\n $wf_roles = apply_filters('hf_user_permission_roles', array('administrator', 'shop_manager'));\n if ($current_user instanceof WP_User) {\n $can_users = array_intersect($wf_roles, $current_user->roles);\n if (!empty($can_users)) {\n $user_ok = true;\n }\n }\n return $user_ok;\n }", "public function logged_in($role = NULL)\n\t{\n\t\t// Get the user from the session\n\t\tif ($this->_use_session) {\n\t\t\t$user = $this->get_user();\n\t\t\t\n\t\t// If we're not using the session check for an auto_login cookie.\n\t\t} else {\n\t\t\t$user = $this->auto_login();\n\t\t}\n\n\t\tif ( ! $user) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif ($user instanceof Model_User)\n\t\t{\n\t\t\t// If we don't have a roll no further checking is needed\n\t\t\tif ( ! $role) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\t\n\t\t\tif (is_array($role))\n\t\t\t{\n\t\t\t\t// Get all the roles\n\t\t\t\t$roles = Doctrine_Query::create()\n\t\t\t\t\t->from('Model_Role r')\n\t\t\t\t\t->where('r.name IN ?', array($role))\n\t\t\t\t\t->execute();\n\t\t\t\t\n\t\t\t\t// Make sure all the roles are valid ones\n\t\t\t\tif (count($roles) !== count($role))\n\t\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( ! is_object($role))\n\t\t\t\t{\n\t\t\t\t\t// Load the role\n\t\t\t\t\t$roles = Doctrine::getTable('Model_Role')\n\t\t\t\t\t\t->findByName($role);\n\t\t\t\t\t\n\t\t\t\t\tif ( ! $roles OR count($roles) === 0)\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $user->has_role($roles);\n\t\t}\n\t\treturn FALSE;\n\t}", "function checkIfAdmin($username) {\n if (auth::getUserNumRole($username) == 3) {\n return true;\n } else {\n return false;\n }\n}", "public static function currentUserHasAccess() {\n return current_user_can('admin_access');\n }", "public function checkRoleAndRedirect()\n {\n $roles = Auth::user()->getRoles();\n if (in_array('admin', $roles->toArray()) || in_array('shop-manager', $roles->toArray())) {\n return true;\n }\n return false;\n }", "public static function isUser(){\n if(isset($_SESSION['role'])) {\n $status = Validation::Nettoyer_string($_SESSION['role']);\n if($status==\"user\"){\n return \"user\";\n } else {\n return \"visiteur\";\n }\n }else{\n return \"visiteur\";\n }\n }", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function isRole(){\n $r=Cache::get('role');\n if ((int)$r ==2)\n {\n return true;\n }\n else\n return false;\n }", "public function isUserAssignable()\r\n {\r\n return strpos($this->assignRole,'ROLE_USER') !== false ? true : false;\r\n }", "public function authorize()\n {\n $user = Sentinel::getUser();\n $admin = Sentinel::findRoleByName('Admin');\n if ( $user->inRole( $admin ) ) { //lets make sure its an admin\n return true;\n }\n return false;\n }", "private function isRole($userId, $role) {\n $assignments = self::getAssignments(($userId));\n foreach($assignments as $assignment){\n if($assignment->roleName === Yii::$app->params[$role])\n return true;\n }\n return false;\n }", "public static function checkRoles($model,$adminMode,$userRoles=null,$isMenu=false)\r\n {\r\n if(empty($model))\r\n return false;\r\n\r\n if($adminMode && !$isMenu)\r\n return true; //allow access to all menuitems in adminmode\r\n\r\n if(!isset($userRoles))\r\n $userRoles = array_keys(static::getCurrentUserRoles()); //allow subclasses to override getCurrentUserRole\r\n\r\n if(empty($userRoles))\r\n return $adminMode; //false if not adminMode and user has no roles assigned\r\n\r\n\r\n if($adminMode)\r\n $checkModelRoles=!empty($model->adminroles) ? explode(',',$model->adminroles) : array();\r\n else\r\n $checkModelRoles=!empty($model->userroles) ? explode(',',$model->userroles) : array();\r\n\r\n if(empty($checkModelRoles))\r\n return true;\r\n\r\n if(is_string($userRoles))\r\n $userRoles = array($userRoles);\r\n\r\n $intersect = array_intersect($checkModelRoles,$userRoles);\r\n return empty($intersect) ? false : true;\r\n }", "public function userHasRole($role_name){\n foreach($this->roles as $role){\n if(Str::lower($role_name) == Str::lower($role->name))\n return true;\n }\n\n return false;\n }", "public function logged_in($role = null)\n {\n // Get the user from the session\n $user = $this->get_user();\n if (!$user) {\n return false;\n }\n\n // If user exists in session\n if ($user) {\n\n // check session in database\n $sdb = UserSessions::findFirstBySessionId($this->_session->getId());\n if($sdb){\n $thisAgent = \\Phalcon\\DI::getDefault()->getShared('request')->getUserAgent();\n if($sdb->user_agent != $thisAgent || $sdb->user_id != $user->id){\n // user agent or user IDs do not match\n return FALSE;\n }\n }else{\n // Session not found in DB\n return FALSE;\n }\n\n // refresh the user session if needs be\n if( ! $this->refresh_session()){\n return FALSE;\n }\n\n // If we don't have a roll no further checking is needed\n if (!$role) {\n return true;\n }\n\n // Check if user has the role\n if ($this->_config['session_roles'] && $this->_session->has($this->_config['session_roles'])) {\n // Check in session\n $roles = $this->_session->get($this->_config['session_roles']);\n $role = isset($roles[$role]) ? $roles[$role] : null;\n } else {\n // Check in db\n $role = $user->hasRole($role);\n }\n\n\n\n // Return true if user has role\n return $role ? true : false;\n }\n }", "public function checkAccess($roles)\n {\n// return true;\n $needRoles = explode(',', $roles);\n $hasRoles = CHtml::listData($this->role, 'id', 'name');\n foreach ($needRoles as $needRole) {\n if (in_array(trim($needRole), $hasRoles)) {\n return true;\n }\n }\n// printr($hasRoles);\n// printr($roles);\n// echo \"<br/> about to return false <span style='font-color:gray;font-size:10px'>Line:\" .__LINE__ . \" File:\" . __FILE__ . \"</span> <br/>\\r\\n\";\n// die;\n return false;\n }", "function userHasAnyUserRight($current_user_id)\n\t {\n\t return $this->allowed(\"any_user\") || $current_user_id == -1 || is_null($current_user_id);\n\t }", "public function hasRole($name, $requireAll = false);", "function canChangeRole($user) {\n \treturn $user->isAdministrator() || $user->isPeopleManager();\n }", "public function logged_in($roles = null) {\n\t\t$status = false;\n\n\t\t// Get the user from the session\n\t\t$user = $this->session->get($this->config['session_key']);\n\n\t\t// Not logged in, maybe autologin?\n\t\tif (!is_object($user) && $this->config['lifetime'] && $this->auto_login()) {\n\t\t\t$user = $this->session->get($this->config['session_key']);\n\t\t}\n\n\t\tif (is_object($user)) {\n\t\t\t$status = (empty($roles)) ? true : $user->has_role($roles);\n\t\t}\n\n\t\treturn $status;\n\t}", "function role_exists($role)\n{\n\n if (!empty($role))\n {\n return $GLOBALS['wp_roles']->is_role($role);\n }\n\n return false;\n}", "public function check($roles = FALSE)\n {\n\t\tif(!isset($this->CI->session->user))\n\t\t{\n\t\t\tredirect(base_url($this->CI->config->item('auth_login')));\n\t\t} else {\n if ($roles){\n if(!in_array($this->CI->session->user->role, $roles)) {\n if($roles == 'SuperAdmin'){\n redirect(base_url('auth/logout'));\n }\n redirect(base_url($this->CI->config->item('auth_denied')));\n\n }\n }\n //echo \"Access Denied!\";\n }\n }", "public function hasRole( ... $roles) {\n if (is_string($roles)) return $this->roles->contains('slug', $roles);\n if (is_array($roles[0])) $roles = $roles[0];\n $user_roles = $this->roles->pluck('slug')->toArray();\n return (bool) array_intersect($roles, $user_roles);\n }", "public function hasRole($roles)\n {\n return $this->roles ? in_array($roles, $this->roles->pluck('id')->toArray()) : false;\n }", "public function authorize() {\n\t\treturn $this->user()->hasPermission('edit.roles');\n\t}", "public function isAuthorized($user = null)\n {\n // if (!$this->request->getParam('prefix')) {\n // return true;\n // }\n\n // Only admins can access admin functions\n if ($this->request->getParam('prefix') === 'admin') {\n return (bool)($user['role'] === 'admin');\n }\n\n // Default deny\n return false;\n }", "static function member_of_role_by_user( $user, $roleID )\n {\n\t $result = false;\n\n\t // Fetch user ID\n\t $userID = $user->attribute( 'contentobject_id' );\n\t \n\t // Perform comparison\n\t $result = self::member_of_role_by_user_id( $userID, $roleID );\n\n return $result;\n }", "public function hasAnyRole($roles){\n return null !== $this->rol()->whereIn('titulo', $roles)->first();\n }" ]
[ "0.7453003", "0.74154764", "0.74062395", "0.7402741", "0.7353116", "0.7347315", "0.73438513", "0.73336434", "0.7244283", "0.7244283", "0.72217065", "0.71550894", "0.7149499", "0.7042851", "0.701906", "0.70147556", "0.7010394", "0.69667083", "0.690708", "0.6906975", "0.68881035", "0.68804246", "0.68311876", "0.6829107", "0.6802364", "0.68012154", "0.67950076", "0.67738587", "0.6772854", "0.6765989", "0.6756807", "0.6754056", "0.674749", "0.67379814", "0.67323416", "0.6717196", "0.66907626", "0.6681921", "0.6658904", "0.66587347", "0.6657686", "0.6637952", "0.6606245", "0.65978664", "0.65936935", "0.65923065", "0.657167", "0.65699095", "0.6558994", "0.6557903", "0.65543485", "0.65536964", "0.65493006", "0.65493006", "0.6541542", "0.65414864", "0.6528233", "0.6525131", "0.6520982", "0.65165716", "0.65093833", "0.65062577", "0.64997107", "0.6497377", "0.6496883", "0.6492814", "0.6490202", "0.6482561", "0.6482561", "0.64775646", "0.6475873", "0.64555335", "0.64555335", "0.64555335", "0.64555335", "0.64529467", "0.6447608", "0.64475816", "0.6446386", "0.6445941", "0.6440344", "0.6439688", "0.6424581", "0.64163846", "0.64146", "0.64075774", "0.6396951", "0.63968456", "0.6388725", "0.63825536", "0.6379552", "0.63686365", "0.6366377", "0.6365022", "0.63530743", "0.63338304", "0.6332979", "0.633054", "0.6326228", "0.6318916", "0.63163286" ]
0.0
-1
Returns the instance of our main Wa11y class. Will come in handy when we need to access the class to retrieve data throughout the plugin.
function wa11y() { return Wa11y::instance(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function self() {\n\n\t\treturn self::factory( 'self' );\n\t}", "public static function self() {\n\n\t\treturn self::factory( 'self' );\n\n\t}", "public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__); \n\t}", "public static function instance() {\n\t\treturn new self;\n\t}", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(__CLASS__);\n }", "public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__);\n\t}", "public static function getInstance() {\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new DashboardSetup;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\treturn tribe( 'tec.customizer.global-elements' );\n\t}", "public static function instance() {\n\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t// Setup the init\n\t\t\tself::$instance = new Mai_AEC;\n\t\t\t// Methods\n\t\t\tself::$instance->setup_constants();\n\t\t\tself::$instance->includes();\n\t\t\tself::$instance->hooks();\n\t\t}\n\t\treturn self::$instance;\n\t}", "function SNTH_Woo() {\n return SNTH_Woo::instance();\n }", "public function instance();", "public static function inst()\n {\n return static::get_one(__CLASS__);\n }", "public static function instance() {\n\t if ( !isset( self::$instance ) ) {\n\t $className = __CLASS__;\n\t self::$instance = new $className;\n\t }\n\t return self::$instance;\n\t }", "function monstroid_dashboard() {\n\treturn Monstroid_Dashboard::get_instance();\n}", "public static function get_instance()\n {\n }", "public function instance() {\n\t\n\t\treturn $this;\n\t\n\t}", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public function instance() {\n\t\t\n\t}", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "public function web()\n {\n return Web::getinstance();\n }", "private function getApp() {\n if ( !$this->_app ) {\n $this->_app = new \\beaba\\core\\WebApp(array(\n 'models' => array(\n 'test' => array(\n 'storage' => 'default',\n 'table' => 'tests',\n 'database' => '__tests',\n 'columns' => array(\n 'when' => 'datetime',\n 'rand' => 'integer',\n 'name' => 'string:32'\n ),\n 'relations' => array(\n 'units' => 'many:unit'\n )\n )\n )\n ));\n }\n return $this->_app;\n }", "function woolentor_pro() {\r\n return Base::instance();\r\n}", "public function get_instance()\n\t{\n\t\treturn $this;\n\t}", "public function get_instance()\n\t{\n\t\treturn $this;\n\t}", "public static function instance() {\n if ( ! isset( self::$instance ) && ! ( self::$instance instanceof FFW_EVENTS ) ) {\n self::$instance = new FFW_EVENTS;\n self::$instance->setup_constants();\n self::$instance->includes();\n // self::$instance->load_textdomain();\n // use @examples from public vars defined above upon implementation\n }\n return self::$instance;\n }", "public static function instance() {\n\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t$className = __CLASS__;\n\t\t\tself::$instance = new $className;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance () {\n\t\tif ( is_null( self::$_instance ) )\n\t\t\tself::$_instance = new self();\n\t\treturn self::$_instance;\n\t}", "public static function instance();", "public static function getInstance() {\n\n if(is_null(self::$maininstance))\n new Main();\n\n return self::$maininstance;\n }", "public static function instance() {\n\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t// Setup the setup.\n\t\t\tself::$instance = new Mai_Grid_Plugin;\n\t\t\t// Methods.\n\t\t\tself::$instance->setup_constants();\n\t\t\tself::$instance->includes();\n\t\t\tself::$instance->hooks();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function get_instance ();", "public static function getInstance()\n {\n return new self();\n }", "static function get_instance() {\n\t\t\tif (null == VG_Page_Template_Hide_Elements::$instance) {\n\t\t\t\tVG_Page_Template_Hide_Elements::$instance = new VG_Page_Template_Hide_Elements();\n\t\t\t\tVG_Page_Template_Hide_Elements::$instance->init();\n\t\t\t}\n\t\t\treturn VG_Page_Template_Hide_Elements::$instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( ! self::$_instance ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\n\t}", "public static function start() {\n\t\t\tif ( ! is_admin() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$wct = wct();\n\n\t\t\tif ( empty( $wct->admin ) ) {\n\t\t\t\t$wct->admin = new self;\n\t\t\t}\n\n\t\t\treturn $wct->admin;\n\t\t}", "public function getInstance()\n {\n return $this;\n }", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) )\n\t\t\t\tself::$_instance = new self();\n\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( null === self::$_instance ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function get_instance() {\n\t\tif( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t\tself::$instance->hooks();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function getInstance() {\n return new self();\n }", "public static function get_instance() {\n\t\tif ( null === self::$instance ) {\n\t\t\tself::$instance = new self();\n\t\t\tself::$instance->hooks();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance()\n {\n return new static();\n }", "public static function instance()\n {\n return new static();\n }", "public static function instance() {\r\n\t\tif ( is_null( self::$_instance ) ) {\r\n\t\t\tself::$_instance = new self();\r\n\t\t}\r\n\t\treturn self::$_instance;\r\n\t}", "public static function instance() {\r\n\t\tif ( is_null( self::$_instance ) ) {\r\n\t\t\tself::$_instance = new self();\r\n\t\t}\r\n\t\treturn self::$_instance;\r\n\t}", "static public function getInstance() {\n return new static();\n }", "public static function instance () {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function get_instance() {\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\n\t\t}", "public function getMain()\n {\n return $this->get(self::MAIN);\n }", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) )\n\t\t\tself::$_instance = new self();\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t$class_name = __CLASS__;\n\t\t\tself::$instance = new $class_name;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( !isset( self::$instance ) ) {\n\t\t\t$class_name = __CLASS__;\n\t\t\tself::$instance = new $class_name;\n\t\t}\n\t\treturn self::$instance;\n\t}", "static public function getInstance()\n\t{\n\t\treturn parent::getInstance();\n\t}", "public static function instance() {\n\t\treturn static::$instance;\n\t}", "public static function instance()\n\t{\n\t\t$class = get_called_class();\n\t\tif (! isset(self::$_instances[$class]))\n\t\t{\n\t\t\tself::$_instances[$class] = new $class();\n\t\t}\n\t\treturn self::$_instances[$class];\n\t}", "protected function _apiInstance() {\n\t\treturn new Thrive_Dash_Api_WebinarJamStudio( $this->param( 'key' ) );\n\t}", "public static function instance() {\n // Get an instance of Class\n \tif( is_null( self::$instance ) ) self::$instance = new self();\n\n // Return the instance\n \treturn self::$instance;\n }", "public static function get_instance() {\n\t\tif ( ! isset( self::$instance ) && ! ( self::$instance instanceof IBX_WPFomo_Analytics ) ) {\n\t\t\tself::$instance = new IBX_WPFomo_Analytics();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function getInstance() {\n\t\tself::init();\n\t\treturn parent::getInstance();\n\t}", "public static function get_instance() {\n\t\tif (is_null(self::$instance)) {\n\t\t\t$className = __CLASS__;\n self::$instance = new $className;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\tif( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new startup_Admin();\n\t\t\tself::$instance->hooks();\n\t\t}\n\t\treturn self::$instance;\n\t}", "static public function get_instance() {\n\t\tif(!isset(self::$self)) {\n\t\t\tself::$self = new self();\n\t\t}\n\t\treturn self::$self;\n\t}", "public static function instance()\r\n\t{\r\n\t\tif(self::$_instance == null)\r\n\t\t{\r\n\t\t\tself::$_instance = new self();\r\n\t\t}\r\n\t\treturn self::$_instance;\r\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }", "public static function instance()\n {\n }", "public static function instance() {\n return new static();\n }", "public static function instance()\n\t{\n\t\tif (!isset(self::$_instance)) \n\t\t{\n\t\t\t$class = __CLASS__;\n\t\t\tself::$_instance = new $class;\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "public static function instance()\n\t{\n\t\tif ( ! isset(self::$_instance))\n\t\t\tself::$_instance = new self;\n\n\t\treturn self::$_instance;\n\t}", "public static function getInstance(): self;", "public static function webui(): WebUi\n {\n if (!self::$webUi) {\n self::$webUi = new WebUi();\n }\n\n return self::$webUi;\n }", "public static function instance() {\n\n\t\tif (!self::$instance) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance(){\n\t\t\tif( is_null( self::$instance ) ){\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function instance() {\n\t\tstatic $instance = null;\n\t\tif ( null === $instance ) {\n\t\t\t$instance = new CustomSidebarsIntegrationPolylang();\n\t\t}\n\t\treturn $instance;\n\t}", "public function getInstance(): self\n {\n return $this;\n }", "public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}" ]
[ "0.6351583", "0.6343523", "0.6178517", "0.6173891", "0.6173744", "0.61734843", "0.61458987", "0.61362505", "0.61279505", "0.6122624", "0.610665", "0.6057127", "0.60498863", "0.6041384", "0.6041192", "0.6041057", "0.60403013", "0.60402983", "0.60402983", "0.60402983", "0.60402983", "0.60029817", "0.5995721", "0.5995721", "0.598702", "0.59814686", "0.59786063", "0.5970988", "0.5970988", "0.59537446", "0.59507537", "0.59334904", "0.5932031", "0.59285295", "0.5919542", "0.59147495", "0.5914171", "0.5913992", "0.59110504", "0.59099776", "0.5901062", "0.59006226", "0.58997947", "0.58997947", "0.58997947", "0.58997947", "0.58997947", "0.58997947", "0.5898596", "0.5892491", "0.5884394", "0.5883113", "0.58817774", "0.5879924", "0.5879924", "0.58766615", "0.58766615", "0.5874898", "0.5873375", "0.58703315", "0.58703315", "0.5869861", "0.58695436", "0.5866602", "0.58605045", "0.58582133", "0.58559626", "0.58543754", "0.5848761", "0.584001", "0.5837826", "0.5836275", "0.58358526", "0.58353406", "0.5829476", "0.582873", "0.5827642", "0.5825632", "0.5825632", "0.5825632", "0.5825632", "0.5825632", "0.5825632", "0.5825632", "0.5825632", "0.5825632", "0.5825632", "0.5825632", "0.5823791", "0.58208776", "0.5816284", "0.58150136", "0.58147764", "0.5811814", "0.5811385", "0.5810958", "0.58051795", "0.5803354", "0.58023155", "0.5801548" ]
0.7967151
0
Adds the "Chat" tab with permissionbased links.
public static function navTabsListener(array &$extraTabs, $selectedTabId) { if (XenForo_Visitor::getInstance()->hasPermission('modm_ajaxchat', 'ajax_chat_view')) { $perms = array( "canModerateChat" => XenForo_Visitor::getInstance()->hasPermission('modm_ajaxchat', 'ajax_chat_mod_access'), "canAccessChat" => XenForo_Visitor::getInstance()->hasPermission('modm_ajaxchat', 'ajax_chat_user_access') || XenForo_Visitor::getInstance()->hasPermission('modm_ajaxchat', 'ajax_chat_guest_access') ); $extraTabs['chat'] = array( 'title' => new XenForo_Phrase('modm_ajaxchat_tabname'), 'href' => ($perms['canAccessChat'] ? XenForo_Link::buildPublicLink('chat/login') : XenForo_Link::buildPublicLink('chat/online')), 'position' => 'middle', 'linksTemplate' => 'modm_ajaxchat_nav_links', 'perms' => $perms ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addMenuItem() {\n add_menu_page(__('Visual Chat', 'WP_Visual_Chat'), 'Visual Chat', 'visual_chat', 'vcht-console', array($this, 'viewChatBackend'), 'dashicons-format-chat');\n }", "function isms_component_messages_addtab($cbtype, &$cbdata)\n{\n $settings_raw = get_option(\"isms_component_options\");\n if ($settings_raw == \"\")\n $settings = array();\n else\n $settings = unserialize($settings_raw);\n $enabled = grab_array_var($settings, \"enabled\", 0);\n if ($enabled != 1)\n return;\n\n $newtab = array(\n \"id\" => \"isms\",\n \"title\" => \"iSMS\",\n );\n\n $cbdata[\"tabs\"][] = $newtab;\n}", "function spsn_admin_tab() {\n\n add_menu_page('Share blog post with social network', 'Share blog post with social network', 'manage_options', __FILE__, 'spsn_admin_page');\n}", "public function add_settings_tabs() {\n\t\t$install_tabs = [ 'git_updater_addons' => esc_html__( 'API Add-Ons', 'git-updater' ) ];\n\t\tadd_filter(\n\t\t\t'gu_add_settings_tabs',\n\t\t\tfunction ( $tabs ) use ( $install_tabs ) {\n\t\t\t\treturn array_merge( $tabs, $install_tabs );\n\t\t\t}\n\t\t);\n\t\tadd_filter(\n\t\t\t'gu_add_admin_page',\n\t\t\tfunction ( $tab, $action ) {\n\t\t\t\t$this->add_admin_page( $tab, $action );\n\t\t\t},\n\t\t\t10,\n\t\t\t2\n\t\t);\n\t}", "private function share_extensions() {\n// $fsext->name = 'btn_campos';\n// $fsext->from = __CLASS__;\n// $fsext->to = 'ventas_cliente';\n// $fsext->params = '&back=ventas_cliente';\n// $fsext->type = 'tab';\n// $fsext->text = '<span class=\"glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span>'\n// . '<span class=\"hidden-xs\">&nbsp; Campos</span>';\n// $fsext->save();\n }", "public function add()\n\t{\n\t\t// Redirect to create Joomla user.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_hwdmediashare&view=channels&layout=add&tmpl=component', false));\n\t}", "function um_messaging_button_in_directory( $user_id, $args ) {\r\n\tif ( isset( $args['show_pm_button'] ) && !$args['show_pm_button'] ) return;\r\n\tif ( $user_id == get_current_user_id() ) {\r\n\t\t$messages_link = add_query_arg( 'profiletab', 'messages', um_user_profile_url() );\r\n\t\techo '<a href=\"' . $messages_link . '\" class=\"um-message-abtn um-button\"><span>'. __('My messages','um-messaging'). '</span></a>';\r\n\t} else {\r\n\t\techo do_shortcode('[ultimatemember_message_button user_id='.$user_id.']');\r\n\t}\r\n}", "function add_menu() {\n // Add \"Telegram Bot\" menu\n $telegram_logo = \"https://upload.wikimedia.org/wikipedia/commons/8/82/Telegram_logo.svg\";\n add_menu_page(\"Telegram Bot\", \"Telegram Bot\", 4, sanitize_key(\"home\"), \"plugin_home_page\", $telegram_logo);\n \n // Add \"Admin panel\" submenu\n add_submenu_page(sanitize_key(\"home\"), \"Admin panel\", \"Admin panel\", 4, sanitize_key(\"admin\"), \"plugin_admin_panel_page\");\n}", "function chat_view($guid = NULL) {\n\t$return = array();\n\n\telgg_require_js('chat/messaging');\n\n\t$chat = get_entity($guid);\n\n\t// no header or tabs for viewing an individual chat\n\t$return['filter'] = '';\n\n\tif (!elgg_instanceof($chat, 'object', 'chat') || !$chat->isMember() ) {\n\t\t$return['content'] = elgg_echo('noaccess');\n\t\treturn $return;\n\t}\n\n\tif ($chat->canEdit()) {\n\t\t// Delete chat button\n\t\telgg_register_menu_item('title', array(\n\t\t\t'name' => 'chat_delete',\n\t\t\t'href' => \"action/chat/delete?guid=$guid\",\n\t\t\t'text' => elgg_echo('delete'),\n\t\t\t'link_class' => 'elgg-button elgg-button-delete',\n\t\t\t'confirm' => elgg_echo('chat:delete:confirm'),\n\t\t\t'is_action' => true,\n\t\t));\n\t\t// Edit chat button\n\t\telgg_register_menu_item('title', array(\n\t\t\t'name' => 'chat_edit',\n\t\t\t'href' => \"chat/edit/$guid\",\n\t\t\t'text' => elgg_echo('chat:edit'),\n\t\t\t'link_class' => 'elgg-button elgg-button-action',\n\t\t));\n\t} else {\n\t\t// Leave chat button\n\t\telgg_register_menu_item('title', array(\n\t\t\t'name' => 'chat_leave',\n\t\t\t'href' => \"action/chat/leave?guid=$guid\",\n\t\t\t'text' => elgg_echo('chat:leave'),\n\t\t\t'link_class' => 'elgg-button elgg-button-delete',\n\t\t\t'confirm' => elgg_echo('chat:leave:confirm'),\n\t\t\t'is_action' => true,\n\t\t));\n\t}\n\t// Add users button\n\tchat_register_addusers_button($chat);\n\n\t$return['title'] = htmlspecialchars($chat->title);\n\n\telgg_push_breadcrumb($chat->title);\n\t$return['content'] = elgg_view_entity($chat, array('full_view' => true));\n\t$return['content'] .= elgg_view('chat/messages', array('entity' => $chat));\n\n\treturn $return;\n}", "public function registerMenu()\n\t{\n\t\t$permission = 'manage_network';\n\t\t$renderMethodName = 'renderNetwork';\n\t\t$networkMenuTitle = esc_html__('Active Directory Integration', 'next-active-directory-integration');\n\t\t$networkMenuSlug = $this->blogProfileRelationshipPage->getSlug(); // the header of the group must have the slug of the first item\n\n\t\t// add menu header\n\t\tadd_menu_page($networkMenuTitle, $networkMenuTitle, $permission, $networkMenuSlug);\n\n\t\t// add sub menus\n\t\t$this->addSubMenu($networkMenuSlug, $permission, $this->blogProfileRelationshipPage, $renderMethodName);\n\t\t$profileConfigurationPage = $this->addSubMenu($networkMenuSlug, $permission, $this->profileConfigurationPage, $renderMethodName);\n\n\t\tadd_action('admin_enqueue_scripts', array($this, 'loadScriptsAndStyle'));\n\t\tadd_action('load-' . $profileConfigurationPage, array($this, 'addHelpTab'));\n\t}", "static function RegisterAddonPermissions() {\n $description = self::LoadDescription('dynamiccontenttags');\n $perms = array (\n 'dynamiccontenttags' => array (\n 'addon_description' => GetLang('Addon_dynamiccontenttags_Settings_Header'),\n 'general' => array('name' => GetLang('Addon_dynamiccontenttags_Permission_General')),\n ),\n );\n self::RegisterAddonPermission($perms);\n }", "function register_plugin_menu(){\r\n add_menu_page( 'Aw Social Tabs', 'Aw Social Tabs', 'manage_options', 'awsocialtabs', array('AwstAdminPages', 'plugin_homepage'), 'dashicons-share', 6 );\r\n add_submenu_page('awsocialtabs', 'Aw Social Tabs | settings', 'Settings', 'manage_options','awst_settings', array('AwstAdminPages', 'awst_settings'));\r\n add_submenu_page('', 'Aw Social Tabs | Likes', 'Likes', 'manage_options','awst_likes', array('AwstAdminPages', 'awst_likes'));\r\n add_submenu_page('', 'Aw Social Tabs | Ratings', 'Ratings', 'manage_options','awst_ratings', array('AwstAdminPages', 'awst_ratings'));\r\n add_submenu_page('', 'Aw Social Tabs | Review', 'Review', 'manage_options','awst_review', array('AwstAdminPages', 'awst_review'));\r\n }", "protected function setupPermissionFields()\n {\n $tab = 'Permission';\n\n// $form->appendField(new Field\\Checkbox(\\Bs\\Db\\Permission::MANAGE_STAFF))->setLabel('Manage Staff')->setTabGroup($tab)\n// ->setNotes('Add/Edit Staff user accounts');\n// $form->appendField(new Field\\Checkbox(\\Bs\\Db\\Permission::MANAGE_STUDENT))->setLabel('Manage Students')->setTabGroup($tab)\n// ->setNotes('Add/Edit Student user accounts');\n// $form->appendField(new Field\\Checkbox(\\Bs\\Db\\Permission::MANAGE_SUBJECT))->setLabel('Manage Subjects')->setTabGroup($tab)\n// ->setNotes('Add/Edit subject and student enrollments');\n }", "function admin_links()\n\t{\n\t\techo '<a href=\"modules.php?mod=customcats\">Custom Cats</a>';\n\t}", "function activity_tabs_init(){\n // add our own css\n elgg_extend_view('css/elgg', 'activity_tabs/css');\n \n elgg_register_page_handler('activity_tabs', 'activity_tabs_pagehandler');\n elgg_register_event_handler('pagesetup', 'system', 'activity_tabs_pagesetup');\n \n // default menu items are registered with relative paths\n // need to change it due to different page handlers\n elgg_register_plugin_hook_handler('register', 'menu:filter', 'activity_tabs_filtermenu');\n \n // set user activity link on menu:user_hover dropdown\n $user_activity = elgg_get_plugin_setting('user_activity', 'mt_activity_tabs');\n \n if($user_activity != 'no'){\n elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'activity_tabs_user_hover');\n elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'activity_tabs_user_hover');\n }\n}", "function init_tab_contracthtml() {\n\tif(has_permission('teampassword','','view') || is_admin() || is_client_logged_in()){\n\t\techo '<li role=\"presentation\" class=\"\">\n\t <a href=\"#items_relate\" aria-controls=\"items_relate\" role=\"tab\" data-toggle=\"tab\">\n\t <i class=\"fa fa-key\" aria-hidden=\"true\"></i> ' . _l('items_relate') . '\n\t </a>\n\t </li>';\n }\n}", "public function startTabs() {\n\t\t\tglobal $oSecurity; \n\t\t\t$arTabs = array( \n\t\t\t\t\"home\" => array(\n\t\t\t\t\t\"title\" => \"Home\", \n\t\t\t\t\t\"url\" => \"main.php\", \n\t\t\t\t\t\"classes\" => array(\"menu-item\", \"home\"), \n\t\t\t\t) \n\t\t\t); \n\t\t\t$oOwaesTypes = new owaestype(); \n\t\t\tforeach ($oOwaesTypes->getAllTypes() as $strKey=>$strTitle) {\n\t\t\t\t$arTabs[\"market.\" . $strKey] = array(\n\t\t\t\t\t\"title\" => $strTitle, \n\t\t\t\t\t\"url\" => \"index.php?t=\" . $strKey, \n\t\t\t\t\t\"classes\" => array(\"menu-item\", $strKey), \n\t\t\t\t);\n\t\t\t}\n\t\t\t/*$arTabs[\"users\"] = array(\n\t\t\t\t\t\"title\" => \"gebruikers\", \n\t\t\t\t\t\"url\" => \"users.php\", \n\t\t\t\t\t\"classes\" => array(\"users\", \"extratab\"), \n\t\t\t\t);*/\n\t\t\tif ($this->bLoggedInUser) {\n\t\t\t\t/*$oInbox = new inbox();\n\t\t\t\tif (count($oInbox->discussions()) > 0) {\n\t\t\t\t\t$arTabs[\"messages\"] = array(\n\t\t\t\t\t\t\"title\" => \"berichten\", \n\t\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\t\"classes\" => array(\"extratab\", \"mailbox\"), \n\t\t\t\t\t\t\"sub\" => array(),\n\t\t\t\t\t); \n\t\t\t\t\tforeach ($oInbox->discussions() as $iKey=>$arUser) {\n\t\t\t\t\t\tif ($arUser[\"unread\"] > 0) {\n\t\t\t\t\t\t\t$arTabs[\"messages\"][\"sub\"][$arUser[\"names\"] . \" (\" . $arUser[\"unread\"] . \")\"] = array(\"conversation.php?users=\" . $arUser[\"ids\"], \"conversation unread\"); \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$arTabs[\"messages\"][\"sub\"][$arUser[\"names\"]] = array(\"conversation.php?users=\" . $arUser[\"ids\"], \"conversation\"); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n */\n $arTabs[\"lijsten\"] = array (\n \"title\" => \"Lijsten\", \n\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\"classes\" => array(\"dropdown-toggle\", \"lijsten\", \"menu-item\"), \n\t\t\t\t\t\"sub\" => array(),\n );\n \n if (user(me())->levelrights(\"groepslijst\")) $arTabs[\"lijsten\"][\"sub\"][\"Groepen\"] = array(\"groups.php\", \"groups\");\n if (user(me())->levelrights(\"gebruikerslijst\")) $arTabs[\"lijsten\"][\"sub\"][\"Gebruikers\"] = array(\"users.php\", \"gebruikers\");\n $arTabs[\"lijsten\"][\"sub\"][\"Vrienden\"] = array(\"friends.php\", \"friends\");\n\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Badges\"] = array(\"badges.php\", \"badges\");\n\t\t\t\tif ($oSecurity->admin()) {\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Admin\"] = array(\"admin.php\", \"admin\");\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Reports\"] = array(\"meldingen.php\", \"meldingen\");\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Groepen\"] = array(\"admin.groepen.php\", \"groups\");\n\t\t\t\t}\n \n $arTabs[\"account\"] = array (\n \"title\" => \"Account\", \n\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\"classes\" => array(\"dropdown-toggle\", \"account\", \"menu-item\"), \n\t\t\t\t\t\"sub\" => array(),\n );\n $arTabs[\"account\"][\"sub\"][\"Profiel\"] = array(\"profile.php\", \"profiel\");\t\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Berichten\"] = array(\"conversation.php\", \"berichten\");\t\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Instellingen\"] = array(\"settings.php\", \"instellingen\");\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Paswoord aanpassen\"] = array(\"modal.changepass.php\", \"paswoord domodal\");\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Afmelden\"] = array(\"logout.php\", \"afmelden\");\t\n \n\t\t\t\t/*$arTabs[\"settings\"] = array(\n\t\t\t\t\t\"title\" => \"instellingen\", \n\t\t\t\t\t\"url\" => \"settings.php\", \n\t\t\t\t\t\"classes\" => array(\"extratab\", \"settings\"), \n\t\t\t\t\t\"sub\" => array(),\n\t\t\t\t);\n \n\t\t\t\tforeach (user(me())->groups() as $oGroep) {\n\t\t\t\t\t$arTabs[\"settings\"][\"sub\"][$oGroep->naam()] = array(\"group.php?id=\" . $oGroep->id(), \"groep\"); \n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t//if ($oSecurity->admin()) $arTabs[\"account\"][\"sub\"][\"admin\"] = array(\"admin.php\", \"admin\"); \n\t\t\t\t/*\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"instellingen\"] = array(\"settings.php\", \"settings\");\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"profiel\"] = array(\"profile.php\", \"profile\");\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"uitloggen\"] = array(\"logout.php\", \"login\");\n */\n\t\t\t} else {\n\t\t\t\t$arTabs[\"login\"] = array(\n\t\t\t\t\t\"url\" => \"login.php?p=\" . urlencode($this->filename()), \n\t\t\t\t\t\"classes\" => array(\"menu-item\", \"login\"), \n\t\t\t\t); \n\t\t\t}\n\t\t\tif (isset($arTabs[$this->tab()][\"classes\"])) $arTabs[$this->tab()][\"classes\"][] = \"active\"; \n \n $strHTML = \"\";\n $strHTML .= \"<nav class=\\\"navbar navbar-default\\\">\";\n $strHTML .= \"<div class=\\\"container\\\"><div class=\\\"row\\\"><div class=\\\"navbar-header\\\">\";\n $strHTML .= \"<a href=\\\"main.php\\\"><h1 class=\\\"navbar-brand\\\">OWAES</h1></a>\";\n $strHTML .= \"<button class=\\\"navbar-toggle\\\" type=\\\"button\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#navbar-main\\\"><span class=\\\"icon-bar\\\"></span><span class=\\\"icon-bar\\\"></span><span class=\\\"icon-bar\\\"></span></button>\";\n\t\t\t$strHTML .= \"</div><div class=\\\"navbar-collapse collapse\\\" id=\\\"navbar-main\\\"><ul class=\\\"nav navbar-nav navbar-right\\\">\"; \n\t\t\tforeach ($arTabs as $strKey => $arDetails) {\n\t\t\t\t$strTitel = isset($arDetails[\"title\"]) ? $arDetails[\"title\"] : $strKey; \n if (!isset($arDetails[\"sub\"])){\n $strHTML .= \"<li>\";\n\t\t\t\t $strHTML .= \"<a href=\\\"\" . fixPath($arDetails[\"url\"]) . \"\\\" class=\\\"\" . implode(\" \", $arDetails[\"classes\"]) . \"\\\">\";\n $strHTML .= \"<span class=\\\"icon\\\"></span>\";\n $strHTML .= \"<span class=\\\"title\\\">$strTitel</span></a>\";\n $strHTML .= \"</li>\";\n } else{\n $strHTML .= \"<li class=\\\"dropdown\\\">\";\n $strHTML .= \"<a href=\\\"\" . fixPath($arDetails[\"url\"]) . \"\\\" class=\\\"\" . implode(\" \", $arDetails[\"classes\"]) . \"\\\" data-toggle=\\\"dropdown\\\">\";\n $strHTML .= \"<span class=\\\"icon\\\"></span>\";\n $strHTML .= \"<span class=\\\"title\\\">$strTitel</span> <span class=\\\"caret\\\"></span></a>\";\n \n $strHTML .= \"<ul class=\\\"dropdown-menu\\\">\"; \n\t\t\t\t\tforeach ($arDetails[\"sub\"] as $strSubTitel => $arSubDetails) {\n\t\t\t\t\t\t$strHTML .= \"<li><a href=\\\"\" . fixPath($arSubDetails[0]) . \"\\\" class=\\\"\" . $arSubDetails[1] . \"\\\"><span class=\\\"icon-\" . $arSubDetails[1] . \"\\\"></span><span>$strSubTitel</span></a></li>\";\n\t\t\t\t\t}\n\t\t\t\t\t$strHTML .= \"</ul>\"; \n $strHTML .= \"</li>\";\n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t$strHTML .= \"</ul></div></div></div></nav>\"; \n\t\t\t//$strHTML .= \"<div class=\\\"clock\\\">\" . clock() . \"</div>\"; \n\t\t\t/*$strHTML .= \"<form class=\\\"search\\\" action=\\\"\" . fixPath(\"search.php\") . \"\\\" method=\\\"get\\\">\n\t\t\t\t\t\t\t<input class=\\\"searchfield\\\" type=\\\"text\\\" name=\\\"q\\\" \" . (isset($_GET[\"q\"])?(\"value=\\\"\" . inputfield($_GET[\"q\"]) . \"\\\"\"):\"\") . \" />\n\t\t\t\t\t\t\t<input class=\\\"searchbutton\\\" type=\\\"submit\\\" value=\\\"zoeken\\\" />\n\t\t\t\t\t\t</form>\"; */\n //$strHTML .= \"<ul class=\\\"popupmessages\\\"></ul>\"; \n\t\t\tif (!$this->bLoggedInUser) { \n\t\t\t\t$strHTML .= \"<div class=\\\"loginbar\\\">\n\t\t\t\t\t\t\t\tLog in: \n\t\t\t\t\t\t\t\t<form action=\\\"\" . fixPath(\"login.php\") . \"\\\" method=\\\"post\\\">\n\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"from\\\" id=\\\"from\\\" value=\\\"\" . $this->filename(TRUE) . \"\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"username\\\" id=\\\"username\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"password\\\" name=\\\"pass\\\" id=\\\"pass\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"submit\\\" name=\\\"dologin\\\" value=\\\"inloggen\\\" />\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\tof <a href=\\\"\" . fixPath(\"login.php?p=\" . urlencode($this->filename())) . \"\\\">registreer</a>\n\t\t\t\t\t\t\t</div>\";\n\t\t\t} \n\t\t\t//$strHTML .= \"<div id=\\\"ADMIN\\\">\n\t\t\t//\t\t\t\t\t<ul><a href=\\\"#\\\" rel=\\\"SQL\\\">show/hide SQL</a></ul>\n\t\t\t//\t\t\t\t</div>\";\n\t\t\t\n\t\t\tif(settings(\"analytics\")!=\"\") {\n\t\t\t\t$strHTML = \"<script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n ga('create', '\" . settings(\"analytics\") . \"', 'auto');\n ga('send', 'pageview');\n\n</script>\" . $strHTML; \t\n\t\t\t}\n\t\t\t\n\t\t\treturn $strHTML; \n\t\t}", "public static function display_irc_chat_rules() {\n ?>\n <ol>\n <?= Lang::get('rules', 'chat_forums_irc') ?>\n </ol>\n<?\n }", "function TS_VCSC_PluginAddSettingsLink($links) {\r\n\t\t\tif (current_user_can('manage_options')) {\r\n\t\t\t\t$links[] = '<a href=\"admin.php?page=TS_VCSC_Extender\" target=\"_parent\">' . __( \"Settings\", \"ts_visual_composer_extend\" ) . '</a>';\r\n\t\t\t}\r\n\t\t\t$links[] = '<a href=\"http://www.composium.krautcoding.com/documentation\" target=\"_blank\">' . __( \"Documentation\", \"ts_visual_composer_extend\" ) . '</a>';\r\n\t\t\t$links[] = '<a href=\"http://helpdesk.krautcoding.com/changelog-composium-visual-composer-extensions/\" target=\"_blank\">' . __( \"Changelog\", \"ts_visual_composer_extend\" ) . '</a>';\r\n\t\t\treturn $links;\r\n\t\t}", "function view_perm_users()\n\t{\n\t\t//-----------------------------------------\n\t\t// Check for a valid ID\n\t\t//-----------------------------------------\n\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз\");\n\t\t}\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => \"perm_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $perms = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз\");\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get all members using that ID then!\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Сведения о пользователе\" , \"50%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Действие\" , \"50%\" );\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= \"<script language='javascript' type='text/javascript'>\n\t\t\t\t\t\t <!--\n\t\t\t\t\t\t function pop_close_and_stop( id )\n\t\t\t\t\t\t {\n\t\t\t\t\t\t \topener.location = \\\"{$this->ipsclass->base_url}&section=content&act=mem&code=doform&mid=\\\" + id;\n\t\t\t\t\t\t \tself.close();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t //-->\n\t\t\t\t\t\t </script>\";\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Используется пользователями: \" . $perms['perm_name'] );\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, email, posts, org_perm_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'members',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"(org_perm_id IS NOT NULL AND org_perm_id != '')\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'name' ) );\n\t\t$outer = $this->ipsclass->DB->simple_exec();\n\n\t\twhile( $r = $this->ipsclass->DB->fetch_row($outer) )\n\t\t{\n\t\t\t$exp_pid = explode( \",\", $r['org_perm_id'] );\n\n\t\t\tforeach( explode( \",\", $r['org_perm_id'] ) as $pid )\n\t\t\t{\n\t\t\t\tif ( $pid == $this->ipsclass->input['id'] )\n\t\t\t\t{\n\t\t\t\t\tif ( count($exp_pid) > 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra = \"<li>Также используются: <em style='color:red'>\";\n\n\t\t\t\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => \"perm_id IN (\".$this->ipsclass->clean_perm_string($r['org_perm_id']).\") AND perm_id <> {$this->ipsclass->input['id']}\" ) );\n\t\t\t\t\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t\t\t\t\twhile ( $mr = $this->ipsclass->DB->fetch_row() )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$extra .= $mr['perm_name'].\",\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$extra = preg_replace( \"/,$/\", \"\", $extra );\n\n\t\t\t\t\t\t$extra .= \"</em>\";\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$extra = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<div style='font-weight:bold;font-size:11px;padding-bottom:6px;margin-bottom:3px;border-bottom:1px solid #000'>{$r['name']}</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <li>Сообщений: {$r['posts']}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <li>Email: {$r['email']}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $extra\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"&#149;&nbsp;<a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=remove_mask&amp;id={$r['id']}&amp;pid=$pid' title='Удалить эту маску доступа у пользователя (без удаления других масок доступа)'>Удалить эту маску</a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <br />&#149;&nbsp;<a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=remove_mask&amp;id={$r['id']}&amp;pid=all' title='Удалить все дополнительные маски'>Удалить все дополнительные маски</a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <br /><br />&#149;&nbsp;<a href='javascript:pop_close_and_stop(\\\"{$r['id']}\\\");'>Изменить пользователя</a>\",\n\t\t\t\t\t\t\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}\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t$this->ipsclass->admin->print_popup();\n\t}", "public function setHelpTabs() {\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-1',\n 'title' => __( 'Theme Information 1', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-2',\n 'title' => __( 'Theme Information 2', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n // Set the help sidebar\n $this->args['help_sidebar'] = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'slova' );\n }", "function chat_add_members($guid = null) {\n\t$chat = get_entity($guid);\n\n\tif (!elgg_instanceof($chat, 'object', 'chat') || !$chat->isMember() ) {\n\t\t$return['content'] = elgg_echo('noaccess');\n\t\treturn $return;\n\t}\n\n\t$form_vars = array('guid' => $guid);\n\t$body_vars = array();\n\t$form = elgg_view_form('chat/addmembers', $body_vars, $form_vars);\n\n\t$return = array(\n\t\t'title' => elgg_echo('chat:members'),\n\t\t'content' => $form,\n\t\t'filter' => '',\n\t);\n\n\treturn $return;\n}", "public function add_help_tab() {\n\t\t$screen = get_current_screen();\n\t\t$screen->add_help_tab( array(\n\t\t\t\t'id' => 'support',\n\t\t\t\t'title' => 'Support',\n\t\t\t\t'content' => '',\n\t\t\t\t'callback' => array( $this, 'display' ),\n\t\t\t)\n\t\t);\n\t}", "function wfCometDemoSkinTemplateNavigation( SkinTemplate &$skt, array &$links ) {\n\t$links['actions']['view-debug-log'] = array(\n\t\t'class' => 'cometdemo-tab',\n\t\t'text' => wfMessage( 'cometdemo-tab-name' )->escaped(),\n\t\t'href' => '#'\n\t);\n\treturn true;\n}", "public function getLinks()\n {\n $links = array();\n $submenulinks = array();\n\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_MODERATE)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'view'), 'text' => $this->__('Users list'), 'class' => 'z-icon-es-view');\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_MODERATE)) {\n $pending = ModUtil::apiFunc($this->name, 'registration', 'countAll');\n if ($pending) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'viewRegistrations'), 'text' => $this->__('Pending registrations') . ' ('.DataUtil::formatForDisplay($pending).')', 'class' => 'user-icon-adduser');\n }\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_ADD)) {\n $submenulinks[] = array('url' => ModUtil::url($this->name, 'admin', 'newUser'), 'text' => $this->__('Create new user'));\n $submenulinks[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Import users'));\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_ADMIN)) {\n $submenulinks[] = array('url' => ModUtil::url($this->name, 'admin', 'exporter'), 'text' => $this->__('Export users'));\n }\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'newUser'), 'text' => $this->__('Create new user'), 'class' => 'z-icon-es-new', 'links' => $submenulinks);\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_MODERATE)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'search'), 'text' => $this->__('Find users'), 'class' => 'z-icon-es-search');\n }\n if (SecurityUtil::checkPermission('Users::MailUsers', '::', ACCESS_MODERATE)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'mailUsers'), 'text' => $this->__('E-mail users'), 'class' => 'z-icon-es-mail');\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'config'), 'text' => $this->__('Settings'), 'class' => 'z-icon-es-config');\n }\n\n return $links;\n }", "function access_scheme_add_list() {\n drupal_set_title(t('Add an access scheme'), PASS_THROUGH);\n\n $content = array();\n foreach (access_scheme_info() as $type => $info) {\n $content[$type] = array(\n 'title' => $info['label'],\n 'description' => $info['description'],\n 'href' => 'admin/structure/access/add/' . str_replace('_', '-', $type),\n 'localized_options' => array(),\n );\n }\n return theme('admin_block_content', array('content' => $content));\n}", "function getTabs(&$tabs_gui)\n\t{\n\t\tglobal $rbacsystem;\n\n\t\t// properties\n\t\tif ($rbacsystem->checkAccess(\"write\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"edit_properties\",\n\t\t\t\t\"repository.php?cmd=properties&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"properties\");\n\t\t}\n\n\t\t// edit permission\n\t\tif ($rbacsystem->checkAccess(\"edit_permission\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"perm_settings\",\n\t\t\t\t\"repository.php?cmd=permissions&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"permissions\");\n\t\t}\n\t}", "public function liababyMenuLinks() {\n\n\t\tif(Session::getSess('logged') == false) {\n\t\t\t$this->liababyMenuLinks .= '\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/regUser\" title=\"\" subtitle=\"Присъедини се\">Регистрация</a></li>\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/logIn\" title=\"\" subtitle=\"Влез в сайта\" class=\"last\">Вход</a></li>\n\t\t\t';\n\t\t} else {\n\t\t\t$username = $this->setUrl('userNameDisplay');\n\t\t\t$this->liababyMenuLinks .= '\n\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/userProfile/'. $username .'\" title=\"\" subtitle=\"вашият профил\">Профил</a></li>\n\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/logOut\" title=\"\" subtitle=\"от профила\" class=\"last\">Изход</a></li>\n\t\t\t';\n\t\t}\n\t}", "function section_connect() {\r\n\t\tprint \"<ul id='admin-section-bug-wrap'>\";\r\n\t\tprint \"<li class='icon-twitter'><a href='http://twitter.com/onemanonelaptop'>Follow me on Twitter</a></li>\";\r\n\t\tprint \"<li class='icon-linkedin'><a href='http://www.linkedin.com/pub/rob-holmes/26/3a/594'>Connect Via LinkedIn</a></li>\";\r\n\t\tprint \"<li class='icon-wordpress'><a href='http://profiles.wordpress.org/users/OneManOneLaptop/'>View My Wordpress Profile</a></li>\";\r\n\r\n\t\tprint \"</ul>\"; \r\n\t}", "function call_logs_permissions()\n{\n $capabilities = [];\n\n $capabilities['capabilities'] = [\n 'view' => _l('permission_view') . '(' . _l('permission_global') . ')',\n 'create' => _l('permission_create'),\n 'edit' => _l('permission_edit'),\n 'delete' => _l('permission_delete'),\n ];\n\n register_staff_capabilities('call_logs', $capabilities, _l('call_logs'));\n}", "protected function addLinks()\n {\n }", "function add_menu() {\n add_menu_page(\"Polls\", \"Polls\", \"administrator\", \"polls\", \"managePollsPage\");\n}", "function wpvideocoach_admin_toolbar() {\r\n\tglobal $wp_admin_bar;\r\n\t\r\n\t// Add the Parent link.\r\n\t$adminurl = admin_url('admin.php?page=wpvideocoach');\r\n\t$admin_toolbar_title = wpvideocoach_toolbar_link_title();\r\n\t$wp_admin_bar->add_menu( array(\r\n\t\t'title' => $admin_toolbar_title,\r\n\t\t'href' => $adminurl,\r\n\t\t'id' => 'wpvideocoach_links',\r\n\t));\r\n\r\n}", "function addlinks(){\n Vtiger_Link::addLink(0, 'HEADERSCRIPT', 'LSWYSIWYG', 'modules/LSWYSIWYG/resources/WYSIWYG.js','','','');\n\n\t}", "public function create()\n {\n\n return view('admin.friendlinks.add',['title'=>'友情链接的添加页面']);\n }", "function setTabs(){\n global $ilTabs, $ilCtrl, $ilAccess, $ilLocator;\n\n // show current quiz round inlcuding link and QR code (deadline)\n if ($ilAccess->checkAccess(\"read\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showCurrentRound\", $this->txt(\"tabmenu_showCurrentRound\"), $ilCtrl->getLinkTarget($this, \"showCurrentRound\"));\n }\n\n // tab for the \"edit quiz\" command\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"editQuiz\", $this->txt(\"tabmenu_edit_quiz\"), $ilCtrl->getLinkTarget($this, \"editQuiz\"));\n }\n\n // show round results\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showResults\", $this->txt(\"tabmenu_show_result\"), $ilCtrl->getLinkTarget($this, \"showResults\"));\n }\n\n // a \"properties\" tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"properties\", $this->txt(\"tabmenu_properties\"), $ilCtrl->getLinkTarget($this, \"editProperties\"));\n $this->addPermissionTab();\n }\n\n // information Tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"info\", $this->txt(\"tabmenu_info\"), $ilCtrl->getLinkTarget($this, \"info\"));\n }\n\n }", "public function chat()\n {\n $errors = [];\n $formValid = false;\n $params = [\n // dans la vue, les clés deviennent des variables\n 'formValid' => $formValid,\n 'errors' => $errors,\n ];\n\n // Affichage du chat seulement si connecté\n if(!empty($this->getUser())){\n $this->show('chat/chat', $params);\n }\n else{{\n $this->showNotFound(); // sinon page 404\n }}\n\n }", "protected function addToolbar()\n\t{\n\t\t$bar = JToolBar::getInstance('sender');\n\t\t$bar->appendButton('Link', 'export', 'COM_NEWSLETTER_NEWSLETTER_SEND', '#');\n\n\t\t// Load the submenu.\n\t\tNewsletterHelper::addSubmenu(JRequest::getVar('view'));\n\t}", "function dsq_add_pages() {\n \tadd_submenu_page(\n \t\t'edit-comments.php',\n \t\t'Disqus', \n \t\t'Disqus', \n \t\t'moderate_comments',\n \t\t'disqus',\n \t\t'dsq_manage'\n \t);\n}", "function wise_chat_widget_channel_users() {\n\tWiseChatContainer::get('WiseChatWidgetChannelUsers');\n\treturn register_widget(\"WiseChatWidgetChannelUsers\");\n}", "function addSubMenus() {\n \tif($this->checkPermissions()) {\n\t\t \t$first_item_parent = $this->isTeacherFeatures() ? 'lepress-my-subscriptions' : 'lepress';\n\t\t \tadd_submenu_page('lepress', __(\"Manage my subscriptions\", lepress_textdomain),__(\" My subscriptions\", lepress_textdomain).'<span id=\"lepress-student-subs-count\"></span>',3, $first_item_parent,array(&$this, 'getSubMenuPageContent' ));\n\t\t \tadd_submenu_page('lepress', __(\"Manage assignments\", lepress_textdomain),__(\"Assignments\", lepress_textdomain).'<span id=\"lepress-student-assignments-count\"></span>',3, 'lepress-assignments',array(&$this, 'getSubMenuPageContent' ));\n\t\t \t//add_submenu_page('lepress', __(\"Manage groups\", lepress_textdomain),__(\"My groups\", lepress_textdomain),3, 'lepress-groups',array(&$this, 'getSubMenuPageContent' ));\n \t}\n }", "public function addChat($text)\n {\n $this->addEvent(\"chat\", $text);\n }", "function dce_admin_add_messages_page()\r\n{\r\n\tglobal $dce_admin_pages_slugs;\r\n\r\n\t// add messages page\r\n\t$dce_admin_pages_slugs[] = add_menu_page( __( 'Messages', 'dce' ), __( 'Users Messages', 'dce' ), 'manage_options', 'dce_admin_messages', 'dce_admin_messages_page_ui', 'dashicons-email-alt', 28 );\r\n}", "function add_cmd()\n\t{\n\t\tif(User::can_add(false,ANY_CATEGORY))\n\t\t{\n\t\t\trequire_once 'forms/edit.php';\n\t\t\t$this->add_form(new EditManageHelpForm());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tUrl::redirect_current();\n\t\t}\n\t}", "function forum_perms()\n\t{\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя изменить ID группы, попытайтесь снова\");\n\t\t}\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->page_title = \"Управление масками доступа\";\n\t\t$this->ipsclass->admin->page_detail = \"В этой секции вы можете изменить выбранную маску доступа.\";\n\t\t$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=permsplash', 'Управление масками доступа' );\n\t\t$this->ipsclass->admin->nav[] = array( '', 'Добавление/изменение масок доступа' )\t\t;\n\n\t\t$this->ipsclass->admin->page_detail .= \"<br />Для разрешения выполнения действия поставьте галочку, для запрета выполнения действия просто не ставьте или уберите галочку.\n\t\t\t\t\t\t\t <br />Атрибут &laquo;<b>Глобальный</b>&raquo; означает, что все маски доступа имеют права на выполнение этого действия, поэтому изменить этот параметр здесь нельзя.\n\t\t\t\t\t\t\t <br />Категории имеют настройки доступа только на просмотр, потому что остальные действия просто не применимы для категорий.\";\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => \"perm_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t$group = $this->ipsclass->DB->fetch_row();\n\n\t\t$gid = $group['perm_id'];\n\t\t$gname = $group['perm_name'];\n\n\t\t//-----------------------------------------\n\t\t//| EDIT NAME\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'donameedit' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'act' , 'group' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'id' , $gid ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 4 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t), \"nameForm\" );\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Изменение названия: \".$group['perm_name'] );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Название маски</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"perm_name\", $gname )\n\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form(\"Изменить\");\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\n\t\t//-----------------------------------------\n\t\t//| MAIN FORM\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dofedit' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'act' , 'group' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'id' , $gid ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 4 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) \t);\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Форум\" , \"25%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Просмотр форума<br /><input id='show' type='checkbox' onclick='checkcol(\\\"show\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Чтение тем<br /><input id='read' type='checkbox' onclick='checkcol(\\\"read\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Ответ в темы<br /><input id='reply' type='checkbox' onclick='checkcol(\\\"reply\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Создание тем<br /><input id='start' type='checkbox' onclick='checkcol(\\\"start\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Загрузка файлов<br /><input id='upload' type='checkbox' onclick='checkcol(\\\"upload\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Скачивание файлов<br /><input id='download' type='checkbox' onclick='checkcol(\\\"download\\\", this.checked );' />\" , \"10%\" );\n\n\t\t$forum_data = $this->forumfunc->ad_forums_forum_data();\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Параметры доступа: \".$group['perm_name'] );\n\n\t\tforeach( $forum_data as $r )\n\t\t{\n\t\t\t$show = \"\";\n\t\t\t$read = \"\";\n\t\t\t$start = \"\";\n\t\t\t$reply = \"\";\n\t\t\t$upload = \"\";\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['show_perms'] == '*')\n\t\t\t{\n\t\t\t\t$show = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['show_perms'] ) )\n\t\t\t{\n\t\t\t\t$show = \"<center><input type='checkbox' name='show_\".$r['id'].\"' id='show_\".$r['id'].\"' onclick=\\\"obj_checked('show', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$show = \"<center><input type='checkbox' name='show_\".$r['id'].\"' id='show_\".$r['id'].\"' onclick=\\\"obj_checked('show', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['read_perms'] == '*')\n\t\t\t{\n\t\t\t\t$read = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['read_perms'] ) )\n\t\t\t{\n\t\t\t\t$read = \"<center><input type='checkbox' name='read_\".$r['id'].\"' id='read_\".$r['id'].\"' onclick=\\\"obj_checked('read', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$read = \"<center><input type='checkbox' name='read_\".$r['id'].\"' id='read_\".$r['id'].\"' onclick=\\\"obj_checked('read', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['start_perms'] == '*')\n\t\t\t{\n\t\t\t\t$start = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['start_perms'] ) )\n\t\t\t{\n\t\t\t\t$start = \"<center><input type='checkbox' name='start_\".$r['id'].\"' id='start_\".$r['id'].\"' onclick=\\\"obj_checked('start', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$start = \"<center><input type='checkbox' name='start_\".$r['id'].\"' id='start_\".$r['id'].\"' onclick=\\\"obj_checked('start', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['reply_perms'] == '*')\n\t\t\t{\n\t\t\t\t$reply = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['reply_perms'] ) )\n\t\t\t{\n\t\t\t\t$reply = \"<center><input type='checkbox' name='reply_\".$r['id'].\"' id='reply_\".$r['id'].\"' onclick=\\\"obj_checked('reply', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$reply = \"<center><input type='checkbox' name='reply_\".$r['id'].\"' id='reply_\".$r['id'].\"' onclick=\\\"obj_checked('reply', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['upload_perms'] == '*')\n\t\t\t{\n\t\t\t\t$upload = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['upload_perms'] ) )\n\t\t\t{\n\t\t\t\t$upload = \"<center><input type='checkbox' name='upload_\".$r['id'].\"' id='upload_\".$r['id'].\"' onclick=\\\"obj_checked('upload', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$upload = \"<center><input type='checkbox' name='upload_\".$r['id'].\"' id='upload_\".$r['id'].\"' onclick=\\\"obj_checked('upload', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['download_perms'] == '*')\n\t\t\t{\n\t\t\t\t$download = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['download_perms'] ) )\n\t\t\t{\n\t\t\t\t$download = \"<center><input type='checkbox' name='download_\".$r['id'].\"' id='download_\".$r['id'].\"' onclick=\\\"obj_checked('download', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$download = \"<center><input type='checkbox' name='download_\".$r['id'].\"' id='download_\".$r['id'].\"' onclick=\\\"obj_checked('download', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\tif ( $r['root_forum'] )\n\t\t\t{\n\t\t\t\t$css = 'tablerow4';\n\t\t\t\t$download = $upload = $reply = $start = $read = \"<center>Не&nbsp;используется</center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$css = '';\n\t\t\t}\n\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='float:right;width:auto;'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t<input type='button' id='button' value='+' onclick='checkrow({$r['id']},true)' />&nbsp;<input type='button' id='button' value='-' onclick='checkrow({$r['id']},false)' />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <b>\".$r['depthed_name'].\"</b>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#ecd5d8; padding:4px;'>\".$show.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#dbe2de; padding:4px;'>\".$read.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#dbe6ea; padding:4px;'>\".$reply.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#d2d5f2; padding:4px;'>\".$start.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#ece6d8; padding:4px;'>\".$upload.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#dfdee9; padding:4px;'>\".$download.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t) ,$css );\n\n\t\t}\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form(\"Обновить настройки доступа\");\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t$this->ipsclass->html .= $this->html->permissions_js();\n\n\t\t$this->ipsclass->admin->output();\n\t}", "function addChatCommand($command_name, $command_help, $command_is_admin = false) {\n\t\tif ( $command_is_admin )\n\t\t\t{\n\t\t\t$this->chat_admin_cmd_count++;\n\t\t\t}\n\t\t$chat_command = new ChatCommand($command_name, $command_help, $command_is_admin);\n\t\t$this->chat_commands[] = $chat_command;\n\t}", "public function addToMenu()\n\t{\n\t\t$content = sprintf(\n\t\t\t\"$%s = (\\$user->hasPermission(%d)) ? new Link(route('report.%s'), _('%s %s %s')) : new Node();\",\n\t\t\tcamel_case(str_replace('.', '_', $this->class)),\n\t\t\t$this->permission,\n\t\t\t$this->route,\n\t\t\t$this->class,\n\t\t\t$this->sufix,\n\t\t\t'TODO'\n\t\t);\n\n\t\treturn parent::addToMenu($content);\n\t}", "function addChatCommand($command_name, $command_help, $command_is_admin = false) {\n\n\t\t$chat_command = new ChatCommand($command_name, $command_help, $command_is_admin);\n\t\t$this->chat_commands[] = $chat_command;\n\t}", "function LinkITMenu() {\n add_menu_page('123LinkIt', '123LinkIt', 'manage_options', 'LinkITPluginCentral', 'LinkITPluginCentral', 'http://www.123linkit.com/images/123linkit.favicon.gif', 3);\n }", "function add_submenu_item() {\n\t$link = admin_url( 'edit-tags.php' ) . '?taxonomy=dt_ext_connection_group&post_type=dt_ext_connection';\n\tadd_submenu_page(\n\t\t'distributor',\n\t\tesc_html__( 'External Connection Groups', 'distributor' ),\n\t\tesc_html__( 'External Connection Groups', 'distributor' ),\n\t\t'manage_options',\n\t\t$link\n\t);\n}", "private function createForumPermissions($id,$log=false){\n \t$admin = $this->_admin_permission = NewDao::getInstance()->insert('permissions',array('name'=>$this->getName() . '-admin'),$log);\n \t$editor = $this->_editor_permission = NewDao::getInstance()->insert('permissions',array('name'=>$this->getName() . '-editor'),$log);\n \t$user = $this->_user_permission = NewDao::getInstance()->insert('permissions',array('name'=>$this->getName() . '-user'),$log);\n \t\n \t$options = array('open'=>1,\t'view'=>1, 'create'=>1);\n \t\n \t$this->insertForumPermission($id,$user,$options,$log);\n \t\n \t$options['move']=1;\n \t$options['add-users']=1;\n \t$this->insertForumPermission($id,$editor,$options,$log);\n \t\n \t$options['remove']=1;\n \t$options['add-editors']=1;\n \t$options['restrict']=1;\n \t$options['free']=1;\n \t$this->insertForumPermission($id,$admin,$options,$log);\n }", "function add_admin_menu() {\n\t\t$this->readme_page = new Launchable_AdminPage();\n\n\t\t$this->menu_id = add_menu_page(\n\t\t\t__( 'Launchable Options', $this->text_domain ), // Page Title\n\t\t\t__( 'Launchable', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t$this->text_domain, // Slug\n\t\t\tarray(&$this->options_page, 'readme_page') );\n\n\t\t$this->options_page = new Launchable_AdminPage();\n\t\tadd_submenu_page(\n\t\t\t$this->text_domain, // Slug\n\t\t\t__( 'Readme', $this->text_domain ), // Page Title\n\t\t\t__( 'Readme', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t'launchable-readme',//$this->text_domain, // Menu Slug\n\t\t\tarray(&$this->readme_page, 'readme_page') );\n\t}", "private function add_ba_plugin_settings_link() {\n\t\tfunction ba_plugin_settings_link($links, $file) {\n\t\t\tif ( $file == plugin_basename( dirname(__FILE__).'/ba-dm-plugin.php' ) ) {\t\n\t\t\t\t# Einstelungs-Menü hinten\n\t\t\t\t$links[] = '<a href=\"'.admin_url('admin.php?page=ba_dm_plugin_menu').'\">'.__('Einstellungen', 'BA DM Plugin Menü').'</a>';\n\t\t\t\t\n\t\t\t\t# Einstelungs-Menü vorne\n\t\t\t\t#$link = '<a href=\"options-general.php?page=ba_dm_plugin_menu\">'.__('Einstellungen', 'BA DM Plugin Menü').'</a>';\n\t\t\t\t#array_unshift($links, $link);\t\n\t\t\t}\n\t\t\treturn $links;\n\t\t}\n\t\t\n\t\t# meldet ein Filter für ein Einstellungs-Link bei Plugins hinzu\n\t\tadd_filter( 'plugin_action_links', 'ba_plugin_settings_link', 10, 2);\n\t}", "function fatherly_fcr_register_admin_page()\n{\n add_submenu_page(\n 'tools.php',\n 'Feed Content Recirculation',\n 'Feed Content Recirculation',\n 'view_fatherly_settings',\n 'feed-content-recirculation',\n 'fatherly_fcr_process_admin_page'\n );\n}", "public function add_menu_items () {\n\t\t\n\t\t//add menu in wordpress dashboard\n\n\t\tadd_submenu_page(\n\t\t\t'ltple-settings',\n\t\t\t__( 'Affiliate Commissions', $this->plugin->slug ),\n\t\t\t__( 'Affiliate Commissions', $this->plugin->slug ),\n\t\t\t'edit_pages',\n\t\t\t'edit.php?post_type=affiliate-commission'\n\t\t);\n\t\t\n\t\tadd_users_page( \n\t\t\t'All Affiliates', \n\t\t\t'All Affiliates', \n\t\t\t'edit_pages',\n\t\t\t'users.php?' . $this->parent->_base .'view=affiliates'\n\t\t);\n\t}", "function bLinkCollaboration_ap() {\n global $bl_collaboration;\n if (!isset($bl_collaboration)) {\n return;\n }\n add_options_page(\"Blink Settings\", \"BLink Settings\", 9, __FILE__, array(&$bl_collaboration,'printAdminPage'));\n}", "function fbm_options_menu_link(){\n add_options_page(\n 'Facebook Me Options',\n 'Facebook Me Link',\n 'manage_options',\n 'fbm-options',\n 'fbm_options_content'\n );\n}", "public function register_tabs() {\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/base-form-tab.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/captcha.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/active-campaign.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/get-response.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/mailchimp.php' );\n\n\t\t$tabs = apply_filters( 'jet-engine/dashboard/form-tabs', array(\n\t\t\tnew Captcha(),\n\t\t\tnew Active_Campaign(),\n\t\t\tnew Get_Response(),\n\t\t\tnew Mailchimp(),\n\t\t) );\n\n\t\tforeach ( $tabs as $tab ) {\n\t\t\tif ( $tab instanceof Base_Form_Tab ) {\n\t\t\t\t$this->register_tab( $tab );\n\t\t\t}\n\t\t}\n\t}", "function registerChatCommands() {\n\t\tif ($this->debug) {\n\t\t\tif (isset($this->chat_commands)) {\n\t\t\t\tforeach ($this->chat_commands as $command) {\n\t\t\t\t\t// display message if debug mode is set to true ...\n\t\t\t\t\t$this->console_text('register chat command: ' . $command->name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function userTabs($user_id, $selected) {\n\t\tglobal $HTML;\n\n\t\t$_ = '';\n\t\t\n\t\t$_ .= '<ul class=\"tabs\">';\n\t\t\t$_ .= $HTML->link(\"Profile\", \"/janitor/admin/user/edit/\".$user_id, array(\"wrapper\" => \"li.profile\".($selected == \"profile\" ? \".selected\" : \"\")));\n\n\t\t\tif(defined(\"SITE_ITEMS\") && SITE_ITEMS):\n\t\t\t\t$_ .= $HTML->link(\"Content\", \"/janitor/admin/user/content/\".$user_id, array(\"wrapper\" => \"li.content\".($selected == \"content\" ? \".selected\" : \"\")));\n\n\t\t\t\t// readstates not available for guest user\n\t\t\t\t// if($user_id != 1):\n\t\t\t\t// \t$_ .= $HTML->link(\"Readstates\", \"/janitor/admin/user/readstates/\".$user_id, array(\"wrapper\" => \"li.readstates\".($selected == \"readstates\" ? \".selected\" : \"\")));\n\t\t\t\t// endif;\n\n\t\t\tendif;\n\n\t\t\t// maillist not available for guest user\n\t\t\tif(defined(\"SITE_SIGNUP\") && SITE_SIGNUP && $user_id != 1):\n\t\t\t\t$_ .= $HTML->link(\"Maillists\", \"/janitor/admin/user/maillists/\".$user_id, array(\"wrapper\" => \"li.maillist\".($selected == \"maillists\" ? \".selected\" : \"\")));\n\t\t\tendif;\n\t\n\t\t\t// orders not available for guest user\n\t\t\tif(defined(\"SITE_SHOP\") && SITE_SHOP && $user_id != 1):\n\t\t\t\t$_ .= $HTML->link(\"Orders\", \"/janitor/admin/user/orders/\".$user_id, array(\"wrapper\" => \"li.orders\".($selected == \"orders\" ? \".selected\" : \"\")));\n\t\t\tendif;\n\n\t\t\t// subscriptions not available for guest user\n\t\t\tif(defined(\"SITE_SUBSCRIPTIONS\") && SITE_SUBSCRIPTIONS && $user_id != 1):\n\t\t\t\t$_ .= $HTML->link(\"Subscriptions\", \"/janitor/admin/user/subscription/list/\".$user_id, array(\"wrapper\" => \"li.subscriptions\".($selected == \"subscriptions\" ? \".selected\" : \"\")));\n\t\t\tendif;\n\n\t\t\t// membership not available for guest user\n\t\t\tif(defined(\"SITE_MEMBERS\") && SITE_MEMBERS && $user_id != 1):\n\t\t\t\t$_ .= $HTML->link(\"Membership\", \"/janitor/admin/user/membership/view/\".$user_id, array(\"wrapper\" => \"li.membership\".($selected == \"membership\" ? \".selected\" : \"\")));\n\t\t\tendif;\n\n\t\t$_ .= '</ul>';\n\t\t\n\t\treturn $_;\n\t}", "public function get_aacp_backend() {\n\t // I don't know how to manage this other than using this capability, which\n\t // is used for both roles.\n\t $capability = 'moderate_comments'; \n add_menu_page( 'AACP Settings', 'AACP Settings', $capability, 'aacp-settings', array( $this, 'aacp_settings_page' ), 'dashicons-update' );\n\t}", "public function create()\n {\n //加载添加友情链接\n \n return view(\"admin.link.create\");\n }", "function training_tabs_callback() {\n ctools_include('menu');\n $tab_1 = array(\n 'title' => 'First tab',\n 'href' => 'training/ctools/tabs/tab1',\n );\n $tab_2 = array(\n 'title' => 'Second tab',\n 'href' => 'training/ctools/tabs/tab2',\n );\n ctools_menu_add_tab($tab_1);\n ctools_menu_add_tab($tab_2);\n if (arg(3) == 'tab2') {\n return t('Tab 2 content');\n }\n\n return t('Tab 1 content');\n}", "public function help_tab(){\r\n $screen = get_current_screen();\r\n\r\n foreach($this->what_helps as $help_id => $tab) {\r\n $callback_name = $this->generate_callback_name($help_id);\r\n if(method_exists($this, 'help_'.$callback_name.'_callback')) {\r\n $callback = array($this, 'help_'.$callback_name.'_callback');\r\n }\r\n else {\r\n $callback = array($this, 'help_callback');\r\n }\r\n // documentation tab\r\n $screen->add_help_tab( array(\r\n 'id' => 'hw-help-'.$help_id,\r\n 'title' => __( $tab['title'] ),\r\n //'content' => \"<p>sdfsgdgdfghfhfgh</p>\",\r\n 'callback' => $callback\r\n )\r\n );\r\n }\r\n }", "function wp_dashboard_incoming_links_control()\n {\n }", "function profileTabs($selected) {\n\t\tglobal $HTML;\n\n\t\t$_ = '';\n\t\t\n\t\t$_ .= '<ul class=\"tabs\">';\n\t\t\t$_ .= $HTML->link(\"Profile\", \"/janitor/admin/profile\", array(\"wrapper\" => \"li.profile\".($selected == \"profile\" ? \".selected\" : \"\")));\n\n\t\t\tif(defined(\"SITE_ITEMS\") && SITE_ITEMS):\n\t\t\t\t$_ .= $HTML->link(\"Content\", \"/janitor/admin/profile/content\", array(\"wrapper\" => \"li.content\".($selected == \"content\" ? \".selected\" : \"\")));\n\n\t\t\t\t// readstates not available for guest user\n\t\t\t\t// $_ .= $HTML->link(\"Readstates\", \"/janitor/admin/profile/readstates\", array(\"wrapper\" => \"li.readstates\".($selected == \"readstates\" ? \".selected\" : \"\")));\n\n\t\t\tendif;\n\n\t\t\t// maillist not available for guest user\n\t\t\tif(defined(\"SITE_SIGNUP\") && SITE_SIGNUP):\n\t\t\t\t$_ .= $HTML->link(\"Maillists\", \"/janitor/admin/profile/maillists\", array(\"wrapper\" => \"li.maillist\".($selected == \"maillists\" ? \".selected\" : \"\")));\n\t\t\tendif;\n\n\t\t\t// orders not available for guest user\n\t\t\tif(defined(\"SITE_SHOP\") && SITE_SHOP):\n\t\t\t\t$_ .= $HTML->link(\"Orders\", \"/janitor/admin/profile/orders/list\", array(\"wrapper\" => \"li.orders\".($selected == \"orders\" ? \".selected\" : \"\")));\n\t\t\tendif;\n\n\t\t\t// subscriptions not available for guest user\n\t\t\tif(defined(\"SITE_SUBSCRIPTIONS\") && SITE_SUBSCRIPTIONS):\n\t\t\t\t$_ .= $HTML->link(\"Subscriptions\", \"/janitor/admin/profile/subscription/list\", array(\"wrapper\" => \"li.subscriptions\".($selected == \"subscriptions\" ? \".selected\" : \"\")));\n\t\t\tendif;\n\n\t\t\t// membership not available for guest user\n\t\t\tif(defined(\"SITE_MEMBERS\") && SITE_MEMBERS):\n\t\t\t\t$_ .= $HTML->link(\"Membership\", \"/janitor/admin/profile/membership/view\", array(\"wrapper\" => \"li.membership\".($selected == \"membership\" ? \".selected\" : \"\")));\n\t\t\tendif;\n\n\t\t$_ .= '</ul>';\n\t\t\n\t\treturn $_;\n\t}", "protected function configurePermissions()\n {\n Jetstream::defaultApiTokenPermissions(['read']);\n\n Jetstream::role('admin', __('Yonetici'), [\n 'create',\n 'read',\n 'update',\n 'delete',\n ])->description(__('Şirket hakkındaki herşeyi yapabilir'));\n\n Jetstream::role('editor', __('İlan Yöneticisi'), [\n 'read',\n 'create',\n 'update',\n ])->description(__('Sadece ilanları yönetebilir'));\n Jetstream::role('operasyon', __('Operasyon Yöneticisi'), [\n 'read',\n 'create',\n 'update',\n ])->description(__('Sadece operasyonları yönetebilir'));\n\n }", "function add_from_tab_content () {\n require_once dirname(__FILE__).'/templates/form-tab-content.php';\n }", "public function permissions();", "public function permissions();", "public function permissions();", "public function permissions();", "public function permissions();", "function addMenu()\n{\n add_menu_page (\"Members and Email\", \"Members / Email\", 4, \"members-email-1\", \"MeMenu\" );\n add_submenu_page(\"members-email-1\", \"Email List\", \"Email\", 4, \"members-email-sub-1\", \"MeMenuSub1\");\n add_submenu_page(\"members-email-1\", \"Tracking\", \"Tracking Scripts\", 4, \"tracking-scripts-1\", \"MeMenuSub2\");\n\n\n}", "function _hippel_discussions_user_default_permissions() {\n $permissions = array();\n\n // Exported permission: create discuss content\n $permissions[] = array(\n 'name' => 'create discuss content',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n // Exported permission: create reply content\n $permissions[] = array(\n 'name' => 'create reply content',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n // Exported permission: edit own discuss content\n $permissions[] = array(\n 'name' => 'edit own discuss content',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n // Exported permission: edit own reply content\n $permissions[] = array(\n 'name' => 'edit own reply content',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n // Exported permission: use PHP for title patterns\n $permissions[] = array(\n 'name' => 'use PHP for title patterns',\n 'roles' => array(),\n );\n\n // Exported permission: use vote up/down\n $permissions[] = array(\n 'name' => 'use vote up/down',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n // Exported permission: use vote up/down on nodes\n $permissions[] = array(\n 'name' => 'use vote up/down on nodes',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n // Exported permission: view vote up/down count on nodes\n $permissions[] = array(\n 'name' => 'view vote up/down count on nodes',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n return $permissions;\n}", "public function add_menu()\n {\n add_options_page(__('Master Link Plugin Settings'), __('Master Link Plugin'), 'manage_options', 'master_link_plugin', array(\n &$this,\n 'plugin_settings_page'\n ));\n }", "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n return [\n 'gency.slack.some_permission' => [\n 'tab' => 'Slack',\n 'label' => 'Some permission'\n ],\n ];\n }", "function asb_message_quicktabs_default_quicktabs() {\n $export = array();\n $quicktabs = new stdClass();\n $quicktabs->disabled = FALSE; /* Edit this to true to make a default quicktabs disabled initially */\n $quicktabs->api_version = 1;\n $quicktabs->machine_name = 'notifications';\n $quicktabs->ajax = 0;\n $quicktabs->hide_empty_tabs = FALSE;\n $quicktabs->default_tab = 0;\n $quicktabs->title = 'Notifications';\n $quicktabs->tabs = array(\n 0 => array(\n 'bid' => 'asb_message_delta_pmessages',\n 'hide_title' => 1,\n 'title' => 'Messages',\n 'weight' => '-100',\n 'type' => 'block',\n ),\n 1 => array(\n 'bid' => 'views_delta_scheme_messages-block_1',\n 'hide_title' => 1,\n 'title' => 'Updates',\n 'weight' => '-99',\n 'type' => 'block',\n ),\n 2 => array(\n 'bid' => 'views_delta_2880e86ff984f3de669e71c0155d2bbc',\n 'hide_title' => 1,\n 'title' => 'Following',\n 'weight' => '-98',\n 'type' => 'block',\n ),\n );\n $quicktabs->renderer = 'quicktabs';\n $quicktabs->style = 'Asbtabs';\n $quicktabs->options = array();\n\n $export['notifications'] = $quicktabs;\n\n $quicktabs = new stdClass();\n $quicktabs->disabled = FALSE; /* Edit this to true to make a default quicktabs disabled initially */\n $quicktabs->api_version = 1;\n $quicktabs->machine_name = 'schemes';\n $quicktabs->ajax = 0;\n $quicktabs->hide_empty_tabs = TRUE;\n $quicktabs->default_tab = 0;\n $quicktabs->title = 'Schemes';\n $quicktabs->tabs = array(\n 0 => array(\n 'bid' => 'views_delta_scheme_list_for_users-block',\n 'hide_title' => 1,\n 'title' => 'All',\n 'weight' => '-100',\n 'type' => 'block',\n ),\n 1 => array(\n 'bid' => 'views_delta_scheme_list_for_users-block_1',\n 'hide_title' => 1,\n 'title' => 'I\\'ve Adopted',\n 'weight' => '-98',\n 'type' => 'block',\n ),\n 2 => array(\n 'bid' => 'views_delta_scheme_user_groups-block_2',\n 'hide_title' => 1,\n 'title' => 'I\\'m Running',\n 'weight' => '-97',\n 'type' => 'block',\n ),\n 3 => array(\n 'bid' => 'views_delta_scheme_user_groups-block_1',\n 'hide_title' => 1,\n 'title' => 'I\\'m a Member',\n 'weight' => '-96',\n 'type' => 'block',\n ),\n 4 => array(\n 'bid' => 'views_delta_scheme_user_groups-block_3',\n 'hide_title' => 1,\n 'title' => 'I\\'m Following',\n 'weight' => '-96',\n 'type' => 'block',\n ),\n );\n $quicktabs->renderer = 'quicktabs';\n $quicktabs->style = 'Asbtabs';\n $quicktabs->options = array();\n\n $export['schemes'] = $quicktabs;\n\n $quicktabs = new stdClass();\n $quicktabs->disabled = FALSE; /* Edit this to true to make a default quicktabs disabled initially */\n $quicktabs->api_version = 1;\n $quicktabs->machine_name = 'schemes_for_schemers';\n $quicktabs->ajax = 0;\n $quicktabs->hide_empty_tabs = TRUE;\n $quicktabs->default_tab = 0;\n $quicktabs->title = 'Schemes';\n $quicktabs->tabs = array(\n 0 => array(\n 'bid' => 'views_delta_scheme_list_for_users-block_2',\n 'hide_title' => 1,\n 'title' => 'All',\n 'weight' => '-100',\n 'type' => 'block',\n ),\n 1 => array(\n 'bid' => 'views_delta_scheme_user_groups-block_2',\n 'hide_title' => 1,\n 'title' => 'I\\'m Running',\n 'weight' => '-97',\n 'type' => 'block',\n ),\n 2 => array(\n 'bid' => 'views_delta_scheme_user_groups-block_3',\n 'hide_title' => 1,\n 'title' => 'I\\'m Following',\n 'weight' => '-97',\n 'type' => 'block',\n ),\n 3 => array(\n 'bid' => 'views_delta_scheme_user_groups-block_1',\n 'hide_title' => 1,\n 'title' => 'I\\'m a Member',\n 'weight' => '-96',\n 'type' => 'block',\n ),\n );\n $quicktabs->renderer = 'quicktabs';\n $quicktabs->style = 'Asbtabs';\n $quicktabs->options = array();\n\n $export['schemes_for_schemers'] = $quicktabs;\n\n return $export;\n}", "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n return [\n 'cifq.newsletter.some_permission' => [\n 'tab' => 'Newsletter',\n 'label' => 'Some permission'\n ],\n ];\n }", "public function action_chat_history() {\n\t\t$this->_template->set('page_title', 'All Messages');\n\t\t$this->_template->set('page_info', 'view and manage chat messages');\n\t\t$messages = ORM::factory('Message')->get_grouped_messages($this->_current_user->id);\n\t\t$this->_template->set('messages', $messages);\n\t\t$this->_set_content('messages');\n\t}", "function add_staff_tab() {\n\n\t\t\t$count = isset($_POST['count']) ? absint($_POST['count']) : false;\n\t\t\t$this->block_id = isset($_POST['block_id']) ? $_POST['block_id'] : 'mtheme-block-9999';\n\n\t\t\t//default key/value for the tab\n\t\t\t$tab = array(\n\t\t\t\t'social_text' => __('Social Site Name','mthemelocal'),\n\t\t\t\t'social_icon' => '',\n\t\t\t\t'social_link' => ''\n\t\t\t);\n\n\t\t\tif($count) {\n\t\t\t\t$this->tab($tab, $count);\n\t\t\t} else {\n\t\t\t\tdie(-1);\n\t\t\t}\n\n\t\t\tdie();\n\t\t}", "private function tab_navigation() {\n\t\t\techo '<div class=\"wpseo-local-metabox-menu\">';\n\t\t\techo '<ul role=\"tablist\" class=\"yoast-seo-local-aria-tabs\" aria-label=\"Yoast SEO: Local\">';\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$link_class = [ 'wpseo-local-meta-section-link' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$link_class[] = 'yoast-active-tab';\n\t\t\t\t}\n\n\t\t\t\techo '<li role=\"presentation\" ' . ( ( $active ) ? 'class=\"active\"' : '' ) . '>';\n\t\t\t\techo '<a role=\"tab\" href=\"#wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $link_class ) . '\" id=\"wpseo-local-tab-' . $tab['id'] . '-content\">';\n\t\t\t\techo '<span class=\"dashicons dashicons-' . $tab['icon'] . '\"></span>';\n\t\t\t\techo $tab['title'];\n\t\t\t\techo '</a>';\n\t\t\t\techo '</li>';\n\t\t\t}\n\t\t\techo '</ul>';\n\t\t\techo '</div> <!-- .wpseo-metabox-menu -->';\n\t\t}", "function set_can_create_list ($permission)\r\n {\r\n $_SESSION[\"can_create_list\"] = $permission;\r\n }", "public static function _admin_menu(){\n\t\tadd_options_page( 'aitch ref! Settings', 'aitch ref!', 'manage_options', 'aitch-ref', 'AitchRef::_options_page' );\n\t}", "public function registerPermissions()\n {\n return [\n 'vojtasvoboda.shopaholic_feeds.settings' => [\n 'tab' => 'Feeds for Shopaholic',\n 'label' => 'Manage feeds',\n ],\n ];\n }", "public function addAdminMenu() {\n add_submenu_page(\n 'options-general.php',\n __('NC State WRAP Auth', 'ncstate-wrap-authentication'),\n __('NC State WRAP Auth', 'ncstate-wrap-authentication'),\n 'edit_plugins',\n 'ncstate-wrap-authentication',\n array($this, 'settingsPage')\n );\n }", "function log_viewer_add_menu_item() {\n\techo '<li><a href=\"http://localhost/ds-plugins/log-viewer/page.php\">Log Viewer</a></li>';\n}", "protected function configurePermissions()\n {\n Jetstream::defaultApiTokenPermissions(['read']);\n\n Jetstream::role('admin', __('Administrator'), [\n 'create',\n 'read',\n 'update',\n 'delete',\n ])->description(__('Administrator users can perform any action.'));\n\n Jetstream::role('editor', __('Editor'), [\n 'read',\n 'create',\n 'update',\n ])->description(__('Editor users have the ability to read, create, and update.'));\n }", "function create_menu() {\n add_options_page(\"Category redirect\", \"Category redirect\", \"manage_options\", \"category-redirect\", array($this,'categ_url_hack_options')); \n\t\t}", "public function attachPermissions($permissions);", "public function cseMenuLinks() {\n\n\t\tif(Session::getSess('logged') == false) {\n\t\t\t$this->cseMenuLinks .= '\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/regUser\"><span>Регистрация</span></a></li>\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/logIn\"><span>Вход</span></a></li>\n\t\t\t';\n\t\t} else {\n\t\t\t$username = $this->setUrl('userNameDisplay');\n\t\t\t$this->cseMenuLinks .= '\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/userProfile/'. $username .'\"><span>Настройки</span></a></li>\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/logOut\"><span>Изход</span></a></li>\n\t\t\t';\n\t\t}\n\t}", "function SettingsController_DefineAdminPermissions_Handler(&$Sender) {\n if (isset($Sender->RequiredAdminPermissions)) {\n $Sender->RequiredAdminPermissions[] = 'Vanilla.Settings.Manage';\n $Sender->RequiredAdminPermissions[] = 'Vanilla.Categories.Manage';\n $Sender->RequiredAdminPermissions[] = 'Vanilla.Spam.Manage';\n }\n }", "protected function setLinksBar()\n {\n $mysidia = Registry::get(\"mysidia\");\n $this->linksBar = new Paragraph;\n $linkTitle = new Comment(\"{$mysidia->user->username}'s Links:\");\n $linkTitle->setBold();\n $this->linksBar->add($linkTitle);\n \n $linksList = new LinksList(\"ul\");\n $this->setLinks($linksList);\n \n $this->linksBar->add($linksList);\n $this->setDivision($this->linksBar);\n }", "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n return [\n 'hon.honcuratoruser.some_permission' => [\n 'tab' => 'HonCuratorUser',\n 'label' => 'Some permission'\n ],\n ];\n }", "function generateTabs($pScreenName, $pRestriction = ''){\n if(0 == count($this->getScreens())){\n return '';\n }\n\n $content = '';\n $tabs = array();\n $Screens =& $this->getScreens();\n\n if (\"List\" == $pScreenName){\n if(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\t\t\t$content = '';\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content = \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&amp;scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n break; //exits loop\n }\n }\n }\n } else {\n // $content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n //$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n } \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n } elseif (\"ListCtxTabs\" == $pScreenName){\n\t\t\n//$tabs['List'] = Array(\"list.php?$qs\", gettext(\"List|View the list of /**plural_record_name**/\"));\n\t\t\t$content = \"\\$tabs['List'] = array(\\\"list.php?\\$qs\\\", gettext(\\\"List|View the list of \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\tif(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n // $content .= \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&amp;scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n\n break; //exits loop\n }\n }\n }\n } else {\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t//$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n\t\t}elseif( \"EditScreenPermissions\" == $pScreenName ){\n\t\t\t$content = '';\n\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND isset($Screen->EditPermission) ){\n\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$Screen->EditPermission}';\\n\";\t\n\t\t\t\t}\n }\n\t\t\tif( $content != '' ){\n\t\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND !isset($Screen->EditPermission) ){\n\t\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$this->ModuleID}';\\n\";\t\n\t\t\t\t\t}\n }\n\t\t\t}\n\t\t\n\t\t}elseif( \"ListRecordMenu\" == $pScreenName ){ \n\t\t \n\t\t\t$recordMenuCounter = 0;\n\t\t\t\t\n\t\t\tforeach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n\t\t\t\t$recordMenu = '';\n\t\t\t\t$recordMenuEntries = '';\n\t\t\t\t\n switch( strtolower(get_class($Screen)) ){\n case \"viewscreen\":\n $handler = \"view.php\"; \n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n\t\t\t\t$recordMenu = '$recordMenuEntries['.$Screen->name.']='.\"'{ text: \\\"'.strip_tags( ShortPhrase( gettext(\\\"{$phrase}\\\") ) ).'\\\" }';\\n\";\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n\t\t\t\tif( ( \"view\" == $pRestriction && \"viewscreen\" == strtolower(get_class($Screen)) ) \n\t\t\t\t || (\"view\" != $pRestriction) ){\n\t\t\t\t\tif($linkTo == ''){\t\t\t\t\t\t\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl={$this->ModuleID}\\\";\\n\"; \n\t\t\t\t\t} else {\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl=$linkTo\\\";\\n\"; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\n if( in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen')) ){ \n\t\t\t\t\t$recordMenuList .= $recordMenu;\n\t\t\t\t\t$recordMenuURLList .= $recordMenuURL;\t\t\t\t\t\n }\n }\t\t\t\n\t\t\t\n\t\t\t$content = $recordMenuList.$recordMenuURLList;\n\t\n\t\t}else {\n print \"m. GenerateTabs: current screen $pScreenName\\n\";\n\n $currentScreen = $this->getScreen($pScreenName);\n\n foreach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n switch(strtolower(get_class($Screen))){\n case \"viewscreen\":\n $handler = \"view.php\";\n /* if(in_array($this->SingularRecordName[0], array('a','e','i','o','h','y','A','E','I','O','H','Y'))){\n $a = 'an';\n } else {\n $a = 'a';\n } */\n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n if ($pScreenName != $Screen->name){\n if ( ( \"view\" == $pRestriction \n\t\t\t\t\t && ( \"viewscreen\" == strtolower( get_class($Screen) ) \n\t\t\t\t\t || \"recordreportscreen\" == strtolower( get_class($Screen) ) ) ) \n\t\t\t\t\t || (\"view\" != $pRestriction) ){\n\n //insert link\n if($linkTo == ''){\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?scr={$Screen->name}&amp;\\$tabsQS\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n } else {\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?mdl=$linkTo&amp;rid=\\$recordID\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n }\n } else {\n //Current screen: insert name only\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n\n if(in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen'))){\n $content .= $tab;\n }\n }\n }\n\n return $content;\n }", "function siteorigin_panels_add_help_tab_content(){\n\tinclude 'tpl/help.php';\n}", "function register_links_list_widget()\n{\n register_widget( 'VF_Widget_Links_List' );\n}", "function bd_custom_tabs_Widget(){\n\n\t\t// Widget settings\n\t\t$ops = array('classname' => 'widget_custom_tabs', 'description' => __('3 tabs: last posts, popular posts, and last comments', 'wolf'));\n\n\t\t/* Create the widget. */\n\t\tparent::__construct( 'widget_custom_tabs', __('Custom tabs', 'wolf'), $ops );\n\t\t\n\t}", "protected function configurePermissions()\n {\n Jetstream::defaultApiTokenPermissions(['read']);\n\n Jetstream::permissions([\n 'create',\n 'read',\n 'update',\n 'delete',\n ]);\n }", "function blankPlugin_add_settings_link( $links ) {\n $settings_link = '<a href=\"admin.php?page=blankPlugin\">' . __( 'Settings', 'blankPlugin' ) . '</a>';\n array_push( $links, $settings_link );\n \treturn $links;\n}" ]
[ "0.59826857", "0.590656", "0.57936984", "0.57907265", "0.5692343", "0.5658032", "0.55153906", "0.5503926", "0.5476798", "0.5474076", "0.5468448", "0.54637647", "0.5449629", "0.5445339", "0.54134935", "0.54037017", "0.54030234", "0.538387", "0.5356079", "0.5303706", "0.5296536", "0.5290069", "0.5271407", "0.5253415", "0.52498627", "0.52436167", "0.5242014", "0.52352726", "0.5222613", "0.51992023", "0.5197544", "0.51968217", "0.5195663", "0.5190923", "0.5189475", "0.51849025", "0.518406", "0.5181531", "0.51802444", "0.5178908", "0.5175502", "0.5173237", "0.5167405", "0.51653016", "0.51572156", "0.51481485", "0.5140709", "0.51374716", "0.51355255", "0.51285315", "0.5121243", "0.51114416", "0.5100813", "0.5094716", "0.5093958", "0.5090797", "0.50847566", "0.50816905", "0.507979", "0.50735325", "0.5073464", "0.5062889", "0.5057704", "0.505483", "0.50532436", "0.5048268", "0.5041626", "0.5033795", "0.5031511", "0.5031511", "0.5031511", "0.5031511", "0.5031511", "0.50134975", "0.50107056", "0.5003203", "0.50019157", "0.49984422", "0.49940073", "0.49919653", "0.49909616", "0.4988325", "0.49827158", "0.49798414", "0.4976608", "0.49622375", "0.496196", "0.49599987", "0.49594492", "0.49577764", "0.49565798", "0.49553403", "0.49547973", "0.49526957", "0.49520504", "0.495116", "0.49503165", "0.4949242", "0.49469414", "0.49375242" ]
0.5209355
29
Loads the actual filter.
public function load() { $placement = $this->createPoint($this->x, $this->y); $size = $this->createBox($this->width, $this->height); $background = $this->createColor($this->background); return new Canvas($this->factory, $size, $placement, $background); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadFilters()\n {\n require __DIR__.'/filters.php';\n }", "public function load()\n\t{\n\t\t$this->options = apply_filters($this->filterName, get_option($this->filterName));\n\t}", "public function filterLoad($asset) {}", "public function __construct(\\Shield\\Filter $filter)\n {\n $this->filter = $filter;\n $this->load();\n }", "function LoadFilter($type, $name)\n {\n $this->_smarty->load_filter($type, $name);\n }", "public function loadFilter($type, $name)\n {\n $this->sm->loadFilter($type, $name);\n }", "protected static function loadFiltersData()\n {\n self::$filtersData = (array) $GLOBALS['TSFE']->fe_user->getKey('ses', 'filters');\n }", "public function register_filters() {\n\n\t\t}", "public function __construct()\n {\n $this->setupFilters();\n }", "function filter_load() {\r\n\t\tadd_action( current_filter(), array( $this, 'setup_vars' ), 20 );\r\n\t\tadd_action( 'restrict_manage_posts', array( $this, 'get_select' ) );\r\n\t\tadd_filter( \"manage_taxonomies_for_{$this->post_type}_columns\", array( $this, 'add_columns' ) );\r\n\t}", "public function filterLoad(AssetInterface $asset)\n {\n\n }", "public function createFilter();", "public function getFilter();", "public function getFilter();", "function add_filters()\n {\n }", "public function getFilter(){ }", "public function filterLoad(AssetInterface $asset)\n {\n // Implement filterLoad() method.\n }", "function rs_duotonefilters_init(){\n\n\tnew RsDuotoneFiltersBase();\n\t\n}", "public function beforeFilter(){\n\t $this->LoadModel(\"RestaurantInfo\");\n\t $this->LoadModel(\"Food\");\n\t $this->LoadModel(\"FoodReview\");\n\t $this->LoadModel(\"FeedBack\");\n\t $this->LoadModel(\"Restaurant\");\n\t $this->LoadModel(\"User\");\n\t }", "public function setFilter($filter){ }", "public function addFilters()\n {\n }", "protected function getLiipImagine_Filter_ManagerService()\n {\n $this->services['liip_imagine.filter.manager'] = $instance = new \\Liip\\ImagineBundle\\Imagine\\Filter\\FilterManager($this->get('liip_imagine.filter.configuration'), $this->get('liip_imagine'), $this->get('liip_imagine.binary.mime_type_guesser'));\n\n $instance->addLoader('relative_resize', $this->get('liip_imagine.filter.loader.relative_resize'));\n $instance->addLoader('resize', $this->get('liip_imagine.filter.loader.resize'));\n $instance->addLoader('thumbnail', $this->get('liip_imagine.filter.loader.thumbnail'));\n $instance->addLoader('crop', $this->get('liip_imagine.filter.loader.crop'));\n $instance->addLoader('grayscale', $this->get('liip_imagine.filter.loader.grayscale'));\n $instance->addLoader('paste', $this->get('liip_imagine.filter.loader.paste'));\n $instance->addLoader('watermark', $this->get('liip_imagine.filter.loader.watermark'));\n $instance->addLoader('background', $this->get('liip_imagine.filter.loader.background'));\n $instance->addLoader('strip', $this->get('liip_imagine.filter.loader.strip'));\n $instance->addLoader('scale', $this->get('liip_imagine.filter.loader.scale'));\n $instance->addLoader('upscale', $this->get('liip_imagine.filter.loader.upscale'));\n $instance->addLoader('downscale', $this->get('liip_imagine.filter.loader.downscale'));\n $instance->addLoader('auto_rotate', $this->get('liip_imagine.filter.loader.auto_rotate'));\n $instance->addLoader('rotate', $this->get('liip_imagine.filter.loader.rotate'));\n $instance->addLoader('flip', $this->get('liip_imagine.filter.loader.flip'));\n $instance->addLoader('interlace', $this->get('liip_imagine.filter.loader.interlace'));\n $instance->addPostProcessor('jpegoptim', $this->get('liip_imagine.filter.post_processor.jpegoptim'));\n $instance->addPostProcessor('optipng', $this->get('liip_imagine.filter.post_processor.optipng'));\n $instance->addPostProcessor('pngquant', $this->get('liip_imagine.filter.post_processor.pngquant'));\n $instance->addPostProcessor('mozjpeg', $this->get('liip_imagine.filter.post_processor.mozjpeg'));\n\n return $instance;\n }", "public function __construct()\n {\n $this->beforeFilter(function()\n {\n\n });\n }", "public function addFilter(FilterInterface $filter) : void\n {\n $this->getLoader()->addFilter($filter);\n }", "public function setupFilterRules()\n { }", "public function loadFilteredPolicy($filter) : void\n {\n $this->model->clearPolicy();\n\n if (!$this->adapter instanceof AdapterFiltered)\n {\n throw new GodException('filtered policies are not supported by this adapter');\n }\n\n /** @var AdapterFiltered $adapterFiltered */\n $adapterFiltered = $this->adapter;\n\n $adapterFiltered->loadFilteredPolicy($this->model, $filter);\n\n $this->model->PrintPolicy();\n\n if ($this->autoBuildRoleLinks)\n {\n $this->buildRoleLinks();\n }\n }", "public function loadFilteredPolicy(Model $model, $filter) : void;", "function beforeFilter() {\n }", "abstract public function prepareFilters();", "private function filters() {\n\n\n\t}", "function filter(){\r\n\r\n return new BFilter();\r\n\r\n}", "public function requestFilters()\n\t{\n\t\t$this->services->Common->ajaxCheck();\n\t\t$this->timber->filter->issueDetect();\n\t\t$this->timber->filter->configLibs();\n\t}", "private function setFilter()\n\t{\n\t\t// get filter values\n\t\t$this->filter['language'] = ($this->getParameter('language', 'array') != '') ? $this->getParameter('language', 'array') : BL::getWorkingLanguage();\n\t\t$this->filter['application'] = $this->getParameter('application');\n\t\t$this->filter['module'] = $this->getParameter('module');\n\t\t$this->filter['type'] = $this->getParameter('type', 'array');\n\t\t$this->filter['name'] = $this->getParameter('name');\n\t\t$this->filter['value'] = $this->getParameter('value');\n\n\t\t// build query for filter\n\t\t$this->filterQuery = BackendLocaleModel::buildURLQueryByFilter($this->filter);\n\t}", "abstract public function getFilterClass();", "function kses_init_filters()\n {\n }", "function get_filters($init_data = true) {\n //no filters by default\n return array();\n }", "abstract protected function getFilters();", "public function __construct()\n{\n\tparent::__construct();\n\t$this->load->helper('filter');\n}", "public function filter($filter)\n {\n }", "public function beforeFilter() : void\n {\n parent::beforeFilter();\n $this->loadModel('Cart');\n $this->loadModel('Purchase');\n }", "public function filter_init()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n ob_start(); // This prevents themes and plugins from screwing us over.\n $this->ajax_router();\n }", "function ALMFilters(){\n \tglobal $ALMFilters;\n \tif( !isset($ALMFilters) ){\n \t\t$ALMFilters = new ALMFilters();\n \t}\n \treturn $ALMFilters;\n }", "public static function initialize() {\r\n\t\t/*\r\n\t\t * The filters are only useful for front-end posts/pages; exit if in the admin section\r\n\t\t */\r\n\t\tif ( is_admin() )\r\n\t\t\treturn;\r\n\r\n\t\t/*\r\n\t\t * add_filter parameters:\r\n\t\t * $tag - name of the hook you're filtering; defined by [mla_gallery]\r\n\t\t * $function_to_add - function to be called when [mla_gallery] applies the filter\r\n\t\t * $priority - default 10; lower runs earlier, higher runs later\r\n\t\t * $accepted_args - number of arguments your function accepts\r\n\t\t */\r\n\t\tadd_filter( 'mla_gallery_attributes', 'MLAProjectSlugExample::mla_gallery_attributes_filter', 10, 1 );\r\n\t}", "private function loadFiltersFromQuery(): void\n {\n $request = RequestUtil::getMainRequest($this->requestStack) ?? Request::createFromGlobals();\n $requestFilters = $request->query->all('filter');\n\n if (is_array($requestFilters)) {\n foreach ($requestFilters as $name => $limitations) {\n foreach ($limitations as $comparison => $value) {\n $filterField = new FilterField();\n $filterField->setName($name)\n ->setValue($value)\n ->setComparison($comparison)\n ->setFilter($this->getFilterByName($name));\n\n $this->filterFields[] = $filterField;\n }\n }\n }\n }", "function beforeFilter() {\r\n parent::beforeFilter();\r\n }", "private static function _getFilter() {}", "function beforeFilter() {\n parent::beforeFilter();\n }", "protected function init() {\n parent::init('search_template_filter');\n }", "function __construct() {\n\n\t\tadd_filter( WpSolrFilters::WPSOLR_FILTER_INCLUDE_FILE, [ $this, 'wpsolr_filter_include_file' ], 10, 1 );\n\t}", "function init_filter($id, $init_data = true) {\n global $CFG;\n if (!isset($this->filter) && $filters = $this->get_filters($init_data)) {\n $dynamic_report_filter_url = $CFG->wwwroot . '/blocks/php_report/dynamicreport.php?id=' . $id;\n $this->filter = new php_report_default_capable_filtering($filters, $dynamic_report_filter_url, null, $id, $this->get_report_shortname());\n }\n }", "public function __construct($filterParams = [])\n {\n $this->filterParams = $filterParams;\n $this->init();\n }", "public static function initialize() {\r\n\t\t/*\r\n\t\t * The filters are only useful in the admin section; exit if in the \"front-end\" posts/pages. \r\n\t\t */\r\n\t\tif ( ! is_admin() )\r\n\t\t\treturn;\r\n\r\n\t\tadd_filter( 'mla_mapping_settings', 'MLAHierarchicalMappingExample::mla_mapping_settings', 10, 4 );\r\n\t\tadd_filter( 'mla_mapping_exif_value', 'MLAHierarchicalMappingExample::mla_mapping_exif_value', 10, 5 );\r\n\t\tadd_filter( 'mla_mapping_updates', 'MLAHierarchicalMappingExample::mla_mapping_updates', 10, 5 );\r\n\t}", "public static function initialize() {\r\n\t\t// The filters are only useful for front-end posts/pages; exit if in the admin section\r\n\t\tif ( is_admin() )\r\n\t\t\treturn;\r\n\r\n\t\tadd_filter( 'mla_gallery_attributes', 'MLAMultiSearchExample::mla_gallery_attributes', 10, 1 );\r\n\t\tadd_filter( 'mla_gallery_query_arguments', 'MLAMultiSearchExample::mla_gallery_query_arguments', 10, 1 );\r\n\t}", "public function __construct()\n {\n $this->beforeFilter('csfr', array('on' => 'post'));\n }", "protected function _loadFilter($filter, $options = null)\n {\n $instance = null;\n\n if (!empty($filter)) {\n $className = 'iPhorm_Filter_' . ucfirst($filter);\n if (class_exists($className)) {\n $instance = new $className($options);\n }\n }\n\n if ($instance == null) {\n throw new Exception(\"Filter '$filter' does not exist\");\n }\n\n return $instance;\n }", "public function __construct(FilteredLoaderInterface $loader)\n {\n $this->loader = $loader;\n }", "public function GetFilters ();", "function beforeFilter(){\n\t\tparent::beforeFilter(); \n\t}", "protected function registerFilterChain()\n\t{\n\t\t//filters\n\t\t$this->filters['deserial'] = 'deserializationFilter';\n\t\t$this->filters['batch'] = 'batchProcessFilter';\n\t\t$this->filters['serialize'] = 'serializationFilter';\n\t}", "public static function init() {\n\t\tadd_filter( 'attachment_fields_to_edit', array( self::$class_name, 'apply_filter_attachment_fields_to_edit' ), null, 2 );\n\n\t\t// Add the filter for saving the custom url field\n\t\tadd_filter( 'attachment_fields_to_save', array( self::$class_name, 'apply_filter_attachment_fields_to_save' ), null , 2 );\n\n\t\t// Add the filter for when the post_gallery is written out\n\t\tadd_filter( 'post_gallery', array( self::$class_name, 'apply_filter_post_gallery' ), 999, 2 );\n\n\n\t}", "public function setFilter(bool $filter): AssetInterface\n {\n }", "function setFilter($filter) {\n\t\t$this->_filter = $filter;\n\t}", "private function loadFiltersFromAttributes(): void\n {\n $request = RequestUtil::getMainRequest($this->requestStack) ?? Request::createFromGlobals();\n foreach ($request->attributes->getIterator() as $key => $value) {\n $key = (string) $key;\n if ($this->getFilterByName($key) === null) {\n continue;\n }\n\n $filterField = new FilterField();\n $filterField->setName($key)\n ->setValue($value)\n ->setComparison(Api\\Filter::COMPARISON_EQUALS)\n ->setFilter($this->getFilterByName($key));\n\n $this->filterFields[] = $filterField;\n }\n }", "public function setFilter(string $filter);", "public function beforeFilter() {\n\t}", "function mFILTER(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$FILTER;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:211:3: ( 'filter' ) \n // Tokenizer11.g:212:3: 'filter' \n {\n $this->matchString(\"filter\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function filter() {\r\n\t\t$this->resource->filter();\r\n\t}", "public function beforeFilter()\n\t{\n\n\t}", "protected function initFilterFields(): void\n {\n $this->filterSliderFields = $this->filterSliderFields();\n $this->filterNumericFields = $this->filterNumericFields();\n $this->filterDropdownFields = $this->filterDropdownFields();\n }", "public function testInitFilter() {\n\n\t\t$filter = new SlashFilter;\n\n\t\t$this->assertInstanceOf('HybridLogic\\Slack\\SlashFilter', $filter);\n\n\t}", "function LoadDefaultFilters() {\n\t\tglobal $dealers_reports;\n\n\t\t/**\n\t\t* Set up default values for non Text filters\n\t\t*/\n\n\t\t// Field StartDate\n\t\t$dealers_reports->StartDate->DefaultDropDownValue = EWRPT_INIT_VALUE;\n\t\t$dealers_reports->StartDate->DropDownValue = $dealers_reports->StartDate->DefaultDropDownValue;\n\n\t\t/**\n\t\t* Set up default values for extended filters\n\t\t* function SetDefaultExtFilter(&$fld, $so1, $sv1, $sc, $so2, $sv2)\n\t\t* Parameters:\n\t\t* $fld - Field object\n\t\t* $so1 - Default search operator 1\n\t\t* $sv1 - Default ext filter value 1\n\t\t* $sc - Default search condition (if operator 2 is enabled)\n\t\t* $so2 - Default search operator 2 (if operator 2 is enabled)\n\t\t* $sv2 - Default ext filter value 2 (if operator 2 is enabled)\n\t\t*/\n\n\t\t/**\n\t\t* Set up default values for popup filters\n\t\t*/\n\t}", "protected function afterLoad()\n {\n if ($this->_data &&\n $this->agenda instanceof \\Gems_Agenda &&\n ! $this->_subFilters) {\n\n // Flexible determination of filters to load. Save for future expansion of numbe rof fields\n $i = 1;\n $field = 'gaf_filter_text' . $i;\n $filterIds = array();\n while (array_key_exists($field, $this->_data)) {\n if ($this->_data[$field]) {\n $filterIds[] = intval($this->_data[$field]);\n }\n $i++;\n $field = 'gaf_filter_text' . $i;\n }\n\n if ($filterIds) {\n $filterObjects = $this->agenda->getFilters(\"SELECT *\n FROM gems__appointment_filters \n WHERE gaf_id IN (\" . implode(', ', $filterIds) . \")\n ORDER BY gaf_id_order\");\n\n // The order we get the filters may not be the same as the one in which they are specified\n foreach ($filterIds as $id) {\n foreach ($filterObjects as $filterObject) {\n if ($filterObject instanceof AppointmentFilterInterface) {\n if ($filterObject->getFilterId() == $id) {\n $this->_subFilters[$id] = $filterObject;\n break;\n }\n }\n }\n }\n }\n }\n }", "function xh_fetchFilter($filter_name)\r\n\t{\r\n\t}", "public function register()\n {\n Filter::register();\n }", "function _prepare_filter_data () {\n\t\t// Filter session array name\n\t\t$this->_filter_name\t= $_GET[\"object\"].\"_filter\";\n\t\t// Connect common used arrays\n\t\tif (file_exists(INCLUDE_PATH.\"common_code.php\")) {\n\t\t\tinclude (INCLUDE_PATH.\"common_code.php\");\n\t\t}\n\t\t// Fields in the filter\n\t\t$this->_fields_in_filter = array(\n\t\t\t\"engine\",\n\t\t\t\"text\",\n\t\t);\n\t}", "public function beforeFilter()\r\n\t {\r\n\t parent::beforeFilter();\r\n\t }", "private function addInputFilter()\n {\n $inputFilter = new InputFilter();\n $this->setInputFilter($inputFilter);\n\n }", "function getFilter()\n\t{\n\t\treturn $this->_filter;\n\t}", "function initialize() {\n\t\t\n\t\t// only once\n\t\tif( $this->initialized++ ) return;\n\t\t\n\t\t// add filters\n\t\tadd_filter( 'acf/pre_load_value', \t\tarray($this, 'pre_load_value'), \t10, 3 );\n\t\tadd_filter( 'acf/pre_load_reference', \tarray($this, 'pre_load_reference'), 10, 3 );\n\t\tadd_filter( 'acf/pre_load_post_id', \tarray($this, 'pre_load_post_id'), \t10, 2 );\n\t\tadd_filter( 'acf/pre_load_meta', \t\tarray($this, 'pre_load_meta'), \t\t10, 2 );\n\t}", "private function initInputFilter($di) {\n\t\t\t$di->set('inputFilter', function(){\n\t\t\t\n\t\t\t\treturn new FilterOptions();\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t}", "function getFilter() {\n\t\treturn $this->_filter;\n\t}", "protected function getLoader() : FilteredLoaderInterface\n {\n return $this->loader;\n }", "protected static function filtes()\n {\n /*\n * The filters fetches are transported\n * to router Bus calls\n **/\n }", "protected function initFilter($key = '')\n {\n $filter = array();\n $clearCache = isset($this->piVars['clear_cache']) ? $this->piVars['clear_cache'] : GeneralUtility::_GP('clear_cache');\n // If cache is not cleared, retrieve cached filter\n if (empty($clearCache)) {\n if (empty($key)) {\n $key = 'default';\n }\n $cacheKey = $this->prefixId . '_filterCache_' . $key . '_' . $this->cObj->data['uid'] . '_' . $GLOBALS['TSFE']->id;\n $cache = $GLOBALS['TSFE']->fe_user->getKey('ses', $cacheKey);\n if (isset($cache)) {\n $filter = $cache;\n }\n }\n // Declare hook for extending the initialisation of the filter\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['extendInitFilter'])) {\n foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['extendInitFilter'] as $className) {\n $hookObject = GeneralUtility::getUserObj($className);\n $filter = $hookObject->extendInitFilter($filter, $this);\n }\n }\n return $filter;\n }", "public function show(Filter $filter)\n {\n //\n }", "function _dotgo_filter_prepare() {\n\n}", "public function getLoadFilter () \n {\n $filter = \n [\n StatRecord::SCOPE_ID => $this->scopeId,\n StatRecord::GROUP_TYPE => $this->grouping->getId(),\n StatRecord::TIME => $this->getRows(),\n StatRecord::EVENT_ID => array_values($this->fields),\n ];\n \n if (is_numeric($this->groupInnerId)) {\n $filter[StatRecord::GROUP_ID] = $this->groupInnerId;\n }\n \n return $filter;\n }", "protected function initializeFilters()\r\n\t{\r\n\t\t$this->iso_filterFields = deserialize($this->iso_filterFields, true);\r\n\t\t\r\n\t\tif(!empty($this->iso_filterFields))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->iso_filterTpl)\r\n\t\t{\r\n\t\t\t$this->strTemplate = $this->iso_filterTpl;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "function applyFilterOnResource( &$resource, $filter_name='', $options=array())\n {\n if (Image_Filter::loadFilter($filter_name)){\n $class = 'Image_Filter_'.$filter_name;\n call_user_func(array($class,'applyFilterOnResource'), $resource, $options);\n }\n }", "public function registerFilter(Chainr_Filter $filter) {\n\t\t$this->filterChain->register($filter);\n\t}", "public function loadFilteredPolicy(Model $model, $filter) : void\n {\n if (!$this->filterValidate($filter))\n {\n $this->loadPolicy($model);\n return;\n }\n\n try\n {\n $this->loadFilteredPolicyDB($model, $filter);\n\n $this->filtered = true;\n }\n catch (\\Exception $e)\n {\n throw new GodException($e->getMessage());\n }\n }", "protected function getFilter()\n {\n return $this->filter;\n }", "private function loadFilters() {\n\n // buscando usuários\n $companyId = $this->Session->read('CompanyLoggedIn.Company.id');\n $params = array(\n 'CompaniesUser' => array(\n 'fields' => array(\n 'CompaniesUser.user_id'\n ),\n 'conditions' => array(\n 'CompaniesUser.status' => 'ACTIVE'\n )\n )\n );\n $userIds = $this->Utility->urlRequestToGetData('companies', 'list', $params);\n if (!empty($userIds) && empty($userIds ['status'])) {\n $_SESSION ['addOffer'] ['userIds'] = $userIds;\n\n // conta público alvo\n $this->offerFilters ['target'] = count($userIds);\n\n // busca os filtros\n foreach ($this->offerFilters as $key => $value) {\n if ($key == 'gender') {\n $Paramsgenero = array(\n 'CompaniesUser' => array(\n 'fields' => array(\n \"COUNT(User.id) AS count\",\n \"User.gender AS filter\"\n ),\n 'group' => array(\n \"User.gender\"\n ),\n 'order' => array(\n 'COUNT(User.id)' => 'DESC'\n )\n ),\n 'User' => array()\n );\n $filter = $this->Utility->urlRequestToGetData('users', 'all', $Paramsgenero);\n } else if ($key == 'age_group') {\n // busca faixa etária\n $query = \"SELECT\n\t\t\t\t\t SUM(IF(age < 20,1,0)) AS '{$this->ageGroupRangeKeys['0_20']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 20 AND 29,1,0)) AS '{$this->ageGroupRangeKeys['20_29']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 30 AND 39,1,0)) AS '{$this->ageGroupRangeKeys['30_39']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 40 AND 49,1,0)) AS '{$this->ageGroupRangeKeys['40_49']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 50 AND 59,1,0)) AS '{$this->ageGroupRangeKeys['50_59']}',\n\t\t\t\t\t SUM(IF(age >=60, 1, 0)) AS '{$this->ageGroupRangeKeys['60_120']}',\n\t\t\t\t\t SUM(IF(age IS NULL, 1, 0)) AS '{$this->ageGroupRangeKeys['empty']}'\n\t\t\t\t\t\tFROM (SELECT YEAR(CURDATE())-YEAR(birthday) AS age FROM facebook_profiles) AS derived\";\n\n $filterParams = array(\n 'FacebookProfile' => array(\n 'query' => $query\n )\n );\n $filter = $this->Utility->urlRequestToGetData('users', 'query', $filterParams);\n } else {\n $filterParams = array(\n 'FacebookProfile' => array(\n 'fields' => array(\n \"COUNT(FacebookProfile.{$key}) AS count\",\n \"FacebookProfile.{$key} AS filter\"\n ),\n 'conditions' => array(\n 'FacebookProfile.user_id' => $userIds\n ),\n 'group' => array(\n \"FacebookProfile.{$key}\"\n ),\n 'order' => array(\n \"FacebookProfile.{$key}\" => 'ASC'\n )\n )\n );\n $filter = $this->Utility->urlRequestToGetData('users', 'all', $filterParams);\n }\n if (!empty($filter) && empty($filter ['status'])) {\n $this->offerFilters [$key] = $this->formatOfferFilters($filter);\n }\n }\n return $this->offerFilters;\n } else {\n $this->Session->setFlash('Houve um problema para carregar os filtros. Tente novamente.');\n }\n }", "public function beforeFilter()\n {\n parent::beforeFilter();\n }", "public function beforeFilter()\n {\n parent::beforeFilter();\n }", "function LoadDefaultFilters() {\n\t\tglobal $deals_details;\n\n\t\t/**\n\t\t* Set up default values for non Text filters\n\t\t*/\n\n\t\t// Field dealer\n\t\t$deals_details->dealer->DefaultDropDownValue = EWRPT_INIT_VALUE;\n\t\t$deals_details->dealer->DropDownValue = $deals_details->dealer->DefaultDropDownValue;\n\n\t\t// Field date_start\n\t\t$deals_details->date_start->DefaultDropDownValue = EWRPT_INIT_VALUE;\n\t\t$deals_details->date_start->DropDownValue = $deals_details->date_start->DefaultDropDownValue;\n\n\t\t// Field status\n\t\t$deals_details->status->DefaultDropDownValue = EWRPT_INIT_VALUE;\n\t\t$deals_details->status->DropDownValue = $deals_details->status->DefaultDropDownValue;\n\n\t\t/**\n\t\t* Set up default values for extended filters\n\t\t* function SetDefaultExtFilter(&$fld, $so1, $sv1, $sc, $so2, $sv2)\n\t\t* Parameters:\n\t\t* $fld - Field object\n\t\t* $so1 - Default search operator 1\n\t\t* $sv1 - Default ext filter value 1\n\t\t* $sc - Default search condition (if operator 2 is enabled)\n\t\t* $so2 - Default search operator 2 (if operator 2 is enabled)\n\t\t* $sv2 - Default ext filter value 2 (if operator 2 is enabled)\n\t\t*/\n\n\t\t/**\n\t\t* Set up default values for popup filters\n\t\t*/\n\t}", "public function init()\n {\n $this->loadDefaultWhere();\n }", "public function beforeFilter() {\n parent::beforeFilter();\n $this->loadModel('Label');\n $this->loadModel('Management');\n $this->loadModel('AccessLog');\n $this->loadModel('Bookmark');\n $this->loadModel('Tag');\n $this->loadModel('Device');\n $this->loadModel('User');\n $this->loadModel('Plan');\n $this->loadModel('Link');\n $this->Auth->deny();\n }", "protected function before_filter() {\n\t}", "function _add_template_loader_filters()\n {\n }", "public function __construct()\n {\n $this->beforefilter('auth', array('except'=>array('index','show','sitemap')));\n }" ]
[ "0.78811467", "0.7528046", "0.691004", "0.68704104", "0.68139917", "0.6611729", "0.6595415", "0.64996904", "0.6433308", "0.6381775", "0.6352556", "0.63083744", "0.6289928", "0.6289928", "0.62556356", "0.6246797", "0.6222357", "0.6197738", "0.6175301", "0.61488646", "0.6118944", "0.6084532", "0.60772455", "0.60657334", "0.6056167", "0.6048924", "0.6019338", "0.60024065", "0.59928733", "0.59840524", "0.5961175", "0.5951792", "0.59347856", "0.59328824", "0.59082294", "0.5888719", "0.5887461", "0.588644", "0.5846278", "0.58444756", "0.5835077", "0.5831714", "0.5826549", "0.5824561", "0.58217835", "0.58117235", "0.5810178", "0.579579", "0.57903945", "0.57870895", "0.5767206", "0.5765049", "0.5753839", "0.5752055", "0.5749233", "0.57492137", "0.5743733", "0.5741919", "0.5735982", "0.5729841", "0.5711725", "0.57116544", "0.57083935", "0.57061297", "0.57017857", "0.56992203", "0.5691661", "0.5691155", "0.5685932", "0.5679683", "0.5669849", "0.5666801", "0.56657296", "0.56517166", "0.565157", "0.5651188", "0.5635382", "0.56281114", "0.5615024", "0.5610704", "0.5608816", "0.5604542", "0.5598803", "0.55968535", "0.55931073", "0.5591039", "0.55888873", "0.55872935", "0.5584052", "0.5563843", "0.5561361", "0.55450237", "0.5538804", "0.5535839", "0.5535839", "0.55266327", "0.5523907", "0.5514682", "0.551152", "0.5508011", "0.5506907" ]
0.0
-1
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'sqlite', 'Migration can only be executed safely on \'sqlite\'.'); $this->addSql('CREATE TABLE product (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id_id INTEGER NOT NULL, name CLOB NOT NULL, release_on DATETIME NOT NULL, description CLOB DEFAULT NULL, picture_name VARCHAR(255) DEFAULT NULL, localisation VARCHAR(255) DEFAULT NULL, category VARCHAR(255) DEFAULT NULL, other_details CLOB DEFAULT NULL)'); $this->addSql('CREATE INDEX IDX_D34A04AD9D86650F ON product (user_id_id)'); $this->addSql('CREATE TABLE user (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, roles CLOB DEFAULT NULL --(DC2Type:json_array) , firstname VARCHAR(255) NOT NULL, lastname VARCHAR(255) NOT NULL, phone VARCHAR(30) NOT NULL)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649F85E0677 ON user (username)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649E7927C74 ON user (email)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649444F97DD ON user (phone)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }", "public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }", "public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }", "public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}", "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n }", "public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }", "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }", "public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}", "public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }", "public function preUp()\n {\n }", "public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }", "public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}", "public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }", "public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\n }", "public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }", "public function up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\n }", "public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }", "public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }", "public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}", "public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }", "public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }", "public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => 'phmsanttos@gmail.com',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }", "public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => 'brian@tykus.ie'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => 'bpro@stpaulsgfc.ie'\n\t\t));\t\t\n\t}", "public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\n }", "public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}", "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }", "public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }", "public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }", "public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }", "public function up() { return $this->run('up'); }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}", "public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }", "public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}", "public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }", "public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }", "public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }", "public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\n }", "public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}", "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }", "public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}", "public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}", "public function up()\n {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }", "public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }", "public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}", "public function up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }", "public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}", "public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }", "public function up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }", "public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}", "public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }", "public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}", "public function up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}", "public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n// $import->import();\n\t}", "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}", "public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}", "public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\n }", "public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }", "public function up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = 'demo@saphate.com';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = 'admin@saphate.com';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\n\t}", "public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}", "public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}", "public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }", "public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }", "public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}", "public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }", "public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }", "public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }", "public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'animesh@automitra.com',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }", "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}", "public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t)\n\t\t));\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}", "public function up()\n\t{\n Laravel\\Database\\Schema::create(\"orbs\", function($table){\n $table->increments(\"id\");\n $table->string(\"name\");\n $table->string(\"description\");\n $table->integer(\"coins\");\n $table->integer(\"points\");\n $table->integer(\"min_level\");\n $table->integer(\"max_level\");\n $table->integer(\"owner_character\");\n $table->integer(\"acquisition_time\");\n $table->integer(\"last_attacker\");\n $table->integer(\"last_attack_time\");\n $table->string(\"image\");\n });\n\t}" ]
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.7329024", "0.7313519", "0.7298817", "0.72950184", "0.72917736", "0.7291469", "0.72913444", "0.72849613", "0.72839737", "0.7272078", "0.7271878", "0.72659117", "0.7262893", "0.7261672", "0.7256839", "0.72505474", "0.7249633", "0.72441125", "0.724062", "0.72376186", "0.7218244", "0.72177947", "0.72046006", "0.7203395", "0.7196059", "0.7191219", "0.7189963", "0.7177052", "0.71761394", "0.7167738", "0.7164105", "0.7164105", "0.7159096", "0.7147647", "0.7136521", "0.7129768", "0.7124664", "0.7123368", "0.71168584", "0.7104628", "0.7104628", "0.7104618", "0.7097006", "0.70931643", "0.70886755", "0.7087018", "0.7086326", "0.70830804", "0.70829463", "0.70780045", "0.70702124", "0.70690626", "0.7066111", "0.7062268", "0.7058938", "0.705882", "0.70556235", "0.70549136", "0.7054758", "0.70498437", "0.70483595", "0.7047308", "0.7045881", "0.70445794", "0.7043173", "0.703882", "0.7038126", "0.703674", "0.7033728", "0.7032356", "0.7031423", "0.70257956", "0.70142514", "0.70101255", "0.7006208", "0.6988486", "0.6984963", "0.69629973", "0.69612974", "0.69587934", "0.6957519" ]
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'sqlite', 'Migration can only be executed safely on \'sqlite\'.'); $this->addSql('DROP TABLE product'); $this->addSql('DROP TABLE user'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo','fecha','date');\n\t}", "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "public function down()\n {\n $this->dbforge->drop_column('user', 'created_at');\n }", "public function down()\n {\n $this->dropForeignKey(\n 'fk-video-blog_id',\n 'video'\n );\n\n\n echo \"m160820_150846_video_create reverted.\\n\";\n\n }", "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "public function down(){\n $this->dropTable('users');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` INTEGER NOT NULL AFTER `quality_tweet`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n {\n Schema::table('attachments', function(Blueprint $table) {\n\n $table->dropColumn('viewable_id');\n $table->dropColumn('viewable_type');\n\n\n });\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nDROP TABLE IF EXISTS `movimiento`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n\n//\t\t// Dropping a Column From a Table\n\t\t$this->dbforge->drop_column('categories', 'icon');\n\t}", "public function down()\n\t{\n\t\t// nothing to do here.\n\t}", "public function down(){\r\n $this->dbforge->drop_table('users'); //eliminacion de la tabla users\r\n }", "public function down()\n\t{\n\t\tSchema::drop('student');\n\t\t//\n\t}", "public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}", "public function down() \n {\n \n }", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('education');\n\t}", "public function down()\n\t{\n\t\tSchema::drop('l_wardrobe_table');\n\t}", "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "public function down()\n {\n\tSchema::drop('quizzes');\n }", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }", "public function down ()\n {\n }", "abstract public function down();", "abstract public function down();", "abstract public function down();", "public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function down()\r\n {\r\n $this->dbforge->drop_table('users');\r\n }", "public function down() {\n\n\t}", "public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }", "public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE galaxiee (id INT AUTO_INCREMENT NOT NULL, idu_id INT NOT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_8576D2AF376A6230 (idu_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE trou_noir (id INT AUTO_INCREMENT NOT NULL, id_g_id INT DEFAULT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_AB27242D95951086 (id_g_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE galaxiee ADD CONSTRAINT FK_8576D2AF376A6230 FOREIGN KEY (idu_id) REFERENCES univers (id)');\n $this->addSql('ALTER TABLE trou_noir ADD CONSTRAINT FK_AB27242D95951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('DROP TABLE trounoir');\n $this->addSql('ALTER TABLE galaxie DROP FOREIGN KEY FK_1C880711376A6230');\n $this->addSql('DROP INDEX IDX_1C880711376A6230 ON galaxie');\n $this->addSql('ALTER TABLE galaxie CHANGE idu_id id_u_id INT NOT NULL');\n $this->addSql('ALTER TABLE galaxie ADD CONSTRAINT FK_1C8807116F858F92 FOREIGN KEY (id_u_id) REFERENCES univers (id)');\n $this->addSql('CREATE INDEX IDX_1C8807116F858F92 ON galaxie (id_u_id)');\n $this->addSql('ALTER TABLE planete DROP FOREIGN KEY FK_490E3E5712013DEC');\n $this->addSql('DROP INDEX IDX_490E3E5712013DEC ON planete');\n $this->addSql('ALTER TABLE planete ADD id_s_id INT NOT NULL, ADD nb_sattelite INT NOT NULL, DROP ids_id, DROP nb_satelite');\n $this->addSql('ALTER TABLE planete ADD CONSTRAINT FK_490E3E574AEED04E FOREIGN KEY (id_s_id) REFERENCES systeme (id)');\n $this->addSql('CREATE INDEX IDX_490E3E574AEED04E ON planete (id_s_id)');\n $this->addSql('ALTER TABLE systeme DROP FOREIGN KEY FK_95796DE3CD7AFD24');\n $this->addSql('DROP INDEX IDX_95796DE3CD7AFD24 ON systeme');\n $this->addSql('ALTER TABLE systeme CHANGE idg_id id_g_id INT NOT NULL');\n $this->addSql('ALTER TABLE systeme ADD CONSTRAINT FK_95796DE395951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('CREATE INDEX IDX_95796DE395951086 ON systeme (id_g_id)');\n }", "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }", "public function down(): void\n {\n // Remove your data\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_orders');\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function down()\n {\n\tSchema::drop('activities');\n }", "public function down()\n {\n //return false;\n\t\t\n\t\t$TABLE_NAME = 'Haber';\n $this->dropTable($TABLE_NAME);\n\t\t\n\t\t$TABLE_NAME = 'HaberKategori';\n $this->dropTable($TABLE_NAME);\n }", "public function down(){\n $this->dbforge->drop_table('subcategories_news'); //eliminacion de la tabla subcategories_news\n }", "public function down()\n {\n }", "public function down()\n {\n }", "public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}", "public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_inicio` `fecha_inicio` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_fin` `fecha_fin` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `descuento` `descuento` DECIMAL;\r\n\r\nALTER TABLE `promocion`\r\n ADD `descripcion` VARCHAR(70) AFTER `id`,\r\n ADD `estado` VARCHAR(11) AFTER `fecha_fin`,\r\n ADD `promocion_global` TINYINT(1) NOT NULL AFTER `descuento`;\r\n\r\nALTER TABLE `promocion` DROP `activo`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n\t\t//return false;\n\t}", "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}", "public function change()\n {\n $this->schema->table('recurring_expenses',function($table){\n $table->date('end_repeat')->nullable();\n $table->boolean('ended')->default(false);\n $table->enum('repeat',['0','1','7','14','30','365'])->nullable();\n });\n\n $this->schema->table('expenses',function($table){\n $table->dropColumn('end_repeat');\n $table->dropColumn('repeat');\n $table->integer('parent_id')->nullable();\n $table->foreign('parent_id')->references('id')->on('expenses')->onDelete('cascade');\n });\n }", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->dropForeign('users_id_turma_foreign');\n });\n\n Schema::table('contato', function (Blueprint $table) {\n $table->dropForeign('contato_id_usuario_foreign');\n });\n\n Schema::table('monitores', function (Blueprint $table) {\n $table->dropForeign('monitores_id_turma_foreign');\n $table->dropForeign('monitores_id_usuario_foreign');\n });\n\n Schema::table('galeria_portifolio', function (Blueprint $table) {\n $table->dropForeign('galeria_portifolio_id_portifolio_foreign');\n });\n\n Schema::table('portifolio_alunos', function (Blueprint $table) {\n $table->dropForeign('portifolio_alunos_id_portifolio_foreign');\n $table->dropForeign('portifolio_alunos_id_usuario_foreign');\n });\n\n Schema::table('cobranca', function (Blueprint $table) {\n $table->dropForeign('cobranca_id_aluno_foreign');\n });\n\n Schema::table('lista_de_presenca', function (Blueprint $table) {\n $table->dropForeign('lista_de_presenca_id_usuario_foreign');\n });\n\n Schema::table('forum_da_turma', function (Blueprint $table) {\n $table->dropForeign('forum_da_turma_id_usuario_foreign');\n });\n\n Schema::table('posts_do_site', function (Blueprint $table) {\n $table->dropForeign('posts_do_site_id_usuario_foreign');\n });\n\n Schema::table('posts_do_forum', function (Blueprint $table) {\n $table->dropForeign('posts_do_forum_id_topico_foreign');\n $table->dropForeign('posts_do_forum_id_usuario_foreign');\n });\n }", "public function down()\n\t{\n\t\t$this->dropForeignKey('FK_task_creator','tbl_task');\n\n\t\t$this->dropTable('tbl_task');\n\t}", "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down(){\n\t\tSchema::dropIfExists('cargo');\n\t}", "public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }", "public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}", "protected abstract function do_down();", "public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop('activities_types');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE encherir_acheteur (encherir_id INT NOT NULL, acheteur_id INT NOT NULL, INDEX IDX_41ABAAFBB0BA17BB (encherir_id), INDEX IDX_41ABAAFB96A7BB5F (acheteur_id), PRIMARY KEY(encherir_id, acheteur_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE encherir_lot (encherir_id INT NOT NULL, lot_id INT NOT NULL, INDEX IDX_3C56919BB0BA17BB (encherir_id), INDEX IDX_3C56919BA8CBA5F7 (lot_id), PRIMARY KEY(encherir_id, lot_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFB96A7BB5F FOREIGN KEY (acheteur_id) REFERENCES acheteur (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFBB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EB576A8');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EFC101A');\n $this->addSql('DROP INDEX IDX_503B7C878EB576A8 ON encherir');\n $this->addSql('DROP INDEX IDX_503B7C878EFC101A ON encherir');\n $this->addSql('ALTER TABLE encherir DROP id_acheteur_id, DROP id_lot_id');\n }", "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user_login`;\n\nALTER TABLE `user` DROP `user_mname`;\n\nALTER TABLE `user` DROP `user_user`;\n\nALTER TABLE `user` DROP `user_password`;\n\nALTER TABLE `user` DROP `user_date_lastlogin`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n\t{\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('role');\n\t\t});\n\t}", "public function safeDown()\n {\n $this->down();\n }", "public function safeDown()\n {\n $this->down();\n }", "public function down()\n\t{\n\t\tSchema::drop('refs');\n\t}", "public function down () {\n\t\treturn $this->rename_column ('headline', 'title', 'string', array ('limit' => 72));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}", "public function safeDown()\r\n {\r\n $this->down();\r\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n<<<<<<< HEAD\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n $this->addSql('ALTER TABLE liste_affaire_affaire DROP FOREIGN KEY FK_CA81ADF3F082E755');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152EBF396750');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E65450D2529');\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E6584CF0CF');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2FF631228');\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCE2687AC3');\n $this->addSql('ALTER TABLE sejour DROP FOREIGN KEY FK_96F52028E2687AC3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152E46135043');\n $this->addSql('DROP TABLE affaire');\n<<<<<<< HEAD\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE responsable_legal');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('DROP TABLE enfant');\n $this->addSql('DROP TABLE enfant_sejour');\n $this->addSql('DROP TABLE sejour');\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE etablissement');\n $this->addSql('DROP TABLE liste_affaire');\n $this->addSql('DROP TABLE responsable_legal');\n $this->addSql('DROP TABLE user');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user`;\n\nDROP TABLE IF EXISTS `question`;\n\nDROP TABLE IF EXISTS `answer`;\n\nDROP TABLE IF EXISTS `image`;\n\nDROP TABLE IF EXISTS `vote`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }", "public function down() {\n\t}", "public function down() {\n\t}", "public function down() {\n\t}", "public function down()\n {\n Schema::dropIfExists('reunion');\n }", "public function down(): void\n {\n $this->table('services')\n ->dropForeignKey(\n ['currency_id','billing_period_id']\n )->save();\n $this->execute('DELETE FROM currencies');\n $this->execute('DELETE FROM billing_periods');\n $this->table('services')->drop()->save();\n $this->table('currencies')->drop()->save();\n $this->table('billing_periods')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('article_category');\n\t}", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->renameColumn('first_name', 'name');\n $table->dropIndex('users_first_name_index');\n $table->dropIndex('users_created_at_index');\n $table->dropIndex('users_updated_at_index');\n $table->dropColumn(\"last_name\");\n $table->dropColumn(\"username\");\n $table->dropColumn(\"provider\");\n $table->dropColumn(\"provider_id\");\n $table->dropColumn(\"api_token\");\n $table->dropColumn(\"code\");\n $table->dropColumn(\"remember_token\");\n $table->dropColumn(\"role_id\");\n $table->dropColumn(\"last_login\");\n $table->dropColumn(\"status\");\n $table->dropColumn(\"root\");\n $table->dropColumn('backend');\n $table->dropColumn(\"photo_id\");\n $table->dropColumn(\"lang\");\n $table->dropColumn(\"color\");\n $table->dropColumn(\"about\");\n $table->dropColumn(\"facebook\");\n $table->dropColumn(\"twitter\");\n $table->dropColumn(\"linked_in\");\n $table->dropColumn(\"google_plus\");\n });\n }", "public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}", "public function down()\n\t{\n\t\tSchema::table('precios_aterrizajes_despegues', function(Blueprint $table)\n\t\t{\n\t\t\t//\n\t\t});\n\t}", "public function down()\n{\nSchema::drop('statustype');\nSchema::drop('area');\nSchema::drop('region');\nSchema::drop('territory');\nSchema::drop('trackedevent');\nSchema::drop('zip_territory');\nSchema::drop('messagetype');\nSchema::drop('optintype');\nSchema::drop('representative');\nSchema::drop('pediatrician');\nSchema::drop('application_messagestatus');\nSchema::drop('application_optin');\nSchema::drop('application_trackedevent');\nSchema::drop('application');\n}", "public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}", "protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_350001418F5EA509');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8B8F5EA509');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA148F5EA509');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0E8F5EA509');\n $this->addSql('ALTER TABLE cours DROP FOREIGN KEY FK_FDCA8C9CF46CD258');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8BF46CD258');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14F46CD258');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7F46CD258');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9A21BD112');\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_35000141A21BD112');\n $this->addSql('ALTER TABLE contacte DROP FOREIGN KEY FK_C794A022A21BD112');\n $this->addSql('ALTER TABLE demande DROP FOREIGN KEY FK_2694D7A5A21BD112');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14A6CC7B2');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7A21BD112');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EE455FCC0');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EBDDFA3C9');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EDC304035');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9E3797A94');\n $this->addSql('ALTER TABLE personne DROP FOREIGN KEY FK_FCEC9EFA76ED395');\n $this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');\n $this->addSql('DROP TABLE absence');\n $this->addSql('DROP TABLE classe');\n $this->addSql('DROP TABLE classe_personne');\n $this->addSql('DROP TABLE contacte');\n $this->addSql('DROP TABLE cours');\n $this->addSql('DROP TABLE demande');\n $this->addSql('DROP TABLE matiere');\n $this->addSql('DROP TABLE matiere_classe');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE note');\n $this->addSql('DROP TABLE personne');\n $this->addSql('DROP TABLE personne_matiere');\n $this->addSql('DROP TABLE reset_password_request');\n $this->addSql('DROP TABLE salle');\n $this->addSql('DROP TABLE seance');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDEA76ED395');\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE19FCD424');\n $this->addSql('DROP TABLE booking');\n $this->addSql('DROP TABLE product_image');\n $this->addSql('DROP TABLE family_page_container');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE time_line');\n $this->addSql('ALTER TABLE family DROP FOREIGN KEY FK_A5E6215B727ACA70');\n $this->addSql('DROP INDEX IDX_A5E6215B727ACA70 ON family');\n $this->addSql('ALTER TABLE family ADD page_content_id INT NOT NULL, DROP parent_id, DROP has_uniques_prices, DROP has_seasonal_products');\n $this->addSql('ALTER TABLE family ADD CONSTRAINT FK_A5E6215B8F409273 FOREIGN KEY (page_content_id) REFERENCES page_content (id)');\n $this->addSql('CREATE INDEX IDX_A5E6215B8F409273 ON family (page_content_id)');\n $this->addSql('ALTER TABLE link ADD page_container_id INT DEFAULT NULL, DROP url');\n $this->addSql('ALTER TABLE link ADD CONSTRAINT FK_36AC99F123D5B0C FOREIGN KEY (page_container_id) REFERENCES page_container (id)');\n $this->addSql('CREATE INDEX IDX_36AC99F123D5B0C ON link (page_container_id)');\n $this->addSql('ALTER TABLE product DROP content, DROP order_by, DROP is_generic, DROP type, CHANGE title label VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');\n $this->addSql('ALTER TABLE unit DROP duration');\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F5B7AF75');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95C8486F9AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6498486F9AC');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660D629F605');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660E308AC6F');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46CFFE9AD6');\n $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADEE45BDBF');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95CEE45BDBF');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649EE45BDBF');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F464584665A');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C544584665A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649D60322AC');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46DCD6110');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F462ADD6D8C');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C5459027487');\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398A76ED395');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE format');\n $this->addSql('DROP TABLE material');\n $this->addSql('DROP TABLE `order`');\n $this->addSql('DROP TABLE order_detail');\n $this->addSql('DROP TABLE picture');\n $this->addSql('DROP TABLE product');\n $this->addSql('DROP TABLE product_theme');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE stock');\n $this->addSql('DROP TABLE suppliers');\n $this->addSql('DROP TABLE theme');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n {\n Schema::dropIfExists('data');\n }", "public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}" ]
[ "0.7950277", "0.78636813", "0.76065636", "0.7493955", "0.7320625", "0.7245268", "0.7187498", "0.71543235", "0.715298", "0.7141911", "0.7135835", "0.71214414", "0.71154845", "0.71057886", "0.7098064", "0.70800334", "0.7078775", "0.70729095", "0.7068331", "0.7066272", "0.7053364", "0.7053364", "0.7042174", "0.7042174", "0.7042174", "0.7041765", "0.7040102", "0.7028846", "0.70253754", "0.7021679", "0.6988633", "0.6986877", "0.6978061", "0.6971848", "0.6944203", "0.6944203", "0.6944203", "0.6942135", "0.6941429", "0.6939214", "0.6935277", "0.69334567", "0.6928689", "0.6924838", "0.6924794", "0.6913486", "0.6902361", "0.6897891", "0.6897845", "0.6897824", "0.6897824", "0.68886673", "0.688262", "0.6874051", "0.6869844", "0.6863713", "0.6858435", "0.68545175", "0.68440175", "0.6842142", "0.6836981", "0.6836124", "0.6834763", "0.68303466", "0.68297166", "0.68282366", "0.6826686", "0.6824025", "0.68185335", "0.6811099", "0.68078107", "0.68056506", "0.68056506", "0.6789167", "0.67755204", "0.67742497", "0.6765081", "0.67597127", "0.67596203", "0.67564446", "0.67564446", "0.67564446", "0.6753443", "0.6753351", "0.6753351", "0.6753351", "0.6752681", "0.674581", "0.6743746", "0.67387754", "0.6733766", "0.67331296", "0.6731279", "0.67302275", "0.6727377", "0.67273724", "0.672722", "0.672607", "0.67173517", "0.67139125", "0.671303" ]
0.0
-1
Display a listing of the resource.
public function index() { return view('modelePreparation.index', ['modelePreparations' => modelePreparation::all()]); }
{ "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